    /**
     * Called when the search needs to be done.
     */
    function findRestaurants(pageNumber, searchPlace)
    {
      var xmlHttp = GetXmlHttpObject();
      
      // Get the filter from the form
      var filter = "";
      var cuisine = "";
      if(document.getElementById("restaurantsearch"))
      {
      	filter = getFilterText();
      	
      	// Get the category from the form
      	var cuisineSelect = document.getElementById("cuisine");
      	cuisine = cuisineSelect.options[cuisineSelect.selectedIndex].value;
      	if(cuisine != "") document.getElementById("cuisine").options[0].innerHTML = "All Restaurants";
      }
      
      var url = "/restaurant_search_handler.php";
      url = url + "?filter=" + filter;
      url = url + "&cuisine=" + cuisine;
      url = url + "&page=" + pageNumber;
      url = url + "&search=" + searchPlace;
      // Do this to ensure a non-cached page
      url = url + "&sid="+Math.random();
      
      //if($("div#restaurant_load_status").is(":hidden")) $("div#restaurant_search_status").show();
      //$("div#restaurant_search_results").hide();
      
      // Define the callback when the response arrives
      xmlHttp.onreadystatechange = function() {
        if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
        {
        	//$("div#restaurant_load_status").hide();
        	//$("div#restaurant_search_status").hide();
          $("div#restaurant_search_results").html(xmlHttp.responseText);//.slideDown("slow");
         	$('input[@type=radio].star').rating();
         	
         	// Google Analytics tracking
         	pageTracker._trackPageview("/select_restaurant.php?page=" + pageNumber);
        }
      };
      xmlHttp.open("GET",url,true);
      xmlHttp.send(null);
    }
    
    /**
     * @return Returns the filter text. Needed to force the JS engine to make a copy of the
     *         value rather than returning a reference.
     */
    function getFilterText()
    {
    	var iField = document.getElementById("restaurantsearch");
    	var val = iField.value;
    	// If the value is the same as the title, return nothing
    	if(val == iField.title) val = "";
    	return val;
    }