// ---[ GLOBALES GENERALES ]-------------------------------------------------------------------

var VALUE_OFF	= 0;
var VALUE_ON	= 1;



// ---[ ON RECUPERE LE BON NAVIGATEUR ]-------------------------------------------------------------------

var AppBrowser;
var ie4, ns4, ns6, ismozilla;
var isRichText = false;


function CNavigator( )
{
	this.isIE4		= false;
	this.isNS4		= false;
	this.isNS6		= false;
	this.isMOZ		= false;
	
	this.isRichModeEnable	= false;
	
	
	this.isIE4 = ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 ));
	this.isNS4 = ((navigator.appName == "Netscape") &&(parseInt(navigator.appVersion) >= 4 ) && (parseInt(navigator.appVersion) < 5 ));
	this.isNS6 = ((navigator.appName == "Netscape")&&(parseInt(navigator.appVersion) >= 5 ));
	this.isMOZ = (navigator.userAgent.toLowerCase().indexOf("gecko") != -1 && navigator.userAgent.toLowerCase().indexOf("safari") == -1);
	
	this.isRichModeEnable = ( document.getElementById && document.designMode );
	
	
	this.getWidth = function ( )
	{
		var returnValue = -1;
	
		if ( this.isNS4 )
		{
			returnValue = window.innerWidth;
		}
		else
		{
			returnValue = document.body.clientWidth;
		}
		return returnValue;
	}


	this.getHeight( )
	{
		var returnValue = -1;
	
		if ( this.isNS4 )
		{
			returnValue = window.innerHeight;
		}
		else
		{
			returnValue = document.body.clientHeight;
		}
		
		return returnValue;
	}
	
}


function initNavigatorVersion()
{
	ie4 = ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 ));
	ns4 = ((navigator.appName == "Netscape") &&(parseInt(navigator.appVersion) >= 4 ) && (parseInt(navigator.appVersion) < 5 ));
	ns6 = ((navigator.appName == "Netscape")&&(parseInt(navigator.appVersion) >= 5 ));
	ismozilla = (navigator.userAgent.toLowerCase().indexOf("gecko") != -1 && navigator.userAgent.toLowerCase().indexOf("safari") == -1);

	if ( ie4 ) 
	{
		AppBrowser = "ie4";
	}
	else if ( ns4 ) 
	{
		AppBrowser = "ns4";	
	}
	else if ( ns6 ) 
	{
		AppBrowser = "ns6";
	}
	else if ( ismozilla )
	{
		AppBrowser = "mozilla";
	} 
	else 
	{
		AppBrowser = "other";
	}

	if ( document.getElementById && document.designMode ) 
	{
		isRichText = true;
	}

}




// ---[ FONCTIONS SPECIFIQUES AU NAVIGATEUR ]-------------------------------------------------------------------

function getNavigatorWidth( )
{
	var returnValue = -1;

	if ( ns4 )
	{
		returnValue = window.innerWidth;
	}
	else
	{
		returnValue = document.body.clientWidth;
	}
	
	return returnValue;
}


function getNavigatorHeight( )
{
	var returnValue = -1;

	if ( ns4 )
	{
		returnValue = window.innerHeight;
	}
	else
	{
		returnValue = document.body.clientHeight;
	}
	
	return returnValue;
}
initNavigatorVersion()

