function load(waypoint,lat,lon) {
	if (GBrowserIsCompatible()) {
		function createMarker(point,icon,html) {
			var marker = new GMarker(point,icon);
			GEvent.addListener(marker, "click", function() {
				marker.openInfoWindowHtml(html);
			});
			return marker;
		}

		// Icons
		var baseIcon = new GIcon();
		baseIcon.iconSize=new GSize(32,32);
		baseIcon.shadowSize=new GSize(56,32);
		baseIcon.iconAnchor=new GPoint(16,16);
		baseIcon.infoWindowAnchor=new GPoint(16,0);

		var icon = new Array();
		icon['A'] = new GIcon(baseIcon, "http://maps.google.com/mapfiles/kml/pal2/icon48.png", null, "http://maps.google.com/mapfiles/kml/pal2/icon48s.png");
		icon['H'] = new GIcon(baseIcon, "http://maps.google.com/mapfiles/kml/pal5/icon55.png", null, "http://maps.google.com/mapfiles/kml/pal5/icon55s.png");
		icon['L'] = new GIcon(baseIcon, "http://maps.google.com/mapfiles/kml/pal2/icon20.png", null, "http://maps.google.com/mapfiles/kml/pal2/icon20s.png");
		icon['M'] = new GIcon(baseIcon, "http://maps.google.com/mapfiles/kml/pal2/icon2.png",  null, "http://maps.google.com/mapfiles/kml/pal2/icon2s.png");
		icon['P'] = new GIcon(baseIcon, "http://maps.google.com/mapfiles/kml/pal4/icon38.png", null, "http://maps.google.com/mapfiles/kml/pal4/icon38s.png");
		icon['R'] = new GIcon(baseIcon, "http://maps.google.com/mapfiles/kml/pal2/icon32.png", null, "http://maps.google.com/mapfiles/kml/pal2/icon32s.png");
		icon['S'] = new GIcon(baseIcon, "http://maps.google.com/mapfiles/kml/pal2/icon49.png", null, "http://maps.google.com/mapfiles/kml/pal2/icon49s.png");
		icon['V'] = new GIcon(baseIcon, "http://maps.google.com/mapfiles/kml/pal4/icon24.png", null, "http://maps.google.com/mapfiles/kml/pal4/icon24s.png");

		// Map
		var map = new GMap2(document.getElementById("map"));
		map.setCenter(new GLatLng(lat, lon), 14);
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
		map.setMapType(G_SATELLITE_MAP);

		GDownloadUrl("/waypoint/" + waypoint + ".xml", function(data, responseCode) {
			if (responseCode == 200) {
				var xml = GXml.parse(data);
				var markers = xml.documentElement.getElementsByTagName("marker");
				for (var i=0; i<markers.length; i++) {
					var point = new GLatLng(parseFloat(markers[i].getAttribute("lat")),
					parseFloat(markers[i].getAttribute("lng")));
					var marker = createMarker(point,
																		icon[markers[i].getAttribute("type")], 
																		"<p align='left'><b>" + markers[i].getAttribute("name") + "</b></p>" +
																		"<p align='left'>" + markers[i].getAttribute("summary") + "</p>");
					map.addOverlay(marker);
				}
			} else if(responseCode == -1) {
				alert("Data request timed out. Please try later.");
			} else { 
				alert("Request resulted in error. Check XML file is retrievable.");
			}
		});
	}
}
