function submitForm(s)
{
s.value="Thank you!";
return true;
}

function abfrage(s)
{

if (document.orderForm.Vorname.value == "")
  {
    alert("Please insert your first name.");
    document.orderForm.Vorname.focus();
    return (false);
  }

if (document.orderForm.Zuname.value == "")
  {
    alert("Please insert your last name.");
    document.orderForm.Zuname.focus();
    return (false);
  }


if (document.orderForm.Anrede.selectedIndex == 0)
  {
    alert("The first title option is not valid.\n Please select an option.");
    document.orderForm.Anrede.focus();
    return (false);
  }

  
  if (document.orderForm.Adresse.value == "")
  {
    alert("Please insert your address.");
    document.orderForm.Adresse.focus();
    return (false);
  }
  
 if 
    (document.orderForm.PLZ.value.length =="")
   {
    alert ("Please insert your zip code.");
    document.orderForm.PLZ.focus();
    return (false);
   }
  if
    (document.orderForm.PLZ.value.length!=4)

    {
    alert ("Please insert a valid zip code.");
    document.orderForm.PLZ.focus();
    return (false);
    }
    
  if (document.orderForm.Ort.value == "")
  {
    alert("Please insert your city.");
    document.orderForm.Ort.focus();
    return (false);
  }

     if (document.orderForm.Email.value == "")
  {
     alert("Please insert your e-mail");
     document.orderForm.Email.focus();
     return (false);
  }
 	else
  {
	var strmail = new String();
 	strmail = document.orderForm.Email.value;
   	erg=(strmail.search('@')>=1 && (strmail.lastIndexOf('.')-2) > strmail.search('@') && strmail.lastIndexOf('.')>=strmail.length-5 && (strmail.length-2>strmail.lastIndexOf('.')));
   	if (erg == false)
   		{
   		alert("Please insert a valid e-mail address.");
   		document.orderForm.Email.focus();
  		return(false);
   		}
  }
  	
   if (!(document.orderForm.Zahlungsart[0].checked || document.orderForm.Zahlungsart[1].checked || document.orderForm.Zahlungsart[2].checked))
  {
    alert("Please select a payment option.");
    return (false);
  }
   
   if (document.orderForm.agb.checked==false)
  {
    alert("Please read the terms and conditions.");
    return (false);
  }
 
   
 return submitForm(orderForm.absenden);
 }
 
