function formvalidator(theForm)
{

  if (theForm.NOM.value == "")
  {
    alert("Tapez une valeur pour le champ \"Nom / Prénom\".");
    theForm.NOM.focus();
    return (false);
  }

  if (theForm.NOM.value.length < 2)
  {
    alert("Tapez au moins 2 caractères dans le champ \"Nom / Prénom\".");
    theForm.NOM.focus();
    return (false);
  }

  if (theForm.FONCTION.value == "")
  {
    alert("Tapez une valeur pour le champ \"Fonction\".");
    theForm.FONCTION.focus();
    return (false);
  }

  if (theForm.FONCTION.value.length < 2)
  {
    alert("Tapez au moins 2 caractères dans le champ \"Fonction\".");
    theForm.FONCTION.focus();
    return (false);
  }

  if (theForm.ETABLISSEMENT.value == "")
  {
    alert("Tapez une valeur pour le champ \"Etablissement\".");
    theForm.ETABLISSEMENT.focus();
    return (false);
  }

  if (theForm.ETABLISSEMENT.value.length < 2)
  {
    alert("Tapez au moins 2 caractères dans le champ \"Etablissement\".");
    theForm.ETABLISSEMENT.focus();
    return (false);
  }

  if (theForm.TELEPHONE.value == "")
  {
    alert("Tapez une valeur pour le champ \"Téléphone\".");
    theForm.TELEPHONE.focus();
    return (false);
  }

  if (theForm.TELEPHONE.value.length < 10)
  {
    alert("Tapez au moins 10 caractères dans le champ \"Téléphone\".");
    theForm.TELEPHONE.focus();
    return (false);
  }

  if (theForm.EMAIL.value == "")
  {
    alert("Tapez une valeur pour le champ \"Email\".");
    theForm.EMAIL.focus();
    return (false);
  }

  if (theForm.EMAIL.value.length < 6)
  {
    alert("Tapez au moins 6 caractères dans le champ \"Email\".");
    theForm.EMAIL.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789-@.-_ \t\r\n\f";
  var checkStr = theForm.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("Ne tapez que  lettre, chiffre, blanc et \"@.-_\" caractères dans le champ \"Email\".");
    theForm.EMAIL.focus();
    return (false);
  }

  return (true);
}