//<![CDATA[
map = new GMap2(document.getElementById("googlemap"),{
	draggableCursor: 'hand',draggingCursor: 'pointer'
});
map.setCenter(new GLatLng(34.79128571574064, 135.5512261390686), 16);
map.addControl(new GMapKitMapControls3d());
map.addControl(new GMenuMapTypeControl(true));
map.addControl(new GScaleControl());
map.addControl(new GOverviewMapControl(new GSize(200,200)));
var imageUrl = "../image/ehou.gif";
var screenXY = new GScreenPoint(338, 304);
var overlayXY = new GScreenPoint(160, 160);
var sz = new GScreenSize(321, 321);
var overlay = new GScreenOverlay(imageUrl, screenXY, overlayXY, sz);
map.addOverlay(overlay);
map.enableContinuousZoom();
new GKeyboardHandler(map);
GEvent.addListener(map,"mousemove",move);
window.onload = function() {
	GEvent.addListener(map, "click", function(marker, latlng){
		geocoder = new GClientGeocoder();
	} );
}
var geocoder = null;
function showAddress(address) {
	if (geocoder) {
		geocoder.getLatLng(
			address,
			function(point) {
				if (!point) {
					alert(address + " Not Found");
				} else {
					map.setCenter(point, 16);
					var marker = new GMarker(point);
					map.addOverlay(marker);
				}
			}
		);
	}
}
var line_color = "#FF0000";
function shortForm10000(x) {
	return Math.floor(x*10000)/10000;
}
function shortForm1000(x) {
	return Math.floor(x*1000)/1000;
}
function shortForm100(x) {
	return Math.floor(x*100)/100;
}
function shortForm10(x) {
	return Math.floor(x*10)/10;
}
function move(latlng) {
	var p = document.getElementById("postext");
	innerHTML = "" + shortForm10000(latlng.lat()) + " , " + shortForm10000(latlng.lng()) ;
}
//]]>
