var map = null;
var geocoder = null;

function loadMap(address,size) {
	if (GBrowserIsCompatible()) {
		map = new GMap2(document.getElementById("map"));
		map.addControl(new GLargeMapControl());
		map.addControl(new GOverviewMapControl());
		map.addControl(new GMapTypeControl());
		map.setCenter(new GLatLng(39.31, 137.31), 5);
		geocoder = new GClientGeocoder();
		showAddress(address,size);
	}
}

function showAddress(address,size) {
	if (geocoder) {
		geocoder.getLatLng(
			address,
			function(point) {
				if (!point) {
					alert(shop +
						" \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002");
				} else {
					map.setCenter(point, size);
					var marker = new GMarker(point);
					map.addOverlay(marker);
				}
			}
		);
	}
}
