var A=6378137,Z=A*2*Math.PI,b=Z*0.5,V=256,K=1,F=17,J=10,X=16,N=false,Y="en",S=3,L=[new VCRegion("zh",new VCLatLongRectangle(new VCLatLong(55,72),new VCLatLong(19,133)))],B="http://www.lehu.shu.edu.cn/",W="http://map.lehu.shu.edu.cn/Images/logo.jpg",T="http://map.lehu.shu.edu.cn/tiles.aspx?style={3}&name={4}&type={5}&g={6}&lang={10}".replace("{5}","jpg").replace("{6}","22"),C="http://map.lehu.shu.edu.cn/find.ashx?mapid={0}&what={1}&startIndex={2}&numberOfResults={3}&createResults={4}&t={5}",e="http://map.lehu.shu.edu.cn/Images/grab.cur",U="http://map.lehu.shu.edu.cn/Images/grabbing.cur",panel="http://map.lehu.shu.edu.cn/Images/panel.png",R="http://map.lehu.shu.edu.cn/Images/Aerial.png",O="http://map.lehu.shu.edu.cn/Images/Road.png",I="http://map.lehu.shu.edu.cn/Images/Pushpin.gif",d="\u5207\u6362\u4e3a\u536b\u661f\u56fe",E="\u4e50\u4e4e\u793e\u533a",D="\u5207\u6362\u4e3a\u9053\u8def\u56fe",P=navigator.userAgent.indexOf("MSIE")>0,f=navigator.userAgent.indexOf("Firefox")>0,c=-1,_=P?1:0,a=P?4:1,Q=2,_vCageMaps=new Array();Math.DegToRad=function(panel){return panel*Math.PI/180};Math.RadToDeg=function(panel){return panel*180/Math.PI};function fixPNG(panel){var A=parseFloat(navigator.appVersion.split("MSIE")[1]);if((A>=5.5)&&(A<7)&&(document.body.filters)){var _=document.createElement("div");for(var B=0;B<panel.attributes.length;B++)if(panel.attributes[B].value!=""&&panel.attributes[B].value!=null&&panel.attributes[B].value!="null")_.setAttribute(panel.attributes[B].name,panel.attributes[B].value);_.style.cssText=panel.style.cssText;_.style.display="inline-block";_.style.width=panel.clientWidth+"px";_.style.height=panel.clientHeight+"px";_.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+panel.src+"', sizingMethod='scale')";_.title=panel.alt;_.disabled=false;_.onclick=panel.onclick;panel.parentNode.appendChild(_);panel.parentNode.removeChild(panel)}}function M(_,A){var panel=0;if(_.X<A.P1.X)panel=panel|1;else if(_.X>A.P2.X)panel=panel|2;if(_.Y>A.P2.Y)panel=panel|4;else if(_.Y<A.P1.Y)panel=panel|8;return panel}function H(C,E){var D=new VCPixelRectangle(C.P1,C.P2),B,A,panel;B=M(D.P1,E);A=M(D.P2,E);var _=new VCPixel();while(B!=0||A!=0){if((B&A)!=0){D.P1.X=0;D.P1.Y=0;D.P2.X=0;D.P2.Y=0;break}panel=B;if(B==0)panel=A;if((panel&1)!=0){_.X=E.P1.X;_.Y=D.P1.Y+(D.P2.Y-D.P1.Y)*(E.P1.X-D.P1.X)/(D.P2.X-D.P1.X)}else if((panel&2)!=0){_.X=E.P2.X;_.Y=D.P1.Y+(D.P2.Y-D.P1.Y)*(E.P2.X-D.P1.X)/(D.P2.X-D.P1.X)}else if((panel&4)!=0){_.Y=E.P2.Y;_.X=D.P1.X+(D.P2.X-D.P1.X)*(E.P2.Y-D.P1.Y)/(D.P2.Y-D.P1.Y)}else if((panel&8)!=0){_.Y=E.P1.Y;_.X=D.P1.X+(D.P2.X-D.P1.X)*(E.P1.Y-D.P1.Y)/(D.P2.Y-D.P1.Y)}if(panel==B){D.P1.X=_.X;D.P1.Y=_.Y;B=M(_,E)}else{D.P2.X=_.X;D.P2.Y=_.Y;A=M(_,E)}}return D}function vCageMap(v){var k=this,n=null,M=null,u=new Array(),N=null,p=new VCDashboard(this),z=new VCMapLayer(),q=null,R=new Array(),_0=new Array(),t=new Array(),h=new VCMenu(),I0=0,i=1,J0=false,N0=K,f=null,M0=VCMapStyle.Road,I=Y,y=Y,D0=true,r=new Array(),B0=new Array(),panel=c,s=new VCPixel(),O=new VCLatLongRectangle(),A=null,B=new Array();this.id="vCageMap"+Math.round(Math.random()*10000);function A0(C){var B=C.clientX-N.offsetLeft-(P?2:0),D=C.clientY-N.offsetTop-(P?2:0);if(q==null){var F=panel0(C,k);for(var G=0;G<u.length;G++)if(u[G].eventname=="onmousedown")if(u[G].func(F))return;if(!J0)switch(C.button){case _:s.X=B;s.Y=D;panel=_;N.style.cursor="url("+U+"), auto";break;case a:var E=new VCPixel(B-k.GetWidth()/2+f.X,D-k.GetHeight()/2+f.Y);O.TopLeftLatLong=VCLatLong.FromPixel(E,N0);O.BottomRightLatLong=VCLatLong.FromPixel(E,N0);panel=a;N.style.cursor="crosshair";A=new VCShape(VCShapeType.Polygon,[O.TopLeftLatLong,O.TopLeftLatLong,O.TopLeftLatLong,O.TopLeftLatLong]);k.AddShape(A);A.HideIcon();break}}else{F=panel0(C,q);q=null;for(G=0;G<u.length;G++)if(u[G].eventname=="onshapemousedown")if(u[G].func(F))return}}function F0(C){var B=C.clientX-N.offsetLeft-(P?2:0),D=C.clientY-N.offsetTop-(P?2:0);if(q==null){var E=panel0(C,k);for(var F=0;F<u.length;F++)if(u[F].eventname=="onmouseup")if(u[F].func(E))return;o();if(!J0)switch(C.button){case _:if(panel==_){panel=c;N.style.cursor="url("+e+"), auto";g()}break;case a:if(panel==a){panel=c;N.style.cursor="url("+e+"), auto";k.DeleteShape(A);k.SetMapView(O)}break}if(C.button==Q){G=E;h.Show(B,D)}}else{E=panel0(C,q);q=null;for(F=0;F<u.length;F++)if(u[F].eventname=="onshapemouseup")if(u[F].func(E))return}}function E(D){var B=D.clientX-N.offsetLeft-(P?2:0),H=D.clientY-N.offsetTop-(P?2:0),K=panel0(D,k);for(var L=0;L<u.length;L++)if(u[L].eventname=="onmousemove")if(u[L].func(K))return;if(!J0)switch(panel){case _:var J=new VCPixel(B-s.X,H-s.Y);s.X=B;s.Y=H;E0(J);break;case a:var I=new VCPixel(B-k.GetWidth()/2+f.X,H-k.GetHeight()/2+f.Y);O.BottomRightLatLong=VCLatLong.FromPixel(I,N0);var G=new VCLatLong(O.TopLeftLatLong.Latitude,O.TopLeftLatLong.Longitude),F=new VCLatLong(O.TopLeftLatLong.Latitude,O.BottomRightLatLong.Longitude),E=new VCLatLong(O.BottomRightLatLong.Latitude,O.BottomRightLatLong.Longitude),C=new VCLatLong(O.BottomRightLatLong.Latitude,O.TopLeftLatLong.Longitude);A.SetPoints([G,F,E,C]);break}}function Z(B){var A=B.clientX-N.offsetLeft-(P?2:0),C=B.clientY-N.offsetTop-(P?2:0),D=panel0(B,k);for(var E=0;E<u.length;E++)if(u[E].eventname=="onmouseout")if(u[E].func(D))return;if(!J0)if(panel==_)if(A<0||C<0||A>=N.clientWidth||C>=N.clientHeight){panel=c;N.style.cursor="url("+e+"), auto";g()}}function G0(panel){var _=panel0(panel,k);for(var A=0;A<u.length;A++)if(u[A].eventname=="onclick")if(u[A].func(_))return}function j(_){var panel=_.clientX-N.offsetLeft-(P?2:0),A=_.clientY-N.offsetTop-(P?2:0),C=panel0(_,k);for(var D=0;D<u.length;D++)if(u[D].eventname=="ondoubleclick")if(u[D].func(C))return;if(!J0)if(N0<F){var B=new VCPixel(panel-N.clientWidth/2,A-N.clientHeight/2);m(N0+1,B)}}function K0(panel){var _=panel0(panel,k);for(var A=0;A<u.length;A++)if(u[A].eventname=="onmousewheel")if(u[A].func(_))return;if(!J0)if(panel.wheelDelta>0||panel.detail<0)k.ZoomIn();else if(panel.wheelDelta<0||panel.detail>0)k.ZoomOut()}function L0(panel){var _=panel0(panel,k);for(var A=0;A<u.length;A++)if(u[A].eventname=="onkeydown")if(u[A].func(_))return;if(!J0)switch(panel.keyCode){case B["Left"]:E0(new VCPixel(-J,0));break;case B["Up"]:E0(new VCPixel(0,-J));break;case B["Right"]:E0(new VCPixel(J,0));break;case B["Down"]:E0(new VCPixel(0,J));break;case B["ZoomIn"]:k.ZoomIn();break;case B["ZoomOut"]:k.ZoomOut();break;default:break}}function H(){var panel=panel0(null,k);for(var _=0;_<u.length;_++)if(u[_].eventname=="onchangeview")if(u[_].func(panel))return}function g(){var panel=panel0(null,k);for(var _=0;_<u.length;_++)if(u[_].eventname=="onendchangeview")if(u[_].func(panel))return}function C0(panel){k.RefreshScreen()}this.Shape_OnMouseDown=function(panel){q=panel};this.Shape_OnMouseUp=function(panel){q=panel};function o(){for(var panel=0;panel<t.length;panel++)t[panel].Hide()}function panel0(B,panel){var C=new VCEventArgument();C.Center=f;C.MapViewPixel=k.GetMapViewPixel();C.ZoomLevel=N0;C.Sender=panel;if(B!=null){var _=B.clientX-N.offsetLeft-(P?2:0),D=B.clientY-N.offsetTop-(P?2:0),E=new VCPixel(f.X,f.Y);E.X+=_-N.clientWidth/2;E.Y+=D-N.clientHeight/2;var A=VCLatLong.FromPixel(E,N0);C.Latitude=A.Latitude;C.Longitude=A.Longitude;C.x=_;C.y=D;C.MapX=_-k.GetWidth()/2+f.X;C.MapY=D-k.GetHeight()/2+f.Y;C.button=B.button;C.KeyCode=B.keyCode}return C}function E0(panel){H0(new VCPixel(f.X-panel.X,f.Y-panel.Y))}function H0(panel){f.X=panel.X;f.Y=panel.Y;k.RefreshScreen()}function b(_,panel){if(_.zoom!=N0||_.Order.X!=panel.X||_.Order.Y!=panel.Y||_.Style!=M0)return false;else if(_.Language==y)return true;else if(M0==VCMapStyle.Aerial)return true;else return false}function D(_,A){var panel=-1;for(var B=0;B<A.length;B++)if(b(_,A[B])){panel=B;break}return panel}function T(panel,A){var _=-1;for(var B=0;B<A.length;B++)if(b(A[B],panel)){_=B;break}return _}function w(){var panel=N.clientWidth,D=N.clientHeight,_=new VCPixel();_.X=f.X-panel/2;_.Y=f.Y-D/2;var C=PixelToTileOrder(_);C.X-=i;C.Y-=i;var A=new Array();for(var B=C.Y;B<=C.Y+Math.floor(D/V)+1+i;B++)for(var E=C.X;E<=C.X+Math.floor(panel/V)+1+i;E++)A.push(new VCPixel(E,B));return A}function l(A){var _=f.X-N.clientWidth/2,panel=f.Y-N.clientHeight/2;A.img.style.left=(A.Order.X*V-_)+"px";A.img.style.top=(A.Order.Y*V-panel)+"px"}function m(panel,_){f.X+=_.X;f.Y+=_.Y;k.SetZoomLevel(panel)}function x(panel,_){f=panel;N0=_;k.RefreshScreen();g()}this.LoadMap=function(_,B,A,C){N.focus();N.style.backgroundColor="#e9e7d4";N.style.cursor="url("+e+"), auto";N.style.MozUserSelect="none";N.onmousemove=function(panel){return false};N.oncontextmenu=function(panel){return false};var panel=document.createElement("img");panel.src=W;panel.alt="";panel.style.position="absolute";panel.style.left="20px";panel.style.bottom="20px";panel.onload=function(){fixPNG(this)};panel.onerror=function(){this.style.visibility="hidden"};panel.style.zIndex="5";N.appendChild(panel);N.appendChild(p.div);h.AddItem(new VCMenuItem(d,"vCageMap.AboutMap"));this.AddMenu(h);if(B!=null)N0=B;if(_==null)f=VCPixel.FromLatLong(new VCLatLong(0,0),N0);else f=VCPixel.FromLatLong(_,N0);if(A!=null)M0=A;if(C!=null){I=C;y=C}this.RebuildScreen();this.AddMapLayer(z);if(P){N.attachEvent("onmousedown",A0);N.attachEvent("onmousemove",E);N.attachEvent("onmouseup",F0);N.attachEvent("onmouseout",Z);N.attachEvent("onclick",G0);N.attachEvent("ondblclick",j);N.attachEvent("onmousewheel",K0);N.attachEvent("onkeydown",L0);window.attachEvent("onresize",C0)}else{N.addEventListener("mousedown",A0,false);N.addEventListener("mousemove",E,false);N.addEventListener("mouseup",F0,false);N.addEventListener("mouseout",Z,false);N.addEventListener("click",G0,false);N.addEventListener("dblclick",j,false);N.addEventListener("DOMMouseScroll",K0,false);window.addEventListener("keydown",L0,false);window.addEventListener("resize",C0,false)}};this.Dispose=function(){if(P){window.detachEvent("onresize",C0);N.detachEvent("onkeydown",L0);N.detachEvent("onmousewheel",K0);N.detachEvent("ondblclick",j);N.detachEvent("onclick",G0);N.detachEvent("onmouseout",Z);N.detachEvent("onmouseup",F0);N.detachEvent("onmousemove",E);N.detachEvent("onmousedown",A0)}else{window.removeEventListener("resize",C0,false);window.removeEventListener("keydown",L0,false);N.removeEventListener("DOMMouseScroll",K0,false);N.removeEventListener("dblclick",j,false);N.removeEventListener("click",G0,false);N.removeEventListener("mouseout",Z,false);N.removeEventListener("mouseup",F0,false);N.removeEventListener("mousemove",E,false);N.removeEventListener("mousedown",A0,false)}this.DeleteMapLayer(z);f=null;N0=null};this.AttachEvent=function(_,panel){u.push(new VCEvent(_,panel))};this.DetachEvent=function(A,panel){for(var _=0;_<u.length;_++)if(u[_].eventname==A&&u[_].func==panel){u.splice(_,1);break}};this.LockMap=function(){J0=true;N.style.cursor="default"};this.UnlockMap=function(){J0=false;N.style.cursor="url("+e+"), auto"};this.RefreshScreen=function(){var C;if(D0)if(N0>=S){var A=true;for(C=0;C<L.length;C++)if(L[C].Rectangle.IsPointIn(VCLatLong.FromPixel(f,N0))){y=L[C].Language;A=false;break}if(A)y=Y}else y=I;var B=w();for(C=0;C<r.length;C++)if(D(r[C],B)==-1){N.removeChild(r[C].img);B0.shift(r[C]);r.splice(C--,1)}for(C=0;C<B.length;C++)if(T(B[C],r)==-1){var panel=T(B[C],B0),_;if(panel>=0){_=B0[panel];B0.splice(panel,1)}else _=new VCTileContext(B[C],N0,M0,y,_0);r.push(_);N.appendChild(_.img)}for(C=0;C<r.length;C++)l(r[C]);H();while(B0.length>X)B0.pop()};this.RebuildScreen=function(){for(var panel=0;panel<r.length;panel++)N.removeChild(r[panel].img);r.splice(0,r.length);B0.splice(0,B0.length);this.RefreshScreen()};this.AddTileLayer=function(panel){z.AddTiles(panel)};this.DeleteTileLayer=function(panel){z.DeleteTiles(panel)};this.GetWidth=function(){return N.clientWidth};this.GetHeight=function(){return N.clientHeight};this.GetCenter=function(){return VCLatLong.FromPixel(f,N0)};this.SetCenter=function(panel){f=VCPixel.FromLatLong(panel,N0);this.RefreshScreen();g()};this.GetCenterPixel=function(){return f};this.GetMapView=function(){var panel=this.GetMapViewPixel();return new VCLatLongRectangle(VCLatLong.FromPixel(panel.P1,N0),VCLatLong.FromPixel(panel.P2,N0))};this.SetMapView=function(A){var panel,_,B;for(panel=F;panel>=K;panel--){_=VCPixel.FromLatLong(A.TopLeftLatLong,panel);B=VCPixel.FromLatLong(A.BottomRightLatLong,panel);if(Math.abs(B.X-_.X)<=this.GetWidth()&&Math.abs(B.Y-_.Y)<=this.GetHeight())break}x(new VCPixel((_.X+B.X)/2,(_.Y+B.Y)/2),panel)};this.GetMapViewPixel=function(){var panel=new VCPixelRectangle();panel.P1.X=f.X-this.GetWidth()/2;panel.P1.Y=f.Y-this.GetHeight()/2;panel.P2.X=f.X+this.GetWidth()/2;panel.P2.Y=f.Y+this.GetHeight()/2;return panel};this.IncludePointInView=function(panel){var _=this.GetMapView();if(panel.Latitude>_.TopLeftLatLong.Latitude)_.TopLeftLatLong.Latitude=panel.Latitude;else if(panel.Latitude<_.BottomRightLatLong.Latitude)_.BottomRightLatLong.Latitude=panel.Latitude;if(panel.Longitude<_.TopLeftLatLong.Longitude)_.TopLeftLatLong.Longitude=panel.Longitude;else if(panel.Longitude>_.BottomRightLatLong.Longitude)_.BottomRightLatLong.Longitude=panel.Longitude;this.SetMapView(_)};this.ZoomIn=function(){if(N0<F)this.SetZoomLevel(N0+1)};this.ZoomOut=function(){if(N0>K)this.SetZoomLevel(N0-1)};this.GetZoomLevel=function(){return N0};this.SetZoomLevel=function(panel){if(panel>=K&&panel<=F&&panel!=N0){var _;if(panel>N0){_=panel-N0;f.X<<=_;f.Y<<=_}else{_=N0-panel;f.X>>=_;f.Y>>=_}N0=panel;this.RefreshScreen();g()}};this.SetCenterAndZoom=function(panel,_){f=VCPixel.FromLatLong(panel,_);N0=_;this.RefreshScreen();g()};this.GetMapStyle=function(){return M0};this.SetMapStyle=function(panel){if(M0!=panel){M0=panel;this.RefreshScreen()}};this.GetMapLanguage=function(){if(y.toLowerCase()=="zh")return"zh";else if(y.toLowerCase()=="en")return"en";else return Y};this.SetMapLanguage=function(panel){if(!D0){y=panel;this.RefreshScreen()}};this.SetAutoChangeLanguage=function(panel){D0=panel;this.RefreshScreen()};this.IsBirdseyeAvailable=function(){return false};this.ShowDashboard=function(){p.Show()};this.HideDashboard=function(){p.Hide()};this.AddMenuItem=function(panel){if(I0==0)h.InsertSeparator(0);if(panel==null)h.InsertSeparator(I0);else h.InsertItem(panel,I0);I0++};this.RemoveMenuItem=function(panel){if(panel>=0&&panel<I0){h.RemoveItem(panel);I0--;if(I0==0)h.RemoveItem(0)}};this.AddMenu=function(panel){t.push(panel);N.appendChild(panel.div)};this.AddShape=function(panel){z.AddShape(panel)};this.DeleteShape=function(panel){z.DeleteShape(panel)};this.DeleteAllShapes=function(){z.DeleteAllShapes()};this.AddShapeLayer=function(panel){panel.SetParent(this);R.push(panel)};this.GetShapeLayerByIndex=function(panel){return R[panel+1]};this.GetShapeLayerCount=function(){return R.length-1};this.ShowAllShapeLayers=function(){for(var panel=0;panel<R.length;panel++)R[panel].Show()};this.HideAllShapeLayers=function(){for(var panel=0;panel<R.length;panel++)R[panel].Hide()};this.DeleteShapeLayer=function(panel){for(var _=0;_<R.length;_++)if(R[_]==panel){panel.SetParent(null);R.splice(_,1);break}};this.DeleteAllShapeLayers=function(){for(var panel=1;panel<R.length;panel++)R[panel].SetParent(null);R.splice(1,R.length-1)};this.AddMapLayer=function(panel){panel.SetParent(this);_0.push(panel)};this.DeleteMapLayer=function(panel){for(var _=0;_<_0.length;_++)if(_0[_]==panel){panel.SetParent(null);_0.splice(_,1);break}};this.Clear=function(){this.DeleteAllShapes();this.DeleteAllShapeLayers()};this.ImportShapeLayerData=function(G,W){var T;try{T=new ActiveXObject("Microsoft.XMLDOM");T.async=false;if(G.charAt(0)=="<")T.loadXML(G);else T.load(G)}catch(M){if(G.charAt(0)=="<"){var Y=new DOMParser();T=Y.parseFromString(G,"text/xml")}else{T=document.implementation.createDocument("","",null);T.async=false;T.load(G)}}var O=new VCMapLayer(),panel=T.getElementsByTagName("Placemark");for(var U=0;U<panel.length;U++){var R=null,H;H=panel[U].getElementsByTagName("Point");if(H.length>0){var N=H[0].getElementsByTagName("coordinates")[0].firstChild.nodeValue,V=VCLatLong.Parse(N,true);R=new VCShape(VCShapeType.Pushpin,[V])}else{H=panel[U].getElementsByTagName("LineString");if(H.length>0){var J=H[0].getElementsByTagName("coordinates")[0].firstChild.nodeValue.split(/\s+/g),Z=new Array();for(var S=0;S<J.length;S++)Z.push(VCLatLong.Parse(J[S],true));R=new VCShape(VCShapeType.Polyline,Z)}else{H=panel[U].getElementsByTagName("Polygon");if(H.length>0);}}var L=panel[U].getElementsByTagName("Style")[0].getElementsByTagName("href")[0].firstChild.nodeValue,D=panel[U].getElementsByTagName("name")[0].firstChild.nodeValue,F=panel[U].getElementsByTagName("description")[0].firstChild.nodeValue,_=panel[U].getElementsByTagName("visibility")[0].firstChild.nodeValue;R.SetCustomIcon(L);R.SetTitle(D);R.SetDescription(F);if(_=="0")R.Hide();O.AddShape(R)}var K=T.getElementsByTagName("MapTile");for(U=0;U<K.length;U++){var C=K[U].getElementsByTagName("x1")[0].firstChild.nodeValue,P=K[U].getElementsByTagName("y1")[0].firstChild.nodeValue,B=K[U].getElementsByTagName("x2")[0].firstChild.nodeValue,Q=K[U].getElementsByTagName("y2")[0].firstChild.nodeValue,A=K[U].getElementsByTagName("zoom")[0].firstChild.nodeValue,X=K[U].getElementsByTagName("mapStyle")[0].firstChild.nodeValue,I=K[U].getElementsByTagName("href")[0].firstChild.nodeValue,E=new VCTileSourceSpecification(parseInt(C),parseInt(P),parseInt(B),parseInt(Q),parseInt(A),I,X);O.AddTiles(E)}this.AddShapeLayer(O);if(W)this.SetMapView(O.GetBoundingRectangle());return O};this.ExportShapeLayerData=function(){return z.ExportShapeLayerData()};this.Find=function(A,panel,_,B,D){n=document.createElement("script");n.type="text/javascript";n.src=C.replace("{0}",this.id).replace("{1}",A).replace("{2}",panel).replace("{3}",_).replace("{4}",B).replace("{5}",Math.random());document.getElementsByTagName("head")[0].appendChild(n);M=D};this.cb_Find=function(_,B){if(n!=null)document.getElementsByTagName("head")[0].removeChild(n);n=null;var C=null;if(B){C=new VCMapLayer();for(var D=0;D<_.length;D++){var A=_[D],panel=new VCShape(VCShapeType.Pushpin,[A.LatLong]);panel.SetTitle(A.Name);panel.SetDescription(A.Description);C.AddShape(panel)}this.AddMapLayer(C)}if(M!=null)M(C,_)};this.AddControl=function(panel){N.appendChild(panel)};this.ShowControl=function(panel){panel.style.visibility="visible"};this.HideControl=function(panel){panel.style.visibility="hidden"};this.DeleteControl=function(panel){N.removeChild(panel)};this.SetTileBuffer=function(panel){i=panel;this.RefreshScreen()};this.MapKeyValue=function(_,panel){B[_]=panel};if(typeof(v)=="string")N=document.getElementById(v);else N=v;if(N.style.width=="")N.style.width="600px";if(N.style.height=="")N.style.height="400px";if(N.style.position=="")N.style.position="relative";N.style.overflow="hidden";B["Left"]=37;B["Up"]=38;B["Right"]=39;B["Down"]=40;B["ZoomIn"]=107;B["ZoomOut"]=109;_vCageMaps.push(this)}vCageMap.GetVersion=function(){return"1.2"};vCageMap.AboutMap=function(){window.open(B)};vCageMap.GetMapByID=function(panel){for(var _=0;_<_vCageMaps.length;_++)if(_vCageMaps[_].id==panel)return _vCageMaps[_]};function VCMapLayer(){var panel=this,G=new Array(),_=new Array(),C=document.createElement("div"),B=null;function E(panel){for(var _=0;_<G.length;_++)G[_].PanRefresh(panel)}function F(panel){for(var _=0;_<G.length;_++)G[_].Refresh()}function A(_){panel.Refresh();if(N)F(_.MapViewPixel);else E(_.MapViewPixel)}function D(panel){if(!N)F(panel.MapViewPixel)}this.SetParent=function(panel){if(B!=null){B.DeleteControl(C);B.DetachEvent("onendchangeview",D);B.DetachEvent("onchangeview",A);B=panel}if(panel!=null){panel.AddControl(C);panel.AttachEvent("onchangeview",A);panel.AttachEvent("onendchangeview",D);B=panel;this.Refresh()}for(var _=0;_<G.length;_++)G[_].SetMap(panel)};this.Refresh=function(){if(B!=null){C.style.width=B.GetWidth()+"px";C.style.height=B.GetHeight()+"px"}};this.AddShape=function(panel){G.push(panel);C.appendChild(panel.GetDiv());if(B!=null){panel.SetMap(B);panel.Refresh()}};this.DeleteShape=function(panel){for(var _=0;_<G.length;_++)if(G[_]==panel){G.splice(_,1);C.removeChild(panel.GetDiv());break}};this.DeleteAllShapes=function(){for(var panel=0;panel<G.length;panel++)C.removeChild(G[panel].GetDiv());G.splice(0,G.length)};this.GetShapeByIndex=function(panel){return G[panel]};this.GetShapeCount=function(){return G.length};this.AddTiles=function(panel){_.unshift(panel);B.RebuildScreen()};this.GetTilesCount=function(){return _.length};this.GetTilesByIndex=function(panel){return _[panel]};this.DeleteTiles=function(panel){for(var A=0;A<_.length;A++)if(_[A]==panel){_.splice(A,1);B.RefreshScreen();break}};this.DeleteAllTiles=function(){_.splice(0,_.length);B.RefreshScreen()};this.Clear=function(){this.DeleteAllShapes();this.DeleteAllTiles()};this.GetBoundingRectangle=function(){var panel=new VCLatLongRectangle(new VCLatLong(-85,180),new VCLatLong(85,-180));for(var D=0;D<G.length;D++){var C=G[D].GetPoints();for(var A=0;A<C.length;A++){if(C[A].Latitude>panel.TopLeftLatLong.Latitude)panel.TopLeftLatLong.Latitude=C[A].Latitude;if(C[A].Latitude<panel.BottomRightLatLong.Latitude)panel.BottomRightLatLong.Latitude=C[A].Latitude;if(C[A].Longitude<panel.TopLeftLatLong.Longitude)panel.TopLeftLatLong.Longitude=C[A].Longitude;if(C[A].Longitude>panel.BottomRightLatLong.Longitude)panel.BottomRightLatLong.Longitude=C[A].Longitude}}var B=new Array();B.push(panel);for(D=0;D<_.length;D++)B.push(_[D].GetLatLongRectangle());return VCLatLongRectangle.Merge(B)};this.Show=function(){C.style.visibility="visible";for(var panel=0;panel<_.length;panel++)_[panel].Visible=true;B.RefreshScreen()};this.Hide=function(){C.style.visibility="hidden";for(var panel=0;panel<_.length;panel++)_[panel].Visible=false;B.RefreshScreen()};this.IsVisible=function(){return(C.style.visibility!="hidden")};this.ExportShapeLayerData=function(){var C="";C+="<?xml version=\"1.0\" encoding=\"UTF-8\"?><kml xmlns=\"http://earth.google.com/kml/2.2\"><Document>";for(var F=0;F<G.length;F++){var A=G[F];C+="<Placemark><Style><IconStyle><Icon><href>";C+=A.GetCustomIcon();C+="</href></Icon></IconStyle></Style><name><![CDATA[";C+=A.GetTitle();C+="]]></name><description><![CDATA[";C+=A.GetDescription();C+="]]></description><visibility>";C+=A.GetVisibility?"1":"0";C+="</visibility>";switch(A.GetType()){case VCShapeType.Pushpin:C+="<Point><coordinates>";var B=A.GetPoints()[0];C+=B.Longitude+","+B.Latitude;C+="</coordinates></Point>";break;case VCShapeType.Polyline:C+="<LineString><coordinates>";var E=A.GetPoints();for(var D=0;D<E.length;D++)C+=E[D].Longitude+","+E[D].Latitude+" ";C+="</coordinates></LineString>";break;case VCShapeType.Polygon:break}C+="</Placemark>"}for(F=0;F<_.length;F++){var panel=_[F];C+="<MapTile><x1>";C+=panel.Rectangle.P1.X;C+="</x1><y1>";C+=panel.Rectangle.P1.Y;C+="</y1><x2>";C+=panel.Rectangle.P2.X;C+="</x2><y2>";C+=panel.Rectangle.P2.Y;C+="</y2><zoom>";C+=panel.Zoom;C+="</zoom><mapStyle>";C+=panel.Style;C+="</mapStyle><href>";C+=panel.TileURL;C+="</href></MapTile>"}C+="</Document></kml>";return C};C.style.position="absolute";C.style.zIndex="2"}function VCLatLong(_,panel){this.Latitude=0;this.Longitude=0;if(_!=null)this.Latitude=_;if(panel!=null)this.Longitude=panel}VCLatLong.Parse=function(_,A){var panel=_.split(",");if(A)return new VCLatLong(parseFloat(panel[1]),parseFloat(panel[0]));else return new VCLatLong(parseFloat(panel[0]),parseFloat(panel[1]))};VCLatLong.FromPixel=function(C,D){var B=Z/((1<<D)*V),panel=C.X*B-b,_=b-C.Y*B,E=new VCLatLong();E.Latitude=Math.RadToDeg(Math.PI/2-2*Math.atan(Math.exp(-_/A)));E.Longitude=Math.RadToDeg(panel/A);return E};function VCPixel(_,panel){if(_==null)this.X=0;else this.X=Math.round(_);if(panel==null)this.Y=0;else this.Y=Math.round(panel)}VCPixel.FromLatLong=function(_,D){var B=Math.sin(Math.DegToRad(_.Latitude)),panel=A*Math.DegToRad(_.Longitude),E=A/2*Math.log((1+B)/(1-B)),C=Z/((1<<D)*V);return new VCPixel((b+panel)/C,(b-E)/C)};function VCPixelRectangle(_,panel){this.P1=new VCPixel();this.P2=new VCPixel();if(_!=null){this.P1.X=_.X;this.P1.Y=_.Y}if(panel!=null){this.P2.X=panel.X;this.P2.Y=panel.Y}}function VCTileSourceSpecification(F,C,E,D,B,A,_,panel){this.Rectangle=new VCPixelRectangle(new VCPixel(F,C),new VCPixel(E,D));this.Zoom=B;this.ZoomCount=panel?panel:1;this.TileURL=A;this.Style=_;this.Visible=true;this.IsTileIn=function(F,E,C,A){var B=false;if(this.Visible)if(this.Style==null||this.Style==A)if(this.Zoom<=C&&this.Zoom+this.ZoomCount-1>=C){var D=C-this.Zoom,_=F>>D,panel=E>>D;if(_>=this.Rectangle.P1.X)if(_<=this.Rectangle.P2.X)if(panel>=this.Rectangle.P1.Y)if(panel<=this.Rectangle.P2.Y)B=true}return B};this.GetLatLongRectangle=function(){var _=new VCPixel(this.Rectangle.P1.X*V,this.Rectangle.P1.Y*V),panel=new VCPixel((this.Rectangle.P2.X+1)*V-1,(this.Rectangle.P2.Y+1)*V-1);return new VCLatLongRectangle(VCLatLong.FromPixel(_,this.Zoom),VCLatLong.FromPixel(panel,this.Zoom))}}function PixelToTileOrder(panel){var _=new VCPixel();_.X=Math.floor(panel.X/V);_.Y=Math.floor(panel.Y/V);return _}function TileOrderToTileName(B,E){var H=0,panel=0,D=1<<E,A=D;if(B.X<H||B.X>=D||B.Y<panel||B.Y>=A)return null;var F="";for(var I=0;I<E;I++){var C=(H+D)/2,_=(panel+A)/2,G;if(B.X<C&&B.Y<_){G="0";D=C;A=_}else if(B.X>=C&&B.Y<_){G="1";H=C;A=_}else if(B.X<C&&B.Y>=_){G="2";D=C;panel=_}else{G="3";H=C;panel=_}F+=G}return F}function TileNameToTileOrder(D){var F=D.length,E=0,panel=0,C=1<<F,A=C;for(var G=0;G<F;G++){var B=(E+C)/2,_=(panel+A)/2;switch(parseInt(D.charAt(G))){case 0:C=B;A=_;break;case 1:E=B;A=_;break;case 2:C=B;panel=_;break;case 3:E=B;panel=_;break}}return new VCPixel(E,panel)}function VCTileContext(){var A,_;this.zoom=0;this.Order=null;this.Style="";this.img=document.createElement("img");if(arguments.length==4){A=arguments[0];this.zoom=A.length;this.Order=TileNameToTileOrder(A);this.Style=arguments[1];this.Language=arguments[2];_=arguments[3]}else if(arguments.length==5){this.Order=arguments[0];this.zoom=arguments[1];A=TileOrderToTileName(this.Order,this.zoom);this.Style=arguments[2];this.Language=arguments[3];_=arguments[4]}this.img.style.width=V+"px";this.img.style.height=V+"px";this.img.style.position="absolute";this.img.alt="";this.img.onmousedown=function(){return false};this.img.onerror=function(){this.style.visibility="hidden"};if(A==null)this.img.style.visibility="hidden";else{var panel=true;for(var C=0;C<_.length;C++){for(var B=0;B<_[C].GetTilesCount();B++)if(_[C].GetTilesByIndex(B).IsTileIn(this.Order.X,this.Order.Y,this.zoom,this.Style)){this.img.src=_[C].GetTilesByIndex(B).TileURL.replace("{3}",this.Style).replace("{4}",A).replace("{10}",this.Language);panel=false;break}if(!panel)break}if(panel)this.img.src=T.replace("{3}",this.Style).replace("{4}",A).replace("{10}",this.Language)}}function VCMenu(){this.div=document.createElement("div");this.AddItem=function(panel){panel.Parent=this;this.div.appendChild(panel.GetA())};this.AddSeparator=function(){this.div.appendChild(document.createElement("hr"))};this.InsertItem=function(_,panel){_.Parent=this;this.div.insertBefore(_.GetA(),this.div.childNodes.item(panel))};this.InsertSeparator=function(panel){this.div.insertBefore(document.createElement("hr"),this.div.childNodes.item(panel))};this.RemoveItem=function(panel){this.div.removeChild(this.div.childNodes.item(panel))};this.Show=function(_,panel){this.div.style.left=_+"px";this.div.style.top=panel+"px";this.div.style.visibility="visible"};this.Hide=function(){this.div.style.visibility="hidden"};this.div.id="VCMenu"+Math.round(Math.random()*10000);this.div.style.borderWidth="1px";this.div.style.borderColor="black";this.div.style.borderStyle="solid";this.div.style.backgroundColor="white";this.div.style.width="150px";this.div.style.padding="5px 5px 5px 5px";this.div.style.position="absolute";this.div.style.cursor="default";this.div.style.zIndex="10";this.div.style.visibility="hidden";this.div.oncontextmenu=function(){event.returnValue=false};this.div.onclick=function(){event.cancelBubble=true};this.div.ondblclick=function(){event.cancelBubble=true};this.div.onmouseup=function(){event.cancelBubble=true};this.div.onmousedown=function(){event.cancelBubble=true}}(function(){var panel;if(P){panel=document.createStyleSheet();panel.addRule(".VEMenuItem","font-size:small; text-decoration:none; width:100%; cursor:default; color:Olive");panel.addRule(".VEMenuItem:hover","font-size:small; text-decoration:none; width:100%; cursor:default; color:Olive; background-color:Silver")}else{panel=document.createElement("style");panel.type="text/css";panel.innerHTML+=".VEMenuItem{font-size:small; text-decoration:none; width:100%; cursor:default; color:Olive}";panel.innerHTML+=".VEMenuItem:hover{font-size:small; text-decoration:none; width:100%; cursor:default; color:Olive; background-color:Silver}";document.getElementsByTagName("head").item(0).appendChild(panel)}})();function VCMenuItem(panel,_){var A=document.createElement("a"),B=_;this.Parent=null;this.GetA=function(){A.href="javascript:DoMenuItemEvent("+B+", "+this.Parent.div.id+")";return A};A.innerHTML="<div class=\"VEMenuItem\">"+panel+"</div>"}var G=new VCEventArgument();function DoMenuItemEvent(_,panel){panel.style.visibility="hidden";_(G)}function VCEventArgument(){this.Latitude=0;this.Longitude=0;this.Center=new VCLatLong();this.ZoomLevel=1;this.MapViewPixel=new VCPixelRectangle();this.x=0;this.y=0;this.MapX=0;this.MapY=0;this.button=0;this.KeyCode=0;this.Sender=null}function VCMapStyle(){}VCMapStyle.Road="r";VCMapStyle.Aerial="a";function VCDashboard(A){var _=document.createElement("img"),F=document.createElement("img"),C=document.createElement("img");this.div=document.createElement("div");function G(){A.SetMapStyle(VCMapStyle.Road)}function B(){A.SetMapStyle(VCMapStyle.Aerial)}this.Show=function(){this.div.style.visibility="visible"};this.Hide=function(){this.div.style.visibility="hidden"};_.src=panel;_.alt="";_.style.position="absolute";_.style.left="0px";_.style.top="0px";_.style.zIndex="1";_.onload=function(){fixPNG(this)};F.src=O;F.alt=E;F.style.position="absolute";F.style.left="20px";F.style.top="17px";F.style.cursor="pointer";F.style.zIndex="2";F.onload=function(){fixPNG(this)};F.onclick=G;C.src=R;C.alt=D;C.style.position="absolute";C.style.left="80px";C.style.top="17px";C.style.cursor="pointer";C.style.zIndex="2";C.onload=function(){fixPNG(this)};C.onclick=B;this.div.style.width="400px";this.div.style.position="absolute";this.div.style.left="50px";this.div.style.top="0px";this.div.style.zIndex="9";this.div.appendChild(_);this.div.appendChild(F);this.div.appendChild(C)}function VCShapeType(){}VCShapeType.Pushpin=0;VCShapeType.Polyline=1;VCShapeType.Polygon=2;if(P){document.namespaces.add("vc_vml","urn:schemas-microsoft-com:vml");document.createStyleSheet().cssText="vc_vml\\:*{behavior:url(#default#VML)}"}function VCShape(B,L){var X=this,_=document.createElement("div"),Q=document.createElement("img"),O=document.createElement("div"),Y=null,T=null,A=B,N=new Array(),G=new Array(),E=new Array(),D=new Array(),C=null,J=null,c="",M="",b=0,S=K,U=F,a=null;function W(panel){T.Shape_OnMouseDown(X)}function V(panel){T.Shape_OnMouseUp(X)}function Z(panel){Y=setTimeout(X.ShowInfoBox,500)}function R(panel){clearTimeout(Y);X.HideInfoBox()}function panel(){if(Q.clientWidth==0)setTimeout(panel,100);else X.Refresh()}this.SetMap=function(panel){T=panel;this.Refresh()};this.PanRefresh=function(F){if(T==null)return;if(Q.clientWidth==0){panel();return}var _=VCPixel.FromLatLong(a,b);Q.style.left=(_.X-Q.clientWidth/2-F.P1.X)+"px";Q.style.top=(_.Y-Q.clientHeight-F.P1.Y)+"px";if(B!=VCShapeType.Pushpin){if(!P){C.width=T.GetWidth();C.height=T.GetHeight();J.clearRect(0,0,C.width,C.height)}for(var G=0;G<E.length;G++){var A=H(E[G],F);A.P1.X-=F.P1.X;A.P1.Y-=F.P1.Y;A.P2.X-=F.P1.X;A.P2.Y-=F.P1.Y;if(P){D[G].style.visibility="hidden";D[G].from.value=A.P1.X+","+A.P1.Y;D[G].to.value=A.P2.X+","+A.P2.Y;D[G].style.visibility="visible"}else{J.moveTo(A.P1.X,A.P1.Y);J.lineTo(A.P2.X,A.P2.Y);J.lineWidth=2;J.strokeStyle="rgb(0,0,255)"}}if(J)J.stroke()}};this.Refresh=function(){if(T==null)return;if(Q.clientWidth==0){panel();return}b=T.GetZoomLevel();if(b<S||b>U)this.Hide();else{G.splice(0,G.length);E.splice(0,E.length);for(var F=0;F<N.length;F++){var _=VCPixel.FromLatLong(N[F],b);G.push(_)}switch(B){case VCShapeType.Polyline:for(var D=0;D<G.length-1;D++){var A=new VCPixelRectangle(G[D],G[D+1]);E.push(A)}break;case VCShapeType.Polygon:for(D=0;D<G.length;D++){A;if(D==0)A=new VCPixelRectangle(G[0],G[G.length-1]);else A=new VCPixelRectangle(G[D],G[D-1]);E.push(A)}break}var C=T.GetMapViewPixel();this.Show();this.PanRefresh(C)}};this.ShowInfoBox=function(){_.style.zIndex="2";if(c!=""||M!=""){var panel="";if(c.length>0){if(c.charAt(0)=="<")panel+=c;else panel+="<p><b>"+c+"</b></p>"}else panel+="<p></p>";if(M.length>0){if(M.charAt(0)=="<")panel+=M;else panel+="<p>"+M+"</p>"}else panel+="<p></p>";O.innerHTML=panel;O.style.width="200px";O.style.left=(Q.offsetLeft+Q.offsetWidth+5)+"px";O.style.top=(Q.offsetTop+(Q.offsetHeight-O.clientHeight)/2)+"px";O.style.visibility="visible"}};this.HideInfoBox=function(){_.style.zIndex="1";O.style.visibility="hidden"};this.Show=function(){_.style.visibility="visible"};this.Hide=function(){_.style.visibility="hidden"};this.IsVisible=function(){return(_.style.visibility!="hidden")};this.ShowIcon=function(){Q.style.visibility="visible"};this.HideIcon=function(){Q.style.visibility="hidden"};this.IsIconVisible=function(){return(Q.style.visibility!="hidden")};this.GetDiv=function(){return _};this.GetType=function(){return A};this.GetPoints=function(){return N};this.SetPoints=function(B){N.splice(0,N.length);switch(A){case VCShapeType.Pushpin:N.push(B[0]);break;case VCShapeType.Polyline:for(var C=0;C<B.length;C++)N.push(B[C]);if(P)if(N.length-1>D.length){while(D.length!=N.length-1){var panel=document.createElement("<vc_vml:line style=\"position:absolute\" StrokeColor=\"#0000ff\" StrokeWeight=\"2px\" from=\"0,0\" to=\"0,0\" filled=\"false\" />");D.push(panel);_.appendChild(panel)}}else if(N.length-1<D.length)while(D.length!=N.length-1)_.removeChild(D.pop());break;case VCShapeType.Polygon:for(C=0;C<B.length;C++)N.push(B[C]);if(P)if(N.length>D.length){while(D.length!=N.length){panel=document.createElement("<vc_vml:line style=\"position:absolute\" StrokeColor=\"#0000ff\" StrokeWeight=\"2px\" from=\"0,0\" to=\"0,0\" filled=\"false\" />");D.push(panel);_.appendChild(panel)}}else if(N.length<D.length)while(D.length!=N.length)_.removeChild(D.pop());break}a=this.GetCenter();this.Refresh()};this.GetBoundingRectangle=function(){var panel=new VCLatLongRectangle(new VCLatLong(-85,180),new VCLatLong(85,-180));for(var _=0;_<N.length;_++){if(N[_].Latitude>panel.TopLeftLatLong.Latitude)panel.TopLeftLatLong.Latitude=N[_].Latitude;if(N[_].Latitude<panel.BottomRightLatLong.Latitude)panel.BottomRightLatLong.Latitude=N[_].Latitude;if(N[_].Longitude<panel.TopLeftLatLong.Longitude)panel.TopLeftLatLong.Longitude=N[_].Longitude;if(N[_].Longitude>panel.BottomRightLatLong.Longitude)panel.BottomRightLatLong.Longitude=N[_].Longitude}return panel};this.GetCenter=function(){var panel=this.GetBoundingRectangle();return new VCLatLong((panel.TopLeftLatLong.Latitude+panel.BottomRightLatLong.Latitude)/2,(panel.TopLeftLatLong.Longitude+panel.BottomRightLatLong.Longitude)/2)};this.GetZIndex=function(){return _.style.zIndex};this.SetZIndex=function(panel){_.style.zIndex=panel};this.GetCustomIcon=function(){return Q.src};this.SetCustomIcon=function(A){Q.src=A;var panel=document.createElement("img");panel.src=A;panel.style.position="absolute";panel.style.cursor="pointer";panel.style.zIndex="1";panel.onload=function(){fixPNG(this)};panel.onmousedown=W;panel.onmouseup=V;panel.onmouseover=Z;panel.onmouseout=R;_.insertBefore(panel,Q);_.removeChild(Q);Q=panel};this.GetTitle=function(){return c};this.SetTitle=function(panel){c=panel};this.GetDescription=function(){return M};this.SetDescription=function(panel){M=panel};this.GetMinZoomLevel=function(){return S};this.SetMinZoomLevel=function(panel){S=panel;if(b<S||b>U)this.Hide();else this.Show()};this.GetMaxZoomLevel=function(){return U};this.SetMaxZoomLevel=function(panel){U=panel;if(b<S||b>U)this.Hide();else this.Show()};Q.src=I;Q.style.position="absolute";Q.style.cursor="pointer";Q.style.zIndex="1";Q.onload=function(){fixPNG(this)};Q.onmousedown=W;Q.onmouseup=V;Q.onmouseover=Z;Q.onmouseout=R;O.style.position="absolute";O.style.visibility="hidden";O.style.backgroundColor="white";O.style.borderStyle="solid";O.style.borderWidth="1px";_.style.position="relative";_.style.zIndex="1";_.appendChild(Q);_.appendChild(O);if(!P){C=document.createElement("canvas");C.style.position="absolute";J=C.getContext("2d");_.appendChild(C)}this.SetPoints(L)}function VCEvent(_,panel){this.eventname=_;this.func=panel}function VCLatLongRectangle(_,panel){this.TopLeftLatLong=new VCLatLong();this.BottomRightLatLong=new VCLatLong();this.IsPointIn=function(panel){if(panel.Latitude<=this.TopLeftLatLong.Latitude&&panel.Latitude>=this.BottomRightLatLong.Latitude&&panel.Longitude>=this.TopLeftLatLong.Longitude&&panel.Longitude<=this.BottomRightLatLong.Longitude)return true;else return false};if(_!=null){this.TopLeftLatLong.Latitude=_.Latitude;this.TopLeftLatLong.Longitude=_.Longitude}if(panel!=null){this.BottomRightLatLong.Latitude=panel.Latitude;this.BottomRightLatLong.Longitude=panel.Longitude}}VCLatLongRectangle.Merge=function(_){var panel=new VCLatLongRectangle(_[0].TopLeftLatLong,_[0].BottomRightLatLong);for(var A=1;A<_.length;A++){if(panel.TopLeftLatLong.Latitude<_[A].TopLeftLatLong.Latitude)panel.TopLeftLatLong.Latitude=_[A].TopLeftLatLong.Latitude;if(panel.TopLeftLatLong.Longitude>_[A].TopLeftLatLong.Longitude)panel.TopLeftLatLong.Longitude=_[A].TopLeftLatLong.Longitude;if(panel.BottomRightLatLong.Latitude>_[A].BottomRightLatLong.Latitude)panel.BottomRightLatLong.Latitude=_[A].BottomRightLatLong.Latitude;if(panel.BottomRightLatLong.Longitude<_[A].BottomRightLatLong.Longitude)panel.BottomRightLatLong.Longitude=_[A].BottomRightLatLong.Longitude}return panel};function VCRegion(panel,_){this.Language=panel;this.Rectangle=_}function VCFindResult(A,_,panel){this.Name=A;this.Description=_;this.LatLong=panel}