<!--

		function Verifier_Numero_Telephone(num_tel) 
{ 
    // Definition du motif a matcher 
    var regex = new RegExp(/^0[1-68]([-. ]?[0-9]{2}){4}$/); 
     
    // Definition de la variable booleene match 
    var match = false; 
     
    // Test sur le motif 
    if(regex.test(num_tel)) 
    { 
        match = true; 
    } 
     else 
    { 
        match = false; 
    } 
     
    // On renvoie match 
    return match; 
}

		function validate_identification() {
		var msg="";
			// identifiant
    		if (document.form_identification.id.value.length == 0 )
			{
				msg +="- Identifiant non renseigné.\n";
				document.form_identification.id.focus();
			}
			
			// Password
			if (document.form_identification.pass.value.length == 0)
			{
				msg +="- Mot de passe non renseigné.\n";
				document.form_identification.pass.focus();
			} else {
				if (document.form_identification.pass.value.length < 2)
				{
					msg +="- Mot de passe trop court.\n";
					document.form_identification.pass.focus();
				}
			}
						
    		if (msg=="") document.form_identification.submit();
			else alert("Il est impossible de valider le formulaire pour la(es) raison(s) suivante(s) : \n" + msg);
	}
	
	function validate_presse()
{
		var msg="";
		//nom
		if (document.form_demande.nom.value.length == 0 )
			{
				msg +="- Nom non renseigné.\n";
				document.form_demande.nom.focus();
			}
		
		//prenom
		if (document.form_demande.prenom.value.length == 0 )
			{
				msg +="- Prenom non renseigné.\n";
				document.form_demande.prenom.focus();
			}
			
		//metier
		if (document.form_demande.metier.value.length == 0 )
			{
				msg +="- Métier non renseigné.\n";
				document.form_demande.metier.focus();
			}
		
		//societe
		if (document.form_demande.societe.value.length == 0 )
			{
				msg +="- Société / Magazine non renseigné.\n";
				document.form_demande.societe.focus();
			}
		
		//téléphone
		if (document.form_demande.tel.value.length == 0)
			{
				msg +="- Téléphone non renseigné.\n";
				document.form_demande.tel.focus();
			} else {
				if (Verifier_Numero_Telephone(document.form_demande.tel.value)== false||(document.form_demande.tel.value.length !=10))
				{
					msg +="- Téléphone non valide.\n";
					document.form_demande.tel.focus();
				}
			}
		
		//Email
		if (document.form_demande.email.value.length == "" )
			{
				msg+="- Email non renseigné.\n";
				document.form_demande.email.focus();
			}
			else {
			
            	Mail_OK = 1;
            
                    var email = document.form_demande.email.value;
 					var aroba = email.indexOf("@");//retourne la position du @ dans la chaine
 			
 					if (aroba == -1) {//test si le @ existe dans la chaine de caractère (si -1 il est absent !)
 						Mail_OK = 0;
 						
 					}
 	
 					var point = email.indexOf(".", aroba);
 					if ((point == -1) || (point == (aroba + 1))) {//test si le point n'existe pas ou si il est juste apres le @
 						Mail_OK = 0;
 						
 					}
 	
 					var point = email.lastIndexOf(".");
 					if ((point + 1) == email.length) { Mail_OK = 0;}
 	
 					point = email.indexOf("..")
 					if (point != -1) {  //cas ou la chaine contient 2 points de suite
 						 Mail_OK = 0;
 						
 					}
 	
 					//test pour verifier que la chaine contient plus de 5 caracteres
 					if (document.form_demande.email.value.length < 5)
 					{ Mail_OK = 0;
					}
 			
					if (Mail_OK == 0)
					{
						msg+= "- Email non valide.\n";
						document.form_demande.email.focus()
					}
				}
			
			if (msg=="") document.form_demande.submit();
			else alert("Il est impossible de valider le formulaire pour la(es) raison(s) suivante(s) : \n" + msg);
}
	
-->