var centerLatitude = 49.386993;
var centerLongitude = -121.43446;
var description = '<p class="bluemoose-info"><img class="bluemoose" src="/gfx/bluemoose-logo-small.gif" alt="Blue Moose coffee house"><br />Blue Moose coffee house<br />322 Wallace Hope, BC V0X</p>';

var bluemooseLatitude = 49.379691;
var bluemooseLongitude = -121.441165;

var startZoom = 13;

var map;

function addMarker(latitude,longitude,description)
{
	var marker = new GMarker( new GLatLng(latitude,longitude) );

	GEvent.addListener( marker, 'click',
		function() {
			marker.openInfoWindowHtml( description );
		}
	);

	map.addOverlay( marker );


marker.openInfoWindowHtml( description );
}


function init()
{
	if (GBrowserIsCompatible()) {
		map = new GMap2(document.getElementById("map"));
		map.addControl( new GSmallMapControl() );
		var location = new GLatLng(centerLatitude , centerLongitude);
		map.setCenter( location , startZoom );

		addMarker( bluemooseLatitude , bluemooseLongitude, description );

	}
}

window.onload = init;
window.onunload = GUnload;
