function AJAXMAP(k,dr,eD,bE){this.k=k;this.aO=$(k);this.bk=null;this.et=[];this.ar=256;this.G=0;this.D=0;this.at=265960;this.av=6647720;this.ab=265960;this.U=6647720;this.A={'bottom':0,'left':0,'top':0,'right':0};this.ao=0;this.ap=0;this.cG=eD;this.o=4;this.bv=14;this.bL=0;this.dr=dr;this.dG=5;this.dC=8;this.bz=1;this.aS=0;this.aE=null;this.cv=false;this.M={'x':0,'y':0};this.v={'x':0,'y':0};this.aj=null;this.dp=null;this.dk=0;this.O=null;this.m=0;this.ak={'x':0,'y':0};this.cY=32633;this.ad='EPSG:32633';this.bg=false;this.bc=null;this.cE=null;this.T=null;this.V=null;this.bW=false;this.J=[];this.eO=0;this.aJ=null;this.bE=bE?bE:'test';this.am={};this.am['blank']=new Image();this.am['loading']=this.am['blank'];this.bo=[];this.bs=[];this.aA=[];this.bV=null;this.eN=null;this.trackCoords=null;this.cb=true;this.bG=WAAnnotationOpenBehaviour.Hover;this.cD=WAAnnotationCloseBehaviour.IconMouseOut;this.bI=false;this.df=0;this.dg=0;this.bw=true;this.ah=null;this.eP={'x':0,'y':0};this.ds=true;this.cg=false;this.F=[];this.zoomCounter=0;this.zoomTimerId=null;this.bH='default';this.dq=false;};AJAXMAP.ZOOMLEVELS=[56,128,256,512,1024,2048,5120,10240,20480,40960,81920,131072,262144,524288,1000000];var WAAnnotationOpenBehaviour={Disable:1,Hover:2,Click:4,Manual:8};var WAAnnotationCloseBehaviour={IconMouseOut:16,Manual:32};AJAXMAP.prototype={init:function(ac,bt,cA){if(ac)ac=this.ba(ac);if(bt){this.o=bt;}if(cA){this.aS=cA;}this.m=AJAXMAP.ZOOMLEVELS[this.o]/256;if(ac){var ej=new Coordinate(ac.x,ac.y,ac.srs);var aC=this.aC(ac);this.at=aC.x;this.av=aC.y;this.ab=aC.x;this.U=aC.y;}this.eg();tileLayer=new Layer({'type':'webatlastile','visible':true,'name':'Tile Webatlas'});tileLayer.id="layer_default";this.addLayer(tileLayer);Event.observe(this.k+'mouselayer','mousemove',this.eA.bindAsEventListener(this));Event.observe(this.k+'mouselayer','click',this.ct.bindAsEventListener(this));Event.observe(this.k+'mouselayer','mousedown',this.co.bindAsEventListener(this));Event.observe(this.k+'mouselayer','mouseup',this.cw.bindAsEventListener(this));Event.observe(this.k+'mouselayer','mouseout',this.cx.bindAsEventListener(this));Event.observe(this.k+'mouselayer','mouseover',this.cq.bindAsEventListener(this));Event.observe(this.k+'mouselayer','dblclick',this.ek.bindAsEventListener(this));Event.observe(this.k+'mouselayer','contextmenu',this.ev.bindAsEventListener(this));if(this.cG){Event.observe(window,'resize',this.resizeEventHandler.bindAsEventListener(this));}Event.observe($(this.k),"mousewheel",this.dh.bindAsEventListener(this));Event.observe($(this.k),"DOMMouseScroll",this.dh.bindAsEventListener(this));Event.observe(this.k,'map:resized',this.hideAnnotationPopup.bindAsEventListener(this));Event.observe(this.k,'map:moved',this.hideAnnotationPopup.bindAsEventListener(this));Event.observe(this.k,'map:dragBegin',this.hideAnnotationPopup.bindAsEventListener(this));if(this.G==0&&this.D==0){this.G=this.aO.offsetWidth;this.D=this.aO.offsetHeight;}if(this.G==0&&this.D==0){this.eu();}if(this.cG){this.eB(false);}else{this.az(false);}if(ac)this.bx(ej,false);this.dq=true;},co:function(I){this.M=this.dx(I);this.dp=new Coordinate(this.A.left+(this.m*this.M.x),this.A.top-(this.m*this.M.y),this.ad);this.cv=true;if(this.dc(I)=="MIDDLE"&& !this.bI){this.bV.style.zIndex='2';this.bW=true;this.T.style.display='block';this.T.style.top=this.v.y+"px";this.T.style.left=this.v.x+"px";this.T.style.width="0px";this.T.style.height="0px";}if(this.bH=='DrawBoundingBox'){this.bV.style.zIndex='2';this.T.style.display='block';this.T.style.top=this.v.y+"px";this.T.style.left=this.v.x+"px";this.T.style.width="0px";this.T.style.height="0px";}$(this.k).fire("map:grabbed",{'mouseMapCoords':this.aj,'mouseCoords':this.v});I.stop();},ct:function(I){$(this.k).fire("map:mouseClicked",{'mouseMapCoords':this.aj,'mouseCoords':this.v});},ev:function(I){},ek:function(I){if(this.bw)if(!this.bI)this.zoomIn(new Coordinate(this.aj.x,this.aj.y));},cw:function(I){this.release(this.ak);this.T.style.display='none';this.O=new Coordinate(this.A.left+(this.m*(this.G/2)),this.A.top-(this.m*(this.D/2)),this.ad);if(this.bW&&this.V!=null){this.zoomOnBoundingBox(this.V);this.V=null;this.bW=false;}if(this.bH=='DrawBoundingBox'&&this.V!=null){var ey={'bottom':this.V.y1,'left':this.V.x1,'top':this.V.y2,'right':this.V.x2};$(this.k).fire("map:boundingboxSelected",{'boundingbox':ey});this.V=null;}$(this.k).fire("map:mouseUp",{'button':this.dc(I),'mouseMapCoords':this.aj,'mouseCoords':this.v});},cx:function(I){this.release(this.ak);$(this.k).fire("map:mouseOut");},cq:function(I){$(this.k).fire("map:mouseOver");},eA:function(I){this.v=this.dx(I);if(this.bw){if(this.cv){this.dk++;if(this.dk%3==0){if(this.bW){this.V={'x1':0,'y1':0,'x2':0,'y2':0};if(this.v.y<this.M.y){this.T.style.top=this.v.y+"px";this.T.style.height=this.M.y-this.v.y+"px";this.V.y1= -(this.M.y*this.m-this.U);this.V.y2= -(this.v.y*this.m-this.U);}else{this.T.style.top=this.M.y+"px";this.T.style.height=this.v.y-this.M.y+"px";this.V.y1= -(this.v.y*this.m-this.U);this.V.y2= -(this.M.y*this.m-this.U);}if(this.v.x<this.M.x){this.T.style.left=this.v.x+"px";this.T.style.width=this.M.x-this.v.x+"px";this.V.x1=this.v.x*this.m+this.ab;this.V.x2=this.M.x*this.m+this.ab;}else{this.T.style.left=this.M.x+"px";this.T.style.width=this.v.x-this.M.x+"px";this.V.x2=this.v.x*this.m+this.ab;this.V.x1=this.M.x*this.m+this.ab;}}else{this.ak={'x':this.v.x-this.M.x,'y':this.v.y-this.M.y};this.bd(this.ak,true);$(this.k).fire("map:dragging",{'offsetCoords':this.ak});if(!this.cg){$(this.k).fire("map:dragBegin",{'mouseMapCoords':this.aj,'mouseCoords':this.v,'boundingBox':this.A});this.cg=true;}}}}else{this.aj=new Coordinate(this.v.x*this.m+this.ab,-(this.v.y*this.m-this.U),this.ad);}}if(this.bH=='DrawBoundingBox'){this.V={'x1':0,'y1':0,'x2':0,'y2':0};if(this.v.y<this.M.y){this.T.style.top=this.v.y+"px";this.T.style.height=this.M.y-this.v.y+"px";this.V.y1= -(this.M.y*this.m-this.U);this.V.y2= -(this.v.y*this.m-this.U);}else{this.T.style.top=this.M.y+"px";this.T.style.height=this.v.y-this.M.y+"px";this.V.y1= -(this.v.y*this.m-this.U);this.V.y2= -(this.M.y*this.m-this.U);}if(this.v.x<this.M.x){this.T.style.left=this.v.x+"px";this.T.style.width=this.M.x-this.v.x+"px";this.V.x1=this.v.x*this.m+this.ab;this.V.x2=this.M.x*this.m+this.ab;}else{this.T.style.left=this.M.x+"px";this.T.style.width=this.v.x-this.M.x+"px";this.V.x2=this.v.x*this.m+this.ab;this.V.x1=this.M.x*this.m+this.ab;}}$(this.k).fire("map:mouseMoved",{'mouseMapCoords':this.aj,'mouseCoords':this.v});this.aj=new Coordinate(this.v.x*this.m+this.ab,-(this.v.y*this.m-this.U),this.ad);return false;},setState:function(di){this.bH=di;if(di=='DrawBoundingBox'){this.disallowMouseNavigation();}else{this.allowMouseNavigation();}},getState:function(){return this.bH;},move:function(ak,cr){this.ak=ak;this.bd(this.ak,true);this.release(ak,cr);this.O=new Coordinate(this.A.left+(this.m*(this.G/2)),this.A.top-(this.m*(this.D/2)),this.ad);},resizeEventHandler:function(e){this.resize();},resize:function(D,G){this.aD();var user=false;if(D!=null){var K=G;var L=D;user=true;}else{var K=0;var L=0;if(window.innerWidth){K=window.innerWidth;L=window.innerHeight;}else{K=document.compatMode=='CSS1Compat'?document.documentElement.clientWidth:document.body.clientWidth;L=document.compatMode=='CSS1Compat'?document.documentElement.clientHeight:document.body.clientHeight;}if(K%2){K--;}if(L%2){L--;}}this.G=K;this.D=L;if(user){$(this.k).style.width=K+"px";$(this.k).style.height=L+"px";if(this.ah!=null){this.ah.element.width=K;this.ah.element.height=L;}}else{aG=this.bX($(this.k));aH=this.ca($(this.k));$(this.k).style.width=K-aH+"px";$(this.k).style.height=L-aG+"px";if(this.ah!=null){this.ah.element.width=K-aH;this.ah.element.height=L-aG;}}if(D==null){this.G=K-aH;this.D=L-aG;}this.az(true);this.updateBB();$(this.k).fire("map:resized");},eu:function(){var K=0;var L=0;if(window.innerWidth){K=window.innerWidth;L=window.innerHeight;}else{K=document.compatMode=='CSS1Compat'?document.documentElement.clientWidth:document.body.clientWidth;L=document.compatMode=='CSS1Compat'?document.documentElement.clientHeight:document.body.clientHeight;}if(K%2){K--;}if(L%2){L--;}aG=this.bX($(this.k));aH=this.ca($(this.k));this.G=K-aH;this.D=L-aG;},eB:function(load,D,G){this.aD();var user=false;if(D!=null){var K=G;var L=D;user=true;}else{var K=0;var L=0;if(window.innerWidth){K=window.innerWidth;L=window.innerHeight;}else{K=document.compatMode=='CSS1Compat'?document.documentElement.clientWidth:document.body.clientWidth;L=document.compatMode=='CSS1Compat'?document.documentElement.clientHeight:document.body.clientHeight;}if(K%2){K--;}if(L%2){L--;}}this.G=K;this.D=L;aG=this.bX($(this.k));aH=this.ca($(this.k));if(user){$(this.k).style.width=K+"px";$(this.k).style.height=L+"px";if(this.ah!=null){this.ah.element.width=K-aH;this.ah.element.height=L-aG;}}else{$(this.k).style.width=K-aH+"px";$(this.k).style.height=L-aG+"px";if(this.ah!=null){this.ah.element.width=K-aH;this.ah.element.height=L-aG;}}if(D==null){this.G=K-aH;this.D=L-aG;}this.az(false);$(this.k).fire("map:resized");},cj:function(){for(var i=0;i<this.F.length;i++){if(this.F[i].type!='wmsoverlay'){for(var c=0;c<this.F[i].tiles.length;c++){for(var r=0;r<this.F[i].tiles[c].length;r++){var l=this.F[i].tiles[c][r];this.dy(l);}}}}},dx:function(I){return{'x':Event.pointerX(I)-this.ca($(this.k)),'y':Event.pointerY(I)-this.bX($(this.k))};},az:function(cp){if(this.D==0)this.D=200;if(this.G==0)this.G=200;var rows=Math.ceil(this.D/this.ar)+1;var cols=Math.ceil(this.G/this.ar)+1;this.eK=rows;this.eJ=cols;for(var i=0;i<this.F.length;i++){this.F[i].tiles=[];if(this.F[i].visible==true){for(var c=0;c<cols;c++){var cX=[];for(var r=0;r<rows;r++){this.bz=this.bz==this.dC?this.bz=this.dG:this.bz+1;var l={'element':null,'posx':256*c,'posy':256*r,'xIndex':c,'yIndex':r,'host':this.bz,'layer':this.F[i]};cX.push(l);}this.F[i].tiles.push(cX);}}}this.bd({'x':0,'y':0},cp);},bd:function(Q,cp){if(!Q){Q={'x':0,'y':0};}this.bc.style.top=Q.y+"px";this.bc.style.left=Q.x+"px";for(i=0;i<this.bo.length;i++){var overlay=this.bo[i];}for(i=0;i<this.bs.length;i++){var overlay=this.bs[i];overlay.style.left=Q.x+'px';overlay.style.top=Q.y+'px';}this.aJ.style.top=this.df+Q.y+'px';this.aJ.style.left=this.dg+Q.x+'px';for(i=0;i<this.J.length;i++){var d=this.J[i];d.element.style.left=d.x+Q.x+'px';d.element.style.top=d.y+Q.y+'px';}for(var i=0;i<this.F.length;i++){if(this.F[i].type!='wmsoverlay'){for(var c=0;c<this.F[i].tiles.length;c++){for(var r=0;r<this.F[i].tiles[c].length;r++){var l=this.F[i].tiles[c][r];l.posx=(l.xIndex*this.ar)+this.ao+Q.x;l.posy=(l.yIndex*this.ar)+this.ap+Q.y;var bQ=true;if(l.posx>this.G){do{l.xIndex-=this.F[i].tiles.length;l.posx=(l.xIndex*this.ar)+this.ao+Q.x;}while(l.posx>this.G);if(l.posx+this.ar<0){bQ=false;}}else{while(l.posx< -this.ar){l.xIndex+=this.F[i].tiles.length;l.posx=(l.xIndex*this.ar)+this.ao+Q.x;}if(l.posx>this.G){bQ=false;}}if(l.posy>this.D){do{l.yIndex-=this.F[i].tiles[c].length;l.posy=(l.yIndex*this.ar)+this.ap+Q.y;}while(l.posy>this.D);if(l.posy+this.ar<0){bQ=false;}}else{while(l.posy< -this.ar){l.yIndex+=this.F[i].tiles[c].length;l.posy=(l.yIndex*this.ar)+this.ap+Q.y;}if(l.posy>this.D){bQ=false;}}if(cp&&bQ){this.dy(l);}if(l.element){l.element.style.top=l.posy+'px';l.element.style.left=l.posx+'px';}}}}}},addNavigationGUI:function(gui){gui.mapControl=this;this.aE.appendChild(gui.element);gui.element.style.zIndex=2;},addDrawCanvas:function(canvasIn){this.ah=canvasIn;this.ah.parent=this;var aq=this.k+'canvas';this.ah.element.setAttribute('id',aq);this.bc.appendChild(this.ah.element);var K=0;var L=0;if(window.innerWidth){K=window.innerWidth;L=window.innerHeight;}else{K=document.compatMode=='CSS1Compat'?document.documentElement.clientWidth:document.body.clientWidth;L=document.compatMode=='CSS1Compat'?document.documentElement.clientHeight:document.body.clientHeight;}this.ah.element.width=this.G;this.ah.element.height=this.D;if(/msie/i.test(navigator.userAgent)){var hack=G_vmlCanvasManager.initElement(this.getDrawCanvas().element);this.getDrawCanvas().element=hack;this.getDrawCanvas().useex=true;}canvas=this.ah.element;this.ah.surface=canvas.getContext("2d");},getDrawCanvas:function(){return this.ah;},centerOnCoords:function(P,mouse,eq){P=this.ba(P);var coordsperpixel=256/AJAXMAP.ZOOMLEVELS[this.o];if(mouse){var Q={'x':Math.floor(((P.x-this.ab)* -coordsperpixel)+(this.v.x)),'y':Math.floor(((P.y-this.U)*coordsperpixel)+(this.v.y))};}else{var Q={'x':Math.floor(((P.x-this.ab)* -coordsperpixel)+(this.G/2)),'y':Math.floor(((P.y-this.U)*coordsperpixel)+(this.D/2))};}this.db();this.bd(Q,true);if(eq)this.release(Q,true);else this.release(Q,false);this.O={'x':this.A.left+(this.m*(this.G/2)),'y':this.A.top-(this.m*(this.D/2))};this.O=new Coordinate(this.A.left+(this.m*(this.G/2)),this.A.top-(this.m*(this.D/2)),this.ad);},bx:function(P,mouse){P=this.ba(P);var coordsperpixel=256/AJAXMAP.ZOOMLEVELS[this.o];if(mouse){var Q={'x':Math.floor(((P.x-this.ab)* -coordsperpixel)+(this.v.x)),'y':Math.floor(((P.y-this.U)*coordsperpixel)+(this.v.y))};}else{var Q={'x':Math.floor(((P.x-this.ab)* -coordsperpixel)+(this.G/2)),'y':Math.floor(((P.y-this.U)*coordsperpixel)+(this.D/2))};}this.db();this.bd(Q,true);this.release(Q,false);this.O=new Coordinate(this.A.left+(this.m*(this.G/2)),this.A.top-(this.m*(this.D/2)),this.ad);},addAnnotation:function(d){d.coordinate=this.ba(d.coordinate);screenCoords=this.geoToScreenCoordinates(d.coordinate);var div=document.createElement('div');div.setAttribute('id',d.id);var img=document.createElement('img');$(img).addClassName("annotationIcon");d.element=div;d.parent=this;Event.observe(d.element,'click',d.ct.bindAsEventListener(d));Event.observe(d.element,'mouseover',d.cq.bindAsEventListener(d));Event.observe(d.element,'mouseout',d.cx.bindAsEventListener(d));Event.observe(d.element,'mouseup',d.cw.bindAsEventListener(d));Event.observe(d.element,'mousedown',d.co.bindAsEventListener(d));img.src=d.iconURL;div.style.position="absolute";div.style.left=screenCoords.x+d.xOffset+'px';div.style.top=screenCoords.y+d.yOffset+'px';d.x=screenCoords.x+d.xOffset;d.y=screenCoords.y+d.yOffset;div.appendChild(img);d.img=img;div.appendChild(img);this.aE.appendChild(d.element);d.element.style.zIndex=1;this.J.push(d);return d.id;},removeAnnotation:function(id){for(var i=0;i<this.J.length;i++){var d=this.J[i];if(d.id==id){this.aE.removeChild(d.element);this.J.splice(i,1);return;}}},removeAnnotationGroup:function(ed){var removed=0;do{removed=0;for(var i=0;i<this.J.length;i++){var d=this.J[i];if(d.group==ed){this.aE.removeChild(d.element);this.J.splice(i,1);removed=1;break;}}}while(removed==1);},getAnnotation:function(id){for(i=0;i<this.J.length;i++){var d=this.J[i];if(d.id==id){return d;}}},getAnnotations:function(){return this.J;},hasValue:function(bS){return(typeof bS!="undefined")&&bS!=null&&(typeof bS=="string"?bS!="":true);},showAnnotationPopup:function(d){if((this.cb&&this.bG!=WAAnnotationOpenBehaviour.Disable)&&(this.hasValue(d.title)||this.hasValue(d.description))){this.aJ.innerHTML=d.title+'<p>'+d.description+'</p>';var bh=0;var bi=0;if(d.x>this.G-250){bh= -275;}else{bh=25;}if(d.y<150){bi=0;}else{bi= -150;}this.aJ.style.top=d.y+bi+'px';this.aJ.style.left=d.x+bh+'px';this.dg=d.x+bh;this.df=d.y+bi;if(this.bG==WAAnnotationOpenBehaviour.Hover){this.popupTimerId=setTimeout((function(){$(this.k+'annotation_popup').style.display='block';$(this.k).fire("map:annotationOpened",{'annotation':d,'element':this.aJ});}).bind(this),700);}else{this.aJ.style.display="block";$(this.k).fire("map:annotationOpened",{'annotation':d,'element':this.aJ});}}},hideAnnotationPopup:function(d){clearTimeout(this.popupTimerId);$(this.k+'annotation_popup').style.display='none';},addLayer:function(bN){this.F.push(bN);if(this.dq==true){this.aD();this.az(true);if(bN.type=="wmsoverlay")this.cJ();}return bN.id;},removeLayer:function(ef){for(var i=0;i<this.F.length;i++){if(this.F[i].id==ef){this.F.splice(i,1);return;}}},showLayer:function(id,zindex){for(var i=0;i<this.F.length;i++){if(this.F[i].id==id){if(zindex){this.F[i].zindex=zindex;}if(this.F[i].visible==false){this.F[i].visible=true;this.aD();this.az(true);}}}},hideLayer:function(id){for(var i=0;i<this.F.length;i++){if(this.F[i].id==id)if(this.F[i].visible==true){this.F[i].visible=false;this.aD();this.az(true);}}this.cj();},getLayers:function(){return this.F;},dJ:function(Q){for(i=0;i<this.J.length;i++){var d=this.J[i];d.x=d.x+Q.x;d.y=d.y+Q.y;}},db:function(){for(var i=0;i<this.J.length;i++){d=this.J[i];if(d.upperbound<this.o||d.lowerbound>this.o){d.element.style.display='none';}else{d.element.style.display='block';}screenCoords=this.geoToScreenCoordinates(d.coordinate);d.x=screenCoords.x+d.xOffset;d.y=screenCoords.y+d.yOffset;d.element.style.left=d.x+'px';d.element.style.top=d.y+'px';}},refreshAnnotations:function(){for(var i=0;i<this.J.length;i++){d=this.J[i];if(d.upperbound<this.o||d.lowerbound>this.o){d.element.style.display='none';}else{d.element.style.display='block';}screenCoords=this.geoToScreenCoordinates(d.coordinate);d.x=screenCoords.x+d.xOffset;d.y=screenCoords.y+d.yOffset;d.element.style.left=d.x+'px';d.element.style.top=d.y+'px';}},eI:function(annotation){d=annotation;if(d.upperbound<this.o||d.lowerbound>this.o){d.element.style.display='none';}else{d.element.style.display='block';}screenCoords=this.geoToScreenCoordinates(d.coordinate);d.x=screenCoords.x+d.xOffset;d.y=screenCoords.y+d.yOffset;d.element.style.left=d.x+'px';d.element.style.top=d.y+'px';},clearAnnotations:function(){for(var i=0;i<this.J.length;i++){var d=this.J[i];this.aE.removeChild(d.element);}this.J=[];},loadGeoRSS:function(url){if(document.implementation&&document.implementation.createDocument){xmlDoc=document.implementation.createDocument("","",null);xmlDoc.async="false";xmlDoc.onload=this.addAnnotationsFromXML;}else if(document.documentElement&&typeof document.documentElement.style.maxHeight!="undefined"){var xmlIsland=document.getElementById("xmlI");xmlIsland.async=false;xmlIsland.load(url);xmlDoc=xmlIsland;this.addAnnotationsFromXML();return;}else if(window.ActiveXObject){xmlDoc=new ActiveXObject("Microsoft.XMLDOM");xmlDoc.async="false";xmlDoc.onreadystatechange=this.addAnnotationsFromXML;}else{alert('Your browser can\'t handle this script');return;}xmlDoc.load(url);},addAnnotationsFromXML:function(){var x=xmlDoc.getElementsByTagName('item');for(i=0;i<x.length;i++){var icon="media/icons/newsfire-icon.png";for(j=0;j<x[i].childNodes.length;j++){if(x[i].childNodes[j].nodeType!=1){continue;}if(x[i].childNodes[j].tagName=='title'){var title=x[i].childNodes[j].firstChild.nodeValue;}if(x[i].childNodes[j].tagName=='description'){var description=x[i].childNodes[j].firstChild.nodeValue;}if(x[i].childNodes[j].tagName=='icon'){icon=x[i].childNodes[j].firstChild.nodeValue;}if(x[i].childNodes[j].tagName=='geo:lat'){var geoLat=x[i].childNodes[j].firstChild.nodeValue;}if(x[i].childNodes[j].tagName=='geo:long'){var geoLon=x[i].childNodes[j].firstChild.nodeValue;}var coords={'y':Number(geoLon),'x':Number(geoLat)};var newCoords=map.decimalDegreesToUTM(coords);map.trackCoords=newCoords;}map.addAnnotation(new Annotation(newCoords,title,description,icon));}},disableZoom:function(){this.bI=true;},enableZoom:function(){this.bI=false;},animateZoomIn:function(){var tiles=this.F[0].tiles;for(var i=0;i<tiles.length;i++){tileCol=tiles[i];for(var j=0;j<tileCol.length;j++){var tile=tileCol[j];var qx=parseInt((tile.posx+128)/256);var qy=parseInt((tile.posy+128)/256);if(tile.element!=null){tile.element.style.width=parseInt(tile.element.style.width)+40+'px';tile.element.style.height=parseInt(tile.element.style.height)+40+'px';tile.element.style.left= -50+parseInt(tile.element.style.left)+qx*40+'px';tile.element.style.top= -50+parseInt(tile.element.style.top)+qy*40+'px';}}}if(this.zoomCounter==5){this.zoomCounter=0;clearInterval(this.zoomTimerId);map.zoomIn();return;}this.zoomCounter++;var self=this;},animateZoomOut:function(){var tiles=this.F[0].tiles;for(var i=0;i<tiles.length;i++){tileCol=tiles[i];for(var j=0;j<tileCol.length;j++){var tile=tileCol[j];var qx=parseInt((tile.posx+256)/256);var qy=parseInt((tile.posy+256)/256);if(tile.element!=null){tile.element.style.width=parseInt(tile.element.style.width)-40+'px';tile.element.style.height=parseInt(tile.element.style.height)-40+'px';tile.element.style.left=50+parseInt(tile.element.style.left)-qx*40+'px';tile.element.style.top=50+parseInt(tile.element.style.top)-qy*40+'px';}}}if(this.zoomCounter==5){this.zoomCounter=0;clearInterval(this.zoomTimerId);map.zoomOut();return;}this.zoomCounter++;var self=this;},zoomIn:function(ac){if(this.o>this.bL){this.aD();if(!this.O){this.O=new Coordinate(this.A.left+(this.m*(this.G/2)),this.A.top-(this.m*(this.D/2)),this.ad);}if(ac){ac=this.ba(ac);this.O=ac;}this.ao=0;this.ap=0;this.o=this.o-1;this.m=AJAXMAP.ZOOMLEVELS[this.o]/256;var as=this.aC(this.O);this.at=as.x;this.av=as.y;this.ab=this.at;this.U=this.av;this.az(false);this.bx(this.O);$(this.k).fire("map:zoomedIn",{'boundingBox':this.A});$(this.k).fire("map:zoomed",{"zoomLevel":this.getZoomLevel()});}},zoomOut:function(ac){if(this.o<this.bv){this.aD();if(!this.O){this.O=new Coordinate(this.A.left+(this.m*(this.G/2)),this.A.top-(this.m*(this.D/2)),this.ad);}if(ac){ac=this.ba(ac);this.O=ac;}this.ao=0;this.ap=0;this.o=parseInt(this.o)+1;this.m=AJAXMAP.ZOOMLEVELS[this.o]/256;var as=this.aC(this.O);this.at=as.x;this.av=as.y;this.ab=this.at;this.U=this.av;this.az(false);this.bx(this.O);$(this.k).fire("map:zoomedOut",{'boundingBox':this.A});$(this.k).fire("map:zoomed",{"zoomLevel":this.getZoomLevel()});}},mouseZoomIn:function(){if(this.o>this.bL){this.aD();if(!this.O&& !this.bg){this.O=new Coordinate(this.A.left+(this.m*(this.G/2)),this.A.top-(this.m*(this.D/2)),this.ad);}if(this.bg){this.O=new Coordinate(this.aj.x,this.aj.y,this.ad);}this.ao=0;this.ap=0;this.o=this.o-1;this.m=AJAXMAP.ZOOMLEVELS[this.o]/256;var as=this.aC(this.O);this.at=as.x;this.av=as.y;this.ab=this.at;this.U=this.av;this.az(false);this.bx(this.O,this.bg);$(this.k).fire("map:zoomedIn",{'boundingBox':this.A});$(this.k).fire("map:zoomed",{"zoomLevel":this.getZoomLevel()});}},mouseZoomOut:function(){if(this.o<this.bv){this.aD();if(!this.O&& !this.bg){this.O=new Coordinate(this.A.left+(this.m*(this.G/2)),this.A.top-(this.m*(this.D/2)),this.ad);}if(this.bg){this.O=new Coordinate(this.aj.x,this.aj.y,this.ad);}this.ao=0;this.ap=0;this.o=parseInt(this.o)+1;this.m=AJAXMAP.ZOOMLEVELS[this.o]/256;var as=this.aC(this.O);this.at=as.x;this.av=as.y;this.ab=this.at;this.U=this.av;this.az(false);this.bx(this.O,this.bg);$(this.k).fire("map:zoomedOut",{'boundingBox':this.A});$(this.k).fire("map:zoomed",{"zoomLevel":this.getZoomLevel()});}},zoom:function(level,ac){if(level<this.bv&&level>=this.bL){this.aD();if(!this.O){this.O=new Coordinate(this.A.left+(this.m*(this.G/2)),this.A.top-(this.m*(this.D/2)),this.ad);}if(ac){ac=this.ba(ac);this.O=ac;}this.ao=0;this.ap=0;this.o=level;this.m=AJAXMAP.ZOOMLEVELS[this.o]/256;var as=this.aC(this.O);this.at=as.x;this.av=as.y;this.ab=this.at;this.U=this.av;this.az(false);this.bx(this.O,false);$(this.k).fire("map:zoomed",{"zoomLevel":this.getZoomLevel()});}},centerAndZoom:function(bY,level){if(level==this.o)this.centerOnCoords(bY,false);else this.zoom(level,bY);},zoomOnBoundingBox:function(P,center,cV){var dY=P.x2-P.x1;var dU=P.y2-P.y1;var ec=this.G/2;var ee=this.D/2;var be=new Coordinate(P.x1+(dY/2),P.y1+(dU/2),this.ad);for(var i=0;i<this.bv;i++){var dE=AJAXMAP.ZOOMLEVELS[i];var cS=dE/256;var dO=be.x+(ec*cS);var dB=be.y+(ee*cS);if(dO>P.x2&&dB>P.y2){if(this.o==i&& !center){return{'zoom':i,'coordinate':be};}if(!cV&&this.o>=0){this.zoom(i,be);}return{'zoom':i,'coordinate':be};}}if(!cV){this.zoom(i,be);}return{'zoom':i,'coordinate':be};},zoomOnAnnotations:function(){if(this.J.length==0){return;}var x1=this.J[0].coordinate.x;var y1=this.J[0].coordinate.y;var x2=this.J[0].coordinate.x;var y2=this.J[0].coordinate.y;for(i=0;i<this.J.length;i++){if(this.J[i].coordinate.x>x2){x2=this.J[i].coordinate.x;}if(this.J[i].coordinate.x<x1){x1=this.J[i].coordinate.x;}if(this.J[i].coordinate.y>y2){y2=this.J[i].coordinate.y;}if(this.J[i].coordinate.y<y1){y1=this.J[i].coordinate.y;}}this.zoomOnBoundingBox({'x1':x1,'y1':y1,'x2':x2,'y2':y2},true);},eg:function(){this.aO.style.position="absolute";this.aO.style.zIndex=10;this.aO.style.overflow="hidden";var bK=document.getElementById(this.k);var f=document.createElement('div');var aq=this.k+'tilelayer';f.innerHTML='<!-- -->';f.setAttribute('id',aq);this.aO.appendChild(f);f.style.position="absolute";f.style.top="0px";f.style.left="0px";f.style.width="100%";f.style.height="100%";f.style.overflow="hidden";this.bk=f;var bK=document.getElementById(this.k);var f=document.createElement('div');var aq=this.k+'staticdrawlayer';f.innerHTML='<!-- -->';f.setAttribute('id',aq);f.style.position="absolute";f.style.top="0px";f.style.left="0px";f.style.width="100%";f.style.height="100%";f.style.zIndex=1000;this.aO.appendChild(f);this.cE=f;var bK=document.getElementById(this.k);var f=document.createElement('div');var aq=this.k+'drawlayer';f.innerHTML='<!-- -->';f.setAttribute('id',aq);f.style.position="absolute";f.style.top="0px";f.style.left="0px";f.style.width="100%";f.style.height="100%";f.style.zIndex=1000;this.aO.appendChild(f);this.bc=f;var bK=document.getElementById(this.k);var f=document.createElement('div');var aq=this.k+'mouselayer';f.innerHTML='<!-- -->';f.setAttribute('id',aq);f.style.position="absolute";f.style.top="0px";f.style.left="0px";f.style.width="100%";f.style.height="100%";f.style.zIndex=1000;f.style.overflow="hidden";this.aO.appendChild(f);this.aE=f;var bK=document.getElementById(this.k);var f=document.createElement('div');var aq=this.k+'zoomBox';f.innerHTML='<!-- -->';f.setAttribute('id',aq);this.aE.appendChild(f);f.style.position="absolute";f.style.border="solid 1px";f.style.width="0px";f.style.height="0px";f.style.top="0px";f.style.left="10px";f.style.display='none';f.style.zIndex=2;this.T=f;var f=document.createElement('div');var aq=this.k+'surface';f.innerHTML='<!-- -->';f.setAttribute('id',aq);f.style.position="absolute";f.style.top="0px";f.style.left="0px";f.style.width="100%";f.style.height="100%";f.style.zIndex=0;f.style.background="url(media/interface/default/blank_1px.gif)";this.aE.appendChild(f);this.bV=f;var bK=document.getElementById(this.k);var f=document.createElement('div');var aq=this.k+'annotation_popup';f.innerHTML='<!-- -->';f.setAttribute('id',aq);this.aE.appendChild(f);f.style.position="absolute";f.style.width="250px";f.style.height="150px";f.style.top="29px";f.style.left="130px";f.style.display='none';f.style.padding='10px';f.style.zIndex=1000;f.style.backgroundColor='white';f.style.border='solid 1px';this.aJ=f;},dy:function(l){if(l.layer.lowerBound>this.o||l.layer.upperBound<this.o)return;var bO,bb;var bm=this.at+(l.xIndex*AJAXMAP.ZOOMLEVELS[this.o]);var bl=this.av-(l.yIndex*AJAXMAP.ZOOMLEVELS[this.o])-AJAXMAP.ZOOMLEVELS[this.o];if(l.layer.type=='webatlastile'){bO=bb='http://ts'+l.host+'.webatlas.no/?x1='+bm+'&y1='+bl+'&z='+AJAXMAP.ZOOMLEVELS[this.o]+'&s='+this.aS+'&l=1';}if(l.layer.type=='osmtile'){c=new Coordinate(bm,bl);cC=this.UTMToLatLon(c);tilename=this.getOSMName(cC.y,cC.x,this.o);bO=bb='http://b.tile.openstreetmap.org/'+tilename+'.png';}else if(l.layer.type=='wms'){bO=bb=l.layer.wmsRequest.url+'?REQUEST=GetMap&SERVICE='+l.layer.wmsRequest.service+'&SRS='+l.layer.wmsRequest.srs+'&VERSION='+l.layer.wmsRequest.version+'&FORMAT='+l.layer.wmsRequest.format+'&LAYERS='+l.layer.wmsRequest.layers+'&STYLES='+l.layer.wmsRequest.styles+'&TRANSPARENT='+l.layer.wmsRequest.transparent+'&BGCOLOR='+l.layer.wmsRequest.bgColor+'&BBOX='+bm+','+bl+','+(bm+AJAXMAP.ZOOMLEVELS[this.o])+','+(bl+AJAXMAP.ZOOMLEVELS[this.o])+'&WIDTH=256&HEIGHT=256';}if(l.element!=null&&l.element.parentNode!=null&&l.element.relativeSrc!=bb){try{this.bk.removeChild(l.element);}catch(Error){}}var bj=this.am[bO];if(!bj){bj=this.am[bO]=this.cy(bb);}bj.onload=null;if(bj.image){bj.image.onload=null;}if(!bj.parentNode){l.element=this.bk.appendChild(bj);}if(l.element!=null){l.element.style.zIndex=l.layer.zIndex;}},eL:function(tile,forceBlankImage){var tileImgId,src;var useBlankImage=false;var bm=this.at+(tile.xIndex*AJAXMAP.ZOOMLEVELS[this.o]);var bl=this.av-(tile.yIndex*AJAXMAP.ZOOMLEVELS[this.o])-AJAXMAP.ZOOMLEVELS[this.o];if(tile.layer.type=='webatlastile'){tileImgId=src='http://ts'+tile.host+'.webatlas.no/?x1='+bm+'&y1='+bl+'&z='+AJAXMAP.ZOOMLEVELS[this.o]+'&s='+this.aS+'&l=1';}if(tile.element!=null&&tile.element.parentNode!=null&&tile.element.relativeSrc!=src){this.bk.removeChild(tile.element);}var tileImg=this.am[tileImgId];if(!tileImg){tileImg=this.am[tileImgId]=this.cy(src);}var loadingImgId='loading:'+bm+':'+bl;var loadingImg=this.am[loadingImgId];if(!loadingImg){loadingImg=this.am[loadingImgId]=this.cy(this.am['loading'].src);}loadingImg.targetSrc=tileImgId;var well=this.bk;tile.element=well.appendChild(loadingImg);tileImg.onload=function(){if(loadingImg.parentNode&&loadingImg.targetSrc==tileImgId){tileImg.style.top=loadingImg.style.top;tileImg.style.left=loadingImg.style.left;well.replaceChild(tileImg,loadingImg);tile.element=tileImg;}tileImg.onload=null;return false;};if(tile.element!=null){tile.element.style.zIndex=tile.layer.zIndex-1000;}},toggleMapStyle:function(){if(this.aS==0){this.aS=1;}else{this.aS=0;}this.cj();this.bd({'x':0,'y':0});},cy:function(bb){var ai=document.createElement('img');ai.src=bb;ai.alt="Loading Tile...";ai.relativeSrc=bb;ai.className='tile';ai.style.width=this.ar+'px';ai.style.height=this.ar+'px';ai.style.top="-256px";ai.style.left="-256px";ai.style.position='absolute';return ai;},aD:function(){this.hideAnnotationPopup();this.et=null;for(ei in this.am){var ai=this.am[ei];ai.onload=null;ai.src='media/interface/blank.png';if(ai.image){ai.image.onload=null;}if(ai.parentNode!=null){this.bk.removeChild(ai);}}this.am={};this.am['blank']=new Image();this.am['loading']=this.am['blank'];},release:function(ae,cr){if(!(ae.x+ae.y)==0){this.bc.style.top=0+"px";this.bc.style.left=0+"px";this.ao+=ae.x;this.ap+=ae.y;this.dJ(ae);this.ak={'x':0,'y':0};this.ab-=ae.x*this.m;this.U=this.U+ae.y*this.m;var cu=this.U-this.D*this.m;var cs=this.ab+this.G*this.m;this.A={'bottom':cu,'left':this.ab,'top':this.U,'right':cs};this.aj=new Coordinate(this.v.x*this.m+this.ab,-(this.v.y*this.m-this.U),this.ad);if(!cr){$(this.k).fire("map:moved",{'mouseMapCoords':this.aj,'mouseCoords':this.v,'boundingBox':this.A,'move':ae});$(this.k).fire("map:dragEnd",{'mouseMapCoords':this.aj,'mouseCoords':this.v,'boundingBox':this.A});this.cg=false;}this.updateWMSLayers();this.dS();}this.cv=false;this.bV.style.zIndex='0';},updateBB:function(){var cu=this.U-this.D*this.m;var cs=this.ab+this.G*this.m;this.A={'bottom':cu,'left':this.ab,'top':this.U,'right':cs};},dS:function(){if(this.ds==true){var ai=document.createElement('img');ai.src="http://services.webatlas.no/weblog/Log2.aspx?"+"WMS-REQUEST=BBOX="+this.A.left+","+this.A.bottom+","+this.A.right+","+this.A.top+"&MAPSTYLE="+this.aS+"&ZOOMLEVEL="+AJAXMAP.ZOOMLEVELS[this.o]+"&PROVIDER="+this.bE+"&CUSTOMER="+this.bE+"&SERVER=ts1";ai=null;}},disableLogging:function(){this.ds=false;},getOSMName:function(cF,dR,bt){var dF=parseInt(Math.floor((dR+180)/360*(Math.pow(2,bt))));var dK=parseInt(Math.floor((1-Math.log(Math.tan(cF*Math.PI/180)+1/Math.cos(cF*Math.PI/180))/Math.PI)/2*(Math.pow(2,bt))));return(""+bt+"/"+dF+"/"+dK);},addWMSLayer:function(aM,dw,cL){if(aM.id==null){aM.id=this.aA.length;}dZ=dw?dw:0;dI=cL?cL:99;aM.lb=dZ;aM.ub=dI;for(var i=0;i<this.aA.length;i++){if(aM.id==this.aA[i].id){this.aA[i]=aM;this.updateWMSLayers();return aM.id;}}this.aA.push(aM);this.updateWMSLayers();return aM.id;},removeWMSLayer:function(eb){for(var i=0;i<this.aA.length;i++){if(eb==this.aA[i].id){this.aA.splice(i,1);this.updateWMSLayers();return;}}},updateWMSLayers:function(){var tilelayer=this.bc;for(var i=0;i<this.bo.length;i++){tilelayer.removeChild(this.bo[i]);}this.bo=[];for(var i=0;i<this.aA.length;i++){var req=this.aA[i];if(req.lb<=this.o&&req.ub>=this.o){var img=document.createElement('img');var url=req.url;var ck=$H({"REQUEST":"GetMap","SERVICE":req.service,"VERSION":req.version,"SRS":this.ad,"FORMAT":req.format,"LAYERS":req.layers,"TRANSPARENT":"true","STYLES":req.styles,"WIDTH":this.G,"HEIGHT":this.D,"BBOX":[this.A.left,this.A.bottom,this.A.right,this.A.top].join(',')});var bf="";if(url.indexOf("?")== -1){bf="?";}else if(!(url.endsWith("?")||url.endsWith("&"))){bf="&";}url=url+bf+ck.toQueryString();img.src=url;img.alt="Loading custom layer...";img.relativeSrc=this.aA[i].serverURL;img.className='overlay';img.style.position='absolute';img.style.top=0+'px';img.style.left=0+'px';tilelayer.appendChild(img);this.bo.push(img)}}this.cJ();},cJ:function(){var tilelayer=this.bk;for(var i=0;i<this.bs.length;i++){tilelayer.removeChild(this.bs[i]);}this.bs=[];for(var i=0;i<this.F.length;i++){if(this.F[i].type=='wmsoverlay'){var req=this.F[i].wmsRequest;var img=document.createElement('img');var url=req.url;var ck=$H({"REQUEST":"GetMap","SERVICE":req.service,"VERSION":req.version,"SRS":this.ad,"FORMAT":req.format,"LAYERS":req.layers,"TRANSPARENT":"true","STYLES":req.styles,"WIDTH":this.G,"HEIGHT":this.D,"BBOX":[this.A.left,this.A.bottom,this.A.right,this.A.top].join(',')});var bf="";if(url.indexOf("?")== -1){bf="?";}else if(!(url.endsWith("?")||url.endsWith("&"))){bf="&";}url=url+bf+ck.toQueryString();img.src=url;img.alt="Loading custom layer...";img.className='overlay';img.style.position='absolute';img.style.top=0+'px';img.style.left=0+'px';img.style.zIndex=this.F[i].zIndex;tilelayer.appendChild(img);this.bs.push(img)}}},getDistancelatlon:function(P){var cN=0.0;var R=6371;for(var i=0;i<P.length-1;i++){var point1=P[i];var point2=P[i+1];point1=this.UTMToLatLon(point1);point2=this.UTMToLatLon(point2);var distance=Math.acos(Math.sin(point1.y*Math.PI/180)*Math.sin(point2.y*Math.PI/180)+Math.cos(point1.y*Math.PI/180)*Math.cos(point2.y*Math.PI/180)*Math.cos((point2.x-point1.x)*Math.PI/180))*R;cN+=distance;}return cN;},getHeight:function(){return this.D;},getWidth:function(){return this.G;},getDrawLayer:function(){return this.bc;},getMinZoom:function(){return this.bL;},setMinZoom:function(dV){this.bL=dV;},getMaxZoom:function(){return this.bv;},setMaxZoom:function(dX){this.bv=dX;},getStaticDrawLayer:function(){return this.cE;},getMouseLayer:function(){return this.aE;},getMapContainer:function(){return this.k;},getTrackCoords:function(){tmpcoord=this.trackCoords;this.trackCoords=null;return tmpcoord;},getCenterCoordinate:function(){return new Coordinate(this.A.left+(this.m*(this.G/2)),this.A.top-(this.m*(this.D/2)),this.ad);},getBoundingBox:function(){return this.A;},setEPSG:function(epsg){this.cY=epsg;},getEPSG:function(){return this.cY;},setMapStyle:function(eE){this.aS=eE;this.cj();this.bd({'x':0,'y':0});},disableAnnotationInfo:function(){this.cb=false;},setAnnotationPopupBehaviour:function(dn,cO){this.bG=dn;if(dn!=WAAnnotationOpenBehaviour.Disable){this.cb=true;}if(typeof cO!="undefined")this.cD=cO;},enableAnnotationInfo:function(){this.cb=true;},getMapStyle:function(){return this.aS;},getCurrentMouseCoords:function(){return this.v;},getMouseDownCoords:function(){return this.M;},getMouseDownMapCoords:function(){return this.dp;},getMouseMapCoords:function(){return this.aj;},setMouseZoom:function(dD){this.bg=dD;},allowMouseNavigation:function(){this.bw=true;},disallowMouseNavigation:function(){this.bw=false;},getZoomLevel:function(){return this.o;},bX:function(bF){bP=bF.offsetTop;aF=bF.offsetParent;while(aF!=null){bP+=aF.offsetTop;if(aF!=null){aF=aF.offsetParent;}}return bP;},ca:function(bF){bP=bF.offsetLeft;aF=bF.offsetParent;while(aF!=null){bP+=aF.offsetLeft;aF=aF.offsetParent;}return bP;},dc:function(I){if(I.which==null){cI=(I.button<2)?"LEFT":((I.button==4)?"MIDDLE":"RIGHT");}else{cI=(I.which<2)?"LEFT":((I.which==2)?"MIDDLE":"RIGHT");}return cI;},ba:function(ac){return ac.transform(this.ad);},geoToScreenCoordinates:function(ae){ae=this.ba(ae);var cR=256/AJAXMAP.ZOOMLEVELS[this.o];var ao=(ae.x-this.ab)*cR;var ap=(this.U-ae.y)*cR;return{'x':ao,'y':ap};},getPixelLatLon:function(pixel){var coordsperpixel=AJAXMAP.ZOOMLEVELS[this.o]/256;utm={'x':(this.A.left+(pixel.x*coordsperpixel)),'y':(this.A.top-(pixel.y*coordsperpixel))};latLon=this.UTMToLatLon(new Coordinate(utm.x,utm.y));return latLon;},decimalDegreesToUTM:function(ae){return ae.toUTM(ae.x,ae.y,ae.epsgToZone(this.ad));},UTMToLatLon:function(ce){return ce.fromUTM(ce.x,ce.y,ce.epsgToZone(this.ad));},getDistance:function(points){var t=0.0;for(var i=0;i<points.length-1;i++){var point1=points[i];var point2=points[i+1];var distance=Math.sqrt((point2.x-point1.x)*(point2.x-point1.x)+(point1.y-point2.y)*(point1.y-point2.y));t+=distance;}return this.cn(t,0);},getCircuit:function(points){var t=0.0;if(points.length>2){for(var i=0;i<points.length-1;i++){var point1=points[i];var point2=points[i+1];var distance=Math.sqrt((point2.x-point1.x)*(point2.x-point1.x)+(point1.y-point2.y)*(point1.y-point2.y));t+=distance;}}if(points.length>2){var distance=Math.sqrt((points[points.length-1].x-points[0].x)*(points[points.length-1].x-points[0].x)+(points[0].y-points[points.length-1].y)*(points[0].y-points[points.length-1].y));t+=distance;}return this.cn(t,0);},getArea:function(points){var t=0.0;if(points.length>2){var numPoints=points.length;t=(points[points.length-1].x*points[0].y)-(points[0].x*points[points.length-1].y);for(var i=0;i<numPoints-1;i++){t=t+(points[i].x*points[i+1].y)-(points[i+1].x*points[i].y);}t=t/2;}if(t<0){t= -t;}return this.cn(t,0);},aC:function(ae){var er=parseInt(ae.x/AJAXMAP.ZOOMLEVELS[this.o]);var es=parseInt(ae.y/AJAXMAP.ZOOMLEVELS[this.o]);var dW=AJAXMAP.ZOOMLEVELS[this.o]*er;var dT=AJAXMAP.ZOOMLEVELS[this.o]*es;return new Coordinate(dW,dT,ae.srs);},cn:function(Num,Places){if(Places>0){if((Num.toString().length-Num.toString().lastIndexOf('.'))>(Places+1)){var Rounder=Math.pow(10,Places);return Math.round(Num*Rounder)/Rounder;}else return Num;}else return Math.round(Num);},dh:function(I){var bp=0;if(!I){I=window.event;}if(I.wheelDelta){bp=I.wheelDelta/120;}else if(I.detail){bp= -I.detail/3;}if(bp){this.ea(bp);}if(I.preventDefault){I.preventDefault();}I.returnValue=false;},ea:function(bp){if(!this.bI){if(bp<0){if(this.bw)this.mouseZoomOut();}else{if(this.bw)this.mouseZoomIn();}}}};function Annotation(ae,cQ,cP,cB,bh,bi,de,cK,cU){this.parent=null;this.id= ++annotationStatic.annotationCount;this.coordinate=ae;this.title=cQ?cQ:"";this.description=cP?cP:"";this.lowerbound=de?de:0;this.upperbound=cK?cK:99;this.xOffset=bh?parseInt(bh):0;this.yOffset=bi?parseInt(bi):0;this.group=cU?cU:0;this.x=0;this.y=0;this.img=null;this.iconURL=cB?cB:'http://www.webatlas.no/webatlasapi/v/071009/media/interface/default/markers/flag_blue.gif';this.element=null;};var annotationStatic={'annotationCount':0};Annotation.prototype={ct:function(I){if(this.parent.bG==WAAnnotationOpenBehaviour.Click){this.parent.showAnnotationPopup(this);}$(this.element).fire("annotation:mouseClicked",{'annotation':this});},cw:function(I){$(this.element).fire("annotation:mouseUp",{'annotation':this,'mouseMapCoords':this.parent.aj,'mouseCoords':this.parent.v});},co:function(I){$(this.element).fire("annotation:mouseDown",{'annotation':this,'mouseMapCoords':this.parent.aj,'mouseCoords':this.parent.v});},cx:function(I){$(this.element).fire("annotation:mouseOut",{'annotation':this});if(this.parent.cD==WAAnnotationCloseBehaviour.IconMouseOut){this.parent.hideAnnotationPopup();}},cq:function(I){$(this.element).fire("annotation:mouseIn",{'annotation':this});if(this.parent.bG==WAAnnotationOpenBehaviour.Hover){this.parent.showAnnotationPopup(this);}}};var layerStatic={'layerCount':0};function Layer(an){this.id="layer_"+layerStatic.layerCount;++layerStatic.layerCount;this.type=an.type?an.type:'webatlastile';this.name=an.name?an.name:'';this.zIndex=an.zIndex?an.zIndex:0;this.wmsRequest=an.wmsrequest?an.wmsrequest:null;if(an.visible!='undefined'&&an.visible!=null)this.visible=an.visible;else this.visible=true;this.lowerBound=an.lowerBound?an.lowerBound:0;this.upperBound=an.upperBound?an.upperBound:99;};Layer.prototype={};function Coordinate(ao,ap,ad){this.x=ao;this.y=ap;this.srs=ad?ad:'EPSG:32633';};Coordinate.prototype={toUTM:function(x,y,zone){var du=parseFloat(x);var eh=parseFloat(y);var bq=Math.PI;var eH=bq/4;var bZ=bq/180;var cd=180.0/bq;var bu=6378137;var H=0.00669438;var bR=0.9996;var bC;var aY;var ci;var aZ;var bn;var ag;var bB;var dQ=(du+180)-parseInt((du+180)/360)*360-180;var ax=eh*bZ;var dP=dQ*bZ;var dz;var bM;bM=Math.abs(zone);bC=(bM-1)*6-180+3;dz=bC*bZ;aY=(H)/(1-H);ci=bu/Math.sqrt(1-H*Math.sin(ax)*Math.sin(ax));aZ=Math.tan(ax)*Math.tan(ax);bn=aY*Math.cos(ax)*Math.cos(ax);ag=Math.cos(ax)*(dP-dz);bB=bu*((1-H/4-3*H*H/64-5*H*H*H/256)*ax-(3*H/8+3*H*H/32+45*H*H*H/1024)*Math.sin(2*ax)+(15*H*H/256+45*H*H*H/1024)*Math.sin(4*ax)-(35*H*H*H/3072)*Math.sin(6*ax));var dN=(bR*ci*(ag+(1-aZ+bn)*ag*ag*ag/6+(5-18*aZ+aZ*aZ+72*bn-58*aY)*ag*ag*ag*ag*ag/120)+500000.0);var da=(bR*(bB+ci*Math.tan(ax)*(ag*ag/2+(5-aZ+9*bn+4*bn*bn)*ag*ag*ag*ag/24+(61-58*aZ+aZ*aZ+600*bn-330*aY)*ag*ag*ag*ag*ag*ag/720)));if(zone<0)da+=10000000.0;return new Coordinate(dN,da,zone>=0?"EPSG:326"+zone:"EPSG:327"+(-zone));},fromUTM:function(x,y,zone){var bq=Math.PI;var bZ=bq/180;var cd=180.0/bq;var bR=0.9996;var bu=6378137;var H=0.00669438;var aY=(H)/(1-H);var au=(1-Math.sqrt(1-H))/(1+Math.sqrt(1-H));var cf,aV,aB,dA,af,bB;var bC;var by,eC,aw;var bM=zone;var y0=0;if(bM<0){y0=10000000.0;}bC=(bM-1)*6-180+3;bB=(y-y0)/bR;by=bB/(bu*(1-H/4-3*H*H/64-5*H*H*H/256));aw=by+(3*au/2-27*au*au*au/32)*Math.sin(2*by)+(21*au*au/16-55*au*au*au*au/32)*Math.sin(4*by)+(151*au*au*au/96)*Math.sin(6*by);eC=aw*cd;cf=bu/Math.sqrt(1-H*Math.sin(aw)*Math.sin(aw));aV=Math.tan(aw)*Math.tan(aw);aB=aY*Math.cos(aw)*Math.cos(aw);dA=bu*(1-H)/Math.pow(1-H*Math.sin(aw)*Math.sin(aw),1.5);af=(x-500000.0)/(cf*bR);Lat=aw-(cf*Math.tan(aw)/dA)*(af*af/2-(5+3*aV+10*aB-4*aB*aB-9*aY)*af*af*af*af/24+(61+90*aV+298*aB+45*aV*aV-252*aY-3*aB*aB)*af*af*af*af*af*af/720);Lat=Lat*cd;Long=(af-(1+2*aV+aB)*af*af*af/6+(5-2*aB+28*aV-3*aB*aB+8*aY+24*aV*aV)*af*af*af*af*af/120)/Math.cos(aw);Long=bC+Long*cd;return new Coordinate(Long,Lat,"EPSG:4326");},epsgToZone:function(epsg_code){if(epsg_code.indexOf("EPSG:")==0){if(epsg_code.substr(5,3)=="326")return parseInt(epsg_code.substr(8,3));if(epsg_code.substr(5,3)=="327")return-parseInt(epsg_code.substr(8,3));}return 0;},transform:function(to_srs){if(this.srs==to_srs)return new Coordinate(this.x,this.y,this.srs);var from_zone=this.epsgToZone(this.srs);var to_zone=this.epsgToZone(to_srs);if(from_zone==0&&this.srs!="EPSG:4326")throw "Unknown cooddinate system: "+this.srs;if(to_zone==0&&to_srs!="EPSG:4326")throw "Unknown cooddinate system: "+to_srs;if(from_zone==0&&to_zone!=0)return this.toUTM(this.x,this.y,to_zone);if(from_zone!=0&&to_zone==0)return this.fromUTM(this.x,this.y,from_zone);if(from_zone!=0&&to_zone!=0){var geo=this.fromUTM(this.x,this.y,from_zone);return geo.toUTM(geo.x,geo.y,to_zone);}throw "Unable to transform between "+this.srs+" and "+to_srs;}};function Move(ao,ap){this.x=ao;this.y=ap;};Move.prototype={};function WMSRequest(ew,F,cZ,cH,cW,dm,cT,dj){this.id= ++WMSRequestStatic.WMSRequestCount;this.url=ew;this.layers=F;this.format=cZ?cZ:'image/png';this.service=cH?cH:'WMS';this.styles=cW?cW:'';this.version=dm?dm:'1.1';this.transparent=cT?cT:'true';this.bgColor=dj?dj:'0xFFFFFF';this.srs='EPSG:32633';};var WMSRequestStatic={'WMSRequestCount':0};WMSRequest.prototype={addLayer:function(bN){this.layers+=','+bN;}};function WAPICanvas(){var f=document.createElement('canvas');f.setAttribute('width',100);f.setAttribute('height',100);f.style.position="absolute";f.style.top="0px";f.style.left="0px";f.style.width="100%";f.style.height="100%";f.style.zIndex=1000;this.element=f;this.surface=null;this.lines=[];this.parent=null;this.B={'X':0,'Y':0};this.C={'X':200,'Y':200};this.useex=false;this.m_groups=new Hash();this.m_defaultGroupName="_default";Event.observe(document,'map:resized',this.redraw.bindAsEventListener(this));Event.observe(document,'map:moved',this.redraw.bindAsEventListener(this));Event.observe(document,'map:zoomed',this.redraw.bindAsEventListener(this));};WAPICanvas.prototype={addPolyLine:function(eF,aa){aa=this._parseOptions(aa);var aI=this.m_groups.get(aa.group);if(aI==null){aI=[];this.m_groups.set(aa.group,aI);}aI.push(eF);if(typeof!aa.supressRedraw=='undefined'|| !aa.supressRedraw)this.redraw();},redraw:function(){this.surface.clearRect(0,0,this.element.width,this.element.height);this.B={'X':0,'Y':0};this.C={'X':this.parent.getWidth(),'Y':this.parent.getHeight()};var cz=this.m_groups.values();for(var g=0;g<cz.length;g++){var aI=cz[g];for(var i=0;i<aI.length;i++){this.surface.beginPath();this.surface.strokeStyle=aI[i].rgba;this.surface.lineWidth=aI[i].lineWidth;this.surface.lineCap='round';var bA=[];for(var j=0;j<aI[i].coordinates.length;j++){var cc=this.parent.geoToScreenCoordinates(aI[i].coordinates[j]);bA.push(cc);}for(var j=0;j<bA.length;j++){if(j!=bA.length-1){var cc=bA[j];var dv=bA[j+1];var lineSegment={'Start':{'X':parseInt(cc.x),'Y':parseInt(cc.y)},'End':{'X':parseInt(dv.x),'Y':parseInt(dv.y)}};lineSegment.Dy=lineSegment.End.Y-lineSegment.Start.Y;lineSegment.Dx=lineSegment.End.X-lineSegment.Start.X;var intersects=true;var skipPoint=false;if(lineSegment.Start.X==lineSegment.End.X&&lineSegment.Start.Y==lineSegment.End.Y)skipPoint=true;if(skipPoint==false){if(this.surface.useex)intersects=this.clipLine(lineSegment);if(intersects==true){this.surface.moveTo(lineSegment.Start.X,lineSegment.Start.Y);this.surface.lineTo(lineSegment.End.X,lineSegment.End.Y);}}}}this.surface.stroke();}}},clear:function(aa){aa=this._parseOptions(aa);if(aa.group==this.m_defaultGroupName){this.m_groups=new Hash();}else this.m_groups.unset(aa.group);if(!aa.supressRedraw)this.redraw();},_parseOptions:function(aa){var bJ=false;var bU=this.m_defaultGroupName;var bT=typeof aa;if(bT!="undefined"){if(bT=="boolean"){bJ=aa;}else if(bT=="string"&&(aa=="true"||aa=="false")){bJ=aa=="true";}else if(bT=="string"){bU=aa;}else{var bD=aa.supressRedraw;bJ=typeof bD=="boolean"?bD:bJ;bD=aa.group;bU=typeof bD=="string"?bD:bU;}}return{supressRedraw:bJ,group:bU};},clipStartTop:function(line){line.Start.X+=line.Dx*(this.B.Y-line.Start.Y)/line.Dy;line.Start.Y=this.B.Y;},clipStartBottom:function(line){line.Start.X+=line.Dx*(this.C.Y-line.Start.Y)/line.Dy;line.Start.Y=this.C.Y;},clipStartRight:function(line){line.Start.Y+=line.Dy*(this.C.X-line.Start.X)/line.Dx;line.Start.X=this.C.X;},clipStartLeft:function(line){line.Start.Y+=line.Dy*(this.B.X-line.Start.X)/line.Dx;line.Start.X=this.B.X;},clipEndTop:function(line){line.End.X+=line.Dx*(this.B.Y-line.End.Y)/line.Dy;line.End.Y=this.B.Y;},clipEndBottom:function(line){line.End.X+=line.Dx*(this.C.Y-line.End.Y)/line.Dy;line.End.Y=this.C.Y;},clipEndRight:function(line){line.End.Y+=line.Dy*(this.C.X-line.End.X)/line.Dx;line.End.X=this.C.X;},clipEndLeft:function(line){line.End.Y+=line.Dy*(this.B.X-line.End.X)/line.Dx;line.End.X=this.B.X;},clipLine:function(line){var lineCode=0;if(line.End.Y<this.B.Y)lineCode+=8;else if(line.End.Y>this.C.Y)lineCode+=4;if(line.End.X>this.C.X)lineCode+=2;else if(line.End.X<this.B.X)lineCode+=1;if(line.Start.Y<this.B.Y)lineCode+=128;else if(line.Start.Y>this.C.Y)lineCode+=64;if(line.Start.X>this.C.X)lineCode+=32;else if(line.Start.X<this.B.X)lineCode+=16;switch(lineCode){case 0:return true;case 1:this.clipEndLeft(line);return true;case 2:this.clipEndRight(line);return true;case 4:this.clipEndBottom(line);return true;case 5:this.clipEndLeft(line);if(line.End.Y>this.C.Y)this.clipEndBottom(line);return true;case 6:this.clipEndRight(line);if(line.End.Y>this.C.Y)this.clipEndBottom(line);return true;case 8:this.clipEndTop(line);return true;case 9:this.clipEndLeft(line);if(line.End.Y<this.B.Y)this.clipEndTop(line);return true;case 10:this.clipEndRight(line);if(line.End.Y<this.B.Y)this.clipEndTop(line);return true;case 16:this.clipStartLeft(line);return true;case 18:this.clipStartLeft(line);this.clipEndRight(line);return true;case 20:this.clipStartLeft(line);if(line.Start.Y>this.C.Y)return false;this.clipEndBottom(line);return true;case 22:this.clipStartLeft(line);if(line.Start.Y>this.C.Y)return false;this.clipEndBottom(line);if(line.End.X>this.C.X)this.clipEndRight(line);return true;case 24:this.clipStartLeft(line);if(line.Start.Y<this.B.Y)return false;this.clipEndTop(line);return true;case 26:this.clipStartLeft(line);if(line.Start.Y<this.B.Y)return false;this.clipEndTop(line);if(line.End.X>this.C.X)this.clipEndRight(line);return true;case 32:this.clipStartRight(line);return true;case 33:this.clipStartRight(line);this.clipEndLeft(line);return true;case 36:this.clipStartRight(line);if(line.Start.Y>this.C.Y)return false;this.clipEndBottom(line);return true;case 37:this.clipStartRight(line);if(line.Start.Y>this.C.Y)return false;this.clipEndBottom(line);if(line.End.X<this.B.X)this.clipEndLeft(line);return true;case 40:this.clipStartRight(line);if(line.Start.Y<this.B.Y)return false;this.clipEndTop(line);return true;case 41:this.clipStartRight(line);if(line.Start.Y<this.B.Y)return false;this.clipEndTop(line);if(line.End.X<this.B.X)this.clipEndLeft(line);return true;case 64:this.clipStartBottom(line);return true;case 65:this.clipStartBottom(line);if(line.Start.X<this.B.X)return false;this.clipEndLeft(line);if(line.End.Y>this.C.Y)this.clipEndBottom(line);return true;case 66:this.clipStartBottom(line);if(line.Start.X>this.C.X)return false;this.clipEndRight(line);return true;case 72:this.clipStartBottom(line);this.clipEndTop(line);return true;case 73:this.clipStartBottom(line);if(line.Start.X<this.B.X)return false;this.clipEndLeft(line);if(line.End.Y<this.B.Y)this.clipEndTop(line);return true;case 74:this.clipStartBottom(line);if(line.Start.X>this.C.X)return false;this.clipEndRight(line);if(line.End.Y<this.B.Y)this.clipEndTop(line);return true;case 80:this.clipStartLeft(line);if(line.Start.Y>this.C.Y)this.clipStartBottom(line);return true;case 82:this.clipEndRight(line);if(line.End.Y>this.C.Y)return false;this.clipStartBottom(line);if(line.Start.X<this.B.X)this.clipStartLeft(line);return true;case 88:this.clipEndTop(line);if(line.End.X<this.B.X)return false;this.clipStartBottom(line);if(line.Start.X<this.B.X)this.clipStartLeft(line);return true;case 90:this.clipStartLeft(line);if(line.Start.Y<this.B.Y)return false;this.clipEndRight(line);if(line.End.Y>this.C.Y)return false;if(line.Start.Y>this.C.Y)this.clipStartBottom(line);if(line.End.Y<this.B.Y)this.clipEndTop(line);return true;case 96:this.clipStartRight(line);if(line.Start.Y>this.C.Y)this.clipStartBottom(line);return true;case 97:this.clipEndLeft(line);if(line.End.Y>this.C.Y)return false;this.clipStartBottom(line);if(line.Start.X>this.C.X)this.clipStartRight(line);return true;case 104:this.clipEndTop(line);if(line.End.X>this.C.X)return false;this.clipStartRight(line);if(line.Start.Y>this.C.Y)this.clipStartBottom(line);return true;case 105:this.clipEndLeft(line);if(line.End.Y>this.C.Y)return false;this.clipStartRight(line);if(line.Start.Y<this.B.Y)return false;if(line.End.Y<this.B.Y)this.clipEndTop(line);if(line.Start.Y>this.C.Y)this.clipStartBottom(line);return true;case 128:this.clipStartTop(line);return true;case 129:this.clipStartTop(line);if(line.Start.X<this.B.X)return false;this.clipEndLeft(line);return true;case 130:this.clipStartTop(line);if(line.Start.X>this.C.X)return false;this.clipEndRight(line);return true;case 132:this.clipStartTop(line);this.clipEndBottom(line);return true;case 133:this.clipStartTop(line);if(line.Start.X<this.B.X)return false;this.clipEndLeft(line);if(line.End.Y>this.C.Y)this.clipEndBottom(line);return true;case 134:this.clipStartTop(line);if(line.Start.X>this.C.X)return false;this.clipEndRight(line);if(line.End.Y>this.C.Y)this.clipEndBottom(line);return true;case 144:this.clipStartLeft(line);if(line.Start.Y<this.B.Y)this.clipStartTop(line);return true;case 146:this.clipEndRight(line);if(line.End.Y<this.B.Y)return false;this.clipStartTop(line);if(line.Start.X<this.B.X)this.clipStartLeft(line);return true;case 148:this.clipEndBottom(line);if(line.End.X<this.B.X)return false;this.clipStartLeft(line);if(line.Start.Y<this.B.Y)this.clipStartTop(line);return true;case 150:this.clipStartLeft(line);if(line.Start.Y>this.C.Y)return false;this.clipEndRight(line);if(line.End.Y<this.B.Y)return false;if(line.Start.Y<this.B.Y)this.clipStartTop(line);if(line.End.Y>this.C.Y)this.clipEndBottom(line);return true;case 160:this.clipStartRight(line);if(line.Start.Y<this.B.Y)this.clipStartTop(line);return true;case 161:this.clipEndLeft(line);if(line.End.Y<this.B.Y)return false;this.clipStartTop(line);if(line.Start.X>this.C.X)this.clipStartRight(line);return true;case 164:this.clipEndBottom(line);if(line.End.X>this.C.X)return false;this.clipStartRight(line);if(line.Start.Y<this.B.Y)this.clipStartTop(line);return true;case 165:this.clipEndLeft(line);if(line.End.Y<this.B.Y)return false;this.clipStartRight(line);if(line.Start.Y>this.C.Y)return false;if(line.End.Y>this.C.Y)this.clipEndBottom(line);if(line.Start.Y<this.B.Y)this.clipStartTop(line);return true;}return false;}};function PolyLine(P,aa){this.coordinates=P?P:[];if(aa){this.rgba=aa.rgba?aa.rgba:"rgba(0,0,0,1.0)";this.lineWidth=aa.lineWidth?aa.lineWidth:2;}else{this.rgba="rgba(0,0,0,1.0)";this.lineWidth=2;}};PolyLine.prototype={addPoint:function(bY){this.coordinates.push(bY);}};function GUI(ay){this.aL="http://www.webatlas.no/webatlasapi/v/latest/media/interface/default/";this.ay=ay?ay:'small';this.mapControl=null;this.element=document.createElement('div');divIdName='guibackground';this.element.style.position="absolute";this.element.style.left="16px";this.element.setAttribute('id',divIdName);Event.observe(this.element,'mouseup',this.cl.bindAsEventListener(this));Event.observe(this.element,'dblclick',this.cl.bindAsEventListener(this));Event.observe(this.element,'mousedown',this.cl.bindAsEventListener(this));var aX=document.createElement('div');aX.style.background="url("+this.aL+this.ay+"/east.jpg)";aX.style.position="absolute";aX.style.width="16px";aX.style.height="16px";aX.style.left="32px";aX.style.top="34px";aX.setAttribute('id','eastButton');this.element.appendChild(aX);Event.observe(aX,'click',this.eG.bindAsEventListener(this));var aK=document.createElement('div');aK.style.background="url("+this.aL+this.ay+"/west.jpg)";aK.style.position="absolute";aK.style.width="16px";aK.style.height="16px";aK.style.left="0px";aK.style.top="34px";aK.setAttribute('id','westButton');this.element.appendChild(aK);Event.observe(aK,'click',this.dL.bindAsEventListener(this));var aR=document.createElement('div');aR.style.background="url("+this.aL+this.ay+"/north.jpg)";aR.style.position="absolute";aR.style.width="16px";aR.style.height="16px";aR.style.left="16px";aR.style.top="17px";aR.setAttribute('id','northButton');this.element.appendChild(aR);Event.observe(aR,'click',this.ez.bindAsEventListener(this));var aP=document.createElement('div');aP.style.background="url("+this.aL+this.ay+"/south.jpg)";aP.style.position="absolute";aP.style.width="16px";aP.style.height="16px";aP.style.left="16px";aP.style.top="50px";aP.setAttribute('id','southButton');this.element.appendChild(aP);Event.observe(aP,'click',this.ep.bindAsEventListener(this));var aU=document.createElement('div');aU.style.background="url("+this.aL+this.ay+"/normal.jpg)";aU.style.position="absolute";aU.style.width="48px";aU.style.height="16px";aU.style.left="0px";aU.style.top="104px";aU.setAttribute('id','style_normalButton');this.element.appendChild(aU);Event.observe(aU,'click',this.el.bindAsEventListener(this));var aQ=document.createElement('div');aQ.style.background="url("+this.aL+this.ay+"/ortho.jpg)";aQ.style.position="absolute";aQ.style.width="48px";aQ.style.height="16px";aQ.style.left="0px";aQ.style.top="122px";aQ.setAttribute('id','style_orthoButton');this.element.appendChild(aQ);Event.observe(aQ,'click',this.en.bindAsEventListener(this));var aT=document.createElement('div');aT.style.background="url("+this.aL+this.ay+"/hybrid.jpg)";aT.style.position="absolute";aT.style.width="48px";aT.style.height="16px";aT.style.left="0px";aT.style.top="140px";aT.setAttribute('id','style_hybridButton');this.element.appendChild(aT);Event.observe(aT,'click',this.eo.bindAsEventListener(this));var aN=document.createElement('div');aN.style.background="url("+this.aL+this.ay+"/zoom_In.jpg)";aN.style.position="absolute";aN.style.width="16px";aN.style.height="16px";aN.style.left="16px";aN.style.top="68px";aN.setAttribute('id','zoomInButton');this.element.appendChild(aN);Event.observe(aN,'click',this.dH.bindAsEventListener(this));var aW=document.createElement('div');aW.style.background="url("+this.aL+this.ay+"/zoom_Out.jpg)";aW.style.position="absolute";aW.style.width="16px";aW.style.height="16px";aW.style.left="16px";aW.style.top="86px";aW.setAttribute('id','zoomOutButton');this.element.appendChild(aW);Event.observe(aW,'click',this.dM.bindAsEventListener(this));};GUI.prototype={ep:function(al){ak=new Move(0,parseInt(-this.mapControl.getHeight()/3));this.mapControl.move(ak);al.stop();},ez:function(al){ak=new Move(0,parseInt(this.mapControl.getHeight()/3));this.mapControl.move(ak);al.stop();},eG:function(al){ak=new Move(parseInt(-this.mapControl.getWidth()/3),0);this.mapControl.move(ak);al.stop();},dL:function(al){ak=new Move(parseInt(this.mapControl.getHeight()/3),0);this.mapControl.move(ak);al.stop();},el:function(al){this.mapControl.setMapStyle(0);al.stop();},en:function(al){this.mapControl.setMapStyle(1);al.stop();},eo:function(al){this.mapControl.setMapStyle(2);al.stop();},dH:function(al){this.mapControl.zoomIn();al.stop();},dM:function(al){this.mapControl.zoomOut();al.stop();},cl:function(al){al.stop();}};