if(document.getElementById) 
{
HauteurY = HauteurS
p=0
abs=0

//test navigateur
NomNav = navigator.appName; 
VersNav = navigator.appVersion;
id = VersNav.indexOf('MSIE');
NumVers = VersNav.substring(id+5,id+8);


function Fade(obj,str,see)
{   
    obj.style.filter="blendTrans(duration=1)"    
    if(obj.style.visibility!=see && obj.filters.blendTrans.status!=1)  
    { obj.filters.blendTrans.Apply()
      obj.style.visibility=see
      obj.filters.blendTrans.Play()
    }
    else document.getElementById(str).style.visibility=see
}


document.onmousemove = function(e)
{  
   largeur = (document.body.clientWidth);
   y = (navigator.appName.substring(0,3)=="Net") ? e.clientY : event.clientY;
   x = (navigator.appName.substring(0,3)=="Net") ? e.clientX : event.clientX;
   //window.status = "Souris X:"+x+" / Y:"+y;
   
   if(skn.visibility=='visible' && ((x<((largeur-LargeurM*nombre_menu)/2+5-document.body.scrollLeft+(p-1)*LargeurM) || ((largeur-LargeurM*nombre_menu)/2+5-document.body.scrollLeft+p*LargeurM)<x) || (y<(PosY+77-document.body.scrollTop) || (PosY+77+HauteurM+HauteurY-document.body.scrollTop)<y))) 
   {
		if (NumVers > 5 && NomNav == "Microsoft Internet Explorer") 
		{
			Fade(topdeck,'.menu','hidden');
		}
		else
		{
			skn.visibility="hidden";
		}
	}
}


function pop(msg,pos)
{ 
	HauteurY = (HauteurS+1)*msg.length/2
	skn.visibility="hidden"
	skn.top=PosY+HauteurM
	skn.left=pos-1
	content="<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=1 BGCOLOR="+Color3S+" WIDTH="+LargeurS+">"    
	for(pass=0;pass<msg.length;pass+=2) content+="<TR><TD WIDTH="+LargeurS+" onMouseDown='location.href=\""+msg[pass+1]+"?menu="+p+"\"' onMouseOver='this.style.background=\""+Color2S+"\"' onMouseOut=\"this.style.background='"+Color1S+"'\" HEIGHT="+HauteurS+" CLASS=smenu>"+msg[pass]+"</TD></TR>"
	document.getElementById("topdeck").innerHTML=content+"</TABLE>"
  
	if (NumVers > 5 && NomNav == "Microsoft Internet Explorer") 
	{
		if(document.all)   Fade(topdeck,'.menu','visible');
	}
	else
		skn.visibility="visible";
}

largeur = screen.width-20;
abs=(largeur/2)-((nombre_menu/2)*110);

//document.write('<DIV style="position:absolute; top:78px; left:'+abs+'; width:100%; z-index:50" ><DIV style="POSITION:absolute;VISIBILITY:hidden;z-index:15" id=topdeck ></DIV><TABLE style="position:absolute" BORDER=0 CELLPADDING=0 CELLSPACING=0 BGCOLOR='+Color3M+' WIDTH='+LargeurM*menu.length/2 +' HEIGHT='+HauteurM+'><TR><TD><TABLE CELLPADING=0 CELLSPACING=1 BORDER=0 WIDTH=100% HEIGHT=100%><tr>')
document.write('<DIV style="position:absolute; top:78px; left:170px; width:100%; z-index:50" ><DIV style="POSITION:absolute;VISIBILITY:hidden;z-index:15" id=topdeck ></DIV><TABLE style="position:absolute" BORDER=0 CELLPADDING=0 CELLSPACING=0 BGCOLOR='+Color3M+' WIDTH='+LargeurM*menu.length/2 +' HEIGHT='+HauteurM+'><TR><TD><TABLE CELLPADING=0 CELLSPACING=1 BORDER=0 WIDTH=100% HEIGHT=100%><tr>')
skn=document.getElementById('topdeck').style

for(pass=0;pass<menu.length/2;pass++) 
{
	if(menu[pass*2+1]=='')
	{
		document.write("<TD WIDTH="+LargeurM+" onMouseOver='this.style.background=\""+Color2M+"\";p="+(pass+1)+";pop(zlien["+pass+"],this.offsetLeft)' onMouseOut='this.style.background=\""+Color1M+"\"' CLASS=menuSL>"+menu[pass*2]+"</TD>")
	}
	else 
	{
		p=pass+1;
		document.write("<TD WIDTH="+LargeurM+" onMouseDown='location.href=\""+menu[pass*2+1]+"?menu="+p+"\"' onMouseOver='this.style.background=\""+Color2M+"\"' onMouseOut='this.style.background=\""+Color1M+"\"' CLASS=menu>"+menu[pass*2]+"</TD>")
	}
}

document.write('</TR></TABLE></TD></TR></TABLE></DIV>')
}
