//<![CDATA[
var map = null;
var geocoder = null;
var myAddress = "2334 CR-524 Sumterville, FL 33585";
var myInfo = "<span style=\"font-size: 10px; line-height: 12px;\"><b style=\"color: #c00;\">Scott Mann Custom Homes, Inc.</b><br />2334 CR-524 P.O. Box 136<br />Sumterville, FL 33585<br /><a href='http://maps.google.com/maps?saddr=&daddr="+myAddress+"' title='Get Directions' target='_blank'>Get Directions &raquo;</a></span>";

function load() {
	if (GBrowserIsCompatible()) {
		map = new GMap2(document.getElementById("map"));
		map.addControl(new GSmallMapControl());
		//map.addControl(new GLargeMapControl());
		//map.addControl(new GMapTypeControl());
		geocoder = new GClientGeocoder();
		showAddress(myAddress,myInfo);
	}
}
function showAddress(address,infoContent) {
	if (geocoder) {
		geocoder.getLatLng(
			address,
			function(point) {
				if (!point) {
					//alert(address + " not found");
				} else {
					map.setCenter(point, 14);
					var marker = new GMarker(point);
					map.addOverlay(marker);
					//marker.openInfoWindowHtml(infoContent);
					GEvent.addListener(marker, "click", function() {
						marker.openInfoWindowHtml(infoContent);
					});
					return marker;
				}
			}
		);
	}
}
//]]>
