(function(){telenavis={};telenavis.constants={baseUrl:'https://eu-08.telenavis.com/jsMap/',minZoom:1,maxZoom:18,defCenter:{x:24.363,y:38.842,srid:4326},defZoom:5,defLocale:'el-GR',css:'css/rmap.css',key:'54723618',maxPinsInView:100,overviewSize:100,overviewZoomDifference:1,overviewIconOpened:'https://eu-08.telenavis.com/jsMap/images/overview_close.png',overviewIconClosed:'https://eu-08.telenavis.com/jsMap/images/overview_show.png',viewRectangleMinimumZoom:0,allowMapWrapping:true,usePhysics:true,tileSize:256,noMapImage:'https://eu-08.telenavis.com/jsMap/images/nomap.png',tileUrl:'https://eu-08.telenavis.com/jsMap/tile.ashx',geocoderUrl:'https://eu-08.telenavis.com/jsMap/geocode.ashx',routerUrl:'https://eu-08.telenavis.com/jsMap/route.ashx',tileSources:[],showLoadingMessages:true,loading:{left:'17px',top:'20px',right:'',bottom:'',url:'https://eu-08.telenavis.com/jsMap/images/map-loader-2.gif'},showLoadingMessages:true,maxScrollDistance:2000,locale:'en',storageVersion:'2.1.0',bb:{x1:-20037508.342789,y1:-20037508.342789,x2:20037508.342789,y2:20037508.342789}};/*1.2.0*/var u=telenavis.constants;u.version='1.2.0';var H={sY:"Unsupported projection srid.",hk:"telenavis.Projector namespace is not available to perform projection conversion! Please check your implementation.",ab:"Polyline html element was found with that id.",gd:"Invalid WorldPoint passed.",am:"Invalid element id. Can not find element with that id.",gs:"zIndex for PinLayer out of range.",pz:"An unknown error occured while accessing the server. If this error persists please contact the site administrator.",ak:"Invalid parameters where passed.",gN:"A route request requires at least two points.",as:"A route request is already pending. If you require multiple requests please create multiple telenavis.Router instances.",hh:"You are attempting to call the OverlayLayer base class!",gu:"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.)",hg:"Currently showing only portion of the available pins.Reset ",fv:"Attempted to draw a polyline but could not get the layer's DIV.",fx:"Parent div not found",al:"No world pos set for pin before adding to layer.",rh:"Not implemented.",fR:"Map already initialized.",fU:"A layer with the same id already exists in the map.",fO:"Invalid map object.",fI:'Layer is not properly initialized (not added to the map?)'};var eM={uf:90,tS:1000};var eS={TILE_LAYER:0,USER_LAYER:1,OVERLAY_LAYER:2};var rz={ux:0,yY:1,hj:2};var J={oE:'zoomBar',sa:'mousedown',tI:'mousemove',yH:'mouseup',yF:'pointer',tJ:'px',uB:'visible',im:'hidden',fm:'fm',aG:'aG'};var eD={fQ:u.baseUrl+'images/zoom_plus.png',fs:u.baseUrl+"images/zoom_level_top.png",fa:u.baseUrl+"images/zoom_level.png",fp:u.baseUrl+"images/zoom_level_bottom.png",fo:u.baseUrl+'images/zoom_minus.png',fh:u.baseUrl+'images/zoom_handle.png',yZ:u.baseUrl+'images/Open-hand.cur',gw:u.baseUrl+'images/Closed-hand.cur'};var rY=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 rK=function(ec,rU){if(typeof(rU)=='string'){ec.style.overflow=rU;}else{if(rU){ec.style.overflow=J.uB;}else{ec.style.overflow=J.im;}}};var wG=function(ec,rU){if(typeof(rU)=='string'){ec.style.visibility=rU;}else{if(rU){ec.style.visibility=J.uB;}else{ec.style.visibility=J.im;}}};var ih=function(ec,oQ){ec.innerHTML=oQ;};var iz=function(a){return!isFinite(a);};var wI=function(wu,eu,ea){wu.style.position="absolute";if(wR(eu)&&eu!==null){wu.style.left=wO(eu);}if(wR(ea)&&ea!==null){wu.style.top=wO(ea);}};var rG=function(wu,wz,wx){if(wR(wz)&&wz!==null){wu.style.width=wO(wz);}if(wR(wx)&&wx!==null){wu.style.height=wO(wx);}};var wO=function(ep){if(ep!==null){switch(typeof(ep)){case'undefined':return'';case'number':if(!iz(ep)){return ep+'px';}break;case'string':return(ep.match('%$')=='%')?ep:C(ep)+'px';}}return'';};var wd=function(wu,oZ){if(oZ!==null&&!iz(oZ)){wu.style.zIndex=oZ;}};var ii=function(wu,fC,oL){wu.style[fC]=oL;};var D=function(v,fJ){v=v?v:window.event;if(!fJ){rY(v);}return v;};var eI=function(W,eu,ea,eQ,wz,wx){var o=new Image();o.id=W;o.src=eQ;wI(o,eu,ea);rG(o,wz,wx);o.className='telenavis_noselect';return o;};var wM=function(W,eu,ea,wz,wx){var o=ic('div');o.id=W;wI(o,eu,ea);rG(o,wz,wx);return o;};var wR=function(wu){return typeof(wu)!="undefined";};var yu=function(yr){delete yr;};var hz=function(oF){alert(oF);};var eR=function(W){return document.getElementById(W);};var st=function(ec,eC){return document.createElementNS(ec,eC);};var ic=function(eC){return document.createElement(eC);};var eO=function(ec,eC,ep){ec.setAttribute(eC,ep);};var I=function(tE,fH){tE.appendChild(fH);};var wZ=function(a){return Math.abs(a);};var tC=function(a,b){return Math.pow(a,b);};var rV=function(a){return Math.floor(a);};var un=function(a){return Math.ceil(a);};var rk=function(a){return Math.round(a);};var oH=function(a){return Math.log(a);};var od=function(a){return Math.sqrt(a);};var fB=function(a){return Math.tan(a);};var fX=function(a){return Math.atan(a);};var uu=Math.PI;var fV=function(a){return Math.exp(a);};var hl=function(a){return parseInt(a,10);};var eb=function(oh,og){return Math.min(oh,og);};var ee=function(oh,og){return Math.max(oh,og);};var rt=function(rj,fD){return setTimeout(rj,fD);};var uY=function(fA){return clearTimeout(fA);};var C=function(tQ){return parseFloat(tQ);};var aA=function(eQ){var az=0,ax=0;if(eQ.offsetParent){do{ax+=eQ.offsetLeft;az+=eQ.offsetTop;eQ=eQ.offsetParent;}while(eQ);}return new L(ax,az);};var tF=function(wu,rJ,op,oa){var tQ=P(op,oa);ra(wu,rJ,tQ);return{wu:wu,rJ:rJ,op:op,oa:oa,yj:function(){ex(wu,rJ,tQ);}};};var P=function(yr,fF){return function(){return yr[fF].apply(yr,arguments);};};var wD=function(rF){if(rF&&rF.parentNode){rF.parentNode.removeChild(rF);yu(rF);}};var yk=function(v){var k,s;v=D(v,true);k=v.clientX;s=v.clientY;if(document.body.clientLeft){k+=document.body.clientLeft;}if(document.body.clientTop){s+=document.body.clientTop;}s+=document.documentElement.scrollTop+document.body.scrollTop;k+=document.documentElement.scrollLeft;return new L(k,s);};var rl=function(G){var O=new Image();O.src=G;return O;};var uT=function(G,wr){var ue=function(){wr();wD(rg);};var rg=ic("script");rg.type="text/javascript";if(rg.addEventListener){rg.onload=ue;}else if(rg.readyState){rg.onreadystatechange=function(){if(rg.readyState==='loaded'){ue();}};}rg.src=G;I(document.body,rg);return rg;};var K=function(oF){throw new Error(oF);};var eP=function(){};eP.prototype.addEventListener=function(wb,rj){var q=this;if(!wR(q.wN)){q.wN=[];}wb=wb.toString();if(!wR(q.wN[wb])){q.wN[wb]=[];}q.wN[wb].push(rj);};eP.prototype.removeEventListener=function(wb,rj){var tq,yN,o,q=this;if(!wR(q.wN)){return;}wb=wb.toString();if(wR(q.wN[wb])){for(o=0;o=0){A[k][s].ah(q);}}}this.ok=true;};telenavis.OverlayLayer=wt;var wA=function(iq,ir,ie,iw){this.x1=iq;this.x2=ie;this.y1=ir;this.y2=iw;};wA.prototype.getWidth=function(){return wZ(this.x2-this.x1);};wA.prototype.getHeight=function(){return wZ(this.y2-this.y1);};wA.prototype.normalize=function(){var q=this;return new wA(eb(q.x1,q.x2),eb(q.y1,q.y2),ee(q.x1,q.x2),ee(q.y1,q.y2));};wA.prototype.contains=function(p1){var q=this;return eb(q.x1,q.x2)<=p1.x&&ee(q.x1,q.x2)>p1.x&&eb(q.y1,q.y2)<=p1.y&&ee(q.y1,q.y2)>p1.y;};wA.prototype.intersects=function(ig){var q=this;return ig.contains({x:q.x1,y:q.y1})||ig.contains({x:q.x2,y:q.y1})||ig.contains({x:q.x2,y:q.y2})||ig.contains({x:q.x1,y:q.y2});};wA.prototype.overlaps=function(is){var q=this;return!(is.x1>q.x2||is.x2q.y2||is.y2this.y2;};wA.prototype.hasReversedX=function(){return this.x1>this.x2;};wA.prototype.toString=function(){return"{"+this.x1+","+this.y1+"} - {"+this.x2+","+this.y2+"}";};wA.prototype.AABB=function(p0,p1){var e,d,m,adx,ady,aT=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=wZ(d.x);ady=wZ(d.y);adx+=aT;ady+=aT;return!(wZ(m.x)>e.x+adx||wZ(m.y)>e.y+ady||wZ(m.x*d.y-m.y*d.x)>e.x*ady+e.y*adx);};telenavis.Rect=wA;var eH=function(wz,wx){this.width=wz;this.height=wx;};eH.prototype.toString=function(){return"Size { width:"+this.width+", height:"+this.height+"}";};telenavis.Size=eH;var L=function(k,s){this.x=k;this.y=s;};L.prototype.distanceTo=function(Q){var wg=Q.x-this.x,wh=Q.y-this.y;return od((wg*wg)+(wh*wh));};L.prototype.toString=function(){return"Point {x:"+this.x+",y:"+this.y+"}";};L.prototype.equals=function(p1){return(this.x===p1.x&&this.y===p1.y);};telenavis.Point=L;var wl=function(k,s,gq){this.x=k;this.y=s;this.srid=gq;};wl.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{K(H.sY);}}else{K(H.fM);}};wl.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{K(H.sY);}}else{K(H.fM);}};wl.prototype.distanceTo=function(eK){var aI=this.toMerc(),aO=eK.toMerc(),wg=(aI.x-aO.x),wh=(aI.y-aO.y);return od((wg*wg)+(wh*wh));};wl.prototype.clone=function(){return new wl(this.x,this.y,this.srid);};wl.prototype.equals=function(Q){if(!Q){return false;}return(Q.x==this.x&&Q.y==this.y&&Q.srid==this.srid);};wl.prototype.toString=function(){return"Point {x:"+this.x.toFixed(8)+",y:"+this.y.toFixed(8)+",srid:"+this.srid+"}";};telenavis.WorldPoint=wl;var wE={it:20037508.34,MercSrid:90013,WGSSrid:4326,WGS2Merc:function(px,yQ){var k=px*this.it/180,s=oH(fB((90+yQ)*uu/360))/(uu/180);s=s*this.it/180;return new wl(k,s,90013);},Merc2WGS:function(k,s){var px=(k/this.it)*180,yQ=(s/this.it)*180;yQ=180/uu*(2*fX(fV(yQ*uu/180))-uu/2);return new wl(px,yQ,4326);}};telenavis.Projector=wE;var et=function(W){this.wi=null;this.rm=null;this.wW=[];this.W=W;this.strokeColor="blue";this.strokeWidth="3px";this.strokeOpacity=0.4;this.fillColor="none";this.fillOpacity=0.4;this.zIndex=-1;};et.prototype.fg=function(yp,aE,aR){var q=this,o,Q,eK,eE,aW,ph,yD=q.wW,w=q.wi.w,hp=null,yt=[],tv=[],te=null,m=false,l=false,eA;q.uh=null;q.py=null;q.pt=null;q.pm=null;for(o=0;o=0&&iq<=ty.width&&ir>=0&&ir<=ty.height)||(ie>=0&&ie<=ty.width&&iw>=0&&iw<=ty.height)){return true;}return fj.AABB(pe,oN);};et.prototype.sP=function(wq){var q=this,w=wq.w;q.wi=wq;q.rm=w.getId()+"."+q.wi.getId()+".Polyline."+q.W;q.rn();};et.prototype.rn=function(){fk(this);};et.prototype.ho=function(){var q=this,rM,tg,yP,uk;if(!rM){rM=new L(q.wW[0].x,q.wW[0].y);tg=new L(q.wW[0].x,q.wW[0].y);}for(uk=0;ukq.sI||wZ(wg)>q.sI||q.ey){if(!q.ey){q.wm(F.events.DRAG_START,q);n.onmouseup=null;ra(tp,J.yH,iS);}q.ey=true;if(q.uF!==null){n.src=q.uF;}wI(n,(uI.x-(yh.x-wy.x))+yp.x,(uI.y-(yh.y-wy.y))+yp.y);n.title="";}}return false;}function iS(e){if(q.O==null){ex(tp,J.tI,tu);ex(tp,J.yH,iS);return;}e=D(e);wy={x:e.clientX,y:e.clientY};n=q.O;wh=yh.y-wy.y;wg=yh.x-wy.x;s=uI.y-wh;k=uI.x-wg;wI(n,k,s);n.src=q.eQ;if(q.tw){n.title=q.tw;}pr=q.eF;r=q.wi.w.T[0].r;s+=pr.y+C(r.style.top);k+=pr.x+C(r.style.left);rp=q.wi.w.worldPosAt({x:k,y:s});q.setWorldPos(rp);ex(tp,J.tI,tu);ex(tp,J.yH,iS);q.ey=false;q.wm(F.events.DRAG_COMPLETE,q);return false;}if(q.pd&&n){ra(tp,J.tI,tu);}q.O.onmouseup=function(e){ex(tp,J.tI,tu);q.pa(e);return false;};return false;};F.prototype.draggable=function(sk){if(wR(sk)){this.pd=sk;}return this.pd;};F.prototype.dragImage=function(url,shift){var q=this;if(wR(url)){q.uF=url;}if(wR(shift)){q.pg=shift;}return q.uF;};F.prototype.getId=function(){return this.W;};F.prototype.getLayer=function(){return this.wi;};F.prototype.getImageSrc=function(){return this.eQ;};F.prototype.setImageSrc=function(p1){var q=this;if(q.O){q.O.src=p1;}q.eQ=p1;return true;};F.prototype.setzIndex=function(ws){var q=this;q.ws=ws;if(q.O){wd(q.O,q.ws);}};F.prototype.getHotspot=function(){return this.eF;};F.prototype.setHotspot=function(p1){var q=this;q.eF=p1;if(q.O){q.uZ(q.getScreenPos());}return true;};F.prototype.getTip=function(){return this.tw;};F.prototype.setTip=function(p1){var q=this;if(p1){q.tw=p1;if(q.O){q.O.title=p1;}}return true;};F.prototype.getImage=function(){return this.O;};F.prototype.getWorldPos=function(){return this.tk;};F.prototype.setWorldPos=function(p1){var q=this,sx;if(p1.srid!=wE.WGSSrid){K(H.gd);}q.tk=p1;if(q.O){sx=q.wi.w.screenPosAt(p1);q.uZ(sx);}return true;};F.prototype.getScreenPos=function(){var q=this;if(q.O){return new L(C(q.O.style.left)+q.eF.x,C(q.O.style.top)+q.eF.y);}return null;};F.prototype.cursor=function(en){var q=this;if(wR(en)){q.en=en;if(q.O&&q.en!==null){q.O.style.cursor=q.en;}}return q.en;};F.prototype.show=function(){if(this.O){wG(this.O,true);}};F.prototype.hide=function(){if(this.O){wG(this.O,false);}};F.events={CLICK:"onclick",HOVER:"onhover",CONTEXT_MENU:"oncontextmenu",DRAG_COMPLETE:"ondragover",DRAG_START:"ondragstart"};telenavis.Pin=F;var fE=function(oQ){var r,iH,wz,wx;r=wM('',0,0,200,500);rK(r,false);wG(r,false);ih(r,"
"+oQ+"
");I(document.body,r);iH=eR("_tmp");wz=iH.offsetWidth;wx=iH.offsetHeight;wD(r);return new eH(wz,wx);};var iR=new rl(u.baseUrl+"images/windowTopLeft.png");var iW=new rl(u.baseUrl+"images/windowTop.png");var ou=new rl(u.baseUrl+"images/windowTopRight.png");var iV=new rl(u.baseUrl+"images/windowRight.png");var iX=new rl(u.baseUrl+"images/windowLeft.png");var oi=new rl(u.baseUrl+"images/windowBottomRight.png");var iJ=new rl(u.baseUrl+"images/windowBottomLeft.png");var iG=new rl(u.baseUrl+"images/windowBottom.png");var rL=new rl(u.baseUrl+"images/windowNose.png");var fc=new rl(u.baseUrl+"images/windowShadow.png");var fz="white";var N=function(W,uq){this.wc=new L(0,0);this.Y=new eH(300,200);this.r=null;this.wV=null;this.iI="";this.wN=[];this.W=W;this.uq=uq;this.ta=new wA(0,0,0,0);this.autoSize=true;this.noseReverse=false;};N.prototype=new eP();N.prototype.hf=function(){return this.uq?eR(this.uq):document.documentElement;};N.prototype.tB=function(W,eu,ea,wz,wx){var r=wM(W,eu,ea,wz,wx);return r;};N.prototype.el=function(G,eu,ea,wz,wx,yN,fl,ws){var n=eI('',eu,ea,G,wz,wx);n.style.right=wO(yN);n.style.bottom=wO(fl);wd(n,ws);return n;};N.prototype.hd=function(){this.wm(N.events.CLICK,null);};N.prototype.getPosition=function(){return new L(C(this.r.style.left),C(this.r.style.top));};N.prototype.setPosition=function(eq){if(this.r){wI(this.r,eq.x,eq.y);}this.wc=eq;};N.prototype.setContents=function(sW){if(this.wV){ih(this.wV,sW);}this.iI=sW;};N.prototype.getContents=function(){return this.iI;};N.prototype.getDiv=function(){return this.wV;};N.prototype.getId=function(){return this.W;};N.prototype.getBoundsRect=function(){return this.ta;};N.prototype.setSize=function(rZ){var q=this;q.autoSize=false;if(q.r){var wg=rZ.width-q.Y.width,wh=rZ.height-q.Y.height;wI(q.r,C(q.r.style.left)-wg/2,C(q.r.style.top)-wh);rG(q.r,rZ.width,rZ.height);rG(q.wV,rZ.width,rZ.height);q.ta.x1-=wg/2;q.ta.x2+=wg/2;q.ta.y1-=wh;var uR=q.r.childNodes[0];wI(uR,C(uR.style.left)-wg/2,C(uR.style.top)-wh);rG(uR,q.ta.getWidth()*2,q.ta.getHeight());q.r.childNodes[1].style.left=wO((rZ.width/2)-(rL.width/2));q.wm(N.events.SIZE_CHANGE,q);}q.Y=rZ;};N.prototype.getSize=function(){return this.Y;};N.prototype.setzIndex=function(ws){if(this.r){this.r.style.zIndex=ws;}};N.prototype.getzIndex=function(){if(this.r){return this.r.style.zIndex;}return 0;};N.prototype.show=function(){var q=this;if(q.autoSize){q.Y=fE();}var yd=ee(iX.width,iR.width,iJ.width),uo=ee(iV.width,ou.width,oi.width),ur=ee(iW.height,iR.height,ou.height),ut=ee(iG.height,iJ.height,oi.height),iL=q.Y.width+yd+uo,fn=q.Y.height+ur+ee(ut,rL.height),eu=q.wc.x-(iL/2)+yd,ea=q.wc.y-q.Y.height-rL.height;q.ta=new wA(eu-yd,ea-ur,eu+q.Y.width+uo,ea+q.Y.height+ee(ut,rL.height));if(q.r){wD(q.r);}q.sQ=eR(q.uq);if(q.sQ){q.r=q.tB(q.W,eu,ea,q.Y.width,q.Y.height);I(q.r,q.el(fc.src,(q.Y.width/2)-iL,null,iL*2,fn,null,-rL.height,null,-10000));I(q.r,q.el(rL.src,(q.Y.width/2)-(rL.width/2),null,null,null,null,-rL.height,1));I(q.r,q.el(iR.src,-yd,-ur));I(q.r,q.el(iW.src,0,-ur,"100%",iW.height));I(q.r,q.el(ou.src,null,-ur,null,null,-uo));I(q.r,q.el(iX.src,-yd,0,iX.width,"100%"));I(q.r,q.el(iJ.src,-yd,null,null,null,null,-ut));I(q.r,q.el(iG.src,0,null,"100%",iG.height,null,-ut));I(q.r,q.el(oi.src,null,null,null,null,-uo,-ut));I(q.r,q.el(iV.src,null,0,iV.width,"100%",-uo));q.wV=q.tB("",0,0,q.Y.width,q.Y.height);q.wV.className="telenavis_window";rK(q.wV,"auto");wd(q.wV,1);q.wV.style.fontFamily="Arial";q.wV.style.fontSize="10px";q.wV.style.background=fz;q.wV.onmousedown=function(v){D(v);};q.wV.onclick=function(v){if(!q.wm(N.events.CLICK,q)){q.hide();}};I(q.r,q.wV);ih(q.wV,q.iI);for(var o=1;ou.maxZoom){E=q.U;}q.U=E;if(q.wT){q.wT.tK();}};h.prototype.iU=function(wF){if(this.Z.equals(wF)){return;}this.Z.x=wF.x;this.Z.y=wF.y;this.um=0;for(var rR=0;rR=yq){es+=es<0?yq:-yq;}else{es=0;}}else{es+=q.rQ*pF;}if(q.rW===0){if(wZ(ej)>=yq){ej+=ej<0?yq:-yq;}else{ej=0;}}else{ej+=q.rW*pF;}ej=ej>rO?ej=rO:(ej<-rO?ej=-rO:ej);es=es>rO?es=rO:(es<-rO?es=-rO:es);if(es===0&&ej===0&&q.rQ===0&&q.rW===0){q.yy=false;q.uj=0;q.uQ=0;q.T[0].eX();q.T[0].yx();return;}ik.x-=es;ik.y-=ej;rD.or(ik.x,ik.y);rt(pK,50);if(!iu){iu=rt(eX,200);}}pK();};h.prototype.getId=function(){return this.W;};h.prototype.initialize=function(){var q=this,ui,wp;if(q.r!==null){K(H.fR);}ui=ic("link");ui.type="text/css";ui.rel="stylesheet";ui.href=u.baseUrl+u.css;I(document.documentElement.firstChild,ui);q.r=ic("div");q.r.id=q.W+"w";q.r.className="telenavis_jsMap";q.r.style.width=q.tE.clientWidth+J.tJ;q.r.style.height=q.tE.clientHeight+J.tJ;I(q.tE,q.r);q.gY(q.r,eM.tS-1);q.centerCross(true);q.onWindowResizeListener=new tF(window,"resize",q,"tr");q.pD(q.U);q.wT=new tW(q);wp=new R("root",0,256);wp.au=true;q.addLayer(wp);q.hB=new tF(q.r,J.tI,q,"gG");q.hN=new tF(q.r,J.sa,q,"pp");q.wc=aA(q.r);q.gT();return true;};h.prototype.destroy=function(){K(H.rh);};h.prototype.setCursor=function(p1,p2){if(typeof(p2)!="undefined"){return ef(this.r,p1,p2.x,p2.y);}else{return ef(this.r,p1);}};h.prototype.centerCross=function(v){var q=this;if(!q.rA){q.rA=eI(q.W+"_cross",null,null,u.baseUrl+"images/cross.gif");q.rA.style.border="none";wd(q.rA,eM.tS);yC(q.rA);I(q.r,q.rA);}q.pM();wG(q.rA,v);return v;};h.prototype.screenPosAt=function(p1){return this.T[0].ai(p1);};h.prototype.worldPosAt=function(p1){return this.T[0].tm(p1);};h.prototype.getHorizontalDistance=function(){var q=this,oK=q.T[0].tP(),Y=q.getSize(),wk=q.T[0].wk;return(Y.width/wk)*oK.width;};h.prototype.getVerticalDistance=function(){var q=this,oK=q.T[0].tP(),Y=q.getSize(),wk=q.T[0].wk;return(Y.height/wk)*oK.height;};h.prototype.getZoom=function(){return this.U;};h.prototype.getCenter=function(){return this.Z.clone();};h.prototype.moveTo=function(wF,eV){if(wF===null){wF=this.Z;}if(wF.equals(this.Z)&&eV==this.U||eVu.maxZoom){return false;}if(!wR(eV)){eV=this.U;}if(eV!=this.U){this.iU(wF);this.pD(eV);this.rn();this.iM.iB();this.wm(h.events.ZOOM_CHANGED,this.getZoom());}else{var wU=wZ(this.screenPosAt(this.Z).distanceTo(this.screenPosAt(wF)));if(wU0){q.T[o].eB();q.T.splice(o,1);return true;}else{return false;}};h.prototype.getLayerIndex=function(p1){var q=this,i=-1;for(i=0;itA&&gm>em){aw=i;}else{break;}}var Z=new wl(wJ.x1+(wJ.x2-wJ.x1)/2,wJ.y1+(wJ.y2-wJ.y1)/2,4326);q.moveTo(Z,aw);}};h.yX={oC:[],register:function(rj){if(typeof(rj)=="function"){this.oC.push(rj);}},gL:function(w){for(var o=0;o=u.minZoom){this.zoomBy(-1,Z);}};h.prototype.zoomBy=function(tU,Z,wr,yS){var q=this,r;if(!Z){var ww=q.getSize();Z={x:ww.width/2,y:ww.height/2};}r=q.pP(Z);function pU(){oB++;var we=r.pS*tC(2,(gn/yS)*oB);we=iz(we)?1:we;wd(r,eM.uf);r.pw(we);if(oB=0){A[k][s].rn();}}}q.refreshOverview();};h.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"};telenavis.jsMap=h;var up=function(wT,G,wr){var q=this,n=new Image();q.wT=wT;q.G=G;q.wr=wr;n.onload=P(q,"hE");n.onabort=P(q,"hQ");n.onerror=P(q,"hW");q.O=n;};up.prototype.yV=function(){this.O.src=this.G;};up.prototype.hW=function(e){var q=this;if(q.wr){q.wr(2);}q.wT.uK();};up.prototype.hQ=function(e){var q=this;if(q.wr){q.wr(1);}q.wT.uK();};up.prototype.hE=function(e){var q=this;if(q.wr){q.wr(0);}q.wT.uK();};var tW=function(w){var q=this;q.wT=[];q.oG=false;q.ds=8;q.w=w;q.oD=0;};tW.prototype.uK=function(){rt(P(this,"hR"),50);};tW.prototype.hR=function(){var q=this,n,ei,o;q.oD--;if(q.wT.length===0){q.oG=false;q.w.wm(h.events.MAP_LOADED);q.w.hideLoading();}else{if(q.oD>0){return;}ei=eb(q.ds,q.wT.length);q.oD=ei;for(o=0;oq.V.width){for(i=q.V.width;ip1.width;i--){q.pN();}}if(p1.height>q.V.height){for(i=q.V.height;ip1.height;i--){q.oX();}}};wH.prototype.dO=function(){var at=[],i;for(i=0;i0&&w.wB[0].ym!=null&&w.wB[0].ym==eS.OVERLAY_LAYER){var ib=null;for(var i=0;i0){var ot=new telenavis.Point();ot.x=w.wy.x+10;ot.y=w.wy.y+2;var uG='';for(var i=0;i3){if(telenavis.constants.locale=='en'){uG+="and "+(w.wB.length-i).toString()+" more";}else{uG+="και "+(w.wB.length-i).toString()+" ακόμα";}break;}uG+=w.wB[i].tt+(w.wB[i].tt==''?'':"
");}w.iO=rt(function(){if(iF.tt!=''){w.gZ(uG,ot);}},500);return;}}if(w.wB){w.wB=null;w.iZ=null;w.setCursor(eD.yZ,{x:24,y:24});}};wY.prototype.oz=function(){var k=this.eg.x;var s=this.eg.y;var E=this.U;var w=this.wq.w;var oM=[];var hv='';var iE=w.getLayersArray();for(var i=0;i30){ro();}clearTimeout(physicsTimer);physicsTimer=setTimeout(ro,30);}t.eX();};d.yB=function(e){e=D(e);ex(rc,'mousemove',d.yT);ex(rc,'mouseup',d.yB);if(rH==rz.ux){t.r.releaseCapture();}t.tV(oV,yE);dragging=false;if(posX==startX&&posY==startY){t.rB(h.events.CLICK,t.tm(t.tf()));tj();}else{if(!u.usePhysics){tj();}else{d.sliding=true;ro();}}};var ro=function(){if(!dragging&&!d.sliding){return;}if(dragging){curX=posX;curY=posY;}var tt,a,c,dtdt,dt=0.05,rr,aU=0.0,aY=0.0,pv=1.0,pk=120,tb,tx,th;rr=(wZ(curX-prevX)>pk)||(wZ(curY-prevY)>pk)?0.3:0.1;dtdt=dt*dt;a=aU/pv;c=curX;tt=(2.0-rr)*c-(1.0-rr)*prevX+a*dtdt;prevX=c;curX=tt;a=aY/pv;c=curY;tt=(2.0-rr)*c-(1.0-rr)*prevY+a*dtdt;prevY=c;curY=tt;if(!dragging){wI(t.r,curX,curY);}tb=curX-prevX;tx=curY-prevY;th=tb*tb+tx*tx;pj=new Date().valueOf();if(th<=0.5&&!dragging){tj();}else{if(!dragging&&d.sliding){setTimeout(ro,30);}}};var tj=function(){t.eX();t.yx();t.rB(h.events.DRAG_END,t.w);d.sliding=false;};posX=C(t.r.style.left);posY=C(t.r.style.top);startX=posX;startY=posY;t.tV(pf,yE);t.rB(h.events.DRAG_START,t.w);ra(rc,'mousemove',d.yT);ra(rc,'mouseup',d.yB);if(rH==rz.ux){d.setCapture();}dragging=true;if(u.usePhysics){prevX=posX;prevY=posY;curX=posX;curY=posY;ro();}};R.prototype.ft=function(){return this.hL===0&&this.hX===0;};R.prototype.hZ=function(e){e=D(e);var q=this,wC;if(!q.rB(h.events.DOUBLE_CLICK,q.tm(q.tf()))){wC=q.tm(q.tf());q.w.moveTo(wC,q.tM()+1);}};R.prototype.fr=function(e){e=D(e);var q=this,w=q.w;if(w.wy===null){return;}if(dM(e)<0){w.zoomOut(w.wy);}else{w.zoomIn(w.wy);}return;};R.prototype.yR=function(){return this.w.getSize();};R.prototype.rB=function(dN,fw,fq){return this.w.wm(dN,fw,fq);};R.prototype.fy=function(v){v=D(v);var q=this;q.rB(h.events.CONTEXT_MENU,q.tf(),q.tm(q.tf()));return false;};R.prototype.getDiv=function(){return this.r;};R.prototype.rI=function(){return{x:C(this.r.style.left),y:C(this.r.style.top)};};R.prototype.or=function(x,y){wI(this.r,x,y);};R.prototype.ti=function(){var q=this,si=q.rI();return{x:si.x+q.wL.x,y:si.y+q.wL.y};};R.prototype.dZ=function(){return{width:this.wf.V.width*this.wk,height:this.wf.V.height*this.wk};};R.prototype.yx=function(){var q=this,wP=q.yR(),wC=new L(wP.width/2,wP.height/2),Q=q.tm(wC);q.sp(Q);};R.prototype.eX=function(){this.dI();};R.prototype.dI=function(){var ub=this.ti(),ww=this.dZ(),hV={x:ub.x+ww.width,y:ub.y+ww.height},sy=this.yR(),eb=0;var aV=wZ(ub.x);var dU=ww.width-aV-sy.width;var aK=wZ(ub.y);var dA=ww.height-aK-sy.height;var rS=this.ti();while(rS.xthis.sl.x){this.dK();rS=this.ti();}while(rS.ythis.sl.y){this.dS();rS=this.ti();}if(this.iu){wn(this,"iu");}};R.prototype.dK=function(){var q=this;q.wf.pN();q.wL.x-=q.wk;q.ev.x-=1;q.wf.dP();};R.prototype.dL=function(){var q=this;q.db-=q.wk;q.wf.dY();q.wL.x+=q.wk;q.ev.x+=1;q.wf.ar();};R.prototype.dS=function(){var q=this;q.wf.oX();q.wL.y-=q.wk;q.ev.y-=1;q.wf.dT();};R.prototype.dD=function(){var q=this;q.wf.dJ();q.wL.y+=q.wk;q.ev.y+=1;q.wf.oW();};R.prototype.sb=function(){var q=this,ww=q.yR();var hD=new eH(un(ww.width/q.wk)+2,un(ww.height/q.wk)+2);var uN=new eH(un((ww.width+u.tileSize-1)/u.tileSize),un((ww.height+u.tileSize-1)/u.tileSize));if(typeof(JSMAP_GUTTER)=="number"){uN.width+=JSMAP_GUTTER*2;uN.height+=JSMAP_GUTTER*2;}return uN;};R.prototype.hG=function(p1){var q=this,wv,rq=new L((q.ev.x+p1.x),(q.ev.y+p1.y)),G=u.baseUrl+"images/out-of_bounds.gif";if(rq.y<0||rq.y>=q.ys){}else{if(u.allowMapWrapping){if(rq.x<0||rq.x>=q.ys){rq.x=rq.x%q.ys;if(rq.x<0){rq.x+=q.ys;}}}G=q.iK(q.tM(),rq.x,rq.y);}wv=new wY(q);wv.G=G;wv.eg=rq;wv.U=q.tM();wv.ov=p1;wv.yV();return wv;};R.prototype.hF=function(p1){if(p1){p1.eB();p1=null;}};R.prototype.iK=function(E,k,s){if(u.tileSources!=null&&u.tileSources.length>0){if(u.eZ==null){u.eZ=0;}else if(u.eZ==u.tileSources.length-1){u.eZ=0;}else{u.eZ+=1;}var oP=u.tileSources[u.eZ];return oP+"?z="+E+"&x="+k+"&y="+s+"&key="+u.key+"&v="+u.storageVersion+"&lc="+u.locale;}else{return u.tileUrl+"?z="+E+"&x="+k+"&y="+s+"&key="+u.key+"&v="+u.storageVersion+"&lc="+u.locale;}};R.prototype.getType=function(){return eS.TILE_LAYER;};R.prototype.getId=function(){return this.W;};R.prototype.getMap=function(){return this.w;};R.prototype.ow=function(){return this.w.r;};R.prototype.tV=function(G,eF){return this.w.setCursor(G,eF);};R.prototype.tM=function(){return this.w.U;};R.prototype.sU=function(){return this.w.Z;};R.prototype.tf=function(){return this.w.wy;};R.prototype.sp=function(Z){this.w.iU(Z);};R.prototype.sg=function(wl){var aX=wl.toMerc(),aC=this.tP(),k=(aX.x-u.bb.x1)/aC.width,s=wZ((aX.y-u.bb.y2)/aC.height);return new L(k,s);};R.prototype.tP=function(){var U=this.tM(),aZ=this.ys,sC=u.bb.x2-u.bb.x1,sV=u.bb.y2-u.bb.y1,di=(sC/aZ),du=(sV/aZ);return new eH(di,du);};R.prototype.dC=function(){return this.wk;};R.prototype.tm=function(p1){var q=this,eq=p1,so=q.ev,aM=q.wL,ud=q.tP(),yU=new wl(so.x*ud.width,so.y*ud.height,wE.MercSrid);yU.x+=u.bb.x1;yU.y=u.bb.y2-yU.y;var eG=q.rI(),sq=new L(eG.x+aM.x,eG.y+aM.y),aB=new L(eq.x-sq.x,eq.y-sq.y),dd=new wl(yU.x+(aB.x/q.wk)*ud.width,yU.y-(aB.y/q.wk)*ud.height,wE.MercSrid),rp=dd.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.ai=function(p1){var q=this,tG=p1.toMerc(),yz=q.tP(),sw=q.ev,ac=q.wL,af=q.wk,oo=u.bb.x2-u.bb.x1,ag=q.wf.V.width*yz.width,da=q.wf.V.height*yz.height,dw=0,hS=0,yA=new wl(yz.width*sw.x,yz.height*sw.y,wE.MercSrid),hO=new wl(yA.x+ag,yA.y+da,wE.MercSrid);tG=new wl(tG.x-u.bb.x1,u.bb.y2-tG.y,wE.MercSrid);var de=yA.x,dq=(ag-oo)/2,sN=de+dq,sM=rV((tG.x-sN)/oo);tG.x-=sM*oo;var yJ=tG.x-yA.x;yJ/=yz.width;yJ*=af;yJ+=ac.x;yJ+=dw;var uE=tG.y-yA.y;uE/=yz.height;uE*=af;uE+=ac.y;return new L(yJ,uE);};var S=function(W,ws){if(ws<1||ws>900){K(H.gs);}this.W=W;this.wa=[];this.w=null;this.eJ=[];this.r=null;if(typeof(ws)=="undefined"){this.ws=1;}else{this.ws=ws;}this.minZoom=0;this.maxZoom=u.maxZoom;};S.prototype=new eY();S.prototype.ek=function(ei){this.w=ei;this.tB();};S.prototype.eB=function(){var Q,X,q=this;wD(q.r);wn(q,"r");for(Q;Qq.minZoom-1&&Eq.minZoom-1&&E=u.maxPinsInView&&!u.showAllPins){if(!u.noConfirmMaxPins){sF=window.confirm(H.gu);u.showAllPins=sF;u.noConfirmMaxPins=true;}else{uU=false;}}}else{X.sR();}}};S.prototype.sO=function(){var q=this,Q,X;for(Q=0;Q=0;i--){ew=q.eJ[i];ew.hide();}};S.prototype.tK=function(){var q=this,i,X,ew;for(i=q.wa.length-1;i>=0;i--){X=q.wa.pop();X.eB();X=null;}for(i=q.eJ.length-1;i>=0;i--){ew=q.eJ.pop();ew=eR(ew.rm);if(ew!==null){wD(ew);}ew=null;}};S.prototype.hA=function(){if(this.w.B!=null){this.w.B.hide();}};S.prototype.hP=function(w){if(this.w.B!=null){var uy=this.w.B.getDiv();rK(uy,"auto");}};S.prototype.hJ=function(w){if(this.w.B!=null){var uy=this.w.B.getDiv();rK(uy,false);}};S.prototype.sj=function(B){var ei=this.w,uA=B.getBoundsRect(),tH=ei.oy({x:uA.x1,y:uA.y1}),uX=ei.oy({x:uA.x2,y:uA.y2}),wP=ei.getSize(),uj=0,uQ=0;uj=tH.x<0?-tH.x:(uX.x>wP.width?-(uX.x-wP.width):0);uQ=tH.y<0?-tH.y:(uX.y>wP.height?-(uX.y-wP.height):0);if(uj!==0||uQ!==0){ei.sL(uj,uQ);}};S.prototype.hH=function(B){this.sj(B);};S.prototype.hK=function(){var q=this;q.w.B.removeEventListener(N.events.HIDE,q.sz);q.w.B.removeEventListener(N.events.SIZE_CHANGE,q.sd);q.w.removeEventListener(h.events.DRAG_START,q.ul);q.w.removeEventListener(h.events.SCROLL_START,q.ul);q.w.removeEventListener(h.events.SCROLL_END,q.uc);q.w.removeEventListener(h.events.DRAG_END,q.uc);q.w.removeEventListener(h.events.ZOOM_CHANGED,q.sc);wn(q,"sz");wn(q,"sd");wn(q,"ul");wn(q,"uc");wn(q,"sc");q.w.B=null;};S.prototype.getDiv=function(){return this.r;};S.prototype.getMap=function(){return this.w;};S.prototype.getzIndex=function(){return ws;};S.prototype.setzIndex=function(E){if(typeof(this.r)=="undefined"){K(H.fI);}wd(this.r,E);ws=E;};S.prototype.addPin=function(X){var q=this,Q,E;if(!X.tk){K(H.al);}Q=q.w.screenPosAt(X.tk);X.ek(q);E=q.w.U;if(E>q.minZoom-1&&E-1&&tzq.minZoom-1&&E-1){Q=q.wa[tz];Q.eB();q.wa.splice(tz,1);return true;}else{return false;}};S.prototype.getPinsArray=function(){return this.wa;};S.prototype.getPinIndex=function(pi){var q=this,Q,X;for(Q=0;Q=0){q.eJ[o].destroy();q.eJ.splice(o,1);return true;}else{return false;}};S.prototype.getPolylinesArray=function(){return this.eJ;};S.prototype.getPolylineIndex=function(W){var q=this,i;for(i=0;i=wC.minZoom;o--){rx=eI('_z_'+o,k,tY,eD.fa);ef(rx,J.yF);rx.title='Zoom level '+o;rx.onmousedown=function(e){D(e);return false;};rx.onmouseup=dH;rx.rx=o;I(yf,rx);tY+=10;}I(yf,eI('',k,tY,eD.fp));tY+=4;I(r,yf);s+=tY;s+=6;var dB=s,ua=eI('',k,s,eD.fo);ef(ua,J.yF);ua.onmousedown=function(v){v=D(v);w.zoomOut();return false;};I(r,ua);var E,tU,eV=0,pb=0,po=0,ya,ed=eI('',k,s,eD.fh);function tu(v){v=D(v);var dj=yk(v),yn=po.y+(dj.y-pb.y)-yM;E=wC.maxZoom-Math.round(yn/10);if(EwC.maxZoom){E=wC.maxZoom;yn=((wC.maxZoom-E)*10)+J.tJ;}ed.style.top=wO(yM+yn);eV=E;tU=wC.maxZoom-(yn/10)-w.U;wd(ya,eM.uf);ya.pw(tC(2,tU));return false;}function sG(v){v=D(v);ex(document.documentElement,J.tI,tu);ex(document.documentElement,J.yH,sG);E=eV;ed.style.top=wO(yM+((wC.maxZoom-E)*10));yu(pb);yu(po);yu(eV);ef(ed,eD.yZ,24,24);tU=E-w.U;ya.pw(tC(2,tU));w.moveTo(null,ya.pq);wG(w.T[0].r,true);wd(ya,-1);return false;}function dQ(v){v=D(v);pb=yk(v);po=new L(parseInt(ed.style.left,10),parseInt(ed.style.top,10));ra(document.documentElement,J.tI,tu);ra(document.documentElement,J.yH,sG);ef(ed,eD.gw,24,24);wG(w.T[0].r,false);var ww=w.getSize(),Z={x:ww.width/2,y:ww.height/2};ya=w.pP(Z);return false;}yC(ed);ed.onmousedown=dQ;ed.title="drag to change zoom";ef(ed,eD.yZ,24,24);I(r,ed);function oj(U){ed.style.top=wO(yM+((wC.maxZoom-U)*10));}function yG(Y){if(Y.height>330){wG(yf,"");wG(ed,"");ua.style.top=wO(dB);}else{wG(yf,false);wG(ed,false);ua.style.top=wO(yM);}}w.addEventListener(h.events.ZOOM_CHANGED,oj);w.addEventListener(h.events.SIZE_CHANGED,yG);oj(w.getZoom());yG(w.getSize());return{getId:function(){return J.oE;},getToolbar:function(){return er;},setImageUrl:function(){},getImage:function(){return null;},setPosition:function(){}};};var eh=function(W,er){this.W=W;this.er=er;this.G="";this.wc=new L(0,0);this.n=null;this.onclick=null;};eh.prototype.tR=function(){wI(this.n,this.wc.x,this.wc.y);};eh.prototype.pp=function(v){var q=this;v=D(v);if(q.onclick){q.onclick(q);}q.wm(eh.events.CLICK,q);return false;};eh.prototype.pa=function(v){v=D(v);return false;};eh.prototype.getId=function(){return this.W;};eh.prototype.getToolbar=function(){return this.er;};eh.prototype.setImageUrl=function(dR){var q=this;q.G=dR;if(q.n){q.n.src=q.G;}};eh.prototype.getImage=function(){var q=this,n;if(!q.n){n=new Image();n.src=q.G;n.onmousedown=P(q,"pp");n.onmouseup=P(q,"pa");n.style.cursor=J.yF;q.n=n;q.tR();}return q.n;};eh.prototype.setPosition=function(dE){var q=this;q.wc=dE;if(q.n){q.tR();}};eh.events={CLICK:"onclick"};var dG=function(er){var M=new eh("Telenavis jsMap pan tool",er);M.setImageUrl(u.baseUrl+"images/pan_down.png");M.setPosition(new L(17,38));M.iY=new uz(M,0,1);return M;};var dF=function(er){var M=new eh("Telenavis jsMap pan tool",er);M.setImageUrl(u.baseUrl+"images/pan_up.png");M.setPosition(new L(17,8));M.iY=new uz(M,0,-1);return M;};var sX=function(er){var M=new eh("Telenavis jsMap pan tool",er);M.setImageUrl(u.baseUrl+"images/pan_left.png");M.setPosition(new L(5,20));M.iY=new uz(M,-1,0);return M;};var sB=function(er){var M=new eh("Telenavis jsMap pan tool",er);M.setImageUrl(u.baseUrl+"images/pan_right.png");M.setPosition(new L(35,20));M.iY=new uz(M,1,0);return M;};var uz=function(M,dk,dl){var w=M.getToolbar().getMap(),n=M.getImage(),sh=false;function dc(v){rY(v);n.onmouseup=dv;n.onmouseout=n.onmouseup;sh=false;rt(dx,50);}function dx(){w.rQ=dk;w.rW=dl;w.yK();}function dv(v){rY(v);sh=true;w.rQ=0;w.rW=0;}n.onmousedown=dc;};var wS=function(W){this.wr=null;this.getId=function(){return W;};this.method=wS.methodsEnum.ADDRESS;this.responseLocale="el";this.adminAreasLimit=3;this.calculateDistances=false;this.minSearchDistance=10;this.maxSearchDistance=500;};wS.prototype=new eP();wS.prototype.yW=function(eT){var wj=this,G;G=u.geocoderUrl+"?"+"address="+encodeURIComponent(eT)+"&t="+wj.method+"&key="+u.key+"&time="+new Date().valueOf()+"&lc="+wj.responseLocale+"&d="+document.location.host+"&callback=telenavis.Geocoder.callback"+wj.getId();wS["callback"+wj.getId()]="";uT(G,P(wj,"sZ"));};wS.prototype.dr=function(ye){var wj=this,G;G=u.geocoderUrl+"?"+"p="+ye.x.toString()+" "+ye.y.toString()+"&t="+wj.method+"&key="+u.key+"&time="+new Date().valueOf()+"&d="+document.location.host+"&lc="+wj.responseLocale+(wj.calculateDistances===true?"&cd=1":"")+"&nm="+wj.minSearchDistance+"&xm="+wj.maxSearchDistance+"&callback=telenavis.Geocoder.callbackRv"+wj.getId();wS["callbackRv"+wj.getId()]="";uT(G,P(wj,"hu"));};wS.prototype.sZ=function(){var rs,wj=this;rs=wS["callback"+wj.getId()];if(rs===""){K(H.pz);}else{if(wj.wr){wj.wr(rs);}wj.wm(wS.events.GEOCODE,rs);}};wS.prototype.hu=function(){var rs,wj=this;rs=wS["callbackRv"+wj.getId()];if(rs===""){K(H.pz);}else{rs.Address=wj.gz(rs.Results);wj.wm(wS.events.REVERSE_GEOCODE,rs);}};wS.prototype.gz=function(rP){var eT='';var ix=function(rF){if(rF!=''){eT+=rF+', ';return true;}return false;};if(rP==null){return'';}if(!ix(rP.Place)){ix(rP.Road+(rP.RoadNum==''?'':' '+rP.RoadNum));}var oc=0;var pA=false;for(var i=rP.AdminOrders.length-1;i>=0&&oc0){if(u.eZ==null){u.eZ=0;}else if(u.eZ==u.tileSources.length-1){u.eZ=0;}else{u.eZ+=1;}var oP=u.tileSources[u.eZ];return oP+"?z="+E+"&x="+k+"&y="+s+"&key="+u.key+"&v="+u.storageVersion+"&lc="+u.locale;}else{return u.tileUrl+"?z="+E+"&x="+k+"&y="+s+"&key="+u.key+"&v="+u.storageVersion+"&lc="+u.locale;}return u.tileUrl+"?z="+E+"&x="+k+"&y="+s+"&key="+u.key+"&v="+u.storageVersion+"&lc="+u.locale;};var rT=wM('',0,0,0,0);rT.style.border="solid 2px blue";rT.style.backgroundColor="white";iC(rT,0.5);wd(rT,2);I(ez,rT);I(w.getDiv(),r);function yG(){var gy=U,pl=uM();if(gy!=pl){wp.tN();U=pl;iy(pl);}ug();}function aj(){U=uM();wp.tN();rt(ug,100);iy(U);}function td(){var wF=wp.ai(w.getCenter()),eG=wp.rI(),wU=new L(wF.x+eG.x-Y/2,wF.y+eG.y-Y/2);var ad=od((wU.x*wU.x)+(wU.y*wU.y));if(ad>wp.wk){wp.tN();}else{wI(wp.r,eG.x-wU.x,eG.y-wU.y);wp.eX();}ug();iy(U);}function uM(){var wP=w.getSize(),tA=wP.width,em=wP.height,E=w.getZoom()-u.overviewZoomDifference;do{tA/=2;em/=2;if(tA=0);if(E<0){E=0;}return E;}function ug(){var wP=w.getSize(),ts=w.getZoom(),se=tC(2,ts-U),sr=wP.width/se,aN=wP.height/se;rG(rT,sr,aN);wI(rT,u.overviewSize/2-sr/2,u.overviewSize/2-aN/2);}function iy(U){if(U<=u.viewRectangleMinimumZoom){rT.style.display='none';}else{rT.style.display="block";}}function ij(){rG(r,(wX?(Y+yc*2):12),(wX?(Y+yc*2):12));eN.style.backgroundImage="url(\""+(wX?u.overviewIconOpened:u.overviewIconClosed)+"\")";eN.style.backgroundRepeat='no-repeat';wG(ez,wX);if(w.yg){w.yg.style.right=wO((wX?Y:0)+10);}if(wX==true){if(pu===false){q.ek();pu=true;}wp.tN();}}q.ek=function(){wp.ek(w,ez);w.addEventListener(h.events.SIZE_CHANGED,yG);w.addEventListener(h.events.ZOOM_CHANGED,aj);w.addEventListener(h.events.CENTER_CHANGED,td);pu=true;};q.uU=function(){if(wX==false){wX=true;ij();}};q.fi=function(){if(wX==true){wX=false;ij();}};q.yj=function(){wD(r);w.removeEventListener(h.events.CENTER_CHANGED,td);w.removeEventListener(h.events.ZOOM_CHANGED,aj);w.removeEventListener(h.events.SIZE_CHANGED,yG);wn(w,"ri");wX=false;if(w.yg){w.yg.style.right=wO((wX?Y:0)+10);}};q.U=function(){return uM();};q.rn=function(){if(wX==true){var k,s,q=this,A=wp.wf.A;for(k=0;k=0){A[k][s].rn();}}}}};if(w.yg){w.yg.style.right=wO((wX?Y:0)+10);}U=uM();ij();ug();iy(U);};var os=function(w){this.uH=null;this.w=w;};os.prototype.iB=function(){var tc=this.w.getCenter();var ts=this.w.getZoom();var fN=this;if(this.fZ(tc,ts)===true){fN.uH={ye:tc,fG:ts};var wr=function(){};var G=u.baseUrl+"lyrs.ashx?"+"k="+u.key+"&time="+new Date().valueOf()+"&u="+document.location.host+"&callback=mlch";uT(G,wr);}};os.prototype.fZ=function(tc,ts){if(this.uH==null){return true;}if(this.uH.fG!=ts){return true;}var fK=Math.pow(2,ts);var fL=Math.abs(u.bb.x1)+Math.abs(u.bb.x2);var aJ=fL/fK;var aS=tc.toMerc();var aF=this.uH.ye.toMerc();if(Math.abs(aS.x-aF.x)>aJ*15){return true;}if(Math.abs(aS.y-aF.y)>aJ*15){return true;}return false;};h.yX.register(function(w){w.iM=new os(w);w.iM.iB();});var aD=function(W,fS,fP){this.id=W;this.bb=fS;this.tt=fP;};aD.prototype.toString=function(){return"Feature { id:"+this.id+", bounding box:"+this.bb+', title:'+this.tt+"}";};telenavis.TileFeature=aD;u.ServerTrafficLayerId='TrafficServerLayer';var iC=function(wu,tD){wu.style.opacity=tD;};var dz=function(O,fd){O.src=fd;};var aL="http://www.w3.org/2000/svg";var sS=function(ew,rU){if(!ew){K(H.ab+"(id:"+this.rm+")");}else{eO(ew,"visibility",rU?J.uB:J.im);}};var fk=function(wQ){var rR=wQ.wi.getId(),w=wQ.wi.getMap(),fW=w.getId(),aH=wQ.wi.getDiv(),eo=eR(wQ.rm),su=fW+"."+rR+".svgC",tZ=eR(su),oT=w.T[0].rI(),wP=w.getSize(),E=w.getZoom(),fillColor=wQ.fillColor===""?"none":wQ.fillColor,pnts=wQ.fg(oT,false,fillColor=="none");if(!aH){K(H.fv+"(layer:"+p.layer.getId()+")");}if(eo){wD(eo);}if(!tZ){tZ=st(aL,"svg");tZ.id=su;I(aH,tZ);}eO(tZ,"style","pointer-events:none; position: absolute; overflow: hidden;"+"left: "+(-oT.x)+"px;"+"top: "+(-oT.y)+"px;"+"width: "+(wP.width)+"px;"+"height : "+(wP.height)+"px;"+"z-index:"+wQ.zIndex+";");eo=st(aL,"path");I(tZ,eo);eo.id=wQ.rm;if(E>wQ.wi.minZoom-1&&E