function trim (myString) 
{ 
	return myString.replace(/^\s+/g,'').replace(/\s+$/g,'') 
} 

function verifMail( email )
{
	var maReg = new RegExp ( "^\\w[\\w+\.\-]*@[\\w\-]+\.\\w[\\w+\.\-]*\\w$", "gi" );
	if ( email.search( maReg ) == -1 ) return false;
	return true;
}

function PmpCheckForm(formulaire)
{
	var email = formulaire.form.email.value;
	if(!verifMail(email)) {
		alert("L'email n'est pas valide !");
		return false;
	}
	var maReg = new RegExp( "[,]", "g" ) ;
	var resultat = formulaire.form.obligatoire.value.split( maReg ) ;
	if ( resultat )
	{
		for ( i=0; i<resultat.length; i++ ) {
			var el = resultat[i];
			var txt = trim(formulaire.form.elements[el].value);
			if( txt == '') {
				alert("Vous devez remplir tous les champs obligatoires !");
				return false;
			}
		}
	}
	return true;
}

