function toggleLayer(whichLayer)
{
	if (document.getElementById)
	{
		// this is the way the standards work
		var style2 = document.getElementById(whichLayer).style;
		if ( style2.display == "none") {
			 style2.display = "block";
		} else {
			 style2.display = "none";
		}
	}
	else if (document.all)
	{
		// this is the way old msie versions work
		var style2 = document.all[whichLayer].style;
		if ( style2.display == "none") {
			 style2.display = "block";
		} else {
			 style2.display = "none";
		}
	}
	else if (document.layers)
	{
		// this is the way nn4 works
		var style2 = document.layers[whichLayer].style;
		if ( style2.display == "none") {
			 style2.display = "block";
		} else {
			 style2.display = "none";
		}
	}
}


/* Ouvre un popup */

function NewWindow(mypage, myname, w, h, scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;

	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll;
	
	win = window.open(mypage, myname, winprops);
	
	if ( window.focus && win ) { win.focus(); }
}


// Gestion du menu déroulant
Menu = {timer : null, current : null};
Menu.getStyle = function(name){
	if(document.getElementById) return document.getElementById(name).style;
	else if(document.all) return document.all[name].style;
	else if(document.layers) return document.layers[name];
}
Menu.show = function(name){
	if(this.timer) clearTimeout(this.timer);
	this.getStyle(name).visibility = "visible";
	this.current = name;
}
Menu.hide = function(){
	this.timer = setTimeout("Menu.doHide()",50);
}
Menu.doHide = function(){
	if(this.current){
		this.getStyle(this.current).visibility = "hidden";
		this.current = null;
	}
}
