function makeurl(host)
{
	var mx=Math.round(tx*100000)/100000;
	var my=Math.round(ty*100000)/100000;
	var url=host+"?x="+mx+"&y="+my+"&zoom="+map.getZoom();
	return url;
}
function getmapurl()
{
	var purl=makeurl("http://www.cemsg.com/map/index.php");
	var outinfo="<div style=\"width:200px; word-break:break-all;\"><strong>此位置的直接访问网址：<br /><a href=\""+purl+"\">"+purl+"</a></strong><br /></div><br />";
	map.openInfoWindowHtml(map.getCenter(),outinfo);
	window.clipboardData.setData("Text",purl);
	alert("当前位置链接已经复制到剪贴板。");
}
function gotoemap()
{
	if (tx>65 && tx<135 && ty>15 && ty<53)
	{
		var target=makeurl("http://china.earthol.com/index.php");
		top.location=target;
	}
	else
	{
		var maptype = map.getCurrentMapType();
		if (maptype.getName()=="Hybrid") map.setMapType(G_SATELLITE_MAP);
		else map.setMapType(G_HYBRID_MAP);
	}
}
function addfav()
{
	var purl=makeurl("http://www.cemsg.com/map/index.php");
	window.external.AddFavorite(purl, "我收藏的卫星地图");
}
function gotowide()
{
	var target=makeurl("http://wide.earthol.com/index.php");
	top.location=target;
}
function flyto(x,y,strinfo)
{
	map.panTo(new GLatLng(y, x));
	map.openInfoWindow(map.getCenter(),document.createTextNode(strinfo));
}
if (top.location != self.location) top.location=self.location;