//This function verifys the various inputs of the form
function verifyForm(myform)
{
//Check for Name
 if (myform.full_name.value == "")
 {
  window.alert("Please Enter Your Name! ");
  myform.full_name.focus();
  myform.full_name.select();
  return false;
 }
 //Check for address
 if (myform.address.value == "")
 {
  window.alert("Please Enter Your Address!");
  myform.address.focus();
  myform.address.select();
  return false;
 }
 //Check for City
 if (myform.city.value == "")
 {
  window.alert("Please Enter Your City!");
  myform.city.focus();
  myform.city.select();
  return false;
 }
 //Check for State
 if (myform.state.value == "")
 {
  window.alert("Please Enter Your City!");
  myform.state.focus();
  myform.state.select();
  return false;
 }
 //Check for Zip Code
 if (myform.zip_code.value == "")
 {
  window.alert("Please Enter Your City!");
  myform.zip_code.focus();
  myform.zip_code.select();
  return false;
 }
 //Check for Phone Number
 if (myform.phone.value == "")
 {
  window.alert("Please Enter Your City!");
  myform.phone.focus();
  myform.phone.select();
  return false;
 }
 //Check for email
 if (!validateEmail(myform.email.value))
 {
  myform.email.focus();
  myform.email.select();
  return false;
 }
 //All data OK!  
 else
 return true;
} 
/* End of Function */
/* Validate e-mail address */
function validateEmail(emailstr)
{
// Characters that don't belong in email
invalidChars = " /:,; ";

// Check for email string
 if (emailstr == "" )
 {
  window.alert("Please Enter Your E-mail Address");
  return false;
 } 
 //Check for something before the @ sign
 if (emailstr.indexOf("@", 0) == 0)
 {
  window.alert ("No username in E-mail Address!");
  return false;
 }
 //Check for the @ sign
 if (emailstr.indexOf("@", 1) == -1)
 {
  window.alert("No @ sign in Email Address1");
  return false;
 } 
 
 //Check for period in email
 if (emailstr.indexOf(".", 0) == -1)
 {
  window.alert ("No period in E-mail Address!");
  return false;
 }
 
 //Check for invalid charecters
 for (i=0; i<invalidChars.length; i++)
 {
  if (emailstr.indexOf(invalidChars.charAt(i), 0) > -1)
  {
   window.alert ("Bad character(s) in Email Address!", invalidChars.charAt(i), i);
   return false;
  }
 }
 
//Email looks good!
 return true;
//End of Function
}
    

