/*function popupSearchBox(HotelCode)
{
	newWindow = window.open('{HOTELCHECKAVAILABILTYURL}?popup=Y&fn=hotel&HotelCode=' + HotelCode + '&pid={pid}',
		'newWin','width=360,height=390,resizable=yes,toolbar=no,location=no,scrollbars=yes');
}

function openReviewCustomer(hotelcode)
{
	newWindow = window.open('{CUSTOMERREVIEWURL}?function_id=VCR01&sub_fn=hotelinfo&HotelCode=' + hotelcode + '&pid={pid}',
		'newWin','width=800,height=650,resizable=yes,toolbar=no,location=no,scrollbars=yes');
}*/

function gotoID(idname)
{
	if(document.getElementById(idname))
	{
		var obj=document.getElementById(idname);
		var PosY=0;
		if(obj.offsetParent)
		{
			while(obj.offsetParent)
			{
				PosY+=obj.offsetTop;
				obj=obj.offsetParent;
			}
		}
		else{
			if(obj.y)
			{
				PosY+=obj.y;
			}
		}
		window.scrollTo(0,PosY);
	}
}

function zzz(a,b) { 
  return a.Zindex; 
} 

function createMarker(point, item, item_name ,title, popuphtml, zindex) {
	if (zindex > 0) {
		var marker = new GMarker(point, {icon:item_name,title:title,zIndexProcess:zzz});
		marker.Zindex = zindex;
	}
	else {
		var marker = new GMarker(point, {icon:item_name,title:title});
	}
	
	GEvent.addListener(marker, "click", function() {
		marker.openInfoWindowHtml(popuphtml);
	});
	markersArray[item] = marker;
	map.addOverlay(marker);
}

function focusOnMap(markerId) {
	//map.zoomTo(5);
	GEvent.trigger(markersArray[markerId], 'click');
}