window.onload=montre;
function montre(id) {
var d = document.getElementById(id);
	for (var i = 1; i<=20; i++) {
		if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
	}
if (d) {d.style.display='block';}
}

function ouvrir(l,h,url) { 
hauteur=Math.round((screen.availHeight-h)/2);
largeur=Math.round((screen.availWidth-l)/2);
window.open(url, "site", "toolbar=0,location=0,directories=0,status=0, scrollbars=1,resizable=1,menubar=0,top="+hauteur+",left="+largeur+",width="+l+",height="+h); 
} 

// ouvre une popup dans la mm fentre si dj ouverte
var newWin = null;
function closeWin(nom)
{
	if (newWin!=null)
	{
		if(!newWin.closed && newWin.name==nom)
			newWin.close();
	}
}

function popup(strURL,nom,height,width)
{
	if (height && width)
	{
		var strOptions="";
		closeWin(nom);
		var top=(screen.height-height)/2;
		var left=(screen.width-width)/2;
		strOptions="top="+top+",left="+left+",resizable,scrollbars=yes,height="+height+",width="+width;
		newWin = window.open(strURL, nom, strOptions);
		newWin.focus();
	}
	else
	{
		var strOptions="";var height="";var width="";
		closeWin(nom);
		height = document.body.offsetHeight-((document.body.offsetHeight*50)/100);
		width  = document.body.offsetWidth-((document.body.offsetWidth*50)/100);
		var top=(screen.height-height)/2;
		var left=(screen.width-width)/2;
		strOptions="top="+top+",left="+left+",resizable,scrollbars=yes,height="+height+",width="+width;
		newWin = window.open(strURL, nom, strOptions);
		newWin.focus();
	}
} 
