// JavaScript Order Form validation
function Form_Validator(theForm)
{
	if (theForm.Company_Name.value == "")
  {
    alert("Please enter Company Name");
    theForm.Company_Name.focus();
    return (false);
  }
 	if (theForm.Contact_Name.value == "")
  {
    alert("Please enter a Contact Name");
    theForm.Contact_Name.focus();
    return (false);
  }
	if (theForm.Address.value == "")
  {
    alert("Please enter Address");
    theForm.Address.focus();
    return (false);
  }
	if (theForm.City.value == "")
  {
    alert("Please enter a City");
    theForm.City.focus();
    return (false);
  }
	if (theForm.State.value == "Select")
  {
    alert("Please select a State");
    theForm.State.focus();
    return (false);
  }
	if (theForm.Zip_Code.value == "")
  {
    alert("Please enter a Zip Code");
    theForm.Zip_Code.focus();
    return (false);
  }
	if (theForm.Phone_Number.value == "")
  {
    alert("Please enter a Phone Number ");
    theForm.Phone_Number.focus();
    return (false);
  }
  if (theForm.Email.value.length == 0) {
    alert("Please fill in the E-mail address");
    theForm.Email.focus();
    return false;
  }
  re = /^[a-zA-Z0-9_.\-]+@[a-zA-Z0-9.\-]+[a-zA-Z0-9\-]\.[a-zA-Z][a-zA-Z]+$/;
  if (!re.test(theForm.Email.value)) {
    alert("Please fill in a correct E-mail address");
    theForm.Email.focus();
    return false;
  }	

   return (true);
}