// JavaScript Document

var map = null;
var geocoder = null;

    // 初期化
    // <body onload="load()"> で呼び出されています
function load() {
  if (GBrowserIsCompatible()) {
	map = new GMap2(document.getElementById("map"));
	map.addControl(new GSmallMapControl());
	map.addControl(new GMapTypeControl());

	// GClientGeocoderを初期化
	geocoder = new GClientGeocoder();
	
	  if (geocoder) {
		geocoder.getLatLng(
		  window.document.fm_add.address.value,
		  function(point) {
			if (!point) {
			  alert(address + " not found");
			} else {
			  map.setCenter(point, 13);
			  var marker = new GMarker(point);
			  map.addOverlay(marker);
			  marker.openInfoWindowHtml(address);
			}
		  }
		);
	  }
	
	
  }
}