<!-- 

String.prototype.trim = function(){ return this.replace(/(^\s*)|(\s*$)/g, ""); }

function Form_Validator(theForm) 
{ 

letexte1 = document.abc.cp.value.trim ();
// letexte2 = document.abc.numfixe.value.trim ();

  if (letexte1 == "") 
  { 
    alert("Veuillez renseigner le champ : \"Votre code postal\"."); 
    document.abc.cp.focus(); 
    return (false); 
  } 
 

  var checkOK = "0123456789"; 
  var checkStr = document.abc.cp.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("Le contenu du champ : \"Votre code postal\" n'est pas conforme : il doit contenir uniquement des chiffres."); 
    document.abc.cp.focus(); 
    return (false); 
  } 

  if (letexte1.length != 5) 
  { 
    alert("Le contenu du champ : \"Votre code postal\" n'est pas conforme : il doit contenir 5 chiffres."); 
    document.abc.cp.focus(); 
    return (false); 
  }




//  if (letexte2 == "") 
//  { 
//    alert("Veuillez renseigner le champ : \"Votre numero fixe\"."); 
//    document.abc.numfixe.focus(); 
//    return (false); 
//  } 
 

//  var checkOK = "0123456789"; 
//  var checkStr = document.abc.numfixe.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("Le contenu du champ : \"Votre numero fixe\" n'est pas conforme : il doit contenir uniquement des chiffres."); 
//    document.abc.numfixe.focus(); 
//    return (false); 
//  } 

//  if (letexte2.length != 10) 
//  { 
//    alert("Le contenu du champ : \"Votre numero fixe\" n'est pas conforme : il doit contenir 10 chiffres."); 
//    document.abc.numfixe.focus(); 
//    return (false); 
//  } 

 
  return (true); 
} 
//--> 

