function checkForm(theForm) {

  if (theForm.vorname.value.length < 2)
  {
    alert("Veuillez entrer le prénom.");
    theForm.vorname.focus();
    return (false);
  }


  if (theForm.nachname.value.length < 2)
  {
    alert("Veuillez entrer le nom.");
    theForm.nachname.focus();
    return (false);
  }

  /*if (theForm.adresse.value == "")
  {
    alert("Bitte geben Sie uns Ihre Adresse an.");
    theForm.adresse.focus();
    return (false);
  }

  if (theForm.plz.value == "")
  {
    alert("Bitte geben Sie uns Ihren PLZ an.");
    theForm.plz.focus();
    return (false);
  }

  if (theForm.ort.value == "")
  {
    alert("Bitte geben Sie uns Ihren Ort an.");
    theForm.ort.focus();
    return (false);
  }*/

 if (theForm.telefon.value == "")
  {
    alert("Veuillez entrer le numéro de téléphone.");
    theForm.telefon.focus();
    return (false);
  }

  /*if (theForm.telefon.value.length < 8)
  {
    alert("Die Telefonnummer ist zu kurz.");
    theForm.telefon.focus();
    return (false);
  }

  if (theForm.telefon.value.length > 20)
  {
    alert("Die Telefonnummer ist zu lang.");
    theForm.telefon.focus();
    return (false);
  }

  var checkOK = "+0123456789";
  var checkStr = theForm.telefon.value;
  var allValid = true;
  var decPoints = 0;
  var allNum = "";
  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;
    }
    allNum += ch;
  }

  if (!allValid)
  {
    alert("Bitte verwenden Sie nur Zahlen für die Telefonnummer.\rKeine Sonderzeichen und Abstände!\rBsp.: 628235760");
    theForm.telefon.focus();
    return (false);
  }*/
    
  if (theForm.email.value == "")
  {
    alert("Veuillez corriger l'adresse e-mail.");
    theForm.email.focus();
    return (false);
  }
    
  if(theForm.email.value.indexOf('@') == -1)
  {
    alert("Veuillez corriger l'adresse e-mail.");
    theForm.email.focus();
    return (false);
  }
  
  if(theForm.email.value.length < 8)
  {
    alert("Veuillez corriger l'adresse e-mail.");
    theForm.email.focus();
    return (false);
  }

  if(theForm.email.value.indexOf('.') == -1)
  {
    alert("Veuillez corriger l'adresse e-mail.");
    theForm.email.focus();
    return (false);
  }

  /*if((theForm.C1.checked || theForm.C2.checked || theForm.C3.checked || theForm.C4.checked || theForm.C5.checked || theForm.C6.checked || theForm.C7.checked || theForm.C8.checked || theForm.C9.checked || theForm.C10.checked || theForm.C11.checked || theForm.C12.checked || theForm.C13.checked || theForm.C14.checked || theForm.C15.checked || theForm.C16.checked || theForm.C17.checked || theForm.C18.checked || theForm.C19.checked || theForm.C20.checked || theForm.C21.checked) == false)
  {
    alert("Bitte wählen Sie mindestens ein Land.");
    return (false);
  }*/

  return (true);

}



function checkPlz() {
  
  if(frmKatalog.plz.value.length > 5) {
    frmKatalog.plz.value = frmKatalog.plz.value.substring(0, 5);
  }

}


function checkKom() {  

  if(frmKatalog.kommentar.value.length > 255) {
    frmKatalog.kommentar.value = frmKatalog.kommentar.value.substring(0, 255);
  }

}
