//This function verifys the various inputs of the form
function verifyForm(myform)
{
//Check for first name
 if (myform.first_name.value == "")
 {
  window.alert("Please enter your First Name!");
  myform.first_name.focus();
  myform.first_name.select();
  return false;
 }
 //check for last name
 if (myform.last_name.value == "")
 {
  window.alert("Please enter your Last Name!");
  myform.last_name.focus();
  myform.last_name.select();
  return false;
 }
 //Check for address
 if (myform.address1.value == "")
 {
  window.alert("Please enter your Address!");
  myform.address1.focus();
  myform.address1.select();
  return false;
 }
 //Check city
 if (myform.city.value == "")
 {
  window.alert("Please enter your City!");
  myform.city.focus();
  myform.city.select();
  return false;
 }
 //Check state
 if (myform.state.value == "")
 {
  window.alert("Please enter your State!");
  myform.state.focus();
  myform.state.select();
  return false;
 }
 //Check zip code
 if (myform.zip.value == "")
 {
  window.alert("Please enter your Zip Code!");
  myform.zip.focus();
  myform.zip.select();
  return false;
 }
 //Check area code
 if (myform.day_phone_a.value == "")
 {
  window.alert("Please enter your Area Code, Thank you!");
  myform.day_phone_a.focus();
  myform.day_phone_a.select();
  return false;
 }
 //Check telephone number prefix
 if (myform.day_phone_b.value == "")
 {
  window.alert("Please enter your telephone number Prefix, Thank you!");
  myform.day_phone-b.focus();
  myform.day_phone_b.select();
  return false;
 }
 //Check telephone number suffix
 if (myform.day_phone_c.value == "")
 {
  window.alert("Please enter your telephone number Suffix, Thank you!");
  myform.day_phone_c.focus();
  myform.day_phone_c.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
}

