<!--

/* ==============================================================================
   Description : Librairie de fonctions permettant d'obtenir des
					  informations au sujet des fureteurs.
   Commentaire : Aucun
   Référence ..: Aucune
   ============================================================================== */

/* ===============================================================
	Constructeur de ScreenObject
	=============================================================== */
function GBL_ScreenObject() 
{ 
	this.intWidth = 0;
	this.intHeight = 0;
}	// function GBL_ScreenObject() 


/* ===============================================================
	Détermine s'il s'agit de Netscape
	=============================================================== */
function GBL_IsNetscape() 
{ 
	var blnReturnValue = false;
	
	if (GBL_GetBrowserName() == 'Netscape')
			blnReturnValue = true;
			
	return blnReturnValue;
}	//function GBL_IsNetscape() 

/* ===============================================================
	Détermine s'il s'agit de Netscape 4
	=============================================================== */
function GBL_IsNetscape4() 
{ 
	var blnReturnValue = false;
	
	if (GBL_GetBrowserName() == 'Netscape')
		if (GBL_GetBrowserVersion() >= 4 && GBL_GetBrowserVersion() < 5)
			blnReturnValue = true;
			
	return blnReturnValue;
}	//function GBL_IsNetscape4() 

/* ===============================================================
	Détermine s'il s'agit de Netscape 6 (Mozilla/5.0)
	=============================================================== */
function GBL_IsNetscape6() 
{ 
	var blnReturnValue = false;
	
	if (GBL_GetBrowserName() == 'Netscape')
		if (GBL_GetBrowserVersion() >= 5 && GBL_GetBrowserVersion() < 6)
			blnReturnValue = true;
			
	return blnReturnValue;
}	//function GBL_IsNetscape6() 

/* ===============================================================
	Détermine s'il s'agit d'Internet Explorer
	=============================================================== */
function GBL_IsInternetExplorer() 
{ 
	var blnReturnValue = false;
	
	if (GBL_GetBrowserName() == 'Microsoft Internet Explorer')
			blnReturnValue = true;
			
	return blnReturnValue;
}	//function GBL_IsInternetExplorer() 

/* ===============================================================
	Détermine s'il s'agit d'Internet Explorer 4
	=============================================================== */
function GBL_IsInternetExplorer4() 
{ 
	var blnReturnValue = false;
	
	if (GBL_GetBrowserName() == 'Microsoft Internet Explorer')
		if (GBL_GetBrowserVersion() >= 4 && GBL_GetBrowserVersion() < 5)
			blnReturnValue = true;
			
	return blnReturnValue;
}	//function GBL_IsInternetExplorer4() 

/* ===============================================================
	Détermine s'il s'agit d'Internet Explorer 5
	=============================================================== */
function GBL_IsInternetExplorer5() 
{ 
	var blnReturnValue = false;
	
	if (GBL_GetBrowserName() == 'Microsoft Internet Explorer')
		if (GBL_GetBrowserVersion() >= 5 && GBL_GetBrowserVersion() < 6)
			blnReturnValue = true;
			
	return blnReturnValue;
}	//function GBL_IsInternetExplorer5() 

/* ===============================================================
	Détermine le nom du navigateur
	=============================================================== */
function GBL_GetBrowserName() 
{ 
	return navigator.appName;
}	// function GBL_GetBrowserName() 


/* ===============================================================
	Détermine la version du navigateur
	=============================================================== */
function GBL_GetBrowserVersion() 
{
	var intStartPos;
	var intEndPos;
	var intAppVersion;

	// Valeur par défaut
	intAppVersion = navigator.appVersion.substring(0,4);
	
	// exemple de résultat pour la version 5 (Internet Explorer):
	// 4.0 (compatible; MSIE 5.0; Windows NT; DigExt)
	// il faut alors vérifier si le string MSIE ... existe
	// et en extraire la version.
	intStartPos = navigator.appVersion.indexOf("MSIE")
	if (intStartPos > -1)
	{
		// Extraire la version après le MSIE
		intEndPos = navigator.appVersion.indexOf(";", intStartPos)
		intAppVersion = navigator.appVersion.substring(intStartPos+5, intEndPos)
	}
		
	return intAppVersion
}	//function GBL_GetBrowserVersion() 
 

/* ===============================================================
	Détermine si les cookies sont activés.
	Retour :	True, si cookie enabled. False, autrement.
	=============================================================== */
function GBL_IsCookiesEnabled()
{
	return (document.cookie.length > 0);
}	// function GBL_IsCookiesEnabled()


/* ===============================================================
	Détermine la résolution de l'écran
	Retourne un objet de type ScreenObject
	=============================================================== */
function GBL_GetScreenResolution() 
{ 
	var objScreen = new GBL_ScreenObject();
	
	objScreen.intWidth = screen.width;
	objScreen.intHeight = screen.height;

	return objScreen;	
} //function GBL_GetScreenResolution() 


//-->
