function check_email(e) {

    ok = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";



    for(i=0; i < e.length ;i++)

    {

        if(ok.indexOf(e.charAt(i))<0)

        {

            return (false);

        }

    }



    if (document.images)

    {

        re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;

        re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;

        if (!e.match(re) && e.match(re_two))

        {

            return (-1);

        }

    }

}



function check_form() {

    if(contact.name.value.length < 1)

    {

        if (contact.lang.value == 'de')

        {

            alert("Bitte tragen Sie Ihren Name ein.");

        }

        else

        {

            alert("Please enter you name.");

        }

        contact.name.focus();

        return false;

    }



    if(!check_email(contact.email.value))

    {

         if (contact.lang.value == 'de')

        {

            alert("Bitte pr&uuml;fen Sie Ihre Email-Adresse.");

        }

        else

        {

            alert("Please verify your email address.");

        }

        contact.email.focus();

        return false;

    }



    if(contact.comments.value.length < 1)

    {

         if (contact.lang.value == 'de')

        {

            alert("Nachricht-Feld ist leer.");

        }

        else

        {

            alert("Please enter your message.");

        }



        contact.comments.focus();

        return false;

    }

    return true;



}

function submitf() {

	document.contact.submit();

    return true;

}

function submitfa() {

	document.anmeld.submit();

    return true;

}



function clearf() {

   document.contact.name.value = "";

   document.contact.company.value = "";

   document.contact.address.value = "";

   document.contact.city.value = "";

   document.contact.country.value = "";

   document.contact.email.value = "";

   document.contact.phone.value = "";

   document.contact.comments.value = "";

   document.contact.name.focus();

}

function clearfa() {

}

function setfocus()

{

	if (document.forms.length > 0) {

        document.forms(0).item(0).focus();

	}

}
