<!-- Public_Search_Listings_validateandsubmit.js -->
<!-- Bunbury and Associates -->
<!-- Updated: 12/18/2007 JRT-->

function noEntry(objname) {
  var mt=objname.value;
  
  if ((mt.length<1)||(mt.substring(0,6)=="******")) {
    return false;
  }
  else {
    return true;
  }
}

function validateandsubmit( f ) {
  var count = 0;
  if (noEntry(document.form1.L_MLS_NUMBER) == true)
  {
    count++;
  }
  if ((noEntry(document.form1.L_LISTINGCITY) == true) || (noEntry(document.form1.L_NM_COUNTY) == true))
  {
    if ((noEntry(document.form1.L_LISTING_PRICE_LOW) == true) || (noEntry(document.form1.L_LISTING_PRICE_HIGH) == true))
    {
      count++;
    }
  }
  if ( count < 1  )
  {
    alert("You must enter an MLS Number or either a City or County and a List Price Low or High to continue.\r\n");
    return false;
  }
}