function loadMap(buf, map) {
  if (GBrowserIsCompatible()) {
    buf = new GMap2(document.getElementById(map));
    buf.addControl(new GSmallMapControl());
	buf.addControl(new GMapTypeControl());
	
	
	try {
	    var hotelll = new GLatLng(lat, lon)
	    buf.setCenter(hotelll, 13);
	    buf.addOverlay(new GMarker(hotelll))
	}catch(e){
	    //alert(e)
	    buf.setCenter(new GLatLng(-22.9583, 27.9320), 4)
	}
	return buf
	
  }
}

$(function(){
    try {
        var map = loadMap(new Object(), 'map');
        map.checkResize();
    }catch(e){}
    
})
