function Popup(URL, width, height, scroll)
{
	window.open(URL,'Titre','toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,scrollbars=' + scroll + ',width=' + width + ',height=' + height + ',top=1,left=1');
}

function showmenu(no, pos)
{
	//alert("no = " + no);
	//alert("pos = " + pos);
	//alert("document.all = " + document.all);
	//alert("document.getElementById = " + document.getElementById);
	if (document.all){
		document.all['menu' + no + pos].style.visibility="visible";
		/*lr = document.all['menuCase'];
		if (lr != null)
		{
			document.all['menuCase'].style.visibility="hidden";
		}*/
	}
	else if (document.getElementById){
		/*
		document.layers['menu' + no + pos].visibility="show";
		lr = document.layers["menuCase"];
		if (lr != null)
		{
			document.layers['menuCase'].visibility="hide";
		}
		*/
		document.getElementById("menu" + no + pos).style.visibility="visible";
		//alert("document.getElementById.visibility = " + document.getElementById("menu" + no + pos).style.visibility);
		/*lr = document.getElementById("menuCase");
		if (lr != null)
		{
			documentgetElementById('menuCase').style.visible="hide";
		}*/
	}
	if (no < 9)
	{
		compteur = no + 1;
		for(i=compteur; i<10; i++){
			//alert("i = " + i);
			if (document.all){
				//document.all['menu' + i + 'off'].style.visibility="visible";
				str1 = document.all['menu' + i + 'off'].style.top;
				if (str1.length == 5) { str1 = str1.substr(0, 3); } 
				else  { str1 = str1.substr(0, 2); } 
				//alert(str1);
				
				str2 = document.all['menu' + no + 'on'].style.height;
				//str2 = str2.substr(0, 3);
				if (str2.length == 5) { str2 = str2.substr(0, 3); } 
				else  { str2 = str2.substr(0, 2); } 
				//alert(str2);
				
				str3 = eval(str1) + eval(str2);
				
				//alert(document.all['menu' + i + 'off'].style.top + " = " + str3 + "px");
				document.all['menu' + i + 'off'].style.top = str3 + "px";
			}
			/*
			else if (document.layers){
				str1 = document.layers['menu' + i + 'off'].top;
				str2 = document.layers['menu' + no + 'on'].clip.bottom;
				str3 = eval(str1) + eval(str2);
				//document.layers['menu' + i + 'off'].visibility="show";
				//alert(document.layers['menu' + i + 'off'].top + " = " + str3);
				document.layers['menu' + i + 'off'].top = str3;
			}
			*/
			else if (document.getElementById){
				str1 = document.getElementById('menu' + i + 'off').style.top;
				str2 = document.getElementById('menu' + no + 'on').style.height;
				
				if (str1.length == 5) { str1 = str1.substr(0, 3); } 
				else  { str1 = str1.substr(0, 2); } 
				if (str2.length == 5) { str2 = str2.substr(0, 3); } 
				else  { str2 = str2.substr(0, 2); } 
				
				str3 = eval(str1) + eval(str2);
				
				//alert("str3 = " + str3);
				//document.getElementById('menu' + i + 'off').style.visible="show";
				//alert(document.getElementById('menu' + i + 'off').style.top + " = " + str3 + "px");
				document.getElementById('menu' + i + 'off').style.top = str3 + "px";
			}
		}
	}
}

function hidemenu()
{
	//alert("hidemenu");
	if (document.all){
		document.all['menu1on'].style.visibility="hidden";
		document.all['menu2on'].style.visibility="hidden";
		document.all['menu3on'].style.visibility="hidden";
		document.all['menu4on'].style.visibility="hidden";
		document.all['menu5on'].style.visibility="hidden";
		document.all['menu6on'].style.visibility="hidden";
		document.all['menu7on'].style.visibility="hidden";
		document.all['menu8on'].style.visibility="hidden";
		document.all['menu9on'].style.visibility="hidden";
		document.all['menu1off'].style.visibility="visible";
		document.all['menu1off'].style.top = 140;
		document.all['menu2off'].style.visibility="visible";
		document.all['menu2off'].style.top = 159;
		document.all['menu3off'].style.visibility="visible";
		document.all['menu3off'].style.top = 178;
		document.all['menu4off'].style.visibility="visible";
		document.all['menu4off'].style.top = 197;
		document.all['menu5off'].style.visibility="visible";
		document.all['menu5off'].style.top = 216;
		document.all['menu6off'].style.visibility="visible";
		document.all['menu6off'].style.top = 235;
		document.all['menu7off'].style.visibility="visible";
		document.all['menu7off'].style.top = 266;
		document.all['menu8off'].style.visibility="visible";
		document.all['menu8off'].style.top = 286;
		document.all['menu9off'].style.visibility="visible";
		document.all['menu9off'].style.top = 305;
		/*lr = document.all['menuCase'];
		if (lr != null)
		{
			document.all['menuCase'].style.visibility="visible";
		}*/
	
	}
	else if (document.getElementById){
		document.getElementById('menu1on').style.visibility="hidden";
		document.getElementById('menu2on').style.visibility="hidden";
		document.getElementById('menu3on').style.visibility="hidden";
		document.getElementById('menu4on').style.visibility="hidden";
		document.getElementById('menu5on').style.visibility="hidden";
		document.getElementById('menu6on').style.visibility="hidden";
		document.getElementById('menu7on').style.visibility="hidden";
		document.getElementById('menu8on').style.visibility="hidden";
		document.getElementById('menu9on').style.visibility="hidden";
		document.getElementById('menu1off').style.visibility="visible";
		document.getElementById('menu1off').style.top = 140;
		document.getElementById('menu2off').style.visibility="visible";
		document.getElementById('menu2off').style.top = 159;
		document.getElementById('menu3off').style.visibility="visible";
		document.getElementById('menu3off').style.top = 178;
		document.getElementById('menu4off').style.visibility="visible";
		document.getElementById('menu4off').style.top = 197;
		document.getElementById('menu5off').style.visibility="visible";
		document.getElementById('menu5off').style.top = 216;
		document.getElementById('menu6off').style.visibility="visible";
		document.getElementById('menu6off').style.top = 235;
		document.getElementById('menu7off').style.visibility="visible";
		document.getElementById('menu7off').style.top = 266;
		document.getElementById('menu8off').style.visibility="visible";
		document.getElementById('menu8off').style.top = 286;
		document.getElementById('menu9off').style.visibility="visible";
		document.getElementById('menu9off').style.top = 305;
		/*lr = document.getElementById('menuCase');
		if (lr != null)
		{
			document.getElementById('menuCase').style.visible="show";
		}*/
	}
}
