var _LT_gps_cmsUrl="http://gps.51ditu.com:8086/img/?";window._LT_gps_imgURL=window._LT_map_imgURL;function LTNS(){LTNS.info={time:'Mon Oct 6 13:15:59 UTC+0800 2008',version:'1',ov:'1.3 Ver 20070705'};var w=function(P){var A=0,S=0;var D=P.length;var F=new String();var G=-1;var H=0;for(var J=0;J<D;J++){var K=P.charCodeAt(J);K=(K==95)?63:((K==44)?62:((K>=97)?(K-61):((K>=65)?(K-55):(K-48))));S=(S<<6)+K;A+=6;while(A>=8){var L=S>>(A-8);if(H>0){G=(G<<6)+(L&(0x3f));H--;if(H==0){F+=String.fromCharCode(G);};}else{if(L>=224){G=L&(0xf);H=2;}else if(L>=128){G=L&(0x1f);H=1;}else{F+=String.fromCharCode(L);};};S=S-(L<<(A-8));A-=8;};};return F;};var q=["~",";","ps=","&","s=","h=","w=",",","cp=","0x","#","add","","zoom","DXImageTransform.Microsoft.Alpha","mouseup","click","mousedown","mouseout","mouseover"];var i=window;var o=document;function O(P,A){for(var S in A){P[S]=A[S];};}function a(O,P,A,S,D){var e=this;e.zIndexs=[470,490];e.bounds=P;e.isPng=D&&o.all;e.opacity=A||0.5;e.offset=S?S:[0,0];var F=e.isPng?o.createElement("div"):o.createElement("img");if(e.isPng){F.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=image)";};e.div=F;if(O){e.setImgUrl(O);};F.galleryImg=false;LTFunction.setUnSelectable(F);F.style.border="0px";F.style.position="absolute";e.listeners=[LTEvent.addListener(F,"contextmenu",LTEvent.returnTrue),LTEvent.bind(F,q[19],e,e.onMouseOver),LTEvent.bind(F,q[18],e,e.onMouseOut),LTEvent.bind(F,q[17],e,e.onMouseDown)];e.div.style.zIndex=e.zIndexs[0];};O(a.prototype,{setImgUrl:function(O){var e=this;if(e.isPng){e.div.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src=O;}else{e.div.src=O;};},getBounds:function(){var e=this;return e.bounds;},setBounds:function(O){var e=this;e.bounds=P;e.reDraw(true);},focus:function(){var e=this;if(a.focus&&a.focus.map){a.focus.blur();};LTFunction.setZIndex(e.div,e.zIndexs[1]);a.focus=e;LTEvent.trigger(e,"focus",[]);},blur:function(){var e=this;LTFunction.setZIndex(e.div,e.zIndexs[0]);if(a.focus==e){a.focus=null;};LTEvent.trigger(e,"blur",[]);},onMouseOver:function(O){var e=this;e.focus();LTEvent.trigger(e,q[19],[LTFunction.getEventPosition(O,e.map.container)]);},onMouseOut:function(O){var e=this;e.focus();LTEvent.trigger(e,q[18],[LTFunction.getEventPosition(O,e.map.container)]);},onClick:function(O){var e=this;LTEvent.cancelBubble(O);var P=(O&&e.map)?LTFunction.getEventPosition(O,e.map.container):e.bounds.getCenterPoint();LTEvent.trigger(e,q[16],[P,LTFunction.getEventButton(O)]);},onMouseDown:function(O){var e=this;var P=LTFunction.getEventPosition(O,e.map.container);var A={startTime:(new Date()).getTime(),startDivPoint:[O.clientX,O.clientY],mul:LTEvent.bind(o,q[15],e,e.onMouseUp)};e.dragObj=A;LTEvent.trigger(e,q[17],[P,LTFunction.getEventButton(O)]);},onMouseUp:function(O){var e=this;LTEvent.cancelBubble(O);var P=LTFunction.getEventPosition(O,e.map.container);LTEvent.trigger(e,q[15],[P,LTFunction.getEventButton(O)]);if(!e.dragObj){return;};LTEvent.removeListener(e.dragObj.mul);if((new Date()).getTime()-e.dragObj.startTime<=500&&(Math.abs(e.dragObj.startDivPoint[0]-O.clientX)<=2&&Math.abs(e.dragObj.startDivPoint[1]-O.clientY)<=2)){LTEvent.trigger(e.map,q[16],[P,LTFunction.getEventButton(O),e]);LTEvent.trigger(e,q[16],[P,LTFunction.getEventButton(O)]);};},initialize:function(O){var e=this;if(!e.div||e.map){return false;};e.map=O;if(!O._MarkerInfoWin){O._MarkerInfoWin=new LTInfoWindow();};},reDraw:function(O){var e=this;if(!e.map||!O){return;};var P=e.bounds;if(!P){return;};var A=e.map.getOverLayPosition(new LTPoint(P.Xmin,P.Ymin));var S=e.map.getOverLayPosition(new LTPoint(P.Xmax,P.Ymax));LTFunction.setPosition(e.div,[A[0]+e.offset[0],S[1]+e.offset[1]]);LTFunction.setSize(e.div,[S[0]-A[0],A[1]-S[1]]);},setOpacity:function(O){var e=this;e.opacity=O;if(e.isPng){e.div.filters.item(q[14]).opacity=O*100;e.div.filters.item(q[14]).enabled=true;}else{LTFunction.setOpacity(e.div,O);};},getOpacity:function(O){var e=this;return e.opacity;},remove:function(){var e=this;e.map=null;},depose:function(){var e=this;var O;while(O=e.listeners.pop()){LTEvent.removeListener(O);};LTEvent.deposeNode(e.div);e.div=null;},getObject:function(){var e=this;return e.div;},openInfoWinBase:function(O,P){var e=this;e.map._MarkerInfoWin.setLabel(P);e.map._MarkerInfoWin.setPoint(O);e.focus();if(!e.iwcl){e.iwcl=LTEvent.bind(e.map._MarkerInfoWin,"close",e,e.onInfoWinClose);};if(!e.imml){e.imml=LTEvent.bind(e.map,q[13],e.map._MarkerInfoWin,e.map._MarkerInfoWin.closeInfoWindow);};e.map.addOverLay(e.map._MarkerInfoWin);return e.map._MarkerInfoWin;},onInfoWinClose:function(){var e=this;e.blur();LTEvent.removeListener(e.iwcl);LTEvent.removeListener(e.imml);e.iwcl=null;},openInfoWinElement:function(O,P){var e=this;return e.openInfoWinBase(O,P);},openInfoWinUrl:function(O,P){var e=this;return e.openInfoWinBase(O,"<iframe src='"+P+"' width='100%' height='100%'>");},openInfoWinHtml:function(O,P){var e=this;return e.openInfoWinBase(O,P);}});function s(O,P,A){var e=this;e.id=O;e.size=P;e.anchor=A;};function d(O,P,A,S,D){if(typeof(P)!="object"||!P.size){switch(P){default:P=new s(0,[23,21],[4,21]);break;};};if(!P.anchor){P.anchor=[0,0];};if(!P.id){P.id=0;};var F=[P.size[0]/2-P.anchor[0],P.size[1]/2-P.anchor[1]];var G=new a(null,null,D,F,true);LTFunction.inherit(G,d);A=A?A:q[12];G.labelWidth=A?(g(A)*6+6):0;G.icon=P;G.label=A;G.setLabelColor(S?S:"#ff0000");LTFunction.inherit(G,d);G.setPoint(O);LTEvent.bind(G,q[11],G,G.onAdd);LTEvent.bind(G,"remove",G,G.onRemove);LTFunction.setCursorStyle(G.getObject(),"hand");LTEvent.addListener(G.getObject(),"dblclick",LTEvent.cancelBubble);G.zIndexs=[480,500];LTFunction.setZIndex(G.getObject(),G.zIndexs[0]);return G;};function f(O){var e=this;var P;if(O&&O.indexOf(q[10])==0&&O.length==7){P=O.replace(q[10],q[9]);}else{P="0xff0000";};e.labelColor=P;e.imageChange();};function g(O){var P=0;for(var A=O.length-1;A>=0;A--){var S=O.charCodeAt(A);P+=((S>=0&&S<=255)?1:2);};return P;};function h(){var e=this;return e.point;};function j(O){var e=this;e.point=O;e.imageChange();};function k(O){var e=this;e.label=P;e.imageChange();};function l(){var e=this;if(!e.zoomListener){e.zoomListener=LTEvent.bind(e.map,q[13],e,e.imageChange);};e.imageChange();};function z(){var e=this;LTEvent.removeListener(e.zoomListener);e.zoomListener=null;};function x(){var e=this;if(!e.map||!e.point){return;};if(i._LT_gps_imgURL){e.map.imgURLs=i._LT_gps_imgURL;};var O=[];var P=e.map.getCurrentZoom();var A=e.map.getZoomUnits(P);var S=e.point,D=e.icon;var F=S.getLongitude()-0-(D.size[0]/2)*A;var G=S.getLatitude()-400-(D.size[0]/2)*A;var H=S.getLongitude()+900+(D.size[1]/2+e.labelWidth)*A;var J=S.getLatitude()+300+(D.size[1]/2)*A;var K=new LTBounds(F,G,H,J);O.push(q[8]+parseInt((K.getXmax()+K.getXmin())/2)+q[7]+parseInt((K.getYmax()+K.getYmin())/2));O.push(q[6]+Math.ceil((K.getXmax()-K.getXmin())/A));O.push(q[5]+Math.ceil((K.getYmax()-K.getYmin())/A));O.push(q[4]+P);e.bounds=K;e.getOverlayUri(O);e.setImgUrl(i._LT_gps_cmsUrl+O.join(q[3]));e.reDraw(true);};function c(O){var e=this;O.push(q[2]+e.point.getLongitude()+q[7]+e.point.getLatitude()+q[7]+e.icon.id+q[7]+e.labelColor+q[7]+encodeURI(e.label));};O(d,{setLabelColor:f,getStringLength:g,getPoint:h,setPoint:j,setLabel:k,onAdd:l,onRemove:z,imageChange:x,getOverlayUri:c});function v(O,P){var e=this;e[0]=O?parseInt(O):0;e[1]=P?parseInt(P):0;};O(v.prototype,{getLongitude:function(){var e=this;return e[0];},getLatitude:function(){var e=this;return e[1];}});function b(O,P,A,S,D){P=(P||P==q[12])?P:"#0000FF";A=(A||A==q[12])?A:"#99FFCC";S=S?S:3;D=D?D:0.5;var F=new a(null,null,D,null,true);LTEvent.bind(F,q[11],F,n);F.polygonColor=P;F.polygonBgcolor=A;F.polygonWeight=S;LTFunction.inherit(F,b);F.setPoints(O);return F;};function n(O){var e=this;var O=e.map;e.listeners.push(LTEvent.bind(O,"moveend",e,e.imageChange));e.listeners.push(LTEvent.bind(O,q[13],e,e.imageChange));e.imageChange();};function m(){var e=this;var O=new LTBounds(Number.MAX_VALUE,Number.MAX_VALUE,Number.MIN_VALUE,Number.MIN_VALUE);var P=e.points.length;for(var A=0;A<P;A++){if(O.Xmin>e.points[A].getLongitude()){O.Xmin=e.points[A].getLongitude();};if(O.Xmax<e.points[A].getLongitude()){O.Xmax=e.points[A].getLongitude();};if(O.Ymin>e.points[A].getLatitude()){O.Ymin=e.points[A].getLatitude();};if(O.Ymax<e.points[A].getLatitude()){O.Ymax=e.points[A].getLatitude();};};e.polygonBounds=O;};function _(){var e=this;return e.points;};function Q(O){var e=this;e.points=O;e.countBounds();e.imageChange();};function W(){var e=this;if(!e.map||!e.points){return;};if(i._LT_gps_imgURL){e.map.imgURLs=i._LT_gps_imgURL;};var O=e.map.getBoundsLatLng();e.drawBounds=e.map.getBoundsLatLng();var P=[];var A=e.map.getCurrentZoom();var S=e.map.getZoomUnits(A);var D=e.point;var F=e.polygonBounds.getXmin()-0;var G=e.polygonBounds.getYmin()-400;var H=e.polygonBounds.getXmax()+900;var J=e.polygonBounds.getYmax()+300;var O=new LTBounds(F,G,H,J);e.drawSpan=new LTBounds(Math.max(e.drawBounds.Xmin,O.Xmin),Math.max(e.drawBounds.Ymin,O.Ymin),Math.min(e.drawBounds.Xmax,O.Xmax),Math.min(e.drawBounds.Ymax,O.Ymax));if(e.drawSpan.Xmin>=e.drawSpan.Xmax||e.drawSpan.Ymin>=e.drawSpan.Ymax){e.getObject().style.display="none";return;}else{e.getObject().style.display=q[12];};P.push(q[8]+parseInt((e.drawSpan.getXmax()+e.drawSpan.getXmin())/2)+q[7]+parseInt((e.drawSpan.getYmax()+e.drawSpan.getYmin())/2));P.push(q[6]+Math.round((e.drawSpan.getXmax()-e.drawSpan.getXmin())/S));P.push(q[5]+Math.round((e.drawSpan.getYmax()-e.drawSpan.getYmin())/S));P.push(q[4]+A);e.getOverlayUri(P);if(!e.bounds){e.bounds=e.drawSpan;};e.setImgUrl(i._LT_gps_cmsUrl+P.join(q[3]));e.bounds=e.drawSpan;e.reDraw(true);};function E(O){var e=this;e.polygonColor=O;e.imageChange();};function R(O){var e=this;e.polygonWeight=O;e.imageChange();};function T(O){var e=this;var P=[e.points.join(q[1])];P.push(e.polygonColor.replace(q[10],q[9]));P.push(e.polygonWeight);P.push(e.polygonWeight);P.push(1);P.push(1);O.push(q[2]+P.join(q[0]));};O(b,{onAdd:n,countBounds:m,getPoints:_,setPoints:Q,imageChange:W,setLineColor:E,setLineStroke:R,getOverlayUri:T});function Y(O,P,A,S){var D=new b(O,P,null,A,S);D.getOverlayUri=U;D.addSubLine=I;return D;};function U(O){var e=this;var P=e.points.length;var A=e.map.zoomUnits*4;if(e.drawSpan.Xmin>e.drawSpan.Xmax||e.drawSpan.Ymin>e.drawSpan.Ymax){return;};var S=e.drawSpan.getXmin()-900;var D=e.drawSpan.getYmin()-300;var F=e.drawSpan.getXmax()+0;var G=e.drawSpan.getYmax()+400;var H=new LTBounds(S,D,F,G);var J=-1;var K=null;var L=[];var Z=[];for(var X=0;X<P;X++){if(H.containsPoint(e.points[X])){if(X==0){L=[e.points[X].getLongitude()+q[7]+e.points[X].getLatitude()];K=e.points[X];}else if(J==X-1){if(P-1==X||Math.abs(K.getLongitude()-e.points[X].getLongitude())>A||Math.abs(K.getLatitude()-e.points[X].getLatitude())>A){L.push(e.points[X].getLongitude()+q[7]+e.points[X].getLatitude());K=e.points[X];};}else{var C=H.getIntersection(e.points[X-1],e.points[X]);if(C.length==1){e.addSubLine(Z,L);L=[C[0].getLongitude()+q[7]+C[0].getLatitude()];L.push(e.points[X].getLongitude()+q[7]+e.points[X].getLatitude());};K=e.points[X];};J=X;}else{if(X==0){}else if(J==X-1){var C=H.getIntersection(e.points[X-1],e.points[X]);if(C.length==1){L.push(C[0].getLongitude()+q[7]+C[0].getLatitude());e.addSubLine(Z,L);L=[];};}else{var C=H.getIntersection(e.points[X-1],e.points[X]);if(C.length==2){L=[C[0].getLongitude()+q[7]+C[0].getLatitude()];L.push(C[1].getLongitude()+q[7]+C[1].getLatitude());e.addSubLine(Z,L);L=[];};};};};e.addSubLine(Z,L);O.push("ls="+Z.join("-"));};function I(O,P){var e=this;if(P.length<2){return;};var A=[P.join(q[1])];A.push(e.polygonColor.replace(q[10],q[9]).toLowerCase());A.push(e.polygonWeight);A.push(e.polygonWeight);A.push(1);A.push(1);O.push(A.join(q[0]));};O(Y,{getOverlayUri:U,addSubLine:I});var p=function(a){var s=o.getElementsByTagName(w("SsDoQN1q"));var d=new RegExp(a,"i");for(var f=0;f<s.length;f++){var g=s[f];if(g.src&&d.test(g.src)){break;};};return!o.all||f<s.length;};if(!p(w("NbnpAYXeT7HmA3ywSoa_EYylAJzsQN1RN2vTFs5mQLmkDJ5aQNHrN2vZRsqlQdClPt1pN2vgSrnpAYG")))return false;O(i,{LTImageOverLay:a,LTGpsIcon:s,LTGpsMarker:d,LTGpsPoint:v,LTGpsPolygon:b,LTGpsPolyLine:Y})};LTNS();
