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.297318,-84.18584), 16);

				map.addControl(new GSmallMapControl());

				map.addControl(new GMapTypeControl());

				map.addMapType(G_PHYSICAL_MAP);

			

			  map.setCenter(point, 16);

			

			  var marker = new GMarker(point);



				var infoTabs = [

				  new GInfoWindowTab('Address','<strong>Shelby County Counseling Center</strong><br />1101 North Vandemark Road<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="1101 North Vandemark Road +MSidney+45365+OH" /></form>')]; 												

													  

			  GEvent.addListener(marker, 'click', function() {

				  marker.openInfoWindowTabsHtml(infoTabs);

				});



			  map.addOverlay(marker);

			  marker.openInfoWindowTabsHtml(infoTabs);

			}

		  }

		);

	  }

	}

	showAddress("1101 North Vandemark Road, Sidney, Ohio 45365");  

  }

}
