	/****************************
	****** Menu horizontal ******
	****************************/
	var zDessus, zDehors, zTchm = new Array();
	var ie5mac = false, xie5mac = 0, yie5mac = 0;
	var couleur = new Array("#fc025c", "#fa2400", "#fe9901", "#28afcf", "#5f68ab")
	var racmenu = new Array(5);

	function menuHInit() {
		//--- Marquer le chemin
		if (zPage != -1) {
			niv = zTniv[zPage]; niv++;
			for (g = 0, k = zPage; k >= 0; k--)
				if (zTniv[k] < niv) {
					niv = zTniv[k];
					zTchm[g++] = k;
				}
		}
		//--- Prevoir les evenements 
		obj = obtenirLById("zmenu");
		if (! obj)
			return;
		obj.onmouseout = menuEvent;
		obj.onmouseover = menuEvent;
		obj.onmousedown = menuEvent;
		obj.onclick = menuEvent;
		
		
		//--- Creer le premier niveau
		chn = "<table class='cmshmenu0tab' cellspacing='0' cellpadding='0'>";
		//--- 1er étage du menu
		chn += "<tr>";
		chn += "<th scope='row'><table width='100%'  border='0' cellspacing='4' cellpadding='0'><tr>";
		var nb_menu1 = 0;
		var g = 0;
		while ( g<zNmenu && nb_menu1<3){
			if (zTniv[g] == 0 ) {		
				racmenu[nb_menu1] = g;
				nb_menu1 ++;
				chn += "<th width='33%' scope='row'><table width='100%'  border='0' cellspacing='0' cellpadding='0'>";
				chn += "<tr>";
				chn += "<th width='18' scope='row'><img src='mat/images/gaucheMenu"+nb_menu1+".gif' width='18' height='23'></th>";			
				chn += "<td id='"+g+"menuopt' bgcolor='"+couleur[nb_menu1-1]+"' class='cmshmenu0";
				if (zTcnu[g] != "Y")
					chn += "' style='cursor:default";
				chn += "'>"+zTtxt[g]+"</td>";
				chn += "<td width='18'><img src='mat/images/droiteMenu"+nb_menu1+".gif' width='18' height='23'></td>";
				chn += "<tr>";
				chn += "</table></th>";
			}
			g ++;
			var finpremier = g;
		}
		chn += "</tr></table></th>";
		chn += "</tr>";
	
			
		//--- 2ème étage	
		chn += "<tr>";
		chn += "<th scope='row'><table width='60%'  border='0' align='center' cellpadding='0' cellspacing='0'><tr>";
		var nb_menu2 = 0;
		for (g = finpremier; g < zNmenu; g++){
			if (zTniv[g] == 0 && nb_menu2<2) {
				nb_menu2 ++;
				var z = nb_menu2 +3;
				racmenu[z-1]= g;
				chn += "<th width='37%' scope='row'><table width='100%'  border='0' cellspacing='0' cellpadding='0'>";
				chn += "<tr>";
				chn += "<th width='18' scope='row'><img src='mat/images/gaucheMenu"+z+".gif' width='18' height='23'></th>";
				chn += "<td id='"+g+"menuopt' bgcolor='"+couleur[z-1]+"' class='cmshmenu0";
				if (zTcnu[g] != "Y")
					chn += "' style='cursor:default";
				chn += "'>"+zTtxt[g]+"</td>";
				chn += "<td width='18'><img src='mat/images/droiteMenu"+z+".gif' width='18' height='23'></td>";
				chn += "<tr>";
				chn += "</table></th>";
			}
		}
		chn += "</tr></table></th>";
		chn += "</tr>";

		
		chn += "<\/table>";
		obj.innerHTML = chn;
		
		//--- Detection de MSIE 5 Mac
		chn = navigator.userAgent.toLowerCase();
		if (chn.indexOf("konqueror")==-1 && chn.indexOf("safari")==-1 && chn.indexOf("omniweb")==-1 && chn.indexOf("opera")==-1 && chn.indexOf("webtv")==-1 && chn.indexOf("icab")==-1)
			if (chn.indexOf("msie 5")!=-1 && chn.indexOf("mac")!=-1) {
				ie5mac = true;
				for (obj = obj.firstChild; obj.offsetParent; obj = obj.offsetParent) {
					xie5mac += obj.offsetLeft;
					yie5mac += obj.offsetTop;
				}
			}
		//--- Gauche ou droite ?
		niv = (self.innerWidth ? self.innerWidth : document.body.clientWidth) >> 1;
		for (g = 0; g < zNmenu; g++)
			if (zTniv[g] == 0) {
				obj = obtenirLById(g+"menuopt");
				if (obj.offsetParent)
					for (x = 0; obj.offsetParent; obj = obj.offsetParent)
						x += obj.offsetLeft;
				else
					x = obj.x;
				k = x > niv ? "G" : "D";
			}
			else
				if (zTeta[g] != "X")
					zTeta[g] = k;
	}
	function menuEvent(evt) {
		if (! evt)
			evt = window.event;
		obj = evt.target ? evt.target : evt.srcElement;
		while (! obj.id || obj.tagName != "TR" && obj.tagName != "TD")
			obj = obj.parentNode;
		if (obj.id == "zmenu")
			return;
		k = parseInt(obj.id, 10);
		
		for (i = 0; i < racmenu.length; i++){
			if (k==racmenu[i]){
				num_menu = i;
				break;
			}
		}
		
		switch (evt.type) {
		case "mouseover":
			window.clearTimeout(zDehors);
			window.clearTimeout(zDessus);
			obj.className = "cmshmenui"+(zTniv[k] >= 2 ? "2" : zTniv[k])+"_"+num_menu;
			zDessus = window.setTimeout("menuOuvrir("+k+")", 1);
			break;
		case "mouseout":
			obj.className = "cmshmenu"+(zTniv[k] >= 2 ? "2" : zTniv[k]);
			zDehors = window.setTimeout("menuFermer()", 200);
			break;
		case "mousedown":
			if (zTcnu[k] == "Y")
				obj.className = "cmshmenuc"+(zTniv[k] >= 1 ? "1" : zTniv[k])+"_"+num_menu;
			break;
		case "click":
			if (zTcnu[k] == "Y")
				window.location.href = zTnom[k]+".php";
			break;
		}
	}
	function menuOuvrir(k) {
		//--- Enlever les sous-menus de niveau superieur
		niv = zTniv[k];
		ozmenu = obtenirLById("zmenu");
		for (g = 0; g < zNmenu; g++)
			if (zTniv[g] >= niv && g != k)
				if (obj = obtenirLById(g+"menusous"))
					ozmenu.removeChild(obj);


		if (zTeta[k] == "X" || obtenirLById(k+"menusous"))
			return;

		//--- Emplacement pour deplier (variable: y == -1, y += 28)
		x = 0;
		y = -1;
		obj = obtenirLById(k+"menuopt");
		if (ie5mac && niv)
			y += obj.offsetTop;
		if (niv)
			obj = obj.firstChild;	//--- toujours TD

		if (obj.offsetParent)
			for (g = obj; g.offsetParent; g = g.offsetParent) {
				x += g.offsetLeft;
				y += g.offsetTop;
			}
		else {
			x = obj.x;
			y = obj.y - 1;
		}
		if (ie5mac) {
			x -= xie5mac;
			y -= yie5mac;
		}
		if (zTeta[k] == "G")
			chn = "style='left:0px;top:-999px'>";
		else {
			if (niv)
				x += obj.offsetWidth + obj.nextSibling.offsetWidth;
			else
				y += 28;
			chn = "style='left:"+x+"px;top:"+y+"px'>";
		}
		//--- Creer le sous-menu
		if (niv==0) {
			chn = "<table id='"+k+"menusous' class='cmshmenu1tab' cellspacing='0' cellpadding='0' "+chn;
		}else{
			chn = "<table id='"+k+"menusous' class='cmshmenu2tab' cellspacing='0' cellpadding='0' "+chn;
		}
		niv++;
		nomcl = "cmshmenu"+(niv >= 2 ? "2" : niv);
		for (g = k, g++; g < zNmenu && zTniv[g] >= niv; g++){
			if (zTniv[g] == niv) {
				chn += "<tr id='"+g+"menuopt' class='"+nomcl;
				if (zTcnu[g] != "Y")
					chn += "' style='cursor:default";
				if (zTeta[g] == "X")
					chn += "'><td colspan='2'>"+zTtxt[g]+"<\/td>";
				else
					chn += "'><td>"+zTtxt[g]+"<\/td><td><img src='mat/hmenu"+zTeta[g]+".gif' /><\/td>";
				chn += "<\/tr>";
			}

		}
		chn += "<\/table>";
	

		chn = ozmenu.innerHTML + chn;
		ozmenu.innerHTML = chn;
		chn = "";

		//--- Replacer si a gauche
		if (zTeta[k] == "G") {
			obj = obtenirLById(k+"menusous");
			x -= obj.offsetWidth;
			obj.style.left = x+"px";
			obj.style.top = y+"px";
		}
	}
	function menuFermer() {
		window.clearTimeout(zDessus);
		ozmenu = obtenirLById("zmenu");
		for (k = 0; k < zNmenu; k++)
			if (obj = obtenirLById(k+"menusous"))
				ozmenu.removeChild(obj);
	}
	function menuChemin() {
		chn = "&nbsp;";
		if (zPage != -1)
			for (k = zTchm.length, k--; k >= 0; k--) {
				if (zTcnu[zTchm[k]] == "Y" && k)
					chn += "<a href='"+zTnom[zTchm[k]]+".php' class='cmsachem'>"+zTtxt[zTchm[k]]+"<\/a>";
				else
					chn += zTtxt[zTchm[k]];
				if (k != 0)
					chn += " &gt; ";
			}
		chn = chn.replace(/<br \/>/g, " ");

		if (k = obtenirLById("zchemin"))
			k.innerHTML = chn;
	}

