// Contact Form Validation

function validateForm()
{
// check name
if (document.contactform.name.value == "")
{
alert ("Please enter your name");
document.contactform.name.focus();
return false;
}
// check email
if (document.contactform.email.value == "")
{
alert ("Please enter your email address");
document.contactform.email.focus();
return false;
}
if (document.contactform.email.value.indexOf("@")==-1)
{
alert("Please input a valid email address!");
document.contactform.email.focus();
return false;
}
// check phone
if (document.contactform.phone.value == "")
{
alert ("Please enter your phone number");
document.contactform.phone.focus();
return false;
}
// check comment
if (document.contactform.comment.value == "") 
{
alert ("Please enter some comments");
document.contactform.comment.focus();
return false;
}
// check verification box
if (document.contactform.verificationcode.value == "")
{
alert ("Please enter the verification number");
document.contactform.verificationcode.focus();
return false;
}
// verification box
if (isNaN(document.contactform.verificationcode.value))
{
alert ("You must enter a number in the verification box");
return false;
}
return true;
}
