function validateSellerForm(theForm)
{
  // Name is required
  if ((removeSpaces(theForm.Name.value).length) <= 0)
  {
     alert("Please enter your Name.");
     theForm.Name.focus();
     return false;
  }

  // Phone Number is required
  if ((removeSpaces(theForm.PhoneNumber.value).length) <= 0)
  {
     alert("Please enter your Phone Number.");
     theForm.PhoneNumber.focus();
     return false;
  }

  // Email Address is required
  if ((removeSpaces(theForm.EmailAddress.value).length) <= 0)
  {
     alert("Please enter your Email Address.");
     theForm.EmailAddress.focus();
     return false;
  }

  // Property Address is required
  if ((removeSpaces(theForm.PropertyAddress.value).length) <= 0)
  {
     alert("Please enter your Property Address.");
     theForm.PropertyAddress.focus();
     return false;
  }

  // Home Type is required (radio button)
  var homeTypePopulated = false;
  for (var i = 0 ; i < theForm.HomeType.length ; i++)
  {
    if (theForm.HomeType[i].checked == true)
    {
      homeTypePopulated = true;
    }
  }
  if (homeTypePopulated == false)
  {
    alert("Please enter the Type of Home.");
    theForm.HomeType[0].focus();
    return false;
  }

  // Listed with a realtor is required (radio button)
  var realtorPopulated = false;
  for (var i = 0 ; i < theForm.Realtor.length ; i++)
  {
    if (theForm.Realtor[i].checked == true)
    {
      realtorPopulated = true;
    }
  }
  if (realtorPopulated == false)
  {
    alert("Please enter whether or not the home is listed with a real estate agent.");
    theForm.Realtor[0].focus();
    return false;
  }
  if (theForm.Realtor[0].checked == true) 
  {
    // Home is listed, release must be answered
    if ((removeSpaces(theForm.RealtorRelease.value).length) <= 0)
    {
      alert("Please specify whether the real estate agent would be willing to release the listing.");
      theForm.RealtorRelease.focus();
      return false;
    }
  }

  // Reason for Selling is required
  if ((removeSpaces(theForm.ReasonForSelling.value).length) <= 0)
  {
     alert("Please enter your reason for selling this property.");
     theForm.ReasonForSelling.focus();
     return false;
  }

// Probate is required (radio button)
  if (checkboxPopulated(theForm.Probate) == false)
  {
    alert("Please enter whether or not the home is currently in probate.");
    theForm.Probate[0].focus();
    return false;
  }

  // Move Date is required
  if ((removeSpaces(theForm.MoveDate.value).length) <= 0)
  {
     alert("Please enter when you are planning to sell your home.");
     theForm.MoveDate.focus();
     return false;
  }

  // Length of Ownership is required
  if ((removeSpaces(theForm.LengthOfOwnership.value).length) <= 0)
  {
     alert("Please enter how long you have owned this property.");
     theForm.LengthOfOwnership.focus();
     return false;
  }

  // Year Built is required
  if ((removeSpaces(theForm.YearBuilt.value).length) <= 0)
  {
     alert("Please enter the year built.");
     theForm.YearBuilt.focus();
     return false;
  }

  // Bedrooms is required
  if ((removeSpaces(theForm.Bedrooms.value).length) <= 0)
  {
     alert("Please enter the number of bedrooms.");
     theForm.Bedrooms.focus();
     return false;
  }

  // Bathrooms is required
  if ((removeSpaces(theForm.Bathrooms.value).length) <= 0)
  {
     alert("Please enter the number of bathrooms.");
     theForm.Bathrooms.focus();
     return false;
  }

  // Home size is required
  if ((removeSpaces(theForm.HomeSize.value).length) <= 0)
  {
     alert("Please enter the home size.");
     theForm.HomeSize.focus();
     return false;
  }

  // Pool is required (radio button)
  if (checkboxPopulated(theForm.Pool) == false)
  {
    alert("Please enter whether or not the home has a pool.");
    theForm.Pool[0].focus();
    return false;
  }

  // Garage/Carport is required (radio button)
  if (checkboxPopulated(theForm.GarageCarport) == false)
  {
    alert("Please enter whether or not the home has a garage or carport.");
    theForm.GarageCarport[0].focus();
    return false;
  }

  // Repairs Needed is required
  if ((removeSpaces(theForm.RepairsNeeded.value).length) <= 0)
  {
     alert("Please enter the repairs needed.");
     theForm.RepairsNeeded.focus();
     return false;
  }

  // Occupied is required (radio button)
  var occupiedPopulated = false;
  for (var i = 0 ; i < theForm.Occupied.length ; i++)
  {
    if (theForm.Occupied[i].checked == true)
    {
      occupiedPopulated = true;
    }
  }
  if (occupiedPopulated == false)
  {
    alert("Please enter whether or not the home is occupied.");
    theForm.Occupied[0].focus();
    return false;
  }

  // Repairs Needed is required
  if ((removeSpaces(theForm.RepairsNeeded.value).length) <= 0)
  {
     alert("Please enter the repairs needed.");
     theForm.RepairsNeeded.focus();
     return false;
  }

  // First Mortgage Holder is required
  if ((removeSpaces(theForm.FirstMortgageHolder.value).length) <= 0)
  {
     alert("Please enter the name of the first mortgage holder.");
     theForm.FirstMortgageHolder.focus();
     return false;
  }

  // First Mortgage Balance is required
  if ((removeSpaces(theForm.FirstMortgageBalance.value).length) <= 0 ||
      (removeSpaces(theForm.FirstMortgageBalance.value) == "$"))
  {
     alert("Please enter the balance of the first mortgage.");
     theForm.FirstMortgageBalance.focus();
     return false;
  }

  // First Mortgage Payment is required
  if ((removeSpaces(theForm.FirstMortgagePayment.value).length) <= 0 ||
      (removeSpaces(theForm.FirstMortgagePayment.value) == "$"))
  {
     alert("Please enter the monthly payment for the first mortgage.");
     theForm.FirstMortgagePayment.focus();
     return false;
  }

  // Taxes/Insurance is required (radio button)
  var taxesPopulated = false;
  for (var i = 0 ; i < theForm.TaxesInsurance.length ; i++)
  {
    if (theForm.TaxesInsurance[i].checked == true)
    {
      taxesPopulated = true;
    }
  }
  if (taxesPopulated == false)
  {
    alert("Please enter whether or not taxes and insurance are included in the monthly payment.");
    theForm.TaxesInsurance[0].focus();
    return false;
  }

  // First Mortgage Current is required (radio button)
  if (checkboxPopulated(theForm.FirstMortgageCurrent) == false)
  {
    alert("Please enter whether or not the first mortgage is current.");
    theForm.FirstMortgageCurrent[0].focus();
    return false;
  }
  // If not current, months late is required
  if (theForm.FirstMortgageCurrent[1].checked == true)
  {
    if ((removeSpaces(theForm.FirstMortgageMonthsLate.value).length) <= 0)
    {
      alert("Please enter the months late on the first mortgage.");
      theForm.FirstMortgageMonthsLate.focus();
      return false;
    }
  }

  // HOA Dues are required
  if ((removeSpaces(theForm.MonthlyHOADues.value).length) <= 0 ||
      (removeSpaces(theForm.MonthlyHOADues.value) == "$"))
  { 
    alert("Please enter the Monthly HOA Dues.");
    theForm.MonthlyHOADues.focus();
    return false;
  }

  // Foreclosure Notice is required (radio button)
  if (checkboxPopulated(theForm.ForeclosureNotice) == false)
  {
    alert("Please enter if you have received a foreclosure notice.");
    theForm.ForeclosureNotice[0].focus();
    return false;
  }

  // Liens/Judgements is required (radio button)
  if (checkboxPopulated(theForm.LiensJudgements) == false)
  {
    alert("Please enter if there are any liens/judgements on the property.");
    theForm.LiensJudgements[0].focus();
    return false;
  }

  // Home value is required
  if ((removeSpaces(theForm.HomeValue.value).length) <= 0 ||
      (removeSpaces(theForm.HomeValue.value) == "$"))
  { 
    alert("Please enter the estimated value of the home.");
    theForm.HomeValue.focus();
    return false;
  }

  // Asking price is required
  if ((removeSpaces(theForm.AskingPrice.value).length) <= 0 ||
      (removeSpaces(theForm.AskingPrice.value) == "$"))
  { 
    alert("Please enter your asking price.");
    theForm.AskingPrice.focus();
    return false;
  }

  // Sell for balance owed is required (radio button)
  if (checkboxPopulated(theForm.SellForBalanceOwed) == false)
  {
    alert("Please enter whether or not you'd be willing to sell the house for the balance owed.");
    theForm.SellForBalanceOwed[0].focus();
    return false;
  }

  // Take over payments is required (radio button)
  if (checkboxPopulated(theForm.TakeOverPayments) == false)
  {
    alert("Please enter whether or not you'd allow us to take over your mortgage payments.");
    theForm.TakeOverPayments[0].focus();
    return false;
  }

  // Lowest price is required
  if ((removeSpaces(theForm.LowestPrice.value).length) <= 0 ||
      (removeSpaces(theForm.LowestPrice.value) == "$"))
  { 
    alert("Please enter the lowest price you'd be willing to accept.");
    theForm.LowestPrice.focus();
    return false;
  }

  // Owner financing is required (radio button)
  if (checkboxPopulated(theForm.OwnerFinancing) == false)
  {
    alert("Please enter whether or not you'd consider owner financing.");
    theForm.OwnerFinancing[0].focus();
    return false;
  }

  // Lease/Option is required (radio button)
  if (checkboxPopulated(theForm.LeaseOption) == false)
  {
    alert("Please enter whether or not you'd consider a lease/option.");
    theForm.LeaseOption[0].focus();
    return false;
  }

  // Source is required
  if ((removeSpaces(theForm.Source.value).length) <= 0)
  {
     alert("Please enter how you heard about us.");
     theForm.Source.focus();
     return false;
  }

  return true;
}

function removeSpaces(inString) {
  var outString = "";
  for (i = 0; i < inString.length; i++) {
    ch = inString.charAt(i);
    if (ch != " ") {
          outString = outString + ch;
        }
  }
  return outString;
}

function checkboxPopulated(radioField)
{
  var isPopulated = false;
  for (var i = 0 ; i < radioField.length ; i++)
  {
    if (radioField[i].checked == true)
    {
      isPopulated = true;
    }
  }
  return isPopulated;
}