var onTour = {
	map: null,
	markerOptions: null,

	load: function() {
		var mapElem = $("map");
		if(GBrowserIsCompatible() && mapElem)
		{
			mapElem.show();
	    this.map = new GMap2(mapElem);
	    this.map.setCenter(new GLatLng(54.00366, -2.547855), 6);

	    //this.map.enableScrollWheelZoom();
	    this.map.addControl(new GLargeMapControl());

	    var lcIcon = new GIcon(G_DEFAULT_ICON);
	    lcIcon.image = "http://littlechef.irisclients.co.uk/bringback/images/icon-littlechef.png";
	    this.markerOptions = { icon: lcIcon };

	    // populate
	    if(locationMarkers.length > 0)
	    {
	    	for(var i = 0; i < locationMarkers.length; i++)
	    	{
	    		var marker = new GMarker(new GLatLng(locationMarkers[i][0], locationMarkers[i][1]), this.markerOptions);
	    		marker.bindInfoWindowHtml(locationMarkers[i][2]);
	    		this.map.addOverlay(marker);
	    	}
	    }
	  }
	},

	unload: function() {
		GUnload();
	}
};

Event.observe(window, 'load', onTour.load);
Event.observe(window, 'unload', onTour.unload);

