// 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-z.äöüÄÖÜéèà -.0-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-z.äöüÄÖÜéèà -.0-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-z.äöüÄÖÜéèà -.0-9]{3,32}$/i;
if(!regex.test(document.Formular.strasse.value))
{
alert("Adress must have at least 3 and at the most 30 characters");
document.Formular.strasse.focus();
return false;
}


//Abfrage PLZ
regex=/^[a-z.äöüÄÖÜ -.0-9]{3,12}$/i;
if(!regex.test(document.Formular.plz.value))
{
alert("Post code must have at least 3 and at the most 10 characters");
document.Formular.plz.focus();
return false;
}


//Abfrage Ort
regex=/^[a-z.äöüÄÖÜéèà -.0-9]{3,32}$/i;
if(!regex.test(document.Formular.ort.value))
{
alert("Town code must have at least 3 and at the most 30 characters");
document.Formular.ort.focus();
return false;
}




}

