	function checkEmail(strng) {
		var emailFilter=/^[a-z0-9&\'\.\-_\+]+@[a-z0-9\-]+\.([a-z0-9\-]+\.)*?[a-z]+$/i;
		var error="";
		if (!(emailFilter.test(strng))) { 
				   error = "Veuillez entrer une adresse email valide.\n";
		}
		var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\[\]]/
		if (strng.match(illegalChars)) {
			error = "Votre adresse email n'est pas valide.\n";
		}
		return error;
	}
	function checkPhone(strng) {
		var error = "";
		var stripped = "";
		if(strng) {
			stripped = strng.replace(/[\(\)\.\-\ ]/g, '');
			intStripped=parseInt(stripped);
			//strip out acceptable non-numeric characters
			if (isNaN(intStripped)) {
			   error = "Votre numéro de téléphone doit comporter des chiffres uniquement.";
			}
		}
		if (!(stripped.length >= 10)) {
		// temporairement desactive... error = "Votre numéro de téléphone est trop court ou incorrect. Vérifiez-le à nouveau.\n";
		}
		return error;
	}
	function checkNonVide(strng,leNom) {
		 var error = "";
		 if (strng == "") {
			error = "Vous devez entrer votre "+leNom+".\n";
		 }
		return error;
	}
	function checkWholeForm(theForm) {
		var why = "";
		why += checkNonVide(theForm.Prenom.value,"prénom");
		why += checkNonVide(theForm.Nom.value,"nom");
		why += checkEmail(theForm.Email.value);
		why += checkNonVide(theForm.Adresse.value,"adresse postale");
		why += checkNonVide(theForm.Ville.value,"ville");
		why += checkPhone(theForm.Telephone.value);

		if (why != "") {
		   alert("Veuillez revérifier les informations que vous avez entrées :\n\n"+why);
		   return false;
		}
		else return true;
	}
