function validate()
{

if(document.contact.email.value == "")
{ alert("Please enter your Email Address.")
document.contact.email.focus()
return false }

if(document.contact.lname.value == "")
{ alert("Please enter your Last Name.")
document.contact.lname.focus()
return false }

if(document.contact.fname.value == "")
{ alert("Please enter your First Name.")
document.contact.fname.focus()
return false }

if(document.contact.street_po.value == "")
{ alert("Please enter your mailing address (street address or your P.O. Box)")
document.contact.street_po.focus()
return false }

if(document.contact.city.value == "")
{ alert("Please enter your City.")
document.contact.city.focus()
return false }

if(document.contact.state.value == "")
{ alert("Please enter your State, US Possesion, or Canandian Province.")
document.contact.state.focus()
return false }

if(document.contact.zip.value == "")
{ alert("Please enter your Zip Code.")
document.contact.zip.focus()
return false }

}

//------------------------------------

function checkEmail()
{

//The "^" means beginning of string
//The "$" means end of string
//The "." means any character
//the "+" means one or more
//A "\" is an escape ... avoids literal translation of character
//A "\." means read a period as an ascii character (in the email), not as javascript
//A "$/" means end of string
// "!" means not

var emailFilter = /^.+@.+\..{2,3}$/;
if(!(emailFilter.test(document.contact.email.value)))
{ alert("Please provide a valid Email Address format.");
document.contact.email.focus()
return false}
}

//------------------------------------

function checkPhone()
{

if(document.contact.telephone.value != "")
{

theField = document.contact.telephone.value
theLength = theField.length

for (i=0; i <= theLength-1; i++)
{

if (theField.charAt(i) < "0"|| theField.charAt(i) > "9")
{alert("Please use only numbers in the Telephone Contact field.")
document.contact.telephone.focus()
return false }

}

if(!(theLength == 10))
{alert("The Telephone Number you entered is not a valid length. Please enter 3 char area code and 7 char number. If your telephone number cannot be entered here, then type it in the comment box.")
document.contact.telephone.focus()
return false }

}
}
