

window.onload=function () {
start_navigation();	
if (document.getElementById("logo")) {
		document.getElementById("logo").onclick = function () {
		document.location.href="index.php";	
		}
}
}


function GetXmlHttpObject(handler){ 
var objXMLHttp=null
	if (window.XMLHttpRequest){
	objXMLHttp=new XMLHttpRequest()
	}else if (window.ActiveXObject){
	objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
	}
return objXMLHttp
}

function changed_html(lay,dett,leid) {
document.getElementById(lay).innerHTML=dett.responseText; 
if (document.getElementById("cont_actu_home")) {
//scroll_menu();
}
}

function calcul_desc_hauteur (lediv) {	

	// CALCUL DE LA TAILLE DE LA FENETRE SI IE //
	if (document.documentElement) {
	document.getElementById("contenu").style.height= (document.documentElement.clientHeight-48)+"px";
	//document.getElementById("block_gauche").style.height= (hauteur-48)+"px";
	}
	//document.getElementById(lediv).style.height= (window.innerHeight)+"px";
	//alert (document.documentElement.clientHeight);
}

page_active ="";
function invi(divID,flag){
	//var y= document.getElementById("tm"+num);	
	if (document.getElementById("ss_menu_"+divID)) {
	document.getElementById("ss_menu_"+divID).style.visibility=(flag)?'hidden':'visible';	
	}	
	if(document.getElementById(divID)) {
	if (page_active!=divID) {
	document.getElementById(divID).className=(flag)? divID+'_off':divID+'_on';	
	}
	}
	return true;		
}


var retd;
var rub_encours="";

function h(i){invi(i,1);}
function s(i){invi(i,0);}
function d(){retd=setTimeout("hm(false)",400);}
function rd(){clearTimeout(retd);}

// ******************* //
function hm(action) {
this.menu = document.getElementById("menu");
this.submenus = this.menu.getElementsByTagName("div");
	for (var i = 0; i < this.submenus.length; i++){
	h(this.submenus[i].id);		
	}	
}
// ******************* //

// ******************* //
function start_navigation(lay){
	var a=document.getElementById("menu");
	a.onmouseover=new Function("rd()");
	a.onmouseout=new Function("d();");
	this.menu = document.getElementById("menu");
	this.submenus = this.menu.getElementsByTagName("div");
	for (var i = 0; i < this.submenus.length; i++){	
		this.submenus[i].onmouseover =new Function("hm(true);s('"+this.submenus[i].id+"')");
		if (document.getElementById("ss_menu_"+submenus[i].id)) {
			document.getElementById("ss_menu_"+submenus[i].id).onmouseover=new Function("rd()");
			document.getElementById("ss_menu_"+submenus[i].id).onmouseout=new Function("d();");			
		}
	}
}
// ******************* //


function col_img(divID){
if (document.getElementById(divID)) {
document.getElementById(divID).className= divID+'_on';	
page_active = divID;
}
}




