<!--
     
function form_Validator(theForm)
{
	
  // test prenom
 if (theForm.prenom.value == "")
  {
    alert("Veuillez indiquer votre prénom, SVP.");
    theForm.prenom.focus();
    return (false);
  }
  // test nom	
 if (theForm.nom.value == "")
  {
    alert("Veuillez indiquer votre nom, SVP.");
    theForm.nom.focus();
    return (false);
  }
  
// verif mail ******************************************************
 if (theForm.email.value == "")
  {
    alert("Veuillez indiquer votre adresse e-mail, SVP.");
    theForm.email.focus();
    return (false);
  }

// test adresse mail sur à et .
  var checkemail = "@.";
  var checkStr = theForm.email.value;
  var emailValid = false;
  var emailAt = false;
  var emailPeriod = false;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkemail.length;  j++)
    {
      if (ch == checkemail.charAt(j) && ch == "@")
        emailAt = true;
      if (ch == checkemail.charAt(j) && ch == ".")
        emailPeriod = true;
	  if (emailAt && emailPeriod)
		break;
	  if (j == checkemail.length)
		break;
	}
    if (emailAt && emailPeriod)
    {
		emailValid = true
		break;
	}
  }
  if (!emailValid)
  {
    alert("Veuillez indiquer une adresse e-mail valide, SVP.");
    theForm.email.focus();
    return (false);
  }

// verif mail destinataire ***************************************
 if (theForm.email_dest.value == "")
  {
    alert("Veuillez indiquer l'email du destinataire, SVP.");
    theForm.email_dest.focus();
    return (false);
  }

// test adresse mail sur à et .
  var checkemail = "@.";
  var checkStr = theForm.email.value;
  var emailValid = false;
  var emailAt = false;
  var emailPeriod = false;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkemail.length;  j++)
    {
      if (ch == checkemail.charAt(j) && ch == "@")
        emailAt = true;
      if (ch == checkemail.charAt(j) && ch == ".")
        emailPeriod = true;
	  if (emailAt && emailPeriod)
		break;
	  if (j == checkemail.length)
		break;
	}
    if (emailAt && emailPeriod)
    {
		emailValid = true
		break;
	}
  }
  if (!emailValid)
  {
    alert("Veuillez indiquer une adresse e-mail valide de destinataire, SVP.");
    theForm.email_dest.focus();
    return (false);
  }
  
}
//-->

