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.surname.value == "")
 {
  alert("Bitte Ihren \"Nachnamen\" eingeben.");
  theForm.surname.focus();
  return (false);
 }

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

 if (theForm.street.value == "")
 {
  alert("Bitte Ihre \"Adresse\" eingeben.");
  theForm.street.focus();
  return (false);
 }
 
  if (theForm.plz.value == "")
 { 
    alert("Bitte Ihre \"PLZ\" eingeben.");
    theForm.plz.focus();
    return (false);
  }
  
   if (theForm.ort.value == "")
 { 
    alert("Bitte Ihre \"Ort\" eingeben.");
    theForm.ort.focus();
    return (false);
  }
 
  if (theForm.land.selectedIndex == 0)
 {
  alert("Bitte Ihr \"Land\" auswählen.");
  theForm.land.focus();
  return (false);
 }
 
 if (theForm.kanton.selectedIndex == 0)
 {
  alert("Bitte Ihren \"Kanton\" auswählen.");
  theForm.kanton.focus();
  return (false);
 }
 
  if (theForm.email.value == "")
 { 
    alert("Bitte Ihre \"email\" eingeben.");
    theForm.email.focus();
    return (false);
  }
   if (!isEmailAddr(theForm.email.value))
  {
    alert("Die \"email-Adresse\" ist nicht gültig!");
    theForm.email.focus();
    return (false);
  }
 
   if (theForm.beruf.value == "")
 { 
    alert("Bitte Ihren \"Beruf\" eingeben.");
    theForm.beruf.focus();
    return (false);
  }
  
  
 if (theForm.regio.selectedIndex == 0)
 {
  alert("Bitte Ihre \"Regionalgruppe\" auswählen.");
  theForm.regio.focus();
  return (false);
 }
 
}
