// Contact Form Validation

function validateForm()
{
// check name
if (document.contact_form.preferred_name.value == "")
{
alert ("Please enter your name");
return false;
}
// check email
if (document.contact_form.email.value == "")
{
alert ("Please enter your email address");
return false;
}
if (document.contact_form.email.value.indexOf("@")==-1)
{
alert("Please input a valid email address!");
return false;
}
// check verification box
if (document.contact_form.verif_box.value == "")
{
alert ("Please enter the verification number");
return false;
}
// verification box
if (isNaN(document.contact_form.verif_box.value))
{
alert ("You must enter a number in the verification box");
return false;
}
// check age range
if (document.contact_form.comments.value == "") 
{
alert ("Please enter some comments about your prospective web site");
return false;
}
return true;
}

function validateVerificationForm()
{
if (document.contact_form.verif_box.value == "")
{
alert ("Please enter the verification number");
return false;
}
// verification box
if (isNaN(document.contact_form.verif_box.value))
{
alert ("You must enter a number in the verification box");
return false;
}
return true;
}
