<!--

function emailvalidation(entered, alertbox)
{
// E-mail Validation by Henrik Petersen / NetKontoret
// Explained at www.echoecho.com/jsforms.htm
// Please do not remove this line and the two lines above.
with (entered)
{
apos=value.indexOf("@");
dotpos=value.lastIndexOf(".");
lastpos=value.length-1;
if (apos<1 || dotpos-apos<2 || lastpos-dotpos>3 || lastpos-dotpos<2)
{if (alertbox) {alert(alertbox);} return false;}
else {return true;}
}
}

function emptyvalidation(entered, alertbox)
{
// Emptyfield Validation by Henrik Petersen / NetKontoret
// Explained at www.echoecho.com/jsforms.htm
// Please do not remove this line and the two lines above.
with (entered)
{
if (value==null || value=="")
{if (alertbox!="") {alert(alertbox);} return false;}
else {return true;}
}
}


function formvalidation(contact_form)
{
// This function checks the entire form before it is submitted
// Note: This function needs to be customized to fit your form
with (contact_form)
{
if (emailvalidation(email,"Please enter a valid email address")==false) {email.focus(); return false;};
if (emptyvalidation(Name,"Please enter your Name")==false) {Name.focus(); return false;};
if (emptyvalidation(Organization,"Please enter your Organization")==false) {Organization.focus(); return false;};
if (emptyvalidation(Address_1,"Please enter first line of your address")==false) {Address_1.focus(); return false;};
if (emptyvalidation(Post_code,"Please enter your Post code")==false) {Post_code.focus(); return false;};
if (emptyvalidation(Contact_Country,"Please enter your Country")==false) {Contact_Country.focus(); return false;};
if (emptyvalidation(Phone,"Please enter your Phone number")==false) {Phone.focus(); return false;};
if (emptyvalidation(Comments,"Please enter your Comments")==false) {Comments.focus(); return false;};
}
}

//-->
