/*
function montreHaut(id) {
	var d = document.getElementById(id);
	for (var i = 1; i<=10; i++) {
		if (document.getElementById('smenuHaut'+i)) {
			document.getElementById('smenuHaut'+i).style.display='none';
		}
	}
	  if (d) {
	   document.getElementById(id).style.display="block";
	 } else if (document.all) {
	   	if (document.all[id]) document.all[id].style.display="block";
	 } else if (document.layers) {
	   if (document.layers[id]) document.layers[id].display="block";
	 } 
} 

function cache(id) {
  if (document.getElementById(id)) {
   document.getElementById(id).style.display="none";
 } else if (document.all) {
   if (document.all[id])document.all[id].style.display="none";
 } else if (document.layers) {
   if (document.layers[id])document.layers[id].display="none";
 } } 
 
 
 function montreGauche(id) {
//alert("montre"+id);
var d = document.getElementById(id);
	for (var i = 0; i<=10; i++) {
		if (document.getElementById('smenuGauche'+i)) {document.getElementById('smenuGauche'+i).style.display='none';}
	}
	if (d) {d.style.display='block';}
}
*/

function toggleLayer(whichLayer){
	//alert("toggle layer "+whichLayer);
	var style2;
	if (document.getElementById){
		// this is the way the standards work
		style2 = document.getElementById(whichLayer).style;
		style2.display = style2.display? "":"block";
	} else if (document.all) {
		// this is the way old msie versions work
		style2 = document.all[whichLayer].style;
		style2.display = style2.display? "":"block";
	} else if (document.layers) {
		// this is the way nn4 works
		style2 = document.layers[whichLayer].style;
		style2.display = style2.display? "":"block";
	}
	//alert("display "+whichLayer+" ="+style2.display);
}

function showLayer(whichLayer){
	//alert("show layer "+whichLayer);
	var style2;
	if (document.getElementById){
		// this is the way the standards work
		style2 = document.getElementById(whichLayer).style;
		style2.display = "block";
	} else if (document.all) {
		// this is the way old msie versions work
		style2 = document.all[whichLayer].style;
		style2.display = "block";
	} else if (document.layers) {
		// this is the way nn4 works
		style2 = document.layers[whichLayer].style;
		style2.display = "block";
	}
	//alert("display "+whichLayer+" ="+style2.display);
}

function hideLayer(whichLayer){
	//alert("hide layer "+whichLayer);
	var style2;
	if (document.getElementById){
		// this is the way the standards work
		style2 = document.getElementById(whichLayer).style;
		style2.display = "";
	} else if (document.all) {
		// this is the way old msie versions work
		style2 = document.all[whichLayer].style;
		style2.display = "";
	} else if (document.layers) {
		// this is the way nn4 works
		style2 = document.layers[whichLayer].style;
		style2.display = "";
	}
	//alert("display "+whichLayer+" ="+style2.display);
}

function popupcentree(page,largeur,hauteur,options){
	var top=(screen.height-hauteur)/2;
	var left=(screen.width-largeur)/2;
	window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
}

function popupcentreenommee(page,nom,largeur,hauteur,options){
	var top=(screen.height-hauteur)/2;
	var left=(screen.width-largeur)/2;
	var fenetre = window.open(page,nom,"top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
	fenetre.focus();
}
function waitSubmit(){
	var tableau =document.getElementsByTagName("fieldset");
	for (var x=0; x<tableau.length;x++){
		tableau[x].style.cursor="wait";
	}
	document.body.style.cursor="wait";
	
}
