function load_price_ranges($type){

$url=ROOTURL+'load_price_ranges.php?type='+$type;
ajax_do(ajax_init(),$url,load_prices,'GET');
}

function load_prices($xh_obj){
   document.getElementById('price_ranges').innerHTML=$xh_obj.responseText;
}

var $images=new Array();
var $captions=new Array();
var $hash=new Array();

function preload_property(){
   if(!arguments.length){return false;}
   for($i=0;$i<arguments.length;$i++){
	    $images[$i]=new Image();
			$images[$i].src='content/property/l/'+arguments[$i]+'.jpg';
			$hash[arguments[$i]]=$i;
	 }
	 return true;
}
function preload_captions(){
   if(!arguments.length){return false;}
   for($i=0;$i<arguments.length;$i++){
      $captions[$i]=arguments[$i];
	 }
	 return true;
}

function show_property_image($id){
   document.getElementById('propertylgimg').src='content/property/l/'+$id+'.jpg';
	 document.getElementById('propertypicname').firstChild.nodeValue=$captions[$hash[$id]];
}

$left=0;
var $lwidth;
$interval=0;

function glide_scroll($direction,$lwidth){
   $interval=setInterval('move_'+$direction+'('+$lwidth+')',30);
}
function cancel_scroll(){
   clearInterval($interval);
}
function move_left($lwidth){
   $lyr=document.getElementById('lyr1');
	 $limit=400-$lwidth;
   if($left<=$limit)return false;
	 $left=$left-4;
   $lyr.style.left=$left+'px';
}
function move_right($lwidth){
   $lyr=document.getElementById('lyr1');
	 if($left>=0)return false;
	 $left=$left+4;
   $lyr.style.left=$left+'px';
}

