function montre(id, id_exception1, id_exception2, par_defaut1, par_defaut2, par_defaut3) {
	var d = document.getElementById(id);
	if (d) {
		var deja_affiche;
		deja_affiche = d.style.display;
	}
		for (var i = 1; i<=933; i++) {
			if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
		}
	// détecter si le div est déjà affiché ou pas
	if (d) {
		//alert ("test " + deja_affiche)
		if (deja_affiche == "none") {
			d.style.display='block';
		} else {
			d.style.display='none';
		}
	}
	// afficher des éléments de niveau supérieur
	if (id_exception1) {
		document.getElementById(id_exception1).style.display='block';
	}
	if (id_exception2) {
		document.getElementById(id_exception2).style.display='block';
	}
	// afficher certaines parties par défaut quand on rendre sur la page	
	if (par_defaut1) {
		document.getElementById('smenu'+par_defaut1).style.display='block';
	}
	if (par_defaut2) {
		document.getElementById('smenu'+par_defaut2).style.display='block';
	}
	if (par_defaut3) {
		document.getElementById('smenu'+par_defaut3).style.display='block';
	}
}


function over (obj) {
 $(obj).setStyle({ color: '#fc7304' });
}
function out (obj) {
 $(obj).setStyle({ color: '#868685' });
}
function cliquer (obj) {
  var menu = new Array("l11", "l12", "l21", "l22", "l23", "l24", "l25");
  for (i=0 ; i<menu.length ; i++)  {
    if (obj == 'null')    {
        $(menu[i]).setStyle({ color: '#868685' });
    }
    else    {
      if (menu[i] != obj)      {
        $(menu[i]).setStyle({ color: '#868685' });
      }
      else       {
        $(menu[i]).setStyle({ color: '#fc7304' });
      }
    }
  }
}



function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
errors = 1;
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' doit contenir une adresse valide.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' doit contenir un nombre.\n';
         } } else if (test.charAt(0) == 'R') errors += '- '+nm+' est requis.\n'; }
  } 
  if (errors) alert('Merci de remplir les champs suivants :\n'+errors);
  return (errors == '');
}



