// JavaScript Document Formularόberprόfung




function chkFormular()
{

//Abfrage Anrede
if (document.Formular.anrede.options[0].selected == true)
{
alert("No Title selected!");
document.Formular.anrede.focus();
return false;
}	

//Abfrage Name
regex=/^[δφόΔΦάιθΰa-z0-9 -. ]{3,32}$/i;
if(!regex.test(document.Formular.name.value))
{
alert("Surname must have at least 3 and at the most 30 characters");
document.Formular.name.focus();
return false;
}


//Abfrage Vorname
regex=/^[δφόΔΦάιθΰa-z0-9 -. ]{3,32}$/i;
if(!regex.test(document.Formular.vorname.value))
{
alert("Firstname must have at least 3 and at the most 30 characters");
document.Formular.vorname.focus();
return false;
}


//Abfrage Strasse
regex=/^[δφόΔΦάιθΰa-z0-9 -. ]{3,32}$/i;
if(!regex.test(document.Formular.strasse.value))
{
alert("Address must have at least 3 and at the most 30 characters");
document.Formular.strasse.focus();
return false;
}


//Abfrage PLZ
regex=/^[a-z 0-9]{4,10}$/i;
if(!regex.test(document.Formular.plz.value))
{
alert("Post code must have at least 4 and at the most 10 characters");
document.Formular.plz.focus();
return false;
}


//Abfrage Ort
regex=/^[δφόΔΦάιθΰa-z0-9 -. ]{3,32}$/i;
if(!regex.test(document.Formular.ort.value))
{
alert("Town must have at least 3 and at the most 30 characters");
document.Formular.ort.focus();
return false;
}



}

