var map = null;
var geocoder = null;

function load() {
  if (GBrowserIsCompatible()) {
	geocoder = new GClientGeocoder();
	
	function showAddress(address) {
	  if (geocoder) {
		geocoder.getLatLng(
		  address,
		  function(point) {
			if (!point) {
			  document.getElementById("map").style.display="none";
			} else {
				map = new GMap2(document.getElementById("map"));
				map.setCenter(new GLatLng(40.286925,-84.155166), 15);
				map.addControl(new GSmallMapControl());
				map.addControl(new GMapTypeControl());
				map.addMapType(G_PHYSICAL_MAP);
			
			  map.setCenter(point, 15);
			
			  var marker = new GMarker(point);

				var infoTabs = [
				  new GInfoWindowTab('Address','<strong>Kerrigan, Boller, Beigel & Schneble Co., L.P.A. </strong><br />126 N. Main Ave.,<br />Sidney, Ohio 45365'),                                                       
				  new GInfoWindowTab('Directions', '<strong>Enter your address:</strong><br /><form action="http://maps.google.com/maps" method="get" target="_blank"><input type="text" size="40" maxlength="60" name="saddr" id="saddr" value="" /><br /><input class="button" value="Get Directions" type="submit" /><input type="hidden" name="daddr" value="126 N. Main Ave. +Sidney+45365+OH" /></form>')]; 												
													  
			  GEvent.addListener(marker, 'click', function() {
				  marker.openInfoWindowTabsHtml(infoTabs);
				});

			  map.addOverlay(marker);
			  marker.openInfoWindowTabsHtml(infoTabs);
			}
		  }
		);
	  }
	}
	showAddress("126 N. Main Ave., Sidney, Ohio 45365");  
  }
}
