var OpenLayers={singleFile:true};(function(){var g=(typeof OpenLayers=="object"&&OpenLayers.singleFile);window.OpenLayers={_scriptName:(!g)?"lib/OpenLayers.js":"ol-min.js",_getScriptLocation:function(){var p="";var r=new RegExp("(^|(.*?\\/))("+OpenLayers._scriptName+")(\\?|$)");var m=document.getElementsByTagName("script");for(var o=0,h=m.length;o<h;o++){var q=m[o].getAttribute("src");if(q){var n=q.match(r);if(n){p=n[1];break}}}return p}};if(!g){var j=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 b=navigator.userAgent;var d=(b.match("MSIE")||b.match("Safari"));if(d){var a=new Array(j.length)}var k=OpenLayers._getScriptLocation()+"lib/";for(var c=0,f=j.length;c<f;c++){if(d){a[c]="<script src='"+k+j[c]+"'><\/script>"}else{var l=document.createElement("script");l.src=k+j[c];var e=document.getElementsByTagName("head").length?document.getElementsByTagName("head")[0]:document.body;e.appendChild(l)}}if(d){document.write(a.join(""))}}})();OpenLayers.VERSION_NUMBER="OpenLayers 2.8 -- $Revision: 9492 $";OpenLayers.String={startsWith:function(b,a){return(b.indexOf(a)==0)},contains:function(b,a){return(b.indexOf(a)!=-1)},trim:function(a){return a.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},camelize:function(f){var d=f.split("-");var b=d[0];for(var c=1,a=d.length;c<a;c++){var e=d[c];b+=e.charAt(0).toUpperCase()+e.substring(1)}return b},format:function(d,c,a){if(!c){c=window}var b=function(j,e){var h;var g=e.split(/\.+/);for(var f=0;f<g.length;f++){if(f==0){h=c}h=h[g[f]]}if(typeof h=="function"){h=a?h.apply(null,a):h()}if(typeof h=="undefined"){return"undefined"}else{return h}};return d.replace(OpenLayers.String.tokenRegEx,b)},tokenRegEx:/\$\{([\w.]+?)\}/g,numberRegEx:/^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/,isNumeric:function(a){return OpenLayers.String.numberRegEx.test(a)},numericIf:function(a){return OpenLayers.String.isNumeric(a)?parseFloat(a):a}};if(!String.prototype.startsWith){String.prototype.startsWith=function(a){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.String.startsWith"}));return OpenLayers.String.startsWith(this,a)}}if(!String.prototype.contains){String.prototype.contains=function(a){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.String.contains"}));return OpenLayers.String.contains(this,a)}}if(!String.prototype.trim){String.prototype.trim=function(){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.String.trim"}));return OpenLayers.String.trim(this)}}if(!String.prototype.camelize){String.prototype.camelize=function(){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.String.camelize"}));return OpenLayers.String.camelize(this)}}OpenLayers.Number={decimalSeparator:".",thousandsSeparator:",",limitSigDigs:function(a,c){var b=0;if(c>0){b=parseFloat(a.toPrecision(c))}return b},format:function(c,a,g,i){a=(typeof a!="undefined")?a:0;g=(typeof g!="undefined")?g:OpenLayers.Number.thousandsSeparator;i=(typeof i!="undefined")?i:OpenLayers.Number.decimalSeparator;if(a!=null){c=parseFloat(c.toFixed(a))}var b=c.toString().split(".");if(b.length==1&&a==null){a=0}var d=b[0];if(g){var e=/(-?[0-9]+)([0-9]{3})/;while(e.test(d)){d=d.replace(e,"$1"+g+"$2")}}var f;if(a==0){f=d}else{var h=b.length>1?b[1]:"0";if(a!=null){h=h+new Array(a-h.length+1).join("0")}f=d+i+h}return f}};if(!Number.prototype.limitSigDigs){Number.prototype.limitSigDigs=function(a){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.Number.limitSigDigs"}));return OpenLayers.Number.limitSigDigs(this,a)}}OpenLayers.Function={bind:function(c,b){var a=Array.prototype.slice.apply(arguments,[2]);return function(){var d=a.concat(Array.prototype.slice.apply(arguments,[0]));return c.apply(b,d)}},bindAsEventListener:function(b,a){return function(c){return b.call(a,c||window.event)}}};if(!Function.prototype.bind){Function.prototype.bind=function(){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.Function.bind"}));Array.prototype.unshift.apply(arguments,[this]);return OpenLayers.Function.bind.apply(null,arguments)}}if(!Function.prototype.bindAsEventListener){Function.prototype.bindAsEventListener=function(a){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.Function.bindAsEventListener"}));return OpenLayers.Function.bindAsEventListener(this,a)}}OpenLayers.Array={filter:function(g,f,b){var d=[];if(Array.prototype.filter){d=g.filter(f,b)}else{var a=g.length;if(typeof f!="function"){throw new TypeError()}for(var c=0;c<a;c++){if(c in g){var e=g[c];if(f.call(b,e,c,g)){d.push(e)}}}}return d}};OpenLayers.Class=function(){var d=function(){if(arguments&&arguments[0]!=OpenLayers.Class.isPrototype){this.initialize.apply(this,arguments)}};var c={};var f,b;for(var e=0,a=arguments.length;e<a;++e){if(typeof arguments[e]=="function"){if(e==0&&a>1){b=arguments[e].prototype.initialize;arguments[e].prototype.initialize=function(){};c=new arguments[e];if(b===undefined){delete arguments[e].prototype.initialize}else{arguments[e].prototype.initialize=b}}f=arguments[e].prototype}else{f=arguments[e]}OpenLayers.Util.extend(c,f)}d.prototype=c;return d};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 d=arguments[0];var e=new d(OpenLayers.Class.isPrototype);for(var c=1,a=arguments.length;c<a;c++){if(typeof arguments[c]=="function"){var b=arguments[c];arguments[c]=new b(OpenLayers.Class.isPrototype)}OpenLayers.Util.extend(e,arguments[c])}return e};OpenLayers.Util={};OpenLayers.Util.getElement=function(){var d=[];for(var c=0,a=arguments.length;c<a;c++){var b=arguments[c];if(typeof b=="string"){b=document.getElementById(b)}if(arguments.length==1){return b}d.push(b)}return d};if(typeof window.$==="undefined"){window.$=OpenLayers.Util.getElement}OpenLayers.Util.extend=function(a,e){a=a||{};if(e){for(var d in e){var c=e[d];if(c!==undefined){a[d]=c}}var b=typeof window.Event=="function"&&e instanceof window.Event;if(!b&&e.hasOwnProperty&&e.hasOwnProperty("toString")){a.toString=e.toString}}return a};OpenLayers.Util.removeItem=function(c,b){for(var a=c.length-1;a>=0;a--){if(c[a]==b){c.splice(a,1)}}return c};OpenLayers.Util.clearArray=function(a){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"array = []"}));a.length=0};OpenLayers.Util.indexOf=function(d,c){for(var b=0,a=d.length;b<a;b++){if(d[b]==c){return b}}return -1};OpenLayers.Util.modifyDOMElement=function(e,h,d,f,a,c,g,b){if(h){e.id=h}if(d){e.style.left=d.x+"px";e.style.top=d.y+"px"}if(f){e.style.width=f.w+"px";e.style.height=f.h+"px"}if(a){e.style.position=a}if(c){e.style.border=c}if(g){e.style.overflow=g}if(parseFloat(b)>=0&&parseFloat(b)<1){e.style.filter="alpha(opacity="+(b*100)+")";e.style.opacity=b}else{if(parseFloat(b)==1){e.style.filter="";e.style.opacity=""}}};OpenLayers.Util.createDiv=function(a,i,h,f,e,c,b,g){var d=document.createElement("div");if(f){d.style.backgroundImage="url("+f+")"}if(!a){a=OpenLayers.Util.createUniqueID("OpenLayersDiv")}if(!e){e="absolute"}OpenLayers.Util.modifyDOMElement(d,a,i,h,e,c,b,g);return d};OpenLayers.Util.createImage=function(a,h,g,e,d,c,f,i){var b=document.createElement("img");if(!a){a=OpenLayers.Util.createUniqueID("OpenLayersDiv")}if(!d){d="relative"}OpenLayers.Util.modifyDOMElement(b,a,h,g,d,c,null,f);if(i){b.style.display="none";OpenLayers.Event.observe(b,"load",OpenLayers.Function.bind(OpenLayers.Util.onImageLoad,b));OpenLayers.Event.observe(b,"error",OpenLayers.Function.bind(OpenLayers.Util.onImageLoadError,b))}b.style.alt=a;b.galleryImg="no";if(e){b.src=e}return b};OpenLayers.Util.setOpacity=function(b,a){OpenLayers.Util.modifyDOMElement(b,null,null,null,null,null,null,a)};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 d=this.urls;if(d&&d instanceof Array&&d.length>1){var e=this.src.toString();var c,a;for(a=0;c=d[a];a++){if(e.indexOf(c)!=-1){break}}var f=Math.floor(d.length*Math.random());var b=d[f];a=0;while(b==c&&a++<4){f=Math.floor(d.length*Math.random());b=d[f]}this.src=e.replace(c,b)}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 d=navigator.appVersion.split("MSIE");var a=parseFloat(d[1]);var b=false;try{b=!!(document.body.filters)}catch(c){}OpenLayers.Util.alphaHackNeeded=(b&&(a>=5.5)&&(a<7))}return OpenLayers.Util.alphaHackNeeded};OpenLayers.Util.modifyAlphaImageDiv=function(a,b,j,i,g,f,c,d,h){OpenLayers.Util.modifyDOMElement(a,b,j,i,f,null,null,h);var e=a.childNodes[0];if(g){e.src=g}OpenLayers.Util.modifyDOMElement(e,a.id+"_innerImage",null,i,"relative",c);if(OpenLayers.Util.alphaHack()){if(a.style.display!="none"){a.style.display="inline-block"}if(d==null){d="scale"}a.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+e.src+"', sizingMethod='"+d+"')";if(parseFloat(a.style.opacity)>=0&&parseFloat(a.style.opacity)<1){a.style.filter+=" alpha(opacity="+a.style.opacity*100+")"}e.style.filter="alpha(opacity=0)"}};OpenLayers.Util.createAlphaImageDiv=function(b,j,i,g,f,c,d,h,k){var a=OpenLayers.Util.createDiv();var e=OpenLayers.Util.createImage(null,null,null,null,null,null,null,false);a.appendChild(e);if(k){e.style.display="none";OpenLayers.Event.observe(e,"load",OpenLayers.Function.bind(OpenLayers.Util.onImageLoad,a));OpenLayers.Event.observe(e,"error",OpenLayers.Function.bind(OpenLayers.Util.onImageLoadError,a))}OpenLayers.Util.modifyAlphaImageDiv(a,b,j,i,g,f,c,d,h);return a};OpenLayers.Util.upperCaseObject=function(b){var a={};for(var c in b){a[c.toUpperCase()]=b[c]}return a};OpenLayers.Util.applyDefaults=function(d,c){d=d||{};var b=typeof window.Event=="function"&&c instanceof window.Event;for(var a in c){if(d[a]===undefined||(!b&&c.hasOwnProperty&&c.hasOwnProperty(a)&&!d.hasOwnProperty(a))){d[a]=c[a]}}if(!b&&c&&c.hasOwnProperty&&c.hasOwnProperty("toString")&&!d.hasOwnProperty("toString")){d.toString=c.toString}return d};OpenLayers.Util.getParameterString=function(h){var g=[];for(var c in h){var e=h[c];if((e!=null)&&(typeof e!="function")){var b;if(typeof e=="object"&&e.constructor==Array){var f=[];for(var d=0,a=e.length;d<a;d++){f.push(encodeURIComponent(e[d]))}b=f.join(",")}else{b=encodeURIComponent(e)}g.push(encodeURIComponent(c)+"="+b)}}return g.join("&")};OpenLayers.ImgPath="";OpenLayers.Util.getImagesLocation=function(){return OpenLayers.ImgPath||(OpenLayers._getScriptLocation()+"img/")};OpenLayers.Util.Try=function(){var d=null;for(var c=0,a=arguments.length;c<a;c++){var b=arguments[c];try{d=b();break}catch(f){}}return d};OpenLayers.Util.getNodes=function(c,b){var a=OpenLayers.Util.Try(function(){return OpenLayers.Util._getNodes(c.documentElement.childNodes,b)},function(){return OpenLayers.Util._getNodes(c.childNodes,b)});return a};OpenLayers.Util._getNodes=function(c,e){var b=[];for(var d=0,a=c.length;d<a;d++){if(c[d].nodeName==e){b.push(c[d])}}return b};OpenLayers.Util.getTagText=function(c,d,b){var a=OpenLayers.Util.getNodes(c,d);if(a&&(a.length>0)){if(!b){b=0}if(a[b].childNodes.length>1){return a.childNodes[1].nodeValue}else{if(a[b].childNodes.length==1){return a[b].firstChild.nodeValue}}}else{return""}};OpenLayers.Util.getXmlNodeValue=function(a){var b=null;OpenLayers.Util.Try(function(){b=a.text;if(!b){b=a.textContent}if(!b){b=a.firstChild.nodeValue}},function(){b=a.textContent});return b};OpenLayers.Util.mouseLeft=function(a,c){var b=(a.relatedTarget)?a.relatedTarget:a.toElement;while(b!=c&&b!=null){b=b.parentNode}return(b!=c)};OpenLayers.Util.DEFAULT_PRECISION=14;OpenLayers.Util.toFloat=function(b,a){if(a==null){a=OpenLayers.Util.DEFAULT_PRECISION}var b;if(a==0){b=parseFloat(b)}else{b=parseFloat(parseFloat(b).toPrecision(a))}return b};OpenLayers.Util.rad=function(a){return a*Math.PI/180};OpenLayers.Util.distVincenty=function(g,c){var N=6378137,M=6356752.3142,H=1/298.257223563;var m=OpenLayers.Util.rad(c.lon-g.lon);var K=Math.atan((1-H)*Math.tan(OpenLayers.Util.rad(g.lat)));var J=Math.atan((1-H)*Math.tan(OpenLayers.Util.rad(c.lat)));var l=Math.sin(K),i=Math.cos(K);var k=Math.sin(J),h=Math.cos(J);var q=m,n=2*Math.PI;var p=20;while(Math.abs(q-n)>1e-12&&--p>0){var D=Math.sin(q),e=Math.cos(q);var O=Math.sqrt((h*D)*(h*D)+(i*k-l*h*e)*(i*k-l*h*e));if(O==0){return 0}var F=l*k+i*h*e;var z=Math.atan2(O,F);var j=Math.asin(i*h*D/O);var G=Math.cos(j)*Math.cos(j);var o=F-2*l*k/G;var u=H/16*G*(4+H*(4-3*G));n=q;q=m+(1-u)*H*Math.sin(j)*(z+u*O*(o+u*F*(-1+2*o*o)))}if(p==0){return NaN}var t=G*(N*N-M*M)/(M*M);var w=1+t/16384*(4096+t*(-768+t*(320-175*t)));var v=t/1024*(256+t*(-128+t*(74-47*t)));var E=v*O*(o+v/4*(F*(-1+2*o*o)-v/6*o*(-3+4*O*O)*(-3+4*o*o)));var r=M*w*(z-E);var I=r.toFixed(3)/1000;return I};OpenLayers.Util.getParameters=function(b){b=b||window.location.href;var a="";if(OpenLayers.String.contains(b,"?")){var c=b.indexOf("?")+1;var e=OpenLayers.String.contains(b,"#")?b.indexOf("#"):b.length;a=b.substring(c,e)}var o={};var d=a.split(/[&;]/);for(var h=0,k=d.length;h<k;++h){var g=d[h].split("=");if(g[0]){var m=decodeURIComponent(g[0]);var l=g[1]||"";l=l.split(",");for(var f=0,n=l.length;f<n;f++){l[f]=decodeURIComponent(l[f])}if(l.length==1){l=l[0]}o[m]=l}}return o};OpenLayers.Util.getArgs=function(a){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.Util.getParameters"}));return OpenLayers.Util.getParameters(a)};OpenLayers.Util.lastSeqID=0;OpenLayers.Util.createUniqueID=function(a){if(a==null){a="id_"}OpenLayers.Util.lastSeqID+=1;return a+OpenLayers.Util.lastSeqID};OpenLayers.INCHES_PER_UNIT={inches:1,ft:12,mi:63360,m:39.3701,km:39370.1,dd:4374754,yd:36};OpenLayers.INCHES_PER_UNIT["in"]=OpenLayers.INCHES_PER_UNIT.inches;OpenLayers.INCHES_PER_UNIT.degrees=OpenLayers.INCHES_PER_UNIT.dd;OpenLayers.INCHES_PER_UNIT.nmi=1852*OpenLayers.INCHES_PER_UNIT.m;OpenLayers.METERS_PER_INCH=0.0254000508001016;OpenLayers.Util.extend(OpenLayers.INCHES_PER_UNIT,{Inch:OpenLayers.INCHES_PER_UNIT.inches,Meter:1/OpenLayers.METERS_PER_INCH,Foot:0.3048006096012192/OpenLayers.METERS_PER_INCH,IFoot:0.3048/OpenLayers.METERS_PER_INCH,ClarkeFoot:0.3047972651151/OpenLayers.METERS_PER_INCH,SearsFoot:0.30479947153867626/OpenLayers.METERS_PER_INCH,GoldCoastFoot:0.3047997101815088/OpenLayers.METERS_PER_INCH,IInch:0.0254/OpenLayers.METERS_PER_INCH,MicroInch: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(b){var a=(b>1)?(1/b):b;return a};OpenLayers.Util.getResolutionFromScale=function(d,a){if(a==null){a="degrees"}var c=OpenLayers.Util.normalizeScale(d);var b=1/(c*OpenLayers.INCHES_PER_UNIT[a]*OpenLayers.DOTS_PER_INCH);return b};OpenLayers.Util.getScaleFromResolution=function(b,a){if(a==null){a="degrees"}var c=b*OpenLayers.INCHES_PER_UNIT[a]*OpenLayers.DOTS_PER_INCH;return c};OpenLayers.Util.safeStopPropagation=function(a){OpenLayers.Event.stop(a,true)};OpenLayers.Util.pagePosition=function(f){var a=0,d=0;var b=f;var g=f;while(b){if(b==document.body){if(OpenLayers.Element.getStyle(g,"position")=="absolute"){break}}a+=b.offsetTop||0;d+=b.offsetLeft||0;g=b;try{b=b.offsetParent}catch(c){OpenLayers.Console.error(OpenLayers.i18n("pagePositionFailed",{elemId:b.id}));break}}b=f;while(b){a-=b.scrollTop||0;d-=b.scrollLeft||0;b=b.parentNode}return[d,a]};OpenLayers.Util.isEquivalentUrl=function(f,e,c){c=c||{};OpenLayers.Util.applyDefaults(c,{ignoreCase:true,ignorePort80:true,ignoreHash:true});var b=OpenLayers.Util.createUrlObject(f,c);var a=OpenLayers.Util.createUrlObject(e,c);for(var d in b){if(d!=="args"){if(b[d]!=a[d]){return false}}}for(var d in b.args){if(b.args[d]!=a.args[d]){return false}delete a.args[d]}for(var d in a.args){return false}return true};OpenLayers.Util.createUrlObject=function(c,k){k=k||{};if(!(/^\w+:\/\//).test(c)){var g=window.location;var e=g.port?":"+g.port:"";var h=g.protocol+"//"+g.host.split(":").shift()+e;if(c.indexOf("/")===0){c=h+c}else{var f=g.pathname.split("/");f.pop();c=h+f.join("/")+"/"+c}}if(k.ignoreCase){c=c.toLowerCase()}var i=document.createElement("a");i.href=c;var d={};d.host=i.host.split(":").shift();d.protocol=i.protocol;if(k.ignorePort80){d.port=(i.port=="80"||i.port=="0")?"":i.port}else{d.port=(i.port==""||i.port=="0")?"80":i.port}d.hash=(k.ignoreHash||i.hash==="#")?"":i.hash;var b=i.search;if(!b){var j=c.indexOf("?");b=(j!=-1)?c.substr(j):""}d.args=OpenLayers.Util.getParameters(b);d.pathname=(i.pathname.charAt(0)=="/")?i.pathname:"/"+i.pathname;return d};OpenLayers.Util.removeTail=function(b){var c=null;var a=b.indexOf("?");var d=b.indexOf("#");if(a==-1){c=(d!=-1)?b.substr(0,d):b}else{c=(d!=-1)?b.substr(0,Math.min(a,d)):b.substr(0,a)}return c};OpenLayers.Util.getBrowserName=function(){var b="";var a=navigator.userAgent.toLowerCase();if(a.indexOf("opera")!=-1){b="opera"}else{if(a.indexOf("msie")!=-1){b="msie"}else{if(a.indexOf("safari")!=-1){b="safari"}else{if(a.indexOf("mozilla")!=-1){if(a.indexOf("firefox")!=-1){b="firefox"}else{b="mozilla"}}}}}return b};OpenLayers.Util.getRenderedDimensions=function(b,o,p){var k,e;var a=document.createElement("div");a.style.visibility="hidden";var n=(p&&p.containerElement)?p.containerElement:document.body;if(o){if(o.w){k=o.w;a.style.width=k+"px"}else{if(o.h){e=o.h;a.style.height=e+"px"}}}if(p&&p.displayClass){a.className=p.displayClass}var f=document.createElement("div");f.innerHTML=b;f.style.overflow="visible";if(f.childNodes){for(var d=0,c=f.childNodes.length;d<c;d++){if(!f.childNodes[d].style){continue}f.childNodes[d].style.overflow="visible"}}a.appendChild(f);n.appendChild(a);var m=false;var j=a.parentNode;while(j&&j.tagName.toLowerCase()!="body"){var g=OpenLayers.Element.getStyle(j,"position");if(g=="absolute"){m=true;break}else{if(g&&g!="static"){break}}j=j.parentNode}if(!m){a.style.position="absolute"}if(!k){k=parseInt(f.scrollWidth);a.style.width=k+"px"}if(!e){e=parseInt(f.scrollHeight)}a.removeChild(f);n.removeChild(a);return new OpenLayers.Size(k,e)};OpenLayers.Util.getScrollbarWidth=function(){var c=OpenLayers.Util._scrollbarWidth;if(c==null){var e=null;var d=null;var a=0;var b=0;e=document.createElement("div");e.style.position="absolute";e.style.top="-1000px";e.style.left="-1000px";e.style.width="100px";e.style.height="50px";e.style.overflow="hidden";d=document.createElement("div");d.style.width="100%";d.style.height="200px";e.appendChild(d);document.body.appendChild(e);a=d.offsetWidth;e.style.overflow="scroll";b=d.offsetWidth;document.body.removeChild(document.body.lastChild);OpenLayers.Util._scrollbarWidth=(a-b);c=OpenLayers.Util._scrollbarWidth}return c};OpenLayers.Rico=new Object();OpenLayers.Rico.Corner={round:function(d,b){d=OpenLayers.Util.getElement(d);this._setOptions(b);var a=this.options.color;if(this.options.color=="fromElement"){a=this._background(d)}var c=this.options.bgColor;if(this.options.bgColor=="fromParent"){c=this._background(d.offsetParent)}this._roundCornersImpl(d,a,c)},changeColor:function(c,b){c.style.backgroundColor=b;var a=c.parentNode.getElementsByTagName("span");for(var d=0;d<a.length;d++){a[d].style.backgroundColor=b}},changeOpacity:function(c,f){var d=f;var a="alpha(opacity="+f*100+")";c.style.opacity=d;c.style.filter=a;var b=c.parentNode.getElementsByTagName("span");for(var e=0;e<b.length;e++){b[e].style.opacity=d;b[e].style.filter=a}},reRound:function(d,c){var b=d.parentNode.childNodes[0];var a=d.parentNode.childNodes[2];d.parentNode.removeChild(b);d.parentNode.removeChild(a);this.round(d.parentNode,c)},_roundCornersImpl:function(c,a,b){if(this.options.border){this._renderBorder(c,b)}if(this._isTopRounded()){this._roundTopCorners(c,a,b)}if(this._isBottomRounded()){this._roundBottomCorners(c,a,b)}},_renderBorder:function(d,e){var b="1px solid "+this._borderColor(e);var a="border-left: "+b;var f="border-right: "+b;var c="style='"+a+";"+f+"'";d.innerHTML="<div "+c+">"+d.innerHTML+"</div>"},_roundTopCorners:function(c,a,e){var d=this._createCorner(e);for(var b=0;b<this.options.numSlices;b++){d.appendChild(this._createCornerSlice(a,e,b,"top"))}c.style.paddingTop=0;c.insertBefore(d,c.firstChild)},_roundBottomCorners:function(c,a,e){var d=this._createCorner(e);for(var b=(this.options.numSlices-1);b>=0;b--){d.appendChild(this._createCornerSlice(a,e,b,"bottom"))}c.style.paddingBottom=0;c.appendChild(d)},_createCorner:function(b){var a=document.createElement("div");a.style.backgroundColor=(this._isTransparent()?"transparent":b);return a},_createCornerSlice:function(c,d,g,a){var e=document.createElement("span");var b=e.style;b.backgroundColor=c;b.display="block";b.height="1px";b.overflow="hidden";b.fontSize="1px";var f=this._borderColor(c,d);if(this.options.border&&g==0){b.borderTopStyle="solid";b.borderTopWidth="1px";b.borderLeftWidth="0px";b.borderRightWidth="0px";b.borderBottomWidth="0px";b.height="0px";b.borderColor=f}else{if(f){b.borderColor=f;b.borderStyle="solid";b.borderWidth="0px 1px"}}if(!this.options.compact&&(g==(this.options.numSlices-1))){b.height="2px"}this._setMargin(e,g,a);this._setBorder(e,g,a);return e},_setOptions:function(a){this.options={corners:"all",color:"fromElement",bgColor:"fromParent",blend:true,border:false,compact:false};OpenLayers.Util.extend(this.options,a||{});this.options.numSlices=this.options.compact?2:4;if(this._isTransparent()){this.options.blend=false}},_whichSideTop:function(){if(this._hasString(this.options.corners,"all","top")){return""}if(this.options.corners.indexOf("tl")>=0&&this.options.corners.indexOf("tr")>=0){return""}if(this.options.corners.indexOf("tl")>=0){return"left"}else{if(this.options.corners.indexOf("tr")>=0){return"right"}}return""},_whichSideBottom:function(){if(this._hasString(this.options.corners,"all","bottom")){return""}if(this.options.corners.indexOf("bl")>=0&&this.options.corners.indexOf("br")>=0){return""}if(this.options.corners.indexOf("bl")>=0){return"left"}else{if(this.options.corners.indexOf("br")>=0){return"right"}}return""},_borderColor:function(a,b){if(a=="transparent"){return b}else{if(this.options.border){return this.options.border}else{if(this.options.blend){return this._blend(b,a)}else{return""}}}},_setMargin:function(d,e,b){var c=this._marginSize(e);var a=b=="top"?this._whichSideTop():this._whichSideBottom();if(a=="left"){d.style.marginLeft=c+"px";d.style.marginRight="0px"}else{if(a=="right"){d.style.marginRight=c+"px";d.style.marginLeft="0px"}else{d.style.marginLeft=c+"px";d.style.marginRight=c+"px"}}},_setBorder:function(d,e,b){var c=this._borderSize(e);var a=b=="top"?this._whichSideTop():this._whichSideBottom();if(a=="left"){d.style.borderLeftWidth=c+"px";d.style.borderRightWidth="0px"}else{if(a=="right"){d.style.borderRightWidth=c+"px";d.style.borderLeftWidth="0px"}else{d.style.borderLeftWidth=c+"px";d.style.borderRightWidth=c+"px"}}if(this.options.border!=false){d.style.borderLeftWidth=c+"px";d.style.borderRightWidth=c+"px"}},_marginSize:function(e){if(this._isTransparent()){return 0}var d=[5,3,2,1];var a=[3,2,1,0];var c=[2,1];var b=[1,0];if(this.options.compact&&this.options.blend){return b[e]}else{if(this.options.compact){return c[e]}else{if(this.options.blend){return a[e]}else{return d[e]}}}},_borderSize:function(e){var d=[5,3,2,1];var b=[2,1,1,1];var a=[1,0];var c=[0,2,0,0];if(this.options.compact&&(this.options.blend||this._isTransparent())){return 1}else{if(this.options.compact){return a[e]}else{if(this.options.blend){return b[e]}else{if(this.options.border){return c[e]}else{if(this._isTransparent()){return d[e]}}}}}return 0},_hasString:function(b){for(var a=1;a<arguments.length;a++){if(b.indexOf(arguments[a])>=0){return true}}return false},_blend:function(c,a){var b=OpenLayers.Rico.Color.createFromHex(c);b.blend(OpenLayers.Rico.Color.createFromHex(a));return b},_background:function(a){try{return OpenLayers.Rico.Color.createColorFromBackground(a).asHex()}catch(b){return"#ffffff"}},_isTransparent:function(){return this.options.color=="transparent"},_isTopRounded:function(){return this._hasString(this.options.corners,"all","top","tl","tr")},_isBottomRounded:function(){return this._hasString(this.options.corners,"all","bottom","bl","br")},_hasSingleTextChild:function(a){return a.childNodes.length==1&&a.childNodes[0].nodeType==3}};OpenLayers.Element={visible:function(a){return OpenLayers.Util.getElement(a).style.display!="none"},toggle:function(){for(var c=0,a=arguments.length;c<a;c++){var b=OpenLayers.Util.getElement(arguments[c]);var d=OpenLayers.Element.visible(b)?"hide":"show";OpenLayers.Element[d](b)}},hide:function(){for(var c=0,a=arguments.length;c<a;c++){var b=OpenLayers.Util.getElement(arguments[c]);b.style.display="none"}},show:function(){for(var c=0,a=arguments.length;c<a;c++){var b=OpenLayers.Util.getElement(arguments[c]);b.style.display=""}},remove:function(a){a=OpenLayers.Util.getElement(a);a.parentNode.removeChild(a)},getHeight:function(a){a=OpenLayers.Util.getElement(a);return a.offsetHeight},getDimensions:function(b){b=OpenLayers.Util.getElement(b);if(OpenLayers.Element.getStyle(b,"display")!="none"){return{width:b.offsetWidth,height:b.offsetHeight}}var a=b.style;var e=a.visibility;var c=a.position;a.visibility="hidden";a.position="absolute";a.display="";var f=b.clientWidth;var d=b.clientHeight;a.display="none";a.position=c;a.visibility=e;return{width:f,height:d}},hasClass:function(b,a){var c=b.className;return(!!c&&new RegExp("(^|\\s)"+a+"(\\s|$)").test(c))},addClass:function(b,a){if(!OpenLayers.Element.hasClass(b,a)){b.className+=(b.className?" ":"")+a}return b},removeClass:function(b,a){var c=b.className;if(c){b.className=OpenLayers.String.trim(c.replace(new RegExp("(^|\\s+)"+a+"(\\s+|$)")," "))}return b},toggleClass:function(b,a){if(OpenLayers.Element.hasClass(b,a)){OpenLayers.Element.removeClass(b,a)}else{OpenLayers.Element.addClass(b,a)}return b},getStyle:function(c,d){c=OpenLayers.Util.getElement(c);var e=null;if(c&&c.style){e=c.style[OpenLayers.String.camelize(d)];if(!e){if(document.defaultView&&document.defaultView.getComputedStyle){var b=document.defaultView.getComputedStyle(c,null);e=b?b.getPropertyValue(d):null}else{if(c.currentStyle){e=c.currentStyle[OpenLayers.String.camelize(d)]}}}var a=["left","top","right","bottom"];if(window.opera&&(OpenLayers.Util.indexOf(a,d)!=-1)&&(OpenLayers.Element.getStyle(c,"position")=="static")){e="auto"}}return e=="auto"?null:e}};OpenLayers.Size=OpenLayers.Class({w:0,h:0,initialize:function(a,b){this.w=parseFloat(a);this.h=parseFloat(b)},toString:function(){return("w="+this.w+",h="+this.h)},clone:function(){return new OpenLayers.Size(this.w,this.h)},equals:function(b){var a=false;if(b!=null){a=((this.w==b.w&&this.h==b.h)||(isNaN(this.w)&&isNaN(this.h)&&isNaN(b.w)&&isNaN(b.h)))}return a},CLASS_NAME:"OpenLayers.Size"});OpenLayers.Console={log:function(){},debug:function(){},info:function(){},warn:function(){},error:function(){},userError:function(a){alert(a)},assert:function(){},dir:function(){},dirxml:function(){},trace:function(){},group:function(){},groupEnd:function(){},time:function(){},timeEnd:function(){},profile:function(){},profileEnd:function(){},count:function(){},CLASS_NAME:"OpenLayers.Console"};(function(){var b=document.getElementsByTagName("script");for(var c=0,a=b.length;c<a;++c){if(b[c].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(a,b,d,c){this.url=a;this.size=(b)?b:new OpenLayers.Size(20,20);this.offset=d?d:new OpenLayers.Pixel(-(this.size.w/2),-(this.size.h/2));this.calculateOffset=c;var e=OpenLayers.Util.createUniqueID("OL_Icon_");this.imageDiv=OpenLayers.Util.createAlphaImageDiv(e)},destroy:function(){this.erase();OpenLayers.Event.stopObservingElement(this.imageDiv.firstChild);this.imageDiv.innerHTML="";this.imageDiv=null},clone:function(){return new OpenLayers.Icon(this.url,this.size,this.offset,this.calculateOffset)},setSize:function(a){if(a!=null){this.size=a}this.draw()},setUrl:function(a){if(a!=null){this.url=a}this.draw()},draw:function(a){OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv,null,null,this.size,this.url,"absolute");this.moveTo(a);return this.imageDiv},erase:function(){if(this.imageDiv!=null&&this.imageDiv.parentNode!=null){OpenLayers.Element.remove(this.imageDiv)}},setOpacity:function(a){OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv,null,null,null,null,null,null,null,a)},moveTo:function(a){if(a!=null){this.px=a}if(this.imageDiv!=null){if(this.px==null){this.display(false)}else{if(this.calculateOffset){this.offset=this.calculateOffset(this.size)}var b=this.px.offset(this.offset);OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv,null,b)}}},display:function(a){this.imageDiv.style.display=(a)?"":"none"},isDrawn:function(){var a=(this.imageDiv&&this.imageDiv.parentNode&&(this.imageDiv.parentNode.nodeType!=11));return a},CLASS_NAME:"OpenLayers.Icon"});OpenLayers.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(g,c,f,b,e,d){if(g==null){g=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")}this.id=g;this.lonlat=c;this.contentSize=(f!=null)?f:new OpenLayers.Size(OpenLayers.Popup.WIDTH,OpenLayers.Popup.HEIGHT);if(b!=null){this.contentHTML=b}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 a=this.id+"_GroupDiv";this.groupDiv=OpenLayers.Util.createDiv(a,null,null,null,"relative",null,"hidden");var g=this.div.id+"_contentDiv";this.contentDiv=OpenLayers.Util.createDiv(g,null,this.contentSize.clone(),null,"relative");this.contentDiv.className=this.contentDisplayClass;this.groupDiv.appendChild(this.contentDiv);this.div.appendChild(this.groupDiv);if(e){this.addCloseBox(d)}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(a){if(a==null){if((this.lonlat!=null)&&(this.map!=null)){a=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 b=document.defaultView.getComputedStyle(this.contentDiv,null);var c=b.getPropertyValue("overflow");if(c!="hidden"){this.contentDiv._oldOverflow=c;this.contentDiv.style.overflow="hidden"}});this.map.events.register("moveend",this,function(){var b=this.contentDiv._oldOverflow;if(b){this.contentDiv.style.overflow=b;this.contentDiv._oldOverflow=null}})}this.moveTo(a);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 a=this.map.getLayerPxFromLonLat(this.lonlat);if(a){this.moveTo(a)}}},moveTo:function(a){if((a!=null)&&(this.div!=null)){this.div.style.left=a.x+"px";this.div.style.top=a.y+"px"}},visible:function(){return OpenLayers.Element.visible(this.div)},toggle:function(){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(c){this.size=c.clone();var b=this.getContentDivPadding();var a=b.left+b.right;var e=b.top+b.bottom;this.fixPadding();a+=this.padding.left+this.padding.right;e+=this.padding.top+this.padding.bottom;if(this.closeDiv){var d=parseInt(this.closeDiv.style.width);a+=d+b.right}this.size.w+=a;this.size.h+=e;if(OpenLayers.Util.getBrowserName()=="msie"){this.contentSize.w+=b.left+b.right;this.contentSize.h+=b.bottom+b.top}if(this.div!=null){this.div.style.width=this.size.w+"px";this.div.style.height=this.size.h+"px"}if(this.contentDiv!=null){this.contentDiv.style.width=c.w+"px";this.contentDiv.style.height=c.h+"px"}},updateSize:function(){var e="<div class='"+this.contentDisplayClass+"'>"+this.contentDiv.innerHTML+"</div>";var h=(this.map)?this.map.layerContainerDiv:document.body;var i=OpenLayers.Util.getRenderedDimensions(e,null,{displayClass:this.displayClass,containerElement:h});var g=this.getSafeContentSize(i);var f=null;if(g.equals(i)){f=i}else{var b=new OpenLayers.Size();b.w=(g.w<i.w)?g.w:null;b.h=(g.h<i.h)?g.h:null;if(b.w&&b.h){f=g}else{var d=OpenLayers.Util.getRenderedDimensions(e,b,{displayClass:this.contentDisplayClass,containerElement:h});var c=OpenLayers.Element.getStyle(this.contentDiv,"overflow");if((c!="hidden")&&(d.equals(g))){var a=OpenLayers.Util.getScrollbarWidth();if(b.w){d.h+=a}else{d.w+=a}}f=this.getSafeContentSize(d)}}this.setSize(f)},setBackgroundColor:function(a){if(a!=undefined){this.backgroundColor=a}if(this.div!=null){this.div.style.backgroundColor=this.backgroundColor}},setOpacity:function(a){if(a!=undefined){this.opacity=a}if(this.div!=null){this.div.style.opacity=this.opacity;this.div.style.filter="alpha(opacity="+this.opacity*100+")"}},setBorder:function(a){if(a!=undefined){this.border=a}if(this.div!=null){this.div.style.border=this.border}},setContentHTML:function(a){if(a!=null){this.contentHTML=a}if((this.contentDiv!=null)&&(this.contentHTML!=null)&&(this.contentHTML!=this.contentDiv.innerHTML)){this.contentDiv.innerHTML=this.contentHTML;if(this.autoSize){this.registerImageListeners();this.updateSize()}}},registerImageListeners:function(){var f=function(){this.popup.updateSize();if(this.popup.visible()&&this.popup.panMapIfOutOfView){this.popup.panIntoView()}OpenLayers.Event.stopObserving(this.img,"load",this.img._onImageLoad)};var b=this.contentDiv.getElementsByTagName("img");for(var e=0,a=b.length;e<a;e++){var c=b[e];if(c.width==0||c.height==0){var d={popup:this,img:c};c._onImgLoad=OpenLayers.Function.bind(f,d);OpenLayers.Event.observe(c,"load",c._onImgLoad)}}},getSafeContentSize:function(k){var d=k.clone();var i=this.getContentDivPadding();var j=i.left+i.right;var g=i.top+i.bottom;this.fixPadding();j+=this.padding.left+this.padding.right;g+=this.padding.top+this.padding.bottom;if(this.closeDiv){var c=parseInt(this.closeDiv.style.width);j+=c+i.right}if(this.minSize){d.w=Math.max(d.w,(this.minSize.w-j));d.h=Math.max(d.h,(this.minSize.h-g))}if(this.maxSize){d.w=Math.min(d.w,(this.maxSize.w-j));d.h=Math.min(d.h,(this.maxSize.h-g))}if(this.map&&this.map.size){var f=0,e=0;if(this.keepInMap&&!this.panMapIfOutOfView){var h=this.map.getPixelFromLonLat(this.lonlat);switch(this.relativePosition){case"tr":f=h.x;e=this.map.size.h-h.y;break;case"tl":f=this.map.size.w-h.x;e=this.map.size.h-h.y;break;case"bl":f=this.map.size.w-h.x;e=h.y;break;case"br":f=h.x;e=h.y;break;default:f=h.x;e=this.map.size.h-h.y;break}}var a=this.map.size.h-this.map.paddingForPopups.top-this.map.paddingForPopups.bottom-g-e;var b=this.map.size.w-this.map.paddingForPopups.left-this.map.paddingForPopups.right-j-f;d.w=Math.min(d.w,b);d.h=Math.min(d.h,a)}return d},getContentDivPadding:function(){var a=this._contentDivPadding;if(!a){if(this.div.parentNode==null){this.div.style.display="none";document.body.appendChild(this.div)}a=new OpenLayers.Bounds(OpenLayers.Element.getStyle(this.contentDiv,"padding-left"),OpenLayers.Element.getStyle(this.contentDiv,"padding-bottom"),OpenLayers.Element.getStyle(this.contentDiv,"padding-right"),OpenLayers.Element.getStyle(this.contentDiv,"padding-top"));this._contentDivPadding=a;if(this.div.parentNode==document.body){document.body.removeChild(this.div);this.div.style.display=""}}return a},addCloseBox:function(c){this.closeDiv=OpenLayers.Util.createDiv(this.id+"_close",null,new OpenLayers.Size(17,17));this.closeDiv.className="olPopupCloseBox";var b=this.getContentDivPadding();this.closeDiv.style.right=b.right+"px";this.closeDiv.style.top=b.top+"px";this.groupDiv.appendChild(this.closeDiv);var a=c||function(d){this.hide();OpenLayers.Event.stop(d)};OpenLayers.Event.observe(this.closeDiv,"click",OpenLayers.Function.bindAsEventListener(a,this))},panIntoView:function(){var e=this.map.getSize();var d=this.map.getViewPortPxFromLayerPx(new OpenLayers.Pixel(parseInt(this.div.style.left),parseInt(this.div.style.top)));var c=d.clone();if(d.x<this.map.paddingForPopups.left){c.x=this.map.paddingForPopups.left}else{if((d.x+this.size.w)>(e.w-this.map.paddingForPopups.right)){c.x=e.w-this.map.paddingForPopups.right-this.size.w}}if(d.y<this.map.paddingForPopups.top){c.y=this.map.paddingForPopups.top}else{if((d.y+this.size.h)>(e.h-this.map.paddingForPopups.bottom)){c.y=e.h-this.map.paddingForPopups.bottom-this.size.h}}var b=d.x-c.x;var a=d.y-c.y;this.map.pan(b,a)},registerEvents:function(){this.events=new OpenLayers.Events(this,this.div,null,true);this.events.on({mousedown:this.onmousedown,mousemove:this.onmousemove,mouseup:this.onmouseup,click:this.onclick,mouseout:this.onmouseout,dblclick:this.ondblclick,scope:this})},onmousedown:function(a){this.mousedown=true;OpenLayers.Event.stop(a,true)},onmousemove:function(a){if(this.mousedown){OpenLayers.Event.stop(a,true)}},onmouseup:function(a){if(this.mousedown){this.mousedown=false;OpenLayers.Event.stop(a,true)}},onclick:function(a){OpenLayers.Event.stop(a,true)},onmouseout:function(a){this.mousedown=false},ondblclick:function(a){OpenLayers.Event.stop(a,true)},CLASS_NAME:"OpenLayers.Popup"});OpenLayers.Popup.WIDTH=200;OpenLayers.Popup.HEIGHT=200;OpenLayers.Popup.COLOR="white";OpenLayers.Popup.OPACITY=1;OpenLayers.Popup.BORDER="0px";OpenLayers.Renderer=OpenLayers.Class({container:null,root:null,extent:null,locked:false,size:null,resolution:null,map:null,initialize:function(a,b){this.container=OpenLayers.Util.getElement(a)},destroy:function(){this.container=null;this.extent=null;this.size=null;this.resolution=null;this.map=null},supported:function(){return false},setExtent:function(a,b){this.extent=a.clone();if(b){this.resolution=null}},setSize:function(a){this.size=a.clone();this.resolution=null},getResolution:function(){this.resolution=this.resolution||this.map.getResolution();return this.resolution},drawFeature:function(a,b){if(b==null){b=a.style}if(a.geometry){var c=a.geometry.getBounds();if(c){if(!c.intersectsBounds(this.extent)){b={display:"none"}}var d=this.drawGeometry(a.geometry,b,a.id);if(b.display!="none"&&b.label&&d!==false){this.drawText(a.id,b,a.geometry.getCentroid())}else{this.removeText(a.id)}return d}}},drawGeometry:function(c,a,b){},drawText:function(c,b,a){},removeText:function(a){},clear:function(){},getFeatureIdFromEvent:function(a){},eraseFeatures:function(c){if(!(c instanceof Array)){c=[c]}for(var b=0,a=c.length;b<a;++b){this.eraseGeometry(c[b].geometry);this.removeText(c[b].id)}},eraseGeometry:function(a){},moveRoot:function(a){},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(d,a,b,c){if(d!=null){this.left=OpenLayers.Util.toFloat(d)}if(a!=null){this.bottom=OpenLayers.Util.toFloat(a)}if(b!=null){this.right=OpenLayers.Util.toFloat(b)}if(c!=null){this.top=OpenLayers.Util.toFloat(c)}},clone:function(){return new OpenLayers.Bounds(this.left,this.bottom,this.right,this.top)},equals:function(b){var a=false;if(b!=null){a=((this.left==b.left)&&(this.right==b.right)&&(this.top==b.top)&&(this.bottom==b.bottom))}return a},toString:function(){return("left-bottom=("+this.left+","+this.bottom+") right-top=("+this.right+","+this.top+")")},toArray:function(){return[this.left,this.bottom,this.right,this.top]},toBBOX:function(a){if(a==null){a=6}var b=Math.pow(10,a);var c=Math.round(this.left*b)/b+","+Math.round(this.bottom*b)/b+","+Math.round(this.right*b)/b+","+Math.round(this.top*b)/b;return c},toGeometry:function(){return new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing([new OpenLayers.Geometry.Point(this.left,this.bottom),new OpenLayers.Geometry.Point(this.right,this.bottom),new OpenLayers.Geometry.Point(this.right,this.top),new OpenLayers.Geometry.Point(this.left,this.top)])])},getWidth:function(){return(this.right-this.left)},getHeight:function(){return(this.top-this.bottom)},getSize:function(){return new OpenLayers.Size(this.getWidth(),this.getHeight())},getCenterPixel:function(){return new OpenLayers.Pixel((this.left+this.right)/2,(this.bottom+this.top)/2)},getCenterLonLat:function(){if(!this.centerLonLat){this.centerLonLat=new OpenLayers.LonLat((this.left+this.right)/2,(this.bottom+this.top)/2)}return this.centerLonLat},scale:function(f,h){if(h==null){h=this.getCenterLonLat()}var a=[];var e,d;if(h.CLASS_NAME=="OpenLayers.LonLat"){e=h.lon;d=h.lat}else{e=h.x;d=h.y}var c=(this.left-e)*f+e;var b=(this.bottom-d)*f+d;var i=(this.right-e)*f+e;var g=(this.top-d)*f+d;return new OpenLayers.Bounds(c,b,i,g)},add:function(a,c){if((a==null)||(c==null)){var b=OpenLayers.i18n("boundsAddError");OpenLayers.Console.error(b);return null}return new OpenLayers.Bounds(this.left+a,this.bottom+c,this.right+a,this.top+c)},extend:function(a){var b=null;if(a){switch(a.CLASS_NAME){case"OpenLayers.LonLat":b=new OpenLayers.Bounds(a.lon,a.lat,a.lon,a.lat);break;case"OpenLayers.Geometry.Point":b=new OpenLayers.Bounds(a.x,a.y,a.x,a.y);break;case"OpenLayers.Bounds":b=a;break}if(b){this.centerLonLat=null;if((this.left==null)||(b.left<this.left)){this.left=b.left}if((this.bottom==null)||(b.bottom<this.bottom)){this.bottom=b.bottom}if((this.right==null)||(b.right>this.right)){this.right=b.right}if((this.top==null)||(b.top>this.top)){this.top=b.top}}}},containsLonLat:function(b,a){return this.contains(b.lon,b.lat,a)},containsPixel:function(b,a){return this.contains(b.x,b.y,a)},contains:function(b,d,a){if(a==null){a=true}if(b==null||d==null){return false}b=OpenLayers.Util.toFloat(b);d=OpenLayers.Util.toFloat(d);var c=false;if(a){c=((b>=this.left)&&(b<=this.right)&&(d>=this.bottom)&&(d<=this.top))}else{c=((b>this.left)&&(b<this.right)&&(d>this.bottom)&&(d<this.top))}return c},intersectsBounds:function(e,b){if(b==null){b=true}var d=false;var h=(this.left==e.right||this.right==e.left||this.top==e.bottom||this.bottom==e.top);if(b||!h){var g=(((e.bottom>=this.bottom)&&(e.bottom<=this.top))||((this.bottom>=e.bottom)&&(this.bottom<=e.top)));var f=(((e.top>=this.bottom)&&(e.top<=this.top))||((this.top>e.bottom)&&(this.top<e.top)));var c=(((e.left>=this.left)&&(e.left<=this.right))||((this.left>=e.left)&&(this.left<=e.right)));var a=(((e.right>=this.left)&&(e.right<=this.right))||((this.right>=e.left)&&(this.right<=e.right)));d=((g||f)&&(c||a))}return d},containsBounds:function(g,b,a){if(b==null){b=false}if(a==null){a=true}var c=this.contains(g.left,g.bottom,a);var d=this.contains(g.right,g.bottom,a);var f=this.contains(g.left,g.top,a);var e=this.contains(g.right,g.top,a);return(b)?(c||d||f||e):(c&&d&&f&&e)},determineQuadrant:function(c){var b="";var a=this.getCenterLonLat();b+=(c.lat<a.lat)?"b":"t";b+=(c.lon<a.lon)?"l":"r";return b},transform:function(d,b){this.centerLonLat=null;var e=OpenLayers.Projection.transform({x:this.left,y:this.bottom},d,b);var a=OpenLayers.Projection.transform({x:this.right,y:this.bottom},d,b);var c=OpenLayers.Projection.transform({x:this.left,y:this.top},d,b);var f=OpenLayers.Projection.transform({x:this.right,y:this.top},d,b);this.left=Math.min(e.x,c.x);this.bottom=Math.min(e.y,a.y);this.right=Math.max(a.x,f.x);this.top=Math.max(c.y,f.y);return this},wrapDateLine:function(a,c){c=c||{};var d=c.leftTolerance||0;var b=c.rightTolerance||0;var e=this.clone();if(a){while(e.left<a.left&&(e.right-b)<=a.left){e=e.add(a.getWidth(),0)}while((e.left+d)>=a.right&&e.right>a.right){e=e.add(-a.getWidth(),0)}}return e},CLASS_NAME:"OpenLayers.Bounds"});OpenLayers.Bounds.fromString=function(b){var a=b.split(",");return OpenLayers.Bounds.fromArray(a)};OpenLayers.Bounds.fromArray=function(a){return new OpenLayers.Bounds(parseFloat(a[0]),parseFloat(a[1]),parseFloat(a[2]),parseFloat(a[3]))};OpenLayers.Bounds.fromSize=function(a){return new OpenLayers.Bounds(0,a.h,a.w,0)};OpenLayers.Bounds.oppositeQuadrant=function(a){var b="";b+=(a.charAt(0)=="t")?"b":"t";b+=(a.charAt(1)=="l")?"r":"l";return b};OpenLayers.LonLat=OpenLayers.Class({lon:0,lat:0,initialize:function(b,a){this.lon=OpenLayers.Util.toFloat(b);this.lat=OpenLayers.Util.toFloat(a)},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(c,a){if((c==null)||(a==null)){var b=OpenLayers.i18n("lonlatAddError");OpenLayers.Console.error(b);return null}return new OpenLayers.LonLat(this.lon+c,this.lat+a)},equals:function(b){var a=false;if(b!=null){a=((this.lon==b.lon&&this.lat==b.lat)||(isNaN(this.lon)&&isNaN(this.lat)&&isNaN(b.lon)&&isNaN(b.lat)))}return a},transform:function(c,b){var a=OpenLayers.Projection.transform({x:this.lon,y:this.lat},c,b);this.lon=a.x;this.lat=a.y;return this},wrapDateLine:function(a){var b=this.clone();if(a){while(b.lon<a.left){b.lon+=a.getWidth()}while(b.lon>a.right){b.lon-=a.getWidth()}}return b},CLASS_NAME:"OpenLayers.LonLat"});OpenLayers.LonLat.fromString=function(b){var a=b.split(",");return new OpenLayers.LonLat(parseFloat(a[0]),parseFloat(a[1]))};OpenLayers.Pixel=OpenLayers.Class({x:0,y:0,initialize:function(a,b){this.x=parseFloat(a);this.y=parseFloat(b)},toString:function(){return("x="+this.x+",y="+this.y)},clone:function(){return new OpenLayers.Pixel(this.x,this.y)},equals:function(a){var b=false;if(a!=null){b=((this.x==a.x&&this.y==a.y)||(isNaN(this.x)&&isNaN(this.y)&&isNaN(a.x)&&isNaN(a.y)))}return b},add:function(a,c){if((a==null)||(c==null)){var b=OpenLayers.i18n("pixelAddError");OpenLayers.Console.error(b);return null}return new OpenLayers.Pixel(this.x+a,this.y+c)},offset:function(a){var b=this.clone();if(a){b=this.add(a.x,a.y)}return b},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(a){this.displayClass=this.CLASS_NAME.replace("OpenLayers.","ol").replace(/\./g,"");OpenLayers.Util.extend(this,a);this.events=new OpenLayers.Events(this,null,this.EVENT_TYPES);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 a in this.handlers){if(this.handlers.hasOwnProperty(a)&&typeof this.handlers[a].destroy=="function"){this.handlers[a].destroy()}}this.handlers=null}if(this.map){this.map.removeControl(this);this.map=null}},setMap:function(a){this.map=a;if(this.handler){this.handler.setMap(a)}},draw:function(a){if(this.div==null){this.div=OpenLayers.Util.createDiv(this.id);this.div.className=this.displayClass;if(!this.allowSelection){this.div.className+=" olControlNoSelect";this.div.setAttribute("unselectable","on",0);this.div.onselectstart=function(){return(false)}}if(this.title!=""){this.div.title=this.title}}if(a!=null){this.position=a.clone()}this.moveTo(this.position);return this.div},moveTo:function(a){if((a!=null)&&(this.div!=null)){this.div.style.left=a.x+"px";this.div.style.top=a.y+"px"}},activate:function(){if(this.active){return false}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(b){var d;if(!b){b=(OpenLayers.Util.getBrowserName()=="msie")?navigator.userLanguage:navigator.language}var c=b.split("-");c[0]=c[0].toLowerCase();if(typeof OpenLayers.Lang[c[0]]=="object"){d=c[0]}if(c[1]){var a=c[0]+"-"+c[1].toUpperCase();if(typeof OpenLayers.Lang[a]=="object"){d=a}}if(!d){OpenLayers.Console.warn("Failed to find OpenLayers.Lang."+c.join("-")+" dictionary, falling back to default language");d=OpenLayers.Lang.defaultCode}OpenLayers.Lang.code=d},translate:function(b,a){var d=OpenLayers.Lang[OpenLayers.Lang.getCode()];var c=d[b];if(!c){c=b}if(a){c=OpenLayers.String.format(c,a)}return c}};OpenLayers.i18n=OpenLayers.Lang.translate;OpenLayers.Popup.Anchored=OpenLayers.Class(OpenLayers.Popup,{relativePosition:null,keepInMap:true,anchor:null,initialize:function(h,d,g,c,b,f,e){var a=[h,d,g,c,f,e];OpenLayers.Popup.prototype.initialize.apply(this,a);this.anchor=(b!=null)?b:{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(c){var b=this.relativePosition;this.relativePosition=this.calculateRelativePosition(c);var d=this.calculateNewPx(c);var a=new Array(d);OpenLayers.Popup.prototype.moveTo.apply(this,a);if(this.relativePosition!=b){this.updateRelativePosition()}},setSize:function(b){OpenLayers.Popup.prototype.setSize.apply(this,arguments);if((this.lonlat)&&(this.map)){var a=this.map.getLayerPxFromLonLat(this.lonlat);this.moveTo(a)}},calculateRelativePosition:function(b){var d=this.map.getLonLatFromLayerPx(b);var c=this.map.getExtent();var a=c.determineQuadrant(d);return OpenLayers.Bounds.oppositeQuadrant(a)},updateRelativePosition:function(){},calculateNewPx:function(b){var e=b.offset(this.anchor.offset);var a=this.size||this.contentSize;var d=(this.relativePosition.charAt(0)=="t");e.y+=(d)?-a.h:this.anchor.size.h;var c=(this.relativePosition.charAt(1)=="l");e.x+=(c)?-a.w:this.anchor.size.w;return e},CLASS_NAME:"OpenLayers.Popup.Anchored"});OpenLayers.ElementsIndexer=OpenLayers.Class({maxZIndex:null,order:null,indices:null,compare:null,initialize:function(a){this.compare=a?OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER_Y_ORDER:OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER_DRAWING_ORDER;this.order=[];this.indices={};this.maxZIndex=0},insert:function(c){if(this.exists(c)){this.remove(c)}var f=c.id;this.determineZIndex(c);var d=-1;var e=this.order.length;var a;while(e-d>1){a=parseInt((d+e)/2);var b=this.compare(this,c,OpenLayers.Util.getElement(this.order[a]));if(b>0){d=a}else{e=a}}this.order.splice(e,0,f);this.indices[f]=this.getZIndex(c);return this.getNextElement(e)},remove:function(b){var d=b.id;var a=OpenLayers.Util.indexOf(this.order,d);if(a>=0){this.order.splice(a,1);delete this.indices[d];if(this.order.length>0){var c=this.order[this.order.length-1];this.maxZIndex=this.indices[c]}else{this.maxZIndex=0}}},clear:function(){this.order=[];this.indices={};this.maxZIndex=0},exists:function(a){return(this.indices[a.id]!=null)},getZIndex:function(a){return a._style.graphicZIndex},determineZIndex:function(a){var b=a._style.graphicZIndex;if(b==null){b=this.maxZIndex;a._style.graphicZIndex=b}else{if(b>this.maxZIndex){this.maxZIndex=b}}},getNextElement:function(b){var a=b+1;if(a<this.order.length){var c=OpenLayers.Util.getElement(this.order[a]);if(c==undefined){c=this.getNextElement(a)}return c}else{return null}},CLASS_NAME:"OpenLayers.ElementsIndexer"});OpenLayers.ElementsIndexer.IndexingMethods={Z_ORDER:function(e,d,b){var a=e.getZIndex(d);var f=0;if(b){var c=e.getZIndex(b);f=a-c}return f},Z_ORDER_DRAWING_ORDER:function(c,b,a){var d=OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER(c,b,a);if(a&&d==0){d=1}return d},Z_ORDER_Y_ORDER:function(f,e,b){var g=OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER(f,e,b);if(b&&g==0){var c=e._geometry.getBounds().bottom;var d=b._geometry.getBounds().bottom;var a=d-c;g=(a==0)?1:a}return g}};OpenLayers.Renderer.Elements=OpenLayers.Class(OpenLayers.Renderer,{rendererRoot:null,root:null,vectorRoot:null,textRoot:null,xmlns:null,indexer:null,BACKGROUND_ID_SUFFIX:"_background",LABEL_ID_SUFFIX:"_label",minimumSymbolizer:{strokeLinecap:"round",strokeOpacity:1,strokeDashstyle:"solid",fillOpacity:1,pointRadius:0},initialize:function(a,b){OpenLayers.Renderer.prototype.initialize.apply(this,arguments);this.rendererRoot=this.createRenderRoot();this.root=this.createRoot("_root");this.vectorRoot=this.createRoot("_vroot");this.textRoot=this.createRoot("_troot");this.root.appendChild(this.vectorRoot);this.root.appendChild(this.textRoot);this.rendererRoot.appendChild(this.root);this.container.appendChild(this.rendererRoot);if(b&&(b.zIndexing||b.yOrdering)){this.indexer=new OpenLayers.ElementsIndexer(b.yOrdering)}},destroy:function(){this.clear();this.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(b,a){},drawGeometry:function(g,d,f){var c=g.CLASS_NAME;var h=true;if((c=="OpenLayers.Geometry.Collection")||(c=="OpenLayers.Geometry.MultiPoint")||(c=="OpenLayers.Geometry.MultiLineString")||(c=="OpenLayers.Geometry.MultiPolygon")){for(var b=0,a=g.components.length;b<a;b++){h=this.drawGeometry(g.components[b],d,f)&&h}return h}h=false;if(d.display!="none"){if(d.backgroundGraphic){this.redrawBackgroundNode(g.id,g,d,f)}h=this.redrawNode(g.id,g,d,f)}if(h==false){var e=document.getElementById(g.id);if(e){if(e._style.backgroundGraphic){e.parentNode.removeChild(document.getElementById(g.id+this.BACKGROUND_ID_SUFFIX))}e.parentNode.removeChild(e)}}return h},redrawNode:function(g,f,b,e){var c=this.nodeFactory(g,this.getNodeType(f,b));c._featureId=e;c._geometry=f;c._geometryClass=f.CLASS_NAME;c._style=b;var a=this.drawGeometryNode(c,f,b);if(a===false){return false}c=a.node;if(this.indexer){var d=this.indexer.insert(c);if(d){this.vectorRoot.insertBefore(c,d)}else{this.vectorRoot.appendChild(c)}}else{if(c.parentNode!==this.vectorRoot){this.vectorRoot.appendChild(c)}}this.postDraw(c);return a.complete},redrawBackgroundNode:function(e,d,b,c){var a=OpenLayers.Util.extend({},b);a.externalGraphic=a.backgroundGraphic;a.graphicXOffset=a.backgroundXOffset;a.graphicYOffset=a.backgroundYOffset;a.graphicZIndex=a.backgroundGraphicZIndex;a.graphicWidth=a.backgroundWidth||a.graphicWidth;a.graphicHeight=a.backgroundHeight||a.graphicHeight;a.backgroundGraphic=null;a.backgroundXOffset=null;a.backgroundYOffset=null;a.backgroundGraphicZIndex=null;return this.redrawNode(e+this.BACKGROUND_ID_SUFFIX,d,a,null)},drawGeometryNode:function(c,e,b){b=b||c._style;OpenLayers.Util.applyDefaults(b,this.minimumSymbolizer);var a={isFilled:b.fill===undefined?true:b.fill,isStroked:b.stroke===undefined?!!b.strokeWidth:b.stroke};var d;switch(e.CLASS_NAME){case"OpenLayers.Geometry.Point":if(b.graphic===false){a.isFilled=false;a.isStroked=false}d=this.drawPoint(c,e);break;case"OpenLayers.Geometry.LineString":a.isFilled=false;d=this.drawLineString(c,e);break;case"OpenLayers.Geometry.LinearRing":d=this.drawLinearRing(c,e);break;case"OpenLayers.Geometry.Polygon":d=this.drawPolygon(c,e);break;case"OpenLayers.Geometry.Surface":d=this.drawSurface(c,e);break;case"OpenLayers.Geometry.Rectangle":d=this.drawRectangle(c,e);break;default:break}c._style=b;c._options=a;if(d!=false){return{node:this.setStyle(c,b,a,e),complete:d}}else{return false}},postDraw:function(a){},drawPoint:function(a,b){},drawLineString:function(a,b){},drawLinearRing:function(a,b){},drawPolygon:function(a,b){},drawRectangle:function(a,b){},drawCircle:function(a,b){},drawSurface:function(a,b){},removeText:function(b){var a=document.getElementById(b+this.LABEL_ID_SUFFIX);if(a){this.textRoot.removeChild(a)}},getFeatureIdFromEvent:function(a){var d=a.target;var b=d&&d.correspondingUseElement;var c=b?b:(d||a.srcElement);var e=c._featureId;return e},eraseGeometry:function(f){if((f.CLASS_NAME=="OpenLayers.Geometry.MultiPoint")||(f.CLASS_NAME=="OpenLayers.Geometry.MultiLineString")||(f.CLASS_NAME=="OpenLayers.Geometry.MultiPolygon")||(f.CLASS_NAME=="OpenLayers.Geometry.Collection")){for(var d=0,a=f.components.length;d<a;d++){this.eraseGeometry(f.components[d])}}else{var c=OpenLayers.Util.getElement(f.id);if(c&&c.parentNode){if(c.geometry){c.geometry.destroy();c.geometry=null}c.parentNode.removeChild(c);if(this.indexer){this.indexer.remove(c)}if(c._style.backgroundGraphic){var b=f.id+this.BACKGROUND_ID_SUFFIX;var e=OpenLayers.Util.getElement(b);if(e&&e.parentNode){e.parentNode.removeChild(e)}}}}},nodeFactory:function(c,a){var b=OpenLayers.Util.getElement(c);if(b){if(!this.nodeTypeCompare(b,a)){b.parentNode.removeChild(b);b=this.nodeFactory(c,a)}}else{b=this.createNode(a,c)}return b},nodeTypeCompare:function(b,a){},createNode:function(a,b){},moveRoot:function(b){var a=this.root;if(b.root.parentNode==this.rendererRoot){a=b.root}a.parentNode.removeChild(a);b.rendererRoot.appendChild(a)},getRenderLayerId:function(){return this.root.parentNode.parentNode.id},isComplexSymbol:function(a){return(a!="circle")&&!!a},CLASS_NAME:"OpenLayers.Renderer.Elements"});OpenLayers.Renderer.symbol={star:[350,75,379,161,469,161,397,215,423,301,350,250,277,301,303,215,231,161,321,161,350,75],cross:[4,0,6,0,6,4,10,4,10,6,6,6,6,10,4,10,4,6,0,6,0,4,4,4,4,0],x:[0,0,25,0,50,35,75,0,100,0,65,50,100,100,75,100,50,65,25,100,0,100,35,50,0,0],square:[0,0,0,1,1,1,1,0,0,0],triangle:[0,10,10,10,5,0,0,10]};OpenLayers.Tween=OpenLayers.Class({INTERVAL:10,easing:null,begin:null,finish:null,duration:null,callbacks:null,time:null,interval:null,playing:false,initialize:function(a){this.easing=(a)?a:OpenLayers.Easing.Expo.easeOut},start:function(c,b,d,a){this.playing=true;this.begin=c;this.finish=b;this.duration=d;this.callbacks=a.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 g={};for(var d in this.begin){var a=this.begin[d];var e=this.finish[d];if(a==null||e==null||isNaN(a)||isNaN(e)){OpenLayers.Console.error("invalid value for Tween")}var h=e-a;g[d]=this.easing.apply(this,[this.time,a,h,this.duration])}this.time++;if(this.callbacks&&this.callbacks.eachStep){this.callbacks.eachStep.call(this,g)}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(e,a,g,f){return g*e/f+a},easeOut:function(e,a,g,f){return g*e/f+a},easeInOut:function(e,a,g,f){return g*e/f+a},CLASS_NAME:"OpenLayers.Easing.Linear"};OpenLayers.Easing.Expo={easeIn:function(e,a,g,f){return(e==0)?a:g*Math.pow(2,10*(e/f-1))+a},easeOut:function(e,a,g,f){return(e==f)?a+g:g*(-Math.pow(2,-10*e/f)+1)+a},easeInOut:function(e,a,g,f){if(e==0){return a}if(e==f){return a+g}if((e/=f/2)<1){return g/2*Math.pow(2,10*(e-1))+a}return g/2*(-Math.pow(2,-10*--e)+2)+a},CLASS_NAME:"OpenLayers.Easing.Expo"};OpenLayers.Easing.Quad={easeIn:function(e,a,g,f){return g*(e/=f)*e+a},easeOut:function(e,a,g,f){return -g*(e/=f)*(e-2)+a},easeInOut:function(e,a,g,f){if((e/=f/2)<1){return g/2*e*e+a}return -g/2*((--e)*(e-2)-1)+a},CLASS_NAME:"OpenLayers.Easing.Quad"};OpenLayers.Control.ArgParser=OpenLayers.Class(OpenLayers.Control,{center:null,zoom:null,layers:null,displayProjection:null,initialize:function(a){OpenLayers.Control.prototype.initialize.apply(this,arguments)},setMap:function(e){OpenLayers.Control.prototype.setMap.apply(this,arguments);for(var c=0,a=this.map.controls.length;c<a;c++){var d=this.map.controls[c];if((d!=this)&&(d.CLASS_NAME=="OpenLayers.Control.ArgParser")){if(d.displayProjection!=this.displayProjection){this.displayProjection=d.displayProjection}break}}if(c==this.map.controls.length){var b=OpenLayers.Util.getParameters();if(b.layers){this.layers=b.layers;this.map.events.register("addlayer",this,this.configureLayers);this.configureLayers()}if(b.lat&&b.lon){this.center=new OpenLayers.LonLat(parseFloat(b.lon),parseFloat(b.lat));if(b.zoom){this.zoom=parseInt(b.zoom)}this.map.events.register("changebaselayer",this,this.setCenter);this.setCenter()}}},setCenter:function(){if(this.map.baseLayer){this.map.events.unregister("changebaselayer",this,this.setCenter);if(this.displayProjection){this.center.transform(this.displayProjection,this.map.getProjectionObject())}this.map.setCenter(this.center,this.zoom)}},configureLayers:function(){if(this.layers.length==this.map.layers.length){this.map.events.unregister("addlayer",this,this.configureLayers);for(var d=0,a=this.layers.length;d<a;d++){var b=this.map.layers[d];var e=this.layers.charAt(d);if(e=="B"){this.map.setBaseLayer(b)}else{if((e=="T")||(e=="F")){b.setVisibility(e=="T")}}}}},CLASS_NAME:"OpenLayers.Control.ArgParser"});OpenLayers.Control.Attribution=OpenLayers.Class(OpenLayers.Control,{separator:", ",initialize:function(a){OpenLayers.Control.prototype.initialize.apply(this,arguments)},destroy:function(){this.map.events.un({removelayer:this.updateAttribution,addlayer:this.updateAttribution,changelayer:this.updateAttribution,changebaselayer:this.updateAttribution,scope:this});OpenLayers.Control.prototype.destroy.apply(this,arguments)},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);this.map.events.on({changebaselayer:this.updateAttribution,changelayer:this.updateAttribution,addlayer:this.updateAttribution,removelayer:this.updateAttribution,scope:this});this.updateAttribution();return this.div},updateAttribution:function(){var d=[];if(this.map&&this.map.layers){for(var c=0,a=this.map.layers.length;c<a;c++){var b=this.map.layers[c];if(b.attribution&&b.getVisibility()){d.push(b.attribution)}}this.div.innerHTML=d.join(this.separator)}},CLASS_NAME:"OpenLayers.Control.Attribution"});OpenLayers.Control.PanZoom=OpenLayers.Class(OpenLayers.Control,{slideFactor:50,slideRatio:null,buttons:null,position:null,initialize:function(a){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(b){OpenLayers.Control.prototype.draw.apply(this,arguments);b=this.position;this.buttons=[];var c=new OpenLayers.Size(18,18);var a=new OpenLayers.Pixel(b.x+c.w/2,b.y);this._addButton("panup","north-mini.png",a,c);b.y=a.y+c.h;this._addButton("panleft","west-mini.png",b,c);this._addButton("panright","east-mini.png",b.add(c.w,0),c);this._addButton("pandown","south-mini.png",a.add(0,c.h*2),c);this._addButton("zoomin","zoom-plus-mini.png",a.add(0,c.h*3+5),c);this._addButton("zoomworld","zoom-world-mini.png",a.add(0,c.h*4+5),c);this._addButton("zoomout","zoom-minus-mini.png",a.add(0,c.h*5+5),c);return this.div},_addButton:function(a,d,i,g){var f=OpenLayers.Util.getImagesLocation()+d;var b=OpenLayers.Util.createAlphaImageDiv(this.id+"_"+a,i,g,f,"absolute");this.div.appendChild(b);OpenLayers.Event.observe(b,"mousedown",OpenLayers.Function.bindAsEventListener(this.buttonDown,b));OpenLayers.Event.observe(b,"dblclick",OpenLayers.Function.bindAsEventListener(this.doubleClick,b));OpenLayers.Event.observe(b,"click",OpenLayers.Function.bindAsEventListener(this.doubleClick,b));b.action=a;b.map=this.map;if(!this.slideRatio){var c=this.slideFactor;var e=function(){return c}}else{var h=this.slideRatio;var e=function(j){return this.map.getSize()[j]*h}}b.getSlideFactor=e;this.buttons.push(b);return b},_removeButton:function(a){OpenLayers.Event.stopObservingElement(a);a.map=null;this.div.removeChild(a);OpenLayers.Util.removeItem(this.buttons,a)},removeButtons:function(){for(var a=this.buttons.length-1;a>=0;--a){this._removeButton(this.buttons[a])}},doubleClick:function(a){OpenLayers.Event.stop(a);return false},buttonDown:function(a){if(!OpenLayers.Event.isLeftClick(a)){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(a)},CLASS_NAME:"OpenLayers.Control.PanZoom"});OpenLayers.Control.PanZoom.X=4;OpenLayers.Control.PanZoom.Y=4;OpenLayers.Event={observers:false,KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(a){return a.target||a.srcElement},isLeftClick:function(a){return(((a.which)&&(a.which==1))||((a.button)&&(a.button==1)))},isRightClick:function(a){return(((a.which)&&(a.which==3))||((a.button)&&(a.button==2)))},stop:function(b,a){if(!a){if(b.preventDefault){b.preventDefault()}else{b.returnValue=false}}if(b.stopPropagation){b.stopPropagation()}else{b.cancelBubble=true}},findElement:function(c,b){var a=OpenLayers.Event.element(c);while(a.parentNode&&(!a.tagName||(a.tagName.toUpperCase()!=b.toUpperCase()))){a=a.parentNode}return a},observe:function(b,d,c,a){var e=OpenLayers.Util.getElement(b);a=a||false;if(d=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||e.attachEvent)){d="keydown"}if(!this.observers){this.observers={}}if(!e._eventCacheID){var f="eventCacheID_";if(e.id){f=e.id+"_"+f}e._eventCacheID=OpenLayers.Util.createUniqueID(f)}var g=e._eventCacheID;if(!this.observers[g]){this.observers[g]=[]}this.observers[g].push({element:e,name:d,observer:c,useCapture:a});if(e.addEventListener){e.addEventListener(d,c,a)}else{if(e.attachEvent){e.attachEvent("on"+d,c)}}},stopObservingElement:function(a){var b=OpenLayers.Util.getElement(a);var c=b._eventCacheID;this._removeElementObservers(OpenLayers.Event.observers[c])},_removeElementObservers:function(e){if(e){for(var b=e.length-1;b>=0;b--){var c=e[b];var a=new Array(c.element,c.name,c.observer,c.useCapture);var d=OpenLayers.Event.stopObserving.apply(this,a)}}},stopObserving:function(h,a,g,b){b=b||false;var f=OpenLayers.Util.getElement(h);var d=f._eventCacheID;if(a=="keypress"){if(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||f.detachEvent){a="keydown"}}var k=false;var c=OpenLayers.Event.observers[d];if(c){var e=0;while(!k&&e<c.length){var j=c[e];if((j.name==a)&&(j.observer==g)&&(j.useCapture==b)){c.splice(e,1);if(c.length==0){delete OpenLayers.Event.observers[d]}k=true;break}e++}}if(k){if(f.removeEventListener){f.removeEventListener(a,g,b)}else{if(f&&f.detachEvent){f.detachEvent("on"+a,g)}}}return k},unloadCache:function(){if(OpenLayers.Event&&OpenLayers.Event.observers){for(var a in OpenLayers.Event.observers){var b=OpenLayers.Event.observers[a];OpenLayers.Event._removeElementObservers.apply(this,[b])}OpenLayers.Event.observers=false}},CLASS_NAME:"OpenLayers.Event"};OpenLayers.Event.observe(window,"unload",OpenLayers.Event.unloadCache,false);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(c,e,g,f,b){OpenLayers.Util.extend(this,b);this.object=c;this.fallThrough=f;this.listeners={};this.eventHandler=OpenLayers.Function.bindAsEventListener(this.handleBrowserEvent,this);this.clearMouseListener=OpenLayers.Function.bind(this.clearMouseCache,this);this.eventTypes=[];if(g!=null){for(var d=0,a=g.length;d<a;d++){this.addEventType(g[d])}}if(e!=null){this.attachToElement(e)}},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(a){if(!this.listeners[a]){this.eventTypes.push(a);this.listeners[a]=[]}},attachToElement:function(d){if(this.element){OpenLayers.Event.stopObservingElement(this.element)}this.element=d;for(var c=0,a=this.BROWSER_EVENTS.length;c<a;c++){var b=this.BROWSER_EVENTS[c];this.addEventType(b);OpenLayers.Event.observe(d,b,this.eventHandler)}OpenLayers.Event.observe(d,"dragstart",OpenLayers.Event.stop)},on:function(a){for(var b in a){if(b!="scope"){this.register(b,a.scope,a[b])}}},register:function(b,d,c){if((c!=null)&&(OpenLayers.Util.indexOf(this.eventTypes,b)!=-1)){if(d==null){d=this.object}var a=this.listeners[b];a.push({obj:d,func:c})}},registerPriority:function(b,d,c){if(c!=null){if(d==null){d=this.object}var a=this.listeners[b];if(a!=null){a.unshift({obj:d,func:c})}}},un:function(a){for(var b in a){if(b!="scope"){this.unregister(b,a.scope,a[b])}}},unregister:function(d,f,e){if(f==null){f=this.object}var c=this.listeners[d];if(c!=null){for(var b=0,a=c.length;b<a;b++){if(c[b].obj==f&&c[b].func==e){c.splice(b,1);break}}}},remove:function(a){if(this.listeners[a]!=null){this.listeners[a]=[]}},triggerEvent:function(e,b){var d=this.listeners[e];if(!d||d.length==0){return}if(b==null){b={}}b.object=this.object;b.element=this.element;if(!b.type){b.type=e}var d=d.slice(),f;for(var c=0,a=d.length;c<a;c++){var g=d[c];f=g.func.apply(g.obj,[b]);if((f!=undefined)&&(f==false)){break}}if(!this.fallThrough){OpenLayers.Event.stop(b,true)}return f},handleBrowserEvent:function(a){if(this.includeXY){a.xy=this.getMousePosition(a)}this.triggerEvent(a.type,a)},clearMouseCache:function(){this.element.scrolls=null;this.element.lefttop=null;this.element.offsets=null},getMousePosition:function(a){if(!this.includeXY){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((a.clientX+this.element.scrolls[0])-this.element.offsets[0]-this.element.lefttop[0],(a.clientY+this.element.scrolls[1])-this.element.offsets[1]-this.element.lefttop[1])},CLASS_NAME:"OpenLayers.Events"});OpenLayers.Format=OpenLayers.Class({options:null,externalProjection:null,internalProjection:null,data:null,keepData:false,initialize:function(a){OpenLayers.Util.extend(this,a);this.options=a},destroy:function(){},read:function(a){OpenLayers.Console.userError(OpenLayers.i18n("readNotImplemented"))},write:function(a){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.Lang.it={unhandledRequest:"Codice di ritorno della richiesta ${statusText}",permalink:"Permalink",overlays:"Overlays",baseLayer:"Livello base",sameProjection:"La mini mappa funziona solamente se ha la stessa proiezione della mappa principale",readNotImplemented:"Lettura non implementata.",writeNotImplemented:"Scrittura non implementata.",noFID:"Impossibile aggiornare un elemento grafico che non abbia il FID.",errorLoadingGML:"Errore nel caricamento del file GML ${url}",browserNotSupported:"Il tuo browser non supporta il rendering vettoriale. I renderizzatore attualemnte supportati sono:\n${renderers}",componentShouldBe:"addFeatures : il componente dovrebbe essere di tipo ${geomType}",getFeatureError:"getFeatureFromEvent chiamata su di un livello senza renderizzatore. Ciò significa che il livello è stato cancellato, ma non i gestori associati ad esso.",minZoomLevelError:"La proprietà minZoomLevel è da utilizzare solamente con livelli che abbiano FixedZoomLevels. Il fatto che questo livello wfs controlli la proprietà minZoomLevel è un retaggio del passato. Non possiamo comunque rimuoverla senza rompere le vecchie applicazioni che dipendono su di essa.Quindi siamo costretti a deprecarla -- minZoomLevel e sarà rimossa dalla vesione 3.0. Si prega di utilizzare i settaggi di risoluzione min/max come descritto qui: http://trac.openlayers.org/wiki/SettingZoomLevels",commitSuccess:"Transazione WFS: SUCCESS ${response}",commitFailed:"Transazione WFS: FAILED ${response}",googleWarning:"Il livello Google non è riuscito a caricare correttamente.<br><br>Per evitare questo messaggio, seleziona un nuovo BaseLayer nel selettore di livelli nell'angolo in alto a destra.<br><br>Più precisamente, ciò accade perchè la libreria Google Maps non è stata inclusa nella pagina, oppure non contiene la corretta API key per il tuo sito.<br><br>Sviluppatori: Per aiuto su come farlo funzionare correttamente, <a href='http://trac.openlayers.org/wiki/Google' target='_blank'>clicca qui</a>",getLayerWarning:"Il livello ${layerType} non è riuscito a caricare correttamente.<br><br>Per evitare questo messaggio, seleziona un nuovo BaseLayer nel selettore di livelli nell'angolo in alto a destra.<br><br>Più precisamente, ciò accade perchè la libreria ${layerLib} non è stata inclusa nella pagina.<br><br>Sviluppatori: Per aiuto su come farlo funzionare correttamente, <a href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'>clicca qui</a>",scale:"Scala = 1 : ${scaleDenom}",layerAlreadyAdded:"Stai cercando di aggiungere il livello: ${layerName} alla mappa, ma tale livello è già stato aggiunto.",reprojectDeprecated:"Stai utilizzando l'opzione 'reproject' sul livello ${layerName}. Questa opzione è deprecata: il suo utilizzo è stato introdotto persupportare il disegno dei dati sopra mappe commerciali, ma tale funzionalità dovrebbe essere ottenuta tramite l'utilizzo della proiezione Spherical Mercator. Per maggiori informazioni consultare qui http://trac.openlayers.org/wiki/SphericalMercator.",methodDeprecated:"Questo metodo è stato deprecato e sarà rimosso dalla versione 3.0. Si prega di utilizzare il metodo ${newMethod} in alternativa.",boundsAddError:"Devi specificare i valori di x e y alla funzione add.",lonlatAddError:"Devi specificare i valori di lon e lat alla funzione add.",pixelAddError:"Devi specificare i valori di x e y alla funzione add.",unsupportedGeometryType:"Tipo di geometria non supportata: ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition fallita: l'elemento con id ${elemId} è posizionato in modo errato.",end:""};OpenLayers.Popup.AnchoredBubble=OpenLayers.Class(OpenLayers.Popup.Anchored,{rounded:false,initialize:function(g,c,f,b,a,e,d){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(a){OpenLayers.Popup.Anchored.prototype.draw.apply(this,arguments);this.setContentHTML();this.setBackgroundColor();this.setOpacity();return this.div},updateRelativePosition:function(){this.setRicoCorners()},setSize:function(a){OpenLayers.Popup.Anchored.prototype.setSize.apply(this,arguments);this.setRicoCorners()},setBackgroundColor:function(a){if(a!=undefined){this.backgroundColor=a}if(this.div!=null){if(this.contentDiv!=null){this.div.style.background="transparent";OpenLayers.Rico.Corner.changeColor(this.groupDiv,this.backgroundColor)}}},setOpacity:function(a){OpenLayers.Popup.Anchored.prototype.setOpacity.call(this,a);if(this.div!=null){if(this.groupDiv!=null){OpenLayers.Rico.Corner.changeOpacity(this.groupDiv,this.opacity)}}},setBorder:function(a){this.border=0},setRicoCorners:function(){var a=this.getCornersToRound(this.relativePosition);var b={corners:a,color:this.backgroundColor,bgColor:"transparent",blend:false};if(!this.rounded){OpenLayers.Rico.Corner.round(this.div,b);this.rounded=true}else{OpenLayers.Rico.Corner.reRound(this.groupDiv,b);this.setBackgroundColor();this.setOpacity()}},getCornersToRound:function(){var a=["tl","tr","bl","br"];var b=OpenLayers.Bounds.oppositeQuadrant(this.relativePosition);OpenLayers.Util.removeItem(a,b);return a.join(" ")},CLASS_NAME:"OpenLayers.Popup.AnchoredBubble"});OpenLayers.Popup.AnchoredBubble.CORNER_SIZE=5;OpenLayers.Projection=OpenLayers.Class({proj:null,projCode:null,initialize:function(b,a){OpenLayers.Util.extend(this,a);this.projCode=b;if(window.Proj4js){this.proj=new Proj4js.Proj(b)}},getCode:function(){return this.proj?this.proj.srsCode:this.projCode},getUnits:function(){return this.proj?this.proj.units:null},toString:function(){return this.getCode()},equals:function(a){if(a&&a.getCode){return this.getCode()==a.getCode()}else{return false}},destroy:function(){delete this.proj;delete this.projCode},CLASS_NAME:"OpenLayers.Projection"});OpenLayers.Projection.transforms={};OpenLayers.Projection.addTransform=function(c,b,a){if(!OpenLayers.Projection.transforms[c]){OpenLayers.Projection.transforms[c]={}}OpenLayers.Projection.transforms[c][b]=a};OpenLayers.Projection.transform=function(a,c,b){if(c.proj&&b.proj){a=Proj4js.transform(c.proj,b.proj,a)}else{if(c&&b&&OpenLayers.Projection.transforms[c.getCode()]&&OpenLayers.Projection.transforms[c.getCode()][b.getCode()]){OpenLayers.Projection.transforms[c.getCode()][b.getCode()](a)}}return a};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(a){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 a="http://www.w3.org/TR/SVG11/feature#";return(document.implementation&&(document.implementation.hasFeature("org.w3c.svg","1.0")||document.implementation.hasFeature(a+"SVG","1.1")||document.implementation.hasFeature(a+"BasicStructure","1.1")))},inValidRange:function(a,e,b){var d=a+(b?0:this.translationParameters.x);var c=e+(b?0:this.translationParameters.y);return(d>=-this.MAX_PIXEL&&d<=this.MAX_PIXEL&&c>=-this.MAX_PIXEL&&c<=this.MAX_PIXEL)},setExtent:function(b,d){OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments);var a=this.getResolution();var f=-b.left/a;var e=b.top/a;if(d){this.left=f;this.top=e;var c="0 0 "+this.size.w+" "+this.size.h;this.rendererRoot.setAttributeNS(null,"viewBox",c);this.translate(0,0);return true}else{var g=this.translate(f-this.left,e-this.top);if(!g){this.setExtent(b,true)}return g}},translate:function(a,c){if(!this.inValidRange(a,c,true)){return false}else{var b="";if(a||c){b="translate("+a+","+c+")"}this.root.setAttributeNS(null,"transform",b);this.translationParameters={x:a,y:c};return true}},setSize:function(a){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(c,b){var a=null;switch(c.CLASS_NAME){case"OpenLayers.Geometry.Point":if(b.externalGraphic){a="image"}else{if(this.isComplexSymbol(b.graphicName)){a="use"}else{a="circle"}}break;case"OpenLayers.Geometry.Rectangle":a="rect";break;case"OpenLayers.Geometry.LineString":a="polyline";break;case"OpenLayers.Geometry.LinearRing":a="polygon";break;case"OpenLayers.Geometry.Polygon":case"OpenLayers.Geometry.Curve":case"OpenLayers.Geometry.Surface":a="path";break;default:break}return a},setStyle:function(n,q,b){q=q||n._style;b=b||n._options;var i=parseFloat(n.getAttributeNS(null,"r"));var h=1;var d;if(n._geometryClass=="OpenLayers.Geometry.Point"&&i){n.style.visibility="";if(q.graphic===false){n.style.visibility="hidden"}else{if(q.externalGraphic){d=this.getPosition(n);if(q.graphicTitle){n.setAttributeNS(null,"title",q.graphicTitle)}if(q.graphicWidth&&q.graphicHeight){n.setAttributeNS(null,"preserveAspectRatio","none")}var m=q.graphicWidth||q.graphicHeight;var k=q.graphicHeight||q.graphicWidth;m=m?m:q.pointRadius*2;k=k?k:q.pointRadius*2;var s=(q.graphicXOffset!=undefined)?q.graphicXOffset:-(0.5*m);var e=(q.graphicYOffset!=undefined)?q.graphicYOffset:-(0.5*k);var a=q.graphicOpacity||q.fillOpacity;n.setAttributeNS(null,"x",(d.x+s).toFixed());n.setAttributeNS(null,"y",(d.y+e).toFixed());n.setAttributeNS(null,"width",m);n.setAttributeNS(null,"height",k);n.setAttributeNS(this.xlinkns,"href",q.externalGraphic);n.setAttributeNS(null,"style","opacity: "+a)}else{if(this.isComplexSymbol(q.graphicName)){var c=q.pointRadius*3;var j=c*2;var l=this.importSymbol(q.graphicName);var p="#"+l;d=this.getPosition(n);h=this.symbolSize[l]/j;var f=n.parentNode;var g=n.nextSibling;if(f){f.removeChild(n)}n.setAttributeNS(this.xlinkns,"href",p);n.setAttributeNS(null,"width",j);n.setAttributeNS(null,"height",j);n.setAttributeNS(null,"x",d.x-c);n.setAttributeNS(null,"y",d.y-c);if(g){f.insertBefore(n,g)}else{if(f){f.appendChild(n)}}}else{n.setAttributeNS(null,"r",q.pointRadius)}}}if(typeof q.rotation!="undefined"&&d){var o=OpenLayers.String.format("rotate(${0} ${1} ${2})",[q.rotation,d.x,d.y]);n.setAttributeNS(null,"transform",o)}}if(b.isFilled){n.setAttributeNS(null,"fill",q.fillColor);n.setAttributeNS(null,"fill-opacity",q.fillOpacity)}else{n.setAttributeNS(null,"fill","none")}if(b.isStroked){n.setAttributeNS(null,"stroke",q.strokeColor);n.setAttributeNS(null,"stroke-opacity",q.strokeOpacity);n.setAttributeNS(null,"stroke-width",q.strokeWidth*h);n.setAttributeNS(null,"stroke-linecap",q.strokeLinecap);n.setAttributeNS(null,"stroke-linejoin","round");n.setAttributeNS(null,"stroke-dasharray",this.dashStyle(q,h))}else{n.setAttributeNS(null,"stroke","none")}if(q.pointerEvents){n.setAttributeNS(null,"pointer-events",q.pointerEvents)}if(q.cursor!=null){n.setAttributeNS(null,"cursor",q.cursor)}return n},dashStyle:function(c,b){var a=c.strokeWidth*b;switch(c.strokeDashstyle){case"solid":return"none";case"dot":return[1,4*a].join();case"dash":return[4*a,4*a].join();case"dashdot":return[4*a,4*a,1,4*a].join();case"longdash":return[8*a,4*a].join();case"longdashdot":return[8*a,4*a,1,4*a].join();default:return c.strokeDashstyle.replace(/ /g,",")}},createNode:function(a,c){var b=document.createElementNS(this.xmlns,a);if(c){b.setAttributeNS(null,"id",c)}return b},nodeTypeCompare:function(b,a){return(a==b.nodeName)},createRenderRoot:function(){return this.nodeFactory(this.container.id+"_svgRoot","svg")},createRoot:function(a){return this.nodeFactory(this.container.id+a,"g")},createDefs:function(){var a=this.nodeFactory(this.container.id+"_defs","defs");this.rendererRoot.appendChild(a);return a},drawPoint:function(a,b){return this.drawCircle(a,b,1)},drawCircle:function(d,e,b){var c=this.getResolution();var a=(e.x/c+this.left);var f=(this.top-e.y/c);if(this.inValidRange(a,f)){d.setAttributeNS(null,"cx",a);d.setAttributeNS(null,"cy",f);d.setAttributeNS(null,"r",b);return d}else{return false}},drawLineString:function(b,c){var a=this.getComponentsString(c.components);if(a.path){b.setAttributeNS(null,"points",a.path);return(a.complete?b:null)}else{return false}},drawLinearRing:function(b,c){var a=this.getComponentsString(c.components);if(a.path){b.setAttributeNS(null,"points",a.path);return(a.complete?b:null)}else{return false}},drawPolygon:function(b,h){var g="";var i=true;var a=true;var c,k;for(var e=0,f=h.components.length;e<f;e++){g+=" M";c=this.getComponentsString(h.components[e].components," ");k=c.path;if(k){g+=" "+k;a=c.complete&&a}else{i=false}}g+=" z";if(i){b.setAttributeNS(null,"d",g);b.setAttributeNS(null,"fill-rule","evenodd");return a?b:null}else{return false}},drawRectangle:function(c,d){var b=this.getResolution();var a=(d.x/b+this.left);var e=(this.top-d.y/b);if(this.inValidRange(a,e)){c.setAttributeNS(null,"x",a);c.setAttributeNS(null,"y",e);c.setAttributeNS(null,"width",d.width/b);c.setAttributeNS(null,"height",d.height/b);return c}else{return false}},drawSurface:function(f,h){var g=null;var b=true;for(var e=0,a=h.components.length;e<a;e++){if((e%3)==0&&(e/3)==0){var c=this.getShortString(h.components[e]);if(!c){b=false}g="M "+c}else{if((e%3)==1){var c=this.getShortString(h.components[e]);if(!c){b=false}g+=" C "+c}else{var c=this.getShortString(h.components[e]);if(!c){b=false}g+=" "+c}}}g+=" Z";if(b){f.setAttributeNS(null,"d",g);return f}else{return false}},drawText:function(c,a,i){var b=this.getResolution();var h=(i.x/b+this.left);var e=(i.y/b-this.top);var g=this.nodeFactory(c+this.LABEL_ID_SUFFIX,"text");var f=this.nodeFactory(c+this.LABEL_ID_SUFFIX+"_tspan","tspan");g.setAttributeNS(null,"x",h);g.setAttributeNS(null,"y",-e);g.setAttributeNS(null,"pointer-events","none");if(a.fontColor){g.setAttributeNS(null,"fill",a.fontColor)}if(a.fontFamily){g.setAttributeNS(null,"font-family",a.fontFamily)}if(a.fontSize){g.setAttributeNS(null,"font-size",a.fontSize)}if(a.fontWeight){g.setAttributeNS(null,"font-weight",a.fontWeight)}var d=a.labelAlign||"cm";g.setAttributeNS(null,"text-anchor",OpenLayers.Renderer.SVG.LABEL_ALIGN[d[0]]||"middle");if(this.isGecko){g.setAttributeNS(null,"dominant-baseline",OpenLayers.Renderer.SVG.LABEL_ALIGN[d[1]]||"central")}else{f.setAttributeNS(null,"baseline-shift",OpenLayers.Renderer.SVG.LABEL_VSHIFT[d[1]]||"-35%")}f.textContent=a.label;if(!g.parentNode){g.appendChild(f);this.textRoot.appendChild(g)}},getComponentsString:function(e,d){var g=[];var a=true;var f=e.length;var l=[];var h,k,b;for(var c=0;c<f;c++){k=e[c];g.push(k);h=this.getShortString(k);if(h){l.push(h)}else{if(c>0){if(this.getShortString(e[c-1])){l.push(this.clipLine(e[c],e[c-1]))}}if(c<f-1){if(this.getShortString(e[c+1])){l.push(this.clipLine(e[c],e[c+1]))}}a=false}}return{path:l.join(d||","),complete:a}},clipLine:function(e,h){if(h.equals(e)){return""}var f=this.getResolution();var b=this.MAX_PIXEL-this.translationParameters.x;var a=this.MAX_PIXEL-this.translationParameters.y;var d=h.x/f+this.left;var j=this.top-h.y/f;var c=e.x/f+this.left;var i=this.top-e.y/f;var g;if(c<-b||c>b){g=(i-j)/(c-d);c=c<0?-b:b;i=j+(c-d)*g}if(i<-a||i>a){g=(c-d)/(i-j);i=i<0?-a:a;c=d+(i-j)*g}return c+","+i},getShortString:function(b){var c=this.getResolution();var a=(b.x/c+this.left);var d=(this.top-b.y/c);if(this.inValidRange(a,d)){return a+","+d}else{return false}},getPosition:function(a){return({x:parseFloat(a.getAttributeNS(null,"cx")),y:parseFloat(a.getAttributeNS(null,"cy"))})},importSymbol:function(e){if(!this.defs){this.defs=this.createDefs()}var b=this.container.id+"-"+e;if(document.getElementById(b)!=null){return b}var d=OpenLayers.Renderer.symbol[e];if(!d){throw new Error(e+" is not a valid symbol name");return}var g=this.nodeFactory(b,"symbol");var c=this.nodeFactory(null,"polygon");g.appendChild(c);var m=new OpenLayers.Bounds(Number.MAX_VALUE,Number.MAX_VALUE,0,0);var k="";var j,h;for(var f=0;f<d.length;f=f+2){j=d[f];h=d[f+1];m.left=Math.min(m.left,j);m.bottom=Math.min(m.bottom,h);m.right=Math.max(m.right,j);m.top=Math.max(m.top,h);k+=" "+j+","+h}c.setAttributeNS(null,"points",k);var a=m.getWidth();var l=m.getHeight();var n=[m.left-a,m.bottom-l,a*3,l*3];g.setAttributeNS(null,"viewBox",n.join(" "));this.symbolSize[b]=Math.max(a,l)*3;this.defs.appendChild(g);return g.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(b){if(!this.supported()){return}if(!document.namespaces.olv){document.namespaces.add("olv",this.xmlns);var e=document.createStyleSheet();var c=["shape","rect","oval","fill","stroke","imagedata","group","textbox"];for(var d=0,a=c.length;d<a;d++){e.addRule("olv\\:"+c[d],"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(j,a){OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments);var c=this.getResolution();var b=j.left/c;var f=j.top/c-this.size.h;if(a){this.offset={x:b,y:f};b=0;f=0}else{b=b-this.offset.x;f=f-this.offset.y}var l=b+" "+f;this.root.coordorigin=l;var h=[this.root,this.vectorRoot,this.textRoot];var g;for(var d=0,e=h.length;d<e;++d){g=h[d];var k=this.size.w+" "+this.size.h;g.coordsize=k}this.root.style.flip="y";return true},setSize:function(f){OpenLayers.Renderer.prototype.setSize.apply(this,arguments);var d=[this.rendererRoot,this.root,this.vectorRoot,this.textRoot];var c=this.size.w+"px";var g=this.size.h+"px";var b;for(var e=0,a=d.length;e<a;++e){b=d[e];b.style.width=c;b.style.height=g}},getNodeType:function(c,b){var a=null;switch(c.CLASS_NAME){case"OpenLayers.Geometry.Point":if(b.externalGraphic){a="olv:rect"}else{if(this.isComplexSymbol(b.graphicName)){a="olv:shape"}else{a="olv:oval"}}break;case"OpenLayers.Geometry.Rectangle":a="olv:rect";break;case"OpenLayers.Geometry.LineString":case"OpenLayers.Geometry.LinearRing":case"OpenLayers.Geometry.Polygon":case"OpenLayers.Geometry.Curve":case"OpenLayers.Geometry.Surface":a="olv:shape";break;default:break}return a},setStyle:function(d,b,p,k){b=b||d._style;p=p||d._options;var i=1;if(d._geometryClass=="OpenLayers.Geometry.Point"){if(b.externalGraphic){if(b.graphicTitle){d.title=b.graphicTitle}var c=b.graphicWidth||b.graphicHeight;var l=b.graphicHeight||b.graphicWidth;c=c?c:b.pointRadius*2;l=l?l:b.pointRadius*2;var f=this.getResolution();var h=(b.graphicXOffset!=undefined)?b.graphicXOffset:-(0.5*c);var e=(b.graphicYOffset!=undefined)?b.graphicYOffset:-(0.5*l);d.style.left=((k.x/f-this.offset.x)+h).toFixed();d.style.top=((k.y/f-this.offset.y)-(e+l)).toFixed();d.style.width=c+"px";d.style.height=l+"px";d.style.flip="y";b.fillColor="none";p.isStroked=false}else{if(this.isComplexSymbol(b.graphicName)){var a=this.importSymbol(b.graphicName);d.path=a.path;d.coordorigin=a.left+","+a.bottom;var o=a.size;d.coordsize=o+","+o;this.drawCircle(d,k,b.pointRadius);d.style.flip="y"}else{this.drawCircle(d,k,b.pointRadius)}}}if(p.isFilled){d.fillcolor=b.fillColor}else{d.filled="false"}var j=d.getElementsByTagName("fill");var n=(j.length==0)?null:j[0];if(!p.isFilled){if(n){d.removeChild(n)}}else{if(!n){n=this.createNode("olv:fill",d.id+"_fill")}n.opacity=b.fillOpacity;if(d._geometryClass=="OpenLayers.Geometry.Point"&&b.externalGraphic){if(b.graphicOpacity){n.opacity=b.graphicOpacity}n.src=b.externalGraphic;n.type="frame";if(!(b.graphicWidth&&b.graphicHeight)){n.aspect="atmost"}}if(n.parentNode!=d){d.appendChild(n)}}if(typeof b.rotation!="undefined"){if(b.externalGraphic){this.graphicRotate(d,h,e);n.opacity=0}else{d.style.rotation=b.rotation}}if(p.isStroked){d.strokecolor=b.strokeColor;d.strokeweight=b.strokeWidth+"px"}else{d.stroked=false}var g=d.getElementsByTagName("stroke");var m=(g.length==0)?null:g[0];if(!p.isStroked){if(m){d.removeChild(m)}}else{if(!m){m=this.createNode("olv:stroke",d.id+"_stroke");d.appendChild(m)}m.opacity=b.strokeOpacity;m.endcap=!b.strokeLinecap||b.strokeLinecap=="butt"?"flat":b.strokeLinecap;m.dashstyle=this.dashStyle(b)}if(b.cursor!="inherit"&&b.cursor!=null){d.style.cursor=b.cursor}return d},graphicRotate:function(n,r,f){var q=q||n._style;var d=n._options;var a,j;if(!(q.graphicWidth&&q.graphicHeight)){var s=new Image();s.onreadystatechange=OpenLayers.Function.bind(function(){if(s.readyState=="complete"||s.readyState=="interactive"){a=s.width/s.height;j=Math.max(q.pointRadius*2,q.graphicWidth||0,q.graphicHeight||0);r=r*a;q.graphicWidth=j*a;q.graphicHeight=j;this.graphicRotate(n,r,f)}},this);s.src=q.externalGraphic;return}else{j=Math.max(q.graphicWidth,q.graphicHeight);a=q.graphicWidth/q.graphicHeight}var m=Math.round(q.graphicWidth||j*a);var k=Math.round(q.graphicHeight||j);n.style.width=m+"px";n.style.height=k+"px";var l=document.getElementById(n.id+"_image");if(!l){l=this.createNode("olv:imagedata",n.id+"_image");n.appendChild(l)}l.style.width=m+"px";l.style.height=k+"px";l.src=q.externalGraphic;l.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='', sizingMethod='scale')";var o=q.rotation*Math.PI/180;var h=Math.sin(o);var e=Math.cos(o);var g="progid:DXImageTransform.Microsoft.Matrix(M11="+e+",M12="+(-h)+",M21="+h+",M22="+e+",SizingMethod='auto expand')\n";var b=q.graphicOpacity||q.fillOpacity;if(b&&b!=1){g+="progid:DXImageTransform.Microsoft.BasicImage(opacity="+b+")\n"}n.style.filter=g;var p=new OpenLayers.Geometry.Point(-r,-f);var c=new OpenLayers.Bounds(0,0,m,k).toGeometry();c.rotate(q.rotation,p);var i=c.getBounds();n.style.left=Math.round(parseInt(n.style.left)+i.left)+"px";n.style.top=Math.round(parseInt(n.style.top)-i.bottom)+"px"},postDraw:function(a){var c=a._style.fillColor;var b=a._style.strokeColor;if(c=="none"&&a.fillcolor!=c){a.fillcolor=c}if(b=="none"&&a.strokecolor!=b){a.strokecolor=b}},setNodeDimension:function(b,e){var d=e.getBounds();if(d){var a=this.getResolution();var c=new OpenLayers.Bounds((d.left/a-this.offset.x).toFixed(),(d.bottom/a-this.offset.y).toFixed(),(d.right/a-this.offset.x).toFixed(),(d.top/a-this.offset.y).toFixed());b.style.left=c.left+"px";b.style.top=c.top+"px";b.style.width=c.getWidth()+"px";b.style.height=c.getHeight()+"px";b.coordorigin=c.left+" "+c.top;b.coordsize=c.getWidth()+" "+c.getHeight()}},dashStyle:function(a){var c=a.strokeDashstyle;switch(c){case"solid":case"dot":case"dash":case"dashdot":case"longdash":case"longdashdot":return c;default:var b=c.split(/[ ,]/);if(b.length==2){if(1*b[0]>=2*b[1]){return"longdash"}return(b[0]==1||b[1]==1)?"dot":"dash"}else{if(b.length==4){return(1*b[0]>=2*b[1])?"longdashdot":"dashdot"}}return"solid"}},createNode:function(a,c){var b=document.createElement(a);if(c){b.id=c}b.unselectable="on";b.onselectstart=function(){return(false)};return b},nodeTypeCompare:function(c,b){var d=b;var a=d.indexOf(":");if(a!=-1){d=d.substr(a+1)}var e=c.nodeName;a=e.indexOf(":");if(a!=-1){e=e.substr(a+1)}return(d==e)},createRenderRoot:function(){return this.nodeFactory(this.container.id+"_vmlRoot","div")},createRoot:function(a){return this.nodeFactory(this.container.id+a,"olv:group")},drawPoint:function(a,b){return this.drawCircle(a,b,1)},drawCircle:function(d,e,a){if(!isNaN(e.x)&&!isNaN(e.y)){var b=this.getResolution();d.style.left=((e.x/b-this.offset.x).toFixed()-a)+"px";d.style.top=((e.y/b-this.offset.y).toFixed()-a)+"px";var c=a*2;d.style.width=c+"px";d.style.height=c+"px";return d}return false},drawLineString:function(a,b){return this.drawLine(a,b,false)},drawLinearRing:function(a,b){return this.drawLine(a,b,true)},drawLine:function(b,k,g){this.setNodeDimension(b,k);var c=this.getResolution();var a=k.components.length;var e=new Array(a);var h,l,j;for(var f=0;f<a;f++){h=k.components[f];l=(h.x/c-this.offset.x);j=(h.y/c-this.offset.y);e[f]=" "+l.toFixed()+","+j.toFixed()+" l "}var d=(g)?" x e":" e";b.path="m"+e.join("")+d;return b},drawPolygon:function(b,l){this.setNodeDimension(b,l);var c=this.getResolution();var n=[];var f,e,d,h,a,g,m,k;for(d=0,h=l.components.length;d<h;d++){f=l.components[d];n.push("m");for(e=0,a=f.components.length;e<a;e++){g=f.components[e];m=g.x/c-this.offset.x;k=g.y/c-this.offset.y;n.push(" "+m.toFixed()+","+k.toFixed());if(e==0){n.push(" l")}}n.push(" x ")}n.push("e");b.path=n.join("");return b},drawRectangle:function(b,c){var a=this.getResolution();b.style.left=(c.x/a-this.offset.x)+"px";b.style.top=(c.y/a-this.offset.y)+"px";b.style.width=c.width/a+"px";b.style.height=c.height/a+"px";return b},drawText:function(d,a,h){var g=this.nodeFactory(d+this.LABEL_ID_SUFFIX,"olv:rect");var f=this.nodeFactory(d+this.LABEL_ID_SUFFIX+"_textbox","olv:textbox");var c=this.getResolution();g.style.left=(h.x/c-this.offset.x).toFixed()+"px";g.style.top=(h.y/c-this.offset.y).toFixed()+"px";g.style.flip="y";f.innerText=a.label;if(a.fillColor){f.style.color=a.fontColor}if(a.fontFamily){f.style.fontFamily=a.fontFamily}if(a.fontSize){f.style.fontSize=a.fontSize}if(a.fontWeight){f.style.fontWeight=a.fontWeight}f.style.whiteSpace="nowrap";f.inset="1px,0px,0px,0px";if(!g.parentNode){g.appendChild(f);this.textRoot.appendChild(g)}var e=a.labelAlign||"cm";var i=f.clientWidth*(OpenLayers.Renderer.VML.LABEL_SHIFT[e.substr(0,1)]);var b=f.clientHeight*(OpenLayers.Renderer.VML.LABEL_SHIFT[e.substr(1,1)]);g.style.left=parseInt(g.style.left)-i-1+"px";g.style.top=parseInt(g.style.top)+b+"px"},drawSurface:function(a,g){this.setNodeDimension(a,g);var b=this.getResolution();var j=[];var d,h,f;for(var c=0,e=g.components.length;c<e;c++){d=g.components[c];h=d.x/b-this.offset.x;f=d.y/b-this.offset.y;if((c%3)==0&&(c/3)==0){j.push("m")}else{if((c%3)==1){j.push(" c")}}j.push(" "+h+","+f)}j.push(" x e");a.path=j.join("");return a},moveRoot:function(b){var a=this.map.getLayer(b.container.id);if(a instanceof OpenLayers.Layer.Vector.RootContainer){a=this.map.getLayer(this.container.id)}a&&a.renderer.clear();OpenLayers.Renderer.Elements.prototype.moveRoot.apply(this,arguments);a&&a.redraw()},importSymbol:function(d){var b=this.container.id+"-"+d;var a=this.symbolCache[b];if(a){return a}var c=OpenLayers.Renderer.symbol[d];if(!c){throw new Error(d+" is not a valid symbol name");return}var h=new OpenLayers.Bounds(Number.MAX_VALUE,Number.MAX_VALUE,0,0);var e=["m"];for(var f=0;f<c.length;f=f+2){x=c[f];y=c[f+1];h.left=Math.min(h.left,x);h.bottom=Math.min(h.bottom,y);h.right=Math.max(h.right,x);h.top=Math.max(h.top,y);e.push(x);e.push(y);if(f==0){e.push("l")}}e.push("x e");var j=e.join(" ");var g=(h.getWidth()-h.getHeight())/2;if(g>0){h.bottom=h.bottom-g;h.top=h.top+g}else{h.left=h.left-g;h.right=h.right+g}a={path:j,size:h.getWidth(),left:h.left,bottom:h.bottom};this.symbolCache[b]=a;return a},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.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(a){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(b){OpenLayers.Control.prototype.draw.apply(this,arguments);b=this.position.clone();this.buttons=[];var d=new OpenLayers.Size(18,18);var a=new OpenLayers.Pixel(b.x+d.w/2,b.y);var c=d.w;if(this.zoomWorldIcon){a=new OpenLayers.Pixel(b.x+d.w,b.y)}this._addButton("panup","north-mini.png",a,d);b.y=a.y+d.h;this._addButton("panleft","west-mini.png",b,d);if(this.zoomWorldIcon){this._addButton("zoomworld","zoom-world-mini.png",b.add(d.w,0),d);c*=2}this._addButton("panright","east-mini.png",b.add(c,0),d);this._addButton("pandown","south-mini.png",a.add(0,d.h*2),d);this._addButton("zoomin","zoom-plus-mini.png",a.add(0,d.h*3+5),d);a=this._addZoomBar(a.add(0,d.h*4+5));this._addButton("zoomout","zoom-minus-mini.png",a,d);return this.div},_addZoomBar:function(a){var e=OpenLayers.Util.getImagesLocation();var g=this.id+"_"+this.map.id;var b=this.map.getNumZoomLevels()-1-this.map.getZoom();var c=OpenLayers.Util.createAlphaImageDiv(g,a.add(-1,b*this.zoomStopHeight),new OpenLayers.Size(20,9),e+"slider.png","absolute");this.slider=c;this.sliderEvents=new OpenLayers.Events(this,c,null,true,{includeXY:true});this.sliderEvents.on({mousedown:this.zoomBarDown,mousemove:this.zoomBarDrag,mouseup:this.zoomBarUp,dblclick:this.doubleClick,click:this.doubleClick});var d=new OpenLayers.Size();d.h=this.zoomStopHeight*this.map.getNumZoomLevels();d.w=this.zoomStopWidth;var f=null;if(OpenLayers.Util.alphaHack()){var g=this.id+"_"+this.map.id;f=OpenLayers.Util.createAlphaImageDiv(g,a,new OpenLayers.Size(d.w,this.zoomStopHeight),e+"zoombar.png","absolute",null,"crop");f.style.height=d.h+"px"}else{f=OpenLayers.Util.createDiv("OpenLayers_Control_PanZoomBar_Zoombar"+this.map.id,a,d,e+"zoombar.png")}this.zoombarDiv=f;this.divEvents=new OpenLayers.Events(this,f,null,true,{includeXY:true});this.divEvents.on({mousedown:this.divClick,mousemove:this.passEventToSlider,dblclick:this.doubleClick,click:this.doubleClick});this.div.appendChild(f);this.startTop=parseInt(f.style.top);this.div.appendChild(c);this.map.events.register("zoomend",this,this.moveZoomBar);a=a.add(0,this.zoomStopHeight*this.map.getNumZoomLevels());return a},_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(a){this.sliderEvents.handleBrowserEvent(a)},divClick:function(a){if(!OpenLayers.Event.isLeftClick(a)){return}var e=a.xy.y;var d=OpenLayers.Util.pagePosition(a.object)[1];var c=(e-d)/this.zoomStopHeight;if(!this.map.fractionalZoom){c=Math.floor(c)}var b=(this.map.getNumZoomLevels()-1)-c;b=Math.min(Math.max(b,0),this.map.getNumZoomLevels()-1);this.map.zoomTo(b);OpenLayers.Event.stop(a)},zoomBarDown:function(a){if(!OpenLayers.Event.isLeftClick(a)){return}this.map.events.on({mousemove:this.passEventToSlider,mouseup:this.passEventToSlider,scope:this});this.mouseDragStart=a.xy.clone();this.zoomStart=a.xy.clone();this.div.style.cursor="move";this.zoombarDiv.offsets=null;OpenLayers.Event.stop(a)},zoomBarDrag:function(b){if(this.mouseDragStart!=null){var a=this.mouseDragStart.y-b.xy.y;var d=OpenLayers.Util.pagePosition(this.zoombarDiv);if((b.clientY-d[1])>0&&(b.clientY-d[1])<parseInt(this.zoombarDiv.style.height)-2){var c=parseInt(this.slider.style.top)-a;this.slider.style.top=c+"px";this.mouseDragStart=b.xy.clone()}OpenLayers.Event.stop(b)}},zoomBarUp:function(b){if(!OpenLayers.Event.isLeftClick(b)){return}if(this.zoomStart){this.div.style.cursor="";this.map.events.un({mouseup:this.passEventToSlider,mousemove:this.passEventToSlider,scope:this});var a=this.zoomStart.y-b.xy.y;var c=this.map.zoom;if(this.map.fractionalZoom){c+=a/this.zoomStopHeight;c=Math.min(Math.max(c,0),this.map.getNumZoomLevels()-1)}else{c+=Math.round(a/this.zoomStopHeight)}this.map.zoomTo(c);this.moveZoomBar();this.mouseDragStart=null;OpenLayers.Event.stop(b)}},moveZoomBar:function(){var a=((this.map.getNumZoomLevels()-1)-this.map.getZoom())*this.zoomStopHeight+this.startTop+1;this.slider.style.top=a+"px"},CLASS_NAME:"OpenLayers.Control.PanZoomBar"});OpenLayers.Format.XML=OpenLayers.Class(OpenLayers.Format,{namespaces:null,namespaceAlias:null,defaultPrefix:null,readers:{},writers:{},xmldom:null,initialize:function(a){if(window.ActiveXObject){this.xmldom=new ActiveXObject("Microsoft.XMLDOM")}OpenLayers.Format.prototype.initialize.apply(this,[a]);this.namespaces=OpenLayers.Util.extend({},this.namespaces);this.namespaceAlias={};for(var b in this.namespaces){this.namespaceAlias[this.namespaces[b]]=b}},destroy:function(){this.xmldom=null;OpenLayers.Format.prototype.destroy.apply(this,arguments)},setNamespace:function(a,b){this.namespaces[a]=b;this.namespaceAlias[b]=a},read:function(c){var a=c.indexOf("<");if(a>0){c=c.substring(a)}var b=OpenLayers.Util.Try(OpenLayers.Function.bind((function(){var d;if(window.ActiveXObject&&!this.xmldom){d=new ActiveXObject("Microsoft.XMLDOM")}else{d=this.xmldom}d.loadXML(c);return d}),this),function(){return new DOMParser().parseFromString(c,"text/xml")},function(){var d=new XMLHttpRequest();d.open("GET","data:text/xml;charset=utf-8,"+encodeURIComponent(c),false);if(d.overrideMimeType){d.overrideMimeType("text/xml")}d.send(null);return d.responseXML});if(this.keepData){this.data=b}return b},write:function(b){var c;if(this.xmldom){c=b.xml}else{var a=new XMLSerializer();if(b.nodeType==1){var d=document.implementation.createDocument("","",null);if(d.importNode){b=d.importNode(b,true)}d.appendChild(b);c=a.serializeToString(d)}else{c=a.serializeToString(b)}}return c},createElementNS:function(c,a){var b;if(this.xmldom){if(typeof c=="string"){b=this.xmldom.createNode(1,a,c)}else{b=this.xmldom.createNode(1,a,"")}}else{b=document.createElementNS(c,a)}return b},createTextNode:function(b){var a;if(this.xmldom){a=this.xmldom.createTextNode(b)}else{a=document.createTextNode(b)}return a},getElementsByTagNameNS:function(e,d,c){var a=[];if(e.getElementsByTagNameNS){a=e.getElementsByTagNameNS(d,c)}else{var b=e.getElementsByTagName("*");var j,f;for(var g=0,h=b.length;g<h;++g){j=b[g];f=(j.prefix)?(j.prefix+":"+c):c;if((c=="*")||(f==j.nodeName)){if((d=="*")||(d==j.namespaceURI)){a.push(j)}}}}return a},getAttributeNodeNS:function(c,b,a){var j=null;if(c.getAttributeNodeNS){j=c.getAttributeNodeNS(b,a)}else{var e=c.attributes;var h,d;for(var f=0,g=e.length;f<g;++f){h=e[f];if(h.namespaceURI==b){d=(h.prefix)?(h.prefix+":"+a):a;if(d==h.nodeName){j=h;break}}}}return j},getAttributeNS:function(e,d,a){var b="";if(e.getAttributeNS){b=e.getAttributeNS(d,a)||""}else{var c=this.getAttributeNodeNS(e,d,a);if(c){b=c.nodeValue}}return b},getChildValue:function(a,c){var b=c||"";if(a){for(var d=a.firstChild;d;d=d.nextSibling){switch(d.nodeType){case 3:case 4:b+=d.nodeValue}}}return b},concatChildValues:function(b,d){var c="";var e=b.firstChild;var a;while(e){a=e.nodeValue;if(a){c+=a}e=e.nextSibling}if(c==""&&d!=undefined){c=d}return c},isSimpleContent:function(a){var c=true;for(var b=a.firstChild;b;b=b.nextSibling){if(b.nodeType===1){c=false;break}}return c},contentType:function(c){var e=false,b=false;var a=OpenLayers.Format.XML.CONTENT_TYPE.EMPTY;for(var d=c.firstChild;d;d=d.nextSibling){switch(d.nodeType){case 1:b=true;break;case 8:break;default:e=true}if(b&&e){break}}if(b&&e){a=OpenLayers.Format.XML.CONTENT_TYPE.MIXED}else{if(b){return OpenLayers.Format.XML.CONTENT_TYPE.COMPLEX}else{if(e){return OpenLayers.Format.XML.CONTENT_TYPE.SIMPLE}}}return a},hasAttributeNS:function(c,b,a){var d=false;if(c.hasAttributeNS){d=c.hasAttributeNS(b,a)}else{d=!!this.getAttributeNodeNS(c,b,a)}return d},setAttributeNS:function(d,c,a,e){if(d.setAttributeNS){d.setAttributeNS(c,a,e)}else{if(this.xmldom){if(c){var b=d.ownerDocument.createNode(2,a,c);b.nodeValue=e;d.setAttributeNode(b)}else{d.setAttribute(a,e)}}else{throw"setAttributeNS not implemented"}}},createElementNSPlus:function(b,a){a=a||{};var d=a.uri||this.namespaces[a.prefix];if(!d){var f=b.indexOf(":");d=this.namespaces[b.substring(0,f)]}if(!d){d=this.namespaces[this.defaultPrefix]}var c=this.createElementNS(d,b);if(a.attributes){this.setAttributes(c,a.attributes)}var e=a.value;if(e!=null){if(typeof e=="boolean"){e=String(e)}c.appendChild(this.createTextNode(e))}return c},setAttributes:function(c,e){var d,b;for(var a in e){if(e[a]!=null&&e[a].toString){d=e[a].toString();b=this.namespaces[a.substring(0,a.indexOf(":"))]||null;this.setAttributeNS(c,b,a,d)}}},readNode:function(c,e){if(!e){e={}}var d=this.readers[this.namespaceAlias[c.namespaceURI]];if(d){var b=c.localName||c.nodeName.split(":").pop();var a=d[b]||d["*"];if(a){a.apply(this,[c,e])}}return e},readChildNodes:function(d,e){if(!e){e={}}var c=d.childNodes;var f;for(var b=0,a=c.length;b<a;++b){f=c[b];if(f.nodeType==1){this.readNode(f,e)}}return e},writeNode:function(a,f,d){var e,c;var b=a.indexOf(":");if(b>0){e=a.substring(0,b);c=a.substring(b+1)}else{if(d){e=this.namespaceAlias[d.namespaceURI]}else{e=this.defaultPrefix}c=a}var g=this.writers[e][c].apply(this,[f]);if(d){d.appendChild(g)}return g},getChildEl:function(c,a,b){return c&&this.getThisOrNextEl(c.firstChild,a,b)},getNextEl:function(c,a,b){return c&&this.getThisOrNextEl(c.nextSibling,a,b)},getThisOrNextEl:function(d,a,c){outer:for(var b=d;b;b=b.nextSibling){switch(b.nodeType){case 1:if((!a||a===(b.localName||b.nodeName.split(":").pop()))&&(!c||c===b.namespaceURI)){break outer}b=null;break outer;case 3:if(/^\s*$/.test(b.nodeValue)){break}case 4:case 6:case 12:case 10:case 11:b=null;break outer}}return b||null},lookupNamespaceURI:function(e,f){var d=null;if(e){if(e.lookupNamespaceURI){d=e.lookupNamespaceURI(f)}else{outer:switch(e.nodeType){case 1:if(e.namespaceURI!==null&&e.prefix===f){d=e.namespaceURI;break outer}var b=e.attributes.length;if(b){var a;for(var c=0;c<b;++c){a=e.attributes[c];if(a.prefix==="xmlns"&&a.name==="xmlns:"+f){d=a.value||null;break outer}else{if(a.name==="xmlns"&&f===null){d=a.value||null;break outer}}}}d=this.lookupNamespaceURI(e.parentNode,f);break outer;case 2:d=this.lookupNamespaceURI(e.ownerElement,f);break outer;case 9:d=this.lookupNamespaceURI(e.documentElement,f);break outer;case 6:case 12:case 10:case 11:break outer;default:d=this.lookupNamespaceURI(e.parentNode,f);break outer}}}return d},CLASS_NAME:"OpenLayers.Format.XML"});OpenLayers.Format.XML.CONTENT_TYPE={EMPTY:0,SIMPLE:1,COMPLEX:2,MIXED:3};OpenLayers.Format.XML.lookupNamespaceURI=OpenLayers.Function.bind(OpenLayers.Format.XML.prototype.lookupNamespaceURI,OpenLayers.Format.XML.prototype);OpenLayers.Handler=OpenLayers.Class({id:null,control:null,map:null,keyMask:null,active:false,evt:null,initialize:function(c,b,a){OpenLayers.Util.extend(this,a);this.control=c;this.callbacks=b;if(c.map){this.setMap(c.map)}OpenLayers.Util.extend(this,a);this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")},setMap:function(a){this.map=a},checkModifiers:function(a){if(this.keyMask==null){return true}var b=(a.shiftKey?OpenLayers.Handler.MOD_SHIFT:0)|(a.ctrlKey?OpenLayers.Handler.MOD_CTRL:0)|(a.altKey?OpenLayers.Handler.MOD_ALT:0);return(b==this.keyMask)},activate:function(){if(this.active){return false}var c=OpenLayers.Events.prototype.BROWSER_EVENTS;for(var b=0,a=c.length;b<a;b++){if(this[c[b]]){this.register(c[b],this[c[b]])}}this.active=true;return true},deactivate:function(){if(!this.active){return false}var c=OpenLayers.Events.prototype.BROWSER_EVENTS;for(var b=0,a=c.length;b<a;b++){if(this[c[b]]){this.unregister(c[b],this[c[b]])}}this.active=false;return true},callback:function(b,a){if(b&&this.callbacks[b]){this.callbacks[b].apply(this.control,a)}},register:function(a,b){this.map.events.registerPriority(a,this,b);this.map.events.registerPriority(a,this,this.setEvent)},unregister:function(a,b){this.map.events.unregister(a,this,b);this.map.events.unregister(a,this,this.setEvent)},setEvent:function(a){this.evt=a;return true},destroy:function(){this.deactivate();this.control=this.map=null},CLASS_NAME:"OpenLayers.Handler"});OpenLayers.Handler.MOD_NONE=0;OpenLayers.Handler.MOD_SHIFT=1;OpenLayers.Handler.MOD_CTRL=2;OpenLayers.Handler.MOD_ALT=4;OpenLayers.Map=OpenLayers.Class({Z_INDEX_BASE:{BaseLayer:100,Overlay:325,Feature:725,Popup:750,Control: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(h,d){if(arguments.length===1&&typeof h==="object"){d=h;h=d&&d.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,d);this.id=OpenLayers.Util.createUniqueID("OpenLayers.Map_");this.div=OpenLayers.Util.getElement(h);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 g=this.div.id+"_OpenLayers_ViewPort";this.viewPortDiv=OpenLayers.Util.createDiv(g,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);g=this.div.id+"_OpenLayers_Container";this.layerContainerDiv=OpenLayers.Util.createDiv(g);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 f=true;var c=document.getElementsByTagName("link");for(var e=0,a=c.length;e<a;++e){if(OpenLayers.Util.isEquivalentUrl(c.item(e).href,this.theme)){f=false;break}}if(f){var b=document.createElement("link");b.setAttribute("rel","stylesheet");b.setAttribute("type","text/css");b.setAttribute("href",this.theme);document.getElementsByTagName("head")[0].appendChild(b)}}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 e=0,a=this.controls.length;e<a;e++){this.addControlToMap(this.controls[e])}this.popups=[];this.unloadDestroy=OpenLayers.Function.bind(this.destroy,this);OpenLayers.Event.observe(window,"unload",this.unloadDestroy)},render:function(a){this.div=OpenLayers.Util.getElement(a);OpenLayers.Element.addClass(this.div,"olMap");this.events.attachToElement(this.div);this.viewPortDiv.parentNode.removeChild(this.viewPortDiv);this.div.appendChild(this.viewPortDiv);this.updateSize()},unloadDestroy:null,updateSizeDestroy:null,destroy:function(){if(!this.unloadDestroy){return false}OpenLayers.Event.stopObserving(window,"unload",this.unloadDestroy);this.unloadDestroy=null;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 a=this.controls.length-1;a>=0;--a){this.controls[a].destroy()}this.controls=null}if(this.layers!=null){for(var a=this.layers.length-1;a>=0;--a){this.layers[a].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(a){OpenLayers.Util.extend(this,a)},getTileSize:function(){return this.tileSize},getBy:function(e,c,a){var d=(typeof a.test=="function");var b=OpenLayers.Array.filter(this[e],function(f){return f[c]==a||(d&&a.test(f[c]))});return b},getLayersBy:function(b,a){return this.getBy("layers",b,a)},getLayersByName:function(a){return this.getLayersBy("name",a)},getLayersByClass:function(a){return this.getLayersBy("CLASS_NAME",a)},getControlsBy:function(b,a){return this.getBy("controls",b,a)},getControlsByClass:function(a){return this.getControlsBy("CLASS_NAME",a)},getLayer:function(e){var b=null;for(var d=0,a=this.layers.length;d<a;d++){var c=this.layers[d];if(c.id==e){b=c;break}}return b},setLayerZIndex:function(b,a){b.setZIndex(this.Z_INDEX_BASE[b.isBaseLayer?"BaseLayer":"Overlay"]+a*5)},resetLayersZIndex:function(){for(var c=0,a=this.layers.length;c<a;c++){var b=this.layers[c];this.setLayerZIndex(b,c)}},addLayer:function(c){for(var b=0,a=this.layers.length;b<a;b++){if(this.layers[b]==c){var d=OpenLayers.i18n("layerAlreadyAdded",{layerName:c.name});OpenLayers.Console.warn(d);return false}}if(this.allOverlays){c.isBaseLayer=false}this.events.triggerEvent("preaddlayer",{layer:c});c.div.className="olLayerDiv";c.div.style.overflow="";this.setLayerZIndex(c,this.layers.length);if(c.isFixed){this.viewPortDiv.appendChild(c.div)}else{this.layerContainerDiv.appendChild(c.div)}this.layers.push(c);c.setMap(this);if(c.isBaseLayer||(this.allOverlays&&!this.baseLayer)){if(this.baseLayer==null){this.setBaseLayer(c)}else{c.setVisibility(false)}}else{c.redraw()}this.events.triggerEvent("addlayer",{layer:c});c.afterAdd()},addLayers:function(c){for(var b=0,a=c.length;b<a;b++){this.addLayer(c[b])}},removeLayer:function(c,e){if(e==null){e=true}if(c.isFixed){this.viewPortDiv.removeChild(c.div)}else{this.layerContainerDiv.removeChild(c.div)}OpenLayers.Util.removeItem(this.layers,c);c.removeMap(this);c.map=null;if(this.baseLayer==c){this.baseLayer=null;if(e){for(var b=0,a=this.layers.length;b<a;b++){var d=this.layers[b];if(d.isBaseLayer||this.allOverlays){this.setBaseLayer(d);break}}}}this.resetLayersZIndex();this.events.triggerEvent("removelayer",{layer:c})},getNumLayers:function(){return this.layers.length},getLayerIndex:function(a){return OpenLayers.Util.indexOf(this.layers,a)},setLayerIndex:function(d,b){var e=this.getLayerIndex(d);if(b<0){b=0}else{if(b>this.layers.length){b=this.layers.length}}if(e!=b){this.layers.splice(e,1);this.layers.splice(b,0,d);for(var c=0,a=this.layers.length;c<a;c++){this.setLayerZIndex(this.layers[c],c)}this.events.triggerEvent("changelayer",{layer:d,property:"order"});if(this.allOverlays){if(b===0){this.setBaseLayer(d)}else{if(this.baseLayer!==this.layers[0]){this.setBaseLayer(this.layers[0])}}}}},raiseLayer:function(b,c){var a=this.getLayerIndex(b)+c;this.setLayerIndex(b,a)},setBaseLayer:function(e){var d=null;if(this.baseLayer){d=this.baseLayer.getExtent()}if(e!=this.baseLayer){if(OpenLayers.Util.indexOf(this.layers,e)!=-1){if(this.baseLayer!=null&&!this.allOverlays){this.baseLayer.setVisibility(false)}this.baseLayer=e;this.viewRequestID++;if(!this.allOverlays){this.baseLayer.visibility=true}var a=this.getCenter();if(a!=null){var b=(d)?d.getCenterLonLat():a;var c=(d)?this.getZoomForExtent(d,true):this.getZoomForResolution(this.resolution,true);this.setCenter(b,c,false,true)}this.events.triggerEvent("changebaselayer",{layer:this.baseLayer})}}},addControl:function(b,a){this.controls.push(b);this.addControlToMap(b,a)},addControlToMap:function(b,a){b.outsideViewport=(b.div!=null);if(this.displayProjection&&!b.displayProjection){b.displayProjection=this.displayProjection}b.setMap(this);var c=b.draw(a);if(c){if(!b.outsideViewport){c.style.zIndex=this.Z_INDEX_BASE.Control+this.controls.length;this.viewPortDiv.appendChild(c)}}},getControl:function(e){var b=null;for(var c=0,a=this.controls.length;c<a;c++){var d=this.controls[c];if(d.id==e){b=d;break}}return b},removeControl:function(a){if((a)&&(a==this.getControl(a.id))){if(a.div&&(a.div.parentNode==this.viewPortDiv)){this.viewPortDiv.removeChild(a.div)}OpenLayers.Util.removeItem(this.controls,a)}},addPopup:function(a,d){if(d){for(var b=this.popups.length-1;b>=0;--b){this.removePopup(this.popups[b])}}a.map=this;this.popups.push(a);var c=a.draw();if(c){c.style.zIndex=this.Z_INDEX_BASE.Popup+this.popups.length;this.layerContainerDiv.appendChild(c)}},removePopup:function(a){OpenLayers.Util.removeItem(this.popups,a);if(a.div){try{this.layerContainerDiv.removeChild(a.div)}catch(b){}}a.map=null},getSize:function(){var a=null;if(this.size!=null){a=this.size.clone()}return a},updateSize:function(){this.events.clearMouseCache();var c=this.getCurrentSize();var f=this.getSize();if(f==null){this.size=f=c}if(!c.equals(f)){this.size=c;for(var d=0,b=this.layers.length;d<b;d++){this.layers[d].onMapResize()}if(this.baseLayer!=null){var a=new OpenLayers.Pixel(c.w/2,c.h/2);var g=this.getLonLatFromViewPortPx(a);var e=this.getZoom();this.zoom=null;this.setCenter(this.getCenter(),e)}}},getCurrentSize:function(){var a=new OpenLayers.Size(this.div.clientWidth,this.div.clientHeight);if(a.w==0&&a.h==0||isNaN(a.w)&&isNaN(a.h)){var b=OpenLayers.Element.getDimensions(this.div);a.w=b.width;a.h=b.height}if(a.w==0&&a.h==0||isNaN(a.w)&&isNaN(a.h)){a.w=parseInt(this.div.style.width);a.h=parseInt(this.div.style.height)}return a},calculateBounds:function(a,b){var e=null;if(a==null){a=this.getCenter()}if(b==null){b=this.getResolution()}if((a!=null)&&(b!=null)){var d=this.getSize();var f=d.w*b;var c=d.h*b;e=new OpenLayers.Bounds(a.lon-f/2,a.lat-c/2,a.lon+f/2,a.lat+c/2)}return e},getCenter:function(){var a=null;if(this.center){a=this.center.clone()}return a},getZoom:function(){return this.zoom},pan:function(d,c,e){e=OpenLayers.Util.applyDefaults(e,{animate:true,dragging:false});var f=this.getViewPortPxFromLonLat(this.getCenter());var b=f.add(d,c);if(!e.dragging||!b.equals(f)){var a=this.getLonLatFromViewPortPx(b);if(e.animate){this.panTo(a)}else{this.setCenter(a,null,e.dragging)}}},panTo:function(b){if(this.panMethod&&this.getExtent().scale(this.panRatio).containsLonLat(b)){if(!this.panTween){this.panTween=new OpenLayers.Tween(this.panMethod)}var a=this.getCenter();if(b.lon==a.lon&&b.lat==a.lat){return}var d={lon:a.lon,lat:a.lat};var c={lon:b.lon,lat:b.lat};this.panTween.start(d,c,this.panDuration,{callbacks:{start:OpenLayers.Function.bind(function(e){this.events.triggerEvent("movestart")},this),eachStep:OpenLayers.Function.bind(function(e){e=new OpenLayers.LonLat(e.lon,e.lat);this.moveTo(e,this.zoom,{dragging:true,noEvent:true})},this),done:OpenLayers.Function.bind(function(e){e=new OpenLayers.LonLat(e.lon,e.lat);this.moveTo(e,this.zoom,{noEvent:true});this.events.triggerEvent("moveend")},this)}})}else{this.setCenter(b)}},setCenter:function(c,a,b,d){this.moveTo(c,a,{dragging:b,forceZoomChange:d,caller:"setCenter"})},moveTo:function(g,n,q){if(!q){q={}}var m=q.dragging;var c=q.forceZoomChange;var h=q.noEvent;if(this.panTween&&q.caller=="setCenter"){this.panTween.stop()}if(!this.center&&!this.isValidLonLat(g)){g=this.maxExtent.getCenterLonLat()}if(this.restrictedExtent!=null){if(g==null){g=this.getCenter()}if(n==null){n=this.getZoom()}var d=this.getResolutionForZoom(n);var o=this.calculateBounds(g,d);if(!this.restrictedExtent.containsBounds(o)){var p=this.restrictedExtent.getCenterLonLat();if(o.getWidth()>this.restrictedExtent.getWidth()){g=new OpenLayers.LonLat(p.lon,g.lat)}else{if(o.left<this.restrictedExtent.left){g=g.add(this.restrictedExtent.left-o.left,0)}else{if(o.right>this.restrictedExtent.right){g=g.add(this.restrictedExtent.right-o.right,0)}}}if(o.getHeight()>this.restrictedExtent.getHeight()){g=new OpenLayers.LonLat(g.lon,p.lat)}else{if(o.bottom<this.restrictedExtent.bottom){g=g.add(0,this.restrictedExtent.bottom-o.bottom)}else{if(o.top>this.restrictedExtent.top){g=g.add(0,this.restrictedExtent.top-o.top)}}}}}var b=c||((this.isValidZoomLevel(n))&&(n!=this.getZoom()));var e=(this.isValidLonLat(g))&&(!g.equals(this.center));if(b||e||!m){if(!this.dragging&&!h){this.events.triggerEvent("movestart")}if(e){if((!b)&&(this.center)){this.centerLayerContainer(g)}this.center=g.clone()}if((b)||(this.layerContainerOrigin==null)){this.layerContainerOrigin=this.center.clone();this.layerContainerDiv.style.left="0px";this.layerContainerDiv.style.top="0px"}if(b){this.zoom=n;this.resolution=this.getResolutionForZoom(n);this.viewRequestID++}var a=this.getExtent();if(this.baseLayer.visibility){this.baseLayer.moveTo(a,b,m);if(m){this.baseLayer.events.triggerEvent("move")}else{this.baseLayer.events.triggerEvent("moveend",{zoomChanged:b})}}a=this.baseLayer.getExtent();for(var f=0,k=this.layers.length;f<k;f++){var j=this.layers[f];if(j!==this.baseLayer&&!j.isBaseLayer){var l=j.calculateInRange();if(j.inRange!=l){j.inRange=l;if(!l){j.display(false)}this.events.triggerEvent("changelayer",{layer:j,property:"visibility"})}if(l&&j.visibility){j.moveTo(a,b,m);if(m){j.events.triggerEvent("move")}else{j.events.triggerEvent("moveend",{zoomChanged:b})}}}}if(b){for(var f=0,k=this.popups.length;f<k;f++){this.popups[f].updatePosition()}}this.events.triggerEvent("move");if(b){this.events.triggerEvent("zoomend")}}if(!m&&!h){this.events.triggerEvent("moveend")}this.dragging=!!m},centerLayerContainer:function(b){var a=this.getViewPortPxFromLonLat(this.layerContainerOrigin);var c=this.getViewPortPxFromLonLat(b);if((a!=null)&&(c!=null)){this.layerContainerDiv.style.left=Math.round(a.x-c.x)+"px";this.layerContainerDiv.style.top=Math.round(a.y-c.y)+"px"}},isValidZoomLevel:function(a){return((a!=null)&&(a>=0)&&(a<this.getNumZoomLevels()))},isValidLonLat:function(c){var b=false;if(c!=null){var a=this.getMaxExtent();b=a.containsLonLat(c)}return b},getProjection:function(){var a=this.getProjectionObject();return a?a.getCode():null},getProjectionObject:function(){var a=null;if(this.baseLayer!=null){a=this.baseLayer.projection}return a},getMaxResolution:function(){var a=null;if(this.baseLayer!=null){a=this.baseLayer.maxResolution}return a},getMaxExtent:function(b){var a=null;if(b&&b.restricted&&this.restrictedExtent){a=this.restrictedExtent}else{if(this.baseLayer!=null){a=this.baseLayer.maxExtent}}return a},getNumZoomLevels:function(){var a=null;if(this.baseLayer!=null){a=this.baseLayer.numZoomLevels}return a},getExtent:function(){var a=null;if(this.baseLayer!=null){a=this.baseLayer.getExtent()}return a},getResolution:function(){var a=null;if(this.baseLayer!=null){a=this.baseLayer.getResolution()}return a},getUnits:function(){var a=null;if(this.baseLayer!=null){a=this.baseLayer.units}return a},getScale:function(){var c=null;if(this.baseLayer!=null){var b=this.getResolution();var a=this.baseLayer.units;c=OpenLayers.Util.getScaleFromResolution(b,a)}return c},getZoomForExtent:function(c,b){var a=null;if(this.baseLayer!=null){a=this.baseLayer.getZoomForExtent(c,b)}return a},getResolutionForZoom:function(b){var a=null;if(this.baseLayer){a=this.baseLayer.getResolutionForZoom(b)}return a},getZoomForResolution:function(a,c){var b=null;if(this.baseLayer!=null){b=this.baseLayer.getZoomForResolution(a,c)}return b},zoomTo:function(a){if(this.isValidZoomLevel(a)){this.setCenter(null,a)}},zoomIn:function(){this.zoomTo(this.getZoom()+1)},zoomOut:function(){this.zoomTo(this.getZoom()-1)},zoomToExtent:function(d,c){var b=d.getCenterLonLat();if(this.baseLayer.wrapDateLine){var a=this.getMaxExtent();d=d.clone();while(d.right<d.left){d.right+=a.getWidth()}b=d.getCenterLonLat().wrapDateLine(a)}this.setCenter(b,this.getZoomForExtent(d,c))},zoomToMaxExtent:function(c){var b=(c)?c.restricted:true;var a=this.getMaxExtent({restricted:b});this.zoomToExtent(a)},zoomToScale:function(h,g){var d=OpenLayers.Util.getResolutionFromScale(h,this.baseLayer.units);var c=this.getSize();var f=c.w*d;var b=c.h*d;var a=this.getCenter();var e=new OpenLayers.Bounds(a.lon-f/2,a.lat-b/2,a.lon+f/2,a.lat+b/2);this.zoomToExtent(e,g)},getLonLatFromViewPortPx:function(a){var b=null;if(this.baseLayer!=null){b=this.baseLayer.getLonLatFromViewPortPx(a)}return b},getViewPortPxFromLonLat:function(b){var a=null;if(this.baseLayer!=null){a=this.baseLayer.getViewPortPxFromLonLat(b)}return a},getLonLatFromPixel:function(a){return this.getLonLatFromViewPortPx(a)},getPixelFromLonLat:function(b){var a=this.getViewPortPxFromLonLat(b);a.x=Math.round(a.x);a.y=Math.round(a.y);return a},getViewPortPxFromLayerPx:function(d){var c=null;if(d!=null){var b=parseInt(this.layerContainerDiv.style.left);var a=parseInt(this.layerContainerDiv.style.top);c=d.add(b,a)}return c},getLayerPxFromViewPortPx:function(c){var d=null;if(c!=null){var b=-parseInt(this.layerContainerDiv.style.left);var a=-parseInt(this.layerContainerDiv.style.top);d=c.add(b,a);if(isNaN(d.x)||isNaN(d.y)){d=null}}return d},getLonLatFromLayerPx:function(a){a=this.getViewPortPxFromLayerPx(a);return this.getLonLatFromViewPortPx(a)},getLayerPxFromLonLat:function(b){var a=this.getPixelFromLonLat(b);return this.getLayerPxFromViewPortPx(a)},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(c,b){this.lonlat=c;var a=(b)?b:OpenLayers.Marker.defaultIcon();if(this.icon==null){this.icon=a}else{this.icon.url=a.url;this.icon.size=a.size;this.icon.offset=a.offset;this.icon.calculateOffset=a.calculateOffset}this.events=new OpenLayers.Events(this,this.icon.imageDiv,null)},destroy:function(){this.erase();this.map=null;this.events.destroy();this.events=null;if(this.icon!=null){this.icon.destroy();this.icon=null}},draw:function(a){return this.icon.draw(a)},erase:function(){if(this.icon!=null){this.icon.erase()}},moveTo:function(a){if((a!=null)&&(this.icon!=null)){this.icon.moveTo(a)}this.lonlat=this.map.getLonLatFromLayerPx(a)},isDrawn:function(){var a=(this.icon&&this.icon.isDrawn());return a},onScreen:function(){var b=false;if(this.map){var a=this.map.getExtent();b=a.containsLonLat(this.lonlat)}return b},inflate:function(b){if(this.icon){var a=new OpenLayers.Size(this.icon.size.w*b,this.icon.size.h*b);this.icon.setSize(a)}},setOpacity:function(a){this.icon.setOpacity(a)},setUrl:function(a){this.icon.setUrl(a)},display:function(a){this.icon.display(a)},CLASS_NAME:"OpenLayers.Marker"});OpenLayers.Marker.defaultIcon=function(){var a=OpenLayers.Util.getImagesLocation()+"marker.png";var b=new OpenLayers.Size(21,25);var c=function(d){return new OpenLayers.Pixel(-(d.w/2),-d.h)};return new OpenLayers.Icon(a,b,null,c)};OpenLayers.Request={DEFAULT_CONFIG:{method:"GET",url:window.location.href,async:true,user:undefined,password:undefined,params:null,proxy:OpenLayers.ProxyHost,headers:{},data:null,callback:function(){},success:null,failure:null,scope:null},events:new OpenLayers.Events(this,null,["complete","success","failure"]),issue:function(d){var g=OpenLayers.Util.extend(this.DEFAULT_CONFIG,{proxy:OpenLayers.ProxyHost});d=OpenLayers.Util.applyDefaults(d,g);var f=new OpenLayers.Request.XMLHttpRequest();var a=d.url;if(d.params){var e=OpenLayers.Util.getParameterString(d.params);if(e.length>0){var i=(a.indexOf("?")>-1)?"&":"?";a+=i+e}}if(d.proxy&&(a.indexOf("http")==0)){a=d.proxy+encodeURIComponent(a)}f.open(d.method,a,d.async,d.user,d.password);for(var h in d.headers){f.setRequestHeader(h,d.headers[h])}var b=(d.scope)?OpenLayers.Function.bind(d.callback,d.scope):d.callback;var j;if(d.success){j=(d.scope)?OpenLayers.Function.bind(d.success,d.scope):d.success}var c;if(d.failure){c=(d.scope)?OpenLayers.Function.bind(d.failure,d.scope):d.failure}var k=this.events;f.onreadystatechange=function(){if(f.readyState==OpenLayers.Request.XMLHttpRequest.DONE){var l=k.triggerEvent("complete",{request:f,config:d,requestUrl:a});if(l!==false){b(f);if(!f.status||(f.status>=200&&f.status<300)){k.triggerEvent("success",{request:f,config:d,requestUrl:a});if(j){j(f)}}if(f.status&&(f.status<200||f.status>=300)){k.triggerEvent("failure",{request:f,config:d,requestUrl:a});if(c){c(f)}}}}};if(d.async===false){f.send(d.data)}else{window.setTimeout(function(){f.send(d.data)},0)}return f},GET:function(a){a=OpenLayers.Util.extend(a,{method:"GET"});return OpenLayers.Request.issue(a)},POST:function(a){a=OpenLayers.Util.extend(a,{method:"POST"});a.headers=a.headers?a.headers:{};if(!("CONTENT-TYPE" in OpenLayers.Util.upperCaseObject(a.headers))){a.headers["Content-Type"]="application/xml"}return OpenLayers.Request.issue(a)},PUT:function(a){a=OpenLayers.Util.extend(a,{method:"PUT"});a.headers=a.headers?a.headers:{};if(!("CONTENT-TYPE" in OpenLayers.Util.upperCaseObject(a.headers))){a.headers["Content-Type"]="application/xml"}return OpenLayers.Request.issue(a)},DELETE:function(a){a=OpenLayers.Util.extend(a,{method:"DELETE"});return OpenLayers.Request.issue(a)},HEAD:function(a){a=OpenLayers.Util.extend(a,{method:"HEAD"});return OpenLayers.Request.issue(a)},OPTIONS:function(a){a=OpenLayers.Util.extend(a,{method:"OPTIONS"});return OpenLayers.Request.issue(a)}};OpenLayers.Feature=OpenLayers.Class({layer:null,id:null,lonlat:null,data:null,marker:null,popupClass:OpenLayers.Popup.AnchoredBubble,popup:null,initialize:function(a,c,b){this.layer=a;this.lonlat=c;this.data=(b!=null)?b:{};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 b=false;if((this.layer!=null)&&(this.layer.map!=null)){var a=this.layer.map.getExtent();b=a.containsLonLat(this.lonlat)}return b},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(b){if(this.lonlat!=null){var c=this.id+"_popup";var a=(this.marker)?this.marker.icon:null;if(!this.popup){this.popup=new this.popupClass(c,this.lonlat,this.data.popupSize,this.data.popupContentHTML,a,b)}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(c,b,a){OpenLayers.Handler.prototype.initialize.apply(this,arguments);if(this.pixelTolerance!=null){this.mousedown=function(d){this.down=d.xy;return true}}},mousedown:null,mouseup:function(b){var a=true;if(this.checkModifiers(b)&&this.control.handleRightClicks&&OpenLayers.Event.isRightClick(b)){a=this.rightclick(b)}return a},rightclick:function(b){if(this.passesTolerance(b)){if(this.rightclickTimerId!=null){this.clearTimer();this.callback("dblrightclick",[b]);return !this.stopDouble}else{var a=this["double"]?OpenLayers.Util.extend({},b):this.callback("rightclick",[b]);var c=OpenLayers.Function.bind(this.delayedRightCall,this,a);this.rightclickTimerId=window.setTimeout(c,this.delay)}}return !this.stopSingle},delayedRightCall:function(a){this.rightclickTimerId=null;if(a){this.callback("rightclick",[a])}return !this.stopSingle},dblclick:function(a){if(this.passesTolerance(a)){if(this["double"]){this.callback("dblclick",[a])}this.clearTimer()}return !this.stopDouble},click:function(b){if(this.passesTolerance(b)){if(this.timerId!=null){this.clearTimer()}else{var a=this.single?OpenLayers.Util.extend({},b):null;this.timerId=window.setTimeout(OpenLayers.Function.bind(this.delayedCall,this,a),this.delay)}}return !this.stopSingle},passesTolerance:function(b){var c=true;if(this.pixelTolerance!=null&&this.down){var a=Math.sqrt(Math.pow(this.down.x-b.xy.x,2)+Math.pow(this.down.y-b.xy.y,2));if(a>this.pixelTolerance){c=false}}return c},clearTimer:function(){if(this.timerId!=null){window.clearTimeout(this.timerId);this.timerId=null}if(this.rightclickTimerId!=null){window.clearTimeout(this.rightclickTimerId);this.rightclickTimerId=null}},delayedCall:function(a){this.timerId=null;if(a){this.callback("click",[a])}},deactivate:function(){var a=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.clearTimer();this.down=null;a=true}return a},CLASS_NAME:"OpenLayers.Handler.Click"});OpenLayers.Handler.Drag=OpenLayers.Class(OpenLayers.Handler,{started:false,stopDown:true,dragging:false,last:null,start:null,oldOnselectstart:null,interval:0,timeoutId:null,initialize:function(c,b,a){OpenLayers.Handler.prototype.initialize.apply(this,arguments)},down:function(a){},move:function(a){},up:function(a){},out:function(a){},mousedown:function(b){var a=true;this.dragging=false;if(this.checkModifiers(b)&&OpenLayers.Event.isLeftClick(b)){this.started=true;this.start=b.xy;this.last=b.xy;OpenLayers.Element.addClass(this.map.viewPortDiv,"olDragDown");this.down(b);this.callback("down",[b.xy]);OpenLayers.Event.stop(b);if(!this.oldOnselectstart){this.oldOnselectstart=(document.onselectstart)?document.onselectstart:function(){return true};document.onselectstart=function(){return false}}a=!this.stopDown}else{this.started=false;this.start=null;this.last=null}return a},mousemove:function(a){if(this.started&&!this.timeoutId&&(a.xy.x!=this.last.x||a.xy.y!=this.last.y)){if(this.interval>0){this.timeoutId=setTimeout(OpenLayers.Function.bind(this.removeTimeout,this),this.interval)}this.dragging=true;this.move(a);this.callback("move",[a.xy]);if(!this.oldOnselectstart){this.oldOnselectstart=document.onselectstart;document.onselectstart=function(){return false}}this.last=this.evt.xy}return true},removeTimeout:function(){this.timeoutId=null},mouseup:function(b){if(this.started){var a=(this.start!=this.last);this.started=false;this.dragging=false;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown");this.up(b);this.callback("up",[b.xy]);if(a){this.callback("done",[b.xy])}document.onselectstart=this.oldOnselectstart}return true},mouseout:function(b){if(this.started&&OpenLayers.Util.mouseLeft(b,this.map.div)){var a=(this.start!=this.last);this.started=false;this.dragging=false;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown");this.out(b);this.callback("out",[]);if(a){this.callback("done",[b.xy])}if(document.onselectstart){document.onselectstart=this.oldOnselectstart}}return true},click:function(a){return(this.start==this.last)},activate:function(){var a=false;if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.dragging=false;a=true}return a},deactivate:function(){var a=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.started=false;this.dragging=false;this.start=null;this.last=null;a=true;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown")}return a},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(d,b,c,a){OpenLayers.Handler.prototype.initialize.apply(this,[d,c,a]);this.layer=b},mousedown:function(a){this.down=a.xy;return this.handle(a)?!this.stopDown:true},mouseup:function(a){this.up=a.xy;return this.handle(a)?!this.stopUp:true},click:function(a){return this.handle(a)?!this.stopClick:true},mousemove:function(a){if(!this.callbacks.over&&!this.callbacks.out){return true}this.handle(a);return true},dblclick:function(a){return !this.handle(a)},geometryTypeMatches:function(a){return this.geometryTypes==null||OpenLayers.Util.indexOf(this.geometryTypes,a.geometry.CLASS_NAME)>-1},handle:function(a){if(this.feature&&!this.feature.layer){this.feature=null}var c=a.type;var f=false;var e=!!(this.feature);var d=(c=="click"||c=="dblclick");this.feature=this.layer.getFeatureFromEvent(a);if(this.feature&&!this.feature.layer){this.feature=null}if(this.lastFeature&&!this.lastFeature.layer){this.lastFeature=null}if(this.feature){var b=(this.feature!=this.lastFeature);if(this.geometryTypeMatches(this.feature)){if(e&&b){if(this.lastFeature){this.triggerCallback(c,"out",[this.lastFeature])}this.triggerCallback(c,"in",[this.feature])}else{if(!e||d){this.triggerCallback(c,"in",[this.feature])}}this.lastFeature=this.feature;f=true}else{if(this.lastFeature&&(e&&b||d)){this.triggerCallback(c,"out",[this.lastFeature])}this.feature=null}}else{if(this.lastFeature&&(e||d)){this.triggerCallback(c,"out",[this.lastFeature])}}return f},triggerCallback:function(d,e,b){var c=this.EVENTMAP[d][e];if(c){if(d=="click"&&this.up&&this.down){var a=Math.sqrt(Math.pow(this.up.x-this.down.x,2)+Math.pow(this.up.y-this.down.y,2));if(a<=this.clickTolerance){this.callback(c,b)}}else{this.callback(c,b)}}},activate:function(){var a=false;if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.moveLayerToTop();this.map.events.on({removelayer:this.handleMapEvents,changelayer:this.handleMapEvents,scope:this});a=true}return a},deactivate:function(){var a=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.moveLayerBack();this.feature=null;this.lastFeature=null;this.down=null;this.up=null;this.map.events.un({removelayer:this.handleMapEvents,changelayer:this.handleMapEvents,scope:this});a=true}return a},handleMapEvents:function(a){if(!a.property||a.property=="order"){this.moveLayerToTop()}},moveLayerToTop:function(){var a=Math.max(this.map.Z_INDEX_BASE.Feature-1,this.layer.getZIndex())+1;this.layer.setZIndex(a)},moveLayerBack:function(){var a=this.layer.getZIndex()-1;if(a>=this.map.Z_INDEX_BASE.Feature){this.layer.setZIndex(a)}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(c,b,a){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 b=0,a=this.KEY_EVENTS.length;b<a;b++){OpenLayers.Event.observe(document,this.KEY_EVENTS[b],this.eventListener)}return true}else{return false}},deactivate:function(){var c=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){for(var b=0,a=this.KEY_EVENTS.length;b<a;b++){OpenLayers.Event.stopObserving(document,this.KEY_EVENTS[b],this.eventListener)}c=true}return c},handleKeyEvent:function(a){if(this.checkModifiers(a)){this.callback(a.type,[a])}},CLASS_NAME:"OpenLayers.Handler.Keyboard"});OpenLayers.Handler.MouseWheel=OpenLayers.Class(OpenLayers.Handler,{wheelListener:null,mousePosition:null,initialize:function(c,b,a){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(k){if(!this.map||!this.checkModifiers(k)){return}var g=false;var l=false;var f=false;var b=OpenLayers.Event.element(k);while((b!=null)&&!f&&!g){if(!g){try{if(b.currentStyle){c=b.currentStyle.overflow}else{var a=document.defaultView.getComputedStyle(b,null);var c=a.getPropertyValue("overflow")}g=(c&&(c=="auto")||(c=="scroll"))}catch(d){}}if(!l){for(var h=0,j=this.map.layers.length;h<j;h++){if(b==this.map.layers[h].div||b==this.map.layers[h].pane){l=true;break}}}f=(b==this.map.div);b=b.parentNode}if(!g&&f){if(l){this.wheelZoom(k)}OpenLayers.Event.stop(k)}},wheelZoom:function(a){var b=0;if(!a){a=window.event}if(a.wheelDelta){b=a.wheelDelta/120;if(window.opera&&window.opera.version()<9.2){b=-b}}else{if(a.detail){b=-a.detail/3}}if(b){if(this.mousePosition){a.xy=this.mousePosition}if(!a.xy){a.xy=this.map.getPixelFromLonLat(this.map.getCenter())}if(b<0){this.callback("down",[a,b])}else{this.callback("up",[a,b])}}},mousemove:function(a){this.mousePosition=a.xy},activate:function(a){if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){var b=this.wheelListener;OpenLayers.Event.observe(window,"DOMMouseScroll",b);OpenLayers.Event.observe(window,"mousewheel",b);OpenLayers.Event.observe(document,"mousewheel",b);return true}else{return false}},deactivate:function(a){if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){var b=this.wheelListener;OpenLayers.Event.stopObserving(window,"DOMMouseScroll",b);OpenLayers.Event.stopObserving(window,"mousewheel",b);OpenLayers.Event.stopObserving(document,"mousewheel",b);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(b,a){this.addOptions(a);this.name=b;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(a){if(a==null){a=true}if(this.map!=null){this.map.removeLayer(this,a)}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(a){if(a==null){a=new OpenLayers.Layer(this.name,this.options)}OpenLayers.Util.applyDefaults(a,this);a.map=null;return a},setName:function(a){if(a!=this.name){this.name=a;if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"name"})}}},addOptions:function(a){if(this.options==null){this.options={}}OpenLayers.Util.extend(this.options,a);OpenLayers.Util.extend(this,a)},onMapResize:function(){},redraw:function(){var b=false;if(this.map){this.inRange=this.calculateInRange();var c=this.getExtent();if(c&&this.inRange&&this.visibility){var a=true;this.moveTo(c,a,false);this.events.triggerEvent("moveend",{zoomChanged:a});b=true}}return b},moveTo:function(b,a,c){var d=this.visibility;if(!this.isBaseLayer){d=d&&this.inRange}this.display(d)},setMap:function(b){if(this.map==null){this.map=b;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 a=((this.visibility)&&(this.inRange));this.div.style.display=a?"":"none"}this.setTileSize()}},afterAdd:function(){},removeMap:function(a){},getImageSize:function(){return(this.imageSize||this.tileSize)},setTileSize:function(a){var b=(a)?a:((this.tileSize)?this.tileSize:this.map.getTileSize());this.tileSize=b;if(this.gutter){this.imageOffset=new OpenLayers.Pixel(-this.gutter,-this.gutter);this.imageSize=new OpenLayers.Size(b.w+(2*this.gutter),b.h+(2*this.gutter))}},getVisibility:function(){return this.visibility},setVisibility:function(a){if(a!=this.visibility){this.visibility=a;this.display(a);this.redraw();if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"visibility"})}this.events.triggerEvent("visibilitychanged")}},display:function(a){var b=this.calculateInRange();if(a!=(this.div.style.display!="none")){this.div.style.display=(a&&b)?"block":"none"}},calculateInRange:function(){var b=false;if(this.alwaysInRange){b=true}else{if(this.map){var a=this.map.getResolution();b=((a>=this.minResolution)&&(a<=this.maxResolution))}}return b},setIsBaseLayer:function(a){if(a!=this.isBaseLayer){this.isBaseLayer=a;if(this.map!=null){this.map.events.triggerEvent("changebaselayer",{layer:this})}}},initResolutions:function(){var n=new Array("projection","units","scales","resolutions","maxScale","minScale","maxResolution","minResolution","minExtent","maxExtent","numZoomLevels","maxZoomLevel");var b=["projection","units"];var e=false;var d={};for(var f=0,j=n.length;f<j;f++){var p=n[f];if(this.options[p]&&OpenLayers.Util.indexOf(b,p)==-1){e=true}d[p]=this.options[p]||this.map[p]}if(this.alwaysInRange==null){this.alwaysInRange=!e}if((this.options.minScale!=null||this.options.maxScale!=null)&&this.options.scales==null){d.scales=null}if((this.options.minResolution!=null||this.options.maxResolution!=null)&&this.options.resolutions==null){d.resolutions=null}if((!d.numZoomLevels)&&(d.maxZoomLevel)){d.numZoomLevels=d.maxZoomLevel+1}if((d.scales!=null)||(d.resolutions!=null)){if(d.scales!=null){d.resolutions=[];for(var f=0,j=d.scales.length;f<j;f++){var c=d.scales[f];d.resolutions[f]=OpenLayers.Util.getResolutionFromScale(c,d.units)}}d.numZoomLevels=d.resolutions.length}else{if(d.minScale){d.maxResolution=OpenLayers.Util.getResolutionFromScale(d.minScale,d.units)}else{if(d.maxResolution=="auto"){var o=this.map.getSize();var m=d.maxExtent.getWidth()/o.w;var h=d.maxExtent.getHeight()/o.h;d.maxResolution=Math.max(m,h)}}if(d.maxScale!=null){d.minResolution=OpenLayers.Util.getResolutionFromScale(d.maxScale,d.units)}else{if((d.minResolution=="auto")&&(d.minExtent!=null)){var o=this.map.getSize();var m=d.minExtent.getWidth()/o.w;var h=d.minExtent.getHeight()/o.h;d.minResolution=Math.max(m,h)}}if(d.minResolution!=null&&this.options.numZoomLevels==undefined){var l=d.maxResolution/d.minResolution;d.numZoomLevels=Math.floor(Math.log(l)/Math.log(2))+1}d.resolutions=new Array(d.numZoomLevels);var a=2;if(typeof d.minResolution=="number"&&d.numZoomLevels>1){a=Math.pow((d.maxResolution/d.minResolution),(1/(d.numZoomLevels-1)))}for(var f=0;f<d.numZoomLevels;f++){var k=d.maxResolution/Math.pow(a,f);d.resolutions[f]=k}}d.resolutions.sort(function(q,i){return(i-q)});this.resolutions=d.resolutions;this.maxResolution=d.resolutions[0];var g=d.resolutions.length-1;this.minResolution=d.resolutions[g];this.scales=[];for(var f=0,j=d.resolutions.length;f<j;f++){this.scales[f]=OpenLayers.Util.getScaleFromResolution(d.resolutions[f],d.units)}this.minScale=this.scales[0];this.maxScale=this.scales[this.scales.length-1];this.numZoomLevels=d.numZoomLevels},getResolution:function(){var a=this.map.getZoom();return this.getResolutionForZoom(a)},getExtent:function(){return this.map.calculateBounds()},getZoomForExtent:function(b,c){var d=this.map.getSize();var a=Math.max(b.getWidth()/d.w,b.getHeight()/d.h);return this.getZoomForResolution(a,c)},getDataExtent:function(){},getResolutionForZoom:function(c){c=Math.max(0,Math.min(c,this.resolutions.length-1));var b;if(this.map.fractionalZoom){var a=Math.floor(c);var d=Math.ceil(c);b=this.resolutions[a]-((c-a)*(this.resolutions[a]-this.resolutions[d]))}else{b=this.resolutions[Math.round(c)]}return b},getZoomForResolution:function(e,a){var n;if(this.map.fractionalZoom){var k=0;var c=this.resolutions.length-1;var d=this.resolutions[k];var b=this.resolutions[c];var j;for(var f=0,g=this.resolutions.length;f<g;++f){j=this.resolutions[f];if(j>=e){d=j;k=f}if(j<=e){b=j;c=f;break}}var h=d-b;if(h>0){n=k+((d-e)/h)}else{n=k}}else{var l;var m=Number.POSITIVE_INFINITY;for(var f=0,g=this.resolutions.length;f<g;f++){if(a){l=Math.abs(this.resolutions[f]-e);if(l>m){break}m=l}else{if(this.resolutions[f]<e){break}}}n=Math.max(0,f-1)}return n},getLonLatFromViewPortPx:function(b){var e=null;if(b!=null){var d=this.map.getSize();var a=this.map.getCenter();if(a){var c=this.map.getResolution();var g=b.x-(d.w/2);var f=b.y-(d.h/2);e=new OpenLayers.LonLat(a.lon+g*c,a.lat-f*c);if(this.wrapDateLine){e=e.wrapDateLine(this.maxExtent)}}}return e},getViewPortPxFromLonLat:function(d){var b=null;if(d!=null){var a=this.map.getResolution();var c=this.map.getExtent();b=new OpenLayers.Pixel((1/a*(d.lon-c.left)),(1/a*(c.top-d.lat)))}return b},setOpacity:function(b){if(b!=this.opacity){this.opacity=b;for(var d=0,a=this.div.childNodes.length;d<a;++d){var c=this.div.childNodes[d].firstChild;OpenLayers.Util.modifyDOMElement(c,null,null,null,null,null,null,b)}}},getZIndex:function(){return this.div.style.zIndex},setZIndex:function(a){this.div.style.zIndex=a},adjustBounds:function(b){if(this.gutter){var a=this.gutter*this.map.getResolution();b=new OpenLayers.Bounds(b.left-a,b.bottom-a,b.right+a,b.top+a)}if(this.wrapDateLine){var c={rightTolerance:this.getResolution()};b=b.wrapDateLine(this.maxExtent,c)}return b},CLASS_NAME:"OpenLayers.Layer"});(function(){var d=window.XMLHttpRequest;var h=!!window.controllers,e=window.document.all&&!window.opera;function c(){this._object=d?new d:new window.ActiveXObject("Microsoft.XMLHTTP")}if(h&&d.wrapped){c.wrapped=d.wrapped}c.UNSENT=0;c.OPENED=1;c.HEADERS_RECEIVED=2;c.LOADING=3;c.DONE=4;c.prototype.readyState=c.UNSENT;c.prototype.responseText="";c.prototype.responseXML=null;c.prototype.status=0;c.prototype.statusText="";c.prototype.onreadystatechange=null;c.onreadystatechange=null;c.onopen=null;c.onsend=null;c.onabort=null;c.prototype.open=function(l,o,k,p,j){this._async=k;var n=this,m=this.readyState;if(e){var i=function(){if(n._object.readyState!=c.DONE){a(n)}};if(k){window.attachEvent("onunload",i)}}this._object.onreadystatechange=function(){if(h&&!k){return}n.readyState=n._object.readyState;g(n);if(n._aborted){n.readyState=c.UNSENT;return}if(n.readyState==c.DONE){a(n);if(e&&k){window.detachEvent("onunload",i)}}if(m!=n.readyState){f(n)}m=n.readyState};if(c.onopen){c.onopen.apply(this,arguments)}this._object.open(l,o,k,p,j);if(!k&&h){this.readyState=c.OPENED;f(this)}};c.prototype.send=function(i){if(c.onsend){c.onsend.apply(this,arguments)}if(i&&i.nodeType){i=window.XMLSerializer?new window.XMLSerializer().serializeToString(i):i.xml;if(!this._headers["Content-Type"]){this._object.setRequestHeader("Content-Type","application/xml")}}this._object.send(i);if(h&&!this._async){this.readyState=c.OPENED;g(this);while(this.readyState<c.DONE){this.readyState++;f(this);if(this._aborted){return}}}};c.prototype.abort=function(){if(c.onabort){c.onabort.apply(this,arguments)}if(this.readyState>c.UNSENT){this._aborted=true}this._object.abort();a(this)};c.prototype.getAllResponseHeaders=function(){return this._object.getAllResponseHeaders()};c.prototype.getResponseHeader=function(i){return this._object.getResponseHeader(i)};c.prototype.setRequestHeader=function(i,j){if(!this._headers){this._headers={}}this._headers[i]=j;return this._object.setRequestHeader(i,j)};c.prototype.toString=function(){return"[object XMLHttpRequest]"};c.toString=function(){return"[XMLHttpRequest]"};function f(i){if(i.onreadystatechange){i.onreadystatechange.apply(i)}if(c.onreadystatechange){c.onreadystatechange.apply(i)}}function b(j){var i=j.responseXML;if(e&&i&&!i.documentElement&&j.getResponseHeader("Content-Type").match(/[^\/]+\/[^\+]+\+xml/)){i=new ActiveXObject("Microsoft.XMLDOM");i.loadXML(j.responseText)}if(i){if((e&&i.parseError!=0)||(i.documentElement&&i.documentElement.tagName=="parsererror")){return null}}return i}function g(i){try{i.responseText=i._object.responseText}catch(j){}try{i.responseXML=b(i._object)}catch(j){}try{i.status=i._object.status}catch(j){}try{i.statusText=i._object.statusText}catch(j){}}function a(i){i._object.onreadystatechange=new window.Function;delete i._headers}if(!window.Function.prototype.apply){window.Function.prototype.apply=function(i,j){if(!j){j=[]}i.__func=this;i.__func(j[0],j[1],j[2],j[3],j[4]);delete i.__func}}OpenLayers.Request.XMLHttpRequest=c})();OpenLayers.Control.DragPan=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOOL,panned:false,interval:25,draw:function(){this.handler=new OpenLayers.Handler.Drag(this,{move:this.panMap,done:this.panMapDone},{interval:this.interval})},panMap:function(a){this.panned=true;this.map.pan(this.handler.last.x-a.x,this.handler.last.y-a.y,{dragging:this.handler.dragging,animate:false})},panMapDone:function(a){if(this.panned){this.panMap(a);this.panned=false}},CLASS_NAME:"OpenLayers.Control.DragPan"});OpenLayers.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(a){switch(a.keyCode){case OpenLayers.Event.KEY_LEFT:this.map.pan(-this.slideFactor,0);break;case OpenLayers.Event.KEY_RIGHT:this.map.pan(this.slideFactor,0);break;case OpenLayers.Event.KEY_UP:this.map.pan(0,-this.slideFactor);break;case OpenLayers.Event.KEY_DOWN:this.map.pan(0,this.slideFactor);break;case 33:var b=this.map.getSize();this.map.pan(0,-0.75*b.h);break;case 34:var b=this.map.getSize();this.map.pan(0,0.75*b.h);break;case 35:var b=this.map.getSize();this.map.pan(0.75*b.w,0);break;case 36:var b=this.map.getSize();this.map.pan(-0.75*b.w,0);break;case 43:case 61:case 187:case 107:this.map.zoomIn();break;case 45:case 109:case 189:case 95:this.map.zoomOut();break}},CLASS_NAME:"OpenLayers.Control.KeyboardDefaults"});OpenLayers.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(c,a,b){OpenLayers.Feature.prototype.initialize.apply(this,[null,null,a]);this.lonlat=null;this.geometry=c?c:null;this.state=null;this.attributes={};if(a){this.attributes=OpenLayers.Util.extend(this.attributes,a)}this.style=b?b: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(d){var c=false;if(this.layer&&this.layer.map){var a=this.layer.map.getExtent();if(d){var b=this.geometry.getBounds();c=a.intersectsBounds(b)}else{var e=a.toGeometry();c=e.intersects(this.geometry)}}return c},createMarker:function(){return null},destroyMarker:function(){},createPopup:function(){return null},atPoint:function(b,d,c){var a=false;if(this.geometry){a=this.geometry.atPoint(b,d,c)}return a},destroyPopup:function(){},move:function(a){if(!this.layer||!this.geometry.move){return}var b;if(a.CLASS_NAME=="OpenLayers.LonLat"){b=this.layer.getViewPortPxFromLonLat(a)}else{b=a}var d=this.layer.getViewPortPxFromLonLat(this.geometry.getBounds().getCenterLonLat());var c=this.layer.map.getResolution();this.geometry.move(c*(b.x-d.x),c*(d.y-b.y));this.layer.drawFeature(this);return d},toState:function(a){if(a==OpenLayers.State.UPDATE){switch(this.state){case OpenLayers.State.UNKNOWN:case OpenLayers.State.DELETE:this.state=a;break;case OpenLayers.State.UPDATE:case OpenLayers.State.INSERT:break}}else{if(a==OpenLayers.State.INSERT){switch(this.state){case OpenLayers.State.UNKNOWN:break;default:this.state=a;break}}else{if(a==OpenLayers.State.DELETE){switch(this.state){case OpenLayers.State.INSERT:break;case OpenLayers.State.DELETE:break;case OpenLayers.State.UNKNOWN:case OpenLayers.State.UPDATE:this.state=a;break}}else{if(a==OpenLayers.State.UNKNOWN){this.state=a}}}}},CLASS_NAME:"OpenLayers.Feature.Vector"});OpenLayers.Feature.Vector.style={"default":{fillColor:"#ee9900",fillOpacity:0.4,hoverFillColor:"white",hoverFillOpacity:0.8,strokeColor:"#ee9900",strokeOpacity:1,strokeWidth:1,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:0.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"inherit"},select:{fillColor:"blue",fillOpacity:0.4,hoverFillColor:"white",hoverFillOpacity:0.8,strokeColor:"blue",strokeOpacity:1,strokeWidth:2,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:0.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"pointer"},temporary:{fillColor:"#66cccc",fillOpacity:0.2,hoverFillColor:"white",hoverFillOpacity:0.8,strokeColor:"#66cccc",strokeOpacity:1,strokeLinecap:"round",strokeWidth:2,strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:0.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"inherit"},"delete":{display:"none"}};OpenLayers.Handler.Box=OpenLayers.Class(OpenLayers.Handler,{dragHandler:null,boxDivClassName:"olHandlerBoxZoomBox",boxCharacteristics:null,initialize:function(c,b,a){OpenLayers.Handler.prototype.initialize.apply(this,arguments);var b={down:this.startBox,move:this.moveBox,out:this.removeBox,up:this.endBox};this.dragHandler=new OpenLayers.Handler.Drag(this,b,{keyMask:this.keyMask})},setMap:function(a){OpenLayers.Handler.prototype.setMap.apply(this,arguments);if(this.dragHandler){this.dragHandler.setMap(a)}},startBox:function(a){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(f){var d=this.dragHandler.start.x;var b=this.dragHandler.start.y;var c=Math.abs(d-f.x);var a=Math.abs(b-f.y);this.zoomBox.style.width=Math.max(1,c)+"px";this.zoomBox.style.height=Math.max(1,a)+"px";this.zoomBox.style.left=f.x<d?f.x+"px":d+"px";this.zoomBox.style.top=f.y<b?f.y+"px":b+"px";var e=this.getBoxCharacteristics();if(e.newBoxModel){if(f.x>d){this.zoomBox.style.width=Math.max(1,c-e.xOffset)+"px"}if(f.y>b){this.zoomBox.style.height=Math.max(1,a-e.yOffset)+"px"}}},endBox:function(b){var a;if(Math.abs(this.dragHandler.start.x-b.x)>5||Math.abs(this.dragHandler.start.y-b.y)>5){var g=this.dragHandler.start;var f=Math.min(g.y,b.y);var c=Math.max(g.y,b.y);var e=Math.min(g.x,b.x);var d=Math.max(g.x,b.x);a=new OpenLayers.Bounds(e,c,d,f)}else{a=this.dragHandler.start.clone()}this.removeBox();this.callback("done",[a])},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 a=parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-left-width"))+parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-right-width"))+1;var c=parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-top-width"))+parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-bottom-width"))+1;var b=OpenLayers.Util.getBrowserName()=="msie"?document.compatMode!="BackCompat":true;this.boxCharacteristics={xOffset:a,yOffset:c,newBoxModel:b}}return this.boxCharacteristics},CLASS_NAME:"OpenLayers.Handler.Box"});OpenLayers.Layer.EventPane=OpenLayers.Class(OpenLayers.Layer,{smoothDragPan:true,isBaseLayer:true,isFixed:true,pane:null,mapObject:null,initialize:function(b,a){OpenLayers.Layer.prototype.initialize.apply(this,arguments);if(this.pane==null){this.pane=OpenLayers.Util.createDiv(this.div.id+"_EventPane")}},destroy:function(){this.mapObject=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments)},setMap:function(a){OpenLayers.Layer.prototype.setMap.apply(this,arguments);this.pane.style.zIndex=parseInt(this.div.style.zIndex)+1;this.pane.style.display=this.div.style.display;this.pane.style.width="100%";this.pane.style.height="100%";if(OpenLayers.Util.getBrowserName()=="msie"){this.pane.style.background="url("+OpenLayers.Util.getImagesLocation()+"blank.gif)"}if(this.isFixed){this.map.viewPortDiv.appendChild(this.pane)}else{this.map.layerContainerDiv.appendChild(this.pane)}this.loadMapObject();if(this.mapObject==null){this.loadWarningMessage()}},removeMap:function(a){if(this.pane&&this.pane.parentNode){this.pane.parentNode.removeChild(this.pane);this.pane=null}OpenLayers.Layer.prototype.removeMap.apply(this,arguments)},loadWarningMessage:function(){this.div.style.backgroundColor="darkblue";var g=this.map.getSize();var a=Math.min(g.w,300);var e=Math.min(g.h,200);var b=new OpenLayers.Size(a,e);var d=new OpenLayers.Pixel(g.w/2,g.h/2);var c=d.add(-b.w/2,-b.h/2);var f=OpenLayers.Util.createDiv(this.name+"_warning",c,b,null,null,null,"auto");f.style.padding="7px";f.style.backgroundColor="yellow";f.innerHTML=this.getWarningHTML();this.div.appendChild(f)},getWarningHTML:function(){return""},display:function(a){OpenLayers.Layer.prototype.display.apply(this,arguments);this.pane.style.display=this.div.style.display},setZIndex:function(a){OpenLayers.Layer.prototype.setZIndex.apply(this,arguments);this.pane.style.zIndex=parseInt(this.div.style.zIndex)+1},moveTo:function(c,d,j){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);if(this.mapObject!=null){var e=this.map.getCenter();var g=this.map.getZoom();if(e!=null){var f=this.getMapObjectCenter();var b=this.getOLLonLatFromMapObjectLonLat(f);var h=this.getMapObjectZoom();var m=this.getOLZoomFromMapObjectZoom(h);if(!(e.equals(b))||!(g==m)){if(j&&this.dragPanMapObject&&this.smoothDragPan){var i=this.map.getViewPortPxFromLonLat(b);var k=this.map.getViewPortPxFromLonLat(e);this.dragPanMapObject(k.x-i.x,i.y-k.y)}else{var a=this.getMapObjectLonLatFromOLLonLat(e);var l=this.getMapObjectZoomFromOLZoom(g);this.setMapObjectCenter(a,l,j)}}}}},getLonLatFromViewPortPx:function(a){var b=null;if((this.mapObject!=null)&&(this.getMapObjectCenter()!=null)){var d=this.getMapObjectPixelFromOLPixel(a);var c=this.getMapObjectLonLatFromMapObjectPixel(d);b=this.getOLLonLatFromMapObjectLonLat(c)}return b},getViewPortPxFromLonLat:function(b){var a=null;if((this.mapObject!=null)&&(this.getMapObjectCenter()!=null)){var d=this.getMapObjectLonLatFromOLLonLat(b);var c=this.getMapObjectPixelFromMapObjectLonLat(d);a=this.getOLPixelFromMapObjectPixel(c)}return a},getOLLonLatFromMapObjectLonLat:function(d){var a=null;if(d!=null){var c=this.getLongitudeFromMapObjectLonLat(d);var b=this.getLatitudeFromMapObjectLonLat(d);a=new OpenLayers.LonLat(c,b)}return a},getMapObjectLonLatFromOLLonLat:function(a){var b=null;if(a!=null){b=this.getMapObjectLonLatFromLonLat(a.lon,a.lat)}return b},getOLPixelFromMapObjectPixel:function(d){var b=null;if(d!=null){var a=this.getXFromMapObjectPixel(d);var c=this.getYFromMapObjectPixel(d);b=new OpenLayers.Pixel(a,c)}return b},getMapObjectPixelFromOLPixel:function(a){var b=null;if(a!=null){b=this.getMapObjectPixelFromXY(a.x,a.y)}return b},CLASS_NAME:"OpenLayers.Layer.EventPane"});OpenLayers.Layer.FixedZoomLevels=OpenLayers.Class({initialize:function(){},initResolutions:function(){var c=new Array("minZoomLevel","maxZoomLevel","numZoomLevels");for(var b=0,a=c.length;b<a;b++){var f=c[b];this[f]=(this.options[f]!=null)?this.options[f]:this.map[f]}if((this.minZoomLevel==null)||(this.minZoomLevel<this.MIN_ZOOM_LEVEL)){this.minZoomLevel=this.MIN_ZOOM_LEVEL}var g;var e=this.MAX_ZOOM_LEVEL-this.minZoomLevel+1;if(((this.options.numZoomLevels==null)&&(this.options.maxZoomLevel!=null))||((this.numZoomLevels==null)&&(this.maxZoomLevel!=null))){g=this.maxZoomLevel-this.minZoomLevel+1}else{g=this.numZoomLevels}if(g!=null){this.numZoomLevels=Math.min(g,e)}else{this.numZoomLevels=e}this.maxZoomLevel=this.minZoomLevel+this.numZoomLevels-1;if(this.RESOLUTIONS!=null){var d=0;this.resolutions=[];for(var b=this.minZoomLevel;b<=this.maxZoomLevel;b++){this.resolutions[d++]=this.RESOLUTIONS[b]}this.maxResolution=this.resolutions[0];this.minResolution=this.resolutions[this.resolutions.length-1]}},getResolution:function(){if(this.resolutions!=null){return OpenLayers.Layer.prototype.getResolution.apply(this,arguments)}else{var a=null;var c=this.map.getSize();var b=this.getExtent();if((c!=null)&&(b!=null)){a=Math.max(b.getWidth()/c.w,b.getHeight()/c.h)}return a}},getExtent:function(){var c=null;var b=this.map.getSize();var e=new OpenLayers.Pixel(0,0);var f=this.getLonLatFromViewPortPx(e);var a=new OpenLayers.Pixel(b.w,b.h);var d=this.getLonLatFromViewPortPx(a);if((f!=null)&&(d!=null)){c=new OpenLayers.Bounds(f.lon,d.lat,d.lon,f.lat)}return c},getZoomForResolution:function(a){if(this.resolutions!=null){return OpenLayers.Layer.prototype.getZoomForResolution.apply(this,arguments)}else{var b=OpenLayers.Layer.prototype.getExtent.apply(this,[]);return this.getZoomForExtent(b)}},getOLZoomFromMapObjectZoom:function(a){var b=null;if(a!=null){b=a-this.minZoomLevel}return b},getMapObjectZoomFromOLZoom:function(a){var b=null;if(a!=null){b=a+this.minZoomLevel}return b},CLASS_NAME:"OpenLayers.Layer.FixedZoomLevels"});OpenLayers.Layer.Markers=OpenLayers.Class(OpenLayers.Layer,{isBaseLayer:false,markers:null,drawn:false,initialize:function(b,a){OpenLayers.Layer.prototype.initialize.apply(this,arguments);this.markers=[]},destroy:function(){this.clearMarkers();this.markers=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments)},setOpacity:function(b){if(b!=this.opacity){this.opacity=b;for(var c=0,a=this.markers.length;c<a;c++){this.markers[c].setOpacity(this.opacity)}}},moveTo:function(d,b,e){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);if(b||!this.drawn){for(var c=0,a=this.markers.length;c<a;c++){this.drawMarker(this.markers[c])}this.drawn=true}},addMarker:function(a){this.markers.push(a);if(this.opacity!=null){a.setOpacity(this.opacity)}if(this.map&&this.map.getExtent()){a.map=this.map;this.drawMarker(a)}},removeMarker:function(a){if(this.markers&&this.markers.length){OpenLayers.Util.removeItem(this.markers,a);a.erase()}},clearMarkers:function(){if(this.markers!=null){while(this.markers.length>0){this.removeMarker(this.markers[0])}}},drawMarker:function(a){var b=this.map.getLayerPxFromLonLat(a.lonlat);if(b==null){a.display(false)}else{if(!a.isDrawn()){var c=a.draw(b);this.div.appendChild(c)}else{if(a.icon){a.icon.moveTo(b)}}}},getDataExtent:function(){var b=null;if(this.markers&&(this.markers.length>0)){var b=new OpenLayers.Bounds();for(var d=0,a=this.markers.length;d<a;d++){var c=this.markers[d];b.extend(c.lonlat)}}return b},CLASS_NAME:"OpenLayers.Layer.Markers"});OpenLayers.Layer.SphericalMercator={getExtent:function(){var a=null;if(this.sphericalMercator){a=this.map.calculateBounds()}else{a=OpenLayers.Layer.FixedZoomLevels.prototype.getExtent.apply(this)}return a},initMercatorParameters:function(){this.RESOLUTIONS=[];var a=156543.0339;for(var b=0;b<=this.MAX_ZOOM_LEVEL;++b){this.RESOLUTIONS[b]=a/Math.pow(2,b)}this.units="m";this.projection="EPSG:900913"},forwardMercator:function(c,b){var a=c*20037508.34/180;var d=Math.log(Math.tan((90+b)*Math.PI/360))/(Math.PI/180);d=d*20037508.34/180;return new OpenLayers.LonLat(a,d)},inverseMercator:function(a,d){var c=(a/20037508.34)*180;var b=(d/20037508.34)*180;b=180/Math.PI*(2*Math.atan(Math.exp(b*Math.PI/180))-Math.PI/2);return new OpenLayers.LonLat(c,b)},projectForward:function(a){var b=OpenLayers.Layer.SphericalMercator.forwardMercator(a.x,a.y);a.x=b.lon;a.y=b.lat;return a},projectInverse:function(a){var b=OpenLayers.Layer.SphericalMercator.inverseMercator(a.x,a.y);a.x=b.lon;a.y=b.lat;return a}};OpenLayers.Projection.addTransform("EPSG:4326","EPSG:900913",OpenLayers.Layer.SphericalMercator.projectForward);OpenLayers.Projection.addTransform("EPSG:900913","EPSG:4326",OpenLayers.Layer.SphericalMercator.projectInverse);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(h){if(h instanceof OpenLayers.Bounds){if(!this.out){var i=this.map.getLonLatFromPixel(new OpenLayers.Pixel(h.left,h.bottom));var m=this.map.getLonLatFromPixel(new OpenLayers.Pixel(h.right,h.top));var b=new OpenLayers.Bounds(i.lon,i.lat,m.lon,m.lat)}else{var g=Math.abs(h.right-h.left);var j=Math.abs(h.top-h.bottom);var e=Math.min((this.map.size.h/j),(this.map.size.w/g));var n=this.map.getExtent();var a=this.map.getLonLatFromPixel(h.getCenterPixel());var c=a.lon-(n.getWidth()/2)*e;var f=a.lon+(n.getWidth()/2)*e;var l=a.lat-(n.getHeight()/2)*e;var d=a.lat+(n.getHeight()/2)*e;var b=new OpenLayers.Bounds(c,l,f,d)}var k=this.map.getZoom();this.map.zoomToExtent(b);if(k==this.map.getZoom()&&this.alwaysZoom==true){this.map.zoomTo(k+(this.out?-1:1))}}else{if(!this.out){this.map.setCenter(this.map.getLonLatFromPixel(h),this.map.getZoom()+1)}else{this.map.setCenter(this.map.getLonLatFromPixel(h),this.map.getZoom()-1)}}},CLASS_NAME:"OpenLayers.Control.ZoomBox"});OpenLayers.Format.WKT=OpenLayers.Class(OpenLayers.Format,{initialize:function(a){this.regExes={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/};OpenLayers.Format.prototype.initialize.apply(this,[a])},read:function(f){var e,d,h;var g=this.regExes.typeStr.exec(f);if(g){d=g[1].toLowerCase();h=g[2];if(this.parse[d]){e=this.parse[d].apply(this,[h])}if(this.internalProjection&&this.externalProjection){if(e&&e.CLASS_NAME=="OpenLayers.Feature.Vector"){e.geometry.transform(this.externalProjection,this.internalProjection)}else{if(e&&d!="geometrycollection"&&typeof e=="object"){for(var c=0,a=e.length;c<a;c++){var b=e[c];b.geometry.transform(this.externalProjection,this.internalProjection)}}}}}return e},write:function(a){var f,j,h,d,b;if(a.constructor==Array){f=a;b=true}else{f=[a];b=false}var c=[];if(b){c.push("GEOMETRYCOLLECTION(")}for(var e=0,g=f.length;e<g;++e){if(b&&e>0){c.push(",")}j=f[e].geometry;h=j.CLASS_NAME.split(".")[2].toLowerCase();if(!this.extract[h]){return null}if(this.internalProjection&&this.externalProjection){j=j.clone();j.transform(this.internalProjection,this.externalProjection)}d=this.extract[h].apply(this,[j]);c.push(h.toUpperCase()+"("+d+")")}if(b){c.push(")")}return c.join("")},extract:{point:function(a){return a.x+" "+a.y},multipoint:function(c){var d=[];for(var b=0,a=c.components.length;b<a;++b){d.push(this.extract.point.apply(this,[c.components[b]]))}return d.join(",")},linestring:function(b){var d=[];for(var c=0,a=b.components.length;c<a;++c){d.push(this.extract.point.apply(this,[b.components[c]]))}return d.join(",")},multilinestring:function(c){var d=[];for(var b=0,a=c.components.length;b<a;++b){d.push("("+this.extract.linestring.apply(this,[c.components[b]])+")")}return d.join(",")},polygon:function(c){var d=[];for(var b=0,a=c.components.length;b<a;++b){d.push("("+this.extract.linestring.apply(this,[c.components[b]])+")")}return d.join(",")},multipolygon:function(d){var c=[];for(var b=0,a=d.components.length;b<a;++b){c.push("("+this.extract.polygon.apply(this,[d.components[b]])+")")}return c.join(",")}},parse:{point:function(b){var a=OpenLayers.String.trim(b).split(this.regExes.spaces);return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(a[0],a[1]))},multipoint:function(e){var c=OpenLayers.String.trim(e).split(",");var d=[];for(var b=0,a=c.length;b<a;++b){d.push(this.parse.point.apply(this,[c[b]]).geometry)}return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiPoint(d))},linestring:function(e){var c=OpenLayers.String.trim(e).split(",");var d=[];for(var b=0,a=c.length;b<a;++b){d.push(this.parse.point.apply(this,[c[b]]).geometry)}return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString(d))},multilinestring:function(f){var c;var b=OpenLayers.String.trim(f).split(this.regExes.parenComma);var e=[];for(var d=0,a=b.length;d<a;++d){c=b[d].replace(this.regExes.trimParens,"$1");e.push(this.parse.linestring.apply(this,[c]).geometry)}return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiLineString(e))},polygon:function(h){var c,b,f;var g=OpenLayers.String.trim(h).split(this.regExes.parenComma);var e=[];for(var d=0,a=g.length;d<a;++d){c=g[d].replace(this.regExes.trimParens,"$1");b=this.parse.linestring.apply(this,[c]).geometry;f=new OpenLayers.Geometry.LinearRing(b.components);e.push(f)}return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon(e))},multipolygon:function(f){var d;var b=OpenLayers.String.trim(f).split(this.regExes.doubleParenComma);var e=[];for(var c=0,a=b.length;c<a;++c){d=b[c].replace(this.regExes.trimParens,"$1");e.push(this.parse.polygon.apply(this,[d]).geometry)}return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiPolygon(e))},geometrycollection:function(e){e=e.replace(/,\s*([A-Za-z])/g,"|$1");var d=OpenLayers.String.trim(e).split("|");var c=[];for(var b=0,a=d.length;b<a;++b){c.push(OpenLayers.Format.WKT.prototype.read.apply(this,[d[b]]))}return c}},CLASS_NAME:"OpenLayers.Format.WKT"});OpenLayers.Layer.GeoRSS=OpenLayers.Class(OpenLayers.Layer.Markers,{location:null,features:null,formatOptions:null,selectedFeature:null,icon:null,popupSize:null,useFeedTitle:true,initialize:function(c,a,b){OpenLayers.Layer.Markers.prototype.initialize.apply(this,[c,b]);this.location=a;this.features=[]},destroy:function(){OpenLayers.Layer.Markers.prototype.destroy.apply(this,arguments);this.clearFeatures();this.features=null},loadRSS:function(){if(!this.loaded){this.events.triggerEvent("loadstart");OpenLayers.Request.GET({url:this.location,success:this.parseData,scope:this});this.loaded=true}},moveTo:function(c,a,b){OpenLayers.Layer.Markers.prototype.moveTo.apply(this,arguments);if(this.visibility&&!this.loaded){this.loadRSS()}},parseData:function(k){var o=k.responseXML;if(!o||!o.documentElement){o=OpenLayers.Format.XML.prototype.read(k.responseText)}if(this.useFeedTitle){var a=null;try{a=o.getElementsByTagNameNS("*","title")[0].firstChild.nodeValue}catch(j){a=o.getElementsByTagName("title")[0].firstChild.nodeValue}if(a){this.setName(a)}}var s={};OpenLayers.Util.extend(s,this.formatOptions);if(this.map&&!this.projection.equals(this.map.getProjectionObject())){s.externalProjection=this.projection;s.internalProjection=this.map.getProjectionObject()}var p=new OpenLayers.Format.GeoRSS(s);var b=p.read(o);for(var g=0,h=b.length;g<h;g++){var f={};var r=b[g];if(!r.geometry){continue}var m=r.attributes.title?r.attributes.title:"Untitled";var q=r.attributes.description?r.attributes.description:"No description.";var l=r.attributes.link?r.attributes.link:"";var n=r.geometry.getBounds().getCenterLonLat();f.icon=this.icon==null?OpenLayers.Marker.defaultIcon():this.icon.clone();f.popupSize=this.popupSize?this.popupSize.clone():new OpenLayers.Size(250,120);if(m||q){f.title=m;f.description=q;var c='<div class="olLayerGeoRSSClose">[x]</div>';c+='<div class="olLayerGeoRSSTitle">';if(l){c+='<a class="link" href="'+l+'" target="_blank">'}c+=m;if(l){c+="</a>"}c+="</div>";c+='<div style="" class="olLayerGeoRSSDescription">';c+=q;c+="</div>";f.popupContentHTML=c}var r=new OpenLayers.Feature(this,n,f);this.features.push(r);var d=r.createMarker();d.events.register("click",r,this.markerClick);this.addMarker(d)}this.events.triggerEvent("loadend")},markerClick:function(c){var e=(this==this.layer.selectedFeature);this.layer.selectedFeature=(!e)?this:null;for(var d=0,a=this.layer.map.popups.length;d<a;d++){this.layer.map.removePopup(this.layer.map.popups[d])}if(!e){var b=this.createPopup();OpenLayers.Event.observe(b.div,"click",OpenLayers.Function.bind(function(){for(var g=0,f=this.layer.map.popups.length;g<f;g++){this.layer.map.removePopup(this.layer.map.popups[g])}},this));this.layer.map.addPopup(b)}OpenLayers.Event.stop(c)},clearFeatures:function(){if(this.features!=null){while(this.features.length>0){var a=this.features[0];OpenLayers.Util.removeItem(this.features,a);a.destroy()}}},CLASS_NAME:"OpenLayers.Layer.GeoRSS"});OpenLayers.Layer.Google=OpenLayers.Class(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:0,MAX_ZOOM_LEVEL:19,RESOLUTIONS:[1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125,0.00002145767211914062,0.00001072883605957031,0.00000536441802978515,0.00000268220901489257],type:null,sphericalMercator:false,dragObject:null,termsOfUse:null,poweredBy:null,initialize:function(b,a){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);this.addContainerPxFunction();if(this.sphericalMercator){OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator);this.initMercatorParameters()}},loadMapObject:function(){try{this.mapObject=new GMap2(this.div);if(typeof this.mapObject.getDragObject=="function"){this.dragObject=this.mapObject.getDragObject()}else{this.dragPanMapObject=null}this.termsOfUse=this.div.lastChild;this.div.removeChild(this.termsOfUse);if(this.isFixed){this.map.viewPortDiv.appendChild(this.termsOfUse)}else{this.map.layerContainerDiv.appendChild(this.termsOfUse)}this.termsOfUse.style.zIndex="1100";this.termsOfUse.style.display=this.div.style.display;this.termsOfUse.style.right="";this.termsOfUse.style.bottom="";this.termsOfUse.className="olLayerGoogleCopyright";this.poweredBy=this.div.lastChild;this.div.removeChild(this.poweredBy);if(this.isFixed){this.map.viewPortDiv.appendChild(this.poweredBy)}else{this.map.layerContainerDiv.appendChild(this.poweredBy)}this.poweredBy.style.zIndex="1100";this.poweredBy.style.display=this.div.style.display;this.poweredBy.style.right="";this.poweredBy.style.bottom="";this.poweredBy.className="olLayerGooglePoweredBy gmnoprint"}catch(a){OpenLayers.Console.error(a)}},setMap:function(a){OpenLayers.Layer.EventPane.prototype.setMap.apply(this,arguments);if(this.type!=null){this.map.events.register("moveend",this,this.setMapType)}},setMapType:function(){if(this.mapObject.getCenter()!=null){if(OpenLayers.Util.indexOf(this.mapObject.getMapTypes(),this.type)==-1){this.mapObject.addMapType(this.type)}this.mapObject.setMapType(this.type);this.map.events.unregister("moveend",this,this.setMapType)}},onMapResize:function(){if(this.visibility&&this.mapObject.isLoaded()){this.mapObject.checkResize()}else{if(!this._resized){var a=this;var b=GEvent.addListener(this.mapObject,"load",function(){GEvent.removeListener(b);delete a._resized;a.mapObject.checkResize();a.moveTo(a.map.getCenter(),a.map.getZoom())})}this._resized=true}},display:function(a){OpenLayers.Layer.EventPane.prototype.display.apply(this,arguments);this.termsOfUse.style.display=this.div.style.display;this.poweredBy.style.display=this.div.style.display},removeMap:function(a){if(this.termsOfUse&&this.termsOfUse.parentNode){this.termsOfUse.parentNode.removeChild(this.termsOfUse);this.termsOfUse=null}if(this.poweredBy&&this.poweredBy.parentNode){this.poweredBy.parentNode.removeChild(this.poweredBy);this.poweredBy=null}OpenLayers.Layer.EventPane.prototype.removeMap.apply(this,arguments)},getOLBoundsFromMapObjectBounds:function(b){var c=null;if(b!=null){var a=b.getSouthWest();var d=b.getNorthEast();if(this.sphericalMercator){a=this.forwardMercator(a.lng(),a.lat());d=this.forwardMercator(d.lng(),d.lat())}else{a=new OpenLayers.LonLat(a.lng(),a.lat());d=new OpenLayers.LonLat(d.lng(),d.lat())}c=new OpenLayers.Bounds(a.lon,a.lat,d.lon,d.lat)}return c},getMapObjectBoundsFromOLBounds:function(c){var b=null;if(c!=null){var a=this.sphericalMercator?this.inverseMercator(c.bottom,c.left):new OpenLayers.LonLat(c.bottom,c.left);var d=this.sphericalMercator?this.inverseMercator(c.top,c.right):new OpenLayers.LonLat(c.top,c.right);b=new GLatLngBounds(new GLatLng(a.lat,a.lon),new GLatLng(d.lat,d.lon))}return b},addContainerPxFunction:function(){if((typeof GMap2!="undefined")&&!GMap2.prototype.fromLatLngToContainerPixel){GMap2.prototype.fromLatLngToContainerPixel=function(b){var a=this.fromLatLngToDivPixel(b);var c=this.getContainer().firstChild.firstChild;a.x+=c.offsetLeft;a.y+=c.offsetTop;return a}}},getWarningHTML:function(){return OpenLayers.i18n("googleWarning")},setMapObjectCenter:function(a,b){this.mapObject.setCenter(a,b)},dragPanMapObject:function(b,a){this.dragObject.moveBy(new GSize(-b,a))},getMapObjectCenter:function(){return this.mapObject.getCenter()},getMapObjectZoom:function(){return this.mapObject.getZoom()},getMapObjectLonLatFromMapObjectPixel:function(a){return this.mapObject.fromContainerPixelToLatLng(a)},getMapObjectPixelFromMapObjectLonLat:function(a){return this.mapObject.fromLatLngToContainerPixel(a)},getMapObjectZoomFromMapObjectBounds:function(a){return this.mapObject.getBoundsZoomLevel(a)},getLongitudeFromMapObjectLonLat:function(a){return this.sphericalMercator?this.forwardMercator(a.lng(),a.lat()).lon:a.lng()},getLatitudeFromMapObjectLonLat:function(b){var a=this.sphericalMercator?this.forwardMercator(b.lng(),b.lat()).lat:b.lat();return a},getMapObjectLonLatFromLonLat:function(d,b){var c;if(this.sphericalMercator){var a=this.inverseMercator(d,b);c=new GLatLng(a.lat,a.lon)}else{c=new GLatLng(b,d)}return c},getXFromMapObjectPixel:function(a){return a.x},getYFromMapObjectPixel:function(a){return a.y},getMapObjectPixelFromXY:function(a,b){return new GPoint(a,b)},CLASS_NAME:"OpenLayers.Layer.Google"});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(b,a){OpenLayers.Util.extend(this,a);this.rules=[];if(a&&a.rules){this.addRules(a.rules)}this.setDefaultStyle(b||OpenLayers.Feature.Vector.style["default"])},destroy:function(){for(var b=0,a=this.rules.length;b<a;b++){this.rules[b].destroy();this.rules[b]=null}this.rules=null;this.defaultStyle=null},createSymbolizer:function(k){var a=this.defaultsPerSymbolizer?{}:this.createLiterals(OpenLayers.Util.extend({},this.defaultStyle),k);var j=this.rules;var h,b;var c=[];var f=false;for(var d=0,e=j.length;d<e;d++){h=j[d];var g=h.evaluate(k);if(g){if(h instanceof OpenLayers.Rule&&h.elseFilter){c.push(h)}else{f=true;this.applySymbolizer(h,a,k)}}}if(f==false&&c.length>0){f=true;for(var d=0,e=c.length;d<e;d++){this.applySymbolizer(c[d],a,k)}}if(j.length>0&&f==false){a.display="none"}return a},applySymbolizer:function(f,d,b){var a=b.geometry?this.getSymbolizerPrefix(b.geometry):OpenLayers.Style.SYMBOLIZER_PREFIXES[0];var c=f.symbolizer[a]||f.symbolizer;if(this.defaultsPerSymbolizer===true){var e=this.defaultStyle;OpenLayers.Util.applyDefaults(c,{pointRadius:e.pointRadius});if(c.stroke===true||c.graphic===true){OpenLayers.Util.applyDefaults(c,{strokeWidth:e.strokeWidth,strokeColor:e.strokeColor,strokeOpacity:e.strokeOpacity,strokeDashstyle:e.strokeDashstyle,strokeLinecap:e.strokeLinecap})}if(c.fill===true||c.graphic===true){OpenLayers.Util.applyDefaults(c,{fillColor:e.fillColor,fillOpacity:e.fillOpacity})}if(c.graphic===true){OpenLayers.Util.applyDefaults(c,{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(d,c),b)},createLiterals:function(d,c){var b=this.context||c.attributes||c.data;for(var a in this.propertyStyles){d[a]=OpenLayers.Style.createLiteral(d[a],b,c)}return d},findPropertyStyles:function(){var d={};var f=this.defaultStyle;this.addPropertyStyles(d,f);var h=this.rules;var e,g;for(var c=0,a=h.length;c<a;c++){e=h[c].symbolizer;for(var b in e){g=e[b];if(typeof g=="object"){this.addPropertyStyles(d,g)}else{this.addPropertyStyles(d,e);break}}}return d},addPropertyStyles:function(b,c){var d;for(var a in c){d=c[a];if(typeof d=="string"&&d.match(/\$\{\w+\}/)){b[a]=true}}return b},addRules:function(a){this.rules=this.rules.concat(a);this.propertyStyles=this.findPropertyStyles()},setDefaultStyle:function(a){this.defaultStyle=a;this.propertyStyles=this.findPropertyStyles()},getSymbolizerPrefix:function(d){var c=OpenLayers.Style.SYMBOLIZER_PREFIXES;for(var b=0,a=c.length;b<a;b++){if(d.CLASS_NAME.indexOf(c[b])!=-1){return c[b]}}},CLASS_NAME:"OpenLayers.Style"});OpenLayers.Style.createLiteral=function(c,b,a){if(typeof c=="string"&&c.indexOf("${")!=-1){c=OpenLayers.String.format(c,b,[a]);c=(isNaN(c)||!c)?c:parseFloat(c)}return c};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(a){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 a={dblclick:this.defaultDblClick,dblrightclick:this.defaultDblRightClick};var b={"double":true,stopDouble:true};this.handlers.click=new OpenLayers.Handler.Click(this,a,b);this.dragPan=new OpenLayers.Control.DragPan(OpenLayers.Util.extend({map:this.map},this.dragPanOptions));this.zoomBox=new OpenLayers.Control.ZoomBox({map:this.map,keyMask:this.zoomBoxKeyMask});this.dragPan.draw();this.zoomBox.draw();this.handlers.wheel=new OpenLayers.Handler.MouseWheel(this,{up:this.wheelUp,down:this.wheelDown});this.activate()},defaultDblClick:function(b){var a=this.map.getLonLatFromViewPortPx(b.xy);this.map.setCenter(a,this.map.zoom+1)},defaultDblRightClick:function(b){var a=this.map.getLonLatFromViewPortPx(b.xy);this.map.setCenter(a,this.map.zoom-1)},wheelChange:function(h,c){var f=this.map.getZoom()+c;if(!this.map.isValidZoomLevel(f)){return}var i=this.map.getSize();var e=i.w/2-h.xy.x;var d=h.xy.y-i.h/2;var g=this.map.baseLayer.getResolutionForZoom(f);var a=this.map.getLonLatFromPixel(h.xy);var b=new OpenLayers.LonLat(a.lon+e*g,a.lat+d*g);this.map.setCenter(b,f)},wheelUp:function(a){this.wheelChange(a,1)},wheelDown:function(a){this.wheelChange(a,-1)},disableZoomWheel:function(){this.zoomWheelEnabled=false;this.handlers.wheel.deactivate()},enableZoomWheel:function(){this.zoomWheelEnabled=true;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(a){if(a){this.bounds=a.clone()}},clearBounds:function(){this.bounds=null;if(this.parent){this.parent.clearBounds()}},extendBounds:function(b){var a=this.getBounds();if(!a){this.setBounds(b)}else{this.bounds.extend(b)}},getBounds:function(){if(this.bounds==null){this.calculateBounds()}return this.bounds},calculateBounds:function(){},distanceTo:function(b,a){},getVertices:function(a){},atPoint:function(e,h,f){var c=false;var d=this.getBounds();if((d!=null)&&(e!=null)){var b=(h!=null)?h:0;var a=(f!=null)?f:0;var g=new OpenLayers.Bounds(this.bounds.left-b,this.bounds.bottom-a,this.bounds.right+b,this.bounds.top+a);c=g.containsLonLat(e)}return c},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(f){var g=arguments.callee.format;if(!g){g=new OpenLayers.Format.WKT();arguments.callee.format=g}var d;var b=g.read(f);if(b instanceof OpenLayers.Feature.Vector){d=b.geometry}else{if(b instanceof Array){var a=b.length;var e=new Array(a);for(var c=0;c<a;++c){e[c]=b[c].geometry}d=new OpenLayers.Geometry.Collection(e)}}return d};OpenLayers.Geometry.segmentsIntersect=function(a,H,b){var s=b&&b.point;var z=b&&b.tolerance;var f=false;var B=a.x1-H.x1;var F=a.y1-H.y1;var o=a.x2-a.x1;var w=a.y2-a.y1;var t=H.y2-H.y1;var l=H.x2-H.x1;var D=(t*o)-(l*w);var e=(l*F)-(t*B);var c=(o*F)-(w*B);if(D==0){if(e==0&&c==0){f=true}}else{var E=e/D;var C=c/D;if(E>=0&&E<=1&&C>=0&&C<=1){if(!s){f=true}else{var h=a.x1+(E*o);var g=a.y1+(E*w);f=new OpenLayers.Geometry.Point(h,g)}}}if(z){var r;if(f){if(s){var n=[a,H];var A,h,g;outer:for(var v=0;v<2;++v){A=n[v];for(var u=1;u<3;++u){h=A["x"+u];g=A["y"+u];r=Math.sqrt(Math.pow(h-f.x,2)+Math.pow(g-f.y,2));if(r<z){f.x=h;f.y=g;break outer}}}}}else{var n=[a,H];var q,G,h,g,m,k;outer:for(var v=0;v<2;++v){q=n[v];G=n[(v+1)%2];for(var u=1;u<3;++u){m={x:q["x"+u],y:q["y"+u]};k=OpenLayers.Geometry.distanceToSegment(m,G);if(k.distance<z){if(s){f=new OpenLayers.Geometry.Point(m.x,m.y)}else{f=true}break outer}}}}}return f};OpenLayers.Geometry.distanceToSegment=function(k,d){var c=k.x;var j=k.y;var b=d.x1;var i=d.y1;var a=d.x2;var f=d.y2;var m=a-b;var l=f-i;var h=((m*(c-b))+(l*(j-i)))/(Math.pow(m,2)+Math.pow(l,2));var g,e;if(h<=0){g=b;e=i}else{if(h>=1){g=a;e=f}else{g=b+h*m;e=i+h*l}}return{distance:Math.sqrt(Math.pow(g-c,2)+Math.pow(e-j,2)),x:g,y:e}};OpenLayers.StyleMap=OpenLayers.Class({styles:null,extendDefault:true,initialize:function(c,a){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(c instanceof OpenLayers.Style){this.styles["default"]=c;this.styles.select=c;this.styles.temporary=c;this.styles["delete"]=c}else{if(typeof c=="object"){for(var b in c){if(c[b] instanceof OpenLayers.Style){this.styles[b]=c[b]}else{if(typeof c[b]=="object"){this.styles[b]=new OpenLayers.Style(c[b])}else{this.styles["default"]=new OpenLayers.Style(c);this.styles.select=new OpenLayers.Style(c);this.styles.temporary=new OpenLayers.Style(c);this.styles["delete"]=new OpenLayers.Style(c);break}}}}}OpenLayers.Util.extend(this,a)},destroy:function(){for(var a in this.styles){this.styles[a].destroy()}this.styles=null},createSymbolizer:function(b,c){if(!b){b=new OpenLayers.Feature.Vector()}if(!this.styles[c]){c="default"}b.renderIntent=c;var a={};if(this.extendDefault&&c!="default"){a=this.styles["default"].createSymbolizer(b)}return OpenLayers.Util.extend(a,this.styles[c].createSymbolizer(b))},addUniqueValueRules:function(b,d,f,a){var e=[];for(var c in f){e.push(new OpenLayers.Rule({symbolizer:f[c],context:a,filter:new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.EQUAL_TO,property:d,value:c})}))}this.styles[b].addRules(e)},CLASS_NAME:"OpenLayers.StyleMap"});OpenLayers.Geometry.Collection=OpenLayers.Class(OpenLayers.Geometry,{components:null,componentTypes:null,initialize:function(a){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);this.components=[];if(a!=null){this.addComponents(a)}},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 b=[];for(var c=0,a=this.components.length;c<a;c++){b.push(this.components[c].toShortString())}return b.join(",")},calculateBounds:function(){this.bounds=null;if(this.components&&this.components.length>0){this.setBounds(this.components[0].getBounds());for(var b=1,a=this.components.length;b<a;b++){this.extendBounds(this.components[b].getBounds())}}},addComponents:function(c){if(!(c instanceof Array)){c=[c]}for(var b=0,a=c.length;b<a;b++){this.addComponent(c[b])}},addComponent:function(b,a){var d=false;if(b){if(this.componentTypes==null||(OpenLayers.Util.indexOf(this.componentTypes,b.CLASS_NAME)>-1)){if(a!=null&&(a<this.components.length)){var e=this.components.slice(0,a);var c=this.components.slice(a,this.components.length);e.push(b);this.components=e.concat(c)}else{this.components.push(b)}b.parent=this;this.clearBounds();d=true}}return d},removeComponents:function(b){if(!(b instanceof Array)){b=[b]}for(var a=b.length-1;a>=0;--a){this.removeComponent(b[a])}},removeComponent:function(a){OpenLayers.Util.removeItem(this.components,a);this.clearBounds()},getLength:function(){var c=0;for(var b=0,a=this.components.length;b<a;b++){c+=this.components[b].getLength()}return c},getArea:function(){var c=0;for(var b=0,a=this.components.length;b<a;b++){c+=this.components[b].getArea()}return c},getGeodesicArea:function(b){var d=0;for(var c=0,a=this.components.length;c<a;c++){d+=this.components[c].getGeodesicArea(b)}return d},getCentroid:function(){return this.components.length&&this.components[0].getCentroid()},getGeodesicLength:function(b){var d=0;for(var c=0,a=this.components.length;c<a;c++){d+=this.components[c].getGeodesicLength(b)}return d},move:function(b,d){for(var c=0,a=this.components.length;c<a;c++){this.components[c].move(b,d)}},rotate:function(d,b){for(var c=0,a=this.components.length;c<a;++c){this.components[c].rotate(d,b)}},resize:function(d,a,c){for(var b=0;b<this.components.length;++b){this.components[b].resize(d,a,c)}return this},distanceTo:function(g,h){var b=!(h&&h.edge===false);var a=b&&h&&h.details;var j,c;var d=Number.POSITIVE_INFINITY;for(var e=0,f=this.components.length;e<f;++e){j=this.components[e].distanceTo(g,h);distance=a?j.distance:j;if(distance<d){d=distance;c=j;if(d==0){break}}}return c},equals:function(d){var b=true;if(!d||!d.CLASS_NAME||(this.CLASS_NAME!=d.CLASS_NAME)){b=false}else{if(!(d.components instanceof Array)||(d.components.length!=this.components.length)){b=false}else{for(var c=0,a=this.components.length;c<a;++c){if(!this.components[c].equals(d.components[c])){b=false;break}}}}return b},transform:function(e,c){if(e&&c){for(var d=0,a=this.components.length;d<a;d++){var b=this.components[d];b.transform(e,c)}this.bounds=null}return this},intersects:function(d){var b=false;for(var c=0,a=this.components.length;c<a;++c){b=d.intersects(this.components[c]);if(b){break}}return b},getVertices:function(b){var c=[];for(var d=0,a=this.components.length;d<a;++d){Array.prototype.push.apply(c,this.components[d].getVertices(b))}return c},CLASS_NAME:"OpenLayers.Geometry.Collection"});OpenLayers.Geometry.Point=OpenLayers.Class(OpenLayers.Geometry,{x:null,y:null,initialize:function(a,b){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);this.x=parseFloat(a);this.y=parseFloat(b)},clone:function(a){if(a==null){a=new OpenLayers.Geometry.Point(this.x,this.y)}OpenLayers.Util.applyDefaults(a,this);return a},calculateBounds:function(){this.bounds=new OpenLayers.Bounds(this.x,this.y,this.x,this.y)},distanceTo:function(f,j){var d=!(j&&j.edge===false);var a=d&&j&&j.details;var b,e,h,c,g,i;if(f instanceof OpenLayers.Geometry.Point){e=this.x;h=this.y;c=f.x;g=f.y;b=Math.sqrt(Math.pow(e-c,2)+Math.pow(h-g,2));i=!a?b:{x0:e,y0:h,x1:c,y1:g,distance:b}}else{i=f.distanceTo(this,j);if(a){i={x0:i.x1,y0:i.y1,x1:i.x0,y1:i.y0,distance:i.distance}}}return i},equals:function(a){var b=false;if(a!=null){b=((this.x==a.x&&this.y==a.y)||(isNaN(this.x)&&isNaN(this.y)&&isNaN(a.x)&&isNaN(a.y)))}return b},toShortString:function(){return(this.x+", "+this.y)},move:function(a,b){this.x=this.x+a;this.y=this.y+b;this.clearBounds()},rotate:function(d,b){d*=Math.PI/180;var a=this.distanceTo(b);var c=d+Math.atan2(this.y-b.y,this.x-b.x);this.x=b.x+(a*Math.cos(c));this.y=b.y+(a*Math.sin(c));this.clearBounds()},getCentroid:function(){return new OpenLayers.Geometry.Point(this.x,this.y)},resize:function(c,a,b){b=(b==undefined)?1:b;this.x=a.x+(c*b*(this.x-a.x));this.y=a.y+(c*(this.y-a.y));this.clearBounds();return this},intersects:function(b){var a=false;if(b.CLASS_NAME=="OpenLayers.Geometry.Point"){a=this.equals(b)}else{a=b.intersects(this)}return a},transform:function(b,a){if((b&&a)){OpenLayers.Projection.transform(this,b,a);this.bounds=null}return this},getVertices:function(a){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(c,b){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 d=0,a=this.strategies.length;d<a;d++){this.strategies[d].setLayer(this)}}},destroy:function(){if(this.strategies){var c,b,a;for(b=0,a=this.strategies.length;b<a;b++){c=this.strategies[b];if(c.autoDestroy){c.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(a){if(this.calculateInRange()&&this.visibility){this.events.triggerEvent("refresh",a)}},assignRenderer:function(){for(var c=0,a=this.renderers.length;c<a;c++){var b=OpenLayers.Renderer[this.renderers[c]];if(b&&b.prototype.supported()){this.renderer=new b(this.div,this.rendererOptions);break}}},displayError:function(){if(this.reportError){OpenLayers.Console.userError(OpenLayers.i18n("browserNotSupported",{renderers:this.renderers.join("\n")}))}},setMap:function(a){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 c,b,a;for(b=0,a=this.strategies.length;b<a;b++){c=this.strategies[b];if(c.autoActivate){c.activate()}}}},removeMap:function(c){if(this.strategies){var d,b,a;for(b=0,a=this.strategies.length;b<a;b++){d=this.strategies[b];if(d.autoActivate){d.deactivate()}}}},onMapResize:function(){OpenLayers.Layer.prototype.onMapResize.apply(this,arguments);this.renderer.setSize(this.map.getSize())},moveTo:function(g,b,h){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);var e=true;if(!h){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 f=this.map.getExtent();e=this.renderer.setExtent(f,b);this.renderer.root.style.visibility="visible";if(navigator.userAgent.toLowerCase().indexOf("gecko")!=-1){this.div.scrollLeft=this.div.scrollLeft}if(!b&&e){for(var d in this.unrenderedFeatures){var c=this.unrenderedFeatures[d];this.drawFeature(c)}}}if(!this.drawn||b||!e){this.drawn=true;var c;for(var d=0,a=this.features.length;d<a;d++){this.renderer.locked=(d!==(a-1));c=this.features[d];this.drawFeature(c)}}},display:function(a){OpenLayers.Layer.prototype.display.apply(this,arguments);var b=this.div.style.display;if(b!=this.renderer.root.style.display){this.renderer.root.style.display=b}},addFeatures:function(b,j){if(!(b instanceof Array)){b=[b]}var g=!j||!j.silent;if(g){var a={features:b};var f=this.events.triggerEvent("beforefeaturesadded",a);if(f===false){return}b=a.features}for(var c=0,e=b.length;c<e;c++){if(c!=(b.length-1)){this.renderer.locked=true}else{this.renderer.locked=false}var h=b[c];if(this.geometryType&&!(h.geometry instanceof this.geometryType)){var d=OpenLayers.i18n("componentShouldBe",{geomType:this.geometryType.prototype.CLASS_NAME});throw d}this.features.push(h);h.layer=this;if(!h.style&&this.style){h.style=OpenLayers.Util.extend({},this.style)}if(g){if(this.events.triggerEvent("beforefeatureadded",{feature:h})===false){continue}this.preFeatureInsert(h)}this.drawFeature(h);if(g){this.events.triggerEvent("featureadded",{feature:h});this.onFeatureInsert(h)}}if(g){this.events.triggerEvent("featuresadded",{features:b})}},removeFeatures:function(e,a){if(!e||e.length===0){return}if(!(e instanceof Array)){e=[e]}if(e===this.features){e=e.slice()}var d=!a||!a.silent;for(var c=e.length-1;c>=0;c--){if(c!=0&&e[c-1].geometry){this.renderer.locked=true}else{this.renderer.locked=false}var b=e[c];delete this.unrenderedFeatures[b.id];if(d){this.events.triggerEvent("beforefeatureremoved",{feature:b})}this.features=OpenLayers.Util.removeItem(this.features,b);b.layer=null;if(b.geometry){this.renderer.eraseFeatures(b)}if(OpenLayers.Util.indexOf(this.selectedFeatures,b)!=-1){OpenLayers.Util.removeItem(this.selectedFeatures,b)}if(d){this.events.triggerEvent("featureremoved",{feature:b})}}if(d){this.events.triggerEvent("featuresremoved",{features:e})}},destroyFeatures:function(d,a){var c=(d==undefined);if(c){d=this.features}if(d){this.removeFeatures(d,a);for(var b=d.length-1;b>=0;b--){d[b].destroy()}}},drawFeature:function(a,b){if(!this.drawn){return}if(typeof b!="object"){if(!b&&a.state===OpenLayers.State.DELETE){b="delete"}var c=b||a.renderIntent;b=a.style||this.style;if(!b){b=this.styleMap.createSymbolizer(a,c)}}if(!this.renderer.drawFeature(a,b)){this.unrenderedFeatures[a.id]=a}else{delete this.unrenderedFeatures[a.id]}},eraseFeatures:function(a){this.renderer.eraseFeatures(a)},getFeatureFromEvent:function(a){if(!this.renderer){OpenLayers.Console.error(OpenLayers.i18n("getFeatureError"));return null}var b=this.renderer.getFeatureIdFromEvent(a);return this.getFeatureById(b)},getFeatureById:function(d){var c=null;for(var b=0,a=this.features.length;b<a;++b){if(this.features[b].id==d){c=this.features[b];break}}return c},onFeatureInsert:function(a){},preFeatureInsert:function(a){},getDataExtent:function(){var b=null;if(this.features&&(this.features.length>0)){b=new OpenLayers.Bounds();for(var c=0,a=this.features.length;c<a;c++){b.extend(this.features[c].geometry.getBounds())}}return b},CLASS_NAME:"OpenLayers.Layer.Vector"});OpenLayers.Geometry.MultiPoint=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.Point"],initialize:function(a){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments)},addPoint:function(a,b){this.addComponent(a,b)},removePoint:function(a){this.removeComponent(a)},CLASS_NAME:"OpenLayers.Geometry.MultiPoint"});OpenLayers.Layer.Vector.RootContainer=OpenLayers.Class(OpenLayers.Layer.Vector,{displayInLayerSwitcher:false,layers:null,initialize:function(b,a){OpenLayers.Layer.Vector.prototype.initialize.apply(this,arguments)},display:function(){},getFeatureFromEvent:function(a){var d=this.layers;var c;for(var b=0;b<d.length;b++){c=d[b].getFeatureFromEvent(a);if(c){return c}}},setMap:function(a){OpenLayers.Layer.Vector.prototype.setMap.apply(this,arguments);this.collectRoots();a.events.register("changelayer",this,this.handleChangeLayer)},removeMap:function(a){a.events.unregister("changelayer",this,this.handleChangeLayer);this.resetRoots();OpenLayers.Layer.Vector.prototype.removeMap.apply(this,arguments)},collectRoots:function(){var b;for(var a=0;a<this.map.layers.length;++a){b=this.map.layers[a];if(OpenLayers.Util.indexOf(this.layers,b)!=-1){b.renderer.moveRoot(this.renderer)}}},resetRoots:function(){var b;for(var a=0;a<this.layers.length;++a){b=this.layers[a];if(this.renderer&&b.renderer.getRenderLayerId()==this.id){this.renderer.moveRoot(b.renderer)}}},handleChangeLayer:function(a){var b=a.layer;if(a.property=="order"&&OpenLayers.Util.indexOf(this.layers,b)!=-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(c,a){this.EVENT_TYPES=OpenLayers.Control.SelectFeature.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);OpenLayers.Control.prototype.initialize.apply(this,[a]);if(this.scope===null){this.scope=this}if(c instanceof Array){this.layers=c;this.layer=new OpenLayers.Layer.Vector.RootContainer(this.id+"_container",{layers:c})}else{this.layer=c}var b={click:this.clickFeature,clickout:this.clickoutFeature};if(this.hover){b.over=this.overFeature;b.out=this.outFeature}this.callbacks=OpenLayers.Util.extend(b,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(b){var f=this.layers||[this.layer];var e,d;for(var a=0;a<f.length;++a){e=f[a];for(var c=e.selectedFeatures.length-1;c>=0;--c){d=e.selectedFeatures[c];if(!b||b.except!=d){this.unselect(d)}}}},clickFeature:function(a){if(!this.hover){var b=(OpenLayers.Util.indexOf(a.layer.selectedFeatures,a)>-1);if(b){if(this.toggleSelect()){this.unselect(a)}else{if(!this.multipleSelect()){this.unselectAll({except:a})}}}else{if(!this.multipleSelect()){this.unselectAll({except:a})}this.select(a)}}},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(a){if(!this.hover&&this.clickout){this.unselectAll()}},overFeature:function(b){var a=b.layer;if(this.hover){if(this.highlightOnly){this.highlight(b)}else{if(OpenLayers.Util.indexOf(a.selectedFeatures,b)==-1){this.select(b)}}}},outFeature:function(a){if(this.hover){if(this.highlightOnly){if(a._lastHighlighter==this.id){if(a._prevHighlighter&&a._prevHighlighter!=this.id){delete a._lastHighlighter;var b=this.map.getControl(a._prevHighlighter);if(b){b.highlight(a)}}else{this.unhighlight(a)}}}else{this.unselect(a)}}},highlight:function(c){var b=c.layer;var a=this.events.triggerEvent("beforefeaturehighlighted",{feature:c});if(a!==false){c._prevHighlighter=c._lastHighlighter;c._lastHighlighter=this.id;var d=this.selectStyle||this.renderIntent;b.drawFeature(c,d);this.events.triggerEvent("featurehighlighted",{feature:c})}},unhighlight:function(b){var a=b.layer;b._lastHighlighter=b._prevHighlighter;delete b._prevHighlighter;a.drawFeature(b,b.style||b.layer.style||"default");this.events.triggerEvent("featureunhighlighted",{feature:b})},select:function(c){var a=this.onBeforeSelect.call(this.scope,c);var b=c.layer;if(a!==false){a=b.events.triggerEvent("beforefeatureselected",{feature:c});if(a!==false){b.selectedFeatures.push(c);this.highlight(c);b.events.triggerEvent("featureselected",{feature:c});this.onSelect.call(this.scope,c)}}},unselect:function(b){var a=b.layer;this.unhighlight(b);OpenLayers.Util.removeItem(a.selectedFeatures,b);a.events.triggerEvent("featureunselected",{feature:b});this.onUnselect.call(this.scope,b)},selectBox:function(e){if(e instanceof OpenLayers.Bounds){var h=this.map.getLonLatFromPixel(new OpenLayers.Pixel(e.left,e.bottom));var k=this.map.getLonLatFromPixel(new OpenLayers.Pixel(e.right,e.top));var a=new OpenLayers.Bounds(h.lon,h.lat,k.lon,k.lat);if(!this.multipleSelect()){this.unselectAll()}var j=this.multiple;this.multiple=true;var d=this.layers||[this.layer];var f;for(var b=0;b<d.length;++b){f=d[b];for(var c=0,g=f.features.length;c<g;++c){var m=f.features[c];if(this.geometryTypes==null||OpenLayers.Util.indexOf(this.geometryTypes,m.geometry.CLASS_NAME)>-1){if(a.toGeometry().intersects(m.geometry)){if(OpenLayers.Util.indexOf(f.selectedFeatures,m)==-1){this.select(m)}}}}}this.multiple=j}},setMap:function(a){this.handlers.feature.setMap(a);if(this.box){this.handlers.box.setMap(a)}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(a){OpenLayers.Geometry.MultiPoint.prototype.initialize.apply(this,arguments)},getLength:function(){var c=0;if(this.components&&(this.components.length>1)){for(var b=1,a=this.components.length;b<a;b++){c+=this.components[b-1].distanceTo(this.components[b])}}return c},getGeodesicLength:function(b){var e=this;if(b){var c=new OpenLayers.Projection("EPSG:4326");if(!c.equals(b)){e=this.clone().transform(b,c)}}var f=0;if(e.components&&(e.components.length>1)){var h,g;for(var d=1,a=e.components.length;d<a;d++){h=e.components[d-1];g=e.components[d];f+=OpenLayers.Util.distVincenty({lon:h.x,lat:h.y},{lon:g.x,lat:g.y})}}return f*1000},CLASS_NAME:"OpenLayers.Geometry.Curve"});OpenLayers.Geometry.LineString=OpenLayers.Class(OpenLayers.Geometry.Curve,{initialize:function(a){OpenLayers.Geometry.Curve.prototype.initialize.apply(this,arguments)},removeComponent:function(a){if(this.components&&(this.components.length>2)){OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments)}},intersects:function(m){var c=false;var l=m.CLASS_NAME;if(l=="OpenLayers.Geometry.LineString"||l=="OpenLayers.Geometry.LinearRing"||l=="OpenLayers.Geometry.Point"){var p=this.getSortedSegments();var n;if(l=="OpenLayers.Geometry.Point"){n=[{x1:m.x,y1:m.y,x2:m.x,y2:m.y}]}else{n=m.getSortedSegments()}var s,g,e,a,r,q,d,b;outer:for(var h=0,k=p.length;h<k;++h){s=p[h];g=s.x1;e=s.x2;a=s.y1;r=s.y2;inner:for(var f=0,o=n.length;f<o;++f){q=n[f];if(q.x1>e){break}if(q.x2<g){continue}d=q.y1;b=q.y2;if(Math.min(d,b)>Math.max(a,r)){continue}if(Math.max(d,b)<Math.min(a,r)){continue}if(OpenLayers.Geometry.segmentsIntersect(s,q)){c=true;break outer}}}}else{c=m.intersects(this)}return c},getSortedSegments:function(){var a=this.components.length-1;var b=new Array(a);for(var c=0;c<a;++c){point1=this.components[c];point2=this.components[c+1];if(point1.x<point2.x){b[c]={x1:point1.x,y1:point1.y,x2:point2.x,y2:point2.y}}else{b[c]={x1:point2.x,y1:point2.y,x2:point1.x,y2:point1.y}}}function d(f,e){return f.x1-e.x1}return b.sort(d)},splitWithSegment:function(r,b){var c=!(b&&b.edge===false);var o=b&&b.tolerance;var a=[];var t=this.getVertices();var n=[];var v=[];var h=false;var e,d,l;var j,q,u;var f={point:true,tolerance:o};var g=null;for(var m=0,k=t.length-2;m<=k;++m){e=t[m];n.push(e.clone());d=t[m+1];u={x1:e.x,y1:e.y,x2:d.x,y2:d.y};l=OpenLayers.Geometry.segmentsIntersect(r,u,f);if(l instanceof OpenLayers.Geometry.Point){if((l.x===r.x1&&l.y===r.y1)||(l.x===r.x2&&l.y===r.y2)||l.equals(e)||l.equals(d)){q=true}else{q=false}if(q||c){if(!l.equals(v[v.length-1])){v.push(l.clone())}if(m===0){if(l.equals(e)){continue}}if(l.equals(d)){continue}h=true;if(!l.equals(e)){n.push(l)}a.push(new OpenLayers.Geometry.LineString(n));n=[l.clone()]}}}if(h){n.push(d.clone());a.push(new OpenLayers.Geometry.LineString(n))}if(v.length>0){var p=r.x1<r.x2?1:-1;var s=r.y1<r.y2?1:-1;g={lines:a,points:v.sort(function(w,i){return(p*w.x-p*i.x)||(s*w.y-s*i.y)})}}return g},split:function(z,b){var n=null;var d=b&&b.mutual;var l,e,m,c;if(z instanceof OpenLayers.Geometry.LineString){var w=this.getVertices();var g,f,v,h,a,p;var s=[];m=[];for(var t=0,o=w.length-2;t<=o;++t){g=w[t];f=w[t+1];v={x1:g.x,y1:g.y,x2:f.x,y2:f.y};c=c||[z];if(d){s.push(g.clone())}for(var r=0;r<c.length;++r){h=c[r].splitWithSegment(v,b);if(h){a=h.lines;if(a.length>0){a.unshift(r,1);Array.prototype.splice.apply(c,a);r+=a.length-2}if(d){for(var q=0,u=h.points.length;q<u;++q){p=h.points[q];if(!p.equals(g)){s.push(p);m.push(new OpenLayers.Geometry.LineString(s));if(p.equals(f)){s=[]}else{s=[p.clone()]}}}}}}}if(d&&m.length>0&&s.length>0){s.push(f.clone());m.push(new OpenLayers.Geometry.LineString(s))}}else{n=z.splitWith(this,b)}if(c&&c.length>1){e=true}else{c=[]}if(m&&m.length>1){l=true}else{m=[]}if(e||l){if(d){n=[m,c]}else{n=c}}return n},splitWith:function(b,a){return b.split(this,a)},getVertices:function(a){var b;if(a===true){b=[this.components[0],this.components[this.components.length-1]]}else{if(a===false){b=this.components.slice(1,this.components.length-1)}else{b=this.components.slice()}}return b},distanceTo:function(h,g){var k=!(g&&g.edge===false);var B=k&&g&&g.details;var q,e={};var t=Number.POSITIVE_INFINITY;if(h instanceof OpenLayers.Geometry.Point){var r=this.getSortedSegments();var p=h.x;var o=h.y;var z;for(var v=0,w=r.length;v<w;++v){z=r[v];q=OpenLayers.Geometry.distanceToSegment(h,z);if(q.distance<t){t=q.distance;e=q;if(t===0){break}}else{if(z.x2>p&&((o>z.y1&&o<z.y2)||(o<z.y1&&o>z.y2))){break}}}if(B){e={distance:e.distance,x0:e.x,y0:e.y,x1:p,y1:o}}else{e=e.distance}}else{if(h instanceof OpenLayers.Geometry.LineString){var d=this.getSortedSegments();var c=h.getSortedSegments();var b,a,n,A,f;var m=c.length;var l={point:true};outer:for(var v=0,w=d.length;v<w;++v){b=d[v];A=b.x1;f=b.y1;for(var u=0;u<m;++u){a=c[u];n=OpenLayers.Geometry.segmentsIntersect(b,a,l);if(n){t=0;e={distance:0,x0:n.x,y0:n.y,x1:n.x,y1:n.y};break outer}else{q=OpenLayers.Geometry.distanceToSegment({x:A,y:f},a);if(q.distance<t){t=q.distance;e={distance:t,x0:A,y0:f,x1:q.x,y1:q.y}}}}}if(!B){e=e.distance}if(t!==0){if(b){q=h.distanceTo(new OpenLayers.Geometry.Point(b.x2,b.y2),g);var s=B?q.distance:q;if(s<t){if(B){e={distance:t,x0:q.x1,y0:q.y1,x1:q.x0,y1:q.y0}}else{e=s}}}}}else{e=h.distanceTo(this,g);if(B){e={distance:e.distance,x0:e.x1,y0:e.y1,x1:e.x0,y1:e.y0}}}}return e},CLASS_NAME:"OpenLayers.Geometry.LineString"});OpenLayers.Geometry.LinearRing=OpenLayers.Class(OpenLayers.Geometry.LineString,{componentTypes:["OpenLayers.Geometry.Point"],initialize:function(a){OpenLayers.Geometry.LineString.prototype.initialize.apply(this,arguments)},addComponent:function(a,b){var c=false;var d=this.components.pop();if(b!=null||!a.equals(d)){c=OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,arguments)}var e=this.components[0];OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,[e]);return c},removeComponent:function(a){if(this.components.length>4){this.components.pop();OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments);var b=this.components[0];OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,[b])}},move:function(b,d){for(var c=0,a=this.components.length;c<a-1;c++){this.components[c].move(b,d)}},rotate:function(d,b){for(var c=0,a=this.components.length;c<a-1;++c){this.components[c].rotate(d,b)}},resize:function(e,b,d){for(var c=0,a=this.components.length;c<a-1;++c){this.components[c].resize(e,b,d)}return this},transform:function(e,c){if(e&&c){for(var d=0,a=this.components.length;d<a-1;d++){var b=this.components[d];b.transform(e,c)}this.bounds=null}return this},getCentroid:function(){if(this.components&&(this.components.length>2)){var h=0;var g=0;for(var e=0;e<this.components.length-1;e++){var d=this.components[e];var k=this.components[e+1];h+=(d.x+k.x)*(d.x*k.y-k.x*d.y);g+=(d.y+k.y)*(d.x*k.y-k.x*d.y)}var f=-1*this.getArea();var a=h/(6*f);var j=g/(6*f)}return new OpenLayers.Geometry.Point(a,j)},getArea:function(){var g=0;if(this.components&&(this.components.length>2)){var f=0;for(var e=0,d=this.components.length;e<d-1;e++){var a=this.components[e];var h=this.components[e+1];f+=(a.x+h.x)*(h.y-a.y)}g=-f/2}return g},getGeodesicArea:function(b){var d=this;if(b){var c=new OpenLayers.Projection("EPSG:4326");if(!c.equals(b)){d=this.clone().transform(b,c)}}var f=0;var a=d.components&&d.components.length;if(a>2){var h,g;for(var e=0;e<a-1;e++){h=d.components[e];g=d.components[e+1];f+=OpenLayers.Util.rad(g.x-h.x)*(2+Math.sin(OpenLayers.Util.rad(h.y))+Math.sin(OpenLayers.Util.rad(g.y)))}f=f*6378137*6378137/2}return f},containsPoint:function(m){var s=OpenLayers.Number.limitSigDigs;var l=14;var k=s(m.x,l);var j=s(m.y,l);function r(w,t,v,i,u){return(((t-i)*w)+((i*v)-(t*u)))/(v-u)}var a=this.components.length-1;var g,f,q,d,o,b,e,c;var h=0;for(var n=0;n<a;++n){g=this.components[n];q=s(g.x,l);d=s(g.y,l);f=this.components[n+1];o=s(f.x,l);b=s(f.y,l);if(d==b){if(j==d){if(q<=o&&(k>=q&&k<=o)||q>=o&&(k<=q&&k>=o)){h=-1;break}}continue}e=s(r(j,q,d,o,b),l);if(e==k){if(d<b&&(j>=d&&j<=b)||d>b&&(j<=d&&j>=b)){h=-1;break}}if(e<=k){continue}if(q!=o&&(e<Math.min(q,o)||e>Math.max(q,o))){continue}if(d<b&&(j>=d&&j<b)||d>b&&(j<d&&j>=b)){++h}}var p=(h==-1)?1:!!(h&1);return p},intersects:function(d){var b=false;if(d.CLASS_NAME=="OpenLayers.Geometry.Point"){b=this.containsPoint(d)}else{if(d.CLASS_NAME=="OpenLayers.Geometry.LineString"){b=d.intersects(this)}else{if(d.CLASS_NAME=="OpenLayers.Geometry.LinearRing"){b=OpenLayers.Geometry.LineString.prototype.intersects.apply(this,[d])}else{for(var c=0,a=d.components.length;c<a;++c){b=d.components[c].intersects(this);if(b){break}}}}}return b},getVertices:function(a){return(a===true)?[]:this.components.slice(0,this.components.length-1)},CLASS_NAME:"OpenLayers.Geometry.LinearRing"});OpenLayers.Geometry.Polygon=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.LinearRing"],initialize:function(a){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments)},getArea:function(){var c=0;if(this.components&&(this.components.length>0)){c+=Math.abs(this.components[0].getArea());for(var b=1,a=this.components.length;b<a;b++){c-=Math.abs(this.components[b].getArea())}}return c},getGeodesicArea:function(b){var d=0;if(this.components&&(this.components.length>0)){d+=Math.abs(this.components[0].getGeodesicArea(b));for(var c=1,a=this.components.length;c<a;c++){d-=Math.abs(this.components[c].getGeodesicArea(b))}}return d},containsPoint:function(a){var e=this.components.length;var c=false;if(e>0){c=this.components[0].containsPoint(a);if(c!==1){if(c&&e>1){var d;for(var b=1;b<e;++b){d=this.components[b].containsPoint(a);if(d){if(d===1){c=1}else{c=false}break}}}}}return c},intersects:function(e){var b=false;var d,a;if(e.CLASS_NAME=="OpenLayers.Geometry.Point"){b=this.containsPoint(e)}else{if(e.CLASS_NAME=="OpenLayers.Geometry.LineString"||e.CLASS_NAME=="OpenLayers.Geometry.LinearRing"){for(d=0,a=this.components.length;d<a;++d){b=e.intersects(this.components[d]);if(b){break}}if(!b){for(d=0,a=e.components.length;d<a;++d){b=this.containsPoint(e.components[d]);if(b){break}}}}else{for(d=0,a=e.components.length;d<a;++d){b=this.intersects(e.components[d]);if(b){break}}}}if(!b&&e.CLASS_NAME=="OpenLayers.Geometry.Polygon"){var c=this.components[0];for(d=0,a=c.components.length;d<a;++d){b=e.containsPoint(c.components[d]);if(b){break}}}return b},distanceTo:function(d,b){var c=!(b&&b.edge===false);var a;if(!c&&this.intersects(d)){a=0}else{a=OpenLayers.Geometry.Collection.prototype.distanceTo.apply(this,[d,b])}return a},CLASS_NAME:"OpenLayers.Geometry.Polygon"});OpenLayers.Geometry.Polygon.createRegularPolygon=function(j,f,b,l){var c=Math.PI*((1/b)-(1/2));if(l){c+=(l/180)*Math.PI}var a,h,g;var k=[];for(var e=0;e<b;++e){a=c+(e*2*Math.PI/b);h=j.x+(f*Math.cos(a));g=j.y+(f*Math.sin(a));k.push(new OpenLayers.Geometry.Point(h,g))}var d=new OpenLayers.Geometry.LinearRing(k);return new OpenLayers.Geometry.Polygon([d])};OpenLayers.Format.GeoRSS=OpenLayers.Class(OpenLayers.Format.XML,{rssns:"http://backend.userland.com/rss2",featureNS:"http://mapserver.gis.umn.edu/mapserver",georssns:"http://www.georss.org/georss",geons:"http://www.w3.org/2003/01/geo/wgs84_pos#",featureTitle:"Untitled",featureDescription:"No Description",gmlParser:null,xy:false,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},createGeometryFromItem:function(n){var m=this.getElementsByTagNameNS(n,this.georssns,"point");var g=this.getElementsByTagNameNS(n,this.geons,"lat");var a=this.getElementsByTagNameNS(n,this.geons,"long");var p=this.getElementsByTagNameNS(n,this.georssns,"line");var k=this.getElementsByTagNameNS(n,this.georssns,"polygon");var c=this.getElementsByTagNameNS(n,this.georssns,"where");var d=this.getElementsByTagNameNS(n,this.georssns,"box");if(m.length>0||(g.length>0&&a.length>0)){var l;if(m.length>0){l=OpenLayers.String.trim(m[0].firstChild.nodeValue).split(/\s+/);if(l.length!=2){l=OpenLayers.String.trim(m[0].firstChild.nodeValue).split(/\s*,\s*/)}}else{l=[parseFloat(g[0].firstChild.nodeValue),parseFloat(a[0].firstChild.nodeValue)]}var h=new OpenLayers.Geometry.Point(parseFloat(l[1]),parseFloat(l[0]))}else{if(p.length>0){var j=OpenLayers.String.trim(this.concatChildValues(p[0])).split(/\s+/);var e=[];var m;for(var b=0,f=j.length;b<f;b+=2){m=new OpenLayers.Geometry.Point(parseFloat(j[b+1]),parseFloat(j[b]));e.push(m)}h=new OpenLayers.Geometry.LineString(e)}else{if(k.length>0){var j=OpenLayers.String.trim(this.concatChildValues(k[0])).split(/\s+/);var e=[];var m;for(var b=0,f=j.length;b<f;b+=2){m=new OpenLayers.Geometry.Point(parseFloat(j[b+1]),parseFloat(j[b]));e.push(m)}h=new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing(e)])}else{if(c.length>0){if(!this.gmlParser){this.gmlParser=new OpenLayers.Format.GML({xy:this.xy})}var o=this.gmlParser.parseFeature(c[0]);h=o.geometry}else{if(d.length>0){var j=OpenLayers.String.trim(d[0].firstChild.nodeValue).split(/\s+/);var e=[];var m;if(j.length>3){m=new OpenLayers.Geometry.Point(parseFloat(j[1]),parseFloat(j[0]));e.push(m);m=new OpenLayers.Geometry.Point(parseFloat(j[1]),parseFloat(j[2]));e.push(m);m=new OpenLayers.Geometry.Point(parseFloat(j[3]),parseFloat(j[2]));e.push(m);m=new OpenLayers.Geometry.Point(parseFloat(j[3]),parseFloat(j[0]));e.push(m);m=new OpenLayers.Geometry.Point(parseFloat(j[1]),parseFloat(j[0]));e.push(m)}h=new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing(e)])}}}}}if(h&&this.internalProjection&&this.externalProjection){h.transform(this.externalProjection,this.internalProjection)}return h},createFeatureFromItem:function(i){var d=this.createGeometryFromItem(i);var g=this.getChildValue(i,"*","title",this.featureTitle);var h=this.getChildValue(i,"*","description",this.getChildValue(i,"*","content",this.getChildValue(i,"*","summary",this.featureDescription)));var f=this.getChildValue(i,"*","link");if(!f){try{f=this.getElementsByTagNameNS(i,"*","link")[0].getAttribute("href")}catch(c){f=null}}var a=this.getChildValue(i,"*","id",null);var b={title:g,description:h,link:f};var j=new OpenLayers.Feature.Vector(d,b);j.fid=a;return j},getChildValue:function(d,b,c,f){var e;var a=this.getElementsByTagNameNS(d,b,c);if(a&&a[0]&&a[0].firstChild&&a[0].firstChild.nodeValue){e=a[0].firstChild.nodeValue}else{e=(f==undefined)?"":f}return e},read:function(e){if(typeof e=="string"){e=OpenLayers.Format.XML.prototype.read.apply(this,[e])}var a=null;a=this.getElementsByTagNameNS(e,"*","item");if(a.length==0){a=this.getElementsByTagNameNS(e,"*","entry")}var c=a.length;var d=new Array(c);for(var b=0;b<c;b++){d[b]=this.createFeatureFromItem(a[b])}return d},write:function(c){var d;if(c instanceof Array){d=this.createElementNS(this.rssns,"rss");for(var b=0,a=c.length;b<a;b++){d.appendChild(this.createFeatureXML(c[b]))}}else{d=this.createFeatureXML(c)}return OpenLayers.Format.XML.prototype.write.apply(this,[d])},createFeatureXML:function(j){var f=this.buildGeometryNode(j.geometry);var a=this.createElementNS(this.rssns,"item");var d=this.createElementNS(this.rssns,"title");d.appendChild(this.createTextNode(j.attributes.title?j.attributes.title:""));var b=this.createElementNS(this.rssns,"description");b.appendChild(this.createTextNode(j.attributes.description?j.attributes.description:""));a.appendChild(d);a.appendChild(b);if(j.attributes.link){var h=this.createElementNS(this.rssns,"link");h.appendChild(this.createTextNode(j.attributes.link));a.appendChild(h)}for(var i in j.attributes){if(i=="link"||i=="title"||i=="description"){continue}var g=this.createTextNode(j.attributes[i]);var e=i;if(i.search(":")!=-1){e=i.split(":")[1]}var c=this.createElementNS(this.featureNS,"feature:"+e);c.appendChild(g);a.appendChild(c)}a.appendChild(f);return a},buildGeometryNode:function(b){if(this.internalProjection&&this.externalProjection){b=b.clone();b.transform(this.internalProjection,this.externalProjection)}var a;if(b.CLASS_NAME=="OpenLayers.Geometry.Polygon"){a=this.createElementNS(this.georssns,"georss:polygon");a.appendChild(this.buildCoordinatesNode(b.components[0]))}else{if(b.CLASS_NAME=="OpenLayers.Geometry.LineString"){a=this.createElementNS(this.georssns,"georss:line");a.appendChild(this.buildCoordinatesNode(b))}else{if(b.CLASS_NAME=="OpenLayers.Geometry.Point"){a=this.createElementNS(this.georssns,"georss:point");a.appendChild(this.buildCoordinatesNode(b))}else{throw"Couldn't parse "+b.CLASS_NAME}}}return a},buildCoordinatesNode:function(f){var c=null;if(f.components){c=f.components}var e;if(c){var b=c.length;var d=new Array(b);for(var a=0;a<b;a++){d[a]=c[a].y+" "+c[a].x}e=d.join(" ")}else{e=f.y+" "+f.x}return this.createTextNode(e)},CLASS_NAME:"OpenLayers.Format.GeoRSS"});OpenLayers.Feature.PopupVector=OpenLayers.Class(OpenLayers.Feature.Vector,{createPopup:function(){var b=this.id+"_popup";var a=this.clickLonLat||this.geometry.getBounds().getCenterLonLat();if(!this.popup){this.popup=new OpenLayers.Popup.AnchoredBubble(b,a,this.data.popupSize,this.data.popupContentHTML,null,true,OpenLayers.Function.bind(function(){this.layer.map.removePopup(this.popup)},this))}else{this.popup.lonlat=a}if(this.data.overflow!=null){this.popup.contentDiv.style.overflow=this.data.overflow}this.popup.feature=this;return this.popup},CLASS_NAME:"OpenLayers.Feature.PopupVector"});OpenLayers.Control.ItSelectFeature=OpenLayers.Class(OpenLayers.Control.SelectFeature,{select:function(c){c.clickLonLat=map.getLonLatFromViewPortPx(this.handlers.feature.down);var a=this.onBeforeSelect.call(this.scope,c);var b=c.layer;if(a!==false){a=b.events.triggerEvent("beforefeatureselected",{feature:c});if(a!==false){b.selectedFeatures.push(c);this.highlight(c);b.events.triggerEvent("featureselected",{feature:c});this.onSelect.call(this.scope,c)}}},CLASS_NAME:"OpenLayers.Control.ItSelectFeature"});OpenLayers.Layer.VectorGeoRSS=OpenLayers.Class(OpenLayers.Layer.Vector,{location:null,formatOptions:null,icon:null,popupSize:null,useFeedTitle:true,initialize:function(c,a,b){OpenLayers.Layer.Vector.prototype.initialize.apply(this,[c,b]);this.location=a},loadRSS:function(){if(!this.loaded){this.events.triggerEvent("loadstart");OpenLayers.Request.GET({url:this.location,success:this.parseData,scope:this});this.loaded=true}},moveTo:function(c,a,b){OpenLayers.Layer.Vector.prototype.moveTo.apply(this,arguments);if(this.visibility&&!this.loaded){this.loadRSS()}},parseData:function(j){var n=j.responseXML;if(!n||!n.documentElement){n=OpenLayers.Format.XML.prototype.read(j.responseText)}if(this.useFeedTitle){var a=null;try{a=n.getElementsByTagNameNS("*","title")[0].firstChild.nodeValue}catch(h){a=n.getElementsByTagName("title")[0].firstChild.nodeValue}if(a){this.setName(a)}}var r={};OpenLayers.Util.extend(r,this.formatOptions);if(this.map&&!this.projection.equals(this.map.getProjectionObject())){r.externalProjection=this.projection;r.internalProjection=this.map.getProjectionObject()}var o=new OpenLayers.Format.GeoRSS(r);var b=o.read(n);for(var f=0,g=b.length;f<g;f++){var d={};var q=b[f];if(!q.geometry){continue}var l=q.attributes.title?q.attributes.title:"Untitled";var p=q.attributes.description?q.attributes.description:"No description.";var k=q.attributes.link?q.attributes.link+l.replace(/\s+/g,"-")+"/":"";var m=q.geometry.getBounds().getCenterLonLat();d.icon=this.icon==null?OpenLayers.Marker.defaultIcon():this.icon.clone();d.popupSize=this.popupSize?this.popupSize.clone():new OpenLayers.Size(250,120);if(l||p){d.title=l;d.description=p;var c="";c+='<div class="olLayerGeoRSSTitle">';if(k){c+='<a class="link" href="'+k+'">'}c+=l;if(k){c+="</a>"}c+="</div>";c+='<div style="" class="olLayerGeoRSSDescription">';c+=p;c+="</div>";d.popupContentHTML=c}var q=new OpenLayers.Feature.PopupVector(q.geometry,d);this.addFeatures([q])}this.events.triggerEvent("loadend")},CLASS_NAME:"OpenLayers.Layer.VectorGeoRSS"});
