function getWindowHeight(){if(window.self&&self.innerHeight)return self.innerHeight;if(document.documentElement&&document.documentElement.clientHeight)return document.documentElement.clientHeight;return 0}function getArgs(){for(var a={},b=location.search.substring(1).split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("=");if(d!=-1){var e=b[c].substring(0,d);d=b[c].substring(d+1);a[e]=decodeURIComponent(d)}}return a}
function mapresize(){var a=document.documentElement.clientWidth-330,b=getWindowHeight()-130;map.Resize(a,b)}function showinfo(a,b){var c,d=map.GetCenter();map.DeleteAllShapes();c=new VEShape(VEShapeType.Pushpin,d);c.SetTitle(a);c.SetDescription(b);map.AddShape(c);map.HideInfoBox();map.ShowInfoBox(c,d)}function makeurl(a){return a+"?x="+Math.round(tx*1E5)/1E5+"&y="+Math.round(ty*1E5)/1E5+"&zoom="+map.GetZoomLevel()}
function getmapurl(){var a=makeurl("http://ve.earthol.com/"),b=encodeURIComponent("Google Earth Online"),c=encodeURIComponent(a);showinfo("\u83b7\u53d6\u5f53\u524d\u5730\u56fe\u76f4\u63a5\u8bbf\u95ee\u7f51\u5740",'<div style="width:333px; word-break:break-all;"><strong>\u6b64\u4f4d\u7f6e\u7684\u76f4\u63a5\u8bbf\u95ee\u7f51\u5740\uff1a<br /><a href="'+a+'">'+a+'</a><br /><br />\u4e0a\u9762\u7684\u94fe\u63a5\u53ef\u4ee5\u76f4\u8fbe\u5f53\u524d\u5730\u56fe\u6240\u793a\u7684\u4f4d\u7f6e\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u5b83\u8f7b\u677e\u4e0e\u670b\u53cb\u5206\u4eab\u8fd9\u4e2a\u5730\u56fe\u3002<br /><br />\u5206\u4eab\u5230\uff1a<a href="'+
("http://www.jiathis.com/send/?webid=tsina&url="+c+"&title="+b+"&uid=97625")+'" target="_blank"><img src="http://img.earthol.net/1/tsina.jpg" alt="\u65b0\u6d6a\u5fae\u535a" border="0" /></a> <a href="'+("http://www.jiathis.com/send/?webid=qzone&url="+c+"&title="+b+"&uid=97625")+'" target="_blank"><img src="http://img.earthol.net/1/qzone.jpg" alt="QQ\u7a7a\u95f4" border="0" /></a> <a href="'+("http://www.jiathis.com/send/?webid=renren&url="+c+"&title="+b+"&uid=97625")+'" target="_blank"><img src="http://img.earthol.net/1/renren.jpg" alt="\u6821\u5185\u4eba\u4eba\u7f51" border="0" /></a> <a href="'+
("http://www.jiathis.com/send/?webid=kaixin001&url="+c+"&title="+b+"&uid=97625")+'" target="_blank"><img src="http://img.earthol.net/1/kaixin.gif" alt="\u5f00\u5fc3\u7f51" border="0" /></a> <a href="'+("http://www.jiathis.com/send/?webid=douban&url="+c+"&title="+b+"&uid=97625")+'" target="_blank"><img src="http://img.earthol.net/1/douban.gif" alt="\u8c46\u74e3\u7f51" border="0" /></a> <a href="'+("http://www.jiathis.com/send/?webid=baidu&url="+c+"&title="+b+"&uid=97625")+'" target="_blank"><img src="http://img.earthol.net/1/baidu.gif" alt="\u767e\u5ea6\u6536\u85cf" border="0" /></a> <a href="'+
("http://www.jiathis.com/send/?webid=qq&url="+c+"&title="+b+"&uid=97625")+'" target="_blank"><img src="http://img.earthol.net/1/tqq.jpg" alt="QQ\u4e66\u7b7e" border="0" /></a></strong></div>')}function gotoxy(){var a=document.xyform.x.value,b=document.xyform.y.value,c="\u7ecf\u5ea6\uff1a"+a+"<br /><br />\u7eac\u5ea6\uff1a"+b;map.PanToLatLong(new VELatLong(b,a));showinfo("\u5f53\u524d\u7ecf\u7eac\u5ea6",c);return false}function gotoge(){var a=makeurl("http://map.earthol.com/");top.location=a}
function gotosmap(){var a=map.GetMapStyle(),b=document.getElementById("swbtn");if(a==VEMapStyle.Hybrid){map.SetMapStyle(VEMapStyle.Aerial);if(b)b.innerHTML="\u663e\u793a\u82f1\u6587\u6807\u6ce8"}else if(a==VEMapStyle.Aerial){map.SetMapStyle(VEMapStyle.Hybrid);if(b)b.innerHTML="\u9690\u85cf\u82f1\u6587\u6807\u6ce8"}else if(a==VEMapStyle.BirdseyeHybrid){map.SetMapStyle(VEMapStyle.Birdseye);if(b)b.innerHTML="\u663e\u793a\u82f1\u6587\u6807\u6ce8"}else if(a==VEMapStyle.Birdseye){map.SetMapStyle(VEMapStyle.BirdseyeHybrid);
if(b)b.innerHTML="\u9690\u85cf\u82f1\u6587\u6807\u6ce8"}}function gotobirdeye(){var a=map.GetMapStyle();a==VEMapStyle.Birdseye||a==VEMapStyle.BirdseyeHybrid?map.SetMapStyle(VEMapStyle.Hybrid):map.SetMapStyle(VEMapStyle.Birdseye)}function showxy(){var a=map.GetCenter();tx=a.Longitude;ty=a.Latitude;a="\u7ecf\u5ea6:"+tx+"<br />\u7eac\u5ea6:"+ty+"<br />";document.getElementById("xy").innerHTML=a}window.onresize=function(){mapresize()};if(top.location!=self.location)top.location=self.location;
var map=null,tx,ty,ux,uy,uzoom,args=getArgs();if(args.x&&args.y&&args.zoom){ux=parseFloat(args.x);uy=parseFloat(args.y);uzoom=parseInt(args.zoom)}else{ux=105.46875;uy=32.1011897;uzoom=4}function GetMap(){map=new VEMap("map");map.LoadMap(new VELatLong(uy,ux),uzoom,"h",false);mapresize();map.AttachEvent("onchangeview",showxy)};
