// JavaScript Document

function verifForm(monForm){
	
	
	//nom
	if (monForm.nom.value==""){
		alert ("Merci de bien vouloir renseigner votre nom");
		monForm.nom.focus();
		return false;
	}
	
	//email
	if (monForm.email.value==""){
		alert ("Merci de bien vouloir renseigner votre e-mail");
		monForm.email.focus();
		return false;
	}
	if (monForm.email.value != ""){
		var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒþŒŽšœžŸÀÁÂÃÆÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßáâåëìíîïñóôøúýþÿ0123456789-@-_.";
		var checkStr = monForm.email.value;
		var allValid = true;
		for (i = 0;  i < checkStr.length;  i++)
			{
			ch = checkStr.charAt(i);
			for (j = 0;  j < checkOK.length;  j++)
				if (ch == checkOK.charAt(j))
					break;
			if (j == checkOK.length)
				{
				allValid = false;
					break;
				}
			}
		if (!allValid)
			{
			alert("E-mail non valide : seuls les caractères alphanumériques et les symboles \".@_-\" sont autorisés.");
			monForm.email.focus();
			return false;
			}
		adresse = monForm.email.value;
		var place = adresse.indexOf("@",1);
		var point = adresse.indexOf(".",place+1);
		if (!((place > -1)&&(adresse.length >2)&&(point > 1)))
			{
			alert("E-mail non valide ; exemple: nom@domaine.com");
			monForm.email.focus();
			return false;
			}
	}
			
	return true;
}
