/**
 *
 * Functions dealing with the google maps addition to the page
 *
 */

// This function creates the map
function load(map, lat, lng) {
	// Create new map object
	map = new GMap2(document.getElementById("map"));
	
	// Add the zoom control to the map
	map.addControl(new GSmallMapControl());

	// Center map and add markers
	addToMap(map, lat, lng);
}

// This function adds the point to the map
function addToMap(map, lat, lng) {
	// Retrieve the latitude and longitude
	point = new GLatLng(lat, lng);
	
	// Center the map on this point
	map.setCenter(point, 13);

	// Create a marker
	marker = new GMarker(point);

	// Add the marker to map
	map.addOverlay(marker);
}
