

function chkForm()
{

if(document.mail.Nachname.value == "") {
   alert("Please fill in a Last Name.");
   document.mail.Nachname.focus();
   return false;
   }
if(document.mail.Vorname.value == "") {
   alert("Please fill in a First Name.");
   document.mail.Vorname.focus();
   return false;
   }
if(document.mail.Email.value == "") {
   alert("Please insert a E-Mail address.");
   document.mail.Email.focus();
   return false;
   }
if((document.mail.Email.value.indexOf('@') == -1) || (document.mail.Email.value.indexOf('.') == -1)) {
   alert("Please insert a correct E-Mail address!");
   document.mail.Email.focus();
   return false;
  }

var mail = document.mail.Email.value;
var split = mail.split('.');
var split2 = split[0].split('@');

if(split[1] == "") {alert("Please fill in  an E-Mail Address with an ending!");
   document.mail.Email.focus();
   return false;
  }

if(split2[1].length < 2) {alert("Please correct the E-Mail Address after the @!");
   document.mail.Email.focus();
   return false;
  }

if(split[1].length < 2) {alert("Please fill in an E-Mail Address with a correct ending! (z.B. .com)");
   document.mail.Email.focus();
   return false;
  }

if(document.mail.date1.value == "") {
   alert("Please fill in an Arrival Date.");
   document.mail.date1.focus();
   return false;
   }
if(document.mail.date2.value == "") {
   alert("Please fill in an Departure Date.");
   document.mail.date2.focus();
   return false;
   }
if(document.mail.Erwachsene.value == "0") {
   alert("Please fill in how many adults are planning to come in the appartement.");
   document.mail.Erwachsene.focus();
   return false;
   }

if(document.mail.Adresse1.value == "") {
   alert("Please fill an Address.");
   document.mail.Adresse1.focus();
   return false;
   }
if(document.mail.Ort.value == "") {
   alert("Please fill in a City.");
   document.mail.Ort.focus();
   return false;
   }

if(document.mail.Postleitzahl.value == "") {
   alert("Please fill in a Zip Code.");
   document.mail.Postleitzahl.focus();
   return false;
   }

if(document.mail.Land.value == "") {
   alert("Please fill in a Country.");
   document.mail.Land.focus();
   return false;
   }

if(document.mail.Telefonnummer.value == "") {
   alert("Please fill in a Phone Number.");
   document.mail.Telefonnummer.focus();
   return false;
   }




}

