
function hauteur(){ 
	/* STRUCTURE GLOBALE 603 */
	var hauteur_mini = 520;
	var centre_body = document.getElementById('centre_body');
	var contenu = document.getElementById('contenu');
	
	if(centre_body.offsetHeight != null){ 
		divHeight=centre_body.offsetHeight 
	} else if(centre_body.style.pixelHeight != null){
		divHeight=centre_body.style.pixelHeight
	}
	if(divHeight<hauteur_mini){
		centre_body.style.height = divHeight + (hauteur_mini-divHeight) + "px";
		contenu.style.height = divHeight + (hauteur_mini-divHeight) + "px";
	} 
	
	/* MENU */
	if( document.getElementById('conteneur-menu') != null ){
		var obj = document.getElementById('conteneur-menu');
		if(obj.offsetHeight != null){ 
			divHeight=obj.offsetHeight 
		} else if(obj.style.pixelHeight != null){
			divHeight=obj.style.pixelHeight
		}
		if(divHeight<506){
			obj.style.height = divHeight + (506-divHeight) + "px";
		} 
	}
	
	/* CONTENU 603 */
	/*if( document.getElementById('contenu') != null ){
		var contenu = document.getElementById('contenu');
		if(contenu.offsetHeight != null){ 
			divHeight=contenu.offsetHeight 
		} else if(contenu.style.pixelHeight != null){
			divHeight=contenu.style.pixelHeight
		}
		if(divHeight<hauteur_mini){
			contenu.style.height = divHeight + (hauteur_mini-divHeight) + "px";
		} else {
			contenu.style.height = divHeight+ "px";
		}
	}*/
	
	/* carousel1 */
	if( document.getElementById('carousel1-wrap') != null ){
		var obj = document.getElementById('carousel1-wrap');
		if(obj.offsetHeight != null){ 
			divHeight=obj.offsetHeight 
		} else if(obj.style.pixelHeight != null){
			divHeight=obj.style.pixelHeight
		}
		if(divHeight<500){
			obj.style.marginTop = divHeight + (125-divHeight) + "px";
		} else {
			obj.style.marginTop = "20px";
		}
	}
	
}	


	


window.onload = function() {
	hauteur();
	
	var Detector = function(){
		var h = document.getElementsByTagName("BODY")[0];
		var d = document.createElement("DIV");
		var s = document.createElement("SPAN");
		d.appendChild(s);
		d.style.fontFamily = "sans";			//font for the parent element DIV.
		s.style.fontFamily = "sans";			//serif font used as a comparator.
		s.style.fontSize   = "72px";			//we test using 72px font size, we may use any size. I guess larger the better.
		s.innerHTML        = "mmmmmmmmmmlil";		//we use m or w because these two characters take up the maximum width. And we use a L so that the same matching fonts can get separated
		h.appendChild(d);
		var defaultWidth   = s.offsetWidth;		//now we have the defaultWidth
		var defaultHeight  = s.offsetHeight;	//and the defaultHeight, we compare other fonts with these.
		h.removeChild(d);
		/* test
		 * params:
		 * font - name of the font you wish to detect
		 * return: 
		 * f[0] - Input font name.
		 * f[1] - Computed width.
		 * f[2] - Computed height.
		 * f[3] - Detected? (true/false).
		 */
		function debug(font) {
			h.appendChild(d);
			var f = [];
			f[0] = s.style.fontFamily = font;	// Name of the font
			f[1] = s.offsetWidth;				// Width
			f[2] = s.offsetHeight;				// Height
			h.removeChild(d);
			font = font.toLowerCase();
			if (font == "serif") {
				f[3] = true;	// to set arial and sans-serif true
			} else {
				f[3] = (f[1] != defaultWidth || f[2] != defaultHeight);	// Detected?
			}
			return f;
		}
		function test(font){
			f = debug(font);
			return f[3];
		}
		this.detailedTest = debug;
		this.test = test;	
	}
	
	/*var detective = new Detector();
	# alert(detective.test("centaur"));
	if( detective.test("Arabic Typesetting") == false){
			/*myBody = document.getElementsByTagName("body")[0];
			document.getElementsByTagName("body")[0].style.fontSize = "12px"; 
			document.getElementsByTagName("h1")[0].style.fontSize = "20pt";
			document.getElementsByTagName("h2")[0].style.fontSize = "16pt";
			document.getElementById("navigation").style.fontSize = "16pt";
			document.getElementById("foot_cont").style.fontSize = "26pt";
			document.getElementById("admin").style.fontSize = "8pt";
	}*/
	
}
