	function createMarker(point, html, icon) {
		var marker = new GMarker(point, icon);
		GEvent.addListener(marker, "click", function() {
				marker.openInfoWindowHtml(html);
			});
	    return marker;
	}
	function createStandardIcon()
	{
		var icon = new GIcon();
		icon.image = "/static/maps/wow/img/mm_20_orange.png";
		icon.shadow = "/static/maps/wow/img/mm_20_shadow.png";
		icon.iconSize = new GSize(12, 20);
		icon.shadowSize = new GSize(22, 20);
		icon.iconAnchor = new GPoint(6, 20);
		icon.infoWindowAnchor = new GPoint(5, 1);			
		return icon;
	}
    function plotLocations(locs, centerLat, centerLng, zoom, mapType)
    {
		  if (GBrowserIsCompatible()) {

				// Create our "tiny" i.e standard marker icon
				var icon = createStandardIcon();
			
				//Create the map and center it on our first location of our array
				var map = new GMap2(document.getElementById('map'));
				
				map.addControl(new GLargeMapControl());
				map.addControl(new GMapTypeControl());
				
				//center the map
				var center = new GLatLng(centerLat, centerLng);
				map.setCenter(center, zoom);
				
				//Set the type (note must be done after the map is initialised)
				map.setMapType(mapType);
				
				//Plot each point
				for (var i=0; i<locs.length; i++) {
					var point = new GLatLng(locs[i].lat, locs[i].lng);				
					var marker = createMarker(point, locs[i].desc, icon);
					map.addOverlay(marker);					
				}
			}
    }