// Init
// ----------------------------------------

// Minneapolis:
// http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=minneapolis+mn&sll=44.955132,-93.291858&sspn=0.008488,0.022745&g=2611+Colfax+Ave+S,+Minneapolis,+MN+55408&ie=UTF8&z=11&iwloc=addr
// map.setCenter(new GLatLng(44.955132, -93.291858), 13);


var map = null;
var geocoder = null;

$(document).ready(function(){

	if (GBrowserIsCompatible()) {
		map = new GMap2(document.getElementById("map"));
		map.setCenter(new GLatLng(44.955132, -93.291858), 14);
		geocoder = new GClientGeocoder();
	}

});

function showAddress(address) {
	if (geocoder) {
		geocoder.getLatLng(
			address,
			function(point) {
				if (!point) {
					//alert(address + " not found");
				} else {
					map.checkResize();
					map.setCenter(point, 14);
					var marker = new GMarker(point);
					map.addOverlay(marker);
					marker.openInfoWindowHtml(address);
				}
			}
		);
	}
}
