function initMap (divName) {
	// initialize Google map within divName
	if (GBrowserIsCompatible()) {
		var map = new GMap2(document.getElementById(divName));
                // This for panning and zooming.
		// map.addControl(new GSmallMapControl());
		// This is for zooming only
		map.addControl(new GSmallZoomControl());
	}
	return map;
}

//function exitMap () {
//	GUnload();
//}

function setMarkerWithGeocode (map, lat, lng, info) {
	// create a point obj with the latitude and longitude
	var point = new GLatLng(lat, lng);
	map.setCenter(point, 13);
	createMarker(point);
}

function setMarkerWithAddr (map, addr, info) {
	// use GClientGeocoder object from Google to fetch geocode
	var geocoder = new GClientGeocoder();
	geocoder.getLatLng(
		addr,
		function(point) {
			if (!point) {
				alert(address + " not found");
			} else {
				map.setCenter(point, 13);
				createMarker(point);
			}
		}
	);			

}

function createMarker (point, info) {
	var marker = new GMarker(point);

	// onClick, do you go to Google map or do you go to the restaurant page?
//	GEvent.addListener(marker, "click", function() {
//	});
	// onMouseover, show info as HTML
//	GEvent.addListener(marker, "mouseover", function() {
//		marker.openInfoWindowHtml(info);
//	});
	// onMouseout, close the info window
//	GEvent.addListener(marker, "mouseout", function() {
//		map.closeInfoWindow();
//	});
	map.addOverlay(marker);
}
