function wop(nompage,largeur,hauteur, param) {
	if(param!="") window.open(nompage+"?from="+param,"pop","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width="+largeur+",height="+hauteur);
	else window.open(nompage+".php","pop","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width="+largeur+",height="+hauteur);
}

function GetId(id) {
	return document.getElementById(id);
}

function checkForm(formid) {
	theform=document.getElementById(formid);
	if(theform.nom.value=="") {alert("Veuillez saisir votre Nom");theform.nom.focus();}
	else if(theform.objet.value=="") {alert("Veuillez saisir un objet pour votre message");theform.objet.focus();}
	else if(theform.msg.value=="") {alert("Veuillez saisir un message");theform.msg.focus();}
	else if((theform.mel.value.indexOf("@")>=0) && (theform.mel.value.indexOf(".")>=0)) {
		  var reg = /^[a-z0-9._-]+@[a-z0-9.-]{2,}[.][a-z]{2,3}$/
		  if(reg.exec(theform.mel.value) == null) alert("L'adresse mail que vous avez entré est invalide");
		  else theform.submit();
	}
	else {alert("L'adresse mail que vous avez entré est invalide");theform.mel.focus();}
}

/* admin... mais pourrait être utile à d'autres endroits, surlignage du fond de l'élément survolé (fonctions très génériques) */
function highlight(element,couleur) {
	element.style.backgroundColor=couleur;
}
function showHide(element) {
	if (GetId(element).style.display=="none") GetId(element).style.display="block";
	else GetId(element).style.display="none";
}
