
function Browser() {
	
	// Détection du navigateur
	if(navigator.userAgent.indexOf('Opera')!=-1)
		this.opera = true;
	if(navigator.userAgent.indexOf('Konqueror')!=-1)
		this.konqueror = true;
	if(navigator.userAgent.indexOf('Safari')!=-1)
		this.safari = true;
	if(navigator.userAgent.indexOf('Firefox/1.0')!=-1)
		this.ff10 = true;
	if(navigator.userAgent.indexOf('Firefox/1.5')!=-1)
		this.ff15 = true;
	if(navigator.userAgent.indexOf('Firefox/2.0')!=-1)
		this.ff20 = true;
	if(navigator.userAgent.indexOf('Netscape/7.0')!=-1)
		this.netscape = true;
	if(navigator.userAgent.indexOf('MSIE 7')!=-1)
		this.ie7 = true;
	if(navigator.userAgent.indexOf('MSIE 6')!=-1)
		this.ie6 = true;
		
	// fonctions
	this.getWindowWidth = function() {
	
		var windowWidth = 0;
		
		if(this.ie6) 
			windowWidth = document.body.clientWidth;
		else if(this.ie7)
			windowWidth = document.documentElement.clientWidth;
		else
			windowWidth = window.innerWidth - 18;
			
		return windowWidth;
	} // getWindowWidth
	
	this.getWindowHeight = function() {
	
		var windowHeight = 0;
		
		if(this.ie6) 
			windowHeight = document.body.clientHeight;
		else if(this.ie7)
			windowHeight = document.documentElement.clientHeight;
		else
			windowHeight = window.innerHeight - 18;
			
		return windowHeight;
	} // getWindowHeight
	
	this.getWindowCenterLeft = function() {
		
		return (this.getWindowWidth() - this.getWindowWidth()%2)/2;
		
	} // getWindowCenterLeft
	
	this.getWindowCenterTop = function() {
		
		return (this.getWindowHeight() - this.getWindowHeight()%2)/2;
		
	} // getWindowCenterTop
	
}	
