// JavaScript Document
function PopulateMinSelect()
{
	jQuery('#SearchFormLoading').show();
	jQuery.post("includes/minprices.inc.php", { 'PriceType': jQuery('#buyrent').val() }, 
	function(response)
	{
        jQuery('#MinPrices').fadeOut();
        setTimeout("finishAjax('SearchFormLoading','MinPrices', '"+escape(response)+"')", 400);
      });
    	return false;
}

function PopulateMaxSelect()
{
	jQuery('#SearchFormLoading').show();
	jQuery.post("includes/maxprices.inc.php", { PriceType: jQuery('#buyrent').val() }, 
	function(response)
	{
        jQuery('#MaxPrices').fadeOut();
        setTimeout("finishAjax('SearchFormLoading','MaxPrices', '"+escape(response)+"')", 400);
      });
    	return false;
}


function PopulateMinAlertSelect()
{
	jQuery('#AlertFormLoading').show();
	jQuery.post("includes/minprices.inc.php", { 'PriceType': jQuery('#buyrentalert').val() }, 
	function(response)
	{
        jQuery('#MinAlertPrices').fadeOut();
        setTimeout("finishAjax('AlertFormLoading','MinAlertPrices', '"+escape(response)+"')", 400);
      });
    	return false;
}

function PopulateMaxAlertSelect()
{
	jQuery('#AlertFormLoading').show();
	jQuery.post("includes/maxprices.inc.php", { PriceType: jQuery('#buyrentalert').val() }, 
	function(response)
	{
        jQuery('#MaxAlertPrices').fadeOut();
        setTimeout("finishAjax('AlertFormLoading','MaxAlertPrices', '"+escape(response)+"')", 400);
      });
    	return false;
}

function finishAjax(Loader,ResultID,response) {
  jQuery('#'+Loader).hide();
	jQuery('#'+ResultID).fadeIn();
  jQuery('#'+ResultID).html(unescape(response));
}
