var ns4 = (document.layers);
var ie4 = (document.all);
var ie5 = (document.all && document.getElementById);
var ns6 = (!document.all && document.getElementById);
if (ie5) ie4=false;

function showDDNav(){
// apelée sur le mouseOver de l'entête de menu + le calque lui-même
        args = showDDNav.arguments;
        if(ns4){
                var args, theObj;
                args = showDDNav.arguments;
                theObj = eval(args[0]);
                  if (theObj) {
                        if(theObj.visibility=='hide'){
                        theObj.visibility = 'show';
                        }
                }
        }
        else if(ie4){
                theObj=eval(args[0]);
                if (theObj) {
                        if (theObj.style.visibility=='hidden'){
                        theObj.style.visibility = 'visible';
                        }
	                }
                }
		else if(ie5 || ns6){
                theObj=eval("document.getElementById('" + args[0] + "')");
				if (theObj) {
                        if (theObj.style.visibility=='hidden'){
                        theObj.style.visibility = 'visible';
                        }
                  }
                }
        else {
        return;
        }
}

function hideDDNav(){
// appelée par le MouseOut de l'entête de menu
args = hideDDNav.arguments;
       if(ie5 || ns6){
	   			theObj=eval("document.getElementById('" + args[0] + "')");
                
				if (ns6) leftDiv=theObj.style.left + 2;
                if (ie5) leftDiv=theObj.offsetLeft + 2;
                
				if (ns6) rightDiv=theObj.style.left + theObj.style.width - 2;
				if (ie5) rightDiv=theObj.offsetLeft + theObj.clientWidth - 2;
				
                if (ns6) topDiv=theObj.style.top + 2;
                if (ie5) topDiv=theObj.offsetTop + 2;
				
				if (ns6) bottomDiv=theObj.style.top + theObj.style.height - 2;
				if (ie5) bottomDiv=theObj.offsetTop + theObj.clientHeight - 2;
                
				if (ie5) {
				Xpos=window.event.x;
				Ypos=window.event.y;
				}
				if (ns6) {
				Xpos=e.clientX;
				Ypos=e.clientY;
				}				
				
				if(Ypos > bottomDiv ||
                        Ypos < topDiv ||
                        Xpos < leftDiv ||
                        Xpos > rightDiv)
                        {
						theObj.style.visibility = 'hidden';
						}
                }			
}

function hideDiv(){
// appelée par le MouseOut du calque
        args = hideDiv.arguments;
        if(ie5 || ns6){
                theObj=eval("document.getElementById('" + args[0] + "')");
                if(theObj.style.visibility=='visible')theObj.style.visibility='hidden';
        }
	   }


function divOut(){
        args = divOut.arguments;
		if (ie5 || ns6) {
		theObj=eval("document.getElementById('" + args[0] + "')");
        	if(theObj.style.backgroundColor="#000066"){
                     theObj.style.backgroundColor="#3366CC";
            }
        }
}

function divOver(){
        args = divOver.arguments;
 		if (ie5 || ns6) {
		theObj=eval("document.getElementById('" + args[0] + "')");
        	if(theObj.style.backgroundColor="#3366CC"){
                     theObj.style.backgroundColor="#000066";
            }
        }
}



function gotoUrl() {
        args = gotoUrl.arguments;
        location.href=args[0];
}


