(function(){telenavis={};telenavis.constants={baseUrl:'http://live4.telenavis.com/jsmapv2/',minZoom:1,maxZoom:18,defCenter:{x:24.363,y:38.842,srid:4326},defZoom:5,defLocale:'el-GR',css:'css/rmap.css',key:'54321098',maxPinsInView:100,overviewSize:100,overviewZoomDifference:1,viewRectangleMinimumZoom:0,allowMapWrapping:true,usePhysics:true,tileSize:256,noMapImage:'http://live4.telenavis.com/jsmapv2/images/nomap.png',tileUrl:'http://live4.telenavis.com/jsmapv2/tile.ashx',geocoderUrl:'http://live4.telenavis.com/jsmapv2/geocode.ashx',routerUrl:'http://live4.telenavis.com/jsmapv2/route.ashx',tileSources:[],showLoadingMessages:true,loading:{left:'17px',top:'20px',right:'',bottom:'',url:'http://live4.telenavis.com/jsmapv2/images/map-loader-2.gif'},showLoadingMessages:true,maxScrollDistance:2000,storageVersion:'2.1.0',bb:{x1:-20037508.342789,y1:-20037508.342789,x2:20037508.342789,y2:20037508.342789}};/*1.1.0*/var u=telenavis.constants;u.version='1.1.1';var F={sd:"Unsupported projection srid.",hg:"telenavis.Projector namespace is not available to perform projection conversion! Please check your implementation.",so:"Polyline html element was found with that id.",dZ:"Invalid WorldPoint passed.",sO:"Invalid element id. Can not find element with that id.",dQ:"zIndex for PinLayer out of range.",sx:"An unknown error occured while accessing the server. If this error persists please contact the site administrator.",sc:"Invalid parameters where passed.",dR:"A route request requires at least two points.",sn:"A route request is already pending. If you require multiple requests please create multiple telenavis.Router instances.",hd:"You are attempting to call the OverlayLayer base class!",dz:"WARNING: The maximum adviced number of pins on the map has been reached. You can click ok and the map will contain more pins that it is adviced and it's performance will be effected.\nIf you cancel the map will contain only partial pins.\n\nClick ok to proceed with all availabel pins.\n\n(you will not be asked again until the page is reloaded.)",hs:"Currently showing only portion of the available pins.Reset ",dn:"Attempted to draw a polyline but could not get the layer's DIV.",db:"Parent div not found",aJ:"No world pos set for pin before adding to layer.",eX:"Not implemented.",dv:"Map already initialized.",dA:"A layer with the same id already exists in the map.",dG:"Invalid map object."};var rt={um:90,tT:1000};var yX={TILE_LAYER:0,USER_LAYER:1,OVERLAY_LAYER:2};var rg={uR:0,yL:1,hf:2};var H={og:'zoomBar',aO:'mousedown',yg:'mousemove',uH:'mouseup',us:'pointer',tG:'px',uL:'visible',uX:'hidden',fk:'fk',se:'se'};var ec={fs:u.baseUrl+'images/zoom_plus.png',fg:u.baseUrl+"images/zoom_level_top.png",ff:u.baseUrl+"images/zoom_level.png",fQ:u.baseUrl+"images/zoom_level_bottom.png",fm:u.baseUrl+'images/zoom_minus.png',fn:u.baseUrl+'images/zoom_handle.png',ur:u.baseUrl+'images/Open-hand.cur',fb:u.baseUrl+'images/Closed-hand.cur'};var rv=function(v){v=v?v:window.event;if(v.stopPropagation){v.stopPropagation();}else{v.cancelBubble=true;}if(v.preventDefault){v.preventDefault();}else{v.returnValue=false;}};var rP=function(el,rR){if(typeof(rR)=='string'){el.style.overflow=rR;}else{if(rR){el.style.overflow=H.uL;}else{el.style.overflow=H.uX;}}};var wP=function(el,rR){if(typeof(rR)=='string'){el.style.visibility=rR;}else{if(rR){el.style.visibility=H.uL;}else{el.style.visibility=H.uX;}}};var iw=function(el,pi){el.innerHTML=pi;};var it=function(a){return!isFinite(a);};var wR=function(wt,wV,et){wt.style.position="absolute";if(wm(wV)&&wV!==null){wt.style.left=wO(wV);}if(wm(et)&&et!==null){wt.style.top=wO(et);}};var rU=function(wt,wk,wh){if(wm(wk)&&wk!==null){wt.style.width=wO(wk);}if(wm(wh)&&wh!==null){wt.style.height=wO(wh);}};var wO=function(eT){if(eT!==null){switch(typeof(eT)){case'undefined':return'';case'number':if(!it(eT)){return eT+'px';}break;case'string':return(eT.match('%$')=='%')?eT:Z(eT)+'px';}}return'';};var ws=function(wt,pv){if(pv!==null&&!it(pv)){wt.style.zIndex=pv;}};var uK=function(wt,fe,pj){wt.style[fe]=pj;};var I=function(v,fw){v=v?v:window.event;if(!fw){rv(v);}return v;};var eO=function(Q,wV,et,ed,wk,wh){var o=new Image();o.id=Q;o.src=ed;wR(o,wV,et);rU(o,wk,wh);return o;};var wX=function(Q,wV,et,wk,wh){var o=yz('div');o.id=Q;wR(o,wV,et);rU(o,wk,wh);return o;};var wm=function(wt){return typeof(wt)!="undefined";};var yl=function(yk){delete yk;};var hj=function(ph){alert(ph);};var ez=function(Q){return document.getElementById(Q);};var sy=function(el,eD){return document.createElementNS(el,eD);};var yz=function(eD){return document.createElement(eD);};var eU=function(el,eD,eT){el.setAttribute(eD,eT);};var T=function(th,fu){th.appendChild(fu);};var wB=function(a){return Math.abs(a);};var tC=function(a,b){return Math.pow(a,b);};var eP=function(a){return Math.floor(a);};var sW=function(a){return Math.ceil(a);};var eQ=function(a){return Math.round(a);};var ol=function(a){return Math.log(a);};var oj=function(a){return Math.sqrt(a);};var sS=function(a){return Math.tan(a);};var sL=function(a){return Math.atan(a);};var yZ=Math.PI;var sX=function(a){return Math.exp(a);};var hh=function(a){return parseInt(a,10);};var wH=function(oG,oD){return Math.min(oG,oD);};var wM=function(oG,oD){return Math.max(oG,oD);};var eC=function(ra,sB){return setTimeout(ra,sB);};var uT=function(sZ){return clearTimeout(sZ);};var Z=function(tW){return parseFloat(tW);};var aX=function(ed){var aC=0,aN=0;if(ed.offsetParent){do{aN+=ed.offsetLeft;aC+=ed.offsetTop;ed=ed.offsetParent;}while(ed);}return new K(aN,aC);};var te=function(wt,rS,oA,oU){var tW=J(oA,oU);rs(wt,rS,tW);return{wt:wt,rS:rS,oA:oA,oU:oU,yy:function(){eB(wt,rS,tW);}};};var J=function(yk,dd){return function(){return yk[dd].apply(yk,arguments);};};var wI=function(uw){if(uw&&uw.parentNode){uw.parentNode.removeChild(uw);yl(uw);}};var tV=function(v){var h,s;v=I(v,true);h=v.clientX;s=v.clientY;if(document.body.clientLeft){h+=document.body.clientLeft;}if(document.body.clientTop){s+=document.body.clientTop;}s+=document.documentElement.scrollTop+document.body.scrollTop;h+=document.documentElement.scrollLeft;return new K(h,s);};var ru=function(O){var S=new Image();S.src=O;return S;};var yV=function(O,V){var yj=function(){V();wI(rE);};var rE=yz("script");rE.type="text/javascript";rE.onload=yj;rE.onerror=yj;rE.onreadystatechange=function(){if(rE.readyState=="loaded"){yj();}};rE.src=O;T(document.body,rE);return rE;};var G=function(ph){throw new Error(ph);};var eR=function(){};eR.prototype.addEventListener=function(wz,ra){var q=this;if(!wm(q.wC)){q.wC=[];}wz=wz.toString();if(!wm(q.wC[wz])){q.wC[wz]=[];}q.wC[wz].push(ra);};eR.prototype.removeEventListener=function(wz,ra){var rG,yB,o,q=this;if(!wm(q.wC)){return;}wz=wz.toString();if(wm(q.wC[wz])){for(o=0;o=0){P[h][s].sv(q);}}}this.uf=true;};wc.prototype.di=function(wA){wA.sv(this);};telenavis.OverlayLayer=wc;var wQ=function(uI,uS,uO,uc){this.x1=uI;this.x2=uO;this.y1=uS;this.y2=uc;};wQ.prototype.getWidth=function(){return wB(this.x2-this.x1);};wQ.prototype.getHeight=function(){return wB(this.y2-this.y1);};wQ.prototype.normalize=function(){var q=this;return new wQ(wH(q.x1,q.x2),wH(q.y1,q.y2),wM(q.x1,q.x2),wM(q.y1,q.y2));};wQ.prototype.contains=function(p1){var q=this;return wH(q.x1,q.x2)<=p1.x&&wM(q.x1,q.x2)>p1.x&&wH(q.y1,q.y2)<=p1.y&&wM(q.y1,q.y2)>p1.y;};wQ.prototype.intersects=function(tA){var q=this;return tA.contains({x:q.x1,y:q.y1})||tA.contains({x:q.x2,y:q.y1})||tA.contains({x:q.x2,y:q.y2})||tA.contains({x:q.x1,y:q.y2});};wQ.prototype.overlaps=function(uQ){var q=this;return!(uQ.x1>q.x2||uQ.x2q.y2||uQ.y2this.y2;};wQ.prototype.hasReversedX=function(){return this.x1>this.x2;};wQ.prototype.toString=function(){return"{"+this.x1+","+this.y1+"} - {"+this.x2+","+this.y2+"}";};wQ.prototype.AABB=function(p0,p1){var e,d,m,adx,ady,sb=2.2204460492503131e-016,b=this;e={x:b.x2-b.x1,y:b.y2-b.y1};d={x:p1.x-p0.x,y:p1.y-p0.y};m={x:p0.x+p1.x-b.x1-b.x2,y:p0.y+p1.y-b.y1-b.y2};adx=wB(d.x);ady=wB(d.y);adx+=sb;ady+=sb;return!(wB(m.x)>e.x+adx||wB(m.y)>e.y+ady||wB(m.x*d.y-m.y*d.x)>e.x*ady+e.y*adx);};telenavis.Rect=wQ;var eS=function(wk,wh){this.width=wk;this.height=wh;};eS.prototype.toString=function(){return"Size { width:"+this.width+", height:"+this.height+"}";};telenavis.Size=eS;var K=function(h,s){this.x=h;this.y=s;};K.prototype.distanceTo=function(n){var wp=n.x-this.x,wj=n.y-this.y;return oj((wp*wp)+(wj*wj));};K.prototype.toString=function(){return"Point {x:"+this.x+",y:"+this.y+"}";};K.prototype.equals=function(p1){return(this.x===p1.x&&this.y===p1.y);};telenavis.Point=K;var wf=function(h,s,dr){this.x=h;this.y=s;this.srid=dr;};wf.prototype.toWGS84=function(){var q=this;if(wE){if(q.srid==wE.MercSrid){return wE.Merc2WGS(q.x,q.y);}else if(q.srid==wE.WGSSrid){return q;}else{G(F.sd);}}else{G(F.gH);}};wf.prototype.toMerc=function(){var q=this;if(wE){if(q.srid==wE.WGSSrid){return wE.WGS2Merc(q.x,q.y);}else if(q.srid==wE.MercSrid){return q;}else{G(F.sd);}}else{G(F.gH);}};wf.prototype.distanceTo=function(eZ){var sY=this.toMerc(),sg=eZ.toMerc(),wp=(sY.x-sg.x),wj=(sY.y-sg.y);return oj((wp*wp)+(wj*wj));};wf.prototype.clone=function(){return new wf(this.x,this.y,this.srid);};wf.prototype.equals=function(n){if(!n){return false;}return(n.x==this.x&&n.y==this.y&&n.srid==this.srid);};wf.prototype.toString=function(){return"Point {x:"+this.x.toFixed(8)+",y:"+this.y.toFixed(8)+",srid:"+this.srid+"}";};telenavis.WorldPoint=wf;var wE={iu:20037508.34,MercSrid:90013,WGSSrid:4326,WGS2Merc:function(oT,yP){var h=oT*this.iu/180,s=ol(sS((90+yP)*yZ/360))/(yZ/180);s=s*this.iu/180;return new wf(h,s,90013);},Merc2WGS:function(h,s){var oT=(h/this.iu)*180,yP=(s/this.iu)*180;yP=180/yZ*(2*sL(sX(yP*yZ/180))-yZ/2);return new wf(oT,yP,4326);}};telenavis.Projector=wE;var eh=function(Q){this.M=null;this.rW=null;this.wW=[];this.Q=Q;this.strokeColor="blue";this.strokeWidth="3px";this.strokeOpacity=0.4;this.fillColor="none";this.fillOpacity=0.4;this.zIndex=-1;};eh.prototype.gP=function(tB,sR,sQ){var q=this,o,n,eZ,ek,sU,oc,yE=q.wW,w=q.M.w,hy=null,tX=[],tr=[],rM=null,m=false,l=false,eb;q.iQ=null;q.oY=null;q.oR=null;q.oO=null;for(o=0;o=0&&uI<=rc.width&&uS>=0&&uS<=rc.height)||(uO>=0&&uO<=rc.width&&uc>=0&&uc<=rc.height)){return true;}return gT.AABB(oJ,oL);};eh.prototype.aK=function(wy){var q=this,w=wy.w;q.M=wy;q.rW=w.getId()+"."+q.M.getId()+".Polyline."+q.Q;q.rO();};eh.prototype.rO=function(){gA(this);};eh.prototype.hu=function(){var q=this,rF,tQ,yY,uk;if(!rF){rF=new K(q.wW[0].x,q.wW[0].y);tQ=new K(q.wW[0].x,q.wW[0].y);}for(uk=0;ukq.aV||wB(wp)>q.aV||q.eq){if(!q.eq){q.wn(D.events.DRAG_START,q);k.onmouseup=null;rs(yD,H.uH,sa);}q.eq=true;if(q.uG!==null){k.src=q.uG;}wR(k,(uj.x-(tI.x-wd.x))+tB.x,(uj.y-(tI.y-wd.y))+tB.y);k.title="";}}return false;}function sa(e){e=I(e);wd={x:e.clientX,y:e.clientY};k=q.S;wj=tI.y-wd.y;wp=tI.x-wd.x;s=uj.y-wj;h=uj.x-wp;wR(k,h,s);k.src=q.ed;if(q.rY){k.title=q.rY;}pz=q.em;r=q.M.w.W[0].r;s+=pz.y+Z(r.style.top);h+=pz.x+Z(r.style.left);rp=q.M.w.worldPosAt({x:h,y:s});q.setWorldPos(rp);eB(yD,H.yg,tO);eB(yD,H.uH,sa);q.eq=false;q.wn(D.events.DRAG_COMPLETE,q);return false;}if(q.oh&&k){rs(yD,H.yg,tO);}q.S.onmouseup=function(e){eB(yD,H.yg,tO);q.pa(e);return false;};return false;};D.prototype.draggable=function(sf){if(wm(sf)){this.oh=sf;}return this.oh;};D.prototype.dragImage=function(url,shift){var q=this;if(wm(url)){q.uG=url;}if(wm(shift)){q.ok=shift;}return q.uG;};D.prototype.getId=function(){return this.Q;};D.prototype.getLayer=function(){return this.M;};D.prototype.getImageSrc=function(){return this.ed;};D.prototype.setImageSrc=function(p1){var q=this;if(q.S){q.S.src=p1;}q.ed=p1;return true;};D.prototype.setzIndex=function(wl){var q=this;q.wl=wl;if(q.S){ws(q.S,q.wl);}};D.prototype.getHotspot=function(){return this.em;};D.prototype.setHotspot=function(p1){var q=this;q.em=p1;if(q.S){q.uD(q.getScreenPos());}return true;};D.prototype.getTip=function(){return this.rY;};D.prototype.setTip=function(p1){var q=this;if(p1){q.rY=p1;if(q.S){q.S.title=p1;}}return true;};D.prototype.getImage=function(){return this.S;};D.prototype.getWorldPos=function(){return this.tU;};D.prototype.setWorldPos=function(p1){var q=this,st;if(p1.srid!=wE.WGSSrid){G(F.dZ);}q.tU=p1;if(q.S){st=q.M.w.screenPosAt(p1);q.uD(st);}return true;};D.prototype.getScreenPos=function(){var q=this;if(q.S){return new K(Z(q.S.style.left)+q.em.x,Z(q.S.style.top)+q.em.y);}return null;};D.prototype.cursor=function(ef){var q=this;if(wm(ef)){q.ef=ef;if(q.S&&q.ef!==null){q.S.style.cursor=q.ef;}}return q.ef;};D.prototype.show=function(){if(this.S){wP(this.S,true);}};D.prototype.hide=function(){if(this.S){wP(this.S,false);}};D.events={CLICK:"onclick",HOVER:"onhover",CONTEXT_MENU:"oncontextmenu",DRAG_COMPLETE:"ondragover",DRAG_START:"ondragstart"};telenavis.Pin=D;var fG=function(pi){var r,py,wk,wh;r=wX('',0,0,200,500);rP(r,false);wP(r,false);iw(r,"");T(document.body,r);py=ez("_tmp");wk=py.offsetWidth;wh=py.offsetHeight;wI(r);return new eS(wk,wh);};var iE=new ru(u.baseUrl+"images/windowTopLeft.png");var iT=new ru(u.baseUrl+"images/windowTop.png");var iF=new ru(u.baseUrl+"images/windowTopRight.png");var iG=new ru(u.baseUrl+"images/windowRight.png");var iH=new ru(u.baseUrl+"images/windowLeft.png");var iO=new ru(u.baseUrl+"images/windowBottomRight.png");var iR=new ru(u.baseUrl+"images/windowBottomLeft.png");var iI=new ru(u.baseUrl+"images/windowBottom.png");var rA=new ru(u.baseUrl+"images/windowNose.png");var gk=new ru(u.baseUrl+"images/windowShadow.png");var gd="white";var wq=function(Q,yI){this.we=new K(0,0);this.Y=new eS(300,200);this.r=null;this.wL=null;this.iS="";this.wC=[];this.Q=Q;this.yI=yI;this.tf=new wQ(0,0,0,0);this.autoSize=true;this.noseReverse=false;};wq.prototype=new eR();wq.prototype.hp=function(){return this.yI?ez(this.yI):document.documentElement;};wq.prototype.tF=function(Q,wV,et,wk,wh){var r=wX(Q,wV,et,wk,wh);return r;};wq.prototype.ep=function(O,wV,et,wk,wh,yB,gb,wl){var k=eO('',wV,et,O,wk,wh);k.style.right=wO(yB);k.style.bottom=wO(gb);ws(k,wl);return k;};wq.prototype.ha=function(){this.wn(wq.events.CLICK,null);};wq.prototype.getPosition=function(){return new K(Z(this.r.style.left),Z(this.r.style.top));};wq.prototype.setPosition=function(wK){if(this.r){wR(this.r,wK.x,wK.y);}this.we=wK;};wq.prototype.setContents=function(aZ){if(this.wL){iw(this.wL,aZ);}this.iS=aZ;};wq.prototype.getContents=function(){return this.iS;};wq.prototype.getDiv=function(){return this.wL;};wq.prototype.getId=function(){return this.Q;};wq.prototype.getBoundsRect=function(){return this.tf;};wq.prototype.setSize=function(rZ){var q=this;q.autoSize=false;if(q.r){var wp=rZ.width-q.Y.width,wj=rZ.height-q.Y.height;wR(q.r,Z(q.r.style.left)-wp/2,Z(q.r.style.top)-wj);rU(q.r,rZ.width,rZ.height);rU(q.wL,rZ.width,rZ.height);q.tf.x1-=wp/2;q.tf.x2+=wp/2;q.tf.y1-=wj;var uC=q.r.childNodes[0];wR(uC,Z(uC.style.left)-wp/2,Z(uC.style.top)-wj);rU(uC,q.tf.getWidth()*2,q.tf.getHeight());q.r.childNodes[1].style.left=wO((rZ.width/2)-(rA.width/2));q.wn(wq.events.SIZE_CHANGE,q);}q.Y=rZ;};wq.prototype.getSize=function(){return this.Y;};wq.prototype.setzIndex=function(wl){if(this.r){this.r.style.zIndex=wl;}};wq.prototype.getzIndex=function(){if(this.r){return this.r.style.zIndex;}return 0;};wq.prototype.show=function(){var q=this;if(q.autoSize){q.Y=fG();}var tK=wM(iH.width,iE.width,iR.width),yc=wM(iG.width,iF.width,iO.width),yb=wM(iT.height,iE.height,iF.height),yn=wM(iI.height,iR.height,iO.height),ot=q.Y.width+tK+yc,gt=q.Y.height+yb+wM(yn,rA.height),wV=q.we.x-(ot/2)+tK,et=q.we.y-q.Y.height-rA.height;q.tf=new wQ(wV-tK,et-yb,wV+q.Y.width+yc,et+q.Y.height+wM(yn,rA.height));if(q.r){wI(q.r);}q.aM=ez(q.yI);if(q.aM){q.r=q.tF(q.Q,wV,et,q.Y.width,q.Y.height);T(q.r,q.ep(gk.src,(q.Y.width/2)-ot,null,ot*2,gt,null,-rA.height,null,-10000));T(q.r,q.ep(rA.src,(q.Y.width/2)-(rA.width/2),null,null,null,null,-rA.height,1));T(q.r,q.ep(iE.src,-tK,-yb));T(q.r,q.ep(iT.src,0,-yb,"100%",iT.height));T(q.r,q.ep(iF.src,null,-yb,null,null,-yc));T(q.r,q.ep(iH.src,-tK,0,iH.width,"100%"));T(q.r,q.ep(iR.src,-tK,null,null,null,null,-yn));T(q.r,q.ep(iI.src,0,null,"100%",iI.height,null,-yn));T(q.r,q.ep(iO.src,null,null,null,null,-yc,-yn));T(q.r,q.ep(iG.src,null,0,iG.width,"100%",-yc));q.wL=q.tF("",0,0,q.Y.width,q.Y.height);q.wL.className="telenavis_window";rP(q.wL,"auto");ws(q.wL,1);q.wL.style.fontFamily="Arial";q.wL.style.fontSize="10px";q.wL.style.background=gd;q.wL.onmousedown=function(v){I(v);};q.wL.onclick=function(v){if(!q.wn(wq.events.CLICK,q)){q.hide();}};T(q.r,q.wL);iw(q.wL,q.iS);for(var o=1;ou.maxZoom){E=q.U;}q.U=E;if(q.wb){q.wb.iU();}};f.prototype.op=function(wD){if(this.X.equals(wD)){return;}this.X.x=wD.x;this.X.y=wD.y;this.uY=0;for(var rz=0;rz=yq){eu+=eu<0?yq:-yq;}else{eu=0;}}else{eu+=q.rx*ac;}if(q.rn===0){if(wB(ey)>=yq){ey+=ey<0?yq:-yq;}else{ey=0;}}else{ey+=q.rn*ac;}ey=ey>rN?ey=rN:(ey<-rN?ey=-rN:ey);eu=eu>rN?eu=rN:(eu<-rN?eu=-rN:eu);if(eu===0&&ey===0&&q.rx===0&&q.rn===0){q.tZ=false;q.ie=0;q.ib=0;q.W[0].eH();q.W[0].yf();return;}ih.x-=eu;ih.y-=ey;rL.iM(ih.x,ih.y);eC(an,50);if(!uV){uV=eC(eH,200);}}an();};f.prototype.getServerLayersArray=function(){return this.wZ;};f.prototype.getServerLayer=function(gs){var W=this.wZ;for(var i=0;iu.maxZoom){return false;}if(!wm(eF)){eF=this.U;}if(eF!=this.U){this.op(wD);this.pb(eF);this.rO();this.ou.oy();this.wn(f.events.ZOOM_CHANGED,this.getZoom());}else{var wT=wB(this.screenPosAt(this.X).distanceTo(this.screenPosAt(wD)));if(wT0){q.W[o].rr();q.W.splice(o,1);return true;}else{return false;}};f.prototype.getLayerIndex=function(p1){var q=this,i=-1;for(i=0;its&&fI>ej){ad=i;}else{break;}}var X=new wf(wF.x1+(wF.x2-wF.x1)/2,wF.y1+(wF.y2-wF.y1)/2,4326);q.moveTo(X,ad);}};f.tP={pu:[],register:function(ra){if(typeof(ra)=="function"){this.pu.push(ra);}},gJ:function(w){for(var o=0;o=u.minZoom){this.zoomBy(-1,X);}};f.prototype.zoomBy=function(tl,X,V,yS){var q=this,r;if(!X){var wi=q.getSize();X={x:wi.width/2,y:wi.height/2};}r=q.ah(X);function af(){oN++;var ww=r.pM*tC(2,(fL/yS)*oN);ww=it(ww)?1:ww;ws(r,rt.um);r.pp(ww);if(oN=0){P[h][s].rO();}}}q.refreshOverview();};f.events={DRAG_END:"ondragend",DRAG_START:"ondragstart",DRAG_MOVE:"ondragmove",SCROLL_START:"onscrollstart",SCROLL_END:"onscrollend",ZOOM_CHANGED:"zoomchanged",CENTER_CHANGED:"centerchanged",ZOOM_START:"onzoomstart",ZOOM_END:"onzoomend",SIZE_CHANGED:"onsizechanged",TILE_LOADED:"ontileloaded",CLICK:"onclick",DOUBLE_CLICK:"onDoubleClick",CONTEXT_MENU:"oncontextmenu",FX_ZOOM_DONE:"_fxZoomDone",MAP_LOADED:"_onmapload",SERVERLAYERVISIBILITY_CHANGED:'_serverlayervisibilitychanged'};telenavis.jsMap=f;var yR=function(wb,O,V){var q=this,k=new Image();q.wb=wb;q.O=O;q.V=V;k.onload=J(q,"hn");k.onabort=J(q,"hm");k.onerror=J(q,"hb");q.S=k;};yR.prototype.yT=function(){this.S.src=this.O;};yR.prototype.hb=function(e){var q=this;if(q.V){q.V(2);}q.wb.ub();};yR.prototype.hm=function(e){var q=this;if(q.V){q.V(1);}q.wb.ub();};yR.prototype.hn=function(e){var q=this;if(q.V){q.V(0);}q.wb.ub();};var tg=function(w){var q=this;q.wb=[];q.oK=false;q.gY=8;q.w=w;q.oS=0;};tg.prototype.ub=function(){eC(J(this,"hc"),50);};tg.prototype.hc=function(){var q=this,k,er,o;q.oS--;if(q.wb.length===0){q.oK=false;q.w.wn(f.events.MAP_LOADED);q.w.hideLoading();}else{if(q.oS>0){return;}er=wH(q.gY,q.wb.length);q.oS=er;for(o=0;oq.B.width){for(i=q.B.width;ip1.width;i--){q.pG();}}if(p1.height>q.B.height){for(i=q.B.height;ip1.height;i--){q.oM();}}};wG.prototype.gG=function(){var pF=[],i;for(i=0;i0){var V=this.pY();var O=telenavis.constants.baseUrl+"tftr.ashx?x="+h+"&y="+s+"&z="+E+"&l="+ry.join(',')+"&key="+u.key+"&callback="+V+"&tm="+new Date().getTime();O+=pZ;yV(O,J(this,"hR"));this.tH=[];}};wY.prototype.rr=function(){var q=this,i,ia;q.pk();wI(q.k);wv(q,"k");for(i=0;i30){ri();}clearTimeout(physicsTimer);physicsTimer=setTimeout(ri,30);}t.eH();};d.uo=function(e){e=I(e);eB(rh,'mousemove',d.ud);eB(rh,'mouseup',d.uo);if(rC==rg.uR){t.r.releaseCapture();}t.yr(om,ua);dragging=false;if(posX==startX&&posY==startY){t.rK(f.events.CLICK,t.tm(t.tz()));tx();}else{if(!u.usePhysics){tx();}else{d.sliding=true;ri();}}};var ri=function(){if(!dragging&&!d.sliding){return;}if(dragging){curX=posX;curY=posY;}var tt,a,c,dtdt,dt=0.05,eV,pr=0.0,iW=0.0,ui=1.0,iP=120,tp,ta,tj;eV=(wB(curX-prevX)>iP)||(wB(curY-prevY)>iP)?0.3:0.1;dtdt=dt*dt;a=pr/ui;c=curX;tt=(2.0-eV)*c-(1.0-eV)*prevX+a*dtdt;prevX=c;curX=tt;a=iW/ui;c=curY;tt=(2.0-eV)*c-(1.0-eV)*prevY+a*dtdt;prevY=c;curY=tt;if(!dragging){wR(t.r,curX,curY);}tp=curX-prevX;ta=curY-prevY;tj=tp*tp+ta*ta;px=new Date().valueOf();if(tj<=0.5&&!dragging){tx();}else{if(!dragging&&d.sliding){setTimeout(ri,30);}}};var tx=function(){t.eH();t.yf();t.rK(f.events.DRAG_END,t.w);d.sliding=false;};posX=Z(t.r.style.left);posY=Z(t.r.style.top);startX=posX;startY=posY;t.yr(oW,ua);t.rK(f.events.DRAG_START,t.w);rs(rh,'mousemove',d.ud);rs(rh,'mouseup',d.uo);if(rC==rg.uR){d.setCapture();}dragging=true;if(u.usePhysics){prevX=posX;prevY=posY;curX=posX;curY=posY;ri();}};R.prototype.fa=function(){return this.hG===0&&this.hF===0;};R.prototype.hD=function(e){e=I(e);var q=this,wJ;if(!q.rK(f.events.DOUBLE_CLICK,q.tm(q.tz()))){wJ=q.tm(q.tz());q.w.moveTo(wJ,q.yw()+1);}};R.prototype.fh=function(e){e=I(e);var q=this,w=q.w;if(w.wd===null){return;}if(fz(e)<0){w.zoomOut(w.wd);}else{w.zoomIn(w.wd);}return;};R.prototype.yH=function(){return this.w.getSize();};R.prototype.rK=function(fx,fc,fj){return this.w.wn(fx,fc,fj);};R.prototype.fV=function(v){v=I(v);var q=this;q.rK(f.events.CONTEXT_MENU,q.tz(),q.tm(q.tz()));return false;};R.prototype.getDiv=function(){return this.r;};R.prototype.rl=function(){return{x:Z(this.r.style.left),y:Z(this.r.style.top)};};R.prototype.iM=function(x,y){wR(this.r,x,y);};R.prototype.fl=function(){var q=this,ai=q.rl();return{x:ai.x+q.en.x,y:ai.y+q.en.y};};R.prototype.dO=function(){return{width:this.wa.B.width*this.L,height:this.wa.B.height*this.L};};R.prototype.yf=function(){var q=this,wU=q.yH(),wJ=new K(wU.width/2,wU.height/2),n=q.tm(wJ);q.ar(n);};R.prototype.eH=function(){this.dY();};R.prototype.dY=function(){var rV=this.fl(),wi=this.dO(),uJ={x:rV.x+wi.width,y:rV.y+wi.height},aT=this.yH(),wH=this.L/2;var eK=0;while(rV.x>-wH){this.dU();rV.x-=this.L;eK++;}eK=0;while(rV.y>-wH){this.dI();rV.y-=this.L;eK++;}eK=0;while(uJ.x<(aT.width+wH)){this.dD();uJ.x+=this.L;eK++;}eK=0;while(uJ.y<(aT.height+wH)){this.dF();uJ.y+=this.L;eK++;}if(this.uV){wv(this,"uV");}};R.prototype.dU=function(){var q=this;q.wa.pG();q.en.x-=q.L;q.rj.x-=1;q.wa.gD();};R.prototype.dD=function(){var q=this;q.ds-=q.L;q.wa.gW();q.en.x+=q.L;q.rj.x+=1;q.wa.pD();};R.prototype.dI=function(){var q=this;q.wa.oM();q.en.y-=q.L;q.rj.y-=1;q.wa.gL();};R.prototype.dF=function(){var q=this;q.wa.gE();q.en.y+=q.L;q.rj.y+=1;q.wa.oB();};R.prototype.aY=function(){var q=this,wi=q.yH();var aU=new eS(sW(wi.width/q.L)+2,sW(wi.height/q.L)+2);return aU;};R.prototype.hK=function(p1){var q=this,wA,re=new K((q.rj.x+p1.x),(q.rj.y+p1.y)),O=u.baseUrl+"images/out-of_bounds.gif";if(re.y<0||re.y>=q.ye){}else{if(u.allowMapWrapping){if(re.x<0||re.x>=q.ye){re.x=re.x%q.ye;if(re.x<0){re.x+=q.ye;}}}O=q.oI(q.yw(),re.x,re.y);}wA=new wY(q);wA.O=O;wA.ev=re;wA.U=q.yw();wA.on=p1;wA.yT();return wA;};R.prototype.hJ=function(p1){if(p1){p1.rr();p1=null;}};R.prototype.oI=function(E,h,s){var W="";var iN="";var wZ=this.w.wZ;if(wZ.length>0){W="";for(var i=0;i0){if(u.eN==null){u.eN=0;}else if(u.eN==u.tileSources.length-1){u.eN=0;}else{u.eN+=1;}var iL=u.tileSources[u.eN];return iL+"?z="+E+"&x="+h+"&y="+s+W+iN+"&key="+u.key+"&v="+u.storageVersion;}else{return u.tileUrl+"?z="+E+"&x="+h+"&y="+s+W+iN+"&key="+u.key+"&v="+u.storageVersion;}};R.prototype.getType=function(){return yX.TILE_LAYER;};R.prototype.getId=function(){return this.Q;};R.prototype.getMap=function(){return this.w;};R.prototype.oX=function(){return this.w.r;};R.prototype.yr=function(O,em){return this.w.setCursor(O,em);};R.prototype.yw=function(){return this.w.U;};R.prototype.sC=function(){return this.w.X;};R.prototype.tz=function(){return this.w.wd;};R.prototype.ar=function(X){this.w.op(X);};R.prototype.sV=function(wf){var yM=wf.toMerc(),al=this.tn(),h=(yM.x-u.bb.x1)/al.width,s=wB((yM.y-u.bb.y2)/al.height);return new K(h,s);};R.prototype.tn=function(){var U=this.yw(),az=this.ye,dx=u.bb.x2-u.bb.x1,dc=u.bb.y2-u.bb.y1,dm=(dx/az),dE=(dc/az);return new eS(dm,dE);};R.prototype.dy=function(){return this.L;};R.prototype.tm=function(p1){var q=this,wK=p1,aj=q.rj,ak=q.en,ir=q.tn(),uq=new wf(aj.x*ir.width,aj.y*ir.height,wE.MercSrid);uq.x+=u.bb.x1;uq.y=u.bb.y2-uq.y;var eA=q.rl(),ax=new K(eA.x+ak.x,eA.y+ak.y),pV=new K(wK.x-ax.x,wK.y-ax.y),dT=new wf(uq.x+(pV.x/q.L)*ir.width,uq.y-(pV.y/q.L)*ir.height,wE.MercSrid),rp=dT.toWGS84();var false_x=rp.x+180,new_x=false_x%360;if(new_x<0){new_x=180+new_x;}else
if(new_x>0){new_x=-180+new_x;}if(rp.y<-85){rp.y=-85;}if(rp.y>85){rp.y=85;}rp.x=new_x;return rp;};R.prototype.am=function(p1){var q=this,tY=p1.toMerc(),yu=q.tn(),pR=q.rj,pW=q.en,pm=q.L,oq=u.bb.x2-u.bb.x1,pQ=q.wa.B.width*yu.width,dW=q.wa.B.height*yu.height,dH=0,hA=0,yC=new wf(yu.width*pR.x,yu.height*pR.y,wE.MercSrid),hP=new wf(yC.x+pQ,yC.y+dW,wE.MercSrid);tY=new wf(tY.x-u.bb.x1,u.bb.y2-tY.y,wE.MercSrid);var dX=yC.x,dC=(pQ-oq)/2,dK=dX+dC,dL=eP((tY.x-dK)/oq);tY.x-=dL*oq;var yN=tY.x-yC.x;yN/=yu.width;yN*=pm;yN+=pW.x;yN+=dH;var uM=tY.y-yC.y;uM/=yu.height;uM*=pm;uM+=pW.y;return new K(yN,uM);};var A=function(Q,wl){if(wl<1||wl>900){G(F.dQ);}this.Q=Q;this.wl=wl;this.wo=[];this.w=null;this.eY=[];this.r=null;this.minZoom=0;this.maxZoom=u.maxZoom;};A.prototype=new eE();A.prototype.eW=function(er){this.w=er;this.tF();};A.prototype.rr=function(){var n,C,q=this;wI(q.r);wv(q,"r");for(n;nq.minZoom-1&&Eq.minZoom-1&&E=u.maxPinsInView&&!u.showAllPins){if(!u.noConfirmMaxPins){pA=window.confirm(F.dz);u.showAllPins=pA;u.noConfirmMaxPins=true;}else{iz=false;}}}else{C.sw();}}};A.prototype.pL=function(){var q=this,n,C;for(n=0;n=0;i--){ew=q.eY[i];ew.hide();}};A.prototype.iU=function(){var q=this,i,C,ew;for(i=q.wo.length-1;i>=0;i--){C=q.wo.pop();C.rr();C=null;}for(i=q.eY.length-1;i>=0;i--){ew=q.eY.pop();ew=ez(ew.rW);if(ew!==null){wI(ew);}ew=null;}};A.prototype.hT=function(){if(this.w.wr!=null){this.w.wr.hide();}};A.prototype.hY=function(w){var ut=this.w.wr.getDiv();rP(ut,"auto");};A.prototype.hI=function(w){var ut=this.w.wr.getDiv();rP(ut,false);};A.prototype.ag=function(wr){var er=this.w,ux=wr.getBoundsRect(),tv=er.iZ({x:ux.x1,y:ux.y1}),uU=er.iZ({x:ux.x2,y:ux.y2}),wU=er.getSize(),ie=0,ib=0;ie=tv.x<0?-tv.x:(uU.x>wU.width?-(uU.x-wU.width):0);ib=tv.y<0?-tv.y:(uU.y>wU.height?-(uU.y-wU.height):0);if(ie!==0||ib!==0){er.sm(ie,ib);}};A.prototype.hU=function(wr){this.ag(wr);};A.prototype.hS=function(){var q=this;q.w.wr.removeEventListener(wq.events.HIDE,q.pn);q.w.wr.removeEventListener(wq.events.SIZE_CHANGE,q.pJ);q.w.removeEventListener(f.events.DRAG_START,q.ij);q.w.removeEventListener(f.events.SCROLL_START,q.ij);q.w.removeEventListener(f.events.SCROLL_END,q.uN);q.w.removeEventListener(f.events.DRAG_END,q.uN);q.w.removeEventListener(f.events.ZOOM_CHANGED,q.pT);wv(q,"pn");wv(q,"pJ");wv(q,"ij");wv(q,"uN");wv(q,"pT");q.w.wr=null;};A.prototype.getDiv=function(){return this.r;};A.prototype.getMap=function(){return this.w;};A.prototype.getzIndex=function(){return wl;};A.prototype.setzIndex=function(E){ws(this.r,E);wl=E;};A.prototype.addPin=function(C){var q=this,n,E;if(!C.tU){G(F.aJ);}n=q.w.screenPosAt(C.tU);C.eW(q);E=q.w.U;if(E>q.minZoom-1&&E-1&&tiq.minZoom-1&&E-1){n=q.wo[ti];n.rr();q.wo.splice(ti,1);return true;}else{return false;}};A.prototype.getPinsArray=function(){return this.wo;};A.prototype.getPinIndex=function(oC){var q=this,n,C;for(n=0;n=0){q.eY[o].destroy();q.eY.splice(o,1);return true;}else{return false;}};A.prototype.getPolylinesArray=function(){return this.eY;};A.prototype.getPolylineIndex=function(Q){var q=this,i;for(i=0;i=wJ.minZoom;o--){rb=eO('_z_'+o,h,tR,ec.ff);eo(rb,H.us);rb.title='Zoom level '+o;rb.onmousedown=function(e){I(e);return false;};rb.onmouseup=dS;rb.rb=o;T(tN,rb);tR+=10;}T(tN,eO('',h,tR,ec.fQ));tR+=4;T(r,tN);s+=tR;s+=6;var dP=s,up=eO('',h,s,ec.fm);eo(up,H.us);up.onmousedown=function(v){v=I(v);w.zoomOut();return false;};T(r,up);var E,tl,eF=0,os=0,oo=0,tL,ea=eO('',h,s,ec.fn);function tO(v){v=I(v);var fW=tV(v),ue=oo.y+(fW.y-os.y)-yG;E=wJ.maxZoom-Math.round(ue/10);if(EwJ.maxZoom){E=wJ.maxZoom;ue=((wJ.maxZoom-E)*10)+H.tG;}ea.style.top=wO(yG+ue);eF=E;tl=wJ.maxZoom-(ue/10)-w.U;ws(tL,rt.um);tL.pp(tC(2,tl));return false;}function at(v){v=I(v);eB(document.documentElement,H.yg,tO);eB(document.documentElement,H.uH,at);E=eF;ea.style.top=wO(yG+((wJ.maxZoom-E)*10));yl(os);yl(oo);yl(eF);eo(ea,ec.ur,24,24);tl=E-w.U;tL.pp(tC(2,tl));w.moveTo(null,tL.ps);wP(w.W[0].r,true);ws(tL,-1);return false;}function sA(v){v=I(v);os=tV(v);oo=new K(parseInt(ea.style.left,10),parseInt(ea.style.top,10));rs(document.documentElement,H.yg,tO);rs(document.documentElement,H.uH,at);eo(ea,ec.fb,24,24);wP(w.W[0].r,false);var wi=w.getSize(),X={x:wi.width/2,y:wi.height/2};tL=w.ah(X);return false;}yQ(ea);ea.onmousedown=sA;ea.title="drag to change zoom";eo(ea,ec.ur,24,24);T(r,ea);function aQ(U){ea.style.top=wO(yG+((wJ.maxZoom-U)*10));}function yK(Y){if(Y.height>330){wP(tN,"");wP(ea,"");up.style.top=wO(dP);}else{wP(tN,false);wP(ea,false);up.style.top=wO(yG);}}w.addEventListener(f.events.ZOOM_CHANGED,aQ);w.addEventListener(f.events.SIZE_CHANGED,yK);aQ(w.getZoom());yK(w.getSize());return{getId:function(){return H.og;},getToolbar:function(){return wN;},setImageUrl:function(){},getImage:function(){return null;},setPosition:function(){}};};var ei=function(Q,wN){this.Q=Q;this.wN=wN;this.O="";this.we=new K(0,0);this.k=null;this.onclick=null;};ei.prototype.td=function(){wR(this.k,this.we.x,this.we.y);};ei.prototype.pg=function(v){var q=this;v=I(v);if(q.onclick){q.onclick(q);}q.wn(ei.events.CLICK,q);return false;};ei.prototype.pa=function(v){v=I(v);return false;};ei.prototype.getId=function(){return this.Q;};ei.prototype.getToolbar=function(){return this.wN;};ei.prototype.setImageUrl=function(sG){var q=this;q.O=sG;if(q.k){q.k.src=q.O;}};ei.prototype.getImage=function(){var q=this,k;if(!q.k){k=new Image();k.src=q.O;k.onmousedown=J(q,"pg");k.onmouseup=J(q,"pa");k.style.cursor=H.us;q.k=k;q.td();}return q.k;};ei.prototype.setPosition=function(sD){var q=this;q.we=sD;if(q.k){q.td();}};ei.events={CLICK:"onclick"};var dV=function(wN){var N=new ei("Telenavis jsMap pan tool",wN);N.setImageUrl(u.baseUrl+"images/pan_down.png");N.setPosition(new K(17,38));N.oH=new un(N,0,1);return N;};var dB=function(wN){var N=new ei("Telenavis jsMap pan tool",wN);N.setImageUrl(u.baseUrl+"images/pan_up.png");N.setPosition(new K(17,8));N.oH=new un(N,0,-1);return N;};var dJ=function(wN){var N=new ei("Telenavis jsMap pan tool",wN);N.setImageUrl(u.baseUrl+"images/pan_left.png");N.setPosition(new K(5,20));N.oH=new un(N,-1,0);return N;};var dN=function(wN){var N=new ei("Telenavis jsMap pan tool",wN);N.setImageUrl(u.baseUrl+"images/pan_right.png");N.setPosition(new K(35,20));N.oH=new un(N,1,0);return N;};var un=function(N,df,dp){var w=N.getToolbar().getMap(),k=N.getImage(),ab=false;function da(v){rv(v);k.onmouseup=dl;k.onmouseout=k.onmouseup;ab=false;eC(dk,50);}function dk(){w.rx=df;w.rn=dp;w.yU();}function dl(v){rv(v);ab=true;w.rx=0;w.rn=0;}k.onmousedown=da;};var eg=function(Q){this.V=null;this.getId=function(){return Q;};this.method=eg.methodsEnum.ADDRESS;};eg.prototype=new eR();eg.prototype.uh=function(yx){var rk=this,O;O=u.geocoderUrl+"?"+"address="+encodeURIComponent(yx)+"&t="+rk.method+"&key="+u.key+"&time="+new Date().valueOf()+"&d="+document.location.host+"&callback=telenavis.Geocoder.callback"+rk.getId();eg["callback"+rk.getId()]="";yV(O,J(rk,"gU"));};eg.prototype.gU=function(){var uW,rk=this;uW=eg["callback"+rk.getId()];if(uW===""){G(F.sx);}else{if(rk.V){rk.V(uW);}rk.wn(eg.events.GEOCODE,uW);}};eg.prototype.geocode=function(yx,oF){this.V=oF;this.uh(yx);};eg.prototype.getWorldPoint=function(yx){this.uh(yx);};eg.prototype.getAddress=function(wf){G(F.eX);};eg.events={GEOCODE:0,REVERSE_GEOCODE:1};var gV=function(){this.ResponseCode="";this.ResponseDescription="";this.CandidatesNum=0;this.Candidates=[];};var gC=function(){this.address="";this.x=0;this.y=0;this.geocodingType=0;this.similarity=0;this.locationType="";};eg.methodsEnum={ADDRESS:1,LOCATION:2};telenavis.Geocoder=eg;var wu=function(Q){var q=this;q.V=null;q.ul=false;q.Q=Q;};wu.prototype=new eR();wu.prototype.getId=function(){return this.Q;};wu.prototype.gU=function(){var q=this,wS=wu["callback"+q.Q];if(wS===""){G(F.sx);}else{var aW=new wu.Response(q);if(q.V){q.V(aW);}q.wn(wu.events.ROUTE_CREATED,aW);}q.ul=false;};wu.prototype.uh=function(wW,rB,tq,eM,eG,rq){var q=this,o,O,ix="";q.ul=true;if(wW.length<2){G(F.dR);}for(o=0;o0){if(u.eN==null){u.eN=0;}else if(u.eN==u.tileSources.length-1){u.eN=0;}else{u.eN+=1;}var iL=u.tileSources[u.eN];return iL+"?z="+E+"&x="+h+"&y="+s+"&key="+u.key+"&v="+u.storageVersion;}else{return u.tileUrl+"?z="+E+"&x="+h+"&y="+s+"&key="+u.key+"&v="+u.storageVersion;}return u.tileUrl+"?z="+E+"&x="+h+"&y="+s+"&key="+u.key+"&v="+u.storageVersion;};var rQ=wX('',0,0,0,0);rQ.style.border="solid 2px blue";rQ.style.backgroundColor="white";iX(rQ,0.5);ws(rQ,2);T(es,rQ);T(w.getDiv(),r);function yK(){var fS=U,iD=io();if(fS!=iD){wg.yJ();U=iD;iq(iD);}ik();}w.addEventListener(f.events.SIZE_CHANGED,yK);function aI(){U=io();wg.yJ();eC(ik,100);iq(U);}w.addEventListener(f.events.ZOOM_CHANGED,aI);function tw(){var wD=wg.am(w.getCenter()),eA=wg.rl(),wT=new K(wD.x+eA.x-Y/2,wD.y+eA.y-Y/2);var aH=oj((wT.x*wT.x)+(wT.y*wT.y));if(aH>wg.L){wg.yJ();}else{wR(wg.r,eA.x-wT.x,eA.y-wT.y);wg.eH();}ik();iq(U);}w.addEventListener(f.events.CENTER_CHANGED,tw);function io(){var wU=w.getSize(),ts=wU.width,ej=wU.height,E=w.getZoom()-u.overviewZoomDifference;do{ts/=2;ej/=2;if(ts=0);if(E<0){E=0;}return E;}function ik(){var wU=w.getSize(),tk=w.getZoom(),sl=tC(2,tk-U),sz=wU.width/sl,sj=wU.height/sl;rU(rQ,sz,sj);wR(rQ,u.overviewSize/2-sz/2,u.overviewSize/2-sj/2);}function iq(U){if(U<=u.viewRectangleMinimumZoom){rQ.style.display='none';}else{rQ.style.display="block";}}function iY(){rU(r,(eI?(Y+yi*2):12),(eI?(Y+yi*2):12));rf.style.backgroundImage="url(\""+u.baseUrl+"images/overview_"+(eI?"close":"show")+".png\")";wP(es,eI);if(w.iv){w.iv.style.right=wO((eI?Y:0)+10);}}q.iz=function(){eI=!eI;iY();};q.ga=function(){eI=!eI;iY();};q.yy=function(){wI(r);w.removeEventListener(f.events.CENTER_CHANGED,tw);w.removeEventListener(f.events.ZOOM_CHANGED,aI);w.removeEventListener(f.events.SIZE_CHANGED,yK);wv(w,"ro");};q.U=function(){return io();};q.rO=function(){var h,s,q=this,P=wg.wa.P;for(h=0;h=0){P[h][s].rO();}}}};if(w.iv){w.iv.style.right=wO((eI?Y:0)+10);}U=io();wg.eW(w,es);ik();iq(U);};var oZ=function(w){this.uE=null;this.w=w;};oZ.prototype.oy=function(){var il=this.w.getCenter();var tk=this.w.getZoom();var gO=this;if(this.gm(il,tk)===true){gO.uE={yA:il,gn:tk};var V=function(){};var O=u.baseUrl+"lyrs.ashx?"+"k="+u.key+"&time="+new Date().valueOf()+"&u="+document.location.host+"&callback=mlch";yV(O,V);}};oZ.prototype.gm=function(il,tk){if(this.uE==null){return true;}if(this.uE.gn!=tk){return true;}var sN=Math.pow(2,tk);var sM=Math.abs(u.bb.x1)+Math.abs(u.bb.x2);var sT=sM/sN;var sE=il.toMerc();var sI=this.uE.yA.toMerc();if(Math.abs(sE.x-sI.x)>sT*15){return true;}if(Math.abs(sE.y-sI.y)>sT*15){return true;}return false;};f.tP.register(function(w){w.ou=new oZ(w);w.ou.oy();});var tu=function(w){this.w=w;this.yv=false;this.yF=null;this.dq();this.w.addEventListener(f.events.SERVERLAYERVISIBILITY_CHANGED,this.dj);};tu.prototype.dj=function(ys){};tu.prototype.dq=function(){var w=this.w;var yd=this;var r=yz('div');r.id='divEdit';T(w.getDiv(),r);r.style.backgroundColor='white';r.style.position='absolute';r.style.left='60px';r.style.top='15px';var k=new Image();k.src=u.baseUrl+'images/edit.png';k.align='top';T(r,k);var tE=yz('input');tE.type='button';tE.value='Επεξεργασία';tE.ox=0;tE.onclick=function(){if(this.ox===0){if(w.containsEventListener(f.events.CLICK,yd.uz)===false){w.addEventListener(f.events.CLICK,yd.uz);}tE.value='Αποθήκευση';yd.yv=true;this.ox=1;}else{if(w.containsEventListener(f.events.CLICK,yd.uz)===true){w.removeEventListener(f.events.CLICK,yd.uz);}tE.value='Επεξεργασία';yd.yv=false;this.ox=0;}};T(r,tE);};tu.prototype.uz=function(yA){var ry=[];var si="";var yM=yA.toMerc();var fy=Math.abs(u.bb.x1)+yM.x;var ft=Math.abs(u.bb.y1)-yM.y;var L=this.w.W[0].tn();var fo=eP(fy/L.width);var fp=eP(ft/L.height);for(var o=0;owx.M.minZoom-1&&E