<!--
function ValidRecom(theForm){

	if (theForm.prenom_visiteur.value == "" ){
		alert("Veuillez nous indiquer votre prénom.");
 		theForm.prenom_visiteur.focus();
    	return (false);
		
	} 
	
	// Controle adresse email visiteur
	var checkStrVisiteur = Valid_Email (theForm.email_visiteur.value,'Veuillez nous indiquer votre e-mail.');
	if (checkStrVisiteur == '') {
    theForm.email_visiteur.select()
    return (false);
   	}
		
	if (theForm.prenom_recommande.value == "" ){
		alert("Veuillez nous indiquer votre e-mail.");
 		theForm.prenom_recommande.focus();
    	return (false);
	}
	
	// Controle adresse email recommande
	var checkStrRecommande = Valid_Email (theForm.email_recommande.value,'Veuillez nous indiquer l\'e-mail de votre ami(e).');
	if (checkStrRecommande == '') {
    theForm.email_recommande.select()
    return (false);
   	}

}


function Valid_Email(adresse, msg){
 var checkStr = adresse.toLowerCase();
 var checkNOK = ",;<>*|'`&$!&\":#[{}[]()'=éèàïîù";
 var checkNSP = '';
 var allValid = true;
 var err_msg = 'Adresse E-mail incorrecte.' ;
 var i = 0 ;
 var j = 0 ;
 if (msg != null) {err_msg = msg ;}
 
  for (i = 0;  i < checkStr.length;  i++)
   {
   ch = checkStr.charAt(i);
   if (ch != ' ') { checkNSP += ch; }
   }
 adresse = checkNSP ;
 checkStr = checkNSP ;
 
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkNOK.length;  j++)
      if (ch == checkNOK.charAt(j)) { 
		 allValid = false ; break ; }
    if (allValid == false) {break; } else {j = 0;}
  }
  
  if ( allValid == false || i < 4 
       || checkStr.indexOf('.',0) == -1 
       || checkStr.indexOf('@',0) == -1 
       || checkStr.indexOf('www.',0) != -1 )
   { 
    alert(err_msg + ((j >23) ? '\n(caractères accentués non admis)' : ' '));
    adresse = '';
   }

   return(adresse)

}


//-->
