
var map = null;
var geocoder = null;

function onLoad( )
{
	if( GBrowserIsCompatible( ) )
	{
		var div = document.getElementById( "map" );

		if( div )
		{
			geocoder = new GClientGeocoder( );

			map = new GMap2( div, { mapTypes : [ G_HYBRID_MAP ] } );
			map = new GMap2( div, { mapTypes : [ G_NORMAL_MAP ] } );
			/*map.enableScrollWheelZoom( );*/
			map.enableContinuousZoom( );

			showAddress( div.getAttribute( "title" ) );
		}
	}
}

function showPoint( point )
{
	if( map && point )
	{
		map.setCenter( point, 15 );
	}
}

function showAddress( address )
{
	if( geocoder )
	{
		geocoder.getLatLng( address, showPoint );
	}
}
