var OpenLayers={singleFile:true};(function(){var a=typeof OpenLayers=="object"&&OpenLayers.singleFile;window.OpenLayers={_scriptName:!a?"lib/OpenLayers.js":"OpenLayers.js",_getScriptLocation:function(){for(var l="",m=new RegExp("(^|(.*?\\/))("+OpenLayers._scriptName+")(\\?|$)"),p=document.getElementsByTagName("script"),q=0,n=p.length;q<n;q++){var o=p[q].getAttribute("src");if(o){var r=o.match(m);if(r){l=r[1];break}}}return l}};if(!a){var b=new Array("OpenLayers/Util.js","OpenLayers/BaseTypes.js","OpenLayers/BaseTypes/Class.js","OpenLayers/BaseTypes/Bounds.js","OpenLayers/BaseTypes/Element.js","OpenLayers/BaseTypes/LonLat.js","OpenLayers/BaseTypes/Pixel.js","OpenLayers/BaseTypes/Size.js","OpenLayers/Console.js","OpenLayers/Tween.js","Rico/Corner.js","Rico/Color.js","OpenLayers/Ajax.js","OpenLayers/Events.js","OpenLayers/Request.js","OpenLayers/Request/XMLHttpRequest.js","OpenLayers/Projection.js","OpenLayers/Map.js","OpenLayers/Layer.js","OpenLayers/Icon.js","OpenLayers/Marker.js","OpenLayers/Marker/Box.js","OpenLayers/Popup.js","OpenLayers/Tile.js","OpenLayers/Tile/Image.js","OpenLayers/Tile/WFS.js","OpenLayers/Layer/Image.js","OpenLayers/Layer/SphericalMercator.js","OpenLayers/Layer/EventPane.js","OpenLayers/Layer/FixedZoomLevels.js","OpenLayers/Layer/Google.js","OpenLayers/Layer/VirtualEarth.js","OpenLayers/Layer/Yahoo.js","OpenLayers/Layer/HTTPRequest.js","OpenLayers/Layer/Grid.js","OpenLayers/Layer/MapGuide.js","OpenLayers/Layer/MapServer.js","OpenLayers/Layer/MapServer/Untiled.js","OpenLayers/Layer/KaMap.js","OpenLayers/Layer/KaMapCache.js","OpenLayers/Layer/MultiMap.js","OpenLayers/Layer/Markers.js","OpenLayers/Layer/Text.js","OpenLayers/Layer/WorldWind.js","OpenLayers/Layer/ArcGIS93Rest.js","OpenLayers/Layer/WMS.js","OpenLayers/Layer/WMS/Untiled.js","OpenLayers/Layer/ArcIMS.js","OpenLayers/Layer/GeoRSS.js","OpenLayers/Layer/Boxes.js","OpenLayers/Layer/XYZ.js","OpenLayers/Layer/TMS.js","OpenLayers/Layer/TileCache.js","OpenLayers/Popup/Anchored.js","OpenLayers/Popup/AnchoredBubble.js","OpenLayers/Popup/Framed.js","OpenLayers/Popup/FramedCloud.js","OpenLayers/Feature.js","OpenLayers/Feature/Vector.js","OpenLayers/Feature/WFS.js","OpenLayers/Handler.js","OpenLayers/Handler/Click.js","OpenLayers/Handler/Hover.js","OpenLayers/Handler/Point.js","OpenLayers/Handler/Path.js","OpenLayers/Handler/Polygon.js","OpenLayers/Handler/Feature.js","OpenLayers/Handler/Drag.js","OpenLayers/Handler/RegularPolygon.js","OpenLayers/Handler/Box.js","OpenLayers/Handler/MouseWheel.js","OpenLayers/Handler/Keyboard.js","OpenLayers/Control.js","OpenLayers/Control/Attribution.js","OpenLayers/Control/Button.js","OpenLayers/Control/ZoomBox.js","OpenLayers/Control/ZoomToMaxExtent.js","OpenLayers/Control/DragPan.js","OpenLayers/Control/Navigation.js","OpenLayers/Control/MouseDefaults.js","OpenLayers/Control/MousePosition.js","OpenLayers/Control/OverviewMap.js","OpenLayers/Control/KeyboardDefaults.js","OpenLayers/Control/PanZoom.js","OpenLayers/Control/PanZoomBar.js","OpenLayers/Control/ArgParser.js","OpenLayers/Control/Permalink.js","OpenLayers/Control/Scale.js","OpenLayers/Control/ScaleLine.js","OpenLayers/Control/Snapping.js","OpenLayers/Control/Split.js","OpenLayers/Control/LayerSwitcher.js","OpenLayers/Control/DrawFeature.js","OpenLayers/Control/DragFeature.js","OpenLayers/Control/ModifyFeature.js","OpenLayers/Control/Panel.js","OpenLayers/Control/SelectFeature.js","OpenLayers/Control/NavigationHistory.js","OpenLayers/Control/Measure.js","OpenLayers/Control/WMSGetFeatureInfo.js","OpenLayers/Geometry.js","OpenLayers/Geometry/Rectangle.js","OpenLayers/Geometry/Collection.js","OpenLayers/Geometry/Point.js","OpenLayers/Geometry/MultiPoint.js","OpenLayers/Geometry/Curve.js","OpenLayers/Geometry/LineString.js","OpenLayers/Geometry/LinearRing.js","OpenLayers/Geometry/Polygon.js","OpenLayers/Geometry/MultiLineString.js","OpenLayers/Geometry/MultiPolygon.js","OpenLayers/Geometry/Surface.js","OpenLayers/Renderer.js","OpenLayers/Renderer/Elements.js","OpenLayers/Renderer/SVG.js","OpenLayers/Renderer/Canvas.js","OpenLayers/Renderer/VML.js","OpenLayers/Layer/Vector.js","OpenLayers/Layer/Vector/RootContainer.js","OpenLayers/Strategy.js","OpenLayers/Strategy/Fixed.js","OpenLayers/Strategy/Cluster.js","OpenLayers/Strategy/Paging.js","OpenLayers/Strategy/BBOX.js","OpenLayers/Strategy/Save.js","OpenLayers/Protocol.js","OpenLayers/Protocol/HTTP.js","OpenLayers/Protocol/SQL.js","OpenLayers/Protocol/SQL/Gears.js","OpenLayers/Protocol/WFS.js","OpenLayers/Protocol/WFS/v1.js","OpenLayers/Protocol/WFS/v1_0_0.js","OpenLayers/Protocol/WFS/v1_1_0.js","OpenLayers/Layer/PointTrack.js","OpenLayers/Layer/GML.js","OpenLayers/Style.js","OpenLayers/StyleMap.js","OpenLayers/Rule.js","OpenLayers/Filter.js","OpenLayers/Filter/FeatureId.js","OpenLayers/Filter/Logical.js","OpenLayers/Filter/Comparison.js","OpenLayers/Filter/Spatial.js","OpenLayers/Format.js","OpenLayers/Format/XML.js","OpenLayers/Format/ArcXML.js","OpenLayers/Format/ArcXML/Features.js","OpenLayers/Format/GML.js","OpenLayers/Format/GML/Base.js","OpenLayers/Format/GML/v2.js","OpenLayers/Format/GML/v3.js","OpenLayers/Format/KML.js","OpenLayers/Format/GeoRSS.js","OpenLayers/Format/WFS.js","OpenLayers/Format/WFSCapabilities.js","OpenLayers/Format/WFSCapabilities/v1.js","OpenLayers/Format/WFSCapabilities/v1_0_0.js","OpenLayers/Format/WFSCapabilities/v1_1_0.js","OpenLayers/Format/WFSDescribeFeatureType.js","OpenLayers/Format/WMSDescribeLayer.js","OpenLayers/Format/WMSDescribeLayer/v1_1.js","OpenLayers/Format/WKT.js","OpenLayers/Format/OSM.js","OpenLayers/Format/GPX.js","OpenLayers/Format/Filter.js","OpenLayers/Format/Filter/v1.js","OpenLayers/Format/Filter/v1_0_0.js","OpenLayers/Format/Filter/v1_1_0.js","OpenLayers/Format/SLD.js","OpenLayers/Format/SLD/v1.js","OpenLayers/Format/SLD/v1_0_0.js","OpenLayers/Format/SLD/v1.js","OpenLayers/Format/WFST.js","OpenLayers/Format/WFST/v1.js","OpenLayers/Format/WFST/v1_0_0.js","OpenLayers/Format/WFST/v1_1_0.js","OpenLayers/Format/Text.js","OpenLayers/Format/JSON.js","OpenLayers/Format/GeoJSON.js","OpenLayers/Format/WMC.js","OpenLayers/Format/WMC/v1.js","OpenLayers/Format/WMC/v1_0_0.js","OpenLayers/Format/WMC/v1_1_0.js","OpenLayers/Format/WMSCapabilities.js","OpenLayers/Format/WMSCapabilities/v1_1.js","OpenLayers/Format/WMSCapabilities/v1_1_0.js","OpenLayers/Format/WMSCapabilities/v1_1_1.js","OpenLayers/Format/WMSGetFeatureInfo.js","OpenLayers/Layer/WFS.js","OpenLayers/Control/GetFeature.js","OpenLayers/Control/MouseToolbar.js","OpenLayers/Control/NavToolbar.js","OpenLayers/Control/PanPanel.js","OpenLayers/Control/Pan.js","OpenLayers/Control/ZoomIn.js","OpenLayers/Control/ZoomOut.js","OpenLayers/Control/ZoomPanel.js","OpenLayers/Control/EditingToolbar.js","OpenLayers/Lang.js","OpenLayers/Lang/en.js"),c=navigator.userAgent,d=c.match("MSIE")||c.match("Safari");if(d)var e=new Array(b.length);for(var f=OpenLayers._getScriptLocation()+"lib/",g=0,h=b.length;g<h;g++)if(d)e[g]="<script src='"+f+b[g]+"'><\/script>";else{var j=document.createElement("script");j.src=f+b[g];var k=document.getElementsByTagName("head").length?document.getElementsByTagName("head")[0]:document.body;k.appendChild(j)}d&&document.write(e.join(""))}})();OpenLayers.VERSION_NUMBER="OpenLayers 2.8 -- $Revision: 9492 $";OpenLayers.String={startsWith:function(a,b){return a.indexOf(b)==0},contains:function(a,b){return a.indexOf(b)!=-1},trim:function(a){return a.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},camelize:function(a){for(var b=a.split("-"),c=b[0],d=1,e=b.length;d<e;d++){var f=b[d];c+=f.charAt(0).toUpperCase()+f.substring(1)}return c},format:function(a,b,c){b||(b=window);function d(e,f){for(var g,h=f.split(/\.+/),j=0;j<h.length;j++){if(j==0)g=b;g=g[h[j]]}if(typeof g=="function")g=c?g.apply(null,c):g();return typeof g=="undefined"?"undefined":g}return a.replace(OpenLayers.String.tokenRegEx,d)},tokenRegEx:/\$\{([\w.]+?)\}/g,numberRegEx:/^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/,isNumeric:function(a){return OpenLayers.String.numberRegEx.test(a)},numericIf:function(a){return OpenLayers.String.isNumeric(a)?parseFloat(a):a}};if(!String.prototype.startsWith)String.prototype.startsWith=function(a){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.String.startsWith"}));return OpenLayers.String.startsWith(this,a)};if(!String.prototype.contains)String.prototype.contains=function(a){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.String.contains"}));return OpenLayers.String.contains(this,a)};if(!String.prototype.trim)String.prototype.trim=function(){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.String.trim"}));return OpenLayers.String.trim(this)};if(!String.prototype.camelize)String.prototype.camelize=function(){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.String.camelize"}));return OpenLayers.String.camelize(this)};OpenLayers.Number={decimalSeparator:".",thousandsSeparator:",",limitSigDigs:function(a,b){var c=0;if(b>0)c=parseFloat(a.toPrecision(b));return c},format:function(a,b,c,d){b=typeof b!="undefined"?b:0;c=typeof c!="undefined"?c:OpenLayers.Number.thousandsSeparator;d=typeof d!="undefined"?d:OpenLayers.Number.decimalSeparator;if(b!=null)a=parseFloat(a.toFixed(b));var e=a.toString().split(".");if(e.length==1&&b==null)b=0;var f=e[0];if(c)for(var g=/(-?[0-9]+)([0-9]{3})/;g.test(f);)f=f.replace(g,"$1"+c+"$2");var h;if(b==0)h=f;else{var j=e.length>1?e[1]:"0";if(b!=null)j+=(new Array(b-j.length+1)).join("0");h=f+d+j}return h}};if(!Number.prototype.limitSigDigs)Number.prototype.limitSigDigs=function(a){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.Number.limitSigDigs"}));return OpenLayers.Number.limitSigDigs(this,a)};OpenLayers.Function={bind:function(a,b){var c=Array.prototype.slice.apply(arguments,[2]);return function(){var d=c.concat(Array.prototype.slice.apply(arguments,[0]));return a.apply(b,d)}},bindAsEventListener:function(a,b){return function(c){return a.call(b,c||window.event)}}};if(!Function.prototype.bind)Function.prototype.bind=function(){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.Function.bind"}));Array.prototype.unshift.apply(arguments,[this]);return OpenLayers.Function.bind.apply(null,arguments)};if(!Function.prototype.bindAsEventListener)Function.prototype.bindAsEventListener=function(a){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.Function.bindAsEventListener"}));return OpenLayers.Function.bindAsEventListener(this,a)};OpenLayers.Array={filter:function(a,b,c){var d=[];if(Array.prototype.filter)d=a.filter(b,c);else{var e=a.length;if(typeof b!="function")throw new TypeError;for(var f=0;f<e;f++)if(f in a){var g=a[f];b.call(c,g,f,a)&&d.push(g)}}return d}};OpenLayers.Class=function(){function a(){arguments&&arguments[0]!=OpenLayers.Class.isPrototype&&this.initialize.apply(this,arguments)}for(var b={},c,d,e=0,f=arguments.length;e<f;++e){if(typeof arguments[e]=="function"){if(e==0&&f>1){d=arguments[e].prototype.initialize;arguments[e].prototype.initialize=function(){};b=new arguments[e];if(d===undefined)delete arguments[e].prototype.initialize;else arguments[e].prototype.initialize=d}c=arguments[e].prototype}else c=arguments[e];OpenLayers.Util.extend(b,c)}a.prototype=b;return a};OpenLayers.Class.isPrototype=function(){};OpenLayers.Class.create=function(){return function(){arguments&&arguments[0]!=OpenLayers.Class.isPrototype&&this.initialize.apply(this,arguments)}};OpenLayers.Class.inherit=function(){for(var a=arguments[0],b=new a(OpenLayers.Class.isPrototype),c=1,d=arguments.length;c<d;c++){if(typeof arguments[c]=="function"){var e=arguments[c];arguments[c]=new e(OpenLayers.Class.isPrototype)}OpenLayers.Util.extend(b,arguments[c])}return b};OpenLayers.Util={};OpenLayers.Util.getElement=function(){for(var a=[],b=0,c=arguments.length;b<c;b++){var d=arguments[b];if(typeof d=="string")d=document.getElementById(d);if(arguments.length==1)return d;a.push(d)}return a};if(typeof window.$==="undefined")window.$=OpenLayers.Util.getElement;OpenLayers.Util.extend=function(a,b){a=a||{};if(b){for(var c in b){var d=b[c];if(d!==undefined)a[c]=d}var e=typeof window.Event=="function"&&b instanceof window.Event;if(!e&&b.hasOwnProperty&&b.hasOwnProperty("toString"))a.toString=b.toString}return a};OpenLayers.Util.removeItem=function(a,b){for(var c=a.length-1;c>=0;c--)a[c]==b&&a.splice(c,1);return a};OpenLayers.Util.clearArray=function(a){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"array = []"}));a.length=0};OpenLayers.Util.indexOf=function(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]==b)return c;return-1};OpenLayers.Util.modifyDOMElement=function(a,b,c,d,e,f,g,h){if(b)a.id=b;if(c){a.style.left=c.x+"px";a.style.top=c.y+"px"}if(d){a.style.width=d.w+"px";a.style.height=d.h+"px"}if(e)a.style.position=e;if(f)a.style.border=f;if(g)a.style.overflow=g;if(parseFloat(h)>=0&&parseFloat(h)<1){a.style.filter="alpha(opacity="+h*100+")";a.style.opacity=h}else if(parseFloat(h)==1){a.style.filter="";a.style.opacity=""}};OpenLayers.Util.createDiv=function(a,b,c,d,e,f,g,h){var j=document.createElement("div");if(d)j.style.backgroundImage="url("+d+")";a||(a=OpenLayers.Util.createUniqueID("OpenLayersDiv"));e||(e="absolute");OpenLayers.Util.modifyDOMElement(j,a,b,c,e,f,g,h);return j};OpenLayers.Util.createImage=function(a,b,c,d,e,f,g,h){var j=document.createElement("img");a||(a=OpenLayers.Util.createUniqueID("OpenLayersDiv"));e||(e="relative");OpenLayers.Util.modifyDOMElement(j,a,b,c,e,f,null,g);if(h){j.style.display="none";OpenLayers.Event.observe(j,"load",OpenLayers.Function.bind(OpenLayers.Util.onImageLoad,j));OpenLayers.Event.observe(j,"error",OpenLayers.Function.bind(OpenLayers.Util.onImageLoadError,j))}j.style.alt=a;j.galleryImg="no";if(d)j.src=d;return j};OpenLayers.Util.setOpacity=function(a,b){OpenLayers.Util.modifyDOMElement(a,null,null,null,null,null,null,b)};OpenLayers.Util.onImageLoad=function(){if(!this.viewRequestID||this.map&&this.viewRequestID==this.map.viewRequestID){this.style.backgroundColor="transparent";this.style.display=""}};OpenLayers.Util.onImageLoadErrorColor="pink";OpenLayers.IMAGE_RELOAD_ATTEMPTS=0;OpenLayers.Util.onImageLoadError=function(){this._attempts=this._attempts?this._attempts+1:1;if(this._attempts<=OpenLayers.IMAGE_RELOAD_ATTEMPTS){var a=this.urls;if(a&&a instanceof Array&&a.length>1){var b=this.src.toString(),c,d;for(d=0;c=a[d];d++)if(b.indexOf(c)!=-1)break;var e=Math.floor(a.length*Math.random()),f=a[e];for(d=0;f==c&&d++<4;){e=Math.floor(a.length*Math.random());f=a[e]}this.src=b.replace(c,f)}else this.src=this.src}else this.style.backgroundColor=OpenLayers.Util.onImageLoadErrorColor;this.style.display=""};OpenLayers.Util.alphaHackNeeded=null;OpenLayers.Util.alphaHack=function(){if(OpenLayers.Util.alphaHackNeeded==null){var a=navigator.appVersion.split("MSIE"),b=parseFloat(a[1]),c=false;try{c=!!document.body.filters}catch(d){}OpenLayers.Util.alphaHackNeeded=c&&b>=5.5&&b<7}return OpenLayers.Util.alphaHackNeeded};OpenLayers.Util.modifyAlphaImageDiv=function(a,b,c,d,e,f,g,h,j){OpenLayers.Util.modifyDOMElement(a,b,c,d,f,null,null,j);var k=a.childNodes[0];if(e)k.src=e;OpenLayers.Util.modifyDOMElement(k,a.id+"_innerImage",null,d,"relative",g);if(OpenLayers.Util.alphaHack()){if(a.style.display!="none")a.style.display="inline-block";if(h==null)h="scale";a.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+k.src+"', sizingMethod='"+h+"')";if(parseFloat(a.style.opacity)>=0&&parseFloat(a.style.opacity)<1)a.style.filter+=" alpha(opacity="+a.style.opacity*100+")";k.style.filter="alpha(opacity=0)"}};OpenLayers.Util.createAlphaImageDiv=function(a,b,c,d,e,f,g,h,j){var k=OpenLayers.Util.createDiv(),l=OpenLayers.Util.createImage(null,null,null,null,null,null,null,false);k.appendChild(l);if(j){l.style.display="none";OpenLayers.Event.observe(l,"load",OpenLayers.Function.bind(OpenLayers.Util.onImageLoad,k));OpenLayers.Event.observe(l,"error",OpenLayers.Function.bind(OpenLayers.Util.onImageLoadError,k))}OpenLayers.Util.modifyAlphaImageDiv(k,a,b,c,d,e,f,g,h);return k};OpenLayers.Util.upperCaseObject=function(a){var b={};for(var c in a)b[c.toUpperCase()]=a[c];return b};OpenLayers.Util.applyDefaults=function(a,b){a=a||{};var c=typeof window.Event=="function"&&b instanceof window.Event;for(var d in b)if(a[d]===undefined||!c&&b.hasOwnProperty&&b.hasOwnProperty(d)&&!a.hasOwnProperty(d))a[d]=b[d];if(!c&&b&&b.hasOwnProperty&&b.hasOwnProperty("toString")&&!a.hasOwnProperty("toString"))a.toString=b.toString;return a};OpenLayers.Util.getParameterString=function(a){var b=[];for(var c in a){var d=a[c];if(d!=null&&typeof d!="function"){var e;if(typeof d=="object"&&d.constructor==Array){for(var f=[],g=0,h=d.length;g<h;g++)f.push(encodeURIComponent(d[g]));e=f.join(",")}else e=encodeURIComponent(d);b.push(encodeURIComponent(c)+"="+e)}}return b.join("&")};OpenLayers.ImgPath="";OpenLayers.Util.getImagesLocation=function(){return OpenLayers.ImgPath||OpenLayers._getScriptLocation()+"img/"};OpenLayers.Util.Try=function(){for(var a=null,b=0,c=arguments.length;b<c;b++){var d=arguments[b];try{a=d();break}catch(e){}}return a};OpenLayers.Util.getNodes=function(a,b){var c=OpenLayers.Util.Try(function(){return OpenLayers.Util._getNodes(a.documentElement.childNodes,b)},function(){return OpenLayers.Util._getNodes(a.childNodes,b)});return c};OpenLayers.Util._getNodes=function(a,b){for(var c=[],d=0,e=a.length;d<e;d++)a[d].nodeName==b&&c.push(a[d]);return c};OpenLayers.Util.getTagText=function(a,b,c){var d=OpenLayers.Util.getNodes(a,b);if(d&&d.length>0){c||(c=0);if(d[c].childNodes.length>1)return d.childNodes[1].nodeValue;else if(d[c].childNodes.length==1)return d[c].firstChild.nodeValue}else return""};OpenLayers.Util.getXmlNodeValue=function(a){var b=null;OpenLayers.Util.Try(function(){b=a.text;if(!b)b=a.textContent;if(!b)b=a.firstChild.nodeValue},function(){b=a.textContent});return b};OpenLayers.Util.mouseLeft=function(a,b){for(var c=a.relatedTarget?a.relatedTarget:a.toElement;c!=b&&c!=null;)c=c.parentNode;return c!=b};OpenLayers.Util.DEFAULT_PRECISION=14;OpenLayers.Util.toFloat=function(a,b){if(b==null)b=OpenLayers.Util.DEFAULT_PRECISION;return a=b==0?parseFloat(a):parseFloat(parseFloat(a).toPrecision(b))};OpenLayers.Util.rad=function(a){return a*Math.PI/180};OpenLayers.Util.distVincenty=function(a,b){for(var c=6378137,d=6356752.3142,e=1/298.257223563,f=OpenLayers.Util.rad(b.lon-a.lon),g=Math.atan((1-e)*Math.tan(OpenLayers.Util.rad(a.lat))),h=Math.atan((1-e)*Math.tan(OpenLayers.Util.rad(b.lat))),j=Math.sin(g),k=Math.cos(g),l=Math.sin(h),m=Math.cos(h),p=f,q=2*Math.PI,n=20;Math.abs(p-q)>1.0E-12&&--n>0;){var o=Math.sin(p),r=Math.cos(p),s=Math.sqrt(m*o*m*o+(k*l-j*m*r)*(k*l-j*m*r));if(s==0)return 0;var t=j*l+k*m*r,z=Math.atan2(s,t),B=Math.asin(k*m*o/s),u=Math.cos(B)*Math.cos(B),w=t-2*j*l/u,A=e/16*u*(4+e*(4-3*u));q=p;p=f+(1-A)*e*Math.sin(B)*(z+A*s*(w+A*t*(-1+2*w*w)))}if(n==0)return NaN;var v=u*(c*c-d*d)/(d*d),D=1+v/16384*(4096+v*(-768+v*(320-175*v))),C=v/1024*(256+v*(-128+v*(74-47*v))),F=C*s*(w+C/4*(t*(-1+2*w*w)-C/6*w*(-3+4*s*s)*(-3+4*w*w))),E=d*D*(z-F),M=E.toFixed(3)/1E3;return M};OpenLayers.Util.getParameters=function(a){a=a||window.location.href;var b="";if(OpenLayers.String.contains(a,"?")){var c=a.indexOf("?")+1,d=OpenLayers.String.contains(a,"#")?a.indexOf("#"):a.length;b=a.substring(c,d)}for(var e={},f=b.split(/[&;]/),g=0,h=f.length;g<h;++g){var j=f[g].split("=");if(j[0]){var k=decodeURIComponent(j[0]),l=j[1]||"";l=l.split(",");for(var m=0,p=l.length;m<p;m++)l[m]=decodeURIComponent(l[m]);if(l.length==1)l=l[0];e[k]=l}}return e};OpenLayers.Util.getArgs=function(a){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.Util.getParameters"}));return OpenLayers.Util.getParameters(a)};OpenLayers.Util.lastSeqID=0;OpenLayers.Util.createUniqueID=function(a){if(a==null)a="id_";OpenLayers.Util.lastSeqID+=1;return a+OpenLayers.Util.lastSeqID};OpenLayers.INCHES_PER_UNIT={inches:1,ft:12,mi:63360,m:39.3701,km:39370.1,dd:4374754,yd:36};OpenLayers.INCHES_PER_UNIT["in"]=OpenLayers.INCHES_PER_UNIT.inches;OpenLayers.INCHES_PER_UNIT.degrees=OpenLayers.INCHES_PER_UNIT.dd;OpenLayers.INCHES_PER_UNIT.nmi=1852*OpenLayers.INCHES_PER_UNIT.m;OpenLayers.METERS_PER_INCH=0.0254000508001016;OpenLayers.Util.extend(OpenLayers.INCHES_PER_UNIT,{Inch:OpenLayers.INCHES_PER_UNIT.inches,Meter:1/OpenLayers.METERS_PER_INCH,Foot:0.3048006096012192/OpenLayers.METERS_PER_INCH,IFoot:0.3048/OpenLayers.METERS_PER_INCH,ClarkeFoot:0.3047972651151/OpenLayers.METERS_PER_INCH,SearsFoot:0.30479947153867626/OpenLayers.METERS_PER_INCH,GoldCoastFoot:0.3047997101815088/OpenLayers.METERS_PER_INCH,IInch:0.0254/OpenLayers.METERS_PER_INCH,MicroInch:2.54E-5/OpenLayers.METERS_PER_INCH,Mil:2.54E-8/OpenLayers.METERS_PER_INCH,Centimeter:0.01/OpenLayers.METERS_PER_INCH,Kilometer:1E3/OpenLayers.METERS_PER_INCH,Yard:0.9144018288036576/OpenLayers.METERS_PER_INCH,SearsYard:0.914398414616029/OpenLayers.METERS_PER_INCH,IndianYard:0.9143985307444408/OpenLayers.METERS_PER_INCH,IndianYd37:0.91439523/OpenLayers.METERS_PER_INCH,IndianYd62:0.9143988/OpenLayers.METERS_PER_INCH,IndianYd75:0.9143985/OpenLayers.METERS_PER_INCH,IndianFoot:0.30479951/OpenLayers.METERS_PER_INCH,IndianFt37:0.30479841/OpenLayers.METERS_PER_INCH,IndianFt62:0.3047996/OpenLayers.METERS_PER_INCH,IndianFt75:0.3047995/OpenLayers.METERS_PER_INCH,Mile:1609.3472186944373/OpenLayers.METERS_PER_INCH,IYard:0.9144/OpenLayers.METERS_PER_INCH,IMile:1609.344/OpenLayers.METERS_PER_INCH,NautM:1852/OpenLayers.METERS_PER_INCH,"Lat-66":110943.31648893273/OpenLayers.METERS_PER_INCH,"Lat-83":110946.25736872235/OpenLayers.METERS_PER_INCH,Decimeter:0.1/OpenLayers.METERS_PER_INCH,Millimeter:0.0010/OpenLayers.METERS_PER_INCH,Dekameter:10/OpenLayers.METERS_PER_INCH,Decameter:10/OpenLayers.METERS_PER_INCH,Hectometer:100/OpenLayers.METERS_PER_INCH,GermanMeter:1.0000135965/OpenLayers.METERS_PER_INCH,CaGrid:0.999738/OpenLayers.METERS_PER_INCH,ClarkeChain:20.1166194976/OpenLayers.METERS_PER_INCH,GunterChain:20.11684023368047/OpenLayers.METERS_PER_INCH,BenoitChain:20.116782494375872/OpenLayers.METERS_PER_INCH,SearsChain:20.11676512155/OpenLayers.METERS_PER_INCH,ClarkeLink:0.201166194976/OpenLayers.METERS_PER_INCH,GunterLink:0.2011684023368047/OpenLayers.METERS_PER_INCH,BenoitLink:0.20116782494375873/OpenLayers.METERS_PER_INCH,SearsLink:0.2011676512155/OpenLayers.METERS_PER_INCH,Rod:5.02921005842012/OpenLayers.METERS_PER_INCH,IntnlChain:20.1168/OpenLayers.METERS_PER_INCH,IntnlLink:0.201168/OpenLayers.METERS_PER_INCH,Perch:5.02921005842012/OpenLayers.METERS_PER_INCH,Pole:5.02921005842012/OpenLayers.METERS_PER_INCH,Furlong:201.1684023368046/OpenLayers.METERS_PER_INCH,Rood:3.778266898/OpenLayers.METERS_PER_INCH,CapeFoot:0.3047972615/OpenLayers.METERS_PER_INCH,Brealey:375/OpenLayers.METERS_PER_INCH,ModAmFt:0.304812252984506/OpenLayers.METERS_PER_INCH,Fathom:1.8288/OpenLayers.METERS_PER_INCH,"NautM-UK":1853.184/OpenLayers.METERS_PER_INCH,"50kilometers":5E4/OpenLayers.METERS_PER_INCH,"150kilometers":15E4/OpenLayers.METERS_PER_INCH});OpenLayers.Util.extend(OpenLayers.INCHES_PER_UNIT,{mm:OpenLayers.INCHES_PER_UNIT.Meter/1E3,cm:OpenLayers.INCHES_PER_UNIT.Meter/100,dm:OpenLayers.INCHES_PER_UNIT.Meter*100,km:OpenLayers.INCHES_PER_UNIT.Meter*1E3,kmi:OpenLayers.INCHES_PER_UNIT.nmi,fath:OpenLayers.INCHES_PER_UNIT.Fathom,ch:OpenLayers.INCHES_PER_UNIT.IntnlChain,link:OpenLayers.INCHES_PER_UNIT.IntnlLink,"us-in":OpenLayers.INCHES_PER_UNIT.inches,"us-ft":OpenLayers.INCHES_PER_UNIT.Foot,"us-yd":OpenLayers.INCHES_PER_UNIT.Yard,"us-ch":OpenLayers.INCHES_PER_UNIT.GunterChain,"us-mi":OpenLayers.INCHES_PER_UNIT.Mile,"ind-yd":OpenLayers.INCHES_PER_UNIT.IndianYd37,"ind-ft":OpenLayers.INCHES_PER_UNIT.IndianFt37,"ind-ch":20.11669506/OpenLayers.METERS_PER_INCH});OpenLayers.DOTS_PER_INCH=72;OpenLayers.Util.normalizeScale=function(a){var b=a>1?1/a:a;return b};OpenLayers.Util.getResolutionFromScale=function(a,b){if(b==null)b="degrees";var c=OpenLayers.Util.normalizeScale(a),d=1/(c*OpenLayers.INCHES_PER_UNIT[b]*OpenLayers.DOTS_PER_INCH);return d};OpenLayers.Util.getScaleFromResolution=function(a,b){if(b==null)b="degrees";var c=a*OpenLayers.INCHES_PER_UNIT[b]*OpenLayers.DOTS_PER_INCH;return c};OpenLayers.Util.safeStopPropagation=function(a){OpenLayers.Event.stop(a,true)};OpenLayers.Util.pagePosition=function(a){for(var b=0,c=0,d=a,e=a;d;){if(d==document.body)if(OpenLayers.Element.getStyle(e,"position")=="absolute")break;b+=d.offsetTop||0;c+=d.offsetLeft||0;e=d;try{d=d.offsetParent}catch(f){OpenLayers.Console.error(OpenLayers.i18n("pagePositionFailed",{elemId:d.id}));break}}for(d=a;d;){b-=d.scrollTop||0;c-=d.scrollLeft||0;d=d.parentNode}return[c,b]};OpenLayers.Util.isEquivalentUrl=function(a,b,c){c=c||{};OpenLayers.Util.applyDefaults(c,{ignoreCase:true,ignorePort80:true,ignoreHash:true});var d=OpenLayers.Util.createUrlObject(a,c),e=OpenLayers.Util.createUrlObject(b,c);for(var f in d)if(f!=="args")if(d[f]!=e[f])return false;for(f in d.args){if(d.args[f]!=e.args[f])return false;delete e.args[f]}for(f in e.args)return false;return true};OpenLayers.Util.createUrlObject=function(a,b){b=b||{};if(!/^\w+:\/\//.test(a)){var c=window.location,d=c.port?":"+c.port:"",e=c.protocol+"//"+c.host.split(":").shift()+d;if(a.indexOf("/")===0)a=e+a;else{var f=c.pathname.split("/");f.pop();a=e+f.join("/")+"/"+a}}if(b.ignoreCase)a=a.toLowerCase();var g=document.createElement("a");g.href=a;var h={};h.host=g.host.split(":").shift();h.protocol=g.protocol;h.port=b.ignorePort80?g.port=="80"||g.port=="0"?"":g.port:g.port==""||g.port=="0"?"80":g.port;h.hash=b.ignoreHash||g.hash==="#"?"":g.hash;var j=g.search;if(!j){var k=a.indexOf("?");j=k!=-1?a.substr(k):""}h.args=OpenLayers.Util.getParameters(j);h.pathname=g.pathname.charAt(0)=="/"?g.pathname:"/"+g.pathname;return h};OpenLayers.Util.removeTail=function(a){var b=null,c=a.indexOf("?"),d=a.indexOf("#");return b=c==-1?d!=-1?a.substr(0,d):a:d!=-1?a.substr(0,Math.min(c,d)):a.substr(0,c)};OpenLayers.Util.getBrowserName=function(){var a="",b=navigator.userAgent.toLowerCase();if(b.indexOf("opera")!=-1)a="opera";else if(b.indexOf("msie")!=-1)a="msie";else if(b.indexOf("safari")!=-1)a="safari";else if(b.indexOf("mozilla")!=-1)a=b.indexOf("firefox")!=-1?"firefox":"mozilla";return a};OpenLayers.Util.getRenderedDimensions=function(a,b,c){var d,e,f=document.createElement("div");f.style.visibility="hidden";var g=c&&c.containerElement?c.containerElement:document.body;if(b)if(b.w){d=b.w;f.style.width=d+"px"}else if(b.h){e=b.h;f.style.height=e+"px"}if(c&&c.displayClass)f.className=c.displayClass;var h=document.createElement("div");h.innerHTML=a;h.style.overflow="visible";if(h.childNodes)for(var j=0,k=h.childNodes.length;j<k;j++)if(h.childNodes[j].style)h.childNodes[j].style.overflow="visible";f.appendChild(h);g.appendChild(f);for(var l=false,m=f.parentNode;m&&m.tagName.toLowerCase()!="body";){var p=OpenLayers.Element.getStyle(m,"position");if(p=="absolute"){l=true;break}else if(p&&p!="static")break;m=m.parentNode}if(!l)f.style.position="absolute";if(!d){d=parseInt(h.scrollWidth);f.style.width=d+"px"}e||(e=parseInt(h.scrollHeight));f.removeChild(h);g.removeChild(f);return new OpenLayers.Size(d,e)};OpenLayers.Util.getScrollbarWidth=function(){var a=OpenLayers.Util._scrollbarWidth;if(a==null){var b=null,c=null,d=0,e=0;b=document.createElement("div");b.style.position="absolute";b.style.top="-1000px";b.style.left="-1000px";b.style.width="100px";b.style.height="50px";b.style.overflow="hidden";c=document.createElement("div");c.style.width="100%";c.style.height="200px";b.appendChild(c);document.body.appendChild(b);d=c.offsetWidth;b.style.overflow="scroll";e=c.offsetWidth;document.body.removeChild(document.body.lastChild);OpenLayers.Util._scrollbarWidth=d-e;a=OpenLayers.Util._scrollbarWidth}return a};OpenLayers.Rico={};OpenLayers.Rico.Corner={round:function(a,b){a=OpenLayers.Util.getElement(a);this._setOptions(b);var c=this.options.color;if(this.options.color=="fromElement")c=this._background(a);var d=this.options.bgColor;if(this.options.bgColor=="fromParent")d=this._background(a.offsetParent);this._roundCornersImpl(a,c,d)},changeColor:function(a,b){a.style.backgroundColor=b;for(var c=a.parentNode.getElementsByTagName("span"),d=0;d<c.length;d++)c[d].style.backgroundColor=b},changeOpacity:function(a,b){var c=b,d="alpha(opacity="+b*100+")";a.style.opacity=c;a.style.filter=d;for(var e=a.parentNode.getElementsByTagName("span"),f=0;f<e.length;f++){e[f].style.opacity=c;e[f].style.filter=d}},reRound:function(a,b){var c=a.parentNode.childNodes[0],d=a.parentNode.childNodes[2];a.parentNode.removeChild(c);a.parentNode.removeChild(d);this.round(a.parentNode,b)},_roundCornersImpl:function(a,b,c){this.options.border&&this._renderBorder(a,c);this._isTopRounded()&&this._roundTopCorners(a,b,c);this._isBottomRounded()&&this._roundBottomCorners(a,b,c)},_renderBorder:function(a,b){var c="1px solid "+this._borderColor(b),d="border-left: "+c,e="border-right: "+c,f="style='"+d+";"+e+"'";a.innerHTML="<div "+f+">"+a.innerHTML+"</div>"},_roundTopCorners:function(a,b,c){for(var d=this._createCorner(c),e=0;e<this.options.numSlices;e++)d.appendChild(this._createCornerSlice(b,c,e,"top"));a.style.paddingTop=0;a.insertBefore(d,a.firstChild)},_roundBottomCorners:function(a,b,c){for(var d=this._createCorner(c),e=this.options.numSlices-1;e>=0;e--)d.appendChild(this._createCornerSlice(b,c,e,"bottom"));a.style.paddingBottom=0;a.appendChild(d)},_createCorner:function(a){var b=document.createElement("div");b.style.backgroundColor=this._isTransparent()?"transparent":a;return b},_createCornerSlice:function(a,b,c,d){var e=document.createElement("span"),f=e.style;f.backgroundColor=a;f.display="block";f.height="1px";f.overflow="hidden";f.fontSize="1px";var g=this._borderColor(a,b);if(this.options.border&&c==0){f.borderTopStyle="solid";f.borderTopWidth="1px";f.borderLeftWidth="0px";f.borderRightWidth="0px";f.borderBottomWidth="0px";f.height="0px";f.borderColor=g}else if(g){f.borderColor=g;f.borderStyle="solid";f.borderWidth="0px 1px"}if(!this.options.compact&&c==this.options.numSlices-1)f.height="2px";this._setMargin(e,c,d);this._setBorder(e,c,d);return e},_setOptions:function(a){this.options={corners:"all",color:"fromElement",bgColor:"fromParent",blend:true,border:false,compact:false};OpenLayers.Util.extend(this.options,a||{});this.options.numSlices=this.options.compact?2:4;if(this._isTransparent())this.options.blend=false},_whichSideTop:function(){if(this._hasString(this.options.corners,"all","top"))return"";if(this.options.corners.indexOf("tl")>=0&&this.options.corners.indexOf("tr")>=0)return"";if(this.options.corners.indexOf("tl")>=0)return"left";else if(this.options.corners.indexOf("tr")>=0)return"right";return""},_whichSideBottom:function(){if(this._hasString(this.options.corners,"all","bottom"))return"";if(this.options.corners.indexOf("bl")>=0&&this.options.corners.indexOf("br")>=0)return"";if(this.options.corners.indexOf("bl")>=0)return"left";else if(this.options.corners.indexOf("br")>=0)return"right";return""},_borderColor:function(a,b){return a=="transparent"?b:this.options.border?this.options.border:this.options.blend?this._blend(b,a):""},_setMargin:function(a,b,c){var d=this._marginSize(b),e=c=="top"?this._whichSideTop():this._whichSideBottom();if(e=="left"){a.style.marginLeft=d+"px";a.style.marginRight="0px"}else if(e=="right"){a.style.marginRight=d+"px";a.style.marginLeft="0px"}else{a.style.marginLeft=d+"px";a.style.marginRight=d+"px"}},_setBorder:function(a,b,c){var d=this._borderSize(b),e=c=="top"?this._whichSideTop():this._whichSideBottom();if(e=="left"){a.style.borderLeftWidth=d+"px";a.style.borderRightWidth="0px"}else if(e=="right"){a.style.borderRightWidth=d+"px";a.style.borderLeftWidth="0px"}else{a.style.borderLeftWidth=d+"px";a.style.borderRightWidth=d+"px"}if(this.options.border!=false){a.style.borderLeftWidth=d+"px";a.style.borderRightWidth=d+"px"}},_marginSize:function(a){if(this._isTransparent())return 0;var b=[5,3,2,1],c=[3,2,1,0],d=[2,1],e=[1,0];return this.options.compact&&this.options.blend?e[a]:this.options.compact?d[a]:this.options.blend?c[a]:b[a]},_borderSize:function(a){var b=[5,3,2,1],c=[2,1,1,1],d=[1,0],e=[0,2,0,0];if(this.options.compact&&(this.options.blend||this._isTransparent()))return 1;else if(this.options.compact)return d[a];else if(this.options.blend)return c[a];else if(this.options.border)return e[a];else if(this._isTransparent())return b[a];return 0},_hasString:function(a){for(var b=1;b<arguments.length;b++)if(a.indexOf(arguments[b])>=0)return true;return false},_blend:function(a,b){var c=OpenLayers.Rico.Color.createFromHex(a);c.blend(OpenLayers.Rico.Color.createFromHex(b));return c},_background:function(a){try{return OpenLayers.Rico.Color.createColorFromBackground(a).asHex()}catch(b){return"#ffffff"}},_isTransparent:function(){return this.options.color=="transparent"},_isTopRounded:function(){return this._hasString(this.options.corners,"all","top","tl","tr")},_isBottomRounded:function(){return this._hasString(this.options.corners,"all","bottom","bl","br")},_hasSingleTextChild:function(a){return a.childNodes.length==1&&a.childNodes[0].nodeType==3}};OpenLayers.Console={log:function(){},debug:function(){},info:function(){},warn:function(){},error:function(){},userError:function(a){alert(a)},assert:function(){},dir:function(){},dirxml:function(){},trace:function(){},group:function(){},groupEnd:function(){},time:function(){},timeEnd:function(){},profile:function(){},profileEnd:function(){},count:function(){},CLASS_NAME:"OpenLayers.Console"};(function(){for(var a=document.getElementsByTagName("script"),b=0,c=a.length;b<c;++b)if(a[b].src.indexOf("firebug.js")!=-1)if(console){OpenLayers.Util.extend(OpenLayers.Console,console);break}})();OpenLayers.Popup=OpenLayers.Class({events:null,id:"",lonlat:null,div:null,contentSize:null,size:null,contentHTML:null,backgroundColor:"",opacity:"",border:"",contentDiv:null,groupDiv:null,closeDiv:null,autoSize:false,minSize:null,maxSize:null,displayClass:"olPopup",contentDisplayClass:"olPopupContent",padding:0,disableFirefoxOverflowHack:false,fixPadding:function(){if(typeof this.padding=="number")this.padding=new OpenLayers.Bounds(this.padding,this.padding,this.padding,this.padding)},panMapIfOutOfView:false,keepInMap:false,closeOnMove:false,map:null,initialize:function(a,b,c,d,e,f){if(a==null)a=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");this.id=a;this.lonlat=b;this.contentSize=c!=null?c:new OpenLayers.Size(OpenLayers.Popup.WIDTH,OpenLayers.Popup.HEIGHT);if(d!=null)this.contentHTML=d;this.backgroundColor=OpenLayers.Popup.COLOR;this.opacity=OpenLayers.Popup.OPACITY;this.border=OpenLayers.Popup.BORDER;this.div=OpenLayers.Util.createDiv(this.id,null,null,null,null,null,"hidden");this.div.className=this.displayClass;var g=this.id+"_GroupDiv";this.groupDiv=OpenLayers.Util.createDiv(g,null,null,null,"relative",null,"hidden");a=this.div.id+"_contentDiv";this.contentDiv=OpenLayers.Util.createDiv(a,null,this.contentSize.clone(),null,"relative");this.contentDiv.className=this.contentDisplayClass;this.groupDiv.appendChild(this.contentDiv);this.div.appendChild(this.groupDiv);e&&this.addCloseBox(f);this.registerEvents()},destroy:function(){this.border=this.opacity=this.backgroundColor=this.contentHTML=this.size=this.lonlat=this.id=null;this.closeOnMove&&this.map&&this.map.events.unregister("movestart",this,this.hide);this.events.destroy();this.events=null;if(this.closeDiv){OpenLayers.Event.stopObservingElement(this.closeDiv);this.groupDiv.removeChild(this.closeDiv)}this.closeDiv=null;this.div.removeChild(this.groupDiv);this.groupDiv=null;this.map!=null&&this.map.removePopup(this);this.panMapIfOutOfView=this.padding=this.maxSize=this.minSize=this.autoSize=this.div=this.map=null},draw:function(a){if(a==null)if(this.lonlat!=null&&this.map!=null)a=this.map.getLayerPxFromLonLat(this.lonlat);this.closeOnMove&&this.map.events.register("movestart",this,this.hide);if(!this.disableFirefoxOverflowHack&&OpenLayers.Util.getBrowserName()=="firefox"){this.map.events.register("movestart",this,function(){var b=document.defaultView.getComputedStyle(this.contentDiv,null),c=b.getPropertyValue("overflow");if(c!="hidden"){this.contentDiv._oldOverflow=c;this.contentDiv.style.overflow="hidden"}});this.map.events.register("moveend",this,function(){var b=this.contentDiv._oldOverflow;if(b){this.contentDiv.style.overflow=b;this.contentDiv._oldOverflow=null}})}this.moveTo(a);!this.autoSize&&!this.size&&this.setSize(this.contentSize);this.setBackgroundColor();this.setOpacity();this.setBorder();this.setContentHTML();this.panMapIfOutOfView&&this.panIntoView();return this.div},updatePosition:function(){if(this.lonlat&&this.map){var a=this.map.getLayerPxFromLonLat(this.lonlat);a&&this.moveTo(a)}},moveTo:function(a){if(a!=null&&this.div!=null){this.div.style.left=a.x+"px";this.div.style.top=a.y+"px"}},visible:function(){return OpenLayers.Element.visible(this.div)},toggle:function(){this.visible()?this.hide():this.show()},show:function(){OpenLayers.Element.show(this.div);this.panMapIfOutOfView&&this.panIntoView()},hide:function(){OpenLayers.Element.hide(this.div)},setSize:function(a){this.size=a.clone();var b=this.getContentDivPadding(),c=b.left+b.right,d=b.top+b.bottom;this.fixPadding();c+=this.padding.left+this.padding.right;d+=this.padding.top+this.padding.bottom;if(this.closeDiv){var e=parseInt(this.closeDiv.style.width);c+=e+b.right}this.size.w+=c;this.size.h+=d;if(OpenLayers.Util.getBrowserName()=="msie"){this.contentSize.w+=b.left+b.right;this.contentSize.h+=b.bottom+b.top}if(this.div!=null){this.div.style.width=this.size.w+"px";this.div.style.height=this.size.h+"px"}if(this.contentDiv!=null){this.contentDiv.style.width=a.w+"px";this.contentDiv.style.height=a.h+"px"}},updateSize:function(){var a="<div class='"+this.contentDisplayClass+"'>"+this.contentDiv.innerHTML+"</div>",b=this.map?this.map.layerContainerDiv:document.body,c=OpenLayers.Util.getRenderedDimensions(a,null,{displayClass:this.displayClass,containerElement:b}),d=this.getSafeContentSize(c),e=null;if(d.equals(c))e=c;else{var f=new OpenLayers.Size;f.w=d.w<c.w?d.w:null;f.h=d.h<c.h?d.h:null;if(f.w&&f.h)e=d;else{var g=OpenLayers.Util.getRenderedDimensions(a,f,{displayClass:this.contentDisplayClass,containerElement:b}),h=OpenLayers.Element.getStyle(this.contentDiv,"overflow");if(h!="hidden"&&g.equals(d)){var j=OpenLayers.Util.getScrollbarWidth();if(f.w)g.h+=j;else g.w+=j}e=this.getSafeContentSize(g)}}this.setSize(e)},setBackgroundColor:function(a){if(a!=undefined)this.backgroundColor=a;if(this.div!=null)this.div.style.backgroundColor=this.backgroundColor},setOpacity:function(a){if(a!=undefined)this.opacity=a;if(this.div!=null){this.div.style.opacity=this.opacity;this.div.style.filter="alpha(opacity="+this.opacity*100+")"}},setBorder:function(a){if(a!=undefined)this.border=a;if(this.div!=null)this.div.style.border=this.border},setContentHTML:function(a){if(a!=null)this.contentHTML=a;if(this.contentDiv!=null&&this.contentHTML!=null&&this.contentHTML!=this.contentDiv.innerHTML){this.contentDiv.innerHTML=this.contentHTML;if(this.autoSize){this.registerImageListeners();this.updateSize()}}},registerImageListeners:function(){function a(){this.popup.updateSize();this.popup.visible()&&this.popup.panMapIfOutOfView&&this.popup.panIntoView();OpenLayers.Event.stopObserving(this.img,"load",this.img._onImageLoad)}for(var b=this.contentDiv.getElementsByTagName("img"),c=0,d=b.length;c<d;c++){var e=b[c];if(e.width==0||e.height==0){var f={popup:this,img:e};e._onImgLoad=OpenLayers.Function.bind(a,f);OpenLayers.Event.observe(e,"load",e._onImgLoad)}}},getSafeContentSize:function(a){var b=a.clone(),c=this.getContentDivPadding(),d=c.left+c.right,e=c.top+c.bottom;this.fixPadding();d+=this.padding.left+this.padding.right;e+=this.padding.top+this.padding.bottom;if(this.closeDiv){var f=parseInt(this.closeDiv.style.width);d+=f+c.right}if(this.minSize){b.w=Math.max(b.w,this.minSize.w-d);b.h=Math.max(b.h,this.minSize.h-e)}if(this.maxSize){b.w=Math.min(b.w,this.maxSize.w-d);b.h=Math.min(b.h,this.maxSize.h-e)}if(this.map&&this.map.size){var g=0,h=0;if(this.keepInMap&&!this.panMapIfOutOfView){var j=this.map.getPixelFromLonLat(this.lonlat);switch(this.relativePosition){case"tr":g=j.x;h=this.map.size.h-j.y;break;case"tl":g=this.map.size.w-j.x;h=this.map.size.h-j.y;break;case"bl":g=this.map.size.w-j.x;h=j.y;break;case"br":g=j.x;h=j.y;break;default:g=j.x;h=this.map.size.h-j.y;break}}var k=this.map.size.h-this.map.paddingForPopups.top-this.map.paddingForPopups.bottom-e-h,l=this.map.size.w-this.map.paddingForPopups.left-this.map.paddingForPopups.right-d-g;b.w=Math.min(b.w,l);b.h=Math.min(b.h,k)}return b},getContentDivPadding:function(){var a=this._contentDivPadding;if(!a){if(this.div.parentNode==null){this.div.style.display="none";document.body.appendChild(this.div)}this._contentDivPadding=a=new OpenLayers.Bounds(OpenLayers.Element.getStyle(this.contentDiv,"padding-left"),OpenLayers.Element.getStyle(this.contentDiv,"padding-bottom"),OpenLayers.Element.getStyle(this.contentDiv,"padding-right"),OpenLayers.Element.getStyle(this.contentDiv,"padding-top"));if(this.div.parentNode==document.body){document.body.removeChild(this.div);this.div.style.display=""}}return a},addCloseBox:function(a){this.closeDiv=OpenLayers.Util.createDiv(this.id+"_close",null,new OpenLayers.Size(17,17));this.closeDiv.className="olPopupCloseBox";var b=this.getContentDivPadding();this.closeDiv.style.right=b.right+"px";this.closeDiv.style.top=b.top+"px";this.groupDiv.appendChild(this.closeDiv);var c=a||function(d){this.hide();OpenLayers.Event.stop(d)};OpenLayers.Event.observe(this.closeDiv,"click",OpenLayers.Function.bindAsEventListener(c,this))},panIntoView:function(){var a=this.map.getSize(),b=this.map.getViewPortPxFromLayerPx(new OpenLayers.Pixel(parseInt(this.div.style.left),parseInt(this.div.style.top))),c=b.clone();if(b.x<this.map.paddingForPopups.left)c.x=this.map.paddingForPopups.left;else if(b.x+this.size.w>a.w-this.map.paddingForPopups.right)c.x=a.w-this.map.paddingForPopups.right-this.size.w;if(b.y<this.map.paddingForPopups.top)c.y=this.map.paddingForPopups.top;else if(b.y+this.size.h>a.h-this.map.paddingForPopups.bottom)c.y=a.h-this.map.paddingForPopups.bottom-this.size.h;var d=b.x-c.x,e=b.y-c.y;this.map.pan(d,e)},registerEvents:function(){this.events=new OpenLayers.Events(this,this.div,null,true);this.events.on({mousedown:this.onmousedown,mousemove:this.onmousemove,mouseup:this.onmouseup,click:this.onclick,mouseout:this.onmouseout,dblclick:this.ondblclick,scope:this})},onmousedown:function(a){this.mousedown=true;OpenLayers.Event.stop(a,true)},onmousemove:function(a){this.mousedown&&OpenLayers.Event.stop(a,true)},onmouseup:function(a){if(this.mousedown){this.mousedown=false;OpenLayers.Event.stop(a,true)}},onclick:function(a){OpenLayers.Event.stop(a,true)},onmouseout:function(){this.mousedown=false},ondblclick:function(a){OpenLayers.Event.stop(a,true)},CLASS_NAME:"OpenLayers.Popup"});OpenLayers.Popup.WIDTH=200;OpenLayers.Popup.HEIGHT=200;OpenLayers.Popup.COLOR="white";OpenLayers.Popup.OPACITY=1;OpenLayers.Popup.BORDER="0px";OpenLayers.Icon=OpenLayers.Class({url:null,size:null,offset:null,calculateOffset:null,imageDiv:null,px:null,initialize:function(a,b,c,d){this.url=a;this.size=b?b:new OpenLayers.Size(20,20);this.offset=c?c:new OpenLayers.Pixel(-(this.size.w/2),-(this.size.h/2));this.calculateOffset=d;var e=OpenLayers.Util.createUniqueID("OL_Icon_");this.imageDiv=OpenLayers.Util.createAlphaImageDiv(e)},destroy:function(){this.erase();OpenLayers.Event.stopObservingElement(this.imageDiv.firstChild);this.imageDiv.innerHTML="";this.imageDiv=null},clone:function(){return new OpenLayers.Icon(this.url,this.size,this.offset,this.calculateOffset)},setSize:function(a){if(a!=null)this.size=a;this.draw()},setUrl:function(a){if(a!=null)this.url=a;this.draw()},draw:function(a){OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv,null,null,this.size,this.url,"absolute");this.moveTo(a);return this.imageDiv},erase:function(){this.imageDiv!=null&&this.imageDiv.parentNode!=null&&OpenLayers.Element.remove(this.imageDiv)},setOpacity:function(a){OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv,null,null,null,null,null,null,null,a)},moveTo:function(a){if(a!=null)this.px=a;if(this.imageDiv!=null)if(this.px==null)this.display(false);else{if(this.calculateOffset)this.offset=this.calculateOffset(this.size);var b=this.px.offset(this.offset);OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv,null,b)}},display:function(a){this.imageDiv.style.display=a?"":"none"},isDrawn:function(){var a=this.imageDiv&&this.imageDiv.parentNode&&this.imageDiv.parentNode.nodeType!=11;return a},CLASS_NAME:"OpenLayers.Icon"});OpenLayers.Renderer=OpenLayers.Class({container:null,root:null,extent:null,locked:false,size:null,resolution:null,map:null,initialize:function(a){this.container=OpenLayers.Util.getElement(a)},destroy:function(){this.map=this.resolution=this.size=this.extent=this.container=null},supported:function(){return false},setExtent:function(a,b){this.extent=a.clone();if(b)this.resolution=null},setSize:function(a){this.size=a.clone();this.resolution=null},getResolution:function(){return this.resolution=this.resolution||this.map.getResolution()},drawFeature:function(a,b){if(b==null)b=a.style;if(a.geometry){var c=a.geometry.getBounds();if(c){c.intersectsBounds(this.extent)||(b={display:"none"});var d=this.drawGeometry(a.geometry,b,a.id);b.display!="none"&&b.label&&d!==false?this.drawText(a.id,b,a.geometry.getCentroid()):this.removeText(a.id);return d}}},drawGeometry:function(){},drawText:function(){},removeText:function(){},clear:function(){},getFeatureIdFromEvent:function(){},eraseFeatures:function(a){a instanceof
Array||(a=[a]);for(var b=0,c=a.length;b<c;++b){this.eraseGeometry(a[b].geometry);this.removeText(a[b].id)}},eraseGeometry:function(){},moveRoot:function(){},getRenderLayerId:function(){return this.container.id},CLASS_NAME:"OpenLayers.Renderer"});OpenLayers.Size=OpenLayers.Class({w:0,h:0,initialize:function(a,b){this.w=parseFloat(a);this.h=parseFloat(b)},toString:function(){return"w="+this.w+",h="+this.h},clone:function(){return new OpenLayers.Size(this.w,this.h)},equals:function(a){var b=false;if(a!=null)b=this.w==a.w&&this.h==a.h||isNaN(this.w)&&isNaN(this.h)&&isNaN(a.w)&&isNaN(a.h);return b},CLASS_NAME:"OpenLayers.Size"});OpenLayers.Element={visible:function(a){return OpenLayers.Util.getElement(a).style.display!="none"},toggle:function(){for(var a=0,b=arguments.length;a<b;a++){var c=OpenLayers.Util.getElement(arguments[a]),d=OpenLayers.Element.visible(c)?"hide":"show";OpenLayers.Element[d](c)}},hide:function(){for(var a=0,b=arguments.length;a<b;a++){var c=OpenLayers.Util.getElement(arguments[a]);c.style.display="none"}},show:function(){for(var a=0,b=arguments.length;a<b;a++){var c=OpenLayers.Util.getElement(arguments[a]);c.style.display=""}},remove:function(a){a=OpenLayers.Util.getElement(a);a.parentNode.removeChild(a)},getHeight:function(a){a=OpenLayers.Util.getElement(a);return a.offsetHeight},getDimensions:function(a){a=OpenLayers.Util.getElement(a);if(OpenLayers.Element.getStyle(a,"display")!="none")return{width:a.offsetWidth,height:a.offsetHeight};var b=a.style,c=b.visibility,d=b.position;b.visibility="hidden";b.position="absolute";b.display="";var e=a.clientWidth,f=a.clientHeight;b.display="none";b.position=d;b.visibility=c;return{width:e,height:f}},hasClass:function(a,b){var c=a.className;return!!c&&(new RegExp("(^|\\s)"+b+"(\\s|$)")).test(c)},addClass:function(a,b){OpenLayers.Element.hasClass(a,b)||(a.className+=(a.className?" ":"")+b);return a},removeClass:function(a,b){var c=a.className;if(c)a.className=OpenLayers.String.trim(c.replace(new RegExp("(^|\\s+)"+b+"(\\s+|$)")," "));return a},toggleClass:function(a,b){OpenLayers.Element.hasClass(a,b)?OpenLayers.Element.removeClass(a,b):OpenLayers.Element.addClass(a,b);return a},getStyle:function(a,b){a=OpenLayers.Util.getElement(a);var c=null;if(a&&a.style){c=a.style[OpenLayers.String.camelize(b)];if(!c)if(document.defaultView&&document.defaultView.getComputedStyle){var d=document.defaultView.getComputedStyle(a,null);c=d?d.getPropertyValue(b):null}else if(a.currentStyle)c=a.currentStyle[OpenLayers.String.camelize(b)];var e=["left","top","right","bottom"];if(window.opera&&OpenLayers.Util.indexOf(e,b)!=-1&&OpenLayers.Element.getStyle(a,"position")=="static")c="auto"}return c=="auto"?null:c}};OpenLayers.Bounds=OpenLayers.Class({left:null,bottom:null,right:null,top:null,centerLonLat:null,initialize:function(a,b,c,d){if(a!=null)this.left=OpenLayers.Util.toFloat(a);if(b!=null)this.bottom=OpenLayers.Util.toFloat(b);if(c!=null)this.right=OpenLayers.Util.toFloat(c);if(d!=null)this.top=OpenLayers.Util.toFloat(d)},clone:function(){return new OpenLayers.Bounds(this.left,this.bottom,this.right,this.top)},equals:function(a){var b=false;if(a!=null)b=this.left==a.left&&this.right==a.right&&this.top==a.top&&this.bottom==a.bottom;return b},toString:function(){return"left-bottom=("+this.left+","+this.bottom+") right-top=("+this.right+","+this.top+")"},toArray:function(){return[this.left,this.bottom,this.right,this.top]},toBBOX:function(a){if(a==null)a=6;var b=Math.pow(10,a),c=Math.round(this.left*b)/b+","+Math.round(this.bottom*b)/b+","+Math.round(this.right*b)/b+","+Math.round(this.top*b)/b;return c},toGeometry:function(){return new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing([new OpenLayers.Geometry.Point(this.left,this.bottom),new OpenLayers.Geometry.Point(this.right,this.bottom),new OpenLayers.Geometry.Point(this.right,this.top),new OpenLayers.Geometry.Point(this.left,this.top)])])},getWidth:function(){return this.right-this.left},getHeight:function(){return this.top-this.bottom},getSize:function(){return new OpenLayers.Size(this.getWidth(),this.getHeight())},getCenterPixel:function(){return new OpenLayers.Pixel((this.left+this.right)/2,(this.bottom+this.top)/2)},getCenterLonLat:function(){if(!this.centerLonLat)this.centerLonLat=new OpenLayers.LonLat((this.left+this.right)/2,(this.bottom+this.top)/2);return this.centerLonLat},scale:function(a,b){if(b==null)b=this.getCenterLonLat();var c,d;if(b.CLASS_NAME=="OpenLayers.LonLat"){c=b.lon;d=b.lat}else{c=b.x;d=b.y}var e=(this.left-c)*a+c,f=(this.bottom-d)*a+d,g=(this.right-c)*a+c,h=(this.top-d)*a+d;return new OpenLayers.Bounds(e,f,g,h)},add:function(a,b){if(a==null||b==null){var c=OpenLayers.i18n("boundsAddError");OpenLayers.Console.error(c);return null}return new OpenLayers.Bounds(this.left+
a,this.bottom+b,this.right+a,this.top+b)},extend:function(a){var b=null;if(a){switch(a.CLASS_NAME){case"OpenLayers.LonLat":b=new OpenLayers.Bounds(a.lon,a.lat,a.lon,a.lat);break;case"OpenLayers.Geometry.Point":b=new OpenLayers.Bounds(a.x,a.y,a.x,a.y);break;case"OpenLayers.Bounds":b=a;break}if(b){this.centerLonLat=null;if(this.left==null||b.left<this.left)this.left=b.left;if(this.bottom==null||b.bottom<this.bottom)this.bottom=b.bottom;if(this.right==null||b.right>this.right)this.right=b.right;if(this.top==null||b.top>this.top)this.top=b.top}}},containsLonLat:function(a,b){return this.contains(a.lon,a.lat,b)},containsPixel:function(a,b){return this.contains(a.x,a.y,b)},contains:function(a,b,c){if(c==null)c=true;if(a==null||b==null)return false;a=OpenLayers.Util.toFloat(a);b=OpenLayers.Util.toFloat(b);var d=false;return d=c?a>=this.left&&a<=this.right&&b>=this.bottom&&b<=this.top:a>this.left&&a<this.right&&b>this.bottom&&b<this.top},intersectsBounds:function(a,b){if(b==null)b=true;var c=false,d=this.left==a.right||this.right==a.left||this.top==a.bottom||this.bottom==a.top;if(b||!d){var e=a.bottom>=this.bottom&&a.bottom<=this.top||this.bottom>=a.bottom&&this.bottom<=a.top,f=a.top>=this.bottom&&a.top<=this.top||this.top>a.bottom&&this.top<a.top,g=a.left>=this.left&&a.left<=this.right||this.left>=a.left&&this.left<=a.right,h=a.right>=this.left&&a.right<=this.right||this.right>=a.left&&this.right<=a.right;c=(e||f)&&(g||h)}return c},containsBounds:function(a,b,c){if(b==null)b=false;if(c==null)c=true;var d=this.contains(a.left,a.bottom,c),e=this.contains(a.right,a.bottom,c),f=this.contains(a.left,a.top,c),g=this.contains(a.right,a.top,c);return b?d||e||f||g:d&&e&&f&&g},determineQuadrant:function(a){var b="",c=this.getCenterLonLat();b+=a.lat<c.lat?"b":"t";b+=a.lon<c.lon?"l":"r";return b},transform:function(a,b){this.centerLonLat=null;var c=OpenLayers.Projection.transform({x:this.left,y:this.bottom},a,b),d=OpenLayers.Projection.transform({x:this.right,y:this.bottom},a,b),e=OpenLayers.Projection.transform({x:this.left,y:this.top},a,b),f=OpenLayers.Projection.transform({x:this.right,y:this.top},a,b);this.left=Math.min(c.x,e.x);this.bottom=Math.min(c.y,d.y);this.right=Math.max(d.x,f.x);this.top=Math.max(e.y,f.y);return this},wrapDateLine:function(a,b){b=b||{};var c=b.leftTolerance||0,d=b.rightTolerance||0,e=this.clone();if(a){for(;e.left<a.left&&e.right-d<=a.left;)e=e.add(a.getWidth(),0);for(;e.left+c>=a.right&&e.right>a.right;)e=e.add(-a.getWidth(),0)}return e},CLASS_NAME:"OpenLayers.Bounds"});OpenLayers.Bounds.fromString=function(a){var b=a.split(",");return OpenLayers.Bounds.fromArray(b)};OpenLayers.Bounds.fromArray=function(a){return new OpenLayers.Bounds(parseFloat(a[0]),parseFloat(a[1]),parseFloat(a[2]),parseFloat(a[3]))};OpenLayers.Bounds.fromSize=function(a){return new OpenLayers.Bounds(0,a.h,a.w,0)};OpenLayers.Bounds.oppositeQuadrant=function(a){var b="";b+=a.charAt(0)=="t"?"b":"t";b+=a.charAt(1)=="l"?"r":"l";return b};OpenLayers.Pixel=OpenLayers.Class({x:0,y:0,initialize:function(a,b){this.x=parseFloat(a);this.y=parseFloat(b)},toString:function(){return"x="+this.x+",y="+this.y},clone:function(){return new OpenLayers.Pixel(this.x,this.y)},equals:function(a){var b=false;if(a!=null)b=this.x==a.x&&this.y==a.y||isNaN(this.x)&&isNaN(this.y)&&isNaN(a.x)&&isNaN(a.y);return b},add:function(a,b){if(a==null||b==null){var c=OpenLayers.i18n("pixelAddError");OpenLayers.Console.error(c);return null}return new OpenLayers.Pixel(this.x+
a,this.y+b)},offset:function(a){var b=this.clone();if(a)b=this.add(a.x,a.y);return b},CLASS_NAME:"OpenLayers.Pixel"});OpenLayers.LonLat=OpenLayers.Class({lon:0,lat:0,initialize:function(a,b){this.lon=OpenLayers.Util.toFloat(a);this.lat=OpenLayers.Util.toFloat(b)},toString:function(){return"lon="+this.lon+",lat="+this.lat},toShortString:function(){return this.lon+", "+this.lat},clone:function(){return new OpenLayers.LonLat(this.lon,this.lat)},add:function(a,b){if(a==null||b==null){var c=OpenLayers.i18n("lonlatAddError");OpenLayers.Console.error(c);return null}return new OpenLayers.LonLat(this.lon+a,this.lat+b)},equals:function(a){var b=false;if(a!=null)b=this.lon==a.lon&&this.lat==a.lat||isNaN(this.lon)&&isNaN(this.lat)&&isNaN(a.lon)&&isNaN(a.lat);return b},transform:function(a,b){var c=OpenLayers.Projection.transform({x:this.lon,y:this.lat},a,b);this.lon=c.x;this.lat=c.y;return this},wrapDateLine:function(a){var b=this.clone();if(a){for(;b.lon<a.left;)b.lon+=a.getWidth();for(;b.lon>a.right;)b.lon-=a.getWidth()}return b},CLASS_NAME:"OpenLayers.LonLat"});OpenLayers.LonLat.fromString=function(a){var b=a.split(",");return new OpenLayers.LonLat(parseFloat(b[0]),parseFloat(b[1]))};OpenLayers.Control=OpenLayers.Class({id:null,map:null,div:null,type:null,allowSelection:false,displayClass:"",title:"",active:null,handler:null,eventListeners:null,events:null,EVENT_TYPES:["activate","deactivate"],initialize:function(a){this.displayClass=this.CLASS_NAME.replace("OpenLayers.","ol").replace(/\./g,"");OpenLayers.Util.extend(this,a);this.events=new OpenLayers.Events(this,null,this.EVENT_TYPES);this.eventListeners instanceof Object&&this.events.on(this.eventListeners);if(this.id==null)this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")},destroy:function(){if(this.events){this.eventListeners&&this.events.un(this.eventListeners);this.events.destroy();this.events=null}this.eventListeners=null;if(this.handler){this.handler.destroy();this.handler=null}if(this.handlers){for(var a in this.handlers)this.handlers.hasOwnProperty(a)&&typeof this.handlers[a].destroy=="function"&&this.handlers[a].destroy();this.handlers=null}if(this.map){this.map.removeControl(this);this.map=null}},setMap:function(a){this.map=a;this.handler&&this.handler.setMap(a)},draw:function(a){if(this.div==null){this.div=OpenLayers.Util.createDiv(this.id);this.div.className=this.displayClass;if(!this.allowSelection){this.div.className+=" olControlNoSelect";this.div.setAttribute("unselectable","on",0);this.div.onselectstart=function(){return false}}if(this.title!="")this.div.title=this.title}if(a!=null)this.position=a.clone();this.moveTo(this.position);return this.div},moveTo:function(a){if(a!=null&&this.div!=null){this.div.style.left=a.x+"px";this.div.style.top=a.y+"px"}},activate:function(){if(this.active)return false;this.handler&&this.handler.activate();this.active=true;this.map&&OpenLayers.Element.addClass(this.map.viewPortDiv,this.displayClass.replace(/ /g,"")+"Active");this.events.triggerEvent("activate");return true},deactivate:function(){if(this.active){this.handler&&this.handler.deactivate();this.active=false;this.map&&OpenLayers.Element.removeClass(this.map.viewPortDiv,this.displayClass.replace(/ /g,"")+"Active");this.events.triggerEvent("deactivate");return true}return false},CLASS_NAME:"OpenLayers.Control"});OpenLayers.Control.TYPE_BUTTON=1;OpenLayers.Control.TYPE_TOGGLE=2;OpenLayers.Control.TYPE_TOOL=3;OpenLayers.Lang={code:null,defaultCode:"en",getCode:function(){OpenLayers.Lang.code||OpenLayers.Lang.setCode();return OpenLayers.Lang.code},setCode:function(a){var b;a||(a=OpenLayers.Util.getBrowserName()=="msie"?navigator.userLanguage:navigator.language);var c=a.split("-");c[0]=c[0].toLowerCase();if(typeof OpenLayers.Lang[c[0]]=="object")b=c[0];if(c[1]){var d=c[0]+"-"+c[1].toUpperCase();if(typeof OpenLayers.Lang[d]=="object")b=d}if(!b){OpenLayers.Console.warn("Failed to find OpenLayers.Lang."+c.join("-")+" dictionary, falling back to default language");b=OpenLayers.Lang.defaultCode}OpenLayers.Lang.code=b},translate:function(a,b){var c=OpenLayers.Lang[OpenLayers.Lang.getCode()],d=c[a];d||(d=a);if(b)d=OpenLayers.String.format(d,b);return d}};OpenLayers.i18n=OpenLayers.Lang.translate;OpenLayers.Tween=OpenLayers.Class({INTERVAL:10,easing:null,begin:null,finish:null,duration:null,callbacks:null,time:null,interval:null,playing:false,initialize:function(a){this.easing=a?a:OpenLayers.Easing.Expo.easeOut},start:function(a,b,c,d){this.playing=true;this.begin=a;this.finish=b;this.duration=c;this.callbacks=d.callbacks;this.time=0;if(this.interval){window.clearInterval(this.interval);this.interval=null}this.callbacks&&this.callbacks.start&&this.callbacks.start.call(this,this.begin);this.interval=window.setInterval(OpenLayers.Function.bind(this.play,this),this.INTERVAL)},stop:function(){if(this.playing){this.callbacks&&this.callbacks.done&&this.callbacks.done.call(this,this.finish);window.clearInterval(this.interval);this.interval=null;this.playing=false}},play:function(){var a={};for(var b in this.begin){var c=this.begin[b],d=this.finish[b];if(c==null||d==null||isNaN(c)||isNaN(d))OpenLayers.Console.error("invalid value for Tween");var e=d-c;a[b]=this.easing.apply(this,[this.time,c,e,this.duration])}this.time++;this.callbacks&&this.callbacks.eachStep&&this.callbacks.eachStep.call(this,a);if(this.time>this.duration){if(this.callbacks&&this.callbacks.done){this.callbacks.done.call(this,this.finish);this.playing=false}window.clearInterval(this.interval);this.interval=null}},CLASS_NAME:"OpenLayers.Tween"});OpenLayers.Easing={CLASS_NAME:"OpenLayers.Easing"};OpenLayers.Easing.Linear={easeIn:function(a,b,c,d){return c*a/d+b},easeOut:function(a,b,c,d){return c*a/d+b},easeInOut:function(a,b,c,d){return c*a/d+b},CLASS_NAME:"OpenLayers.Easing.Linear"};OpenLayers.Easing.Expo={easeIn:function(a,b,c,d){return a==0?b:c*Math.pow(2,10*(a/d-1))+b},easeOut:function(a,b,c,d){return a==d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b},easeInOut:function(a,b,c,d){if(a==0)return b;if(a==d)return b+c;if((a/=d/2)<1)return c/2*Math.pow(2,10*(a-1))+b;return c/2*(-Math.pow(2,-10*--a)+2)+b},CLASS_NAME:"OpenLayers.Easing.Expo"};OpenLayers.Easing.Quad={easeIn:function(a,b,c,d){return c*(a/=d)*a+b},easeOut:function(a,b,c,d){return-c*(a/=d)*(a-2)+b},easeInOut:function(a,b,c,d){if((a/=d/2)<1)return c/2*a*a+b;return-c/2*(--a*(a-2)-1)+b},CLASS_NAME:"OpenLayers.Easing.Quad"};OpenLayers.Popup.Anchored=OpenLayers.Class(OpenLayers.Popup,{relativePosition:null,keepInMap:true,anchor:null,initialize:function(a,b,c,d,e,f,g){var h=[a,b,c,d,f,g];OpenLayers.Popup.prototype.initialize.apply(this,h);this.anchor=e!=null?e:{size:new OpenLayers.Size(0,0),offset:new OpenLayers.Pixel(0,0)}},destroy:function(){this.relativePosition=this.anchor=null;OpenLayers.Popup.prototype.destroy.apply(this,arguments)},show:function(){this.updatePosition();OpenLayers.Popup.prototype.show.apply(this,arguments)},moveTo:function(a){var b=this.relativePosition;this.relativePosition=this.calculateRelativePosition(a);var c=this.calculateNewPx(a),d=new Array(c);OpenLayers.Popup.prototype.moveTo.apply(this,d);this.relativePosition!=b&&this.updateRelativePosition()},setSize:function(){OpenLayers.Popup.prototype.setSize.apply(this,arguments);if(this.lonlat&&this.map){var a=this.map.getLayerPxFromLonLat(this.lonlat);this.moveTo(a)}},calculateRelativePosition:function(a){var b=this.map.getLonLatFromLayerPx(a),c=this.map.getExtent(),d=c.determineQuadrant(b);return OpenLayers.Bounds.oppositeQuadrant(d)},updateRelativePosition:function(){},calculateNewPx:function(a){var b=a.offset(this.anchor.offset),c=this.size||this.contentSize,d=this.relativePosition.charAt(0)=="t";b.y+=d?-c.h:this.anchor.size.h;var e=this.relativePosition.charAt(1)=="l";b.x+=e?-c.w:this.anchor.size.w;return b},CLASS_NAME:"OpenLayers.Popup.Anchored"});OpenLayers.ElementsIndexer=OpenLayers.Class({maxZIndex:null,order:null,indices:null,compare:null,initialize:function(a){this.compare=a?OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER_Y_ORDER:OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER_DRAWING_ORDER;this.order=[];this.indices={};this.maxZIndex=0},insert:function(a){this.exists(a)&&this.remove(a);var b=a.id;this.determineZIndex(a);for(var c=-1,d=this.order.length,e;d-c>1;){e=parseInt((c+d)/2);var f=this.compare(this,a,OpenLayers.Util.getElement(this.order[e]));if(f>0)c=e;else d=e}this.order.splice(d,0,b);this.indices[b]=this.getZIndex(a);return this.getNextElement(d)},remove:function(a){var b=a.id,c=OpenLayers.Util.indexOf(this.order,b);if(c>=0){this.order.splice(c,1);delete this.indices[b];if(this.order.length>0){var d=this.order[this.order.length-1];this.maxZIndex=this.indices[d]}else this.maxZIndex=0}},clear:function(){this.order=[];this.indices={};this.maxZIndex=0},exists:function(a){return this.indices[a.id]!=null},getZIndex:function(a){return a._style.graphicZIndex},determineZIndex:function(a){var b=a._style.graphicZIndex;if(b==null){b=this.maxZIndex;a._style.graphicZIndex=b}else if(b>this.maxZIndex)this.maxZIndex=b},getNextElement:function(a){var b=a+1;if(b<this.order.length){var c=OpenLayers.Util.getElement(this.order[b]);if(c==undefined)c=this.getNextElement(b);return c}else return null},CLASS_NAME:"OpenLayers.ElementsIndexer"});OpenLayers.ElementsIndexer.IndexingMethods={Z_ORDER:function(a,b,c){var d=a.getZIndex(b),e=0;if(c){var f=a.getZIndex(c);e=d-f}return e},Z_ORDER_DRAWING_ORDER:function(a,b,c){var d=OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER(a,b,c);if(c&&d==0)d=1;return d},Z_ORDER_Y_ORDER:function(a,b,c){var d=OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER(a,b,c);if(c&&d==0){var e=b._geometry.getBounds().bottom,f=c._geometry.getBounds().bottom,g=f-e;d=g==0?1:g}return d}};OpenLayers.Renderer.Elements=OpenLayers.Class(OpenLayers.Renderer,{rendererRoot:null,root:null,vectorRoot:null,textRoot:null,xmlns:null,indexer:null,BACKGROUND_ID_SUFFIX:"_background",LABEL_ID_SUFFIX:"_label",minimumSymbolizer:{strokeLinecap:"round",strokeOpacity:1,strokeDashstyle:"solid",fillOpacity:1,pointRadius:0},initialize:function(a,b){OpenLayers.Renderer.prototype.initialize.apply(this,arguments);this.rendererRoot=this.createRenderRoot();this.root=this.createRoot("_root");this.vectorRoot=this.createRoot("_vroot");this.textRoot=this.createRoot("_troot");this.root.appendChild(this.vectorRoot);this.root.appendChild(this.textRoot);this.rendererRoot.appendChild(this.root);this.container.appendChild(this.rendererRoot);if(b&&(b.zIndexing||b.yOrdering))this.indexer=new OpenLayers.ElementsIndexer(b.yOrdering)},destroy:function(){this.clear();this.xmlns=this.root=this.rendererRoot=null;OpenLayers.Renderer.prototype.destroy.apply(this,arguments)},clear:function(){if(this.vectorRoot)for(;this.vectorRoot.childNodes.length>0;)this.vectorRoot.removeChild(this.vectorRoot.firstChild);if(this.textRoot)for(;this.textRoot.childNodes.length>0;)this.textRoot.removeChild(this.textRoot.firstChild);this.indexer&&this.indexer.clear()},getNodeType:function(){},drawGeometry:function(a,b,c){var d=a.CLASS_NAME,e=true;if(d=="OpenLayers.Geometry.Collection"||d=="OpenLayers.Geometry.MultiPoint"||d=="OpenLayers.Geometry.MultiLineString"||d=="OpenLayers.Geometry.MultiPolygon"){for(var f=0,g=a.components.length;f<g;f++)e=this.drawGeometry(a.components[f],b,c)&&e;return e}e=false;if(b.display!="none"){b.backgroundGraphic&&this.redrawBackgroundNode(a.id,a,b,c);e=this.redrawNode(a.id,a,b,c)}if(e==false){var h=document.getElementById(a.id);if(h){h._style.backgroundGraphic&&h.parentNode.removeChild(document.getElementById(a.id+this.BACKGROUND_ID_SUFFIX));h.parentNode.removeChild(h)}}return e},redrawNode:function(a,b,c,d){var e=this.nodeFactory(a,this.getNodeType(b,c));e._featureId=d;e._geometry=b;e._geometryClass=b.CLASS_NAME;e._style=c;var f=this.drawGeometryNode(e,b,c);if(f===false)return false;e=f.node;if(this.indexer){var g=this.indexer.insert(e);g?this.vectorRoot.insertBefore(e,g):this.vectorRoot.appendChild(e)}else e.parentNode!==this.vectorRoot&&this.vectorRoot.appendChild(e);this.postDraw(e);return f.complete},redrawBackgroundNode:function(a,b,c){var d=OpenLayers.Util.extend({},c);d.externalGraphic=d.backgroundGraphic;d.graphicXOffset=d.backgroundXOffset;d.graphicYOffset=d.backgroundYOffset;d.graphicZIndex=d.backgroundGraphicZIndex;d.graphicWidth=d.backgroundWidth||d.graphicWidth;d.graphicHeight=d.backgroundHeight||d.graphicHeight;d.backgroundGraphic=null;d.backgroundXOffset=null;d.backgroundYOffset=null;d.backgroundGraphicZIndex=null;return this.redrawNode(a+this.BACKGROUND_ID_SUFFIX,b,d,null)},drawGeometryNode:function(a,b,c){c=c||a._style;OpenLayers.Util.applyDefaults(c,this.minimumSymbolizer);var d={isFilled:c.fill===undefined?true:c.fill,isStroked:c.stroke===undefined?!!c.strokeWidth:c.stroke},e;switch(b.CLASS_NAME){case"OpenLayers.Geometry.Point":if(c.graphic===false){d.isFilled=false;d.isStroked=false}e=this.drawPoint(a,b);break;case"OpenLayers.Geometry.LineString":d.isFilled=false;e=this.drawLineString(a,b);break;case"OpenLayers.Geometry.LinearRing":e=this.drawLinearRing(a,b);break;case"OpenLayers.Geometry.Polygon":e=this.drawPolygon(a,b);break;case"OpenLayers.Geometry.Surface":e=this.drawSurface(a,b);break;case"OpenLayers.Geometry.Rectangle":e=this.drawRectangle(a,b);break;default:break}a._style=c;a._options=d;return e!=false?{node:this.setStyle(a,c,d,b),complete:e}:false},postDraw:function(){},drawPoint:function(){},drawLineString:function(){},drawLinearRing:function(){},drawPolygon:function(){},drawRectangle:function(){},drawCircle:function(){},drawSurface:function(){},removeText:function(a){var b=document.getElementById(a+this.LABEL_ID_SUFFIX);b&&this.textRoot.removeChild(b)},getFeatureIdFromEvent:function(a){var b=a.target,c=b&&b.correspondingUseElement,d=c?c:b||a.srcElement,e=d._featureId;return e},eraseGeometry:function(a){if(a.CLASS_NAME=="OpenLayers.Geometry.MultiPoint"||a.CLASS_NAME=="OpenLayers.Geometry.MultiLineString"||a.CLASS_NAME=="OpenLayers.Geometry.MultiPolygon"||a.CLASS_NAME=="OpenLayers.Geometry.Collection")for(var b=0,c=a.components.length;b<c;b++)this.eraseGeometry(a.components[b]);else{var d=OpenLayers.Util.getElement(a.id);if(d&&d.parentNode){if(d.geometry){d.geometry.destroy();d.geometry=null}d.parentNode.removeChild(d);this.indexer&&this.indexer.remove(d);if(d._style.backgroundGraphic){var e=a.id+this.BACKGROUND_ID_SUFFIX,f=OpenLayers.Util.getElement(e);f&&f.parentNode&&f.parentNode.removeChild(f)}}}},nodeFactory:function(a,b){var c=OpenLayers.Util.getElement(a);if(c){if(!this.nodeTypeCompare(c,b)){c.parentNode.removeChild(c);c=this.nodeFactory(a,b)}}else c=this.createNode(b,a);return c},nodeTypeCompare:function(){},createNode:function(){},moveRoot:function(a){var b=this.root;if(a.root.parentNode==this.rendererRoot)b=a.root;b.parentNode.removeChild(b);a.rendererRoot.appendChild(b)},getRenderLayerId:function(){return this.root.parentNode.parentNode.id},isComplexSymbol:function(a){return a!="circle"&&!!a},CLASS_NAME:"OpenLayers.Renderer.Elements"});OpenLayers.Renderer.symbol={star:[350,75,379,161,469,161,397,215,423,301,350,250,277,301,303,215,231,161,321,161,350,75],cross:[4,0,6,0,6,4,10,4,10,6,6,6,6,10,4,10,4,6,0,6,0,4,4,4,4,0],x:[0,0,25,0,50,35,75,0,100,0,65,50,100,100,75,100,50,65,25,100,0,100,35,50,0,0],square:[0,0,0,1,1,1,1,0,0,0],triangle:[0,10,10,10,5,0,0,10]};OpenLayers.Control.ScaleLine=OpenLayers.Class(OpenLayers.Control,{maxWidth:100,topOutUnits:"km",topInUnits:"m",bottomOutUnits:"mi",bottomInUnits:"ft",eTop:null,eBottom:null,initialize:function(a){OpenLayers.Control.prototype.initialize.apply(this,[a])},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.eTop){this.div.style.display="block";this.div.style.position="absolute";this.eTop=document.createElement("div");this.eTop.className=this.displayClass+"Top";this.div.appendChild(this.eTop);this.eTop.style.visibility=this.topOutUnits==""||this.topInUnits==""?"hidden":"visible";this.eBottom=document.createElement("div");this.eBottom.className=this.displayClass+"Bottom";this.div.appendChild(this.eBottom);this.eBottom.style.visibility=this.bottomOutUnits==""||this.bottomInUnits==""?"hidden":"visible"}this.map.events.register("moveend",this,this.update);this.update();return this.div},getBarLen:function(a){var b=parseInt(Math.log(a)/Math.log(10)),c=Math.pow(10,b),d=parseInt(a/c),e;e=d>5?5:d>2?2:1;return e*c},update:function(){var a=this.map.getResolution();if(a){var b=this.map.getUnits(),c=OpenLayers.INCHES_PER_UNIT,d=this.maxWidth*a*c[b],e,f;if(d>1E5){e=this.topOutUnits;f=this.bottomOutUnits}else{e=this.topInUnits;f=this.bottomInUnits}var g=d/c[e],h=d/c[f],j=this.getBarLen(g),k=this.getBarLen(h);g=j/c[b]*c[e];h=k/c[b]*c[f];var l=g/a,m=h/a;if(this.eBottom.style.visibility=="visible"){this.eBottom.style.width=Math.round(m)+"px";this.eBottom.innerHTML=k+" "+f}if(this.eTop.style.visibility=="visible"){this.eTop.style.width=Math.round(l)+"px";this.eTop.innerHTML=j+" "+e}}},CLASS_NAME:"OpenLayers.Control.ScaleLine"});OpenLayers.Lang.en={unhandledRequest:"Unhandled request return ${statusText}",permalink:"Permalink",overlays:"Overlays",baseLayer:"Base Layer",sameProjection:"The overview map only works when it is in the same projection as the main map",readNotImplemented:"Read not implemented.",writeNotImplemented:"Write not implemented.",noFID:"Can't update a feature for which there is no FID.",errorLoadingGML:"Error in loading GML file ${url}",browserNotSupported:"Your browser does not support vector rendering. Currently supported renderers are:\n${renderers}",componentShouldBe:"addFeatures : component should be an ${geomType}",getFeatureError:"getFeatureFromEvent called on layer with no renderer. This usually means you destroyed a layer, but not some handler which is associated with it.",minZoomLevelError:"The minZoomLevel property is only intended for use with the FixedZoomLevels-descendent layers. That this wfs layer checks for minZoomLevel is a relic of thepast. We cannot, however, remove it without possibly breaking OL based applications that may depend on it. Therefore we are deprecating it -- the minZoomLevel check below will be removed at 3.0. Please instead use min/max resolution setting as described here: http://trac.openlayers.org/wiki/SettingZoomLevels",commitSuccess:"WFS Transaction: SUCCESS ${response}",commitFailed:"WFS Transaction: FAILED ${response}",googleWarning:"The Google Layer was unable to load correctly.<br><br>To get rid of this message, select a new BaseLayer in the layer switcher in the upper-right corner.<br><br>Most likely, this is because the Google Maps library script was either not included, or does not contain the correct API key for your site.<br><br>Developers: For help getting this working correctly, <a href='http://trac.openlayers.org/wiki/Google' target='_blank'>click here</a>",getLayerWarning:"The ${layerType} Layer was unable to load correctly.<br><br>To get rid of this message, select a new BaseLayer in the layer switcher in the upper-right corner.<br><br>Most likely, this is because the ${layerLib} library script was not correctly included.<br><br>Developers: For help getting this working correctly, <a href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'>click here</a>",scale:"Scale = 1 : ${scaleDenom}",layerAlreadyAdded:"You tried to add the layer: ${layerName} to the map, but it has already been added",reprojectDeprecated:"You are using the 'reproject' option on the ${layerName} layer. This option is deprecated: its use was designed to support displaying data over commercial basemaps, but that functionality should now be achieved by using Spherical Mercator support. More information is available from http://trac.openlayers.org/wiki/SphericalMercator.",methodDeprecated:"This method has been deprecated and will be removed in 3.0. Please use ${newMethod} instead.",boundsAddError:"You must pass both x and y values to the add function.",lonlatAddError:"You must pass both lon and lat values to the add function.",pixelAddError:"You must pass both x and y values to the add function.",unsupportedGeometryType:"Unsupported geometry type: ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition failed: element with id ${elemId} may be misplaced.",end:"",filterEvaluateNotImplemented:"evaluate is not implemented for this filter type."};OpenLayers.Tile=OpenLayers.Class({EVENT_TYPES:["loadstart","loadend","reload","unload"],events:null,id:null,layer:null,url:null,bounds:null,size:null,position:null,isLoading:false,initialize:function(a,b,c,d,e){this.layer=a;this.position=b.clone();this.bounds=c.clone();this.url=d;this.size=e.clone();this.id=OpenLayers.Util.createUniqueID("Tile_");this.events=new OpenLayers.Events(this,null,this.EVENT_TYPES)},unload:function(){if(this.isLoading){this.isLoading=false;this.events.triggerEvent("unload")}},destroy:function(){this.position=this.size=this.bounds=this.layer=null;this.events.destroy();this.events=null},clone:function(a){if(a==null)a=new OpenLayers.Tile(this.layer,this.position,this.bounds,this.url,this.size);OpenLayers.Util.applyDefaults(a,this);return a},draw:function(){var a=this.layer.maxExtent,b=a&&this.bounds.intersectsBounds(a,false);this.shouldDraw=b||this.layer.displayOutsideMaxExtent;this.clear();return this.shouldDraw},moveTo:function(a,b,c){if(c==null)c=true;this.bounds=a.clone();this.position=b.clone();c&&this.draw()},clear:function(){},getBoundsFromBaseLayer:function(a){var b=OpenLayers.i18n("reprojectDeprecated",{layerName:this.layer.name});OpenLayers.Console.warn(b);var c=this.layer.map.getLonLatFromLayerPx(a),d=a.clone();d.x+=this.size.w;d.y+=this.size.h;var e=this.layer.map.getLonLatFromLayerPx(d);if(c.lon>e.lon)if(c.lon<0)c.lon=-180-(c.lon+180);else e.lon=180+e.lon+180;var f=new OpenLayers.Bounds(c.lon,e.lat,e.lon,c.lat);return f},showTile:function(){this.shouldDraw&&this.show()},show:function(){},hide:function(){},CLASS_NAME:"OpenLayers.Tile"});OpenLayers.Projection=OpenLayers.Class({proj:null,projCode:null,initialize:function(a,b){OpenLayers.Util.extend(this,b);this.projCode=a;if(window.Proj4js)this.proj=new Proj4js.Proj(a)},getCode:function(){return this.proj?this.proj.srsCode:this.projCode},getUnits:function(){return this.proj?this.proj.units:null},toString:function(){return this.getCode()},equals:function(a){return a&&a.getCode?this.getCode()==a.getCode():false},destroy:function(){delete this.proj;delete this.projCode},CLASS_NAME:"OpenLayers.Projection"});OpenLayers.Projection.transforms={};OpenLayers.Projection.addTransform=function(a,b,c){OpenLayers.Projection.transforms[a]||(OpenLayers.Projection.transforms[a]={});OpenLayers.Projection.transforms[a][b]=c};OpenLayers.Projection.transform=function(a,b,c){if(b.proj&&c.proj)a=Proj4js.transform(b.proj,c.proj,a);else b&&c&&OpenLayers.Projection.transforms[b.getCode()]&&OpenLayers.Projection.transforms[b.getCode()][c.getCode()]&&OpenLayers.Projection.transforms[b.getCode()][c.getCode()](a);return a};OpenLayers.Event={observers:false,KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(a){return a.target||a.srcElement},isLeftClick:function(a){return a.which&&a.which==1||a.button&&a.button==1},isRightClick:function(a){return a.which&&a.which==3||a.button&&a.button==2},stop:function(a,b){if(!b)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true},findElement:function(a,b){for(var c=OpenLayers.Event.element(a);c.parentNode&&(!c.tagName||c.tagName.toUpperCase()!=b.toUpperCase());)c=c.parentNode;return c},observe:function(a,b,c,d){var e=OpenLayers.Util.getElement(a);d=d||false;if(b=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||e.attachEvent))b="keydown";if(!this.observers)this.observers={};if(!e._eventCacheID){var f="eventCacheID_";if(e.id)f=e.id+"_"+f;e._eventCacheID=OpenLayers.Util.createUniqueID(f)}var g=e._eventCacheID;this.observers[g]||(this.observers[g]=[]);this.observers[g].push({element:e,name:b,observer:c,useCapture:d});if(e.addEventListener)e.addEventListener(b,c,d);else e.attachEvent&&e.attachEvent("on"+b,c)},stopObservingElement:function(a){var b=OpenLayers.Util.getElement(a),c=b._eventCacheID;this._removeElementObservers(OpenLayers.Event.observers[c])},_removeElementObservers:function(a){if(a)for(var b=a.length-1;b>=0;b--){var c=a[b],d=new Array(c.element,c.name,c.observer,c.useCapture);OpenLayers.Event.stopObserving.apply(this,d)}},stopObserving:function(a,b,c,d){d=d||false;var e=OpenLayers.Util.getElement(a),f=e._eventCacheID;if(b=="keypress")if(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||e.detachEvent)b="keydown";var g=false,h=OpenLayers.Event.observers[f];if(h)for(var j=0;!g&&j<h.length;){var k=h[j];if(k.name==b&&k.observer==c&&k.useCapture==d){h.splice(j,1);h.length==0&&delete OpenLayers.Event.observers[f];g=true;break}j++}if(g)if(e.removeEventListener)e.removeEventListener(b,c,d);else e&&e.detachEvent&&e.detachEvent("on"+
b,c);return g},unloadCache:function(){if(OpenLayers.Event&&OpenLayers.Event.observers){for(var a in OpenLayers.Event.observers){var b=OpenLayers.Event.observers[a];OpenLayers.Event._removeElementObservers.apply(this,[b])}OpenLayers.Event.observers=false}},CLASS_NAME:"OpenLayers.Event"};OpenLayers.Event.observe(window,"unload",OpenLayers.Event.unloadCache,false);window.Event&&OpenLayers.Util.applyDefaults(window.Event,OpenLayers.Event);OpenLayers.Events=OpenLayers.Class({BROWSER_EVENTS:["mouseover","mouseout","mousedown","mouseup","mousemove","click","dblclick","rightclick","dblrightclick","resize","focus","blur"],listeners:null,object:null,element:null,eventTypes:null,eventHandler:null,fallThrough:null,includeXY:false,clearMouseListener:null,initialize:function(a,b,c,d,e){OpenLayers.Util.extend(this,e);this.object=a;this.fallThrough=d;this.listeners={};this.eventHandler=OpenLayers.Function.bindAsEventListener(this.handleBrowserEvent,this);this.clearMouseListener=OpenLayers.Function.bind(this.clearMouseCache,this);this.eventTypes=[];if(c!=null)for(var f=0,g=c.length;f<g;f++)this.addEventType(c[f]);b!=null&&this.attachToElement(b)},destroy:function(){if(this.element){OpenLayers.Event.stopObservingElement(this.element);this.element.hasScrollEvent&&OpenLayers.Event.stopObserving(window,"scroll",this.clearMouseListener)}this.eventHandler=this.fallThrough=this.eventTypes=this.object=this.listeners=this.element=null},addEventType:function(a){if(!this.listeners[a]){this.eventTypes.push(a);this.listeners[a]=[]}},attachToElement:function(a){this.element&&OpenLayers.Event.stopObservingElement(this.element);this.element=a;for(var b=0,c=this.BROWSER_EVENTS.length;b<c;b++){var d=this.BROWSER_EVENTS[b];this.addEventType(d);OpenLayers.Event.observe(a,d,this.eventHandler)}OpenLayers.Event.observe(a,"dragstart",OpenLayers.Event.stop)},on:function(a){for(var b in a)b!="scope"&&this.register(b,a.scope,a[b])},register:function(a,b,c){if(c!=null&&OpenLayers.Util.indexOf(this.eventTypes,a)!=-1){if(b==null)b=this.object;var d=this.listeners[a];d.push({obj:b,func:c})}},registerPriority:function(a,b,c){if(c!=null){if(b==null)b=this.object;var d=this.listeners[a];d!=null&&d.unshift({obj:b,func:c})}},un:function(a){for(var b in a)b!="scope"&&this.unregister(b,a.scope,a[b])},unregister:function(a,b,c){if(b==null)b=this.object;var d=this.listeners[a];if(d!=null)for(var e=0,f=d.length;e<f;e++)if(d[e].obj==b&&d[e].func==c){d.splice(e,1);break}},remove:function(a){if(this.listeners[a]!=null)this.listeners[a]=[]},triggerEvent:function(a,b){var c=this.listeners[a];if(!(!c||c.length==0)){if(b==null)b={};b.object=this.object;b.element=this.element;if(!b.type)b.type=a;c=c.slice();for(var d,e=0,f=c.length;e<f;e++){var g=c[e];d=g.func.apply(g.obj,[b]);if(d!=undefined&&d==false)break}this.fallThrough||OpenLayers.Event.stop(b,true);return d}},handleBrowserEvent:function(a){if(this.includeXY)a.xy=this.getMousePosition(a);this.triggerEvent(a.type,a)},clearMouseCache:function(){this.element.scrolls=null;this.element.lefttop=null;this.element.offsets=null},getMousePosition:function(a){if(this.includeXY){if(!this.element.hasScrollEvent){OpenLayers.Event.observe(window,"scroll",this.clearMouseListener);this.element.hasScrollEvent=true}}else this.clearMouseCache();if(!this.element.scrolls)this.element.scrolls=[document.documentElement.scrollLeft||document.body.scrollLeft,document.documentElement.scrollTop||document.body.scrollTop];if(!this.element.lefttop)this.element.lefttop=[document.documentElement.clientLeft||0,document.documentElement.clientTop||0];if(!this.element.offsets){this.element.offsets=OpenLayers.Util.pagePosition(this.element);this.element.offsets[0]+=this.element.scrolls[0];this.element.offsets[1]+=this.element.scrolls[1]}return new OpenLayers.Pixel(a.clientX+this.element.scrolls[0]-this.element.offsets[0]-this.element.lefttop[0],a.clientY+this.element.scrolls[1]-this.element.offsets[1]-this.element.lefttop[1])},CLASS_NAME:"OpenLayers.Events"});OpenLayers.Format=OpenLayers.Class({options:null,externalProjection:null,internalProjection:null,data:null,keepData:false,initialize:function(a){OpenLayers.Util.extend(this,a);this.options=a},destroy:function(){},read:function(){OpenLayers.Console.userError(OpenLayers.i18n("readNotImplemented"))},write:function(){OpenLayers.Console.userError(OpenLayers.i18n("writeNotImplemented"))},CLASS_NAME:"OpenLayers.Format"});OpenLayers.Popup.Framed=OpenLayers.Class(OpenLayers.Popup.Anchored,{imageSrc:null,imageSize:null,isAlphaImage:false,positionBlocks:null,blocks:null,fixedRelativePosition:false,initialize:function(a,b,c,d,e,f){OpenLayers.Popup.Anchored.prototype.initialize.apply(this,arguments);if(this.fixedRelativePosition){this.updateRelativePosition();this.calculateRelativePosition=function(){return this.relativePosition}}this.contentDiv.style.position="absolute";this.contentDiv.style.zIndex=1;if(f)this.closeDiv.style.zIndex=1;this.groupDiv.style.position="absolute";this.groupDiv.style.top="0px";this.groupDiv.style.left="0px";this.groupDiv.style.height="100%";this.groupDiv.style.width="100%"},destroy:function(){this.isAlphaImage=this.imageSize=this.imageSrc=null;this.fixedRelativePosition=false;this.positionBlocks=null;for(var a=0;a<this.blocks.length;a++){var b=this.blocks[a];b.image&&b.div.removeChild(b.image);b.image=null;b.div&&this.groupDiv.removeChild(b.div);b.div=null}this.blocks=null;OpenLayers.Popup.Anchored.prototype.destroy.apply(this,arguments)},setBackgroundColor:function(){},setBorder:function(){},setOpacity:function(){},setSize:function(){OpenLayers.Popup.Anchored.prototype.setSize.apply(this,arguments);this.updateBlocks()},updateRelativePosition:function(){this.padding=this.positionBlocks[this.relativePosition].padding;if(this.closeDiv){var a=this.getContentDivPadding();this.closeDiv.style.right=a.right+this.padding.right+"px";this.closeDiv.style.top=a.top+this.padding.top+"px"}this.updateBlocks()},calculateNewPx:function(){var a=OpenLayers.Popup.Anchored.prototype.calculateNewPx.apply(this,arguments);return a=a.offset(this.positionBlocks[this.relativePosition].offset)},createBlocks:function(){this.blocks=[];var a=null;for(var b in this.positionBlocks){a=b;break}for(var c=this.positionBlocks[a],d=0;d<c.blocks.length;d++){var e={};this.blocks.push(e);var f=this.id+"_FrameDecorationDiv_"+d;e.div=OpenLayers.Util.createDiv(f,null,null,null,"absolute",null,"hidden",null);var g=this.id+"_FrameDecorationImg_"+d,h=this.isAlphaImage?OpenLayers.Util.createAlphaImageDiv:OpenLayers.Util.createImage;e.image=h(g,null,this.imageSize,this.imageSrc,"absolute",null,null,null);e.div.appendChild(e.image);this.groupDiv.appendChild(e.div)}},updateBlocks:function(){this.blocks||this.createBlocks();if(this.size&&this.relativePosition){for(var a=this.positionBlocks[this.relativePosition],b=0;b<a.blocks.length;b++){var c=a.blocks[b],d=this.blocks[b],e=c.anchor.left,f=c.anchor.bottom,g=c.anchor.right,h=c.anchor.top,j=isNaN(c.size.w)?this.size.w-
(g+e):c.size.w,k=isNaN(c.size.h)?this.size.h-(f+h):c.size.h;d.div.style.width=(j<0?0:j)+"px";d.div.style.height=(k<0?0:k)+"px";d.div.style.left=e!=null?e+"px":"";d.div.style.bottom=f!=null?f+"px":"";d.div.style.right=g!=null?g+"px":"";d.div.style.top=h!=null?h+"px":"";d.image.style.left=c.position.x+"px";d.image.style.top=c.position.y+"px"}this.contentDiv.style.left=this.padding.left+"px";this.contentDiv.style.top=this.padding.top+"px"}},CLASS_NAME:"OpenLayers.Popup.Framed"});OpenLayers.Popup.AnchoredBubble=OpenLayers.Class(OpenLayers.Popup.Anchored,{rounded:false,initialize:function(){this.padding=new OpenLayers.Bounds(0,OpenLayers.Popup.AnchoredBubble.CORNER_SIZE,0,OpenLayers.Popup.AnchoredBubble.CORNER_SIZE);OpenLayers.Popup.Anchored.prototype.initialize.apply(this,arguments)},draw:function(){OpenLayers.Popup.Anchored.prototype.draw.apply(this,arguments);this.setContentHTML();this.setBackgroundColor();this.setOpacity();return this.div},updateRelativePosition:function(){this.setRicoCorners()},setSize:function(){OpenLayers.Popup.Anchored.prototype.setSize.apply(this,arguments);this.setRicoCorners()},setBackgroundColor:function(a){if(a!=undefined)this.backgroundColor=a;if(this.div!=null)if(this.contentDiv!=null){this.div.style.background="transparent";OpenLayers.Rico.Corner.changeColor(this.groupDiv,this.backgroundColor)}},setOpacity:function(a){OpenLayers.Popup.Anchored.prototype.setOpacity.call(this,a);this.div!=null&&this.groupDiv!=null&&OpenLayers.Rico.Corner.changeOpacity(this.groupDiv,this.opacity)},setBorder:function(){this.border=0},setRicoCorners:function(){var a=this.getCornersToRound(this.relativePosition),b={corners:a,color:this.backgroundColor,bgColor:"transparent",blend:false};if(this.rounded){OpenLayers.Rico.Corner.reRound(this.groupDiv,b);this.setBackgroundColor();this.setOpacity()}else{OpenLayers.Rico.Corner.round(this.div,b);this.rounded=true}},getCornersToRound:function(){var a=["tl","tr","bl","br"],b=OpenLayers.Bounds.oppositeQuadrant(this.relativePosition);OpenLayers.Util.removeItem(a,b);return a.join(" ")},CLASS_NAME:"OpenLayers.Popup.AnchoredBubble"});OpenLayers.Popup.AnchoredBubble.CORNER_SIZE=5;OpenLayers.Renderer.VML=OpenLayers.Class(OpenLayers.Renderer.Elements,{xmlns:"urn:schemas-microsoft-com:vml",symbolCache:{},offset:null,initialize:function(){if(this.supported()){if(!document.namespaces.olv){document.namespaces.add("olv",this.xmlns);for(var a=document.createStyleSheet(),b=["shape","rect","oval","fill","stroke","imagedata","group","textbox"],c=0,d=b.length;c<d;c++)a.addRule("olv\\:"+b[c],"behavior: url(#default#VML); position: absolute; display: inline-block;")}OpenLayers.Renderer.Elements.prototype.initialize.apply(this,arguments);this.offset={x:0,y:0}}},destroy:function(){OpenLayers.Renderer.Elements.prototype.destroy.apply(this,arguments)},supported:function(){return!!document.namespaces},setExtent:function(a,b){OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments);var c=this.getResolution(),d=a.left/c,e=a.top/c-this.size.h;if(b){this.offset={x:d,y:e};e=d=0}else{d-=this.offset.x;e-=this.offset.y}var f=d+" "+e;this.root.coordorigin=f;for(var g=[this.root,this.vectorRoot,this.textRoot],h,j=0,k=g.length;j<k;++j){h=g[j];var l=this.size.w+" "+this.size.h;h.coordsize=l}this.root.style.flip="y";return true},setSize:function(){OpenLayers.Renderer.prototype.setSize.apply(this,arguments);for(var a=[this.rendererRoot,this.root,this.vectorRoot,this.textRoot],b=this.size.w+"px",c=this.size.h+"px",d,e=0,f=a.length;e<f;++e){d=a[e];d.style.width=b;d.style.height=c}},getNodeType:function(a,b){var c=null;switch(a.CLASS_NAME){case"OpenLayers.Geometry.Point":c=b.externalGraphic?"olv:rect":this.isComplexSymbol(b.graphicName)?"olv:shape":"olv:oval";break;case"OpenLayers.Geometry.Rectangle":c="olv:rect";break;case"OpenLayers.Geometry.LineString":case"OpenLayers.Geometry.LinearRing":case"OpenLayers.Geometry.Polygon":case"OpenLayers.Geometry.Curve":case"OpenLayers.Geometry.Surface":c="olv:shape";break;default:break}return c},setStyle:function(a,b,c,d){b=b||a._style;c=c||a._options;if(a._geometryClass=="OpenLayers.Geometry.Point")if(b.externalGraphic){if(b.graphicTitle)a.title=b.graphicTitle;var e=b.graphicWidth||b.graphicHeight,f=b.graphicHeight||b.graphicWidth;e=e?e:b.pointRadius*2;f=f?f:b.pointRadius*2;var g=this.getResolution(),h=b.graphicXOffset!=undefined?b.graphicXOffset:-(0.5*e),j=b.graphicYOffset!=undefined?b.graphicYOffset:-(0.5*f);a.style.left=(d.x/g-this.offset.x+h).toFixed();a.style.top=(d.y/g-this.offset.y-(j+f)).toFixed();a.style.width=e+"px";a.style.height=f+"px";a.style.flip="y";b.fillColor="none";c.isStroked=false}else if(this.isComplexSymbol(b.graphicName)){var k=this.importSymbol(b.graphicName);a.path=k.path;a.coordorigin=k.left+","+k.bottom;var l=k.size;a.coordsize=l+","+l;this.drawCircle(a,d,b.pointRadius);a.style.flip="y"}else this.drawCircle(a,d,b.pointRadius);if(c.isFilled)a.fillcolor=b.fillColor;else a.filled="false";var m=a.getElementsByTagName("fill"),p=m.length==0?null:m[0];if(c.isFilled){p||(p=this.createNode("olv:fill",a.id+"_fill"));p.opacity=b.fillOpacity;if(a._geometryClass=="OpenLayers.Geometry.Point"&&b.externalGraphic){if(b.graphicOpacity)p.opacity=b.graphicOpacity;p.src=b.externalGraphic;p.type="frame";if(!(b.graphicWidth&&b.graphicHeight))p.aspect="atmost"}p.parentNode!=a&&a.appendChild(p)}else p&&a.removeChild(p);if(typeof b.rotation!="undefined")if(b.externalGraphic){this.graphicRotate(a,h,j);p.opacity=0}else a.style.rotation=b.rotation;if(c.isStroked){a.strokecolor=b.strokeColor;a.strokeweight=b.strokeWidth+"px"}else a.stroked=false;var q=a.getElementsByTagName("stroke"),n=q.length==0?null:q[0];if(c.isStroked){if(!n){n=this.createNode("olv:stroke",a.id+"_stroke");a.appendChild(n)}n.opacity=b.strokeOpacity;n.endcap=!b.strokeLinecap||b.strokeLinecap=="butt"?"flat":b.strokeLinecap;n.dashstyle=this.dashStyle(b)}else n&&a.removeChild(n);if(b.cursor!="inherit"&&b.cursor!=null)a.style.cursor=b.cursor;return a},graphicRotate:function(a,b,c){var d=d||a._style,e,f;if(d.graphicWidth&&d.graphicHeight){f=Math.max(d.graphicWidth,d.graphicHeight);e=d.graphicWidth/d.graphicHeight;var g=Math.round(d.graphicWidth||f*e),h=Math.round(d.graphicHeight||f);a.style.width=g+"px";a.style.height=h+"px";var j=document.getElementById(a.id+"_image");if(!j){j=this.createNode("olv:imagedata",a.id+"_image");a.appendChild(j)}j.style.width=g+"px";j.style.height=h+"px";j.src=d.externalGraphic;j.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='', sizingMethod='scale')";var k=d.rotation*Math.PI/180,l=Math.sin(k),m=Math.cos(k),p="progid:DXImageTransform.Microsoft.Matrix(M11="+m+",M12="+-l+",M21="+l+",M22="+m+",SizingMethod='auto expand')\n",q=d.graphicOpacity||d.fillOpacity;if(q&&q!=1)p+="progid:DXImageTransform.Microsoft.BasicImage(opacity="+
q+")\n";a.style.filter=p;var n=new OpenLayers.Geometry.Point(-b,-c),o=(new OpenLayers.Bounds(0,0,g,h)).toGeometry();o.rotate(d.rotation,n);var r=o.getBounds();a.style.left=Math.round(parseInt(a.style.left)+r.left)+"px";a.style.top=Math.round(parseInt(a.style.top)-r.bottom)+"px"}else{var s=new Image;s.onreadystatechange=OpenLayers.Function.bind(function(){if(s.d=="complete"||s.d=="interactive"){e=s.width/s.height;f=Math.max(d.pointRadius*2,d.graphicWidth||0,d.graphicHeight||0);b*=e;d.graphicWidth=f*e;d.graphicHeight=f;this.graphicRotate(a,b,c)}},this);s.src=d.externalGraphic}},postDraw:function(a){var b=a._style.fillColor,c=a._style.strokeColor;if(b=="none"&&a.fillcolor!=b)a.fillcolor=b;if(c=="none"&&a.strokecolor!=c)a.strokecolor=c},setNodeDimension:function(a,b){var c=b.getBounds();if(c){var d=this.getResolution(),e=new OpenLayers.Bounds((c.left/d-this.offset.x).toFixed(),(c.bottom/d-this.offset.y).toFixed(),(c.right/d-this.offset.x).toFixed(),(c.top/d-this.offset.y).toFixed());a.style.left=e.left+"px";a.style.top=e.top+"px";a.style.width=e.getWidth()+"px";a.style.height=e.getHeight()+"px";a.coordorigin=e.left+" "+e.top;a.coordsize=e.getWidth()+" "+e.getHeight()}},dashStyle:function(a){var b=a.strokeDashstyle;switch(b){case"solid":case"dot":case"dash":case"dashdot":case"longdash":case"longdashdot":return b;default:var c=b.split(/[ ,]/);if(c.length==2){if(1*c[0]>=2*c[1])return"longdash";return c[0]==1||c[1]==1?"dot":"dash"}else if(c.length==4)return 1*c[0]>=2*c[1]?"longdashdot":"dashdot";return"solid"}},createNode:function(a,b){var c=document.createElement(a);if(b)c.id=b;c.unselectable="on";c.onselectstart=function(){return false};return c},nodeTypeCompare:function(a,b){var c=b,d=c.indexOf(":");if(d!=-1)c=c.substr(d+1);var e=a.nodeName;d=e.indexOf(":");if(d!=-1)e=e.substr(d+1);return c==e},createRenderRoot:function(){return this.nodeFactory(this.container.id+"_vmlRoot","div")},createRoot:function(a){return this.nodeFactory(this.container.id+a,"olv:group")},drawPoint:function(a,b){return this.drawCircle(a,b,1)},drawCircle:function(a,b,c){if(!isNaN(b.x)&&!isNaN(b.y)){var d=this.getResolution();a.style.left=(b.x/d-this.offset.x).toFixed()-c+"px";a.style.top=(b.y/d-this.offset.y).toFixed()-c+"px";var e=c*2;a.style.width=e+"px";a.style.height=e+"px";return a}return false},drawLineString:function(a,b){return this.drawLine(a,b,false)},drawLinearRing:function(a,b){return this.drawLine(a,b,true)},drawLine:function(a,b,c){this.setNodeDimension(a,b);for(var d=this.getResolution(),e=b.components.length,f=new Array(e),g,h,j,k=0;k<e;k++){g=b.components[k];h=g.x/d-this.offset.x;j=g.y/d-this.offset.y;f[k]=" "+h.toFixed()+","+j.toFixed()+" l "}var l=c?" x e":" e";a.path="m"+f.join("")+l;return a},drawPolygon:function(a,b){this.setNodeDimension(a,b);var c=this.getResolution(),d=[],e,f,g,h,j,k,l,m;for(g=0,h=b.components.length;g<h;g++){e=b.components[g];d.push("m");for(f=0,j=e.components.length;f<j;f++){k=e.components[f];l=k.x/c-this.offset.x;m=k.y/c-this.offset.y;d.push(" "+l.toFixed()+","+m.toFixed());f==0&&d.push(" l")}d.push(" x ")}d.push("e");a.path=d.join("");return a},drawRectangle:function(a,b){var c=this.getResolution();a.style.left=b.x/c-this.offset.x+"px";a.style.top=b.y/c-this.offset.y+"px";a.style.width=b.width/c+"px";a.style.height=b.height/c+"px";return a},drawText:function(a,b,c){var d=this.nodeFactory(a+this.LABEL_ID_SUFFIX,"olv:rect"),e=this.nodeFactory(a+this.LABEL_ID_SUFFIX+"_textbox","olv:textbox"),f=this.getResolution();d.style.left=(c.x/f-this.offset.x).toFixed()+"px";d.style.top=(c.y/f-this.offset.y).toFixed()+"px";d.style.flip="y";e.innerText=b.label;if(b.fontColor)e.style.color=b.fontColor;if(b.fontFamily)e.style.fontFamily=b.fontFamily;if(b.fontSize)e.style.fontSize=b.fontSize;if(b.fontWeight)e.style.fontWeight=b.fontWeight;e.style.whiteSpace="nowrap";e.inset="1px,0px,0px,0px";if(!d.parentNode){d.appendChild(e);this.textRoot.appendChild(d)}var g=b.labelAlign||"cm",h=e.clientWidth*OpenLayers.Renderer.VML.LABEL_SHIFT[g.substr(0,1)],j=e.clientHeight*OpenLayers.Renderer.VML.LABEL_SHIFT[g.substr(1,1)];d.style.left=parseInt(d.style.left)-h-1+"px";d.style.top=parseInt(d.style.top)+j+"px"},drawSurface:function(a,b){this.setNodeDimension(a,b);for(var c=this.getResolution(),d=[],e,f,g,h=0,j=b.components.length;h<j;h++){e=b.components[h];f=e.x/c-this.offset.x;g=e.y/c-this.offset.y;if(h%3==0&&h/3==0)d.push("m");else h%3==1&&d.push(" c");d.push(" "+f+","+g)}d.push(" x e");a.path=d.join("");return a},moveRoot:function(a){var b=this.map.getLayer(a.container.id);if(b instanceof OpenLayers.Layer.Vector.RootContainer)b=this.map.getLayer(this.container.id);b&&b.renderer.clear();OpenLayers.Renderer.Elements.prototype.moveRoot.apply(this,arguments);b&&b.redraw()},importSymbol:function(a){var b=this.container.id+"-"+a,c=this.symbolCache[b];if(c)return c;var d=OpenLayers.Renderer.symbol[a];if(d){for(var e=new OpenLayers.Bounds(Number.MAX_VALUE,Number.MAX_VALUE,0,0),f=["m"],g=0;g<d.length;g+=2){x=d[g];y=d[g+1];e.left=Math.min(e.left,x);e.bottom=Math.min(e.bottom,y);e.right=Math.max(e.right,x);e.top=Math.max(e.top,y);f.push(x);f.push(y);g==0&&f.push("l")}f.push("x e");var h=f.join(" "),j=(e.getWidth()-e.getHeight())/2;if(j>0){e.bottom-=j;e.top+=j}else{e.left-=j;e.right+=j}c={path:h,size:e.getWidth(),left:e.left,bottom:e.bottom};return this.symbolCache[b]=c}else throw new Error(a+" is not a valid symbol name");},CLASS_NAME:"OpenLayers.Renderer.VML"});OpenLayers.Renderer.VML.LABEL_SHIFT={l:0,c:0.5,r:1,t:0,m:0.5,b:1};OpenLayers.Renderer.SVG=OpenLayers.Class(OpenLayers.Renderer.Elements,{xmlns:"http://www.w3.org/2000/svg",xlinkns:"http://www.w3.org/1999/xlink",MAX_PIXEL:15E3,translationParameters:null,symbolSize:{},isGecko:null,initialize:function(){if(this.supported()){OpenLayers.Renderer.Elements.prototype.initialize.apply(this,arguments);this.translationParameters={x:0,y:0};this.isGecko=navigator.userAgent.toLowerCase().indexOf("gecko/")!=-1}},destroy:function(){OpenLayers.Renderer.Elements.prototype.destroy.apply(this,arguments)},supported:function(){var a="http://www.w3.org/TR/SVG11/feature#";return document.implementation&&(document.implementation.hasFeature("org.w3c.svg","1.0")||document.implementation.hasFeature(a+"SVG","1.1")||document.implementation.hasFeature(a+"BasicStructure","1.1"))},inValidRange:function(a,b,c){var d=a+(c?0:this.translationParameters.x),e=b+(c?0:this.translationParameters.y);return d>=-this.MAX_PIXEL&&d<=this.MAX_PIXEL&&e>=-this.MAX_PIXEL&&e<=this.MAX_PIXEL},setExtent:function(a,b){OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments);var c=this.getResolution(),d=-a.left/c,e=a.top/c;if(b){this.left=d;this.top=e;var f="0 0 "+this.size.w+" "+this.size.h;this.rendererRoot.setAttributeNS(null,"viewBox",f);this.translate(0,0);return true}else{var g=this.translate(d-this.left,e-this.top);g||this.setExtent(a,true);return g}},translate:function(a,b){if(this.inValidRange(a,b,true)){var c="";if(a||b)c="translate("+a+","+b+")";this.root.setAttributeNS(null,"transform",c);this.translationParameters={x:a,y:b};return true}else return false},setSize:function(){OpenLayers.Renderer.prototype.setSize.apply(this,arguments);this.rendererRoot.setAttributeNS(null,"width",this.size.w);this.rendererRoot.setAttributeNS(null,"height",this.size.h)},getNodeType:function(a,b){var c=null;switch(a.CLASS_NAME){case"OpenLayers.Geometry.Point":c=b.externalGraphic?"image":this.isComplexSymbol(b.graphicName)?"use":"circle";break;case"OpenLayers.Geometry.Rectangle":c="rect";break;case"OpenLayers.Geometry.LineString":c="polyline";break;case"OpenLayers.Geometry.LinearRing":c="polygon";break;case"OpenLayers.Geometry.Polygon":case"OpenLayers.Geometry.Curve":case"OpenLayers.Geometry.Surface":c="path";break;default:break}return c},setStyle:function(a,b,c){b=b||a._style;c=c||a._options;var d=parseFloat(a.getAttributeNS(null,"r")),e=1,f;if(a._geometryClass=="OpenLayers.Geometry.Point"&&d){a.style.visibility="";if(b.graphic===false)a.style.visibility="hidden";else if(b.externalGraphic){f=this.getPosition(a);b.graphicTitle&&a.setAttributeNS(null,"title",b.graphicTitle);b.graphicWidth&&b.graphicHeight&&a.setAttributeNS(null,"preserveAspectRatio","none");var g=b.graphicWidth||b.graphicHeight,h=b.graphicHeight||b.graphicWidth;g=g?g:b.pointRadius*2;h=h?h:b.pointRadius*2;var j=b.graphicXOffset!=undefined?b.graphicXOffset:-(0.5*g),k=b.graphicYOffset!=undefined?b.graphicYOffset:-(0.5*h),l=b.graphicOpacity||b.fillOpacity;a.setAttributeNS(null,"x",(f.x+j).toFixed());a.setAttributeNS(null,"y",(f.y+k).toFixed());a.setAttributeNS(null,"width",g);a.setAttributeNS(null,"height",h);a.setAttributeNS(this.xlinkns,"href",b.externalGraphic);a.setAttributeNS(null,"style","opacity: "+l)}else if(this.isComplexSymbol(b.graphicName)){var m=b.pointRadius*3,p=m*2,q=this.importSymbol(b.graphicName),n="#"+q;f=this.getPosition(a);e=this.symbolSize[q]/p;var o=a.parentNode,r=a.nextSibling;o&&o.removeChild(a);a.setAttributeNS(this.xlinkns,"href",n);a.setAttributeNS(null,"width",p);a.setAttributeNS(null,"height",p);a.setAttributeNS(null,"x",f.x-m);a.setAttributeNS(null,"y",f.y-m);if(r)o.insertBefore(a,r);else o&&o.appendChild(a)}else a.setAttributeNS(null,"r",b.pointRadius);if(typeof b.rotation!="undefined"&&f){var s=OpenLayers.String.format("rotate(${0} ${1} ${2})",[b.rotation,f.x,f.y]);a.setAttributeNS(null,"transform",s)}}if(c.isFilled){a.setAttributeNS(null,"fill",b.fillColor);a.setAttributeNS(null,"fill-opacity",b.fillOpacity)}else a.setAttributeNS(null,"fill","none");if(c.isStroked){a.setAttributeNS(null,"stroke",b.strokeColor);a.setAttributeNS(null,"stroke-opacity",b.strokeOpacity);a.setAttributeNS(null,"stroke-width",b.strokeWidth*e);a.setAttributeNS(null,"stroke-linecap",b.strokeLinecap);a.setAttributeNS(null,"stroke-linejoin","round");a.setAttributeNS(null,"stroke-dasharray",this.dashStyle(b,e))}else a.setAttributeNS(null,"stroke","none");b.pointerEvents&&a.setAttributeNS(null,"pointer-events",b.pointerEvents);b.cursor!=null&&a.setAttributeNS(null,"cursor",b.cursor);return a},dashStyle:function(a,b){var c=a.strokeWidth*b;switch(a.strokeDashstyle){case"solid":return"none";case"dot":return[1,4*c].join();case"dash":return[4*c,4*c].join();case"dashdot":return[4*c,4*c,1,4*c].join();case"longdash":return[8*c,4*c].join();case"longdashdot":return[8*c,4*c,1,4*c].join();default:return a.strokeDashstyle.replace(/ /g,",")}},createNode:function(a,b){var c=document.createElementNS(this.xmlns,a);b&&c.setAttributeNS(null,"id",b);return c},nodeTypeCompare:function(a,b){return b==a.nodeName},createRenderRoot:function(){return this.nodeFactory(this.container.id+"_svgRoot","svg")},createRoot:function(a){return this.nodeFactory(this.container.id+a,"g")},createDefs:function(){var a=this.nodeFactory(this.container.id+"_defs","defs");this.rendererRoot.appendChild(a);return a},drawPoint:function(a,b){return this.drawCircle(a,b,1)},drawCircle:function(a,b,c){var d=this.getResolution(),e=b.x/d+this.left,f=this.top-b.y/d;if(this.inValidRange(e,f)){a.setAttributeNS(null,"cx",e);a.setAttributeNS(null,"cy",f);a.setAttributeNS(null,"r",c);return a}else return false},drawLineString:function(a,b){var c=this.getComponentsString(b.components);if(c.path){a.setAttributeNS(null,"points",c.path);return c.complete?a:null}else return false},drawLinearRing:function(a,b){var c=this.getComponentsString(b.components);if(c.path){a.setAttributeNS(null,"points",c.path);return c.complete?a:null}else return false},drawPolygon:function(a,b){for(var c="",d=true,e=true,f,g,h=0,j=b.components.length;h<j;h++){c+=" M";f=this.getComponentsString(b.components[h].components," ");if(g=f.path){c+=" "+g;e=f.complete&&e}else d=false}c+=" z";if(d){a.setAttributeNS(null,"d",c);a.setAttributeNS(null,"fill-rule","evenodd");return e?a:null}else return false},drawRectangle:function(a,b){var c=this.getResolution(),d=b.x/c+this.left,e=this.top-b.y/c;if(this.inValidRange(d,e)){a.setAttributeNS(null,"x",d);a.setAttributeNS(null,"y",e);a.setAttributeNS(null,"width",b.width/c);a.setAttributeNS(null,"height",b.height/c);return a}else return false},drawSurface:function(a,b){for(var c=null,d=true,e=0,f=b.components.length;e<f;e++)if(e%3==0&&e/3==0){var g=this.getShortString(b.components[e]);g||(d=false);c="M "+g}else if(e%3==1){(g=this.getShortString(b.components[e]))||(d=false);c+=" C "+g}else{(g=this.getShortString(b.components[e]))||(d=false);c+=" "+g}c+=" Z";if(d){a.setAttributeNS(null,"d",c);return a}else return false},drawText:function(a,b,c){var d=this.getResolution(),e=c.x/d+this.left,f=c.y/d-this.top,g=this.nodeFactory(a+this.LABEL_ID_SUFFIX,"text"),h=this.nodeFactory(a+this.LABEL_ID_SUFFIX+"_tspan","tspan");g.setAttributeNS(null,"x",e);g.setAttributeNS(null,"y",-f);g.setAttributeNS(null,"pointer-events","none");b.fontColor&&g.setAttributeNS(null,"fill",b.fontColor);b.fontFamily&&g.setAttributeNS(null,"font-family",b.fontFamily);b.fontSize&&g.setAttributeNS(null,"font-size",b.fontSize);b.fontWeight&&g.setAttributeNS(null,"font-weight",b.fontWeight);var j=b.labelAlign||"cm";g.setAttributeNS(null,"text-anchor",OpenLayers.Renderer.SVG.LABEL_ALIGN[j[0]]||"middle");this.isGecko?g.setAttributeNS(null,"dominant-baseline",OpenLayers.Renderer.SVG.LABEL_ALIGN[j[1]]||"central"):h.setAttributeNS(null,"baseline-shift",OpenLayers.Renderer.SVG.LABEL_VSHIFT[j[1]]||"-35%");h.textContent=b.label;if(!g.parentNode){g.appendChild(h);this.textRoot.appendChild(g)}},getComponentsString:function(a,b){for(var c=[],d=true,e=a.length,f=[],g,h,j=0;j<e;j++){h=a[j];c.push(h);if(g=this.getShortString(h))f.push(g);else{j>0&&this.getShortString(a[j-1])&&f.push(this.clipLine(a[j],a[j-1]));j<e-1&&this.getShortString(a[j+1])&&f.push(this.clipLine(a[j],a[j+1]));d=false}}return{path:f.join(b||","),complete:d}},clipLine:function(a,b){if(b.equals(a))return"";var c=this.getResolution(),d=this.MAX_PIXEL-this.translationParameters.x,e=this.MAX_PIXEL-this.translationParameters.y,f=b.x/c+this.left,g=this.top-b.y/c,h=a.x/c+this.left,j=this.top-a.y/c,k;if(h<-d||h>d){k=(j-g)/(h-f);h=h<0?-d:d;j=g+(h-f)*k}if(j<-e||j>e){k=(h-f)/(j-g);j=j<0?-e:e;h=f+(j-g)*k}return h+","+j},getShortString:function(a){var b=this.getResolution(),c=a.x/b+this.left,d=this.top-a.y/b;return this.inValidRange(c,d)?c+","+d:false},getPosition:function(a){return{x:parseFloat(a.getAttributeNS(null,"cx")),y:parseFloat(a.getAttributeNS(null,"cy"))}},importSymbol:function(a){if(!this.defs)this.defs=this.createDefs();var b=this.container.id+"-"+a;if(document.getElementById(b)!=null)return b;var c=OpenLayers.Renderer.symbol[a];if(c){var d=this.nodeFactory(b,"symbol"),e=this.nodeFactory(null,"polygon");d.appendChild(e);for(var f=new OpenLayers.Bounds(Number.MAX_VALUE,Number.MAX_VALUE,0,0),g="",h,j,k=0;k<c.length;k+=2){h=c[k];j=c[k+1];f.left=Math.min(f.left,h);f.bottom=Math.min(f.bottom,j);f.right=Math.max(f.right,h);f.top=Math.max(f.top,j);g+=" "+h+","+j}e.setAttributeNS(null,"points",g);var l=f.getWidth(),m=f.getHeight(),p=[f.left-l,f.bottom-m,l*3,m*3];d.setAttributeNS(null,"viewBox",p.join(" "));this.symbolSize[b]=Math.max(l,m)*3;this.defs.appendChild(d);return d.id}else throw new Error(a+" is not a valid symbol name");},CLASS_NAME:"OpenLayers.Renderer.SVG"});OpenLayers.Renderer.SVG.LABEL_ALIGN={l:"start",r:"end",b:"bottom",t:"hanging"};OpenLayers.Renderer.SVG.LABEL_VSHIFT={t:"-70%",b:"0"};OpenLayers.Tile.Image=OpenLayers.Class(OpenLayers.Tile,{url:null,imgDiv:null,frame:null,layerAlphaHack:null,isBackBuffer:false,lastRatio:1,isFirstDraw:true,backBufferTile:null,initialize:function(a,b,c,d){OpenLayers.Tile.prototype.initialize.apply(this,arguments);this.url=d;this.frame=document.createElement("div");this.frame.style.overflow="hidden";this.frame.style.position="absolute";this.layerAlphaHack=this.layer.alpha&&OpenLayers.Util.alphaHack()},destroy:function(){if(this.imgDiv!=null){this.layerAlphaHack&&OpenLayers.Event.stopObservingElement(this.imgDiv.childNodes[0].id);OpenLayers.Event.stopObservingElement(this.imgDiv.id);if(this.imgDiv.parentNode==this.frame){this.frame.removeChild(this.imgDiv);this.imgDiv.map=null}this.imgDiv.urls=null;this.imgDiv.src=OpenLayers.Util.getImagesLocation()+"blank.gif"}this.imgDiv=null;this.frame!=null&&this.frame.parentNode==this.layer.div&&this.layer.div.removeChild(this.frame);this.frame=null;if(this.backBufferTile){this.backBufferTile.destroy();this.backBufferTile=null}this.layer.events.unregister("loadend",this,this.resetBackBuffer);OpenLayers.Tile.prototype.destroy.apply(this,arguments)},clone:function(a){if(a==null)a=new OpenLayers.Tile.Image(this.layer,this.position,this.bounds,this.url,this.size);a=OpenLayers.Tile.prototype.clone.apply(this,[a]);a.imgDiv=null;return a},draw:function(){if(this.layer!=this.layer.map.baseLayer&&this.layer.reproject)this.bounds=this.getBoundsFromBaseLayer(this.position);var a=OpenLayers.Tile.prototype.draw.apply(this,arguments);if(OpenLayers.Util.indexOf(this.layer.SUPPORTED_TRANSITIONS,this.layer.transitionEffect)!=-1)if(a){if(!this.backBufferTile){this.backBufferTile=this.clone();this.backBufferTile.hide();this.backBufferTile.isBackBuffer=true;this.events.register("loadend",this,this.resetBackBuffer);this.layer.events.register("loadend",this,this.resetBackBuffer)}this.startTransition()}else this.backBufferTile&&this.backBufferTile.clear();else if(a&&this.isFirstDraw){this.events.register("loadend",this,this.showTile);this.isFirstDraw=false}if(!a)return false;if(this.isLoading)this.events.triggerEvent("reload");else{this.isLoading=true;this.events.triggerEvent("loadstart")}return this.renderTile()},resetBackBuffer:function(){this.showTile();if(this.backBufferTile&&(this.isFirstDraw||!this.layer.numLoadingTiles)){this.isFirstDraw=false;var a=this.layer.maxExtent,b=a&&this.bounds.intersectsBounds(a,false);if(b){this.backBufferTile.position=this.position;this.backBufferTile.bounds=this.bounds;this.backBufferTile.size=this.size;this.backBufferTile.imageSize=this.layer.imageSize||this.size;this.backBufferTile.imageOffset=this.layer.imageOffset;this.backBufferTile.resolution=this.layer.getResolution();this.backBufferTile.renderTile()}this.backBufferTile.hide()}},renderTile:function(){this.imgDiv==null&&this.initImgDiv();this.imgDiv.viewRequestID=this.layer.map.viewRequestID;if(this.layer.async)this.layer.getURLasync(this.bounds,this,"url",this.positionImage);else{if(this.layer.url instanceof Array)this.imgDiv.urls=this.layer.url.slice();this.url=this.layer.getURL(this.bounds);this.positionImage()}return true},positionImage:function(){if(this.layer!=null){OpenLayers.Util.modifyDOMElement(this.frame,null,this.position,this.size);var a=this.layer.getImageSize();if(this.layerAlphaHack)OpenLayers.Util.modifyAlphaImageDiv(this.imgDiv,null,null,a,this.url);else{OpenLayers.Util.modifyDOMElement(this.imgDiv,null,null,a);this.imgDiv.src=this.url}}},clear:function(){if(this.imgDiv){this.hide();if(OpenLayers.Tile.Image.useBlankTile)this.imgDiv.src=OpenLayers.Util.getImagesLocation()+"blank.gif"}},initImgDiv:function(){var a=this.layer.imageOffset,b=this.layer.getImageSize();this.imgDiv=this.layerAlphaHack?OpenLayers.Util.createAlphaImageDiv(null,a,b,null,"relative",null,null,null,true):OpenLayers.Util.createImage(null,a,b,null,"relative",null,null,true);this.imgDiv.className="olTileImage";this.frame.style.zIndex=this.isBackBuffer?0:1;this.frame.appendChild(this.imgDiv);this.layer.div.appendChild(this.frame);this.layer.opacity!=null&&OpenLayers.Util.modifyDOMElement(this.imgDiv,null,null,null,null,null,null,this.layer.opacity);this.imgDiv.map=this.layer.map;function c(){if(this.isLoading){this.isLoading=false;this.events.triggerEvent("loadend")}}this.layerAlphaHack?OpenLayers.Event.observe(this.imgDiv.childNodes[0],"load",OpenLayers.Function.bind(c,this)):OpenLayers.Event.observe(this.imgDiv,"load",OpenLayers.Function.bind(c,this));function d(){this.imgDiv._attempts>OpenLayers.IMAGE_RELOAD_ATTEMPTS&&c.call(this)}OpenLayers.Event.observe(this.imgDiv,"error",OpenLayers.Function.bind(d,this))},checkImgURL:function(){if(this.layer){var a=this.layerAlphaHack?this.imgDiv.firstChild.src:this.imgDiv.src;OpenLayers.Util.isEquivalentUrl(a,this.url)||this.hide()}},startTransition:function(){if(this.backBufferTile&&this.backBufferTile.imgDiv){var a=1;if(this.backBufferTile.resolution)a=this.backBufferTile.resolution/this.layer.getResolution();if(a!=this.lastRatio){if(this.layer.transitionEffect=="resize"){var b=new OpenLayers.LonLat(this.backBufferTile.bounds.left,this.backBufferTile.bounds.top),c=new OpenLayers.Size(this.backBufferTile.size.w*a,this.backBufferTile.size.h*a),d=this.layer.map.getLayerPxFromLonLat(b);OpenLayers.Util.modifyDOMElement(this.backBufferTile.frame,null,d,c);var e=this.backBufferTile.imageSize;e=new OpenLayers.Size(e.w*a,e.h*a);var f=this.backBufferTile.imageOffset;if(f)f=new OpenLayers.Pixel(f.x*a,f.y*a);OpenLayers.Util.modifyDOMElement(this.backBufferTile.imgDiv,null,f,e);this.backBufferTile.show()}}else this.layer.singleTile?this.backBufferTile.show():this.backBufferTile.hide();this.lastRatio=a}},show:function(){this.frame.style.display="";if(OpenLayers.Util.indexOf(this.layer.SUPPORTED_TRANSITIONS,this.layer.transitionEffect)!=-1)if(navigator.userAgent.toLowerCase().indexOf("gecko")!=-1)this.frame.scrollLeft=this.frame.scrollLeft},hide:function(){this.frame.style.display="none"},CLASS_NAME:"OpenLayers.Tile.Image"});OpenLayers.Tile.Image.useBlankTile=OpenLayers.Util.getBrowserName()=="safari"||OpenLayers.Util.getBrowserName()=="opera";OpenLayers.Request={DEFAULT_CONFIG:{method:"GET",url:window.location.href,async:true,user:undefined,password:undefined,params:null,proxy:OpenLayers.ProxyHost,headers:{},data:null,callback:function(){},success:null,failure:null,scope:null},events:new OpenLayers.Events(this,null,["complete","success","failure"]),issue:function(a){var b=OpenLayers.Util.extend(this.DEFAULT_CONFIG,{proxy:OpenLayers.ProxyHost});a=OpenLayers.Util.applyDefaults(a,b);var c=new OpenLayers.Request.XMLHttpRequest,d=a.url;if(a.params){var e=OpenLayers.Util.getParameterString(a.params);if(e.length>0){var f=d.indexOf("?")>-1?"&":"?";d+=f+e}}if(a.proxy&&d.indexOf("http")==0)d=a.proxy+encodeURIComponent(d);c.open(a.method,d,a.async,a.user,a.password);for(var g in a.headers)c.i(g,a.headers[g]);var h=a.scope?OpenLayers.Function.bind(a.callback,a.scope):a.callback,j;if(a.success)j=a.scope?OpenLayers.Function.bind(a.success,a.scope):a.success;var k;if(a.failure)k=a.scope?OpenLayers.Function.bind(a.failure,a.scope):a.failure;var l=this.events;c.onreadystatechange=function(){if(c.d==OpenLayers.Request.XMLHttpRequest.DONE){var m=l.triggerEvent("complete",{request:c,config:a,requestUrl:d});if(m!==false){h(c);if(!c.status||c.status>=200&&c.status<300){l.triggerEvent("success",{request:c,config:a,requestUrl:d});j&&j(c)}if(c.status&&(c.status<200||c.status>=300)){l.triggerEvent("failure",{request:c,config:a,requestUrl:d});k&&k(c)}}}};a.async===false?c.send(a.data):window.setTimeout(function(){c.send(a.data)},0);return c},GET:function(a){a=OpenLayers.Util.extend(a,{method:"GET"});return OpenLayers.Request.issue(a)},POST:function(a){a=OpenLayers.Util.extend(a,{method:"POST"});a.headers=a.headers?a.headers:{};"CONTENT-TYPE"in OpenLayers.Util.upperCaseObject(a.headers)||(a.headers["Content-Type"]="application/xml");return OpenLayers.Request.issue(a)},PUT:function(a){a=OpenLayers.Util.extend(a,{method:"PUT"});a.headers=a.headers?a.headers:{};"CONTENT-TYPE"in OpenLayers.Util.upperCaseObject(a.headers)||(a.headers["Content-Type"]="application/xml");return OpenLayers.Request.issue(a)},DELETE:function(a){a=OpenLayers.Util.extend(a,{method:"DELETE"});return OpenLayers.Request.issue(a)},HEAD:function(a){a=OpenLayers.Util.extend(a,{method:"HEAD"});return OpenLayers.Request.issue(a)},OPTIONS:function(a){a=OpenLayers.Util.extend(a,{method:"OPTIONS"});return OpenLayers.Request.issue(a)}};OpenLayers.Handler=OpenLayers.Class({id:null,control:null,map:null,keyMask:null,active:false,evt:null,initialize:function(a,b,c){OpenLayers.Util.extend(this,c);this.control=a;this.callbacks=b;a.map&&this.setMap(a.map);OpenLayers.Util.extend(this,c);this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")},setMap:function(a){this.map=a},checkModifiers:function(a){if(this.keyMask==null)return true;var b=(a.shiftKey?OpenLayers.Handler.MOD_SHIFT:0)|(a.ctrlKey?OpenLayers.Handler.MOD_CTRL:0)|(a.altKey?OpenLayers.Handler.MOD_ALT:0);return b==this.keyMask},activate:function(){if(this.active)return false;for(var a=OpenLayers.Events.prototype.BROWSER_EVENTS,b=0,c=a.length;b<c;b++)this[a[b]]&&this.register(a[b],this[a[b]]);return this.active=true},deactivate:function(){if(!this.active)return false;for(var a=OpenLayers.Events.prototype.BROWSER_EVENTS,b=0,c=a.length;b<c;b++)this[a[b]]&&this.unregister(a[b],this[a[b]]);this.active=false;return true},callback:function(a,b){a&&this.callbacks[a]&&this.callbacks[a].apply(this.control,b)},register:function(a,b){this.map.events.registerPriority(a,this,b);this.map.events.registerPriority(a,this,this.setEvent)},unregister:function(a,b){this.map.events.unregister(a,this,b);this.map.events.unregister(a,this,this.setEvent)},setEvent:function(a){this.evt=a;return true},destroy:function(){this.deactivate();this.control=this.map=null},CLASS_NAME:"OpenLayers.Handler"});OpenLayers.Handler.MOD_NONE=0;OpenLayers.Handler.MOD_SHIFT=1;OpenLayers.Handler.MOD_CTRL=2;OpenLayers.Handler.MOD_ALT=4;OpenLayers.Map=OpenLayers.Class({Z_INDEX_BASE:{BaseLayer:100,Overlay:325,Feature:725,Popup:750,Control:1E3},EVENT_TYPES:["preaddlayer","addlayer","removelayer","changelayer","movestart","move","moveend","zoomend","popupopen","popupclose","addmarker","removemarker","clearmarkers","mouseover","mouseout","mousemove","dragstart","drag","dragend","changebaselayer"],id:null,fractionalZoom:false,events:null,allOverlays:false,div:null,dragging:false,size:null,viewPortDiv:null,layerContainerOrigin:null,layerContainerDiv:null,layers:null,controls:null,popups:null,baseLayer:null,center:null,resolution:null,zoom:0,panRatio:1.5,viewRequestID:0,tileSize:null,projection:"EPSG:4326",units:"degrees",resolutions:null,maxResolution:1.40625,minResolution:null,maxScale:null,minScale:null,maxExtent:null,minExtent:null,restrictedExtent:null,numZoomLevels:16,theme:null,displayProjection:null,fallThrough:true,panTween:null,eventListeners:null,panMethod:OpenLayers.Easing.Expo.easeOut,panDuration:50,paddingForPopups:null,initialize:function(a,b){if(arguments.length===1&&typeof a==="object")a=(b=a)&&b.div;this.tileSize=new OpenLayers.Size(OpenLayers.Map.TILE_WIDTH,OpenLayers.Map.TILE_HEIGHT);this.maxExtent=new OpenLayers.Bounds(-180,-90,180,90);this.paddingForPopups=new OpenLayers.Bounds(15,15,15,15);this.theme=OpenLayers._getScriptLocation()+"theme/default/style.css";OpenLayers.Util.extend(this,b);this.id=OpenLayers.Util.createUniqueID("OpenLayers.Map_");this.div=OpenLayers.Util.getElement(a);if(!this.div){this.div=document.createElement("div");this.div.style.height="1px";this.div.style.width="1px"}OpenLayers.Element.addClass(this.div,"olMap");var c=this.div.id+"_OpenLayers_ViewPort";this.viewPortDiv=OpenLayers.Util.createDiv(c,null,null,null,"relative",null,"hidden");this.viewPortDiv.style.width="100%";this.viewPortDiv.style.height="100%";this.viewPortDiv.className="olMapViewport";this.div.appendChild(this.viewPortDiv);c=this.div.id+"_OpenLayers_Container";this.layerContainerDiv=OpenLayers.Util.createDiv(c);this.layerContainerDiv.style.zIndex=this.Z_INDEX_BASE.Popup-1;this.viewPortDiv.appendChild(this.layerContainerDiv);this.events=new OpenLayers.Events(this,this.div,this.EVENT_TYPES,this.fallThrough,{includeXY:true});this.updateSize();this.eventListeners instanceof Object&&this.events.on(this.eventListeners);this.events.register("movestart",this,this.updateSize);if(OpenLayers.String.contains(navigator.appName,"Microsoft"))this.events.register("resize",this,this.updateSize);else{this.updateSizeDestroy=OpenLayers.Function.bind(this.updateSize,this);OpenLayers.Event.observe(window,"resize",this.updateSizeDestroy)}if(this.theme){for(var d=true,e=document.getElementsByTagName("link"),f=0,g=e.length;f<g;++f)if(OpenLayers.Util.isEquivalentUrl(e.item(f).href,this.theme)){d=false;break}if(d){var h=document.createElement("link");h.setAttribute("rel","stylesheet");h.setAttribute("type","text/css");h.setAttribute("href",this.theme);document.getElementsByTagName("head")[0].appendChild(h)}}this.layers=[];if(this.controls==null)this.controls=OpenLayers.Control!=null?[new OpenLayers.Control.Navigation,new OpenLayers.Control.PanZoom,new OpenLayers.Control.ArgParser,new OpenLayers.Control.Attribution]:[];f=0;for(g=this.controls.length;f<g;f++)this.addControlToMap(this.controls[f]);this.popups=[];this.unloadDestroy=OpenLayers.Function.bind(this.destroy,this);OpenLayers.Event.observe(window,"unload",this.unloadDestroy)},render:function(a){this.div=OpenLayers.Util.getElement(a);OpenLayers.Element.addClass(this.div,"olMap");this.events.attachToElement(this.div);this.viewPortDiv.parentNode.removeChild(this.viewPortDiv);this.div.appendChild(this.viewPortDiv);this.updateSize()},unloadDestroy:null,updateSizeDestroy:null,destroy:function(){if(!this.unloadDestroy)return false;OpenLayers.Event.stopObserving(window,"unload",this.unloadDestroy);this.unloadDestroy=null;this.updateSizeDestroy?OpenLayers.Event.stopObserving(window,"resize",this.updateSizeDestroy):this.events.unregister("resize",this,this.updateSize);this.paddingForPopups=null;if(this.controls!=null){for(var a=this.controls.length-1;a>=0;--a)this.controls[a].destroy();this.controls=null}if(this.layers!=null){for(a=this.layers.length-1;a>=0;--a)this.layers[a].destroy(false);this.layers=null}this.viewPortDiv&&this.div.removeChild(this.viewPortDiv);this.viewPortDiv=null;if(this.eventListeners){this.events.un(this.eventListeners);this.eventListeners=null}this.events.destroy();this.events=null},setOptions:function(a){OpenLayers.Util.extend(this,a)},getTileSize:function(){return this.tileSize},getBy:function(a,b,c){var d=typeof c.test=="function",e=OpenLayers.Array.filter(this[a],function(f){return f[b]==c||d&&c.test(f[b])});return e},getLayersBy:function(a,b){return this.getBy("layers",a,b)},getLayersByName:function(a){return this.getLayersBy("name",a)},getLayersByClass:function(a){return this.getLayersBy("CLASS_NAME",a)},getControlsBy:function(a,b){return this.getBy("controls",a,b)},getControlsByClass:function(a){return this.getControlsBy("CLASS_NAME",a)},getLayer:function(a){for(var b=null,c=0,d=this.layers.length;c<d;c++){var e=this.layers[c];if(e.id==a){b=e;break}}return b},setLayerZIndex:function(a,b){a.setZIndex(this.Z_INDEX_BASE[a.isBaseLayer?"BaseLayer":"Overlay"]+b*5)},resetLayersZIndex:function(){for(var a=0,b=this.layers.length;a<b;a++){var c=this.layers[a];this.setLayerZIndex(c,a)}},addLayer:function(a){for(var b=0,c=this.layers.length;b<c;b++)if(this.layers[b]==a){var d=OpenLayers.i18n("layerAlreadyAdded",{layerName:a.name});OpenLayers.Console.warn(d);return false}if(this.allOverlays)a.isBaseLayer=false;this.events.triggerEvent("preaddlayer",{layer:a});a.div.className="olLayerDiv";a.div.style.overflow="";this.setLayerZIndex(a,this.layers.length);a.isFixed?this.viewPortDiv.appendChild(a.div):this.layerContainerDiv.appendChild(a.div);this.layers.push(a);a.setMap(this);if(a.isBaseLayer||this.allOverlays&&!this.baseLayer)this.baseLayer==null?this.setBaseLayer(a):a.setVisibility(false);else a.redraw();this.events.triggerEvent("addlayer",{layer:a});a.afterAdd()},addLayers:function(a){for(var b=0,c=a.length;b<c;b++)this.addLayer(a[b])},removeLayer:function(a,b){if(b==null)b=true;a.isFixed?this.viewPortDiv.removeChild(a.div):this.layerContainerDiv.removeChild(a.div);OpenLayers.Util.removeItem(this.layers,a);a.removeMap(this);a.map=null;if(this.baseLayer==a){this.baseLayer=null;if(b)for(var c=0,d=this.layers.length;c<d;c++){var e=this.layers[c];if(e.isBaseLayer||this.allOverlays){this.setBaseLayer(e);break}}}this.resetLayersZIndex();this.events.triggerEvent("removelayer",{layer:a})},getNumLayers:function(){return this.layers.length},getLayerIndex:function(a){return OpenLayers.Util.indexOf(this.layers,a)},setLayerIndex:function(a,b){var c=this.getLayerIndex(a);if(b<0)b=0;else if(b>this.layers.length)b=this.layers.length;if(c!=b){this.layers.splice(c,1);this.layers.splice(b,0,a);for(var d=0,e=this.layers.length;d<e;d++)this.setLayerZIndex(this.layers[d],d);this.events.triggerEvent("changelayer",{layer:a,property:"order"});if(this.allOverlays)if(b===0)this.setBaseLayer(a);else this.baseLayer!==this.layers[0]&&this.setBaseLayer(this.layers[0])}},raiseLayer:function(a,b){var c=this.getLayerIndex(a)+b;this.setLayerIndex(a,c)},setBaseLayer:function(a){var b=null;if(this.baseLayer)b=this.baseLayer.getExtent();if(a!=this.baseLayer)if(OpenLayers.Util.indexOf(this.layers,a)!=-1){this.baseLayer!=null&&!this.allOverlays&&this.baseLayer.setVisibility(false);this.baseLayer=a;this.viewRequestID++;if(!this.allOverlays)this.baseLayer.visibility=true;var c=this.getCenter();if(c!=null){var d=b?b.getCenterLonLat():c,e=b?this.getZoomForExtent(b,true):this.getZoomForResolution(this.resolution,true);this.setCenter(d,e,false,true)}this.events.triggerEvent("changebaselayer",{layer:this.baseLayer})}},addControl:function(a,b){this.controls.push(a);this.addControlToMap(a,b)},addControlToMap:function(a,b){a.outsideViewport=a.div!=null;if(this.displayProjection&&!a.displayProjection)a.displayProjection=this.displayProjection;a.setMap(this);var c=a.draw(b);if(c)if(!a.outsideViewport){c.style.zIndex=this.Z_INDEX_BASE.Control+this.controls.length;this.viewPortDiv.appendChild(c)}},getControl:function(a){for(var b=null,c=0,d=this.controls.length;c<d;c++){var e=this.controls[c];if(e.id==a){b=e;break}}return b},removeControl:function(a){if(a&&a==this.getControl(a.id)){a.div&&a.div.parentNode==this.viewPortDiv&&this.viewPortDiv.removeChild(a.div);OpenLayers.Util.removeItem(this.controls,a)}},addPopup:function(a,b){if(b)for(var c=this.popups.length-1;c>=0;--c)this.removePopup(this.popups[c]);a.map=this;this.popups.push(a);var d=a.draw();if(d){d.style.zIndex=this.Z_INDEX_BASE.Popup+this.popups.length;this.layerContainerDiv.appendChild(d)}},removePopup:function(a){OpenLayers.Util.removeItem(this.popups,a);if(a.div)try{this.layerContainerDiv.removeChild(a.div)}catch(b){}a.map=null},getSize:function(){var a=null;if(this.size!=null)a=this.size.clone();return a},updateSize:function(){this.events.clearMouseCache();var a=this.getCurrentSize(),b=this.getSize();if(b==null)this.size=b=a;if(!a.equals(b)){this.size=a;for(var c=0,d=this.layers.length;c<d;c++)this.layers[c].onMapResize();if(this.baseLayer!=null){var e=new OpenLayers.Pixel(a.w/2,a.h/2);this.getLonLatFromViewPortPx(e);var f=this.getZoom();this.zoom=null;this.setCenter(this.getCenter(),f)}}},getCurrentSize:function(){var a=new OpenLayers.Size(this.div.clientWidth,this.div.clientHeight);if(a.w==0&&a.h==0||isNaN(a.w)&&isNaN(a.h)){var b=OpenLayers.Element.getDimensions(this.div);a.w=b.width;a.h=b.height}if(a.w==0&&a.h==0||isNaN(a.w)&&isNaN(a.h)){a.w=parseInt(this.div.style.width);a.h=parseInt(this.div.style.height)}return a},calculateBounds:function(a,b){var c=null;if(a==null)a=this.getCenter();if(b==null)b=this.getResolution();if(a!=null&&b!=null){var d=this.getSize(),e=d.w*b,f=d.h*b;c=new OpenLayers.Bounds(a.lon-e/2,a.lat-f/2,a.lon+e/2,a.lat+f/2)}return c},getCenter:function(){var a=null;if(this.center)a=this.center.clone();return a},getZoom:function(){return this.zoom},pan:function(a,b,c){c=OpenLayers.Util.applyDefaults(c,{animate:true,dragging:false});var d=this.getViewPortPxFromLonLat(this.getCenter()),e=d.add(a,b);if(!c.dragging||!e.equals(d)){var f=this.getLonLatFromViewPortPx(e);c.animate?this.panTo(f):this.setCenter(f,null,c.dragging)}},panTo:function(a){if(this.panMethod&&this.getExtent().scale(this.panRatio).containsLonLat(a)){if(!this.panTween)this.panTween=new OpenLayers.Tween(this.panMethod);var b=this.getCenter();if(!(a.lon==b.lon&&a.lat==b.lat)){var c={lon:b.lon,lat:b.lat},d={lon:a.lon,lat:a.lat};this.panTween.start(c,d,this.panDuration,{callbacks:{start:OpenLayers.Function.bind(function(){this.events.triggerEvent("movestart")},this),eachStep:OpenLayers.Function.bind(function(e){e=new OpenLayers.LonLat(e.lon,e.lat);this.moveTo(e,this.zoom,{dragging:true,noEvent:true})},this),done:OpenLayers.Function.bind(function(e){e=new OpenLayers.LonLat(e.lon,e.lat);this.moveTo(e,this.zoom,{noEvent:true});this.events.triggerEvent("moveend")},this)}})}}else this.setCenter(a)},setCenter:function(a,b,c,d){this.moveTo(a,b,{dragging:c,forceZoomChange:d,caller:"setCenter"})},moveTo:function(a,b,c){c||(c={});var d=c.dragging,e=c.forceZoomChange,f=c.noEvent;this.panTween&&c.caller=="setCenter"&&this.panTween.stop();if(!this.center&&!this.isValidLonLat(a))a=this.maxExtent.getCenterLonLat();if(this.restrictedExtent!=null){if(a==null)a=this.getCenter();if(b==null)b=this.getZoom();var g=this.getResolutionForZoom(b),h=this.calculateBounds(a,g);if(!this.restrictedExtent.containsBounds(h)){var j=this.restrictedExtent.getCenterLonLat();if(h.getWidth()>this.restrictedExtent.getWidth())a=new OpenLayers.LonLat(j.lon,a.lat);else if(h.left<this.restrictedExtent.left)a=a.add(this.restrictedExtent.left-
h.left,0);else if(h.right>this.restrictedExtent.right)a=a.add(this.restrictedExtent.right-h.right,0);if(h.getHeight()>this.restrictedExtent.getHeight())a=new OpenLayers.LonLat(a.lon,j.lat);else if(h.bottom<this.restrictedExtent.bottom)a=a.add(0,this.restrictedExtent.bottom-h.bottom);else if(h.top>this.restrictedExtent.top)a=a.add(0,this.restrictedExtent.top-h.top)}}var k=e||this.isValidZoomLevel(b)&&b!=this.getZoom(),l=this.isValidLonLat(a)&&!a.equals(this.center);if(k||l||!d){!this.dragging&&!f&&this.events.triggerEvent("movestart");if(l){!k&&this.center&&this.centerLayerContainer(a);this.center=a.clone()}if(k||this.layerContainerOrigin==null){this.layerContainerOrigin=this.center.clone();this.layerContainerDiv.style.left="0px";this.layerContainerDiv.style.top="0px"}if(k){this.zoom=b;this.resolution=this.getResolutionForZoom(b);this.viewRequestID++}var m=this.getExtent();if(this.baseLayer.visibility){this.baseLayer.moveTo(m,k,d);d?this.baseLayer.events.triggerEvent("move"):this.baseLayer.events.triggerEvent("moveend",{zoomChanged:k})}m=this.baseLayer.getExtent();for(var p=0,q=this.layers.length;p<q;p++){var n=this.layers[p];if(n!==this.baseLayer&&!n.isBaseLayer){var o=n.calculateInRange();if(n.inRange!=o){(n.inRange=o)||n.display(false);this.events.triggerEvent("changelayer",{layer:n,property:"visibility"})}if(o&&n.visibility){n.moveTo(m,k,d);d?n.events.triggerEvent("move"):n.events.triggerEvent("moveend",{zoomChanged:k})}}}if(k){p=0;for(q=this.popups.length;p<q;p++)this.popups[p].updatePosition()}this.events.triggerEvent("move");k&&this.events.triggerEvent("zoomend")}!d&&!f&&this.events.triggerEvent("moveend");this.dragging=!!d},centerLayerContainer:function(a){var b=this.getViewPortPxFromLonLat(this.layerContainerOrigin),c=this.getViewPortPxFromLonLat(a);if(b!=null&&c!=null){this.layerContainerDiv.style.left=Math.round(b.x-c.x)+"px";this.layerContainerDiv.style.top=Math.round(b.y-c.y)+"px"}},isValidZoomLevel:function(a){return a!=null&&a>=0&&a<this.getNumZoomLevels()},isValidLonLat:function(a){var b=false;if(a!=null){var c=this.getMaxExtent();b=c.containsLonLat(a)}return b},getProjection:function(){var a=this.getProjectionObject();return a?a.getCode():null},getProjectionObject:function(){var a=null;if(this.baseLayer!=null)a=this.baseLayer.projection;return a},getMaxResolution:function(){var a=null;if(this.baseLayer!=null)a=this.baseLayer.maxResolution;return a},getMaxExtent:function(a){var b=null;if(a&&a.restricted&&this.restrictedExtent)b=this.restrictedExtent;else if(this.baseLayer!=null)b=this.baseLayer.maxExtent;return b},getNumZoomLevels:function(){var a=null;if(this.baseLayer!=null)a=this.baseLayer.numZoomLevels;return a},getExtent:function(){var a=null;if(this.baseLayer!=null)a=this.baseLayer.getExtent();return a},getResolution:function(){var a=null;if(this.baseLayer!=null)a=this.baseLayer.getResolution();return a},getUnits:function(){var a=null;if(this.baseLayer!=null)a=this.baseLayer.units;return a},getScale:function(){var a=null;if(this.baseLayer!=null){var b=this.getResolution(),c=this.baseLayer.units;a=OpenLayers.Util.getScaleFromResolution(b,c)}return a},getZoomForExtent:function(a,b){var c=null;if(this.baseLayer!=null)c=this.baseLayer.getZoomForExtent(a,b);return c},getResolutionForZoom:function(a){var b=null;if(this.baseLayer)b=this.baseLayer.getResolutionForZoom(a);return b},getZoomForResolution:function(a,b){var c=null;if(this.baseLayer!=null)c=this.baseLayer.getZoomForResolution(a,b);return c},zoomTo:function(a){this.isValidZoomLevel(a)&&this.setCenter(null,a)},zoomIn:function(){this.zoomTo(this.getZoom()+
1)},zoomOut:function(){this.zoomTo(this.getZoom()-1)},zoomToExtent:function(a,b){var c=a.getCenterLonLat();if(this.baseLayer.wrapDateLine){var d=this.getMaxExtent();for(a=a.clone();a.right<a.left;)a.right+=d.getWidth();c=a.getCenterLonLat().wrapDateLine(d)}this.setCenter(c,this.getZoomForExtent(a,b))},zoomToMaxExtent:function(a){var b=a?a.restricted:true,c=this.getMaxExtent({restricted:b});this.zoomToExtent(c)},zoomToScale:function(a,b){var c=OpenLayers.Util.getResolutionFromScale(a,this.baseLayer.units),d=this.getSize(),e=d.w*c,f=d.h*c,g=this.getCenter(),h=new OpenLayers.Bounds(g.lon-e/2,g.lat-f/2,g.lon+e/2,g.lat+f/2);this.zoomToExtent(h,b)},getLonLatFromViewPortPx:function(a){var b=null;if(this.baseLayer!=null)b=this.baseLayer.getLonLatFromViewPortPx(a);return b},getViewPortPxFromLonLat:function(a){var b=null;if(this.baseLayer!=null)b=this.baseLayer.getViewPortPxFromLonLat(a);return b},getLonLatFromPixel:function(a){return this.getLonLatFromViewPortPx(a)},getPixelFromLonLat:function(a){var b=this.getViewPortPxFromLonLat(a);b.x=Math.round(b.x);b.y=Math.round(b.y);return b},getViewPortPxFromLayerPx:function(a){var b=null;if(a!=null){var c=parseInt(this.layerContainerDiv.style.left),d=parseInt(this.layerContainerDiv.style.top);b=a.add(c,d)}return b},getLayerPxFromViewPortPx:function(a){var b=null;if(a!=null){var c=-parseInt(this.layerContainerDiv.style.left),d=-parseInt(this.layerContainerDiv.style.top);b=a.add(c,d);if(isNaN(b.x)||isNaN(b.y))b=null}return b},getLonLatFromLayerPx:function(a){a=this.getViewPortPxFromLayerPx(a);return this.getLonLatFromViewPortPx(a)},getLayerPxFromLonLat:function(a){var b=this.getPixelFromLonLat(a);return this.getLayerPxFromViewPortPx(b)},CLASS_NAME:"OpenLayers.Map"});OpenLayers.Map.TILE_WIDTH=256;OpenLayers.Map.TILE_HEIGHT=256;OpenLayers.Marker=OpenLayers.Class({icon:null,lonlat:null,events:null,map:null,initialize:function(a,b){this.lonlat=a;var c=b?b:OpenLayers.Marker.defaultIcon();if(this.icon==null)this.icon=c;else{this.icon.url=c.url;this.icon.size=c.size;this.icon.offset=c.offset;this.icon.calculateOffset=c.calculateOffset}this.events=new OpenLayers.Events(this,this.icon.imageDiv,null)},destroy:function(){this.erase();this.map=null;this.events.destroy();this.events=null;if(this.icon!=null){this.icon.destroy();this.icon=null}},draw:function(a){return this.icon.draw(a)},erase:function(){this.icon!=null&&this.icon.erase()},moveTo:function(a){a!=null&&this.icon!=null&&this.icon.moveTo(a);this.lonlat=this.map.getLonLatFromLayerPx(a)},isDrawn:function(){var a=this.icon&&this.icon.isDrawn();return a},onScreen:function(){var a=false;if(this.map){var b=this.map.getExtent();a=b.containsLonLat(this.lonlat)}return a},inflate:function(a){if(this.icon){var b=new OpenLayers.Size(this.icon.size.w*a,this.icon.size.h*a);this.icon.setSize(b)}},setOpacity:function(a){this.icon.setOpacity(a)},setUrl:function(a){this.icon.setUrl(a)},display:function(a){this.icon.display(a)},CLASS_NAME:"OpenLayers.Marker"});OpenLayers.Marker.defaultIcon=function(){var a=OpenLayers.Util.getImagesLocation()+"marker.png",b=new OpenLayers.Size(21,25);function c(d){return new OpenLayers.Pixel(-(d.w/2),-d.h)}return new OpenLayers.Icon(a,b,null,c)};OpenLayers.Format.XML=OpenLayers.Class(OpenLayers.Format,{namespaces:null,namespaceAlias:null,defaultPrefix:null,readers:{},writers:{},xmldom:null,initialize:function(a){if(window.ActiveXObject)this.xmldom=new ActiveXObject("Microsoft.XMLDOM");OpenLayers.Format.prototype.initialize.apply(this,[a]);this.namespaces=OpenLayers.Util.extend({},this.namespaces);this.namespaceAlias={};for(var b in this.namespaces)this.namespaceAlias[this.namespaces[b]]=b},destroy:function(){this.xmldom=null;OpenLayers.Format.prototype.destroy.apply(this,arguments)},setNamespace:function(a,b){this.namespaces[a]=b;this.namespaceAlias[b]=a},read:function(a){var b=a.indexOf("<");if(b>0)a=a.substring(b);var c=OpenLayers.Util.Try(OpenLayers.Function.bind(function(){var d;d=window.ActiveXObject&&!this.xmldom?new ActiveXObject("Microsoft.XMLDOM"):this.xmldom;d.loadXML(a);return d},this),function(){return(new DOMParser).parseFromString(a,"text/xml")},function(){var d=new XMLHttpRequest;d.open("GET","data:text/xml;charset=utf-8,"+encodeURIComponent(a),false);d.overrideMimeType&&d.overrideMimeType("text/xml");d.send(null);return d.g});if(this.keepData)this.data=c;return c},write:function(a){var b;if(this.xmldom)b=a.xml;else{var c=new XMLSerializer;if(a.nodeType==1){var d=document.implementation.createDocument("","",null);if(d.importNode)a=d.importNode(a,true);d.appendChild(a);b=c.serializeToString(d)}else b=c.serializeToString(a)}return b},createElementNS:function(a,b){var c;return c=this.xmldom?typeof a=="string"?this.xmldom.createNode(1,b,a):this.xmldom.createNode(1,b,""):document.createElementNS(a,b)},createTextNode:function(a){var b;return b=this.xmldom?this.xmldom.createTextNode(a):document.createTextNode(a)},getElementsByTagNameNS:function(a,b,c){var d=[];if(a.getElementsByTagNameNS)d=a.getElementsByTagNameNS(b,c);else for(var e=a.getElementsByTagName("*"),f,g,h=0,j=e.length;h<j;++h){f=e[h];g=f.prefix?f.prefix+":"+c:c;if(c=="*"||g==f.nodeName)if(b=="*"||b==f.namespaceURI)d.push(f)}return d},getAttributeNodeNS:function(a,b,c){var d=null;if(a.getAttributeNodeNS)d=a.getAttributeNodeNS(b,c);else for(var e=a.attributes,f,g,h=0,j=e.length;h<j;++h){f=e[h];if(f.namespaceURI==b){g=f.prefix?f.prefix+":"+c:c;if(g==f.nodeName){d=f;break}}}return d},getAttributeNS:function(a,b,c){var d="";if(a.getAttributeNS)d=a.getAttributeNS(b,c)||"";else{var e=this.getAttributeNodeNS(a,b,c);if(e)d=e.nodeValue}return d},getChildValue:function(a,b){var c=b||"";if(a)for(var d=a.firstChild;d;d=d.nextSibling)switch(d.nodeType){case 3:case 4:c+=d.nodeValue}return c},concatChildValues:function(a,b){for(var c="",d=a.firstChild,e;d;){if(e=d.nodeValue)c+=e;d=d.nextSibling}if(c==""&&b!=undefined)c=b;return c},isSimpleContent:function(a){for(var b=true,c=a.firstChild;c;c=c.nextSibling)if(c.nodeType===1){b=false;break}return b},contentType:function(a){for(var b=false,c=false,d=OpenLayers.Format.XML.CONTENT_TYPE.EMPTY,e=a.firstChild;e;e=e.nextSibling){switch(e.nodeType){case 1:c=true;break;case 8:break;default:b=true}if(c&&b)break}if(c&&b)d=OpenLayers.Format.XML.CONTENT_TYPE.MIXED;else if(c)return OpenLayers.Format.XML.CONTENT_TYPE.COMPLEX;else if(b)return OpenLayers.Format.XML.CONTENT_TYPE.SIMPLE;return d},hasAttributeNS:function(a,b,c){var d=false;return d=a.hasAttributeNS?a.hasAttributeNS(b,c):!!this.getAttributeNodeNS(a,b,c)},setAttributeNS:function(a,b,c,d){if(a.setAttributeNS)a.setAttributeNS(b,c,d);else if(this.xmldom)if(b){var e=a.ownerDocument.createNode(2,c,b);e.nodeValue=d;a.setAttributeNode(e)}else a.setAttribute(c,d);else throw"setAttributeNS not implemented";},createElementNSPlus:function(a,b){b=b||{};var c=b.uri||this.namespaces[b.prefix];if(!c){var d=a.indexOf(":");c=this.namespaces[a.substring(0,d)]}c||(c=this.namespaces[this.defaultPrefix]);var e=this.createElementNS(c,a);b.attributes&&this.setAttributes(e,b.attributes);var f=b.value;if(f!=null){if(typeof f=="boolean")f=String(f);e.appendChild(this.createTextNode(f))}return e},setAttributes:function(a,b){var c,d;for(var e in b)if(b[e]!=null&&b[e].toString){c=b[e].toString();d=this.namespaces[e.substring(0,e.indexOf(":"))]||null;this.setAttributeNS(a,d,e,c)}},readNode:function(a,b){b||(b={});var c=this.readers[this.namespaceAlias[a.namespaceURI]];if(c){var d=a.localName||a.nodeName.split(":").pop(),e=c[d]||c["*"];e&&e.apply(this,[a,b])}return b},readChildNodes:function(a,b){b||(b={});for(var c=a.childNodes,d,e=0,f=c.length;e<f;++e){d=c[e];d.nodeType==1&&this.readNode(d,b)}return b},writeNode:function(a,b,c){var d,e,f=a.indexOf(":");if(f>0){d=a.substring(0,f);e=a.substring(f+1)}else{d=c?this.namespaceAlias[c.namespaceURI]:this.defaultPrefix;e=a}var g=this.writers[d][e].apply(this,[b]);c&&c.appendChild(g);return g},getChildEl:function(a,b,c){return a&&this.getThisOrNextEl(a.firstChild,b,c)},getNextEl:function(a,b,c){return a&&this.getThisOrNextEl(a.nextSibling,b,c)},getThisOrNextEl:function(a,b,c){var d=a;outer:for(;d;d=d.nextSibling)switch(d.nodeType){case 1:if((!b||b===(d.localName||d.nodeName.split(":").pop()))&&(!c||c===d.namespaceURI))break outer;d=null;break outer;case 3:if(/^\s*$/.test(d.nodeValue))break;case 4:case 6:case 12:case 10:case 11:d=null;break outer}return d||null},lookupNamespaceURI:function(a,b){var c=null;if(a)if(a.lookupNamespaceURI)c=a.lookupNamespaceURI(b);else outer:switch(a.nodeType){case 1:if(a.namespaceURI!==null&&a.prefix===b){c=a.namespaceURI;break outer}var d=a.attributes.length;if(d)for(var e,f=0;f<d;++f){e=a.attributes[f];if(e.prefix==="xmlns"&&e.name==="xmlns:"+b){c=e.value||null;break outer}else if(e.name==="xmlns"&&b===null){c=e.value||null;break outer}}c=this.lookupNamespaceURI(a.parentNode,b);break outer;case 2:c=this.lookupNamespaceURI(a.ownerElement,b);break outer;case 9:c=this.lookupNamespaceURI(a.documentElement,b);break outer;case 6:case 12:case 10:case 11:break outer;default:c=this.lookupNamespaceURI(a.parentNode,b);break outer}return c},CLASS_NAME:"OpenLayers.Format.XML"});OpenLayers.Format.XML.CONTENT_TYPE={EMPTY:0,SIMPLE:1,COMPLEX:2,MIXED:3};OpenLayers.Format.XML.lookupNamespaceURI=OpenLayers.Function.bind(OpenLayers.Format.XML.prototype.lookupNamespaceURI,OpenLayers.Format.XML.prototype);OpenLayers.Format.JSON=OpenLayers.Class(OpenLayers.Format,{indent:"    ",space:" ",newline:"\n",level:0,pretty:false,initialize:function(a){OpenLayers.Format.prototype.initialize.apply(this,[a])},read:function(a,b){try{if(/^[\],:{}\s]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){var c=eval("("+a+")");if(typeof b==="function"){function d(f,g){if(g&&typeof g==="object")for(var h in g)if(g.hasOwnProperty(h))g[h]=d(h,g[h]);return b(f,g)}c=d("",c)}if(this.keepData)this.data=c;return c}}catch(e){}return null},write:function(a,b){this.pretty=!!b;var c=null,d=typeof a;if(this.serialize[d])try{c=this.serialize[d].apply(this,[a])}catch(e){OpenLayers.Console.error("Trouble serializing: "+e)}return c},writeIndent:function(){var a=[];if(this.pretty)for(var b=0;b<this.level;++b)a.push(this.indent);return a.join("")},writeNewline:function(){return this.pretty?this.newline:""},writeSpace:function(){return this.pretty?this.space:""},serialize:{object:function(a){if(a==null)return"null";if(a.constructor==Date)return this.serialize.date.apply(this,[a]);if(a.constructor==Array)return this.serialize.array.apply(this,[a]);var b=["{"];this.level+=1;var c,d,e,f=false;for(c in a)if(a.hasOwnProperty(c)){d=OpenLayers.Format.JSON.prototype.write.apply(this,[c,this.pretty]);e=OpenLayers.Format.JSON.prototype.write.apply(this,[a[c],this.pretty]);if(d!=null&&e!=null){f&&b.push(",");b.push(this.writeNewline(),this.writeIndent(),d,":",this.writeSpace(),e);f=true}}this.level-=1;b.push(this.writeNewline(),this.writeIndent(),"}");return b.join("")},array:function(a){var b,c=["["];this.level+=1;for(var d=0,e=a.length;d<e;++d){b=OpenLayers.Format.JSON.prototype.write.apply(this,[a[d],this.pretty]);if(b!=null){d>0&&c.push(",");c.push(this.writeNewline(),this.writeIndent(),b)}}this.level-=1;c.push(this.writeNewline(),this.writeIndent(),"]");return c.join("")},string:function(a){var b={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};if(/["\\\x00-\x1f]/.test(a))return'"'+a.replace(/([\x00-\x1f\\"])/g,function(c,d){var e=b[d];if(e)return e;e=d.charCodeAt();return"\\u00"+Math.floor(e/16).toString(16)+(e%16).toString(16)})+'"';return'"'+a+'"'},number:function(a){return isFinite(a)?String(a):"null"},"boolean":function(a){return String(a)},date:function(a){function b(c){return c<10?"0"+c:c}return'"'+a.getFullYear()+"-"+b(a.getMonth()+1)+"-"+b(a.getDate())+"T"+b(a.getHours())+":"+b(a.getMinutes())+":"+b(a.getSeconds())+'"'}},CLASS_NAME:"OpenLayers.Format.JSON"});(function(){function a(){this._object=f?new f:new window.ActiveXObject("Microsoft.XMLHTTP")}function b(j){j.onreadystatechange&&j.onreadystatechange.apply(j);a.onreadystatechange&&a.onreadystatechange.apply(j)}function c(j){var k=j.g;if(h&&k&&!k.documentElement&&j.j("Content-Type").match(/[^\/]+\/[^\+]+\+xml/)){k=new ActiveXObject("Microsoft.XMLDOM");k.loadXML(j.responseText)}if(k)if(h&&k.parseError!=0||k.documentElement&&k.documentElement.tagName=="parsererror")return null;return k}function d(j){try{j.responseText=j._object.responseText}catch(k){}try{j.g=c(j._object)}catch(l){}try{j.status=j._object.status}catch(m){}try{j.k=j._object.k}catch(p){}}function e(j){j._object.onreadystatechange=new window.Function;delete j._headers}var f=window.XMLHttpRequest,g=!!window.controllers,h=window.document.all&&!window.opera;if(g&&f.wrapped)a.wrapped=f.wrapped;a.UNSENT=0;a.OPENED=1;a.HEADERS_RECEIVED=2;a.LOADING=3;a.DONE=4;a.prototype.d=a.UNSENT;a.prototype.responseText="";a.prototype.g=null;a.prototype.status=0;a.prototype.k="";a.prototype.onreadystatechange=null;a.onreadystatechange=null;a.onopen=null;a.onsend=null;a.onabort=null;a.prototype.open=function(j,k,l,m,p){this._async=l;var q=this,n=this.d;if(h){var o=function(){q._object.d!=a.DONE&&e(q)};l&&window.attachEvent("onunload",o)}this._object.onreadystatechange=function(){if(!(g&&!l)){q.d=q._object.d;d(q);if(q._aborted)q.d=a.UNSENT;else{if(q.d==a.DONE){e(q);h&&l&&window.detachEvent("onunload",o)}n!=q.d&&b(q);n=q.d}}};a.onopen&&a.onopen.apply(this,arguments);this._object.open(j,k,l,m,p);if(!l&&g){this.d=a.OPENED;b(this)}};a.prototype.send=function(j){a.onsend&&a.onsend.apply(this,arguments);if(j&&j.nodeType){j=window.XMLSerializer?(new window.XMLSerializer).serializeToString(j):j.xml;this._headers["Content-Type"]||this._object.i("Content-Type","application/xml")}this._object.send(j);if(g&&!this._async){this.d=a.OPENED;for(d(this);this.d<a.DONE;){this.d++;b(this);if(this._aborted)return}}};a.prototype.abort=function(){a.onabort&&a.onabort.apply(this,arguments);if(this.d>a.UNSENT)this._aborted=true;this._object.abort();e(this)};a.prototype.n=function(){return this._object.n()};a.prototype.j=function(j){return this._object.j(j)};a.prototype.i=function(j,k){if(!this._headers)this._headers={};this._headers[j]=k;return this._object.i(j,k)};a.prototype.toString=function(){return"[object XMLHttpRequest]"};a.toString=function(){return"[XMLHttpRequest]"};if(!window.Function.prototype.apply)window.Function.prototype.apply=function(j,k){k||(k=[]);j.__func=this;j.__func(k[0],k[1],k[2],k[3],k[4]);delete j.__func};OpenLayers.Request.XMLHttpRequest=a})();OpenLayers.Handler.Feature=OpenLayers.Class(OpenLayers.Handler,{EVENTMAP:{click:{"in":"click",out:"clickout"},mousemove:{"in":"over",out:"out"},dblclick:{"in":"dblclick",out:null},mousedown:{"in":null,out:null},mouseup:{"in":null,out:null}},feature:null,lastFeature:null,down:null,up:null,clickTolerance:4,geometryTypes:null,stopClick:true,stopDown:true,stopUp:false,initialize:function(a,b,c,d){OpenLayers.Handler.prototype.initialize.apply(this,[a,c,d]);this.layer=b},mousedown:function(a){this.down=a.xy;return this.handle(a)?!this.stopDown:true},mouseup:function(a){this.up=a.xy;return this.handle(a)?!this.stopUp:true},click:function(a){return this.handle(a)?!this.stopClick:true},mousemove:function(a){if(!this.callbacks.over&&!this.callbacks.out)return true;this.handle(a);return true},dblclick:function(a){return!this.handle(a)},geometryTypeMatches:function(a){return this.geometryTypes==null||OpenLayers.Util.indexOf(this.geometryTypes,a.geometry.CLASS_NAME)>-1},handle:function(a){if(this.feature&&!this.feature.layer)this.feature=null;var b=a.type,c=false,d=!!this.feature,e=b=="click"||b=="dblclick";if((this.feature=this.layer.getFeatureFromEvent(a))&&!this.feature.layer)this.feature=null;if(this.lastFeature&&!this.lastFeature.layer)this.lastFeature=null;if(this.feature){var f=this.feature!=this.lastFeature;if(this.geometryTypeMatches(this.feature)){if(d&&f){this.lastFeature&&this.triggerCallback(b,"out",[this.lastFeature]);this.triggerCallback(b,"in",[this.feature])}else if(!d||e)this.triggerCallback(b,"in",[this.feature]);this.lastFeature=this.feature;c=true}else{if(this.lastFeature&&(d&&f||e))this.triggerCallback(b,"out",[this.lastFeature]);this.feature=null}}else if(this.lastFeature&&(d||e))this.triggerCallback(b,"out",[this.lastFeature]);return c},triggerCallback:function(a,b,c){var d=this.EVENTMAP[a][b];if(d)if(a=="click"&&this.up&&this.down){var e=Math.sqrt(Math.pow(this.up.x-this.down.x,2)+Math.pow(this.up.y-this.down.y,2));e<=this.clickTolerance&&this.callback(d,c)}else this.callback(d,c)},activate:function(){var a=false;if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.moveLayerToTop();this.map.events.on({removelayer:this.handleMapEvents,changelayer:this.handleMapEvents,scope:this});a=true}return a},deactivate:function(){var a=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.moveLayerBack();this.up=this.down=this.lastFeature=this.feature=null;this.map.events.un({removelayer:this.handleMapEvents,changelayer:this.handleMapEvents,scope:this});a=true}return a},handleMapEvents:function(a){if(!a.property||a.property=="order")this.moveLayerToTop()},moveLayerToTop:function(){var a=Math.max(this.map.Z_INDEX_BASE.Feature-1,this.layer.getZIndex())+1;this.layer.setZIndex(a)},moveLayerBack:function(){var a=this.layer.getZIndex()-1;a>=this.map.Z_INDEX_BASE.Feature?this.layer.setZIndex(a):this.map.setLayerZIndex(this.layer,this.map.getLayerIndex(this.layer))},CLASS_NAME:"OpenLayers.Handler.Feature"});OpenLayers.Handler.Keyboard=OpenLayers.Class(OpenLayers.Handler,{KEY_EVENTS:["keydown","keyup"],eventListener:null,initialize:function(){OpenLayers.Handler.prototype.initialize.apply(this,arguments);this.eventListener=OpenLayers.Function.bindAsEventListener(this.handleKeyEvent,this)},destroy:function(){this.deactivate();this.eventListener=null;OpenLayers.Handler.prototype.destroy.apply(this,arguments)},activate:function(){if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){for(var a=0,b=this.KEY_EVENTS.length;a<b;a++)OpenLayers.Event.observe(document,this.KEY_EVENTS[a],this.eventListener);return true}else return false},deactivate:function(){var a=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){for(var b=0,c=this.KEY_EVENTS.length;b<c;b++)OpenLayers.Event.stopObserving(document,this.KEY_EVENTS[b],this.eventListener);a=true}return a},handleKeyEvent:function(a){this.checkModifiers(a)&&this.callback(a.type,[a])},CLASS_NAME:"OpenLayers.Handler.Keyboard"});OpenLayers.Handler.Click=OpenLayers.Class(OpenLayers.Handler,{delay:300,single:true,"double":false,pixelTolerance:0,stopSingle:false,stopDouble:false,timerId:null,down:null,rightclickTimerId:null,initialize:function(){OpenLayers.Handler.prototype.initialize.apply(this,arguments);if(this.pixelTolerance!=null)this.mousedown=function(a){this.down=a.xy;return true}},mousedown:null,mouseup:function(a){var b=true;if(this.checkModifiers(a)&&this.control.handleRightClicks&&OpenLayers.Event.isRightClick(a))b=this.rightclick(a);return b},rightclick:function(a){if(this.passesTolerance(a))if(this.rightclickTimerId!=null){this.clearTimer();this.callback("dblrightclick",[a]);return!this.stopDouble}else{var b=this["double"]?OpenLayers.Util.extend({},a):this.callback("rightclick",[a]),c=OpenLayers.Function.bind(this.delayedRightCall,this,b);this.rightclickTimerId=window.setTimeout(c,this.delay)}return!this.stopSingle},delayedRightCall:function(a){this.rightclickTimerId=null;a&&this.callback("rightclick",[a]);return!this.stopSingle},dblclick:function(a){if(this.passesTolerance(a)){this["double"]&&this.callback("dblclick",[a]);this.clearTimer()}return!this.stopDouble},click:function(a){if(this.passesTolerance(a))if(this.timerId!=null)this.clearTimer();else{var b=this.single?OpenLayers.Util.extend({},a):null;this.timerId=window.setTimeout(OpenLayers.Function.bind(this.delayedCall,this,b),this.delay)}return!this.stopSingle},passesTolerance:function(a){var b=true;if(this.pixelTolerance!=null&&this.down){var c=Math.sqrt(Math.pow(this.down.x-a.xy.x,2)+Math.pow(this.down.y-a.xy.y,2));if(c>this.pixelTolerance)b=false}return b},clearTimer:function(){if(this.timerId!=null){window.clearTimeout(this.timerId);this.timerId=null}if(this.rightclickTimerId!=null){window.clearTimeout(this.rightclickTimerId);this.rightclickTimerId=null}},delayedCall:function(a){this.timerId=null;a&&this.callback("click",[a])},deactivate:function(){var a=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.clearTimer();this.down=null;a=true}return a},CLASS_NAME:"OpenLayers.Handler.Click"});OpenLayers.Handler.MouseWheel=OpenLayers.Class(OpenLayers.Handler,{wheelListener:null,mousePosition:null,initialize:function(){OpenLayers.Handler.prototype.initialize.apply(this,arguments);this.wheelListener=OpenLayers.Function.bindAsEventListener(this.onWheelEvent,this)},destroy:function(){OpenLayers.Handler.prototype.destroy.apply(this,arguments);this.wheelListener=null},onWheelEvent:function(a){if(this.map&&this.checkModifiers(a)){for(var b=false,c=false,d=false,e=OpenLayers.Event.element(a);e!=null&&!d&&!b;){if(!b)try{if(e.currentStyle)g=e.currentStyle.overflow;else var f=document.defaultView.getComputedStyle(e,null),g=f.getPropertyValue("overflow");b=g&&g=="auto"||g=="scroll"}catch(h){}if(!c)for(var j=0,k=this.map.layers.length;j<k;j++)if(e==this.map.layers[j].div||e==this.map.layers[j].pane){c=true;break}d=e==this.map.div;e=e.parentNode}if(!b&&d){c&&this.wheelZoom(a);OpenLayers.Event.stop(a)}}},wheelZoom:function(a){var b=0;if(!a)a=window.event;if(a.wheelDelta){b=a.wheelDelta/120;if(window.opera&&window.opera.version()<9.2)b=-b}else if(a.detail)b=-a.detail/3;if(b){if(this.mousePosition)a.xy=this.mousePosition;if(!a.xy)a.xy=this.map.getPixelFromLonLat(this.map.getCenter());b<0?this.callback("down",[a,b]):this.callback("up",[a,b])}},mousemove:function(a){this.mousePosition=a.xy},activate:function(){if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){var a=this.wheelListener;OpenLayers.Event.observe(window,"DOMMouseScroll",a);OpenLayers.Event.observe(window,"mousewheel",a);OpenLayers.Event.observe(document,"mousewheel",a);return true}else return false},deactivate:function(){if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){var a=this.wheelListener;OpenLayers.Event.stopObserving(window,"DOMMouseScroll",a);OpenLayers.Event.stopObserving(window,"mousewheel",a);OpenLayers.Event.stopObserving(document,"mousewheel",a);return true}else return false},CLASS_NAME:"OpenLayers.Handler.MouseWheel"});OpenLayers.Handler.Drag=OpenLayers.Class(OpenLayers.Handler,{started:false,stopDown:true,dragging:false,last:null,start:null,oldOnselectstart:null,interval:0,timeoutId:null,initialize:function(){OpenLayers.Handler.prototype.initialize.apply(this,arguments)},down:function(){},move:function(){},up:function(){},out:function(){},mousedown:function(a){var b=true;this.dragging=false;if(this.checkModifiers(a)&&OpenLayers.Event.isLeftClick(a)){this.started=true;this.last=this.start=a.xy;OpenLayers.Element.addClass(this.map.viewPortDiv,"olDragDown");this.down(a);this.callback("down",[a.xy]);OpenLayers.Event.stop(a);if(!this.oldOnselectstart){this.oldOnselectstart=document.onselectstart?document.onselectstart:function(){return true};document.onselectstart=function(){return false}}b=!this.stopDown}else{this.started=false;this.last=this.start=null}return b},mousemove:function(a){if(this.started&&!this.timeoutId&&(a.xy.x!=this.last.x||a.xy.y!=this.last.y)){if(this.interval>0)this.timeoutId=setTimeout(OpenLayers.Function.bind(this.removeTimeout,this),this.interval);this.dragging=true;this.move(a);this.callback("move",[a.xy]);if(!this.oldOnselectstart){this.oldOnselectstart=document.onselectstart;document.onselectstart=function(){return false}}this.last=this.evt.xy}return true},removeTimeout:function(){this.timeoutId=null},mouseup:function(a){if(this.started){var b=this.start!=this.last;this.dragging=this.started=false;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown");this.up(a);this.callback("up",[a.xy]);b&&this.callback("done",[a.xy]);document.onselectstart=this.oldOnselectstart}return true},mouseout:function(a){if(this.started&&OpenLayers.Util.mouseLeft(a,this.map.div)){var b=this.start!=this.last;this.dragging=this.started=false;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown");this.out(a);this.callback("out",[]);b&&this.callback("done",[a.xy]);if(document.onselectstart)document.onselectstart=this.oldOnselectstart}return true},click:function(){return this.start==this.last},activate:function(){var a=false;if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.dragging=false;a=true}return a},deactivate:function(){var a=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.dragging=this.started=false;this.last=this.start=null;a=true;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown")}return a},CLASS_NAME:"OpenLayers.Handler.Drag"});OpenLayers.Layer=OpenLayers.Class({id:null,name:null,div:null,opacity:null,alwaysInRange:null,EVENT_TYPES:["loadstart","loadend","loadcancel","visibilitychanged","move","moveend"],events:null,map:null,isBaseLayer:false,alpha:false,displayInLayerSwitcher:true,visibility:true,attribution:null,inRange:false,imageSize:null,imageOffset:null,options:null,eventListeners:null,gutter:0,projection:null,units:null,scales:null,resolutions:null,maxExtent:null,minExtent:null,maxResolution:null,minResolution:null,numZoomLevels:null,minScale:null,maxScale:null,displayOutsideMaxExtent:false,wrapDateLine:false,transitionEffect:null,SUPPORTED_TRANSITIONS:["resize"],initialize:function(a,b){this.addOptions(b);this.name=a;if(this.id==null){this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");this.div=OpenLayers.Util.createDiv(this.id);this.div.style.width="100%";this.div.style.height="100%";this.div.dir="ltr";this.events=new OpenLayers.Events(this,this.div,this.EVENT_TYPES);this.eventListeners instanceof
Object&&this.events.on(this.eventListeners)}if(this.wrapDateLine)this.displayOutsideMaxExtent=true},destroy:function(a){if(a==null)a=true;this.map!=null&&this.map.removeLayer(this,a);this.options=this.div=this.name=this.map=this.projection=null;if(this.events){this.eventListeners&&this.events.un(this.eventListeners);this.events.destroy()}this.events=this.eventListeners=null},clone:function(a){if(a==null)a=new OpenLayers.Layer(this.name,this.options);OpenLayers.Util.applyDefaults(a,this);a.map=null;return a},setName:function(a){if(a!=this.name){this.name=a;this.map!=null&&this.map.events.triggerEvent("changelayer",{layer:this,property:"name"})}},addOptions:function(a){if(this.options==null)this.options={};OpenLayers.Util.extend(this.options,a);OpenLayers.Util.extend(this,a)},onMapResize:function(){},redraw:function(){var a=false;if(this.map){this.inRange=this.calculateInRange();var b=this.getExtent();if(b&&this.inRange&&this.visibility){var c=true;this.moveTo(b,c,false);this.events.triggerEvent("moveend",{zoomChanged:c});a=true}}return a},moveTo:function(){var a=this.visibility;this.isBaseLayer||(a=a&&this.inRange);this.display(a)},setMap:function(a){if(this.map==null){this.map=a;this.maxExtent=this.maxExtent||this.map.maxExtent;if((this.projection=this.projection||this.map.projection)&&typeof this.projection=="string")this.projection=new OpenLayers.Projection(this.projection);this.units=this.projection.getUnits()||this.units||this.map.units;this.initResolutions();if(!this.isBaseLayer){this.inRange=this.calculateInRange();var b=this.visibility&&this.inRange;this.div.style.display=b?"":"none"}this.setTileSize()}},afterAdd:function(){},removeMap:function(){},getImageSize:function(){return this.imageSize||this.tileSize},setTileSize:function(a){var b=a?a:this.tileSize?this.tileSize:this.map.getTileSize();this.tileSize=b;if(this.gutter){this.imageOffset=new OpenLayers.Pixel(-this.gutter,-this.gutter);this.imageSize=new OpenLayers.Size(b.w+2*this.gutter,b.h+2*this.gutter)}},getVisibility:function(){return this.visibility},setVisibility:function(a){if(a!=this.visibility){this.visibility=a;this.display(a);this.redraw();this.map!=null&&this.map.events.triggerEvent("changelayer",{layer:this,property:"visibility"});this.events.triggerEvent("visibilitychanged")}},display:function(a){var b=this.calculateInRange();if(a!=(this.div.style.display!="none"))this.div.style.display=a&&b?"block":"none"},calculateInRange:function(){var a=false;if(this.alwaysInRange)a=true;else if(this.map){var b=this.map.getResolution();a=b>=this.minResolution&&b<=this.maxResolution}return a},setIsBaseLayer:function(a){if(a!=this.isBaseLayer){this.isBaseLayer=a;this.map!=null&&this.map.events.triggerEvent("changebaselayer",{layer:this})}},initResolutions:function(){for(var a=new Array("projection","units","scales","resolutions","maxScale","minScale","maxResolution","minResolution","minExtent","maxExtent","numZoomLevels","maxZoomLevel"),b=["projection","units"],c=false,d={},e=0,f=a.length;e<f;e++){var g=a[e];if(this.options[g]&&OpenLayers.Util.indexOf(b,g)==-1)c=true;d[g]=this.options[g]||this.map[g]}if(this.alwaysInRange==null)this.alwaysInRange=!c;if((this.options.minScale!=null||this.options.maxScale!=null)&&this.options.scales==null)d.scales=null;if((this.options.minResolution!=null||this.options.maxResolution!=null)&&this.options.resolutions==null)d.resolutions=null;if(!d.numZoomLevels&&d.maxZoomLevel)d.numZoomLevels=d.maxZoomLevel+1;if(d.scales!=null||d.resolutions!=null){if(d.scales!=null){d.resolutions=[];e=0;for(f=d.scales.length;e<f;e++){var h=d.scales[e];d.resolutions[e]=OpenLayers.Util.getResolutionFromScale(h,d.units)}}d.numZoomLevels=d.resolutions.length}else{if(d.minScale)d.maxResolution=OpenLayers.Util.getResolutionFromScale(d.minScale,d.units);else if(d.maxResolution=="auto"){var j=this.map.getSize(),k=d.maxExtent.getWidth()/j.w,l=d.maxExtent.getHeight()/j.h;d.maxResolution=Math.max(k,l)}if(d.maxScale!=null)d.minResolution=OpenLayers.Util.getResolutionFromScale(d.maxScale,d.units);else if(d.minResolution=="auto"&&d.minExtent!=null){j=this.map.getSize();k=d.minExtent.getWidth()/j.w;l=d.minExtent.getHeight()/j.h;d.minResolution=Math.max(k,l)}if(d.minResolution!=null&&this.options.numZoomLevels==undefined){var m=d.maxResolution/d.minResolution;d.numZoomLevels=Math.floor(Math.log(m)/Math.log(2))+1}d.resolutions=new Array(d.numZoomLevels);var p=2;if(typeof d.minResolution=="number"&&d.numZoomLevels>1)p=Math.pow(d.maxResolution/d.minResolution,1/(d.numZoomLevels-1));for(e=0;e<d.numZoomLevels;e++){var q=d.maxResolution/Math.pow(p,e);d.resolutions[e]=q}}d.resolutions.sort(function(o,r){return r-o});this.resolutions=d.resolutions;this.maxResolution=d.resolutions[0];var n=d.resolutions.length-1;this.minResolution=d.resolutions[n];this.scales=[];e=0;for(f=d.resolutions.length;e<f;e++)this.scales[e]=OpenLayers.Util.getScaleFromResolution(d.resolutions[e],d.units);this.minScale=this.scales[0];this.maxScale=this.scales[this.scales.length-1];this.numZoomLevels=d.numZoomLevels},getResolution:function(){var a=this.map.getZoom();return this.getResolutionForZoom(a)},getExtent:function(){return this.map.calculateBounds()},getZoomForExtent:function(a,b){var c=this.map.getSize(),d=Math.max(a.getWidth()/c.w,a.getHeight()/c.h);return this.getZoomForResolution(d,b)},getDataExtent:function(){},getResolutionForZoom:function(a){a=Math.max(0,Math.min(a,this.resolutions.length-1));var b;if(this.map.fractionalZoom){var c=Math.floor(a),d=Math.ceil(a);b=this.resolutions[c]-(a-c)*(this.resolutions[c]-this.resolutions[d])}else b=this.resolutions[Math.round(a)];return b},getZoomForResolution:function(a,b){var c;if(this.map.fractionalZoom){for(var d=0,e=this.resolutions.length-1,f=this.resolutions[d],g=this.resolutions[e],h,j=0,k=this.resolutions.length;j<k;++j){h=this.resolutions[j];if(h>=a){f=h;d=j}if(h<=a){g=h;break}}var l=f-g;c=l>0?d+(f-a)/l:d}else{var m,p=Number.POSITIVE_INFINITY;j=0;for(k=this.resolutions.length;j<k;j++)if(b){m=Math.abs(this.resolutions[j]-a);if(m>p)break;p=m}else if(this.resolutions[j]<a)break;c=Math.max(0,j-1)}return c},getLonLatFromViewPortPx:function(a){var b=null;if(a!=null){var c=this.map.getSize(),d=this.map.getCenter();if(d){var e=this.map.getResolution(),f=a.x-c.w/2,g=a.y-c.h/2;b=new OpenLayers.LonLat(d.lon+f*e,d.lat-g*e);if(this.wrapDateLine)b=b.wrapDateLine(this.maxExtent)}}return b},getViewPortPxFromLonLat:function(a){var b=null;if(a!=null){var c=this.map.getResolution(),d=this.map.getExtent();b=new OpenLayers.Pixel(1/c*(a.lon-d.left),1/c*(d.top-a.lat))}return b},setOpacity:function(a){if(a!=this.opacity){this.opacity=a;for(var b=0,c=this.div.childNodes.length;b<c;++b){var d=this.div.childNodes[b].firstChild;OpenLayers.Util.modifyDOMElement(d,null,null,null,null,null,null,a)}}},getZIndex:function(){return this.div.style.zIndex},setZIndex:function(a){this.div.style.zIndex=a},adjustBounds:function(a){if(this.gutter){var b=this.gutter*this.map.getResolution();a=new OpenLayers.Bounds(a.left-b,a.bottom-b,a.right+b,a.top+b)}if(this.wrapDateLine){var c={rightTolerance:this.getResolution()};a=a.wrapDateLine(this.maxExtent,c)}return a},CLASS_NAME:"OpenLayers.Layer"});OpenLayers.Feature=OpenLayers.Class({layer:null,id:null,lonlat:null,data:null,marker:null,popupClass:OpenLayers.Popup.AnchoredBubble,popup:null,initialize:function(a,b,c){this.layer=a;this.lonlat=b;this.data=c!=null?c:{};this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")},destroy:function(){this.layer!=null&&this.layer.map!=null&&this.popup!=null&&this.layer.map.removePopup(this.popup);this.data=this.lonlat=this.id=this.layer=null;if(this.marker!=null){this.destroyMarker(this.marker);this.marker=null}if(this.popup!=null){this.destroyPopup(this.popup);this.popup=null}},onScreen:function(){var a=false;if(this.layer!=null&&this.layer.map!=null){var b=this.layer.map.getExtent();a=b.containsLonLat(this.lonlat)}return a},createMarker:function(){if(this.lonlat!=null)this.marker=new OpenLayers.Marker(this.lonlat,this.data.icon);return this.marker},destroyMarker:function(){this.marker.destroy()},createPopup:function(a){if(this.lonlat!=null){var b=this.id+"_popup",c=this.marker?this.marker.icon:null;if(!this.popup)this.popup=new this.popupClass(b,this.lonlat,this.data.popupSize,this.data.popupContentHTML,c,a);if(this.data.overflow!=null)this.popup.contentDiv.style.overflow=this.data.overflow;this.popup.feature=this}return this.popup},destroyPopup:function(){if(this.popup){this.popup.feature=null;this.popup.destroy();this.popup=null}},CLASS_NAME:"OpenLayers.Feature"});OpenLayers.Tile.WFS=OpenLayers.Class(OpenLayers.Tile,{features:null,url:null,request:null,initialize:function(a,b,c,d){OpenLayers.Tile.prototype.initialize.apply(this,arguments);this.url=d;this.features=[]},destroy:function(){OpenLayers.Tile.prototype.destroy.apply(this,arguments);this.destroyAllFeatures();this.url=this.features=null;if(this.request){this.request.abort();this.request=null}},clear:function(){this.destroyAllFeatures()},draw:function(){if(OpenLayers.Tile.prototype.draw.apply(this,arguments)){if(this.isLoading)this.events.triggerEvent("reload");else{this.isLoading=true;this.events.triggerEvent("loadstart")}this.loadFeaturesForRegion(this.requestSuccess)}},loadFeaturesForRegion:function(a,b){this.request&&this.request.abort();this.request=OpenLayers.Request.GET({url:this.url,success:a,failure:b,scope:this})},requestSuccess:function(a){if(this.features){var b=a.g;if(!b||!b.documentElement)b=a.responseText;if(this.layer.vectorMode)this.layer.addFeatures(this.layer.formatObject.read(b));else{var c=new OpenLayers.Format.XML;if(typeof b=="string")b=c.read(b);var d=c.getElementsByTagNameNS(b,"http://www.opengis.net/gml","featureMember");this.addResults(d)}}this.events&&this.events.triggerEvent("loadend");this.request=null},addResults:function(a){for(var b=0;b<a.length;b++){var c=new this.layer.featureClass(this.layer,a[b]);this.features.push(c)}},destroyAllFeatures:function(){for(;this.features.length>0;){var a=this.features.shift();a.destroy()}},CLASS_NAME:"OpenLayers.Tile.WFS"});OpenLayers.Control.KeyboardDefaults=OpenLayers.Class(OpenLayers.Control,{slideFactor:75,initialize:function(){OpenLayers.Control.prototype.initialize.apply(this,arguments)},destroy:function(){this.handler&&this.handler.destroy();this.handler=null;OpenLayers.Control.prototype.destroy.apply(this,arguments)},draw:function(){this.handler=new OpenLayers.Handler.Keyboard(this,{keydown:this.defaultKeyPress});this.activate()},defaultKeyPress:function(a){switch(a.keyCode){case OpenLayers.Event.KEY_LEFT:this.map.pan(-this.slideFactor,0);break;case OpenLayers.Event.KEY_RIGHT:this.map.pan(this.slideFactor,0);break;case OpenLayers.Event.KEY_UP:this.map.pan(0,-this.slideFactor);break;case OpenLayers.Event.KEY_DOWN:this.map.pan(0,this.slideFactor);break;case 33:var b=this.map.getSize();this.map.pan(0,-0.75*b.h);break;case 34:b=this.map.getSize();this.map.pan(0,0.75*b.h);break;case 35:b=this.map.getSize();this.map.pan(0.75*b.w,0);break;case 36:b=this.map.getSize();this.map.pan(-0.75*b.w,0);break;case 43:case 61:case 187:case 107:this.map.zoomIn();break;case 45:case 109:case 189:case 95:this.map.zoomOut();break}},CLASS_NAME:"OpenLayers.Control.KeyboardDefaults"});OpenLayers.Control.DragPan=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOOL,panned:false,interval:25,draw:function(){this.handler=new OpenLayers.Handler.Drag(this,{move:this.panMap,done:this.panMapDone},{interval:this.interval})},panMap:function(a){this.panned=true;this.map.pan(this.handler.last.x-a.x,this.handler.last.y-a.y,{dragging:this.handler.dragging,animate:false})},panMapDone:function(a){if(this.panned){this.panMap(a);this.panned=false}},CLASS_NAME:"OpenLayers.Control.DragPan"});OpenLayers.Handler.Box=OpenLayers.Class(OpenLayers.Handler,{dragHandler:null,boxDivClassName:"olHandlerBoxZoomBox",boxCharacteristics:null,initialize:function(a,b){OpenLayers.Handler.prototype.initialize.apply(this,arguments);b={down:this.startBox,move:this.moveBox,out:this.removeBox,up:this.endBox};this.dragHandler=new OpenLayers.Handler.Drag(this,b,{keyMask:this.keyMask})},setMap:function(a){OpenLayers.Handler.prototype.setMap.apply(this,arguments);this.dragHandler&&this.dragHandler.setMap(a)},startBox:function(){this.zoomBox=OpenLayers.Util.createDiv("zoomBox",this.dragHandler.start);this.zoomBox.className=this.boxDivClassName;this.zoomBox.style.zIndex=this.map.Z_INDEX_BASE.Popup-1;this.map.viewPortDiv.appendChild(this.zoomBox);OpenLayers.Element.addClass(this.map.viewPortDiv,"olDrawBox")},moveBox:function(a){var b=this.dragHandler.start.x,c=this.dragHandler.start.y,d=Math.abs(b-a.x),e=Math.abs(c-a.y);this.zoomBox.style.width=Math.max(1,d)+"px";this.zoomBox.style.height=Math.max(1,e)+"px";this.zoomBox.style.left=a.x<b?a.x+"px":b+"px";this.zoomBox.style.top=a.y<c?a.y+"px":c+"px";var f=this.getBoxCharacteristics();if(f.newBoxModel){if(a.x>b)this.zoomBox.style.width=Math.max(1,d-f.xOffset)+"px";if(a.y>c)this.zoomBox.style.height=Math.max(1,e-f.yOffset)+"px"}},endBox:function(a){var b;if(Math.abs(this.dragHandler.start.x-a.x)>5||Math.abs(this.dragHandler.start.y-a.y)>5){var c=this.dragHandler.start,d=Math.min(c.y,a.y),e=Math.max(c.y,a.y),f=Math.min(c.x,a.x),g=Math.max(c.x,a.x);b=new OpenLayers.Bounds(f,e,g,d)}else b=this.dragHandler.start.clone();this.removeBox();this.callback("done",[b])},removeBox:function(){this.map.viewPortDiv.removeChild(this.zoomBox);this.boxCharacteristics=this.zoomBox=null;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDrawBox")},activate:function(){if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.dragHandler.activate();return true}else return false},deactivate:function(){if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.dragHandler.deactivate();return true}else return false},getBoxCharacteristics:function(){if(!this.boxCharacteristics){var a=parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-left-width"))+parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-right-width"))+1,b=parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-top-width"))+parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-bottom-width"))+1,c=OpenLayers.Util.getBrowserName()=="msie"?document.compatMode!="BackCompat":true;this.boxCharacteristics={xOffset:a,yOffset:b,newBoxModel:c}}return this.boxCharacteristics},CLASS_NAME:"OpenLayers.Handler.Box"});OpenLayers.Layer.Markers=OpenLayers.Class(OpenLayers.Layer,{isBaseLayer:false,markers:null,drawn:false,initialize:function(){OpenLayers.Layer.prototype.initialize.apply(this,arguments);this.markers=[]},destroy:function(){this.clearMarkers();this.markers=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments)},setOpacity:function(a){if(a!=this.opacity){this.opacity=a;for(var b=0,c=this.markers.length;b<c;b++)this.markers[b].setOpacity(this.opacity)}},moveTo:function(a,b){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);if(b||!this.drawn){for(var c=0,d=this.markers.length;c<d;c++)this.drawMarker(this.markers[c]);this.drawn=true}},addMarker:function(a){this.markers.push(a);this.opacity!=null&&a.setOpacity(this.opacity);if(this.map&&this.map.getExtent()){a.map=this.map;this.drawMarker(a)}},removeMarker:function(a){if(this.markers&&this.markers.length){OpenLayers.Util.removeItem(this.markers,a);a.erase()}},clearMarkers:function(){if(this.markers!=null)for(;this.markers.length>0;)this.removeMarker(this.markers[0])},drawMarker:function(a){var b=this.map.getLayerPxFromLonLat(a.lonlat);if(b==null)a.display(false);else if(a.isDrawn())a.icon&&a.icon.moveTo(b);else{var c=a.draw(b);this.div.appendChild(c)}},getDataExtent:function(){var a=null;if(this.markers&&this.markers.length>0){a=new OpenLayers.Bounds;for(var b=0,c=this.markers.length;b<c;b++){var d=this.markers[b];a.extend(d.lonlat)}}return a},CLASS_NAME:"OpenLayers.Layer.Markers"});OpenLayers.Layer.HTTPRequest=OpenLayers.Class(OpenLayers.Layer,{URL_HASH_FACTOR:(Math.sqrt(5)-1)/2,url:null,params:null,reproject:false,initialize:function(a,b,c,d){var e=arguments;e=[a,d];OpenLayers.Layer.prototype.initialize.apply(this,e);this.url=b;this.params=OpenLayers.Util.extend({},c)},destroy:function(){this.params=this.url=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments)},clone:function(a){if(a==null)a=new OpenLayers.Layer.HTTPRequest(this.name,this.url,this.params,this.options);return a=OpenLayers.Layer.prototype.clone.apply(this,[a])},setUrl:function(a){this.url=a},mergeNewParams:function(a){this.params=OpenLayers.Util.extend(this.params,a);return this.redraw()},redraw:function(a){return a?this.mergeNewParams({_olSalt:Math.random()}):OpenLayers.Layer.prototype.redraw.apply(this,[])},selectUrl:function(a,b){for(var c=1,d=0,e=a.length;d<e;d++){c*=a.charCodeAt(d)*this.URL_HASH_FACTOR;c-=Math.floor(c)}return b[Math.floor(c*b.length)]},getFullRequestString:function(a,b){var c=b||this.url,d=OpenLayers.Util.extend({},this.params);d=OpenLayers.Util.extend(d,a);var e=OpenLayers.Util.getParameterString(d);if(c instanceof Array)c=this.selectUrl(e,c);var f=OpenLayers.Util.upperCaseObject(OpenLayers.Util.getParameters(c));for(var g in d)g.toUpperCase()in f&&delete d[g];e=OpenLayers.Util.getParameterString(d);var h=c;if(e!=""){var j=c.charAt(c.length-1);h+=j=="&"||j=="?"?e:c.indexOf("?")==-1?"?"+e:"&"+e}return h},CLASS_NAME:"OpenLayers.Layer.HTTPRequest"});OpenLayers.State={UNKNOWN:"Unknown",INSERT:"Insert",UPDATE:"Update",DELETE:"Delete"};OpenLayers.Feature.Vector=OpenLayers.Class(OpenLayers.Feature,{fid:null,geometry:null,attributes:null,bounds:null,state:null,style:null,renderIntent:"default",initialize:function(a,b,c){OpenLayers.Feature.prototype.initialize.apply(this,[null,null,b]);this.lonlat=null;this.geometry=a?a:null;this.state=null;this.attributes={};if(b)this.attributes=OpenLayers.Util.extend(this.attributes,b);this.style=c?c:null},destroy:function(){if(this.layer){this.layer.removeFeatures(this);this.layer=null}this.geometry=null;OpenLayers.Feature.prototype.destroy.apply(this,arguments)},clone:function(){return new OpenLayers.Feature.Vector(this.geometry?this.geometry.clone():null,this.attributes,this.style)},onScreen:function(a){var b=false;if(this.layer&&this.layer.map){var c=this.layer.map.getExtent();if(a){var d=this.geometry.getBounds();b=c.intersectsBounds(d)}else{var e=c.toGeometry();b=e.intersects(this.geometry)}}return b},createMarker:function(){return null},destroyMarker:function(){},createPopup:function(){return null},atPoint:function(a,b,c){var d=false;if(this.geometry)d=this.geometry.atPoint(a,b,c);return d},destroyPopup:function(){},move:function(a){if(this.layer&&this.geometry.move){var b;b=a.CLASS_NAME=="OpenLayers.LonLat"?this.layer.getViewPortPxFromLonLat(a):a;var c=this.layer.getViewPortPxFromLonLat(this.geometry.getBounds().getCenterLonLat()),d=this.layer.map.getResolution();this.geometry.move(d*(b.x-c.x),d*(c.y-b.y));this.layer.drawFeature(this);return c}},toState:function(a){if(a==OpenLayers.State.UPDATE)switch(this.state){case OpenLayers.State.UNKNOWN:case OpenLayers.State.DELETE:this.state=a;break;case OpenLayers.State.UPDATE:case OpenLayers.State.INSERT:break}else if(a==OpenLayers.State.INSERT)switch(this.state){case OpenLayers.State.UNKNOWN:break;default:this.state=a;break}else if(a==OpenLayers.State.DELETE)switch(this.state){case OpenLayers.State.INSERT:break;case OpenLayers.State.DELETE:break;case OpenLayers.State.UNKNOWN:case OpenLayers.State.UPDATE:this.state=a;break}else if(a==OpenLayers.State.UNKNOWN)this.state=a},CLASS_NAME:"OpenLayers.Feature.Vector"});OpenLayers.Feature.Vector.style={"default":{fillColor:"#ee9900",fillOpacity:0.4,hoverFillColor:"white",hoverFillOpacity:0.8,strokeColor:"#ee9900",strokeOpacity:1,strokeWidth:1,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:0.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"inherit"},select:{fillColor:"blue",fillOpacity:0.4,hoverFillColor:"white",hoverFillOpacity:0.8,strokeColor:"blue",strokeOpacity:1,strokeWidth:2,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:0.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"pointer"},temporary:{fillColor:"#66cccc",fillOpacity:0.2,hoverFillColor:"white",hoverFillOpacity:0.8,strokeColor:"#66cccc",strokeOpacity:1,strokeLinecap:"round",strokeWidth:2,strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:0.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"inherit"},"delete":{display:"none"}};OpenLayers.Control.ZoomBox=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOOL,out:false,alwaysZoom:false,draw:function(){this.handler=new OpenLayers.Handler.Box(this,{done:this.zoomBox},{keyMask:this.keyMask})},zoomBox:function(a){if(a instanceof OpenLayers.Bounds){if(this.out){var b=Math.abs(a.right-a.left),c=Math.abs(a.top-a.bottom),d=Math.min(this.map.size.h/c,this.map.size.w/b),e=this.map.getExtent(),f=this.map.getLonLatFromPixel(a.getCenterPixel()),g=f.lon-e.getWidth()/2*d,h=f.lon+e.getWidth()/2*d,j=f.lat-e.getHeight()/2*d,k=f.lat+e.getHeight()/2*d;p=new OpenLayers.Bounds(g,j,h,k)}else var l=this.map.getLonLatFromPixel(new OpenLayers.Pixel(a.left,a.bottom)),m=this.map.getLonLatFromPixel(new OpenLayers.Pixel(a.right,a.top)),p=new OpenLayers.Bounds(l.lon,l.lat,m.lon,m.lat);var q=this.map.getZoom();this.map.zoomToExtent(p);if(q==this.map.getZoom()&&this.alwaysZoom==true)this.map.zoomTo(q+(this.out?-1:1))}else this.out?this.map.setCenter(this.map.getLonLatFromPixel(a),this.map.getZoom()-1):this.map.setCenter(this.map.getLonLatFromPixel(a),this.map.getZoom()+1)},CLASS_NAME:"OpenLayers.Control.ZoomBox"});OpenLayers.Layer.Grid=OpenLayers.Class(OpenLayers.Layer.HTTPRequest,{tileSize:null,grid:null,singleTile:false,ratio:1.5,buffer:2,numLoadingTiles:0,initialize:function(){OpenLayers.Layer.HTTPRequest.prototype.initialize.apply(this,arguments);this.events.addEventType("tileloaded");this.grid=[]},destroy:function(){this.clearGrid();this.tileSize=this.grid=null;OpenLayers.Layer.HTTPRequest.prototype.destroy.apply(this,arguments)},clearGrid:function(){if(this.grid){for(var a=0,b=this.grid.length;a<b;a++)for(var c=this.grid[a],d=0,e=c.length;d<e;d++){var f=c[d];this.removeTileMonitoringHooks(f);f.destroy()}this.grid=[]}},clone:function(a){if(a==null)a=new OpenLayers.Layer.Grid(this.name,this.url,this.params,this.options);a=OpenLayers.Layer.HTTPRequest.prototype.clone.apply(this,[a]);if(this.tileSize!=null)a.tileSize=this.tileSize.clone();a.grid=[];return a},moveTo:function(a,b,c){OpenLayers.Layer.HTTPRequest.prototype.moveTo.apply(this,arguments);a=a||this.map.getExtent();if(a!=null){var d=!this.grid.length||b,e=this.getTilesBounds();if(this.singleTile){if(d||!c&&!e.containsBounds(a))this.initSingleTile(a)}else d||!e.containsBounds(a,true)?this.initGriddedTiles(a):this.moveGriddedTiles(a)}},setTileSize:function(a){if(this.singleTile){a=this.map.getSize().clone();a.h=parseInt(a.h*this.ratio);a.w=parseInt(a.w*this.ratio)}OpenLayers.Layer.HTTPRequest.prototype.setTileSize.apply(this,[a])},getGridBounds:function(){var a="The getGridBounds() function is deprecated. It will be removed in 3.0. Please use getTilesBounds() instead.";OpenLayers.Console.warn(a);return this.getTilesBounds()},getTilesBounds:function(){var a=null;if(this.grid.length){var b=this.grid.length-1,c=this.grid[b][0],d=this.grid[0].length-1,e=this.grid[0][d];a=new OpenLayers.Bounds(c.bounds.left,c.bounds.bottom,e.bounds.right,e.bounds.top)}return a},initSingleTile:function(a){var b=a.getCenterLonLat(),c=a.getWidth()*this.ratio,d=a.getHeight()*this.ratio,e=new OpenLayers.Bounds(b.lon-c/2,b.lat-d/2,b.lon+c/2,b.lat+d/2),f=new OpenLayers.LonLat(e.left,e.top),g=this.map.getLayerPxFromLonLat(f);this.grid.length||(this.grid[0]=[]);var h=this.grid[0][0];if(h)h.moveTo(e,g);else{h=this.addTile(e,g);this.addTileMonitoringHooks(h);h.draw();this.grid[0][0]=h}this.removeExcessTiles(1,1)},calculateGridLayout:function(a,b,c){var d=c*this.tileSize.w,e=c*this.tileSize.h,f=a.left-b.left,g=Math.floor(f/d)-this.buffer,h=f/d-g,j=-h*this.tileSize.w,k=b.left+g*d,l=a.top-(b.bottom+e),m=Math.ceil(l/e)+this.buffer,p=m-l/e,q=-p*this.tileSize.h,n=b.bottom+m*e;return{tilelon:d,tilelat:e,tileoffsetlon:k,tileoffsetlat:n,tileoffsetx:j,tileoffsety:q}},initGriddedTiles:function(a){var b=this.map.getSize(),c=Math.ceil(b.h/this.tileSize.h)+Math.max(1,2*this.buffer),d=Math.ceil(b.w/this.tileSize.w)+Math.max(1,2*this.buffer),e=this.maxExtent,f=this.map.getResolution(),g=this.calculateGridLayout(a,e,f),h=Math.round(g.tileoffsetx),j=Math.round(g.tileoffsety),k=g.tileoffsetlon,l=g.tileoffsetlat,m=g.tilelon,p=g.tilelat;this.origin=new OpenLayers.Pixel(h,j);var q=h,n=k,o=0,r=parseInt(this.map.layerContainerDiv.style.left),s=parseInt(this.map.layerContainerDiv.style.top);do{var t=this.grid[o++];if(!t){t=[];this.grid.push(t)}k=n;h=q;var z=0;do{var B=new OpenLayers.Bounds(k,l,k+m,l+p),u=h;u-=r;var w=j;w-=s;var A=new OpenLayers.Pixel(u,w),v=t[z++];if(v)v.moveTo(B,A,false);else{v=this.addTile(B,A);this.addTileMonitoringHooks(v);t.push(v)}k+=m;h+=this.tileSize.w}while(k<=a.right+m*this.buffer||z<d);l-=p;j+=this.tileSize.h}while(l>=a.bottom-p*this.buffer||o<c);this.removeExcessTiles(o,z);this.spiralTileLoad()},spiralTileLoad:function(){for(var a=[],b=["right","down","left","up"],c=0,d=-1,e=OpenLayers.Util.indexOf(b,"right"),f=0;f<b.length;){var g=c,h=d;switch(b[e]){case"right":h++;break;case"down":g++;break;case"left":h--;break;case"up":g--;break}var j=null;if(g<this.grid.length&&g>=0&&h<this.grid[0].length&&h>=0)j=this.grid[g][h];if(j!=null&&!j.queued){a.unshift(j);j.queued=true;f=0;c=g;d=h}else{e=(e+1)%4;f++}}for(var k=0,l=a.length;k<l;k++){j=a[k];j.draw();j.queued=false}},addTile:function(){},addTileMonitoringHooks:function(a){a.onLoadStart=function(){this.numLoadingTiles==0&&this.events.triggerEvent("loadstart");this.numLoadingTiles++};a.events.register("loadstart",this,a.onLoadStart);a.onLoadEnd=function(){this.numLoadingTiles--;this.events.triggerEvent("tileloaded");this.numLoadingTiles==0&&this.events.triggerEvent("loadend")};a.events.register("loadend",this,a.onLoadEnd);a.events.register("unload",this,a.onLoadEnd)},removeTileMonitoringHooks:function(a){a.unload();a.events.un({loadstart:a.onLoadStart,loadend:a.onLoadEnd,unload:a.onLoadEnd,scope:this})},moveGriddedTiles:function(){for(var a=this.buffer||1;1;){var b=this.grid[0][0].position,c=this.map.getViewPortPxFromLayerPx(b);if(c.x>-this.tileSize.w*(a-1))this.shiftColumn(true);else if(c.x<-this.tileSize.w*a)this.shiftColumn(false);else if(c.y>-this.tileSize.h*(a-1))this.shiftRow(true);else if(c.y<-this.tileSize.h*a)this.shiftRow(false);else break}},shiftRow:function(a){for(var b=a?0:this.grid.length-1,c=this.grid,d=c[b],e=this.map.getResolution(),f=a?-this.tileSize.h:this.tileSize.h,g=e*-f,h=a?c.pop():c.shift(),j=0,k=d.length;j<k;j++){var l=d[j],m=l.bounds.clone(),p=l.position.clone();m.bottom+=g;m.top+=g;p.y+=f;h[j].moveTo(m,p)}a?c.unshift(h):c.push(h)},shiftColumn:function(a){for(var b=a?-this.tileSize.w:this.tileSize.w,c=this.map.getResolution(),d=c*b,e=0,f=this.grid.length;e<f;e++){var g=this.grid[e],h=a?0:g.length-1,j=g[h],k=j.bounds.clone(),l=j.position.clone();k.left+=d;k.right+=d;l.x+=b;var m=a?this.grid[e].pop():this.grid[e].shift();m.moveTo(k,l);a?g.unshift(m):g.push(m)}},removeExcessTiles:function(a,b){for(;this.grid.length>a;)for(var c=this.grid.pop(),d=0,e=c.length;d<e;d++){var f=c[d];this.removeTileMonitoringHooks(f);f.destroy()}for(;this.grid[0].length>b;){d=0;for(e=this.grid.length;d<e;d++){c=this.grid[d];f=c.pop();this.removeTileMonitoringHooks(f);f.destroy()}}},onMapResize:function(){if(this.singleTile){this.clearGrid();this.setTileSize()}},getTileBounds:function(a){var b=this.maxExtent,c=this.getResolution(),d=c*this.tileSize.w,e=c*this.tileSize.h,f=this.getLonLatFromViewPortPx(a),g=b.left+d*Math.floor((f.lon-b.left)/d),h=b.bottom+e*Math.floor((f.lat-b.bottom)/e);return new OpenLayers.Bounds(g,h,g+d,h+e)},CLASS_NAME:"OpenLayers.Layer.Grid"});OpenLayers.Style=OpenLayers.Class({name:null,title:null,description:null,layerName:null,isDefault:false,rules:null,context:null,defaultStyle:null,defaultsPerSymbolizer:false,propertyStyles:null,initialize:function(a,b){OpenLayers.Util.extend(this,b);this.rules=[];b&&b.rules&&this.addRules(b.rules);this.setDefaultStyle(a||OpenLayers.Feature.Vector.style["default"])},destroy:function(){for(var a=0,b=this.rules.length;a<b;a++){this.rules[a].destroy();this.rules[a]=null}this.defaultStyle=this.rules=null},createSymbolizer:function(a){for(var b=this.defaultsPerSymbolizer?{}:this.createLiterals(OpenLayers.Util.extend({},this.defaultStyle),a),c=this.rules,d,e=[],f=false,g=0,h=c.length;g<h;g++){d=c[g];var j=d.evaluate(a);if(j)if(d instanceof OpenLayers.Rule&&d.elseFilter)e.push(d);else{f=true;this.applySymbolizer(d,b,a)}}if(f==false&&e.length>0){f=true;g=0;for(h=e.length;g<h;g++)this.applySymbolizer(e[g],b,a)}if(c.length>0&&f==false)b.display="none";return b},applySymbolizer:function(a,b,c){var d=c.geometry?this.getSymbolizerPrefix(c.geometry):OpenLayers.Style.SYMBOLIZER_PREFIXES[0],e=a.symbolizer[d]||a.symbolizer;if(this.defaultsPerSymbolizer===true){var f=this.defaultStyle;OpenLayers.Util.applyDefaults(e,{pointRadius:f.pointRadius});if(e.stroke===true||e.graphic===true)OpenLayers.Util.applyDefaults(e,{strokeWidth:f.strokeWidth,strokeColor:f.strokeColor,strokeOpacity:f.strokeOpacity,strokeDashstyle:f.strokeDashstyle,strokeLinecap:f.strokeLinecap});if(e.fill===true||e.graphic===true)OpenLayers.Util.applyDefaults(e,{fillColor:f.fillColor,fillOpacity:f.fillOpacity});e.graphic===true&&OpenLayers.Util.applyDefaults(e,{pointRadius:this.defaultStyle.pointRadius,externalGraphic:this.defaultStyle.externalGraphic,graphicName:this.defaultStyle.graphicName,graphicOpacity:this.defaultStyle.graphicOpacity,graphicWidth:this.defaultStyle.graphicWidth,graphicHeight:this.defaultStyle.graphicHeight,graphicXOffset:this.defaultStyle.graphicXOffset,graphicYOffset:this.defaultStyle.graphicYOffset})}return this.createLiterals(OpenLayers.Util.extend(b,e),c)},createLiterals:function(a,b){var c=this.context||b.attributes||b.data;for(var d in this.propertyStyles)a[d]=OpenLayers.Style.createLiteral(a[d],c,b);return a},findPropertyStyles:function(){var a={},b=this.defaultStyle;this.addPropertyStyles(a,b);for(var c=this.rules,d,e,f=0,g=c.length;f<g;f++){d=c[f].symbolizer;for(var h in d){e=d[h];if(typeof e=="object")this.addPropertyStyles(a,e);else{this.addPropertyStyles(a,d);break}}}return a},addPropertyStyles:function(a,b){var c;for(var d in b){c=b[d];if(typeof c=="string"&&c.match(/\$\{\w+\}/))a[d]=true}return a},addRules:function(a){this.rules=this.rules.concat(a);this.propertyStyles=this.findPropertyStyles()},setDefaultStyle:function(a){this.defaultStyle=a;this.propertyStyles=this.findPropertyStyles()},getSymbolizerPrefix:function(a){for(var b=OpenLayers.Style.SYMBOLIZER_PREFIXES,c=0,d=b.length;c<d;c++)if(a.CLASS_NAME.indexOf(b[c])!=-1)return b[c]},CLASS_NAME:"OpenLayers.Style"});OpenLayers.Style.createLiteral=function(a,b,c){if(typeof a=="string"&&a.indexOf("${")!=-1){a=OpenLayers.String.format(a,b,[c]);a=isNaN(a)||!a?a:parseFloat(a)}return a};OpenLayers.Style.SYMBOLIZER_PREFIXES=["Point","Line","Polygon","Text"];OpenLayers.Format.WKT=OpenLayers.Class(OpenLayers.Format,{initialize:function(a){this.regExes={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/};OpenLayers.Format.prototype.initialize.apply(this,[a])},read:function(a){var b,c,d,e=this.regExes.typeStr.exec(a);if(e){c=e[1].toLowerCase();d=e[2];if(this.parse[c])b=this.parse[c].apply(this,[d]);if(this.internalProjection&&this.externalProjection)if(b&&b.CLASS_NAME=="OpenLayers.Feature.Vector")b.geometry.transform(this.externalProjection,this.internalProjection);else if(b&&c!="geometrycollection"&&typeof b=="object")for(var f=0,g=b.length;f<g;f++){var h=b[f];h.geometry.transform(this.externalProjection,this.internalProjection)}}return b},write:function(a){var b,c,d,e,f;if(a.constructor==Array){b=a;f=true}else{b=[a];f=false}var g=[];f&&g.push("GEOMETRYCOLLECTION(");for(var h=0,j=b.length;h<j;++h){f&&h>0&&g.push(",");c=b[h].geometry;d=c.CLASS_NAME.split(".")[2].toLowerCase();if(!this.extract[d])return null;if(this.internalProjection&&this.externalProjection){c=c.clone();c.transform(this.internalProjection,this.externalProjection)}e=this.extract[d].apply(this,[c]);g.push(d.toUpperCase()+"("+e+")")}f&&g.push(")");return g.join("")},extract:{point:function(a){return a.x+" "+a.y},multipoint:function(a){for(var b=[],c=0,d=a.components.length;c<d;++c)b.push(this.extract.point.apply(this,[a.components[c]]));return b.join(",")},linestring:function(a){for(var b=[],c=0,d=a.components.length;c<d;++c)b.push(this.extract.point.apply(this,[a.components[c]]));return b.join(",")},multilinestring:function(a){for(var b=[],c=0,d=a.components.length;c<d;++c)b.push("("+this.extract.linestring.apply(this,[a.components[c]])+")");return b.join(",")},polygon:function(a){for(var b=[],c=0,d=a.components.length;c<d;++c)b.push("("+this.extract.linestring.apply(this,[a.components[c]])+")");return b.join(",")},multipolygon:function(a){for(var b=[],c=0,d=a.components.length;c<d;++c)b.push("("+this.extract.polygon.apply(this,[a.components[c]])+")");return b.join(",")}},parse:{point:function(a){var b=OpenLayers.String.trim(a).split(this.regExes.spaces);return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(b[0],b[1]))},multipoint:function(a){for(var b=OpenLayers.String.trim(a).split(","),c=[],d=0,e=b.length;d<e;++d)c.push(this.parse.point.apply(this,[b[d]]).geometry);return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiPoint(c))},linestring:function(a){for(var b=OpenLayers.String.trim(a).split(","),c=[],d=0,e=b.length;d<e;++d)c.push(this.parse.point.apply(this,[b[d]]).geometry);return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString(c))},multilinestring:function(a){for(var b,c=OpenLayers.String.trim(a).split(this.regExes.parenComma),d=[],e=0,f=c.length;e<f;++e){b=c[e].replace(this.regExes.trimParens,"$1");d.push(this.parse.linestring.apply(this,[b]).geometry)}return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiLineString(d))},polygon:function(a){for(var b,c,d,e=OpenLayers.String.trim(a).split(this.regExes.parenComma),f=[],g=0,h=e.length;g<h;++g){b=e[g].replace(this.regExes.trimParens,"$1");c=this.parse.linestring.apply(this,[b]).geometry;d=new OpenLayers.Geometry.LinearRing(c.components);f.push(d)}return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon(f))},multipolygon:function(a){for(var b,c=OpenLayers.String.trim(a).split(this.regExes.doubleParenComma),d=[],e=0,f=c.length;e<f;++e){b=c[e].replace(this.regExes.trimParens,"$1");d.push(this.parse.polygon.apply(this,[b]).geometry)}return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiPolygon(d))},geometrycollection:function(a){a=a.replace(/,\s*([A-Za-z])/g,"|$1");for(var b=OpenLayers.String.trim(a).split("|"),c=[],d=0,e=b.length;d<e;++d)c.push(OpenLayers.Format.WKT.prototype.read.apply(this,[b[d]]));return c}},CLASS_NAME:"OpenLayers.Format.WKT"});OpenLayers.Control.Navigation=OpenLayers.Class(OpenLayers.Control,{dragPan:null,dragPanOptions:null,zoomBox:null,zoomWheelEnabled:true,handleRightClicks:false,zoomBoxKeyMask:OpenLayers.Handler.MOD_SHIFT,initialize:function(){this.handlers={};OpenLayers.Control.prototype.initialize.apply(this,arguments)},destroy:function(){this.deactivate();this.dragPan&&this.dragPan.destroy();this.dragPan=null;this.zoomBox&&this.zoomBox.destroy();this.zoomBox=null;OpenLayers.Control.prototype.destroy.apply(this,arguments)},activate:function(){this.dragPan.activate();this.zoomWheelEnabled&&this.handlers.wheel.activate();this.handlers.click.activate();this.zoomBox.activate();return OpenLayers.Control.prototype.activate.apply(this,arguments)},deactivate:function(){this.zoomBox.deactivate();this.dragPan.deactivate();this.handlers.click.deactivate();this.handlers.wheel.deactivate();return OpenLayers.Control.prototype.deactivate.apply(this,arguments)},draw:function(){if(this.handleRightClicks)this.map.viewPortDiv.oncontextmenu=function(){return false};var a={dblclick:this.defaultDblClick,dblrightclick:this.defaultDblRightClick},b={"double":true,stopDouble:true};this.handlers.click=new OpenLayers.Handler.Click(this,a,b);this.dragPan=new OpenLayers.Control.DragPan(OpenLayers.Util.extend({map:this.map},this.dragPanOptions));this.zoomBox=new OpenLayers.Control.ZoomBox({map:this.map,keyMask:this.zoomBoxKeyMask});this.dragPan.draw();this.zoomBox.draw();this.handlers.wheel=new OpenLayers.Handler.MouseWheel(this,{up:this.wheelUp,down:this.wheelDown});this.activate()},defaultDblClick:function(a){var b=this.map.getLonLatFromViewPortPx(a.xy);this.map.setCenter(b,this.map.zoom+1)},defaultDblRightClick:function(a){var b=this.map.getLonLatFromViewPortPx(a.xy);this.map.setCenter(b,this.map.zoom-1)},wheelChange:function(a,b){var c=this.map.getZoom()+b;if(this.map.isValidZoomLevel(c)){var d=this.map.getSize(),e=d.w/2-a.xy.x,f=a.xy.y-d.h/2,g=this.map.baseLayer.getResolutionForZoom(c),h=this.map.getLonLatFromPixel(a.xy),j=new OpenLayers.LonLat(h.lon+
e*g,h.lat+f*g);this.map.setCenter(j,c)}},wheelUp:function(a){this.wheelChange(a,1)},wheelDown:function(a){this.wheelChange(a,-1)},disableZoomWheel:function(){this.zoomWheelEnabled=false;this.handlers.wheel.deactivate()},enableZoomWheel:function(){this.zoomWheelEnabled=true;this.active&&this.handlers.wheel.activate()},CLASS_NAME:"OpenLayers.Control.Navigation"});OpenLayers.Layer.TMS=OpenLayers.Class(OpenLayers.Layer.Grid,{serviceVersion:"1.0.0",isBaseLayer:true,tileOrigin:null,serverResolutions:null,initialize:function(a,b,c){var d=[];d.push(a,b,{},c);OpenLayers.Layer.Grid.prototype.initialize.apply(this,d)},destroy:function(){OpenLayers.Layer.Grid.prototype.destroy.apply(this,arguments)},clone:function(a){if(a==null)a=new OpenLayers.Layer.TMS(this.name,this.url,this.options);return a=OpenLayers.Layer.Grid.prototype.clone.apply(this,[a])},getURL:function(a){a=this.adjustBounds(a);var b=this.map.getResolution(),c=Math.round((a.left-this.tileOrigin.lon)/(b*this.tileSize.w)),d=Math.round((a.bottom-this.tileOrigin.lat)/(b*this.tileSize.h)),e=this.serverResolutions!=null?OpenLayers.Util.indexOf(this.serverResolutions,b):this.map.getZoom(),f=this.serviceVersion+"/"+this.layername+"/"+e+"/"+c+"/"+d+"."+this.type,g=this.url;if(g instanceof Array)g=this.selectUrl(f,g);return g+f},addTile:function(a,b){return new OpenLayers.Tile.Image(this,b,a,null,this.tileSize)},setMap:function(){OpenLayers.Layer.Grid.prototype.setMap.apply(this,arguments);if(!this.tileOrigin)this.tileOrigin=new OpenLayers.LonLat(this.map.maxExtent.left,this.map.maxExtent.bottom)},CLASS_NAME:"OpenLayers.Layer.TMS"});OpenLayers.StyleMap=OpenLayers.Class({styles:null,extendDefault:true,initialize:function(a,b){this.styles={"default":new OpenLayers.Style(OpenLayers.Feature.Vector.style["default"]),select:new OpenLayers.Style(OpenLayers.Feature.Vector.style.select),temporary:new OpenLayers.Style(OpenLayers.Feature.Vector.style.temporary),"delete":new OpenLayers.Style(OpenLayers.Feature.Vector.style["delete"])};if(a instanceof OpenLayers.Style){this.styles["default"]=a;this.styles.select=a;this.styles.temporary=a;this.styles["delete"]=a}else if(typeof a=="object")for(var c in a)if(a[c]instanceof OpenLayers.Style)this.styles[c]=a[c];else if(typeof a[c]=="object")this.styles[c]=new OpenLayers.Style(a[c]);else{this.styles["default"]=new OpenLayers.Style(a);this.styles.select=new OpenLayers.Style(a);this.styles.temporary=new OpenLayers.Style(a);this.styles["delete"]=new OpenLayers.Style(a);break}OpenLayers.Util.extend(this,b)},destroy:function(){for(var a in this.styles)this.styles[a].destroy();this.styles=null},createSymbolizer:function(a,b){a||(a=new OpenLayers.Feature.Vector);this.styles[b]||(b="default");a.renderIntent=b;var c={};if(this.extendDefault&&b!="default")c=this.styles["default"].createSymbolizer(a);return OpenLayers.Util.extend(c,this.styles[b].createSymbolizer(a))},addUniqueValueRules:function(a,b,c,d){var e=[];for(var f in c)e.push(new OpenLayers.Rule({symbolizer:c[f],context:d,filter:new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.EQUAL_TO,property:b,value:f})}));this.styles[a].addRules(e)},CLASS_NAME:"OpenLayers.StyleMap"});OpenLayers.Geometry=OpenLayers.Class({id:null,parent:null,bounds:null,initialize:function(){this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")},destroy:function(){this.bounds=this.id=null},clone:function(){return new OpenLayers.Geometry},setBounds:function(a){if(a)this.bounds=a.clone()},clearBounds:function(){this.bounds=null;this.parent&&this.parent.clearBounds()},extendBounds:function(a){var b=this.getBounds();b?this.bounds.extend(a):this.setBounds(a)},getBounds:function(){this.bounds==null&&this.calculateBounds();return this.bounds},calculateBounds:function(){},distanceTo:function(){},getVertices:function(){},atPoint:function(a,b,c){var d=false,e=this.getBounds();if(e!=null&&a!=null){var f=b!=null?b:0,g=c!=null?c:0,h=new OpenLayers.Bounds(this.bounds.left-f,this.bounds.bottom-g,this.bounds.right+f,this.bounds.top+g);d=h.containsLonLat(a)}return d},getLength:function(){return 0},getArea:function(){return 0},getCentroid:function(){return null},toString:function(){return OpenLayers.Format.WKT.prototype.write(new OpenLayers.Feature.Vector(this))},CLASS_NAME:"OpenLayers.Geometry"});OpenLayers.Geometry.fromWKT=function(a){var b=arguments.callee.format;if(!b){b=new OpenLayers.Format.WKT;arguments.callee.format=b}var c,d=b.read(a);if(d instanceof OpenLayers.Feature.Vector)c=d.geometry;else if(d instanceof Array){for(var e=d.length,f=new Array(e),g=0;g<e;++g)f[g]=d[g].geometry;c=new OpenLayers.Geometry.Collection(f)}return c};OpenLayers.Geometry.segmentsIntersect=function(a,b,c){var d=c&&c.point,e=c&&c.tolerance,f=false,g=a.x1-b.x1,h=a.y1-b.y1,j=a.x2-a.x1,k=a.y2-a.y1,l=b.y2-b.y1,m=b.x2-b.x1,p=l*j-m*k,q=m*h-l*g,n=j*h-k*g;if(p==0){if(q==0&&n==0)f=true}else{var o=q/p,r=n/p;if(o>=0&&o<=1&&r>=0&&r<=1)if(d){var s=a.x1+o*j,t=a.y1+o*k;f=new OpenLayers.Geometry.Point(s,t)}else f=true}if(e){var z;if(f){if(d){var B=[a,b],u,w=0;outer:for(;w<2;++w){u=B[w];for(var A=1;A<3;++A){s=u["x"+A];t=u["y"+A];z=Math.sqrt(Math.pow(s-f.x,2)+Math.pow(t-
f.y,2));if(z<e){f.x=s;f.y=t;break outer}}}}}else{B=[a,b];var v,D,C,F;w=0;outer:for(;w<2;++w){v=B[w];D=B[(w+1)%2];for(A=1;A<3;++A){C={x:v["x"+A],y:v["y"+A]};F=OpenLayers.Geometry.distanceToSegment(C,D);if(F.distance<e){f=d?new OpenLayers.Geometry.Point(C.x,C.y):true;break outer}}}}}return f};OpenLayers.Geometry.distanceToSegment=function(a,b){var c=a.x,d=a.y,e=b.x1,f=b.y1,g=b.x2,h=b.y2,j=g-e,k=h-f,l=(j*(c-e)+k*(d-f))/(Math.pow(j,2)+Math.pow(k,2)),m,p;if(l<=0){m=e;p=f}else if(l>=1){m=g;p=h}else{m=e+l*j;p=f+l*k}return{distance:Math.sqrt(Math.pow(m-c,2)+Math.pow(p-d,2)),x:m,y:p}};OpenLayers.Layer.Vector=OpenLayers.Class(OpenLayers.Layer,{EVENT_TYPES:["beforefeatureadded","beforefeaturesadded","featureadded","featuresadded","beforefeatureremoved","featureremoved","featuresremoved","beforefeatureselected","featureselected","featureunselected","beforefeaturemodified","featuremodified","afterfeaturemodified","vertexmodified","sketchstarted","sketchmodified","sketchcomplete","refresh"],isBaseLayer:false,isFixed:false,isVector:true,features:null,selectedFeatures:null,unrenderedFeatures:null,reportError:true,style:null,styleMap:null,strategies:null,protocol:null,renderers:["SVG","VML","Canvas"],renderer:null,rendererOptions:null,geometryType:null,drawn:false,initialize:function(){this.EVENT_TYPES=OpenLayers.Layer.Vector.prototype.EVENT_TYPES.concat(OpenLayers.Layer.prototype.EVENT_TYPES);OpenLayers.Layer.prototype.initialize.apply(this,arguments);if(!this.renderer||!this.renderer.supported())this.assignRenderer();if(!this.renderer||!this.renderer.supported()){this.renderer=null;this.displayError()}if(!this.styleMap)this.styleMap=new OpenLayers.StyleMap;this.features=[];this.selectedFeatures=[];this.unrenderedFeatures={};if(this.strategies)for(var a=0,b=this.strategies.length;a<b;a++)this.strategies[a].setLayer(this)},destroy:function(){if(this.strategies){var a,b,c;for(b=0,c=this.strategies.length;b<c;b++){a=this.strategies[b];a.autoDestroy&&a.destroy()}this.strategies=null}if(this.protocol){this.protocol.autoDestroy&&this.protocol.destroy();this.protocol=null}this.destroyFeatures();this.unrenderedFeatures=this.selectedFeatures=this.features=null;this.renderer&&this.renderer.destroy();this.drawn=this.geometryType=this.renderer=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments)},refresh:function(a){this.calculateInRange()&&this.visibility&&this.events.triggerEvent("refresh",a)},assignRenderer:function(){for(var a=0,b=this.renderers.length;a<b;a++){var c=OpenLayers.Renderer[this.renderers[a]];if(c&&c.prototype.supported()){this.renderer=new c(this.div,this.rendererOptions);break}}},displayError:function(){this.reportError&&OpenLayers.Console.userError(OpenLayers.i18n("browserNotSupported",{renderers:this.renderers.join("\n")}))},setMap:function(){OpenLayers.Layer.prototype.setMap.apply(this,arguments);if(this.renderer){this.renderer.map=this.map;this.renderer.setSize(this.map.getSize())}else this.map.removeLayer(this)},afterAdd:function(){if(this.strategies){var a,b,c;for(b=0,c=this.strategies.length;b<c;b++){a=this.strategies[b];a.autoActivate&&a.activate()}}},removeMap:function(){if(this.strategies){var a,b,c;for(b=0,c=this.strategies.length;b<c;b++){a=this.strategies[b];a.autoActivate&&a.deactivate()}}},onMapResize:function(){OpenLayers.Layer.prototype.onMapResize.apply(this,arguments);this.renderer.setSize(this.map.getSize())},moveTo:function(a,b,c){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);var d=true;if(!c){this.renderer.root.style.visibility="hidden";this.div.style.left=-parseInt(this.map.layerContainerDiv.style.left)+"px";this.div.style.top=-parseInt(this.map.layerContainerDiv.style.top)+"px";var e=this.map.getExtent();d=this.renderer.setExtent(e,b);this.renderer.root.style.visibility="visible";if(navigator.userAgent.toLowerCase().indexOf("gecko")!=-1)this.div.scrollLeft=this.div.scrollLeft;if(!b&&d)for(var f in this.unrenderedFeatures){var g=this.unrenderedFeatures[f];this.drawFeature(g)}}if(!this.drawn||b||!d){this.drawn=true;f=0;for(var h=this.features.length;f<h;f++){this.renderer.locked=f!==h-1;g=this.features[f];this.drawFeature(g)}}},display:function(){OpenLayers.Layer.prototype.display.apply(this,arguments);var a=this.div.style.display;if(a!=this.renderer.root.style.display)this.renderer.root.style.display=a},addFeatures:function(a,b){a instanceof Array||(a=[a]);var c=!b||!b.silent;if(c){var d={features:a},e=this.events.triggerEvent("beforefeaturesadded",d);if(e===false)return;a=d.features}for(var f=0,g=a.length;f<g;f++){this.renderer.locked=f!=a.length-1?true:false;var h=a[f];if(this.geometryType&&!(h.geometry instanceof this.geometryType)){var j=OpenLayers.i18n("componentShouldBe",{geomType:this.geometryType.prototype.CLASS_NAME});throw j;}this.features.push(h);h.layer=this;if(!h.style&&this.style)h.style=OpenLayers.Util.extend({},this.style);if(c){if(this.events.triggerEvent("beforefeatureadded",{feature:h})===false)continue;this.preFeatureInsert(h)}this.drawFeature(h);if(c){this.events.triggerEvent("featureadded",{feature:h});this.onFeatureInsert(h)}}c&&this.events.triggerEvent("featuresadded",{features:a})},removeFeatures:function(a,b){if(!(!a||a.length===0)){a instanceof Array||(a=[a]);if(a===this.features)a=a.slice();for(var c=!b||!b.silent,d=a.length-1;d>=0;d--){this.renderer.locked=d!=0&&a[d-1].geometry?true:false;var e=a[d];delete this.unrenderedFeatures[e.id];c&&this.events.triggerEvent("beforefeatureremoved",{feature:e});this.features=OpenLayers.Util.removeItem(this.features,e);e.layer=null;e.geometry&&this.renderer.eraseFeatures(e);OpenLayers.Util.indexOf(this.selectedFeatures,e)!=-1&&OpenLayers.Util.removeItem(this.selectedFeatures,e);c&&this.events.triggerEvent("featureremoved",{feature:e})}c&&this.events.triggerEvent("featuresremoved",{features:a})}},destroyFeatures:function(a,b){var c=a==undefined;if(c)a=this.features;if(a){this.removeFeatures(a,b);for(var d=a.length-1;d>=0;d--)a[d].destroy()}},drawFeature:function(a,b){if(this.drawn){if(typeof b!="object"){if(!b&&a.state===OpenLayers.State.DELETE)b="delete";var c=b||a.renderIntent;(b=a.style||this.style)||(b=this.styleMap.createSymbolizer(a,c))}if(this.renderer.drawFeature(a,b))delete this.unrenderedFeatures[a.id];else this.unrenderedFeatures[a.id]=a}},eraseFeatures:function(a){this.renderer.eraseFeatures(a)},getFeatureFromEvent:function(a){if(!this.renderer){OpenLayers.Console.error(OpenLayers.i18n("getFeatureError"));return null}var b=this.renderer.getFeatureIdFromEvent(a);return this.getFeatureById(b)},getFeatureById:function(a){for(var b=null,c=0,d=this.features.length;c<d;++c)if(this.features[c].id==a){b=this.features[c];break}return b},onFeatureInsert:function(){},preFeatureInsert:function(){},getDataExtent:function(){var a=null;if(this.features&&this.features.length>0){a=new OpenLayers.Bounds;for(var b=0,c=this.features.length;b<c;b++)a.extend(this.features[b].geometry.getBounds())}return a},CLASS_NAME:"OpenLayers.Layer.Vector"});OpenLayers.Geometry.Point=OpenLayers.Class(OpenLayers.Geometry,{x:null,y:null,initialize:function(a,b){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);this.x=parseFloat(a);this.y=parseFloat(b)},clone:function(a){if(a==null)a=new OpenLayers.Geometry.Point(this.x,this.y);OpenLayers.Util.applyDefaults(a,this);return a},calculateBounds:function(){this.bounds=new OpenLayers.Bounds(this.x,this.y,this.x,this.y)},distanceTo:function(a,b){var c=!(b&&b.edge===false),d=c&&b&&b.details,e,f,g,h,j,k;if(a instanceof OpenLayers.Geometry.Point){f=this.x;g=this.y;h=a.x;j=a.y;e=Math.sqrt(Math.pow(f-h,2)+Math.pow(g-j,2));k=!d?e:{x0:f,y0:g,x1:h,y1:j,distance:e}}else{k=a.distanceTo(this,b);if(d)k={x0:k.x1,y0:k.y1,x1:k.x0,y1:k.y0,distance:k.distance}}return k},equals:function(a){var b=false;if(a!=null)b=this.x==a.x&&this.y==a.y||isNaN(this.x)&&isNaN(this.y)&&isNaN(a.x)&&isNaN(a.y);return b},toShortString:function(){return this.x+", "+this.y},move:function(a,b){this.x+=a;this.y+=b;this.clearBounds()},rotate:function(a,b){a*=Math.PI/180;var c=this.distanceTo(b),d=a+Math.atan2(this.y-b.y,this.x-b.x);this.x=b.x+c*Math.cos(d);this.y=b.y+c*Math.sin(d);this.clearBounds()},getCentroid:function(){return new OpenLayers.Geometry.Point(this.x,this.y)},resize:function(a,b,c){c=c==undefined?1:c;this.x=b.x+a*c*(this.x-b.x);this.y=b.y+a*(this.y-b.y);this.clearBounds();return this},intersects:function(a){var b=false;return b=a.CLASS_NAME=="OpenLayers.Geometry.Point"?this.equals(a):a.intersects(this)},transform:function(a,b){if(a&&b){OpenLayers.Projection.transform(this,a,b);this.bounds=null}return this},getVertices:function(){return[this]},CLASS_NAME:"OpenLayers.Geometry.Point"});OpenLayers.Geometry.Collection=OpenLayers.Class(OpenLayers.Geometry,{components:null,componentTypes:null,initialize:function(a){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);this.components=[];a!=null&&this.addComponents(a)},destroy:function(){this.components.length=0;this.components=null},clone:function(){for(var a=eval("new "+this.CLASS_NAME+"()"),b=0,c=this.components.length;b<c;b++)a.addComponent(this.components[b].clone());OpenLayers.Util.applyDefaults(a,this);return a},getComponentsString:function(){for(var a=[],b=0,c=this.components.length;b<c;b++)a.push(this.components[b].toShortString());return a.join(",")},calculateBounds:function(){this.bounds=null;if(this.components&&this.components.length>0){this.setBounds(this.components[0].getBounds());for(var a=1,b=this.components.length;a<b;a++)this.extendBounds(this.components[a].getBounds())}},addComponents:function(a){a instanceof Array||(a=[a]);for(var b=0,c=a.length;b<c;b++)this.addComponent(a[b])},addComponent:function(a,b){var c=false;if(a)if(this.componentTypes==null||OpenLayers.Util.indexOf(this.componentTypes,a.CLASS_NAME)>-1){if(b!=null&&b<this.components.length){var d=this.components.slice(0,b),e=this.components.slice(b,this.components.length);d.push(a);this.components=d.concat(e)}else this.components.push(a);a.parent=this;this.clearBounds();c=true}return c},removeComponents:function(a){a instanceof Array||(a=[a]);for(var b=a.length-1;b>=0;--b)this.removeComponent(a[b])},removeComponent:function(a){OpenLayers.Util.removeItem(this.components,a);this.clearBounds()},getLength:function(){for(var a=0,b=0,c=this.components.length;b<c;b++)a+=this.components[b].getLength();return a},getArea:function(){for(var a=0,b=0,c=this.components.length;b<c;b++)a+=this.components[b].getArea();return a},getGeodesicArea:function(a){for(var b=0,c=0,d=this.components.length;c<d;c++)b+=this.components[c].getGeodesicArea(a);return b},getCentroid:function(){return this.components.length&&this.components[0].getCentroid()},getGeodesicLength:function(a){for(var b=0,c=0,d=this.components.length;c<d;c++)b+=this.components[c].getGeodesicLength(a);return b},move:function(a,b){for(var c=0,d=this.components.length;c<d;c++)this.components[c].move(a,b)},rotate:function(a,b){for(var c=0,d=this.components.length;c<d;++c)this.components[c].rotate(a,b)},resize:function(a,b,c){for(var d=0;d<this.components.length;++d)this.components[d].resize(a,b,c);return this},distanceTo:function(a,b){for(var c=!(b&&b.edge===false),d=c&&b&&b.details,e,f,g=Number.POSITIVE_INFINITY,h=0,j=this.components.length;h<j;++h){e=this.components[h].distanceTo(a,b);distance=d?e.distance:e;if(distance<g){g=distance;f=e;if(g==0)break}}return f},equals:function(a){var b=true;if(!a||!a.CLASS_NAME||this.CLASS_NAME!=a.CLASS_NAME)b=false;else if(!(a.components instanceof Array)||a.components.length!=this.components.length)b=false;else for(var c=0,d=this.components.length;c<d;++c)if(!this.components[c].equals(a.components[c])){b=false;break}return b},transform:function(a,b){if(a&&b){for(var c=0,d=this.components.length;c<d;c++){var e=this.components[c];e.transform(a,b)}this.bounds=null}return this},intersects:function(a){for(var b=false,c=0,d=this.components.length;c<d;++c)if(b=a.intersects(this.components[c]))break;return b},getVertices:function(a){for(var b=[],c=0,d=this.components.length;c<d;++c)Array.prototype.push.apply(b,this.components[c].getVertices(a));return b},CLASS_NAME:"OpenLayers.Geometry.Collection"});OpenLayers.Layer.WFS=OpenLayers.Class(OpenLayers.Layer.Vector,OpenLayers.Layer.Markers,{isBaseLayer:false,tile:null,ratio:2,DEFAULT_PARAMS:{service:"WFS",version:"1.0.0",request:"GetFeature"},featureClass:null,format:null,formatObject:null,formatOptions:null,vectorMode:true,encodeBBOX:false,extractAttributes:false,initialize:function(a,b,c,d){if(d==undefined)d={};if(d.featureClass||!OpenLayers.Layer.Vector||!OpenLayers.Feature.Vector)this.vectorMode=false;OpenLayers.Util.extend(d,{reportError:false});var e=[];e.push(a,d);OpenLayers.Layer.Vector.prototype.initialize.apply(this,e);if(!this.renderer||!this.vectorMode){this.vectorMode=false;if(!d.featureClass)d.featureClass=OpenLayers.Feature.WFS;OpenLayers.Layer.Markers.prototype.initialize.apply(this,e)}if(this.params&&this.params.typename&&!this.options.typename)this.options.typename=this.params.typename;if(!this.options.geometry_column)this.options.geometry_column="the_geom";this.params=OpenLayers.Util.applyDefaults(c,OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS));this.url=b},destroy:function(){this.vectorMode?OpenLayers.Layer.Vector.prototype.destroy.apply(this,arguments):OpenLayers.Layer.Markers.prototype.destroy.apply(this,arguments);this.tile&&this.tile.destroy();this.format=this.featureClass=this.ratio=this.tile=null;this.formatObject&&this.formatObject.destroy&&this.formatObject.destroy();this.extractAttributes=this.encodeBBOX=this.vectorMode=this.formatOptions=this.formatObject=null},setMap:function(){if(this.vectorMode){OpenLayers.Layer.Vector.prototype.setMap.apply(this,arguments);var a={extractAttributes:this.extractAttributes};OpenLayers.Util.extend(a,this.formatOptions);if(this.map&&!this.projection.equals(this.map.getProjectionObject())){a.externalProjection=this.projection;a.internalProjection=this.map.getProjectionObject()}this.formatObject=this.format?new this.format(a):new OpenLayers.Format.GML(a)}else OpenLayers.Layer.Markers.prototype.setMap.apply(this,arguments)},moveTo:function(a,b,c){this.vectorMode?OpenLayers.Layer.Vector.prototype.moveTo.apply(this,arguments):OpenLayers.Layer.Markers.prototype.moveTo.apply(this,arguments);if(c)return false;b&&this.vectorMode&&this.renderer.clear();if(this.options.minZoomLevel){OpenLayers.Console.warn(OpenLayers.i18n("minZoomLevelError"));if(this.map.getZoom()<this.options.minZoomLevel)return null}if(a==null)a=this.map.getExtent();var d=this.tile==null,e=!d&&!this.tile.bounds.containsBounds(a);if(b||d||!c&&e){var f=a.getCenterLonLat(),g=a.getWidth()*this.ratio,h=a.getHeight()*this.ratio,j=new OpenLayers.Bounds(f.lon-
g/2,f.lat-h/2,f.lon+g/2,f.lat+h/2),k=this.map.getSize();k.w*=this.ratio;k.h*=this.ratio;var l=new OpenLayers.LonLat(j.left,j.top),m=this.map.getLayerPxFromLonLat(l),p=this.getFullRequestString(),q=null,n=this.params.filter||this.params.FILTER;q=n?{FILTER:n}:{BBOX:this.encodeBBOX?j.toBBOX():j.toArray()};if(this.map&&!this.projection.equals(this.map.getProjectionObject())){var o=j.clone();o.transform(this.map.getProjectionObject(),this.projection);if(!n)q.BBOX=this.encodeBBOX?o.toBBOX():o.toArray()}p+="&"+OpenLayers.Util.getParameterString(q);if(this.tile){if(this.vectorMode){this.destroyFeatures();this.renderer.clear()}else this.clearMarkers();this.removeTileMonitoringHooks(this.tile);this.tile.destroy();this.tile=null}this.tile=new OpenLayers.Tile.WFS(this,m,j,p,k);this.addTileMonitoringHooks(this.tile);this.tile.draw()}},addTileMonitoringHooks:function(a){a.onLoadStart=function(){this==this.layer.tile&&this.layer.events.triggerEvent("loadstart")};a.events.register("loadstart",a,a.onLoadStart);a.onLoadEnd=function(){if(this==this.layer.tile){this.layer.events.triggerEvent("tileloaded");this.layer.events.triggerEvent("loadend")}};a.events.register("loadend",a,a.onLoadEnd);a.events.register("unload",a,a.onLoadEnd)},removeTileMonitoringHooks:function(a){a.unload();a.events.un({loadstart:a.onLoadStart,loadend:a.onLoadEnd,unload:a.onLoadEnd,scope:a})},onMapResize:function(){this.vectorMode?OpenLayers.Layer.Vector.prototype.onMapResize.apply(this,arguments):OpenLayers.Layer.Markers.prototype.onMapResize.apply(this,arguments)},display:function(){this.vectorMode?OpenLayers.Layer.Vector.prototype.display.apply(this,arguments):OpenLayers.Layer.Markers.prototype.display.apply(this,arguments)},mergeNewParams:function(a){var b=OpenLayers.Util.upperCaseObject(a),c=[b];return OpenLayers.Layer.HTTPRequest.prototype.mergeNewParams.apply(this,c)},clone:function(a){if(a==null)a=new OpenLayers.Layer.WFS(this.name,this.url,this.params,this.options);return a=this.vectorMode?OpenLayers.Layer.Vector.prototype.clone.apply(this,[a]):OpenLayers.Layer.Markers.prototype.clone.apply(this,[a])},getFullRequestString:function(){var a=this.projection.getCode()||this.map.getProjection();this.params.SRS=a=="none"?null:a;return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,arguments)},commit:function(){if(!this.writer){var a={};if(this.map&&!this.projection.equals(this.map.getProjectionObject())){a.externalProjection=this.projection;a.internalProjection=this.map.getProjectionObject()}this.writer=new OpenLayers.Format.WFS(a,this)}var b=this.writer.write(this.features);OpenLayers.Request.POST({url:this.url,data:b,success:this.commitSuccess,failure:this.commitFailure,scope:this})},commitSuccess:function(a){var b=a.responseText;if(b.indexOf("SUCCESS")!=-1){this.commitReport(OpenLayers.i18n("commitSuccess",{response:b}));for(var c=0;c<this.features.length;c++)this.features[c].state=null}else if(b.indexOf("FAILED")!=-1||b.indexOf("Exception")!=-1)this.commitReport(OpenLayers.i18n("commitFailed",{response:b}))},commitFailure:function(){},commitReport:function(a){OpenLayers.Console.userError(a)},refresh:function(){if(this.tile){if(this.vectorMode){this.renderer.clear();this.features.length=0}else{this.clearMarkers();this.markers.length=0}this.tile.draw()}},getDataExtent:function(){var a;return a=this.vectorMode?OpenLayers.Layer.Vector.prototype.getDataExtent.apply(this):OpenLayers.Layer.Markers.prototype.getDataExtent.apply(this)},setOpacity:function(a){this.vectorMode?OpenLayers.Layer.Vector.prototype.setOpacity.apply(this,[a]):OpenLayers.Layer.Markers.prototype.setOpacity.apply(this,[a])},CLASS_NAME:"OpenLayers.Layer.WFS"});OpenLayers.Geometry.MultiPoint=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.Point"],initialize:function(){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments)},addPoint:function(a,b){this.addComponent(a,b)},removePoint:function(a){this.removeComponent(a)},CLASS_NAME:"OpenLayers.Geometry.MultiPoint"});OpenLayers.Geometry.Curve=OpenLayers.Class(OpenLayers.Geometry.MultiPoint,{componentTypes:["OpenLayers.Geometry.Point"],initialize:function(){OpenLayers.Geometry.MultiPoint.prototype.initialize.apply(this,arguments)},getLength:function(){var a=0;if(this.components&&this.components.length>1)for(var b=1,c=this.components.length;b<c;b++)a+=this.components[b-1].distanceTo(this.components[b]);return a},getGeodesicLength:function(a){var b=this;if(a){var c=new OpenLayers.Projection("EPSG:4326");c.equals(a)||(b=this.clone().transform(a,c))}var d=0;if(b.components&&b.components.length>1)for(var e,f,g=1,h=b.components.length;g<h;g++){e=b.components[g-1];f=b.components[g];d+=OpenLayers.Util.distVincenty({lon:e.x,lat:e.y},{lon:f.x,lat:f.y})}return d*1E3},CLASS_NAME:"OpenLayers.Geometry.Curve"});OpenLayers.Geometry.LineString=OpenLayers.Class(OpenLayers.Geometry.Curve,{initialize:function(){OpenLayers.Geometry.Curve.prototype.initialize.apply(this,arguments)},removeComponent:function(){this.components&&this.components.length>2&&OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments)},intersects:function(a){var b=false,c=a.CLASS_NAME;if(c=="OpenLayers.Geometry.LineString"||c=="OpenLayers.Geometry.LinearRing"||c=="OpenLayers.Geometry.Point"){var d=this.getSortedSegments(),e;e=c=="OpenLayers.Geometry.Point"?[{x1:a.x,y1:a.y,x2:a.x,y2:a.y}]:a.getSortedSegments();var f,g,h,j,k,l,m,p,q=0,n=d.length;outer:for(;q<n;++q){f=d[q];g=f.x1;h=f.x2;j=f.y1;k=f.y2;var o=0,r=e.length;inner:for(;o<r;++o){l=e[o];if(l.x1>h)break;if(!(l.x2<g)){m=l.y1;p=l.y2;if(!(Math.min(m,p)>Math.max(j,k)))if(!(Math.max(m,p)<Math.min(j,k)))if(OpenLayers.Geometry.segmentsIntersect(f,l)){b=true;break outer}}}}}else b=a.intersects(this);return b},getSortedSegments:function(){function a(e,f){return e.x1-f.x1}
for(var b=this.components.length-1,c=new Array(b),d=0;d<b;++d){point1=this.components[d];point2=this.components[d+1];c[d]=point1.x<point2.x?{x1:point1.x,y1:point1.y,x2:point2.x,y2:point2.y}:{x1:point2.x,y1:point2.y,x2:point1.x,y2:point1.y}}return c.sort(a)},splitWithSegment:function(a,b){for(var c=!(b&&b.edge===false),d=b&&b.tolerance,e=[],f=this.getVertices(),g=[],h=[],j=false,k,l,m,p,q,n={point:true,tolerance:d},o=null,r=0,s=f.length-2;r<=s;++r){k=f[r];g.push(k.clone());l=f[r+1];q={x1:k.x,y1:k.y,x2:l.x,y2:l.y};m=OpenLayers.Geometry.segmentsIntersect(a,q,n);if(m instanceof OpenLayers.Geometry.Point)if((p=m.x===a.x1&&m.y===a.y1||m.x===a.x2&&m.y===a.y2||m.equals(k)||m.equals(l)?true:false)||c){m.equals(h[h.length-1])||h.push(m.clone());if(r===0)if(m.equals(k))continue;if(!m.equals(l)){j=true;m.equals(k)||g.push(m);e.push(new OpenLayers.Geometry.LineString(g));g=[m.clone()]}}}if(j){g.push(l.clone());e.push(new OpenLayers.Geometry.LineString(g))}if(h.length>0){var t=a.x1<a.x2?1:-1,z=a.y1<a.y2?1:-1;o={lines:e,points:h.sort(function(B,u){return t*B.x-t*u.x||z*B.y-z*u.y})}}return o},split:function(a,b){var c=null,d=b&&b.mutual,e,f,g,h;if(a instanceof OpenLayers.Geometry.LineString){var j=this.getVertices(),k,l,m,p,q,n,o=[];g=[];for(var r=0,s=j.length-2;r<=s;++r){k=j[r];l=j[r+1];m={x1:k.x,y1:k.y,x2:l.x,y2:l.y};h=h||[a];d&&o.push(k.clone());for(var t=0;t<h.length;++t)if(p=h[t].splitWithSegment(m,b)){q=p.lines;if(q.length>0){q.unshift(t,1);Array.prototype.splice.apply(h,q);t+=q.length-2}if(d)for(var z=0,B=p.points.length;z<B;++z){n=p.points[z];if(!n.equals(k)){o.push(n);g.push(new OpenLayers.Geometry.LineString(o));o=n.equals(l)?[]:[n.clone()]}}}}if(d&&g.length>0&&o.length>0){o.push(l.clone());g.push(new OpenLayers.Geometry.LineString(o))}}else c=a.splitWith(this,b);if(h&&h.length>1)f=true;else h=[];if(g&&g.length>1)e=true;else g=[];if(f||e)c=d?[g,h]:h;return c},splitWith:function(a,b){return a.split(this,b)},getVertices:function(a){var b;return b=a===true?[this.components[0],this.components[this.components.length-
1]]:a===false?this.components.slice(1,this.components.length-1):this.components.slice()},distanceTo:function(a,b){var c=!(b&&b.edge===false),d=c&&b&&b.details,e,f={},g=Number.POSITIVE_INFINITY;if(a instanceof OpenLayers.Geometry.Point){for(var h=this.getSortedSegments(),j=a.x,k=a.y,l,m=0,p=h.length;m<p;++m){l=h[m];e=OpenLayers.Geometry.distanceToSegment(a,l);if(e.distance<g){g=e.distance;f=e;if(g===0)break}else if(l.x2>j&&(k>l.y1&&k<l.y2||k<l.y1&&k>l.y2))break}f=d?{distance:f.distance,x0:f.x,y0:f.y,x1:j,y1:k}:f.distance}else if(a instanceof OpenLayers.Geometry.LineString){var q=this.getSortedSegments(),n=a.getSortedSegments(),o,r,s,t,z,B=n.length,u={point:true};m=0;p=q.length;outer:for(;m<p;++m){o=q[m];t=o.x1;z=o.y1;for(var w=0;w<B;++w){r=n[w];if(s=OpenLayers.Geometry.segmentsIntersect(o,r,u)){g=0;f={distance:0,x0:s.x,y0:s.y,x1:s.x,y1:s.y};break outer}else{e=OpenLayers.Geometry.distanceToSegment({x:t,y:z},r);if(e.distance<g){g=e.distance;f={distance:g,x0:t,y0:z,x1:e.x,y1:e.y}}}}}if(!d)f=f.distance;if(g!==0)if(o){e=a.distanceTo(new OpenLayers.Geometry.Point(o.x2,o.y2),b);var A=d?e.distance:e;if(A<g)f=d?{distance:g,x0:e.x1,y0:e.y1,x1:e.x0,y1:e.y0}:A}}else{f=a.distanceTo(this,b);if(d)f={distance:f.distance,x0:f.x1,y0:f.y1,x1:f.x0,y1:f.y0}}return f},CLASS_NAME:"OpenLayers.Geometry.LineString"});OpenLayers.Geometry.MultiLineString=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.LineString"],initialize:function(){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments)},split:function(a,b){for(var c=null,d=b&&b.mutual,e,f,g,h,j,k=[],l=[a],m=0,p=this.components.length;m<p;++m){f=this.components[m];h=false;for(var q=0;q<l.length;++q)if(e=f.split(l[q],b)){if(d){g=e[0];for(var n=0,o=g.length;n<o;++n)n===0&&k.length?k[k.length-1].addComponent(g[n]):k.push(new OpenLayers.Geometry.MultiLineString([g[n]]));h=true;e=e[1]}if(e.length){e.unshift(q,1);Array.prototype.splice.apply(l,e);break}}if(!h)if(k.length)k[k.length-1].addComponent(f.clone());else k=[new OpenLayers.Geometry.MultiLineString(f.clone())]}if(k&&k.length>1)h=true;else k=[];if(l&&l.length>1)j=true;else l=[];if(h||j)c=d?[k,l]:l;return c},splitWith:function(a,b){var c=null,d=b&&b.mutual,e,f,g,h,j,k,l;if(a instanceof OpenLayers.Geometry.LineString){l=[];k=[a];for(var m=0,p=this.components.length;m<p;++m){j=false;f=this.components[m];for(var q=0;q<k.length;++q)if(e=k[q].split(f,b)){if(d){g=e[0];if(g.length){g.unshift(q,1);Array.prototype.splice.apply(k,g);q+=g.length-2}e=e[1];if(e.length===0)e=[f.clone()]}for(var n=0,o=e.length;n<o;++n)n===0&&l.length?l[l.length-1].addComponent(e[n]):l.push(new OpenLayers.Geometry.MultiLineString([e[n]]));j=true}if(!j)if(l.length)l[l.length-1].addComponent(f.clone());else l=[new OpenLayers.Geometry.MultiLineString([f.clone()])]}}else c=a.split(this);if(k&&k.length>1)h=true;else k=[];if(l&&l.length>1)j=true;else l=[];if(h||j)c=d?[k,l]:l;return c},CLASS_NAME:"OpenLayers.Geometry.MultiLineString"});OpenLayers.Geometry.LinearRing=OpenLayers.Class(OpenLayers.Geometry.LineString,{componentTypes:["OpenLayers.Geometry.Point"],initialize:function(){OpenLayers.Geometry.LineString.prototype.initialize.apply(this,arguments)},addComponent:function(a,b){var c=false,d=this.components.pop();if(b!=null||!a.equals(d))c=OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,arguments);var e=this.components[0];OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,[e]);return c},removeComponent:function(){if(this.components.length>4){this.components.pop();OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments);var a=this.components[0];OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,[a])}},move:function(a,b){for(var c=0,d=this.components.length;c<d-1;c++)this.components[c].move(a,b)},rotate:function(a,b){for(var c=0,d=this.components.length;c<d-1;++c)this.components[c].rotate(a,b)},resize:function(a,b,c){for(var d=0,e=this.components.length;d<e-1;++d)this.components[d].resize(a,b,c);return this},transform:function(a,b){if(a&&b){for(var c=0,d=this.components.length;c<d-1;c++){var e=this.components[c];e.transform(a,b)}this.bounds=null}return this},getCentroid:function(){if(this.components&&this.components.length>2){for(var a=0,b=0,c=0;c<this.components.length-1;c++){var d=this.components[c],e=this.components[c+1];a+=(d.x+e.x)*(d.x*e.y-e.x*d.y);b+=(d.y+e.y)*(d.x*e.y-e.x*d.y)}var f=-1*this.getArea(),g=a/(6*f),h=b/(6*f)}return new OpenLayers.Geometry.Point(g,h)},getArea:function(){var a=0;if(this.components&&this.components.length>2){for(var b=0,c=0,d=this.components.length;c<d-1;c++){var e=this.components[c],f=this.components[c+1];b+=(e.x+f.x)*(f.y-e.y)}a=-b/2}return a},getGeodesicArea:function(a){var b=this;if(a){var c=new OpenLayers.Projection("EPSG:4326");c.equals(a)||(b=this.clone().transform(a,c))}var d=0,e=b.components&&b.components.length;if(e>2){for(var f,g,h=0;h<e-1;h++){f=b.components[h];g=b.components[h+1];d+=OpenLayers.Util.rad(g.x-f.x)*(2+Math.sin(OpenLayers.Util.rad(f.y))+Math.sin(OpenLayers.Util.rad(g.y)))}d=d*6378137*6378137/2}return d},containsPoint:function(a){function b(s,t,z,B,u){return((t-B)*s+(B*z-t*u))/(z-u)}for(var c=OpenLayers.Number.limitSigDigs,d=14,e=c(a.x,d),f=c(a.y,d),g=this.components.length-1,h,j,k,l,m,p,q,n=0,o=0;o<g;++o){h=this.components[o];k=c(h.x,d);l=c(h.y,d);j=this.components[o+1];m=c(j.x,d);p=c(j.y,d);if(l==p){if(f==l)if(k<=m&&e>=k&&e<=m||k>=m&&e<=k&&e>=m){n=-1;break}}else{q=c(b(f,k,l,m,p),d);if(q==e)if(l<p&&f>=l&&f<=p||l>p&&f<=l&&f>=p){n=-1;break}if(!(q<=e))if(!(k!=m&&(q<Math.min(k,m)||q>Math.max(k,m))))if(l<p&&f>=l&&f<p||l>p&&f<l&&f>=p)++n}}var r=n==-1?1:!!(n&1);return r},intersects:function(a){var b=false;if(a.CLASS_NAME=="OpenLayers.Geometry.Point")b=this.containsPoint(a);else if(a.CLASS_NAME=="OpenLayers.Geometry.LineString")b=a.intersects(this);else if(a.CLASS_NAME=="OpenLayers.Geometry.LinearRing")b=OpenLayers.Geometry.LineString.prototype.intersects.apply(this,[a]);else for(var c=0,d=a.components.length;c<d;++c)if(b=a.components[c].intersects(this))break;return b},getVertices:function(a){return a===true?[]:this.components.slice(0,this.components.length-1)},CLASS_NAME:"OpenLayers.Geometry.LinearRing"});OpenLayers.Geometry.Polygon=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.LinearRing"],initialize:function(){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments)},getArea:function(){var a=0;if(this.components&&this.components.length>0){a+=Math.abs(this.components[0].getArea());for(var b=1,c=this.components.length;b<c;b++)a-=Math.abs(this.components[b].getArea())}return a},getGeodesicArea:function(a){var b=0;if(this.components&&this.components.length>0){b+=Math.abs(this.components[0].getGeodesicArea(a));for(var c=1,d=this.components.length;c<d;c++)b-=Math.abs(this.components[c].getGeodesicArea(a))}return b},containsPoint:function(a){var b=this.components.length,c=false;if(b>0){c=this.components[0].containsPoint(a);if(c!==1)if(c&&b>1)for(var d,e=1;e<b;++e)if(d=this.components[e].containsPoint(a)){c=d===1?1:false;break}}return c},intersects:function(a){var b=false,c,d;if(a.CLASS_NAME=="OpenLayers.Geometry.Point")b=this.containsPoint(a);else if(a.CLASS_NAME=="OpenLayers.Geometry.LineString"||a.CLASS_NAME=="OpenLayers.Geometry.LinearRing"){for(c=0,d=this.components.length;c<d;++c)if(b=a.intersects(this.components[c]))break;if(!b)for(c=0,d=a.components.length;c<d;++c)if(b=this.containsPoint(a.components[c]))break}else for(c=0,d=a.components.length;c<d;++c)if(b=this.intersects(a.components[c]))break;if(!b&&a.CLASS_NAME=="OpenLayers.Geometry.Polygon"){var e=this.components[0];for(c=0,d=e.components.length;c<d;++c)if(b=a.containsPoint(e.components[c]))break}return b},distanceTo:function(a,b){var c=!(b&&b.edge===false),d;return d=!c&&this.intersects(a)?0:OpenLayers.Geometry.Collection.prototype.distanceTo.apply(this,[a,b])},CLASS_NAME:"OpenLayers.Geometry.Polygon"});OpenLayers.Geometry.Polygon.createRegularPolygon=function(a,b,c,d){var e=Math.PI*(1/c-0.5);if(d)e+=d/180*Math.PI;for(var f,g,h,j=[],k=0;k<c;++k){f=e+k*2*Math.PI/c;g=a.x+b*Math.cos(f);h=a.y+b*Math.sin(f);j.push(new OpenLayers.Geometry.Point(g,h))}var l=new OpenLayers.Geometry.LinearRing(j);return new OpenLayers.Geometry.Polygon([l])};OpenLayers.Format.GeoRSS=OpenLayers.Class(OpenLayers.Format.XML,{rssns:"http://backend.userland.com/rss2",featureNS:"http://mapserver.gis.umn.edu/mapserver",georssns:"http://www.georss.org/georss",geons:"http://www.w3.org/2003/01/geo/wgs84_pos#",featureTitle:"Untitled",featureDescription:"No Description",gmlParser:null,xy:false,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},createGeometryFromItem:function(a){var b=this.getElementsByTagNameNS(a,this.georssns,"point"),c=this.getElementsByTagNameNS(a,this.geons,"lat"),d=this.getElementsByTagNameNS(a,this.geons,"long"),e=this.getElementsByTagNameNS(a,this.georssns,"line"),f=this.getElementsByTagNameNS(a,this.georssns,"polygon"),g=this.getElementsByTagNameNS(a,this.georssns,"where"),h=this.getElementsByTagNameNS(a,this.georssns,"box");if(b.length>0||c.length>0&&d.length>0){var j;if(b.length>0){j=OpenLayers.String.trim(b[0].firstChild.nodeValue).split(/\s+/);if(j.length!=2)j=OpenLayers.String.trim(b[0].firstChild.nodeValue).split(/\s*,\s*/)}else j=[parseFloat(c[0].firstChild.nodeValue),parseFloat(d[0].firstChild.nodeValue)];var k=new OpenLayers.Geometry.Point(parseFloat(j[1]),parseFloat(j[0]))}else if(e.length>0){for(var l=OpenLayers.String.trim(this.concatChildValues(e[0])).split(/\s+/),m=[],p=0,q=l.length;p<q;p+=2){b=new OpenLayers.Geometry.Point(parseFloat(l[p+1]),parseFloat(l[p]));m.push(b)}k=new OpenLayers.Geometry.LineString(m)}else if(f.length>0){l=OpenLayers.String.trim(this.concatChildValues(f[0])).split(/\s+/);m=[];p=0;for(q=l.length;p<q;p+=2){b=new OpenLayers.Geometry.Point(parseFloat(l[p+1]),parseFloat(l[p]));m.push(b)}k=new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing(m)])}else if(g.length>0){if(!this.gmlParser)this.gmlParser=new OpenLayers.Format.GML({xy:this.xy});var n=this.gmlParser.parseFeature(g[0]);k=n.geometry}else if(h.length>0){l=OpenLayers.String.trim(h[0].firstChild.nodeValue).split(/\s+/);m=[];if(l.length>3){b=new OpenLayers.Geometry.Point(parseFloat(l[1]),parseFloat(l[0]));m.push(b);b=new OpenLayers.Geometry.Point(parseFloat(l[1]),parseFloat(l[2]));m.push(b);b=new OpenLayers.Geometry.Point(parseFloat(l[3]),parseFloat(l[2]));m.push(b);b=new OpenLayers.Geometry.Point(parseFloat(l[3]),parseFloat(l[0]));m.push(b);b=new OpenLayers.Geometry.Point(parseFloat(l[1]),parseFloat(l[0]));m.push(b)}k=new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing(m)])}k&&this.internalProjection&&this.externalProjection&&k.transform(this.externalProjection,this.internalProjection);return k},createFeatureFromItem:function(a){var b=this.createGeometryFromItem(a),c=this.getChildValue(a,"*","title",this.featureTitle),d=this.getChildValue(a,"*","description",this.getChildValue(a,"*","content",this.getChildValue(a,"*","summary",this.featureDescription))),e=this.getChildValue(a,"*","link");if(!e)try{e=this.getElementsByTagNameNS(a,"*","link")[0].getAttribute("href")}catch(f){e=null}var g=this.getChildValue(a,"*","id",null),h={title:c,description:d,link:e},j=new OpenLayers.Feature.Vector(b,h);j.fid=g;return j},getChildValue:function(a,b,c,d){var e,f=this.getElementsByTagNameNS(a,b,c);return e=f&&f[0]&&f[0].firstChild&&f[0].firstChild.nodeValue?f[0].firstChild.nodeValue:d==undefined?"":d},read:function(a){if(typeof a=="string")a=OpenLayers.Format.XML.prototype.read.apply(this,[a]);var b=null;b=this.getElementsByTagNameNS(a,"*","item");if(b.length==0)b=this.getElementsByTagNameNS(a,"*","entry");for(var c=b.length,d=new Array(c),e=0;e<c;e++)d[e]=this.createFeatureFromItem(b[e]);return d},write:function(a){var b;if(a instanceof Array){b=this.createElementNS(this.rssns,"rss");for(var c=0,d=a.length;c<d;c++)b.appendChild(this.createFeatureXML(a[c]))}else b=this.createFeatureXML(a);return OpenLayers.Format.XML.prototype.write.apply(this,[b])},createFeatureXML:function(a){var b=this.buildGeometryNode(a.geometry),c=this.createElementNS(this.rssns,"item"),d=this.createElementNS(this.rssns,"title");d.appendChild(this.createTextNode(a.attributes.title?a.attributes.title:""));var e=this.createElementNS(this.rssns,"description");e.appendChild(this.createTextNode(a.attributes.description?a.attributes.description:""));c.appendChild(d);c.appendChild(e);if(a.attributes.link){var f=this.createElementNS(this.rssns,"link");f.appendChild(this.createTextNode(a.attributes.link));c.appendChild(f)}for(var g in a.attributes)if(!(g=="link"||g=="title"||g=="description")){var h=this.createTextNode(a.attributes[g]),j=g;if(g.search(":")!=-1)j=g.split(":")[1];var k=this.createElementNS(this.featureNS,"feature:"+j);k.appendChild(h);c.appendChild(k)}c.appendChild(b);return c},buildGeometryNode:function(a){if(this.internalProjection&&this.externalProjection){a=a.clone();a.transform(this.internalProjection,this.externalProjection)}var b;if(a.CLASS_NAME=="OpenLayers.Geometry.Polygon"){b=this.createElementNS(this.georssns,"georss:polygon");b.appendChild(this.buildCoordinatesNode(a.components[0]))}else if(a.CLASS_NAME=="OpenLayers.Geometry.LineString"){b=this.createElementNS(this.georssns,"georss:line");b.appendChild(this.buildCoordinatesNode(a))}else if(a.CLASS_NAME=="OpenLayers.Geometry.Point"){b=this.createElementNS(this.georssns,"georss:point");b.appendChild(this.buildCoordinatesNode(a))}else throw"Couldn't parse "+a.CLASS_NAME;return b},buildCoordinatesNode:function(a){var b=null;if(a.components)b=a.components;var c;if(b){for(var d=b.length,e=new Array(d),f=0;f<d;f++)e[f]=b[f].y+" "+b[f].x;c=e.join(" ")}else c=a.y+" "+a.x;return this.createTextNode(c)},CLASS_NAME:"OpenLayers.Format.GeoRSS"});OpenLayers.Geometry.MultiPolygon=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.Polygon"],initialize:function(){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments)},CLASS_NAME:"OpenLayers.Geometry.MultiPolygon"});OpenLayers.Format.GeoJSON=OpenLayers.Class(OpenLayers.Format.JSON,{initialize:function(a){OpenLayers.Format.JSON.prototype.initialize.apply(this,[a])},read:function(a,b,c){b=b?b:"FeatureCollection";var d=null,e=null;if(e=typeof a=="string"?OpenLayers.Format.JSON.prototype.read.apply(this,[a,c]):a)if(typeof e.type!="string")OpenLayers.Console.error("Bad GeoJSON - no type: "+a);else{if(this.isValidType(e,b))switch(b){case"Geometry":try{d=this.parseGeometry(e)}catch(f){OpenLayers.Console.error(f)}break;case"Feature":try{d=this.parseFeature(e);d.type="Feature"}catch(g){OpenLayers.Console.error(g)}break;case"FeatureCollection":d=[];switch(e.type){case"Feature":try{d.push(this.parseFeature(e))}catch(h){d=null;OpenLayers.Console.error(h)}break;case"FeatureCollection":for(var j=0,k=e.features.length;j<k;++j)try{d.push(this.parseFeature(e.features[j]))}catch(l){d=null;OpenLayers.Console.error(l)}break;default:try{var m=this.parseGeometry(e);d.push(new OpenLayers.Feature.Vector(m))}catch(p){d=null;OpenLayers.Console.error(p)}}break}}else OpenLayers.Console.error("Bad JSON: "+a);return d},isValidType:function(a,b){var c=false;switch(b){case"Geometry":if(OpenLayers.Util.indexOf(["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon","Box","GeometryCollection"],a.type)==-1)OpenLayers.Console.error("Unsupported geometry type: "+a.type);else c=true;break;case"FeatureCollection":c=true;break;default:if(a.type==b)c=true;else OpenLayers.Console.error("Cannot convert types from "+
a.type+" to "+b)}return c},parseFeature:function(a){var b,c,d,e;d=a.properties?a.properties:{};e=a.geometry&&a.geometry.bbox||a.bbox;try{c=this.parseGeometry(a.geometry)}catch(f){throw f;}b=new OpenLayers.Feature.Vector(c,d);if(e)b.bounds=OpenLayers.Bounds.fromArray(e);if(a.id)b.fid=a.id;return b},parseGeometry:function(a){if(a==null)return null;var b,c=false;if(a.type=="GeometryCollection"){if(!(a.geometries instanceof Array))throw"GeometryCollection must have geometries array: "+a;for(var d=a.geometries.length,e=new Array(d),f=0;f<d;++f)e[f]=this.parseGeometry.apply(this,[a.geometries[f]]);b=new OpenLayers.Geometry.Collection(e);c=true}else{if(!(a.coordinates instanceof Array))throw"Geometry must have coordinates array: "+a;if(!this.parseCoords[a.type.toLowerCase()])throw"Unsupported geometry type: "+a.type;try{b=this.parseCoords[a.type.toLowerCase()].apply(this,[a.coordinates])}catch(g){throw g;}}this.internalProjection&&this.externalProjection&&!c&&b.transform(this.externalProjection,this.internalProjection);return b},parseCoords:{point:function(a){if(a.length!=2)throw"Only 2D points are supported: "+a;return new OpenLayers.Geometry.Point(a[0],a[1])},multipoint:function(a){for(var b=[],c=null,d=0,e=a.length;d<e;++d){try{c=this.parseCoords.point.apply(this,[a[d]])}catch(f){throw f;}b.push(c)}return new OpenLayers.Geometry.MultiPoint(b)},linestring:function(a){for(var b=[],c=null,d=0,e=a.length;d<e;++d){try{c=this.parseCoords.point.apply(this,[a[d]])}catch(f){throw f;}b.push(c)}return new OpenLayers.Geometry.LineString(b)},multilinestring:function(a){for(var b=[],c=null,d=0,e=a.length;d<e;++d){try{c=this.parseCoords.linestring.apply(this,[a[d]])}catch(f){throw f;}b.push(c)}return new OpenLayers.Geometry.MultiLineString(b)},polygon:function(a){for(var b=[],c,d,e=0,f=a.length;e<f;++e){try{d=this.parseCoords.linestring.apply(this,[a[e]])}catch(g){throw g;}c=new OpenLayers.Geometry.LinearRing(d.components);b.push(c)}return new OpenLayers.Geometry.Polygon(b)},multipolygon:function(a){for(var b=[],c=null,d=0,e=a.length;d<e;++d){try{c=this.parseCoords.polygon.apply(this,[a[d]])}catch(f){throw f;}b.push(c)}return new OpenLayers.Geometry.MultiPolygon(b)},box:function(a){if(a.length!=2)throw"GeoJSON box coordinates must have 2 elements";return new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing([new OpenLayers.Geometry.Point(a[0][0],a[0][1]),new OpenLayers.Geometry.Point(a[1][0],a[0][1]),new OpenLayers.Geometry.Point(a[1][0],a[1][1]),new OpenLayers.Geometry.Point(a[0][0],a[1][1]),new OpenLayers.Geometry.Point(a[0][0],a[0][1])])])}},write:function(a,b){var c={type:null};if(a instanceof Array){c.type="FeatureCollection";var d=a.length;c.features=new Array(d);for(var e=0;e<d;++e){var f=a[e];if(!f instanceof OpenLayers.Feature.Vector){var g="FeatureCollection only supports collections of features: "+f;throw g;}c.features[e]=this.extract.feature.apply(this,[f])}}else if(a.CLASS_NAME.indexOf("OpenLayers.Geometry")==0)c=this.extract.geometry.apply(this,[a]);else if(a instanceof OpenLayers.Feature.Vector){c=this.extract.feature.apply(this,[a]);if(a.layer&&a.layer.projection)c.crs=this.createCRSObject(a)}return OpenLayers.Format.JSON.prototype.write.apply(this,[c,b])},createCRSObject:function(a){var b=a.layer.projection.toString(),c={};if(b.match(/epsg:/i)){var d=parseInt(b.substring(b.indexOf(":")+1));c=d==4326?{type:"OGC",properties:{urn:"urn:ogc:def:crs:OGC:1.3:CRS84"}}:{type:"EPSG",properties:{code:d}}}return c},extract:{feature:function(a){var b=this.extract.geometry.apply(this,[a.geometry]);return{type:"Feature",id:a.fid==null?a.id:a.fid,properties:a.attributes,geometry:b}},geometry:function(a){if(a==null)return null;if(this.internalProjection&&this.externalProjection){a=a.clone();a.transform(this.internalProjection,this.externalProjection)}var b=a.CLASS_NAME.split(".")[2],c=this.extract[b.toLowerCase()].apply(this,[a]),d;return d=b=="Collection"?{type:"GeometryCollection",geometries:c}:{type:b,coordinates:c}},point:function(a){return[a.x,a.y]},multipoint:function(a){for(var b=[],c=0,d=a.components.length;c<d;++c)b.push(this.extract.point.apply(this,[a.components[c]]));return b},linestring:function(a){for(var b=[],c=0,d=a.components.length;c<d;++c)b.push(this.extract.point.apply(this,[a.components[c]]));return b},multilinestring:function(a){for(var b=[],c=0,d=a.components.length;c<d;++c)b.push(this.extract.linestring.apply(this,[a.components[c]]));return b},polygon:function(a){for(var b=[],c=0,d=a.components.length;c<d;++c)b.push(this.extract.linestring.apply(this,[a.components[c]]));return b},multipolygon:function(a){for(var b=[],c=0,d=a.components.length;c<d;++c)b.push(this.extract.polygon.apply(this,[a.components[c]]));return b},collection:function(a){for(var b=a.components.length,c=new Array(b),d=0;d<b;++d)c[d]=this.extract.geometry.apply(this,[a.components[d]]);return c}},CLASS_NAME:"OpenLayers.Format.GeoJSON"});if(!this.JSON)this.JSON={};(function(){function a(k){return k<10?"0"+k:k}function b(k){e.lastIndex=0;return e.test(k)?'"'+k.replace(e,function(l){var m=h[l];return typeof m==="string"?m:"\\u"+("0000"+l.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+k+'"'}function c(k,l){var m,p,q,n,o=f,r,s=l[k];if(s&&typeof s==="object"&&typeof s.f==="function")s=s.f(k);if(typeof j==="function")s=j.call(l,k,s);switch(typeof s){case"string":return b(s);case"number":return isFinite(s)?String(s):"null";case"boolean":case"null":return String(s);case"object":if(!s)return"null";f+=g;r=[];if(Object.prototype.toString.apply(s)==="[object Array]"){n=s.length;for(m=0;m<n;m+=1)r[m]=c(m,s)||"null";q=r.length===0?"[]":f?"[\n"+f+r.join(",\n"+f)+"\n"+o+"]":"["+r.join(",")+"]";f=o;return q}if(j&&typeof j==="object"){n=j.length;for(m=0;m<n;m+=1){p=j[m];if(typeof p==="string")if(q=c(p,s))r.push(b(p)+(f?": ":":")+q)}}else for(p in s)if(Object.hasOwnProperty.call(s,p))if(q=c(p,s))r.push(b(p)+(f?": ":":")+q);q=r.length===0?"{}":f?"{\n"+f+r.join(",\n"+f)+"\n"+o+"}":"{"+r.join(",")+"}";f=o;return q}}if(typeof Date.prototype.f!=="function"){Date.prototype.f=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"Z":null};String.prototype.f=Number.prototype.f=Boolean.prototype.f=function(){return this.valueOf()}}var d=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},j;if(typeof JSON.stringify!=="function")JSON.stringify=function(k,l,m){var p;g=f="";if(typeof m==="number")for(p=0;p<m;p+=1)g+=" ";else if(typeof m==="string")g=m;if((j=l)&&typeof l!=="function"&&(typeof l!=="object"||typeof l.length!=="number"))throw new Error("JSON.stringify");return c("",{"":k})};if(typeof JSON.parse!=="function")JSON.parse=function(k,l){function m(q,n){var o,r,s=q[n];if(s&&typeof s==="object")for(o in s)if(Object.hasOwnProperty.call(s,o)){r=m(s,o);if(r!==undefined)s[o]=r;else delete s[o]}return l.call(q,n,s)}var p;d.lastIndex=0;if(d.test(k))k=k.replace(d,function(q){return"\\u"+("0000"+q.charCodeAt(0).toString(16)).slice(-4)});if(/^[\],:{}\s]*$/.test(k.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){p=eval("("+k+")");return typeof l==="function"?m({"":p},""):p}throw new SyntaxError("JSON.parse");}})();(function(a){function b(q){return q!==undefined&&q!==null}function c(q,n,o){b(q)&&q.apply(n,o)}function d(q){setTimeout(q,0)}var e="",f="&",g="?",h="success",j="error",k=a("head"),l={},m={cache:true,callback:"C",pageCache:false,url:location.href};function p(q){q=a.extend({},m,q);var n=q.beforeSend,o=0,r=0;q.abort=function(){o=r=1};if(b(n)&&(n(q,q)===false||o))return q;var s=q.success,t=q.complete,z=q.error,B=q.dataFilter,u=q.callbackParameter,w=q.callback,A=q.cache,v=q.pageCache,D=q.url,C=q.data,F=q.timeout,E,M,P,T;D=b(D)?D:e;C=b(C)?typeof C=="string"?C:a.param(C):e;if(b(u))C+=(C==e?e:f)+encodeURIComponent(u)+"=?";if(!A&&!v)C+=(C==e?e:f)+"_"+(new Date).getTime()+"=";E=D.split(g);if(C!=e){M=C.split(g);if(T=E.length-1)E[T]+=f+M.shift();E=E.concat(M)}P=E.length-2;if(P>0)E[P]+=w+E.pop();var N=E.join(g);function U(J){if(b(B))J=B.apply(q,[J]);c(s,q,[J,h]);c(t,q,[q,h])}function V(J){c(z,q,[q,J]);c(t,q,[q,J])}var Q=l[N];if(v&&b(Q)){d(function(){b(Q.s)?U(Q.s):V(j)});return q}d(function(){if(!o){var J=a("<iframe style='display:none' />").appendTo(k),W=J[0],L=W.contentWindow||W.contentDocument,I=L.document,R,X,Y=function(G,H){v&&!b(H)&&(l[N]=e);R();V(b(H)?H:j)},Z=function(G){L[G]=undefined;try{delete L[G]}catch(H){}},K=w=="E"?"X":"E";if(!b(I)){I=L;L=I.getParentNode()}I.open();L[w]=function(G){o=1;v&&(l[N]={s:G});d(function(){if(r===0){R();U(G)}})};L[K]=function(G){if((!G||G=="complete")&&o===0){o++;d(Y)}};q.abort=R=function(){r=1;clearTimeout(X);Z(K);Z(w);if(I&&I.getElementsByTagName){var G=I.getElementsByTagName("body");if(G&&G.length>0)G[0].innerHTML=e;var H=I.getElementsByTagName("head");if(H&&H.length>0){H=H[0];try{H.innerHTML=e}catch(ba){for(var $=H.childNodes,O,S=0,aa=$.length;S<aa;++S){O=$[S];try{O.nodeName&&O.nodeName.toLowerCase()==="title"||H.removeChild(O)}catch(ca){}}}}}J.remove()};I.write(["<html>","<head>",'<script src="',N,'" onload="if(typeof ',K,"==='function'){",K,'();}" onreadystatechange="if(typeof ',K,"==='function'){",K,'(this.readyState);}"><\/script>',"</head>",'<body onload="if(typeof ',K,"==='function'){",K,'();}"></body>',"</html>"].join(e));I.close();if(F>0)X=setTimeout(function(){!o&&Y(e,"timeout")},F)}});return q}p.setup=function(q){a.extend(m,q)};a.jsonp=p})(jQuery);(function(a){a.fn.caret=function(b,c){var d,e,f=this[0];if(typeof b==="object"&&typeof b.start==="number"&&typeof b.end==="number"){d=b.start;e=b.end}else if(typeof b==="number"&&typeof c==="number"){d=b;e=c}else if(typeof b==="string")if((d=f.value.indexOf(b))>-1)e=d+b.length;else d=null;else if(Object.prototype.toString.call(b)==="[object RegExp]"){var g=b.exec(f.value);if(g!=null){d=g.index;e=d+g[0].length}}if(typeof d!="undefined"){if(a.browser.msie){var h=this[0].createTextRange();h.collapse(true);h.moveStart("character",d);h.moveEnd("character",e-d);h.select()}else{this[0].selectionStart=d;this[0].selectionEnd=e}this[0].focus();return this}else{if(a.browser.msie){var j=this.val(),k=document.selection.createRange().duplicate();k.moveEnd("character",j.length);var l=k.text==""?j.length:j.lastIndexOf(k.text);k=document.selection.createRange().duplicate();k.moveStart("character",-j.length);var m=k.text.length}else{l=f.selectionStart;m=f.selectionEnd}var p=f.value.substring(l,m);return{start:l,end:m,text:p,replace:function(q){return f.value.substring(0,l)+q+f.value.substring(m,f.value.length)}}}}})(jQuery);OpenLayers.Request.JSONP=function(a){if(a.failure)a.error=a.scope?OpenLayers.Function.bind(a.failure,a.scope):a.failure;if(a.success){var b=a.scope?OpenLayers.Function.bind(a.success,a.scope):a.success;a.success=function(e,f){OpenLayers.Console.debug("JSONP response: ",e,f);var g={responseText:e,status:f};b(g)}}if(a.complete){var c=a.scope?OpenLayers.Function.bind(a.complete,a.scope):a.complete;a.complete=function(e,f){Eniro.AppEvents.triggerEvent(Eniro.Events.PROGRESS_HIDE);c(e,f)}}else a.complete=function(){Eniro.AppEvents.triggerEvent(Eniro.Events.PROGRESS_HIDE)};if(a.beforeSend){var d=a.scope?OpenLayers.Function.bind(a.beforeSend,a.scope):a.beforeSend;a.beforeSend=function(){Eniro.AppEvents.triggerEvent(Eniro.Events.PROGRESS_SHOW);d()}}else a.beforeSend=function(){Eniro.AppEvents.triggerEvent(Eniro.Events.PROGRESS_SHOW)};a.dataFilter=a.dataFilter?a.scope?OpenLayers.Function.bind(a.dataFilter,a.scope):a.dataFilter:function(e){return JSON.parse(JSON.stringify(e))};if(a.params){a.data=a.params;delete a.params}a.callbackParameter=a.callbackParameter?a.callbackParameter:"callback";OpenLayers.Console.debug("JSONP request ",a,": ",a.url);return jQuery.jsonp(a)};OpenLayers.Request.GET=OpenLayers.Request.JSONP;Proj4js={defaultDatum:"WGS84",proxyScript:null,defsLookupService:"http://spatialreference.org/ref",libPath:"../lib/",transform:function(a,b,c){if(!a.readyToUse||!b.readyToUse)this.reportError("Proj4js initialization for "+a.srsCode+" not yet complete");else if(c.transformed)this.log("point already transformed");else{if(a.srsProjNumber=="900913"&&b.datumCode!="WGS84"||b.srsProjNumber=="900913"&&a.datumCode!="WGS84"){var d=Proj4js.WGS84;this.transform(a,d,c);c.transformed=false;a=d}if(a.projName=="longlat"){c.x*=Proj4js.common.D2R;c.y*=Proj4js.common.D2R}else{if(a.to_meter){c.x*=a.to_meter;c.y*=a.to_meter}a.inverse(c)}if(a.from_greenwich)c.x+=a.from_greenwich;c=this.datum_transform(a.datum,b.datum,c);if(b.from_greenwich)c.x-=b.from_greenwich;if(b.projName=="longlat"){c.x*=Proj4js.common.R2D;c.y*=Proj4js.common.R2D}else{b.forward(c);if(b.to_meter){c.x/=b.to_meter;c.y/=b.to_meter}}c.transformed=true;return c}},datum_transform:function(a,b,c){if(a.compare_datums(b))return c;if(a.datum_type==Proj4js.common.PJD_NODATUM||b.datum_type==Proj4js.common.PJD_NODATUM)return c;a.datum_type==Proj4js.common.PJD_GRIDSHIFT&&alert("ERROR: Grid shift transformations are not implemented yet.");b.datum_type==Proj4js.common.PJD_GRIDSHIFT&&alert("ERROR: Grid shift transformations are not implemented yet.");if(a.es!=b.es||a.a!=b.a||a.datum_type==Proj4js.common.PJD_3PARAM||a.datum_type==Proj4js.common.PJD_7PARAM||b.datum_type==Proj4js.common.PJD_3PARAM||b.datum_type==Proj4js.common.PJD_7PARAM){a.geodetic_to_geocentric(c);if(a.datum_type==Proj4js.common.PJD_3PARAM||a.datum_type==Proj4js.common.PJD_7PARAM)a.geocentric_to_wgs84(c);if(b.datum_type==Proj4js.common.PJD_3PARAM||b.datum_type==Proj4js.common.PJD_7PARAM)b.geocentric_from_wgs84(c);b.geocentric_to_geodetic(c)}b.datum_type==Proj4js.common.PJD_GRIDSHIFT&&alert("ERROR: Grid shift transformations are not implemented yet.");return c},reportError:function(){},log:function(){},loadProjDefinition:function(a){if(this.defs[a.srsCode])return this.defs[a.srsCode];var b={method:"get",asynchronous:false,onSuccess:this.defsLoadedFromDisk.bind(this,a.srsCode)},c=this.libPath+"defs/"+a.srsAuth.toUpperCase()+a.srsProjNumber+".js";new OpenLayers.Ajax.Request(c,b);if(this.defs[a.srsCode])return this.defs[a.srsCode];if(this.proxyScript){c=this.proxyScript+this.defsLookupService+"/"+a.srsAuth+"/"+a.srsProjNumber+"/proj4";b.onSuccess=this.defsLoadedFromService.bind(this,a.srsCode);b.onFailure=this.defsFailed.bind(this,a.srsCode);new OpenLayers.Ajax.Request(c,b)}return this.defs[a.srsCode]},defsLoadedFromDisk:function(a,b){eval(b.responseText)},defsLoadedFromService:function(a,b){this.defs[a]=b.responseText;Proj4js.defs[a]=b.responseText},defsFailed:function(a){this.reportError("failed to load projection definition for: "+a);OpenLayers.Util.extend(this.defs[a],this.defs.WGS84)},loadProjCode:function(a){if(!this.Proj[a]){var b={method:"get",asynchronous:false,onSuccess:this.loadProjCodeSuccess.bind(this,a),onFailure:this.loadProjCodeFailure.bind(this,a)},c=this.libPath+"projCode/"+a+".js";new OpenLayers.Ajax.Request(c,b)}},loadProjCodeSuccess:function(a,b){eval(b.responseText);this.Proj[a].dependsOn&&this.loadProjCode(this.Proj[a].dependsOn)},loadProjCodeFailure:function(a){Proj4js.reportError("failed to find projection file for: "+a)}};Proj4js.Proj=OpenLayers.Class({readyToUse:false,title:null,projName:null,units:null,datum:null,initialize:function(a){this.srsCode=a.toUpperCase();if(this.srsCode.indexOf("EPSG")==0){this.srsCode=this.srsCode;this.srsAuth="epsg";this.srsProjNumber=this.srsCode.substring(5)}else{this.srsAuth="";this.srsProjNumber=this.srsCode}var b=Proj4js.loadProjDefinition(this);if(b){this.parseDefs(b);Proj4js.loadProjCode(this.projName);this.callInit()}},callInit:function(){Proj4js.log("projection script loaded for:"+
this.projName);OpenLayers.Util.extend(this,Proj4js.Proj[this.projName]);this.init();this.mapXYToLonLat=this.inverse;this.lonLatToMapXY=this.forward;this.readyToUse=true},parseDefs:function(a){this.defData=a;for(var b,c,d=this.defData.split("+"),e=0;e<d.length;e++){var f=d[e].split("=");b=f[0].toLowerCase();c=f[1];switch(b.replace(/\s/gi,"")){case"":break;case"title":this.title=c;break;case"proj":this.projName=c.replace(/\s/gi,"");break;case"units":this.units=c.replace(/\s/gi,"");break;case"datum":this.datumCode=c.replace(/\s/gi,"");break;case"nadgrids":this.nagrids=c.replace(/\s/gi,"");break;case"ellps":this.ellps=c.replace(/\s/gi,"");break;case"a":this.a=parseFloat(c);break;case"b":this.b=parseFloat(c);break;case"lat_0":this.lat0=c*Proj4js.common.D2R;break;case"lat_1":this.lat1=c*Proj4js.common.D2R;break;case"lat_2":this.lat2=c*Proj4js.common.D2R;break;case"lat_ts":this.lat_ts=c*Proj4js.common.D2R;break;case"lon_0":this.long0=c*Proj4js.common.D2R;break;case"x_0":this.x0=parseFloat(c);break;case"y_0":this.y0=parseFloat(c);break;case"k_0":this.k0=parseFloat(c);break;case"k":this.k0=parseFloat(c);break;case"R_A":this.R=parseFloat(c);break;case"zone":this.zone=parseInt(c);break;case"south":this.utmSouth=true;break;case"towgs84":this.datum_params=c.split(",");break;case"to_meter":this.to_meter=parseFloat(c);break;case"from_greenwich":this.from_greenwich=c*Proj4js.common.D2R;break;case"pm":c=c.replace(/\s/gi,"");this.from_greenwich=Proj4js.PrimeMeridian[c]?Proj4js.PrimeMeridian[c]*Proj4js.common.D2R:0;break;case"no_defs":break;default:Proj4js.log("Unrecognized parameter: "+b)}}this.deriveConstants()},deriveConstants:function(){if(this.nagrids=="@null")this.datumCode="none";if(this.datumCode&&this.datumCode!="none"){var a=Proj4js.Datum[this.datumCode];if(a){this.datum_params=a.towgs84.split(",");this.ellps=a.ellipse;this.datumName=a.datumName}}if(!this.a){var b=Proj4js.Ellipsoid[this.ellps]?Proj4js.Ellipsoid[this.ellps]:Proj4js.Ellipsoid.WGS84;OpenLayers.Util.extend(this,b)}if(this.rf&&!this.b)this.b=(1-1/this.rf)*this.a;if(Math.abs(this.a-this.b)<Proj4js.common.EPSLN)this.sphere=true;this.a2=this.a*this.a;this.b2=this.b*this.b;this.es=(this.a2-this.b2)/this.a2;this.e=Math.sqrt(this.es);this.ep2=(this.a2-this.b2)/this.b2;if(!this.k0)this.k0=1;this.datum=new Proj4js.datum(this)}});Proj4js.Proj.longlat={init:function(){},forward:function(a){return a},inverse:function(a){return a}};Proj4js.defs={WGS84:"+title=long/lat:WGS84 +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees","EPSG:4326":"+title=long/lat:WGS84 +proj=longlat +a=6378137.0 +b=6356752.31424518 +ellps=WGS84 +datum=WGS84 +units=degrees","EPSG:4269":"+title=long/lat:NAD83 +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"};Proj4js.common={PI:Math.PI,HALF_PI:Math.PI*0.5,TWO_PI:Math.PI*2,FORTPI:0.7853981633974483,R2D:57.2957795131,D2R:0.0174532925199,SEC_TO_RAD:4.84813681109536E-6,EPSLN:1.0E-10,MAX_ITER:20,COS_67P5:0.3826834323650898,AD_C:1.0026,PJD_UNKNOWN:0,PJD_3PARAM:1,PJD_7PARAM:2,PJD_GRIDSHIFT:3,PJD_WGS84:4,PJD_NODATUM:5,SRS_WGS84_SEMIMAJOR:6378137,msfnz:function(a,b,c){var d=a*b;return c/Math.sqrt(1-d*d)},tsfnz:function(a,b,c){var d=a*c,e=0.5*a;d=Math.pow((1-d)/(1+d),e);return Math.tan(0.5*(this.HALF_PI-b))/d},phi2z:function(a,b){var c=0.5*a,d,e,f=this.HALF_PI-2*Math.atan(b);for(i=0;i<=15;i++){d=a*Math.sin(f);e=this.HALF_PI-2*Math.atan(b*Math.pow((1-d)/(1+d),c))-f;f+=e;if(Math.abs(e)<=1.0E-10)return f}alert("phi2z has NoConvergence");return-9999},qsfnz:function(a,b){var c;if(a>1.0E-7){c=a*b;return(1-a*a)*(b/(1-c*c)-0.5/a*Math.log((1-c)/(1+c)))}else return 2*b},asinz:function(a){if(Math.abs(a)>1)a=a>1?1:-1;return Math.asin(a)},e0fn:function(a){return 1-0.25*a*(1+a/16*(3+1.25*a))},e1fn:function(a){return 0.375*a*(1+0.25*a*(1+0.46875*a))},e2fn:function(a){return 0.05859375*a*a*(1+0.75*a)},e3fn:function(a){return a*a*a*(35/3072)},mlfn:function(a,b,c,d,e){return a*e-b*Math.sin(2*e)+c*Math.sin(4*e)-d*Math.sin(6*e)},srat:function(a,b){return Math.pow((1-a)/(1+a),b)},sign:function(a){return a<0?-1:1},adjust_lon:function(a){return a=Math.abs(a)<this.PI?a:a-this.sign(a)*this.TWO_PI}};Proj4js.datum=OpenLayers.Class({initialize:function(a){this.datum_type=Proj4js.common.PJD_WGS84;if(a.datumCode&&a.datumCode=="none")this.datum_type=Proj4js.common.PJD_NODATUM;if(a&&a.datum_params){for(var b=0;b<a.datum_params.length;b++)a.datum_params[b]=parseFloat(a.datum_params[b]);if(a.datum_params[0]!=0||a.datum_params[1]!=0||a.datum_params[2]!=0)this.datum_type=Proj4js.common.PJD_3PARAM;if(a.datum_params.length>3)if(a.datum_params[3]!=0||a.datum_params[4]!=0||a.datum_params[5]!=0||a.datum_params[6]!=0){this.datum_type=Proj4js.common.PJD_7PARAM;a.datum_params[3]*=Proj4js.common.SEC_TO_RAD;a.datum_params[4]*=Proj4js.common.SEC_TO_RAD;a.datum_params[5]*=Proj4js.common.SEC_TO_RAD;a.datum_params[6]=a.datum_params[6]/1E6+1}}if(a){this.a=a.a;this.b=a.b;this.es=a.es;this.ep2=a.ep2;this.datum_params=a.datum_params}},compare_datums:function(a){return this.datum_type!=a.datum_type?false:this.a!=a.a||Math.abs(this.es-a.es)>5.0E-11?false:this.datum_type==Proj4js.common.PJD_3PARAM?this.datum_params[0]==a.datum_params[0]&&this.datum_params[1]==a.datum_params[1]&&this.datum_params[2]==a.datum_params[2]:this.datum_type==Proj4js.common.PJD_7PARAM?this.datum_params[0]==a.datum_params[0]&&this.datum_params[1]==a.datum_params[1]&&this.datum_params[2]==a.datum_params[2]&&this.datum_params[3]==a.datum_params[3]&&this.datum_params[4]==a.datum_params[4]&&this.datum_params[5]==a.datum_params[5]&&this.datum_params[6]==a.datum_params[6]:this.datum_type==Proj4js.common.PJD_GRIDSHIFT?strcmp(pj_param(this.params,"snadgrids").s,pj_param(a.params,"snadgrids").s)==0:true},geodetic_to_geocentric:function(a){var b=a.x,c=a.y,d=a.z?a.z:0,e,f,g,h=0,j,k,l,m;if(c<-Proj4js.common.HALF_PI&&c>-1.001*Proj4js.common.HALF_PI)c=-Proj4js.common.HALF_PI;else if(c>Proj4js.common.HALF_PI&&c<1.001*Proj4js.common.HALF_PI)c=Proj4js.common.HALF_PI;else if(c<-Proj4js.common.HALF_PI||c>Proj4js.common.HALF_PI){Proj4js.reportError("geocent:lat out of range:"+c);return null}if(b>Proj4js.common.PI)b-=2*Proj4js.common.PI;k=Math.sin(c);m=Math.cos(c);l=k*k;j=this.a/Math.sqrt(1-
this.es*l);e=(j+d)*m*Math.cos(b);f=(j+d)*m*Math.sin(b);g=(j*(1-this.es)+d)*k;a.x=e;a.y=f;a.z=g;return h},geocentric_to_geodetic:function(a){var b=1.0E-12,c=b*b,d=30,e,f,g,h,j,k,l,m,p,q,n,o,r,s=a.x,t=a.y,z=a.z?a.z:0,B,u,w;e=Math.sqrt(s*s+t*t);f=Math.sqrt(s*s+t*t+z*z);if(e/this.a<b){B=0;if(f/this.a<b)return}else B=Math.atan2(t,s);g=z/f;h=e/f;j=1/Math.sqrt(1-this.es*(2-this.es)*h*h);m=h*(1-this.es)*j;p=g*j;r=0;do{r++;l=this.a/Math.sqrt(1-this.es*p*p);w=e*m+z*p-l*(1-this.es*p*p);k=this.es*l/(l+w);j=1/Math.sqrt(1-k*(2-k)*h*h);q=h*(1-k)*j;n=g*j;o=n*m-q*p;m=q;p=n}while(o*o>c&&r<d);u=Math.atan(n/Math.abs(q));a.x=B;a.y=u;a.z=w;return a},geocentric_to_geodetic_noniter:function(a){var b=a.x,c=a.y,d=a.z?a.z:0,e,f,g,h,j,k,l,m,p,q,n,o,r,s,t,z,B;b=parseFloat(b);c=parseFloat(c);d=parseFloat(d);B=false;if(b!=0)e=Math.atan2(c,b);else if(c>0)e=Proj4js.common.HALF_PI;else if(c<0)e=-Proj4js.common.HALF_PI;else{B=true;e=0;if(d>0)f=Proj4js.common.HALF_PI;else if(d<0)f=-Proj4js.common.HALF_PI;else return}j=b*b+c*c;h=Math.sqrt(j);k=d*Proj4js.common.AD_C;m=Math.sqrt(k*k+j);q=k/m;o=h/m;n=q*q*q;l=d+this.b*this.ep2*n;z=h-this.a*this.es*o*o*o;p=Math.sqrt(l*l+z*z);r=l/p;s=z/p;t=this.a/Math.sqrt(1-this.es*r*r);g=s>=Proj4js.common.COS_67P5?h/s-t:s<=-Proj4js.common.COS_67P5?h/-s-t:d/r+t*(this.es-1);if(B==false)f=Math.atan(r/s);a.x=e;a.y=f;a.z=g;return a},geocentric_to_wgs84:function(a){if(this.datum_type==Proj4js.common.PJD_3PARAM){a.x+=this.datum_params[0];a.y+=this.datum_params[1];a.z+=this.datum_params[2]}else if(this.datum_type==Proj4js.common.PJD_7PARAM){var b=this.datum_params[0],c=this.datum_params[1],d=this.datum_params[2],e=this.datum_params[3],f=this.datum_params[4],g=this.datum_params[5],h=this.datum_params[6],j=h*(a.x-g*a.y+f*a.z)+b,k=h*(g*a.x+a.y-e*a.z)+c,l=h*(-f*a.x+e*a.y+a.z)+d;a.x=j;a.y=k;a.z=l}},geocentric_from_wgs84:function(a){if(this.datum_type==Proj4js.common.PJD_3PARAM){a.x-=this.datum_params[0];a.y-=this.datum_params[1];a.z-=this.datum_params[2]}else if(this.datum_type==Proj4js.common.PJD_7PARAM){var b=this.datum_params[0],c=this.datum_params[1],d=this.datum_params[2],e=this.datum_params[3],f=this.datum_params[4],g=this.datum_params[5],h=this.datum_params[6],j=(a.x-b)/h,k=(a.y-c)/h,l=(a.z-d)/h;a.x=j+g*k-f*l;a.y=-g*j+k+e*l;a.z=f*j-e*k+l}}});Proj4js.Point=OpenLayers.Class({initialize:function(a,b,c){if(typeof a=="object"){this.x=a[0];this.y=a[1];this.z=a[2]||0}else{this.x=a;this.y=b;this.z=c||0}},clone:function(){return new Proj4js.Point(this.x,this.y,this.z)},toString:function(){return"x="+this.x+",y="+this.y},toShortString:function(){return this.x+", "+this.y}});Proj4js.PrimeMeridian={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667};Proj4js.Ellipsoid={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},"APL4.":{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS72:{a:6378135,rf:298.26,ellipseName:"WGS 72"},WGS84:{a:6378137,rf:298.257223563,ellipseName:"WGS 84"},sphere:{a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}};Proj4js.Datum={WGS84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:""},GGRS87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},NAD83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},NAD27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"606.0,23.0,413.0",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"653.0,-212.0,449.0",ellipse:"bessel",datumName:"Hermannskogel"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},OSGB36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"}};Proj4js.WGS84=new Proj4js.Proj("WGS84");Proj4js.Datum.OSB36=Proj4js.Datum.OSGB36;Proj4js.defs.GOOGLE="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs";Proj4js.defs["EPSG:900913"]=Proj4js.defs.GOOGLE;Proj4js.Proj.utm={dependsOn:"tmerc",init:function(){if(this.zone){this.lat0=0;this.long0=(6*Math.abs(this.zone)-183)*Proj4js.common.D2R;this.x0=5E5;this.y0=this.utmSouth?1E7:0;this.k0=0.9996;Proj4js.Proj.tmerc.init.apply(this);this.forward=Proj4js.Proj.tmerc.forward;this.inverse=Proj4js.Proj.tmerc.inverse}else Proj4js.reportError("utm:init: zone must be specified for UTM")}};Proj4js.Proj.merc={init:function(){if(this.lat_ts)this.k0=this.sphere?Math.cos(this.lat_ts):Proj4js.common.msfnz(this.es,Math.sin(this.lat_ts),Math.cos(this.lat_ts))},forward:function(a){var b=a.x,c=a.y;if(c*Proj4js.common.R2D>90&&c*Proj4js.common.R2D<-90&&b*Proj4js.common.R2D>180&&b*Proj4js.common.R2D<-180){Proj4js.reportError("merc:forward: llInputOutOfRange: "+b+" : "+c);return null}var d,e;if(Math.abs(Math.abs(c)-Proj4js.common.HALF_PI)<=Proj4js.common.EPSLN){Proj4js.reportError("merc:forward: ll2mAtPoles");return null}else{if(this.sphere){d=this.x0+this.a*this.k0*Proj4js.common.adjust_lon(b-this.long0);e=this.y0+this.a*this.k0*Math.log(Math.tan(Proj4js.common.FORTPI+0.5*c))}else{var f=Math.sin(c),g=Proj4js.common.tsfnz(this.e,c,f);d=this.x0+this.a*this.k0*Proj4js.common.adjust_lon(b-this.long0);e=this.y0-this.a*this.k0*Math.log(g)}a.x=d;a.y=e;return a}},inverse:function(a){var b=a.x-this.x0,c=a.y-this.y0,d,e;if(this.sphere)e=Proj4js.common.HALF_PI-2*Math.atan(Math.exp(-c/this.a*this.k0));else{var f=Math.exp(-c/(this.a*this.k0));e=Proj4js.common.phi2z(this.e,f);if(e==-9999){Proj4js.reportError("merc:inverse: lat = -9999");return null}}d=Proj4js.common.adjust_lon(this.long0+b/(this.a*this.k0));a.x=d;a.y=e;return a}};Proj4js.Proj.tmerc={init:function(){this.e0=Proj4js.common.e0fn(this.es);this.e1=Proj4js.common.e1fn(this.es);this.e2=Proj4js.common.e2fn(this.es);this.e3=Proj4js.common.e3fn(this.es);this.ml0=this.a*Proj4js.common.mlfn(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(a){var b=a.x,c=a.y,d=Proj4js.common.adjust_lon(b-this.long0),e,f,g,h=Math.sin(c),j=Math.cos(c);if(this.sphere){var k=j*Math.sin(d);if(Math.abs(Math.abs(k)-1)<1.0E-10){Proj4js.reportError("tmerc:forward: Point projects into infinity");return 93}else{f=0.5*this.a*this.k0*Math.log((1+k)/(1-k));e=Math.acos(j*Math.cos(d)/Math.sqrt(1-k*k));if(c<0)e=-e;g=this.a*this.k0*(e-this.lat0)}}else{var l=j*d,m=Math.pow(l,2),p=this.ep2*Math.pow(j,2),q=Math.tan(c),n=Math.pow(q,2);e=1-this.es*Math.pow(h,2);var o=this.a/Math.sqrt(e),r=this.a*Proj4js.common.mlfn(this.e0,this.e1,this.e2,this.e3,c);f=this.k0*o*l*(1+m/6*(1-n+p+m/20*(5-18*n+Math.pow(n,2)+72*p-58*this.ep2)))+this.x0;g=this.k0*(r-this.ml0+o*q*m*(0.5+m/24*(5-n+9*p+4*Math.pow(p,2)+m/30*(61-
58*n+Math.pow(n,2)+600*p-330*this.ep2))))+this.y0}a.x=f;a.y=g;return a},inverse:function(a){var b,c,d,e,f=6,g,h;if(this.sphere){var j=Math.exp(a.x/(this.a*this.k0)),k=0.5*(j-1/j),l=this.lat0+a.y/(this.a*this.k0),m=Math.cos(l);b=Math.sqrt((1-m*m)/(1+k*k));g=Proj4js.common.asinz(b);if(l<0)g=-g;h=k==0&&m==0?this.long0:Proj4js.common.adjust_lon(Math.atan2(k,m)+this.long0)}else{var p=a.x-this.x0,q=a.y-this.y0;c=b=(this.ml0+q/this.k0)/this.a;for(e=0;1;e++){d=(b+this.e1*Math.sin(2*c)-this.e2*Math.sin(4*c)+this.e3*Math.sin(6*c))/this.e0-c;c+=d;if(Math.abs(d)<=Proj4js.common.EPSLN)break;if(e>=f){Proj4js.reportError("tmerc:inverse: Latitude failed to converge");return 95}}if(Math.abs(c)<Proj4js.common.HALF_PI){var n=Math.sin(c),o=Math.cos(c),r=Math.tan(c),s=this.ep2*Math.pow(o,2),t=Math.pow(s,2),z=Math.pow(r,2),B=Math.pow(z,2);b=1-this.es*Math.pow(n,2);var u=this.a/Math.sqrt(b),w=u*(1-this.es)/b,A=p/(u*this.k0),v=Math.pow(A,2);g=c-u*r*v/w*(0.5-v/24*(5+3*z+10*s-4*t-9*this.ep2-v/30*(61+90*z+298*s+45*B-252*this.ep2-3*t)));h=Proj4js.common.adjust_lon(this.long0+A*(1-v/6*(1+2*z+s-v/20*(5-2*s+28*z-3*t+8*this.ep2+24*B)))/o)}else{g=Proj4js.common.HALF_PI*Proj4js.common.sign(q);h=this.long0}}a.x=h;a.y=g;return a}};Proj4js.defs["EPSG:32632"]="+proj=utm +zone=32 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32633"]="+proj=utm +zone=33 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32634"]="+proj=utm +zone=34 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32635"]="+proj=utm +zone=35 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:3021"]="+proj=tmerc +lat_0=0.000000000 +lon_0=15.8062845294444 +k=1.00000561024 +x_0=1500064.274 +y_0=-667.711 +ellps=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:3022"]="+proj=tmerc +lat_0=0 +lon_0=18.05827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs";Proj4js.defs["EPSG:3006"]="+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs";(function(){if(OpenLayers.Handler){function a(c,d){if(c&&c.prototype[d]){c.prototype["_monkeypatch_"+d]=c.prototype[d];c.prototype[d]=function(e){return jQuery(OpenLayers.Event.element(e)).closest(".olEniroIgnoreHandlers").length?true:c.prototype["_monkeypatch_"+d].apply(this,arguments)}}}a(OpenLayers.Handler.Drag,"mousedown");a(OpenLayers.Handler.Drag,"mouseup");a(OpenLayers.Handler.Drag,"click");a(OpenLayers.Handler.Click,"dblclick");a(OpenLayers.Handler.Click,"click");a(OpenLayers.Handler.Click,"mouseup");a(OpenLayers.Handler.Feature,"mouseup");a(OpenLayers.Handler.Feature,"mousedown");a(OpenLayers.Handler.Feature,"click")}if(OpenLayers.Events){OpenLayers.Events.prototype._monkeypatch_unregister=OpenLayers.Events.prototype.unregister;OpenLayers.Events.prototype.unregister=function(){this.listeners&&OpenLayers.Events.prototype._monkeypatch_unregister.apply(this,arguments)};var b=function(){return"BROWSER_EVENTS"};OpenLayers.Events.prototype[b()].push("keyup","keydown","keypress")}OpenLayers.Format.GML=OpenLayers.Format.GML||function(){}})();OpenLayers.Util.getRenderedDimensions=function(a,b,c){var d,e,f=document.createElement("div");f.style.visibility="hidden";var g=c&&c.containerElement?c.containerElement:document.body;if(b)if(b.w){d=b.w;f.style.width=d+"px"}else if(b.h){e=b.h;f.style.height=e+"px"}if(c&&c.displayClass)f.className=c.displayClass;var h=document.createElement("div");h.innerHTML=a;h.style.overflow="visible";if(h.childNodes)for(var j=0,k=h.childNodes.length;j<k;j++)if(h.childNodes[j].style)h.childNodes[j].style.overflow="visible";f.appendChild(h);g.appendChild(f);for(var l=false,m=f.parentNode;m&&m.tagName.toLowerCase()!="body";){var p=OpenLayers.Element.getStyle(m,"position");if(p=="absolute"){l=true;break}else if(p&&p!="static")break;m=m.parentNode}if(!l)f.style.position="absolute";if(!d){d=parseInt(h.scrollWidth+1,10);f.style.width=d+"px"}e||(e=parseInt(h.scrollHeight,10));f.removeChild(h);g.removeChild(f);return new OpenLayers.Size(d,e)};if(!OpenLayers.Console.groupCollapsed)OpenLayers.Console.groupCollapsed=function(){this.group.apply(this,arguments)};function RTree(a){var b=3,c=6;if(!isNaN(a)){b=Math.floor(a/2);c=a}var d={x:0,y:0,w:0,h:0,id:"root",nodes:[]};function e(n){return Object.prototype.toString.call(n)==="[object Array]"}var f=function(){var n={};return function(o){if(o&&o.length>0)return(n[o]?n[o]:(n[o]=function(r){var s=1;return function(){return r+"_"+s++}}(o)))()}}();RTree.Rectangle.squarified_ratio=function(n,o,r){var s=(n+o)/2,t=n*o,z=t/(s*s);return t*r/z};function g(n,o,r){var s=[],t=[],z=[],B=1;if(!n||!RTree.Rectangle.overlap_rectangle(n,r))return z;var u={x:n.x,y:n.y,w:n.w,h:n.h,target:o};t.push(r.nodes.length);s.push(r);do{var w=s.pop(),A=t.pop()-1;if("target"in u)for(;A>=0;){var v=w.nodes[A];if(RTree.Rectangle.overlap_rectangle(u,v))if(u.target&&"leaf"in v&&v.leaf===u.target||!u.target&&("leaf"in v||RTree.Rectangle.contains_rectangle(v,u))){if("nodes"in v){z=p(v,true,[],v);w.nodes.splice(A,1)}else z=w.nodes.splice(A,1);RTree.Rectangle.make_MBR(w.nodes,w);delete u.target;if(w.nodes.length<b)u.nodes=p(w,true,[],w);break}else if("nodes"in
v){B+=1;t.push(A);s.push(w);w=v;A=v.nodes.length}A-=1}else if("nodes"in u){w.nodes.splice(A+1,1);w.nodes.length>0&&RTree.Rectangle.make_MBR(w.nodes,w);for(var D=0;D<u.nodes.length;D++)q(u.nodes[D],w);u.nodes.length=0;if(s.length==0&&w.nodes.length<=1){u.nodes=p(w,true,u.nodes,w);w.nodes.length=0;s.push(w);t.push(1)}else if(s.length>0&&w.nodes.length<b){u.nodes=p(w,true,u.nodes,w);w.nodes.length=0}else delete u.nodes}else RTree.Rectangle.make_MBR(w.nodes,w);B-=1}while(s.length>0);return z}function h(n,o){var r=-1,s=[],t;s.push(o);var z=o.nodes;do{if(r!=-1){s.push(z[r]);z=z[r].nodes;r=-1}for(var B=z.length-1;B>=0;B--){var u=z[B];if("leaf"in u){r=-1;break}var w=RTree.Rectangle.squarified_ratio(u.w,u.h,u.nodes.length+1),A=Math.max(u.x+u.w,n.x+n.w)-Math.min(u.x,n.x),v=Math.max(u.y+u.h,n.y+n.h)-Math.min(u.y,n.y),D=RTree.Rectangle.squarified_ratio(A,v,u.nodes.length+2);if(r<0||Math.abs(D-w)<t){t=Math.abs(D-w);r=B}}}while(r!=-1);return s}function j(n){for(var o=l(n);n.length>0;)k(n,o[0],o[1]);return o}
function k(n,o,r){for(var s=RTree.Rectangle.squarified_ratio(o.w,o.h,o.nodes.length+1),t=RTree.Rectangle.squarified_ratio(r.w,r.h,r.nodes.length+1),z,B,u,w=n.length-1;w>=0;w--){var A=n[w],v={};v.x=Math.min(o.x,A.x);v.y=Math.min(o.y,A.y);v.w=Math.max(o.x+o.w,A.x+A.w)-v.x;v.h=Math.max(o.y+o.h,A.y+A.h)-v.y;var D=Math.abs(RTree.Rectangle.squarified_ratio(v.w,v.h,o.nodes.length+2)-s),C={};C.x=Math.min(r.x,A.x);C.y=Math.min(r.y,A.y);C.w=Math.max(r.x+r.w,A.x+A.w)-C.x;C.h=Math.max(r.y+r.h,A.y+A.h)-C.y;var F=Math.abs(RTree.Rectangle.squarified_ratio(C.w,C.h,r.nodes.length+2)-t);if(!B||!z||Math.abs(F-D)<z){B=w;z=Math.abs(F-D);u=F<D?r:o}}var E=n.splice(B,1)[0];if(o.nodes.length+n.length+1<=b){o.nodes.push(E);RTree.Rectangle.expand_rectangle(o,E)}else if(r.nodes.length+n.length+1<=b){r.nodes.push(E);RTree.Rectangle.expand_rectangle(r,E)}else{u.nodes.push(E);RTree.Rectangle.expand_rectangle(u,E)}}function l(n){for(var o=n.length-1,r=0,s=n.length-1,t=0,z=n.length-2;z>=0;z--){var B=n[z];if(B.x>n[r].x)r=z;else if(B.x+
B.w<n[o].x+n[o].w)o=z;if(B.y>n[t].y)t=z;else if(B.y+B.h<n[s].y+n[s].h)s=z}var u=Math.abs(n[o].x+n[o].w-n[r].x),w=Math.abs(n[s].y+n[s].h-n[t].y);if(u>w)if(o>r)var A=n.splice(o,1)[0],v=n.splice(r,1)[0];else{v=n.splice(r,1)[0];A=n.splice(o,1)[0]}else if(s>t){A=n.splice(s,1)[0];v=n.splice(t,1)[0]}else{v=n.splice(t,1)[0];A=n.splice(s,1)[0]}return[{x:A.x,y:A.y,w:A.w,h:A.h,nodes:[A]},{x:v.x,y:v.y,w:v.w,h:v.h,nodes:[v]}]}function m(n,o){n.nodes=o.nodes;n.x=o.x;n.y=o.y;n.w=o.w;n.h=o.h;return n}function p(n,o,r,s){var t=[];if(!RTree.Rectangle.overlap_rectangle(n,s))return r;t.push(s.nodes);do for(var z=t.pop(),B=z.length-1;B>=0;B--){var u=z[B];if(RTree.Rectangle.overlap_rectangle(n,u))if("nodes"in u)t.push(u.nodes);else if("leaf"in u)o?r.push(u):r.push(u.leaf)}while(t.length>0);return r}function q(n,o){var r;if(o.nodes.length==0){o.x=n.x;o.y=n.y;o.w=n.w;o.h=n.h;o.nodes.push(n)}else{var s=h(n,o),t=n;do{if(r&&"nodes"in r&&r.nodes.length==0){var z=r;r=s.pop();for(var B=0;B<r.nodes.length;B++)if(r.nodes[B]===z||r.nodes[B].nodes.length==0){r.nodes.splice(B,1);break}}else r=s.pop();if("leaf"in t||"nodes"in t||e(t)){if(e(t)){for(var u=0;u<t.length;u++)RTree.Rectangle.expand_rectangle(r,t[u]);r.nodes=r.nodes.concat(t)}else{RTree.Rectangle.expand_rectangle(r,t);r.nodes.push(t)}if(r.nodes.length<=c)t={x:r.x,y:r.y,w:r.w,h:r.h};else{var w=j(r.nodes);t=w;if(s.length<1){r.nodes.push(w[0]);s.push(r);t=w[1]}}}else{RTree.Rectangle.expand_rectangle(r,t);t={x:r.x,y:r.y,w:r.w,h:r.h}}}while(s.length>0)}}this.get_tree=function(){return d};this.set_tree=function(n,o){o||(o=d);return m(o,n)};this.search=function(){if(arguments.length<1)throw"Wrong number of arguments. RT.Search requires at least a bounding rectangle.";switch(arguments.length){case 1:arguments[1]=false;case 2:arguments[2]=[];case 3:arguments[3]=d;default:arguments.length=4}return p.apply(this,arguments)};this.f=function(n,o){var r=[],s=[],t={},z=3,B=1,u="";if(n&&!RTree.Rectangle.overlap_rectangle(n,d))return"";if(o){z+=4;s.push(o.nodes.length);r.push(o.nodes);u+="var main_tree = {x:"+o.x.toFixed()+",y:"+o.y.toFixed()+",w:"+o.w.toFixed()+",h:"+o.h.toFixed()+",nodes:["}else{s.push(d.nodes.length);r.push(d.nodes);u+="var main_tree = {x:"+d.x.toFixed()+",y:"+d.y.toFixed()+",w:"+d.w.toFixed()+",h:"+d.h.toFixed()+",nodes:["}do{var w=r.pop(),A=s.pop()-1;if(A>=0&&A<w.length-1)u+=",";for(;A>=0;){var v=w[A];if(!n||RTree.Rectangle.overlap_rectangle(n,v))if(v.nodes)if(B>=z){var D=f("saved_subtree");u+="{x:"+v.x.toFixed()+",y:"+v.y.toFixed()+",w:"+v.w.toFixed()+",h:"+
v.h.toFixed()+",load:'"+D+".js'}";t[D]=this.f(n,v);if(A>0)u+=","}else{u+="{x:"+v.x.toFixed()+",y:"+v.y.toFixed()+",w:"+v.w.toFixed()+",h:"+v.h.toFixed()+",nodes:[";B+=1;s.push(A);r.push(w);w=v.nodes;A=v.nodes.length}else if(v.leaf){var C=v.leaf.f?v.leaf.f():JSON.stringify(v.leaf);u+="{x:"+v.x.toFixed()+",y:"+v.y.toFixed()+",w:"+v.w.toFixed()+",h:"+v.h.toFixed()+",leaf:"+C+"}";if(A>0)u+=","}else if(v.load){u+="{x:"+v.x.toFixed()+",y:"+v.y.toFixed()+",w:"+v.w.toFixed()+",h:"+v.h.toFixed()+",load:'"+
v.load+"'}";if(A>0)u+=","}A-=1}if(A<0){u+="]}";B-=1}}while(r.length>0);u+=";";for(var F in t)u+="\nvar "+F+" = function(){"+t[F]+" return(main_tree);};";return u};this.remove=function(){if(arguments.length<1)throw"Wrong number of arguments. RT.remove requires at least a bounding rectangle.";switch(arguments.length){case 1:arguments[1]=false;case 2:arguments[2]=d;default:arguments.length=3}if(arguments[1]===false){var n=0,o=[];do{n=o.length;o=o.concat(g.apply(this,arguments))}while(n!=o.length);return o}else return g.apply(this,arguments)};this.insert=function(n,o){if(arguments.length<2)throw"Wrong number of arguments. RT.Insert requires at least a bounding rectangle and an object.";return q({x:n.x,y:n.y,w:n.w,h:n.h,leaf:o},d)}}
RTree.Rectangle=function(a,b,c,d){if(a.x){var e=a.x,f=a.y;if(a.w!==0&&!a.w&&a.x2)var g=a.x2-a.x,h=a.y2-a.y;else{g=a.w;h=a.h}var j=e+g,k=f+h}else{e=a;f=b;g=c;h=d;j=e+g;k=f+h}this.x1=this.x=function(){return e};this.y1=this.y=function(){return f};this.x2=function(){return j};this.y2=function(){return k};this.w=function(){return g};this.h=function(){return h};this.f=function(){return'{"x":'+e.toString()+', "y":'+f.toString()+', "w":'+g.toString()+', "h":'+h.toString()+"}"};this.overlap=function(l){return this.x()<l.x2()&&this.x2()>l.x()&&this.y()<l.y2()&&this.y2()>l.y()};this.expand=function(l){var m=Math.min(this.x(),l.x()),p=Math.min(this.y(),l.y());g=Math.max(this.x2(),l.x2())-m;h=Math.max(this.y2(),l.y2())-p;e=m;f=p;return this};this.setRect=function(){}};RTree.Rectangle.overlap_rectangle=function(a,b){return a.x<b.x+b.w&&a.x+a.w>b.x&&a.y<b.y+b.h&&a.y+a.h>b.y};RTree.Rectangle.contains_rectangle=function(a,b){return a.x+a.w<=b.x+b.w&&a.x>=b.x&&a.y+a.h<=b.y+b.h&&a.y>=b.y};RTree.Rectangle.expand_rectangle=function(a,b){var c=Math.min(a.x,b.x),d=Math.min(a.y,b.y);a.w=Math.max(a.x+a.w,b.x+b.w)-c;a.h=Math.max(a.y+a.h,b.y+b.h)-d;a.x=c;a.y=d;return a};RTree.Rectangle.make_MBR=function(a,b){if(a.length<1)return{x:0,y:0,w:0,h:0};if(b)b.x=a[0].x;else b={x:a[0].x,y:a[0].y,w:a[0].w,h:a[0].h};b.y=a[0].y;b.w=a[0].w;b.h=a[0].h;for(var c=a.length-1;c>0;c--)RTree.Rectangle.expand_rectangle(b,a[c]);return b};var Eniro=Eniro||{};Eniro.Util=Eniro.Util||{};Eniro.Events=Eniro.Events||{};Eniro.Tile=Eniro.Tile||{};Eniro.Layer=Eniro.Layer||{};Eniro.Constant=Eniro.Constant||{};Eniro.ControlID=Eniro.ControlID||{};Eniro.Feature=Eniro.Feature||{};Eniro.Handler=Eniro.Handler||{};Eniro.Sellable=Eniro.Sellable||{};Eniro.Search=Eniro.Search||{};Eniro.Campaign=Eniro.Campaign||{};String.prototype.j=function(){return parseInt(this,10)};String.prototype.i=function(){return parseFloat(this,10)};String.prototype.f=function(){var a=document.createElement("div");a.innerHTML=this;return a.firstChild};String.prototype.dash=function(){return this.replace(/([A-Z])/g,"-$1").replace(/^-/,"").replace(".","").toLowerCase()};String.prototype.k=function(){return this.replace(/([^\d]*)?([\d]+)(.*)?/,"$2")*1};String.prototype.wrap=function(a){if(this.length<=a)return this.toString();for(var b=a,c=this;b>0;){if(c[b]==="-"||c[b]==="\n"){c=c.substring(0,b+1)+" "+c.substring(b+1);b++}if(c[b]===" ")return c.substring(0,b)+"<br/>"+c.substring(b+1).wrap(a);b--}return c.substring(0,a)+"<br/>"+c.substring(a).wrap(a)};Number.prototype.a=function(a){var b=Eniro.l10n.numberFormat(this);a||(a=0);b.setPlaces(a);return b.a()};Number.prototype.d=function(a,b,c){var d=this,e="m";b||(b=0);a||(a=1E3);if(d>=a){d/=1E3;e="km";b=c?c:1}return d.a(b)+" "+e};Number.prototype.b=function(a,b,c){var d=this,e="m";b||(b=0);a||(a=1E3);if(d>=a){d/=1E6;e="km";b=c?c:1}return d.a(b)+" "+e};Number.prototype.g=function(){var a=this/60,b=0;if(a>=60){b=Math.floor(a/60);a-=b*60}var c=[];b&&c.push(OpenLayers.i18n("l10n.hours",{hours:b.a()}));a&&c.push(OpenLayers.i18n("l10n.minutes",{minutes:a.a()}));return c.join(" ")};Eniro.Constant.REGEX_URL=/\b(https?\:\/\/)?(?:[A-Z0-9\-]+\.)+[A-Z]{2,4}(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?\b/gi;Eniro.Constant.REGEX_EMAIL=/\b[A-Z0-9._%+\-]+@(?:[A-Z0-9\-]+\.)+[A-Z]{2,4}\b/gi;Eniro.Constant.REGEX_URL_AND_EMAIL=/\b([A-Z0-9._%+\-]+@(?:[A-Z0-9\-]+\.)+[A-Z]{2,4}|(https?\:\/\/)?(?:[A-Z0-9\-]+\.)+[A-Z]{2,4}(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)\b/gi;Eniro.Util.LinkParser={encode:function(a,b){if(!a)return a;var c;c=b==="url"?Eniro.Constant.REGEX_URL:b==="email"?Eniro.Constant.REGEX_EMAIL:Eniro.Constant.REGEX_URL_AND_EMAIL;return a=a.replace(c,function(d){var e=d;if(d.match("@")){if(!b||b==="email")return'<a class="eniro-new" rel="nofollow" href="mailto:'+d+'">'+e+"</a>"}else if(!b||b==="url"){d.match("^https?://")||(d="http://"+d);return'<a class="eniro-new" rel="nofollow" href="'+d+'">'+e+"</a>"}return e})},decode:function(a){return jQuery("<div>"+
a+"</div>").text()}};Eniro.Util.FeatureUtils={getAddressAsString:function(a){if(!a)return null;var b=[],c=a.attributes||a.properties,d=this.getMappingData(c.source);if(c.source&&c.source.match(/_no/)){var e;if(c.postplaces)e=c.postplaces[0];var f=c.street;if(typeof f==="object")f=f.value;f&&b.push(f);if(c.streetNumber&&c.streetNumber!==""){b.push(" ");b.push(d.streetNumber)}b.length>0&&b.push(",");if(e){if(e.id&&e.id!==""){b.push(" ");b.push(e.id)}if(e.value&&e.value!==""){b.push(" ");b.push(e.value)}}else if(c.nameOfPlace&&c.nameOfPlace!==""){b.push(" ");b.push(c.nameOfPlace);if(c.municipality&&c.municipality!==""){b.push(", ");b.push(c.municipality.value)}}b=b.join("")}else if(d){var g=c[d.addressObject]||c;if(Eniro.Util.isArray(g)&&g.length>0)g=g[0];if(d.nestedObject)g=g[d.nestedObject]||g;if(g&&g[d.street])b=[g[d.street]+(g[d.streetNumber]?" "+g[d.streetNumber]:""),g[d.city]===""&&g[d.postArea]?g[d.postArea]:g[d.city]];b=b.join(", ")}return OpenLayers.String.trim(b)},getContentsForFeature:function(a){var b="",c=this.getMappingData(a.attributes.source);if(c.contents)b=a.attributes[c.contents];return b},getMappingData:function(a){var b=null,c=Eniro.Profile.providers?Eniro.Profile.providers[a]:null;if(c&&c.properties)b=c.properties.data;return b},makeMultiLineString:function(a){for(var b=[],c=0;c<a.length;c++){for(var d=[],e=0;e<a[c].length;e++)d.push(new OpenLayers.Geometry.Point(a[c][e][0],a[c][e][1]));b.push(new OpenLayers.Geometry.LineString(d))}return new OpenLayers.Geometry.MultiLineString(b)},getCompanyIcon:function(a){var b=null,c=a["e:infopage"],d=Eniro.Profile.providers[a.source];if(d&&Eniro.Profile.sellable[d.sellable]){var e=Eniro.Profile.sellable[d.sellable],f=a.linkId;if(f&&e.options)for(var g=0,j=e.options.length;g<j;g++){var h=e.options[g];if(h.linkId===f&&h.imageUrl){b=h.imageUrl;break}}}else if(c)if(Eniro.Util.isArray(c))for(var k=0,l=c.length;k<l;k++){var m=c[k];if(m["e:component"]&&m["e:component"]["@component_name"]==="logo_on_map"&&m["e:component"]["e:src"]){b=m["e:component"]["e:src"];break}}else if(c["e:component"]&&c["e:component"]["@component_name"]==="logo_on_map"&&c["e:component"]["e:src"])b=c["e:component"]["e:src"];return b},formatNorwegianPhoneNo:function(a){if(a)a=a.match(/^[94]/)?a.replace(/^(\d{3})(\d{2})(\d+)/,"$1 $2 $3"):a.replace(/^(\d{2})(\d{2})(\d{2})(\d+)/,"$1 $2 $3 $4");return a}};Eniro.AppNode={appUrl:function(a){return this.appendToUrl(Eniro.Config["appnode.url"],a)},tileUrl:function(a){var b=Eniro.Config["appnode.alias"],c;if(b.indexOf(",")>0){b=b.split(/\s*,\s*/);c=[];for(var d=0;d<b.length;d++)c.push(this.appendToUrl(b[d],a))}else c=this.appendToUrl(b,a);return c},streetviewDataUrl:function(){return Eniro.Config["streetview.data.url"]},streetviewFrontdoorUrl:function(){return Eniro.Config["streetview.frontdoor.url"]},obliqueDataUrl:function(){return Eniro.Config["oblique.data.url"]},searchTMSUrl:function(a){var b=this.getOptionalValue(Eniro.Config["search.tms.url"],Eniro.Config["appnode.url"]);return this.appendToUrl(b,a)},searchUrl:function(a){var b=this.getOptionalValue(Eniro.Config["search.url"],Eniro.Config["appnode.url"]);return this.appendToUrl(b,a)},appendToUrl:function(a,b){OpenLayers.String.startsWith(b,"/")||(b="/"+b);return a+b},getOptionalValue:function(a,b){return a?a:b}};if(!Array.prototype.indexOf)Array.prototype.indexOf=function(a,b){var c=this.length>>>0,d=Number(b)||0;d=d<0?Math.ceil(d):Math.floor(d);if(d<0)d+=c;for(;d<c;d++)if(d in this&&this[d]===a)return d;return-1};if(!Array.prototype.remove)Array.prototype.remove=function(a,b){this.splice(a,!b||1+b-a+(!(b<0^a>=0)&&(b<0||-1)*this.length));return this.length};Eniro.Util.mouseLeft=function(a,b){for(var c=a.relatedTarget?a.relatedTarget:a.toElement;c&&c!=b;)try{c=c.parentNode}catch(d){break}return c!=b};Eniro.Util.getImagesLocation=function(){return Eniro.ImgPath||"/"};Eniro.Util.createNonPositionedDiv=function(){return Eniro.Util.createDiv()};Eniro.Util.createDiv=function(a,b,c,d){var e=document.createElement("div");if(b)e.className=b;if(d){e.className+=" olControlNoSelect";e.setAttribute("unselectable","on",0);e.onselectstart=function(){return false}}if(c)e.title=c;OpenLayers.Util.modifyDOMElement(e,a);return e};Eniro.Util.createButton=function(a,b,c){var d=document.createElement("input");d.setAttribute("type","submit");d.setAttribute("value",c);if(b)d.className=b;OpenLayers.Util.modifyDOMElement(d,a);return d};Eniro.Util.isArray=function(a){return a&&typeof a==="object"&&a.constructor===Array};Eniro.Util.toHTMLAttributes=function(a){var b=[];for(var c in a)a[c]!==undefined&&b.push(c+'="'+a[c]+'"');return b};Eniro.Util.stopArrowKeysEvent=function(a){switch(a.keyCode){case OpenLayers.Event.KEY_LEFT:case OpenLayers.Event.KEY_RIGHT:case OpenLayers.Event.KEY_UP:case OpenLayers.Event.KEY_DOWN:case 35:case 36:case 43:case 61:case 187:case 107:case 45:case 109:case 189:case 95:OpenLayers.Event.stop(a,true);break}};Eniro.Util.reflect=function(a,b){var c=this.getClass(a);function d(){if(b&&b[0]!=OpenLayers.Class.isPrototype)return c.apply(this,b)}d.prototype=c.prototype;return new d};Eniro.Util.getClass=function(a){for(var b=window,c=a.split("."),d=0,e=c.length;d<e;d++)if(b[c[d]])b=b[c[d]];else return null;return b};Eniro.Util.getCssClassName=function(a,b,c,d){var e=[],f=[],g,j,h,k;e.push(a.CLASS_NAME);if(a.SUPER){var l=a.SUPER;do{if(typeof l==="string"&&l)l=Eniro.Util.getClass(l);if(l){l.prototype.CLASS_NAME&&e.push(l.prototype.CLASS_NAME);l=l.prototype.SUPER?l.prototype.SUPER:null}else l=null}while(l)}e=e.reverse();for(h=0,k=e.length;h<k;++h){(g=e[h].replace(/^Eniro\.|View$|Controller$|Tool$|Menu$/g,""))||(g=e[h].replace(/^Eniro\./g,""));if(h===e.length-1)j=g.replace(/\./gi,"-").toLowerCase();f.push(g.replace(/\./gi,"-").toLowerCase())}a.id&&!OpenLayers.String.startsWith(a.id,a.CLASS_NAME.replace(/\./,""))&&f.push(j+"-"+a.id.replace(/[\. ,]/gi,"-").dash());f=OpenLayers.String.trim([" "].concat(f).join(" eniro-"));b=b||b===""?b.split(" "):[];if(d){var m=[],q=function(t,r){var u=[];for(h=0,k=t.length;h<k;++h)t[h]?u.push(t[h]+"-"+r):u.push(r);return u},o="";if(d.disabled||d.selected){if(d.disabled)o="disabled";else if(d.selected)o="selected";m=m.concat(q(b,o))}if(d.position)m=m.concat(q(b,d.position));if((d.selected||d.disabled)&&d.position){var p="";if(o)p=o+"-";p+=d.position;m=m.concat(q(b,p))}b=b.concat(m)}e=[];for(h=0,k=b.length;h<k;++h)if(b[h]){g=f.replace(/( |$)/gi,"-"+b[h]+"$1");if(c){g=g.split(" ");for(var s=0,v=g.length;s<v;++s)if(OpenLayers.String.contains(g[s],c||""))e.push(g[s])}else e.push(g)}if(d&&d.id){g=f.split(" ");g=g[0]+"-"+b[0]+"-"+d.id.replace(/[\. ,]/gi,"-").dash();e.push(g);d.selected&&e.push(g+"-selected")}return className=b[0]?e.length>0?e.join(" "):f:OpenLayers.String.trim(f+" "+e.join(" "))};Eniro.Util.getSingleCssClassName=function(a,b,c,d){var e=Eniro.Util.getCssClassName(a,b,c,d);e=e.split(" ");return e[e.length-1]};Eniro.Util.copyToClipboard=function(a){window.clipboardData&&window.clipboardData.setData("Text",a)};Eniro.Util.enableInputCaption=function(a,b){a.jquery||(a=jQuery(a));var c=jQuery('<div class="eniro-input-caption">'+b+"</div>");c.hide();a.parent().css("position")==="static"&&a.parent().css("position","relative");a.before(c);function d(){a.val()===""&&c.show()}function e(){a.val()===""?c.show():c.hide()}c.click(function(){a.focus()});a.blur(d);a.keydown(e);a.keyup(e);a.change(e);a.get(0).updateCaption=e;a.val()===""&&d()};OpenLayers.IMAGE_RELOAD_ATTEMPTS=3;Eniro.Util.ArgParser={getParameters:function(){var a="";a=/^\/(map.c|bigMap.c)/.test(location.pathname)||window.location.search?location.search:window.location.hash;var b={},c="s",d={0:"s",1:"s",2:"a",3:"h",4:"o"},e="aq",f={address:"aq",yellow:"yp",white:"wp"};if(a){a=a.replace(/^(#|\?)/,"");var g;try{g=decodeURIComponent(a)}catch(j){g=unescape(a)}for(var h=g.split(/[&;]/),k=0,l=h.length;k<l;++k){var m=h[k].split("=");if(m[0]){var q=decodeURIComponent(m[0]),o=m[1]||"";o=o.split(",");for(var p=0,s=o.length;p<s;p++)o[p]=decodeURIComponent(o[p]);if(o.length==1)o=o[0];if(q==="layers"){values=o.split("");for(p=0,n=values.length;p<n;++p)if(values[p]==="B"){c=d[p];break}}b[q]=o}}if(b.tab)e=f[b.tab]}OpenLayers.Console.debug(b);var v=new OpenLayers.LonLat(b.lon,b.lat);v.transform(new OpenLayers.Projection("EPSG:32632"),new OpenLayers.Projection("EPSG:4326"));var t=null;if(b.id)t=b.id.replace(/^(a_|c_|p_)/gi,"");var r=parseInt(b.zoom,10);if(b.q||t)r=null;if(!c&&b.imgt)c=b.imgt.toLowerCase();var u={offset:b.offset,search_word:b.q,mop:e,what:"map",advert_code:t,mapstate:{upperLeftX:b.w,upperLeftY:b.n,lowerRightX:b.e,lowerRightY:b.s,centerX:v.lon,centerY:v.lat,zoom:r,type:c}};OpenLayers.Console.debug(u);return u}};Eniro.Util.openLinksInNewWindow=function(a){if(!(a.shiftKey||a.altKey||a.ctrlKey||a.metaKey)){var b=OpenLayers.Event.element(a),c=jQuery(b).closest("a.eniro-new");if(c.size()>0&&!(c.attr("onclick")||c.attr("onClick"))){var d=window.open(c.attr("href"),"_blank");if(d){d.focus&&d.focus();OpenLayers.Event.stop(a);return false}}}return true};Eniro.Util.bearing=function(a,b){var c=a.lat*(Math.PI/180),d=b.lat*(Math.PI/180),e=(b.lon-a.lon)*(Math.PI/180),f=Math.sin(e)*Math.cos(d),g=Math.cos(c)*Math.sin(d)-Math.sin(c)*Math.cos(d)*Math.cos(e),j=Math.atan2(f,g);return(j*(180/Math.PI)+360)%360};Eniro.StringBuffer=OpenLayers.Class({initialize:function(){this.buffer=[]},append:function(a){this.buffer.push(a);return this},toString:function(){return this.buffer.join("")},reset:function(){this.buffer=[];return this}});Eniro.l10n={_separators:{en:[true,",","."],sv_se:[true," ",","],no_no:[true," ",","],da_dk:[true," ",","],fi_fi:[true," ",","]},numberFormat:function(a,b){var c=new NumberFormat(a,b);c.setSeparators.apply(c,Eniro.l10n._separators[OpenLayers.Lang.getCode()]);return c}};Eniro.Events.MODE_SWITCH="modeSwitch";Eniro.Events.STATE_SAVING_MODE_SWITCH="stateSavingModeSwitch";Eniro.Events.ZOOM_TO_LEVEL="zoomToLevel";Eniro.Events.ZOOM_TO_EXTENT="zoomToExtent";Eniro.Events.SET_CENTER="setCenter";Eniro.Events.CHANGE_BASE_LAYER="changeBaseLayer";Eniro.Events.ROUTE_CLEAR="routeClear";Eniro.Events.ROUTE_SEARCH_DO="routeSearchDo";Eniro.Events.ROUTE_SEARCH_FAILURE="routeSearchFailure";Eniro.Events.ROUTE_FORM_PERFORM_SEARCH="routeFormPerformSearch";Eniro.Events.ROUTE_DESCRIPTION_AVAILABLE="routeDescriptionAvailable";Eniro.Events.ROUTE_GEOMETRY_AVAILABLE="routeGeometryAvailable";Eniro.Events.ROUTE_WAYPOINT_NAME_AVAILABLE="routeWaypointNameAvailable";Eniro.Events.ROUTE_WAYPOINT_DATA_SET="routeWaypointDataSet";Eniro.Events.ROUTE_WAYPOINTS_UPDATED="routeWaypointsUpdated";Eniro.Events.ROUTE_VIAPOINT_ADD="routeViapointAdd";Eniro.Events.ROUTE_VIAPOINT_ADD_AFTER="routeViapointAddAfter";Eniro.Events.ROUTE_VIAPOINT_REMOVE="routeViapointRemove";Eniro.Events.ROUTE_VIAPOINT_REMOVE_AFTER="routeViapointRemoveAfter";Eniro.Events.ROUTE_SET_START="routeSetStart";Eniro.Events.ROUTE_SET_END="routeSetEnd";Eniro.Events.ROUTE_SET_VIA="routeSetVia";Eniro.Events.ROUTE_MARKER_MOVING="routeMarkerMoving";Eniro.Events.ROUTE_MARKER_MOVED="routeMarkerMoved";Eniro.Events.ROUTE_MARKERS_CLEARED="routeMarkersCleared";Eniro.Events.ROUTE_OPTIONS_TOGGLED="routeOptionsToggled";Eniro.Events.ROUTE_OPTIONS_CHANGED="routeOptionsChanged";Eniro.Events.ROUTE_FORM_SET_OPTIONS="routeFormSetOptions";Eniro.Events.ROUTE_ZOOM_TO_EXTENT="routeZoomToExtent";Eniro.Events.ROUTE_ZOOM_TO_WAYPOINT="routeZoomToWaypoint";Eniro.Events.CHANGE_ROUTE_DIRECTION="changeRouteDirection";Eniro.Events.MENU_TAB_OPENED="menuTabOpened";Eniro.Events.OPEN_MENU_TAB="openMenuTab";Eniro.Events.ACTIVATE_TOOL="activateTool";Eniro.Events.DISABLE_TOOL="disableTool";Eniro.Events.ENABLE_TOOL="enableTool";Eniro.Events.TOOL_TOGGLED="toolToggled";Eniro.Events.ADD_MENU_ITEM="addMenuItem";Eniro.Events.REMOVE_MENU_ITEM="removeMenuItem";Eniro.Events.MOUSE_OVER_MENU_ITEM="mouseOverMenuItem";Eniro.Events.MOUSE_OUT_MENU_ITEM="mouseOutMenuItem";Eniro.Events.MOUSE_CLICK_MENU_ITEM="mouseClickMenuItem";Eniro.Events.CONVERT_MARKER="convertMarker";Eniro.Events.SEARCH_RESULT_AVAILABLE="searchResultAvailable";Eniro.Events.SEARCH_UPDATED="searchUpdated";Eniro.Events.SEARCH_DO="searchDo";Eniro.Events.SEARCH_REDO="searchRedo";Eniro.Events.SEARCH_CLEAR="searchClear";Eniro.Events.SEARCH_FORM_IN_SINGLE_HIT_MODE="searchFormInSingleHitMode";Eniro.Events.MAP_TYPES_UPDATE="mapTypesUpdate";Eniro.Events.SET_SEARCH_FIELDS="setSearchFields";Eniro.Events.SEARCH_RESTORE="searchRestore";Eniro.Events.SEARCH_SET_PREDEFINED_STATUS="searchSetPredefinedStatus";Eniro.Events.HISTORY_SAVE="historySave";Eniro.Events.HISTORY_BACK="historyBack";Eniro.Events.HISTORY_BACK_TO_SEARCH_RESULT="historyBackToSearchResult";Eniro.Events.HISTORY_FORWARD="historyForward";Eniro.Events.HISTORY_RESET="historyReset";Eniro.Events.SEARCH_SELECT_ITEM="searchSelectItem";Eniro.Events.POI_LAYER_ACTIVATE="poiLayerActivate";Eniro.Events.POI_LAYER_DEACTIVATE="poiLayerDeactivate";Eniro.Events.POI_LAYER_MOUSE_CLICK="poiLayerMouseClick";Eniro.Events.POI_LAYER_MOUSE_OVER="poiLayerMouseOver";Eniro.Events.POI_CLICK="poiClick";Eniro.Events.POI_CLUSTER_CLICK="poiClusterClick";Eniro.Events.POI_POPUP_CLOSE="poiPopupClose";Eniro.Events.POI_POPUP_ZOOM="poiPopupZoom";Eniro.Events.POI_DATASTORE_SUCCESS="poiDatastoreSuccess";Eniro.Events.POI_DATASTORE_FAILURE="poiDatastoreFailure";Eniro.Events.POI_DATASTORE_REGION="poiDatastoreRegion";Eniro.Events.ROUTE_DESCRIPTION_ITEM_MOUSE_OVER="routeDescriptionItemMouseOver";Eniro.Events.ROUTE_DESCRIPTION_ITEM_MOUSE_OUT="routeDescriptionItemMouseOut";Eniro.Events.ROUTE_DESCRIPTION_ITEM_CLICK="routeDescriptionItemClick";Eniro.Events.ROUTE_POPUP_INSTRUCTION_PREV="routePopupInstructionPrev";Eniro.Events.ROUTE_POPUP_INSTRUCTION_NEXT="routePopupInstructionNext";Eniro.Events.ROUTE_POPUP_CLOSE="routePopupClose";Eniro.Events.DRAW_DISTANCE_START="drawDistanceStart";Eniro.Events.DRAW_CONTROL_ACTIVATED="drawControlActivated";Eniro.Events.DRAW_DISTANCE_END="drawDistanceEnd";Eniro.Events.STREETVIEW_UPDATE="streetViewUpdate";Eniro.Events.STREETVIEW_FLASH_START="streetViewScripting";Eniro.Events.STREETVIEW_FLASH_FAILED="streetViewFailed";Eniro.Events.STREETVIEW_FLASH_LOADED="streetViewLoaded";Eniro.Events.STREETVIEW_FLASH_DIRECTION="streetViewDirection";Eniro.Events.STREETVIEW_FLASH_NAVIGATE="streetViewNavigate";Eniro.Events.STREETVIEW_FLASH_CURSOR="streetViewCursor";Eniro.Events.STREETVIEW_LIST_SELECT="streetViewListSelect";Eniro.Events.STREETVIEW_FLASH_ADDED_TO_DOM="streetViewFlashAddedToDom";Eniro.Events.OBLIQUE_ACTIVATING="onObliqueActivating";Eniro.Events.OBLIQUE_DEACTIVATING="onObliqueDeactivating";Eniro.Events.OBLIQUE_UPDATE="onObliqueUpdate";Eniro.Events.OBLIQUE_LIST_SELECT="onObliqueListSelect";Eniro.Events.OBLIQUE_ORIENTATION_SWITCH="onObliqueOrientationSwitch";Eniro.Events.OBLIQUE_MISSING="onObliqueMissing";Eniro.Events.OBLIQUE_COPYRIGHT="onObliqueCopyright";Eniro.Events.OBLIQUE_ORIENTATION_MOUSEOVER="onObliqueOrientationMouseOver";Eniro.Events.OBLIQUE_ORIENTATION_MOUSEOUT="onObliqueOrientationMouseOut";Eniro.Events.OBLIQUE_INITIALISING="onObliqueInitialising";Eniro.Events.OBLIQUE_IMAGE_CHANGING="onObliqueImageChanging";Eniro.Events.OBLIQUE_LAYER_UPDATED="onObliqueLayerUpdated";Eniro.Events.PROGRESS_SHOW="progressShow";Eniro.Events.PROGRESS_HIDE="progressHide";Eniro.Events.POPUP_OPENING="onPopupOpening";Eniro.Events.POPUP_OPENED="onPopupOpened";Eniro.Events.POPUP_CLOSING="onPopupClosing";Eniro.Events.POPUP_CLOSED="onPopupClosed";Eniro.Events.OPEN_PRINT_PAGE="onPrint";Eniro.Events.STATISTICS_LOG="statisticsLog";Eniro.Events.PARTNER_SET="partnerSet";Eniro.Events.AD_CONTEXT_SET="adContextSet";Eniro.Events.AD_DIMENSION_CHANGED="adDimensionChanged";Eniro.Events.SPONSOR_AD_ACTIVATE="sponsorBannerActivate";Eniro.Events.EVENT_TYPES=[];for(var i in Eniro.Events)i!=="EVENT_TYPES"&&Eniro.Events.EVENT_TYPES.push(Eniro.Events[i]);if(OpenLayers.Events)Eniro.AppEvents=new OpenLayers.Events(window,null,Eniro.Events.EVENT_TYPES);Eniro.Crypto={crc32Table:[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],toUnsigned32:function(a){return a<0?4294967296+a:a},crc32:function(a){var b,c=4294967295,d=a.length;for(b=0;b<d;b++)c=Eniro.Crypto.toUnsigned32(Eniro.Crypto.crc32Table[Eniro.Crypto.toUnsigned32(c^a.charCodeAt(b))&255]^c>>8&16777215);return Eniro.Crypto.toUnsigned32(c^4294967295)}};Eniro.Control=OpenLayers.Class(OpenLayers.Control,{CSS_CLASS_NAME:undefined,ignoreHandlers:true,allowSelection:true,isActivated:false,cssClasses:{},elements:{},initialize:function(){this.cssClasses={};this.elements={};if(!this.id)this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME.replace(/\./,"")+"_");OpenLayers.Control.prototype.initialize.apply(this,arguments)},getCssClassName:function(a,b,c){return Eniro.Util.getCssClassName(this,a,b,c)},getSingleCssClassName:function(a,b,c){return Eniro.Util.getSingleCssClassName(this,a,b,c)},destroy:function(){if(this.elements){for(var a in this.elements)if(this.elements.hasOwnProperty(a)){this.elements[a]=null;delete this.elements[a]}this.elements=null}if(this.cssClasses)this.cssClasses=null;if(this.div){OpenLayers.Event.stopObservingElement(this.div);this.div.innerHTML=""}this.divEvents&&this.divEvents.destroy();OpenLayers.Control.prototype.destroy.apply(this,arguments)},observe:function(a,b,c){OpenLayers.Event.observe(a,b,OpenLayers.Function.bindAsEventListener(c,this))},triggerEvent:function(a,b){Eniro.AppEvents.triggerEvent(a,b)},on:function(a){Eniro.AppEvents.on(a)},register:function(a,b){Eniro.AppEvents.register(a,this,b)},unregister:function(a,b){Eniro.AppEvents.unregister(a,this,b)},un:function(a){Eniro.AppEvents.un(a)},draw:function(a){if(!this.div)this.div=Eniro.Util.createDiv(this.id,this.displayClass,this.title,!this.allowSelection);if(a)this.position=a.clone();this.position&&this.moveTo(this.position);this.ignoreHandlers&&this.div&&jQuery(this.div).addClass("olEniroIgnoreHandlers");return this.div},toString:function(){return this.CLASS_NAME+":"+this.id},i18n:function(a,b){this.i18nExclude||(a=this.CLASS_NAME.dash()+"."+a);if(this.parent)return this.parent.i18n(a,b);return OpenLayers.i18n(a.replace(/\.-/g,".").replace(/^eniro-|^eniro\.|\beniro-|\beniro\./g,""),b)},stopEvent:function(a){this.warn("Deprecated method. Use OpenLayers.Event#stop instead.");OpenLayers.Event.stop(a)},assignElements:function(a){var b,c,d,e=[];if(a)e=typeof a==="string"?[a]:a;else for(c in this.cssClasses)this.cssClasses.hasOwnProperty(c)&&e.push(c);var f;for(c=0,d=e.length;c<d;++c){f=e[c];b=this.cssClasses[f].split(" ");this.elements[f]=jQuery(this.div).find("."+b[b.length-1]).get();if(this.elements[f].length===1)this.elements[f]=this.elements[f][0]}},registerObservers:function(){this.ignoreHandlers&&this.div&&this.observe(this.div,"keydown",this.onKeyDown)},activate:function(){if(!this.isActivated){this.assignElements();this.ignoreHandlers&&this.div&&jQuery(this.div).addClass("olEniroIgnoreHandlers");this.registerObservers();this.isActivated=true}return OpenLayers.Control.prototype.activate.apply(this,arguments)},deactivate:function(){delete this.elements;this.div&&OpenLayers.Event.stopObservingElement(this.div);return OpenLayers.Control.prototype.deactivate.apply(this,arguments)},log:function(){var a=Array.prototype.slice.call(arguments);OpenLayers.Console.log.apply(OpenLayers.Console,[this.toString()].concat(a))},onKeyDown:function(a){switch(a.keyCode){case OpenLayers.Event.KEY_LEFT:OpenLayers.Event.stop(a,true);break;case OpenLayers.Event.KEY_RIGHT:OpenLayers.Event.stop(a,true);break;case 38:OpenLayers.Event.stop(a,true);break;case 40:OpenLayers.Event.stop(a,true);break;case 33:OpenLayers.Event.stop(a,true);break;case 34:OpenLayers.Event.stop(a,true);break;case 35:OpenLayers.Event.stop(a,true);break;case 36:OpenLayers.Event.stop(a,true);break;case 107:OpenLayers.Event.stop(a,true);break;case 109:OpenLayers.Event.stop(a,true);break}},error:function(){var a=Array.prototype.slice.call(arguments);OpenLayers.Console.error.apply(OpenLayers.Console,[this.toString()].concat(a))},debug:function(){var a=Array.prototype.slice.call(arguments);OpenLayers.Console.debug.apply(OpenLayers.Console,[this.toString()].concat(a))},warn:function(){var a=Array.prototype.slice.call(arguments);OpenLayers.Console.warn.apply(OpenLayers.Console,[this.toString()].concat(a))},createDiv:function(a,b,c,d){return Eniro.Util.createDiv(a,this.getCssClassName(b),c,d)},find:function(a){OpenLayers.Console.warn("Deprecated method. Use jQuery directly instead.");return jQuery(this.div).find(a)[0]},findAll:function(a){OpenLayers.Console.warn("Deprecated method. Use jQuery directly instead.");return jQuery(this.div).find(a)},insertBefore:function(a,b){OpenLayers.Console.warn("Deprecated method. Use jQuery directly instead.");jQuery(a).insertBefore(b)},insertAfter:function(a,b){OpenLayers.Console.warn("Deprecated method. Use jQuery directly instead.");jQuery(a).insertAfter(b)},closest:function(a,b){OpenLayers.Console.warn("Deprecated method. Use jQuery directly instead.");return jQuery(a).closest(b)[0]},toggleClass:function(a,b){OpenLayers.Console.warn("Deprecated method. Use jQuery directly instead.");jQuery(a).toggleClass(b)},addClass:function(a,b){OpenLayers.Console.warn("Deprecated method. Use jQuery directly instead.");jQuery(a).addClass(b)},removeClass:function(a,b){OpenLayers.Console.warn("Deprecated method. Use jQuery directly instead.");jQuery(a).removeClass(b)},remove:function(a){OpenLayers.Console.warn("Deprecated method. Use jQuery directly instead.");jQuery(a).remove()},findMatchingClass:function(a,b){OpenLayers.Console.warn("Deprecated method. Use jQuery directly instead.");return jQuery.grep(a.className.split(" "),function(c){return c.match(b)?c:null})[0]},CLASS_NAME:"Eniro.Control"});Eniro.EventLogger=OpenLayers.Class(Eniro.Control,{logEvents:Eniro.Events.EVENT_TYPES,initialize:function(a){if(a)if(typeof a==="string")this.logEvents=[a];else if(Eniro.Util.isArray(a))this.logEvents=a;for(var b=0,c=this.logEvents.length;b<c;b++)this.register(this.logEvents[b],this.dump(this.logEvents[b]))},dump:function(a){return function(b){OpenLayers.Console.log("eventName "+a,", eventArg: ",b)}},draw:function(){return null},CLASS_NAME:"Eniro.EventLogger"});Eniro.ScaleLine=OpenLayers.Class(OpenLayers.Control.ScaleLine,{maxWidth:200,bottomOutUnits:"",bottomInUnits:"",initialize:function(){OpenLayers.Control.ScaleLine.prototype.initialize.apply(this,arguments)},destroy:function(){this.map.events.unregister("changebaselayer",this,this.onChangeBaseLayer);OpenLayers.Control.ScaleLine.prototype.initialize.apply(this,arguments)},setMap:function(){OpenLayers.Control.ScaleLine.prototype.setMap.apply(this,arguments);this.map.events.register("changebaselayer",this,this.onChangeBaseLayer)},onChangeBaseLayer:function(a){a.layer&&(a.layer.layername==="streetview"||a.layer.layername==="oblique")?jQuery(this.div).hide():jQuery(this.div).show()},getResolution:function(a,b){return this.map.maxResolution*Math.cos(b*(Math.PI/180))/Math.pow(2,a)},draw:function(){this.div=null;OpenLayers.Control.ScaleLine.prototype.draw.apply(this,arguments)},update:function(){var a=this.map.getZoom(),b=this.map.getCenter();if(a&&b){b=b.transform(this.map.projection,this.map.backendProjection);var c=this.getResolution(a,b.lat);if(c){var d=this.map.getUnits(),e=OpenLayers.INCHES_PER_UNIT,f=this.maxWidth*c*e[d],g,j;if(f>1E5){g=this.topOutUnits;j=this.bottomOutUnits}else{g=this.topInUnits;j=this.bottomInUnits}var h=f/e[g],k=f/e[j],l=this.getBarLen(h),m=this.getBarLen(k);h=l/e[d]*e[g];k=m/e[d]*e[j];var q=h/c,o=k/c;if(this.eBottom.style.visibility=="visible"){this.eBottom.style.width=Math.round(o)+"px";this.eBottom.innerHTML=m+" "+j}if(this.eTop.style.visibility=="visible"){this.eTop.style.width=Math.round(q)+"px";this.eTop.innerHTML=l+" "+g}}}},CLASS_NAME:"Eniro.ScaleLine"});Eniro.Config={"media.version":"18.0.6","tile.version":"20100330","appnode.url":"http://map.eniro.com","oblique.data.url":"http://map01.eniro.com/oblique-data","appnode.alias":"http://map01.eniro.com, http://map02.eniro.com, http://map03.eniro.com, http://map04.eniro.com"};Eniro.Control.FeatureEventDispatcher=OpenLayers.Class(OpenLayers.Control,{isStart:true,initialize:function(a,b){OpenLayers.Control.prototype.initialize.apply(this,[b]);this.layer=a;this.dragCallbacks={down:this.downFeature,move:this.moveFeature,up:this.upFeature,out:this.cancel,done:this.doneDragging};this.selectCallbacks={click:this.clickFeature,clickout:this.clickoutFeature,over:this.overFeature,out:this.outFeature};this.handlers={drag:new OpenLayers.Handler.Drag(this,this.dragCallbacks),feature:new OpenLayers.Handler.Feature(this,this.layer,this.selectCallbacks)}},destroy:function(){this.feature=this.layer=null;this.dragging=false;this.lastPixel=null;for(var a in this.dragCallbacks)if(this.dragCallbacks.hasOwnProperty(a))this.dragCallbacks[a]=null;for(var b in this.selectCallbacks)if(this.selectCallbacks.hasOwnProperty(b))this.selectCallbacks[b]=null;OpenLayers.Control.prototype.destroy.apply(this,arguments)},setMap:function(a){OpenLayers.Control.prototype.setMap.apply(this,arguments);this.handlers.feature.setMap(a);this.handlers.drag.setMap(a)},activate:function(){return this.handlers.feature.activate()&&OpenLayers.Control.prototype.activate.apply(this,arguments)},deactivate:function(){this.feature=null;this.dragging=false;this.lastPixel=null;return OpenLayers.Control.prototype.deactivate.apply(this,arguments)},clickFeature:function(a){this.dispatchEvent(a,"click")},clickoutFeature:function(a){this.dispatchEvent(a,"clickout")},overFeature:function(a){if(a.draggable)if(this.handlers.drag.dragging)this.over=this.feature.id==a.id?true:false;else{this.feature=a;this.handlers.drag.activate();this.over=true;this.map.div.style.cursor="move"}else this.map.div.style.cursor="pointer";this.dispatchEvent(a,"mouseover")},outFeature:function(a){if(a.draggable)if(this.handlers.drag.dragging){if(this.feature.id==a.id)this.over=false}else{this.over=false;this.handlers.drag.deactivate();this.feature=null}this.map.div.style.cursor="default";this.dispatchEvent(a,"mouseout")},downFeature:function(a){this.lastPixel=a},moveFeature:function(a){var b=this.map.getResolution();this.feature.geometry.move(b*(a.x-this.lastPixel.x),b*(this.lastPixel.y-a.y));this.layer.drawFeature(this.feature);this.lastPixel=a;if(this.isStart){this.dispatchEvent(this.feature,"dragstart",{pixel:a});this.isStart=false}else this.dispatchEvent(this.feature,"dragmove",{pixel:a})},upFeature:function(){this.isStart=true},doneDragging:function(a){this.dispatchEvent(this.feature,"dragend",{pixel:a})},cancel:function(){this.handlers.drag.deactivate();this.over=false},dispatchEvent:function(a,b,c){if(a.events){var d={type:b,feature:a,dispatcher:this};OpenLayers.Util.extend(d,c);a.events.triggerEvent(b,d)}},CLASS_NAME:"Eniro.Control.FeatureEventDispatcher"});Eniro.Popup=OpenLayers.Class(OpenLayers.Popup.Framed,{contentDisplayClass:"olFramedCloudPopupContent olEniroIgnoreHandlers",autoSize:true,panMapIfOutOfView:false,imageSize:new OpenLayers.Size(700,912),isAlphaImage:true,fixedRelativePosition:false,minSize:new OpenLayers.Size(46,66),maxSize:new OpenLayers.Size(600,500),lineWrapLength:100,positionBlocks:{tl:{offset:new OpenLayers.Pixel(0,14),padding:new OpenLayers.Bounds(14,16,30,11),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,16,36,0),position:new OpenLayers.Pixel(-22,0)},{size:new OpenLayers.Size(14,"auto"),anchor:new OpenLayers.Bounds(null,48,22,null),position:new OpenLayers.Pixel(-22,0)},{size:new OpenLayers.Size("auto",16),anchor:new OpenLayers.Bounds(0,0,36,null),position:new OpenLayers.Pixel(-22,-255)},{size:new OpenLayers.Size(36,48),anchor:new OpenLayers.Bounds(null,0,0,null),position:new OpenLayers.Pixel(0,-131)}]},tr:{offset:new OpenLayers.Pixel(0,14),padding:new OpenLayers.Bounds(36,16,8,11),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,48,14,0),position:new OpenLayers.Pixel(-1,0)},{size:new OpenLayers.Size(14,"auto"),anchor:new OpenLayers.Bounds(null,16,0,null),position:new OpenLayers.Pixel(-22,0)},{size:new OpenLayers.Size("auto",48),anchor:new OpenLayers.Bounds(0,0,14,null),position:new OpenLayers.Pixel(-1,-193)},{size:new OpenLayers.Size(14,16),anchor:new OpenLayers.Bounds(null,0,0,null),position:new OpenLayers.Pixel(-22,-255)}]},bl:{offset:new OpenLayers.Pixel(0,-36),padding:new OpenLayers.Bounds(14,16,30,11),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,16,36,0),position:new OpenLayers.Pixel(-22,0)},{size:new OpenLayers.Size(36,48),anchor:new OpenLayers.Bounds(null,null,0,0),position:new OpenLayers.Pixel(0,-863)},{size:new OpenLayers.Size("auto",16),anchor:new OpenLayers.Bounds(0,0,36,null),position:new OpenLayers.Pixel(-22,-255)},{size:new OpenLayers.Size(14,"auto"),anchor:new OpenLayers.Bounds(null,0,22,48),position:new OpenLayers.Pixel(-22,-255)}]},br:{offset:new OpenLayers.Pixel(0,-36),padding:new OpenLayers.Bounds(36,16,8,11),blocks:[{size:new OpenLayers.Size("auto",48),anchor:new OpenLayers.Bounds(0,null,14,0),position:new OpenLayers.Pixel(-1,-794)},{size:new OpenLayers.Size(14,"auto"),anchor:new OpenLayers.Bounds(null,16,0,null),position:new OpenLayers.Pixel(-22,0)},{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,0,14,48),position:new OpenLayers.Pixel(-1,-255)},{size:new OpenLayers.Size(14,16),anchor:new OpenLayers.Bounds(null,0,0,null),position:new OpenLayers.Pixel(-22,-255)}]}},initialize:function(a,b){b=b||{};var c=a.attributes.source;this.resultType=b.resultType?b.resultType:c&&Eniro.Profile.providers[c]&&Eniro.Profile.providers[c].popup?Eniro.Profile.providers[a.attributes.source].popup:c&&Eniro.Profile.providers[c]&&Eniro.Profile.providers[c].icon?Eniro.Profile.providers[a.attributes.source].icon:"draw";this.imageSrc=Eniro.Util.getImagesLocation()+"popup/"+this.resultType+"-popup.png?v="+Eniro.Config["media.version"];if(!a.attributes.id)a.attributes.id=OpenLayers.Util.createUniqueID("");var d=[this.CLASS_NAME+"_"+a.attributes.id,a.geometry.getBounds().getCenterLonLat(),b.contentSize||null,a.getPopupContents(),{offset:b.offset||new OpenLayers.Pixel(2,-7),size:b.size||new OpenLayers.Size(0,0)},true,OpenLayers.Function.bind(a.onPopupCloseButton,a)];OpenLayers.Popup.Framed.prototype.initialize.apply(this,d);this.events.register("mouseover",this,this.onmouseover);this.contentDiv.className=this.contentDisplayClass;this.parent=a},onclick:function(a){var b=OpenLayers.Event.element(a);if(jQuery(b).hasClass("eniro-popup-title")){OpenLayers.Event.stop(a);Eniro.AppEvents.triggerEvent(Eniro.Events.SEARCH_SELECT_ITEM,{id:this.parent.fid||jQuery(b).attr("id"),provider:this.parent.attributes.source||null})}else if(this.parent.onClick(a)){this.onmouseout();OpenLayers.Popup.Framed.prototype.onclick.apply(this,arguments);OpenLayers.Event.stop(a)}},onmouseover:function(){this.stuck=true;this.parent.onMouseOver()},onmouseout:function(a){OpenLayers.Popup.Framed.prototype.onmouseout.apply(this,arguments);if(Eniro.Util.mouseLeft(a,this.div)){this.stuck=false;this.parent.onMouseOut()}},addCloseBox:function(a){this.closeDiv=OpenLayers.Util.createDiv(this.id+"_close",null,new OpenLayers.Size(14,13));this.closeDiv.className="olPopupCloseBox";var b=this.getContentDivPadding();this.closeDiv.style.right=b.right+"px";this.closeDiv.style.top=b.top+"px";this.groupDiv.appendChild(this.closeDiv);var c=a||function(d){this.hide();OpenLayers.Event.stop(d)};OpenLayers.Event.observe(this.closeDiv,"click",OpenLayers.Function.bindAsEventListener(c,this))},updateSize:function(){var a="<div class='"+this.contentDisplayClass+"'>"+this.contentDiv.innerHTML+"</div>",b=this.map?this.map.viewPortDiv:document.body,c=OpenLayers.Util.getRenderedDimensions(a,null,{displayClass:this.displayClass,containerElement:b}),d=this.getSafeContentSize(c),e=null;if(d.equals(c))e=c;else{var f=new OpenLayers.Size;f.w=d.w<c.w?d.w:null;f.h=d.h<c.h?d.h:null;if(f.w&&f.h)e=d;else{var g=OpenLayers.Util.getRenderedDimensions(a,f,{displayClass:this.displayClass,containerElement:b}),j=OpenLayers.Element.getStyle(this.contentDiv,"overflow");if(j!="hidden"&&g.equals(d)){var h=OpenLayers.Util.getScrollbarWidth();if(f.w)g.h+=h;else g.w+=h}e=this.getSafeContentSize(g)}}if(jQuery.browser.msie&&parseInt(jQuery.browser.version,10)<7){if(e.w%2===0)e.w+=1;if(e.h%2===0)e.h+=1}this.setSize(e)},setSize:function(){OpenLayers.Popup.Framed.prototype.setSize.apply(this,arguments);this.groupDiv.style.height=this.div.style.height},updateBlocks:function(){this.blocks||this.createBlocks();if(this.size&&this.relativePosition){for(var a=this.positionBlocks[this.relativePosition],b=0;b<a.blocks.length;b++){var c=a.blocks[b],d=this.blocks[b],e=c.anchor.left,f=c.anchor.bottom,g=c.anchor.right,j=c.anchor.top,h=isNaN(c.size.w)?this.size.w-(g+e):c.size.w,k=isNaN(c.size.h)?this.size.h-(f+j):c.size.h;d.div.style.width=(h<0?0:h)+"px";d.div.style.height=(k<0?0:k)+"px";d.div.style.left=e!==null?e+"px":"";d.div.style.bottom=f!==null?f+"px":"";d.div.style.right=g!==null?g+"px":"";d.div.style.top=j!==null?j+"px":"";var l="left",m="top";if(b===2||b===3)m="bottom";if(b===1||b===3)l="right";d.image.style[l]=c.position.x+"px";d.image.style[m]=c.position.y+"px"}this.contentDiv.style.left=this.padding.left+"px";this.contentDiv.style.top=this.padding.top+"px"}},CLASS_NAME:"Eniro.Popup"});Eniro.HeadingPopup=OpenLayers.Class(Eniro.Popup,{heading:null,minSize:new OpenLayers.Size(350,200),feature:null,initialize:function(a,b){this.positionBlocks={tl:{offset:new OpenLayers.Pixel(0,10),padding:new OpenLayers.Bounds(14,15,29,11),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,15,35,0),position:new OpenLayers.Pixel(-21,0)},{size:new OpenLayers.Size(14,"auto"),anchor:new OpenLayers.Bounds(null,49,21,null),position:new OpenLayers.Pixel(-21,0)},{size:new OpenLayers.Size("auto",15),anchor:new OpenLayers.Bounds(0,0,35,null),position:new OpenLayers.Pixel(-21,-255)},{size:new OpenLayers.Size(35,49),anchor:new OpenLayers.Bounds(null,0,0,null),position:new OpenLayers.Pixel(0,-131)}]},tr:{offset:new OpenLayers.Pixel(0,10),padding:new OpenLayers.Bounds(35,15,8,11),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,49,14,0),position:new OpenLayers.Pixel(-1,0)},{size:new OpenLayers.Size(14,"auto"),anchor:new OpenLayers.Bounds(null,15,0,null),position:new OpenLayers.Pixel(-21,0)},{size:new OpenLayers.Size("auto",49),anchor:new OpenLayers.Bounds(0,0,14,null),position:new OpenLayers.Pixel(-1,-193)},{size:new OpenLayers.Size(14,15),anchor:new OpenLayers.Bounds(null,0,0,null),position:new OpenLayers.Pixel(-21,-255)}]},bl:{offset:new OpenLayers.Pixel(0,-40),padding:new OpenLayers.Bounds(14,15,29,11),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,15,35,0),position:new OpenLayers.Pixel(-21,0)},{size:new OpenLayers.Size(35,49),anchor:new OpenLayers.Bounds(null,null,0,0),position:new OpenLayers.Pixel(0,-863)},{size:new OpenLayers.Size("auto",15),anchor:new OpenLayers.Bounds(0,0,35,null),position:new OpenLayers.Pixel(-21,-255)},{size:new OpenLayers.Size(14,"auto"),anchor:new OpenLayers.Bounds(null,0,21,49),position:new OpenLayers.Pixel(-21,-255)}]},br:{offset:new OpenLayers.Pixel(0,-40),padding:new OpenLayers.Bounds(35,15,8,11),blocks:[{size:new OpenLayers.Size("auto",49),anchor:new OpenLayers.Bounds(0,null,14,0),position:new OpenLayers.Pixel(-1,-794)},{size:new OpenLayers.Size(14,"auto"),anchor:new OpenLayers.Bounds(null,15,0,null),position:new OpenLayers.Pixel(-21,0)},{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,0,14,49),position:new OpenLayers.Pixel(-1,-255)},{size:new OpenLayers.Size(14,15),anchor:new OpenLayers.Bounds(null,0,0,null),position:new OpenLayers.Pixel(-21,-255)}]}};this.feature=a;Eniro.Popup.prototype.initialize.apply(this,arguments);this.heading=b.heading;this.headingSize=OpenLayers.Util.getRenderedDimensions(this.heading,null,{displayClass:Eniro.Control.prototype.getCssClassName.apply(this,["header"])});var c=this.positionBlocks.tl.padding;this.positionBlocks.tl.padding=new OpenLayers.Bounds(c.left,c.bottom,c.right,c.top+this.headingSize.h);c=this.positionBlocks.tr.padding;this.positionBlocks.tr.padding=new OpenLayers.Bounds(c.left,c.bottom,c.right,c.top+this.headingSize.h);c=this.positionBlocks.bl.padding;this.positionBlocks.bl.padding=new OpenLayers.Bounds(c.left,c.bottom,c.right,c.top+this.headingSize.h);c=this.positionBlocks.br.padding;this.positionBlocks.br.padding=new OpenLayers.Bounds(c.left,c.bottom,c.right,c.top+this.headingSize.h);jQuery(this.contentDiv).click(function(d){var e=d.target.id;if(!e||e.length===0)e=d.target.parentNode.id;if(e!==null){var f=e.indexOf("_popupResultItem");if(f>0){var g=e.substring(0,f);OpenLayers.Event.stop(d);Eniro.AppEvents.triggerEvent(Eniro.Events.SEARCH_SELECT_ITEM,{id:g,provider:a.provider})}}})},setSize:function(a){var b=this.positionBlocks.tl.padding;a.w=Math.max(a.w,b.left+this.headingSize.w);Eniro.Popup.prototype.setSize.apply(this,arguments)},updateBlocks:function(){Eniro.Popup.prototype.updateBlocks.apply(this,arguments);var a=Eniro.Control.prototype.getCssClassName.apply(this,["header"]);if(!this.headingDiv){this.headingDiv=jQuery("<div></div>").addClass(a).html(this.heading).css({position:"absolute",top:this.positionBlocks[this.relativePosition].padding.top-this.headingSize.h,left:this.positionBlocks[this.relativePosition].padding.left}).get(0);jQuery(this.groupDiv).append(this.headingDiv)}},addCloseBox:function(){Eniro.Popup.prototype.addCloseBox.apply(this,arguments)},updateRelativePosition:function(){Eniro.Popup.prototype.updateRelativePosition.apply(this,arguments)},CLASS_NAME:"Eniro.HeadingPopup"});Eniro.Feature.Vector=OpenLayers.Class(OpenLayers.Feature.Vector,{draggable:false,style:null,EVENT_TYPES:["mouseover","mouseout","click","clickout","dragstart","dragmove","dragend"],initialize:function(a,b,c){OpenLayers.Util.extend(this,c||{});if(a instanceof OpenLayers.LonLat)a=new OpenLayers.Geometry.Point(a.lon,a.lat);if(!this.style){var d=this.defaultStyle||"blue";this.style={externalGraphic:Eniro.Util.getImagesLocation()+"markers/draw/"+d+".png",graphic:true,graphicZIndex:9001,graphicWidth:32,graphicHeight:35,graphicYOffset:-35,graphicXOffset:-9,pointRadius:0}}for(var e=["externalGraphic","backgroundGraphic"],f,g=0,j=e.length;g<j;++g)if((f=this.style[e[g]])&&!/^http:\/\//.test(f))this.style[e[g]]+="?v="+Eniro.Config["media.version"];OpenLayers.Feature.Vector.prototype.initialize.apply(this,[a,b,this.style]);this.events=new OpenLayers.Events(this,null,this.EVENT_TYPES)},setVisible:function(a){this.style.display=a?"":"none";this.geometry&&this.move(new OpenLayers.LonLat(this.geometry.x,this.geometry.y))},toggle:function(){this.setVisible(this.style.display==="none")},show:function(){this.setVisible(true)},hide:function(){this.setVisible(false)},CLASS_NAME:"Eniro.Feature.Vector"});Eniro.Feature.PopupFeature=OpenLayers.Class(Eniro.Feature.Vector,{popupContents:null,popupClass:Eniro.Popup,popupOptions:{},openOnMouseOver:true,mouseoverDelay:500,popup:null,timer:null,stuck:false,initialize:function(){Eniro.Feature.Vector.prototype.initialize.apply(this,arguments);this.constructorArgs=arguments;this.events.on({mouseover:this.onMouseOver,mouseout:this.onMouseOut,click:this.onClick})},destroy:function(){if(this.openTimer!==null){clearTimeout(this.openTimer);this.openTimer=null}if(this.closeTimer!==null){clearTimeout(this.closeTimer);this.closeTimer=null}this.closePopup();Eniro.Feature.Vector.prototype.destroy.apply(this,arguments)},onMouseOver:function(){if(this.openOnMouseOver&&!this.stuck){if(this.openTimer!==null){clearTimeout(this.openTimer);this.openTimer=null}if(this.closeTimer!==null){clearTimeout(this.closeTimer);this.closeTimer=null}if(this.popup===null)this.openTimer=setTimeout(OpenLayers.Function.bind(this.openPopup,this),this.mouseoverDelay)}},onMouseOut:function(){if(this.openTimer!==null){clearTimeout(this.openTimer);this.openTimer=null}if(this.openOnMouseOver&&!this.stuck)this.closeTimer=setTimeout(OpenLayers.Function.bind(this.closePopup,this),500)},onClick:function(){if(this.openTimer!==null){clearTimeout(this.openTimer);this.openTimer=null}if(this.closeTimer!==null){clearTimeout(this.closeTimer);this.closeTimer=null}this.stuck=true;this.openPopup()},onPopupCloseButton:function(a){OpenLayers.Event.stop(a);this.closePopup();return this.stuck=false},openPopup:function(){if(this.popup===null&&this.popupContents!==null){var a={};OpenLayers.Util.extend(a,this.popupOptions);if(!this.stuck)a.panMapIfOutOfView=false;this.popup=new this.popupClass(this,a);Eniro.AppEvents.triggerEvent(Eniro.Events.POPUP_OPENING,{feature:this,popup:this.popup});this.layer.map.addPopup(this.popup);Eniro.AppEvents.triggerEvent(Eniro.Events.POPUP_OPENED,{feature:this,popup:this.popup})}else this.popup!==null&&this.popup.show()},closePopup:function(){if(this.popup!==null){Eniro.AppEvents.triggerEvent(Eniro.Events.POPUP_CLOSING,{feature:this,popup:this.popup});this.popup.map.removePopup(this.popup);Eniro.AppEvents.triggerEvent(Eniro.Events.POPUP_CLOSED,{feature:this,popup:this.popup});this.popup.destroy();this.popup=null}},getPopupContents:function(){if(this.popupContents!==null){if(typeof this.popupContents=="string")return OpenLayers.String.format(this.popupContents,this.attributes);if(typeof this.popupContents=="function")return this.popupContents(this.attributes)}return null},getMarkerTitle:function(){return this.toString()},hide:function(){this.style.display="none";this.move(new OpenLayers.LonLat(this.geometry.x,this.geometry.y))},show:function(a){this.style.display="";a||(a=new OpenLayers.LonLat(this.geometry.x,this.geometry.y));this.move(a)},clone:function(){var a=Eniro.Util.reflect(this.CLASS_NAME,this.constructorArgs);a.layer=this.layer;a.json=this.json;return a},copyTo:function(){this.clone()},CLASS_NAME:"Eniro.Feature.PopupFeature"});Eniro.MetaGeoJSON=OpenLayers.Class(OpenLayers.Format.GeoJSON,{initialize:function(a){OpenLayers.Format.GeoJSON.prototype.initialize.apply(this,[a])},destroy:function(){OpenLayers.Format.GeoJSON.prototype.destroy.apply(this,arguments)},read:function(a){return{features:[],json:a}},CLASS_NAME:"Eniro.MetaGeoJSON"});Eniro.Tile=Eniro.Tile||{};Eniro.Tile.SearchTile=OpenLayers.Class(OpenLayers.Tile.WFS,{overrideCallback:null,search:null,initialize:function(a,b,c,d,e,f,g,j){OpenLayers.Tile.WFS.prototype.initialize.apply(this,[a,b,c,d,e]);this.overrideCallback=f;this.search=g;this.firstSearch=j},requestSuccess:function(a){if(this.features){var b=this.buildResult(a);this.layer.firstSearch=false;if(this.overrideCallback)this.overrideCallback(b);else if(b.json.maptypes){var c={maptypes:b.json.maptypes};Eniro.AppEvents.triggerEvent(Eniro.Events.MAP_TYPES_UPDATE,c)}}this.events&&this.events.triggerEvent("loadend");this.request=null},draw:function(a){if(a||this.layer.doTileDraw())OpenLayers.Tile.WFS.prototype.draw.apply(this,[])},buildResult:function(a){var b;if(a){var c=a.responseXML;if(!c||!c.documentElement)c=a.responseText;b=this.layer.formatObject.read(c,this.layer)}else{b={};b.features=[];b.json={}}return{features:b.features,json:b.json,search:this.search,firstSearch:this.firstSearch}},CLASS_NAME:"Eniro.Tile.SearchTile"});Eniro.Layer.TMS=OpenLayers.Class(OpenLayers.Layer.TMS,{metaTileSize:3,tileVersion:null,buffer:0,initialize:function(a,b,c,d){this.tileVersion=d;this.layerId=a;return OpenLayers.Layer.TMS.prototype.initialize.apply(this,[OpenLayers.i18n("map.layers."+a),b,c])},getURL:function(){var a=OpenLayers.Layer.TMS.prototype.getURL.apply(this,arguments),b="",c=/.*\/([0-9]+)\/([0-9]+)\/([0-9]+)\.[a-z]+$/i.exec(a);if(c){var d=Math.floor(parseInt(c[2],10)/this.metaTileSize),e=Math.floor(parseInt(c[3],10)/this.metaTileSize);b="?c="+Eniro.Crypto.crc32(c[1]+"/"+d+"/"+e)}return a+b+(!(this.tileVersion===null||this.tileVersion===undefined)?"&v="+this.tileVersion:"")},CLASS_NAME:"Eniro.Layer.TMS"});Eniro.Layer.SearchLayer=OpenLayers.Class(OpenLayers.Layer.WFS,{ratio:1,queriesEnabled:true,destroyTransientFeaturesEnabled:true,firstSearch:false,rendererOptions:{zIndexing:true},previousMode:null,currentSearch:null,PARAMS_TO_SERVER:[{applies:function(){return true},filter:["BBOX","zoom"]},{applies:function(a){return a.mapTypesUpdate},filter:["BBOX","zoom"]}],initialize:function(a,b,c,d){var e={format:Eniro.MetaGeoJSON};this.url=b;OpenLayers.Util.extend(e,d);OpenLayers.Layer.WFS.prototype.initialize.apply(this,[a,b,c,e])},destroy:function(){if(this.projection){this.projection.destroy();this.projection=null}if(this.eventDispatcher){this.eventDispatcher.destroy();this.eventDispatcher=null}this.map&&this.map.events.unregister("movestart",this,this.onMoveStart);OpenLayers.Layer.WFS.prototype.destroy.apply(this,arguments)},onMoveStart:function(){if(this.params&&this.params.offset)this.params.offset=0},setMap:function(){OpenLayers.Layer.WFS.prototype.setMap.apply(this,arguments);this.eventDispatcher=new Eniro.Control.FeatureEventDispatcher(this);this.map.addControl(this.eventDispatcher);this.eventDispatcher.activate();this.map.events.register("movestart",this,this.onMoveStart)},destroyFeatures:function(a,b){var c=!a;if(c)a=this.features.concat([]);if(a){this.removeFeatures(a,b);for(var d=a.length-1;d>=0;d--)a[d].destroy()}},filterServerParams:function(a){a||(a={});var b=this.PARAMS_TO_SERVER[0].filter,c={};jQuery.extend(c,this.currentSearch);jQuery.extend(c,this.params);jQuery.extend(c,a);c._firstSearch=this.firstSearch;c._queriesEnabled=this.queriesEnabled;var d,e;for(d=1,e=this.PARAMS_TO_SERVER.length;d<e;d++)if(this.PARAMS_TO_SERVER[d].applies(c)){b=this.PARAMS_TO_SERVER[d].filter;break}var f=null;if(b.length){f={};for(d=0,e=b.length;d<e;d++){var g=b[d];if(a[g])f[g]=a[g]}}return f},mergeNewParams:function(a){var b=this.filterServerParams(a);return OpenLayers.Layer.HTTPRequest.prototype.mergeNewParams.apply(this,[b])},clearParams:function(){this.params={}},moveTo:function(a,b,c){OpenLayers.Layer.Vector.prototype.moveTo.apply(this,arguments);if(c)return false;if(this.options.minZoomLevel){OpenLayers.Console.warn(OpenLayers.i18n("minZoomLevelError"));if(this.map.getZoom()<this.options.minZoomLevel)return null}if(a===null)a=this.map.getExtent();var d=this.title===null||this.title===undefined,e=!d&&!this.tile.bounds.containsBounds(a);if(b||d||!c&&e){a=this.map.getAdjustedExtent();var f={};if(this.tile){this.removeTileMonitoringHooks(this.tile);this.tile.destroy();this.tile=null}this.tile=this.buildSearchTile(f,null);this.addTileMonitoringHooks(this.tile);this.tile.draw()}},buildSearchTile:function(a,b){var c={};jQuery.extend(c,a);var d=this.map.getAdjustedExtent(),e=d.getCenterLonLat(),f=d.getWidth()*this.ratio,g=d.getHeight()*this.ratio,j=new OpenLayers.Bounds(e.lon-f/2,e.lat-g/2,e.lon+f/2,e.lat+g/2),h=this.map.getAdjustedSize();h.w*=this.ratio;h.h*=this.ratio;var k=new OpenLayers.LonLat(j.left,j.top),l=this.map.getLayerPxFromLonLat(k),m=this.params,q=null,o=this.params.filter||this.params.FILTER;q=o?{FILTER:o}:{BBOX:this.encodeBBOX?j.toBBOX():j.toArray()};q.zoom=this.map.getZoom();if(this.map&&!this.projection.equals(this.map.getProjectionObject())){var p=j.clone();p.transform(this.map.getProjectionObject(),this.projection);if(!o)q.BBOX=this.encodeBBOX?p.toBBOX():p.toArray()}jQuery.extend(q,m);this.params=this.filterServerParams(q);var s=this.getFullRequestString();this.params=m;if(this.tile&&!b){this.removeTileMonitoringHooks(this.tile);this.tile.destroy();this.tile=null}return new Eniro.Tile.SearchTile(this,l,j,s,h,b,c,this.firstSearch)},refresh:function(){this.tile&&this.tile.draw()},doTileDraw:function(){return this.queriesEnabled},CLASS_NAME:"Eniro.Layer.SearchLayer"});Eniro.Layer.SearchLayer.STATE_KEY="searchLayer";Eniro.ObliqueTransformer=OpenLayers.Class({map:null,utmProjections:{"32":"EPSG:32632","33":"EPSG:32633","34":"EPSG:32634","35":"EPSG:32635"},initialize:function(a){this.map=a},_groundToImage:function(a,b,c,d){var e,f,g;g=-(a.rotationMatrix[2][0]*(b-a.projectionCenterX)+a.rotationMatrix[2][1]*(c-a.projectionCenterY)+a.rotationMatrix[2][2]*(d-a.projectionCenterZ))/a.cameraConstant;e=(a.rotationMatrix[0][0]*(b-a.projectionCenterX)+a.rotationMatrix[0][1]*(c-a.projectionCenterY)+a.rotationMatrix[0][2]*(d-a.projectionCenterZ))/g;f=(a.rotationMatrix[1][0]*(b-a.projectionCenterX)+a.rotationMatrix[1][1]*(c-a.projectionCenterY)+a.rotationMatrix[1][2]*(d-a.projectionCenterZ))/g;var j=e/a.pixelSize+a.columns/2,h=f/a.pixelSize+a.rows/2;return new OpenLayers.LonLat(j,h)},_imageToGround:function(a,b,c,d){var e,f,g,j,h;e=(b-a.columns/2)*a.pixelSize;f=(c-a.rows/2)*a.pixelSize;g=a.rotationMatrix[0][0]*e+a.rotationMatrix[1][0]*f-a.rotationMatrix[2][0]*a.cameraConstant;j=a.rotationMatrix[0][1]*e+a.rotationMatrix[1][1]*f-a.rotationMatrix[2][1]*a.cameraConstant;h=a.rotationMatrix[0][2]*e+a.rotationMatrix[1][2]*f-a.rotationMatrix[2][2]*a.cameraConstant;var k=g/h*(d-a.projectionCenterZ)+a.projectionCenterX,l=j/h*(d-a.projectionCenterZ)+a.projectionCenterY;return new OpenLayers.LonLat(k,l)},pixelToWorld:function(a,b,c){if(!a||!a.rotationMatrix)return new OpenLayers.LonLat(0,0);var d=b.lon,e=b.lat,f=this._imageToGround(a,d,e,0),g=this.utmProjections[a.utmZone],j=f.clone().transform(new OpenLayers.Projection(g),c||this.map.backendProjection);return j},worldToPixel:function(a,b,c){if(!a||!a.rotationMatrix)return new OpenLayers.LonLat(0,0);var d=this.utmProjections[a.utmZone],e=b.clone().transform(c||this.map.backendProjection,new OpenLayers.Projection(d));return this._groundToImage(a,e.lon,e.lat,0)},pixelToWorldMercator:function(a,b){return this.pixelToWorld(a,b,this.map.projection)},getProjection:function(a){return new OpenLayers.Projection(this.utmProjections[a.utmZone])},CLASS_NAME:"Eniro.ObliqueTransformer"});Eniro.ObliqueProjection=OpenLayers.Class({initialize:function(){},getCode:function(){return"eniro_oblique"},CLASS_NAME:"Eniro.ObliqueProjection"});Eniro.Layer.Oblique=OpenLayers.Class(Eniro.Layer.TMS,{maxZoomLevel:2,minZoomLevel:0,res:{se:[2,1,0.66666667],fi:[2,1,0.66666667],dk:[2,1,0.66666667],no:[2,1,0.5]},buffer:0,updatePercent:0.29,orientation:"N",obliqueActive:false,initialized:false,obeyChangeBaseLayer:false,previousZoomLevel:0,searchParams:{},obliqueProjection:new Eniro.ObliqueProjection,initialize:function(a,b,c,d){var e={units:"pixels",displayOutsideMaxExtent:true,zoomOffset:0,type:"jpg",tileOrigin:new OpenLayers.LonLat(0,0)};OpenLayers.Util.extend(e,c);Eniro.AppEvents.register(Eniro.Events.OBLIQUE_ORIENTATION_SWITCH,this,this.onObliqueOrientationSwitch);Eniro.Layer.TMS.prototype.initialize.apply(this,[a,b,e,d])},destroy:function(){if(this.map&&this.map.events){this.map.events.unregister("moveend",this,this.onMoveEnd);this.obeyChangeBaseLayer&&this.map.events.un({changebaselayer:this.onChangeBaseLayer,zoomend:this.onZoomChanged,scope:this})}Eniro.AppEvents.unregister(Eniro.Events.OBLIQUE_ORIENTATION_SWITCH,this,this.onObliqueOrientationSwitch);Eniro.Layer.TMS.prototype.destroy.apply(this,arguments)},setMap:function(){Eniro.Layer.TMS.prototype.setMap.apply(this,arguments);this.obliqueTransformer=new Eniro.ObliqueTransformer(this.map);this.map.events.register("moveend",this,this.onMoveEnd);this.obeyChangeBaseLayer&&this.map.events.on({changebaselayer:this.onChangeBaseLayer,zoomend:this.onZoomChanged,scope:this})},_transformGeometry:function(a,b,c){var d;if(a instanceof OpenLayers.LonLat){d=c?this.obliqueTransformer.pixelToWorld(this.obliqueTileInfo,a,this.map.projection):this.obliqueTransformer.worldToPixel(this.obliqueTileInfo,a,this.map.projection);a.lon=d.lon;a.lat=d.lat}else if(a instanceof OpenLayers.Geometry.Point){var e=new OpenLayers.LonLat(a.x,a.y);d=c?this.obliqueTransformer.pixelToWorld(this.obliqueTileInfo,e,this.map.projection):this.obliqueTransformer.worldToPixel(this.obliqueTileInfo,e,this.map.projection);a.x=d.lon;a.y=d.lat}},getURL:function(a){var b,c;a=this.adjustBounds(a);var d=this.map.getResolution(),e=Math.round((a.left-
this.maxExtent.left)/(d*this.tileSize.w)),f=Math.round((this.maxExtent.top-a.top)/(d*this.tileSize.h)),g=this.map.getZoomForResolution(d),j=Math.ceil(this.cols/d/this.tileSize.w),h=Math.ceil(this.rows/d/this.tileSize.h);c=this.url;b=f<h&&f>=0&&e<j&&e>=0?this.imagename+"/"+g+"_"+e+"_"+f+"."+this.type+"?v="+this.tileVersion:"media/tile/oblique-bg.gif?v"+Eniro.Config["media.version"];if(c instanceof Array)c=this.selectUrl(b,c);return c+b},updateObliqueInfo:function(a){this.obliqueTileInfo=a;var b=this.map.getTileSize().w,c=a.columns,d=a.rows,e=Math.ceil(d/b),f=Math.ceil(c/b),g=e*b,j=f*b,h="oblique-data/"+this.obliqueTileInfo.imagePath+"/"+this.obliqueTileInfo.imageName,k=this.obliqueTileInfo.country||"se",l=this.res[k];this.addOptions({rows:d,cols:c,maxExtent:new OpenLayers.Bounds(0,0,j,g),imagename:h,maxResolution:l[0],minResolution:l[2],resolutions:l});this.redraw()},changeObliqueImage:function(a){Eniro.AppEvents.triggerEvent(Eniro.Events.OBLIQUE_IMAGE_CHANGING,{});this.searchObj=a;jQuery.jsonp({url:Eniro.AppNode.appUrl("search/search"),data:this.searchObj,callbackParameter:"callback",success:OpenLayers.Function.bindAsEventListener(this.updateLayer,this),error:OpenLayers.Function.bind(function(){},this),dataFilter:function(b){return JSON.parse(JSON.stringify(b))}})},updateLayer:function(a){if(a&&a.oblique){this.updateObliqueInfo(a.oblique);var b=this.searchObj.ob_coord.split(","),c=new OpenLayers.LonLat(b[0],b[1]),d=this.obliqueTransformer.worldToPixel(a.oblique,c),e=this.searchObj.zoomLevel!==undefined?this.searchObj.zoomLevel:this.map.getZoom();this.map.setCenter(new OpenLayers.LonLat(Math.round(d.lon),Math.round(d.lat)),e);this.searchObj.zoomLevel=undefined;if(this.overviewMap){c=new OpenLayers.LonLat(a.oblique.centerX,a.oblique.centerY);this.overviewMap.onDragEnd(null,null,c)}Eniro.AppEvents.triggerEvent(Eniro.Events.OBLIQUE_LAYER_UPDATED,{data:a})}else Eniro.AppEvents.triggerEvent(Eniro.Events.OBLIQUE_MISSING,this)},onMoveEnd:function(){if(this.initialized&&this.map.dragging){var a=this.map.getExtent(),b=this.map.getMaxExtent(),c=b.left-a.left,d=a.right-b.right,e=a.top-b.top,f=b.bottom-a.bottom,g=a.right-a.left,j=a.top-a.bottom;this.searchObj=this.getSearchObj({extent:a});if(c/g>this.updatePercent||d/g>this.updatePercent||e/j>this.updatePercent||f/j>this.updatePercent)this.changeObliqueImage(this.searchObj);this.whoisdragging="main";if(this.overviewMap){var h=this.map.getCenter(),k=this.obliqueTransformer.pixelToWorld(this.obliqueTileInfo,h);this.overviewMap.onDragEnd(null,null,k)}}},getSearchObj:function(a){var b={zoom:14},c,d,e,f,g=a&&a.extent?a.extent:null,j=a&&a.dir?a.dir:null,h=a&&typeof a.city!=="undefined"?a.city:null,k=a&&a.searchParams?a.searchParams:null,l=a&&a.lonlat?a.lonlat:null;if(h!==null){h=Eniro.Profile.oblique.cities[a.city];b.ob_coord=h.ob_coord;var m=parseFloat(b.ob_coord.split(",")[0]),q=parseFloat(b.ob_coord.split(",")[1]);c=m-0.0010;d=m+0.0010;e=q-0.0010;f=q+0.0010;b.ob_pol=[c,e,d,e,d,f,c,f].join(",");b.ob_or=h.ob_or}else if(g!==null){var o=new OpenLayers.LonLat(g.left,g.top),p=new OpenLayers.LonLat(g.right,g.top),s=new OpenLayers.LonLat(g.right,g.bottom),v=new OpenLayers.LonLat(g.left,g.bottom),t=this.map.getCenter(),r=this.obliqueTransformer.pixelToWorld(this.obliqueTileInfo,o),u=this.obliqueTransformer.pixelToWorld(this.obliqueTileInfo,p),w=this.obliqueTransformer.pixelToWorld(this.obliqueTileInfo,s),x=this.obliqueTransformer.pixelToWorld(this.obliqueTileInfo,v),y=this.obliqueTransformer.pixelToWorld(this.obliqueTileInfo,t);c=r.lon;e=r.lat;d=w.lon;f=w.lat;if(j!==null)this.orientation=j;b.ob_coord=[y.lon,y.lat].join(",");b.ob_pol=[r.lon,r.lat,u.lon,u.lat,w.lon,w.lat,x.lon,x.lat].join(",");b.ob_or=this.getOrientation(j||this.orientation)}else if(l!==null){c=l.lon-0.0010;d=l.lon+0.0010;e=l.lat-0.0010;f=l.lat+0.0010;b.ob_coord=[l.lon,l.lat].join(",");b.ob_pol=[c,e,d,e,d,f,c,f].join(",");b.ob_or="N"}if(k)this.searchParams=k;OpenLayers.Util.extend(b,this.searchParams);delete b.type;delete b.object;delete b.element;b.BBOX||OpenLayers.Util.extend(b,{BBOX:[c,e,d,f].join(",")});return b},getOrientation:function(a){var b;return b=a==="eniro-orientation-north"?"S":a==="eniro-orientation-east"?"W":a==="eniro-orientation-west"?"E":a==="eniro-orientation-south"?"N":a},onObliqueAreaExists:function(a){if(a.oblique){this.updateObliqueInfo(a.oblique);var b=this.searchObj.ob_coord.split(","),c=new OpenLayers.LonLat(b[0],b[1]),d=c.clone(),e=this.obliqueTransformer.worldToPixel(a.oblique,c);this.map.baseLayer!==this&&Eniro.AppEvents.triggerEvent(Eniro.Events.CHANGE_BASE_LAYER,this);this.map.moveTo(new OpenLayers.LonLat(Math.round(e.lon),Math.round(e.lat)),0);if(this.overviewMap){d.transform(new OpenLayers.Projection("EPSG:4326"),new OpenLayers.Projection("EPSG:900913"));this.overviewMap.setCenter(d,Eniro.Profile.oblique.overviewZoomLevels[this.map.zoom]);this.overviewMap.createExtentMarker()}Eniro.AppEvents.triggerEvent(Eniro.Events.OBLIQUE_INITIALISING,{data:a});Eniro.AppEvents.triggerEvent(Eniro.Events.OBLIQUE_COPYRIGHT,a);this.initialized=true}},onChangeBaseLayer:function(a){if(a.layer===this){var b=this.map.baseLayer!==this?this.map.getProjectionObject():this.map.projection;this.onObliqueActivate({lonlat:this.map.getCenter().clone().transform(b,this.map.backendProjection)});this.obliqueActive=true}else if(this.obliqueActive){this.obliqueActive=false;this.onObliqueDeactivate();var c=this.obliqueTransformer.pixelToWorldMercator(this.obliqueTileInfo,this.map.getCenter());this.map.setCenter(c,this.previousZoomLevel)}},onZoomChanged:function(){if(!this.obliqueActive&&this.map.baseLayer!==this)this.previousZoomLevel=this.map.getZoom()},onObliqueActivate:function(a){Eniro.AppEvents.triggerEvent(Eniro.Events.OBLIQUE_ACTIVATING,{state:a});if(a&&a.searchObj){this.searchObj=a.searchObj;if(a.searchObj.id)this.searchParams.id=a.searchObj.id;if(a.searchObj.q)this.searchParams.q=a.searchObj.q;if(a.searchObj.p)this.searchParams.p=a.searchObj.p;if(a.searchObj.ap)this.searchParams.ap=a.searchObj.ap;var b=parseFloat(a.searchObj.ob_coord.split(",")[0]),c=parseFloat(a.searchObj.ob_coord.split(",")[1]);this.center=new OpenLayers.LonLat(b,c)}else this.searchObj=this.getSearchObj(a);jQuery.jsonp({url:Eniro.AppNode.appUrl("search/search"),data:this.searchObj,callbackParameter:"callback",success:OpenLayers.Function.bindAsEventListener(this.onObliqueAreaExists,this),error:function(){Eniro.AppEvents.triggerEvent(Eniro.Events.MODE_SWITCH,{mode:"search"})},dataFilter:function(d){return JSON.parse(JSON.stringify(d))}})},onObliqueDeactivate:function(){Eniro.AppEvents.triggerEvent(Eniro.Events.OBLIQUE_DEACTIVATING,{});Eniro.AppEvents.triggerEvent(Eniro.Events.OBLIQUE_COPYRIGHT,null)},onObliqueOrientationSwitch:function(a){this.setOrientation(a.orientation)},setOrientation:function(a){var b=this.map.getExtent();this.searchObj=this.getSearchObj({extent:b,dir:a});this.changeObliqueImage(this.searchObj)},CLASS_NAME:"Eniro.Layer.Oblique"});Eniro.Layer.Oblique.ORIENTATION_NORTH="eniro-orientation-north";Eniro.Layer.Oblique.ORIENTATION_WEST="eniro-orientation-west";Eniro.Layer.Oblique.ORIENTATION_SOUTH="eniro-orientation-south";Eniro.Layer.Oblique.ORIENTATION_EAST="eniro-orientation-east";Eniro.ObliqueCopyright=OpenLayers.Class(Eniro.Control,{timer:null,timeout:3E3,element:null,initialize:function(){Eniro.Control.prototype.initialize.apply(this,arguments);this.register(Eniro.Events.OBLIQUE_COPYRIGHT,this.onMapTypesUpdate)},destroy:function(){this.unregister(Eniro.Events.OBLIQUE_COPYRIGHT,this.onMapTypesUpdate);Eniro.Control.prototype.destroy.apply(this,arguments)},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.element){this.element=document.createElement("div");this.div.appendChild(this.element);jQuery(this.div).addClass("eniro-oblique-copyright")}return this.div},setMap:function(a){OpenLayers.Control.prototype.setMap.apply(this,arguments);this.map=a},onMapTypesUpdate:function(a){if(a.maptypes&&a.maptypes.oblique&&a.maptypes.oblique[0].text!==this.type){this.type=a.maptypes.oblique[0].text;this.obliqueCopyright(this.type)}else{this.type="";jQuery(this.div).hide()}},obliqueCopyright:function(a){this.div.innerHTML="";if(a==="BLOM"){var b="/media/oblique-blom-logotype.jpg?v="+
Eniro.Config["media.version"];jQuery(this.div).append('<img src="'+b+'" alt="Blom" />')}else this.div.innerHTML=OpenLayers.i18n("oblique-copyright.cowi");jQuery(this.div).show()},CLASS_NAME:"Eniro.ObliqueCopyright"});Eniro.Map=OpenLayers.Class(OpenLayers.Map,{MODES_CONSIDERED_PAGES:["oblique","streetview"],containerDiv:null,offsetControls:{},showObliqueLayer:false,initialize:function(a,b){Eniro.AppEvents=new OpenLayers.Events(window,null,Eniro.Events.EVENT_TYPES);this.containerDiv=OpenLayers.Util.getElement(a);var c=jQuery('<div class="eniro-ol-viewport"></div>')[0];this.containerDiv.appendChild(c);jQuery(this.containerDiv).addClass("eniro"+(Eniro.Profile&&Eniro.Profile.id?" eniro-"+Eniro.Profile.id.replace(/\,|\.|[^a-z]/gi,"-"):""));var d={controls:[],theme:null,maxResolution:156543.03390625,minZoomLevel:0,numZoomLevels:21,maxZoomLevel:20,maxViapoints:6,projection:new OpenLayers.Projection("EPSG:900913"),backendProjection:new OpenLayers.Projection("EPSG:4326"),maxExtent:new OpenLayers.Bounds(-2.003750834E7,-2.003750834E7,2.003750834E7,2.003750834E7),panDuration:15,swedeMode:true,activeLayers:Eniro.Profile&&Eniro.Profile.activeLayers?Eniro.Profile.activeLayers:[Eniro.Map.LAYER_MAP]},e=Eniro.Config["tile.version"];OpenLayers.Util.extend(d,b);OpenLayers.Map.prototype.initialize.apply(this,[c,d]);if(this.activeLayers.indexOf(Eniro.Map.LAYER_MAP)!=-1)this.addLayer(new Eniro.Layer.TMS("map",Eniro.AppNode.tileUrl("/geowebcache/service/tms"),{layername:"map",buffer:0,type:"png",minZoomLevel:Eniro.Profile&&Eniro.Profile.zoomLevels?Eniro.Profile.zoomLevels.map.min:this.swedeMode?4:0,maxZoomLevel:Eniro.Profile&&Eniro.Profile.zoomLevels?Eniro.Profile.zoomLevels.map.max:this.swedeMode?17:21,alwaysActive:true},e));if(this.activeLayers.indexOf(Eniro.Map.LAYER_AERIAL)!=-1)this.addLayer(new Eniro.Layer.TMS("aerial",Eniro.AppNode.tileUrl("/geowebcache/service/tms"),{layername:"aerial",buffer:0,type:"jpeg",minZoomLevel:Eniro.Profile&&Eniro.Profile.zoomLevels?Eniro.Profile.zoomLevels.aerial.min:this.swedeMode?4:0,maxZoomLevel:Eniro.Profile&&Eniro.Profile.zoomLevels?Eniro.Profile.zoomLevels.aerial.max:this.swedeMode?17:21},e));if(this.activeLayers.indexOf(Eniro.Map.LAYER_HYBRID)!=-1){this.hybridLayer=new Eniro.Layer.TMS("hybrid",Eniro.AppNode.tileUrl("/geowebcache/service/tms"),{layername:"aerial",buffer:0,type:"jpeg",minZoomLevel:Eniro.Profile&&Eniro.Profile.zoomLevels?Eniro.Profile.zoomLevels.hybrid.min:this.swedeMode?4:0,maxZoomLevel:Eniro.Profile&&Eniro.Profile.zoomLevels?Eniro.Profile.zoomLevels.hybrid.max:this.swedeMode?17:21},e);this.hybridOverlay=new Eniro.Layer.TMS("hybrid_overlay",Eniro.AppNode.tileUrl("/geowebcache/service/tms"),{layername:"hybrid",buffer:0,type:"png",visibility:false,isBaseLayer:false,minZoomLevel:Eniro.Profile&&Eniro.Profile.zoomLevels?Eniro.Profile.zoomLevels.hybrid.min:this.swedeMode?4:0,maxZoomLevel:Eniro.Profile&&Eniro.Profile.zoomLevels?Eniro.Profile.zoomLevels.hybrid.max:this.swedeMode?17:21,alpha:true},e);this.addLayer(this.hybridLayer);this.addLayer(this.hybridOverlay)}if(this.activeLayers.indexOf(Eniro.Map.LAYER_NAUTICAL)!=-1)this.addLayer(new Eniro.Layer.TMS("nautical",Eniro.AppNode.tileUrl("/geowebcache/service/tms"),{layername:"nautical",buffer:0,type:"png",minZoomLevel:Eniro.Profile&&Eniro.Profile.zoomLevels?Eniro.Profile.zoomLevels.nautical.min:this.swedeMode?4:0,maxZoomLevel:Eniro.Profile&&Eniro.Profile.zoomLevels?Eniro.Profile.zoomLevels.nautical.max:this.swedeMode?17:21},e));if(this.activeLayers.indexOf(Eniro.Map.LAYER_OBLIQUE)!=-1){this.obliqueLayer=new Eniro.Layer.Oblique(OpenLayers.i18n("oblique"),Eniro.AppNode.tileUrl(""),{layername:"oblique",displayInLayerSwitcher:this.showObliqueLayer,obeyChangeBaseLayer:this.showObliqueLayer},e);this.addLayer(this.obliqueLayer)}var f=OpenLayers.Util.extend({},OpenLayers.Feature.Vector.style["default"]);f.strokeWidth=4;f.strokeOpacity=0.5;f.strokeColor="blue";this.wfs=new Eniro.Layer.SearchLayer("searchLayer",Eniro.AppNode.appUrl("/search/search.json"),{},{layername:"search",projection:new OpenLayers.Projection("EPSG:4326"),style:f});this.addLayer(this.wfs);this.activateLayer(this.wfs);this.searchLayer=this.wfs;Eniro.AppEvents.register(Eniro.Events.MODE_SWITCH,this,this.onModeSwitch);this.events.on({changebaselayer:this.onChangeBaseLayer,scope:this});Eniro.AppEvents.register(Eniro.Events.CHANGE_BASE_LAYER,this,this.doChangeBaseLayer);Eniro.AppEvents.register(Eniro.Events.SET_CENTER,this,this.doSetCenter);Eniro.AppEvents.register(Eniro.Events.ZOOM_TO_LEVEL,this,this.onZoomToLevel);Eniro.AppEvents.register(Eniro.Events.ZOOM_TO_EXTENT,this,this.onZoomToExtent)},getResolution:function(){return OpenLayers.Map.prototype.getResolution.apply(this,arguments)},destroy:function(){if(this.popup){this.popup.destroy();this.popup=null}this.events.un({changebaselayer:this.onChangeBaseLayer,scope:this});Eniro.AppEvents.unregister(Eniro.Events.CHANGE_BASE_LAYER,this,this.doChangeBaseLayer);Eniro.AppEvents.unregister(Eniro.Events.ZOOM_TO_LEVEL,this,this.onZoomToLevel);Eniro.AppEvents.unregister(Eniro.Events.ZOOM_TO_EXTENT,this,this.onZoomToExtent);OpenLayers.Map.prototype.destroy.apply(this,arguments);Eniro.AppEvents&&Eniro.AppEvents.destroy();if(this.wfs)this.wfs=null},onChangeBaseLayer:function(){this.hybridOverlay&&this.hybridLayer&&this.hybridOverlay.setVisibility(this.baseLayer===this.hybridLayer)},doSetCenter:function(a){a.toAdjusted?this.setAdjustedCenter(a.lonlat,a.zoomLevel,a.dragging,a.forceZoomchange,a.suspendSearchLayer):this.setCenter(a.lonlat,a.zoomLevel,a.dragging,a.forceZoomchange,a.suspendSearchLayer)},doChangeBaseLayer:function(a,b){if(typeof a=="string")a=this.getLayerById(a);if(!b&&this.zoom>2&&a.CLASS_NAME==="Eniro.Layer.Oblique")this.zoom=0;this.setBaseLayer(a)},isValidZoomLevel:function(a){var b=this.baseLayer.minZoomLevel,c=this.baseLayer.maxZoomLevel;if(!b||!c){b=this.minZoomLevel;maxZoomLevels=this.maxZoomLevel}return a!==null&&a>=b&&a<=c},moveTo:function(a,b,c){if(b){var d=this.baseLayer.minZoomLevel,e=this.baseLayer.maxZoomLevel;if(!d||!e){d=this.minZoomLevel;maxZoomLevels=this.maxZoomLevel}if(b<d)b=d;else if(b>e)b=e}return OpenLayers.Map.prototype.moveTo.apply(this,[a,b,c])},getCurrentSize:function(){var a=jQuery(this.div),b=0;if(this.baseLayer instanceof Eniro.Layer.Oblique)b=-360;return new OpenLayers.Size(a.width()+b,a.height())},activateLayer:function(a){this.setLayerIndex(a,this.getNumLayers()-1)},setOffsetControls:function(a,b,c){this.offsetControls={left:a,top:b,bottom:c}},_getOffsetWidth:function(){if(!this.offsetControls.left||this.offsetControls.left instanceof Eniro.TabNavigatorView&&!this.offsetControls.left.getOpenTab())return 0;var a=jQuery(this.offsetControls.left.div);return a.width()+a.position().left},_getControlBarHeight:function(a){return a.area?jQuery(a.area).height():jQuery(a.div).height()},_getOffsetTop:function(){if(!this.offsetControls.top||!this.offsetControls.top instanceof OpenLayers.Control)return 0;var a=jQuery(this.offsetControls.top.div);return(this.offsetControls.top instanceof Eniro.ControlBarView?this._getControlBarHeight(this.offsetControls.top):a.height())+a.position().top+25},_getOffsetBottom:function(){if(!this.offsetControls.bottom||!this.offsetControls.bottom instanceof OpenLayers.Control)return 0;return this.getCurrentSize().h-jQuery(this.offsetControls.bottom.div).position().top},getAdjustedCenter:function(){return this.getAdjustedExtent().getCenterLonLat()},getAdjustedExtent:function(){var a=this.getExtent(),b=this._getOffsetWidth()*this.getResolution();if(a.getWidth()<b)b=0;var c=this._getOffsetTop()*this.getResolution();if(a.getHeight()<c)c=0;var d=this._getOffsetBottom()*this.getResolution();if(a.getHeight()<d)d=0;var e=a.right,f=a.bottom,g=a.add(b,-c);g.right=e;g.bottom=f+d;return g},getAdjustedSize:function(){var a=this.getSize();return new OpenLayers.Size(a.w-this._getOffsetWidth(),a.h-this._getOffsetTop())},zoomToAdjustedExtent:function(a,b){if(b){this.wfs.setQueriesEnabled(false);this.wfs.setDestroyTransientFeaturesEnabled(false);this.wfs._disableHistory=true}var c=this.getZoomForExtent(a),d=this._getOffsetWidth()*this.getResolutionForZoom(c),e=a.right,f=a.add(-d,0);f.right=e;this.zoomToExtent(f);if(b){this.wfs.setQueriesEnabled(true);this.wfs.setDestroyTransientFeaturesEnabled(true);this.wfs._disableHistory=false}},setCenter:function(a,b,c,d,e){if(e){this.wfs.setQueriesEnabled(false);this.wfs.setDestroyTransientFeaturesEnabled(false);this.wfs._disableHistory=true}OpenLayers.Map.prototype.setCenter.apply(this,arguments);if(e){this.wfs.setQueriesEnabled(true);this.wfs.setDestroyTransientFeaturesEnabled(true);this.wfs._disableHistory=false}},setBaseLayer:function(a){var b=null,c=null;if(this.baseLayer){b=this.baseLayer.getExtent();c=this.getProjectionObject()}if(a!=this.baseLayer)if(OpenLayers.Util.indexOf(this.layers,a)!=-1){this.baseLayer!==null&&this.baseLayer.setVisibility(false);this.baseLayer=a;this.viewRequestID++;this.baseLayer.visibility=true;var d=this.getCenter();if(d!==null){var e=b?b.getCenterLonLat():d,f=b.clone(),g=this.getProjectionObject();if(!c.equals(g)){e.transform(c,g);f.transform(c,g)}var j=f?this.getZoomForExtent(f,true):this.getZoomForResolution(this.resolution,true);this.setCenter(e,j,false,true);if(!c.equals(g))for(var h=0,k=this.layers.length;h<k;h++)this.layers[h].transform&&typeof this.layers[h].transform=="function"&&this.layers[h].transform(c,g)}this.events.triggerEvent("changebaselayer",{layer:this.baseLayer})}},setAdjustedCenter:function(a,b,c,d,e){var f=this._getOffsetWidth()*this.getResolutionForZoom(b),g=a.add(-f/2,0);this.setCenter.apply(this,[g,b,c,d,e])},setMapType:function(a,b){this.doChangeBaseLayer(a,b)},onZoomToLevel:function(a){this.zoomTo(a.zoomLevel)},onZoomToExtent:function(a){a.toAdjusted?this.zoomToAdjustedExtent(a.extent,a.suspendSearchLayer):this.zoomToExtent(a.extent)},getLayerByName:function(a){for(var b=null,c=0,d=this.layers.length;c<d;c++){var e=this.layers[c];if(e.layername==a){b=e;break}}return b},getLayerById:function(a){var b=null;if(a)for(var c=0,d=this.layers.length;c<d;c++){var e=this.layers[c];if(e.layerId==a){b=e;break}}return b},getVisibleLayers:function(){for(var a=[],b=0,c=this.layers.length;b<c;b++)if(this.layers[b].visibility)a[a.length]=this.layers[b];return a},getGeometryFeature:function(a){for(var b=a["route-geometries"],c=new OpenLayers.Format.GeoJSON({externalProjection:new OpenLayers.Projection("EPSG:4326"),internalProjection:this.baseLayer.projection}),d={properties:{duration:0,length:0},type:"Feature",geometry:{type:"MultiLineString",coordinates:[]},bbox:b.bbox},e,f=0,g=b.features.length;f<g;++f){e=b.features[f];d.properties.duration+=e.properties.duration;d.properties.length+=e.properties.length;d.geometry.coordinates=d.geometry.coordinates.concat(e.geometry.coordinates)}return c.read(d,"Feature")},CLASS_NAME:"Eniro.Map"});Eniro.Map.LAYER_MAP="map";Eniro.Map.LAYER_AERIAL="aerial";Eniro.Map.LAYER_HYBRID="hybrid";Eniro.Map.LAYER_NAUTICAL="nautical";Eniro.Map.LAYER_STREETVIEW="streetview";Eniro.Map.LAYER_OBLIQUE="oblique";Eniro.Map.STATE_KEY="map";Eniro.ControlBarView=OpenLayers.Class(Eniro.Control,{ALLOWED_PLACEMENTS:["left","center","right"],leftControls:[],centerControls:[],rightControls:[],initialize:function(a){this.ALLOWED_PLACEMENTS=["left","center","right"];this.leftControls=[];this.centerControls=[];this.rightControls=[];Eniro.Control.prototype.initialize.apply(this,[a]);this.div=true},destroy:function(){this.right=this.center=this.left=this.area=null;if(this.underlayDiv){OpenLayers.Event.stopObservingElement(this.underlayDiv);this.underlayDiv=null}Eniro.Control.prototype.destroy.apply(this,arguments)},activate:function(){if(Eniro.Control.prototype.activate.apply(this,arguments)){if(this.underlayDiv){OpenLayers.Event.observe(this.underlayDiv,"mousedown",OpenLayers.Event.stop);OpenLayers.Event.observe(this.underlayDiv,"mouseup",OpenLayers.Event.stop)}for(var a,b,c=0,d=this.ALLOWED_PLACEMENTS.length;c<d;++c){a=this.ALLOWED_PLACEMENTS[c];b=this[a+"Controls"];for(var e=0,f=b.length;e<f;++e)b[e].activate()}return true}return false},addControl:function(a,b){b.div=true;this[a+"Controls"]&&this[a+"Controls"].push(b);if(this.map){this.map.addControl(b);b.div&&b.div.tagName&&this[a].appendChild(b.div)}else this.error("Add this ControlBarView to the map before adding controls")},addLeftControl:function(a){this.addControl("left",a)},addRightControl:function(a){this.addControl("right",a)},addCenterControl:function(a){this.addControl("center",a)},draw:function(){this.area=this.createDiv(null,"area");this.left=this.createDiv(null,"left");this.center=this.createDiv(null,"center");this.right=this.createDiv(null,"right");this.div=this.createDiv();if(this.bottomOffset){if(jQuery.browser.msie&&parseInt(jQuery.browser.version,10)<7){var a;a=this.id==="zoom"?28:15;this.bottomOffset-=a}jQuery(this.div).addClass(this.getCssClassName("bottom")).css("bottom",this.bottomOffset)}this.topOffset&&jQuery(this.div).css("top",this.topOffset);if(this.underlay){this.underlayDiv=this.createDiv(null,"underlay");this.div.appendChild(this.underlayDiv)}for(var b,c=0,d=this.ALLOWED_PLACEMENTS.length;c<d;++c){b=this.ALLOWED_PLACEMENTS[c];this.area.appendChild(this[b])}this.div.appendChild(this.area);this.map.containerDiv.insertBefore(this.div,this.map.div);return this.div},CLASS_NAME:"Eniro.ControlBarView"});Eniro.ButtonbarView=OpenLayers.Class(Eniro.Control,{controls:[],initialize:function(){this.controls=[];Eniro.Control.prototype.initialize.apply(this,arguments)},destroy:function(){if(this.controls){for(var a=0,b=this.controls.length;a<b;++a){typeof this.controls[a].destroy==="function"&&this.controls[a].destroy();this.controls[a]=null}this.controls=null}Eniro.Control.prototype.destroy.apply(this,arguments)},registerObservers:function(){this.observe(this.div,"click",this.onClick)},onClick:function(a){var b,c=OpenLayers.Event.element(a);c=jQuery(c).closest("li").get(0);for(var d=0,e=this.controls.length;d<e;++d)if(c===this.elements[this.controls[d].id])b=this.controls[d];if(b){OpenLayers.Event.stop(a);this.activateControl(b);return false}return true},getControlById:function(a){for(var b=0,c=this.controls.length;b<c;++b)if(this.controls[b].id===a)return this.controls[b];return null},getControlByIndex:function(a){if(a>=0&&a<this.controls.length)return this.controls[a];return null},setControls:function(a){if(a.length===1)a[0].position="first-last";else{a[0].position="first";a[a.length-1].position="last"}this.controls=a},setButtonClassName:function(a){jQuery(this.elements[a.id]).attr("class",this.getCssClassName("button",null,a))},executeControl:function(){},disableControl:function(a){if(!a.selected){a.disabled=true;this.setButtonClassName(a);return true}return false},enableControl:function(a){a.disabled=false;this.setButtonClassName(a);return true},activateControl:function(a){if(a&&!a.disabled){this.inactivateControls();a.selected=true;this.setButtonClassName(a);this.executeControl(a)}},inactivateControls:function(){for(var a=0,b=this.controls.length;a<b;++a){var c=this.controls[a];c.selected=false;this.setButtonClassName(c)}},getButtonHTML:function(a){this.cssClasses[a.id]=this.getCssClassName("button",null,a);return['<li class="',this.cssClasses[a.id],'"><a href=""><span>',a.label||this.i18n(a.id),"</span></a></li>"].join("")},renderButtons:function(){for(var a=[],b=0,c=this.controls.length;b<c;++b)a.push(this.getButtonHTML(this.controls[b]));return a.join("")},draw:function(){this.div=this.createDiv();jQuery(this.div).html(['<div class="',this.getCssClassName("inner"),'"><ul class="',this.getCssClassName("buttons"),'">',this.renderButtons(),"</ul></div>"].join(""));return this.div},CLASS_NAME:"Eniro.ButtonbarView"});Eniro.FooterView=OpenLayers.Class(Eniro.Control,{initialize:function(){Eniro.Control.prototype.initialize.apply(this,arguments);this.register(Eniro.Events.MAP_TYPES_UPDATE,this.onMapTypesUpdate);this.div=true},destroy:function(){this.unregister(Eniro.Events.MAP_TYPES_UPDATE,this.onMapTypesUpdate);Eniro.Control.prototype.destroy.apply(this,arguments)},onMapTypesUpdate:function(a){if(this.elements.copyright&&a&&a.maptypes){var b=this.formatText(a.maptypes,this.map.getVisibleLayers());jQuery(this.elements.copyright).html("\u00a9 "+
b.replace(/\u00a9\s*/,""))}},formatText:function(a,b){for(var c="",d=0,e=b.length;d<e;d++){var f=b[d];if(a[f.layername])for(var g=a[f.layername],j=0,h=g.length;j<h;j++){var k=g[j].text;if(k)c+=k.length?k.concat(". "):k+". "}}return c},draw:function(){this.div=this.createDiv();this.cssClasses.copyright=this.getCssClassName("copyright");var a=['<span class="'+this.cssClasses.copyright+'"></span>'];jQuery(this.div).html(a.join(""));return OpenLayers.Control.prototype.draw.apply(this,arguments)},CLASS_NAME:"Eniro.FooterView"});Eniro.ZoomBarView=OpenLayers.Class(Eniro.ButtonbarView,{initialize:function(){Eniro.ButtonbarView.prototype.initialize.apply(this,arguments)},destroy:function(){this.map.events.unregister("zoomend",this,this.onZoomEnd);this.map.events.unregister("changebaselayer",this,this.onChangeBaseLayer);Eniro.ButtonbarView.prototype.destroy.apply(this,arguments)},setMap:function(){Eniro.ButtonbarView.prototype.setMap.apply(this,arguments);this.map.events.register("zoomend",this,this.onZoomEnd);this.map.events.register("changebaselayer",this,this.onChangeBaseLayer);var a=this.drawZoomLevels();this.setControls(a)},onChangeBaseLayer:function(){this.entries=[];var a=this.drawZoomLevels();this.setControls(a);var b=jQuery(this.div).find("ul");if(b[0])b[0].innerHTML=this.renderButtons();this.assignElements()},drawZoomLevels:function(){var a=[],b=this.map.getZoom(),c=this.map.baseLayer;if(c.minZoomLevel===undefined||c.maxZoomLevel===undefined){this.warn('Zoom levels for layer "'+c.layername+'" is not defined, falling back on map.');c=this.map}this.zoomFrom=c.minZoomLevel;this.zoomTo=c.maxZoomLevel;for(var d=this.zoomFrom,e=this.zoomTo;d<=e;++d)a.push({label:d+1-this.zoomFrom,id:"zoomlevel-"+d,zoomLevel:d,selected:d==b});return a},onClick:function(a){if(Eniro.ButtonbarView.prototype.onClick.apply(this,arguments)){var b=OpenLayers.Event.element(a),c=jQuery(b).closest("button").get(0);if(c){var d=this.map.getZoom();if(this.elements.zoomIn===c&&d+1<=this.zoomTo)this.activateControl(this.getControlById("zoomlevel-"+(d+1)));else this.elements.zoomOut===c&&d-1>=this.zoomFrom&&this.activateControl(this.getControlById("zoomlevel-"+(d-1)));return false}}return true},onZoomEnd:function(){var a=this.getControlById("zoomlevel-"+this.map.getZoom());if(a){this.inactivateControls();a.selected=true;this.setButtonClassName(a)}},executeControl:function(a){this.triggerEvent(Eniro.Events.ZOOM_TO_LEVEL,{zoomLevel:a.zoomLevel})},draw:function(){Eniro.ButtonbarView.prototype.draw.apply(this,arguments);this.cssClasses.zoomIn=this.getCssClassName("zoom-in");this.cssClasses.zoomOut=this.getCssClassName("zoom-out");jQuery(this.div).prepend(['<button class="eniro-button ',this.cssClasses.zoomOut,'" type="submit"><span class="eniro-screen-reader">',this.i18n("zoom-out"),"</span></button>"].join(""));jQuery(this.div).append(['<button class="eniro-button ',this.cssClasses.zoomIn,'" type="submit"><span class="eniro-screen-reader">',this.i18n("zoom-in"),"</span></button>"].join(""));return this.div},CLASS_NAME:"Eniro.ZoomBarView",SUPER:"Eniro.ButtonbarView"});Eniro.LayerBarView=OpenLayers.Class(Eniro.ButtonbarView,{customControls:[],initialize:function(){this.customControls=[];Eniro.ButtonbarView.prototype.initialize.apply(this,arguments);this.register(Eniro.Events.MAP_TYPES_UPDATE,this.onMapTypesUpdate)},destroy:function(){this.unregister(Eniro.Events.MAP_TYPES_UPDATE,this.onMapTypesUpdate);var a,b;for(a=0,b=this.controls.length;a<b;++a)this.controls[a].layer=null;for(a=0,b=this.customControls.length;a<b;++a){this.customControls[a].layerBarButton=null;this.customControls[a]=null}this.customControls=null;Eniro.ButtonbarView.prototype.destroy.apply(this,arguments)},activate:function(){if(Eniro.ButtonbarView.prototype.activate.apply(this,arguments)){for(var a=0,b=this.customControls.length;a<b;++a)this.customControls[a].isActivated||this.activateCustomControl(this.customControls[a]);return true}return false},activateCustomControl:function(a){!a.div&&a.draw&&a.draw();a.layerBarButton=this.addCustomControlToDom(a);a.activate&&a.activate();this.assignElements()},assignElements:function(){Eniro.ButtonbarView.prototype.assignElements.apply(this,arguments);for(var a=0,b=this.customControls.length;a<b;++a)this.elements[this.customControls[a].id]=this.customControls[a].layerBarButton},setMap:function(){Eniro.ButtonbarView.prototype.setMap.apply(this,arguments);for(var a=[],b=null,c=0,d=this.map.layers.length;c<d;++c){var e=this.map.layers[c];if(e.isBaseLayer&&e.displayInLayerSwitcher){if(e.visibility)b=e;a.push({label:e.name,id:e.layerId||e.layername,selected:e.id===b.id,layer:e})}}this.setControls(a);this.map.events.on({changebaselayer:this.onChangeBaseLayer,scope:this})},executeControl:function(a){this.triggerEvent(Eniro.Events.CHANGE_BASE_LAYER,a.layer)},disableCustomControl:function(a){a.selected=false;a.disabled=true;this.setButtonClassName(a);return true},enableCustomControl:function(a){a.disabled=false;this.setButtonClassName(a);return true},addCustomControl:function(a){this.addDivider();this.customControls.push(a);a.map||a.setMap(this.map);this.isActivated&&this.activateCustomControl(a);return a},addCustomControlToDom:function(a){this.addDivider();return jQuery(this.getButtonHTML(a)).insertAfter(this.elements.divider).get(0)},addDivider:function(){if(!this.elements.divider){var a=jQuery("."+this.cssClasses.divider);this.elements.divider=a.size()<1?jQuery('<li class="'+this.cssClasses.divider+'"></li>').appendTo(jQuery(this.div).find("ul:eq(0)")).get(0):a}},renderButtons:function(){this.cssClasses.divider=this.getCssClassName("button divider");var a=[Eniro.ButtonbarView.prototype.renderButtons.apply(this,arguments)];this.customControls.length>0&&a.push('<li class="',this.getCssClassName("button divider"),'"></li>');for(var b=0,c=this.customControls.length;b<c;++b)a.push(this.getButtonHTML(this.customControls[b]));return a.join("")},onChangeBaseLayer:function(){for(var a=this.map.baseLayer.layerId,b=0,c=this.controls.length;b<c;++b)if(this.controls[b].id===a&&!this.controls[b].selected){this.activateControl(this.controls[b]);break}},onMapTypesUpdate:function(a){if(a.maptypes){var b,c,d;for(d=0,c=this.controls.length;d<c;++d){b=this.controls[d];if(!b.layer.alwaysActive){this.disableControl(b);a.maptypes[b.id]&&this.enableControl(b)}}for(d=0,c=this.customControls.length;d<c;++d){b=this.customControls[d];this.disableCustomControl(b);if(a.maptypes[b.id]&&(!b.showIfAllowed||b.showIfAllowed(this.map.getZoom())))this.enableCustomControl(b)}}},CLASS_NAME:"Eniro.LayerBarView",SUPER:"Eniro.ButtonbarView"});Eniro.StatisticsController=OpenLayers.Class({handlers:[],initialize:function(){this.handlers=[];if(this.nocrud||window.location.toString().indexOf("nocrud")>0)this.nocrud=true;if(!this.nocrud&&Eniro.Profile&&Eniro.Profile.statistics){this.setupHandlers(Eniro.Profile.statistics);Eniro.AppEvents.register(Eniro.Events.STATISTICS_LOG,this,this.onStatisticsLog)}},destroy:function(){Eniro.AppEvents.unregister(Eniro.Events.STATISTICS_LOG,this,this.onStatisticsLog)},setupHandlers:function(a){if(typeof a!="object"||!a.length)OpenLayers.Console.error("statistics is not an array of handler definitions");else{var b=0;for(b=0;b<a.length;b++){var c=a[b];if(c.type)if(c.events){var d=Eniro.StatisticsController.handlerMap[c.type],e=new d(c);this.handlers[this.handlers.length]=e}else OpenLayers.Console.error("statistics array["+b+"] missing events");else OpenLayers.Console.error("statistics array["+b+"] missing type")}}},onStatisticsLog:function(a){var b=this;setTimeout(function(){for(var c=0,d=b.handlers.length;c<d;++c)b.handlers[c].log(a.scope,a.event,a.data)},300)},CLASS_NAME:"Eniro.StatisticsController"});Eniro.StatisticsController.handlerMap={};Eniro.StatisticsHandler=OpenLayers.Class({DEFAULT_EVENT:"_default",queue:[],iframeQueue:[],initialize:function(a){typeof a=="object"&&jQuery.extend(this,a);this.queue=[];this.iframeQueue=[];this.destroyOnload=OpenLayers.Function.bind(this.processIframeQueue,this);OpenLayers.Event.observe(window,"load",this.destroyOnload)},destroy:function(){OpenLayers.Event.stopObserving(window,"load",this.destroyOnload);this.destroyOnload=null},initReady:function(){if(this.queue){for(var a=0;a<this.queue.length;a++){var b=this.queue[a];this.doLog.apply(this,b)}this.queue=null}},loadScript:function(a,b){var c={url:a,dataType:"script",cache:false,async:true};if(b)c.success=b;jQuery.ajax(c)},success:function(){this.iframe.contentWindow.document.close();this.callback()},failure:function(){this.success()},processIframeQueue:function(){for(var a=0,b=this.iframeQueue.length;a<b;++a)this._iframeLoadScript(this.iframeQueue[a].url,this.iframeQueue[a].callback)},iframeLoadScript:function(a,b){this.iframeQueue.push({url:a,callback:b})},_iframeLoadScript:function(a,b){this.callback=b;this.iframe=jQuery('<iframe scrolling="no" frameborder="no"></iframe>').get(0);jQuery("body").append(this.iframe);var c=this.iframe.contentWindow||this.iframe.contentDocument,d=c;if(c.document)d=c.document;Eniro.StatisticsHandler.success=OpenLayers.Function.bind(this.success,this);Eniro.StatisticsHandler.failure=OpenLayers.Function.bind(this.failure,this);var e=['<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',"<html>","<head>",'<meta http-equiv="Content-Type" content="text/html; charset=utf-8">',"<title>Eniro ADForm loader</title>",'<script type="text/javascript" id="wcm1">',"var loadedScripts = 0;","function sload() {","loadedScripts++;",'var scripts = document.getElementsByTagName("script");',"var srcScripts = 0;","for (var i=0,n=scripts.length;i<n;++i) {","if (scripts[i].src) {","srcScripts++;","}","}","window.top.OpenLayers.Console.log(srcScripts, loadedScripts);","if (srcScripts === loadedScripts) {","setTimeout(loaded, 0);","}","};","function loaded() {","var i, n;",'var scripts = document.getElementsByTagName("script");',"for (n=scripts.length-1;n>=0;--n) {",'if (scripts[n].id != "wcm2" && scripts[n].parentNode === document.body) {',"scripts[n].parentNode.removeChild(scripts[n]);","}","}","var children = document.body.childNodes;","var child;","window.parent.OpenLayers.Console.debug(children);","var isOnlyComment = true;",'var commentText = "";',"for (i = 0,n=children.length;i<n;++i) {","child = children[i];",'if (child.id != "wcm1" && child.id != "wcm2" && child.nodeType != 8 && child.nodeType != 3) {',"isOnlyComment = false","}","else {","commentText += child.nodeValue;","}","}","if (isOnlyComment) {","window.parent.Eniro.StatisticsHandler.failure({","text: commentText","});","}","else {","window.parent.Eniro.StatisticsHandler.success();","}","};","function scriptLoad() {",'var scripts = document.getElementsByTagName("script");',"var script;","for (var i=0,n=scripts.length;i<n;++i) {","script = scripts[i];",'if (!script.src || script.id === "wcm1" || script.id === "wcm2") { continue; }','if ("\\v"=="v") {',"if (!script.isLoaded && !script.onreadystatechange) {","script.onreadystatechange = function () {",'window.parent.OpenLayers.Console.log(this.outerHTML + "\\n" + this.readyState);','if (this.readyState == "loaded" || this.readyState == "complete") {',"if (!this.isLoaded) {","this.isLoaded = true;","sload();","}","}","};","}","}","else {","if (!script.onload) {","script.onload = function() {","window.parent.OpenLayers.Console.log(this.src);","sload();","}","}","}","}","};","var w = document.write;","document.write = function() {","var args = Array.prototype.slice.call(arguments);",'if ("\\v"=="v") {','w(args.join(","));',"}","else {",'w.call(document, args.join(","));',"}","scriptLoad();","};","<\/script>",'<script type="text/javascript" src="'+a+'"><\/script>',"</head>","<body>",'<script type="text/javascript" id="wcm2">',"scriptLoad();","<\/script>","</body>","</html>"];e=e.join("\n");d.write(e)},loadImage:function(a){var b=jQuery('<img alt="" />').get(0);function c(){OpenLayers.Event.stopObservingElement(this);jQuery(this).remove()}OpenLayers.Event.observe(b,"load",c);OpenLayers.Event.observe(b,"error",c);jQuery("body").append(b);b.src=a},log:function(a,b,c){var d=this.events[a],e;if(d){if(b)(e=d[b])||(e=d[this.DEFAULT_EVENT])}else e=this.events[this.DEFAULT_EVENT];if(e)if(this.queue)this.queue[this.queue.length]=[a,b,e,c];else this.doLog(a,b,e,c)},doLog:function(){OpenLayers.Console.error("doLog() not overridden in: "+this.CLASS_NAME)},CLASS_NAME:"Eniro.StatisticsHandler"});Eniro.AddaxHandler=OpenLayers.Class(Eniro.StatisticsHandler,{initialize:function(){Eniro.StatisticsHandler.prototype.initialize.apply(this,arguments);this.initReady()},destroy:function(){Eniro.StatisticsHandler.prototype.destroy.apply(this,arguments)},doLog:function(a,b,c,d){if(a==="content"&&c==="search"){this.startAddax(d);this.logGenericAddax(d)}else if(a==="contentItem"&&c==="search")this.logAddax(d);else a==="navigate"&&this.logAddax(d,c)},addaxParams:{search_id:0,vhost:"kartor.eniro.se"},startAddax:function(a){if(a.result.firstSearch)this.addaxParams={};if(!this.addaxParams.search_id)this.addaxParams.search_id=Math.floor(Math.random()*10000000001);this.addaxParams.vhost=this.getHostname(a.provider);if(a.result&&a.result.search&&a.result.search.q)this.addaxParams.search_word=a.result.search.q},logGenericAddax:function(a){var b;if(a&&a.result&&a.result.json&&a.result.json.search&&a.result.json.search[a.provider]&&a.result.json.search[a.provider].geoJSONResult&&a.result.json.search[a.provider].geoJSONResult.features&&a.result.json.search[a.provider].geoJSONResult.features[0]&&a.result.json.search[a.provider].geoJSONResult.features[0].properties&&a.result.json.search[a.provider].geoJSONResult.features[0].properties["e:statistics"])b=a.result.json.search[a.provider].geoJSONResult.features[0].properties["e:statistics"]["@src"]||a.result.json.search[a.provider].geoJSONResult.features[0].properties["e:statistics"]["e:img"]["@src"];if(b){var c={generic:1,customer_id:"",hits:a.result.json.search[a.provider].hits};if(a.result.search.where)c.geo_area=a.result.search.where;a.addaxUrl=b;this.logAddax(a,null,c)}},logAddax:function(a,b,c){c=c||{};c.page_type=b?b:this.isPredefined(a.provider)?c.generic&&c.generic===1?"scnc":"scne":"yp";if(a.addaxUrl&&a.addaxUrl.indexOf("area_code")>0&&(!c.generic||c.generic===0))c.geo_area=a.addaxUrl.replace(/.*area_code=([^&]*).*/,"$1");c.random=Math.floor(Math.random()*100001);var d=this.mergeUrlParams(a.addaxUrl,this.addaxParams);d=this.mergeUrlParams(d,c);this.loadImage(d)},isPredefined:function(a){return a.indexOf("_ptr_")>0},getHostname:function(a){var b="";return b=a==="yp_se"||a==="yp_ptr_se"?"kartor.eniro.se":a==="yp_fi"||a==="yp_ptr_fi"?"kartat.eniro.fi":a==="yp_dk"||a==="yp_ptr_dk"?"kort.eniro.dk":a==="yp_dk_krak"||a==="yp_ptr_dk_krak"?"map.krak.dk":""},mergeUrlParams:function(a,b){for(var c in b)if(a.indexOf(c)>0){var d=new RegExp(c+"=[^&]*");a=a.replace(d,c+"="+b[c])}else a+="&"+c+"="+b[c];return a},CLASS_NAME:"Eniro.AddaxHandler"});Eniro.StatisticsController.handlerMap.addax=Eniro.AddaxHandler;Eniro.ImgHandler=OpenLayers.Class(Eniro.StatisticsHandler,{initialize:function(){Eniro.StatisticsHandler.prototype.initialize.apply(this,arguments);this.initReady()},destroy:function(){Eniro.StatisticsHandler.prototype.destroy.apply(this,arguments)},doLog:function(a,b,c){this.loadImage(c)},CLASS_NAME:"Eniro.ImgHandler"});Eniro.StatisticsController.handlerMap.img=Eniro.ImgHandler;Eniro.NielsenHandler=OpenLayers.Class(Eniro.StatisticsHandler,{trac:{},initialize:function(){Eniro.StatisticsHandler.prototype.initialize.apply(this,arguments);var a=this;this.loadScript(this.script,function(){var b={cid:a.cid,content:a.start,server:a.server,page_url:window.location};a.trac=nol_t(b);a.initReady()})},destroy:function(){Eniro.StatisticsHandler.prototype.destroy.apply(this,arguments)},doLog:function(a,b,c,d){if(a==="page")b==="partner"?this.trac.pageEvent(b,d.partner):this.trac.pageEvent(b,c);else if(a==="content"){var e=this.formatContent(d,b);this.trac.sectionEvent(e,c)}else if(a==="print")this.trac.downloadEvent(b,c);else a==="navigate"&&this.trac.sectionEvent(e,c)},formatContent:function(a,b){if(a&&a.result)a=a.result.search;if(a&&a.q){var c=[];c.push(a.q);a.where&&c.push(a.where);return c.join(":")}else return b},CLASS_NAME:"Eniro.NielsenHandler"});Eniro.StatisticsController.handlerMap.nielsen=Eniro.NielsenHandler;Eniro.TnsGallupGetTmqsHandler=OpenLayers.Class(Eniro.StatisticsHandler,{initialize:function(){Eniro.StatisticsHandler.prototype.initialize.apply(this,arguments);var a=this;this.loadScript(this.script,function(){a.initReady()})},destroy:function(){Eniro.StatisticsHandler.prototype.destroy.apply(this,arguments)},doLog:function(a,b,c){getTMqs.apply(window,c)},CLASS_NAME:"Eniro.TnsGallupGetTmqsHandler"});Eniro.StatisticsController.handlerMap["tnsgallup-gettmqs"]=Eniro.TnsGallupGetTmqsHandler;Eniro.TnsGallupSpringHandler=OpenLayers.Class(Eniro.StatisticsHandler,{initialize:function(){Eniro.StatisticsHandler.prototype.initialize.apply(this,arguments);this.iframe=jQuery('<iframe scrolling="no" frameborder="no"></iframe>').get(0);jQuery("body").append(this.iframe);var a=this.iframe.contentWindow||this.iframe.contentDocument,b=a;if(a.document)b=a.document;Eniro.TnsGallupSpringHandler.success=OpenLayers.Function.bind(this.initReady,this);var c=['<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>iFrame Loader</title>','<script type="text/javascript" src="'+this.script+'"><\/script>','<script type="text/javascript">window.parent.Eniro.TnsGallupSpringHandler.success();<\/script></head></html>'].join("");b.write(c)},destroy:function(){Eniro.StatisticsHandler.prototype.destroy.apply(this,arguments)},doLog:function(){if(this.iframe.contentWindow.spring){var a={s:"eniro",cp:"Eniro/GuleSider/kart",url:document.location.href};this.iframe.contentWindow.spring.c(a)}},CLASS_NAME:"Eniro.TnsGallupSpringHandler"});Eniro.StatisticsController.handlerMap["tnsgallup-spring"]=Eniro.TnsGallupSpringHandler;Eniro.XGemiusHandler=OpenLayers.Class(Eniro.StatisticsHandler,{initialize:function(){Eniro.StatisticsHandler.prototype.initialize.apply(this,arguments);this.initReady()},destroy:function(){Eniro.StatisticsHandler.prototype.destroy.apply(this,arguments)},doLog:function(a,b,c){if(window.pp_gemius_hit&&typeof window.pp_gemius_hit==="function")window.pp_gemius_hit(c);else{window.pp_gemius_identifier=c;this.loadScript(this.script)}},CLASS_NAME:"Eniro.XGemiusHandler"});Eniro.StatisticsController.handlerMap.xgemius=Eniro.XGemiusHandler;Eniro.DefgoHandler=OpenLayers.Class(Eniro.StatisticsHandler,{firstRun:true,initialize:function(){Eniro.StatisticsHandler.prototype.initialize.apply(this,arguments);this.destroyInit=OpenLayers.Function.bind(this.initReady,this);OpenLayers.Event.observe(window,"load",this.destroyInit)},destroy:function(){OpenLayers.Event.stopObserving(window,"load",this.destroyInit);this.destroyInit=null;Eniro.StatisticsHandler.prototype.destroy.apply(this,arguments)},doLog:function(a,b,c){if(this.firstRun){this.firstRun=false;jQuery("body").append('<div style="display:none" id="defgonetmessage" class="defgoDivTag"></div>');jQuery("body").append('<div id="survey" style="z-index: 1000000"></div>');var d=jQuery('<iframe scrolling="no" frameborder="no" width="1"></iframe>').get(0);jQuery("#survey").append(d);var e=d.contentWindow||d.contentDocument,f=e;if(e.document)f=e.document;var g=['<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',"<html>","<head>",'<meta http-equiv="Content-Type" content="text/html; charset=utf-8">',"<title>Defgo loader</title>",'<script type="text/javascript">',"var surveyOk=false;","var loaded=false;","<\/script>",'<script type="text/javascript" src="http://www.defgo.net/surveys/popup.asp?p='+c.p+"&t="+c.t+'" charset="UTF-8"><\/script>',"</head>",'<body onload="if (loaded) { PopUpWindow();}">','<img border="0" src="http://app01.defgosoftware.net/defgo/blank.gif" width="1" height="1" onload="surveyOk=true;">',"</body>","</html>"];g=g.join("\n");f.write(g);f.close()}},CLASS_NAME:"Eniro.DefgoHandler"});Eniro.StatisticsController.handlerMap.defgo=Eniro.DefgoHandler;Eniro.AdformHandler=OpenLayers.Class(Eniro.StatisticsHandler,{leads:[{trackpoint:[21552,76298],keywords:[2771705261,1152739986]},{trackpoint:[21552,76299],keywords:[2004639404,366852632],req:1},{trackpoint:[21552,76299],keywords:[2034281545,3288916321]},{trackpoint:[21552,76301],keywords:[313399036,3943409526]},{trackpoint:[21552,76302],keywords:[2478770364]},{trackpoint:[21552,76303],keywords:[3173463766]},{trackpoint:[21552,76303],keywords:[2906321920,4136544786]},{trackpoint:[21552,76303],keywords:[3441181474,16083495]},{trackpoint:[21552,76304],keywords:[3611011544,1289429810]},{trackpoint:[21552,76305],keywords:[2355711670]},{trackpoint:[21552,76305],keywords:[498629140,2366072709,2226203566,2322626082]}],regexp:/[,\s-]+/,initialize:function(){Eniro.StatisticsHandler.prototype.initialize.apply(this,arguments);this.iframeLoadScript(this.script,OpenLayers.Function.bind(function(){this.initReady()},this))},doLog:function(a,b,c,d){var e;if(e=b==="coords"?d.where:d.result.search.where){var f=this.match(e);f&&this.iframe.contentWindow.ADFtrack.apply(window,f.trackpoint)}},calcHits:function(a,b){for(var c=[],d=0;d<a.length;d++){var e=a[d];this.inArray(e,b)&&!this.inArray(e,c)&&c.push(e)}return c},inArray:function(a,b){for(var c=0;c<b.length;c++)if(a===b[c])return true;return false},fixCRC:function(a){var b=[];a=a.split(this.regexp);for(var c=0;c<a.length;c++)b[c]=Eniro.Crypto.crc32(a[c].toLowerCase());return b},match:function(a){a=this.fixCRC(a);for(var b=this.leads,c=0;c<b.length;c++){var d=b[c],e=this.calcHits(a,d.keywords).length,f=d.req||d.keywords.length;if(e>=f)return d}return null},CLASS_NAME:"Eniro.AdformHandler"});Eniro.StatisticsController.handlerMap.adform=Eniro.AdformHandler;Eniro.API=Eniro.API||{};Eniro.API.Map=OpenLayers.Class(Eniro.Map,{featureGroups:{},groupsForFeatures:{},apiAddedFeatures:[],initialize:function(a,b,c){Eniro.ImgPath=b+(b.substring(b.length-1)=="/"?"":"/")+"media/";OpenLayers.ImgPath=Eniro.ImgPath+"openlayers/";var d={activeLayers:[Eniro.Map.LAYER_MAP],zoomBar:true,layerSelector:true,navigationControl:true,keyboardControl:true,scaleLine:false,tileServer:"http://map01.eniro.com",showObliqueLayer:true,zoomBarOffset:46,layerBarOffset:4,language:"sv_se",copyrightPrefix:"&copy;",defaultPosition:{lonlat:new OpenLayers.LonLat(1188977.974810413,8418468.546044305),zoom:7}};OpenLayers.Util.extend(d,c);OpenLayers.Lang.setCode(d.language);Eniro.Config=Eniro.Config||{"appnode.url":d.tileServer,"appnode.alias":d.tileServer,"tile.version":"1.0.0"};Eniro.Map.prototype.initialize.apply(this,[a,d]);this.configureControls();this.setCenter(this.defaultPosition.lonlat,this.defaultPosition.zoom)},configureControls:function(){if(this.navigationControl){var a=new OpenLayers.Control.Navigation;this.addControl(a);a.dragPan.handler.stopDown=false}this.keyboardControl&&this.addControl(new OpenLayers.Control.KeyboardDefaults);if(this.layerSelector&&this.activeLayers.length>1){var b=new Eniro.ControlBarView({id:"layerbar",placement:"top",topOffset:this.layerBarOffset});this.addControl(b);var c=new Eniro.LayerBarView;b.addCenterControl(c);c.activate();b.activate()}if(this.zoomBar){var d=new Eniro.ControlBarView({id:"zoombar",placement:"bottom",bottomOffset:this.zoomBarOffset});this.addControl(d);var e=new Eniro.ZoomBarView;d.addCenterControl(e);e.activate();d.activate()}var f=new Eniro.ControlBarView({id:"footer",placement:"bottom",bottomOffset:17,underlay:true});this.addControl(f);var g=new Eniro.API.CopyrightDisplay({prefix:this.copyrightPrefix});f.addRightControl(g);if(this.scaleLine){var j=new Eniro.ScaleLine({id:"scaleline"});f.addLeftControl(j)}this.activeLayers.indexOf(Eniro.Map.LAYER_OBLIQUE)!==-1&&this.addControl(new Eniro.ObliqueCopyright);f.activate();this.statisticsController=new Eniro.StatisticsController;Eniro.AppEvents.triggerEvent(Eniro.Events.STATISTICS_LOG,{scope:"page",event:"search"});Eniro.AppEvents.register(Eniro.Events.OBLIQUE_LAYER_UPDATED,this,this.onObliqueLayerUpdated);Eniro.AppEvents.register(Eniro.Events.OBLIQUE_IMAGE_CHANGING,this,this.onObliqueImageChanging);Eniro.AppEvents.register(Eniro.Events.OBLIQUE_INITIALISING,this,this.onObliqueInitialising);Eniro.AppEvents.register(Eniro.Events.OBLIQUE_ACTIVATING,this,this.onObliqueActivating);Eniro.AppEvents.register(Eniro.Events.OBLIQUE_DEACTIVATING,this,this.onObliqueDeactivating)},destroy:function(){Eniro.AppEvents.unregister(Eniro.Events.OBLIQUE_LAYER_UPDATED,this,this.onObliqueLayerUpdated);Eniro.AppEvents.unregister(Eniro.Events.OBLIQUE_IMAGE_CHANGING,this,this.onObliqueImageChanging);Eniro.AppEvents.unregister(Eniro.Events.OBLIQUE_INITIALISING,this,this.onObliqueInitialising);Eniro.AppEvents.unregister(Eniro.Events.OBLIQUE_ACTIVATING,this,this.onObliqueActivating);Eniro.AppEvents.unregister(Eniro.Events.OBLIQUE_DEACTIVATING,this,this.onObliqueDeactivating);Eniro.Map.prototype.destroy.apply(this,arguments)},addFeature:function(a,b){b||(b="generic");this.featureGroups[b]||(this.featureGroups[b]=[]);if(typeof a=="object"&&a.constructor!=Array)a=[a];this.featureGroups[b]=this.featureGroups[b].concat(a);for(var c=0,d=a.length;c<d;c++)this.groupsForFeatures[a[c].id]=b;this.apiAddedFeatures=this.apiAddedFeatures.concat(a);this.wfs.addFeatures(a)},getGroupForFeature:function(a){return this.groupsForFeatures[a.id]},removeFeature:function(a){if(typeof a=="object"&&a.constructor!=Array)a=[a];for(var b=0,c=a.length;b<c;b++){var d=a[b],e=this.getGroupForFeature(d);delete this.groupsForFeatures[d.id];OpenLayers.Util.removeItem(this.featureGroups[e],d);OpenLayers.Util.removeItem(this.apiAddedFeatures,d)}this.wfs.removeFeatures(a)},getFeatureGroup:function(a){a||(a=generic);return this.featureGroups[a]||[]},removeFeatureGroup:function(a){if(this.featureGroups[a]){for(var b=this.featureGroups[a],c=0,d=b.length;c<d;c++){var e=b[c];OpenLayers.Util.removeItem(this.apiAddedFeatures,e);this.wfs.removeFeatures([e]);delete this.groupsForFeatures[e.id]}delete this.featureGroups[a];return true}else return false},setMapType:function(a){Eniro.Map.prototype.setMapType.apply(this,[a,true])},doChangeBaseLayer:function(a,b){var c=this.getControl("footer");if(c&&c.div)a===Eniro.Map.LAYER_OBLIQUE||a.layername&&a.layername===Eniro.Map.LAYER_OBLIQUE?jQuery(c.div).hide():jQuery(c.div).show();b=b===undefined?true:b;Eniro.Map.prototype.doChangeBaseLayer.apply(this,[a,b])},onObliqueActivating:function(){for(var a=0,b=this.apiAddedFeatures.length;a<b;a++){var c=this.apiAddedFeatures[a];c.__oblique_originalGeometry=c.geometry}this.wfs.removeFeatures(this.apiAddedFeatures)},onObliqueInitialising:function(){this.onObliqueLayerUpdated()},onObliqueDeactivating:function(){this.wfs.removeFeatures(this.apiAddedFeatures);for(var a=0,b=this.apiAddedFeatures.length;a<b;a++){var c=this.apiAddedFeatures[a];c.geometry=c.__oblique_originalGeometry;c.__oblique_originalGeometry=undefined}this.wfs.addFeatures(this.apiAddedFeatures)},onObliqueLayerUpdated:function(){for(var a=0,b=this.apiAddedFeatures.length;a<b;a++){var c=this.apiAddedFeatures[a];if(c.__oblique_originalGeometry){c.geometry=c.__oblique_originalGeometry.clone();c.geometry.transform(this.projection,this.obliqueLayer.obliqueProjection)}}this.wfs.addFeatures(this.apiAddedFeatures)},onObliqueImageChanging:function(){this.wfs.removeFeatures(this.apiAddedFeatures)},fromDegrees:function(a){return a.clone().transform(this.backendProjection,this.projection)},toDegrees:function(a){return a.clone().transform(this.projection,this.backendProjection)},CLASS_NAME:"Eniro.API.Map"});Eniro.API.CopyrightDisplay=OpenLayers.Class(Eniro.FooterView,{initialize:function(a){OpenLayers.Util.extend(this,a);Eniro.FooterView.prototype.initialize.apply(this,arguments);this.div=undefined},onMapTypesUpdate:function(a){var b=this.formatText(a.maptypes,this.map.getVisibleLayers());this.elements.copyright&&jQuery(this.elements.copyright).html(b)},draw:function(){this.div=this.createDiv();this.cssClasses.copyright=this.getCssClassName("copyright");jQuery(this.div).html((this.prefix?this.prefix+" ":"")+'<span class="'+this.cssClasses.copyright+'"></span>');return this.div},CLASS_NAME:"Eniro.API.CopyrightDisplay"});DDI.Maps={};(function(){DDI.Maps.Logo=OpenLayers.Class(OpenLayers.Control,{CLASS_NAME:"MapLogo"});})();OpenLayers.Lang.no_no={"send-error-report-dialog.header":"Meld om feil på kartet","send-error-report-dialog.info-message":"Her rapporterer du feil på kartet En direktelenke til det aktuelle kartbildet sendes automatisk med feilbeskrivelsen. Vil du vise eksakt hvor feilen ligger så kan du bruke GPS-verktøyet for å vise riktig posisjon. GPS-verktøyet finner du ved å klikke med høyre museknapp i kartet.<br/><br/>Mvh Eniro","send-error-report-dialog.error-description":"Beskriv feilen","send-error-report-dialog.error-description-max":"max 1000 tegn","send-error-report-dialog.reporter-name":"Ditt navn","send-error-report-dialog.reporter-email":"Din e-postadresse","send-error-report-dialog.send":"Send","send-error-report-dialog.subject":"Feilrapport for kart på ${profileName}","send-error-report-dialog.supportMailAddress":"kson01@eniro.com","send-error-report-dialog.error-nomessage":"Meldingen må være mellom et och 1000 tegn langt.","send-error-report-dialog.error-noname":"Skriv inn et navn og prøv igjen.","send-error-report-dialog.error-noaddress":"Fyll inn en adresse og prøv igjen.","suggest.more-suggest-info":"Utvid søket ditt for å få flere treff","l10n.hours":"${hours} tm","l10n.minutes":"${minutes} min","map.layers.map":"Kart","map.layers.aerial":"Flyfoto","map.layers.hybrid":"Hybrid","map.layers.nautical":"Sjøkart","map.layers.oblique":"Skråfoto","layer-bar-view.oblique":"Skråfoto","layer-bar-view.streetview":"Gatebilder","collapse":"Lukk","route-tab-view.title":"Kjørerute","route-tab-view.route-form.start":"Start","route-tab-view.route-form.via":"Via","route-tab-view.route-form.end":"Stopp","route-tab-view.route-form.waypoints":"Veipunkt","route-options.extend":"Legg til flere stopp på veien","route-options.direction":"Snu kjørerute","route-tab-view.route-form.show-standard":"Färre alternativer","route-tab-view.route-form.show-advanced":"Flere alternativer","route-tab-view.route-form.submit":"Vis kjørerute","route-tab-view.route-options.legend":"Alternativer","route-result.quicklinks-title":"Vis","route-result.quicklinks-overview":"Vis hela strekningen","route-result.quicklinks-start":"Start","route-result.quicklinks-goal":"Stopp","route-tab-view.route-form.caption-start":"Skriv startpunkt eller høyreklikk i kartet","route-tab-view.route-form.caption-goal":"Skriv sluttpunkt eller høyreklikk i kartet","route-result.print":"Skriv ut","route-result.print-tooltip":"Skriv ut kjørerute","route-result.road":"Vei","route-result.total-length":"Kjørestrekning:","route-result.total-duration":"Reisetid ca:","route-result.route-error":"Ingen kjørerute funnet. Endre søkeord, ved fx å flytte på en markør, og prøv igjen.","show-on-map-tool.traffic-cameras":"Veikamera","show-on-map-tool.speed-cameras":"Fotoboks","show-on-map-tool.pay-station":"Bomstasjoner","show-on-map-tool.traffic-information":"Trafikk-kork","show-on-map-tool.service-area":"Rasteplasser","show-on-map-tool.traffic":"Trafikk","show-on-map-tool.public-transportation":"Kollektivtrafikk","show-on-map-tool.measure-distance":"Mål strekning","show-on-map-tool.at-sea":"Til sjøss","show-on-map-tool.youtube-links":"Youtube-lenker","show-on-map-tool.webcams":"Webbkamera","show-on-map-tool.wikipedia-links":"Wikipedialenker","show-on-map-tool.GPS":"GPS","show-on-map-tool.hemnet":"Hemnet","show-on-map-tool.reststop":"Rasteplasser","show-on-map-tool.school":"Skoler","show-on-map-tool.speedcamera":"Fotoboks","show-on-map-tool.other":"Annet","route-options.legend":"Alternativer","route-options.by-car":"Bil","route-options.by-public-transport":"Kollektivtrafikk","route-options.by-car-tab-view.car":"Bil","route-options.by-public-transport-tab-view.car":"Kollektivtrafikk","toolbar-view.community-print":"Skriv ut","toolbar-view.community-share":"Del med andre","toolbar-view.community-link":"Link til kartet","toolbar-view.community-mail":"E-post","toolbar-view.community-sms":"SMS","toolbar-view.community-favorites":"Favoritter","toolbar-view.da-mapstate":"Koordinater","menu-form.save-as-favorites":"Lagre i favoritter","menu-form.save":"Lagre","auto-layers.camping":"Campingplass","auto-layers.church":"Kirke","auto-layers.bicycleparking":"Bysykkelparkering","auto-layers.speedcamera":"Fotoboks","auto-layers.zoom-here":"Zoom inn","auto-layers.more-hits":"Det er flere treff her. Zoom for å se alle.","auto-layers.popup.read-more":"Les mer...","auto-layers.popup.subway-timetable":"Rutetider","auto-layers.popup.train-timetable":"Togtider","auto-layers.popup.read-ski-info":"Les føremeldingen hos Skiforeningen","auto-layers.popup.become-ski-member":"Bli medlem i Skiforeningen","auto-layers.popup.tel":"Tel","show-on-map-control.title":"Vis på kart","show-on-map-control.no_traffic":"Trafikk","show-on-map-control.no_webcam":"Nettkamera","show-on-map-control.no_skiinfo":"Skiinfo","show-on-map-control.se_traffic":"Trafikk-kork","show-on-map-control.se_toll":"Bomstasjoner","show-on-map-control.se_subway":"T-bane","show-on-map-control.se_guestharbour":"Gjestehavn","show-on-map-control.se_naturalharbour":"Naturhavn","show-on-map-control.se_camera":"Webkamera","show-on-map-control.se_speedcamera":"Fotoboks","show-on-map-control.se_reststop":"Rasteplasser","show-on-map-control.gps":"GPS","show-on-map-control.hemnetpoi":"Bolig til salgs","show-on-map-control.zoom-here":"Zoom inn","show-on-map-control.more-hits":"Det er flere treff her. Zoom for å se alle.","show-on-map.popup.municipality":"Kommune","show-on-map.popup.tel":"Tel","show-on-map.popup.source":"Källa","show-on-map.popup.more-info":"Mer info","show-on-map.popup.open":"Åpent: <strong>${value}</strong>","show-on-map.popup.opendetails":"Åpningstider: ${value}","show-on-map.popup.harbourdepth":"Havnedybde: ${value}","show-on-map.popup.numberofberths":"${value} gjesteplasser","show-on-map.popup.moorings":"Fortøying: ${value}","show-on-map.popup.mooringfee":"Gjestehavnavgift: ${value}","show-on-map.popup.petrolstation":"Bensinstasjon","show-on-map.popup.dieselstation":"Dieselstasjon","show-on-map.popup.toilets":"Toalett","show-on-map.popup.disabledtoilets":"Handicaptoalett","show-on-map.popup.babychangingroom":"Stellerom","show-on-map.popup.restaurants":"Restauranter","show-on-map.popup.touristinformation":"Turistinformasjon","show-on-map.popup.motel":"Overnatting","show-on-map.popup.parkingcars":"Parkering (bil)","show-on-map.popup.harbour-services":"Havneservice: ${value}","show-on-map.popup.rest-stop-services":"Service: ${value}","show-on-map.popup.services.petrolstation":"bensinstasjon","show-on-map.popup.services.dieselstation":"dieselstasjon","show-on-map.popup.services.toilets":"WC","show-on-map.popup.services.disabledtoilets":"handicaptoalett","show-on-map.popup.services.freshwater":"ferskvann","show-on-map.popup.services.showers":"dusj","show-on-map.popup.services.sauna":"badstue","show-on-map.popup.services.payphone":"telefon","show-on-map.popup.services.electricaloutlets":"strøm","show-on-map.popup.services.wasteemptying":"sopmaja","show-on-map.popup.services.latrineemptyingfixed":"latringtömning","show-on-map.popup.services.boatyard":"båtvarv","show-on-map.popup.services.dancing":"dansbana","show-on-map.popup.services.bathplace":"badeplass","show-on-map.popup.services.shops":"butikker","show-on-map.popup.services.touristinformation":"turistinformasjon","show-on-map.popup.services.currencyexchange":"vekslingskontor","show-on-map.popup.services.pharmacy":"apotek","show-on-map.popup.services.childrensplayground":"lekeplass","show-on-map.popup.services.parkingtrucks":"parkering (lastebil)","show-on-map.popup.location":"Plass: ${value}","show-on-map.popup.roadname":"Vei: ${value}","show-on-map.popup.speedlimit":"Fartsgrense: ${value} km/h","footer-view.copy-url":"http://www.gulesider.no/gs/disclaimer.html","footer-view.company-url":"http://www.enironorge.no/no/","footer-view.company-title":"Eniro Norge AS","footer-view.contact-url":"http://www.gulesider.no/hjelp/kontakt.html","footer-view.contact-title":"Kontakt oss","footer-view.phone":"tlf 815 44 448","footer-view.publisher-title":"Ansvarlig redaktør: Jan-Erik Theien","footer-view.rights-url":"http://info.gulesider.no/nor/omkart.html","footer-view.rights-title":"Rettigheter","footer-view.tips-url":"http://www.gulesider.no/hjelp/kart.html","footer-view.tips-title":"Tips & triks","footer-view.report-error-url":"/"+new Date().getTime(),"footer-view.report-error-title":"Meld om feil","footer-view.report-error-mail":"fel@eniro.se","favorites-tool.favorites-menu.confirmation-text":"Er du sikker på at du vil slette favoritten?","route.start.south":"Start retning sør, kjør ${dist}","route.start.road.south":"Start retning sør på ${road}, kjør ${dist}","route.start.south-east":"Start retning sør-øst, kjør ${dist}","route.start.road.south-east":"Start retning sør-øst på ${road}, kjør ${dist}","route.start.south-west":"Start retning sør-vest, kjør ${dist}","route.start.road.south-west":"Start retning sør-vest på ${road}, kjør ${dist}","route.start.north":"Start retning nord, kjør ${dist}","route.start.road.north":"Start retning nord på ${road}, kjør ${dist}","route.start.north-east":"Start retning nord-øst, kjør ${dist}","route.start.road.north-east":"Start retning nord-øst på ${road}, kjør ${dist}","route.start.road.north-west":"Start retning nord-vest på ${road}, kjør ${dist}","route.start.north-west":"Start retning nord-vest, kjør ${dist}","route.start.west":"Start retning vest, kjør ${dist}","route.start.road.west":"Start retning vest på ${road}, kjør ${dist}","route.start.east":"Start retning øst, kjør ${dist}","route.start.road.east":"Start retning øst på ${road}, kjør ${dist}","route.dir.turn.right":"Sving til høyre, kjør ${dist}","route.dir.turn.left":"Sving til venstre, kjør ${dist}","route.dir.straight":"Kjør rett fram, kjør ${dist}","route.dir.onto":"Kjør in på ${road}, kjør ${dist}","route.dir.onto.turn":"Sving inn på ${road}, kjør ${dist}","route.dir.onto.turn.right":"Sving til høyre inn på ${road}, kjør ${dist}","route.dir.onto.turn.left":"Sving til venstre inn på ${road}, kjør ${dist}","route.dir.onto.straight":"Kjør rett fram inn på ${road}, kjør ${dist}","route.dir.cont":"Fortsett på ${road}, kjør ${dist}","route.dir.cont.turn":"Sving och fortsett på ${road}, kjør ${dist}","route.dir.cont.turn.right":"Hold høyre og fortsett på ${road}, kjør ${dist}","route.dir.cont.turn.left":"Hold venstre og fortsett på ${road}, kjør ${dist}","route.dir.cont.straight":"Fortsett rett fram inn på ${road}, kjør ${dist}","route.branch":"Ta avkjøring/påfart, kjør ${dist}","route.branch.right":"Hold høyre, kjør ${dist}","route.branch.left":"Hold venstre, kjør ${dist}","route.branch.cont":"Ta avkjøring/påfart og fortsett på ${road}, kjør ${dist}","route.branch.cont.right":"Hold høyre og fortsett på ${road}, kjør ${dist}","route.branch.cont.left":"Hold venstre og fortsett på ${road}, kjør ${dist}","route.branch.onto":"Ta avkjøring/påfart inn på ${road}, kjør ${dist}","route.branch.onto.right":"Hold høyre inn på ${road}, kjør ${dist}","route.branch.onto.left":"Hold venstre inn på ${road}, kjør ${dist}","route.ferryboard":"Kjør ombord på ferga","route.ferryboard.road":"Kjør ombord på ferga på ${road}","route.ferryexit.south":"Kjør av ferga og kjør retning sør, kjør ${dist}","route.ferryexit.south.road":"Kjør av ferga og kjør inn på ${road} retning sør, kjør ${dist}","route.ferryexit.south-east":"Kjør av ferga og kjør retning sør-øst, kjør ${dist}","route.ferryexit.south-east.road":"Kjør av ferga og kjør inn på ${road} retning sør-øst, kjør ${dist}","route.ferryexit.south-west":"Kjør av ferga og kjør retning sør-vest, kjør ${dist}","route.ferryexit.south-west.road":"Kjør av ferga og kjør inn på ${road} retning sør-vest, kjør ${dist}","route.ferryexit.north":"Kjør av ferga av färjan og kjør retning nord, kjør ${dist}","route.ferryexit.north.road":"Kjør av ferga og kjør inn på ${road} retning nord, kjør ${dist}","route.ferryexit.north-east":"Kjør av ferga og kjør retning nord-øst, kjør ${dist}","route.ferryexit.north-east.road":"Kjør av ferga og kjør inn på ${road} retning nord-øst, kjør ${dist}","route.ferryexit.north-west":"Kjør av ferga og kjør retning nord-vest, kjør ${dist}","route.ferryexit.north-west.road":"Kjør av ferga og kjør inn på ${road} retning nord-vest, kjør ${dist}","route.ferryexit.east":"Kjør av ferga og kjør retning øst, kjør ${dist}","route.ferryexit.east.road":"Kjør av ferga og kjør inn på ${road} retning øst, kjør ${dist}","route.ferryexit.west":"Kjør av ferga og kjør retning vest, kjør ${dist}","route.ferryexit.west.road":"Kjør av ferga og kjør inn på ${road} retning vest, kjør ${dist}","route.round.1.right":"Ta til høyre i rundkjøringa første avkjøring, kjør ${dist}","route.round.1.left":"Ta til venstre i rundkjøringa første avkjøring, kjør ${dist}","route.round.1.straight":"Kjør rett fram i rundkjøringa første avkjøring. Kjør ${dist}","route.round.1.cont":"Ta første avkjøring i rundkjøringa. Fortsett på ${road}, kjør ${dist}","route.round.1.cont.right":"Ta til høyre i rundkjøringa første avkjøring. Fortsett på ${road}, kjør ${dist}","route.round.1.cont.left":"Ta til venstre i rundkjøringa første avkjøring. Fortsett på ${road}, kjør ${dist}","route.round.1.cont.straight":"Kjør rett fram i rundkjøringa første avkjøring. Fortsett på ${road}, kjør ${dist}","route.round.1.onto":"Ta første avkjøring i rundkjøringa . Kjør inn på ${road}, kjør ${dist}","route.round.1.onto.right":"Ta til høyre i rundkjøringa første avkjøring. Kjør inn på ${road}, kjør ${dist}","route.round.1.onto.left":"Ta til venster i rundkjøringa første avkjøring. Kjør inn på ${road}, kjør ${dist}","route.round.1.onto.straight":"Kjør rett fram i rundkjøringa første avkjøring. Kjør inn på ${road}, kjør ${dist}","route.round.2.right":"Ta til høyre i rundkjøringa andre avkjøring, kjør ${dist}","route.round.2.left":"Ta til venstre i rundkjøringa andre avkjøring, kjør ${dist}","route.round.2.straight":"Kjør rett fram i rundkjøringa andre avkjøring, kjør ${dist}","route.round.2.cont":"Ta andre aavkjøring i rundkjøringa. Fortsett på ${road}, kjør ${dist}","route.round.2.cont.right":"Ta til høyre i rundkjøringa andre avkjøring. Fortsett på ${road}, kjør ${dist}","route.round.2.cont.left":"Ta til venstre i rundkjøringa andre avkjøring. Fortsett på ${road}, kjør ${dist}","route.round.2.cont.straight":"Kjør rett fram i rundkjøringa andre avkjøring. Fortsett på ${road}, kjør ${dist}","route.round.2.onto":"Ta andre avkjøring i rundkjøringa. Kjør inn på ${road}, kjør ${dist}","route.round.2.onto.right":"Ta til høyre i rundkjøringa andre avkjøring. Kjør inn på ${road}, kjør ${dist}","route.round.2.onto.left":"Ta til venstre i rundkjøringa andre avkjøring. Kjør inn på ${road}, kjør ${dist}","route.round.2.onto.straight":"Kjør rett fram i rundkjøringa andre avkjøring. Kjør inn på ${road}, kjør ${dist}","route.round.3.right":"Ta til høyre i rundkjøringa tredje avkjøring, kjør ${dist}","route.round.3.left":"Ta til venstre i rundkjøringa tredje avkjøring, kjør ${dist}","route.round.3.straight":"Kjør rett fram i rundkjøringa tredje avkjøring. Kjør ${dist}","route.round.3.cont":"Ta tredje avkjøring i rundkjøringa. Fortsett på ${road}, kjør ${dist}","route.round.3.cont.right":"Ta til høyre i rundkjøringa tredje avkjøring. Fortsett på ${road}, kjør ${dist}","route.round.3.cont.left":"Ta til venstre i rundkjøringa tredje avkjøring. Fortsett på ${road}, kjør ${dist}","route.round.3.cont.straight":"Kjør rett fram i rundkjøringa tredje avkjøring. Fortsett på ${road}, kjør ${dist}","route.round.3.onto":"Ta tredje avkjøring i rundkjøringa. Kjør inn på ${road}, kjør ${dist}","route.round.3.onto.right":"Ta til høyre i rundkjøringa tredje avkjøringa. Kjør inn på ${road}, kjør ${dist}","route.round.3.onto.left":"Ta til venstre i rundkjøringa tredje avkjøring. Kjør inn på ${road}, kjør ${dist}","route.round.3.onto.straight":"Kjør rett fram i rundkjøringa tredje avkjøring. Kjør inn på ${road}, kjør ${dist}","route.round.4.right":"Ta til høyre i rundkjøringa fjerde avkjøring, kjør ${dist}","route.round.4.left":"Ta til venstre i rundkjøringa fjerde avkjøring, kjør ${dist}","route.round.4.straight":"Kjør rett fram i rundkjøringa fjerde avkjøring. Kjør ${dist}","route.round.4.cont":"Ta fjerde avkjøring i rundkjøringa. Fortsett på ${road}, kjør ${dist}","route.round.4.cont.right":"Ta til høyre i rundkjøringa fjerde avkjøring. Fortsett på ${road}, kjør ${dist}","route.round.4.cont.left":"Ta til venstre i rundkjøringa fjerde avkjøring. Fortsett på ${road}, kjør ${dist}","route.round.4.cont.straight":"Kjør rett fram i rundkjøringa fjerde avkjøring. Fortsett på ${road}, kjør ${dist}","route.round.4.onto":"Ta fjerde avkjøring i rundkjøringa. Kjør inn på ${road}, kjør ${dist}","route.round.4.onto.right":"Ta til høyre i rundkjøringa fjerde avkjøring. Kjør inn på ${road}, kjør ${dist}","route.round.4.onto.left":"Ta til venstre i rundkjøringa fjerde avkjøring. Kjør inn på ${road}, kjør ${dist}","route.round.4.onto.straight":"Kjør rett fram i rundkjøringa fjerde avkjøring. Kjør inn på ${road}, kjør ${dist}","route.round.5.right":"Ta til høyre i rundkjøringa femte avkjøring, kjør ${dist}","route.round.5.left":"Ta til venstre i rundkjøringa femte avkjøring, kjør ${dist}","route.round.5.straight":"Kjør rett fram i rundkjøringa femte avkjøring. Kjør ${dist}","route.round.5.cont":"Ta femte avkjøring i rundkjøringa. Fortsett på ${road}, kjør ${dist}","route.round.5.cont.right":"Ta til høyre i rundkjøringa femte avkjøring. Fortsett på ${road}, kjør ${dist}","route.round.5.cont.left":"Ta til venstre i rundkjøringa femte avkjøring. Fortsett på ${road}, kjør ${dist}","route.round.5.cont.straight":"Kjør rett fram i rundkjøringa femte avkjøring. Fortsett på ${road}, kjør ${dist}","route.round.5.onto":"Ta femte avkjøring i rundkjøringa. Kjør inn på ${road}, kjør ${dist}","route.round.5.onto.right":"Ta til høyre i rundkjøringa femte avkjøring. Kjør inn på ${road}, kjør ${dist}","route.round.5.onto.left":" Ta til venstre i rundkjøringa femte avkjøring. Kjør inn på ${road}, kjør ${dist}","route.round.5.onto.straight":"Kjør rett fram i rundkjøringa femte avkjøring. Kjør inn på ${road}, kjør ${dist}","route.round.6.right":"Ta til høyre i rundkjøringa sjette avkjøring, kjør ${dist}","route.round.6.left":"Ta til venstre i rundkjøringa sjette avkjøring, kjør ${dist}","route.round.6.straight":"Kjør rett fram i rundkjøringa sjette avkjøring. Kjør ${dist}","route.round.6.cont":"Ta sjette avkjøring i rundkjøringa. Fortsett på ${road}, kjør ${dist}","route.round.6.cont.right":"Ta til høyre i rundkjøringa sjette avkjøring. Fortsett på ${road}, kjør ${dist}","route.round.6.cont.left":" Ta til venstre i rundkjøringa sjette avkjøring. Fortsett på ${road}, kjør ${dist}","route.round.6.cont.straight":"Kjør rett fram i rundkjøringa sjette avkjøring. Fortsett på ${road}, kjør ${dist}","route.round.6.onto":"Ta sjette avkjøring i rundkjøringa. Kjør inn på ${road}, kjør ${dist}","route.round.6.onto.right":" Ta til høyre i rundkjøringa sjette avkjøring. Kjør inn på ${road}, kjør ${dist}","route.round.6.onto.left":" Ta til venstre i rundkjøringa sjette avkjøring. Kjør inn på ${road}, kjør ${dist}","route.round.6.onto.straight":"Kjør rett fram i rundkjøringa sjette avkjøring. Kjør inn på ${road}, kjør ${dist}","route.round.7.right":"Ta til høyre i rundkjøringa sjuende avkjøring, kjør ${dist}","route.round.7.left":" Ta til venstre i rundkjøringa sjuende avkjøring, kjør ${dist}","route.round.7.straight":" Kjør rett fram i rundkjøringa sjuende avkjøring. Kjør ${dist}","route.round.7.cont":"Ta sjuende avkjøring i rundkjøringa. Fortsett på ${road}, kjør ${dist}","route.round.7.cont.right":" Ta til høyre i rundkjøringa sjuende avkjøring. Fortsett på ${road}, kjør ${dist}","route.round.7.cont.left":" Ta til venstre i rundkjøringa sjuende avkjøring. Fortsett på ${road}, kjør ${dist}","route.round.7.cont.straight":" Kjør rett fram i rundkjøringa sjuende avkjøring. Fortsett på ${road}, kjør ${dist}","route.round.7.onto":" Ta sjuende avkjøring i rundkjøringa. Kjør inn på ${road}, kjør ${dist}","route.round.7.onto.right":" Ta til høyre i rundkjøringa sjuende avkjøring. Kjør in på ${road}, kjør ${dist}","route.round.7.onto.left":" Ta til venstre i rundkjøringa sjuende avkjøring. Kjør inn på ${road}, kjør ${dist}","route.round.7.onto.straight":" Kjør rett fram i rundkjøringa sjuende avkjøring. Kjør inn på ${road}, kjør ${dist}","route.signpost":"Følg skilt mot ${signData}, kjør ${dist}","route.signpost.exit":"Følg skilt mot ${signData}, ta avkjøring ${exitInfo}, kjør ${dist}","route.signpost.branch":"Følg skilt mot ${signData}. Ta avkjøring/påfart, kör ${dist}","route.signpost.branch.exit":"Följ skylt mot ${signData}. Ta avfart/påfart ${exitInfo}, kjør ${dist}","route.signpost.branch.left":" Følg skilt mot ${signData}. Hold venstre, kjør ${dist}","route.signpost.branch.left.exit":" Følg skilt mot ${signData}. Hold venstre og ta avkjøring {exitInfo}, kjør ${dist}","route.signpost.branch.right":"Följ skylt mot ${signData}. Håll höger, kör ${dist}","route.signpost.branch.right.exit":" Følg skilt mot ${signData}. Hold høyre og ta avkjøring {exitInfo}, kjør ${dist}","route.signpost.branch.cont":" Følg skilt mot ${signData}. Ta avkjøring/påfart, fortsett på ${road}, kjør ${dist}","route.signpost.branch.cont.exit":" Følg skilt mot ${signData}. Ta avkjøring/påfart ${exitInfo}, fortsett på ${road}, kjør ${dist}","route.signpost.branch.cont.left":"Följ skylt mot ${signData}. Hold venstre og fortsett på ${road}, kjør ${dist}","route.signpost.branch.cont.left.exit":"Følg skilt mot ${signData}. Hold venstre og ta avkjøring ${exitInfo}, fortsett på ${road}, kjør ${dist}","route.signpost.branch.cont.right":" Følg skilt mot ${signData}. Hold høyre og fortsett på ${road}, kjør ${dist}","route.signpost.branch.cont.right.exit":" Følg skilt mot ${signData}. Hold høyre og ta avkjøring ${exitInfo}, fortsett på ${road}, kjør ${dist}","route.signpost.branch.onto":" Følg skilt mot ${signData}. Ta avkjøring/påfart inn på ${road}, kjør ${dist}","route.signpost.branch.onto.exit":" Følg skilt mot ${signData}. Ta avkjøring ${exitInfo} inn på ${road}, kjør ${dist}","route.signpost.branch.onto.left":" Følg skilt mot ${signData}. Hold venstre og ta avkjøring/påfart inn på ${road}, kjør ${dist}","route.signpost.branch.onto.left.exit":" Følg skilt mot ${signData}. Hold venstre og ta avkjøring ${exitInfo} inn på ${road}, kjør ${dist}","route.signpost.branch.onto.right":" Følg skilt mot ${signData}. Hold høyre og ta avkjøring/påfart inn på ${road}, kjør ${dist}","route.signpost.branch.onto.right.exit":" Følg skilt mot ${signData}. Hold høyre og ta avkjøring ${exitInfo} inn på ${road}, kjør ${dist}","route.signpost.branch.turn":" Følg skilt mot ${signData}. Sving av, kjør ${dist}","route.signpost.branch.turn.exit":" Følg skilt mot ${signData}. Sving ved avkjøring ${exitInfo}, kjør ${dist}.","route.signpost.branch.turn.left":" Følg skilt mot ${signData}. Sving venstre, kjør ${dist}","route.signpost.branch.turn.left.exit":" Følg skilt mot ${signData}. Sving venstre ved avkjøring ${exitInfo}, kjør ${dist}","route.signpost.branch.turn.right":" Følg skilt mot ${signData}. Sving høyre, kjør ${dist}","route.signpost.branch.turn.right.exit":" Følg skilt mot ${signData}. Sving høyre ved avkjøring ${exitInfo}, kjør ${dist}","route.signpost.branch.turn.onto":" Følg skilt mot mot ${signData}. Sving inn på ${road}, kjør ${dist}","route.signpost.branch.turn.onto.exit":" Følg skilt mot ${signData}. Sving av ved avkjøring ${exitInfo} inn på ${road}, kjør ${dist}","route.signpost.branch.turn.onto.left":" Følg skilt mot ${signData}. Sving venstre inn på ${road}, kjør ${dist}","route.signpost.branch.turn.onto.left.exit":" Følg skilt mot ${signData}. Sving venstre ved avkjøring ${exitInfo} inn på ${road}, kjør ${dist}","route.signpost.branch.turn.onto.right":" Følg skilt mot ${signData}. Sving høyre inn på ${road}, kjør ${dist}","route.signpost.branch.turn.onto.right.exit":" Følg skilt mot ${signData}. Sving høyre ved avkjøring ${exitInfo} inn på ${road}, kjør ${dist}","route.signpost.branch.turn.cont":" Følg skilt mot ${signData}. Sving av og fortsett på ${road}, kjør ${dist}","route.signpost.branch.turn.cont.exit":" Følg skilt mot ${signData}. Sving av ved avkjøring ${exitInfo}, og fortsett på ${road}, kjør ${dist}","route.signpost.branch.turn.cont.left":"Följ skylt mot ${signData}. Sving venstre og fortsett på ${road}, kjør ${dist}","route.signpost.branch.turn.cont.left.exit":" Følg skilt mot ${signData}. Sving venstre ved avkjøring ${exitInfo}, og fortsett på ${road}, kjør ${dist}","route.signpost.branch.turn.cont.right":" Følg skilt mot ${signData}. sving høyre og fortsett på ${road}, kjør ${dist}","route.signpost.branch.turn.cont.right.exit":" Følg skilt mot ${signData}. Sving høyre ved avkjøring ${exitInfo}, og fortsett på ${road}, kjør ${dist}","route.signpost.cont":" Følg skilt mot ${signData}. Fortsett på ${road}, kjør ${dist}","route.signpost.cont.exit":" Følg skilt mot ${signData}. Ta avkjøring ${exitInfo} og fortsett på ${road}, kjør ${dist}","route.signpost.onto":" Følg skilt mot ${signData}. Ta ${road}, kjør ${dist}","route.signpost.onto.exit":" Følg skilt mot ${signData}. Ta avkjøring ${exitInfo} og kjør inn på ${road}, kjør ${dist}","route.signpost.turn":"Följ skylt mot ${signData}. Sväng och kör ${dist}","route.signpost.turn.exit":" Følg skilt mot ${signData}. Sving og ta avkjøring ${exitInfo}, kjør ${dist}","route.signpost.turn.left":" Følg skilt mot ${signData}. Sving til venstre og kjør ${dist}","route.signpost.turn.left.exit":" Følg skilt mot ${signData}. Sving venstre og ta avkjøring ${exitInfo}, kjør ${dist}","route.signpost.turn.right":" Følg skilt mot ${signData}. Sving til høyre og kjør ${dist}","route.signpost.turn.right.exit":" Følg skilt mot ${signData}. Sving til høyre og ta avkjøring ${exitInfo}, kjør ${dist}","route.signpost.turn.cont":" Følg skilt mot ${signData}. Sving og fortsett på ${road}, kjør ${dist}","route.signpost.turn.cont.exit":" Følg skilt mot ${signData}. Sving og ta avkjøring ${exitInfo}, fortsett på ${road}, kjør ${dist}","route.signpost.turn.cont.left":" Følg skilt mot ${signData}. Sving til venstre og fortsett på ${road}, kjør ${dist}","route.signpost.turn.cont.left.exit":" Følg skilt mot ${signData}. Sving venstre og ta avkjøring ${exitInfo}, fortsett på ${road}, kjør ${dist}","route.signpost.turn.cont.right":" Følg skilt mot ${signData}. Sving til høyre og fortsett på ${road}, kjør ${dist}","route.signpost.turn.cont.right.exit":" Følg skilt mot ${signData}. Sving til høyre og ta avkjøring ${exitInfo}, fortsett på ${road}, kjør ${dist}","route.signpost.turn.onto":" Følg skilt mot ${signData}. Sving inn på ${road}, kjør ${dist}","route.signpost.turn.onto.exit":" Følg skilt mot ${signData}. Sving og ta avkjøring ${exitInfo} inn på ${road}, kjør ${dist}","route.signpost.turn.onto.left":" Følg skilt mot ${signData}. Sving til venstre inn på ${road}, kjør ${dist}","route.signpost.turn.onto.left.exit":" Følg skilt mot ${signData}. Sving til venstre og ta avkjøring ${exitInfo} inn på ${road}, kjør ${dist}","route.signpost.turn.onto.right":"Følg skilt mot ${signData}. Sving til høyre inn på ${road}, kjør ${dist}","route.signpost.turn.onto.right.exit":" Følg skilt mot ${signData}. Sving til høyre og ta avkjøring ${exitInfo} inn på ${road}, kjør ${dist}","route.sliproad":"Ta avkjøring/påfart, kjør ${dist}","route.sliproad.left":"Ta avkjøring/påfart venstre, kjør ${dist}","route.sliproad.right":"Ta avkjøring/påfart høyre, kjør ${dist}","route.sliproad.onto":"Ta avkjøring/påfart inn på ${road}, kjør ${dist}","route.sliproad.onto.left":"Ta avkjøring/påfart venstre inn på ${road}, kjør ${dist} ","route.sliproad.onto.right":"Ta avkjøring/påfart høyre inn på ${road}, kjør ${dist}","route-list-marker.popup.prev":"Forrige","route-list-marker.popup.next":"Neste","route-list-marker.popup.overview":"Vis hele strekningen","route-list-marker.popup.event.speedcameras":"Fotoboks","route-result.route-copyright":"© Copyright Tele Atlas","right-click-handler.set-start-point":"Sett startpunkt","right-click-handler.set-via-point":"Sett viapunkt","right-click-handler.set-end-point":"Sett sluttpunkt","right-click-handler.search":"Kartsøk","right-click-handler.route":"Kjørerute","right-click-handler.draw":"Tegn og mål","right-click-handler.zoom-in":"Zoom inn","right-click-handler.zoom-out":"Zoom ut","right-click-handler.gps":"GPS-koordinater","search-tab-view.title":"Kartsøk","search-tab-view.where":"Hvor","search-tab-view.q":"Hva","search-tab-view.map-search":"Kartsøk","search-tab-view-search":"Søk","search-tab-view.search":"Søk","search-tab-view.where-caption":"Adresse, gate, plats, ort eller koordinater","search-tab-view.what-caption":"Sted, firma, bransje, person eller nr","search-result-list-view.total-number":"Treff på","search-result-list-view.total-0":"Det finnes ingen treff i kartutsnittet. Zoom ut eller prøv andre søkeord.","search-result-list-view.total-1":"Du fikk","search-result-list-view.total-2":"treff.","search-result-list-view.total-3":" Du kan få et bedre resultat ved å presisere søket ditt eller zoom inn på kartan.","search-result-list-view.back-to-list":"Tilbake til trefflisten","search-result-list-view.back-to-single-address":"Tilbake til adressvyn","search-result-list-view.hits-outside":"Det finnes ${hits} treff utenfor søkeområdet","search-result-list-view.see-all-geo-hits":"Se alle ${hits} treff i adresser","search-result-item.route":"Kjørerute","search-result-item.click2call":"Ring oss gratis","search-result-item.reserve-table":"Book bord","search-result-item.send-flowers":"Send blomster","search-result-item.send-gift":"Send gave","search-result-item.bookmark-startlocation":"Sett som startpunkt","search-result-item.rating":"Omtale","search-result-item-info.route":"Kjørerute","search-result-item-info.frontdoor":"Vis Gatebild","search-result-item-info.frontdoor-alt":"Gatebild av ${address}","search-result-item-info.click2call":"Ring oss gratis","search-result-item-info.reserve-table":"Book bord","search-result-item-info.send-flowers-gifts":"Send blomster og gave","search-result-item-info.bookmark-startlocation":"Sett som startpunkt","search-result-item-info.rating":"Omtale","search-result-item-info.ratings":"omtaler","search-result-item-info.rate":"Skriv omtale","search-result-item-info.more-info":"Mer informasjon","search-result-item-info.company":"firma","search-result-item-info.person":"privatpersoner","search-result-item-info.at-this-address":"På denne adressen","search-result-item-info.homepage":"Hjemmeside","search-result-item-info.email":"E-post","search-result-item-info.blog":"Blogg","search-result-item-info.streetview-link":"Gatebilder","search-result-item-info.oblique-link":"Utsikter","search-result-item-info.skype":"Skype","search-result-item-info.title":"Tittel","search-result-item-info.networks":"Nettverk","search-result-item-info.employed_by":"Arbeidsgiver","search-result-item-info.nameday":"har navnedag","search-result-item-info.birthday":"fyller år","search-result-item-info.month-01":"jan","search-result-item-info.month-02":"feb","search-result-item-info.month-03":"mar","search-result-item-info.month-04":"apr","search-result-item-info.month-05":"mai","search-result-item-info.month-06":"jun","search-result-item-info.month-07":"jul","search-result-item-info.month-08":"aug","search-result-item-info.month-09":"sep","search-result-item-info.month-10":"okt","search-result-item-info.month-11":"nov","search-result-item-info.month-12":"des","search-result-item-info.abuse":"meld fra til oss","aggregated-popup-result-item.route":"Kjørerute","route-options.by-car-tab-view.show":"Vis","route-options.by-car-tab-view.avoid":"Unngå","route-options.by-car-tab-view.fastest":"Raskeste vei","route-options.by-car-tab-view.shortest":"Korteste vei","route-options.by-car-tab-view.highway":"Motorvei","route-options.by-car-tab-view.ferry":"Ferger","search-result-search-result-tab-view.previous":"Forrige ${hits} treff","search-result-search-result-tab-view.next":"Neste ${hits} treff","route-tab-view.route-form.road":"Vei","search-result-tab-view.yp_no.title":"Gule Sider","search-result-tab-view.wp_no.title":"Personer","search-result-tab-view.geo_no.title":"Sted","search-result-tab-view.hits":"treff","search-result-tab-view.previous":"Forrige","search-result-tab-view.next":"Neste","search-result-tab-view.wp-disclaimer":"Innhold markert med lysegrønn bakgrunn er lagt til av personen.","draw-tab-view.title":"Tegn og mål","draw-point-tab-view.title":"Sett punkt","draw-line-tab-view.title":"Mål distanse","draw-polygon-tab-view.title":"Mål areal","draw-tab-view.draw-point-tab-view.distance":"Distanse","draw-tab-view.draw-point-tab-view.undo":"Angre siste punktet","draw-tab-view.draw-point-tab-view.clear":"Ta bort hela distansen","draw-tab-view.draw-point-tab-view.step-1":"Marker punktet ditt ved å klikke i kartet","draw-tab-view.draw-point-tab-view.step-2":"Legg til en tekst om punktet","draw-tab-view.draw-point-tab-view.step-3":"Send kartet ditt til andre","draw-tab-view.draw-point-tab-view.link-to-map":"Link til kartet","draw-tab-view.draw-point-tab-view.mail":"E-post","draw-tab-view.draw-line-tab-view.distance":"Distanse","draw-tab-view.draw-line-tab-view.undo":"Angre siste punkt","draw-tab-view.draw-line-tab-view.clear":"Ta bort hele distansen","draw-tab-view.draw-line-tab-view.step-1":"Mål og beregn en distanse i kartet","draw-tab-view.draw-line-tab-view.step-1-1":"- Klikk der du vil starte å måle","draw-tab-view.draw-line-tab-view.step-1-2":"- Delete-tast for å ta bort det siste punktet","draw-tab-view.draw-line-tab-view.step-1-3":"- Dobbelklikk for å avslutte distansen","draw-tab-view.draw-line-tab-view.step-2":"Legg til en tekst om distansen","draw-tab-view.draw-line-tab-view.step-3":"Send kartet til andre","draw-tab-view.draw-line-tab-view.travel-by-bicycle":"Sykle (17 km/h)","draw-tab-view.draw-line-tab-view.travel-by-foot":"Gå (5 km/h)","draw-tab-view.draw-line-tab-view.travel-by-sailboat":"Seilbåt (5 Knop)","draw-tab-view.draw-line-tab-view.travel-by-motorboat":"Motorbåt (12 Knop)","draw-tab-view.draw-line-tab-view.link-to-map":"Link til kartet","draw-tab-view.draw-line-tab-view.mail":"E-post","draw-tab-view.draw-polygon-tab-view.distance":"Areal","draw-tab-view.draw-polygon-tab-view.undo":"Angre siste punktet","draw-tab-view.draw-polygon-tab-view.clear":"Ta bort hele arealet","draw-tab-view.draw-polygon-tab-view.step-1":"Mål et areal i kartet","draw-tab-view.draw-polygon-tab-view.step-1-1":"- Klikk der du vil starte å måle","draw-tab-view.draw-polygon-tab-view.step-1-2":"- Bruk delete-tast for å ta bort det siste punktet","draw-tab-view.draw-polygon-tab-view.step-1-3":"- Dobbelklikk for å avslutte arealet","draw-tab-view.draw-polygon-tab-view.step-2":"Legg til en tekst om arealet","draw-tab-view.draw-polygon-tab-view.step-3":"Send kartet til andre","draw-tab-view.draw-polygon-tab-view.link-to-map":"Link til kartet","draw-tab-view.draw-polygon-tab-view.mail":"E-post","draw-marker.popup.button-remove":"Fjern","draw-marker.popup.button-save":"Lagre","draw-marker.popup.link-route":"Kjørerute","draw-marker.popup.link-edit":"Endre","draw-marker.popup.link-remove":"Fjern","draw-marker.popup.area":"Areal","draw-marker.popup.length":"Distanse","draw-marker.popup.description":"Beskrivelse:","draw-tooltip.segment-length":"Delstrekning","draw-tooltip.total-length":"Totalstrekning","draw-tooltip.nagle":"Bäring","draw-tooltip.total-area":"Areal","draw-tooltip.dblclick-to-close":"Dobbelklikk for å avslutte","oblique-missing.oblique-tooltip":"Skråfoto er dessverre ikke tilgjengelig for det valgte området","skråfoto-copyright.cowi":"© COWI 2008","street-view-side-bar.street-view-list.more-streetview":"Flere gatebilder","street-view-side-bar.back-to-map":"Tilbake til kart","oblique-side-bar.oblique-list.more-oblique":"Flere skråfoto","oblique-side-bar.back-to-map":"Tilbake til kart","oblique-side-bar.orientation-north":"Se området fra nord","oblique-side-bar.orientation-south":"Se området fra sør","oblique-side-bar.orientation-east":"Se området fra øst","oblique-side-bar.orientation-west":"Se området fra vest","street-view-list.stockholm":"Stockholm","street-view-list.goteborg":"Gøteborg","street-view-list.malmo":"Malmø","street-view-list.uppsala":"Uppsala","street-view-list.linkoping":"Linkøping","street-view-list.jonkoping":"Jönköping","street-view-list.lund":"Lund","street-view-list.oslo":"Oslo","street-view-list.trondheim":"Trondheim","street-view-list.bergen":"Bergen","street-view-list.kopenhamn":"Kjøbenhavn","street-view-list.arhus":"Århus","street-view-list.odense":"Odense","street-view-list.helsinki":"Helsingfors","street-view-list.tampere":"Tammerfors","street-view-list.turku":"Åbo","street-view-list.orebro":"Örebro","oblique-list.stockholm":"Stockholm","oblique-list.goteborg":"Gøteborg","oblique-list.malmo":"Malmø","oblique-list.boras":"Borås","oblique-list.eskilstuna":"Eskilstuna","oblique-list.falun":"Falun","oblique-list.gavle":"Gävle","oblique-list.halmstad":"Halmstad","oblique-list.helsingborg":"Helsingborg","oblique-list.jonkoping":"Jönköping","oblique-list.kalmar":"Kalmar","oblique-list.karlskrona":"Karlskrona","oblique-list.karlstad":"Karlstad","oblique-list.kristianstad":"Kristianstad","oblique-list.kungsbacka":"Kungsbacka","oblique-list.linkoping":"Linköping","oblique-list.lulea":"Luleå","oblique-list.norrkoping":"Norrköping","oblique-list.skelleftea":"Skellefteå","oblique-list.skovde":"Skövde","oblique-list.sodertalje":"Södertälje","oblique-list.sundsvall":"Sundsvall","oblique-list.trollhattan":"Trollhättan","oblique-list.uddevalla":"Uddevalla","oblique-list.umea":"Umeå","oblique-list.uppsala":"Uppsala","oblique-list.varberg":"Varberg","oblique-list.vasteras":"Västerås","oblique-list.vaxjo":"Växjö","oblique-list.orebro":"Örebro","oblique-list.boras":"Borås","oblique-list.ornskoldsvik":"Örnsköldsvik","oblique-list.ostersund":"Östersund","oblique-list.kobenhavn":"Kjøbenhavn","oblique-list.arhus":"Århus","oblique-list.odense":"Odense","oblique-list.roskilde":"Roskilde","oblique-list.viborg":"Viborg","oblique-list.nyborg":"Nyborg","oblique-list.slagelse":"Slagelse","oblique-list.sonderborg":"Sønderborg","oblique-list.hillerod":"Hillerød","oblique-list.horsholm":"Hørsholm","oblique-list.orbek":"Ørbæk","oblique-list.ullerslevnyborg":"Ullerslev, Nyborg","oblique-list.aalborg":"Ålborg","oblique-list.esbjerg":"Esbjerg","oblique-list.horsens":"Horsens","oblique-list.nestved":"Næstved","oblique-list.niva":"Nivå","oblique-list.randers":"Randers","oblique-list.silkeborg":"Silkeborg","oblique-list.espoo":"Espoo","oblique-list.helsinki":"Helsinki","oblique-list.hameenlinna":"Hämeenlinna","oblique-list.joensuu":"Joensuu","oblique-list.jyvaskyla":"Jyväskylä","oblique-list.kaarina":"Kaarina","oblique-list.kauniainen":"Kauniainen","oblique-list.kerava":"Kerava","oblique-list.kotka":"Kotka","oblique-list.kuopio":"Kuopio","oblique-list.lahti":"Lahti","oblique-list.lappeenranta":"Lappeenranta","oblique-list.pori":"Pori","oblique-list.tampere":"Tampere","oblique-list.turku":"Turku","oblique-list.helsingfors":"Helsingfors","oblique-list.vaasa":"Vaasa","oblique-list.vantaa":"Vantaa","oblique-list.asker":"Asker","oblique-list.bergen":"Bergen","oblique-list.bodo":"Bodø","oblique-list.brumunddal":"Brumunddal","oblique-list.drammen":"Drammen","oblique-list.fredrikstad":"Fredrikstad","oblique-list.gjovik":"Gjøvik","oblique-list.hamar":"Hamar","oblique-list.harstad":"Harstad","oblique-list.haugesund":"Haugesund","oblique-list.honefoss":"Hønefoss","oblique-list.kristiansand":"Kristiansand","oblique-list.larvik":"Larvik","oblique-list.lillehammer":"Lillehammer","oblique-list.moelv":"Moelv","oblique-list.narvik":"Narvik","oblique-list.oslo":"Oslo","oblique-list.porsgrunn":"Porsgrunn","oblique-list.raufoss":"Raufoss","oblique-list.sandefjord":"Sandefjord","oblique-list.sandnes":"Sandnes","oblique-list.sarpsborg":"Sarpsborg","oblique-list.skien":"Skien","oblique-list.stavanger":"Stavanger","oblique-list.stokke":"Stokke","oblique-list.tjome":"Tjøme","oblique-list.tromso":"Tromsø","oblique-list.trondheim":"Trondheim","oblique-list.tonsberg":"Tønsberg","toolbar-view.mapcontrol-back":"Tilbake","toolbar-view.mapcontrol-reset":"Rensa","street-view-holder.need-flash":"Gatebilder trenger <a href=\"http://get.adobe.com/flashplayer/\">Adobe Flash</a>.","aggregate-wfs-marker.popupHeading_yp":"${quantity} firma på ${streetName}","aggregate-wfs-marker.popupHeading_wp":"${quantity} personer på ${streetName}","aggregate-wfs-marker.popupHeading_geo":"${quantity} treff på ${streetName}","street-view-side-bar.street-view-list.sweden":"Sverige","street-view-side-bar.street-view-list.norway":"Norge","street-view-side-bar.street-view-list.denmark":"Danmark","street-view-side-bar.street-view-list.finland":"Finland","oblique-side-bar.oblique-list.sweden":"Sverige","oblique-side-bar.oblique-list.denmark":"Danmark","oblique-side-bar.oblique-list.finland":"Finland","revgc.unknown-place":"Navnløs vei","state.error.title":"Linken fungerer kanskje ikke som ventet:","state.error.draw":"Tegn og mål","state.error.draw.too_much_data":"Det oppmålte objektet inneholder for mange punkter.","link-dialog.text":"Marker og kopier linken under og lim den inn i en mail eller på en hjemmeside.","link-dialog.submit":"Kopier","map-state-dialog.text":"Koordinater for kartet","map-state-dialog.submit":"Kopier koordinater","send-mail-dialog.recipient":"Mottakere","send-mail-dialog.sender":"Avsender","send-mail-dialog.text":"Fyll i feltet og klikk på send for å maile kartet.","send-mail-dialog.recipient-message":"Melding","send-mail-dialog.info-message":"(max 300 tegn)","send-mail-dialog.recipient-mail":"E-postadresse","send-mail-dialog.sender-name":"Ditt navn","send-mail-dialog.sender-mail":"Din e-postadresse","send-mail-dialog.send":"Send","send-mail-dialog.error-nomessage":"Meldingen må være mellom ett og 300 tegn.","send-mail-dialog.error-noname":"Skriv in et navn og prøv igjen.","send-mail-dialog.error-noaddress":"Fyll inn en adresse og prøv igjen.","send-mail-dialog.help-recipients":"Send til flere adresser ved å separere adressene med et komma: mail1@mail.com, mail2@mail.com.","send-mail-tool.subject":"Kart fra ${profileName}","send-sms-dialog.text":"Fyll i et nummer under for å sende kartet som en WAP-link til mobil.","send-sms-dialog.recipient-number":"Mobilnummer","send-sms-dialog.info":"Du får sende max 5 SMS om dagen per nummer.","send-sms-dialog.error-number":"Ugyldig telefonnummer","send-sms-dialog.send":"Send","toolbar-view.send-sms-tool.search-header":"Klikk på linken for å søkeresultatet!","toolbar-view.send-sms-tool.route-header":"Klikk på linken for kjørerute!","toolbar-view.send-sms-tool.footer":"Mvh, Eniro","toolbar-view.send-sms-tool.footer-118118":"Mvh, 118118","toolbar-view.send-sms-tool.limit-reached":"Dette nummeret har allerede mottatt fem SMS i dag.","toolbar-view.send-sms-tool.error":"En feil har oppstått. Prøv igjen seinere.","toolbar-view.send-sms-tool.message-sent":"Meldingen er nå sendt.","share-dialog.text":"Del kartet med dine venner.","sellable.pre-defined-y-p.logotype-for":"Logotype","sellable.pre-defined-y-p.company-on-map":"Firma på kartet","sellable.pre-defined-y-p.close":"Lukk","sellable.predefinedyp-tab-view.previous":"Forrige","sellable.predefinedyp-tab-view.next":"Neste","zoom-bar-view.zoom-in":"Zoom inn","zoom-bar-view.zoom-out":"Zoom ut","print-route.road":"Vei","print-route.from":"Start","print-route.to":"Stopp","print-route.total-distance":"Avstand","print-route.total-duration":"Ca reisetid","print-route.duration":"Ca","print-route.seconds":"sekund","print-route.minutes":"minutt","print-route.hours":"timer","print-route.total":"Totalt","print-route.route-copyright":"© Copyright Tele Atlas","print.submit":"Skriv ut","print-draw.error.draw.too_much_data":"Det oppmålte objektet inneholder for mange punkt.","popup-website":"Hjemmesida","g-p-s.title":"Koordinater","g-p-s.wgs84":"WGS 84","g-p-s.decimal":"WGS 84 - desimal","g-p-s.rt90":"RT90","g-p-s.sweref99":"SWEREF99"};OpenLayers.Lang.defaultCode='no_no';