function mapload(locations)
{
	//Loads Google Map with Markers.
		
	var map = new google.maps.Map(document.getElementById('map'), 
	{
  		zoom: 14,  //9
  		center: new google.maps.LatLng(43.026819, -76.178374),
  	//	center: new google.maps.LatLng(0, 0),
  		mapTypeId: google.maps.MapTypeId.ROADMAP
	}
	);
	var iconmapH = new google.maps.MarkerImage( base_url + "images/mapicons/chart.png");
	var iconmapL = new google.maps.MarkerImage( base_url + "images/mapicons/LodgeLogo2.png");

	var infowindow = new google.maps.InfoWindow();
	var bounds = new google.maps.LatLngBounds();
	var marker, i, extendlat, extendlng, place, iconmap;
	for (i = 0; i < locations.length; i++) 
	{
		extendlat = locations[i][1];
		extendlng = locations[i][2];
		place = locations[i][0];
		markerpoints = new google.maps.LatLng(locations[i][1], locations[i][2]);
		bounds.extend(markerpoints);
		
		if (place == "My Approximate Location")
		{
			// Use Home Marker Image
			iconmap = iconmapH;
		}
		else
		{
			// Use Square and Compass Image
			iconmap = iconmapL;
		}
		
		marker = new google.maps.Marker(
			{
				position: markerpoints,
    			map: map,
				title: place,
				icon:  iconmap				
  			});
if (place != "My Approximate Location")
	{
  	google.maps.event.addListener(marker, 'click', (function(marker, i) 
	{
    	return function() 
		{
      		var lodge_window = "<b><font size=\"2\" color=\"black\">" + locations[i][0] + "</font></b><br><font color=\"black\">" + locations[i][4] + ", " + locations[i][5] + ", " + locations[i][6] + "</font><br> <a href=\"" + base_url + "lodges/lodge_page/" + locations[i][7] + "\">Lodge Page</a>" ;

			infowindow.setContent(lodge_window);
      		infowindow.open(map, marker);
    	}
  	})
	(marker, i));
}
	}
	map.setCenter(bounds.getCenter());
	map.fitBounds(bounds);
}
