function populate_cities() {
   var county_id = document.getElementById('county').value;
   var cities_string = county_cities[county_id];
   if (cities_string != "") {
      cities_array = cities_string.split("|");
   }
   var nbr_cities = cities_array.length;
   document.getElementById('city').options.length = 0;
   for (var x=0; x < nbr_cities; x++) {
      var oOption = document.createElement("OPTION");
      var city = cities_array[x];
      var city_elem_array = city.split(";");
      var city_name = city_elem_array[0];
      var city_subarea = city_elem_array[1];
      oOption.value = city_name + ":" + city_subarea;
      if (city_subarea != "") {
         oOption.text = city_name + " - " + city_subarea;
      }
      else {
         oOption.text = city_name;
      }
      document.getElementById('city').options[x] = oOption; 
   }
}

function check_price_range() {
   var low_ix = document.getElementById('low_price').selectedIndex;
   var low_price = document.getElementById('low_price').options[low_ix].value;
   var high_ix = document.getElementById('high_price').selectedIndex;
   var high_price = document.getElementById('high_price').options[high_ix].value;
   if (parseInt(high_price) < parseInt(low_price)) {
   alert("The Higher Price should be Higher or equal the Lower Price.");
      return false;
   }
   return true;
}
