 function validate() {
  var isError = false;
  var errorString = "You must fill in the following fields to order the Agency Budgeter:\n\n";
  
  if(document.purchaseForm.name.value.length == 0) {
   isError = true;
   errorString += "Name\n";
  }
  if(document.purchaseForm.agency.value.length == 0) {
   isError = true;
   errorString += "Agency\n";
  }
  if(document.purchaseForm.phone.value.length == 0) {
   isError = true;
   errorString += "Phone\n";
  }
  if(document.purchaseForm.email.value.length == 0) {
   isError = true;
   errorString += "Email\n";
  }

  if(isError) alert(errorString);
  else {
   purchaseForm.submit();
   location.href='thanks3.asp';
  }
 }
