function Validate(theForm)
{


if (theForm.myform_Model.value == "")

  {
    alert('In area 1, you must enter a LENNOX model number.');
    theForm.myform_Model.focus();

    return (false);
  }

if (theForm.myform_Model.value.length <6)

  {
    alert('In area 1, you must enter a LENNOX model number that is at least 6 characters. Most Lennox model numbers are 6 to 15 characters in length. If you need help locating your model number, our Video FAQ (frequently asked questions) has a good section on how to locate your Lennox model number. There is a link to our Video FAQ on the left side of this page. Model families such as G16, G21, CB19, HS22 or HP26 are not the complete model number. These numbers only represent the first few characters of a model family and are commonly listed on owners manuals.');
theForm.myform_Model.focus();
     return (false);
  }

if (theForm.myform_Part_description.value == "")
  {
    alert('In area 2, please enter a description of the part you are looking for into the "part description" field.');
    theForm.myform_Part_description.focus();
    return (false);
  }


// begin zip validator
//  End zip validator


  if (theForm.myform_First_name.value == "")
  {
    alert('In area 3, Please enter your name into the "Name" field on the form. We will only use this information if we need to contact you. We will not add your name to any mail list or telemarketing list. This information will only be used to process your request for a Lennox part location request.');
    theForm.myform_First_name.focus();
    return (false);
  }

if (theForm.myform_email1.value == "")
  {
    alert('In area 5, please enter your email address in the "Email Address" field on the form.');
    theForm.myform_email1.focus();
    return (false);
    }
 if (theForm.myform_email2.value == "")
  {
    alert('In area 5, please enter your email address in the "Confirm Email Address" field on the form.');
    theForm.myform_email2.focus();
    return (false);
    }
 if (theForm.myform_email1.value != theForm.myform_email2.value)  
  {
alert('In area 5, you confirming email does not match the email address you provided. Please correct your errors. Make sure you did not leave in trailing spaces behind your email address as this will cause the form to not accept your input.')
theForm.myform_email2.focus();
return (false);
   }

////////////////////////validate email for illegal characters and proper form


    var emailFilter=/^.+@.+\..{2,4}$/;
    if (!(emailFilter.test(theForm.myform_email1.value))) { 
       theForm.myform_email1.focus();
       alert('Your email address does not appear to be in a valid format. Please check your email address. Make sure there is no trailing spaces in your email. If this problem persists, please contact us toll free at 866-536-6691');
       return (false);
}

//test email for illegal characters
       var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/
         if (theForm.myform_email1.value.match(illegalChars)) {
          theForm.myform_email1.focus();
          alert('It appears that there is at least one improper character in your email address. Please check your email address for errors. Make sure there is no trailing spaces in your email. If this problem persists, please contact us toll free at 866-536-6691');
          return (false);    
}

////// end validate for ellegal characters and proper form email end 

     
{
// place any other field validations that you require here
// validate myradiobuttons
myOption = -1;

if (theForm.myform_button1.checked) {
myOption = 1;
}
if (theForm.myform_button2.checked) {
myOption = 1;
}
if (theForm.myform_button3.checked) {
myOption = 1;
}

if (myOption == -1) {
alert('In area 6, you must select a radio button that denotes the type of fuel this appliance uses. If your furnace uses liquid propane select "Yes, it uses Propane". If your furnace uses natural gas select "It uses NATURAL gas". If this appliance does not use gas, select "This is NOT a gas appliance".');
return false;
}
// place any other field validations that you require here
// thisform.submit(); // this line submits the form after validation
}



  return (true);
}

