var OpenLayers={singleFile:true};(function(){var o=(typeof OpenLayers=="object"&&OpenLayers.singleFile);window.OpenLayers={_scriptName:(!o)?"lib/OpenLayers.js":"OpenLayers.js",_getScriptLocation:function(){var d="";var b=new RegExp("(^|(.*?\\/))("+OpenLayers._scriptName+")(\\?|$)");var g=document.getElementsByTagName("script");for(var e=0,a=g.length;e<a;e++){var c=g[e].getAttribute("src");if(c){var f=c.match(b);if(f){d=f[1];break}}}return d}};if(!o){var n=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");var v=navigator.userAgent;var s=(v.match("MSIE")||v.match("Safari"));if(s){var w=new Array(n.length)}var m=OpenLayers._getScriptLocation()+"lib/";for(var u=0,q=n.length;u<q;u++){if(s){w[u]="<script src='"+m+n[u]+"'><\/script>"}else{var i=document.createElement("script");i.src=m+n[u];var r=document.getElementsByTagName("head").length?document.getElementsByTagName("head")[0]:document.body;r.appendChild(i)}}if(s){document.write(w.join(""))}}})();OpenLayers.VERSION_NUMBER="OpenLayers 2.8 -- $Revision: 9492 $";OpenLayers.String={startsWith:function(c,d){return(c.indexOf(d)==0)},contains:function(c,d){return(c.indexOf(d)!=-1)},trim:function(b){return b.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},camelize:function(j){var l=j.split("-");var g=l[0];for(var m=1,i=l.length;m<i;m++){var k=l[m];g+=k.charAt(0).toUpperCase()+k.substring(1)}return g},format:function(g,i,f){if(!i){i=window}var e=function(a,l){var b;var c=l.split(/\.+/);for(var d=0;d<c.length;d++){if(d==0){b=i}b=b[c[d]]}if(typeof b=="function"){b=f?b.apply(null,f):b()}if(typeof b=="undefined"){return"undefined"}else{return b}};return g.replace(OpenLayers.String.tokenRegEx,e)},tokenRegEx:/\$\{([\w.]+?)\}/g,numberRegEx:/^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/,isNumeric:function(b){return OpenLayers.String.numberRegEx.test(b)},numericIf:function(b){return OpenLayers.String.isNumeric(b)?parseFloat(b):b}};if(!String.prototype.startsWith){String.prototype.startsWith=function(b){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.String.startsWith"}));return OpenLayers.String.startsWith(this,b)}}if(!String.prototype.contains){String.prototype.contains=function(b){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.String.contains"}));return OpenLayers.String.contains(this,b)}}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(e,f){var d=0;if(f>0){d=parseFloat(e.toPrecision(f))}return d},format:function(r,u,m,k){u=(typeof u!="undefined")?u:0;m=(typeof m!="undefined")?m:OpenLayers.Number.thousandsSeparator;k=(typeof k!="undefined")?k:OpenLayers.Number.decimalSeparator;if(u!=null){r=parseFloat(r.toFixed(u))}var s=r.toString().split(".");if(s.length==1&&u==null){u=0}var q=s[0];if(m){var o=/(-?[0-9]+)([0-9]{3})/;while(o.test(q)){q=q.replace(o,"$1"+m+"$2")}}var n;if(u==0){n=q}else{var l=s.length>1?s[1]:"0";if(u!=null){l=l+new Array(u-l.length+1).join("0")}n=q+k+l}return n}};if(!Number.prototype.limitSigDigs){Number.prototype.limitSigDigs=function(b){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.Number.limitSigDigs"}));return OpenLayers.Number.limitSigDigs(this,b)}}OpenLayers.Function={bind:function(f,d){var e=Array.prototype.slice.apply(arguments,[2]);return function(){var a=e.concat(Array.prototype.slice.apply(arguments,[0]));return f.apply(d,a)}},bindAsEventListener:function(c,d){return function(a){return c.call(d,a||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(b){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.Function.bindAsEventListener"}));return OpenLayers.Function.bindAsEventListener(this,b)}}OpenLayers.Array={filter:function(k,l,i){var n=[];if(Array.prototype.filter){n=k.filter(l,i)}else{var j=k.length;if(typeof l!="function"){throw new TypeError()}for(var o=0;o<j;o++){if(o in k){var m=k[o];if(l.call(i,m,o,k)){n.push(m)}}}}return n}};OpenLayers.Class=function(){var l=function(){if(arguments&&arguments[0]!=OpenLayers.Class.isPrototype){this.initialize.apply(this,arguments)}};var m={};var j,g;for(var k=0,i=arguments.length;k<i;++k){if(typeof arguments[k]=="function"){if(k==0&&i>1){g=arguments[k].prototype.initialize;arguments[k].prototype.initialize=function(){};m=new arguments[k];if(g===undefined){delete arguments[k].prototype.initialize}else{arguments[k].prototype.initialize=g}}j=arguments[k].prototype}else{j=arguments[k]}OpenLayers.Util.extend(m,j)}l.prototype=m;return l};OpenLayers.Class.isPrototype=function(){};OpenLayers.Class.create=function(){return function(){if(arguments&&arguments[0]!=OpenLayers.Class.isPrototype){this.initialize.apply(this,arguments)}}};OpenLayers.Class.inherit=function(){var j=arguments[0];var i=new j(OpenLayers.Class.isPrototype);for(var k=1,g=arguments.length;k<g;k++){if(typeof arguments[k]=="function"){var f=arguments[k];arguments[k]=new f(OpenLayers.Class.isPrototype)}OpenLayers.Util.extend(i,arguments[k])}return i};OpenLayers.Util={};OpenLayers.Util.getElement=function(){var g=[];for(var i=0,f=arguments.length;i<f;i++){var e=arguments[i];if(typeof e=="string"){e=document.getElementById(e)}if(arguments.length==1){return e}g.push(e)}return g};if(typeof window.$==="undefined"){window.$=OpenLayers.Util.getElement}OpenLayers.Util.extend=function(g,i){g=g||{};if(i){for(var j in i){var k=i[j];if(k!==undefined){g[j]=k}}var f=typeof window.Event=="function"&&i instanceof window.Event;if(!f&&i.hasOwnProperty&&i.hasOwnProperty("toString")){g.toString=i.toString}}return g};OpenLayers.Util.removeItem=function(f,d){for(var e=f.length-1;e>=0;e--){if(f[e]==d){f.splice(e,1)}}return f};OpenLayers.Util.clearArray=function(b){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"array = []"}));b.length=0};OpenLayers.Util.indexOf=function(g,i){for(var e=0,f=g.length;e<f;e++){if(g[e]==i){return e}}return -1};OpenLayers.Util.modifyDOMElement=function(o,l,q,n,k,r,m,j){if(l){o.id=l}if(q){o.style.left=q.x+"px";o.style.top=q.y+"px"}if(n){o.style.width=n.w+"px";o.style.height=n.h+"px"}if(k){o.style.position=k}if(r){o.style.border=r}if(m){o.style.overflow=m}if(parseFloat(j)>=0&&parseFloat(j)<1){o.style.filter="alpha(opacity="+(j*100)+")";o.style.opacity=j}else{if(parseFloat(j)==1){o.style.filter="";o.style.opacity=""}}};OpenLayers.Util.createDiv=function(u,k,l,n,o,r,s,m){var q=document.createElement("div");if(n){q.style.backgroundImage="url("+n+")"}if(!u){u=OpenLayers.Util.createUniqueID("OpenLayersDiv")}if(!o){o="absolute"}OpenLayers.Util.modifyDOMElement(q,u,k,l,o,r,s,m);return q};OpenLayers.Util.createImage=function(u,l,m,o,q,r,n,k){var s=document.createElement("img");if(!u){u=OpenLayers.Util.createUniqueID("OpenLayersDiv")}if(!q){q="relative"}OpenLayers.Util.modifyDOMElement(s,u,l,m,q,r,null,n);if(k){s.style.display="none";OpenLayers.Event.observe(s,"load",OpenLayers.Function.bind(OpenLayers.Util.onImageLoad,s));OpenLayers.Event.observe(s,"error",OpenLayers.Function.bind(OpenLayers.Util.onImageLoadError,s))}s.style.alt=u;s.galleryImg="no";if(o){s.src=o}return s};OpenLayers.Util.setOpacity=function(c,d){OpenLayers.Util.modifyDOMElement(c,null,null,null,null,null,null,d)};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 l=this.urls;if(l&&l instanceof Array&&l.length>1){var k=this.src.toString();var m,i;for(i=0;m=l[i];i++){if(k.indexOf(m)!=-1){break}}var j=Math.floor(l.length*Math.random());var g=l[j];i=0;while(g==m&&i++<4){j=Math.floor(l.length*Math.random());g=l[j]}this.src=k.replace(m,g)}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 g=navigator.appVersion.split("MSIE");var f=parseFloat(g[1]);var e=false;try{e=!!(document.body.filters)}catch(i){}OpenLayers.Util.alphaHackNeeded=(e&&(f>=5.5)&&(f<7))}return OpenLayers.Util.alphaHackNeeded};OpenLayers.Util.modifyAlphaImageDiv=function(w,v,l,m,o,q,u,s,n){OpenLayers.Util.modifyDOMElement(w,v,l,m,q,null,null,n);var r=w.childNodes[0];if(o){r.src=o}OpenLayers.Util.modifyDOMElement(r,w.id+"_innerImage",null,m,"relative",u);if(OpenLayers.Util.alphaHack()){if(w.style.display!="none"){w.style.display="inline-block"}if(s==null){s="scale"}w.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+r.src+"', sizingMethod='"+s+"')";if(parseFloat(w.style.opacity)>=0&&parseFloat(w.style.opacity)<1){w.style.filter+=" alpha(opacity="+w.style.opacity*100+")"}r.style.filter="alpha(opacity=0)"}};OpenLayers.Util.createAlphaImageDiv=function(z,n,o,r,s,w,v,q,m){var A=OpenLayers.Util.createDiv();var u=OpenLayers.Util.createImage(null,null,null,null,null,null,null,false);A.appendChild(u);if(m){u.style.display="none";OpenLayers.Event.observe(u,"load",OpenLayers.Function.bind(OpenLayers.Util.onImageLoad,A));OpenLayers.Event.observe(u,"error",OpenLayers.Function.bind(OpenLayers.Util.onImageLoadError,A))}OpenLayers.Util.modifyAlphaImageDiv(A,z,n,o,r,s,w,v,q);return A};OpenLayers.Util.upperCaseObject=function(d){var e={};for(var f in d){e[f.toUpperCase()]=d[f]}return e};OpenLayers.Util.applyDefaults=function(g,i){g=g||{};var e=typeof window.Event=="function"&&i instanceof window.Event;for(var f in i){if(g[f]===undefined||(!e&&i.hasOwnProperty&&i.hasOwnProperty(f)&&!g.hasOwnProperty(f))){g[f]=i[f]}}if(!e&&i&&i.hasOwnProperty&&i.hasOwnProperty("toString")&&!g.hasOwnProperty("toString")){g.toString=i.toString}return g};OpenLayers.Util.getParameterString=function(l){var m=[];for(var r in l){var o=l[r];if((o!=null)&&(typeof o!="function")){var j;if(typeof o=="object"&&o.constructor==Array){var n=[];for(var q=0,k=o.length;q<k;q++){n.push(encodeURIComponent(o[q]))}j=n.join(",")}else{j=encodeURIComponent(o)}m.push(encodeURIComponent(r)+"="+j)}}return m.join("&")};OpenLayers.ImgPath="";OpenLayers.Util.getImagesLocation=function(){return OpenLayers.ImgPath||(OpenLayers._getScriptLocation()+"img/")};OpenLayers.Util.Try=function(){var j=null;for(var k=0,g=arguments.length;k<g;k++){var e=arguments[k];try{j=e();break}catch(i){}}return j};OpenLayers.Util.getNodes=function(f,d){var e=OpenLayers.Util.Try(function(){return OpenLayers.Util._getNodes(f.documentElement.childNodes,d)},function(){return OpenLayers.Util._getNodes(f.childNodes,d)});return e};OpenLayers.Util._getNodes=function(k,i){var f=[];for(var j=0,g=k.length;j<g;j++){if(k[j].nodeName==i){f.push(k[j])}}return f};OpenLayers.Util.getTagText=function(i,g,e){var f=OpenLayers.Util.getNodes(i,g);if(f&&(f.length>0)){if(!e){e=0}if(f[e].childNodes.length>1){return f.childNodes[1].nodeValue}else{if(f[e].childNodes.length==1){return f[e].firstChild.nodeValue}}}else{return""}};OpenLayers.Util.getXmlNodeValue=function(d){var c=null;OpenLayers.Util.Try(function(){c=d.text;if(!c){c=d.textContent}if(!c){c=d.firstChild.nodeValue}},function(){c=d.textContent});return c};OpenLayers.Util.mouseLeft=function(e,f){var d=(e.relatedTarget)?e.relatedTarget:e.toElement;while(d!=f&&d!=null){d=d.parentNode}return(d!=f)};OpenLayers.Util.DEFAULT_PRECISION=14;OpenLayers.Util.toFloat=function(c,d){if(d==null){d=OpenLayers.Util.DEFAULT_PRECISION}var c;if(d==0){c=parseFloat(c)}else{c=parseFloat(parseFloat(c).toPrecision(d))}return c};OpenLayers.Util.rad=function(b){return b*Math.PI/180};OpenLayers.Util.distVincenty=function(ar,au){var b=6378137,d=6356752.3142,C=1/298.257223563;var al=OpenLayers.Util.rad(au.lon-ar.lon);var f=Math.atan((1-C)*Math.tan(OpenLayers.Util.rad(ar.lat)));var s=Math.atan((1-C)*Math.tan(OpenLayers.Util.rad(au.lat)));var am=Math.sin(f),ap=Math.cos(f);var an=Math.sin(s),aq=Math.cos(s);var af=al,ak=2*Math.PI;var ai=20;while(Math.abs(af-ak)>1e-12&&--ai>0){var ad=Math.sin(af),at=Math.cos(af);var a=Math.sqrt((aq*ad)*(aq*ad)+(ap*an-am*aq*at)*(ap*an-am*aq*at));if(a==0){return 0}var W=am*an+ap*aq*at;var ae=Math.atan2(a,W);var ao=Math.asin(ap*aq*ad/a);var V=Math.cos(ao)*Math.cos(ao);var aj=W-2*am*an/V;var B=C/16*V*(4+C*(4-3*V));ak=af;af=al+(1-B)*C*Math.sin(ao)*(ae+B*a*(aj+B*W*(-1+2*aj*aj)))}if(ai==0){return NaN}var ab=V*(b*b-d*d)/(d*d);var ag=1+ab/16384*(4096+ab*(-768+ab*(320-175*ab)));var ah=ab/1024*(256+ab*(-128+ab*(74-47*ab)));var aa=ah*a*(aj+ah/4*(W*(-1+2*aj*aj)-ah/6*aj*(-3+4*a*a)*(-3+4*aj*aj)));var ac=d*ag*(ae-aa);var A=ac.toFixed(3)/1000;return A};OpenLayers.Util.getParameters=function(D){D=D||window.location.href;var E="";if(OpenLayers.String.contains(D,"?")){var C=D.indexOf("?")+1;var A=OpenLayers.String.contains(D,"#")?D.indexOf("#"):D.length;E=D.substring(C,A)}var i={};var B=E.split(/[&;]/);for(var v=0,u=B.length;v<u;++v){var w=B[v].split("=");if(w[0]){var r=decodeURIComponent(w[0]);var s=w[1]||"";s=s.split(",");for(var z=0,j=s.length;z<j;z++){s[z]=decodeURIComponent(s[z])}if(s.length==1){s=s[0]}i[r]=s}}return i};OpenLayers.Util.getArgs=function(b){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.Util.getParameters"}));return OpenLayers.Util.getParameters(b)};OpenLayers.Util.lastSeqID=0;OpenLayers.Util.createUniqueID=function(b){if(b==null){b="id_"}OpenLayers.Util.lastSeqID+=1;return b+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:0.0000254/OpenLayers.METERS_PER_INCH,Mil:2.54e-8/OpenLayers.METERS_PER_INCH,Centimeter:0.01/OpenLayers.METERS_PER_INCH,Kilometer:1000/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.001/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":50000/OpenLayers.METERS_PER_INCH,"150kilometers":150000/OpenLayers.METERS_PER_INCH});OpenLayers.Util.extend(OpenLayers.INCHES_PER_UNIT,{mm:OpenLayers.INCHES_PER_UNIT.Meter/1000,cm:OpenLayers.INCHES_PER_UNIT.Meter/100,dm:OpenLayers.INCHES_PER_UNIT.Meter*100,km:OpenLayers.INCHES_PER_UNIT.Meter*1000,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(c){var d=(c>1)?(1/c):c;return d};OpenLayers.Util.getResolutionFromScale=function(g,f){if(f==null){f="degrees"}var i=OpenLayers.Util.normalizeScale(g);var e=1/(i*OpenLayers.INCHES_PER_UNIT[f]*OpenLayers.DOTS_PER_INCH);return e};OpenLayers.Util.getScaleFromResolution=function(d,e){if(e==null){e="degrees"}var f=d*OpenLayers.INCHES_PER_UNIT[e]*OpenLayers.DOTS_PER_INCH;return f};OpenLayers.Util.safeStopPropagation=function(b){OpenLayers.Event.stop(b,true)};OpenLayers.Util.pagePosition=function(k){var i=0,l=0;var e=k;var j=k;while(e){if(e==document.body){if(OpenLayers.Element.getStyle(j,"position")=="absolute"){break}}i+=e.offsetTop||0;l+=e.offsetLeft||0;j=e;try{e=e.offsetParent}catch(m){OpenLayers.Console.error(OpenLayers.i18n("pagePositionFailed",{elemId:e.id}));break}}e=k;while(e){i-=e.scrollTop||0;l-=e.scrollLeft||0;e=e.parentNode}return[l,i]};OpenLayers.Util.isEquivalentUrl=function(j,k,m){m=m||{};OpenLayers.Util.applyDefaults(m,{ignoreCase:true,ignorePort80:true,ignoreHash:true});var g=OpenLayers.Util.createUrlObject(j,m);var i=OpenLayers.Util.createUrlObject(k,m);for(var l in g){if(l!=="args"){if(g[l]!=i[l]){return false}}}for(var l in g.args){if(g.args[l]!=i.args[l]){return false}delete i.args[l]}for(var l in i.args){return false}return true};OpenLayers.Util.createUrlObject=function(v,a){a=a||{};if(!(/^\w+:\/\//).test(v)){var q=window.location;var s=q.port?":"+q.port:"";var o=q.protocol+"//"+q.host.split(":").shift()+s;if(v.indexOf("/")===0){v=o+v}else{var r=q.pathname.split("/");r.pop();v=o+r.join("/")+"/"+v}}if(a.ignoreCase){v=v.toLowerCase()}var n=document.createElement("a");n.href=v;var u={};u.host=n.host.split(":").shift();u.protocol=n.protocol;if(a.ignorePort80){u.port=(n.port=="80"||n.port=="0")?"":n.port}else{u.port=(n.port==""||n.port=="0")?"80":n.port}u.hash=(a.ignoreHash||n.hash==="#")?"":n.hash;var w=n.search;if(!w){var m=v.indexOf("?");w=(m!=-1)?v.substr(m):""}u.args=OpenLayers.Util.getParameters(w);u.pathname=(n.pathname.charAt(0)=="/")?n.pathname:"/"+n.pathname;return u};OpenLayers.Util.removeTail=function(e){var i=null;var f=e.indexOf("?");var g=e.indexOf("#");if(f==-1){i=(g!=-1)?e.substr(0,g):e}else{i=(g!=-1)?e.substr(0,Math.min(f,g)):e.substr(0,f)}return i};OpenLayers.Util.getBrowserName=function(){var c="";var d=navigator.userAgent.toLowerCase();if(d.indexOf("opera")!=-1){c="opera"}else{if(d.indexOf("msie")!=-1){c="msie"}else{if(d.indexOf("safari")!=-1){c="safari"}else{if(d.indexOf("mozilla")!=-1){if(d.indexOf("firefox")!=-1){c="firefox"}else{c="mozilla"}}}}}return c};OpenLayers.Util.getRenderedDimensions=function(D,l,i){var u,A;var E=document.createElement("div");E.style.visibility="hidden";var r=(i&&i.containerElement)?i.containerElement:document.body;if(l){if(l.w){u=l.w;E.style.width=u+"px"}else{if(l.h){A=l.h;E.style.height=A+"px"}}}if(i&&i.displayClass){E.className=i.displayClass}var z=document.createElement("div");z.innerHTML=D;z.style.overflow="visible";if(z.childNodes){for(var B=0,C=z.childNodes.length;B<C;B++){if(!z.childNodes[B].style){continue}z.childNodes[B].style.overflow="visible"}}E.appendChild(z);r.appendChild(E);var s=false;var v=E.parentNode;while(v&&v.tagName.toLowerCase()!="body"){var w=OpenLayers.Element.getStyle(v,"position");if(w=="absolute"){s=true;break}else{if(w&&w!="static"){break}}v=v.parentNode}if(!s){E.style.position="absolute"}if(!u){u=parseInt(z.scrollWidth);E.style.width=u+"px"}if(!A){A=parseInt(z.scrollHeight)}E.removeChild(z);r.removeChild(E);return new OpenLayers.Size(u,A)};OpenLayers.Util.getScrollbarWidth=function(){var k=OpenLayers.Util._scrollbarWidth;if(k==null){var i=null;var j=null;var g=0;var f=0;i=document.createElement("div");i.style.position="absolute";i.style.top="-1000px";i.style.left="-1000px";i.style.width="100px";i.style.height="50px";i.style.overflow="hidden";j=document.createElement("div");j.style.width="100%";j.style.height="200px";i.appendChild(j);document.body.appendChild(i);g=j.offsetWidth;i.style.overflow="scroll";f=j.offsetWidth;document.body.removeChild(document.body.lastChild);OpenLayers.Util._scrollbarWidth=(g-f);k=OpenLayers.Util._scrollbarWidth}return k};OpenLayers.Element={visible:function(b){return OpenLayers.Util.getElement(b).style.display!="none"},toggle:function(){for(var i=0,f=arguments.length;i<f;i++){var e=OpenLayers.Util.getElement(arguments[i]);var g=OpenLayers.Element.visible(e)?"hide":"show";OpenLayers.Element[g](e)}},hide:function(){for(var f=0,e=arguments.length;f<e;f++){var d=OpenLayers.Util.getElement(arguments[f]);d.style.display="none"}},show:function(){for(var f=0,e=arguments.length;f<e;f++){var d=OpenLayers.Util.getElement(arguments[f]);d.style.display=""}},remove:function(b){b=OpenLayers.Util.getElement(b);b.parentNode.removeChild(b)},getHeight:function(b){b=OpenLayers.Util.getElement(b);return b.offsetHeight},getDimensions:function(g){g=OpenLayers.Util.getElement(g);if(OpenLayers.Element.getStyle(g,"display")!="none"){return{width:g.offsetWidth,height:g.offsetHeight}}var i=g.style;var k=i.visibility;var m=i.position;i.visibility="hidden";i.position="absolute";i.display="";var j=g.clientWidth;var l=g.clientHeight;i.display="none";i.position=m;i.visibility=k;return{width:j,height:l}},hasClass:function(d,e){var f=d.className;return(!!f&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(f))},addClass:function(c,d){if(!OpenLayers.Element.hasClass(c,d)){c.className+=(c.className?" ":"")+d}return c},removeClass:function(d,e){var f=d.className;if(f){d.className=OpenLayers.String.trim(f.replace(new RegExp("(^|\\s+)"+e+"(\\s+|$)")," "))}return d},toggleClass:function(c,d){if(OpenLayers.Element.hasClass(c,d)){OpenLayers.Element.removeClass(c,d)}else{OpenLayers.Element.addClass(c,d)}return c},getStyle:function(k,j){k=OpenLayers.Util.getElement(k);var i=null;if(k&&k.style){i=k.style[OpenLayers.String.camelize(j)];if(!i){if(document.defaultView&&document.defaultView.getComputedStyle){var f=document.defaultView.getComputedStyle(k,null);i=f?f.getPropertyValue(j):null}else{if(k.currentStyle){i=k.currentStyle[OpenLayers.String.camelize(j)]}}}var g=["left","top","right","bottom"];if(window.opera&&(OpenLayers.Util.indexOf(g,j)!=-1)&&(OpenLayers.Element.getStyle(k,"position")=="static")){i="auto"}}return i=="auto"?null:i}};OpenLayers.Size=OpenLayers.Class({w:0,h:0,initialize:function(d,c){this.w=parseFloat(d);this.h=parseFloat(c)},toString:function(){return("w="+this.w+",h="+this.h)},clone:function(){return new OpenLayers.Size(this.w,this.h)},equals:function(c){var d=false;if(c!=null){d=((this.w==c.w&&this.h==c.h)||(isNaN(this.w)&&isNaN(this.h)&&isNaN(c.w)&&isNaN(c.h)))}return d},CLASS_NAME:"OpenLayers.Size"});OpenLayers.Console={log:function(){},debug:function(){},info:function(){},warn:function(){},error:function(){},userError:function(b){alert(b)},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(){var d=document.getElementsByTagName("script");for(var f=0,e=d.length;f<e;++f){if(d[f].src.indexOf("firebug.js")!=-1){if(console){OpenLayers.Util.extend(OpenLayers.Console,console);break}}}})();OpenLayers.Icon=OpenLayers.Class({url:null,size:null,offset:null,calculateOffset:null,imageDiv:null,px:null,initialize:function(g,f,j,k){this.url=g;this.size=(f)?f:new OpenLayers.Size(20,20);this.offset=j?j:new OpenLayers.Pixel(-(this.size.w/2),-(this.size.h/2));this.calculateOffset=k;var i=OpenLayers.Util.createUniqueID("OL_Icon_");this.imageDiv=OpenLayers.Util.createAlphaImageDiv(i)},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(b){if(b!=null){this.size=b}this.draw()},setUrl:function(b){if(b!=null){this.url=b}this.draw()},draw:function(b){OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv,null,null,this.size,this.url,"absolute");this.moveTo(b);return this.imageDiv},erase:function(){if(this.imageDiv!=null&&this.imageDiv.parentNode!=null){OpenLayers.Element.remove(this.imageDiv)}},setOpacity:function(b){OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv,null,null,null,null,null,null,null,b)},moveTo:function(d){if(d!=null){this.px=d}if(this.imageDiv!=null){if(this.px==null){this.display(false)}else{if(this.calculateOffset){this.offset=this.calculateOffset(this.size)}var c=this.px.offset(this.offset);OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv,null,c)}}},display:function(b){this.imageDiv.style.display=(b)?"":"none"},isDrawn:function(){var b=(this.imageDiv&&this.imageDiv.parentNode&&(this.imageDiv.parentNode.nodeType!=11));return b},CLASS_NAME:"OpenLayers.Icon"});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(k,o,l,i,m,n){if(k==null){k=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")}this.id=k;this.lonlat=o;this.contentSize=(l!=null)?l:new OpenLayers.Size(OpenLayers.Popup.WIDTH,OpenLayers.Popup.HEIGHT);if(i!=null){this.contentHTML=i}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 j=this.id+"_GroupDiv";this.groupDiv=OpenLayers.Util.createDiv(j,null,null,null,"relative",null,"hidden");var k=this.div.id+"_contentDiv";this.contentDiv=OpenLayers.Util.createDiv(k,null,this.contentSize.clone(),null,"relative");this.contentDiv.className=this.contentDisplayClass;this.groupDiv.appendChild(this.contentDiv);this.div.appendChild(this.groupDiv);if(m){this.addCloseBox(n)}this.registerEvents()},destroy:function(){this.id=null;this.lonlat=null;this.size=null;this.contentHTML=null;this.backgroundColor=null;this.opacity=null;this.border=null;if(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;if(this.map!=null){this.map.removePopup(this)}this.map=null;this.div=null;this.autoSize=null;this.minSize=null;this.maxSize=null;this.padding=null;this.panMapIfOutOfView=null},draw:function(b){if(b==null){if((this.lonlat!=null)&&(this.map!=null)){b=this.map.getLayerPxFromLonLat(this.lonlat)}}if(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 a=document.defaultView.getComputedStyle(this.contentDiv,null);var d=a.getPropertyValue("overflow");if(d!="hidden"){this.contentDiv._oldOverflow=d;this.contentDiv.style.overflow="hidden"}});this.map.events.register("moveend",this,function(){var a=this.contentDiv._oldOverflow;if(a){this.contentDiv.style.overflow=a;this.contentDiv._oldOverflow=null}})}this.moveTo(b);if(!this.autoSize&&!this.size){this.setSize(this.contentSize)}this.setBackgroundColor();this.setOpacity();this.setBorder();this.setContentHTML();if(this.panMapIfOutOfView){this.panIntoView()}return this.div},updatePosition:function(){if((this.lonlat)&&(this.map)){var b=this.map.getLayerPxFromLonLat(this.lonlat);if(b){this.moveTo(b)}}},moveTo:function(b){if((b!=null)&&(this.div!=null)){this.div.style.left=b.x+"px";this.div.style.top=b.y+"px"}},visible:function(){return OpenLayers.Element.visible(this.div)},toggle:function(){if(this.visible()){this.hide()}else{this.show()}},show:function(){OpenLayers.Element.show(this.div);if(this.panMapIfOutOfView){this.panIntoView()}},hide:function(){OpenLayers.Element.hide(this.div)},setSize:function(k){this.size=k.clone();var f=this.getContentDivPadding();var g=f.left+f.right;var i=f.top+f.bottom;this.fixPadding();g+=this.padding.left+this.padding.right;i+=this.padding.top+this.padding.bottom;if(this.closeDiv){var j=parseInt(this.closeDiv.style.width);g+=j+f.right}this.size.w+=g;this.size.h+=i;if(OpenLayers.Util.getBrowserName()=="msie"){this.contentSize.w+=f.left+f.right;this.contentSize.h+=f.bottom+f.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=k.w+"px";this.contentDiv.style.height=k.h+"px"}},updateSize:function(){var o="<div class='"+this.contentDisplayClass+"'>"+this.contentDiv.innerHTML+"</div>";var l=(this.map)?this.map.layerContainerDiv:document.body;var k=OpenLayers.Util.getRenderedDimensions(o,null,{displayClass:this.displayClass,containerElement:l});var m=this.getSafeContentSize(k);var n=null;if(m.equals(k)){n=k}else{var s=new OpenLayers.Size();s.w=(m.w<k.w)?m.w:null;s.h=(m.h<k.h)?m.h:null;if(s.w&&s.h){n=m}else{var q=OpenLayers.Util.getRenderedDimensions(o,s,{displayClass:this.contentDisplayClass,containerElement:l});var r=OpenLayers.Element.getStyle(this.contentDiv,"overflow");if((r!="hidden")&&(q.equals(m))){var u=OpenLayers.Util.getScrollbarWidth();if(s.w){q.h+=u}else{q.w+=u}}n=this.getSafeContentSize(q)}}this.setSize(n)},setBackgroundColor:function(b){if(b!=undefined){this.backgroundColor=b}if(this.div!=null){this.div.style.backgroundColor=this.backgroundColor}},setOpacity:function(b){if(b!=undefined){this.opacity=b}if(this.div!=null){this.div.style.opacity=this.opacity;this.div.style.filter="alpha(opacity="+this.opacity*100+")"}},setBorder:function(b){if(b!=undefined){this.border=b}if(this.div!=null){this.div.style.border=this.border}},setContentHTML:function(b){if(b!=null){this.contentHTML=b}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(){var j=function(){this.popup.updateSize();if(this.popup.visible()&&this.popup.panMapIfOutOfView){this.popup.panIntoView()}OpenLayers.Event.stopObserving(this.img,"load",this.img._onImageLoad)};var g=this.contentDiv.getElementsByTagName("img");for(var k=0,i=g.length;k<i;k++){var m=g[k];if(m.width==0||m.height==0){var l={popup:this,img:m};m._onImgLoad=OpenLayers.Function.bind(j,l);OpenLayers.Event.observe(m,"load",m._onImgLoad)}}},getSafeContentSize:function(m){var v=m.clone();var o=this.getContentDivPadding();var n=o.left+o.right;var r=o.top+o.bottom;this.fixPadding();n+=this.padding.left+this.padding.right;r+=this.padding.top+this.padding.bottom;if(this.closeDiv){var w=parseInt(this.closeDiv.style.width);n+=w+o.right}if(this.minSize){v.w=Math.max(v.w,(this.minSize.w-n));v.h=Math.max(v.h,(this.minSize.h-r))}if(this.maxSize){v.w=Math.min(v.w,(this.maxSize.w-n));v.h=Math.min(v.h,(this.maxSize.h-r))}if(this.map&&this.map.size){var s=0,u=0;if(this.keepInMap&&!this.panMapIfOutOfView){var q=this.map.getPixelFromLonLat(this.lonlat);switch(this.relativePosition){case"tr":s=q.x;u=this.map.size.h-q.y;break;case"tl":s=this.map.size.w-q.x;u=this.map.size.h-q.y;break;case"bl":s=this.map.size.w-q.x;u=q.y;break;case"br":s=q.x;u=q.y;break;default:s=q.x;u=this.map.size.h-q.y;break}}var A=this.map.size.h-this.map.paddingForPopups.top-this.map.paddingForPopups.bottom-r-u;var z=this.map.size.w-this.map.paddingForPopups.left-this.map.paddingForPopups.right-n-s;v.w=Math.min(v.w,z);v.h=Math.min(v.h,A)}return v},getContentDivPadding:function(){var b=this._contentDivPadding;if(!b){if(this.div.parentNode==null){this.div.style.display="none";document.body.appendChild(this.div)}b=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"));this._contentDivPadding=b;if(this.div.parentNode==document.body){document.body.removeChild(this.div);this.div.style.display=""}}return b},addCloseBox:function(f){this.closeDiv=OpenLayers.Util.createDiv(this.id+"_close",null,new OpenLayers.Size(17,17));this.closeDiv.className="olPopupCloseBox";var d=this.getContentDivPadding();this.closeDiv.style.right=d.right+"px";this.closeDiv.style.top=d.top+"px";this.groupDiv.appendChild(this.closeDiv);var e=f||function(a){this.hide();OpenLayers.Event.stop(a)};OpenLayers.Event.observe(this.closeDiv,"click",OpenLayers.Function.bindAsEventListener(e,this))},panIntoView:function(){var i=this.map.getSize();var j=this.map.getViewPortPxFromLayerPx(new OpenLayers.Pixel(parseInt(this.div.style.left),parseInt(this.div.style.top)));var k=j.clone();if(j.x<this.map.paddingForPopups.left){k.x=this.map.paddingForPopups.left}else{if((j.x+this.size.w)>(i.w-this.map.paddingForPopups.right)){k.x=i.w-this.map.paddingForPopups.right-this.size.w}}if(j.y<this.map.paddingForPopups.top){k.y=this.map.paddingForPopups.top}else{if((j.y+this.size.h)>(i.h-this.map.paddingForPopups.bottom)){k.y=i.h-this.map.paddingForPopups.bottom-this.size.h}}var f=j.x-k.x;var g=j.y-k.y;this.map.pan(f,g)},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(b){this.mousedown=true;OpenLayers.Event.stop(b,true)},onmousemove:function(b){if(this.mousedown){OpenLayers.Event.stop(b,true)}},onmouseup:function(b){if(this.mousedown){this.mousedown=false;OpenLayers.Event.stop(b,true)}},onclick:function(b){OpenLayers.Event.stop(b,true)},onmouseout:function(b){this.mousedown=false},ondblclick:function(b){OpenLayers.Event.stop(b,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.Renderer=OpenLayers.Class({container:null,root:null,extent:null,locked:false,size:null,resolution:null,map:null,initialize:function(d,c){this.container=OpenLayers.Util.getElement(d)},destroy:function(){this.container=null;this.extent=null;this.size=null;this.resolution=null;this.map=null},supported:function(){return false},setExtent:function(d,c){this.extent=d.clone();if(c){this.resolution=null}},setSize:function(b){this.size=b.clone();this.resolution=null},getResolution:function(){this.resolution=this.resolution||this.map.getResolution();return this.resolution},drawFeature:function(m,l){if(l==null){l=m.style}if(m.geometry){var k=m.geometry.getBounds();if(k){if(!k.intersectsBounds(this.extent)){l={display:"none"}}var j=this.drawGeometry(m.geometry,l,m.id);if(l.display!="none"&&l.label&&j!==false){this.drawText(m.id,l,m.geometry.getCentroid());var i=m.geometry.getCentroid();if(l.labelXOffset||l.labelYOffset){xOffset=isNaN(l.labelXOffset)?0:l.labelXOffset;yOffset=isNaN(l.labelYOffset)?0:l.labelYOffset;var g=this.getResolution();i.move(xOffset*g,yOffset*g)}this.drawText(m.id,l,i)}else{this.removeText(m.id)}return j}}},drawGeometry:function(f,e,d){},drawText:function(f,d,e){},removeText:function(b){},clear:function(){},getFeatureIdFromEvent:function(b){},eraseFeatures:function(f){if(!(f instanceof Array)){f=[f]}for(var d=0,e=f.length;d<e;++d){this.eraseGeometry(f[d].geometry);this.removeText(f[d].id)}},eraseGeometry:function(b){},moveRoot:function(b){},getRenderLayerId:function(){return this.container.id},CLASS_NAME:"OpenLayers.Renderer"});OpenLayers.Bounds=OpenLayers.Class({left:null,bottom:null,right:null,top:null,centerLonLat:null,initialize:function(g,f,e,i){if(g!=null){this.left=OpenLayers.Util.toFloat(g)}if(f!=null){this.bottom=OpenLayers.Util.toFloat(f)}if(e!=null){this.right=OpenLayers.Util.toFloat(e)}if(i!=null){this.top=OpenLayers.Util.toFloat(i)}},clone:function(){return new OpenLayers.Bounds(this.left,this.bottom,this.right,this.top)},equals:function(c){var d=false;if(c!=null){d=((this.left==c.left)&&(this.right==c.right)&&(this.top==c.top)&&(this.bottom==c.bottom))}return d},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(e){if(e==null){e=6}var d=Math.pow(10,e);var f=Math.round(this.left*d)/d+","+Math.round(this.bottom*d)/d+","+Math.round(this.right*d)/d+","+Math.round(this.top*d)/d;return f},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(n,l){if(l==null){l=this.getCenterLonLat()}var u=[];var o,q;if(l.CLASS_NAME=="OpenLayers.LonLat"){o=l.lon;q=l.lat}else{o=l.x;q=l.y}var r=(this.left-o)*n+o;var s=(this.bottom-q)*n+q;var k=(this.right-o)*n+o;var m=(this.top-q)*n+q;return new OpenLayers.Bounds(r,s,k,m)},add:function(e,f){if((e==null)||(f==null)){var d=OpenLayers.i18n("boundsAddError");OpenLayers.Console.error(d);return null}return new OpenLayers.Bounds(this.left+e,this.bottom+f,this.right+e,this.top+f)},extend:function(d){var c=null;if(d){switch(d.CLASS_NAME){case"OpenLayers.LonLat":c=new OpenLayers.Bounds(d.lon,d.lat,d.lon,d.lat);break;case"OpenLayers.Geometry.Point":c=new OpenLayers.Bounds(d.x,d.y,d.x,d.y);break;case"OpenLayers.Bounds":c=d;break}if(c){this.centerLonLat=null;if((this.left==null)||(c.left<this.left)){this.left=c.left}if((this.bottom==null)||(c.bottom<this.bottom)){this.bottom=c.bottom}if((this.right==null)||(c.right>this.right)){this.right=c.right}if((this.top==null)||(c.top>this.top)){this.top=c.top}}}},containsLonLat:function(c,d){return this.contains(c.lon,c.lat,d)},containsPixel:function(c,d){return this.contains(c.x,c.y,d)},contains:function(e,g,f){if(f==null){f=true}if(e==null||g==null){return false}e=OpenLayers.Util.toFloat(e);g=OpenLayers.Util.toFloat(g);var i=false;if(f){i=((e>=this.left)&&(e<=this.right)&&(g>=this.bottom)&&(g<=this.top))}else{i=((e>this.left)&&(e<this.right)&&(g>this.bottom)&&(g<this.top))}return i},intersectsBounds:function(o,j){if(j==null){j=true}var q=false;var l=(this.left==o.right||this.right==o.left||this.top==o.bottom||this.bottom==o.top);if(j||!l){var m=(((o.bottom>=this.bottom)&&(o.bottom<=this.top))||((this.bottom>=o.bottom)&&(this.bottom<=o.top)));var n=(((o.top>=this.bottom)&&(o.top<=this.top))||((this.top>o.bottom)&&(this.top<o.top)));var r=(((o.left>=this.left)&&(o.left<=this.right))||((this.left>=o.left)&&(this.left<=o.right)));var k=(((o.right>=this.left)&&(o.right<=this.right))||((this.right>=o.left)&&(this.right<=o.right)));q=((m||n)&&(r||k))}return q},containsBounds:function(k,i,j){if(i==null){i=false}if(j==null){j=true}var o=this.contains(k.left,k.bottom,j);var n=this.contains(k.right,k.bottom,j);var l=this.contains(k.left,k.top,j);var m=this.contains(k.right,k.top,j);return(i)?(o||n||l||m):(o&&n&&l&&m)},determineQuadrant:function(f){var d="";var e=this.getCenterLonLat();d+=(f.lat<e.lat)?"b":"t";d+=(f.lon<e.lon)?"l":"r";return d},transform:function(l,g){this.centerLonLat=null;var k=OpenLayers.Projection.transform({x:this.left,y:this.bottom},l,g);var i=OpenLayers.Projection.transform({x:this.right,y:this.bottom},l,g);var m=OpenLayers.Projection.transform({x:this.left,y:this.top},l,g);var j=OpenLayers.Projection.transform({x:this.right,y:this.top},l,g);this.left=Math.min(k.x,m.x);this.bottom=Math.min(k.y,i.y);this.right=Math.max(i.x,j.x);this.top=Math.max(m.y,j.y);return this},wrapDateLine:function(g,k){k=k||{};var j=k.leftTolerance||0;var f=k.rightTolerance||0;var i=this.clone();if(g){while(i.left<g.left&&(i.right-f)<=g.left){i=i.add(g.getWidth(),0)}while((i.left+j)>=g.right&&i.right>g.right){i=i.add(-g.getWidth(),0)}}return i},CLASS_NAME:"OpenLayers.Bounds"});OpenLayers.Bounds.fromString=function(c){var d=c.split(",");return OpenLayers.Bounds.fromArray(d)};OpenLayers.Bounds.fromArray=function(b){return new OpenLayers.Bounds(parseFloat(b[0]),parseFloat(b[1]),parseFloat(b[2]),parseFloat(b[3]))};OpenLayers.Bounds.fromSize=function(b){return new OpenLayers.Bounds(0,b.h,b.w,0)};OpenLayers.Bounds.oppositeQuadrant=function(d){var c="";c+=(d.charAt(0)=="t")?"b":"t";c+=(d.charAt(1)=="l")?"r":"l";return c};OpenLayers.LonLat=OpenLayers.Class({lon:0,lat:0,initialize:function(c,d){this.lon=OpenLayers.Util.toFloat(c);this.lat=OpenLayers.Util.toFloat(d)},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(f,e){if((f==null)||(e==null)){var d=OpenLayers.i18n("lonlatAddError");OpenLayers.Console.error(d);return null}return new OpenLayers.LonLat(this.lon+f,this.lat+e)},equals:function(c){var d=false;if(c!=null){d=((this.lon==c.lon&&this.lat==c.lat)||(isNaN(this.lon)&&isNaN(this.lat)&&isNaN(c.lon)&&isNaN(c.lat)))}return d},transform:function(f,d){var e=OpenLayers.Projection.transform({x:this.lon,y:this.lat},f,d);this.lon=e.x;this.lat=e.y;return this},wrapDateLine:function(d){var c=this.clone();if(d){while(c.lon<d.left){c.lon+=d.getWidth()}while(c.lon>d.right){c.lon-=d.getWidth()}}return c},CLASS_NAME:"OpenLayers.LonLat"});OpenLayers.LonLat.fromString=function(c){var d=c.split(",");return new OpenLayers.LonLat(parseFloat(d[0]),parseFloat(d[1]))};OpenLayers.Pixel=OpenLayers.Class({x:0,y:0,initialize:function(d,c){this.x=parseFloat(d);this.y=parseFloat(c)},toString:function(){return("x="+this.x+",y="+this.y)},clone:function(){return new OpenLayers.Pixel(this.x,this.y)},equals:function(d){var c=false;if(d!=null){c=((this.x==d.x&&this.y==d.y)||(isNaN(this.x)&&isNaN(this.y)&&isNaN(d.x)&&isNaN(d.y)))}return c},add:function(e,f){if((e==null)||(f==null)){var d=OpenLayers.i18n("pixelAddError");OpenLayers.Console.error(d);return null}return new OpenLayers.Pixel(this.x+e,this.y+f)},offset:function(d){var c=this.clone();if(d){c=this.add(d.x,d.y)}return c},CLASS_NAME:"OpenLayers.Pixel"});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(b){this.displayClass=this.CLASS_NAME.replace("OpenLayers.","ol").replace(/\./g,"");OpenLayers.Util.extend(this,b);this.events=new OpenLayers.Events(this,null,this.EVENT_TYPES);if(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){if(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 b in this.handlers){if(this.handlers.hasOwnProperty(b)&&typeof this.handlers[b].destroy=="function"){this.handlers[b].destroy()}}this.handlers=null}if(this.map){this.map.removeControl(this);this.map=null}},setMap:function(b){this.map=b;if(this.handler){this.handler.setMap(b)}},draw:function(b){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(b!=null){this.position=b.clone()}this.moveTo(this.position);return this.div},moveTo:function(b){if((b!=null)&&(this.div!=null)){this.div.style.left=b.x+"px";this.div.style.top=b.y+"px"}},activate:function(){if(this.active){return false}if(this.handler){this.handler.activate()}this.active=true;if(this.map){OpenLayers.Element.addClass(this.map.viewPortDiv,this.displayClass.replace(/ /g,"")+"Active")}this.events.triggerEvent("activate");return true},deactivate:function(){if(this.active){if(this.handler){this.handler.deactivate()}this.active=false;if(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(){if(!OpenLayers.Lang.code){OpenLayers.Lang.setCode()}return OpenLayers.Lang.code},setCode:function(e){var g;if(!e){e=(OpenLayers.Util.getBrowserName()=="msie")?navigator.userLanguage:navigator.language}var i=e.split("-");i[0]=i[0].toLowerCase();if(typeof OpenLayers.Lang[i[0]]=="object"){g=i[0]}if(i[1]){var f=i[0]+"-"+i[1].toUpperCase();if(typeof OpenLayers.Lang[f]=="object"){g=f}}if(!g){OpenLayers.Console.warn("Failed to find OpenLayers.Lang."+i.join("-")+" dictionary, falling back to default language");g=OpenLayers.Lang.defaultCode}OpenLayers.Lang.code=g},translate:function(e,f){var g=OpenLayers.Lang[OpenLayers.Lang.getCode()];var i=g[e];if(!i){i=e}if(f){i=OpenLayers.String.format(i,f)}return i}};OpenLayers.i18n=OpenLayers.Lang.translate;OpenLayers.Popup.Anchored=OpenLayers.Class(OpenLayers.Popup,{relativePosition:null,keepInMap:true,anchor:null,initialize:function(l,q,m,r,j,n,o){var k=[l,q,m,r,n,o];OpenLayers.Popup.prototype.initialize.apply(this,k);this.anchor=(j!=null)?j:{size:new OpenLayers.Size(0,0),offset:new OpenLayers.Pixel(0,0)}},destroy:function(){this.anchor=null;this.relativePosition=null;OpenLayers.Popup.prototype.destroy.apply(this,arguments)},show:function(){this.updatePosition();OpenLayers.Popup.prototype.show.apply(this,arguments)},moveTo:function(i){var e=this.relativePosition;this.relativePosition=this.calculateRelativePosition(i);var g=this.calculateNewPx(i);var f=new Array(g);OpenLayers.Popup.prototype.moveTo.apply(this,f);if(this.relativePosition!=e){this.updateRelativePosition()}},setSize:function(c){OpenLayers.Popup.prototype.setSize.apply(this,arguments);if((this.lonlat)&&(this.map)){var d=this.map.getLayerPxFromLonLat(this.lonlat);this.moveTo(d)}},calculateRelativePosition:function(e){var g=this.map.getLonLatFromLayerPx(e);var i=this.map.getExtent();var f=i.determineQuadrant(g);return OpenLayers.Bounds.oppositeQuadrant(f)},updateRelativePosition:function(){},calculateNewPx:function(f){var i=f.offset(this.anchor.offset);var g=this.size||this.contentSize;var j=(this.relativePosition.charAt(0)=="t");i.y+=(j)?-g.h:this.anchor.size.h;var k=(this.relativePosition.charAt(1)=="l");i.x+=(k)?-g.w:this.anchor.size.w;return i},CLASS_NAME:"OpenLayers.Popup.Anchored"});OpenLayers.Renderer.Canvas=OpenLayers.Class(OpenLayers.Renderer,{canvas:null,features:null,geometryMap:null,initialize:function(b){OpenLayers.Renderer.prototype.initialize.apply(this,arguments);this.root=document.createElement("canvas");this.container.appendChild(this.root);this.canvas=this.root.getContext("2d");this.features={};this.geometryMap={}},eraseGeometry:function(b){this.eraseFeatures(this.features[this.geometryMap[b.id]][0])},supported:function(){var b=document.createElement("canvas");return !!b.getContext},setExtent:function(b){this.extent=b.clone();this.resolution=null;this.redraw()},setSize:function(b){this.size=b.clone();this.root.style.width=b.w+"px";this.root.style.height=b.h+"px";this.root.width=b.w;this.root.height=b.h;this.resolution=null},drawFeature:function(d,c){if(c==null){c=d.style}c=OpenLayers.Util.extend({fillColor:"#000000",strokeColor:"#000000",strokeWidth:2,fillOpacity:1,strokeOpacity:1},c);this.features[d.id]=[d,c];if(d.geometry){this.geometryMap[d.geometry.id]=d.id}this.redraw()},drawGeometry:function(g,i){var e=g.CLASS_NAME;if((e=="OpenLayers.Geometry.Collection")||(e=="OpenLayers.Geometry.MultiPoint")||(e=="OpenLayers.Geometry.MultiLineString")||(e=="OpenLayers.Geometry.MultiPolygon")){for(var f=0;f<g.components.length;f++){this.drawGeometry(g.components[f],i)}return}switch(g.CLASS_NAME){case"OpenLayers.Geometry.Point":this.drawPoint(g,i);break;case"OpenLayers.Geometry.LineString":this.drawLineString(g,i);break;case"OpenLayers.Geometry.LinearRing":this.drawLinearRing(g,i);break;case"OpenLayers.Geometry.Polygon":this.drawPolygon(g,i);break;default:break}},drawExternalGraphic:function(k,u){var o=new Image();o.src=u.externalGraphic;if(u.graphicTitle){o.title=u.graphicTitle}var r=u.graphicWidth||u.graphicHeight;var l=u.graphicHeight||u.graphicWidth;r=r?r:u.pointRadius*2;l=l?l:u.pointRadius*2;var m=(u.graphicXOffset!=undefined)?u.graphicXOffset:-(0.5*r);var q=(u.graphicYOffset!=undefined)?u.graphicYOffset:-(0.5*l);var n=u.graphicOpacity||u.fillOpacity;var s={img:o,x:(k[0]+m),y:(k[1]+q),width:r,height:l,canvas:this.canvas};o.onload=OpenLayers.Function.bind(function(){this.canvas.drawImage(this.img,this.x,this.y,this.width,this.height)},s)},setCanvasStyle:function(c,d){if(c=="fill"){this.canvas.globalAlpha=d.fillOpacity;this.canvas.fillStyle=d.fillColor}else{if(c=="stroke"){this.canvas.globalAlpha=d.strokeOpacity;this.canvas.strokeStyle=d.strokeColor;this.canvas.lineWidth=d.strokeWidth}else{this.canvas.globalAlpha=0;this.canvas.lineWidth=1}}},drawPoint:function(f,e){if(e.graphic!==false){var d=this.getLocalXY(f);if(e.externalGraphic){this.drawExternalGraphic(d,e)}else{if(e.fill!==false){this.setCanvasStyle("fill",e);this.canvas.beginPath();this.canvas.arc(d[0],d[1],6,0,Math.PI*2,true);this.canvas.fill()}if(e.stroke!==false){this.setCanvasStyle("stroke",e);this.canvas.beginPath();this.canvas.arc(d[0],d[1],6,0,Math.PI*2,true);this.canvas.stroke();this.setCanvasStyle("reset")}}}},drawLineString:function(j,f){if(f.stroke!==false){this.setCanvasStyle("stroke",f);this.canvas.beginPath();var i=this.getLocalXY(j.components[0]);this.canvas.moveTo(i[0],i[1]);for(var g=1;g<j.components.length;g++){var k=this.getLocalXY(j.components[g]);this.canvas.lineTo(k[0],k[1])}this.canvas.stroke()}this.setCanvasStyle("reset")},drawLinearRing:function(k,m){if(m.fill!==false){this.setCanvasStyle("fill",m);this.canvas.beginPath();var j=this.getLocalXY(k.components[0]);this.canvas.moveTo(j[0],j[1]);for(var g=1;g<k.components.length-1;g++){var l=this.getLocalXY(k.components[g]);this.canvas.lineTo(l[0],l[1])}this.canvas.fill()}if(m.stroke!==false){var i=this.canvas.lineWidth;this.setCanvasStyle("stroke",m);this.canvas.beginPath();var j=this.getLocalXY(k.components[0]);this.canvas.moveTo(j[0],j[1]);for(var g=1;g<k.components.length;g++){var l=this.getLocalXY(k.components[g]);this.canvas.lineTo(l[0],l[1])}this.canvas.stroke()}this.setCanvasStyle("reset")},drawPolygon:function(f,d){this.drawLinearRing(f.components[0],d);for(var e=1;e<f.components.length;e++){this.drawLinearRing(f.components[e],{fillOpacity:0,strokeWidth:0,strokeOpacity:0,strokeColor:"#000000",fillColor:"#000000"})}},drawText:function(g,l){l=OpenLayers.Util.extend({fontColor:"#000000",labelAlign:"cm"},l);var k=this.getLocalXY(g);this.setCanvasStyle("reset");this.canvas.fillStyle=l.fontColor;this.canvas.globalAlpha=1;var j=l.fontWeight+" "+l.fontSize+" "+l.fontFamily;if(this.canvas.fillText){var m=OpenLayers.Renderer.Canvas.LABEL_ALIGN[l.labelAlign[0]]||"middle";this.canvas.font=j;this.canvas.textAlign=m;this.canvas.fillText(l.label,k[0],k[1])}else{if(this.canvas.mozDrawText){this.canvas.mozTextStyle=j;var i=this.canvas.mozMeasureText(l.label);switch(l.labelAlign[0]){case"l":break;case"r":k[0]-=i;break;case"c":default:k[0]-=i/2}this.canvas.translate(k[0],k[1]);this.canvas.mozDrawText(l.label);this.canvas.translate(-1*k[0],-1*k[1])}}this.setCanvasStyle("reset")},getLocalXY:function(f){var k=this.getResolution();var j=this.extent;var g=(f.x/k+(-j.left/k));var i=((j.top/k)-f.y/k);return[g,i]},clear:function(){this.canvas.clearRect(0,0,this.root.width,this.root.height)},getFeatureIdFromEvent:function(i){var j=this.map.getLonLatFromPixel(i.xy);var g=this.getResolution();var k=new OpenLayers.Bounds(j.lon-g*5,j.lat-g*5,j.lon+g*5,j.lat+g*5);var m=k.toGeometry();for(var l in this.features){if(!this.features.hasOwnProperty(l)){continue}if(this.features[l][0].geometry.intersects(m)){return l}}return null},eraseFeatures:function(c){if(!(c instanceof Array)){c=[c]}for(var d=0;d<c.length;++d){delete this.features[c[d].id]}this.redraw()},redraw:function(){if(!this.locked){this.clear();var k=[];var g,m;for(var j in this.features){if(!this.features.hasOwnProperty(j)){continue}g=this.features[j][0];m=this.features[j][1];if(!g.geometry){continue}this.drawGeometry(g.geometry,m);if(m.label){k.push([g,m])}}var l;for(var i=0;len=k.length,i<len;++i){l=k[i];this.drawText(l[0].geometry.getCentroid(),l[1])}}},CLASS_NAME:"OpenLayers.Renderer.Canvas"});OpenLayers.Renderer.Canvas.LABEL_ALIGN={l:"left",r:"right"};OpenLayers.ElementsIndexer=OpenLayers.Class({maxZIndex:null,order:null,indices:null,compare:null,initialize:function(b){this.compare=b?OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER_Y_ORDER:OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER_DRAWING_ORDER;this.order=[];this.indices={};this.maxZIndex=0},insert:function(m){if(this.exists(m)){this.remove(m)}var j=m.id;this.determineZIndex(m);var l=-1;var k=this.order.length;var i;while(k-l>1){i=parseInt((l+k)/2);var g=this.compare(this,m,OpenLayers.Util.getElement(this.order[i]));if(g>0){l=i}else{k=i}}this.order.splice(k,0,j);this.indices[j]=this.getZIndex(m);return this.getNextElement(k)},remove:function(e){var g=e.id;var f=OpenLayers.Util.indexOf(this.order,g);if(f>=0){this.order.splice(f,1);delete this.indices[g];if(this.order.length>0){var i=this.order[this.order.length-1];this.maxZIndex=this.indices[i]}else{this.maxZIndex=0}}},clear:function(){this.order=[];this.indices={};this.maxZIndex=0},exists:function(b){return(this.indices[b.id]!=null)},getZIndex:function(b){return b._style.graphicZIndex},determineZIndex:function(d){var c=d._style.graphicZIndex;if(c==null){c=this.maxZIndex;d._style.graphicZIndex=c}else{if(c>this.maxZIndex){this.maxZIndex=c}}},getNextElement:function(d){var e=d+1;if(e<this.order.length){var f=OpenLayers.Util.getElement(this.order[e]);if(f==undefined){f=this.getNextElement(e)}return f}else{return null}},CLASS_NAME:"OpenLayers.ElementsIndexer"});OpenLayers.ElementsIndexer.IndexingMethods={Z_ORDER:function(k,l,g){var i=k.getZIndex(l);var j=0;if(g){var m=k.getZIndex(g);j=i-m}return j},Z_ORDER_DRAWING_ORDER:function(i,e,f){var g=OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER(i,e,f);if(f&&g==0){g=1}return g},Z_ORDER_Y_ORDER:function(l,m,i){var k=OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER(l,m,i);if(i&&k==0){var o=m._geometry.getBounds().bottom;var n=i._geometry.getBounds().bottom;var j=n-o;k=(j==0)?1:j}return k}};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(d,c){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(c&&(c.zIndexing||c.yOrdering)){this.indexer=new OpenLayers.ElementsIndexer(c.yOrdering)}},destroy:function(){this.clear();this.rendererRoot=null;this.root=null;this.xmlns=null;OpenLayers.Renderer.prototype.destroy.apply(this,arguments)},clear:function(){if(this.vectorRoot){while(this.vectorRoot.childNodes.length>0){this.vectorRoot.removeChild(this.vectorRoot.firstChild)}}if(this.textRoot){while(this.textRoot.childNodes.length>0){this.textRoot.removeChild(this.textRoot.firstChild)}}if(this.indexer){this.indexer.clear()}},getNodeType:function(c,d){},drawGeometry:function(m,q,n){var r=m.CLASS_NAME;var l=true;if((r=="OpenLayers.Geometry.Collection")||(r=="OpenLayers.Geometry.MultiPoint")||(r=="OpenLayers.Geometry.MultiLineString")||(r=="OpenLayers.Geometry.MultiPolygon")){for(var i=0,k=m.components.length;i<k;i++){l=this.drawGeometry(m.components[i],q,n)&&l}return l}l=false;if(q.display!="none"){if(q.backgroundGraphic){this.redrawBackgroundNode(m.id,m,q,n)}l=this.redrawNode(m.id,m,q,n)}if(l==false){var o=document.getElementById(m.id);if(o){if(o._style.backgroundGraphic){o.parentNode.removeChild(document.getElementById(m.id+this.BACKGROUND_ID_SUFFIX))}o.parentNode.removeChild(o)}}return l},redrawNode:function(k,l,i,m){var o=this.nodeFactory(k,this.getNodeType(l,i));o._featureId=m;o._geometry=l;o._geometryClass=l.CLASS_NAME;o._style=i;var j=this.drawGeometryNode(o,l,i);if(j===false){return false}o=j.node;if(this.indexer){var n=this.indexer.insert(o);if(n){this.vectorRoot.insertBefore(o,n)}else{this.vectorRoot.appendChild(o)}}else{if(o.parentNode!==this.vectorRoot){this.vectorRoot.appendChild(o)}}this.postDraw(o);return j.complete},redrawBackgroundNode:function(i,j,f,k){var g=OpenLayers.Util.extend({},f);g.externalGraphic=g.backgroundGraphic;g.graphicXOffset=g.backgroundXOffset;g.graphicYOffset=g.backgroundYOffset;g.graphicZIndex=g.backgroundGraphicZIndex;g.graphicWidth=g.backgroundWidth||g.graphicWidth;g.graphicHeight=g.backgroundHeight||g.graphicHeight;g.backgroundGraphic=null;g.backgroundXOffset=null;g.backgroundYOffset=null;g.backgroundGraphicZIndex=null;return this.redrawNode(i+this.BACKGROUND_ID_SUFFIX,j,g,null)},drawGeometryNode:function(k,i,f){f=f||k._style;OpenLayers.Util.applyDefaults(f,this.minimumSymbolizer);var g={isFilled:f.fill===undefined?true:f.fill,isStroked:f.stroke===undefined?!!f.strokeWidth:f.stroke};var j;switch(i.CLASS_NAME){case"OpenLayers.Geometry.Point":if(f.graphic===false){g.isFilled=false;g.isStroked=false}j=this.drawPoint(k,i);break;case"OpenLayers.Geometry.LineString":g.isFilled=false;j=this.drawLineString(k,i);break;case"OpenLayers.Geometry.LinearRing":j=this.drawLinearRing(k,i);break;case"OpenLayers.Geometry.Polygon":j=this.drawPolygon(k,i);break;case"OpenLayers.Geometry.Surface":j=this.drawSurface(k,i);break;case"OpenLayers.Geometry.Rectangle":j=this.drawRectangle(k,i);break;default:break}k._style=f;k._options=g;if(j!=false){return{node:this.setStyle(k,f,g,i),complete:j}}else{return false}},postDraw:function(b){},drawPoint:function(d,c){},drawLineString:function(d,c){},drawLinearRing:function(d,c){},drawPolygon:function(d,c){},drawRectangle:function(d,c){},drawCircle:function(d,c){},drawSurface:function(d,c){},removeText:function(c){var d=document.getElementById(c+this.LABEL_ID_SUFFIX);if(d){this.textRoot.removeChild(d)}},getFeatureIdFromEvent:function(g){var j=g.target;var f=j&&j.correspondingUseElement;var k=f?f:(j||g.srcElement);var i=k._featureId;return i},eraseGeometry:function(j){if((j.CLASS_NAME=="OpenLayers.Geometry.MultiPoint")||(j.CLASS_NAME=="OpenLayers.Geometry.MultiLineString")||(j.CLASS_NAME=="OpenLayers.Geometry.MultiPolygon")||(j.CLASS_NAME=="OpenLayers.Geometry.Collection")){for(var l=0,i=j.components.length;l<i;l++){this.eraseGeometry(j.components[l])}}else{var m=OpenLayers.Util.getElement(j.id);if(m&&m.parentNode){if(m.geometry){m.geometry.destroy();m.geometry=null}m.parentNode.removeChild(m);if(this.indexer){this.indexer.remove(m)}if(m._style.backgroundGraphic){var g=j.id+this.BACKGROUND_ID_SUFFIX;var k=OpenLayers.Util.getElement(g);if(k&&k.parentNode){k.parentNode.removeChild(k)}}}}},nodeFactory:function(f,e){var d=OpenLayers.Util.getElement(f);if(d){if(!this.nodeTypeCompare(d,e)){d.parentNode.removeChild(d);d=this.nodeFactory(f,e)}}else{d=this.createNode(e,f)}return d},nodeTypeCompare:function(c,d){},createNode:function(d,c){},moveRoot:function(c){var d=this.root;if(c.root.parentNode==this.rendererRoot){d=c.root}d.parentNode.removeChild(d);c.rendererRoot.appendChild(d)},getRenderLayerId:function(){return this.root.parentNode.parentNode.id},isComplexSymbol:function(b){return(b!="circle")&&!!b},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.Tween=OpenLayers.Class({INTERVAL:10,easing:null,begin:null,finish:null,duration:null,callbacks:null,time:null,interval:null,playing:false,initialize:function(b){this.easing=(b)?b:OpenLayers.Easing.Expo.easeOut},start:function(i,e,g,f){this.playing=true;this.begin=i;this.finish=e;this.duration=g;this.callbacks=f.callbacks;this.time=0;if(this.interval){window.clearInterval(this.interval);this.interval=null}if(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){return}if(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 f={};for(var k in this.begin){var b=this.begin[k];var i=this.finish[k];if(b==null||i==null||isNaN(b)||isNaN(i)){OpenLayers.Console.error("invalid value for Tween")}var c=i-b;f[k]=this.easing.apply(this,[this.time,b,c,this.duration])}this.time++;if(this.callbacks&&this.callbacks.eachStep){this.callbacks.eachStep.call(this,f)}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(i,b,c,d){return c*i/d+b},easeOut:function(i,b,c,d){return c*i/d+b},easeInOut:function(i,b,c,d){return c*i/d+b},CLASS_NAME:"OpenLayers.Easing.Linear"};OpenLayers.Easing.Expo={easeIn:function(i,b,c,d){return(i==0)?b:c*Math.pow(2,10*(i/d-1))+b},easeOut:function(i,b,c,d){return(i==d)?b+c:c*(-Math.pow(2,-10*i/d)+1)+b},easeInOut:function(i,b,c,d){if(i==0){return b}if(i==d){return b+c}if((i/=d/2)<1){return c/2*Math.pow(2,10*(i-1))+b}return c/2*(-Math.pow(2,-10*--i)+2)+b},CLASS_NAME:"OpenLayers.Easing.Expo"};OpenLayers.Easing.Quad={easeIn:function(i,b,c,d){return c*(i/=d)*i+b},easeOut:function(i,b,c,d){return -c*(i/=d)*(i-2)+b},easeInOut:function(i,b,c,d){if((i/=d/2)<1){return c/2*i*i+b}return -c/2*((--i)*(i-2)-1)+b},CLASS_NAME:"OpenLayers.Easing.Quad"};OpenLayers.Control.PanZoom=OpenLayers.Class(OpenLayers.Control,{slideFactor:50,slideRatio:null,buttons:null,position:null,initialize:function(b){this.position=new OpenLayers.Pixel(OpenLayers.Control.PanZoom.X,OpenLayers.Control.PanZoom.Y);OpenLayers.Control.prototype.initialize.apply(this,arguments)},destroy:function(){OpenLayers.Control.prototype.destroy.apply(this,arguments);this.removeButtons();this.buttons=null;this.position=null},draw:function(d){OpenLayers.Control.prototype.draw.apply(this,arguments);d=this.position;this.buttons=[];var f=new OpenLayers.Size(18,18);var e=new OpenLayers.Pixel(d.x+f.w/2,d.y);this._addButton("panup","north-mini.png",e,f);d.y=e.y+f.h;this._addButton("panleft","west-mini.png",d,f);this._addButton("panright","east-mini.png",d.add(f.w,0),f);this._addButton("pandown","south-mini.png",e.add(0,f.h*2),f);this._addButton("zoomin","zoom-plus-mini.png",e.add(0,f.h*3+5),f);this._addButton("zoomworld","zoom-world-mini.png",e.add(0,f.h*4+5),f);this._addButton("zoomout","zoom-minus-mini.png",e.add(0,f.h*5+5),f);return this.div},_addButton:function(u,q,k,m){var n=OpenLayers.Util.getImagesLocation()+q;var s=OpenLayers.Util.createAlphaImageDiv(this.id+"_"+u,k,m,n,"absolute");this.div.appendChild(s);OpenLayers.Event.observe(s,"mousedown",OpenLayers.Function.bindAsEventListener(this.buttonDown,s));OpenLayers.Event.observe(s,"dblclick",OpenLayers.Function.bindAsEventListener(this.doubleClick,s));OpenLayers.Event.observe(s,"click",OpenLayers.Function.bindAsEventListener(this.doubleClick,s));s.action=u;s.map=this.map;if(!this.slideRatio){var r=this.slideFactor;var o=function(){return r}}else{var l=this.slideRatio;var o=function(a){return this.map.getSize()[a]*l}}s.getSlideFactor=o;this.buttons.push(s);return s},_removeButton:function(b){OpenLayers.Event.stopObservingElement(b);b.map=null;this.div.removeChild(b);OpenLayers.Util.removeItem(this.buttons,b)},removeButtons:function(){for(var b=this.buttons.length-1;b>=0;--b){this._removeButton(this.buttons[b])}},doubleClick:function(b){OpenLayers.Event.stop(b);return false},buttonDown:function(b){if(!OpenLayers.Event.isLeftClick(b)){return}switch(this.action){case"panup":this.map.pan(0,-this.getSlideFactor("h"));break;case"pandown":this.map.pan(0,this.getSlideFactor("h"));break;case"panleft":this.map.pan(-this.getSlideFactor("w"),0);break;case"panright":this.map.pan(this.getSlideFactor("w"),0);break;case"zoomin":this.map.zoomIn();break;case"zoomout":this.map.zoomOut();break;case"zoomworld":this.map.zoomToMaxExtent();break}OpenLayers.Event.stop(b)},CLASS_NAME:"OpenLayers.Control.PanZoom"});OpenLayers.Control.PanZoom.X=4;OpenLayers.Control.PanZoom.Y=4;OpenLayers.Control.Panel=OpenLayers.Class(OpenLayers.Control,{controls:null,defaultControl:null,initialize:function(b){OpenLayers.Control.prototype.initialize.apply(this,[b]);this.controls=[]},destroy:function(){OpenLayers.Control.prototype.destroy.apply(this,arguments);for(var b=this.controls.length-1;b>=0;b--){if(this.controls[b].events){this.controls[b].events.un({activate:this.redraw,deactivate:this.redraw,scope:this})}OpenLayers.Event.stopObservingElement(this.controls[b].panel_div);this.controls[b].panel_div=null}},activate:function(){if(OpenLayers.Control.prototype.activate.apply(this,arguments)){for(var c=0,d=this.controls.length;c<d;c++){if(this.controls[c]==this.defaultControl){this.controls[c].activate()}}this.redraw();return true}else{return false}},deactivate:function(){if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)){for(var c=0,d=this.controls.length;c<d;c++){this.controls[c].deactivate()}return true}else{return false}},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);for(var c=0,d=this.controls.length;c<d;c++){this.map.addControl(this.controls[c]);this.controls[c].deactivate();this.controls[c].events.on({activate:this.redraw,deactivate:this.redraw,scope:this})}this.activate();return this.div},redraw:function(){this.div.innerHTML="";if(this.active){for(var f=0,e=this.controls.length;f<e;f++){var d=this.controls[f].panel_div;if(this.controls[f].active){d.className=this.controls[f].displayClass+"ItemActive"}else{d.className=this.controls[f].displayClass+"ItemInactive"}this.div.appendChild(d)}}},activateControl:function(f){if(!this.active){return false}if(f.type==OpenLayers.Control.TYPE_BUTTON){f.trigger();this.redraw();return}if(f.type==OpenLayers.Control.TYPE_TOGGLE){if(f.active){f.deactivate()}else{f.activate()}this.redraw();return}for(var d=0,e=this.controls.length;d<e;d++){if(this.controls[d]!=f){if(this.controls[d].type!=OpenLayers.Control.TYPE_TOGGLE){this.controls[d].deactivate()}}}f.activate()},addControls:function(f){if(!(f instanceof Array)){f=[f]}this.controls=this.controls.concat(f);for(var j=0,g=f.length;j<g;j++){var k=document.createElement("div");var i=document.createTextNode(" ");f[j].panel_div=k;if(f[j].title!=""){f[j].panel_div.title=f[j].title}OpenLayers.Event.observe(f[j].panel_div,"click",OpenLayers.Function.bind(this.onClick,this,f[j]));OpenLayers.Event.observe(f[j].panel_div,"mousedown",OpenLayers.Function.bindAsEventListener(OpenLayers.Event.stop))}if(this.map){for(var j=0,g=f.length;j<g;j++){this.map.addControl(f[j]);f[j].deactivate();f[j].events.on({activate:this.redraw,deactivate:this.redraw,scope:this})}this.redraw()}},onClick:function(c,d){OpenLayers.Event.stop(d?d:window.event);this.activateControl(c)},getControlsBy:function(i,f){var g=(typeof f.test=="function");var e=OpenLayers.Array.filter(this.controls,function(a){return a[i]==f||(g&&f.test(a[i]))});return e},getControlsByName:function(b){return this.getControlsBy("name",b)},getControlsByClass:function(b){return this.getControlsBy("CLASS_NAME",b)},CLASS_NAME:"OpenLayers.Control.Panel"});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(b){return b.target||b.srcElement},isLeftClick:function(b){return(((b.which)&&(b.which==1))||((b.button)&&(b.button==1)))},isRightClick:function(b){return(((b.which)&&(b.which==3))||((b.button)&&(b.button==2)))},stop:function(c,d){if(!d){if(c.preventDefault){c.preventDefault()}else{c.returnValue=false}}if(c.stopPropagation){c.stopPropagation()}else{c.cancelBubble=true}},findElement:function(f,d){var e=OpenLayers.Event.element(f);while(e.parentNode&&(!e.tagName||(e.tagName.toUpperCase()!=d.toUpperCase()))){e=e.parentNode}return e},observe:function(i,n,o,j){var m=OpenLayers.Util.getElement(i);j=j||false;if(n=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||m.attachEvent)){n="keydown"}if(!this.observers){this.observers={}}if(!m._eventCacheID){var l="eventCacheID_";if(m.id){l=m.id+"_"+l}m._eventCacheID=OpenLayers.Util.createUniqueID(l)}var k=m._eventCacheID;if(!this.observers[k]){this.observers[k]=[]}this.observers[k].push({element:m,name:n,observer:o,useCapture:j});if(m.addEventListener){m.addEventListener(n,o,j)}else{if(m.attachEvent){m.attachEvent("on"+n,o)}}},stopObservingElement:function(e){var d=OpenLayers.Util.getElement(e);var f=d._eventCacheID;this._removeElementObservers(OpenLayers.Event.observers[f])},_removeElementObservers:function(i){if(i){for(var f=i.length-1;f>=0;f--){var k=i[f];var g=new Array(k.element,k.name,k.observer,k.useCapture);var j=OpenLayers.Event.stopObserving.apply(this,g)}}},stopObserving:function(n,w,o,v){v=v||false;var q=OpenLayers.Util.getElement(n);var s=q._eventCacheID;if(w=="keypress"){if(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||q.detachEvent){w="keydown"}}var i=false;var u=OpenLayers.Event.observers[s];if(u){var r=0;while(!i&&r<u.length){var m=u[r];if((m.name==w)&&(m.observer==o)&&(m.useCapture==v)){u.splice(r,1);if(u.length==0){delete OpenLayers.Event.observers[s]}i=true;break}r++}}if(i){if(q.removeEventListener){q.removeEventListener(w,o,v)}else{if(q&&q.detachEvent){q.detachEvent("on"+w,o)}}}return i},unloadCache:function(){if(OpenLayers.Event&&OpenLayers.Event.observers){for(var d in OpenLayers.Event.observers){var c=OpenLayers.Event.observers[d];OpenLayers.Event._removeElementObservers.apply(this,[c])}OpenLayers.Event.observers=false}},CLASS_NAME:"OpenLayers.Event"};OpenLayers.Event.observe(window,"unload",OpenLayers.Event.unloadCache,false);if(window.Event){OpenLayers.Util.applyDefaults(window.Event,OpenLayers.Event)}else{var 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(o,m,k,l,i){OpenLayers.Util.extend(this,i);this.object=o;this.fallThrough=l;this.listeners={};this.eventHandler=OpenLayers.Function.bindAsEventListener(this.handleBrowserEvent,this);this.clearMouseListener=OpenLayers.Function.bind(this.clearMouseCache,this);this.eventTypes=[];if(k!=null){for(var n=0,j=k.length;n<j;n++){this.addEventType(k[n])}}if(m!=null){this.attachToElement(m)}},destroy:function(){if(this.element){OpenLayers.Event.stopObservingElement(this.element);if(this.element.hasScrollEvent){OpenLayers.Event.stopObserving(window,"scroll",this.clearMouseListener)}}this.element=null;this.listeners=null;this.object=null;this.eventTypes=null;this.fallThrough=null;this.eventHandler=null},addEventType:function(b){if(!this.listeners[b]){this.eventTypes.push(b);this.listeners[b]=[]}},attachToElement:function(g){if(this.element){OpenLayers.Event.stopObservingElement(this.element)}this.element=g;for(var i=0,f=this.BROWSER_EVENTS.length;i<f;i++){var e=this.BROWSER_EVENTS[i];this.addEventType(e);OpenLayers.Event.observe(g,e,this.eventHandler)}OpenLayers.Event.observe(g,"dragstart",OpenLayers.Event.stop)},on:function(d){for(var c in d){if(c!="scope"){this.register(c,d.scope,d[c])}}},register:function(e,g,i){if((i!=null)&&(OpenLayers.Util.indexOf(this.eventTypes,e)!=-1)){if(g==null){g=this.object}var f=this.listeners[e];f.push({obj:g,func:i})}},registerPriority:function(e,g,i){if(i!=null){if(g==null){g=this.object}var f=this.listeners[e];if(f!=null){f.unshift({obj:g,func:i})}}},un:function(d){for(var c in d){if(c!="scope"){this.unregister(c,d.scope,d[c])}}},unregister:function(l,j,k){if(j==null){j=this.object}var m=this.listeners[l];if(m!=null){for(var g=0,i=m.length;g<i;g++){if(m[g].obj==j&&m[g].func==k){m.splice(g,1);break}}}},remove:function(b){if(this.listeners[b]!=null){this.listeners[b]=[]}},triggerEvent:function(m,i){var n=this.listeners[m];if(!n||n.length==0){return}if(i==null){i={}}i.object=this.object;i.element=this.element;if(!i.type){i.type=m}var n=n.slice(),l;for(var o=0,j=n.length;o<j;o++){var k=n[o];l=k.func.apply(k.obj,[i]);if((l!=undefined)&&(l==false)){break}}if(!this.fallThrough){OpenLayers.Event.stop(i,true)}return l},handleBrowserEvent:function(b){if(this.includeXY){b.xy=this.getMousePosition(b)}this.triggerEvent(b.type,b)},clearMouseCache:function(){this.element.scrolls=null;this.element.lefttop=null;this.element.offsets=null},getMousePosition:function(b){if(!this.includeXY){this.clearMouseCache()}else{if(!this.element.hasScrollEvent){OpenLayers.Event.observe(window,"scroll",this.clearMouseListener);this.element.hasScrollEvent=true}}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((b.clientX+this.element.scrolls[0])-this.element.offsets[0]-this.element.lefttop[0],(b.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(b){OpenLayers.Util.extend(this,b);this.options=b},destroy:function(){},read:function(b){OpenLayers.Console.userError(OpenLayers.i18n("readNotImplemented"))},write:function(b){OpenLayers.Console.userError(OpenLayers.i18n("writeNotImplemented"))},CLASS_NAME:"OpenLayers.Format"});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.Popup.AnchoredBubble=OpenLayers.Class(OpenLayers.Popup.Anchored,{rounded:false,initialize:function(k,o,l,i,j,m,n){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(b){OpenLayers.Popup.Anchored.prototype.draw.apply(this,arguments);this.setContentHTML();this.setBackgroundColor();this.setOpacity();return this.div},updateRelativePosition:function(){this.setRicoCorners()},setSize:function(b){OpenLayers.Popup.Anchored.prototype.setSize.apply(this,arguments);this.setRicoCorners()},setBackgroundColor:function(b){if(b!=undefined){this.backgroundColor=b}if(this.div!=null){if(this.contentDiv!=null){this.div.style.background="transparent";OpenLayers.Rico.Corner.changeColor(this.groupDiv,this.backgroundColor)}}},setOpacity:function(b){OpenLayers.Popup.Anchored.prototype.setOpacity.call(this,b);if(this.div!=null){if(this.groupDiv!=null){OpenLayers.Rico.Corner.changeOpacity(this.groupDiv,this.opacity)}}},setBorder:function(b){this.border=0},setRicoCorners:function(){var d=this.getCornersToRound(this.relativePosition);var c={corners:d,color:this.backgroundColor,bgColor:"transparent",blend:false};if(!this.rounded){OpenLayers.Rico.Corner.round(this.div,c);this.rounded=true}else{OpenLayers.Rico.Corner.reRound(this.groupDiv,c);this.setBackgroundColor();this.setOpacity()}},getCornersToRound:function(){var d=["tl","tr","bl","br"];var c=OpenLayers.Bounds.oppositeQuadrant(this.relativePosition);OpenLayers.Util.removeItem(d,c);return d.join(" ")},CLASS_NAME:"OpenLayers.Popup.AnchoredBubble"});OpenLayers.Popup.AnchoredBubble.CORNER_SIZE=5;OpenLayers.Popup.Framed=OpenLayers.Class(OpenLayers.Popup.Anchored,{imageSrc:null,imageSize:null,isAlphaImage:false,positionBlocks:null,blocks:null,fixedRelativePosition:false,initialize:function(k,o,l,i,j,m,n){OpenLayers.Popup.Anchored.prototype.initialize.apply(this,arguments);if(this.fixedRelativePosition){this.updateRelativePosition();this.calculateRelativePosition=function(a){return this.relativePosition}}this.contentDiv.style.position="absolute";this.contentDiv.style.zIndex=1;if(m){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.imageSrc=null;this.imageSize=null;this.isAlphaImage=null;this.fixedRelativePosition=false;this.positionBlocks=null;for(var d=0;d<this.blocks.length;d++){var c=this.blocks[d];if(c.image){c.div.removeChild(c.image)}c.image=null;if(c.div){this.groupDiv.removeChild(c.div)}c.div=null}this.blocks=null;OpenLayers.Popup.Anchored.prototype.destroy.apply(this,arguments)},setBackgroundColor:function(b){},setBorder:function(){},setOpacity:function(b){},setSize:function(b){OpenLayers.Popup.Anchored.prototype.setSize.apply(this,arguments);this.updateBlocks()},updateRelativePosition:function(){this.padding=this.positionBlocks[this.relativePosition].padding;if(this.closeDiv){var b=this.getContentDivPadding();this.closeDiv.style.right=b.right+this.padding.right+"px";this.closeDiv.style.top=b.top+this.padding.top+"px"}this.updateBlocks()},calculateNewPx:function(d){var c=OpenLayers.Popup.Anchored.prototype.calculateNewPx.apply(this,arguments);c=c.offset(this.positionBlocks[this.relativePosition].offset);return c},createBlocks:function(){this.blocks=[];var n=null;for(var o in this.positionBlocks){n=o;break}var k=this.positionBlocks[n];for(var q=0;q<k.blocks.length;q++){var l={};this.blocks.push(l);var i=this.id+"_FrameDecorationDiv_"+q;l.div=OpenLayers.Util.createDiv(i,null,null,null,"absolute",null,"hidden",null);var r=this.id+"_FrameDecorationImg_"+q;var m=(this.isAlphaImage)?OpenLayers.Util.createAlphaImageDiv:OpenLayers.Util.createImage;l.image=m(r,null,this.imageSize,this.imageSrc,"absolute",null,null,null);l.div.appendChild(l.image);this.groupDiv.appendChild(l.div)}},updateBlocks:function(){if(!this.blocks){this.createBlocks()}if(this.size&&this.relativePosition){var o=this.positionBlocks[this.relativePosition];for(var r=0;r<o.blocks.length;r++){var v=o.blocks[r];var s=this.blocks[r];var u=v.anchor.left;var l=v.anchor.bottom;var w=v.anchor.right;var b=v.anchor.top;var i=(isNaN(v.size.w))?this.size.w-(w+u):v.size.w;var q=(isNaN(v.size.h))?this.size.h-(l+b):v.size.h;s.div.style.width=(i<0?0:i)+"px";s.div.style.height=(q<0?0:q)+"px";s.div.style.left=(u!=null)?u+"px":"";s.div.style.bottom=(l!=null)?l+"px":"";s.div.style.right=(w!=null)?w+"px":"";s.div.style.top=(b!=null)?b+"px":"";s.image.style.left=v.position.x+"px";s.image.style.top=v.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.Projection=OpenLayers.Class({proj:null,projCode:null,initialize:function(c,d){OpenLayers.Util.extend(this,d);this.projCode=c;if(window.Proj4js){this.proj=new Proj4js.Proj(c)}},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(b){if(b&&b.getCode){return this.getCode()==b.getCode()}else{return false}},destroy:function(){delete this.proj;delete this.projCode},CLASS_NAME:"OpenLayers.Projection"});OpenLayers.Projection.transforms={};OpenLayers.Projection.addTransform=function(f,d,e){if(!OpenLayers.Projection.transforms[f]){OpenLayers.Projection.transforms[f]={}}OpenLayers.Projection.transforms[f][d]=e};OpenLayers.Projection.transform=function(e,f,d){if(f.proj&&d.proj){e=Proj4js.transform(f.proj,d.proj,e)}else{if(f&&d&&OpenLayers.Projection.transforms[f.getCode()]&&OpenLayers.Projection.transforms[f.getCode()][d.getCode()]){OpenLayers.Projection.transforms[f.getCode()][d.getCode()](e)}}return e};OpenLayers.Renderer.SVG=OpenLayers.Class(OpenLayers.Renderer.Elements,{xmlns:"http://www.w3.org/2000/svg",xlinkns:"http://www.w3.org/1999/xlink",MAX_PIXEL:15000,translationParameters:null,symbolSize:{},isGecko:null,initialize:function(b){if(!this.supported()){return}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 b="http://www.w3.org/TR/SVG11/feature#";return(document.implementation&&(document.implementation.hasFeature("org.w3c.svg","1.0")||document.implementation.hasFeature(b+"SVG","1.1")||document.implementation.hasFeature(b+"BasicStructure","1.1")))},inValidRange:function(g,i,f){var j=g+(f?0:this.translationParameters.x);var k=i+(f?0:this.translationParameters.y);return(j>=-this.MAX_PIXEL&&j<=this.MAX_PIXEL&&k>=-this.MAX_PIXEL&&k<=this.MAX_PIXEL)},setExtent:function(i,n){OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments);var j=this.getResolution();var l=-i.left/j;var m=i.top/j;if(n){this.left=l;this.top=m;var o="0 0 "+this.size.w+" "+this.size.h;this.rendererRoot.setAttributeNS(null,"viewBox",o);this.translate(0,0);return true}else{var k=this.translate(l-this.left,m-this.top);if(!k){this.setExtent(i,true)}return k}},translate:function(e,f){if(!this.inValidRange(e,f,true)){return false}else{var d="";if(e||f){d="translate("+e+","+f+")"}this.root.setAttributeNS(null,"transform",d);this.translationParameters={x:e,y:f};return true}},setSize:function(b){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(f,d){var e=null;switch(f.CLASS_NAME){case"OpenLayers.Geometry.Point":if(d.externalGraphic){e="image"}else{if(this.isComplexSymbol(d.graphicName)){e="use"}else{e="circle"}}break;case"OpenLayers.Geometry.Rectangle":e="rect";break;case"OpenLayers.Geometry.LineString":e="polyline";break;case"OpenLayers.Geometry.LinearRing":e="polygon";break;case"OpenLayers.Geometry.Polygon":case"OpenLayers.Geometry.Curve":case"OpenLayers.Geometry.Surface":e="path";break;default:break}return e},setStyle:function(B,w,Q){w=w||B._style;Q=Q||B._options;var G=parseFloat(B.getAttributeNS(null,"r"));var H=1;var M;if(B._geometryClass=="OpenLayers.Geometry.Point"&&G){B.style.visibility="";if(w.graphic===false){B.style.visibility="hidden"}else{if(w.externalGraphic){M=this.getPosition(B);if(w.graphicTitle){B.setAttributeNS(null,"title",w.graphicTitle)}if(w.graphicWidth&&w.graphicHeight){B.setAttributeNS(null,"preserveAspectRatio","none")}var C=w.graphicWidth||w.graphicHeight;var E=w.graphicHeight||w.graphicWidth;C=C?C:w.pointRadius*2;E=E?E:w.pointRadius*2;var r=(w.graphicXOffset!=undefined)?w.graphicXOffset:-(0.5*C);var K=(w.graphicYOffset!=undefined)?w.graphicYOffset:-(0.5*E);var R=w.graphicOpacity||w.fillOpacity;B.setAttributeNS(null,"x",(M.x+r).toFixed());B.setAttributeNS(null,"y",(M.y+K).toFixed());B.setAttributeNS(null,"width",C);B.setAttributeNS(null,"height",E);B.setAttributeNS(this.xlinkns,"href",w.externalGraphic);B.setAttributeNS(null,"style","opacity: "+R)}else{if(this.isComplexSymbol(w.graphicName)){var P=w.pointRadius*3;var F=P*2;var D=this.importSymbol(w.graphicName);var z="#"+D;M=this.getPosition(B);H=this.symbolSize[D]/F;var J=B.parentNode;var I=B.nextSibling;if(J){J.removeChild(B)}B.setAttributeNS(this.xlinkns,"href",z);B.setAttributeNS(null,"width",F);B.setAttributeNS(null,"height",F);B.setAttributeNS(null,"x",M.x-P);B.setAttributeNS(null,"y",M.y-P);if(I){J.insertBefore(B,I)}else{if(J){J.appendChild(B)}}}else{B.setAttributeNS(null,"r",w.pointRadius)}}}if(typeof w.rotation!="undefined"&&M){var A=OpenLayers.String.format("rotate(${0} ${1} ${2})",[w.rotation,M.x,M.y]);B.setAttributeNS(null,"transform",A)}}if(Q.isFilled){B.setAttributeNS(null,"fill",w.fillColor);B.setAttributeNS(null,"fill-opacity",w.fillOpacity)}else{B.setAttributeNS(null,"fill","none")}if(Q.isStroked){B.setAttributeNS(null,"stroke",w.strokeColor);B.setAttributeNS(null,"stroke-opacity",w.strokeOpacity);B.setAttributeNS(null,"stroke-width",w.strokeWidth*H);B.setAttributeNS(null,"stroke-linecap",w.strokeLinecap);B.setAttributeNS(null,"stroke-linejoin","round");B.setAttributeNS(null,"stroke-dasharray",this.dashStyle(w,H))}else{B.setAttributeNS(null,"stroke","none")}if(w.pointerEvents){B.setAttributeNS(null,"pointer-events",w.pointerEvents)}if(w.cursor!=null){B.setAttributeNS(null,"cursor",w.cursor)}return B},dashStyle:function(f,d){var e=f.strokeWidth*d;switch(f.strokeDashstyle){case"solid":return"none";case"dot":return[1,4*e].join();case"dash":return[4*e,4*e].join();case"dashdot":return[4*e,4*e,1,4*e].join();case"longdash":return[8*e,4*e].join();case"longdashdot":return[8*e,4*e,1,4*e].join();default:return f.strokeDashstyle.replace(/ /g,",")}},createNode:function(e,f){var d=document.createElementNS(this.xmlns,e);if(f){d.setAttributeNS(null,"id",f)}return d},nodeTypeCompare:function(c,d){return(d==c.nodeName)},createRenderRoot:function(){return this.nodeFactory(this.container.id+"_svgRoot","svg")},createRoot:function(b){return this.nodeFactory(this.container.id+b,"g")},createDefs:function(){var b=this.nodeFactory(this.container.id+"_defs","defs");this.rendererRoot.appendChild(b);return b},drawPoint:function(d,c){return this.drawCircle(d,c,1)},drawCircle:function(l,k,g){var m=this.getResolution();var i=(k.x/m+this.left);var j=(this.top-k.y/m);if(this.inValidRange(i,j)){l.setAttributeNS(null,"cx",i);l.setAttributeNS(null,"cy",j);l.setAttributeNS(null,"r",g);return l}else{return false}},drawLineString:function(d,f){var e=this.getComponentsString(f.components);if(e.path){d.setAttributeNS(null,"points",e.path);return(e.complete?d:null)}else{return false}},drawLinearRing:function(d,f){var e=this.getComponentsString(f.components);if(e.path){d.setAttributeNS(null,"points",e.path);return(e.complete?d:null)}else{return false}},drawPolygon:function(s,m){var n="";var j=true;var u=true;var r,d;for(var q=0,o=m.components.length;q<o;q++){n+=" M";r=this.getComponentsString(m.components[q].components," ");d=r.path;if(d){n+=" "+d;u=r.complete&&u}else{j=false}}n+=" z";if(j){s.setAttributeNS(null,"d",n);s.setAttributeNS(null,"fill-rule","evenodd");return u?s:null}else{return false}},drawRectangle:function(k,j){var f=this.getResolution();var g=(j.x/f+this.left);var i=(this.top-j.y/f);if(this.inValidRange(g,i)){k.setAttributeNS(null,"x",g);k.setAttributeNS(null,"y",i);k.setAttributeNS(null,"width",j.width/f);k.setAttributeNS(null,"height",j.height/f);return k}else{return false}},drawSurface:function(m,k){var l=null;var d=true;for(var n=0,i=k.components.length;n<i;n++){if((n%3)==0&&(n/3)==0){var o=this.getShortString(k.components[n]);if(!o){d=false}l="M "+o}else{if((n%3)==1){var o=this.getShortString(k.components[n]);if(!o){d=false}l+=" C "+o}else{var o=this.getShortString(k.components[n]);if(!o){d=false}l+=" "+o}}}l+=" Z";if(d){m.setAttributeNS(null,"d",l);return m}else{return false}},drawText:function(r,u,k){var s=this.getResolution();var l=(k.x/s+this.left);var o=(k.y/s-this.top);var m=this.nodeFactory(r+this.LABEL_ID_SUFFIX,"text");var n=this.nodeFactory(r+this.LABEL_ID_SUFFIX+"_tspan","tspan");m.setAttributeNS(null,"x",l);m.setAttributeNS(null,"y",-o);m.setAttributeNS(null,"pointer-events","none");if(u.fontColor){m.setAttributeNS(null,"fill",u.fontColor)}if(u.fontFamily){m.setAttributeNS(null,"font-family",u.fontFamily)}if(u.fontSize){m.setAttributeNS(null,"font-size",u.fontSize)}if(u.fontWeight){m.setAttributeNS(null,"font-weight",u.fontWeight)}var q=u.labelAlign||"cm";m.setAttributeNS(null,"text-anchor",OpenLayers.Renderer.SVG.LABEL_ALIGN[q[0]]||"middle");if(this.isGecko){m.setAttributeNS(null,"dominant-baseline",OpenLayers.Renderer.SVG.LABEL_ALIGN[q[1]]||"central")}else{n.setAttributeNS(null,"baseline-shift",OpenLayers.Renderer.SVG.LABEL_VSHIFT[q[1]]||"-35%")}n.textContent=u.label;if(!m.parentNode){m.appendChild(n);this.textRoot.appendChild(m)}},getComponentsString:function(r,s){var o=[];var w=true;var q=r.length;var i=[];var n,j,v;for(var u=0;u<q;u++){j=r[u];o.push(j);n=this.getShortString(j);if(n){i.push(n)}else{if(u>0){if(this.getShortString(r[u-1])){i.push(this.clipLine(r[u],r[u-1]))}}if(u<q-1){if(this.getShortString(r[u+1])){i.push(this.clipLine(r[u],r[u+1]))}}w=false}}return{path:i.join(s||","),complete:w}},clipLine:function(r,n){if(n.equals(r)){return""}var q=this.getResolution();var v=this.MAX_PIXEL-this.translationParameters.x;var w=this.MAX_PIXEL-this.translationParameters.y;var s=n.x/q+this.left;var k=this.top-n.y/q;var u=r.x/q+this.left;var m=this.top-r.y/q;var o;if(u<-v||u>v){o=(m-k)/(u-s);u=u<0?-v:v;m=k+(u-s)*o}if(m<-w||m>w){o=(u-s)/(m-k);m=m<0?-w:w;u=s+(m-k)*o}return u+","+m},getShortString:function(e){var i=this.getResolution();var f=(e.x/i+this.left);var g=(this.top-e.y/i);if(this.inValidRange(f,g)){return f+","+g}else{return false}},getPosition:function(b){return({x:parseFloat(b.getAttributeNS(null,"cx")),y:parseFloat(b.getAttributeNS(null,"cy"))})},importSymbol:function(A){if(!this.defs){this.defs=this.createDefs()}var D=this.container.id+"-"+A;if(document.getElementById(D)!=null){return D}var B=OpenLayers.Renderer.symbol[A];if(!B){throw new Error(A+" is not a valid symbol name");return}var w=this.nodeFactory(D,"symbol");var C=this.nodeFactory(null,"polygon");w.appendChild(C);var q=new OpenLayers.Bounds(Number.MAX_VALUE,Number.MAX_VALUE,0,0);var s="";var u,v;for(var z=0;z<B.length;z=z+2){u=B[z];v=B[z+1];q.left=Math.min(q.left,u);q.bottom=Math.min(q.bottom,v);q.right=Math.max(q.right,u);q.top=Math.max(q.top,v);s+=" "+u+","+v}C.setAttributeNS(null,"points",s);var E=q.getWidth();var r=q.getHeight();var i=[q.left-E,q.bottom-r,E*3,r*3];w.setAttributeNS(null,"viewBox",i.join(" "));this.symbolSize[D]=Math.max(E,r)*3;this.defs.appendChild(w);return w.id},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.Renderer.VML=OpenLayers.Class(OpenLayers.Renderer.Elements,{xmlns:"urn:schemas-microsoft-com:vml",symbolCache:{},offset:null,initialize:function(f){if(!this.supported()){return}if(!document.namespaces.olv){document.namespaces.add("olv",this.xmlns);var i=document.createStyleSheet();var k=["shape","rect","oval","fill","stroke","imagedata","group","textbox"];for(var j=0,g=k.length;j<g;j++){i.addRule("olv\\:"+k[j],"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(o,A){OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments);var w=this.getResolution();var z=o.left/w;var s=o.top/w-this.size.h;if(A){this.offset={x:z,y:s};z=0;s=0}else{z=z-this.offset.x;s=s-this.offset.y}var i=z+" "+s;this.root.coordorigin=i;var q=[this.root,this.vectorRoot,this.textRoot];var r;for(var v=0,u=q.length;v<u;++v){r=q[v];var n=this.size.w+" "+this.size.h;r.coordsize=n}this.root.style.flip="y";return true},setSize:function(l){OpenLayers.Renderer.prototype.setSize.apply(this,arguments);var n=[this.rendererRoot,this.root,this.vectorRoot,this.textRoot];var o=this.size.w+"px";var k=this.size.h+"px";var i;for(var m=0,j=n.length;m<j;++m){i=n[m];i.style.width=o;i.style.height=k}},getNodeType:function(f,d){var e=null;switch(f.CLASS_NAME){case"OpenLayers.Geometry.Point":if(d.externalGraphic){e="olv:rect"}else{if(this.isComplexSymbol(d.graphicName)){e="olv:shape"}else{e="olv:oval"}}break;case"OpenLayers.Geometry.Rectangle":e="olv:rect";break;case"OpenLayers.Geometry.LineString":case"OpenLayers.Geometry.LinearRing":case"OpenLayers.Geometry.Polygon":case"OpenLayers.Geometry.Curve":case"OpenLayers.Geometry.Surface":e="olv:shape";break;default:break}return e},setStyle:function(H,J,s,A){J=J||H._style;s=s||H._options;var C=1;if(H._geometryClass=="OpenLayers.Geometry.Point"){if(J.externalGraphic){if(J.graphicTitle){H.title=J.graphicTitle}var I=J.graphicWidth||J.graphicHeight;var z=J.graphicHeight||J.graphicWidth;I=I?I:J.pointRadius*2;z=z?z:J.pointRadius*2;var F=this.getResolution();var D=(J.graphicXOffset!=undefined)?J.graphicXOffset:-(0.5*I);var G=(J.graphicYOffset!=undefined)?J.graphicYOffset:-(0.5*z);H.style.left=((A.x/F-this.offset.x)+D).toFixed();H.style.top=((A.y/F-this.offset.y)-(G+z)).toFixed();H.style.width=I+"px";H.style.height=z+"px";H.style.flip="y";J.fillColor="none";s.isStroked=false}else{if(this.isComplexSymbol(J.graphicName)){var K=this.importSymbol(J.graphicName);H.path=K.path;H.coordorigin=K.left+","+K.bottom;var u=K.size;H.coordsize=u+","+u;this.drawCircle(H,A,J.pointRadius);H.style.flip="y"}else{this.drawCircle(H,A,J.pointRadius)}}}if(s.isFilled){H.fillcolor=J.fillColor}else{H.filled="false"}var B=H.getElementsByTagName("fill");var v=(B.length==0)?null:B[0];if(!s.isFilled){if(v){H.removeChild(v)}}else{if(!v){v=this.createNode("olv:fill",H.id+"_fill")}v.opacity=J.fillOpacity;if(H._geometryClass=="OpenLayers.Geometry.Point"&&J.externalGraphic){if(J.graphicOpacity){v.opacity=J.graphicOpacity}v.src=J.externalGraphic;v.type="frame";if(!(J.graphicWidth&&J.graphicHeight)){v.aspect="atmost"}}if(v.parentNode!=H){H.appendChild(v)}}if(typeof J.rotation!="undefined"){if(J.externalGraphic){this.graphicRotate(H,D,G);v.opacity=0}else{H.style.rotation=J.rotation}}if(s.isStroked){H.strokecolor=J.strokeColor;H.strokeweight=J.strokeWidth+"px"}else{H.stroked=false}var E=H.getElementsByTagName("stroke");var w=(E.length==0)?null:E[0];if(!s.isStroked){if(w){H.removeChild(w)}}else{if(!w){w=this.createNode("olv:stroke",H.id+"_stroke");H.appendChild(w)}w.opacity=J.strokeOpacity;w.endcap=!J.strokeLinecap||J.strokeLinecap=="butt"?"flat":J.strokeLinecap;w.dashstyle=this.dashStyle(J)}if(J.cursor!="inherit"&&J.cursor!=null){H.style.cursor=J.cursor}return H},graphicRotate:function(D,z,M){var A=A||D._style;var Q=D._options;var U,H;if(!(A.graphicWidth&&A.graphicHeight)){var w=new Image();w.onreadystatechange=OpenLayers.Function.bind(function(){if(w.readyState=="complete"||w.readyState=="interactive"){U=w.width/w.height;H=Math.max(A.pointRadius*2,A.graphicWidth||0,A.graphicHeight||0);z=z*U;A.graphicWidth=H*U;A.graphicHeight=H;this.graphicRotate(D,z,M)}},this);w.src=A.externalGraphic;return}else{H=Math.max(A.graphicWidth,A.graphicHeight);U=A.graphicWidth/A.graphicHeight}var E=Math.round(A.graphicWidth||H*U);var G=Math.round(A.graphicHeight||H);D.style.width=E+"px";D.style.height=G+"px";var F=document.getElementById(D.id+"_image");if(!F){F=this.createNode("olv:imagedata",D.id+"_image");D.appendChild(F)}F.style.width=E+"px";F.style.height=G+"px";F.src=A.externalGraphic;F.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='', sizingMethod='scale')";var C=A.rotation*Math.PI/180;var J=Math.sin(C);var P=Math.cos(C);var K="progid:DXImageTransform.Microsoft.Matrix(M11="+P+",M12="+(-J)+",M21="+J+",M22="+P+",SizingMethod='auto expand')\n";var T=A.graphicOpacity||A.fillOpacity;if(T&&T!=1){K+="progid:DXImageTransform.Microsoft.BasicImage(opacity="+T+")\n"}D.style.filter=K;var B=new OpenLayers.Geometry.Point(-z,-M);var R=new OpenLayers.Bounds(0,0,E,G).toGeometry();R.rotate(A.rotation,B);var I=R.getBounds();D.style.left=Math.round(parseInt(D.style.left)+I.left)+"px";D.style.top=Math.round(parseInt(D.style.top)-I.bottom)+"px"},postDraw:function(e){var f=e._style.fillColor;var d=e._style.strokeColor;if(f=="none"&&e.fillcolor!=f){e.fillcolor=f}if(d=="none"&&e.strokecolor!=d){e.strokecolor=d}},setNodeDimension:function(f,i){var j=i.getBounds();if(j){var g=this.getResolution();var k=new OpenLayers.Bounds((j.left/g-this.offset.x).toFixed(),(j.bottom/g-this.offset.y).toFixed(),(j.right/g-this.offset.x).toFixed(),(j.top/g-this.offset.y).toFixed());f.style.left=k.left+"px";f.style.top=k.top+"px";f.style.width=k.getWidth()+"px";f.style.height=k.getHeight()+"px";f.coordorigin=k.left+" "+k.top;f.coordsize=k.getWidth()+" "+k.getHeight()}},dashStyle:function(e){var f=e.strokeDashstyle;switch(f){case"solid":case"dot":case"dash":case"dashdot":case"longdash":case"longdashdot":return f;default:var d=f.split(/[ ,]/);if(d.length==2){if(1*d[0]>=2*d[1]){return"longdash"}return(d[0]==1||d[1]==1)?"dot":"dash"}else{if(d.length==4){return(1*d[0]>=2*d[1])?"longdashdot":"dashdot"}}return"solid"}},createNode:function(e,f){var d=document.createElement(e);if(f){d.id=f}d.unselectable="on";d.onselectstart=function(){return(false)};return d},nodeTypeCompare:function(k,f){var j=f;var g=j.indexOf(":");if(g!=-1){j=j.substr(g+1)}var i=k.nodeName;g=i.indexOf(":");if(g!=-1){i=i.substr(g+1)}return(j==i)},createRenderRoot:function(){return this.nodeFactory(this.container.id+"_vmlRoot","div")},createRoot:function(b){return this.nodeFactory(this.container.id+b,"olv:group")},drawPoint:function(d,c){return this.drawCircle(d,c,1)},drawCircle:function(j,i,g){if(!isNaN(i.x)&&!isNaN(i.y)){var f=this.getResolution();j.style.left=((i.x/f-this.offset.x).toFixed()-g)+"px";j.style.top=((i.y/f-this.offset.y).toFixed()-g)+"px";var k=g*2;j.style.width=k+"px";j.style.height=k+"px";return j}return false},drawLineString:function(d,c){return this.drawLine(d,c,false)},drawLinearRing:function(d,c){return this.drawLine(d,c,true)},drawLine:function(z,n,r){this.setNodeDimension(z,n);var w=this.getResolution();var A=n.components.length;var u=new Array(A);var q,i,o;for(var s=0;s<A;s++){q=n.components[s];i=(q.x/w-this.offset.x);o=(q.y/w-this.offset.y);u[s]=" "+i.toFixed()+","+o.toFixed()+" l "}var v=(r)?" x e":" e";z.path="m"+u.join("")+v;return z},drawPolygon:function(B,q){this.setNodeDimension(B,q);var A=this.getResolution();var i=[];var v,w,z,s,C,u,j,r;for(z=0,s=q.components.length;z<s;z++){v=q.components[z];i.push("m");for(w=0,C=v.components.length;w<C;w++){u=v.components[w];j=u.x/A-this.offset.x;r=u.y/A-this.offset.y;i.push(" "+j.toFixed()+","+r.toFixed());if(w==0){i.push(" l")}}i.push(" x ")}i.push("e");B.path=i.join("");return B},drawRectangle:function(d,f){var e=this.getResolution();d.style.left=(f.x/e-this.offset.x)+"px";d.style.top=(f.y/e-this.offset.y)+"px";d.style.width=f.width/e+"px";d.style.height=f.height/e+"px";return d},drawText:function(q,u,l){var m=this.nodeFactory(q+this.LABEL_ID_SUFFIX,"olv:rect");var n=this.nodeFactory(q+this.LABEL_ID_SUFFIX+"_textbox","olv:textbox");var r=this.getResolution();m.style.left=(l.x/r-this.offset.x).toFixed()+"px";m.style.top=(l.y/r-this.offset.y).toFixed()+"px";m.style.flip="y";n.innerText=u.label;if(u.fillColor){n.style.color=u.fontColor}if(u.fontFamily){n.style.fontFamily=u.fontFamily}if(u.fontSize){n.style.fontSize=u.fontSize}if(u.fontWeight){n.style.fontWeight=u.fontWeight}n.style.whiteSpace="nowrap";n.inset="1px,0px,0px,0px";if(!m.parentNode){m.appendChild(n);this.textRoot.appendChild(m)}var o=u.labelAlign||"cm";var k=n.clientWidth*(OpenLayers.Renderer.VML.LABEL_SHIFT[o.substr(0,1)]);var s=n.clientHeight*(OpenLayers.Renderer.VML.LABEL_SHIFT[o.substr(1,1)]);m.style.left=parseInt(m.style.left)-k-1+"px";m.style.top=parseInt(m.style.top)+s+"px"},drawSurface:function(u,m){this.setNodeDimension(u,m);var s=this.getResolution();var i=[];var q,l,n;for(var r=0,o=m.components.length;r<o;r++){q=m.components[r];l=q.x/s-this.offset.x;n=q.y/s-this.offset.y;if((r%3)==0&&(r/3)==0){i.push("m")}else{if((r%3)==1){i.push(" c")}}i.push(" "+l+","+n)}i.push(" x e");u.path=i.join("");return u},moveRoot:function(c){var d=this.map.getLayer(c.container.id);if(d instanceof OpenLayers.Layer.Vector.RootContainer){d=this.map.getLayer(this.container.id)}d&&d.renderer.clear();OpenLayers.Renderer.Elements.prototype.moveRoot.apply(this,arguments);d&&d.redraw()},importSymbol:function(q){var s=this.container.id+"-"+q;var u=this.symbolCache[s];if(u){return u}var r=OpenLayers.Renderer.symbol[q];if(!r){throw new Error(q+" is not a valid symbol name");return}var l=new OpenLayers.Bounds(Number.MAX_VALUE,Number.MAX_VALUE,0,0);var o=["m"];for(var n=0;n<r.length;n=n+2){x=r[n];y=r[n+1];l.left=Math.min(l.left,x);l.bottom=Math.min(l.bottom,y);l.right=Math.max(l.right,x);l.top=Math.max(l.top,y);o.push(x);o.push(y);if(n==0){o.push("l")}}o.push("x e");var i=o.join(" ");var m=(l.getWidth()-l.getHeight())/2;if(m>0){l.bottom=l.bottom-m;l.top=l.top+m}else{l.left=l.left-m;l.right=l.right+m}u={path:i,size:l.getWidth(),left:l.left,bottom:l.bottom};this.symbolCache[s]=u;return u},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.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(j,g,i,f,k){this.layer=j;this.position=g.clone();this.bounds=i.clone();this.url=f;this.size=k.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.layer=null;this.bounds=null;this.size=null;this.position=null;this.events.destroy();this.events=null},clone:function(b){if(b==null){b=new OpenLayers.Tile(this.layer,this.position,this.bounds,this.url,this.size)}OpenLayers.Util.applyDefaults(b,this);return b},draw:function(){var d=this.layer.maxExtent;var c=(d&&this.bounds.intersectsBounds(d,false));this.shouldDraw=(c||this.layer.displayOutsideMaxExtent);this.clear();return this.shouldDraw},moveTo:function(d,e,f){if(f==null){f=true}this.bounds=d.clone();this.position=e.clone();if(f){this.draw()}},clear:function(){},getBoundsFromBaseLayer:function(i){var j=OpenLayers.i18n("reprojectDeprecated",{layerName:this.layer.name});OpenLayers.Console.warn(j);var l=this.layer.map.getLonLatFromLayerPx(i);var m=i.clone();m.x+=this.size.w;m.y+=this.size.h;var g=this.layer.map.getLonLatFromLayerPx(m);if(l.lon>g.lon){if(l.lon<0){l.lon=-180-(l.lon+180)}else{g.lon=180+g.lon+180}}var k=new OpenLayers.Bounds(l.lon,g.lat,g.lon,l.lat);return k},showTile:function(){if(this.shouldDraw){this.show()}},show:function(){},hide:function(){},CLASS_NAME:"OpenLayers.Tile"});OpenLayers.Control.PanZoomBar=OpenLayers.Class(OpenLayers.Control.PanZoom,{zoomStopWidth:18,zoomStopHeight:11,slider:null,sliderEvents:null,zoomBarDiv:null,divEvents:null,zoomWorldIcon:false,initialize:function(){OpenLayers.Control.PanZoom.prototype.initialize.apply(this,arguments)},destroy:function(){this._removeZoomBar();this.map.events.un({changebaselayer:this.redraw,scope:this});OpenLayers.Control.PanZoom.prototype.destroy.apply(this,arguments)},setMap:function(b){OpenLayers.Control.PanZoom.prototype.setMap.apply(this,arguments);this.map.events.register("changebaselayer",this,this.redraw)},redraw:function(){if(this.div!=null){this.removeButtons();this._removeZoomBar()}this.draw()},draw:function(e){OpenLayers.Control.prototype.draw.apply(this,arguments);e=this.position.clone();this.buttons=[];var g=new OpenLayers.Size(18,18);var f=new OpenLayers.Pixel(e.x+g.w/2,e.y);var i=g.w;if(this.zoomWorldIcon){f=new OpenLayers.Pixel(e.x+g.w,e.y)}this._addButton("panup","north-mini.png",f,g);e.y=f.y+g.h;this._addButton("panleft","west-mini.png",e,g);if(this.zoomWorldIcon){this._addButton("zoomworld","zoom-world-mini.png",e.add(g.w,0),g);i*=2}this._addButton("panright","east-mini.png",e.add(i,0),g);this._addButton("pandown","south-mini.png",f.add(0,g.h*2),g);this._addButton("zoomin","zoom-plus-mini.png",f.add(0,g.h*3+5),g);f=this._addZoomBar(f.add(0,g.h*4+5));this._addButton("zoomout","zoom-minus-mini.png",f,g);return this.div},_addZoomBar:function(j){var m=OpenLayers.Util.getImagesLocation();var k=this.id+"_"+this.map.id;var i=this.map.getNumZoomLevels()-1-this.map.getZoom();var o=OpenLayers.Util.createAlphaImageDiv(k,j.add(-1,i*this.zoomStopHeight),new OpenLayers.Size(20,9),m+"slider.png","absolute");this.slider=o;this.sliderEvents=new OpenLayers.Events(this,o,null,true,{includeXY:true});this.sliderEvents.on({mousedown:this.zoomBarDown,mousemove:this.zoomBarDrag,mouseup:this.zoomBarUp,dblclick:this.doubleClick,click:this.doubleClick});var n=new OpenLayers.Size();n.h=this.zoomStopHeight*this.map.getNumZoomLevels();n.w=this.zoomStopWidth;var l=null;if(OpenLayers.Util.alphaHack()){var k=this.id+"_"+this.map.id;l=OpenLayers.Util.createAlphaImageDiv(k,j,new OpenLayers.Size(n.w,this.zoomStopHeight),m+"zoombar.png","absolute",null,"crop");l.style.height=n.h+"px"}else{l=OpenLayers.Util.createDiv("OpenLayers_Control_PanZoomBar_Zoombar"+this.map.id,j,n,m+"zoombar.png")}this.zoombarDiv=l;this.divEvents=new OpenLayers.Events(this,l,null,true,{includeXY:true});this.divEvents.on({mousedown:this.divClick,mousemove:this.passEventToSlider,dblclick:this.doubleClick,click:this.doubleClick});this.div.appendChild(l);this.startTop=parseInt(l.style.top);this.div.appendChild(o);this.map.events.register("zoomend",this,this.moveZoomBar);j=j.add(0,this.zoomStopHeight*this.map.getNumZoomLevels());return j},_removeZoomBar:function(){this.sliderEvents.un({mousedown:this.zoomBarDown,mousemove:this.zoomBarDrag,mouseup:this.zoomBarUp,dblclick:this.doubleClick,click:this.doubleClick});this.sliderEvents.destroy();this.divEvents.un({mousedown:this.divClick,mousemove:this.passEventToSlider,dblclick:this.doubleClick,click:this.doubleClick});this.divEvents.destroy();this.div.removeChild(this.zoombarDiv);this.zoombarDiv=null;this.div.removeChild(this.slider);this.slider=null;this.map.events.unregister("zoomend",this,this.moveZoomBar)},passEventToSlider:function(b){this.sliderEvents.handleBrowserEvent(b)},divClick:function(g){if(!OpenLayers.Event.isLeftClick(g)){return}var i=g.xy.y;var j=OpenLayers.Util.pagePosition(g.object)[1];var k=(i-j)/this.zoomStopHeight;if(!this.map.fractionalZoom){k=Math.floor(k)}var f=(this.map.getNumZoomLevels()-1)-k;f=Math.min(Math.max(f,0),this.map.getNumZoomLevels()-1);this.map.zoomTo(f);OpenLayers.Event.stop(g)},zoomBarDown:function(b){if(!OpenLayers.Event.isLeftClick(b)){return}this.map.events.on({mousemove:this.passEventToSlider,mouseup:this.passEventToSlider,scope:this});this.mouseDragStart=b.xy.clone();this.zoomStart=b.xy.clone();this.div.style.cursor="move";this.zoombarDiv.offsets=null;OpenLayers.Event.stop(b)},zoomBarDrag:function(e){if(this.mouseDragStart!=null){var f=this.mouseDragStart.y-e.xy.y;var g=OpenLayers.Util.pagePosition(this.zoombarDiv);if((e.clientY-g[1])>0&&(e.clientY-g[1])<parseInt(this.zoombarDiv.style.height)-2){var i=parseInt(this.slider.style.top)-f;this.slider.style.top=i+"px";this.mouseDragStart=e.xy.clone()}OpenLayers.Event.stop(e)}},zoomBarUp:function(d){if(!OpenLayers.Event.isLeftClick(d)){return}if(this.zoomStart){this.div.style.cursor="";this.map.events.un({mouseup:this.passEventToSlider,mousemove:this.passEventToSlider,scope:this});var e=this.zoomStart.y-d.xy.y;var f=this.map.zoom;if(this.map.fractionalZoom){f+=e/this.zoomStopHeight;f=Math.min(Math.max(f,0),this.map.getNumZoomLevels()-1)}else{f+=Math.round(e/this.zoomStopHeight)}this.map.zoomTo(f);this.moveZoomBar();this.mouseDragStart=null;OpenLayers.Event.stop(d)}},moveZoomBar:function(){var b=((this.map.getNumZoomLevels()-1)-this.map.getZoom())*this.zoomStopHeight+this.startTop+1;this.slider.style.top=b+"px"},CLASS_NAME:"OpenLayers.Control.PanZoomBar"});OpenLayers.Handler=OpenLayers.Class({id:null,control:null,map:null,keyMask:null,active:false,evt:null,initialize:function(f,d,e){OpenLayers.Util.extend(this,e);this.control=f;this.callbacks=d;if(f.map){this.setMap(f.map)}OpenLayers.Util.extend(this,e);this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")},setMap:function(b){this.map=b},checkModifiers:function(d){if(this.keyMask==null){return true}var c=(d.shiftKey?OpenLayers.Handler.MOD_SHIFT:0)|(d.ctrlKey?OpenLayers.Handler.MOD_CTRL:0)|(d.altKey?OpenLayers.Handler.MOD_ALT:0);return(c==this.keyMask)},activate:function(){if(this.active){return false}var f=OpenLayers.Events.prototype.BROWSER_EVENTS;for(var d=0,e=f.length;d<e;d++){if(this[f[d]]){this.register(f[d],this[f[d]])}}this.active=true;return true},deactivate:function(){if(!this.active){return false}var f=OpenLayers.Events.prototype.BROWSER_EVENTS;for(var d=0,e=f.length;d<e;d++){if(this[f[d]]){this.unregister(f[d],this[f[d]])}}this.active=false;return true},callback:function(c,d){if(c&&this.callbacks[c]){this.callbacks[c].apply(this.control,d)}},register:function(d,c){this.map.events.registerPriority(d,this,c);this.map.events.registerPriority(d,this,this.setEvent)},unregister:function(d,c){this.map.events.unregister(d,this,c);this.map.events.unregister(d,this,this.setEvent)},setEvent:function(b){this.evt=b;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:1000},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(l,q){if(arguments.length===1&&typeof l==="object"){q=l;l=q&&q.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,q);this.id=OpenLayers.Util.createUniqueID("OpenLayers.Map_");this.div=OpenLayers.Util.getElement(l);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 m=this.div.id+"_OpenLayers_ViewPort";this.viewPortDiv=OpenLayers.Util.createDiv(m,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);m=this.div.id+"_OpenLayers_Container";this.layerContainerDiv=OpenLayers.Util.createDiv(m);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();if(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){var n=true;var r=document.getElementsByTagName("link");for(var o=0,k=r.length;o<k;++o){if(OpenLayers.Util.isEquivalentUrl(r.item(o).href,this.theme)){n=false;break}}if(n){var i=document.createElement("link");i.setAttribute("rel","stylesheet");i.setAttribute("type","text/css");i.setAttribute("href",this.theme);document.getElementsByTagName("head")[0].appendChild(i)}}this.layers=[];if(this.controls==null){if(OpenLayers.Control!=null){this.controls=[new OpenLayers.Control.Navigation(),new OpenLayers.Control.PanZoom(),new OpenLayers.Control.ArgParser(),new OpenLayers.Control.Attribution()]}else{this.controls=[]}}for(var o=0,k=this.controls.length;o<k;o++){this.addControlToMap(this.controls[o])}this.popups=[];this.unloadDestroy=OpenLayers.Function.bind(this.destroy,this);OpenLayers.Event.observe(window,"unload",this.unloadDestroy)},render:function(b){this.div=OpenLayers.Util.getElement(b);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;if(this.updateSizeDestroy){OpenLayers.Event.stopObserving(window,"resize",this.updateSizeDestroy)}else{this.events.unregister("resize",this,this.updateSize)}this.paddingForPopups=null;if(this.controls!=null){for(var b=this.controls.length-1;b>=0;--b){this.controls[b].destroy()}this.controls=null}if(this.layers!=null){for(var b=this.layers.length-1;b>=0;--b){this.layers[b].destroy(false)}this.layers=null}if(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(b){OpenLayers.Util.extend(this,b)},getTileSize:function(){return this.tileSize},getBy:function(i,k,g){var j=(typeof g.test=="function");var f=OpenLayers.Array.filter(this[i],function(a){return a[k]==g||(j&&g.test(a[k]))});return f},getLayersBy:function(c,d){return this.getBy("layers",c,d)},getLayersByName:function(b){return this.getLayersBy("name",b)},getLayersByClass:function(b){return this.getLayersBy("CLASS_NAME",b)},getControlsBy:function(c,d){return this.getBy("controls",c,d)},getControlsByClass:function(b){return this.getControlsBy("CLASS_NAME",b)},getLayer:function(i){var f=null;for(var j=0,g=this.layers.length;j<g;j++){var k=this.layers[j];if(k.id==i){f=k;break}}return f},setLayerZIndex:function(c,d){c.setZIndex(this.Z_INDEX_BASE[c.isBaseLayer?"BaseLayer":"Overlay"]+d*5)},resetLayersZIndex:function(){for(var f=0,e=this.layers.length;f<e;f++){var d=this.layers[f];this.setLayerZIndex(d,f)}},addLayer:function(i){for(var e=0,f=this.layers.length;e<f;e++){if(this.layers[e]==i){var g=OpenLayers.i18n("layerAlreadyAdded",{layerName:i.name});OpenLayers.Console.warn(g);return false}}if(this.allOverlays){i.isBaseLayer=false}this.events.triggerEvent("preaddlayer",{layer:i});i.div.className="olLayerDiv";i.div.style.overflow="";this.setLayerZIndex(i,this.layers.length);if(i.isFixed){this.viewPortDiv.appendChild(i.div)}else{this.layerContainerDiv.appendChild(i.div)}this.layers.push(i);i.setMap(this);if(i.isBaseLayer||(this.allOverlays&&!this.baseLayer)){if(this.baseLayer==null){this.setBaseLayer(i)}else{i.setVisibility(false)}}else{i.redraw()}this.events.triggerEvent("addlayer",{layer:i});i.afterAdd()},addLayers:function(f){for(var d=0,e=f.length;d<e;d++){this.addLayer(f[d])}},removeLayer:function(k,i){if(i==null){i=true}if(k.isFixed){this.viewPortDiv.removeChild(k.div)}else{this.layerContainerDiv.removeChild(k.div)}OpenLayers.Util.removeItem(this.layers,k);k.removeMap(this);k.map=null;if(this.baseLayer==k){this.baseLayer=null;if(i){for(var f=0,g=this.layers.length;f<g;f++){var j=this.layers[f];if(j.isBaseLayer||this.allOverlays){this.setBaseLayer(j);break}}}}this.resetLayersZIndex();this.events.triggerEvent("removelayer",{layer:k})},getNumLayers:function(){return this.layers.length},getLayerIndex:function(b){return OpenLayers.Util.indexOf(this.layers,b)},setLayerIndex:function(j,f){var i=this.getLayerIndex(j);if(f<0){f=0}else{if(f>this.layers.length){f=this.layers.length}}if(i!=f){this.layers.splice(i,1);this.layers.splice(f,0,j);for(var k=0,g=this.layers.length;k<g;k++){this.setLayerZIndex(this.layers[k],k)}this.events.triggerEvent("changelayer",{layer:j,property:"order"});if(this.allOverlays){if(f===0){this.setBaseLayer(j)}else{if(this.baseLayer!==this.layers[0]){this.setBaseLayer(this.layers[0])}}}}},raiseLayer:function(d,f){var e=this.getLayerIndex(d)+f;this.setLayerIndex(d,e)},setBaseLayer:function(i){var j=null;if(this.baseLayer){j=this.baseLayer.getExtent()}if(i!=this.baseLayer){if(OpenLayers.Util.indexOf(this.layers,i)!=-1){if(this.baseLayer!=null&&!this.allOverlays){this.baseLayer.setVisibility(false)}this.baseLayer=i;this.viewRequestID++;if(!this.allOverlays){this.baseLayer.visibility=true}var g=this.getCenter();if(g!=null){var f=(j)?j.getCenterLonLat():g;var k=(j)?this.getZoomForExtent(j,true):this.getZoomForResolution(this.resolution,true);this.setCenter(f,k,false,true)}this.events.triggerEvent("changebaselayer",{layer:this.baseLayer})}}},addControl:function(c,d){this.controls.push(c);this.addControlToMap(c,d)},addControlToMap:function(d,e){d.outsideViewport=(d.div!=null);if(this.displayProjection&&!d.displayProjection){d.displayProjection=this.displayProjection}d.setMap(this);var f=d.draw(e);if(f){if(!d.outsideViewport){f.style.zIndex=this.Z_INDEX_BASE.Control+this.controls.length;this.viewPortDiv.appendChild(f)}}},getControl:function(i){var f=null;for(var k=0,g=this.controls.length;k<g;k++){var j=this.controls[k];if(j.id==i){f=j;break}}return f},removeControl:function(b){if((b)&&(b==this.getControl(b.id))){if(b.div&&(b.div.parentNode==this.viewPortDiv)){this.viewPortDiv.removeChild(b.div)}OpenLayers.Util.removeItem(this.controls,b)}},addPopup:function(f,g){if(g){for(var e=this.popups.length-1;e>=0;--e){this.removePopup(this.popups[e])}}f.map=this;this.popups.push(f);var i=f.draw();if(i){i.style.zIndex=this.Z_INDEX_BASE.Popup+this.popups.length;this.layerContainerDiv.appendChild(i)}},removePopup:function(d){OpenLayers.Util.removeItem(this.popups,d);if(d.div){try{this.layerContainerDiv.removeChild(d.div)}catch(c){}}d.map=null},getSize:function(){var b=null;if(this.size!=null){b=this.size.clone()}return b},updateSize:function(){this.events.clearMouseCache();var o=this.getCurrentSize();var l=this.getSize();if(l==null){this.size=l=o}if(!o.equals(l)){this.size=o;for(var n=0,i=this.layers.length;n<i;n++){this.layers[n].onMapResize()}if(this.baseLayer!=null){var j=new OpenLayers.Pixel(o.w/2,o.h/2);var k=this.getLonLatFromViewPortPx(j);var m=this.getZoom();this.zoom=null;this.setCenter(this.getCenter(),m)}}},getCurrentSize:function(){var d=new OpenLayers.Size(this.div.clientWidth,this.div.clientHeight);if(d.w==0&&d.h==0||isNaN(d.w)&&isNaN(d.h)){var c=OpenLayers.Element.getDimensions(this.div);d.w=c.width;d.h=c.height}if(d.w==0&&d.h==0||isNaN(d.w)&&isNaN(d.h)){d.w=parseInt(this.div.style.width);d.h=parseInt(this.div.style.height)}return d},calculateBounds:function(i,g){var k=null;if(i==null){i=this.getCenter()}if(g==null){g=this.getResolution()}if((i!=null)&&(g!=null)){var l=this.getSize();var j=l.w*g;var m=l.h*g;k=new OpenLayers.Bounds(i.lon-j/2,i.lat-m/2,i.lon+j/2,i.lat+m/2)}return k},getCenter:function(){var b=null;if(this.center){b=this.center.clone()}return b},getZoom:function(){return this.zoom},pan:function(l,m,k){k=OpenLayers.Util.applyDefaults(k,{animate:true,dragging:false});var j=this.getViewPortPxFromLonLat(this.getCenter());var g=j.add(l,m);if(!k.dragging||!g.equals(j)){var i=this.getLonLatFromViewPortPx(g);if(k.animate){this.panTo(i)}else{this.setCenter(i,null,k.dragging)}}},panTo:function(e){if(this.panMethod&&this.getExtent().scale(this.panRatio).containsLonLat(e)){if(!this.panTween){this.panTween=new OpenLayers.Tween(this.panMethod)}var f=this.getCenter();if(e.lon==f.lon&&e.lat==f.lat){return}var g={lon:f.lon,lat:f.lat};var i={lon:e.lon,lat:e.lat};this.panTween.start(g,i,this.panDuration,{callbacks:{start:OpenLayers.Function.bind(function(a){this.events.triggerEvent("movestart")},this),eachStep:OpenLayers.Function.bind(function(a){a=new OpenLayers.LonLat(a.lon,a.lat);this.moveTo(a,this.zoom,{dragging:true,noEvent:true})},this),done:OpenLayers.Function.bind(function(a){a=new OpenLayers.LonLat(a.lon,a.lat);this.moveTo(a,this.zoom,{noEvent:true});this.events.triggerEvent("moveend")},this)}})}else{this.setCenter(e)}},setCenter:function(i,f,e,g){this.moveTo(i,f,{dragging:e,forceZoomChange:g,caller:"setCenter"})},moveTo:function(D,v,K){if(!K){K={}}var w=K.dragging;var H=K.forceZoomChange;var C=K.noEvent;if(this.panTween&&K.caller=="setCenter"){this.panTween.stop()}if(!this.center&&!this.isValidLonLat(D)){D=this.maxExtent.getCenterLonLat()}if(this.restrictedExtent!=null){if(D==null){D=this.getCenter()}if(v==null){v=this.getZoom()}var G=this.getResolutionForZoom(v);var u=this.calculateBounds(D,G);if(!this.restrictedExtent.containsBounds(u)){var i=this.restrictedExtent.getCenterLonLat();if(u.getWidth()>this.restrictedExtent.getWidth()){D=new OpenLayers.LonLat(i.lon,D.lat)}else{if(u.left<this.restrictedExtent.left){D=D.add(this.restrictedExtent.left-u.left,0)}else{if(u.right>this.restrictedExtent.right){D=D.add(this.restrictedExtent.right-u.right,0)}}}if(u.getHeight()>this.restrictedExtent.getHeight()){D=new OpenLayers.LonLat(D.lon,i.lat)}else{if(u.bottom<this.restrictedExtent.bottom){D=D.add(0,this.restrictedExtent.bottom-u.bottom)}else{if(u.top>this.restrictedExtent.top){D=D.add(0,this.restrictedExtent.top-u.top)}}}}}var I=H||((this.isValidZoomLevel(v))&&(v!=this.getZoom()));var F=(this.isValidLonLat(D))&&(!D.equals(this.center));if(I||F||!w){if(!this.dragging&&!C){this.events.triggerEvent("movestart")}if(F){if((!I)&&(this.center)){this.centerLayerContainer(D)}this.center=D.clone()}if((I)||(this.layerContainerOrigin==null)){this.layerContainerOrigin=this.center.clone();this.layerContainerDiv.style.left="0px";this.layerContainerDiv.style.top="0px"}if(I){this.zoom=v;this.resolution=this.getResolutionForZoom(v);this.viewRequestID++}var J=this.getExtent();if(this.baseLayer.visibility){this.baseLayer.moveTo(J,I,w);if(w){this.baseLayer.events.triggerEvent("move")}else{this.baseLayer.events.triggerEvent("moveend",{zoomChanged:I})}}J=this.baseLayer.getExtent();for(var E=0,A=this.layers.length;E<A;E++){var B=this.layers[E];if(B!==this.baseLayer&&!B.isBaseLayer){var z=B.calculateInRange();if(B.inRange!=z){B.inRange=z;if(!z){B.display(false)}this.events.triggerEvent("changelayer",{layer:B,property:"visibility"})}if(z&&B.visibility){B.moveTo(J,I,w);if(w){B.events.triggerEvent("move")}else{B.events.triggerEvent("moveend",{zoomChanged:I})}}}}if(I){for(var E=0,A=this.popups.length;E<A;E++){this.popups[E].updatePosition()}}this.events.triggerEvent("move");if(I){this.events.triggerEvent("zoomend")}}if(!w&&!C){this.events.triggerEvent("moveend")}this.dragging=!!w},centerLayerContainer:function(d){var e=this.getViewPortPxFromLonLat(this.layerContainerOrigin);var f=this.getViewPortPxFromLonLat(d);if((e!=null)&&(f!=null)){this.layerContainerDiv.style.left=Math.round(e.x-f.x)+"px";this.layerContainerDiv.style.top=Math.round(e.y-f.y)+"px"}},isValidZoomLevel:function(b){return((b!=null)&&(b>=0)&&(b<this.getNumZoomLevels()))},isValidLonLat:function(f){var d=false;if(f!=null){var e=this.getMaxExtent();d=e.containsLonLat(f)}return d},getProjection:function(){var b=this.getProjectionObject();return b?b.getCode():null},getProjectionObject:function(){var b=null;if(this.baseLayer!=null){b=this.baseLayer.projection}return b},getMaxResolution:function(){var b=null;if(this.baseLayer!=null){b=this.baseLayer.maxResolution}return b},getMaxExtent:function(c){var d=null;if(c&&c.restricted&&this.restrictedExtent){d=this.restrictedExtent}else{if(this.baseLayer!=null){d=this.baseLayer.maxExtent}}return d},getNumZoomLevels:function(){var b=null;if(this.baseLayer!=null){b=this.baseLayer.numZoomLevels}return b},getExtent:function(){var b=null;if(this.baseLayer!=null){b=this.baseLayer.getExtent()}return b},getResolution:function(){var b=null;if(this.baseLayer!=null){b=this.baseLayer.getResolution()}return b},getUnits:function(){var b=null;if(this.baseLayer!=null){b=this.baseLayer.units}return b},getScale:function(){var f=null;if(this.baseLayer!=null){var d=this.getResolution();var e=this.baseLayer.units;f=OpenLayers.Util.getScaleFromResolution(d,e)}return f},getZoomForExtent:function(f,d){var e=null;if(this.baseLayer!=null){e=this.baseLayer.getZoomForExtent(f,d)}return e},getResolutionForZoom:function(c){var d=null;if(this.baseLayer){d=this.baseLayer.getResolutionForZoom(c)}return d},getZoomForResolution:function(e,f){var d=null;if(this.baseLayer!=null){d=this.baseLayer.getZoomForResolution(e,f)}return d},zoomTo:function(b){if(this.isValidZoomLevel(b)){this.setCenter(null,b)}},zoomIn:function(){this.zoomTo(this.getZoom()+1)},zoomOut:function(){this.zoomTo(this.getZoom()-1)},zoomToExtent:function(g,i){var e=g.getCenterLonLat();if(this.baseLayer.wrapDateLine){var f=this.getMaxExtent();g=g.clone();while(g.right<g.left){g.right+=f.getWidth()}e=g.getCenterLonLat().wrapDateLine(f)}this.setCenter(e,this.getZoomForExtent(g,i))},zoomToMaxExtent:function(f){var d=(f)?f.restricted:true;var e=this.getMaxExtent({restricted:d});this.zoomToExtent(e)},zoomToScale:function(l,m){var q=OpenLayers.Util.getResolutionFromScale(l,this.baseLayer.units);var r=this.getSize();var n=r.w*q;var j=r.h*q;var k=this.getCenter();var o=new OpenLayers.Bounds(k.lon-n/2,k.lat-j/2,k.lon+n/2,k.lat+j/2);this.zoomToExtent(o,m)},getLonLatFromViewPortPx:function(d){var c=null;if(this.baseLayer!=null){c=this.baseLayer.getLonLatFromViewPortPx(d)}return c},getViewPortPxFromLonLat:function(c){var d=null;if(this.baseLayer!=null){d=this.baseLayer.getViewPortPxFromLonLat(c)}return d},getLonLatFromPixel:function(b){return this.getLonLatFromViewPortPx(b)},getPixelFromLonLat:function(c){var d=this.getViewPortPxFromLonLat(c);d.x=Math.round(d.x);d.y=Math.round(d.y);return d},getViewPortPxFromLayerPx:function(g){var i=null;if(g!=null){var e=parseInt(this.layerContainerDiv.style.left);var f=parseInt(this.layerContainerDiv.style.top);i=g.add(e,f)}return i},getLayerPxFromViewPortPx:function(i){var g=null;if(i!=null){var e=-parseInt(this.layerContainerDiv.style.left);var f=-parseInt(this.layerContainerDiv.style.top);g=i.add(e,f);if(isNaN(g.x)||isNaN(g.y)){g=null}}return g},getLonLatFromLayerPx:function(b){b=this.getViewPortPxFromLayerPx(b);return this.getLonLatFromViewPortPx(b)},getLayerPxFromLonLat:function(c){var d=this.getPixelFromLonLat(c);return this.getLayerPxFromViewPortPx(d)},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(f,d){this.lonlat=f;var e=(d)?d:OpenLayers.Marker.defaultIcon();if(this.icon==null){this.icon=e}else{this.icon.url=e.url;this.icon.size=e.size;this.icon.offset=e.offset;this.icon.calculateOffset=e.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(b){return this.icon.draw(b)},erase:function(){if(this.icon!=null){this.icon.erase()}},moveTo:function(b){if((b!=null)&&(this.icon!=null)){this.icon.moveTo(b)}this.lonlat=this.map.getLonLatFromLayerPx(b)},isDrawn:function(){var b=(this.icon&&this.icon.isDrawn());return b},onScreen:function(){var c=false;if(this.map){var d=this.map.getExtent();c=d.containsLonLat(this.lonlat)}return c},inflate:function(c){if(this.icon){var d=new OpenLayers.Size(this.icon.size.w*c,this.icon.size.h*c);this.icon.setSize(d)}},setOpacity:function(b){this.icon.setOpacity(b)},setUrl:function(b){this.icon.setUrl(b)},display:function(b){this.icon.display(b)},CLASS_NAME:"OpenLayers.Marker"});OpenLayers.Marker.defaultIcon=function(){var e=OpenLayers.Util.getImagesLocation()+"marker.png";var d=new OpenLayers.Size(21,25);var f=function(a){return new OpenLayers.Pixel(-(a.w/2),-a.h)};return new OpenLayers.Icon(e,d,null,f)};OpenLayers.Popup.FramedCloud=OpenLayers.Class(OpenLayers.Popup.Framed,{contentDisplayClass:"olFramedCloudPopupContent",autoSize:true,panMapIfOutOfView:true,imageSize:new OpenLayers.Size(676,736),isAlphaImage:false,fixedRelativePosition:false,positionBlocks:{tl:{offset:new OpenLayers.Pixel(44,0),padding:new OpenLayers.Bounds(8,40,8,9),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,51,22,0),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,"auto"),anchor:new OpenLayers.Bounds(null,50,0,0),position:new OpenLayers.Pixel(-638,0)},{size:new OpenLayers.Size("auto",19),anchor:new OpenLayers.Bounds(0,32,22,null),position:new OpenLayers.Pixel(0,-631)},{size:new OpenLayers.Size(22,18),anchor:new OpenLayers.Bounds(null,32,0,null),position:new OpenLayers.Pixel(-638,-632)},{size:new OpenLayers.Size(81,35),anchor:new OpenLayers.Bounds(null,0,0,null),position:new OpenLayers.Pixel(0,-688)}]},tr:{offset:new OpenLayers.Pixel(-45,0),padding:new OpenLayers.Bounds(8,40,8,9),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,51,22,0),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,"auto"),anchor:new OpenLayers.Bounds(null,50,0,0),position:new OpenLayers.Pixel(-638,0)},{size:new OpenLayers.Size("auto",19),anchor:new OpenLayers.Bounds(0,32,22,null),position:new OpenLayers.Pixel(0,-631)},{size:new OpenLayers.Size(22,19),anchor:new OpenLayers.Bounds(null,32,0,null),position:new OpenLayers.Pixel(-638,-631)},{size:new OpenLayers.Size(81,35),anchor:new OpenLayers.Bounds(0,0,null,null),position:new OpenLayers.Pixel(-215,-687)}]},bl:{offset:new OpenLayers.Pixel(45,0),padding:new OpenLayers.Bounds(8,9,8,40),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,21,22,32),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,"auto"),anchor:new OpenLayers.Bounds(null,21,0,32),position:new OpenLayers.Pixel(-638,0)},{size:new OpenLayers.Size("auto",21),anchor:new OpenLayers.Bounds(0,0,22,null),position:new OpenLayers.Pixel(0,-629)},{size:new OpenLayers.Size(22,21),anchor:new OpenLayers.Bounds(null,0,0,null),position:new OpenLayers.Pixel(-638,-629)},{size:new OpenLayers.Size(81,33),anchor:new OpenLayers.Bounds(null,null,0,0),position:new OpenLayers.Pixel(-101,-674)}]},br:{offset:new OpenLayers.Pixel(-44,0),padding:new OpenLayers.Bounds(8,9,8,40),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,21,22,32),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,"auto"),anchor:new OpenLayers.Bounds(null,21,0,32),position:new OpenLayers.Pixel(-638,0)},{size:new OpenLayers.Size("auto",21),anchor:new OpenLayers.Bounds(0,0,22,null),position:new OpenLayers.Pixel(0,-629)},{size:new OpenLayers.Size(22,21),anchor:new OpenLayers.Bounds(null,0,0,null),position:new OpenLayers.Pixel(-638,-629)},{size:new OpenLayers.Size(81,33),anchor:new OpenLayers.Bounds(0,null,null,0),position:new OpenLayers.Pixel(-311,-674)}]}},minSize:new OpenLayers.Size(105,10),maxSize:new OpenLayers.Size(600,660),initialize:function(k,o,l,i,j,m,n){this.imageSrc=OpenLayers.Util.getImagesLocation()+"cloud-popup-relative.png";OpenLayers.Popup.Framed.prototype.initialize.apply(this,arguments);this.contentDiv.className=this.contentDisplayClass},destroy:function(){OpenLayers.Popup.Framed.prototype.destroy.apply(this,arguments)},CLASS_NAME:"OpenLayers.Popup.FramedCloud"});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(j,g,i,f,k){OpenLayers.Tile.prototype.initialize.apply(this,arguments);this.url=f;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){if(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;if((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(b){if(b==null){b=new OpenLayers.Tile.Image(this.layer,this.position,this.bounds,this.url,this.size)}b=OpenLayers.Tile.prototype.clone.apply(this,[b]);b.imgDiv=null;return b},draw:function(){if(this.layer!=this.layer.map.baseLayer&&this.layer.reproject){this.bounds=this.getBoundsFromBaseLayer(this.position)}var b=OpenLayers.Tile.prototype.draw.apply(this,arguments);if(OpenLayers.Util.indexOf(this.layer.SUPPORTED_TRANSITIONS,this.layer.transitionEffect)!=-1){if(b){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{if(this.backBufferTile){this.backBufferTile.clear()}}}else{if(b&&this.isFirstDraw){this.events.register("loadend",this,this.showTile);this.isFirstDraw=false}}if(!b){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 d=this.layer.maxExtent;var c=(d&&this.bounds.intersectsBounds(d,false));if(c){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(){if(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){return}OpenLayers.Util.modifyDOMElement(this.frame,null,this.position,this.size);var b=this.layer.getImageSize();if(this.layerAlphaHack){OpenLayers.Util.modifyAlphaImageDiv(this.imgDiv,null,null,b,this.url)}else{OpenLayers.Util.modifyDOMElement(this.imgDiv,null,null,b);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 g=this.layer.imageOffset;var e=this.layer.getImageSize();if(this.layerAlphaHack){this.imgDiv=OpenLayers.Util.createAlphaImageDiv(null,g,e,null,"relative",null,null,null,true)}else{this.imgDiv=OpenLayers.Util.createImage(null,g,e,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);if(this.layer.opacity!=null){OpenLayers.Util.modifyDOMElement(this.imgDiv,null,null,null,null,null,null,this.layer.opacity)}this.imgDiv.map=this.layer.map;var i=function(){if(this.isLoading){this.isLoading=false;this.events.triggerEvent("loadend")}};if(this.layerAlphaHack){OpenLayers.Event.observe(this.imgDiv.childNodes[0],"load",OpenLayers.Function.bind(i,this))}else{OpenLayers.Event.observe(this.imgDiv,"load",OpenLayers.Function.bind(i,this))}var f=function(){if(this.imgDiv._attempts>OpenLayers.IMAGE_RELOAD_ATTEMPTS){i.call(this)}};OpenLayers.Event.observe(this.imgDiv,"error",OpenLayers.Function.bind(f,this))},checkImgURL:function(){if(this.layer){var b=this.layerAlphaHack?this.imgDiv.firstChild.src:this.imgDiv.src;if(!OpenLayers.Util.isEquivalentUrl(b,this.url)){this.hide()}}},startTransition:function(){if(!this.backBufferTile||!this.backBufferTile.imgDiv){return}var l=1;if(this.backBufferTile.resolution){l=this.backBufferTile.resolution/this.layer.getResolution()}if(l!=this.lastRatio){if(this.layer.transitionEffect=="resize"){var m=new OpenLayers.LonLat(this.backBufferTile.bounds.left,this.backBufferTile.bounds.top);var g=new OpenLayers.Size(this.backBufferTile.size.w*l,this.backBufferTile.size.h*l);var i=this.layer.map.getLayerPxFromLonLat(m);OpenLayers.Util.modifyDOMElement(this.backBufferTile.frame,null,i,g);var k=this.backBufferTile.imageSize;k=new OpenLayers.Size(k.w*l,k.h*l);var j=this.backBufferTile.imageOffset;if(j){j=new OpenLayers.Pixel(j.x*l,j.y*l)}OpenLayers.Util.modifyDOMElement(this.backBufferTile.imgDiv,null,j,k);this.backBufferTile.show()}}else{if(this.layer.singleTile){this.backBufferTile.show()}else{this.backBufferTile.hide()}}this.lastRatio=l},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.Feature=OpenLayers.Class({layer:null,id:null,lonlat:null,data:null,marker:null,popupClass:OpenLayers.Popup.AnchoredBubble,popup:null,initialize:function(e,f,d){this.layer=e;this.lonlat=f;this.data=(d!=null)?d:{};this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")},destroy:function(){if((this.layer!=null)&&(this.layer.map!=null)){if(this.popup!=null){this.layer.map.removePopup(this.popup)}}this.layer=null;this.id=null;this.lonlat=null;this.data=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 c=false;if((this.layer!=null)&&(this.layer.map!=null)){var d=this.layer.map.getExtent();c=d.containsLonLat(this.lonlat)}return c},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(d){if(this.lonlat!=null){var f=this.id+"_popup";var e=(this.marker)?this.marker.icon:null;if(!this.popup){this.popup=new this.popupClass(f,this.lonlat,this.data.popupSize,this.data.popupContentHTML,e,d)}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.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(f,d,e){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(c){var d=true;if(this.checkModifiers(c)&&this.control.handleRightClicks&&OpenLayers.Event.isRightClick(c)){d=this.rightclick(c)}return d},rightclick:function(d){if(this.passesTolerance(d)){if(this.rightclickTimerId!=null){this.clearTimer();this.callback("dblrightclick",[d]);return !this.stopDouble}else{var e=this["double"]?OpenLayers.Util.extend({},d):this.callback("rightclick",[d]);var f=OpenLayers.Function.bind(this.delayedRightCall,this,e);this.rightclickTimerId=window.setTimeout(f,this.delay)}}return !this.stopSingle},delayedRightCall:function(b){this.rightclickTimerId=null;if(b){this.callback("rightclick",[b])}return !this.stopSingle},dblclick:function(b){if(this.passesTolerance(b)){if(this["double"]){this.callback("dblclick",[b])}this.clearTimer()}return !this.stopDouble},click:function(c){if(this.passesTolerance(c)){if(this.timerId!=null){this.clearTimer()}else{var d=this.single?OpenLayers.Util.extend({},c):null;this.timerId=window.setTimeout(OpenLayers.Function.bind(this.delayedCall,this,d),this.delay)}}return !this.stopSingle},passesTolerance:function(d){var f=true;if(this.pixelTolerance!=null&&this.down){var e=Math.sqrt(Math.pow(this.down.x-d.xy.x,2)+Math.pow(this.down.y-d.xy.y,2));if(e>this.pixelTolerance){f=false}}return f},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(b){this.timerId=null;if(b){this.callback("click",[b])}},deactivate:function(){var b=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.clearTimer();this.down=null;b=true}return b},CLASS_NAME:"OpenLayers.Handler.Click"});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(f,d,e){OpenLayers.Handler.prototype.initialize.apply(this,arguments)},down:function(b){},move:function(b){},up:function(b){},out:function(b){},mousedown:function(c){var d=true;this.dragging=false;if(this.checkModifiers(c)&&OpenLayers.Event.isLeftClick(c)){this.started=true;this.start=c.xy;this.last=c.xy;OpenLayers.Element.addClass(this.map.viewPortDiv,"olDragDown");this.down(c);this.callback("down",[c.xy]);OpenLayers.Event.stop(c);if(!this.oldOnselectstart){this.oldOnselectstart=(document.onselectstart)?document.onselectstart:function(){return true};document.onselectstart=function(){return false}}d=!this.stopDown}else{this.started=false;this.start=null;this.last=null}return d},mousemove:function(b){if(this.started&&!this.timeoutId&&(b.xy.x!=this.last.x||b.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(b);this.callback("move",[b.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(c){if(this.started){var d=(this.start!=this.last);this.started=false;this.dragging=false;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown");this.up(c);this.callback("up",[c.xy]);if(d){this.callback("done",[c.xy])}document.onselectstart=this.oldOnselectstart}return true},mouseout:function(c){if(this.started&&OpenLayers.Util.mouseLeft(c,this.map.div)){var d=(this.start!=this.last);this.started=false;this.dragging=false;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown");this.out(c);this.callback("out",[]);if(d){this.callback("done",[c.xy])}if(document.onselectstart){document.onselectstart=this.oldOnselectstart}}return true},click:function(b){return(this.start==this.last)},activate:function(){var b=false;if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.dragging=false;b=true}return b},deactivate:function(){var b=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.started=false;this.dragging=false;this.start=null;this.last=null;b=true;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown")}return b},CLASS_NAME:"OpenLayers.Handler.Drag"});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(g,e,i,f){OpenLayers.Handler.prototype.initialize.apply(this,[g,i,f]);this.layer=e},mousedown:function(b){this.down=b.xy;return this.handle(b)?!this.stopDown:true},mouseup:function(b){this.up=b.xy;return this.handle(b)?!this.stopUp:true},click:function(b){return this.handle(b)?!this.stopClick:true},mousemove:function(b){if(!this.callbacks.over&&!this.callbacks.out){return true}this.handle(b);return true},dblclick:function(b){return !this.handle(b)},geometryTypeMatches:function(b){return this.geometryTypes==null||OpenLayers.Util.indexOf(this.geometryTypes,b.geometry.CLASS_NAME)>-1},handle:function(i){if(this.feature&&!this.feature.layer){this.feature=null}var m=i.type;var j=false;var k=!!(this.feature);var l=(m=="click"||m=="dblclick");this.feature=this.layer.getFeatureFromEvent(i);if(this.feature&&!this.feature.layer){this.feature=null}if(this.lastFeature&&!this.lastFeature.layer){this.lastFeature=null}if(this.feature){var g=(this.feature!=this.lastFeature);if(this.geometryTypeMatches(this.feature)){if(k&&g){if(this.lastFeature){this.triggerCallback(m,"out",[this.lastFeature])}this.triggerCallback(m,"in",[this.feature])}else{if(!k||l){this.triggerCallback(m,"in",[this.feature])}}this.lastFeature=this.feature;j=true}else{if(this.lastFeature&&(k&&g||l)){this.triggerCallback(m,"out",[this.lastFeature])}this.feature=null}}else{if(this.lastFeature&&(k||l)){this.triggerCallback(m,"out",[this.lastFeature])}}return j},triggerCallback:function(j,i,f){var k=this.EVENTMAP[j][i];if(k){if(j=="click"&&this.up&&this.down){var g=Math.sqrt(Math.pow(this.up.x-this.down.x,2)+Math.pow(this.up.y-this.down.y,2));if(g<=this.clickTolerance){this.callback(k,f)}}else{this.callback(k,f)}}},activate:function(){var b=false;if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.moveLayerToTop();this.map.events.on({removelayer:this.handleMapEvents,changelayer:this.handleMapEvents,scope:this});b=true}return b},deactivate:function(){var b=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.moveLayerBack();this.feature=null;this.lastFeature=null;this.down=null;this.up=null;this.map.events.un({removelayer:this.handleMapEvents,changelayer:this.handleMapEvents,scope:this});b=true}return b},handleMapEvents:function(b){if(!b.property||b.property=="order"){this.moveLayerToTop()}},moveLayerToTop:function(){var b=Math.max(this.map.Z_INDEX_BASE.Feature-1,this.layer.getZIndex())+1;this.layer.setZIndex(b)},moveLayerBack:function(){var b=this.layer.getZIndex()-1;if(b>=this.map.Z_INDEX_BASE.Feature){this.layer.setZIndex(b)}else{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(f,d,e){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 c=0,d=this.KEY_EVENTS.length;c<d;c++){OpenLayers.Event.observe(document,this.KEY_EVENTS[c],this.eventListener)}return true}else{return false}},deactivate:function(){var f=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){for(var d=0,e=this.KEY_EVENTS.length;d<e;d++){OpenLayers.Event.stopObserving(document,this.KEY_EVENTS[d],this.eventListener)}f=true}return f},handleKeyEvent:function(b){if(this.checkModifiers(b)){this.callback(b.type,[b])}},CLASS_NAME:"OpenLayers.Handler.Keyboard"});OpenLayers.Handler.MouseWheel=OpenLayers.Class(OpenLayers.Handler,{wheelListener:null,mousePosition:null,initialize:function(f,d,e){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(i){if(!this.map||!this.checkModifiers(i)){return}var q=false;var e=false;var r=false;var v=OpenLayers.Event.element(i);while((v!=null)&&!r&&!q){if(!q){try{if(v.currentStyle){u=v.currentStyle.overflow}else{var w=document.defaultView.getComputedStyle(v,null);var u=w.getPropertyValue("overflow")}q=(u&&(u=="auto")||(u=="scroll"))}catch(s){}}if(!e){for(var o=0,n=this.map.layers.length;o<n;o++){if(v==this.map.layers[o].div||v==this.map.layers[o].pane){e=true;break}}}r=(v==this.map.div);v=v.parentNode}if(!q&&r){if(e){this.wheelZoom(i)}OpenLayers.Event.stop(i)}},wheelZoom:function(d){var c=0;if(!d){d=window.event}if(d.wheelDelta){c=d.wheelDelta/120;if(window.opera&&window.opera.version()<9.2){c=-c}}else{if(d.detail){c=-d.detail/3}}if(c){if(this.mousePosition){d.xy=this.mousePosition}if(!d.xy){d.xy=this.map.getPixelFromLonLat(this.map.getCenter())}if(c<0){this.callback("down",[d,c])}else{this.callback("up",[d,c])}}},mousemove:function(b){this.mousePosition=b.xy},activate:function(d){if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){var c=this.wheelListener;OpenLayers.Event.observe(window,"DOMMouseScroll",c);OpenLayers.Event.observe(window,"mousewheel",c);OpenLayers.Event.observe(document,"mousewheel",c);return true}else{return false}},deactivate:function(d){if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){var c=this.wheelListener;OpenLayers.Event.stopObserving(window,"DOMMouseScroll",c);OpenLayers.Event.stopObserving(window,"mousewheel",c);OpenLayers.Event.stopObserving(document,"mousewheel",c);return true}else{return false}},CLASS_NAME:"OpenLayers.Handler.MouseWheel"});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(c,d){this.addOptions(d);this.name=c;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);if(this.eventListeners instanceof Object){this.events.on(this.eventListeners)}}if(this.wrapDateLine){this.displayOutsideMaxExtent=true}},destroy:function(b){if(b==null){b=true}if(this.map!=null){this.map.removeLayer(this,b)}this.projection=null;this.map=null;this.name=null;this.div=null;this.options=null;if(this.events){if(this.eventListeners){this.events.un(this.eventListeners)}this.events.destroy()}this.eventListeners=null;this.events=null},clone:function(b){if(b==null){b=new OpenLayers.Layer(this.name,this.options)}OpenLayers.Util.applyDefaults(b,this);b.map=null;return b},setName:function(b){if(b!=this.name){this.name=b;if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"name"})}}},addOptions:function(b){if(this.options==null){this.options={}}OpenLayers.Util.extend(this.options,b);OpenLayers.Util.extend(this,b)},onMapResize:function(){},redraw:function(){var d=false;if(this.map){this.inRange=this.calculateInRange();var f=this.getExtent();if(f&&this.inRange&&this.visibility){var e=true;this.moveTo(f,e,false);this.events.triggerEvent("moveend",{zoomChanged:e});d=true}}return d},moveTo:function(e,f,i){var g=this.visibility;if(!this.isBaseLayer){g=g&&this.inRange}this.display(g)},setMap:function(c){if(this.map==null){this.map=c;this.maxExtent=this.maxExtent||this.map.maxExtent;this.projection=this.projection||this.map.projection;if(this.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 d=((this.visibility)&&(this.inRange));this.div.style.display=d?"":"none"}this.setTileSize()}},afterAdd:function(){},removeMap:function(b){},getImageSize:function(){return(this.imageSize||this.tileSize)},setTileSize:function(d){var c=(d)?d:((this.tileSize)?this.tileSize:this.map.getTileSize());this.tileSize=c;if(this.gutter){this.imageOffset=new OpenLayers.Pixel(-this.gutter,-this.gutter);this.imageSize=new OpenLayers.Size(c.w+(2*this.gutter),c.h+(2*this.gutter))}},getVisibility:function(){return this.visibility},setVisibility:function(b){if(b!=this.visibility){this.visibility=b;this.display(b);this.redraw();if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"visibility"})}this.events.triggerEvent("visibilitychanged")}},display:function(d){var c=this.calculateInRange();if(d!=(this.div.style.display!="none")){this.div.style.display=(d&&c)?"block":"none"}},calculateInRange:function(){var c=false;if(this.alwaysInRange){c=true}else{if(this.map){var d=this.map.getResolution();c=((d>=this.minResolution)&&(d<=this.maxResolution))}}return c},setIsBaseLayer:function(b){if(b!=this.isBaseLayer){this.isBaseLayer=b;if(this.map!=null){this.map.events.triggerEvent("changebaselayer",{layer:this})}}},initResolutions:function(){var u=new Array("projection","units","scales","resolutions","maxScale","minScale","maxResolution","minResolution","minExtent","maxExtent","numZoomLevels","maxZoomLevel");var H=["projection","units"];var E=false;var F={};for(var D=0,A=u.length;D<A;D++){var i=u[D];if(this.options[i]&&OpenLayers.Util.indexOf(H,i)==-1){E=true}F[i]=this.options[i]||this.map[i]}if(this.alwaysInRange==null){this.alwaysInRange=!E}if((this.options.minScale!=null||this.options.maxScale!=null)&&this.options.scales==null){F.scales=null}if((this.options.minResolution!=null||this.options.maxResolution!=null)&&this.options.resolutions==null){F.resolutions=null}if((!F.numZoomLevels)&&(F.maxZoomLevel)){F.numZoomLevels=F.maxZoomLevel+1}if((F.scales!=null)||(F.resolutions!=null)){if(F.scales!=null){F.resolutions=[];for(var D=0,A=F.scales.length;D<A;D++){var G=F.scales[D];F.resolutions[D]=OpenLayers.Util.getResolutionFromScale(G,F.units)}}F.numZoomLevels=F.resolutions.length}else{if(F.minScale){F.maxResolution=OpenLayers.Util.getResolutionFromScale(F.minScale,F.units)}else{if(F.maxResolution=="auto"){var s=this.map.getSize();var v=F.maxExtent.getWidth()/s.w;var B=F.maxExtent.getHeight()/s.h;F.maxResolution=Math.max(v,B)}}if(F.maxScale!=null){F.minResolution=OpenLayers.Util.getResolutionFromScale(F.maxScale,F.units)}else{if((F.minResolution=="auto")&&(F.minExtent!=null)){var s=this.map.getSize();var v=F.minExtent.getWidth()/s.w;var B=F.minExtent.getHeight()/s.h;F.minResolution=Math.max(v,B)}}if(F.minResolution!=null&&this.options.numZoomLevels==undefined){var w=F.maxResolution/F.minResolution;F.numZoomLevels=Math.floor(Math.log(w)/Math.log(2))+1}F.resolutions=new Array(F.numZoomLevels);var I=2;if(typeof F.minResolution=="number"&&F.numZoomLevels>1){I=Math.pow((F.maxResolution/F.minResolution),(1/(F.numZoomLevels-1)))}for(var D=0;D<F.numZoomLevels;D++){var z=F.maxResolution/Math.pow(I,D);F.resolutions[D]=z}}F.resolutions.sort(function(b,a){return(a-b)});this.resolutions=F.resolutions;this.maxResolution=F.resolutions[0];var C=F.resolutions.length-1;this.minResolution=F.resolutions[C];this.scales=[];for(var D=0,A=F.resolutions.length;D<A;D++){this.scales[D]=OpenLayers.Util.getScaleFromResolution(F.resolutions[D],F.units)}this.minScale=this.scales[0];this.maxScale=this.scales[this.scales.length-1];this.numZoomLevels=F.numZoomLevels},getResolution:function(){var b=this.map.getZoom();return this.getResolutionForZoom(b)},getExtent:function(){return this.map.calculateBounds()},getZoomForExtent:function(e,i){var g=this.map.getSize();var f=Math.max(e.getWidth()/g.w,e.getHeight()/g.h);return this.getZoomForResolution(f,i)},getDataExtent:function(){},getResolutionForZoom:function(i){i=Math.max(0,Math.min(i,this.resolutions.length-1));var e;if(this.map.fractionalZoom){var f=Math.floor(i);var g=Math.ceil(i);e=this.resolutions[f]-((i-f)*(this.resolutions[f]-this.resolutions[g]))}else{e=this.resolutions[Math.round(i)]}return e},getZoomForResolution:function(A,E){var i;if(this.map.fractionalZoom){var s=0;var C=this.resolutions.length-1;var B=this.resolutions[s];var D=this.resolutions[C];var u;for(var z=0,w=this.resolutions.length;z<w;++z){u=this.resolutions[z];if(u>=A){B=u;s=z}if(u<=A){D=u;C=z;break}}var v=B-D;if(v>0){i=s+((B-A)/v)}else{i=s}}else{var r;var q=Number.POSITIVE_INFINITY;for(var z=0,w=this.resolutions.length;z<w;z++){if(E){r=Math.abs(this.resolutions[z]-A);if(r>q){break}q=r}else{if(this.resolutions[z]<A){break}}}i=Math.max(0,z-1)}return i},getLonLatFromViewPortPx:function(i){var m=null;if(i!=null){var n=this.map.getSize();var j=this.map.getCenter();if(j){var o=this.map.getResolution();var k=i.x-(n.w/2);var l=i.y-(n.h/2);m=new OpenLayers.LonLat(j.lon+k*o,j.lat-l*o);if(this.wrapDateLine){m=m.wrapDateLine(this.maxExtent)}}}return m},getViewPortPxFromLonLat:function(g){var e=null;if(g!=null){var f=this.map.getResolution();var i=this.map.getExtent();e=new OpenLayers.Pixel((1/f*(g.lon-i.left)),(1/f*(i.top-g.lat)))}return e},setOpacity:function(e){if(e!=this.opacity){this.opacity=e;for(var g=0,f=this.div.childNodes.length;g<f;++g){var i=this.div.childNodes[g].firstChild;OpenLayers.Util.modifyDOMElement(i,null,null,null,null,null,null,e)}}},getZIndex:function(){return this.div.style.zIndex},setZIndex:function(b){this.div.style.zIndex=b},adjustBounds:function(d){if(this.gutter){var e=this.gutter*this.map.getResolution();d=new OpenLayers.Bounds(d.left-e,d.bottom-e,d.right+e,d.top+e)}if(this.wrapDateLine){var f={rightTolerance:this.getResolution()};d=d.wrapDateLine(this.maxExtent,f)}return d},CLASS_NAME:"OpenLayers.Layer"});OpenLayers.Control.DragFeature=OpenLayers.Class(OpenLayers.Control,{geometryTypes:null,onStart:function(c,d){},onDrag:function(c,d){},onComplete:function(c,d){},layer:null,feature:null,dragCallbacks:{},featureCallbacks:{},lastPixel:null,initialize:function(c,d){OpenLayers.Control.prototype.initialize.apply(this,[d]);this.layer=c;this.handlers={drag:new OpenLayers.Handler.Drag(this,OpenLayers.Util.extend({down:this.downFeature,move:this.moveFeature,up:this.upFeature,out:this.cancel,done:this.doneDragging},this.dragCallbacks)),feature:new OpenLayers.Handler.Feature(this,this.layer,OpenLayers.Util.extend({over:this.overFeature,out:this.outFeature},this.featureCallbacks),{geometryTypes:this.geometryTypes})}},destroy:function(){this.layer=null;OpenLayers.Control.prototype.destroy.apply(this,[])},activate:function(){return(this.handlers.feature.activate()&&OpenLayers.Control.prototype.activate.apply(this,arguments))},deactivate:function(){this.handlers.drag.deactivate();this.handlers.feature.deactivate();this.feature=null;this.dragging=false;this.lastPixel=null;OpenLayers.Element.removeClass(this.map.viewPortDiv,this.displayClass+"Over");return OpenLayers.Control.prototype.deactivate.apply(this,arguments)},overFeature:function(b){if(!this.handlers.drag.dragging){this.feature=b;this.handlers.drag.activate();this.over=true;OpenLayers.Element.addClass(this.map.viewPortDiv,this.displayClass+"Over")}else{if(this.feature.id==b.id){this.over=true}else{this.over=false}}},downFeature:function(b){this.lastPixel=b;this.onStart(this.feature,b)},moveFeature:function(d){var c=this.map.getResolution();this.feature.geometry.move(c*(d.x-this.lastPixel.x),c*(this.lastPixel.y-d.y));this.layer.drawFeature(this.feature);this.lastPixel=d;this.onDrag(this.feature,d)},upFeature:function(b){if(!this.over){this.handlers.drag.deactivate()}},doneDragging:function(b){this.onComplete(this.feature,b)},outFeature:function(b){if(!this.handlers.drag.dragging){this.over=false;this.handlers.drag.deactivate();OpenLayers.Element.removeClass(this.map.viewPortDiv,this.displayClass+"Over");this.feature=null}else{if(this.feature.id==b.id){this.over=false}}},cancel:function(){this.handlers.drag.deactivate();this.over=false},setMap:function(b){this.handlers.drag.setMap(b);this.handlers.feature.setMap(b);OpenLayers.Control.prototype.setMap.apply(this,arguments)},CLASS_NAME:"OpenLayers.Control.DragFeature"});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(b){this.panned=true;this.map.pan(this.handler.last.x-b.x,this.handler.last.y-b.y,{dragging:this.handler.dragging,animate:false})},panMapDone:function(b){if(this.panned){this.panMap(b);this.panned=false}},CLASS_NAME:"OpenLayers.Control.DragPan"});OpenLayers.Control.KeyboardDefaults=OpenLayers.Class(OpenLayers.Control,{slideFactor:75,initialize:function(){OpenLayers.Control.prototype.initialize.apply(this,arguments)},destroy:function(){if(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(d){switch(d.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 c=this.map.getSize();this.map.pan(0,-0.75*c.h);break;case 34:var c=this.map.getSize();this.map.pan(0,0.75*c.h);break;case 35:var c=this.map.getSize();this.map.pan(0.75*c.w,0);break;case 36:var c=this.map.getSize();this.map.pan(-0.75*c.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.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(f,e,d){OpenLayers.Feature.prototype.initialize.apply(this,[null,null,e]);this.lonlat=null;this.geometry=f?f:null;this.state=null;this.attributes={};if(e){this.attributes=OpenLayers.Util.extend(this.attributes,e)}this.style=d?d: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(j){var k=false;if(this.layer&&this.layer.map){var g=this.layer.map.getExtent();if(j){var f=this.geometry.getBounds();k=g.intersectsBounds(f)}else{var i=g.toGeometry();k=i.intersects(this.geometry)}}return k},createMarker:function(){return null},destroyMarker:function(){},createPopup:function(){return null},atPoint:function(e,g,i){var f=false;if(this.geometry){f=this.geometry.atPoint(e,g,i)}return f},destroyPopup:function(){},move:function(f){if(!this.layer||!this.geometry.move){return}var e;if(f.CLASS_NAME=="OpenLayers.LonLat"){e=this.layer.getViewPortPxFromLonLat(f)}else{e=f}var g=this.layer.getViewPortPxFromLonLat(this.geometry.getBounds().getCenterLonLat());var i=this.layer.map.getResolution();this.geometry.move(i*(e.x-g.x),i*(g.y-e.y));this.layer.drawFeature(this);return g},toState:function(b){if(b==OpenLayers.State.UPDATE){switch(this.state){case OpenLayers.State.UNKNOWN:case OpenLayers.State.DELETE:this.state=b;break;case OpenLayers.State.UPDATE:case OpenLayers.State.INSERT:break}}else{if(b==OpenLayers.State.INSERT){switch(this.state){case OpenLayers.State.UNKNOWN:break;default:this.state=b;break}}else{if(b==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=b;break}}else{if(b==OpenLayers.State.UNKNOWN){this.state=b}}}}},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.Handler.Box=OpenLayers.Class(OpenLayers.Handler,{dragHandler:null,boxDivClassName:"olHandlerBoxZoomBox",boxCharacteristics:null,initialize:function(f,d,e){OpenLayers.Handler.prototype.initialize.apply(this,arguments);var d={down:this.startBox,move:this.moveBox,out:this.removeBox,up:this.endBox};this.dragHandler=new OpenLayers.Handler.Drag(this,d,{keyMask:this.keyMask})},setMap:function(b){OpenLayers.Handler.prototype.setMap.apply(this,arguments);if(this.dragHandler){this.dragHandler.setMap(b)}},startBox:function(b){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(j){var l=this.dragHandler.start.x;var g=this.dragHandler.start.y;var m=Math.abs(l-j.x);var i=Math.abs(g-j.y);this.zoomBox.style.width=Math.max(1,m)+"px";this.zoomBox.style.height=Math.max(1,i)+"px";this.zoomBox.style.left=j.x<l?j.x+"px":l+"px";this.zoomBox.style.top=j.y<g?j.y+"px":g+"px";var k=this.getBoxCharacteristics();if(k.newBoxModel){if(j.x>l){this.zoomBox.style.width=Math.max(1,m-k.xOffset)+"px"}if(j.y>g){this.zoomBox.style.height=Math.max(1,i-k.yOffset)+"px"}}},endBox:function(i){var j;if(Math.abs(this.dragHandler.start.x-i.x)>5||Math.abs(this.dragHandler.start.y-i.y)>5){var k=this.dragHandler.start;var l=Math.min(k.y,i.y);var o=Math.max(k.y,i.y);var m=Math.min(k.x,i.x);var n=Math.max(k.x,i.x);j=new OpenLayers.Bounds(m,o,n,l)}else{j=this.dragHandler.start.clone()}this.removeBox();this.callback("done",[j])},removeBox:function(){this.map.viewPortDiv.removeChild(this.zoomBox);this.zoomBox=null;this.boxCharacteristics=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 e=parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-left-width"))+parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-right-width"))+1;var f=parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-top-width"))+parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-bottom-width"))+1;var d=OpenLayers.Util.getBrowserName()=="msie"?document.compatMode!="BackCompat":true;this.boxCharacteristics={xOffset:e,yOffset:f,newBoxModel:d}}return this.boxCharacteristics},CLASS_NAME:"OpenLayers.Handler.Box"});OpenLayers.Layer.HTTPRequest=OpenLayers.Class(OpenLayers.Layer,{URL_HASH_FACTOR:(Math.sqrt(5)-1)/2,url:null,params:null,reproject:false,initialize:function(j,k,i,f){var g=arguments;g=[j,f];OpenLayers.Layer.prototype.initialize.apply(this,g);this.url=k;this.params=OpenLayers.Util.extend({},i)},destroy:function(){this.url=null;this.params=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments)},clone:function(b){if(b==null){b=new OpenLayers.Layer.HTTPRequest(this.name,this.url,this.params,this.options)}b=OpenLayers.Layer.prototype.clone.apply(this,[b]);return b},setUrl:function(b){this.url=b},mergeNewParams:function(b){this.params=OpenLayers.Util.extend(this.params,b);return this.redraw()},redraw:function(b){if(b){return this.mergeNewParams({_olSalt:Math.random()})}else{return OpenLayers.Layer.prototype.redraw.apply(this,[])}},selectUrl:function(i,j){var k=1;for(var f=0,g=i.length;f<g;f++){k*=i.charCodeAt(f)*this.URL_HASH_FACTOR;k-=Math.floor(k)}return j[Math.floor(k*j.length)]},getFullRequestString:function(n,o){var s=o||this.url;var m=OpenLayers.Util.extend({},this.params);m=OpenLayers.Util.extend(m,n);var u=OpenLayers.Util.getParameterString(m);if(s instanceof Array){s=this.selectUrl(u,s)}var q=OpenLayers.Util.upperCaseObject(OpenLayers.Util.getParameters(s));for(var l in m){if(l.toUpperCase() in q){delete m[l]}}u=OpenLayers.Util.getParameterString(m);var k=s;if(u!=""){var r=s.charAt(s.length-1);if((r=="&")||(r=="?")){k+=u}else{if(s.indexOf("?")==-1){k+="?"+u}else{k+="&"+u}}}return k},CLASS_NAME:"OpenLayers.Layer.HTTPRequest"});OpenLayers.Layer.Image=OpenLayers.Class(OpenLayers.Layer,{isBaseLayer:true,url:null,extent:null,size:null,tile:null,aspectRatio:null,initialize:function(k,f,i,j,g){this.url=f;this.extent=i;this.maxExtent=i;this.size=j;OpenLayers.Layer.prototype.initialize.apply(this,[k,g]);this.aspectRatio=(this.extent.getHeight()/this.size.h)/(this.extent.getWidth()/this.size.w)},destroy:function(){if(this.tile){this.removeTileMonitoringHooks(this.tile);this.tile.destroy();this.tile=null}OpenLayers.Layer.prototype.destroy.apply(this,arguments)},clone:function(b){if(b==null){b=new OpenLayers.Layer.Image(this.name,this.url,this.extent,this.size,this.options)}b=OpenLayers.Layer.prototype.clone.apply(this,[b]);return b},setMap:function(b){if(this.options.maxResolution==null){this.options.maxResolution=this.aspectRatio*this.extent.getWidth()/this.size.w}OpenLayers.Layer.prototype.setMap.apply(this,arguments)},moveTo:function(k,i,j){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);var g=(this.tile==null);if(i||g){this.setTileSize();var l=new OpenLayers.LonLat(this.extent.left,this.extent.top);var m=this.map.getLayerPxFromLonLat(l);if(g){this.tile=new OpenLayers.Tile.Image(this,m,this.extent,null,this.tileSize);this.addTileMonitoringHooks(this.tile)}else{this.tile.size=this.tileSize.clone();this.tile.position=m.clone()}this.tile.draw()}},setTileSize:function(){var c=this.extent.getWidth()/this.map.getResolution();var d=this.extent.getHeight()/this.map.getResolution();this.tileSize=new OpenLayers.Size(c,d)},addTileMonitoringHooks:function(b){b.onLoadStart=function(){this.events.triggerEvent("loadstart")};b.events.register("loadstart",this,b.onLoadStart);b.onLoadEnd=function(){this.events.triggerEvent("loadend")};b.events.register("loadend",this,b.onLoadEnd);b.events.register("unload",this,b.onLoadEnd)},removeTileMonitoringHooks:function(b){b.unload();b.events.un({loadstart:b.onLoadStart,loadend:b.onLoadEnd,unload:b.onLoadEnd,scope:this})},setUrl:function(b){this.url=b;this.tile.draw()},getURL:function(b){return this.url},CLASS_NAME:"OpenLayers.Layer.Image"});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(z){if(z instanceof OpenLayers.Bounds){if(!this.out){var w=this.map.getLonLatFromPixel(new OpenLayers.Pixel(z.left,z.bottom));var r=this.map.getLonLatFromPixel(new OpenLayers.Pixel(z.right,z.top));var F=new OpenLayers.Bounds(w.lon,w.lat,r.lon,r.lat)}else{var A=Math.abs(z.right-z.left);var v=Math.abs(z.top-z.bottom);var C=Math.min((this.map.size.h/v),(this.map.size.w/A));var q=this.map.getExtent();var G=this.map.getLonLatFromPixel(z.getCenterPixel());var E=G.lon-(q.getWidth()/2)*C;var B=G.lon+(q.getWidth()/2)*C;var s=G.lat-(q.getHeight()/2)*C;var D=G.lat+(q.getHeight()/2)*C;var F=new OpenLayers.Bounds(E,s,B,D)}var u=this.map.getZoom();this.map.zoomToExtent(F);if(u==this.map.getZoom()&&this.alwaysZoom==true){this.map.zoomTo(u+(this.out?-1:1))}}else{if(!this.out){this.map.setCenter(this.map.getLonLatFromPixel(z),this.map.getZoom()+1)}else{this.map.setCenter(this.map.getLonLatFromPixel(z),this.map.getZoom()-1)}}},CLASS_NAME:"OpenLayers.Control.ZoomBox"});OpenLayers.Format.WKT=OpenLayers.Class(OpenLayers.Format,{initialize:function(b){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,[b])},read:function(n){var o,q,l;var m=this.regExes.typeStr.exec(n);if(m){q=m[1].toLowerCase();l=m[2];if(this.parse[q]){o=this.parse[q].apply(this,[l])}if(this.internalProjection&&this.externalProjection){if(o&&o.CLASS_NAME=="OpenLayers.Feature.Vector"){o.geometry.transform(this.externalProjection,this.internalProjection)}else{if(o&&q!="geometrycollection"&&typeof o=="object"){for(var r=0,k=o.length;r<k;r++){var i=o[r];i.geometry.transform(this.externalProjection,this.internalProjection)}}}}}return o},write:function(u){var n,i,l,q,s;if(u.constructor==Array){n=u;s=true}else{n=[u];s=false}var r=[];if(s){r.push("GEOMETRYCOLLECTION(")}for(var o=0,m=n.length;o<m;++o){if(s&&o>0){r.push(",")}i=n[o].geometry;l=i.CLASS_NAME.split(".")[2].toLowerCase();if(!this.extract[l]){return null}if(this.internalProjection&&this.externalProjection){i=i.clone();i.transform(this.internalProjection,this.externalProjection)}q=this.extract[l].apply(this,[i]);r.push(l.toUpperCase()+"("+q+")")}if(s){r.push(")")}return r.join("")},extract:{point:function(b){return b.x+" "+b.y},multipoint:function(i){var g=[];for(var e=0,f=i.components.length;e<f;++e){g.push(this.extract.point.apply(this,[i.components[e]]))}return g.join(",")},linestring:function(e){var g=[];for(var i=0,f=e.components.length;i<f;++i){g.push(this.extract.point.apply(this,[e.components[i]]))}return g.join(",")},multilinestring:function(i){var g=[];for(var e=0,f=i.components.length;e<f;++e){g.push("("+this.extract.linestring.apply(this,[i.components[e]])+")")}return g.join(",")},polygon:function(i){var g=[];for(var e=0,f=i.components.length;e<f;++e){g.push("("+this.extract.linestring.apply(this,[i.components[e]])+")")}return g.join(",")},multipolygon:function(g){var i=[];for(var e=0,f=g.components.length;e<f;++e){i.push("("+this.extract.polygon.apply(this,[g.components[e]])+")")}return i.join(",")}},parse:{point:function(c){var d=OpenLayers.String.trim(c).split(this.regExes.spaces);return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(d[0],d[1]))},multipoint:function(i){var k=OpenLayers.String.trim(i).split(",");var j=[];for(var f=0,g=k.length;f<g;++f){j.push(this.parse.point.apply(this,[k[f]]).geometry)}return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiPoint(j))},linestring:function(i){var k=OpenLayers.String.trim(i).split(",");var j=[];for(var f=0,g=k.length;f<g;++f){j.push(this.parse.point.apply(this,[k[f]]).geometry)}return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString(j))},multilinestring:function(j){var m;var g=OpenLayers.String.trim(j).split(this.regExes.parenComma);var k=[];for(var l=0,i=g.length;l<i;++l){m=g[l].replace(this.regExes.trimParens,"$1");k.push(this.parse.linestring.apply(this,[m]).geometry)}return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiLineString(k))},polygon:function(l){var r,i,n;var m=OpenLayers.String.trim(l).split(this.regExes.parenComma);var o=[];for(var q=0,k=m.length;q<k;++q){r=m[q].replace(this.regExes.trimParens,"$1");i=this.parse.linestring.apply(this,[r]).geometry;n=new OpenLayers.Geometry.LinearRing(i.components);o.push(n)}return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon(o))},multipolygon:function(j){var l;var g=OpenLayers.String.trim(j).split(this.regExes.doubleParenComma);var k=[];for(var m=0,i=g.length;m<i;++m){l=g[m].replace(this.regExes.trimParens,"$1");k.push(this.parse.polygon.apply(this,[l]).geometry)}return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiPolygon(k))},geometrycollection:function(i){i=i.replace(/,\s*([A-Za-z])/g,"|$1");var j=OpenLayers.String.trim(i).split("|");var k=[];for(var f=0,g=j.length;f<g;++f){k.push(OpenLayers.Format.WKT.prototype.read.apply(this,[j[f]]))}return k}},CLASS_NAME:"OpenLayers.Format.WKT"});OpenLayers.Layer.Grid=OpenLayers.Class(OpenLayers.Layer.HTTPRequest,{tileSize:null,grid:null,singleTile:false,ratio:1.5,buffer:2,numLoadingTiles:0,initialize:function(i,e,g,f){OpenLayers.Layer.HTTPRequest.prototype.initialize.apply(this,arguments);this.events.addEventType("tileloaded");this.grid=[]},destroy:function(){this.clearGrid();this.grid=null;this.tileSize=null;OpenLayers.Layer.HTTPRequest.prototype.destroy.apply(this,arguments)},clearGrid:function(){if(this.grid){for(var j=0,g=this.grid.length;j<g;j++){var k=this.grid[j];for(var m=0,i=k.length;m<i;m++){var l=k[m];this.removeTileMonitoringHooks(l);l.destroy()}}this.grid=[]}},clone:function(b){if(b==null){b=new OpenLayers.Layer.Grid(this.name,this.url,this.params,this.options)}b=OpenLayers.Layer.HTTPRequest.prototype.clone.apply(this,[b]);if(this.tileSize!=null){b.tileSize=this.tileSize.clone()}b.grid=[];return b},moveTo:function(j,g,i){OpenLayers.Layer.HTTPRequest.prototype.moveTo.apply(this,arguments);j=j||this.map.getExtent();if(j!=null){var k=!this.grid.length||g;var f=this.getTilesBounds();if(this.singleTile){if(k||(!i&&!f.containsBounds(j))){this.initSingleTile(j)}}else{if(k||!f.containsBounds(j,true)){this.initGriddedTiles(j)}else{this.moveGriddedTiles(j)}}}},setTileSize:function(b){if(this.singleTile){b=this.map.getSize().clone();b.h=parseInt(b.h*this.ratio);b.w=parseInt(b.w*this.ratio)}OpenLayers.Layer.HTTPRequest.prototype.setTileSize.apply(this,[b])},getGridBounds:function(){var b="The getGridBounds() function is deprecated. It will be removed in 3.0. Please use getTilesBounds() instead.";OpenLayers.Console.warn(b);return this.getTilesBounds()},getTilesBounds:function(){var i=null;if(this.grid.length){var g=this.grid.length-1;var j=this.grid[g][0];var f=this.grid[0].length-1;var k=this.grid[0][f];i=new OpenLayers.Bounds(j.bounds.left,j.bounds.bottom,k.bounds.right,k.bounds.top)}return i},initSingleTile:function(n){var k=n.getCenterLonLat();var l=n.getWidth()*this.ratio;var j=n.getHeight()*this.ratio;var m=new OpenLayers.Bounds(k.lon-(l/2),k.lat-(j/2),k.lon+(l/2),k.lat+(j/2));var q=new OpenLayers.LonLat(m.left,m.top);var r=this.map.getLayerPxFromLonLat(q);if(!this.grid.length){this.grid[0]=[]}var o=this.grid[0][0];if(!o){o=this.addTile(m,r);this.addTileMonitoringHooks(o);o.draw();this.grid[0][0]=o}else{o.moveTo(m,r)}this.removeExcessTiles(1,1)},calculateGridLayout:function(I,r,E){var w=E*this.tileSize.w;var G=E*this.tileSize.h;var A=I.left-r.left;var v=Math.floor(A/w)-this.buffer;var z=A/w-v;var D=-z*this.tileSize.w;var u=r.left+v*w;var H=I.top-(r.bottom+G);var B=Math.ceil(H/G)+this.buffer;var s=B-H/G;var F=-s*this.tileSize.h;var C=r.bottom+B*G;return{tilelon:w,tilelat:G,tileoffsetlon:u,tileoffsetlat:C,tileoffsetx:D,tileoffsety:F}},initGriddedTiles:function(ab){var ad=this.map.getSize();var R=Math.ceil(ad.h/this.tileSize.h)+Math.max(1,2*this.buffer);var M=Math.ceil(ad.w/this.tileSize.w)+Math.max(1,2*this.buffer);var Q=this.maxExtent;var H=this.map.getResolution();var J=this.calculateGridLayout(ab,Q,H);var ae=Math.round(J.tileoffsetx);var ah=Math.round(J.tileoffsety);var W=J.tileoffsetlon;var T=J.tileoffsetlat;var af=J.tilelon;var aa=J.tilelat;this.origin=new OpenLayers.Pixel(ae,ah);var E=ae;var P=W;var F=0;var aj=parseInt(this.map.layerContainerDiv.style.left);var G=parseInt(this.map.layerContainerDiv.style.top);do{var ac=this.grid[F++];if(!ac){ac=[];this.grid.push(ac)}W=P;ae=E;var ag=0;do{var ai=new OpenLayers.Bounds(W,T,W+af,T+aa);var U=ae;U-=aj;var V=ah;V-=G;var K=new OpenLayers.Pixel(U,V);var I=ac[ag++];if(!I){I=this.addTile(ai,K);this.addTileMonitoringHooks(I);ac.push(I)}else{I.moveTo(ai,K,false)}W+=af;ae+=this.tileSize.w}while((W<=ab.right+af*this.buffer)||ag<M);T-=aa;ah+=this.tileSize.h}while((T>=ab.bottom-aa*this.buffer)||F<R);this.removeExcessTiles(F,ag);this.spiralTileLoad()},spiralTileLoad:function(){var z=[];var q=["right","down","left","up"];var r=0;var A=-1;var n=OpenLayers.Util.indexOf(q,"right");var i=0;while(i<q.length){var o=r;var w=A;switch(q[n]){case"right":w++;break;case"down":o++;break;case"left":w--;break;case"up":o--;break}var s=null;if((o<this.grid.length)&&(o>=0)&&(w<this.grid[0].length)&&(w>=0)){s=this.grid[o][w]}if((s!=null)&&(!s.queued)){z.unshift(s);s.queued=true;i=0;r=o;A=w}else{n=(n+1)%4;i++}}for(var v=0,u=z.length;v<u;v++){var s=z[v];s.draw();s.queued=false}},addTile:function(c,d){},addTileMonitoringHooks:function(b){b.onLoadStart=function(){if(this.numLoadingTiles==0){this.events.triggerEvent("loadstart")}this.numLoadingTiles++};b.events.register("loadstart",this,b.onLoadStart);b.onLoadEnd=function(){this.numLoadingTiles--;this.events.triggerEvent("tileloaded");if(this.numLoadingTiles==0){this.events.triggerEvent("loadend")}};b.events.register("loadend",this,b.onLoadEnd);b.events.register("unload",this,b.onLoadEnd)},removeTileMonitoringHooks:function(b){b.unload();b.events.un({loadstart:b.onLoadStart,loadend:b.onLoadEnd,unload:b.onLoadEnd,scope:this})},moveGriddedTiles:function(i){var e=this.buffer||1;while(true){var f=this.grid[0][0].position;var g=this.map.getViewPortPxFromLayerPx(f);if(g.x>-this.tileSize.w*(e-1)){this.shiftColumn(true)}else{if(g.x<-this.tileSize.w*e){this.shiftColumn(false)}else{if(g.y>-this.tileSize.h*(e-1)){this.shiftRow(true)}else{if(g.y<-this.tileSize.h*e){this.shiftRow(false)}else{break}}}}}},shiftRow:function(i){var C=(i)?0:(this.grid.length-1);var D=this.grid;var z=D[C];var A=this.map.getResolution();var v=(i)?-this.tileSize.h:this.tileSize.h;var w=A*-v;var q=(i)?D.pop():D.shift();for(var u=0,r=z.length;u<r;u++){var B=z[u];var E=B.bounds.clone();var s=B.position.clone();E.bottom=E.bottom+w;E.top=E.top+w;s.y=s.y+v;q[u].moveTo(E,s)}if(i){D.unshift(q)}else{D.push(q)}},shiftColumn:function(i){var z=(i)?-this.tileSize.w:this.tileSize.w;var A=this.map.getResolution();var q=A*z;for(var w=0,u=this.grid.length;w<u;w++){var o=this.grid[w];var r=(i)?0:(o.length-1);var B=o[r];var C=B.bounds.clone();var v=B.position.clone();C.left=C.left+q;C.right=C.right+q;v.x=v.x+z;var s=i?this.grid[w].pop():this.grid[w].shift();s.moveTo(C,v);if(i){o.unshift(s)}else{o.push(s)}}},removeExcessTiles:function(k,m){while(this.grid.length>k){var j=this.grid.pop();for(var g=0,i=j.length;g<i;g++){var l=j[g];this.removeTileMonitoringHooks(l);l.destroy()}}while(this.grid[0].length>m){for(var g=0,i=this.grid.length;g<i;g++){var j=this.grid[g];var l=j.pop();this.removeTileMonitoringHooks(l);l.destroy()}}},onMapResize:function(){if(this.singleTile){this.clearGrid();this.setTileSize()}},getTileBounds:function(q){var r=this.maxExtent;var n=this.getResolution();var o=n*this.tileSize.w;var j=n*this.tileSize.h;var l=this.getLonLatFromViewPortPx(q);var k=r.left+(o*Math.floor((l.lon-r.left)/o));var m=r.bottom+(j*Math.floor((l.lat-r.bottom)/j));return new OpenLayers.Bounds(k,m,k+o,m+j)},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(c,d){OpenLayers.Util.extend(this,d);this.rules=[];if(d&&d.rules){this.addRules(d.rules)}this.setDefaultStyle(c||OpenLayers.Feature.Vector.style["default"])},destroy:function(){for(var c=0,d=this.rules.length;c<d;c++){this.rules[c].destroy();this.rules[c]=null}this.rules=null;this.defaultStyle=null},createSymbolizer:function(i){var w=this.defaultsPerSymbolizer?{}:this.createLiterals(OpenLayers.Util.extend({},this.defaultStyle),i);var m=this.rules;var n,v;var u=[];var q=false;for(var s=0,r=m.length;s<r;s++){n=m[s];var o=n.evaluate(i);if(o){if(n instanceof OpenLayers.Rule&&n.elseFilter){u.push(n)}else{q=true;this.applySymbolizer(n,w,i)}}}if(q==false&&u.length>0){q=true;for(var s=0,r=u.length;s<r;s++){this.applySymbolizer(u[s],w,i)}}if(m.length>0&&q==false){w.display="none"}return w},applySymbolizer:function(j,l,g){var i=g.geometry?this.getSymbolizerPrefix(g.geometry):OpenLayers.Style.SYMBOLIZER_PREFIXES[0];var m=j.symbolizer[i]||j.symbolizer;if(this.defaultsPerSymbolizer===true){var k=this.defaultStyle;OpenLayers.Util.applyDefaults(m,{pointRadius:k.pointRadius});if(m.stroke===true||m.graphic===true){OpenLayers.Util.applyDefaults(m,{strokeWidth:k.strokeWidth,strokeColor:k.strokeColor,strokeOpacity:k.strokeOpacity,strokeDashstyle:k.strokeDashstyle,strokeLinecap:k.strokeLinecap})}if(m.fill===true||m.graphic===true){OpenLayers.Util.applyDefaults(m,{fillColor:k.fillColor,fillOpacity:k.fillOpacity})}if(m.graphic===true){OpenLayers.Util.applyDefaults(m,{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(l,m),g)},createLiterals:function(g,i){var e=this.context||i.attributes||i.data;for(var f in this.propertyStyles){g[f]=OpenLayers.Style.createLiteral(g[f],e,i)}return g},findPropertyStyles:function(){var q={};var n=this.defaultStyle;this.addPropertyStyles(q,n);var l=this.rules;var o,m;for(var r=0,k=l.length;r<k;r++){o=l[r].symbolizer;for(var i in o){m=o[i];if(typeof m=="object"){this.addPropertyStyles(q,m)}else{this.addPropertyStyles(q,o);break}}}return q},addPropertyStyles:function(e,i){var g;for(var f in i){g=i[f];if(typeof g=="string"&&g.match(/\$\{\w+\}/)){e[f]=true}}return e},addRules:function(b){this.rules=this.rules.concat(b);this.propertyStyles=this.findPropertyStyles()},setDefaultStyle:function(b){this.defaultStyle=b;this.propertyStyles=this.findPropertyStyles()},getSymbolizerPrefix:function(g){var i=OpenLayers.Style.SYMBOLIZER_PREFIXES;for(var e=0,f=i.length;e<f;e++){if(g.CLASS_NAME.indexOf(i[e])!=-1){return i[e]}}},CLASS_NAME:"OpenLayers.Style"});OpenLayers.Style.createLiteral=function(f,d,e){if(typeof f=="string"&&f.indexOf("${")!=-1){f=OpenLayers.String.format(f,d,[e]);f=(isNaN(f)||!f)?f:parseFloat(f)}return f};OpenLayers.Style.SYMBOLIZER_PREFIXES=["Point","Line","Polygon","Text"];OpenLayers.Control.Navigation=OpenLayers.Class(OpenLayers.Control,{dragPan:null,dragPanOptions:null,zoomBox:null,zoomWheelEnabled:true,handleRightClicks:false,zoomBoxKeyMask:OpenLayers.Handler.MOD_SHIFT,initialize:function(b){this.handlers={};OpenLayers.Control.prototype.initialize.apply(this,arguments)},destroy:function(){this.deactivate();if(this.dragPan){this.dragPan.destroy()}this.dragPan=null;if(this.zoomBox){this.zoomBox.destroy()}this.zoomBox=null;OpenLayers.Control.prototype.destroy.apply(this,arguments)},activate:function(){this.dragPan.activate();if(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 d={dblclick:this.defaultDblClick,dblrightclick:this.defaultDblRightClick};var c={"double":true,stopDouble:true};this.handlers.click=new OpenLayers.Handler.Click(this,d,c);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(c){var d=this.map.getLonLatFromViewPortPx(c.xy);this.map.setCenter(d,this.map.zoom+1)},defaultDblRightClick:function(c){var d=this.map.getLonLatFromViewPortPx(c.xy);this.map.setCenter(d,this.map.zoom-1)},wheelChange:function(l,r){var n=this.map.getZoom()+r;if(!this.map.isValidZoomLevel(n)){return}var k=this.map.getSize();var o=k.w/2-l.xy.x;var q=l.xy.y-k.h/2;var m=this.map.baseLayer.getResolutionForZoom(n);var u=this.map.getLonLatFromPixel(l.xy);var s=new OpenLayers.LonLat(u.lon+o*m,u.lat+q*m);this.map.setCenter(s,n)},wheelUp:function(b){this.wheelChange(b,1)},wheelDown:function(b){this.wheelChange(b,-1)},disableZoomWheel:function(){this.zoomWheelEnabled=false;this.handlers.wheel.deactivate()},enableZoomWheel:function(){this.zoomWheelEnabled=true;if(this.active){this.handlers.wheel.activate()}},CLASS_NAME:"OpenLayers.Control.Navigation"});OpenLayers.Geometry=OpenLayers.Class({id:null,parent:null,bounds:null,initialize:function(){this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")},destroy:function(){this.id=null;this.bounds=null},clone:function(){return new OpenLayers.Geometry()},setBounds:function(b){if(b){this.bounds=b.clone()}},clearBounds:function(){this.bounds=null;if(this.parent){this.parent.clearBounds()}},extendBounds:function(c){var d=this.getBounds();if(!d){this.setBounds(c)}else{this.bounds.extend(c)}},getBounds:function(){if(this.bounds==null){this.calculateBounds()}return this.bounds},calculateBounds:function(){},distanceTo:function(c,d){},getVertices:function(b){},atPoint:function(o,l,n){var r=false;var q=this.getBounds();if((q!=null)&&(o!=null)){var j=(l!=null)?l:0;var k=(n!=null)?n:0;var m=new OpenLayers.Bounds(this.bounds.left-j,this.bounds.bottom-k,this.bounds.right+j,this.bounds.top+k);r=m.containsLonLat(o)}return r},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(l){var k=arguments.callee.format;if(!k){k=new OpenLayers.Format.WKT();arguments.callee.format=k}var n;var i=k.read(l);if(i instanceof OpenLayers.Feature.Vector){n=i.geometry}else{if(i instanceof Array){var j=i.length;var m=new Array(j);for(var o=0;o<j;++o){m[o]=i[o].geometry}n=new OpenLayers.Geometry.Collection(m)}}return n};OpenLayers.Geometry.segmentsIntersect=function(ap,i,ao){var T=ao&&ao.point;var ac=ao&&ao.tolerance;var al=false;var W=ap.x1-i.x1;var M=ap.y1-i.y1;var ad=ap.x2-ap.x1;var ae=ap.y2-ap.y1;var Q=i.y2-i.y1;var ah=i.x2-i.x1;var R=(Q*ad)-(ah*ae);var am=(ah*M)-(Q*W);var an=(ad*M)-(ae*W);if(R==0){if(am==0&&an==0){al=true}}else{var P=am/R;var U=an/R;if(P>=0&&P<=1&&U>=0&&U<=1){if(!T){al=true}else{var aj=ap.x1+(P*ad);var ak=ap.y1+(P*ae);al=new OpenLayers.Geometry.Point(aj,ak)}}}if(ac){var V;if(al){if(T){var af=[ap,i];var ab,aj,ak;outer:for(var d=0;d<2;++d){ab=af[d];for(var K=1;K<3;++K){aj=ab["x"+K];ak=ab["y"+K];V=Math.sqrt(Math.pow(aj-al.x,2)+Math.pow(ak-al.y,2));if(V<ac){al.x=aj;al.y=ak;break outer}}}}}else{var af=[ap,i];var aa,j,aj,ak,ag,ai;outer:for(var d=0;d<2;++d){aa=af[d];j=af[(d+1)%2];for(var K=1;K<3;++K){ag={x:aa["x"+K],y:aa["y"+K]};ai=OpenLayers.Geometry.distanceToSegment(ag,j);if(ai.distance<ac){if(T){al=new OpenLayers.Geometry.Point(ag.x,ag.y)}else{al=true}break outer}}}}}return al};OpenLayers.Geometry.distanceToSegment=function(r,B){var C=r.x;var s=r.y;var D=B.x1;var u=B.y1;var E=B.x2;var z=B.y2;var o=E-D;var q=z-u;var v=((o*(C-D))+(q*(s-u)))/(Math.pow(o,2)+Math.pow(q,2));var w,A;if(v<=0){w=D;A=u}else{if(v>=1){w=E;A=z}else{w=D+v*o;A=u+v*q}}return{distance:Math.sqrt(Math.pow(w-C,2)+Math.pow(A-s,2)),x:w,y:A}};OpenLayers.Layer.TMS=OpenLayers.Class(OpenLayers.Layer.Grid,{serviceVersion:"1.0.0",isBaseLayer:true,tileOrigin:null,serverResolutions:null,initialize:function(g,i,e){var f=[];f.push(g,i,{},e);OpenLayers.Layer.Grid.prototype.initialize.apply(this,f)},destroy:function(){OpenLayers.Layer.Grid.prototype.destroy.apply(this,arguments)},clone:function(b){if(b==null){b=new OpenLayers.Layer.TMS(this.name,this.url,this.options)}b=OpenLayers.Layer.Grid.prototype.clone.apply(this,[b]);return b},getURL:function(n){n=this.adjustBounds(n);var o=this.map.getResolution();var j=Math.round((n.left-this.tileOrigin.lon)/(o*this.tileSize.w));var k=Math.round((n.bottom-this.tileOrigin.lat)/(o*this.tileSize.h));var l=this.serverResolutions!=null?OpenLayers.Util.indexOf(this.serverResolutions,o):this.map.getZoom();var m=this.serviceVersion+"/"+this.layername+"/"+l+"/"+j+"/"+k+"."+this.type;var i=this.url;if(i instanceof Array){i=this.selectUrl(m,i)}return i+m},addTile:function(c,d){return new OpenLayers.Tile.Image(this,d,c,null,this.tileSize)},setMap:function(b){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(f,e){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(f instanceof OpenLayers.Style){this.styles["default"]=f;this.styles.select=f;this.styles.temporary=f;this.styles["delete"]=f}else{if(typeof f=="object"){for(var d in f){if(f[d] instanceof OpenLayers.Style){this.styles[d]=f[d]}else{if(typeof f[d]=="object"){this.styles[d]=new OpenLayers.Style(f[d])}else{this.styles["default"]=new OpenLayers.Style(f);this.styles.select=new OpenLayers.Style(f);this.styles.temporary=new OpenLayers.Style(f);this.styles["delete"]=new OpenLayers.Style(f);break}}}}}OpenLayers.Util.extend(this,e)},destroy:function(){for(var b in this.styles){this.styles[b].destroy()}this.styles=null},createSymbolizer:function(d,f){if(!d){d=new OpenLayers.Feature.Vector()}if(!this.styles[f]){f="default"}d.renderIntent=f;var e={};if(this.extendDefault&&f!="default"){e=this.styles["default"].createSymbolizer(d)}return OpenLayers.Util.extend(e,this.styles[f].createSymbolizer(d))},addUniqueValueRules:function(g,l,j,i){var k=[];for(var m in j){k.push(new OpenLayers.Rule({symbolizer:j[m],context:i,filter:new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.EQUAL_TO,property:l,value:m})}))}this.styles[g].addRules(k)},CLASS_NAME:"OpenLayers.StyleMap"});OpenLayers.Geometry.Collection=OpenLayers.Class(OpenLayers.Geometry,{components:null,componentTypes:null,initialize:function(b){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);this.components=[];if(b!=null){this.addComponents(b)}},destroy:function(){this.components.length=0;this.components=null},clone:function(){var geometry=eval("new "+this.CLASS_NAME+"()");for(var i=0,len=this.components.length;i<len;i++){geometry.addComponent(this.components[i].clone())}OpenLayers.Util.applyDefaults(geometry,this);return geometry},getComponentsString:function(){var d=[];for(var f=0,e=this.components.length;f<e;f++){d.push(this.components[f].toShortString())}return d.join(",")},calculateBounds:function(){this.bounds=null;if(this.components&&this.components.length>0){this.setBounds(this.components[0].getBounds());for(var c=1,d=this.components.length;c<d;c++){this.extendBounds(this.components[c].getBounds())}}},addComponents:function(f){if(!(f instanceof Array)){f=[f]}for(var d=0,e=f.length;d<e;d++){this.addComponent(f[d])}},addComponent:function(f,g){var j=false;if(f){if(this.componentTypes==null||(OpenLayers.Util.indexOf(this.componentTypes,f.CLASS_NAME)>-1)){if(g!=null&&(g<this.components.length)){var i=this.components.slice(0,g);var k=this.components.slice(g,this.components.length);i.push(f);this.components=i.concat(k)}else{this.components.push(f)}f.parent=this;this.clearBounds();j=true}}return j},removeComponents:function(c){if(!(c instanceof Array)){c=[c]}for(var d=c.length-1;d>=0;--d){this.removeComponent(c[d])}},removeComponent:function(b){OpenLayers.Util.removeItem(this.components,b);this.clearBounds()},getLength:function(){var f=0;for(var d=0,e=this.components.length;d<e;d++){f+=this.components[d].getLength()}return f},getArea:function(){var f=0;for(var d=0,e=this.components.length;d<e;d++){f+=this.components[d].getArea()}return f},getGeodesicArea:function(e){var g=0;for(var i=0,f=this.components.length;i<f;i++){g+=this.components[i].getGeodesicArea(e)}return g},getCentroid:function(){return this.components.length&&this.components[0].getCentroid()},getGeodesicLength:function(e){var g=0;for(var i=0,f=this.components.length;i<f;i++){g+=this.components[i].getGeodesicLength(e)}return g},move:function(e,g){for(var i=0,f=this.components.length;i<f;i++){this.components[i].move(e,g)}},rotate:function(g,e){for(var i=0,f=this.components.length;i<f;++i){this.components[i].rotate(g,e)}},resize:function(g,f,i){for(var e=0;e<this.components.length;++e){this.components[e].resize(g,f,i)}return this},distanceTo:function(m,l){var s=!(l&&l.edge===false);var u=s&&l&&l.details;var i,r;var q=Number.POSITIVE_INFINITY;for(var o=0,n=this.components.length;o<n;++o){i=this.components[o].distanceTo(m,l);distance=u?i.distance:i;if(distance<q){q=distance;r=i;if(q==0){break}}}return r},equals:function(g){var e=true;if(!g||!g.CLASS_NAME||(this.CLASS_NAME!=g.CLASS_NAME)){e=false}else{if(!(g.components instanceof Array)||(g.components.length!=this.components.length)){e=false}else{for(var i=0,f=this.components.length;i<f;++i){if(!this.components[i].equals(g.components[i])){e=false;break}}}}return e},transform:function(i,k){if(i&&k){for(var j=0,g=this.components.length;j<g;j++){var f=this.components[j];f.transform(i,k)}this.bounds=null}return this},intersects:function(g){var e=false;for(var i=0,f=this.components.length;i<f;++i){e=g.intersects(this.components[i]);if(e){break}}return e},getVertices:function(e){var i=[];for(var g=0,f=this.components.length;g<f;++g){Array.prototype.push.apply(i,this.components[g].getVertices(e))}return i},CLASS_NAME:"OpenLayers.Geometry.Collection"});OpenLayers.Geometry.Point=OpenLayers.Class(OpenLayers.Geometry,{x:null,y:null,initialize:function(d,c){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);this.x=parseFloat(d);this.y=parseFloat(c)},clone:function(b){if(b==null){b=new OpenLayers.Geometry.Point(this.x,this.y)}OpenLayers.Util.applyDefaults(b,this);return b},calculateBounds:function(){this.bounds=new OpenLayers.Bounds(this.x,this.y,this.x,this.y)},distanceTo:function(q,l){var s=!(l&&l.edge===false);var w=s&&l&&l.details;var v,r,n,u,o,m;if(q instanceof OpenLayers.Geometry.Point){r=this.x;n=this.y;u=q.x;o=q.y;v=Math.sqrt(Math.pow(r-u,2)+Math.pow(n-o,2));m=!w?v:{x0:r,y0:n,x1:u,y1:o,distance:v}}else{m=q.distanceTo(this,l);if(w){m={x0:m.x1,y0:m.y1,x1:m.x0,y1:m.y0,distance:m.distance}}}return m},equals:function(d){var c=false;if(d!=null){c=((this.x==d.x&&this.y==d.y)||(isNaN(this.x)&&isNaN(this.y)&&isNaN(d.x)&&isNaN(d.y)))}return c},toShortString:function(){return(this.x+", "+this.y)},move:function(d,c){this.x=this.x+d;this.y=this.y+c;this.clearBounds()},rotate:function(g,e){g*=Math.PI/180;var f=this.distanceTo(e);var i=g+Math.atan2(this.y-e.y,this.x-e.x);this.x=e.x+(f*Math.cos(i));this.y=e.y+(f*Math.sin(i));this.clearBounds()},getCentroid:function(){return new OpenLayers.Geometry.Point(this.x,this.y)},resize:function(f,e,d){d=(d==undefined)?1:d;this.x=e.x+(f*d*(this.x-e.x));this.y=e.y+(f*(this.y-e.y));this.clearBounds();return this},intersects:function(c){var d=false;if(c.CLASS_NAME=="OpenLayers.Geometry.Point"){d=this.equals(c)}else{d=c.intersects(this)}return d},transform:function(c,d){if((c&&d)){OpenLayers.Projection.transform(this,c,d);this.bounds=null}return this},getVertices:function(b){return[this]},CLASS_NAME:"OpenLayers.Geometry.Point"});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(i,e){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 g=0,f=this.strategies.length;g<f;g++){this.strategies[g].setLayer(this)}}},destroy:function(){if(this.strategies){var f,d,e;for(d=0,e=this.strategies.length;d<e;d++){f=this.strategies[d];if(f.autoDestroy){f.destroy()}}this.strategies=null}if(this.protocol){if(this.protocol.autoDestroy){this.protocol.destroy()}this.protocol=null}this.destroyFeatures();this.features=null;this.selectedFeatures=null;this.unrenderedFeatures=null;if(this.renderer){this.renderer.destroy()}this.renderer=null;this.geometryType=null;this.drawn=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments)},refresh:function(b){if(this.calculateInRange()&&this.visibility){this.events.triggerEvent("refresh",b)}},assignRenderer:function(){for(var f=0,e=this.renderers.length;f<e;f++){var d=OpenLayers.Renderer[this.renderers[f]];if(d&&d.prototype.supported()){this.renderer=new d(this.div,this.rendererOptions);break}}},displayError:function(){if(this.reportError){OpenLayers.Console.userError(OpenLayers.i18n("browserNotSupported",{renderers:this.renderers.join("\n")}))}},setMap:function(b){OpenLayers.Layer.prototype.setMap.apply(this,arguments);if(!this.renderer){this.map.removeLayer(this)}else{this.renderer.map=this.map;this.renderer.setSize(this.map.getSize())}},afterAdd:function(){if(this.strategies){var f,d,e;for(d=0,e=this.strategies.length;d<e;d++){f=this.strategies[d];if(f.autoActivate){f.activate()}}}},removeMap:function(i){if(this.strategies){var g,e,f;for(e=0,f=this.strategies.length;e<f;e++){g=this.strategies[e];if(g.autoActivate){g.deactivate()}}}},onMapResize:function(){OpenLayers.Layer.prototype.onMapResize.apply(this,arguments);this.renderer.setSize(this.map.getSize())},moveTo:function(m,i,l){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);var o=true;if(!l){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 n=this.map.getExtent();o=this.renderer.setExtent(n,i);this.renderer.root.style.visibility="visible";if(navigator.userAgent.toLowerCase().indexOf("gecko")!=-1){this.div.scrollLeft=this.div.scrollLeft}if(!i&&o){for(var q in this.unrenderedFeatures){var r=this.unrenderedFeatures[q];this.drawFeature(r)}}}if(!this.drawn||i||!o){this.drawn=true;var r;for(var q=0,k=this.features.length;q<k;q++){this.renderer.locked=(q!==(k-1));r=this.features[q];this.drawFeature(r)}}},display:function(d){OpenLayers.Layer.prototype.display.apply(this,arguments);var c=this.div.style.display;if(c!=this.renderer.root.style.display){this.renderer.root.style.display=c}},addFeatures:function(s,i){if(!(s instanceof Array)){s=[s]}var m=!i||!i.silent;if(m){var u={features:s};var n=this.events.triggerEvent("beforefeaturesadded",u);if(n===false){return}s=u.features}for(var r=0,o=s.length;r<o;r++){if(r!=(s.length-1)){this.renderer.locked=true}else{this.renderer.locked=false}var l=s[r];if(this.geometryType&&!(l.geometry instanceof this.geometryType)){var q=OpenLayers.i18n("componentShouldBe",{geomType:this.geometryType.prototype.CLASS_NAME});throw q}this.features.push(l);l.layer=this;if(!l.style&&this.style){l.style=OpenLayers.Util.extend({},this.style)}if(m){if(this.events.triggerEvent("beforefeatureadded",{feature:l})===false){continue}this.preFeatureInsert(l)}this.drawFeature(l);if(m){this.events.triggerEvent("featureadded",{feature:l});this.onFeatureInsert(l)}}if(m){this.events.triggerEvent("featuresadded",{features:s})}},removeFeatures:function(i,g){if(!i||i.length===0){return}if(!(i instanceof Array)){i=[i]}if(i===this.features){i=i.slice()}var j=!g||!g.silent;for(var k=i.length-1;k>=0;k--){if(k!=0&&i[k-1].geometry){this.renderer.locked=true}else{this.renderer.locked=false}var f=i[k];delete this.unrenderedFeatures[f.id];if(j){this.events.triggerEvent("beforefeatureremoved",{feature:f})}this.features=OpenLayers.Util.removeItem(this.features,f);f.layer=null;if(f.geometry){this.renderer.eraseFeatures(f)}if(OpenLayers.Util.indexOf(this.selectedFeatures,f)!=-1){OpenLayers.Util.removeItem(this.selectedFeatures,f)}if(j){this.events.triggerEvent("featureremoved",{feature:f})}}if(j){this.events.triggerEvent("featuresremoved",{features:i})}},destroyFeatures:function(g,f){var i=(g==undefined);if(i){g=this.features}if(g){this.removeFeatures(g,f);for(var e=g.length-1;e>=0;e--){g[e].destroy()}}},drawFeature:function(e,d){if(!this.drawn){return}if(typeof d!="object"){if(!d&&e.state===OpenLayers.State.DELETE){d="delete"}var f=d||e.renderIntent;d=e.style||this.style;if(!d){d=this.styleMap.createSymbolizer(e,f)}}if(!this.renderer.drawFeature(e,d)){this.unrenderedFeatures[e.id]=e}else{delete this.unrenderedFeatures[e.id]}},eraseFeatures:function(b){this.renderer.eraseFeatures(b)},getFeatureFromEvent:function(d){if(!this.renderer){OpenLayers.Console.error(OpenLayers.i18n("getFeatureError"));return null}var c=this.renderer.getFeatureIdFromEvent(d);return this.getFeatureById(c)},getFeatureById:function(g){var i=null;for(var e=0,f=this.features.length;e<f;++e){if(this.features[e].id==g){i=this.features[e];break}}return i},onFeatureInsert:function(b){},preFeatureInsert:function(b){},getDataExtent:function(){var d=null;if(this.features&&(this.features.length>0)){d=new OpenLayers.Bounds();for(var f=0,e=this.features.length;f<e;f++){d.extend(this.features[f].geometry.getBounds())}}return d},CLASS_NAME:"OpenLayers.Layer.Vector"});OpenLayers.Geometry.MultiPoint=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.Point"],initialize:function(b){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments)},addPoint:function(d,c){this.addComponent(d,c)},removePoint:function(b){this.removeComponent(b)},CLASS_NAME:"OpenLayers.Geometry.MultiPoint"});OpenLayers.Layer.Vector.RootContainer=OpenLayers.Class(OpenLayers.Layer.Vector,{displayInLayerSwitcher:false,layers:null,initialize:function(c,d){OpenLayers.Layer.Vector.prototype.initialize.apply(this,arguments)},display:function(){},getFeatureFromEvent:function(f){var g=this.layers;var i;for(var e=0;e<g.length;e++){i=g[e].getFeatureFromEvent(f);if(i){return i}}},setMap:function(b){OpenLayers.Layer.Vector.prototype.setMap.apply(this,arguments);this.collectRoots();b.events.register("changelayer",this,this.handleChangeLayer)},removeMap:function(b){b.events.unregister("changelayer",this,this.handleChangeLayer);this.resetRoots();OpenLayers.Layer.Vector.prototype.removeMap.apply(this,arguments)},collectRoots:function(){var c;for(var d=0;d<this.map.layers.length;++d){c=this.map.layers[d];if(OpenLayers.Util.indexOf(this.layers,c)!=-1){c.renderer.moveRoot(this.renderer)}}},resetRoots:function(){var c;for(var d=0;d<this.layers.length;++d){c=this.layers[d];if(this.renderer&&c.renderer.getRenderLayerId()==this.id){this.renderer.moveRoot(c.renderer)}}},handleChangeLayer:function(d){var c=d.layer;if(d.property=="order"&&OpenLayers.Util.indexOf(this.layers,c)!=-1){this.resetRoots();this.collectRoots()}},CLASS_NAME:"OpenLayers.Layer.Vector.RootContainer"});OpenLayers.Control.SelectFeature=OpenLayers.Class(OpenLayers.Control,{EVENT_TYPES:["beforefeaturehighlighted","featurehighlighted","featureunhighlighted"],multipleKey:null,toggleKey:null,multiple:false,clickout:true,toggle:false,hover:false,highlightOnly:false,box:false,onBeforeSelect:function(){},onSelect:function(){},onUnselect:function(){},scope:null,geometryTypes:null,layer:null,layers:null,callbacks:null,selectStyle:null,renderIntent:"select",handlers:null,initialize:function(f,e){this.EVENT_TYPES=OpenLayers.Control.SelectFeature.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);OpenLayers.Control.prototype.initialize.apply(this,[e]);if(this.scope===null){this.scope=this}if(f instanceof Array){this.layers=f;this.layer=new OpenLayers.Layer.Vector.RootContainer(this.id+"_container",{layers:f})}else{this.layer=f}var d={click:this.clickFeature,clickout:this.clickoutFeature};if(this.hover){d.over=this.overFeature;d.out=this.outFeature}this.callbacks=OpenLayers.Util.extend(d,this.callbacks);this.handlers={feature:new OpenLayers.Handler.Feature(this,this.layer,this.callbacks,{geometryTypes:this.geometryTypes})};if(this.box){this.handlers.box=new OpenLayers.Handler.Box(this,{done:this.selectBox},{boxDivClassName:"olHandlerBoxSelectFeature"})}},destroy:function(){OpenLayers.Control.prototype.destroy.apply(this,arguments);if(this.layers){this.layer.destroy()}},activate:function(){if(!this.active){if(this.layers){this.map.addLayer(this.layer)}this.handlers.feature.activate();if(this.box&&this.handlers.box){this.handlers.box.activate()}}return OpenLayers.Control.prototype.activate.apply(this,arguments)},deactivate:function(){if(this.active){this.handlers.feature.deactivate();if(this.handlers.box){this.handlers.box.deactivate()}if(this.layers){this.map.removeLayer(this.layer)}}return OpenLayers.Control.prototype.deactivate.apply(this,arguments)},unselectAll:function(g){var j=this.layers||[this.layer];var k,l;for(var i=0;i<j.length;++i){k=j[i];for(var m=k.selectedFeatures.length-1;m>=0;--m){l=k.selectedFeatures[m];if(!g||g.except!=l){this.unselect(l)}}}},clickFeature:function(d){if(!this.hover){var c=(OpenLayers.Util.indexOf(d.layer.selectedFeatures,d)>-1);if(c){if(this.toggleSelect()){this.unselect(d)}else{if(!this.multipleSelect()){this.unselectAll({except:d})}}}else{if(!this.multipleSelect()){this.unselectAll({except:d})}this.select(d)}}},multipleSelect:function(){return this.multiple||(this.handlers.feature.evt&&this.handlers.feature.evt[this.multipleKey])},toggleSelect:function(){return this.toggle||(this.handlers.feature.evt&&this.handlers.feature.evt[this.toggleKey])},clickoutFeature:function(b){if(!this.hover&&this.clickout){this.unselectAll()}},overFeature:function(c){var d=c.layer;if(this.hover){if(this.highlightOnly){this.highlight(c)}else{if(OpenLayers.Util.indexOf(d.selectedFeatures,c)==-1){this.select(c)}}}},outFeature:function(d){if(this.hover){if(this.highlightOnly){if(d._lastHighlighter==this.id){if(d._prevHighlighter&&d._prevHighlighter!=this.id){delete d._lastHighlighter;var c=this.map.getControl(d._prevHighlighter);if(c){c.highlight(d)}}else{this.unhighlight(d)}}}else{this.unselect(d)}}},highlight:function(i){var e=i.layer;var f=this.events.triggerEvent("beforefeaturehighlighted",{feature:i});if(f!==false){i._prevHighlighter=i._lastHighlighter;i._lastHighlighter=this.id;var g=this.selectStyle||this.renderIntent;e.drawFeature(i,g);this.events.triggerEvent("featurehighlighted",{feature:i})}},unhighlight:function(c){var d=c.layer;c._lastHighlighter=c._prevHighlighter;delete c._prevHighlighter;d.drawFeature(c,c.style||c.layer.style||"default");this.events.triggerEvent("featureunhighlighted",{feature:c})},select:function(f){var e=this.onBeforeSelect.call(this.scope,f);var d=f.layer;if(e!==false){e=d.events.triggerEvent("beforefeatureselected",{feature:f});if(e!==false){d.selectedFeatures.push(f);this.highlight(f);d.events.triggerEvent("featureselected",{feature:f});this.onSelect.call(this.scope,f)}}},unselect:function(c){var d=c.layer;this.unhighlight(c);OpenLayers.Util.removeItem(d.selectedFeatures,c);d.events.triggerEvent("featureunselected",{feature:c});this.onUnselect.call(this.scope,c)},selectBox:function(u){if(u instanceof OpenLayers.Bounds){var q=this.map.getLonLatFromPixel(new OpenLayers.Pixel(u.left,u.bottom));var l=this.map.getLonLatFromPixel(new OpenLayers.Pixel(u.right,u.top));var A=new OpenLayers.Bounds(q.lon,q.lat,l.lon,l.lat);if(!this.multipleSelect()){this.unselectAll()}var o=this.multiple;this.multiple=true;var v=this.layers||[this.layer];var s;for(var z=0;z<v.length;++z){s=v[z];for(var w=0,r=s.features.length;w<r;++w){var i=s.features[w];if(this.geometryTypes==null||OpenLayers.Util.indexOf(this.geometryTypes,i.geometry.CLASS_NAME)>-1){if(A.toGeometry().intersects(i.geometry)){if(OpenLayers.Util.indexOf(s.selectedFeatures,i)==-1){this.select(i)}}}}}this.multiple=o}},setMap:function(b){this.handlers.feature.setMap(b);if(this.box){this.handlers.box.setMap(b)}OpenLayers.Control.prototype.setMap.apply(this,arguments)},CLASS_NAME:"OpenLayers.Control.SelectFeature"});OpenLayers.Geometry.Curve=OpenLayers.Class(OpenLayers.Geometry.MultiPoint,{componentTypes:["OpenLayers.Geometry.Point"],initialize:function(b){OpenLayers.Geometry.MultiPoint.prototype.initialize.apply(this,arguments)},getLength:function(){var f=0;if(this.components&&(this.components.length>1)){for(var d=1,e=this.components.length;d<e;d++){f+=this.components[d-1].distanceTo(this.components[d])}}return f},getGeodesicLength:function(i){var o=this;if(i){var r=new OpenLayers.Projection("EPSG:4326");if(!r.equals(i)){o=this.clone().transform(i,r)}}var n=0;if(o.components&&(o.components.length>1)){var l,m;for(var q=1,k=o.components.length;q<k;q++){l=o.components[q-1];m=o.components[q];n+=OpenLayers.Util.distVincenty({lon:l.x,lat:l.y},{lon:m.x,lat:m.y})}}return n*1000},CLASS_NAME:"OpenLayers.Geometry.Curve"});OpenLayers.Geometry.LineString=OpenLayers.Class(OpenLayers.Geometry.Curve,{initialize:function(b){OpenLayers.Geometry.Curve.prototype.initialize.apply(this,arguments)},removeComponent:function(b){if(this.components&&(this.components.length>2)){OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments)}},intersects:function(z){var H=false;var A=z.CLASS_NAME;if(A=="OpenLayers.Geometry.LineString"||A=="OpenLayers.Geometry.LinearRing"||A=="OpenLayers.Geometry.Point"){var i=this.getSortedSegments();var w;if(A=="OpenLayers.Geometry.Point"){w=[{x1:z.x,y1:z.y,x2:z.x,y2:z.y}]}else{w=z.getSortedSegments()}var K,D,F,J,M,P,G,I;outer:for(var C=0,B=i.length;C<B;++C){K=i[C];D=K.x1;F=K.x2;J=K.y1;M=K.y2;inner:for(var E=0,j=w.length;E<j;++E){P=w[E];if(P.x1>F){break}if(P.x2<D){continue}G=P.y1;I=P.y2;if(Math.min(G,I)>Math.max(J,M)){continue}if(Math.max(G,I)<Math.min(J,M)){continue}if(OpenLayers.Geometry.segmentsIntersect(K,P)){H=true;break outer}}}}else{H=z.intersects(this)}return H},getSortedSegments:function(){var f=this.components.length-1;var e=new Array(f);for(var i=0;i<f;++i){point1=this.components[i];point2=this.components[i+1];if(point1.x<point2.x){e[i]={x1:point1.x,y1:point1.y,x2:point2.x,y2:point2.y}}else{e[i]={x1:point2.x,y1:point2.y,x2:point1.x,y2:point1.y}}}function g(a,b){return a.x1-b.x1}return e.sort(g)},splitWithSegment:function(D,aa){var W=!(aa&&aa.edge===false);var G=aa&&aa.tolerance;var ab=[];var B=this.getVertices();var I=[];var H=[];var Q=false;var U,V,K;var P,E,i;var T={point:true,tolerance:G};var R=null;for(var J=0,M=B.length-2;J<=M;++J){U=B[J];I.push(U.clone());V=B[J+1];i={x1:U.x,y1:U.y,x2:V.x,y2:V.y};K=OpenLayers.Geometry.segmentsIntersect(D,i,T);if(K instanceof OpenLayers.Geometry.Point){if((K.x===D.x1&&K.y===D.y1)||(K.x===D.x2&&K.y===D.y2)||K.equals(U)||K.equals(V)){E=true}else{E=false}if(E||W){if(!K.equals(H[H.length-1])){H.push(K.clone())}if(J===0){if(K.equals(U)){continue}}if(K.equals(V)){continue}Q=true;if(!K.equals(U)){I.push(K)}ab.push(new OpenLayers.Geometry.LineString(I));I=[K.clone()]}}}if(Q){I.push(V.clone());ab.push(new OpenLayers.Geometry.LineString(I))}if(H.length>0){var F=D.x1<D.x2?1:-1;var C=D.y1<D.y2?1:-1;R={lines:ab,points:H.sort(function(b,a){return(F*b.x-F*a.x)||(C*b.y-C*a.y)})}}return R},split:function(F,aa){var K=null;var V=aa&&aa.mutual;var P,U,M,W;if(F instanceof OpenLayers.Geometry.LineString){var I=this.getVertices();var R,T,J,Q,ab,G;var k=[];M=[];for(var j=0,H=I.length-2;j<=H;++j){R=I[j];T=I[j+1];J={x1:R.x,y1:R.y,x2:T.x,y2:T.y};W=W||[F];if(V){k.push(R.clone())}for(var D=0;D<W.length;++D){Q=W[D].splitWithSegment(J,aa);if(Q){ab=Q.lines;if(ab.length>0){ab.unshift(D,1);Array.prototype.splice.apply(W,ab);D+=ab.length-2}if(V){for(var E=0,i=Q.points.length;E<i;++E){G=Q.points[E];if(!G.equals(R)){k.push(G);M.push(new OpenLayers.Geometry.LineString(k));if(G.equals(T)){k=[]}else{k=[G.clone()]}}}}}}}if(V&&M.length>0&&k.length>0){k.push(T.clone());M.push(new OpenLayers.Geometry.LineString(k))}}else{K=F.splitWith(this,aa)}if(W&&W.length>1){U=true}else{W=[]}if(M&&M.length>1){P=true}else{M=[]}if(U||P){if(V){K=[M,W]}else{K=W}}return K},splitWith:function(c,d){return c.split(this,d)},getVertices:function(d){var c;if(d===true){c=[this.components[0],this.components[this.components.length-1]]}else{if(d===false){c=this.components.slice(1,this.components.length-1)}else{c=this.components.slice()}}return c},distanceTo:function(aa,ab){var W=!(ab&&ab.edge===false);var H=W&&ab&&ab.details;var J,ad={};var j=Number.POSITIVE_INFINITY;if(aa instanceof OpenLayers.Geometry.Point){var G=this.getSortedSegments();var M=aa.x;var Q=aa.y;var K;for(var R=0,P=G.length;R<P;++R){K=G[R];J=OpenLayers.Geometry.distanceToSegment(aa,K);if(J.distance<j){j=J.distance;ad=J;if(j===0){break}}else{if(K.x2>M&&((Q>K.y1&&Q<K.y2)||(Q<K.y1&&Q>K.y2))){break}}}if(H){ad={distance:ad.distance,x0:ad.x,y0:ad.y,x1:M,y1:Q}}else{ad=ad.distance}}else{if(aa instanceof OpenLayers.Geometry.LineString){var ae=this.getSortedSegments();var af=aa.getSortedSegments();var ag,ah,T,I,ac;var U=af.length;var V={point:true};outer:for(var R=0,P=ae.length;R<P;++R){ag=ae[R];I=ag.x1;ac=ag.y1;for(var i=0;i<U;++i){ah=af[i];T=OpenLayers.Geometry.segmentsIntersect(ag,ah,V);if(T){j=0;ad={distance:0,x0:T.x,y0:T.y,x1:T.x,y1:T.y};break outer}else{J=OpenLayers.Geometry.distanceToSegment({x:I,y:ac},ah);if(J.distance<j){j=J.distance;ad={distance:j,x0:I,y0:ac,x1:J.x,y1:J.y}}}}}if(!H){ad=ad.distance}if(j!==0){if(ag){J=aa.distanceTo(new OpenLayers.Geometry.Point(ag.x2,ag.y2),ab);var F=H?J.distance:J;if(F<j){if(H){ad={distance:j,x0:J.x1,y0:J.y1,x1:J.x0,y1:J.y0}}else{ad=F}}}}}else{ad=aa.distanceTo(this,ab);if(H){ad={distance:ad.distance,x0:ad.x1,y0:ad.y1,x1:ad.x0,y1:ad.y0}}}}return ad},CLASS_NAME:"OpenLayers.Geometry.LineString"});OpenLayers.Geometry.LinearRing=OpenLayers.Class(OpenLayers.Geometry.LineString,{componentTypes:["OpenLayers.Geometry.Point"],initialize:function(b){OpenLayers.Geometry.LineString.prototype.initialize.apply(this,arguments)},addComponent:function(g,f){var k=false;var j=this.components.pop();if(f!=null||!g.equals(j)){k=OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,arguments)}var i=this.components[0];OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,[i]);return k},removeComponent:function(d){if(this.components.length>4){this.components.pop();OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments);var c=this.components[0];OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,[c])}},move:function(e,g){for(var i=0,f=this.components.length;i<f-1;i++){this.components[i].move(e,g)}},rotate:function(g,e){for(var i=0,f=this.components.length;i<f-1;++i){this.components[i].rotate(g,e)}},resize:function(i,f,j){for(var k=0,g=this.components.length;k<g-1;++k){this.components[k].resize(i,f,j)}return this},transform:function(i,k){if(i&&k){for(var j=0,g=this.components.length;j<g-1;j++){var f=this.components[j];f.transform(i,k)}this.bounds=null}return this},getCentroid:function(){if(this.components&&(this.components.length>2)){var m=0;var n=0;for(var q=0;q<this.components.length-1;q++){var r=this.components[q];var c=this.components[q+1];m+=(r.x+c.x)*(r.x*c.y-c.x*r.y);n+=(r.y+c.y)*(r.x*c.y-c.x*r.y)}var o=-1*this.getArea();var b=m/(6*o);var i=n/(6*o)}return new OpenLayers.Geometry.Point(b,i)},getArea:function(){var i=0;if(this.components&&(this.components.length>2)){var k=0;for(var l=0,m=this.components.length;l<m-1;l++){var b=this.components[l];var c=this.components[l+1];k+=(b.x+c.x)*(c.y-b.y)}i=-k/2}return i},getGeodesicArea:function(i){var q=this;if(i){var r=new OpenLayers.Projection("EPSG:4326");if(!r.equals(i)){q=this.clone().transform(i,r)}}var n=0;var k=q.components&&q.components.length;if(k>2){var l,m;for(var o=0;o<k-1;o++){l=q.components[o];m=q.components[o+1];n+=OpenLayers.Util.rad(m.x-l.x)*(2+Math.sin(OpenLayers.Util.rad(l.y))+Math.sin(OpenLayers.Util.rad(m.y)))}n=n*6378137*6378137/2}return n},containsPoint:function(D){var i=OpenLayers.Number.limitSigDigs;var E=14;var F=i(D.x,E);var G=i(D.y,E);function w(e,b,a,c,d){return(((b-c)*e)+((c*a)-(b*d)))/(a-d)}var R=this.components.length-1;var I,J,z,M,B,Q,K,P;var H=0;for(var C=0;C<R;++C){I=this.components[C];z=i(I.x,E);M=i(I.y,E);J=this.components[C+1];B=i(J.x,E);Q=i(J.y,E);if(M==Q){if(G==M){if(z<=B&&(F>=z&&F<=B)||z>=B&&(F<=z&&F>=B)){H=-1;break}}continue}K=i(w(G,z,M,B,Q),E);if(K==F){if(M<Q&&(G>=M&&G<=Q)||M>Q&&(G<=M&&G>=Q)){H=-1;break}}if(K<=F){continue}if(z!=B&&(K<Math.min(z,B)||K>Math.max(z,B))){continue}if(M<Q&&(G>=M&&G<Q)||M>Q&&(G<M&&G>=Q)){++H}}var A=(H==-1)?1:!!(H&1);return A},intersects:function(g){var e=false;if(g.CLASS_NAME=="OpenLayers.Geometry.Point"){e=this.containsPoint(g)}else{if(g.CLASS_NAME=="OpenLayers.Geometry.LineString"){e=g.intersects(this)}else{if(g.CLASS_NAME=="OpenLayers.Geometry.LinearRing"){e=OpenLayers.Geometry.LineString.prototype.intersects.apply(this,[g])}else{for(var i=0,f=g.components.length;i<f;++i){e=g.components[i].intersects(this);if(e){break}}}}}return e},getVertices:function(b){return(b===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(b){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments)},getArea:function(){var f=0;if(this.components&&(this.components.length>0)){f+=Math.abs(this.components[0].getArea());for(var d=1,e=this.components.length;d<e;d++){f-=Math.abs(this.components[d].getArea())}}return f},getGeodesicArea:function(e){var g=0;if(this.components&&(this.components.length>0)){g+=Math.abs(this.components[0].getGeodesicArea(e));for(var i=1,f=this.components.length;i<f;i++){g-=Math.abs(this.components[i].getGeodesicArea(e))}}return g},containsPoint:function(g){var i=this.components.length;var k=false;if(i>0){k=this.components[0].containsPoint(g);if(k!==1){if(k&&i>1){var j;for(var f=1;f<i;++f){j=this.components[f].containsPoint(g);if(j){if(j===1){k=1}else{k=false}break}}}}}return k},intersects:function(i){var f=false;var j,g;if(i.CLASS_NAME=="OpenLayers.Geometry.Point"){f=this.containsPoint(i)}else{if(i.CLASS_NAME=="OpenLayers.Geometry.LineString"||i.CLASS_NAME=="OpenLayers.Geometry.LinearRing"){for(j=0,g=this.components.length;j<g;++j){f=i.intersects(this.components[j]);if(f){break}}if(!f){for(j=0,g=i.components.length;j<g;++j){f=this.containsPoint(i.components[j]);if(f){break}}}}else{for(j=0,g=i.components.length;j<g;++j){f=this.intersects(i.components[j]);if(f){break}}}}if(!f&&i.CLASS_NAME=="OpenLayers.Geometry.Polygon"){var k=this.components[0];for(j=0,g=k.components.length;j<g;++j){f=i.containsPoint(k.components[j]);if(f){break}}}return f},distanceTo:function(g,e){var i=!(e&&e.edge===false);var f;if(!i&&this.intersects(g)){f=0}else{f=OpenLayers.Geometry.Collection.prototype.distanceTo.apply(this,[g,e])}return f},CLASS_NAME:"OpenLayers.Geometry.Polygon"});OpenLayers.Geometry.Polygon.createRegularPolygon=function(o,s,z,i){var w=Math.PI*((1/z)-(1/2));if(i){w+=(i/180)*Math.PI}var A,q,r;var n=[];for(var u=0;u<z;++u){A=w+(u*2*Math.PI/z);q=o.x+(s*Math.cos(A));r=o.y+(s*Math.sin(A));n.push(new OpenLayers.Geometry.Point(q,r))}var v=new OpenLayers.Geometry.LinearRing(n);return new OpenLayers.Geometry.Polygon([v])};NSZemljevid=OpenLayers.Class({tileBuffer:null,initialize:function(i,g){OpenLayers.Util.extend(this,g);if(typeof i=="undefined"||i==null){throw"Manjka id elementa v katerega se renderira zemljevid.";return}else{if(typeof i=="string"){var e=document.getElementById(i);if(!e.style.width||!e.style.height){throw"Width in Height morata biti definirana direktno na elementu in ne v StyleSheet-u";return}}}this.map=new NSZemljevid.Map(i,{tileSize:new OpenLayers.Size(NSZemljevid.TILE_SIZE,NSZemljevid.TILE_SIZE),maxExtent:new OpenLayers.Bounds(0,0,NSZemljevid.MAX_RESOLUTION,NSZemljevid.MAX_RESOLUTION),maxResolution:NSZemljevid.MAX_RESOLUTION/NSZemljevid.TILE_SIZE,numZoomLevels:NSZemljevid.ZOOM_LEVELS,controls:[],theme:null,info:new NSZemljevid.IMapInfo()});OpenLayers.Util.extend(this.map,{topLeftCoords:function(c){var b=this.getLonLatFromViewPortPx(new OpenLayers.Pixel(0,0));if(typeof c=="undefined"||c==NSZemljevid.GK_COORD){var a=this.info.getGKFromLonLat(b);return new NSZemljevid.GK(a.x,a.y)}else{var a=this.info.getGKFromLonLat(b);var d=this.info.gk2GPS(a.y,a.x);return new NSZemljevid.LonLat(d.lon,d.lat)}return null},bottomRightCoords:function(c){var d=this.getSize();var b=this.getLonLatFromViewPortPx(new OpenLayers.Pixel(d.w,d.h));if(typeof c=="undefined"||c==NSZemljevid.GK_COORD){var a=this.info.getGKFromLonLat(b);return new NSZemljevid.GK(a.x,a.y)}else{var a=this.info.getGKFromLonLat(b);var k=this.info.gk2GPS(a.y,a.x);return new NSZemljevid.LonLat(k.lon,k.lat)}return null},getCoords:function(b,c){var a=this.info.getGKFromLonLat(this.getLonLatFromViewPortPx(b));if(typeof c=="undefined"||c==NSZemljevid.GK_COORD){return new NSZemljevid.GK(a.x,a.y)}else{var d=this.info.gk2GPS(a.y,a.x);return new NSZemljevid.LonLat(d.lon,d.lat)}return null}});this.map.defaultPopup=NSZemljevid.FramedCloud;var f=new OpenLayers.Control.Navigation();this.map.addControl(f);this.map.addControl(new NSZemljevid.Scale());this.map.addControl(new NSZemljevid.CopyRight());this.addTMSLayer();OpenLayers.Util.extend(f.dragPan.handler,{down:function(){this.map.div.style.cursor="move"},up:function(){this.map.div.style.cursor=""}});this.setZoom(NSZemljevid.INITIAL_ZOOM)},setZoom:function(b){if(this.map.isValidZoomLevel(b)){this.map.zoomTo(b)}else{throw"Zoom out of range!";return}},getZoom:function(){return this.map.zoom},setMinZoom:function(b){if(typeof b=="undefined"){return}if(b<NSZemljevid.INITIAL_ZOOM||b>NSZemljevid.ZOOM_LEVELS-1){return}this.map.minZoom=b},setMaxZoom:function(b){if(typeof b=="undefined"){return}b++;if(b<NSZemljevid.INITIAL_ZOOM||b>NSZemljevid.ZOOM_LEVELS-1){return}this.map.maxZoom=b},setCenter:function(g,e){if(g.CLASS!="NSZemljevid.LonLat"&&g.CLASS!="NSZemljevid.GK"){throw"NSZemljevid.LonLat or NSZemljevid.GK required";return}var f=NSZemljevid.INITIAL_ZOOM;if(typeof e=="undefined"){f=this.map.zoom}else{f=e}if(g.CLASS=="NSZemljevid.LonLat"){var i=this.map.info.fromWGS84ToGK(g);this.map.setCenter(this.map.info.getLonLat(i.x,i.y),f);i=null}else{this.map.setCenter(this.map.info.getLonLat(g.x,g.y),f)}},getCenter:function(f){var e=this.map.getCenter();if(typeof f=="undefined"||f==NSZemljevid.GK_COORD){return this.map.info.getGKFromLonLat(e)}else{var d=this.map.info.getGKFromLonLat(e);return this.map.info.gk2GPS(d.y,d.x)}return null},panTo:function(c){if(c.CLASS!="NSZemljevid.LonLat"&&c.CLASS!="NSZemljevid.GK"){throw"NSZemljevid.LonLat or NSZemljevid.GK required";return}if(c.CLASS=="NSZemljevid.LonLat"){var d=this.map.info.fromWGS84ToGK(c);this.map.panTo(this.map.info.getLonLat(d.x,d.y));d=null}else{this.map.panTo(this.map.info.getLonLat(c.x,c.y))}},addTMSLayer:function(){var b=new OpenLayers.Layer.TMS("TileLayer",NSZemljevid.IMGURL+"?",{getURL:this.getMyUrl,alpha:false,transitionEffect:"null",buffer:this.tileBuffer!=null?this.tileBuffer:NSZemljevid.TILE_BUFFER});this.map.addLayer(b);return b},getMyUrl:function(m){var g=this.map.getResolution();var j=Math.round((m.left-this.maxExtent.left)/(g*this.tileSize.w));var k=Math.round((this.maxExtent.top-m.top)/(g*this.tileSize.h));var i=this.map.getZoom();var l=this.url+"x="+j+"&y="+k+"&zl="+i+"&r="+NSZemljevid.REVISION;return l},addKeyboardNavigation:function(){var b=this.map.getControlsByClass("OpenLayers.Control.KeyboardDefaults");if(b.length==0){this.keyboardDef=new OpenLayers.Control.KeyboardDefaults();this.map.addControl(this.keyboardDef)}else{this.keyboardDef.activate()}},removeKeyboardNavigation:function(){if(!this.keyboardDef){return}this.keyboardDef.deactivate()},addPanZoomControl:function(d){var e=null;if(typeof d=="undefined"||d==NS_PANZOOM_TYPE1){e=this.map.getControlsByClass("NSZemljevid.PanZoomBar2");if(e.length>0){return}e=this.map.getControlsByClass("NSZemljevid.PanZoomBar3");if(e.length>0){return}var f=new NSZemljevid.PanZoomBar({zoomStopHeight:12,zoomStopWidth:49,position:new OpenLayers.Pixel(5,5)});this.map.addControl(f)}else{if(d==NS_PANZOOM_TYPE2){e=this.map.getControlsByClass("NSZemljevid.PanZoomBar");if(e.length>0){return}e=this.map.getControlsByClass("NSZemljevid.PanZoomBar3");if(e.length>0){return}var f=new NSZemljevid.PanZoomBar2({zoomStopHeight:12,zoomStopWidth:49,position:new OpenLayers.Pixel(5,5)});this.map.addControl(f)}else{if(d==NS_PANZOOM_TYPE3){e=this.map.getControlsByClass("NSZemljevid.PanZoomBar");if(e.length>0){return}e=this.map.getControlsByClass("NSZemljevid.PanZoomBar2");if(e.length>0){return}var f=new NSZemljevid.PanZoomBar3({zoomStopHeight:12,zoomStopWidth:49,position:new OpenLayers.Pixel(5,5)});this.map.addControl(f)}}}},addPanZoomControl2:function(){var d=this.map.getControlsByClass("NSZemljevid.PanZoomBar2");if(d.length==0){var c=new NSZemljevid.PanZoomBar2({zoomStopHeight:12,zoomStopWidth:49,position:new OpenLayers.Pixel(5,5)});this.map.addControl(c)}},addPanZoomControl3:function(){var d=this.map.getControlsByClass("NSZemljevid.PanZoomBar3");if(d.length==0){var c=new NSZemljevid.PanZoomBar3({zoomStopHeight:12,zoomStopWidth:49,position:new OpenLayers.Pixel(5,5)});this.map.addControl(c)}},addPanZoomControl4:function(){var d=this.map.getControlsByClass("NSZemljevid.PanZoomBar4");if(d.length==0){NSZemljevid.Instance=this;var c=new NSZemljevid.PanZoomBar4({zoomStopHeight:12,zoomStopWidth:49,position:new OpenLayers.Pixel(5,5),options:arguments[0]});this.map.addControl(c)}},removePanZoomControl:function(){var b=this.map.getControlsByClass("NSZemljevid.PanZoomBar");if(b.length!=0){this.map.removeControl(b[0])}else{b=this.map.getControlsByClass("NSZemljevid.PanZoomBar2");if(b.length!=0){this.map.removeControl(b[0])}else{b=this.map.getControlsByClass("NSZemljevid.PanZoomBar3");if(b.length!=0){this.map.removeControl(b[0])}}}},addEventListener:function(e,d,f){if(typeof f=="undefined"){this.map.events.register(e,this,d)}else{this.map.events.register(e,f,d)}},removeEventListener:function(e,d,f){if(typeof f=="undefined"){this.map.events.unregister(e,this,d)}else{this.map.events.unregister(e,f,d)}},setSize:function(f,g){try{this.map.div.style.width=parseInt(f)+"px";this.map.div.style.height=parseInt(g)+"px";this.map.updateSize();var e=this.map.getControlsByClass("NSZemljevid.PanZoomBar4")[0];if(typeof e!="undefined"){e.updateBtPos()}}catch(i){}},addMarker:function(b){if(b.isDraggable()){this.addDragM(b)}else{this.addNoDragM(b)}},_createVectorLayers:function(){OpenLayers.Layer.Vector.prototype.drawFeature=function(c,b){if(!this.drawn){return}if(typeof b!="object"){if(!b&&c.state===OpenLayers.State.DELETE){b="delete"}var a=b||c.renderIntent;b=c.style||this.style;if(!b){b=this.styleMap.createSymbolizer(c,a);for(var d in b){if(b[d]==false||b[d]=="undefined"){delete b[d]}}}}if(!this.renderer.drawFeature(c,b)){this.unrenderedFeatures[c.id]=c}else{delete this.unrenderedFeatures[c.id]}};var g=new OpenLayers.Layer.Vector("NoDraggableMarkers",{isBaseLayer:false,rendererOptions:{yOrdering:true},styleMap:this.getMarkerStyleMap()});var i=new OpenLayers.Layer.Vector("DraggableMarkers",{isBaseLayer:false,rendererOptions:{yOrdering:true},styleMap:this.getMarkerStyleMap()});this.map.addLayers([g,i]);var e=new OpenLayers.Control.DragFeature(i,{onComplete:function(k,d){if(k.isDraggable()){var b=new OpenLayers.LonLat(k.geometry.x,k.geometry.y);var a=this.map.info.getGKFromLonLat(b);if(typeof k.ll.CLASS_NAME!="undefined"&&k.ll.CLASS_NAME.match(/LonLat$/ig)){k.ll=b}else{if(k.ll.CLASS.match(/LonLat$/ig)){var c=this.map.info.gk2GPS(a.y,a.x);k.ll=new NSZemljevid.LonLat(c.lon,c.lat);c=null}else{k.ll=new NSZemljevid.GK(a.x,a.y)}}k.lonlat=b;b=a=null;if(k._dragend){if(k.context){k._dragend.apply(k.context,[k])}else{k._dragend(k)}}}},onStart:function(b,a){if(b.popup){this.map.removePopup(b.popup);b.popup.destroy();b.popup=null}if(b._dragstart){if(b.context){b._dragstart.apply(b.context,[b])}else{b._dragstart(b)}}}});this.map.addControl(e);e.activate();var f=new OpenLayers.Control.SelectFeature([g,i],{hover:true,highlightOnly:false,callbacks:{click:this.onFeatureClick}});f.handlers.feature.clickTolerance=999999;this.map.addControl(f);f.events.on({featurehighlighted:this.featureOver,featureunhighlighted:this.featureOut});f.activate()},featureOver:function(b){if(b.feature._mouseover){if(b.feature.context){b.feature._mouseover.apply(b.feature.context,[b.feature])}else{b.feature._mouseover(b.feature)}}},featureOut:function(b){if(b.feature._mouseout){if(b.feature.context){b.feature._mouseout.apply(b.feature.context,[b.feature])}else{b.feature._mouseout(b.feature)}}},onFeatureClick:function(b){if(b._click){if(b.context){b._click.apply(b.context,[b])}else{b._click(b)}}},addNoDragM:function(d){var c=this.map.getLayersByName("NoDraggableMarkers")[0];if(!c||typeof c=="undefined"){this._createVectorLayers();c=this.map.getLayersByName("NoDraggableMarkers")[0]}c.addFeatures([d])},addDragM:function(d){var c=this.map.getLayersByName("DraggableMarkers")[0];if(!c||typeof c=="undefined"){this._createVectorLayers();c=this.map.getLayersByName("DraggableMarkers")[0]}c.addFeatures([d])},getMarkerStyleMap:function(){return new OpenLayers.StyleMap({"default":{externalGraphic:"${icon}",graphicZIndex:"11",graphicYOffset:"${iconYOffset}",pointRadius:10,graphicWidth:"${iconWidth}",graphicHeight:"${iconHeight}",label:"${iconLabel}",fontFamily:"Arial",fontColor:"${fontColor}",fontSize:"11px",fontWeight:"bold",backgroundGraphic:"${backgroundGraphic}",backgroundHeight:"${backgroundHeight}",backgroundWidth:"${backgroundWidth}",backgroundYOffset:-23,backgroundXOffset:-1,backgroundGraphicZIndex:"10",labelYOffset:"${iconLabelYOffset}"},select:{externalGraphic:"${selectIcon}",graphicYOffset:"${iconYOffset}",pointRadius:10,graphicWidth:"${iconWidth}",graphicHeight:"${iconHeight}",label:"${iconLabel}",fontFamily:"Arial",fontColor:"${fontSelectColor}",fontSize:"11px",fontWeight:"bold",labelYOffset:"${iconLabelYOffset}",cursor:"${cursor}"},"delete":{display:"none"}})},addVectorMarker:function(r,l){if(typeof r=="undefined"){return}var w=null;if(r.CLASS=="NSZemljevid.GK"){w=this.map.info.getLonLat(r.x,r.y)}else{if(r.CLASS=="NSZemljevid.LonLat"){var q=this.map.info.fromWGS84ToGK(r);w=this.map.info.getLonLat(q.x,q.y)}else{return}}var s=null;if(typeof l!="undefined"){s=l}var n=this.map.getLayersByName("VectorLayer")[0];if(!n){n=new OpenLayers.Layer.Vector("VectorLayer");this.map.addLayer(n)}var v=new OpenLayers.Geometry.Point(w.lon,w.lat);var o=s!=null&&s.pointRadius?parseInt(s.pointRadius):40;var m=OpenLayers.Geometry.Polygon.createRegularPolygon(v,o,40,null);var u=new OpenLayers.Feature.Vector(m,null,s);n.addFeatures([u]);return u},removeVectorMarker:function(c){var d=this.map.getLayersByName("VectorLayer")[0];if(!d){return}if(c instanceof Array){d.destroyFeatures(c)}else{d.destroyFeatures([c])}if(d.features.length==0){this.map.removeLayer(d);d=null}},getMarkers:function(){var e=this.map.getLayersByName("DraggableMarkers")[0];var g=this.map.getLayersByName("NoDraggableMarkers")[0];var i=null;if(e){i=e.features}if(g){for(var f=0;f<g.features.length;f++){i.push(g.features[f])}}return i},removeAllMarkers:function(){var i=this.map.getLayersByName("DraggableMarkers")[0];var g=this.map.getLayersByName("NoDraggableMarkers")[0];if(i&&typeof i!="undefined"){for(var e=0,f=i.features.length;e<f;e++){this.removeMarker(i.features[e])}}if(g&&typeof g!="undefined"){for(var e=0,f=g.features.length;e<f;e++){this.removeMarker(g.features[e])}}},removeMarker:function(d){if(!d||d.CLASS!="NSZemljevid.Marker"){return}var c=null;if(d.options.draggable){c=this.map.getLayersByName("DraggableMarkers")[0]}else{c=this.map.getLayersByName("NoDraggableMarkers")[0]}if(!c){return}d.cleanUp();c.removeFeatures([d]);c=null},zoomToMarkersExtent:function(){var e=this.map.getLayersByName("DraggableMarkers")[0];var d=this.map.getLayersByName("NoDraggableMarkers")[0];var f=null;if(e){f=e.getDataExtent()}if(d){if(f){f.extend(d.getDataExtent())}else{f=d.getDataExtent()}}if(f){this.map.zoomToExtent(f)}},closePopup:function(){if(this.map.popups.length==0){return}this.map.removePopup(this.map.popups[0])},defaultPopup:function(b){if(typeof b=="undefined"||!b||b=="NSZemljevid.FramedCloud"){this.map.defaultPopup=NSZemljevid.FramedCloud}else{if(b=="NSZemljevid.FramedCloud2"){this.map.defaultPopup=NSZemljevid.FramedCloud2}else{if(b=="NSZemljevid.FramedCloud3"){this.map.defaultPopup=NSZemljevid.FramedCloud3}}}},CLASS_NAME:"NSZemljevid"});NSZemljevid.Instance=null;NSZemljevid.Map=OpenLayers.Class(OpenLayers.Map,{initialize:function(){OpenLayers.Map.prototype.initialize.apply(this,arguments)},isValidZoomLevel:function(d){var e,f=null;e=this.minZoom?this.minZoom:NSZemljevid.INITIAL_ZOOM;f=this.maxZoom?this.maxZoom:this.getNumZoomLevels();return((d!=null)&&(d>=e)&&(d<f))},getMinGeoXY:function(){return this.minGeoXY}});NSZemljevid.LonLat=OpenLayers.Class({lon:null,lat:null,initialize:function(d,c){this.lon=d;this.lat=c},CLASS:"NSZemljevid.LonLat"});NSZemljevid.GK=OpenLayers.Class({x:null,y:null,initialize:function(c,d){this.x=c;this.y=d},CLASS:"NSZemljevid.GK"});NSZemljevid.Marker=OpenLayers.Class(OpenLayers.Feature.Vector,{_mouseover:null,_mouseout:null,_click:null,_dragend:null,_dragstart:null,context:null,ll:null,lonlat:null,options:null,initialize:function(j,l){if(typeof j=="undefined"){return}this.ll=j;var m={draggable:false,dropShadow:true};if(typeof l!="undefined"){this.options=OpenLayers.Util.extend(m,l);m=null}else{this.options=m}if(typeof this.options.icon=="undefined"){this.options.icon=new NSZemljevid.Icon(NS_RED_ICON)}var k=this.getMapLonLat(j);var g={icon:this.options.icon.url,selectIcon:this.getSelectIcon(),iconYOffset:-this.options.icon.size.h,iconWidth:this.options.icon.size.w,iconHeight:this.options.icon.size.h,iconLabel:this.options.icon.index?this.options.icon.index:"",iconLabelYOffset:this.options.icon.CLASS.match(/icon2$/ig)?19:22,cursor:this.options.draggable?"move":"pointer",fontColor:this.options.icon.icontype=="black"?"#ffffff":"#000000",fontSelectColor:"#333333"};if(this.options.icon.CLASS.match(/icon$/ig)&&this.options.dropShadow){g.backgroundGraphic=OpenLayers.ImgPath+"shadow.png";g.backgroundWidth=28;g.backgroundHeight=24}var i=new OpenLayers.Geometry.Point(k.lon,k.lat);OpenLayers.Feature.Vector.prototype.initialize.apply(this,[i,g,null]);this.lonlat=k},getMapLonLat:function(g){if(typeof g.CLASS_NAME!="undeined"&&g.CLASS_NAME=="OpenLayers.LonLat"){return g}var f=null;var e=new NSZemljevid.IMapInfo();if(this.ll.CLASS=="NSZemljevid.GK"){f=e.getLonLat(this.ll.x,this.ll.y)}else{if(this.ll.CLASS=="NSZemljevid.LonLat"){var i=e.fromWGS84ToGK(this.ll);f=e.getLonLat(i.x,i.y)}}e=null;return f},getSelectIcon:function(){if(!this.options.hover||this.options.icon.CLASS.match(/icon4$/ig)){return this.options.icon.url}return OpenLayers.ImgPath+this.options.icon.iconSet.selected+".png"},isDraggable:function(){return this.options.draggable},getCoordinate:function(){if(typeof this.ll.CLASS_NAME!="undefined"&&this.ll.CLASS_NAME.match(/LonLat/ig)){var b=this.layer.map.info.getGKFromLonLat(this.ll);return this.layer.map.info.gk2GPS(b.y,b.x)}return this.ll},getIndex:function(){return this.options.icon.index},addEventListener:function(f,d,e){if(f=="mouseover"||f=="mouseout"||f=="click"||f=="dragend"||f=="dragstart"){this["_"+f]=d;if(typeof e!="undefined"){this.context=e}}},removeEventListener:function(f,d,e){this["_"+f]=null;this.context=null},openPopup:function(f,e){if(typeof f=="undefined"||f==""){return}if(this.options.icon.CLASS.match(/icon$/ig)||this.options.icon.CLASS.match(/icon2$/ig)){this.layer.map.defaultPopup=NSZemljevid.FramedCloud}else{if(this.options.icon.CLASS.match(/icon4$/ig)){this.layer.map.defaultPopup=NSZemljevid.FramedCloud2}}var d=new this.layer.map.defaultPopup("nsPopup",this.lonlat,null,f,this.options.icon,true,null,e);this.popup=d;this.layer.map.addPopup(d,true)},cleanUp:function(){this._mouseover=this._mouseout=this._click=this._dragend=this._dragstart=this.context=this.options=null},CLASS:"NSZemljevid.Marker"});NSZemljevid.FramedCloud=OpenLayers.Class(OpenLayers.Popup.Framed,{initialize:function(){this.imageSrc=OpenLayers.Util.getImagesLocation()+"cloud-popup-relative.png";OpenLayers.Popup.Framed.prototype.initialize.apply(this,arguments);this.contentDiv.className=this.contentDisplayClass;this.closeDiv.style.background="transparent url("+OpenLayers.ImgPath+"close.png) no-repeat scroll 0 0";this.closeDiv.style.cursor="pointer"},contentDisplayClass:"popupContent",autoSize:true,fixedRelativePosition:false,minSize:new OpenLayers.Size(105,10),imageSize:new OpenLayers.Size(497,529),isAlphaImage:true,panMapIfOutOfView:true,maxSize:new OpenLayers.Size(497,529),destroy:function(){OpenLayers.Popup.Framed.prototype.destroy.apply(this,arguments)},CLASS_NAME:"NSZemljevid.FramedCloud",positionBlocks:{tl:{offset:new OpenLayers.Pixel(17,10),padding:new OpenLayers.Bounds(11,63,9,7),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,60,15,0),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(15,"auto"),anchor:new OpenLayers.Bounds(null,66,0,0),position:new OpenLayers.Pixel(-482,0)},{size:new OpenLayers.Size("auto",16),anchor:new OpenLayers.Bounds(0,50,15,null),position:new OpenLayers.Pixel(0,-449)},{size:new OpenLayers.Size(15,16),anchor:new OpenLayers.Bounds(null,50,0,null),position:new OpenLayers.Pixel(-482,-449)},{size:new OpenLayers.Size(48,52),anchor:new OpenLayers.Bounds(null,5,3,null),position:new OpenLayers.Pixel(-112,-479)}]},tr:{offset:new OpenLayers.Pixel(-15,10),padding:new OpenLayers.Bounds(11,63,11,7),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,60,15,0),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(15,"auto"),anchor:new OpenLayers.Bounds(null,66,0,0),position:new OpenLayers.Pixel(-482,0)},{size:new OpenLayers.Size("auto",16),anchor:new OpenLayers.Bounds(0,50,15,null),position:new OpenLayers.Pixel(0,-449)},{size:new OpenLayers.Size(15,16),anchor:new OpenLayers.Bounds(null,50,0,null),position:new OpenLayers.Pixel(-482,-449)},{size:new OpenLayers.Size(48,52),anchor:new OpenLayers.Bounds(0,5,null,null),position:new OpenLayers.Pixel(-2,-477)}]},bl:{offset:new OpenLayers.Pixel(22,-18),padding:new OpenLayers.Bounds(11,13,11,67),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,16,16,60),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(15,"auto"),anchor:new OpenLayers.Bounds(null,16,1,60),position:new OpenLayers.Pixel(-482,0)},{size:new OpenLayers.Size("auto",16),anchor:new OpenLayers.Bounds(0,0,16,null),position:new OpenLayers.Pixel(0,-449)},{size:new OpenLayers.Size(15,16),anchor:new OpenLayers.Bounds(null,0,1,null),position:new OpenLayers.Pixel(-482,-449)},{size:new OpenLayers.Size(51,50),anchor:new OpenLayers.Bounds(null,null,0,11),position:new OpenLayers.Pixel(-177,-471)}]},br:{offset:new OpenLayers.Pixel(-15,-18),padding:new OpenLayers.Bounds(11,13,11,67),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,16,16,60),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(15,"auto"),anchor:new OpenLayers.Bounds(null,16,1,60),position:new OpenLayers.Pixel(-482,0)},{size:new OpenLayers.Size("auto",16),anchor:new OpenLayers.Bounds(0,0,16,null),position:new OpenLayers.Pixel(0,-449)},{size:new OpenLayers.Size(15,16),anchor:new OpenLayers.Bounds(null,0,1,null),position:new OpenLayers.Pixel(-482,-449)},{size:new OpenLayers.Size(51,50),anchor:new OpenLayers.Bounds(0,null,null,11),position:new OpenLayers.Pixel(-60,-471)}]}}});NSZemljevid.Scale=OpenLayers.Class(OpenLayers.Control,{iscaleImage:null,revision:"2.2",initialize:function(b){OpenLayers.Control.prototype.initialize.apply(this,[b])},CLASS_NAME:"IScale",draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.iscaleImage){this.div.style.display="block";this.div.style.position="absolute";this.iscale=document.createElement("div");this.iscale.className=this.displayClass+"bottom";this.div.style.left="5px";this.div.style.bottom="20px";this.div.appendChild(this.iscale);this.iscaleImage=document.createElement("img");this.iscale.appendChild(this.iscaleImage);this.iscaleImage.src=NSZemljevid.IMGURL+"?zl=2&r="+this.revision}this.map.events.register("moveend",this,this.update);this.update();return this.div},update:function(){var b=this.map.getResolution();if(!b){return}this.iscaleImage.src=NSZemljevid.IMGURL+"?zl="+this.map.zoom+"&r="+this.revision}});NSZemljevid.CopyRight=OpenLayers.Class(OpenLayers.Control,{CLASS_NAME:"NSZemljevid.CopyRight",initialize:function(b){OpenLayers.Control.prototype.initialize.apply(this,[b])},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);this.div.style.bottom="3px";this.div.style.left="5px";this.div.style.color="#333";this.div.style.fontFamily="Verdana";this.div.style.fontSize=".6em";this.div.style.overflow="hidden";this.div.style.height="13px";this.div.style.whiteSpace="nowrap";this.div.innerHTML="&copy; 2009 Najdi.si - podatki &copy; 2009 Monolit, &copy; 2009 GURS";return this.div}});NSZemljevid.PanZoomBar2=OpenLayers.Class(OpenLayers.Control.PanZoomBar,{CLASS_NAME:"NSZemljevid.PanZoomBar2",slideFactor:50,initialize:function(){OpenLayers.Control.PanZoom.prototype.initialize.apply(this,arguments)},buttonDown:function(b){if(!OpenLayers.Event.isLeftClick(b)){return}switch(this.action){case"panup":this.map.pan(0,-this.getSlideFactor());break;case"pandown":this.map.pan(0,this.getSlideFactor());break;case"panleft":this.map.pan(-this.getSlideFactor(),0);break;case"panright":this.map.pan(this.getSlideFactor(),0);break;case"zoomin":this.map.zoomIn();break;case"zoomout":this.map.zoomOut();break}OpenLayers.Event.stop(b)},draw:function(F){OpenLayers.Control.prototype.draw.apply(this,arguments);F=this.position.clone();var r=OpenLayers.Util.getImagesLocation();this.buttons=[];var G=new OpenLayers.Size(19,19);var C=OpenLayers.Util.createAlphaImageDiv(null,F,G,r+"nav2_03.png","absolute");this.div.appendChild(C);var w=this._addButton("panup","nav2_04.png",F.add(19,0),new OpenLayers.Size(18,19));w.style.cursor="pointer";G=new OpenLayers.Size(21,19);var D=OpenLayers.Util.createAlphaImageDiv(null,F.add(37,0),G,r+"nav2_05.png","absolute");this.div.appendChild(D);var u=this._addButton("panleft","nav2_07.png",F.add(0,19),new OpenLayers.Size(19,18));u.style.cursor="pointer";G=new OpenLayers.Size(18,18);var B=OpenLayers.Util.createAlphaImageDiv(null,F.add(19,19),G,r+"nav2_08.png","absolute");this.div.appendChild(B);var E=this._addButton("panright","nav2_09.png",F.add(37,19),new OpenLayers.Size(21,18));E.style.cursor="pointer";G=new OpenLayers.Size(19,21);var q=OpenLayers.Util.createAlphaImageDiv(null,F.add(0,37),G,r+"nav2_10.png","absolute");this.div.appendChild(q);var A=this._addButton("pandown","nav2_11.png",F.add(19,37),new OpenLayers.Size(18,21));A.style.cursor="pointer";G=new OpenLayers.Size(21,21);var s=OpenLayers.Util.createAlphaImageDiv(null,F.add(37,37),G,r+"nav2_12.png","absolute");this.div.appendChild(s);var v=this._addButton("zoomout","nav2_15.png",F.add(6,65),new OpenLayers.Size(22,24));v.style.cursor="pointer";var z=this._addButton("zoomin","nav2_16.png",F.add(28,65),new OpenLayers.Size(24,24));z.style.cursor="pointer";return this.div}});NSZemljevid.PanZoomBar3=OpenLayers.Class(OpenLayers.Control.PanZoomBar,{CLASS_NAME:"NSZemljevid.PanZoomBar3",initialize:function(){OpenLayers.Control.PanZoom.prototype.initialize.apply(this,arguments)},buttonDown:function(b){if(!OpenLayers.Event.isLeftClick(b)){return}switch(this.action){case"panup":this.map.pan(0,-this.getSlideFactor());break;case"pandown":this.map.pan(0,this.getSlideFactor());break;case"panleft":this.map.pan(-this.getSlideFactor(),0);break;case"panright":this.map.pan(this.getSlideFactor(),0);break;case"zoomin":this.map.zoomIn();break;case"zoomout":this.map.zoomOut();break}OpenLayers.Event.stop(b)},draw:function(G){OpenLayers.Control.prototype.draw.apply(this,arguments);G=this.position.clone();var r=OpenLayers.Util.getImagesLocation();this.buttons=[];OpenLayers.Event.observe(this.div,"mouseover",OpenLayers.Function.bind(this.onNavMouseOver,this));OpenLayers.Event.observe(this.div,"mouseout",OpenLayers.Function.bind(this.onNavMouseOut,this));var q=new OpenLayers.Size(21,22);var C=OpenLayers.Util.createAlphaImageDiv(null,G,q,r+"firma/nav-firma-white-ul.png","absolute");this.div.appendChild(C);var v=this._addButton("panup","firma/nav-firma-white_u.png",G.add(21,0),new OpenLayers.Size(25,22));v.style.cursor="pointer";var E=OpenLayers.Util.createAlphaImageDiv(null,G.add(46,0),new OpenLayers.Size(21,22),r+"firma/nav-firma-white_ur.png","absolute");this.div.appendChild(E);var s=this._addButton("panleft","firma/nav-firma-white_l.png",G.add(0,22),new OpenLayers.Size(21,24));s.style.cursor="pointer";var B=OpenLayers.Util.createAlphaImageDiv(null,G.add(21,22),new OpenLayers.Size(25,24),r+"firma/nav-firma-white_cent.png","absolute");this.div.appendChild(B);var F=this._addButton("panright","firma/nav-firma-white_r.png",G.add(46,22),new OpenLayers.Size(21,24));F.style.cursor="pointer";var w=OpenLayers.Util.createAlphaImageDiv(null,G.add(0,46),new OpenLayers.Size(21,21),r+"firma/nav-firma-white_bl.png","absolute");this.div.appendChild(w);var A=this._addButton("pandown","firma/nav-firma-white_d.png",G.add(21,46),new OpenLayers.Size(25,21));A.style.cursor="pointer";var D=OpenLayers.Util.createAlphaImageDiv(null,G.add(46,46),new OpenLayers.Size(21,21),r+"firma/nav-firma-white_br.png","absolute");this.div.appendChild(D);var u=this._addButton("zoomout","firma/zoomout-firma-hover.png",G.add(37,70),new OpenLayers.Size(29,29));u.style.cursor="pointer";var z=this._addButton("zoomin","firma/zoomin-firma-hover.png",G.add(3,70),new OpenLayers.Size(29,29));z.style.cursor="pointer";return this.div},onNavMouseOver:function(d){var f=OpenLayers.Event.element(d);if(!f.src){return}var e=OpenLayers.Util.getImagesLocation();if(f.id.match(/panup/ig)){f.src=e+"firma/nav-firma-black_u.png"}else{if(f.id.match(/panleft/ig)){f.src=e+"firma/nav-firma-black_l.png"}else{if(f.id.match(/panright/ig)){f.src=e+"firma/nav-firma-black_r.png"}else{if(f.id.match(/pandown/ig)){f.src=e+"firma/nav-firma-black_d.png"}else{if(f.id.match(/zoomin/ig)){f.src=e+"firma/zoomin-firma.png"}else{if(f.id.match(/zoomout/ig)){f.src=e+"firma/zoomout-firma.png"}}}}}}},onNavMouseOut:function(d){var f=OpenLayers.Event.element(d);if(!f.src){return}var e=OpenLayers.Util.getImagesLocation();if(f.id.match(/panup/ig)){f.src=e+"firma/nav-firma-white_u.png"}else{if(f.id.match(/panleft/ig)){f.src=e+"firma/nav-firma-white_l.png"}else{if(f.id.match(/panright/ig)){f.src=e+"firma/nav-firma-white_r.png"}else{if(f.id.match(/pandown/ig)){f.src=e+"firma/nav-firma-white_d.png"}else{if(f.id.match(/zoomin/ig)){f.src=e+"firma/zoomin-firma-hover.png"}else{if(f.id.match(/zoomout/ig)){f.src=e+"firma/zoomout-firma-hover.png"}}}}}}}});NSZemljevid.PanZoomBar4=OpenLayers.Class(OpenLayers.Control.PanZoomBar,{CLASS_NAME:"NSZemljevid.PanZoomBar4",_enableAutoMarker:true,marker:null,fc:null,initialize:function(){OpenLayers.Control.PanZoom.prototype.initialize.apply(this,arguments)},buttonDown:function(b){if(!OpenLayers.Event.isLeftClick(b)){return}switch(this.action){case"panup":this.map.pan(0,-this.getSlideFactor());break;case"pandown":this.map.pan(0,this.getSlideFactor());break;case"panleft":this.map.pan(-this.getSlideFactor(),0);break;case"panright":this.map.pan(this.getSlideFactor(),0);break;case"zoomin":this.map.zoomIn();break;case"zoomout":this.map.zoomOut();break}OpenLayers.Event.stop(b)},draw:function(s){OpenLayers.Control.prototype.draw.apply(this,arguments);var E=this.map.getSize();var A=Math.ceil(E.w/2);var H=Math.ceil(E.h/2);s=this.position.clone();var C=OpenLayers.Util.getImagesLocation();this.buttons=[];var D=new OpenLayers.Size(30,25);var u=A-5-Math.ceil(D.w/2);var G=this._addButton("panup","firma/black-up.png",s.add(u,0),D);G.unselectable="on";G.style.cursor="pointer";D=new OpenLayers.Size(24,30);var w=H-5-Math.ceil(D.h/2);var I=this._addButton("panleft","firma/black-left.png",s.add(0,w),D);I.unselectable="on";I.style.cursor="pointer";var K=this._addButton("panright","firma/black-right.png",s.add(u*2,w),D.clone());K.unselectable="on";K.style.cursor="pointer";D=new OpenLayers.Size(30,24);var v=this._addButton("pandown","firma/black-down.png",s.add(u,w*2),D);v.unselectable="on";v.style.cursor="pointer";var J=this._addButton("zoomin","firma/zoomin-firma.png",s.add(0,0),new OpenLayers.Size(29,29));J.unselectable="on";J.style.cursor="pointer";var F=this._addButton("zoomout","firma/zoomout-firma.png",s.add(0,35),new OpenLayers.Size(29,29));F.unselectable="on";F.style.cursor="pointer";var B=new OpenLayers.Size(32,40);var z=OpenLayers.Util.createAlphaImageDiv(null,s.add(0,35+29+10),B,C+"firma/user-marker-black.png","absolute");if(typeof this.options!="undefined"&&typeof this.options.hint!="undefined"){z.title=this.options.hint}z.style.cursor="pointer";if(NSZemljevid.Util.isChrome){z.id+=" _userMB"}z.unselectable="on";OpenLayers.Event.observe(this.div,"click",OpenLayers.Function.bind(this.onIconClick,this));this.div.appendChild(z);return this.div},updateBtPos:function(){var m=this.map.getSize();var o=Math.ceil(m.w/2);var n=Math.ceil(m.h/2);var k=o-5-15;var l=n-5-15;for(var q=0,i=this.buttons.length;q<i;q++){var r=this.buttons[q];if(r.id.match(/panup$/ig)){r.style.left=k+"px"}else{if(r.id.match(/panright/ig)){r.style.left=(k*2)+"px";r.style.top=l+"px"}else{if(r.id.match(/panleft/ig)){r.style.top=l+"px"}else{if(r.id.match(/pandown/ig)){r.style.left=k+"px";r.style.top=(l*2)+"px"}}}}}},onIconClick:function(g){var i=NSZemljevid.Util.isChrome;if(!i){OpenLayers.Event.stop(g)}if(this._enableAutoMarker){this._enableAutoMarker=false;var e=this.map.getLonLatFromViewPortPx(new OpenLayers.Pixel(40,124));this.marker=new NSZemljevid.Marker(e,{icon:new NSZemljevid.Icon4(),draggable:true});var f=undefined;if(typeof this.options.click!="undefined"&&this.options.click){this.marker.addEventListener("click",this.options.click)}if(typeof this.options.dragend!="undefined"&&this.options.dragend){this.marker.addEventListener("dragend",this.options.dragend,this.options.scope)}if(typeof this.options.dragstart!="undefined"&&this.options.dragstart){this.marker.addEventListener("dragstart",this.options.dragstart)}if(typeof this.options.mouseover!="undefined"&&this.options.mouseover){this.marker.addEventListener("mouseover",this.options.mouseover)}if(typeof this.options.mouseout!="undefined"&&this.options.mouseout){this.marker.addEventListener("mouseout",this.options.mouseout)}if(i){OpenLayers.Event.observe(this.map.div,"click",OpenLayers.Function.bind(this.onMouseClick,this));this.map.events.on({mousemove:this.onMouseMove,scope:this})}else{this.map.events.on({mousemove:this.onMouseMove,click:this.onMouseClick,scope:this})}this.map.div.style.cursor="move";NSZemljevid.Instance.addMarker(this.marker)}},onMouseMove:function(b){this.marker.move(new OpenLayers.Pixel(b.xy.x,b.xy.y-5))},onMouseClick:function(f){this.map.div.style.cursor="";var e=OpenLayers.Event.element(f);if(e.id.match(/_userMB$/ig)){return}else{if(e.parentNode.id.match(/_userMB$/ig)){return}}if(this.marker._dragend){var d=new OpenLayers.LonLat(this.marker.geometry.x,this.marker.geometry.y);this.marker.ll=this.marker.lonlat=d;if(this.marker.context){this.marker._dragend.apply(this.marker.context,[this.marker])}else{this.marker._dragend(this.marker)}}this.marker=null;this.map.events.un({mousemove:this.onMouseMove,click:this.onMouseClick,scope:this})}});NSZemljevid.PanZoomBar=OpenLayers.Class(OpenLayers.Control.PanZoomBar,{CLASS_NAME:"NSZemljevid.PanZoomBar",initialize:function(){OpenLayers.Control.PanZoom.prototype.initialize.apply(this,arguments)},buttonDown:function(b){if(!OpenLayers.Event.isLeftClick(b)){return}switch(this.action){case"panup":this.map.pan(0,-this.getSlideFactor());break;case"pandown":this.map.pan(0,this.getSlideFactor());break;case"panleft":this.map.pan(-this.getSlideFactor(),0);break;case"panright":this.map.pan(this.getSlideFactor(),0);break;case"zoomin":this.map.zoomIn();break;case"zoomout":this.map.zoomOut();break;case"zoomworld":this.map.zoomTo(NSZemljevid.INITIAL_ZOOM);this.map.zoomToMaxExtent();break}OpenLayers.Event.stop(b)},draw:function(E){OpenLayers.Control.prototype.draw.apply(this,arguments);E=this.position.clone();var s=OpenLayers.Util.getImagesLocation();this.buttons=[];var q=new OpenLayers.Size(14,13);var C=OpenLayers.Util.createAlphaImageDiv(null,E,q,s+"navpan_03.png","absolute");this.div.appendChild(C);var w=this._addButton("panup","navpan_04.png",E.add(14,0),new OpenLayers.Size(18,13));w.style.cursor="pointer";q=new OpenLayers.Size(17,13);var D=OpenLayers.Util.createAlphaImageDiv(null,E.add(14+18,0),q,s+"navpan_05.png","absolute");this.div.appendChild(D);var z=this._addButton("panleft","navpan_07.png",E.add(0,13),new OpenLayers.Size(14,19));var F=this._addButton("zoomworld","navpan_08.png",E.add(14,13),new OpenLayers.Size(18,19));var B=this._addButton("panright","navpan_09.png",E.add(14+18,13),new OpenLayers.Size(17,19));z.style.cursor="pointer";F.style.cursor="pointer";B.style.cursor="pointer";q=new OpenLayers.Size(14,16);var r=OpenLayers.Util.createAlphaImageDiv(null,E.add(0,13+19),q,s+"navpan_10.png","absolute");this.div.appendChild(r);var G=this._addButton("pandown","navpan_11.png",E.add(14,13+19),new OpenLayers.Size(18,16));G.style.cursor="pointer";q=new OpenLayers.Size(17,16);var u=OpenLayers.Util.createAlphaImageDiv(null,E.add(14+18,13+19),q,s+"navpan_12.png","absolute");this.div.appendChild(u);var A=this._addButton("zoomin","zoom-plus.png",E.add(0,13+19+16),new OpenLayers.Size(49,20));A.style.cursor="pointer";var v=this._addButton("zoomout","zoom-minus.png",E.add(0,13+19+16+20+113),new OpenLayers.Size(49,29));v.style.cursor="pointer";this._addZoomBar(E.add(0,13+19+16+20));this._addTownStreetLevels();return this.div},_addZoomBar:function(k){var o=OpenLayers.Util.getImagesLocation();var m=this.id+"_"+this.map.id;var j=this.map.getNumZoomLevels()-1-this.map.getZoom();var r=OpenLayers.Util.createDiv(m,k.add(15,j*this.zoomStopHeight),null,null,"absolute");r.style.width="27px";r.style.height="15px";r.style.cursor="pointer";var l=OpenLayers.Util.createAlphaImageDiv(null,null,new OpenLayers.Size(17,4),o+"slider.png","relative");r.appendChild(l);this.slider=r;this.sliderEvents=new OpenLayers.Events(this,r,null,true,{includeXY:true});this.sliderEvents.on({mousedown:this.zoomBarDown,mousemove:this.zoomBarDrag,mouseup:this.zoomBarUp,dblclick:this.doubleClick,click:this.doubleClick});var q=new OpenLayers.Size();q.h=113;q.w=this.zoomStopWidth;var n=null;if(OpenLayers.Util.alphaHack()){var m=this.id+"_"+this.map.id;n=OpenLayers.Util.createAlphaImageDiv(m,k,new OpenLayers.Size(q.w,this.zoomStopHeight),o+"zoombar.png","absolute",null,"crop");n.style.height=q.h+"px"}else{n=OpenLayers.Util.createDiv("OpenLayers_Control_PanZoomBar_Zoombar"+this.map.id,k,q,o+"zoombar.png")}n.style.cursor="pointer";this.zoombarDiv=n;this.divEvents=new OpenLayers.Events(this,n,null,true,{includeXY:true});this.divEvents.on({mousedown:this.divClick,mousemove:this.passEventToSlider,dblclick:this.doubleClick,click:this.doubleClick,mouseover:this.mouseOver,mouseout:this.mouseOut});this.div.appendChild(n);this.startTop=parseInt(n.style.top);this.div.appendChild(r);this.map.events.register("zoomend",this,this.moveZoomBar);k=k.add(0,this.zoomStopHeight*this.map.getNumZoomLevels());return k},mouseOver:function(){if(this._timerId){window.clearTimeout(this._timerId);this._timerId=null}else{this._streetTownDiv.style.display="block"}},mouseOut:function(b){this._timerId=window.setTimeout(OpenLayers.Function.bind(this.timeoutable,this,b),1000)},timeoutable:function(b){this._streetTownDiv.style.display="none";this._timerId=null},_addTownStreetLevels:function(){var n=OpenLayers.Util.getImagesLocation();var m=new OpenLayers.Pixel(40,79);this._streetTownDiv=OpenLayers.Util.createDiv("sliderLevels",m,null,null,"absolute");this._streetTownDiv.style.display="none";this.div.appendChild(this._streetTownDiv);var r=null;if(OpenLayers.Util.alphaHack()){r=OpenLayers.Util.createAlphaImageDiv("street",new OpenLayers.Pixel(0,0),new OpenLayers.Size(61,16),n+"arrow_tool_passive.png","absolute",null,"crop")}else{r=OpenLayers.Util.createDiv("street",new OpenLayers.Pixel(0,0),new OpenLayers.Size(61,16),n+"arrow_tool_passive.png")}r.style.cursor="pointer";this._streetTownDiv.appendChild(r);OpenLayers.Event.observe(r,"mouseover",this.levelMouseOver.bind(this));OpenLayers.Event.observe(r,"mouseout",this.levelMouseOut.bind(this));OpenLayers.Event.observe(r,"click",this.levelMouseClick.bind(this));var k=OpenLayers.Util.createDiv(null,new OpenLayers.Pixel(0,1),new OpenLayers.Size(61,16));k.style.background="none";k.style.cursor="pointer";k.style.fontFamily="Verdana";k.style.fontSize="10px";k.style.textAlign="center";r.appendChild(k);var j=document.createTextNode("ulica");k.appendChild(j);var l=r.cloneNode(false);l.id="town";l.style.top="37px";l.style.cursor="pointer";this._streetTownDiv.appendChild(l);OpenLayers.Event.observe(l,"mouseover",this.levelMouseOver.bind(this));OpenLayers.Event.observe(l,"mouseout",this.levelMouseOut.bind(this));OpenLayers.Event.observe(l,"click",this.levelMouseClick.bind(this));var o=OpenLayers.Util.createDiv(null,new OpenLayers.Pixel(0,1),new OpenLayers.Size(61,16));o.style.background="none";o.style.cursor="pointer";o.style.fontFamily="Verdana";o.style.fontSize="10px";o.style.textAlign="center";l.appendChild(o);var q=document.createTextNode("mesto");o.appendChild(q)},levelMouseOver:function(b){if(this._timerId){window.clearTimeout(this._timerId);this._timerId=null}},levelMouseOut:function(b){if(!this._timerId){this._timerId=window.setTimeout(OpenLayers.Function.bind(this.timeoutable,this,b),1000)}},levelMouseClick:function(d){var c=OpenLayers.Event.element(d);if(c.id.match(/town|street/gi)){if(c.id.match(/town/)){this.map.zoomTo(7)}else{this.map.zoomTo(10)}}else{c=c.parentNode;if(c.id.match(/town/)){this.map.zoomTo(7)}else{this.map.zoomTo(10)}}}});NSZemljevid.IMapInfo=OpenLayers.Class({initialize:function(){this.X1=375209;this.X2=624161;this.Y1=30781;this.Y2=193272;this.rows=Math.pow(2,NSZemljevid.MAX_ZOOM_LEVEL);this.gfaktor=Math.round((this.rows/2*256*NSZemljevid.MAX_GEO_ZOOM)/this.getDpm());this.sloCenter=this.getSloCenter();this.minGeoX=this.sloCenter.x-this.gfaktor;this.minGeoY=this.gfaktor+this.sloCenter.y;this.wgs84_a=6378137;this.wgs84_a2=40680631590769;this.wgs84_b=6356752.314;this.wgs84_b2=40408299981544.4;this.wgs84_e2=0.00669438006676466;this.wgs84_e2_=0.00673949681993606;this.bessel_a=6377397.155;this.bessel_a2=40671194472602.1;this.bessel_b=6356078.963;this.bessel_b2=40399739783891.2;this.bessel_e2=0.00667437217497493;this.bessel_e2_=0.00671921874158131;this.bessel_e4=0.0000445472439300796;this.bessel_e6=2.97324885358744e-7;this.bessel_e8=1.98445694176601e-9;this.dX=-409.520465;this.dY=-72.191827;this.dZ=-486.872387;this.Alfa=0.0000149625622332431;this.Beta=0.0000265141935723559;this.Gama=-0.000053428261468891;this.dm=-0.000017919456;this.M0=new Array(1,Math.sin(this.Gama),-1*Math.sin(this.Beta));this.M1=new Array(-1*Math.sin(this.Gama),1,Math.sin(this.Alfa));this.M2=new Array(Math.sin(this.Beta),-Math.sin(this.Alfa),1);this.E=4.76916455578838e-12;this.D=3.43836164444015e-9;this.C=0.00000264094456224583;this.B=0.0025239245915757;this.A=1.00503730599692;this.ab=(1*this.bessel_a+1*this.bessel_b)},getSloCenter:function(){var c=this.X1+this.getSloGeoWidth()/2;var d=this.Y1+this.getSloGeoHeight()/2;return{x:c,y:d}},getSloGeoWidth:function(){return this.X2-this.X1},getSloGeoHeight:function(){return this.Y2-this.Y1},getDpm:function(){return 72/2.54*100},getLonLat:function(g,i){var e=Math.floor(((g-this.minGeoX)*this.getDpm())/NSZemljevid.MAX_GEO_ZOOM);var f=Math.floor(((this.minGeoY-i)*this.getDpm())/NSZemljevid.MAX_GEO_ZOOM);return new OpenLayers.LonLat(e,NSZemljevid.MAX_RESOLUTION-f)},getGKFromLonLat:function(d){var e=this.minGeoX+(d.lon*NSZemljevid.MAX_GEO_ZOOM)/this.getDpm();var f=this.minGeoY-((NSZemljevid.MAX_RESOLUTION-d.lat)*NSZemljevid.MAX_GEO_ZOOM)/this.getDpm();return{x:Math.round(e),y:Math.round(f)}},zoomToZoomLevel:function(b){return Math.round(NSZemljevid.MAX_ZOOM_LEVEL-Math.log(b/NSZemljevid.MAX_GEO_ZOOM)/Math.log(2))},zoomLevelToZoom:function(b){return Math.pow(2,NSZemljevid.MAX_ZOOM_LEVEL-b)*NSZemljevid.MAX_GEO_ZOOM},getFaktor:function(c,d){if(c<=0){return 0}return(c*this.zoomLevelToZoom(d))/this.getDpm()},fromWGS84ToGK:function(au){var aO,aK,aB,aD,B,C,D,F,aw,aG,aH,aJ,an,ap,aQ,aP,aF,aT,ao,ar,aL,aS,aU,aW,aA,aC,A,av,ax,aE,at,az,aR,aV,aY,aq,aI,E,am,T,ay,aX,aM,aN;aO=au.lat;aK=au.lon;T=5;aR=0.9999;aV=-4500000;aY=1000000;aF=6377397.155;av=6356078.962818;ax=(aF*aF-av*av)/(av*av);aP=(aF*aF-av*av)/(aF*aF);aT=aP*aP;ao=aT*aP;ar=aT*aT;aL=ao*aT;aS=1+3*aP/4+45*aT/64+175*ao/256+11025*ar/16384+43659*aL/65536;aU=3*aP/4+15*aT/16+525*ao/512+2205*ar/2048+72765*aL/65536;aW=15*aT/64+105*ao/256+2205*ar/4096+10395*aL/16384;aA=35*ao/512+315*ar/2048+31185*aL/131072;aC=315*ar/16384+3465*aL/65536;A=693*aL/131072;aO=aO*Math.PI/180;aK=aK*Math.PI/180;aw=Math.sin(aO)/Math.cos(aO);aB=aF*aF/Math.sqrt(aF*aF+av*av*(aw*aw));aD=aB*Math.sin(aO)/2;B=aB*(Math.cos(aO)*Math.cos(aO))/6*(1-aw*aw+ax*Math.cos(aO)*Math.cos(aO));C=aB*Math.sin(aO)*(Math.cos(aO)*Math.cos(aO))/24*(5-aw*aw+9*ax*(Math.cos(aO)*Math.cos(aO)));D=aB*Math.sin(aO)*Math.cos(aO)*Math.cos(aO)*Math.cos(aO)*Math.cos(aO)/120*(5-18*aw*aw+(aw*aw*aw*aw)+ax*(14-72*(Math.sin(aO)*Math.sin(aO))));F=aB*Math.sin(aO)*Math.cos(aO)*Math.cos(aO)*Math.cos(aO)*Math.cos(aO)/720*(61-58*(aw*aw)+(aw*aw*aw*aw));ap=aK-T*3*Math.PI/180;aQ=aF*(1-aP)*(aS*aO-aU/2*Math.sin(2*aO)+aW/4*Math.sin(4*aO)-aA/6*Math.sin(6*aO)+aC/8*Math.sin(8*aO)-A/10*Math.sin(10*aO));aJ=1*aQ+aD*(ap*ap)+C*ap*ap*ap*ap+F*(ap*ap*ap*ap)*(ap*ap);an=aB*ap+B*(ap*ap)*ap+D*(ap*ap*ap*ap)*ap;aH=an*aR+1*aV+T*aY;aG=aJ*aR;aG-=5000000;aG+=37.510809374041855;aH+=363.9643364697695;return{x:aH,y:aG}},gk2GPS:function(f,d){h=0;d=(d-500000)/0.9999;f=(1*f+5000000)/0.9999;fi0=(2*f)/this.ab;dif=1;p1=this.bessel_a*(1-this.bessel_e2);var e=25;while(Math.abs(dif)>0&&e>0){L=p1*(this.A*fi0-this.B*Math.sin(2*fi0)+this.C*Math.sin(4*fi0)-this.D*Math.sin(6*fi0)+this.E*Math.sin(8*fi0));dif=(2*(f-L)/this.ab);fi0=fi0+dif;e--}N=this.bessel_a/(Math.sqrt(1-this.bessel_e2*Math.pow(Math.sin(fi0),2)));t=Math.tan(fi0);t2=Math.pow(t,2);t4=Math.pow(t2,2);cosFi=Math.cos(fi0);ni2=this.bessel_e2_*Math.pow(cosFi,2);lambda=0.261799387799149+(d/(N*cosFi))-(((1+2*t2+ni2)*Math.pow(d,3))/(6*Math.pow(N,3)*cosFi))+(((5+28*t2+24*t4)*Math.pow(d,5))/(120*Math.pow(N,5)*cosFi));fi=fi0-((t*(1+ni2)*Math.pow(d,2))/(2*Math.pow(N,2)))+(t*(5+3*t2+6*ni2-6*ni2*t2)*Math.pow(d,4))/(24*Math.pow(N,4))-(t*(61+90*t2+45*t4)*Math.pow(d,6))/(720*Math.pow(N,6));N=this.bessel_a/(Math.sqrt(1-this.bessel_e2*Math.pow(Math.sin(fi),2)));X=(N+h)*Math.cos(fi)*Math.cos(lambda);Y=(N+h)*Math.cos(fi)*Math.sin(lambda);Z=((this.bessel_b2/this.bessel_a2)*N+h)*Math.sin(fi);X-=this.dX;Y-=this.dY;Z-=this.dZ;X/=(1+this.dm);Y/=(1+this.dm);Z/=(1+this.dm);X1=X-this.M0[1]*Y-this.M0[2]*Z;Y1=-1*this.M1[0]*X+Y-this.M1[2]*Z;Z1=-1*this.M2[0]*X-this.M2[1]*Y+Z;p=Math.sqrt(Math.pow(X1,2)+Math.pow(Y1,2));O=Math.atan2(Z1*this.wgs84_a,p*this.wgs84_b);SinO=Math.sin(O);Sin3O=Math.pow(SinO,3);CosO=Math.cos(O);Cos3O=Math.pow(CosO,3);fif=Math.atan2(Z1+this.wgs84_e2_*this.wgs84_b*Sin3O,p-this.wgs84_e2*this.wgs84_a*Cos3O);lambdaf=Math.atan2(Y1,X1);N=this.wgs84_a/Math.sqrt(1-this.wgs84_e2*Math.pow(Math.sin(fif),2));hf=p/Math.cos(fif)-N;fif=(fif*180)/Math.PI;lambdaf=(lambdaf*180)/Math.PI;return{lat:fif,lon:lambdaf}},deg2DMS:function(f){var e=Math.floor(f);f=(f-e)*60;var d=Math.floor(f);S=Math.round((f-d)*6000);S/=100;S=S.toFixed(2);if(d<10){if(S<10){S="0"+S}return e+"&#186; 0"+d+"' "+S+"''"}else{if(S<10){S="0"+S}return e+"&#186; "+d+"' "+S+"''"}}});NSZemljevid.Icon=OpenLayers.Class(OpenLayers.Icon,{index:null,divE:null,icontype:null,iconSet:null,initialize:function(){this.iconSet=NSZemljevid.IconSet;var c=new OpenLayers.Size(26,31);var d=new OpenLayers.Pixel(-c.w/2,-c.h);if(arguments.length==1){this.icontype=arguments[0];OpenLayers.Icon.prototype.initialize.apply(this,[OpenLayers.ImgPath+this.iconSet[this.icontype]+".png",c,d,null])}else{if(arguments.length==2){this.icontype=arguments[0]?arguments[0]:NS_RED_ICON;this.index=arguments[1];OpenLayers.Icon.prototype.initialize.apply(this,[OpenLayers.ImgPath+this.iconSet[this.icontype]+".png",c,d,null])}else{if(arguments.length==0){this.icontype=NS_RED_ICON;OpenLayers.Icon.prototype.initialize.apply(this,[OpenLayers.ImgPath+this.iconSet[this.icontype]+".png",c,d,null])}}}},draw:function(){},CLASS:"NSZemljevid.Icon"});NSZemljevid.Icon2=OpenLayers.Class(OpenLayers.Icon,{index:null,divE:null,icontype:null,iconSet:null,initialize:function(){this.iconSet=NSZemljevid.IconSet2;var c=new OpenLayers.Size(21,28);var d=new OpenLayers.Pixel(-c.w/2,-c.h+3);if(arguments.length==1){this.icontype=arguments[0];OpenLayers.Icon.prototype.initialize.apply(this,[OpenLayers.ImgPath+this.iconSet[this.icontype]+".png",c,d,null])}else{if(arguments.length==2){this.icontype=arguments[0]?arguments[0]:NS_RED_ICON;this.index=arguments[1];OpenLayers.Icon.prototype.initialize.apply(this,[OpenLayers.ImgPath+this.iconSet[this.icontype]+".png",c,d,null])}else{if(arguments.length==0){this.icontype=NS_RED_ICON;OpenLayers.Icon.prototype.initialize.apply(this,[OpenLayers.ImgPath+this.iconSet[this.icontype]+".png",c,d,null])}}}},draw:function(){},CLASS:"NSZemljevid.Icon2"});NSZemljevid.Icon3=OpenLayers.Class(OpenLayers.Icon,{index:null,divE:null,icontype:null,iconSet:null,initialize:function(){this.iconSet={black:"firma/pin-firma-nonum",selected:"firma/pin-firma-nonum-hover"};var c=new OpenLayers.Size(33,39);var d=new OpenLayers.Pixel(-c.w/2,-c.h+2);if(arguments.length==1){this.iconSet={black:"firma/pin-firma",selected:"firma/pin-firma-hover"};this.icontype="black";this.index=arguments[0];OpenLayers.Icon.prototype.initialize.apply(this,[OpenLayers.ImgPath+this.iconSet[this.icontype]+".png",c,d,null])}else{if(arguments.length==0||arguments.length>1){this.icontype="black";OpenLayers.Icon.prototype.initialize.apply(this,[OpenLayers.ImgPath+this.iconSet[this.icontype]+".png",c,d,null])}}},draw:function(){},CLASS:"NSZemljevid.Icon3"});NSZemljevid.Icon4=OpenLayers.Class(OpenLayers.Icon,{icontype:0,initialize:function(){var c=new OpenLayers.Size(32,40);var d=new OpenLayers.Pixel(-c.w/2,-c.h+2);if(arguments.length!=0&&arguments[0]==1){this.icontype=1}if(this.icontype==0){OpenLayers.Icon.prototype.initialize.apply(this,[OpenLayers.ImgPath+"firma/user-marker-black.png",c,d,null])}else{if(this.icontype==1){OpenLayers.Icon.prototype.initialize.apply(this,[OpenLayers.ImgPath+"firma/user-marker-white.png",c,d,null])}}},draw:function(){},CLASS:"NSZemljevid.Icon4"});NSZemljevid.Icon4.BLACK=0;NSZemljevid.Icon4.WHITE=1;NSZemljevid.FramedCloud2=OpenLayers.Class(OpenLayers.Popup.Framed,{initialize:function(){this.imageSrc=OpenLayers.Util.getImagesLocation()+"firma-popup2.png";if(typeof arguments[7]!="undefined"&&arguments[7] instanceof Object){var b=arguments[7];if(typeof b.position!="undefined"&&b.position){this.fixedRelativePosition=true;switch(b.position){case"l":this.relativePosition="bl";this.positionBlocks=this._positionBlocks_fixed;break;case"r":this.relativePosition="br";this.positionBlocks=this._positionBlocks_fixed;break;case"tl":this.relativePosition="tl";this.positionBlocks=this._positionBlocks_def;break;case"tr":this.relativePosition="tr";this.positionBlocks=this._positionBlocks_def;break;case"bl":this.relativePosition="bl";this.positionBlocks=this._positionBlocks_def;break;case"br":this.relativePosition="br";this.positionBlocks=this._positionBlocks_def;break}}}if(!this.positionBlocks){this.positionBlocks=this._positionBlocks_def}OpenLayers.Popup.Framed.prototype.initialize.apply(this,arguments);this.contentDiv.className=this.contentDisplayClass;this.closeDiv.style.background="transparent url("+OpenLayers.ImgPath+"close-firma.png) no-repeat scroll 0 0";this.closeDiv.style.width="13px";this.closeDiv.style.height="13px";this.closeDiv.style.cursor="pointer"},contentDisplayClass:"popupContent",autoSize:true,fixedRelativePosition:false,minSize:new OpenLayers.Size(100,10),imageSize:new OpenLayers.Size(462,441),isAlphaImage:true,panMapIfOutOfView:true,maxSize:new OpenLayers.Size(462,441),destroy:function(){OpenLayers.Popup.Framed.prototype.destroy.apply(this,arguments)},CLASS_NAME:"NSZemljevid.FramedCloud2",_positionBlocks_fixed:{bl:{offset:new OpenLayers.Pixel(0,-35),padding:new OpenLayers.Bounds(8,11,10,7),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,11,10,0),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(7,"auto"),anchor:new OpenLayers.Bounds(null,11,3,0),position:new OpenLayers.Pixel(-455,0)},{size:new OpenLayers.Size("auto",7),anchor:new OpenLayers.Bounds(0,4,10,null),position:new OpenLayers.Pixel(0,-415)},{size:new OpenLayers.Size(7,7),anchor:new OpenLayers.Bounds(null,4,3,null),position:new OpenLayers.Pixel(-455,-415)},{size:new OpenLayers.Size(12,19),anchor:new OpenLayers.Bounds(null,null,0,7),position:new OpenLayers.Pixel(-91,-422)}]},br:{offset:new OpenLayers.Pixel(5,-35),padding:new OpenLayers.Bounds(15,11,10,7),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(3,11,10,0),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(7,"auto"),anchor:new OpenLayers.Bounds(null,11,3,0),position:new OpenLayers.Pixel(-455,0)},{size:new OpenLayers.Size("auto",7),anchor:new OpenLayers.Bounds(3,4,10,null),position:new OpenLayers.Pixel(0,-415)},{size:new OpenLayers.Size(7,7),anchor:new OpenLayers.Bounds(null,4,3,null),position:new OpenLayers.Pixel(-455,-415)},{size:new OpenLayers.Size(12,19),anchor:new OpenLayers.Bounds(0,null,null,7),position:new OpenLayers.Pixel(-80,-422)}]}},_positionBlocks_def:{tl:{offset:new OpenLayers.Pixel(38,0),padding:new OpenLayers.Bounds(8,11,7,7),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,11,7,0),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(7,"auto"),anchor:new OpenLayers.Bounds(null,11,0,0),position:new OpenLayers.Pixel(-455,0)},{size:new OpenLayers.Size("auto",7),anchor:new OpenLayers.Bounds(0,4,7,null),position:new OpenLayers.Pixel(0,-415)},{size:new OpenLayers.Size(7,7),anchor:new OpenLayers.Bounds(null,4,0,null),position:new OpenLayers.Pixel(-455,-415)},{size:new OpenLayers.Size(24,12),anchor:new OpenLayers.Bounds(null,-2,10,null),position:new OpenLayers.Pixel(-17,-430)}]},tr:{offset:new OpenLayers.Pixel(-37,0),padding:new OpenLayers.Bounds(8,11,7,7),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,11,7,0),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(7,"auto"),anchor:new OpenLayers.Bounds(null,11,0,0),position:new OpenLayers.Pixel(-455,0)},{size:new OpenLayers.Size("auto",7),anchor:new OpenLayers.Bounds(0,4,7,null),position:new OpenLayers.Pixel(0,-415)},{size:new OpenLayers.Size(7,7),anchor:new OpenLayers.Bounds(null,4,0,null),position:new OpenLayers.Pixel(-455,-415)},{size:new OpenLayers.Size(24,12),anchor:new OpenLayers.Bounds(10,-2,null,null),position:new OpenLayers.Pixel(-17,-430)}]},bl:{offset:new OpenLayers.Pixel(37,0),padding:new OpenLayers.Bounds(8,11,7,11),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,11,7,0),position:new OpenLayers.Pixel(0,4)},{size:new OpenLayers.Size(7,"auto"),anchor:new OpenLayers.Bounds(null,11,0,4),position:new OpenLayers.Pixel(-455,0)},{size:new OpenLayers.Size("auto",7),anchor:new OpenLayers.Bounds(0,4,7,null),position:new OpenLayers.Pixel(0,-415)},{size:new OpenLayers.Size(7,7),anchor:new OpenLayers.Bounds(null,4,0,null),position:new OpenLayers.Pixel(-455,-415)},{size:new OpenLayers.Size(24,12),anchor:new OpenLayers.Bounds(null,null,10,0),position:new OpenLayers.Pixel(-48,-430)}]},br:{offset:new OpenLayers.Pixel(-39,0),padding:new OpenLayers.Bounds(8,11,7,11),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,11,7,0),position:new OpenLayers.Pixel(0,4)},{size:new OpenLayers.Size(7,"auto"),anchor:new OpenLayers.Bounds(null,11,0,4),position:new OpenLayers.Pixel(-455,0)},{size:new OpenLayers.Size("auto",7),anchor:new OpenLayers.Bounds(0,4,7,null),position:new OpenLayers.Pixel(0,-415)},{size:new OpenLayers.Size(7,7),anchor:new OpenLayers.Bounds(null,4,0,null),position:new OpenLayers.Pixel(-455,-415)},{size:new OpenLayers.Size(24,12),anchor:new OpenLayers.Bounds(10,null,null,0),position:new OpenLayers.Pixel(-48,-430)}]}}});NSZemljevid.Util={isIE6:navigator.userAgent.search(/MSIE 6.0/i)>=0,isIE:!!(window.attachEvent&&navigator.userAgent.indexOf("Opera")===-1),isOpera:navigator.userAgent.indexOf("Opera")>-1,isChrome:navigator.userAgent.match(/Chrome/ig)};NSZemljevid.IconSet={red:"msmall",blue:"mblue-small",green:"morange-small",purple:"pois",blued:"blued",selected:"selected"};NSZemljevid.IconSet2={red:"icon_red",blue:"icon_blue",green:"icon_green",purple:"icon_purple",white:"icon_white",selected:"icon_selected"};OpenLayers.ImgPath="http://www.najdi.si/api/images/";NSZemljevid.IMGURL="http://zemljevid.najdi.si/servlet/ServletRedirectTileImage";NS_RED_ICON="red";NS_BLUE_ICON="blue";NS_GREEN_ICON="green";NS_PURPLE_ICON="purple";NS_BLUE_LIGHT_ICON="blued";NS_WHITE_ICON="white";NS_PANZOOM_TYPE1=1;NS_PANZOOM_TYPE2=2;NS_PANZOOM_TYPE3=3;NSZemljevid.INITIAL_ZOOM=2;NSZemljevid.MAX_ZOOM_LEVEL=11;NSZemljevid.TILE_SIZE=256;NSZemljevid.ZOOM_LEVELS=12;NSZemljevid.MAX_GEO_ZOOM=2343;NSZemljevid.REVISION=5;NSZemljevid.GK_COORD=1;NSZemljevid.LONLAT_COORD=2;NSZemljevid.TILE_BUFFER=1;NSZemljevid.MAX_RESOLUTION=Math.pow(2,NSZemljevid.ZOOM_LEVELS-1)*NSZemljevid.TILE_SIZE;
