// http://www.aliasdmc.fr/coursjavas/cours_javascript88.html

var window_width = null;
var window_height = null;
var body_width = null;
var body_height = null;

function getClientDimensions(){

	var browserFamily = navigator.appName;
	
	if (document.body){	// IE
			
		// Dimensions de la zone de contenu visible
		window_width = document.body.clientWidth;
		window_height = document.body.clientHeight;
		
		//window_width = document.documentElement.clientHeight;    // si DTD Strict
		//window_height = document.documentElement.clientWidth;
	
		// Positions de la zone contenu (body)
		body_width = document.body.scrollLeft;
		body_height = document.body.scrollTop;	
	}
	else {
	
		// Dimensions de la zone de contenu visible
		window_width = window.innerWidth;
		window_height = window.innerHeight;
		
		// Positions de la zone contenu (body)
		body_width = window.pageXOffset;
		body_height = window.pageYOffset;
	}
	
	if (browserFamily == "Netscape"){	// FF		
		
	}
	
	else if (browserFamily == "Microsoft Internet Explorer"){	// IE		
					
	}	
	else {
		
	}
	//alert(browserFamily + "\n" + window_width + "\n" + window_height + "\n" + body_width + "\n" + body_height + "\n");
}
