/*  Fonction permettant de tester si les champs d'un formulaires sont vides.    Ajouter id="required" dans les champs obligatoires et onSubmit="return checkrequired(this)"    dans la balise form.        Mis  jour le 25/10/2007 par Jean-Franois MESSIAN*/		function checkrequired(which) {		var pass=true		if (document.images){			for (i=0;i<which.length;i++){				var tempobj=which.elements[i]				if (tempobj.id.substring(0,8)=="required"){					if (((tempobj.type=="text"||tempobj.type=="textarea")&&tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&tempobj.selectedIndex==-1)){					pass=false					break					}				}			}		}		if (!pass){		alert("Tous les champs obligatoires doivent etre renseignes")		return false		}	else	return true	}		function checkrequiredUS(which) {		var pass=true		if (document.images){			for (i=0;i<which.length;i++){				var tempobj=which.elements[i]				if (tempobj.id.substring(0,8)=="required"){					if (((tempobj.type=="text"||tempobj.type=="textarea")&&tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&tempobj.selectedIndex==-1)){					pass=false					break					}				}			}		}		if (!pass){		alert("items follwed by a * must be completed")		return false		}	else	return true	}		/*  Fonction utilise par la fonction popUp.	Mis  jour le 25/10/2007 par Jean-Franois MESSIAN*/		var newWin = null;function closeWin(){	if (newWin != null){		if(!newWin.closed)			newWin.close();	}}/*  Fonction popUp.	Pour appeler la fonction, il faut utiliser le code suivant : 	<a href="fichier.htm" onclick="popUp(this.href,'Nom',largeur,hauteur);return false;">Lien vers une nouvelle fentre</a>		Mis  jour le 25/10/2007 par Jean-Franois MESSIAN*/function popUp(strURL,strType,strHeight,strWidth) {closeWin();var strOptions="";if (strType=="console") strOptions="resizable,height="+strHeight+",width="+strWidth;if (strType=="fixed") strOptions="status,height="+strHeight+",width="+strWidth;if (strType=="elastic") strOptions="toolbar,menubar,scrollbars,resizable,location,height="+strHeight+",width="+strWidth;newWin = window.open(strURL, 'newWin', strOptions);newWin.focus();}/*  Fonction checkEmail.		Mis  jour le 29/10/2007 par Jean-Franois MESSIAN*/	function checkEmail(which)  { 	        var email = which.email.value ;                        if (email.search(/^[_a-z0-9-]+(.[_a-z0-9-]+)*[^._-]@[a-z0-9-]+(.[a-z0-9]{2,4})*$/) == -1) {             alert ('entrez une adresse Email valide');             return false;         	}		else		return true		}			function checkEmailUS(which)  { 	        var email = which.email.value ;                        if (email.search(/^[_a-z0-9-]+(.[_a-z0-9-]+)*[^._-]@[a-z0-9-]+(.[a-z0-9]{2,4})*$/) == -1) {             alert ('E-mail not valid');             return false;         	}		else		return true		}				/*  Fonction ValideForm	Permet de vrifier les champs obligatoires + validit de l'email	C'est un mix de pluseirs fonction...					Mis  jour le 29/10/2007 par Jean-Franois MESSIAN*/					function ValideForm(which)  {			if (checkEmail(which) && checkrequired(which)) {			return true ;			}		else { 			return false; 			}		}					function ValideFormUS(which)  {			if (checkEmailUS(which) && checkrequiredUS(which)) {			return true ;			}		else { 			return false; 			}		}																																										