function checkForm() {

   var atSign= "@";
   var missingInfo = "";
   var missingInfoCount = 0;
   var validEMail = false;

   // set the action to send e-mail; create e-mail address in order to avoid spam farming bots
   window.document.inspectForm.action = "mailto:paula" + atSign +
      "sonraypestcontrol.com?subject=Termite Inspection Request";

   // verify REQUEST fields
   if ( checkNameField(window.document.inspectForm.RequestName) == false ) {
      missingInfo += "\n- REQUEST: Requested by ";
      missingInfoCount++;
   }

   if ( checkTextField(window.document.inspectForm.RequestDate) == false ) {
      missingInfo += "\n- REQUEST: Date ";
      missingInfoCount++;
   }

   if ( checkEMail(window.document.inspectForm.RequestEMail) == false ) {
      missingInfo += "\n- REQUEST: E-Mail ";
      missingInfoCount++;
   }
   else
      validEMail = true;

   // If the e-mail field is valid and the requestor wants a CC of the e-mail,
   // modify the action field to send a CC to the request e-mail
   if ( ( checkRadio("CC", 2) == true )
     && ( window.document.inspectForm.CC1.checked )
     && ( validEMail ) ) {
      window.document.inspectForm.action += "!&cc=" + window.document.inspectForm.RequestEMail.value;
   }

   // verify SELLER fields
   if ( checkNameField(window.document.inspectForm.SellerName) == false ) {
      missingInfo += "\n- SELLER: Name";
      missingInfoCount++;
   }

   if ( checkPhoneField(window.document.inspectForm.SellerPhonePrim) == false ) {
      missingInfo += "\n- SELLER: Primary Phone";
      missingInfoCount++;
   }

   if ( checkNonBlank(window.document.inspectForm.SellerPhoneOther) == true
     && checkPhoneField(window.document.inspectForm.SellerPhoneOther) == false) {
      missingInfo += "\n- SELLER: Other Phone";
      missingInfoCount++;
   }

   if ( checkRadio("Refinance", 2) == false ) {
      missingInfo += "\n- SELLER: Refinance";
      missingInfoCount++;
   }

   // verify LISTING AGENT fields
   if ( checkTextField(window.document.inspectForm.ListCo) == false ) {
      missingInfo += "\n- LISTING AGENT: Company";
      missingInfoCount++;
   }

   if ( checkNameField(window.document.inspectForm.ListAgentName) == false ) {
      missingInfo += "\n- LISTING AGENT: Name";
      missingInfoCount++;
   }

   if ( checkNonBlank(window.document.inspectForm.ListFax) == true
     && checkPhoneField(window.document.inspectForm.ListFax) == false ) {
      missingInfo += "\n- LISTING AGENT: Fax";
      missingInfoCount++;
   }

   if ( checkPhoneField(window.document.inspectForm.ListOfficePh) == false ) {
      missingInfo += "\n- LISTING AGENT: Office Phone";
      missingInfoCount++;
   }

   if ( checkNonBlank(window.document.inspectForm.ListMobilePh) == true
     && checkPhoneField(window.document.inspectForm.ListMobilePh) == false ) {
      missingInfo += "\n- LISTING AGENT: Mobile Phone";
      missingInfoCount++;
   }

   // verify BUYER fields
   if ( checkNameField(window.document.inspectForm.BuyerName) == false ) {
      missingInfo += "\n- BUYER: Name";
      missingInfoCount++;
   }

   if ( checkPhoneField(window.document.inspectForm.BuyerPhonePrim) == false ) {
      missingInfo += "\n- BUYER: Primary Phone";
      missingInfoCount++;
   }


   if ( checkNonBlank(window.document.inspectForm.BuyerPhoneOther) == true
     && checkPhoneField(window.document.inspectForm.BuyerPhoneOther) == false ) {
      missingInfo += "\n- BUYER: Other Phone";
      missingInfoCount++;
   }

   // verify BUYER'S AGENT fields
   if ( checkTextField(window.document.inspectForm.BuyAgentCo) == false ) {
      missingInfo += "\n- BUYER'S AGENT: Company";
      missingInfoCount++;
   }

   if ( checkNameField(window.document.inspectForm.BuyAgentName) == false ) {
      missingInfo += "\n- BUYER'S AGENT: Name";
      missingInfoCount++;
   }

   if ( checkNonBlank(window.document.inspectForm.BuyAgentFax) == true
     && checkPhoneField(window.document.inspectForm.BuyAgentFax) == false ) {
      missingInfo += "\n- BUYER'S AGENT: Fax";
      missingInfoCount++;
   }

   if ( checkPhoneField(window.document.inspectForm.BuyAgentOfficePh) == false ) {
      missingInfo += "\n- BUYER'S AGENT: Office Phone";
      missingInfoCount++;
   }

   if ( checkNonBlank(window.document.inspectForm.BuyAgentMobilePh) == true
     && checkPhoneField(window.document.inspectForm.BuyAgentMobilePh) == false ) {
      missingInfo += "\n- BUYER'S AGENT: Mobile Phone";
      missingInfoCount++;
   }
   // verify PROPERTY fields
   if ( checkTextField(window.document.inspectForm.PropStreet) == false ) {
      missingInfo += "\n- PROPERTY: Street Address";
      missingInfoCount++;
   }

   if ( checkNameField(window.document.inspectForm.PropCity) == false ) {
      missingInfo += "\n- PROPERTY: City";
      missingInfoCount++;
   }

   if ( checkNameField(window.document.inspectForm.PropState) == false ) {
      missingInfo += "\n- PROPERTY: State";
      missingInfoCount++;
   }

   if ( checkZipField(window.document.inspectForm.PropZip) == false ) {
      missingInfo += "\n- PROPERTY: Zip Code";
      missingInfoCount++;
   }

   if ( checkNonBlank(window.document.inspectForm.PropGatedCode) == true
     && checkTextField(window.document.inspectForm.PropGatedCode) == false ) {
      missingInfo += "\n- PROPERTY: Gated Comm.";
      missingInfoCount++;
   }

   if ( checkNonBlank(window.document.inspectForm.PropCbsCode) == true
     && checkTextField(window.document.inspectForm.PropCbsCode) == false ) {
      missingInfo += "\n- PROPERTY: CBS Code";
      missingInfoCount++;
   }

   if ( checkRadio("PropLockbox", 2) == false ) {
      missingInfo += "\n- PROPERTY: Lock Box?";
      missingInfoCount++;
   }

   if ( checkRadio("PropOccupied", 2) == false ) {
      missingInfo += "\n- PROPERTY: Occupied?";
      missingInfoCount++;
   }

   if ( checkRadio("PropCOEPaid", 2) == false ) {
      missingInfo += "\n- PROPERTY: Paid at COE by";
      missingInfoCount++;
   }

   // verify HOME INSPECTION fields

   if ( checkRadio("HomeInsp", 2) == false ) {
      missingInfo += "\n- HOME INSPECTION: Include home inspection?";
      missingInfoCount++;
   }
   else {
      // If "Yes" is selected, verify remaining fields in this section
      if ( window.document.inspectForm.HomeInsp1.checked == true ) {
         if ( checkRadio("HomePoolSpa", 2) == false ) {
            missingInfo += "\n- HOME INSPECTION: Pool/Spa information";
            missingInfoCount++;
         }

         if ( checkRadio("HomeWaterElec", 2) == false ) {
            missingInfo += "\n- HOME INSPECTION: Water/Electricity information";
            missingInfoCount++;
         }

         if ( checkRadio("HomeElecPanel", 2) == false ) {
            missingInfo += "\n- HOME INSPECTION: Electric panel information";
            missingInfoCount++;
         }

         if ( checkNumberField(window.document.inspectForm.HomeSqFt) == false ) {
            missingInfo += "\n- HOME INSPECTION: Square Footage";
            missingInfoCount++;
         }

         if ( checkNumberField(window.document.inspectForm.HomeYear) == false ) {
            missingInfo += "\n- HOME INSPECTION: Year Built";
            missingInfoCount++;
         }
      }
   }

   // verify CONTRACT fields

   if ( checkTextField(window.document.inspectForm.ContractDate) == false ) {
      missingInfo += "\n- CONTRACT: Date Signed";
      missingInfoCount++;
   }

   if ( checkTextField(window.document.inspectForm.EscrowDate) == false ) {
      missingInfo += "\n- CONTRACT: Close of Escrow";
      missingInfoCount++;
   }

   if ( checkNameField(window.document.inspectForm.EscrowOff) == false ) {
      missingInfo += "\n- CONTRACT: Escrow Officer";
      missingInfoCount++;
   }

   if ( checkTextField(window.document.inspectForm.EscrowNumber) == false ) {
      missingInfo += "\n- CONTRACT: Escrow #";
      missingInfoCount++;
   }

   if ( checkTextField(window.document.inspectForm.InspEndDate) == false ) {
      missingInfo += "\n- CONTRACT: 10-day inspection period ends";
      missingInfoCount++;
   }

   // verify TITLE COMPANY fields
   if ( checkTextField(window.document.inspectForm.TitleCo) == false ) {
      missingInfo += "\n- TITLE COMPANY: Company";
      missingInfoCount++;
   }

   if ( checkTextField(window.document.inspectForm.TitleStreet) == false ) {
      missingInfo += "\n- TITLE COMPANY: Street Address";
      missingInfoCount++;
   }

   if ( checkNameField(window.document.inspectForm.TitleCity) == false ) {
      missingInfo += "\n- TITLE COMPANY: City";
      missingInfoCount++;
   }

   if ( checkNameField(window.document.inspectForm.TitleState) == false ) {
      missingInfo += "\n- TITLE COMPANY: State";
      missingInfoCount++;
   }

   if ( checkZipField(window.document.inspectForm.TitleZip) == false ) {
      missingInfo += "\n- TITLE COMPANY: Zip Code";
      missingInfoCount++;
   }

   if ( checkPhoneField(window.document.inspectForm.TitlePhone) == false ) {
      missingInfo += "\n- TITLE COMPANY: Office Phone";
      missingInfoCount++;
   }

   if ( checkNonBlank(window.document.inspectForm.TitleFax) == true
     && checkPhoneField(window.document.inspectForm.TitleFax) == false ) {
      missingInfo += "\n- TITLE COMPANY: Fax";
      missingInfoCount++;
   }

   //  If any fields were invalid, print an error message and do not submit the form */
   if (missingInfo != "") {
      if ( missingInfoCount > 9 ) {
         missingInfo = "Error - Please provide valid values for all required fields" +
                       "\nNote that fields in gray italics are optional";
      }
      else {
         missingInfo = "ERROR - Please provide valid values for these fields:" + missingInfo +
                       "\nNote that only fields in gray italics are optional";
      }

      alert(missingInfo);
      return false;
   }

   return true;
}