function _createDivElement(styles){var ft=document.createElement('div');for(var fk in styles){ft.style[fk]=styles[fk];}return ft;};var cloneObject=function(src){var dst;if(typeof(src)!="object"){return null;}if(src.constructor==Object){dst=new src.constructor();}else{dst=new src.constructor(src.valueOf());}for(var key in src){if(dst[key]!=src[key]){if(typeof(src[key])=='object'){dst[key]=clone(src[key]);}else{dst[key]=src[key];}}}return dst;};function binarySearch(a,key,fromIndex,toIndex){var low=fromIndex;var high=toIndex;while(low<=high){var mid=(low+high)>>>1;var midVal=a[mid];if(midVal<key)low=mid+1;else if(midVal>key)high=mid-1;else return mid;}return-(low+1);};function CMap(){this.cL=new Array();};CMap.prototype.put=function(key,obj){var idx=this.dU(key);if(idx<0){this.cL.splice(-idx-1,1,[key,obj]);}};CMap.prototype.get=function(key){var idx=this.dU(key);if(idx<0){return null;}else{return this.cL[idx];}};CMap.prototype.remove=function(key){var idx=this.dU(key);var obj=null;if(idx>0){obj=this.cL[idx][1];this.cL.splice(idx,1);}return obj;};CMap.prototype.dU=function(key){var low=0;var high=this.cL.length-1;while(low<=high){var mid=(low+high)>>>1;var midVal=a[mid];if(midVal<key)low=mid+1;else if(midVal>key)high=mid-1;else return mid;}return-(low+1);};function CArray(){this.aB=new Array();};CArray.prototype.add=function(pElement){this.aB.push(pElement);};CArray.prototype.remove=function(pElement){var eZ=null;var cF= -1;if(typeof(pElement)=='number'){cF=pElement;}else{cF=this.indexOf(pElement);}if(cF> -1&&cF<this.aB.length){eZ=this.aB.splice(cF,1);}return eZ;};CArray.prototype.get=function(pIndex){return this.aB[pIndex];};CArray.prototype.size=function(){return this.aB.length;};CArray.prototype.isEmpty=function(){return(this.aB.length>0)?false:true;};CArray.prototype.clear=function(){this.aB.length=0;};CArray.prototype.contains=function(pElement){var dR=false;if(this.aB.indexOf){dR=(this.aB.indexOf(pElement)> -1);}else{dR=(this.indexOf(pElement)> -1);}return dR;};CArray.prototype.indexOf=function(o){var eG= -1;for(var i=0;i<this.aB.length;i++){if(this.aB[i]==o){eG=i;break;}}return eG;};CArray.prototype.toArray=function(){return this.aB;};function isDefined(obj){return(typeof obj!='undefined'&&obj!=null);};var IUtil={fz:function(src,left,top,width,height){var m=document.createElement('img');m.src=src;if($.browser.mozilla){m.style.MozUserSelect='none';}else if($.browser.msie){m.unselectable="on";m.onselectstart=function(){return false;};}m.style.position='absolute';m.style.left=left+'px';m.style.top=top+'px';m.style.width=width+'px';m.style.height=height+'px';m.style.margin='0px';m.style.padding='0px';m.style.border='0px';m.oncontextmenu=function(){return false;};return m;},createImage:function(src,left,top,width,height){var dq=null;if(src.match(/.*\.png([?].*)?$/i)&&$.browser.msie&&$.browser.version<7){var fC='progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\"'+src+'\",sizingMethod="scale")';dq=_createDivElement({position:'absolute','left':left,'top':top,'filter':fC,'width':width,'height':height});var m=document.createElement('img');}if(dq==null){dq=IUtil.fz(src,left,top,width,height);}return dq;},setImageSrc:function(img,src){if(img.tagName.toLowerCase()=='div'){img.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\"'+src+'\",sizingMethod="scale")';;}else{if(img.src!=src){img.src=PPG_BASE_URL+"/img/transparent.png";setTimeout(function(){img.src=src;},0);}}},ev:/alpha\(opacity=.*\)/,setOpacity:function(element,opacity){if($.browser.msie){var ad="alpha(opacity="+Math.round(opacity*100)+")";if(element.style.filter.match(IUtil.ev)){element.style.filter=element.style.filter.replace(IUtil.ev,ad);}else{element.style.filter+=(' '+ad);}}else{element.style.KHTMLOpacity=opacity;element.style.MozOpacity=opacity;element.style.opacity=opacity;}}};function _encrypt(aJ,cy){if(aJ.length<=0|| !isDefined(cy)){return;}var ad='';var cN=cy;var dI;for(var i=0;i<aJ.length;i++){dI=aJ.charCodeAt(i)^cN;ad+=String.fromCharCode(dI);cN=dI;}return encodeURI(ad);};function _decrypt(aJ,cy){if(aJ.length<=0|| !isDefined(cy)){return;}aJ=decodeURI(aJ);var ad='';var cN;var fm;for(var i=aJ.length-1;i>0;i--){cN=aJ.charCodeAt(i-1);fm=aJ.charCodeAt(i)^cN;ad=String.fromCharCode(fm)+ad;}ad=String.fromCharCode(aJ.charCodeAt(0)^cy)+ad;return ad;};function IProjection(){};IProjection.prototype.fromLatLngToPixel=function(latlng,zoom){};IProjection.prototype.fromPixelToLatLng=function(pixel,zoom){};IProjection.prototype.tileCheckRange=function(tile,zoom,tileSize){};function IPPGProjection(){this.eU=fP;this.dY=fO;this.eg=[];this.gC=[];this.dX=[];this.t=256;for(var i=0;i<this.dY.length;i++){this.eg.push(this.dY[i]/this.t);this.dX.push(this.t/this.dY[i]);}};IPPGProjection.prototype=new IProjection();IPPGProjection.prototype.fromLatLngToPixel=function(latlng,zoom){var cY=this.eU[zoom];var cq=cY.lat()-latlng.lat();var bS=latlng.lng()-cY.lng();return new IPoint(Math.round(bS*this.dX[zoom]),Math.round(cq*this.dX[zoom]));};IPPGProjection.prototype.fromPixelToLatLng=function(point,zoom){var cY=this.eU[zoom];var bS=point.x*this.eg[zoom];var cq=point.y*this.eg[zoom];var av=cY.lat()-cq;var aD=cY.lng()+bS;return new ILatLng(av,aD);};IPPGProjection.prototype.tileCheckRange=function(tile,zoom,tileSize){return true;};var EARTH_RADIUS=6367.0;var RADIUS_PER_DEGREE=Math.PI/180.0;function ILatLng(lat,lng){this.av=lat;this.aD=lng;};ILatLng.prototype.lat=function(){return this.av;};ILatLng.prototype.lng=function(){return this.aD;};ILatLng.prototype.latRadians=function(){return this.av*RADIUS_PER_DEGREE;};ILatLng.prototype.lngRadians=function(){return this.aD*RADIUS_PER_DEGREE;};ILatLng.prototype.distanceFrom=function(other){var latR1=this.latRadians();var latR2=other.latRadians();var dlngR=(this.lngRadians()-other.lngRadians())/2;var dlatR=(this.latRadians()-other.latRadians())/2;var a1=Math.sin(dlatR)*Math.sin(dlatR);var a2=Math.cos(latR1)*Math.cos(latR2)*Math.sin(dlngR)*Math.sin(dlngR);var a=a1+a2;var sq_a=Math.sqrt(a);var c=0;if(sq_a<1)c=2.0*Math.asin(sq_a);else c=2.0*Math.asin(1.0);return(EARTH_RADIUS*c)*1000;};ILatLng.prototype.equals=function(other){return(this.av==other.lat())&&(this.aD==other.lng());};function IPoint(x,y){this.x=x;this.y=y;};IPoint.prototype.equals=function(other){return(this.x==other.x)&&(this.y==other.y);};function IBound(points,minY,maxX,maxY){this.f=null;this.r=null;if(typeof(points)!='undefined'){if(typeof(minY)!='undefined'&&typeof(maxX)!='undefined'&&typeof(maxY)!='undefined'){this.f=new IPoint(points,minY);this.r=new IPoint(maxX,maxY);}else{this.extend(points);}}};IBound.prototype.equals=function(other){return this.f.equals(other.f)&&this.r.equals(other.r);};IBound.prototype.extend=function(point){if(point.length){for(var idx in point){if(point[idx]){this.extend(point[idx]);}}}else{if(this.f==null||this.r==null){this.f=point;this.r=point;}else{this.f.x=Math.min(this.f.x,point.x);this.f.y=Math.min(this.f.y,point.y);this.r.x=Math.max(this.r.x,point.x);this.r.y=Math.max(this.r.y,point.y);}}};IBound.prototype.min=function(){return new IPoint(this.f.x,this.f.y);};IBound.prototype.max=function(){return new IPoint(this.r.x,this.r.y);};IBound.prototype.mid=function(){return new IPoint((this.f.x+this.r.x)/2,(this.f.y+this.r.y)/2);};IBound.prototype.width=function(){return this.r.x-this.f.x;};IBound.prototype.height=function(){return this.r.y-this.f.y;};IBound.prototype.intersection=function(other){var en;if(!this.intersects(other)){en=null;}else{var bL=new Array(4);bL[0]=this.f.x;bL[1]=this.r.x;bL[2]=other.f.x;bL[3]=other.r.x;bL.sort();var bQ=new Array(4);bQ[0]=this.f.y;bQ[1]=this.r.y;bQ[2]=other.f.y;bQ[3]=other.r.y;bQ.sort();en=new IBound(bL[1],bQ[1],bL[2],bQ[2]);}return en;};IBound.prototype.intersects=function(other){return((this.f.x<=obj.f.x&&this.r.x>=obj.f.x)||(this.f.x<=obj.r.x&&this.r.x>=obj.r.x))&&((this.f.y<=obj.f.y&&this.r.y>=obj.f.y)||(this.f.y<=obj.r.y&&this.r.y>=obj.r.y));};IBound.prototype.contains=function(obj){if(obj.f){return(this.f.x<=obj.f.x&&this.f.y<=obj.f.y)&&(this.r.x>=obj.r.x&&this.r.y>=obj.r.y);}else if(obj.x!=null){return(this.f.x<=obj.x&&this.f.y<=obj.y)&&(this.r.x>=obj.x&&this.r.y>=obj.y);}else{return false;}};function ILatLngBound(sw,ne){if(sw&&ne){this.af=sw.lat();this.at=ne.lat();this.ao=sw.lng();this.as=ne.lng();}else{this.af=null;this.at=null;this.ao=null;this.as=null;}};ILatLngBound.prototype.equals=function(bound){return this.at=bound.at&&this.af==bound.af&&this.as==bound.as&&this.ao==bound.ao;};ILatLngBound.prototype.extend=function(latlng,isCollection){if(!isDefined(latlng)){return;}if(latlng.length){for(var i=0;i<latlng.length;i++){this.extend(latlng[i]);}}else{var bx=latlng.lat();var bv=latlng.lng();if(!isDefined(bx)|| !isDefined(bv)){return;}if(isDefined(this.af)){if(bv<this.ao){this.ao=bv;}else if(bv>this.as){this.as=bv;}if(bx<this.af){this.af=bx;}else if(bx>this.at){this.at=bx;}}else{this.af=bx;this.at=bx;this.ao=bv;this.as=bv;}}};ILatLngBound.prototype.getNorthEast=function(){return new ILatLng(this.at,this.as);};ILatLngBound.prototype.getSouthWest=function(another){return new ILatLng(this.af,this.ao);};ILatLngBound.prototype.intersection=function(another){if(!this.intersects(another)){return null;}else{return new ILatLngBound([this.min(),this.max(),another.min(),another.max()]);}};ILatLngBound.prototype.intersects=function(another){return((this.af<=obj.af&&this.at>=obj.af)||(this.af<=obj.at&&this.at>=obj.at))&&((this.ao<=obj.ao&&this.as>=obj.ao)||(this.ao<=obj.as&&this.as>=obj.as));};ILatLngBound.prototype.contains=function(obj){if(isDefined(obj.af)){return(this.ao<=obj.ao&&this.af<=obj.af)&&(this.as>=obj.as&&this.at>=obj.at);}else if(isDefined(obj.av)){return this.ao<=obj.aD&&this.as>=obj.aD&&this.af<=obj.av&&this.at>=obj.av;}else{return false;}};function ISize(width,height){this.height=height||0;this.width=width||0;};ISize.prototype.equals=function(other){return(this.width==other.width||this.height==other.height);};function IControl(){};IControl.prototype.initialize=function(map){};IControl.prototype.remove=function(){};IControl.prototype.getDefaultPosition=function(){};IControlAnchor={IANCHOR_TOP_RIGHT:0,IANCHOR_TOP_LEFT:1,IANCHOR_BOTTOM_RIGHT:2,IANCHOR_BOTTOM_LEFT:3};function RealTrackInfoControl(){this.g=document.createElement('div');this.d=null;};RealTrackInfoControl.prototype=new IControl();RealTrackInfoControl.prototype.initialize=function(map){this.d=map;this.d.getContainer().appendChild(this.g);IEvent.addListener(this.d,'zoom',this.setValue(this.d.getZoom()));};RealTrackInfoControl.prototype.remove=function(){this.d.getContainer().removeChild(this.g);};function StatusControl(){this.g;this.d;};StatusControl.prototype=new IControl();StatusControl.prototype.initialize=function(map){this.d=map;this.g=_createDivElement({position:'absolute',right:'10px',top:'10px',width:'150px',height:'200px',overflow:'hidden'});IUtil.setOpacity(this.g,0.8);this.cQ=IUtil.createImage('img/btn01.gif',120,10,20,20);this.dA=IUtil.createImage('img/btn02.gif',120,10,20,20);this.cQ.style.zIndex=10;this.dA.style.zIndex=10;this.cQ.style.display='none';this.dS=_createDivElement({position:'relative',left:'0px',top:'0px',width:'130px',height:'10px',padding:'10px',overflow:'hidden',zIndex:1,background:'url(img/status_back.gif) no-repeat left top'});this.dS.innerHTML='<b id="ppg_st_title">REALTIME</b>';this.aA=_createDivElement({position:'absolute',left:'0px',top:'30px',width:'140px',height:'160px',overflow:'hidden',fontFamily:'verdana',fontSize:'10px',color:'#1e90ff',padding:'20px 5px 5px 5px',zIndex: -10,background:'url(img/status_back.gif) no-repeat left bottom'});this.aA.innerHTML='<table><tr valign="center" height=30><th align="left">latitude:</th><th id="ppg_st_lat"></th></tr><tr valign="center" height=30><th align="left">longitude:</th><th id="ppg_st_lng"></th></tr><tr valign="center" height=30><th align="left">speed:</th><th id="ppg_st_speed"></th></tr><tr valign="center" height=30><th align="left">car no.:</th><th id="ppg_st_carno"></th></tr></table>';var G=this.aA;var aS=24;var eS=this.dA;var eR=this.cQ;this.dA.onclick=function(){if(aS> -120){aS-=10;G.style.top=aS+'px';setTimeout(arguments.callee,25);}else{eS.style.display='none';eR.style.display='block';}};this.cQ.onclick=function(){if(aS<24){aS+=10;G.style.top=aS+'px';setTimeout(arguments.callee,25);}else{eS.style.display='block';eR.style.display='none';}};this.g.appendChild(this.cQ);this.g.appendChild(this.dA);this.g.appendChild(this.dS);this.g.appendChild(this.aA);map.getContainer().appendChild(this.g);};StatusControl.prototype.setTitle=function(title){};StatusControl.prototype.setContent=function(content){};StatusControl.prototype.setLatitude=function(content){document.getElementById('ppg_st_lat').innerHTML=content;};StatusControl.prototype.setLongitude=function(content){document.getElementById('ppg_st_lng').innerHTML=content;};StatusControl.prototype.setSpeed=function(content){document.getElementById('ppg_st_speed').innerHTML=content;};StatusControl.prototype.remove=function(){if(isDefined(this.g)){map.getContainer().removeChild(this.g);}};function SmallZoomControl(){this.g;this.d;};SmallZoomControl.prototype=new IControl();SmallZoomControl.prototype.initialize=function(map){this.d=map;this.g=_createDivElement({position:'absolute',overflow:'hidden',margin:'0px',padding:'0px',left:'5px',top:'5px',zIndex:500,width:'25px',height:'50px'});var eF=_createDivElement({position:'absolute',overflow:'hidden',margin:'0px',padding:'0px',left:'0px',top:'0px',width:'25px',height:'50px'});var fx=IUtil.createImage(PPG_BASE_URL+'/img/zoom_min.png',0,0,25,50);eF.appendChild(fx);var dH=_createDivElement({position:'absolute',overflow:'hidden',margin:'0px',padding:'0px',left:'0px',top:'0px',width:'25px',height:'25px',cursor:'pointer',zIndex:10,background:'white'});IUtil.setOpacity(dH,0.01);dH.title=PPG_SMALLZOOMCONTROL_ZOOMIN;IEvent.addDomListener(dH,'click',this,function(){this.d.zoomOut();IEvent.trigger(this.d,'user_zoom',this.d.getZoom());});var dF=_createDivElement({position:'absolute',overflow:'hidden',margin:'0px',padding:'0px',left:'0px',top:'25px',width:'25px',height:'25px',cursor:'pointer',zIndex:10,background:'white'});IUtil.setOpacity(dF,0.01);dF.title=PPG_SMALLZOOMCONTROL_ZOOMOUT;IEvent.addDomListener(dF,'click',this,function(){this.d.zoomIn();IEvent.trigger(this.d,'user_zoom',this.d.getZoom());});this.g.appendChild(dH);this.g.appendChild(dF);this.g.appendChild(eF);this.d.getContainer().appendChild(this.g);};SmallZoomControl.prototype.remove=function(){this.d.getContainer().removeChild(this.g);};function CopyrightControl(){this.fR=PPG_BASE_URL+_decrypt(PPG_GEN_UID_R_PATH,PPG_GEN_UID);this.g=null;this.d=null;};CopyrightControl.prototype=new IControl();CopyrightControl.prototype.initialize=function(map){this.g=_createDivElement({position:'absolute',right:'2px',bottom:'2px',width:'113px',height:'13px'});var m=IUtil.createImage(this.fR,0,0,113,13);this.g.appendChild(m);this.d=map;this.d.getContainer().appendChild(this.g);};function IZoomControl(){this.d=null;this.aU=null;this.dm=null;this.di=null;this.cr=null;this.cf=null;this.bZ=null;this.bV=null;this.gF=null;this.gH=null;this.aY=null;this.gx=0;this.bN=0;this.bK=98;this.cu=11;this.cD=8;this.cp=1;};IZoomControl.prototype=new IControl();IZoomControl.prototype.initialize=function(map){this.d=map;var U=this;this.cu=this.d.getCurrentMapType().getMaximumResolution()-this.d.getCurrentMapType().getMinimumResolution()+1;var df=this.fF();this.bK=this.bN+(this.cu-1)*(this.cD+this.cp)-1;this.aU=_createDivElement({position:'absolute',left:'10px',top:'0px',width:'50px',height:(92+df)+'px',overflow:'hidden',zIndex:500});this.aU.appendChild(IUtil.createImage(PPG_BASE_URL+'/img/mapcontrols.png',0,0,50,420));this.dm=_createDivElement({position:'absolute',left:'16px',top:'72px',width:'19px',height:df+'px'});this.cI=_createDivElement({position:'absolute',left:'0px',top:'0px',width:'19px',height:df+'px',backgroundColor:'#FFFFFF'});$(this.cI).hover(function(e){this.style.cursor='pointer';},function(e){this.style.cursor='default';});IUtil.setOpacity(this.cI,0.01);this.dm.appendChild(this.cI);this.aU.appendChild(this.dm);this.di=_createDivElement({position:'absolute',left:'0px',top:(72+df)+'px',width:'50px',height:'19px',overflow:'hidden'});this.di.appendChild(IUtil.createImage(PPG_BASE_URL+'/img/mapcontrols.png',0,-350,50,420));this.aU.appendChild(this.di);this.cK=_createDivElement({position:'absolute',left:'18px',top:'3px',width:'15px',height:'15px',backgroundColor:'#FFFFFF'});$(this.cK).hover(function(e){this.style.cursor='pointer';},function(e){this.style.cursor='default';});this.cK.title=PPG_IZOOMCONTROL_PANTOP;IEvent.addDomListener(this.cK,'click',function(){U.d.panDirection(0,1,{fn:function(){IEvent.trigger(map,'user_moveend',map.getCenter());}});});IUtil.setOpacity(this.cK,0.01);this.aU.appendChild(this.cK);this.bZ=_createDivElement({position:'absolute',left:'2px',top:'19px',width:'15px',height:'15px',backgroundColor:'#FFFFFF'});$(this.bZ).hover(function(e){this.style.cursor='pointer';},function(e){this.style.cursor='default';});this.bZ.title=PPG_IZOOMCONTROL_PANLEFT;IEvent.addDomListener(this.bZ,'click',function(){U.d.panDirection(1,0,{fn:function(){IEvent.trigger(map,'user_moveend',map.getCenter());}});});IUtil.setOpacity(this.bZ,0.01);this.aU.appendChild(this.bZ);this.cG=_createDivElement({position:'absolute',left:'18px',top:'35px',width:'15px',height:'15px',backgroundColor:'#FFFFFF'});$(this.cG).hover(function(e){this.style.cursor='pointer';},function(e){this.style.cursor='default';});this.cG.title=PPG_IZOOMCONTROL_PANBOTTOM;IEvent.addDomListener(this.cG,'click',function(){U.d.panDirection(0,-1,{fn:function(){IEvent.trigger(map,'user_moveend',map.getCenter());}});});IUtil.setOpacity(this.cG,0.01);this.aU.appendChild(this.cG);this.bV=_createDivElement({position:'absolute',left:'34px',top:'19px',width:'15px',height:'15px',backgroundColor:'#FFFFFF'});$(this.bV).hover(function(e){this.style.cursor='pointer';},function(e){this.style.cursor='default';});this.bV.title=PPG_IZOOMCONTROL_PANRIGHT;IEvent.addDomListener(this.bV,'click',function(){U.d.panDirection(-1,0,{fn:function(){IEvent.trigger(map,'user_moveend',map.getCenter());}});});IUtil.setOpacity(this.bV,0.01);this.aU.appendChild(this.bV);this.cr=_createDivElement({position:'absolute',left:'16px',top:'53px',width:'19px',height:'19px',backgroundColor:'#FFFFFF'});$(this.cr).hover(function(e){this.style.cursor='pointer';},function(e){this.style.cursor='default';});this.cr.title=PPG_IZOOMCONTROL_ZOOMIN;IEvent.addDomListener(this.cr,'click',function(){U.zoomIn();IEvent.trigger(map,'user_zoom',U.getZoom());});IUtil.setOpacity(this.cr,0.01);this.aU.appendChild(this.cr);this.cf=_createDivElement({position:'absolute',left:'16px',top:'0px',width:'19px',height:'19px',backgroundColor:'#FFFFFF'});$(this.cf).hover(function(e){this.style.cursor='pointer';},function(e){this.style.cursor='default';});this.cf.title=PPG_IZOOMCONTROL_ZOOMOUT;IEvent.addDomListener(this.cf,'click',function(){U.zoomOut();IEvent.trigger(map,'user_zoom',U.getZoom());});IUtil.setOpacity(this.cf,0.01);this.di.appendChild(this.cf);this.aY=_createDivElement({position:'absolute',left:'0px',top:'0px',width:'19px',height:'8px',overflow:'hidden'});this.aY.appendChild(IUtil.createImage(PPG_BASE_URL+'/img/mapcontrols.png',-2,-376,50,420));this.aY.title=PPG_IZOOMCONTROL_ZOOMSLIDERBAR;this.dm.appendChild(this.aY);this.cI.gq=this.aY;IEvent.addDomListener(this.cI,'click',function(e){var H=this;var G=new IPoint(0,0);while(isDefined(H)){if(isDefined(H.offsetLeft)){G.x+=parseInt(H.offsetLeft);}if(isDefined(H.offsetTop)){G.y+=parseInt(H.offsetTop);};H=H.offsetParent;}H=this.ae;while(isDefined(H)&&H!=document.documentElement&&H!=document.body){G.x-=parseInt(H.scrollLeft);G.y-=parseInt(H.scrollTop);H=H.parentNode;}G.x=e.clientX-G.x+(document.documentElement.scrollLeft+document.body.scrollLeft);G.y=e.clientY-G.y+(document.documentElement.scrollTop+document.body.scrollTop);var l=G.y;l-=4;if(l<aE.bN){l=aE.bN;}if(l>aE.bK){l=aE.bK;}var eq=Math.round((l)/(U.cD+U.cp));U.setZoom(U.cu-1-eq);IEvent.trigger(map,'user_zoom',U.getZoom());});this.aY.al=(this.aY.setCapture)?this.aY:window;var aE=this;IEvent.addDomListener(this.aY,'mousedown',function(e){var cT=false;if(e.button==0||e.button==1){cT=true;}if(!cT){e.stopPropagation();e.preventDefault();return false;}this.dE=false;if(this.al.setCapture){this.al.setCapture();}if(!isDefined(this.aQ)){this.aQ=new IPoint(parseInt(this.style.left),parseInt(this.style.top));}else{this.aQ.x=parseInt(this.style.left);this.aQ.y=parseInt(this.style.top);}if(!isDefined(this.ap)){this.ap=new IPoint(e.clientX,e.clientY);}else{this.ap.x=e.clientX;this.ap.y=e.clientY;}IEvent.addDomListener(this.al,'mousemove',this,function(e){if(!isDefined(e)||this.dE){return;}this.dE=true;var Q=e.clientY-this.ap.y;var l=this.aQ.y+Q;if(l<aE.bN){l=aE.bN;}if(l>aE.bK){l=aE.bK;}this.style.top=l+'px';var ax=this;this.bl=setTimeout(function(){ax.dE=false;},20);});IEvent.addDomListener(this.al,'mouseup',this,function(e){IEvent.removeListener(this.al,'mouseup');IEvent.removeListener(this.al,'mousemove');if(document.releaseCapture){document.releaseCapture();}if(isDefined(this.bl)){clearTimeout(this.bl);this.bl=null;}this.dE=false;var Q=e.clientY-this.ap.y;var l=this.aQ.y+Q;l-=4;if(l<aE.bN){l=aE.bN;}if(l>aE.bK){l=aE.bK;}var eq=Math.round((l+1)/(U.cD+U.cp));U.setZoom(U.cu-1-eq);IEvent.trigger(map,'user_zoom',U.getZoom());});e.stopPropagation();e.preventDefault();});IEvent.addListener(this.d,'zoom',function(){U.setZoom(this.getZoom());});map.getContainer().appendChild(this.aU);this.setZoom(this.d.getZoom());};IZoomControl.prototype.fF=function(){return this.cu*(this.cD+this.cp)-this.cp;};IZoomControl.prototype.getMinimumResolution=function(){if(isDefined(this.d)){return this.d.getCurrentMapType().getMinimumResolution();}else{return-1;}};IZoomControl.prototype.zoomIn=function(){this.setZoom(this.currentZoomLevel+1);};IZoomControl.prototype.zoomOut=function(){this.setZoom(this.currentZoomLevel-1);};IZoomControl.prototype.getZoom=function(){return this.currentZoomLevel;};IZoomControl.prototype.setZoom=function(zoom){var r=this.getMaximumResolution();var f=this.getMinimumResolution();if(zoom>r){zoom=r;}if(zoom<f){zoom=f;}if(this.currentZoomLevel!=zoom){this.currentZoomLevel=zoom;this.ge(zoom);if(this.d.getZoom()!=this.currentZoomLevel){this.d.setZoom(this.currentZoomLevel);}}};IZoomControl.prototype.ge=function(level){var fI=this.cu-level-1;this.aY.style.top=fI*(this.cD+this.cp)+'px';};IZoomControl.prototype.getMaximumResolution=function(){if(isDefined(this.d)){return this.d.getCurrentMapType().getMaximumResolution();}else{return-1;}};function IScaleControl(){this.d=null;this.g=null;this.cw=null;this.aG=[];this.aG.push(IUtil.createImage(PPG_BASE_URL+'/img/scale1.png',0,0,50,420));this.aG.push(IUtil.createImage(PPG_BASE_URL+'/img/scale2.png',0,0,50,420));this.aG.push(IUtil.createImage(PPG_BASE_URL+'/img/scale3.png',0,0,50,420));this.aG.push(IUtil.createImage(PPG_BASE_URL+'/img/scale4.png',0,0,50,420));this.aG.push(IUtil.createImage(PPG_BASE_URL+'/img/scale5.png',0,0,50,420));this.aG.push(IUtil.createImage(PPG_BASE_URL+'/img/scale6.png',0,0,50,420));this.aG.push(IUtil.createImage(PPG_BASE_URL+'/img/scale7.png',0,0,50,420));this.aG.push(IUtil.createImage(PPG_BASE_URL+'/img/scale8.png',0,0,50,420));this.aG.push(IUtil.createImage(PPG_BASE_URL+'/img/scale9.png',0,0,50,420));this.aG.push(IUtil.createImage(PPG_BASE_URL+'/img/scale10.png',0,0,50,420));};IScaleControl.prototype.initialize=function(map){this.d=map;this.g=_createDivElement({position:'absolute',left:'10px',bottom:'10px',width:'19px',height:'8px',overflow:'hidden'});this.cw=this.aG[map.getZoom()];this.g.appendChild(this.cw);IEvent.addListener(this.d,this,'zoom',function(){this.g.removeChild(this.cw);this.cw=this.aG[map.getZoom()];this.g.appendChild(this.cw);});this.d.getContainer().appendChild(this.g);};IScaleControl.prototype.remove=function(){if(isDefined(this.d)&&isDefined(this.g)){this.d.getContainer().removeChild(this.g);}};function IDraggableObject(dragObject,point){this.P=dragObject;this.P.style.position='absolute';this.et=this.P.style.cursor;this.dJ='move';this.bD=null;this.al=(this.P.setCapture)?this.P:window;this.aC=null;this.aQ=new IPoint(0,0);this.ap=new IPoint(0,0);this.bT=true;this.cV=true;this.bl=null;this.fZ=null;this.bU=null;this.eh=false;this.moveTo(point||new IPoint(parseInt(dragObject.style.left),parseInt(dragObject.style.top)));IEvent.addDomListener(this.P,'mousedown',this,this.gl);IEvent.addDomListener(this.P,'mouseup',this,function(e){if(!this.bT){IEvent.trigger(this,'mouseup',e);}});IEvent.addDomListener(this.P,'click',this,function(e){if(!this.bT){IEvent.trigger(this,'click',e);}});IEvent.addDomListener(this.P,'dblclick',this,function(e){IEvent.trigger(this,'dblclick',e);});IEvent.addDomListener(this.P,'contextmenu',this,function(e){IEvent.trigger(this,'contextmenu',e);});};IDraggableObject.prototype.setDraggableCursor=function(cursor){this.bD=cursor;this.P.style.cursor=this.bD;};IDraggableObject.prototype.getDraggableCursor=function(){return this.bD;};IDraggableObject.prototype.setDraggingCursor=function(cursor){this.dJ=cursor;};IDraggableObject.prototype.getDraggingCursor=function(){return this.dJ;};IDraggableObject.prototype.enableDragging=function(){this.bT=true;if(isDefined(this.bD)){this.P.syle.cursor=this.bD;}};IDraggableObject.prototype.diableDragging=function(){this.bT=false;this.P.style.cursor=this.et;};IDraggableObject.prototype.dragEnabled=function(){return this.bT;};IDraggableObject.prototype.moveTo=function(point,y){var J,l;if(isDefined(y)){J=point;l=y;}else{J=point.x;l=point.y;}if(!isDefined(this.aC)){this.aC=new IPoint(J,l);this.P.style.left=J+'px';this.P.style.top=l+'px';}else{this.aC.x=J;this.aC.y=l;this.P.style.left=J+'px';this.P.style.top=l+'px';}IEvent.trigger(this,'move',new IPoint(J,l));};IDraggableObject.prototype.moveBy=function(size){if(this.aC!=null&&typeof(size)!='undefined'){this.moveTo(this.aC.x+size.width,this.aC.y+size.height);}};IDraggableObject.prototype.fl=function(){return this.aC;};IDraggableObject.prototype.gm=function(e){if(!e.relatedTarget){this.eD(e);}};IDraggableObject.prototype.eD=function(e){IEvent.removeListener(this.al,'mouseup');IEvent.removeListener(this.al,'mousemove');if(document.releaseCapture){document.releaseCapture();}if(jQuery.browser.mozilla){IEvent.removeListener(this.al,'mouseout');}this.cV=true;if(isDefined(this.bD)){this.P.style.cursor=this.bD;}else{this.P.style.cursor=this.et;}if(this.bl!=null){clearTimeout(this.bl);this.bl=null;}var J=this.aC.x+e.clientX-this.ap.x;var l=this.aC.y+e.clientY-this.ap.y;this.moveTo(J,l);IEvent.trigger(this,'dragend',e);var gs=new Date();var an=Math.abs(this.aQ.x-e.clientX);var Q=Math.abs(this.aQ.y-e.clientY);if(an<3&&Q<3){IEvent.trigger(this,'click',e);}if(this.eh||an>2||Q>2){IEvent.trigger(this,'moveend',e);}this.eh=false;};IDraggableObject.prototype.eC=function(e){if(!isDefined(e)){return;}if(this.cV){if(!isDefined(this.bU)){this.bU=new Object();}this.bU.clientX=e.clientX;this.bU.clientY=e.clientY;return;}var an=e.clientX-this.ap.x;var Q=e.clientY-this.ap.y;if(Math.abs(an)<2&&Math.abs(Q)<2){return;}this.eh=true;var aS=this;this.bl=setTimeout(function(){aS.cV=false;aS.eC(aS.bU);},50);this.bU=null;this.cV=true;var J=this.aC.x+an;var l=this.aC.y+Q;this.ap.x=e.clientX;this.ap.y=e.clientY;this.moveTo(J,l);IEvent.trigger(this,'drag',e);};IDraggableObject.prototype.gl=function(e){IEvent.trigger(this,'mousedown',e);var cT=false;if(e.button==0||e.button==1){cT=true;}if(!this.bT|| !cT){e.stopPropagation();return;}this.cV=false;if(this.al.setCapture){this.al.setCapture();}this.P.style.cursor=this.dJ;this.aQ.x=e.clientX;this.aQ.y=e.clientY;this.ap.x=e.clientX;this.ap.y=e.clientY;IEvent.trigger(this,'dragstart',e);IEvent.addDomListener(this.al,'mousemove',this,this.eC);IEvent.addDomListener(this.al,'mouseup',this,this.eD);if(jQuery.browser.mozilla){IEvent.addDomListener(this.al,'mouseout',this,this.gm);}var fB=new Date();this.fZ=fB.getTime();e.stopPropagation();e.preventDefault();};var IEvent={};IEvent.ff=0;IEvent.fY=1;IEvent.addListener=function(src,event,target,handler){var bm=null;if(arguments.length==3){bm=target;}else if(arguments.length==4){bm=function(){this['_handler_']=handler;if(handler){handler.apply(target,arguments);}else{alert(src);}};}else{return;}var aj=IEvent.aj();var V=new IEventListener(src,event,bm,IEvent.fY);if(!src['__l']){src['__l']={};}src['__l'][aj]=V;};IEvent.addDomListener=function(src,event,target,handler){var bm=null;if(arguments.length==3){bm=target;}else if(arguments.length==4){bm=function(){this['_handler_']=handler;if(handler){handler.apply(target,arguments);}else{alert(src);}};}else{return;}var V=new IEventListener(src,event,bm,IEvent.ff);if(!src['__l']){src['__l']={};}var aj=IEvent.aj();src['__l'][aj]=V;$(src).bind(event,bm);};IEvent.removeListener=function(src,event,handler){var bt=null;if(arguments.length==1){bt=IEvent.dj(src);}else if(arguments.length==2){bt=IEvent.dj(src,event);}else if(arguments.length==3){bt=IEvent.dj(src,event,handler);}if(bt!=null&&bt.length>0){var V=null;for(var i=bt.length-1;i>=0;i--){V=src['__l'][bt[i]];if(V.type==IEvent.ff){$(src).unbind(V.eventType,V.handler);}V=null;delete src['__l'][bt[i]];}}};IEvent.trigger=function(source,event){var dg=IEvent.dj(source,event);if(!dg||dg.length==0){return;}var aP=[];for(var bC=2;bC<arguments.length;bC++){aP.push(arguments[bC]);}for(var i=0;i<dg.length;i++){source['__l'][dg[i]].handler.apply(source,aP);}};IEvent.dj=function(src,event,handler){if(arguments.length==0){return[];}var cJ=[];var co=src['__l'];var V=null;if(co){if(arguments.length==1){for(var aj in co){cJ.push(aj);}}else if(arguments.length==2){for(var aj in co){V=co[aj];if(src==V.source&&event==V.eventType){cJ.push(aj);}}}else if(arguments.length==3){for(var aj in co){V=co[aj];if(src==V.source&&event==V.eventType){if(V.handler==handler){cJ.push(aj);}else if(V.handler['_handler_']==handler){cJ.push(aj);}break;}}}}return cJ;};IEvent.callback=function(object,method){method.apply(object);};IEvent.callbackArgs=function(object,method){var aP=[];for(var bC=2;bC<arguments.length;bC++){aP.push(arguments[bC]);}method.apply(object,aP);};IEvent.fw=0;IEvent.aj=function(){return 'aT'+IEvent.fw++;};IEventListener=function(source,eventType,handler,type,uid){this.source=source;this.eventType=eventType;this.handler=handler;this.type=type;this.uid=uid;};function IGraphicsOption(){this.fill=false;this.fillColor='#000000';this.fillOpacity=0.5;this.strokeOpacity=0.5;this.strokeColor='#0000FF';this.strokeCap='round';this.strokeJoin='round';this.strokeWidth=5;};function IAbstractGraphics(opts){this.K=opts||new IGraphicsOption();};IAbstractGraphics.prototype.setOption=function(opts){this.K=opts;};IAbstractGraphics.prototype.getOption=function(){return this.K;};IAbstractGraphics.prototype.createPoint=function(point,opts){};IAbstractGraphics.prototype.setPoint=function(elem,point,opts){};IAbstractGraphics.prototype.createPolyline=function(points,opts,bounds,origin){};IAbstractGraphics.prototype.setPolyline=function(polyline,points,opts,bounds,origin){};IAbstractGraphics.prototype.createPolygon=function(points,opts,bounds){};IAbstractGraphics.prototype.setPolygon=function(polygon,points,opts,bounds){};IAbstractGraphics.prototype.createCircle=function(centerPnt,radius,opts,bounds,origin){};IAbstractGraphics.prototype.setCircle=function(polyline,centerPnt,radius,opts,bounds,origin){};function SvgGraphics(opts){if(isDefined(opts)){this.K=opts;}this.dn='http://www.w3.org/2000/svg';};SvgGraphics.prototype=new IAbstractGraphics();SvgGraphics.prototype.createCanvas=function(bounds){var f=bounds.min();var M=document.createElementNS(this.dn,"svg");M.setAttribute('version','1.1');M.setAttribute('style','position:absolute;'+'left:'+f.x+'px;'+'top:'+f.y+'px;');M.setAttribute('width',bounds.width()+'px');M.setAttribute('height',bounds.height()+'px');M.setAttribute('viewBox',f.x+' '+f.y+' '+bounds.width()+' '+bounds.height());return M;};SvgGraphics.prototype.setCanvas=function(canvas,bounds){var f=bounds.min();canvas.style.left=f.x+'px';canvas.style.top=f.y+'px';canvas.setAttribute('width',bounds.width()+'px');canvas.setAttribute('height',bounds.height()+'px');canvas.setAttribute('viewBox',f.x+' '+f.y+' '+bounds.width()+' '+bounds.height());};SvgGraphics.prototype.createPoint=function(point,opts,bounds,origin){var D=bounds||new IBound(point.x-opts.ovalRadius,point.y-opts.ovalRadius,point.x+opts.ovalRadius,point.y+opts.ovalRadius);var B=opts||this.K;var M=this.createCanvas(D);var bI=document.createElementNS(this.dn,"circle");bI.setAttribute("cx",point.x);bI.setAttribute("cy",point.y);bI.setAttribute("r",opts.ovalRadius/2);bI.setAttribute("fill",opts.fillColor);bI.setAttribute("stroke",opts.strokeColor);bI.setAttribute("stroke-width",opts.strokeWidth);M.appendChild(bI);return M;};SvgGraphics.prototype.setPoint=function(elem,point,opts,bounds,origin){var D=bounds||new IBound(point.x-opts.ovalRadius,point.y-opts.ovalRadius,point.x+opts.ovalRadius,point.y+opts.ovalRadius);var M=elem;var dP=M.childNodes[0];dP.setAttribute("cx",point.x);dP.setAttribute("cy",point.y);dP.setAttribute("r",opts.ovalRadius/2);};SvgGraphics.prototype.createPolyline=function(points,opts,bounds,origin){var D=bounds||new IBound(points);var B=opts||this.K;D=new IBound(D.f.x-opts.strokeWidth,D.f.y-opts.strokeWidth,D.r.x+opts.strokeWidth,D.r.y+opts.strokeWidth);var M=this.createCanvas(D);var I=document.createElementNS(this.dn,'path');I.setAttribute('stroke-linejoin',B.strokeJoin);I.setAttribute('stroke-linecap',B.strokeCap);I.setAttribute('stroke',B.strokeColor);I.setAttribute('stroke-width',B.strokeWidth+'px');I.setAttribute('stroke-opacity',B.strokeOpacity);I.setAttribute('fill','none');var A='M'+points[0].x+','+points[0].y;for(var i=1;i<points.length;i++){A=A+' L'+points[i].x+','+points[i].y;}I.setAttribute('d',A);M.appendChild(I);return M;};SvgGraphics.prototype.setPolyline=function(polyline,points,opts,bounds,origin){var D=bounds||new IBound(points);var M=polyline;var I=M.childNodes[0];var ay=0;if(isDefined(opts)){I.setAttribute('stroke-linejoin',opts.strokeJoin);I.setAttribute('stroke-linecap',opts.strokeJoin);I.setAttribute('stroke',opts.strokeColor);I.setAttribute('stroke-width',opts.strokeWidth+'px');I.setAttribute('stroke-opacity',opts.strokeOpacity);ay=opts.strokeWidth;}else{ay=parseInt(I.getAttribute('stroke-width'));}D=new IBound(D.f.x-ay,D.f.y-ay,D.r.x+ay,D.r.y+ay);this.setCanvas(polyline,D);var A='M'+points[0].x+','+points[0].y;for(var i=1;i<points.length;i++){A=A+' L'+points[i].x+','+points[i].y;}I.setAttribute('d',A);};SvgGraphics.prototype.createPolygon=function(points,opts,bounds,origin){var D=bounds||new IBound(points);var B=opts||this.K;D=new IBound(D.f.x-opts.strokeWidth,D.f.y-opts.strokeWidth,D.r.x+opts.strokeWidth,D.r.y+opts.strokeWidth);var M=this.createCanvas(D);var F=document.createElementNS(this.dn,'path');F.setAttribute('stroke-linejoin',B.strokeJoin);F.setAttribute('stroke-linecap',B.strokeCap);F.setAttribute('stroke',B.strokeColor);F.setAttribute('stroke-width',B.strokeWidth+'px');F.setAttribute('stroke-opacity',B.strokeOpacity);if(B.fill){F.setAttribute('fill',B.fillColor);F.setAttribute('fill-opacity',B.fillOpacity);F.setAttribute('fill-rule','evenodd');}else{F.setAttribute('fill','none');}var A='M'+points[0].x+','+points[0].y;for(var i=1;i<points.length;i++){A=A+' L'+points[i].x+','+points[i].y;}A+=' L'+points[0].x+','+points[0].y;F.setAttribute('d',A);M.appendChild(F);return M;};SvgGraphics.prototype.setPolygon=function(polygon,points,opts,bounds,origin){var D=bounds||new IBound(points);var M=polygon;var F=M.childNodes[0];var ay=0;if(isDefined(opts)){F.setAttribute('stroke-linejoin',opts.strokeJoin);F.setAttribute('stroke-linecap',opts.strokeJoin);F.setAttribute('stroke',opts.strokeColor);F.setAttribute('stroke-width',opts.strokeWidth+'px');F.setAttribute('stroke-opacity',opts.strokeOpacity);ay=opts.strokeWidth;}else{ay=parseInt(F.getAttribute('stroke-width'));}D=new IBound(D.f.x-ay,D.f.y-ay,D.r.x+ay,D.r.y+ay);this.setCanvas(M,D);var A='M'+points[0].x+','+points[0].y;for(var i=1;i<points.length;i++){A=A+' L'+points[i].x+','+points[i].y;}A+=' L'+points[0].x+','+points[0].y;F.setAttribute('d',A);};function VmlGraphics(opts){if(isDefined(opts)){this.K=opts;}if(document.namespaces){if(!document.namespaces.v){document.namespaces.add("v","urn:schemas-microsoft-com:vml");if(!document.documentMode||document.documentMode<8){document.createStyleSheet().addRule("v\\:*","behavior: url(#default#VML);");}if(document.documentMode&&document.documentMode>=8){document.writeln('<?import namespace="v" implementation="#default#VML" ?>');}}}};VmlGraphics.prototype=new IAbstractGraphics();VmlGraphics.prototype.createPoint=function(point,opts,bounds,origin){var cE=document.createElement('v:oval');cE.fillcolor=opts.fillColor;cE.strokecolor=opts.strokeColor;cE.strokeweight=opts.strokeWidth*0.75+'pt';cE.style.cssText='position: absolute; '+'left: '+(point.x-opts.ovalRadius/2)+'px; '+'top: '+(point.y-opts.ovalRadius/2)+'px; '+'width: '+opts.ovalRadius+'px; '+'height: '+opts.ovalRadius+'px; ';return cE;};VmlGraphics.prototype.setPoint=function(elem,point,opts,bounds,origin){var eO=elem.parentNode;eO.removeChild(elem);elem.style.cssText='position: absolute; '+'left: '+(point.x-opts.ovalRadius/2)+'px; '+'top: '+(point.y-opts.ovalRadius/2)+'px; '+'width: '+opts.ovalRadius+'px; '+'height: '+opts.ovalRadius+'px';eO.appendChild(elem);};VmlGraphics.prototype.createPolyline=function(points,opts,bounds,origin){if(points.length<2){return null;}var B=opts||this.K;var I=document.createElement('v:shape');var bh=document.createElement('v:stroke');I.appendChild(bh);I.style.cssText='position:absolute;'+'left:'+origin.x+'px;'+'top:'+origin.y+'px;'+'width:1px;'+'height:1px;';I.coordorigin=origin.x+','+origin.y;I.coordsize='1,1';I.unselectable="on";I.strokecolor=B.strokeColor;I.strokeweight=B.strokeWidth*0.75+'pt';I.fill=false;I.filled=false;bh.joinstyle=B.strokeJoin;bh.endcap=B.strokeCap;bh.opacity=B.strokeOpacity;var A='m'+points[0].x+','+points[0].y+' l';var ad=' ';var G=',';for(var i=1;i<points.length;i++){A=A+ad+points[i].x+','+points[i].y;ad=G;}A=A+' e';I.path=A;return I;};VmlGraphics.prototype.setPolyline=function(polyline,points,opts,bounds,origin){polyline.style.left=origin.x+'px';polyline.style.top=origin.y+'px';polyline.coordorigin=origin.x+','+origin.y;var A='m'+points[0].x+','+points[0].y+' l';var ad=' ';var G=',';for(var i=1;i<points.length;i++){A=A+ad+points[i].x+','+points[i].y;ad=G;}A=A+' e';polyline.path=A;};VmlGraphics.prototype.createPolygon=function(points,opts,bounds,origin){if(points.length<2){return null;}var B=opts||this.K;var F=document.createElement('v:shape');var bh=document.createElement('v:stroke');F.appendChild(bh);F.style.cssText='position:absolute;'+'left:'+origin.x+'px;'+'top:'+origin.y+'px;'+'width:1px;'+'height:1px;';F.coordorigin=origin.x+','+origin.y;F.coordsize='1,1';F.unselectable="on";F.strokecolor=B.strokeColor;F.strokeweight=B.strokeWidth*0.75+'pt';F.fill=false;F.filled=false;F.fillcolor=B.fillColor;bh.joinstyle=B.strokeJoin;bh.endcap=B.strokeCap;bh.opacity=B.strokeOpacity;var A='m'+points[0].x+','+points[0].y+' l ';var G=',';for(var i=1;i<points.length;i++){A=A+points[i].x+','+points[i].y+G;}A=A+points[0].x+','+points[0].y+' e';F.path=A;if(B.fill){var dh=document.createElement('v:fill');dh.color=B.fillColor;dh.opacity=B.fillOpacity;dh.on=true;F.appendChild(dh);}return F;};VmlGraphics.prototype.setPolygon=function(polygon,points,opts,bounds,origin){polygon.style.left=origin.x+'px';polygon.style.top=origin.y+'px';polygon.coordorigin=origin.x+','+origin.y;var A='m'+points[0].x+','+points[0].y+' l';var G=',';for(var i=1;i<points.length;i++){A=A+points[i].x+','+points[i].y+G;}A=A+points[0].x+','+points[0].y+' e';polygon.path=A;};var IGraphics={cs:(document.all)?new VmlGraphics():new SvgGraphics(),createPolyline:function(points,opts,bounds,origin){return IGraphics.cs.createPolyline(points,opts,bounds,origin);},setPolyline:function(polyline,points,opts,bounds,origin){IGraphics.cs.setPolyline(polyline,points,opts,bounds,origin);},createPolygon:function(points,opts,bounds,origin){return IGraphics.cs.createPolygon(points,opts,bounds,origin);},setPolygon:function(polygon,points,opts,bounds,origin){IGraphics.cs.setPolygon(polygon,points,opts,bounds,origin);},createPoint:function(point,opts,bounds,origin){return IGraphics.cs.createPoint(point,opts,bounds,origin);},setPoint:function(elem,point,opts,bounds,origin){IGraphics.cs.setPoint(elem,point,opts,bounds,origin);}};function IMap(container,maptype,opt){this.ae=container;this.ew=_createDivElement({position:'absolute',left:'0px',top:'0px',overflow:'hidden',width:'100%',height:'100%'});this.dk=_createDivElement({position:'absolute',left:'0px',top:'0px'});this.C=new IDraggableObject(this.dk,new IPoint(0,0));this.C.setDraggableCursor('pointer');this.C.setDraggingCursor('move');this.bf=null;this.bO=null;this.bR=new CArray();this.aw=[];this.cR=[];this.aX=null;this.am=new IPoint(0,0);this.ee=new CArray();this.by=isDefined(maptype)?maptype:new IMapViewMapType();this.db=new ISize(parseInt(this.ae.offsetWidth),parseInt(this.ae.offsetHeight));this.dC=new ILatLngBound();this.eo=new IBound();this.ah=0;this.bp=new IInfoWindow();this.fD();this.dK=new CopyrightControl();if(isDefined(opt)){if(isDefined(opt.mapstyle)&&opt.mapstyle==eJ){this.dK=null;}}if(isDefined(this.dK)){this.addControl(this.dK);}};IMap.prototype.fD=function(){this.ae.appendChild(this.ew);this.ew.appendChild(this.dk);this.fN();this.addMapType(this.by);this.setMapType(this.by);IEvent.addListener(this.C,'moveend',this,function(e){IEvent.trigger(this,'moveend');});IEvent.addListener(this.C,'dblclick',this,function(e){IEvent.trigger(this,'dblclick',e);});IEvent.addListener(this.C,'dragstart',this,function(e){this.bf=new IPoint(e.clientX,e.clientY);IEvent.trigger(this,'dragstart',e);});IEvent.addListener(this.C,'drag',this,function(e){var L=this;var aP=e;var count=0;if(this.bO!=null){clearTimeout(this.bO);}this.bO=setTimeout(function(){if(L.bf==null){L.bf=new IPoint(0,0);}L.dW(new ISize(aP.clientX-L.bf.x,aP.clientY-L.bf.y));L.dz();L.dw();L.bf=new IPoint(aP.clientX,aP.clientY);L.bO=null;},250);IEvent.trigger(this,'drag',e);});IEvent.addListener(this.C,'dragend',this,function(e){if(this.bO!=null){clearTimeout(this.bO);}this.dW(new ISize(e.clientX-this.bf.x,e.clientY-this.bf.y));this.bO=null;this.bf=null;this.dz();this.dw();IEvent.trigger(this,'dragend',e);});this.bp.fE(this);IEvent.addListener(this.C,'click',this,function(e){this.closeInfoWindow();IEvent.trigger(this,'click',e);});IEvent.addListener(this.C,'contextmenu',this,function(e){IEvent.trigger(this,'contextmenu',e);});};IMap.prototype.fN=function(){this.aw[0]=_createDivElement({position:'absolute',left:'0px',top:'0px'});this.addPane(100);this.aw[2]=_createDivElement({position:'absolute',left:'0px',top:'0px',zIndex:101});this.aw[3]=_createDivElement({position:'absolute',left:'0px',top:'0px',zIndex:102});this.aw[4]=_createDivElement({position:'absolute',left:'0px',top:'0px',zIndex:103});this.aw[5]=_createDivElement({position:'absolute',left:'0px',top:'0px',zIndex:104});this.aw[6]=_createDivElement({position:'absolute',left:'0px',top:'0px',zIndex:105});this.aw[7]=_createDivElement({position:'absolute',left:'0px',top:'0px',zIndex:106});this.aw[8]=_createDivElement({position:'absolute',left:'0px',top:'0px',zIndex:107});for(var pane in this.aw){this.dk.appendChild(this.aw[pane]);}};IMap.prototype.getContainer=function(){return this.ae;};IMap.prototype.getPane=function(key){return this.aw[key];};IMap.prototype.addPane=function(zindex){var eB=_createDivElement({position:'absolute',left:'0px',top:'0px',zIndex:zindex});this.aw.push(eB);this.dk.appendChild(eB);return this.aw.length-1;};IMap.prototype.checkResize=function(){this.fX(parseInt(this.ae.offsetWidth),parseInt(this.ae.offsetHeight));};IMap.prototype.fX=function(width,height){if(this.db.width!=width||this.db.height!=height){this.db.width=width;this.db.height=height;var dN=this.getZoom();var aM=this.getCurrentMapType();var bJ=aM.getProjection();var t=aM.getTileSize();var bw=this.dC.getSouthWest();var bA=this.dC.getNorthEast();var gi=new ILatLng(bA.lat(),bw.lng());var eT=bJ.fromLatLngToPixel(gi,dN);var fA=new IPoint(eT.x+width/2,eT.y+height/2);this.setCenter(bJ.fromPixelToLatLng(fA,dN),dN);}};IMap.prototype.setCenter=function(latlng,zoom,type){if(!isDefined(latlng)){throw "The latlng value of setCenter is not valid.";}var eY=this.aX;var ep=false;this.aX=latlng;if(isDefined(zoom)){if(!isDefined(this.ah)){ep=true;}else if(this.ah!=zoom){ep=true;}this.ah=zoom;}var R=this.getSize();var fr=this.C.fl();var fo=this.getCurrentMapType().getProjection().fromLatLngToPixel(this.aX,this.ah);this.am=new IPoint(-fr.x-(fo.x-Math.floor(R.width/2)),-fr.y-(fo.y-Math.floor(R.height/2)));this.dz();this.fQ();if(isDefined(eY)){if(!eY.equals(this.aX)){IEvent.trigger(this,'moveend');IEvent.trigger(this,'reposition');}}else{IEvent.trigger(this,'moveend');IEvent.trigger(this,'reposition');}if(ep){IEvent.trigger(this,'zoom',this.ah);}};IMap.prototype.panTo=function(latlng,opts){var fb=this.fromLatLngToDivPixel(this.getCenter());var fs=this.fromLatLngToDivPixel(latlng);this.panBy(new ISize(fb.x-fs.x,fb.y-fs.y),opts);};IMap.prototype.panBy=function(distance,opts){var dD=null;var cW=null;if(isDefined(opts)){dD=new Pan(10||opts.count);cW=opts.fn;}else{dD=new Pan(10);}var L=this;var ea=new ISize(0,0);var R=this.getSize();if(Math.abs(distance.width)>R.width||Math.abs(distance.height)>R.height){this.eN(new ISize(distance.width,distance.height));IEvent.trigger(L,'moveend');if(isDefined(cW)){cW();}}else{var L=this;var dV=25;if(isDefined(opts)){dV=opts.mils||25;}setTimeout(function(){if(dD.hasNext()){var fp=dD.next();var dM=new ISize(Math.round(distance.width*fp),Math.round(distance.height*fp));L.eN(new ISize(dM.width-ea.width,dM.height-ea.height));ea=dM;setTimeout(arguments.callee,dV);}else{IEvent.trigger(L,'moveend');if(isDefined(cW)){cW();}}},dV);}};IMap.prototype.panDirection=function(dx,dy,opts){var t=this.getCurrentMapType().getTileSize();this.panBy(new ISize(dx*t,dy*t),opts);};IMap.prototype.eN=function(distance){this.C.moveBy(distance);this.dW(distance);this.dz();this.dw();};IMap.prototype.dW=function(distance){var fc=this.getCurrentMapType().getProjection();var cH=fc.fromLatLngToPixel(this.aX,this.ah);this.aX=fc.fromPixelToLatLng(new IPoint(cH.x-distance.width,cH.y-distance.height),this.ah);};IMap.prototype.dz=function(){var R=this.getSize();var cH=this.fromLatLngToDivPixel(this.aX);var au=cH.x-Math.floor(R.width/2);var ar=cH.y-Math.floor(R.height/2);var aN=au+R.width;var aK=ar+R.height;this.eo=new IBound(au,ar,aN,aK);this.dC=new ILatLngBound(this.fromDivPixelToLatLng(new IPoint(au,aK)),this.fromDivPixelToLatLng(new IPoint(aN,ar)));};IMap.prototype.fromLatLngToDivPixel=function(latlng){var aM=this.getCurrentMapType();var bJ=aM.getProjection();var ey=bJ.fromLatLngToPixel(latlng,this.getZoom());return new IPoint(this.am.x+ey.x,this.am.y+ey.y);};IMap.prototype.fromDivPixelToLatLng=function(point){var aM=this.getCurrentMapType();var bJ=aM.getProjection();return bJ.fromPixelToLatLng(new IPoint(point.x-this.am.x,point.y-this.am.y),this.getZoom());};IMap.prototype.fromContainerPixelToLatLng=function(point){var H=this.ae;var G=new IPoint(0,0);while(isDefined(H)){if(isDefined(H.offsetLeft)){G.x+=parseInt(H.offsetLeft);}if(isDefined(H.offsetTop)){G.y+=parseInt(H.offsetTop);};H=H.offsetParent;}H=this.ae;while(isDefined(H)&&H!=document.documentElement&&H!=document.body){G.x-=parseInt(H.scrollLeft);G.y-=parseInt(H.scrollTop);H=H.parentNode;}var f=this.eo.min();G.x=point.x-G.x+f.x+(document.documentElement.scrollLeft+document.body.scrollLeft);G.y=point.y-G.y+f.y+(document.documentElement.scrollTop+document.body.scrollTop);return this.fromDivPixelToLatLng(G);};IMap.prototype.getSize=function(){return this.db;};IMap.prototype.getBounds=function(){return this.dC;};IMap.prototype.getCenter=function(){return this.aX;};IMap.prototype.addOverlay=function(overlay){overlay.initialize(this);this.bR.add(overlay);overlay.redraw(true);};IMap.prototype.fW=function(){for(var i=0;i<this.bR.size();i++){this.bR.get(i).redraw(true);}};IMap.prototype.removeOverlay=function(overlay){var bd=this.bR.remove(overlay);if(isDefined(bd)){overlay.remove();}};IMap.prototype.clearOverlays=function(){this.closeInfoWindow();while(this.bR.size()>0){var bd=this.bR.get(0);this.bR.remove(bd);bd.remove();}};IMap.prototype.getMapTypes=function(){return this.gG.toArray();};IMap.prototype.getCurrentMapType=function(){return this.by;};IMap.prototype.setMapType=function(type){if(this.ee.contains(type)){this.by=type;this.gb();IEvent.trigger(this,'maptype');}};IMap.prototype.gb=function(){while(this.cR.length>0){var bd=this.cR.pop();bd.remove();}var eQ=this.by.getTileLayers();for(var i=0;i<eQ.length;i++){var bd=new ITileLayerOverlay(eQ[i]);this.cR.push(bd);bd.initialize(this);}};IMap.prototype.addMapType=function(type){this.ee.add(type);if(!this.by||this.by==null){this.setMapType(type);}};IMap.prototype.removeMapType=function(type){this.ee.remove(type);};IMap.prototype.dw=function(){for(var i=0;i<this.cR.length;i++){this.cR[i].redraw(true);}};IMap.prototype.fQ=function(){this.fW();this.dw();this.bp.reset(this.bp.getPoint(),null,null,null,null);};IMap.prototype.getZoom=function(){return this.ah;};IMap.prototype.setZoom=function(level){if(!isDefined(this.ah)||this.ah!=level){if(isDefined(this.aX)){this.setCenter(this.aX,level);}else{this.ah=level;}}};IMap.prototype.zoomIn=function(){if(this.ah>this.getCurrentMapType().getMinimumResolution()){this.setZoom(this.ah-1);}};IMap.prototype.zoomOut=function(){if(this.ah<this.getCurrentMapType().getMaximumResolution()){this.setZoom(this.ah+1);}};IMap.prototype.addControl=function(control){control.initialize(this);};IMap.prototype.removeControl=function(control){control.remove();};IMap.prototype.enableDragging=function(){this.C.enableDragging();};IMap.prototype.disableDragging=function(){this.C.disableDragging();};IMap.prototype.dragEnabled=function(){return this.C.dragEnabled();};IMap.prototype.fG=function(){return this.C;};IMap.prototype.enableInfoWindow=function(){};IMap.prototype.disableInfoWindow=function(){};IMap.prototype.infoWindowEnabled=function(){};IMap.prototype.openInfoWindow=function(point,node,opts,e){var R=null;var fa=null;if(isDefined(opts)){if(isDefined(opts.size)){R=opts.size;}if(isDefined(opts.offset)){fa=opts.offset;}}this.bp.reset(point,[node],R,fa,0);this.bp.show();if(isDefined(e)){this.bp.processOutBnd(e);}};IMap.prototype.openInfoWindowHtml=function(point,html,opts){var eP=document.createElement('div');eP.innerHTML=html;this.openInfoWindow(point,eP,opts);};IMap.prototype.closeInfoWindow=function(){this.bp.hide();};IMap.prototype.getDragObject=function(){return this.fG();};function Pan(count){this.totalCnt=count;this.currentCnt=0;};IMap.prototype.getMInfoWindow=function(){return this.bp;};Pan.prototype.next=function(){if(this.hasNext()){this.currentCnt++;return(1+Math.sin(Math.PI*(-0.5+this.currentCnt/this.totalCnt)))/2;}};Pan.prototype.hasNext=function(){return(this.currentCnt<this.totalCnt);};Pan.prototype.reset=function(){this.currentCnt=0;};function IInfoWindow(){this.T=_createDivElement({position:'absolute',zindex:1});this.T.style.cursor='default';this.aF=true;this.hide();this.d=null;this.aI=[];this.ek= -1;this.cO=null;this.bb=null;this.aa=new ISize(200,120);this.bb=new ISize(0,0);this.bB=_createDivElement({position:'absolute',overflow:'hidden',width:'25px',height:'25px'});this.bB.appendChild(IUtil.createImage(PPG_BASE_URL+'/img/tl.png',0,0,25,25));var ax=this;IEvent.addDomListener(this.bB,'mousedown',function(e){ax.aW(e);});this.bW=_createDivElement({position:'absolute',overflow:'hidden',background:'url('+PPG_BASE_URL+'/img/l.png) repeat-y',width:'25px'});IEvent.addDomListener(this.bW,'mousedown',function(e){ax.aW(e);});this.bY=_createDivElement({position:'absolute',overflow:'hidden',width:'25px',height:'24px'});this.bY.appendChild(IUtil.createImage(PPG_BASE_URL+'/img/bl.png',0,0,25,24));IEvent.addDomListener(this.bY,'mousedown',function(e){ax.aW(e);});this.bP=_createDivElement({position:'absolute',overflow:'hidden',width:'27px',height:'25px'});this.bP.appendChild(IUtil.createImage(PPG_BASE_URL+'/img/tr.png',0,0,27,25));this.dv=IUtil.createImage(PPG_BASE_URL+'/img/close_button.gif',6,8,12,12);this.dv.style.zIndex=10;IEvent.addDomListener(this.dv,'click',function(e){ax.hide();});IEvent.addDomListener(this.dv,'mouseover',function(e){this.style.cursor='pointer';ax.aW(e);});this.bP.appendChild(this.dv);IEvent.addDomListener(this.bP,'mousedown',function(e){ax.aW(e);});this.cg=_createDivElement({position:'absolute',overflow:'hidden',background:'url('+PPG_BASE_URL+'/img/r.png) repeat-y',width:'27px'});IEvent.addDomListener(this.cg,'mousedown',function(e){ax.aW(e);});this.cv=_createDivElement({position:'absolute',overflow:'hidden',width:'27px',height:'24px'});this.cv.appendChild(IUtil.createImage(PPG_BASE_URL+'/img/br.png',0,0,27,24));IEvent.addDomListener(this.cv,'mousedown',function(e){ax.aW(e);});this.cc=_createDivElement({position:'absolute',overflow:'hidden',background:'url('+PPG_BASE_URL+'/img/t.png) repeat-x',height:'25px'});IEvent.addDomListener(this.cc,'mousedown',function(e){ax.aW(e);});this.cd=_createDivElement({position:'absolute',overflow:'hidden',background:'url('+PPG_BASE_URL+'/img/b.png) repeat-x',height:'24px'});IEvent.addDomListener(this.cd,'mousedown',function(e){ax.aW(e);});this.ds=_createDivElement({position:'absolute',overflow:'hidden',zIndex:1,width:'86px',height:'92px'});this.ds.appendChild(IUtil.createImage(PPG_BASE_URL+'/img/anchor.png',0,0,86,92));this.aA=_createDivElement({position:'absolute',overflow:'hidden',background:'#E6F4FD'});IEvent.addDomListener(this.aA,'mousedown',function(e){ax.aW(e);});this.T.appendChild(this.bY);this.T.appendChild(this.cd);this.T.appendChild(this.cv);this.T.appendChild(this.bB);this.T.appendChild(this.cc);this.T.appendChild(this.bP);this.T.appendChild(this.bW);this.T.appendChild(this.aA);this.T.appendChild(this.cg);this.T.appendChild(this.ds);this.fg();};IInfoWindow.prototype.selectTab=function(index){if(isDefined(this.aA)&&index>=0&&index<this.aI.length){if(this.ek>=0){this.aI[this.ek].style.display='none';}this.ek=index;this.aI[index].style.display='block';}};IInfoWindow.prototype.aW=function(e){e.stopPropagation();};IInfoWindow.prototype.fE=function(map){this.d=map;this.d.getPane(8).appendChild(this.T);};IInfoWindow.prototype.hide=function(){this.T.style.display='none';this.T.style.visibility='hidden';this.aF=true;};IInfoWindow.prototype.show=function(){this.T.style.display='block';this.T.style.visibility='visible';this.aF=false;};IInfoWindow.prototype.isHidden=function(){return this.aF;};IInfoWindow.prototype.fg=function(){this.ds.style.top= -92-this.bb.height+'px';this.ds.style.left=0-this.bb.width+'px';var aH= -88-24-this.bb.height;this.bY.style.top=aH+'px';this.cd.style.top=aH+'px';this.cv.style.top=aH+'px';var ac= -50-this.bb.width;this.bY.style.left=ac+'px';ac+=25;this.cd.style.left=ac+'px';this.cd.style.width=this.aa.width+'px';ac+=this.aa.width;this.cv.style.left=ac+'px';aH-=this.aa.height;this.bW.style.top=aH+'px';this.bW.style.height=this.aa.height+'px';this.aA.style.top=aH+'px';this.aA.style.height=this.aa.height+'px';this.cg.style.top=aH+'px';this.cg.style.height=this.aa.height+'px';ac= -50-this.bb.width;this.bW.style.left=ac+'px';ac+=25;this.aA.style.left=ac+'px';this.aA.style.width=this.aa.width+'px';ac+=this.aa.width;this.cg.style.left=ac+'px';aH-=25;this.bB.style.top=aH+'px';this.cc.style.top=aH+'px';this.bP.style.top=aH+'px';var ac= -50-this.bb.width;this.bB.style.left=ac+'px';this.bB.style.width=25+'px';ac+=25;this.cc.style.left=ac+'px';this.cc.style.width=this.aa.width+'px';ac+=this.aa.width;this.bP.style.left=ac+'px';};IInfoWindow.prototype.getPoint=function(){return this.cO;};IInfoWindow.prototype.getPixelOffset=function(){return this.bb;};IInfoWindow.prototype.getTabs=function(){return this.aI;};IInfoWindow.prototype.reset=function(point,tabs,size,offset,selectedTab){if(isDefined(point)){this.cO=point;}if(tabs!=null){if(isDefined(this.aI)){for(var i=0;i<this.aI.length;i++){this.aA.removeChild(this.aI[i]);}}this.aI=tabs;for(var i=0;i<this.aI.length;i++){this.aI[i].style.display='none';this.aA.appendChild(this.aI[i]);}}var ed=false;if(isDefined(offset)){this.bb=offset;ed=true;}if(isDefined(size)){this.aa=size;ed=true;}if(ed){this.fg();}if(selectedTab!=null){this.selectTab(selectedTab);}if(isDefined(this.cO)){var cB=this.d.fromLatLngToDivPixel(this.cO);this.T.style.left=cB.x+'px';this.T.style.top=cB.y+'px';}};IInfoWindow.prototype.getWin=function(){return this.T;};IInfoWindow.prototype.getLeftTop=function(){return this.bB;};IInfoWindow.prototype.getCenterTop=function(){return this.cc;};IInfoWindow.prototype.getRightTop=function(){return this.bP;};IInfoWindow.prototype.getLeftMiddle=function(){return this.bW;};IInfoWindow.prototype.getCenterMiddle=function(){return this.gv;};IInfoWindow.prototype.getRightMiddle=function(){return this.cg;};IInfoWindow.prototype.getLeftBottom=function(){return this.bY;};IInfoWindow.prototype.getCenterBottom=function(){return this.cd;};IInfoWindow.prototype.getRightBottom=function(){return this.cv;};IInfoWindow.prototype.processOutBnd=function(e){var mousePos=null;var point=null;var latlng=this.cO;if(isDefined(e)){mousePos=mousePosition(e);point=new IPoint(mousePos.x,mousePos.y);}if(isDefined(point)){latlng=this.d.fromContainerPixelToLatLng(point);}var offsetTop=this.d.ae.parentNode.offsetTop;var offsetLeft=this.d.ae.parentNode.offsetLeft;var divX=point.x-offsetLeft;var divY=point.y-offsetTop;var gD=this.d.fromLatLngToDivPixel(latlng);var w=25+this.aa.width+27;var h=25+this.aa.height+24+92+(24-24%this.aa.height)+24;var leftX=50+60;var RightX=this.d.ae.offsetWidth-divX;var cLatLng;var cPoint;if(divX<=leftX&&divY<=h){cLatLng=this.d.getCenter();cPoint=this.d.fromLatLngToDivPixel(cLatLng);var moveX=leftX-divX;var moveY=h-divY;cPoint.x-=moveX;cPoint.y-=moveY;cLatLng=this.d.fromDivPixelToLatLng(new IPoint(cPoint.x,cPoint.y));this.d.panTo(cLatLng);}else if(w>=RightX&&divY<=h){cLatLng=this.d.getCenter();cPoint=this.d.fromLatLngToDivPixel(cLatLng);var moveX=w-RightX;var moveY=h-divY;cPoint.x+=moveX;cPoint.y-=moveY;cLatLng=this.d.fromDivPixelToLatLng(new IPoint(cPoint.x,cPoint.y));this.d.panTo(cLatLng);}else if(divY<=h){cLatLng=this.d.getCenter();cPoint=this.d.fromLatLngToDivPixel(cLatLng);var moveY=h-divY;cPoint.y-=moveY;cLatLng=this.d.fromDivPixelToLatLng(new IPoint(cPoint.x,cPoint.y));this.d.panTo(cLatLng);}else if(divX<=leftX&&divY>=h){cLatLng=this.d.getCenter();cPoint=this.d.fromLatLngToDivPixel(cLatLng);var moveX=leftX-divX;cPoint.x-=moveX;cLatLng=this.d.fromDivPixelToLatLng(new IPoint(cPoint.x,cPoint.y));this.d.panTo(cLatLng);}else if(w>=RightX&&divY>=h){cLatLng=this.d.getCenter();cPoint=this.d.fromLatLngToDivPixel(cLatLng);var moveX=w-RightX;cPoint.x+=moveX;cLatLng=this.d.fromDivPixelToLatLng(new IPoint(cPoint.x,cPoint.y));this.d.panTo(cLatLng);}};function ITileLayer(copyrights,minResolution,maxResolution,options){this.gj=minResolution||0;this.gf=maxResolution||0;this.eE=(options)?options:new ITileLayerOption();};ITileLayer.prototype.minResolution=function(){return this.gj;};ITileLayer.prototype.maxResolution=function(){return this.gf;};ITileLayer.prototype.getTileUrl=function(tile,zoom){var s='http://www.papagoonline.com/imap_full/lv_#zoom/x_#x/imap_#y_#x.png';s=s.replace(/#x/gi,tile.x);s=s.replace(/#y/gi,tile.y);s=s.replace(/#zoom/gi,6+zoom);return s;};ITileLayer.prototype.isPng=function(){return this.eE.isPng;};ITileLayer.prototype.getOpacity=function(){return this.eE.isOpacity;};ITileLayer.prototype.getCopyright=function(bounds,zoom){return null;};function ITileLayerOption(){this.opacity=1.0;this.isPng=true;this.tileUrlTemplate="";this.draggingCursor="HAND";};var LogWin=null;var Log={ab:null,eb:'',cX:false,isPopupOpend:function(){var eW=false;if(Log.ab&&Log.ab!=null){if(!Log.ab.colsed){eW=true;}}return eW;},openPopup:function(width,height){Log.ab=window.open('','LogWindow','height='+(height||300)+',width='+(width||500)+',menubar=no');Log.ab.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">');Log.ab.document.write('<html>');Log.ab.document.write('<head>');Log.ab.document.write('<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />');Log.ab.document.write('<body style="margin:0;padding:0;">');Log.ab.document.write('<div style="width:100%;height:100%;">');Log.ab.document.write('<div id="log" style="position:relative;width:100%;height:100%;overflow:auto;"></div>');Log.ab.document.write('</div>');Log.ab.document.write('</body>');Log.ab.document.write('</html>');Log.ab.document.close();Log.writePopup(Log.eb);},writePopup:function(content){if(Log.cX&&Log.isPopupOpend()){Log.ab.document.getElementById('log').innerHTML=content;}},appendPopup:function(content){if(Log.cX&&Log.isPopupOpend()){Log.ab.document.getElementById('log').innerHTML+=content;}},log:function(content){if(Log.cX){Log.eb+=content;Log.appendPopup(content);}},write:function(content){Log.log(content);},clear:function(){Log.eb='';Log.writePopup('');},eanable:function(){Log.cX=true;},disable:function(){Log.cX=false;}};function IMapType(layers,projection,name,opts){this.dB=layers||[];this.ei=projection||new IProjection();this.gk=name||"";this.fH='';this.fv='';this.cP=0;this.ck=0;this.eu=256;this.fL='#000000';this.gh='#FFFF00';if(opts){if(opts.shortName){this.fH=opts.shortName;};if(opts.urlArg){this.fv=opts.urlArg;}if(opts.maxResolution){this.cP=opts.maxResolution;}if(opts.minResolution){this.ck=opts.minResolution;}if(opts.tileSize){this.eu=opts.tileSize;}if(opts.textColor){this.fL=opts.textColor;}if(opts.linkColor){this.gh=opts.linkColor;}}else{for(var i=0;i<this.dB.length;i++){this.cP=Math.max(this.cP,this.dB[i].maxResolution());this.ck=Math.min(this.ck,this.dB[i].minResolution());}}};IMapType.prototype.getSpanZoomLevel=function(center,span,viewSize){};IMapType.prototype.getBoundZoomLevel=function(bounds,viewSize){var res=this.ck;var sw=bounds.getSouthWest();var ne=bounds.getNorthEast();for(var ilevel=this.cP;ilevel>=this.ck;ilevel--){var swpix=this.ei.fromLatLngToPixel(sw,ilevel);var nepix=this.ei.fromLatLngToPixel(ne,ilevel);if((nepix.x-swpix.x)<=viewSize.width&&(swpix.y-nepix.y)<=viewSize.height){res=ilevel;break;}}return res;};IMapType.prototype.getName=function(){return this.gk;};IMapType.prototype.getProjection=function(){return this.ei;};IMapType.prototype.getTileSize=function(){return this.eu;};IMapType.prototype.getTileLayers=function(){return this.dB;};IMapType.prototype.getMinimumResolution=function(){return this.ck;};IMapType.prototype.getMaximumResolution=function(){return this.cP;};function IMapTypeOptions(){this.shortName;this.urlArg;this.maxResolution;this.minResolution;this.tileSize;this.textColor;this.linkColor;this.errorMessage;this.alt;this.radius;};function IMapViewMapType(){var du=[];var er=[];er[0]=new ITileLayer('',fV,fS);du[0]=er;var es=fT;er[0].getTileUrl=function(tile,zoom){var s=PPG_BASE_TILE_URL+fU;if(tile.x<0||tile.y<0||tile.x>=es[zoom].width||tile.y>=es[zoom].height){return PPG_BASE_URL+'/img/sea.png';}else{s=s.replace(/#x/gi,tile.x);s=s.replace(/#y/gi,tile.y);s=s.replace(/#zoom/gi,1+zoom);}return s;};du[1]=new IPPGProjection();du[2]='mapview';IMapType.apply(this,du);};IMapViewMapType.prototype=new IMapType();function IOverlay(){};IOverlay.prototype.getZIndex=function(){};IOverlay.prototype.initialize=function(map){};IOverlay.prototype.remove=function(){};IOverlay.prototype.copy=function(){};IOverlay.prototype.redraw=function(force){};function IOverviewMapControl(size){this.ae=null;this.bu=null;this.ct=null;this.dG=null;this.aa=size;};IOverviewMapControl.prototype=new IControl();IOverviewMapControl.prototype.initialize=function(map){this.ct=map;var bi=120;var aT=120;if(isDefined(this.aa)){bi=this.aa.width;aT=this.aa.height;}this.ae=_createDivElement({position:'absolute',left:'5px',bottom:'5px',width:bi+'px',height:aT+'px',borderTop:'2px solid #3336ff',borderLeft:'2px solid #3336ff',borderRight:'2px solid #32145e',borderBottom:'2px solid #32145e'});var aO=this.ct;this.dG=new OverviewOverlay(this.ct);var cj=this.dG;aO.getContainer().appendChild(this.ae);this.bu=new IMap(this.ae,null,{mapstyle:eJ});var L=this.bu;L.setCenter(aO.getCenter(),aO.getZoom());IEvent.addListener(aO,'zoom',this,function(zoom){var fh=this.ct.getZoom();var ga=this.bu.getZoom();if(ga!=fh){this.bu.setZoom(fh);cj.setBounds(aO.getBounds());cj.redraw(true);}});IEvent.addListener(aO,'moveend',this,function(zoom){var fi=this.ct.getCenter();var G=this.bu.getCenter();if(!G.equals(fi)){this.bu.panTo(fi);cj.setBounds(aO.getBounds());cj.redraw(true);}});IEvent.addListener(this.bu,'moveend',function(){if(!aO.getCenter().equals(this.getCenter())){aO.panTo(this.getCenter());cj.setBounds(aO.getBounds());cj.redraw(true);}});this.dG.setBounds(aO.getBounds());L.addOverlay(this.dG);};IOverviewMapControl.prototype.remove=function(map){this.ct.getContainer().removeChild(this.ae);};function OverviewOverlay(mainMap){this.d=null;this.C=null;this.g=null;this.cA=null;this.gK=mainMap;this.cn=null;};OverviewOverlay.prototype=new IOverlay();OverviewOverlay.prototype.initialize=function(map){this.d=map;var az=this.cn;var cU=new IPoint(0,0);var an=2;var Q=2;var cb=this.d;var gn=cb.getPane(8);if(isDefined(az)){var bF=cb.fromLatLngToDivPixel(az.getSouthWest());var bz=cb.fromLatLngToDivPixel(az.getNorthEast());an=bz.x-bF.x;Q=bF.y-bz.y;cU=new IPoint(bF.x,bz.y);}var eK=_createDivElement({width:(an-2)+'px',height:(Q-2)+'px',background:'#0036ff'});this.g=_createDivElement({position:'absolute',left:'0px',top:'0px',width:an+'px',height:Q+'px',borderTop:'2px solid #0036ff',borderLeft:'2px solid #0036ff',borderRight:'2px solid #00145e',borderBottom:'2px solid #00145e'});IUtil.setOpacity(eK,0.2);this.g.appendChild(eK);this.C=new IDraggableObject(this.g,cU);this.C.enableDragging();IEvent.addListener(this.C,'dragstart',this,this.gp);IEvent.addListener(this.C,'dragend',this,this.gg);gn.appendChild(this.g);};OverviewOverlay.prototype.redraw=function(force){var az=this.cn;var cU=new IPoint(0,0);var an=2;var Q=2;var cb=this.d;if(isDefined(az)){var bF=cb.fromLatLngToDivPixel(az.getSouthWest());var bz=cb.fromLatLngToDivPixel(az.getNorthEast());cU=new IPoint(bF.x,bz.y);an=bz.x-bF.x;Q=bF.y-bz.y;}var dQ=this.g.childNodes[0];if(isDefined(dQ)){dQ.style.width=(an-2)+'px';dQ.style.height=(Q-2)+'px';}if(isDefined(this.g)){this.C.moveTo(cU);this.g.style.width=an+'px';this.g.style.height=Q+'px';}};OverviewOverlay.prototype.remove=function(){if(this.g){this.d.getPane(8).removeChild(this.g);}};OverviewOverlay.prototype.setBounds=function(bounds){this.cn=bounds;};OverviewOverlay.prototype.getBounds=function(){return this.cn;};OverviewOverlay.prototype.gp=function(e){this.cA=new IPoint(e.clientX,e.clientY);};OverviewOverlay.prototype.gA=function(e){};OverviewOverlay.prototype.gg=function(e){if(isDefined(this.cA)){var gL=this.C.fl();var an=this.cA.x-e.clientX;var Q=this.cA.y-e.clientY;this.d.panBy(new ISize(an,Q));this.cn=_translateBounds(this.d.getCenter(),this.cn);this.cA=null;}};function _translateBounds(c,b){var bw=b.getSouthWest();var bA=b.getNorthEast();var cq=c.av-(bw.av+bA.av)/2;var bS=c.aD-(bw.aD+bA.aD)/2;bw.av+=cq;bw.aD+=bS;bA.av+=cq;bA.aD+=bS;return new ILatLngBound(bw,bA);};var PPG_BASE_TILE_URL='http://w3.papagoonline.com/maps/map_full';var PPG_BASE_URL='http://w3.papagoonline.com';var eJ='ov';PPG_SMALLZOOMCONTROL_ZOOMIN='Zoom In';PPG_SMALLZOOMCONTROL_ZOOMOUT='Zoom Out';var PPG_GEN_UID=20;var PPG_GEN_UID_R_PATH=';R?Xw%14%7B%0Br%00i%0Ef%12M%7CLb%12%7C%1B';var PPG_IZOOMCONTROL_PANLEFT='Pan Left';var PPG_IZOOMCONTROL_PANTOP='Pan Top';var PPG_IZOOMCONTROL_PANRIGHT='Pan Right';var PPG_IZOOMCONTROL_PANBOTTOM='Pan Bottom';var PPG_IZOOMCONTROL_ZOOMIN='Zoom In';var PPG_IZOOMCONTROL_ZOOMOUT='Zoom Out';var PPG_IZOOMCONTROL_ZOOMSLIDERBAR='Drag';var fP=[new ILatLng(25.763205,119.237890),new ILatLng(25.763205,119.237890),new ILatLng(25.763205,119.237890),new ILatLng(25.763205,119.237890),new ILatLng(25.763205,119.237890),new ILatLng(25.763205,119.237890),new ILatLng(25.763205,119.237890),new ILatLng(25.763205,119.237890),new ILatLng(25.763205,119.237890),new ILatLng(25.763205,119.237890),new ILatLng(25.763205,119.237890),new ILatLng(25.763205,119.237890),new ILatLng(25.763205,119.237890),new ILatLng(25.763205,119.237890),new ILatLng(25.763205,119.237890)];var fO=[2.000000,0.800000,0.320000,0.160000,0.080000,0.032000,0.016000,0.010000,0.008000,0.006000,0.004800,0.003200,0.001600];var fV=0;var fS=12;var fT=[new ISize(2,2),new ISize(4,6),new ISize(10,14),new ISize(18,26),new ISize(36,50),new ISize(90,126),new ISize(178,250),new ISize(284,398),new ISize(356,498),new ISize(474,664),new ISize(592,830),new ISize(888,1244),new ISize(1774,2846)];var fU='/lv#zoom/x_#x/imap_#y_#x.png';function ITileLayerOverlay(tileLayer){this.bM=tileLayer;this.d=null;this.dL=0;this.bs;this.dT=0;this.g=_createDivElement();this.ak=0;this.ag=0;this.aR=0;this.aL=0;this.gJ=null;this.k=null;this.aF=false;};ITileLayerOverlay.prototype=new IOverlay();ITileLayerOverlay.prototype.getZIndex=function(){return this.dL;};ITileLayerOverlay.prototype.initialize=function(map){this.d=map;this.g=_createDivElement({position:'absolute',left:'0px',top:'0px',zIndex:this.getZIndex()});var ec=this.d.getPane(0);ec.appendChild(this.g);this.dT=this.d.getZoom();IEvent.addListener(this.d,'reposition',this,this.gc);};ITileLayerOverlay.prototype.remove=function(){var ec=this.d.getPane(0);ec.removeChild(this.g);this.fq();this.g=null;this.d=null;this.k=null;this.bM=null;};ITileLayerOverlay.prototype.copy=function(){};ITileLayerOverlay.prototype.fq=function(){while(this.k.length>0){var aZ=this.k.pop();while(aZ.length>0){var m=aZ.pop();this.ef(m);}}this.k=null;};ITileLayerOverlay.prototype.bX=function(src,top,left,width,height){var m=IUtil.createImage(src,top,left,width,height);if($.browser.mozilla){m.style.MozUserSelect='none';}else{m.unselectable="on";m.onselectstart=function(){return false;};}this.g.appendChild(m);return m;};ITileLayerOverlay.prototype.ef=function(img){this.g.removeChild(img);IEvent.removeListener(img);};ITileLayerOverlay.prototype.gy=function(level){var L=this.d;var D=L.getBounds();var t=L.getCurrentMapType().getTileSize();var eA=L.getCurrentMapType().getProjection();var bo=eA.fromLatLngToPixel(D.getSouthWest());var bn=eA.fromLatLngToPixel(D.getNorthEast());var fy=Math.abs(bn.x-bo.x);var fu=Math.abs(bo.y-bn.y);var R=L.getSize();var bi=R.width;var aT=R.height;var gz=fy*t/bi;var gI=fu*t/aT;};ITileLayerOverlay.prototype.cz=function(tile,tileX,tileY,tileWidth,tileHeight){if(isDefined(this.d)){var J=this.d.am.x;var l=this.d.am.y;IUtil.setImageSrc(tile,this.bM.getTileUrl(new IPoint(tileX,tileY),this.d.getZoom()));tile.style.left=(J+tileX*tileWidth)+'px';tile.style.top=(l+tileY*tileHeight)+'px';}};ITileLayerOverlay.prototype.gc=function(){var J=this.d.am.x;var l=this.d.am.y;var bi=this.d.getCurrentMapType().getTileSize();var fJ=this.ak;var aT=this.d.getCurrentMapType().getTileSize();var fK=this.ag;for(var i=0;i<this.k.length;i++){for(var j=0;j<this.k[i].length;j++){this.k[i][j].style.left=(J+bi*(fJ+i))+'px';this.k[i][j].style.top=(l+aT*(fK+j))+'px';}}};ITileLayerOverlay.prototype.redraw=function(force){var aM=this.d.getCurrentMapType();var bJ=aM.getProjection();var t=aM.getTileSize();var gw=this.d.getCenter();var gu=this.d.getBounds();var ez=this.d.eo;var f=ez.min();var r=ez.max();var au=Math.floor((f.x-this.d.am.x)/t);var ar=Math.floor((f.y-this.d.am.y)/t);var aN=Math.floor((r.x-this.d.am.x)/t);var aK=Math.floor((r.y-this.d.am.y)/t);var gE=false;if(this.k==null||((this.aR<au||this.ak>aN)||(this.aL<ar||this.ag>aK))||this.dT!=this.d.getZoom()){if(this.k!=null){this.fq();}this.dT=this.d.getZoom();this.k=new Array(aN-au+1);for(var irow=0;irow<this.k.length;irow++){this.k[irow]=new Array(aK-ar+1);for(var icol=0;icol<this.k[irow].length;icol++){var J=this.d.am.x+(irow+au)*t;var l=this.d.am.y+(icol+ar)*t;var bg=this.bM.getTileUrl(new IPoint(irow+au,icol+ar),this.d.getZoom());this.k[irow][icol]=this.bX(bg,J,l,t,t);}}this.ak=au;this.ag=ar;this.aR=aN;this.aL=aK;}else{if(this.ak<au){for(var i=0;i<au-this.ak;i++){var aZ=this.k.shift();++this.ak;var cx=this.ag;var bE= ++this.aR;for(var j=0;j<aZ.length;j++){this.cz(aZ[j],bE,cx,t,t);cx++;}this.k.push(aZ);}}if(this.aR>aN){for(var i=0;i<(this.aR-aN);i++){var aZ=this.k.pop();--this.aR;var cx=this.ag;var bE= --this.ak;for(var j=0;j<aZ.length;j++){this.cz(aZ[j],bE,cx,t,t);cx++;}this.k.unshift(aZ);}}if(this.ag<ar){for(var i=0;i<(ar-this.ag);i++){this.ag++;this.aL++;var bE=this.ak;for(var ic=0;ic<this.k.length;ic++){var m=this.k[ic].shift();this.cz(m,bE++,this.aL,t,t);this.k[ic].push(m);}}}if(this.aL>aK){for(var i=0;i<(this.aL-aK);i++){--this.aL;--this.ag;var bE=this.ak;for(var ic=0;ic<this.k.length;ic++){var m=this.k[ic].pop();this.cz(m,bE++,this.ag,t,t);this.k[ic].unshift(m);}}}if(this.ak>au){var J=parseInt(this.k[0][0].style.left);for(var i=0;i<(this.ak-au);i++){var ci=new Array(this.k[i].length);J-=t;for(var ic=0;ic<ci.length;ic++){var l=parseInt(this.k[0][ic].style.top);var gd={x:this.ak-i-1,y:this.ag+ic};var bg=this.bM.getTileUrl(gd,this.d.getZoom());var m=this.bX(bg,J,l,t,t);ci[ic]=m;Log.write('Append:'+m.src);}this.k.unshift(ci);}this.ak=au;}if(this.aR<aN){var de=this.k.length-1;var J=parseInt(this.k[de][0].style.left);for(var i=0;i<(aN-this.aR);i++){var ci=new Array(this.k[de].length);J+=t;for(var ic=0;ic<this.k[de].length;ic++){var l=parseInt(this.k[de][ic].style.top);var bg=this.bM.getTileUrl(new IPoint(this.aR+i+1,this.ag+ic),this.d.getZoom());var m=this.bX(bg,J,l,t,t);ci[ic]=m;}this.k.push(ci);}this.aR=aN;}if(this.ag>ar){var l=parseInt(this.k[0][0].style.top);var J=parseInt(this.k[0][0].style.left);for(var i=0;i<(this.ag-ar);i++){l-=t;for(var ic=0;ic<this.k.length;ic++){var bg=this.bM.getTileUrl(new IPoint(this.ak+ic,this.ag-i-1),this.d.getZoom());m=this.bX(bg,J+(ic*t),l,t,t);this.k[ic].unshift(m);}}this.ag=ar;}if(this.aL<aK){var eV=this.k[0].length-1;var l=parseInt(this.k[0][eV].style.top);for(var i=0;i<(aK-this.aL);i++){l+=t;for(var ic=0;ic<this.k.length;ic++){var J=parseInt(this.k[ic][eV+i].style.left);var bg=this.bM.getTileUrl(new IPoint(this.ak+ic,this.aL+i+1),this.d.getZoom());m=this.bX(bg,J,l,t,t);this.k[ic].push(m);}}this.aL=aK;}}};ITileLayerOverlay.prototype.gB=function(){var R=this.d.getSize();var aM=this.d.getCurrentMapType();var t=aM.getTileSize();var bi=Math.ceil(R.width/t)+2;var aT=Math.ceil(R.height/t)+2;while(this.k.length>bi){var fd=this.k.pop();for(var aq=0;aq<fd.length;aq++){this.ef(fd[aq]);}}for(var aq=this.k.length;aq<bi;aq++){this.k.push(new Array());}for(var aq=0;aq<this.k.length;aq++){while(this.k[aq].length>aT){var m=this.k[aq].pop();this.ef(m);}for(var el=this.k[aq].length;el<aT;el++){var m=this.bX(null,null,null,t,t);this.k[aq].push(m);this.cz(m,aq,el,t,t);}}};ITileLayerOverlay.prototype.show=function(){if(this.isHidden){this.aF=false;this.g.style.display='block';this.g.style.visibility='visible';this.redraw(true);}};ITileLayerOverlay.prototype.hide=function(){if(!this.isHidden){this.aF=true;this.g.style.display='none';this.g.style.visibility='hidden';}};ITileLayerOverlay.prototype.isHidden=function(){return this.aF;};function IIcon(copy){this.image=null;this.shadow=null;this.iconSize=null;this.shadowSize=null;this.iconAnchor=null;this.infoWindowAnchor=null;this.transparent=null;this.imageMap=null;this.iconTitle=null;this.zIndex=0;};I_DEFAULT_ICON={image:'',shadow:'',iconSize:new ISize(),shadowSize:new ISize(),iconAnchor:new IPoint(),infoWindowAnchor:new IPoint(),transparent:'',imageMap:'',iconTitle:''};IIcon.prototype.getImage=function(){return this.image;};function IMarker(latlng,icon){this.d=null;this.dL=0;this.C=null;this.dc=latlng;this.aV=icon||I_DEFAULT_ICON;this.aF=false;this.O=null;this.ai=null;this.cl=null;this.bq=null;this.bc=null;this.ce=null;this.ca=false;this.cC=null;};IMarker.uid=0;IMarker.prototype=new IOverlay();IMarker.prototype.getZIndex=function(){return this.dL;};IMarker.prototype.initialize=function(map){this.d=map;if(!isDefined(this.O)){this.fM();}var ej=this.d.getPane(5);ej.appendChild(this.O);if(isDefined(this.ai)){var dZ=this.d.getPane(3);dZ.appendChild(this.ai);}if(isDefined(this.bq)){this.d.getPane(5).appendChild(this.bq);}};IMarker.prototype.remove=function(){if(isDefined(this.O)){var ej=this.d.getPane(5);ej.removeChild(this.O);IEvent.removeListener(this.O);}if(isDefined(this.ai)){var dZ=this.d.getPane(3);dZ.removeChild(this.ai);}if(isDefined(this.bq)){this.d.getPane(5).removeChild(this.bq);}this.O=null;this.ai=null;this.bq=null;};IMarker.prototype.copy=function(){};IMarker.prototype.redraw=function(force){if(force&& !this.aF){var L=this.d;var cB=L.fromLatLngToDivPixel(this.dc);var dp=new IPoint(cB.x-this.aV.iconAnchor.x,cB.y+this.aV.iconAnchor.y);this.C.moveTo(new IPoint(dp.x,dp.y-this.aV.iconSize.height));if(isDefined(this.ai)){this.ai.style.left=dp.x+'px';this.ai.style.top=(dp.y-this.aV.shadowSize.height)+'px';}}};IMarker.prototype.bindInfoWindow=function(content,opts){var B=null;if(isDefined(opts)){B=opts;B.offset=new ISize(this.aV.infoWindowAnchor.x,this.aV.infoWindowAnchor.y);}else{B={offset:new ISize(this.aV.infoWindowAnchor.x,this.aV.infoWindowAnchor.y)};}if(!isDefined(content)){this.bc=_createDivElement({position:'relative',width:'100%',heght:'100%',overflow:'auto'});}else{this.bc=content;}this.ce=B;};IMarker.prototype.bindInfoWindowHtml=function(content,opts){var _content=_createDivElement({position:'relative',width:'100%',heght:'100%',overflow:'auto'});_content.innerHTML=(isDefined(content))?content:"";this.bindInfoWindow(_content,opts);};IMarker.prototype.openInfoWindow=function(content,opts,e){if(arguments.length>0){this.bindInfoWindow(content,opts);}this.d.openInfoWindow(this.dc,this.bc,this.ce,e);this.ca=true;};IMarker.prototype.getIconDom=function(){return this.O;};IMarker.prototype.openInfoWindowHtml=function(content,opts){var _content=_createDivElement({position:'relative',width:'100%',heght:'100%',overflow:'auto'});_content.innerHTML=(isDefined(content))?content:"";this.openInfoWindow(_content,opts);};IMarker.prototype.closeInfoWindow=function(){this.d.closeInfoWindow();this.ca=false;};IMarker.prototype.fM=function(){var be=this.aV;var m=be.image;var fe=be.shadow;var eI=be.iconSize;var fj=be.shadowSize;var gr=be.transparent;var dr=be.imageMap;this.O=IUtil.createImage(m,0,0,eI.width,eI.height);var eL=be.iconTitle;if(isDefined(eL)){this.O.title=eL;}if(isDefined(be.zIndex)){this.O.style.zIndex=be.zIndex;}this.O.style.cursor='pointer';this.C=new IDraggableObject(this.O);this.C.diableDragging();IEvent.addListener(this.C,'click',this,function(e){if(isDefined(this.bc)){if(this.ca){this.closeInfoWindow();this.ca=false;}else{this.openInfoWindow(this.bc,this.ce,e);}}IEvent.trigger(this,'click',e);});IEvent.addListener(this.C,'contextmenu',this,function(e){IEvent.trigger(this,'contextmenu',e);e.stopPropagation();});IEvent.addListener(this.C,'mousedown',this,function(e){IEvent.trigger(this,'mousedown',e);});IEvent.addListener(this.C,'mouseup',this,function(e){IEvent.trigger(this,'mouseup',e);});IEvent.addListener(this.C,'dragstart',this,function(e){IEvent.trigger(this,'dragstart',e);});IEvent.addListener(this.C,'dragend',this,function(e){if(isDefined(this.d)){this.dc=this.d.fromContainerPixelToLatLng(new IPoint(e.clientX,e.clientY));}IEvent.trigger(this,'dragend',e);});IEvent.addListener(this.C,'drag',this,function(e){IEvent.trigger(this,'drag',e);});IEvent.addDomListener(this.O,'mouseover',this,function(e){IEvent.trigger(this,'mouseover',e);});IEvent.addDomListener(this.O,'mouseout',this,function(e){IEvent.trigger(this,'mouseout',e);});if(isDefined(dr)){var eH='imarker'+IMarker.uid++;this.O.setAttribute('usemap','#'+eH);var dO=dr[0];for(var i=1;i<dr.length;i++){dO=dO+','+dr[i];}var cS=document.createElement('area');cS.setAttribute('shape','poly');cS.setAttribute('coords',dO);cS.setAttribute('href','javascript:void(0)');cS.setAttribute('alt','');this.bq=document.createElement('map');this.bq.setAttribute('name',eH);this.bq.appendChild(cS);}if(isDefined(fe)){this.ai=IUtil.createImage(fe,0,0,fj.width,fj.height);}};IMarker.prototype.getIcon=function(){return this.aV;};IMarker.prototype.getTitle=function(){return this.dS;};IMarker.prototype.getLatLng=function(){return this.dc;};IMarker.prototype.setLatLng=function(latlng){this.dc=latlng;if(this.d){this.redraw(true);}};IMarker.prototype.enableDragging=function(){this.C.enableDragging();};IMarker.prototype.disableDragging=function(){this.C.disableDragging();};IMarker.prototype.dragEnabled=function(){return this.C.dragEnabled();};IMarker.prototype.hide=function(){this.aF=true;this.O.style.visibility='hidden';this.O.style.display='none';if(isDefined(this.ai)){this.ai.style.visibility='hidden';this.ai.style.display='none';}if(isDefined(this.cl)){this.cl.style.visibility='hidden';this.cl.style.display='none';}this.closeInfoWindow();};IMarker.prototype.show=function(){this.aF=false;this.O.style.visibility='visible';this.O.style.display='block';if(isDefined(this.ai)){this.ai.style.visibility='visible';this.ai.style.display='block';}if(isDefined(this.cl)){this.cl.style.visibility='visible';this.cl.style.display='block';}};IMarker.prototype.isHidden=function(){return this.aF;};IMarker.prototype.setId=function(id){this.cC=id;};IMarker.prototype.getId=function(){return this.cC;};function IPolyline(latlngs,color,weight,opacity){this.ba=latlngs||[];this.K=new IGraphicsOption();if(isDefined(opacity)){this.K.strokeOpacity=opacity;};if(isDefined(color)){this.K.strokeColor=color;}if(isDefined(weight)){this.K.strokeWidth=weight;}this.bs=new ILatLngBound();this.bs.extend(latlngs);this.bk=null;this.d=null;this.bc=null;this.ce=null;this.ca=false;this.cC=null;};IPolyline.prototype=new IOverlay();IPolyline.prototype.initialize=function(map){this.d=map;this.redraw(true);};IPolyline.prototype.redraw=function(force){if(force){var da=this.d.fromLatLngToDivPixel(this.d.getCenter());var cZ=this.bs;var bo=this.d.fromLatLngToDivPixel(cZ.getSouthWest());var bn=this.d.fromLatLngToDivPixel(cZ.getNorthEast());var az=new IBound(bo.x,bn.y,bn.x,bo.y);var bH=[];for(var i=0;i<this.ba.length;i++){bH.push(this.d.fromLatLngToDivPixel(this.ba[i]));}if(!isDefined(this.bk)){var bG=map.getPane(7);this.bk=IGraphics.createPolyline(bH,this.K,az,da);bG.appendChild(this.bk);}else{IGraphics.setPolyline(this.bk,bH,this.K,az,da);}}};IPolyline.prototype.remove=function(){var bG=this.d.getPane(7);bG.removeChild(this.bk);};IPolyline.prototype.getVertexCount=function(){return this.ba.length;};IPolyline.prototype.getVertex=function(index){return this.ba[index];};IPolyline.prototype.getBounds=function(){return this.bs;};IPolyline.prototype.show=function(){if(isDefined(this.bk)){this.bk.style.visibility='visible';}};IPolyline.prototype.hide=function(){if(isDefined(this.bk)){this.bk.style.visibility='hidden';}};IPolyline.prototype.bindInfoWindow=function(content,opts){var B=null;if(isDefined(opts)){B=opts;}if(!isDefined(content)){this.bc=_createDivElement({position:'relative',width:'100%',heght:'100%',overflow:'auto'});}else{this.bc=content;}this.ce=B;};IPolyline.prototype.openInfoWindow=function(content,opts,e){if(arguments.length>0){this.bindInfoWindow(content,opts);}var mousePos=mousePosition(e);var point=new IPoint(mousePos.x,mousePos.y);var cLatLng=map.fromContainerPixelToLatLng(point);this.d.openInfoWindow(cLatLng,this.bc,this.ce,e);this.ca=true;};IPolyline.prototype.setId=function(id){this.cC=id;};IPolyline.prototype.getId=function(){return this.cC;};function IPolygon(latlngs,strokeColor,strokeWeight,strokeOpacity,fillColor,fillOpacity,opts){this.ba=latlngs||[];this.K=new IGraphicsOption();this.K.fill=true;this.K.strokeColor=(isDefined(strokeColor))?strokeColor:'#000000';this.K.strokeWidth=(isDefined(strokeWeight))?strokeWeight:2;if(isDefined(strokeOpacity)){this.K.strokeOpacity=strokeOpacity;}if(isDefined(fillOpacity)){this.K.fillOpacity=fillOpacity;}this.K.fillColor=(isDefined(fillColor))?fillColor:'#0000FF';this.bs=new ILatLngBound();this.bs.extend(latlngs);this.bj=null;this.d=null;};IPolygon.prototype=new IOverlay();IPolygon.prototype.initialize=function(map){this.d=map;this.redraw(true);};IPolygon.prototype.remove=function(){var bG=this.d.getPane(7);bG.removeChild(this.bj);};IPolygon.prototype.redraw=function(force){if(force){var da=this.d.fromLatLngToDivPixel(this.d.getCenter());var cZ=this.bs;var bo=this.d.fromLatLngToDivPixel(cZ.getSouthWest());var bn=this.d.fromLatLngToDivPixel(cZ.getNorthEast());var az=new IBound(bo.x,bn.y,bn.x,bo.y);var bH=[];for(var i=0;i<this.ba.length;i++){bH.push(this.d.fromLatLngToDivPixel(this.ba[i]));}if(!isDefined(this.bj)){var bG=map.getPane(7);this.bj=IGraphics.createPolygon(bH,this.K,az,da);bG.appendChild(this.bj);}else{IGraphics.setPolygon(this.bj,bH,this.K,az,da);}}};IPolygon.prototype.getVertexCount=function(){return this.ba.length;};IPolygon.prototype.getVertex=function(index){return this.ba[index];};IPolygon.prototype.getBounds=function(){return this.bs;};IPolygon.prototype.show=function(){if(isDefined(this.bj)){this.bj.style.visibility='visible';}};IPolygon.prototype.hide=function(){if(isDefined(this.bj)){this.bj.style.visibility='hidden';}};