var map;

function initMap() {
	if (GBrowserIsCompatible() && hotelLatitude && hotelLongitude) {
		map = new GMap2($("smallMap"));
		map.addControl(new GSmallMapControl());
		map.addControl(new GMapTypeControl());

		var point = new GLatLng(hotelLatitude, hotelLongitude);
		map.setCenter(point, 13);
		var marker = new GMarker(point);
		map.addOverlay(marker);
	}
	else {
		$("mapSectionDiv").style.display='none';
		$("mapButton").src='/siteimages/map_disabled.jpg';
	}
}

function showFullMap() {
	$('smallMap').style.height = '400px';
	initMap();
	mapHidden = false;
}

function hideFullMap() {
	$('smallMap').style.height = '123px';
	initMap();
	mapHidden=true;
	//$("largeMap").style.display = 'none';
}

function toggleMap() {
	if(mapHidden) {
		showFullMap();
	}
	else {
		hideFullMap();
	}
}

function reCenterMap() {
	var point = new GLatLng(hotelLatitude, hotelLongitude);
	map.setCenter(point);
}