// home.js


window.addEvent('load', function() {
	
	// load the map
	loadMap();
	
});

window.addEvent('unload', GUnload);


// load the map
function loadMap() {
	if (GBrowserIsCompatible()) {
		var map = new GMap2(document.getElementById('map'));
		map.addControl(new GSmallMapControl());
		map.setCenter(new GLatLng(32.503826,-87.835007), 14);
		var marker = new GMarker(new GLatLng(32.498859,-87.844834), {
			title: 'More info...'
		});
		var info = '<strong>Fairhaven Baptist Church</strong><br />1504 Cardinal Street<br />Demopolis, AL 36732';
		marker.bindInfoWindowHtml(info);
		map.addOverlay(marker);
		marker.openInfoWindowHtml(info);
	}
	
	// re-apply search behaviors, since gmap probably messed them up
	makeSearch();
}
