function isEmailAddr(email)
{
  var result = false
  var theStr = new String(email)
  var index = theStr.indexOf("@");
  if (index > 0)
  {
    var pindex = theStr.indexOf(".",index);
    if ((pindex > index+1) && (theStr.length > pindex+1))
 result = true;
  }
  return result;
}

function Form_Validator(theForm)
{

 if (theForm.name.value == "")
 {
  alert("Bitte Ihren \"Namen\" eingeben.");
  theForm.name.focus();
  return (false);
 }

 if (theForm.adresse.value == "")
 {
  alert("Bitte Ihre \"Adresse\" eingeben.");
  theForm.adresse.focus();
  return (false);
 }
 
 if (theForm.plzort.value == "")
 {
  alert("Bitte Ihre \"PLZ und Ort\" eingeben.");
  theForm.plzort.focus();
  return (false);
 }

 if (theForm.email.value == "")
 {
  alert("Bitte Ihre \"email\" eingeben.");
  theForm.email.focus();
  return (false);
 }

  if (theForm.email.value !== "")
 { 
     if (!isEmailAddr(theForm.email.value))
    {
      alert("Die \"email-Adresse\" ist nicht gültig!");
      theForm.email.focus();
      return (false);
    }
  }


}
