window.onload=load;

var ttype='0';
var rent_period='';



function make_rent(item)
{
//alert(window.root+'rent');
$.ajax({
url: window.root+'rent',
type: 'POST',
data: 'item='+item,
beforeSend:function(){ $('#rent_laoding').show();},
error: function(data){ $('#rent_laoding').hide();  $('#rent').html('Error '); 

								},
success: function(data) {//$('#rent_content').hide();
//alert(data);  
$('#rent_content').html(data).fadeIn('slow'); $('#rent_laoding').hide();  
}
});
return false;
	
}



function MM_openBrWindow(theURL,winName,features) 
	{ //v2.0
	window.open(theURL,winName,features);
	}

function load() 
	{
	/*
	$('a[rel*=facebox]').facebox() ;
	
	$('.carousel').infiniteCarousel({
		displayTime: 2000,
		textholderHeight : .25
	});
	*/
	if (GBrowserIsCompatible()) 
		{
  		var map = new GMap2(document.getElementById("map"), {size: new GSize(500,200)} );
		var geocoder = new GClientGeocoder();
		var address=window['suburb']+''+window['city']+''+window['state']+''+window['country']; 
				//alert(address);
			geocoder.getLatLng(address,
						function(point) 
						{
						if (!point) 
							{
						    document.getElementById("map").style.display='none';
							document.getElementById("maptext").style.display='none';
							} 
							else 
							{
					        map.setCenter(point, 12);
							map.addControl(new GSmallMapControl());      
							var marker = new GMarker(point);
							map.addOverlay(marker);
							}
						}
										);
		}
	}


function open_image(image)
	{
	var h = window.outerHeight;
	var w = window.outerWidth;
	h=(h/2)-240;
	w=(w/2)-320;
	window.open('image.php?image='+image,'_blank','toolbar=no, location=no, directories=no, channelmode=yes, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=yes, width=640, height=480, left='+w+', top='+h);
	}




function fk()
	{
	document.getElementById('small_details').style.display='none';
	document.getElementById('big_details').style.display='block';
	}

function fk1()
	{
	document.getElementById('small_details').style.display='block';
	document.getElementById('big_details').style.display='none';
	
	}

