// JavaScript Document
var map = null;
var geocoder = null;

function load( address )
{
	if( GBrowserIsCompatible() )
	{
		map = new GMap2( document.getElementById( "map" ) );
		// GClientGeocoderを初期化
		geocoder = new GClientGeocoder();
	}
	
	if( geocoder )
	{
		geocoder.getLatLng(
			address,
			function( point )
			{
				if( !point )
				{
					$( "#map" ).css( "display", "none" );
				}
				else
				{
					map.setCenter( point, 14 );
					map.addControl(new GSmallMapControl());
					var marker= new GMarker( point );
					map.addOverlay( marker );
				}
			}
		);
	}
}


