<!-- public_validateandsubmit.js -->

  function noEntry(objname, objDesc) {
     mt=objname.value;
     if ((mt.length<1)||(mt.substring(0,6)=="******")) {
     return false;
     }
     else {
      return true;
     }
  }

  function noEntrySelect(objname,objDesc) {
     mt=objname
     if ((objname.length<1)||(objname.substring(0,6)=="******")) {
       return false;
     }
     else {
        return true;
     }
  }

      function getSelected(o_SelectList) {
       var s_selectListing = "";
     var boxLength = o_SelectList.length;

    var count = 0;
    if (boxLength != 0) {
      for (i = 0; i < boxLength; i++) {
        if (count == 0) {
           if (o_SelectList[i].selected == true) {
                      // alert("Selected Value 1:\r\n" + o_SelectList.options[i].value);
             s_selectListing = o_SelectList.options[i].value;
             count++;
           }
        }
        else {
            if (o_SelectList[i].selected == true) {
                      // alert("Selected Value 1:\r\n" + o_SelectList.options[i].value);
             s_selectListing = s_selectListing + "," + o_SelectList.options[i].value;
             count++;
          }
        }
      }
    }
       return s_selectListing;
  }

    function getSelectedDesc(o_SelectList) {
       var s_selectListing = "";
     var boxLength = o_SelectList.length;

    var count = 0;
    if (boxLength != 0) {
      for (i = 0; i < boxLength; i++) {
        if (count == 0) {
           if (o_SelectList[i].selected == true) {
             // alert("Selected Value 1:\r\n" + o_SelectList.options[i].text);
             s_selectListing = o_SelectList.options[i].text;
             count++;
           }
        }
        else {
            if (o_SelectList[i].selected == true) {
           //   alert("Selected Value 2:\r\n" + o_SelectList.options[i].text);
             s_selectListing = s_selectListing + "," + o_SelectList.options[i].text;
             count++;
          }

        }
      }
    }
       return s_selectListing;
  }

  function validateandsubmit( f ) {
        var count = 0;

        if (noEntrySelect(getSelected(document.form1.WebPropertyType), " ") == true)
         {
          if (noEntrySelect(getSelectedDesc(document.form1.nm_County), " ") == true)
           {
            count++;
           }
         }

        if ( count < 1  ) {
           alert("Please select a property type and county for your search.\r\n");
                   return false;
        }

  }
//-->

