var OpenLayers={singleFile:true};(function(){var H=(typeof OpenLayers=="object"&&OpenLayers.singleFile);var A;window.OpenLayers={_scriptName:(!H)?"lib/OpenLayers.js":"OpenLayers.js",_getScriptLocation:function(){if(A!=undefined){return A}A="";var Q=new RegExp("(^|(.*?\\/))("+OpenLayers._scriptName+")(\\?|$)");var M=document.getElementsByTagName("script");for(var O=0,L=M.length;O<L;O++){var P=M[O].getAttribute("src");if(P){var N=P.match(Q);if(N){A=N[1];break}}}return A}};if(!H){var I=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/Image/IFrame.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/Google/v3.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/WMS/Post.js","OpenLayers/Layer/WMTS.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/Layer/Zoomify.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/Control/WMTSGetFeatureInfo.js","OpenLayers/Control/Graticule.js","OpenLayers/Control/TransformFeature.js","OpenLayers/Control/SLDSelect.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/Filter.js","OpenLayers/Strategy/Fixed.js","OpenLayers/Strategy/Cluster.js","OpenLayers/Strategy/Paging.js","OpenLayers/Strategy/BBOX.js","OpenLayers/Strategy/Save.js","OpenLayers/Strategy/Refresh.js","OpenLayers/Filter.js","OpenLayers/Filter/FeatureId.js","OpenLayers/Filter/Logical.js","OpenLayers/Filter/Comparison.js","OpenLayers/Filter/Spatial.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/Protocol/SOS.js","OpenLayers/Protocol/SOS/v1_0_0.js","OpenLayers/Layer/PointTrack.js","OpenLayers/Layer/GML.js","OpenLayers/Style.js","OpenLayers/Style2.js","OpenLayers/StyleMap.js","OpenLayers/Rule.js","OpenLayers/Format.js","OpenLayers/Format/XML.js","OpenLayers/Format/Context.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/Atom.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/OWSCommon/v1.js","OpenLayers/Format/OWSCommon/v1_0_0.js","OpenLayers/Format/OWSCommon/v1_1_0.js","OpenLayers/Format/CSWGetDomain.js","OpenLayers/Format/CSWGetDomain/v2_0_2.js","OpenLayers/Format/CSWGetRecords.js","OpenLayers/Format/CSWGetRecords/v2_0_2.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.js","OpenLayers/Format/WMSCapabilities/v1_1.js","OpenLayers/Format/WMSCapabilities/v1_1_0.js","OpenLayers/Format/WMSCapabilities/v1_1_1.js","OpenLayers/Format/WMSCapabilities/v1_3.js","OpenLayers/Format/WMSCapabilities/v1_3_0.js","OpenLayers/Format/WMSGetFeatureInfo.js","OpenLayers/Format/SOSCapabilities.js","OpenLayers/Format/SOSCapabilities/v1_0_0.js","OpenLayers/Format/SOSGetObservation.js","OpenLayers/Format/SOSGetFeatureOfInterest.js","OpenLayers/Format/OWSContext.js","OpenLayers/Format/OWSContext/v0_3_1.js","OpenLayers/Format/WMTSCapabilities.js","OpenLayers/Format/WMTSCapabilities/v1_0_0.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/Symbolizer.js","OpenLayers/Symbolizer/Point.js","OpenLayers/Symbolizer/Line.js","OpenLayers/Symbolizer/Polygon.js","OpenLayers/Symbolizer/Text.js","OpenLayers/Symbolizer/Raster.js","OpenLayers/Lang.js","OpenLayers/Lang/en.js");var C=navigator.userAgent;var E=(C.match("MSIE")||C.match("Safari"));if(E){var B=new Array(I.length)}var J=OpenLayers._getScriptLocation()+"lib/";for(var D=0,G=I.length;D<G;D++){if(E){B[D]="<script src='"+J+I[D]+"'><\/script>"}else{var K=document.createElement("script");K.src=J+I[D];var F=document.getElementsByTagName("head").length?document.getElementsByTagName("head")[0]:document.body;F.appendChild(K)}}if(E){document.write(B.join(""))}}})();OpenLayers.VERSION_NUMBER="OpenLayers 2.10 -- $Revision: 10721 $";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(I,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)}},False:function(){return false},True:function(){return true}};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.Date={toISOString:(function(){if("toISOString" in Date.prototype){return function(B){return B.toISOString()}}else{function A(C,B){var D=C+"";while(D.length<B){D="0"+D}return D}return function(B){var C;if(isNaN(B.getTime())){C="Invalid Date"}else{C=B.getUTCFullYear()+"-"+A(B.getUTCMonth()+1,2)+"-"+A(B.getUTCDate(),2)+"T"+A(B.getUTCHours(),2)+":"+A(B.getUTCMinutes(),2)+":"+A(B.getUTCSeconds(),2)+"."+A(B.getUTCMilliseconds(),3)+"Z"}return C}}})(),parse:function(J){var B;var P=Date.parse(J);if(!isNaN(P)){B=new Date(P)}else{var H=J.match(/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{1,2}):(\d{2}):(\d{2}(?:\.\d+)?)(Z|(?:[+-]\d{1,2}(?::(\d{2}))?)))?$/);var B;if(H&&(H[1]||H[7])){var K=parseInt(H[1],10)||0;var I=(parseInt(H[2],10)-1)||0;var M=parseInt(H[3],10)||1;B=new Date(Date.UTC(K,I,M));var L=H[7];if(L){var N=parseInt(H[4],10);var D=parseInt(H[5],10);var A=parseFloat(H[6]);var O=A|0;var C=Math.round(1000*(A-O));B.setUTCHours(N,D,O,C);if(L!=="Z"){var G=parseInt(L,10);var F=parseInt(H[8])||0;var E=-1000*(60*(G*60)+F*60);B=new Date(B.getTime()+E)}}}else{B=new Date("invalid")}}return B}};OpenLayers.Class=function(){var E=function(){if(arguments&&arguments[0]!=OpenLayers.Class.isPrototype){this.initialize.apply(this,arguments)}};var C={};var G,B,D;for(var F=0,A=arguments.length;F<A;++F){D=arguments[F];if(typeof D=="function"){if(F==0&&A>1){B=D.prototype.initialize;D.prototype.initialize=function(){};C=new D();if(B===undefined){delete D.prototype.initialize}else{D.prototype.initialize=B}}G=D.prototype}else{G=D}OpenLayers.Util.extend(C,G)}E.prototype=C;return E};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};OpenLayers.Util.isElement=function(A){return !!(A&&A.nodeType===1)};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){if(typeof D.indexOf=="function"){return D.indexOf(C)}else{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.display=""}OpenLayers.Element.removeClass(this,"olImageLoadError")};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{OpenLayers.Element.addClass(this,"olImageLoadError")}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(C){var B=[];for(var H in C){var G=C[H];if((G!=null)&&(typeof G!="function")){var D;if(typeof G=="object"&&G.constructor==Array){var E=[];var I;for(var A=0,F=G.length;A<F;A++){I=G[A];E.push(encodeURIComponent((I===null||I===undefined)?"":I))}D=E.join(",")}else{D=encodeURIComponent(G)}B.push(encodeURIComponent(H)+"="+D)}}return B.join("&")};OpenLayers.Util.urlAppend=function(A,B){var D=A;if(B){var C=(A+" ").split(/[?&]/);D+=(C.pop()===" "?B:C.length?"&"+B:"?"+B)}return D};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(E){}}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.deg=function(A){return A*180/Math.PI};OpenLayers.Util.VincentyConstants={a:6378137,b:6356752.3142,f:1/298.257223563};OpenLayers.Util.distVincenty=function(F,E){var J=OpenLayers.Util.VincentyConstants;var l=J.a,k=J.b,g=J.f;var N=OpenLayers.Util.rad(E.lon-F.lon);var j=Math.atan((1-g)*Math.tan(OpenLayers.Util.rad(F.lat)));var i=Math.atan((1-g)*Math.tan(OpenLayers.Util.rad(E.lat)));var M=Math.sin(j),H=Math.cos(j);var K=Math.sin(i),G=Math.cos(i);var R=N,O=2*Math.PI;var Q=20;while(Math.abs(R-O)>1e-12&&--Q>0){var Y=Math.sin(R),D=Math.cos(R);var m=Math.sqrt((G*Y)*(G*Y)+(H*K-M*G*D)*(H*K-M*G*D));if(m==0){return 0}var c=M*K+H*G*D;var X=Math.atan2(m,c);var I=Math.asin(H*G*Y/m);var e=Math.cos(I)*Math.cos(I);var P=c-2*M*K/e;var U=g/16*e*(4+g*(4-3*e));O=R;R=N+(1-U)*g*Math.sin(I)*(X+U*m*(P+U*c*(-1+2*P*P)))}if(Q==0){return NaN}var T=e*(l*l-k*k)/(k*k);var W=1+T/16384*(4096+T*(-768+T*(320-175*T)));var V=T/1024*(256+T*(-128+T*(74-47*T)));var Z=V*m*(P+V/4*(c*(-1+2*P*P)-V/6*P*(-3+4*m*m)*(-3+4*P*P)));var S=k*W*(X-Z);var h=S.toFixed(3)/1000;return h};OpenLayers.Util.destinationVincenty=function(M,n,c){var P=OpenLayers.Util;var I=P.VincentyConstants;var o=I.a,m=I.b,i=I.f;var l=M.lon;var G=M.lat;var R=c;var Z=P.rad(n);var e=Math.sin(Z);var H=Math.cos(Z);var d=(1-i)*Math.tan(P.rad(G));var D=1/Math.sqrt((1+d*d)),J=d*D;var Q=Math.atan2(d,H);var X=D*e;var h=1-X*X;var T=h*(o*o-m*m)/(m*m);var W=1+T/16384*(4096+T*(-768+T*(320-175*T)));var U=T/1024*(256+T*(-128+T*(74-47*T)));var V=R/(m*W),j=2*Math.PI;while(Math.abs(V-j)>1e-12){var N=Math.cos(2*Q+V);var p=Math.sin(V);var g=Math.cos(V);var Y=U*p*(N+U/4*(g*(-1+2*N*N)-U/6*N*(-3+4*p*p)*(-3+4*N*N)));j=V;V=R/(m*W)+Y}var k=J*p-D*g*H;var E=Math.atan2(J*g+D*p*H,(1-i)*Math.sqrt(X*X+k*k));var O=Math.atan2(p*e,D*g-J*p*H);var S=i/16*h*(4+i*(4-3*h));var K=O-(1-S)*i*X*(V+S*p*(N+S*g*(-1+2*N*N)));var F=Math.atan2(X,-k);return new OpenLayers.LonLat(l+P.deg(K),P.deg(E))};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 K={};var D=A.split(/[&;]/);for(var G=0,H=D.length;G<H;++G){var F=D[G].split("=");if(F[0]){var J=decodeURIComponent(F[0]);var I=F[1]||"";I=decodeURIComponent(I.replace(/\+/g," ")).split(",");if(I.length==1){I=I[0]}K[J]=I}}return K};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){var B;if(D){if(A==null){A="degrees"}var C=OpenLayers.Util.normalizeScale(D);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(E){var A=0,D=0;var B=E;var F=E;while(B){if(B==document.body){if(OpenLayers.Element.getStyle(F,"position")=="absolute"){break}}A+=B.offsetTop||0;D+=B.offsetLeft||0;F=B;try{B=B.offsetParent}catch(C){OpenLayers.Console.error(OpenLayers.i18n("pagePositionFailed",{elemId:B.id}));break}}B=E;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(B,J){J=J||{};if(!(/^\w+:\/\//).test(B)){var F=window.location;var D=F.port?":"+F.port:"";var G=F.protocol+"//"+F.host.split(":").shift()+D;if(B.indexOf("/")===0){B=G+B}else{var E=F.pathname.split("/");E.pop();B=G+E.join("/")+"/"+B}}if(J.ignoreCase){B=B.toLowerCase()}var H=document.createElement("a");H.href=B;var C={};C.host=H.host.split(":").shift();C.protocol=H.protocol;if(J.ignorePort80){C.port=(H.port=="80"||H.port=="0")?"":H.port}else{C.port=(H.port==""||H.port=="0")?"80":H.port}C.hash=(J.ignoreHash||H.hash==="#")?"":H.hash;var A=H.search;if(!A){var I=B.indexOf("?");A=(I!=-1)?B.substr(I):""}C.args=OpenLayers.Util.getParameters(A);C.pathname=(H.pathname.charAt(0)=="/")?H.pathname:"/"+H.pathname;return C};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,L,M){var I,E;var A=document.createElement("div");A.style.visibility="hidden";var K=(M&&M.containerElement)?M.containerElement:document.body;if(L){if(L.w){I=L.w;A.style.width=I+"px"}else{if(L.h){E=L.h;A.style.height=E+"px"}}}if(M&&M.displayClass){A.className=M.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);K.appendChild(A);var J=false;var H=A.parentNode;while(H&&H.tagName.toLowerCase()!="body"){var G=OpenLayers.Element.getStyle(H,"position");if(G=="absolute"){J=true;break}else{if(G&&G!="static"){break}}H=H.parentNode}if(!J){A.style.position="absolute"}if(!I){I=parseInt(F.scrollWidth);A.style.width=I+"px"}if(!E){E=parseInt(F.scrollHeight)}A.removeChild(F);K.removeChild(A);return new OpenLayers.Size(I,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.Util.getFormattedLonLat=function(H,B,E){if(!E){E="dms"}var D=Math.abs(H);var I=Math.floor(D);var A=(D-I)/(1/60);var C=A;A=Math.floor(A);var G=(C-A)/(1/60);G=Math.round(G*10);G/=10;if(I<10){I="0"+I}var F=I+"\u00B0";if(E.indexOf("dm")>=0){if(A<10){A="0"+A}F+=A+"'";if(E.indexOf("dms")>=0){if(G<10){G="0"+G}F+=G+'"'}}if(B=="lon"){F+=H<0?OpenLayers.i18n("W"):OpenLayers.i18n("E")}else{F+=H<0?OpenLayers.i18n("S"):OpenLayers.i18n("N")}return F};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}};(function(){if(window.google&&google.gears){return }var A=null;if(typeof GearsFactory!="undefined"){A=new GearsFactory()}else{try{A=new ActiveXObject("Gears.Factory");if(A.getBuildInfo().indexOf("ie_mobile")!=-1){A.privateSetGlobalObject(this)}}catch(B){if((typeof navigator.mimeTypes!="undefined")&&navigator.mimeTypes["application/x-googlegears"]){A=document.createElement("object");A.style.display="none";A.width=0;A.height=0;A.type="application/x-googlegears";document.documentElement.appendChild(A)}}}if(!A){return }if(!window.google){google={}}if(!google.gears){google.gears={factory:A}}})();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]);if(B){B.style.display="none"}}},show:function(){for(var C=0,A=arguments.length;C<A;C++){var B=OpenLayers.Util.getElement(arguments[C]);if(B){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(C){C=OpenLayers.Util.getElement(C);if(OpenLayers.Element.getStyle(C,"display")!="none"){return{width:C.offsetWidth,height:C.offsetHeight}}var B=C.style;var F=B.visibility;var D=B.position;var A=B.display;B.visibility="hidden";B.position="absolute";B.display="";var G=C.clientWidth;var E=C.clientHeight;B.display=A;B.position=D;B.visibility=F;return{width:G,height:E}},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.Protocol=OpenLayers.Class({format:null,options:null,autoDestroy:true,defaultFilter:null,initialize:function(A){A=A||{};OpenLayers.Util.extend(this,A);this.options=A},mergeWithDefaultFilter:function(B){var A;if(B&&this.defaultFilter){A=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.AND,filters:[this.defaultFilter,B]})}else{A=B||this.defaultFilter||undefined}return A},destroy:function(){this.options=null;this.format=null},read:function(A){A=A||{};A.filter=this.mergeWithDefaultFilter(A.filter)},create:function(){},update:function(){},"delete":function(){},commit:function(){},abort:function(A){},createCallback:function(C,A,B){return OpenLayers.Function.bind(function(){C.apply(this,[A,B])},this)},CLASS_NAME:"OpenLayers.Protocol"});OpenLayers.Protocol.Response=OpenLayers.Class({code:null,requestType:null,last:true,features:null,reqFeatures:null,priv:null,initialize:function(A){OpenLayers.Util.extend(this,A)},success:function(){return this.code>0},CLASS_NAME:"OpenLayers.Protocol.Response"});OpenLayers.Protocol.Response.SUCCESS=1;OpenLayers.Protocol.Response.FAILURE=0;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(C,D){if(D==null){D=C.style}if(C.geometry){var E=C.geometry.getBounds();if(E){if(!E.intersectsBounds(this.extent)){D={display:"none"}}var F=this.drawGeometry(C.geometry,D,C.id);if(D.display!="none"&&D.label&&F!==false){var A=C.geometry.getCentroid();if(D.labelXOffset||D.labelYOffset){xOffset=isNaN(D.labelXOffset)?0:D.labelXOffset;yOffset=isNaN(D.labelYOffset)?0:D.labelYOffset;var B=this.getResolution();A.move(xOffset*B,yOffset*B)}this.drawText(C.id,D,A)}else{this.removeText(C.id)}return F}}},drawGeometry:function(C,A,B){},drawText:function(C,B,A){},removeText:function(A){},clear:function(){},getFeatureIdFromEvent:function(A){},eraseFeatures:function(D){if(!(D instanceof Array)){D=[D]}for(var C=0,A=D.length;C<A;++C){var B=D[C];this.eraseGeometry(B.geometry,B.id);this.removeText(B.id)}},eraseGeometry:function(B,A){},moveRoot:function(A){},getRenderLayerId:function(){return this.container.id},applyDefaultSymbolizer:function(B){var A=OpenLayers.Util.extend({},OpenLayers.Renderer.defaultSymbolizer);if(B.stroke===false){delete A.strokeWidth;delete A.strokeColor}if(B.fill===false){delete A.fillColor}OpenLayers.Util.extend(A,B);return A},CLASS_NAME:"OpenLayers.Renderer"});OpenLayers.Renderer.defaultSymbolizer={fillColor:"#000000",strokeColor:"#000000",strokeWidth:2,fillOpacity:1,strokeOpacity:1,pointRadius:0};OpenLayers.Strategy=OpenLayers.Class({layer:null,options:null,active:null,autoActivate:true,autoDestroy:true,initialize:function(A){OpenLayers.Util.extend(this,A);this.options=A;this.active=false},destroy:function(){this.deactivate();this.layer=null;this.options=null},setLayer:function(A){this.layer=A},activate:function(){if(!this.active){this.active=true;return true}return false},deactivate:function(){if(this.active){this.active=false;return true}return false},CLASS_NAME:"OpenLayers.Strategy"});OpenLayers.Symbolizer=OpenLayers.Class({zIndex:0,initialize:function(A){OpenLayers.Util.extend(this,A)},clone:function(){var Type=eval(this.CLASS_NAME);return new Type(OpenLayers.Util.extend({},this))},CLASS_NAME:"OpenLayers.Symbolizer"});OpenLayers.Rico.Color=OpenLayers.Class({initialize:function(C,B,A){this.rgb={r:C,g:B,b:A}},setRed:function(A){this.rgb.r=A},setGreen:function(A){this.rgb.g=A},setBlue:function(A){this.rgb.b=A},setHue:function(B){var A=this.asHSB();A.h=B;this.rgb=OpenLayers.Rico.Color.HSBtoRGB(A.h,A.s,A.b)},setSaturation:function(B){var A=this.asHSB();A.s=B;this.rgb=OpenLayers.Rico.Color.HSBtoRGB(A.h,A.s,A.b)},setBrightness:function(A){var B=this.asHSB();B.b=A;this.rgb=OpenLayers.Rico.Color.HSBtoRGB(B.h,B.s,B.b)},darken:function(B){var A=this.asHSB();this.rgb=OpenLayers.Rico.Color.HSBtoRGB(A.h,A.s,Math.max(A.b-B,0))},brighten:function(B){var A=this.asHSB();this.rgb=OpenLayers.Rico.Color.HSBtoRGB(A.h,A.s,Math.min(A.b+B,1))},blend:function(A){this.rgb.r=Math.floor((this.rgb.r+A.rgb.r)/2);this.rgb.g=Math.floor((this.rgb.g+A.rgb.g)/2);this.rgb.b=Math.floor((this.rgb.b+A.rgb.b)/2)},isBright:function(){var A=this.asHSB();return this.asHSB().b>0.5},isDark:function(){return !this.isBright()},asRGB:function(){return"rgb("+this.rgb.r+","+this.rgb.g+","+this.rgb.b+")"},asHex:function(){return"#"+this.rgb.r.toColorPart()+this.rgb.g.toColorPart()+this.rgb.b.toColorPart()},asHSB:function(){return OpenLayers.Rico.Color.RGBtoHSB(this.rgb.r,this.rgb.g,this.rgb.b)},toString:function(){return this.asHex()}});OpenLayers.Rico.Color.createFromHex=function(D){if(D.length==4){var B=D;var D="#";for(var C=1;C<4;C++){D+=(B.charAt(C)+B.charAt(C))}}if(D.indexOf("#")==0){D=D.substring(1)}var F=D.substring(0,2);var E=D.substring(2,4);var A=D.substring(4,6);return new OpenLayers.Rico.Color(parseInt(F,16),parseInt(E,16),parseInt(A,16))};OpenLayers.Rico.Color.createColorFromBackground=function(D){var B=RicoUtil.getElementsComputedStyle(OpenLayers.Util.getElement(D),"backgroundColor","background-color");if(B=="transparent"&&D.parentNode){return OpenLayers.Rico.Color.createColorFromBackground(D.parentNode)}if(B==null){return new OpenLayers.Rico.Color(255,255,255)}if(B.indexOf("rgb(")==0){var A=B.substring(4,B.length-1);var C=A.split(",");return new OpenLayers.Rico.Color(parseInt(C[0]),parseInt(C[1]),parseInt(C[2]))}else{if(B.indexOf("#")==0){return OpenLayers.Rico.Color.createFromHex(B)}else{return new OpenLayers.Rico.Color(255,255,255)}}};OpenLayers.Rico.Color.HSBtoRGB=function(G,E,I){var C=0;var D=0;var J=0;if(E==0){C=parseInt(I*255+0.5);D=C;J=C}else{var F=(G-Math.floor(G))*6;var H=F-Math.floor(F);var B=I*(1-E);var A=I*(1-E*H);var K=I*(1-(E*(1-H)));switch(parseInt(F)){case 0:C=(I*255+0.5);D=(K*255+0.5);J=(B*255+0.5);break;case 1:C=(A*255+0.5);D=(I*255+0.5);J=(B*255+0.5);break;case 2:C=(B*255+0.5);D=(I*255+0.5);J=(K*255+0.5);break;case 3:C=(B*255+0.5);D=(A*255+0.5);J=(I*255+0.5);break;case 4:C=(K*255+0.5);D=(B*255+0.5);J=(I*255+0.5);break;case 5:C=(I*255+0.5);D=(B*255+0.5);J=(A*255+0.5);break}}return{r:parseInt(C),g:parseInt(D),b:parseInt(J)}};OpenLayers.Rico.Color.RGBtoHSB=function(A,E,J){var F;var D;var I;var K=(A>E)?A:E;if(J>K){K=J}var G=(A<E)?A:E;if(J<G){G=J}I=K/255;if(K!=0){D=(K-G)/K}else{D=0}if(D==0){F=0}else{var B=(K-A)/(K-G);var H=(K-E)/(K-G);var C=(K-J)/(K-G);if(A==K){F=C-H}else{if(E==K){F=2+B-C}else{F=4+H-B}}F=F/6;if(F<0){F=F+1}}return{h:F,s:D,b:I}};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(A){if(A===true){return[this.bottom,this.left,this.top,this.right]}else{return[this.left,this.bottom,this.right,this.top]}},toBBOX:function(B,E){if(B==null){B=6}var G=Math.pow(10,B);var F=Math.round(this.left*G)/G;var D=Math.round(this.bottom*G)/G;var C=Math.round(this.right*G)/G;var A=Math.round(this.top*G)/G;if(E===true){return D+","+F+","+A+","+C}else{return F+","+D+","+C+","+A}},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(E,C){if(C==null){C=this.getCenterLonLat()}var A,H;if(C.CLASS_NAME=="OpenLayers.LonLat"){A=C.lon;H=C.lat}else{A=C.x;H=C.y}var G=(this.left-A)*E+A;var B=(this.bottom-H)*E+H;var D=(this.right-A)*E+A;var F=(this.top-H)*E+H;return new OpenLayers.Bounds(G,B,D,F)},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+OpenLayers.Util.toFloat(C),this.lat+OpenLayers.Util.toFloat(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(A[0],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:"",autoActivate:false,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=OpenLayers.Function.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):this.anchor.size.h;var C=(this.relativePosition.charAt(1)=="l");E.x+=(C)?-(A.w+this.anchor.size.w):this.anchor.size.w;return E},CLASS_NAME:"OpenLayers.Popup.Anchored"});OpenLayers.Protocol.SOS=function(B){B=OpenLayers.Util.applyDefaults(B,OpenLayers.Protocol.SOS.DEFAULTS);var A=OpenLayers.Protocol.SOS["v"+B.version.replace(/\./g,"_")];if(!A){throw"Unsupported SOS version: "+B.version}return new A(B)};OpenLayers.Protocol.SOS.DEFAULTS={version:"1.0.0"};OpenLayers.Protocol.SQL=OpenLayers.Class(OpenLayers.Protocol,{databaseName:"ol",tableName:"ol_vector_features",postReadFiltering:true,initialize:function(A){OpenLayers.Protocol.prototype.initialize.apply(this,[A])},destroy:function(){OpenLayers.Protocol.prototype.destroy.apply(this)},supported:function(){return false},evaluateFilter:function(A,B){return B&&this.postReadFiltering?B.evaluate(A):true},CLASS_NAME:"OpenLayers.Protocol.SQL"});OpenLayers.Protocol.WFS=function(B){B=OpenLayers.Util.applyDefaults(B,OpenLayers.Protocol.WFS.DEFAULTS);var A=OpenLayers.Protocol.WFS["v"+B.version.replace(/\./g,"_")];if(!A){throw"Unsupported WFS version: "+B.version}return new A(B)};OpenLayers.Protocol.WFS.fromWMSLayer=function(D,C){var A,E;var G=D.params.LAYERS;var F=(G instanceof Array?G[0]:G).split(":");if(F.length>1){E=F[0]}A=F.pop();var B={url:D.url,featureType:A,featurePrefix:E,srsName:D.projection&&D.projection.getCode()||D.map&&D.map.getProjectionObject().getCode(),version:"1.1.0"};return new OpenLayers.Protocol.WFS(OpenLayers.Util.applyDefaults(C,B))};OpenLayers.Protocol.WFS.DEFAULTS={version:"1.0.0"};OpenLayers.Renderer.Canvas=OpenLayers.Class(OpenLayers.Renderer,{canvas:null,features:null,initialize:function(A){OpenLayers.Renderer.prototype.initialize.apply(this,arguments);this.root=document.createElement("canvas");this.container.appendChild(this.root);this.canvas=this.root.getContext("2d");this.features={}},eraseGeometry:function(B,A){this.eraseFeatures(this.features[A][0])},supported:function(){var A=document.createElement("canvas");return !!A.getContext},setExtent:function(A){this.extent=A.clone();this.resolution=null;this.redraw()},setSize:function(A){this.size=A.clone();this.root.style.width=A.w+"px";this.root.style.height=A.h+"px";this.root.width=A.w;this.root.height=A.h;this.resolution=null},drawFeature:function(A,B){B=B||A.style;B=this.applyDefaultSymbolizer(B);this.features[A.id]=[A,B];this.redraw()},drawGeometry:function(D,C){var B=D.CLASS_NAME;if((B=="OpenLayers.Geometry.Collection")||(B=="OpenLayers.Geometry.MultiPoint")||(B=="OpenLayers.Geometry.MultiLineString")||(B=="OpenLayers.Geometry.MultiPolygon")){for(var A=0;A<D.components.length;A++){this.drawGeometry(D.components[A],C)}return }switch(D.CLASS_NAME){case"OpenLayers.Geometry.Point":this.drawPoint(D,C);break;case"OpenLayers.Geometry.LineString":this.drawLineString(D,C);break;case"OpenLayers.Geometry.LinearRing":this.drawLinearRing(D,C);break;case"OpenLayers.Geometry.Polygon":this.drawPolygon(D,C);break;default:break}},drawExternalGraphic:function(G,F){var B=new Image();if(F.graphicTitle){B.title=F.graphicTitle}var E=F.graphicWidth||F.graphicHeight;var A=F.graphicHeight||F.graphicWidth;E=E?E:F.pointRadius*2;A=A?A:F.pointRadius*2;var D=(F.graphicXOffset!=undefined)?F.graphicXOffset:-(0.5*E);var H=(F.graphicYOffset!=undefined)?F.graphicYOffset:-(0.5*A);var C={img:B,x:(G[0]+D),y:(G[1]+H),width:E,height:A,opacity:F.graphicOpacity||F.fillOpacity,canvas:this.canvas};B.onload=OpenLayers.Function.bind(function(){this.canvas.globalAlpha=this.opacity;this.canvas.drawImage(this.img,this.x,this.y,this.width,this.height)},C);B.src=F.externalGraphic},setCanvasStyle:function(B,A){if(B=="fill"){this.canvas.globalAlpha=A.fillOpacity;this.canvas.fillStyle=A.fillColor}else{if(B=="stroke"){this.canvas.globalAlpha=A.strokeOpacity;this.canvas.strokeStyle=A.strokeColor;this.canvas.lineWidth=A.strokeWidth}else{this.canvas.globalAlpha=0;this.canvas.lineWidth=1}}},drawPoint:function(C,A){if(A.graphic!==false){var B=this.getLocalXY(C);if(A.externalGraphic){this.drawExternalGraphic(B,A)}else{if(A.fill!==false){this.setCanvasStyle("fill",A);this.canvas.beginPath();this.canvas.arc(B[0],B[1],A.pointRadius,0,Math.PI*2,true);this.canvas.fill()}if(A.stroke!==false){this.setCanvasStyle("stroke",A);this.canvas.beginPath();this.canvas.arc(B[0],B[1],A.pointRadius,0,Math.PI*2,true);this.canvas.stroke();this.setCanvasStyle("reset")}}}},drawLineString:function(D,B){if(B.stroke!==false){this.setCanvasStyle("stroke",B);this.canvas.beginPath();var E=this.getLocalXY(D.components[0]);this.canvas.moveTo(E[0],E[1]);for(var A=1;A<D.components.length;A++){var C=this.getLocalXY(D.components[A]);this.canvas.lineTo(C[0],C[1])}this.canvas.stroke()}this.setCanvasStyle("reset")},drawLinearRing:function(D,B){if(B.fill!==false){this.setCanvasStyle("fill",B);this.canvas.beginPath();var E=this.getLocalXY(D.components[0]);this.canvas.moveTo(E[0],E[1]);for(var A=1;A<D.components.length-1;A++){var C=this.getLocalXY(D.components[A]);this.canvas.lineTo(C[0],C[1])}this.canvas.fill()}if(B.stroke!==false){this.setCanvasStyle("stroke",B);this.canvas.beginPath();var E=this.getLocalXY(D.components[0]);this.canvas.moveTo(E[0],E[1]);for(var A=1;A<D.components.length;A++){var C=this.getLocalXY(D.components[A]);this.canvas.lineTo(C[0],C[1])}this.canvas.stroke()}this.setCanvasStyle("reset")},drawPolygon:function(C,B){this.drawLinearRing(C.components[0],B);for(var A=1;A<C.components.length;A++){this.drawLinearRing(C.components[A],{fillOpacity:0,strokeWidth:0,strokeOpacity:0,strokeColor:"#000000",fillColor:"#000000"})}},drawText:function(B,D){D=OpenLayers.Util.extend({fontColor:"#000000",labelAlign:"cm"},D);var E=this.getLocalXY(B);this.setCanvasStyle("reset");this.canvas.fillStyle=D.fontColor;this.canvas.globalAlpha=D.fontOpacity||1;var F=D.fontWeight+" "+D.fontSize+" "+D.fontFamily;if(this.canvas.fillText){var C=OpenLayers.Renderer.Canvas.LABEL_ALIGN[D.labelAlign[0]]||"center";this.canvas.font=F;this.canvas.textAlign=C;this.canvas.fillText(D.label,E[0],E[1])}else{if(this.canvas.mozDrawText){this.canvas.mozTextStyle=F;var A=this.canvas.mozMeasureText(D.label);switch(D.labelAlign[0]){case"l":break;case"r":E[0]-=A;break;case"c":default:E[0]-=A/2}this.canvas.translate(E[0],E[1]);this.canvas.mozDrawText(D.label);this.canvas.translate(-1*E[0],-1*E[1])}}this.setCanvasStyle("reset")},getLocalXY:function(B){var C=this.getResolution();var D=this.extent;var A=(B.x/C+(-D.left/C));var E=((D.top/C)-B.y/C);return[A,E]},clear:function(){this.canvas.clearRect(0,0,this.root.width,this.root.height);this.features={}},getFeatureIdFromEvent:function(A){var F=this.map.getLonLatFromPixel(A.xy);var B=this.getResolution();var E=new OpenLayers.Bounds(F.lon-B*5,F.lat-B*5,F.lon+B*5,F.lat+B*5);var C=E.toGeometry();for(var D in this.features){if(!this.features.hasOwnProperty(D)){continue}if(this.features[D][0].geometry.intersects(C)){return D}}return null},eraseFeatures:function(B){if(!(B instanceof Array)){B=[B]}for(var A=0;A<B.length;++A){delete this.features[B[A].id]}this.redraw()},redraw:function(){if(!this.locked){this.canvas.clearRect(0,0,this.root.width,this.root.height);var F=[];var C,D;for(var G in this.features){if(!this.features.hasOwnProperty(G)){continue}C=this.features[G][0];D=this.features[G][1];if(!C.geometry){continue}this.drawGeometry(C.geometry,D);if(D.label){F.push([C,D])}}var E;for(var B=0,A=F.length;B<A;++B){E=F[B];this.drawText(E[0].geometry.getCentroid(),E[1])}}},CLASS_NAME:"OpenLayers.Renderer.Canvas"});OpenLayers.Renderer.Canvas.LABEL_ALIGN={l:"left",r:"right"};OpenLayers.ElementsIndexer=OpenLayers.Class({maxZIndex:null,order:null,indices:null,compare:null,initialize:function(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(D,C,B){var E=OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER(D,C,B);if(B&&E===0){var A=B._boundsBottom-C._boundsBottom;E=(A===0)?1:A}return E}};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",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(){var B;var A=this.vectorRoot;if(A){while(B=A.firstChild){A.removeChild(B)}}A=this.textRoot;if(A){while(B=A.firstChild){A.removeChild(B)}}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){B=this.applyDefaultSymbolizer(B);var C=this.nodeFactory(G,this.getNodeType(F,B));C._featureId=E;C._boundsBottom=F.getBounds().bottom;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;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._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(G,F){if((G.CLASS_NAME=="OpenLayers.Geometry.MultiPoint")||(G.CLASS_NAME=="OpenLayers.Geometry.MultiLineString")||(G.CLASS_NAME=="OpenLayers.Geometry.MultiPolygon")||(G.CLASS_NAME=="OpenLayers.Geometry.Collection")){for(var D=0,A=G.components.length;D<A;D++){this.eraseGeometry(G.components[D],F)}}else{var C=OpenLayers.Util.getElement(G.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=G.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.Strategy.Cluster=OpenLayers.Class(OpenLayers.Strategy,{distance:20,threshold:null,features:null,clusters:null,clustering:false,resolution:null,initialize:function(A){OpenLayers.Strategy.prototype.initialize.apply(this,[A])},activate:function(){var A=OpenLayers.Strategy.prototype.activate.call(this);if(A){this.layer.events.on({beforefeaturesadded:this.cacheFeatures,moveend:this.cluster,scope:this})}return A},deactivate:function(){var A=OpenLayers.Strategy.prototype.deactivate.call(this);if(A){this.clearCache();this.layer.events.un({beforefeaturesadded:this.cacheFeatures,moveend:this.cluster,scope:this})}return A},cacheFeatures:function(B){var A=true;if(!this.clustering){this.clearCache();this.features=B.features;this.cluster();A=false}return A},clearCache:function(){this.features=null},cluster:function(A){if((!A||A.zoomChanged)&&this.features){var C=this.layer.map.getResolution();if(C!=this.resolution||!this.clustersExist()){this.resolution=C;var H=[];var K,B,I;for(var E=0;E<this.features.length;++E){K=this.features[E];if(K.geometry){B=false;for(var D=H.length-1;D>=0;--D){I=H[D];if(this.shouldCluster(I,K)){this.addToCluster(I,K);B=true;break}}if(!B){H.push(this.createCluster(this.features[E]))}}}this.layer.removeAllFeatures();if(H.length>0){if(this.threshold>1){var G=H.slice();H=[];var J;for(var E=0,F=G.length;E<F;++E){J=G[E];if(J.attributes.count<this.threshold){Array.prototype.push.apply(H,J.cluster)}else{H.push(J)}}}this.clustering=true;this.layer.addFeatures(H);this.clustering=false}this.clusters=H}}},clustersExist:function(){var B=false;if(this.clusters&&this.clusters.length>0&&this.clusters.length==this.layer.features.length){B=true;for(var A=0;A<this.clusters.length;++A){if(this.clusters[A]!=this.layer.features[A]){B=false;break}}}return B},shouldCluster:function(A,B){var E=A.geometry.getBounds().getCenterLonLat();var C=B.geometry.getBounds().getCenterLonLat();var D=(Math.sqrt(Math.pow((E.lon-C.lon),2)+Math.pow((E.lat-C.lat),2))/this.resolution);return(D<=this.distance)},addToCluster:function(A,B){A.cluster.push(B);A.attributes.count+=1},createCluster:function(C){var B=C.geometry.getBounds().getCenterLonLat();var A=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(B.lon,B.lat),{count:1});A.cluster=[C];return A},CLASS_NAME:"OpenLayers.Strategy.Cluster"});OpenLayers.Strategy.Fixed=OpenLayers.Class(OpenLayers.Strategy,{preload:false,initialize:function(A){OpenLayers.Strategy.prototype.initialize.apply(this,[A])},destroy:function(){OpenLayers.Strategy.prototype.destroy.apply(this,arguments)},activate:function(){if(OpenLayers.Strategy.prototype.activate.apply(this,arguments)){this.layer.events.on({refresh:this.load,scope:this});if(this.layer.visibility==true||this.preload){this.load()}else{this.layer.events.on({visibilitychanged:this.load,scope:this})}return true}return false},deactivate:function(){var A=OpenLayers.Strategy.prototype.deactivate.call(this);if(A){this.layer.events.un({refresh:this.load,visibilitychanged:this.load,scope:this})}return A},load:function(A){this.layer.events.triggerEvent("loadstart");this.layer.protocol.read(OpenLayers.Util.applyDefaults({callback:this.merge,filter:this.layer.filter,scope:this},A));this.layer.events.un({visibilitychanged:this.load,scope:this})},merge:function(G){this.layer.destroyFeatures();var E=G.features;if(E&&E.length>0){var F=this.layer.projection;var D=this.layer.map.getProjectionObject();if(!D.equals(F)){var C;for(var B=0,A=E.length;B<A;++B){C=E[B].geometry;if(C){C.transform(F,D)}}}this.layer.addFeatures(E)}this.layer.events.triggerEvent("loadend")},CLASS_NAME:"OpenLayers.Strategy.Fixed"});OpenLayers.Strategy.Paging=OpenLayers.Class(OpenLayers.Strategy,{features:null,length:10,num:null,paging:false,initialize:function(A){OpenLayers.Strategy.prototype.initialize.apply(this,[A])},activate:function(){var A=OpenLayers.Strategy.prototype.activate.call(this);if(A){this.layer.events.on({beforefeaturesadded:this.cacheFeatures,scope:this})}return A},deactivate:function(){var A=OpenLayers.Strategy.prototype.deactivate.call(this);if(A){this.clearCache();this.layer.events.un({beforefeaturesadded:this.cacheFeatures,scope:this})}return A},cacheFeatures:function(A){if(!this.paging){this.clearCache();this.features=A.features;this.pageNext(A)}},clearCache:function(){if(this.features){for(var A=0;A<this.features.length;++A){this.features[A].destroy()}}this.features=null;this.num=null},pageCount:function(){var A=this.features?this.features.length:0;return Math.ceil(A/this.length)},pageNum:function(){return this.num},pageLength:function(A){if(A&&A>0){this.length=A}return this.length},pageNext:function(A){var B=false;if(this.features){if(this.num===null){this.num=-1}var C=(this.num+1)*this.length;B=this.page(C,A)}return B},pagePrevious:function(){var A=false;if(this.features){if(this.num===null){this.num=this.pageCount()}var B=(this.num-1)*this.length;A=this.page(B)}return A},page:function(E,C){var D=false;if(this.features){if(E>=0&&E<this.features.length){var A=Math.floor(E/this.length);if(A!=this.num){this.paging=true;var B=this.features.slice(E,E+this.length);this.layer.removeFeatures(this.layer.features);this.num=A;if(C&&C.features){C.features=B}else{this.layer.addFeatures(B)}this.paging=false;D=true}}}return D},CLASS_NAME:"OpenLayers.Strategy.Paging"});OpenLayers.Strategy.Refresh=OpenLayers.Class(OpenLayers.Strategy,{force:false,interval:0,timer:null,initialize:function(A){OpenLayers.Strategy.prototype.initialize.apply(this,[A])},activate:function(){var A=OpenLayers.Strategy.prototype.activate.call(this);if(A){if(this.layer.visibility===true){this.start()}this.layer.events.on({visibilitychanged:this.reset,scope:this})}return A},deactivate:function(){var A=OpenLayers.Strategy.prototype.deactivate.call(this);if(A){this.stop()}return A},reset:function(){if(this.layer.visibility===true){this.start()}else{this.stop()}},start:function(){if(this.interval&&typeof this.interval==="number"&&this.interval>0){this.timer=window.setInterval(OpenLayers.Function.bind(this.refresh,this),this.interval)}},refresh:function(){if(this.layer&&this.layer.refresh&&typeof this.layer.refresh=="function"){this.layer.refresh({force:this.force})}},stop:function(){if(this.timer!==null){window.clearInterval(this.timer);this.timer=null}},CLASS_NAME:"OpenLayers.Strategy.Refresh"});OpenLayers.Strategy.Save=OpenLayers.Class(OpenLayers.Strategy,{EVENT_TYPES:["start","success","fail"],events:null,auto:false,timer:null,initialize:function(A){OpenLayers.Strategy.prototype.initialize.apply(this,[A]);this.events=new OpenLayers.Events(this,null,this.EVENT_TYPES)},activate:function(){var A=OpenLayers.Strategy.prototype.activate.call(this);if(A){if(this.auto){if(typeof this.auto==="number"){this.timer=window.setInterval(OpenLayers.Function.bind(this.save,this),this.auto*1000)}else{this.layer.events.on({featureadded:this.triggerSave,afterfeaturemodified:this.triggerSave,scope:this})}}}return A},deactivate:function(){var A=OpenLayers.Strategy.prototype.deactivate.call(this);if(A){if(this.auto){if(typeof this.auto==="number"){window.clearInterval(this.timer)}else{this.layer.events.un({featureadded:this.triggerSave,afterfeaturemodified:this.triggerSave,scope:this})}}}return A},triggerSave:function(B){var A=B.feature;if(A.state===OpenLayers.State.INSERT||A.state===OpenLayers.State.UPDATE||A.state===OpenLayers.State.DELETE){this.save([B.feature])}},save:function(D){if(!D){D=this.layer.features}this.events.triggerEvent("start",{features:D});var F=this.layer.projection;var C=this.layer.map.getProjectionObject();if(!C.equals(F)){var A=D.length;var E=new Array(A);var H,G;for(var B=0;B<A;++B){H=D[B];G=H.clone();G.fid=H.fid;G.state=H.state;if(H.url){G.url=H.url}G._original=H;G.geometry.transform(C,F);E[B]=G}D=E}this.layer.protocol.commit(D,{callback:this.onCommit,scope:this})},onCommit:function(D){var I={response:D};if(D.success()){var B=D.reqFeatures;var A,J;var C=[];var H=D.insertIds||[];var E=0;for(var F=0,G=B.length;F<G;++F){J=B[F];J=J._original||J;A=J.state;if(A){if(A==OpenLayers.State.DELETE){C.push(J)}else{if(A==OpenLayers.State.INSERT){J.fid=H[E];++E}}J.state=null}}if(C.length>0){this.layer.destroyFeatures(C)}this.events.triggerEvent("success",I)}else{this.events.triggerEvent("fail",I)}},CLASS_NAME:"OpenLayers.Strategy.Save"});OpenLayers.Symbolizer.Line=OpenLayers.Class(OpenLayers.Symbolizer,{strokeColor:null,strokeOpacity:null,strokeWidth:null,strokeLinecap:null,strokeDashstyle:null,initialize:function(A){OpenLayers.Symbolizer.prototype.initialize.apply(this,arguments)},CLASS_NAME:"OpenLayers.Symbolizer.Line"});OpenLayers.Symbolizer.Point=OpenLayers.Class(OpenLayers.Symbolizer,{strokeColor:null,strokeOpacity:null,strokeWidth:null,strokeLinecap:null,strokeDashstyle:null,fillColor:null,fillOpacity:null,pointRadius:null,externalGraphic:null,graphicWidth:null,graphicHeight:null,graphicOpacity:null,graphicXOffset:null,graphicYOffset:null,rotation:null,graphicName:null,initialize:function(A){OpenLayers.Symbolizer.prototype.initialize.apply(this,arguments)},CLASS_NAME:"OpenLayers.Symbolizer.Point"});OpenLayers.Symbolizer.Polygon=OpenLayers.Class(OpenLayers.Symbolizer,{strokeColor:null,strokeOpacity:null,strokeWidth:null,strokeLinecap:null,strokeDashstyle:null,fillColor:null,fillOpacity:null,initialize:function(A){OpenLayers.Symbolizer.prototype.initialize.apply(this,arguments)},CLASS_NAME:"OpenLayers.Symbolizer.Polygon"});OpenLayers.Symbolizer.Raster=OpenLayers.Class(OpenLayers.Symbolizer,{initialize:function(A){OpenLayers.Symbolizer.prototype.initialize.apply(this,arguments)},CLASS_NAME:"OpenLayers.Symbolizer.Raster"});OpenLayers.Symbolizer.Text=OpenLayers.Class(OpenLayers.Symbolizer,{label:null,fontFamily:null,fontSize:null,fontWeight:null,fontStyle:null,initialize:function(A){OpenLayers.Symbolizer.prototype.initialize.apply(this,arguments)},CLASS_NAME:"OpenLayers.Symbolizer.Text"});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 D={};for(var B in this.begin){var A=this.begin[B];var C=this.finish[B];if(A==null||C==null||isNaN(A)||isNaN(C)){OpenLayers.Console.error("invalid value for Tween")}var E=C-A;D[B]=this.easing.apply(this,[this.time,A,E,this.duration])}this.time++;if(this.callbacks&&this.callbacks.eachStep){this.callbacks.eachStep.call(this,D)}if(this.time>this.duration){this.stop()}},CLASS_NAME:"OpenLayers.Tween"});OpenLayers.Easing={CLASS_NAME:"OpenLayers.Easing"};OpenLayers.Easing.Linear={easeIn:function(B,A,D,C){return D*B/C+A},easeOut:function(B,A,D,C){return D*B/C+A},easeInOut:function(B,A,D,C){return D*B/C+A},CLASS_NAME:"OpenLayers.Easing.Linear"};OpenLayers.Easing.Expo={easeIn:function(B,A,D,C){return(B==0)?A:D*Math.pow(2,10*(B/C-1))+A},easeOut:function(B,A,D,C){return(B==C)?A+D:D*(-Math.pow(2,-10*B/C)+1)+A},easeInOut:function(B,A,D,C){if(B==0){return A}if(B==C){return A+D}if((B/=C/2)<1){return D/2*Math.pow(2,10*(B-1))+A}return D/2*(-Math.pow(2,-10*--B)+2)+A},CLASS_NAME:"OpenLayers.Easing.Expo"};OpenLayers.Easing.Quad={easeIn:function(B,A,D,C){return D*(B/=C)*B+A},easeOut:function(B,A,D,C){return -D*(B/=C)*(B-2)+A},easeInOut:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B+A}return -D/2*((--B)*(B-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 C=0,A=this.layers.length;C<A;C++){var B=this.map.layers[C];var D=this.layers.charAt(C);if(D=="B"){this.map.setBaseLayer(B)}else{if((D=="T")||(D=="F")){B.setVisibility(D=="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()){if(OpenLayers.Util.indexOf(D,B.attribution)===-1){D.push(B.attribution)}}}this.div.innerHTML=D.join(this.separator)}},CLASS_NAME:"OpenLayers.Control.Attribution"});OpenLayers.Control.Button=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_BUTTON,trigger:function(){},CLASS_NAME:"OpenLayers.Control.Button"});OpenLayers.Control.Graticule=OpenLayers.Class(OpenLayers.Control,{autoActivate:true,intervals:[45,30,20,10,5,2,1,0.5,0.2,0.1,0.05,0.01,0.005,0.002,0.001],displayInLayerSwitcher:true,visible:true,numPoints:50,targetSize:200,layerName:null,labelled:true,labelFormat:"dm",lineSymbolizer:{strokeColor:"#333",strokeWidth:1,strokeOpacity:0.5},labelSymbolizer:{},gratLayer:null,initialize:function(A){A=A||{};A.layerName=A.layerName||OpenLayers.i18n("graticule");OpenLayers.Control.prototype.initialize.apply(this,[A]);this.labelSymbolizer.stroke=false;this.labelSymbolizer.fill=false;this.labelSymbolizer.label="${label}";this.labelSymbolizer.labelAlign="${labelAlign}";this.labelSymbolizer.labelXOffset="${xOffset}";this.labelSymbolizer.labelYOffset="${yOffset}"},destroy:function(){this.deactivate();OpenLayers.Control.prototype.destroy.apply(this,arguments);if(this.gratLayer){this.gratLayer.destroy();this.gratLayer=null}},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.gratLayer){var A=new OpenLayers.Style({},{rules:[new OpenLayers.Rule({symbolizer:{Point:this.labelSymbolizer,Line:this.lineSymbolizer}})]});this.gratLayer=new OpenLayers.Layer.Vector(this.layerName,{styleMap:new OpenLayers.StyleMap({"default":A}),visibility:this.visible,displayInLayerSwitcher:this.displayInLayerSwitcher})}return this.div},activate:function(){if(OpenLayers.Control.prototype.activate.apply(this,arguments)){this.map.addLayer(this.gratLayer);this.map.events.register("moveend",this,this.update);this.update();return true}else{return false}},deactivate:function(){if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)){this.map.events.unregister("moveend",this,this.update);this.map.removeLayer(this.gratLayer);return true}else{return false}},update:function(){var I=this.map.getExtent();if(!I){return }this.gratLayer.destroyFeatures();var J=new OpenLayers.Projection("EPSG:4326");var e=this.map.getProjectionObject();var G=this.map.getResolution();if(e.proj&&e.proj.projName=="longlat"){this.numPoints=1}var h=this.map.getCenter();var a=new OpenLayers.Pixel(h.lon,h.lat);OpenLayers.Projection.transform(a,e,J);var V=this.targetSize*G;V*=V;var N;for(var Z=0;Z<this.intervals.length;++Z){N=this.intervals[Z];var f=N/2;var D=a.offset(new OpenLayers.Pixel(-f,-f));var B=a.offset(new OpenLayers.Pixel(f,f));OpenLayers.Projection.transform(D,J,e);OpenLayers.Projection.transform(B,J,e);var E=(D.x-B.x)*(D.x-B.x)+(D.y-B.y)*(D.y-B.y);if(E<=V){break}}a.x=Math.floor(a.x/N)*N;a.y=Math.floor(a.y/N)*N;var Y=0;var O=[a.clone()];var M=a.clone();var W;do{M=M.offset(new OpenLayers.Pixel(0,N));W=OpenLayers.Projection.transform(M.clone(),J,e);O.unshift(M)}while(I.containsPixel(W)&&++Y<1000);M=a.clone();do{M=M.offset(new OpenLayers.Pixel(0,-N));W=OpenLayers.Projection.transform(M.clone(),J,e);O.push(M)}while(I.containsPixel(W)&&++Y<1000);Y=0;var T=[a.clone()];M=a.clone();do{M=M.offset(new OpenLayers.Pixel(-N,0));W=OpenLayers.Projection.transform(M.clone(),J,e);T.unshift(M)}while(I.containsPixel(W)&&++Y<1000);M=a.clone();do{M=M.offset(new OpenLayers.Pixel(N,0));W=OpenLayers.Projection.transform(M.clone(),J,e);T.push(M)}while(I.containsPixel(W)&&++Y<1000);var A=[];for(var Z=0;Z<T.length;++Z){var F=T[Z].x;var S=[];var g=null;var b=Math.min(O[0].y,90);var L=Math.max(O[O.length-1].y,-90);var C=(b-L)/this.numPoints;var H=L;for(var X=0;X<=this.numPoints;++X){var c=new OpenLayers.Geometry.Point(F,H);c.transform(J,e);S.push(c);H+=C;if(c.y>=I.bottom&&!g){g=c}}if(this.labelled){var Q=new OpenLayers.Geometry.Point(g.x,I.bottom);var d={value:F,label:this.labelled?OpenLayers.Util.getFormattedLonLat(F,"lon",this.labelFormat):"",labelAlign:"cb",xOffset:0,yOffset:2};this.gratLayer.addFeatures(new OpenLayers.Feature.Vector(Q,d))}var R=new OpenLayers.Geometry.LineString(S);A.push(new OpenLayers.Feature.Vector(R))}for(var X=0;X<O.length;++X){H=O[X].y;if(H<-90||H>90){continue}var S=[];var U=T[0].x;var P=T[T.length-1].x;var K=(P-U)/this.numPoints;var F=U;var g=null;for(var Z=0;Z<=this.numPoints;++Z){var c=new OpenLayers.Geometry.Point(F,H);c.transform(J,e);S.push(c);F+=K;if(c.x<I.right){g=c}}if(this.labelled){var Q=new OpenLayers.Geometry.Point(I.right,g.y);var d={value:H,label:this.labelled?OpenLayers.Util.getFormattedLonLat(H,"lat",this.labelFormat):"",labelAlign:"rb",xOffset:-2,yOffset:2};this.gratLayer.addFeatures(new OpenLayers.Feature.Vector(Q,d))}var R=new OpenLayers.Geometry.LineString(S);A.push(new OpenLayers.Feature.Vector(R))}this.gratLayer.addFeatures(A)},CLASS_NAME:"OpenLayers.Control.Graticule"});OpenLayers.Control.LayerSwitcher=OpenLayers.Class(OpenLayers.Control,{roundedCorner:true,roundedCornerColor:"darkblue",layerStates:null,layersDiv:null,baseLayersDiv:null,baseLayers:null,dataLbl:null,dataLayersDiv:null,dataLayers:null,minimizeDiv:null,maximizeDiv:null,ascending:true,initialize:function(A){OpenLayers.Control.prototype.initialize.apply(this,arguments);this.layerStates=[]},destroy:function(){OpenLayers.Event.stopObservingElement(this.div);OpenLayers.Event.stopObservingElement(this.minimizeDiv);OpenLayers.Event.stopObservingElement(this.maximizeDiv);this.clearLayersArray("base");this.clearLayersArray("data");this.map.events.un({addlayer:this.redraw,changelayer:this.redraw,removelayer:this.redraw,changebaselayer:this.redraw,scope:this});OpenLayers.Control.prototype.destroy.apply(this,arguments)},setMap:function(A){OpenLayers.Control.prototype.setMap.apply(this,arguments);this.map.events.on({addlayer:this.redraw,changelayer:this.redraw,removelayer:this.redraw,changebaselayer:this.redraw,scope:this})},draw:function(){OpenLayers.Control.prototype.draw.apply(this);this.loadContents();if(!this.outsideViewport){this.minimizeControl()}this.redraw();return this.div},clearLayersArray:function(D){var E=this[D+"Layers"];if(E){for(var C=0,A=E.length;C<A;C++){var B=E[C];OpenLayers.Event.stopObservingElement(B.inputElem);OpenLayers.Event.stopObservingElement(B.labelSpan)}}this[D+"LayersDiv"].innerHTML="";this[D+"Layers"]=[]},checkRedraw:function(){var E=false;if(!this.layerStates.length||(this.map.layers.length!=this.layerStates.length)){E=true}else{for(var C=0,A=this.layerStates.length;C<A;C++){var D=this.layerStates[C];var B=this.map.layers[C];if((D.name!=B.name)||(D.inRange!=B.inRange)||(D.id!=B.id)||(D.visibility!=B.visibility)){E=true;break}}}return E},redraw:function(){if(!this.checkRedraw()){return this.div}this.clearLayersArray("base");this.clearLayersArray("data");var D=false;var L=false;var H=this.map.layers.length;this.layerStates=new Array(H);for(var F=0;F<H;F++){var G=this.map.layers[F];this.layerStates[F]={name:G.name,visibility:G.visibility,inRange:G.inRange,id:G.id}}var E=this.map.layers.slice();if(!this.ascending){E.reverse()}for(var F=0,H=E.length;F<H;F++){var G=E[F];var I=G.isBaseLayer;if(G.displayInLayerSwitcher){if(I){L=true}else{D=true}var K=(I)?(G==this.map.baseLayer):G.getVisibility();var J=document.createElement("input");J.id=this.id+"_input_"+G.name;J.name=(I)?this.id+"_baseLayers":G.name;J.type=(I)?"radio":"checkbox";J.value=G.name;J.checked=K;J.defaultChecked=K;if(!I&&!G.inRange){J.disabled=true}var A={inputElem:J,layer:G,layerSwitcher:this};OpenLayers.Event.observe(J,"mouseup",OpenLayers.Function.bindAsEventListener(this.onInputClick,A));var B=document.createElement("span");OpenLayers.Element.addClass(B,"labelSpan");if(!I&&!G.inRange){B.style.color="gray"}B.innerHTML=G.name;B.style.verticalAlign=(I)?"bottom":"baseline";OpenLayers.Event.observe(B,"click",OpenLayers.Function.bindAsEventListener(this.onInputClick,A));var N=document.createElement("br");var M=(I)?this.baseLayers:this.dataLayers;M.push({layer:G,inputElem:J,labelSpan:B});var C=(I)?this.baseLayersDiv:this.dataLayersDiv;C.appendChild(J);C.appendChild(B);C.appendChild(N)}}this.dataLbl.style.display=(D)?"":"none";this.baseLbl.style.display=(L)?"":"none";return this.div},onInputClick:function(A){if(!this.inputElem.disabled){if(this.inputElem.type=="radio"){this.inputElem.checked=true;this.layer.map.setBaseLayer(this.layer)}else{this.inputElem.checked=!this.inputElem.checked;this.layerSwitcher.updateMap()}}OpenLayers.Event.stop(A)},onLayerClick:function(A){this.updateMap()},updateMap:function(){for(var B=0,A=this.baseLayers.length;B<A;B++){var C=this.baseLayers[B];if(C.inputElem.checked){this.map.setBaseLayer(C.layer,false)}}for(var B=0,A=this.dataLayers.length;B<A;B++){var C=this.dataLayers[B];C.layer.setVisibility(C.inputElem.checked)}},maximizeControl:function(A){this.div.style.width="";this.div.style.height="";this.showControls(false);if(A!=null){OpenLayers.Event.stop(A)}},minimizeControl:function(A){this.div.style.width="0px";this.div.style.height="0px";this.showControls(true);if(A!=null){OpenLayers.Event.stop(A)}},showControls:function(A){this.maximizeDiv.style.display=A?"":"none";this.minimizeDiv.style.display=A?"none":"";this.layersDiv.style.display=A?"none":""},loadContents:function(){OpenLayers.Event.observe(this.div,"mouseup",OpenLayers.Function.bindAsEventListener(this.mouseUp,this));OpenLayers.Event.observe(this.div,"click",this.ignoreEvent);OpenLayers.Event.observe(this.div,"mousedown",OpenLayers.Function.bindAsEventListener(this.mouseDown,this));OpenLayers.Event.observe(this.div,"dblclick",this.ignoreEvent);this.layersDiv=document.createElement("div");this.layersDiv.id=this.id+"_layersDiv";OpenLayers.Element.addClass(this.layersDiv,"layersDiv");this.baseLbl=document.createElement("div");this.baseLbl.innerHTML=OpenLayers.i18n("baseLayer");OpenLayers.Element.addClass(this.baseLbl,"baseLbl");this.baseLayersDiv=document.createElement("div");OpenLayers.Element.addClass(this.baseLayersDiv,"baseLayersDiv");this.dataLbl=document.createElement("div");this.dataLbl.innerHTML=OpenLayers.i18n("overlays");OpenLayers.Element.addClass(this.dataLbl,"dataLbl");this.dataLayersDiv=document.createElement("div");OpenLayers.Element.addClass(this.dataLayersDiv,"dataLayersDiv");if(this.ascending){this.layersDiv.appendChild(this.baseLbl);this.layersDiv.appendChild(this.baseLayersDiv);this.layersDiv.appendChild(this.dataLbl);this.layersDiv.appendChild(this.dataLayersDiv)}else{this.layersDiv.appendChild(this.dataLbl);this.layersDiv.appendChild(this.dataLayersDiv);this.layersDiv.appendChild(this.baseLbl);this.layersDiv.appendChild(this.baseLayersDiv)}this.div.appendChild(this.layersDiv);if(this.roundedCorner){OpenLayers.Rico.Corner.round(this.div,{corners:"tl bl",bgColor:"transparent",color:this.roundedCornerColor,blend:false});OpenLayers.Rico.Corner.changeOpacity(this.layersDiv,0.75)}var C=OpenLayers.Util.getImagesLocation();var B=new OpenLayers.Size(18,18);var A=C+"layer-switcher-maximize.png";this.maximizeDiv=OpenLayers.Util.createAlphaImageDiv("OpenLayers_Control_MaximizeDiv",null,B,A,"absolute");OpenLayers.Element.addClass(this.maximizeDiv,"maximizeDiv");this.maximizeDiv.style.display="none";OpenLayers.Event.observe(this.maximizeDiv,"click",OpenLayers.Function.bindAsEventListener(this.maximizeControl,this));this.div.appendChild(this.maximizeDiv);var A=C+"layer-switcher-minimize.png";var B=new OpenLayers.Size(18,18);this.minimizeDiv=OpenLayers.Util.createAlphaImageDiv("OpenLayers_Control_MinimizeDiv",null,B,A,"absolute");OpenLayers.Element.addClass(this.minimizeDiv,"minimizeDiv");this.minimizeDiv.style.display="none";OpenLayers.Event.observe(this.minimizeDiv,"click",OpenLayers.Function.bindAsEventListener(this.minimizeControl,this));this.div.appendChild(this.minimizeDiv)},ignoreEvent:function(A){OpenLayers.Event.stop(A)},mouseDown:function(A){this.isMouseDown=true;this.ignoreEvent(A)},mouseUp:function(A){if(this.isMouseDown){this.isMouseDown=false;this.ignoreEvent(A)}},CLASS_NAME:"OpenLayers.Control.LayerSwitcher"});OpenLayers.Control.MouseDefaults=OpenLayers.Class(OpenLayers.Control,{performedDrag:false,wheelObserver:null,initialize:function(){OpenLayers.Control.prototype.initialize.apply(this,arguments)},destroy:function(){if(this.handler){this.handler.destroy()}this.handler=null;this.map.events.un({click:this.defaultClick,dblclick:this.defaultDblClick,mousedown:this.defaultMouseDown,mouseup:this.defaultMouseUp,mousemove:this.defaultMouseMove,mouseout:this.defaultMouseOut,scope:this});OpenLayers.Event.stopObserving(window,"DOMMouseScroll",this.wheelObserver);OpenLayers.Event.stopObserving(window,"mousewheel",this.wheelObserver);OpenLayers.Event.stopObserving(document,"mousewheel",this.wheelObserver);this.wheelObserver=null;OpenLayers.Control.prototype.destroy.apply(this,arguments)},draw:function(){this.map.events.on({click:this.defaultClick,dblclick:this.defaultDblClick,mousedown:this.defaultMouseDown,mouseup:this.defaultMouseUp,mousemove:this.defaultMouseMove,mouseout:this.defaultMouseOut,scope:this});this.registerWheelEvents()},registerWheelEvents:function(){this.wheelObserver=OpenLayers.Function.bindAsEventListener(this.onWheelEvent,this);OpenLayers.Event.observe(window,"DOMMouseScroll",this.wheelObserver);OpenLayers.Event.observe(window,"mousewheel",this.wheelObserver);OpenLayers.Event.observe(document,"mousewheel",this.wheelObserver)},defaultClick:function(B){if(!OpenLayers.Event.isLeftClick(B)){return }var A=!this.performedDrag;this.performedDrag=false;return A},defaultDblClick:function(B){var A=this.map.getLonLatFromViewPortPx(B.xy);this.map.setCenter(A,this.map.zoom+1);OpenLayers.Event.stop(B);return false},defaultMouseDown:function(A){if(!OpenLayers.Event.isLeftClick(A)){return }this.mouseDragStart=A.xy.clone();this.performedDrag=false;if(A.shiftKey){this.map.div.style.cursor="crosshair";this.zoomBox=OpenLayers.Util.createDiv("zoomBox",this.mouseDragStart,null,null,"absolute","2px solid red");this.zoomBox.style.backgroundColor="white";this.zoomBox.style.filter="alpha(opacity=50)";this.zoomBox.style.opacity="0.50";this.zoomBox.style.fontSize="1px";this.zoomBox.style.zIndex=this.map.Z_INDEX_BASE.Popup-1;this.map.viewPortDiv.appendChild(this.zoomBox)}document.onselectstart=OpenLayers.Function.False;OpenLayers.Event.stop(A)},defaultMouseMove:function(E){this.mousePosition=E.xy.clone();if(this.mouseDragStart!=null){if(this.zoomBox){var D=Math.abs(this.mouseDragStart.x-E.xy.x);var B=Math.abs(this.mouseDragStart.y-E.xy.y);this.zoomBox.style.width=Math.max(1,D)+"px";this.zoomBox.style.height=Math.max(1,B)+"px";if(E.xy.x<this.mouseDragStart.x){this.zoomBox.style.left=E.xy.x+"px"}if(E.xy.y<this.mouseDragStart.y){this.zoomBox.style.top=E.xy.y+"px"}}else{var D=this.mouseDragStart.x-E.xy.x;var B=this.mouseDragStart.y-E.xy.y;var F=this.map.getSize();var A=new OpenLayers.Pixel(F.w/2+D,F.h/2+B);var C=this.map.getLonLatFromViewPortPx(A);this.map.setCenter(C,null,true);this.mouseDragStart=E.xy.clone();this.map.div.style.cursor="move"}this.performedDrag=true}},defaultMouseUp:function(A){if(!OpenLayers.Event.isLeftClick(A)){return }if(this.zoomBox){this.zoomBoxEnd(A)}else{if(this.performedDrag){this.map.setCenter(this.map.center)}}document.onselectstart=null;this.mouseDragStart=null;this.map.div.style.cursor=""},defaultMouseOut:function(A){if(this.mouseDragStart!=null&&OpenLayers.Util.mouseLeft(A,this.map.div)){if(this.zoomBox){this.removeZoomBox()}this.mouseDragStart=null}},defaultWheelUp:function(A){if(this.map.getZoom()<=this.map.getNumZoomLevels()){this.map.setCenter(this.map.getLonLatFromPixel(A.xy),this.map.getZoom()+1)}},defaultWheelDown:function(A){if(this.map.getZoom()>0){this.map.setCenter(this.map.getLonLatFromPixel(A.xy),this.map.getZoom()-1)}},zoomBoxEnd:function(B){if(this.mouseDragStart!=null){if(Math.abs(this.mouseDragStart.x-B.xy.x)>5||Math.abs(this.mouseDragStart.y-B.xy.y)>5){var H=this.map.getLonLatFromViewPortPx(this.mouseDragStart);var A=this.map.getLonLatFromViewPortPx(B.xy);var G=Math.max(H.lat,A.lat);var C=Math.min(H.lat,A.lat);var F=Math.min(H.lon,A.lon);var D=Math.max(H.lon,A.lon);var E=new OpenLayers.Bounds(F,C,D,G);this.map.zoomToExtent(E)}else{var A=this.map.getLonLatFromViewPortPx(B.xy);this.map.setCenter(new OpenLayers.LonLat((A.lon),(A.lat)),this.map.getZoom()+1)}this.removeZoomBox()}},removeZoomBox:function(){this.map.viewPortDiv.removeChild(this.zoomBox);this.zoomBox=null},onWheelEvent:function(C){var B=false;var A=OpenLayers.Event.element(C);while(A!=null){if(this.map&&A==this.map.div){B=true;break}A=A.parentNode}if(B){var D=0;if(!C){C=window.event}if(C.wheelDelta){D=C.wheelDelta/120;if(window.opera&&window.opera.version()<9.2){D=-D}}else{if(C.detail){D=-C.detail/3}}if(D){C.xy=this.mousePosition;if(D<0){this.defaultWheelDown(C)}else{this.defaultWheelUp(C)}}OpenLayers.Event.stop(C)}},CLASS_NAME:"OpenLayers.Control.MouseDefaults"});OpenLayers.Control.MousePosition=OpenLayers.Class(OpenLayers.Control,{autoActivate:true,element:null,prefix:"",separator:", ",suffix:"",numDigits:5,granularity:10,emptyString:null,lastXy:null,displayProjection:null,initialize:function(A){OpenLayers.Control.prototype.initialize.apply(this,arguments)},destroy:function(){this.deactivate();OpenLayers.Control.prototype.destroy.apply(this,arguments)},activate:function(){if(OpenLayers.Control.prototype.activate.apply(this,arguments)){this.map.events.register("mousemove",this,this.redraw);this.map.events.register("mouseout",this,this.reset);this.redraw();return true}else{return false}},deactivate:function(){if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)){this.map.events.unregister("mousemove",this,this.redraw);this.map.events.unregister("mouseout",this,this.reset);this.element.innerHTML="";return true}else{return false}},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.element){this.div.left="";this.div.top="";this.element=this.div}return this.div},redraw:function(A){var C;if(A==null){this.reset();return }else{if(this.lastXy==null||Math.abs(A.xy.x-this.lastXy.x)>this.granularity||Math.abs(A.xy.y-this.lastXy.y)>this.granularity){this.lastXy=A.xy;return }C=this.map.getLonLatFromPixel(A.xy);if(!C){return }if(this.displayProjection){C.transform(this.map.getProjectionObject(),this.displayProjection)}this.lastXy=A.xy}var B=this.formatOutput(C);if(B!=this.element.innerHTML){this.element.innerHTML=B}},reset:function(A){if(this.emptyString!=null){this.element.innerHTML=this.emptyString}},formatOutput:function(B){var C=parseInt(this.numDigits);var A=this.prefix+B.lon.toFixed(C)+this.separator+B.lat.toFixed(C)+this.suffix;return A},CLASS_NAME:"OpenLayers.Control.MousePosition"});OpenLayers.Control.Pan=OpenLayers.Class(OpenLayers.Control,{slideFactor:50,direction:null,type:OpenLayers.Control.TYPE_BUTTON,initialize:function(B,A){this.direction=B;this.CLASS_NAME+=this.direction;OpenLayers.Control.prototype.initialize.apply(this,[A])},trigger:function(){switch(this.direction){case OpenLayers.Control.Pan.NORTH:this.map.pan(0,-this.slideFactor);break;case OpenLayers.Control.Pan.SOUTH:this.map.pan(0,this.slideFactor);break;case OpenLayers.Control.Pan.WEST:this.map.pan(-this.slideFactor,0);break;case OpenLayers.Control.Pan.EAST:this.map.pan(this.slideFactor,0);break}},CLASS_NAME:"OpenLayers.Control.Pan"});OpenLayers.Control.Pan.NORTH="North";OpenLayers.Control.Pan.SOUTH="South";OpenLayers.Control.Pan.EAST="East";OpenLayers.Control.Pan.WEST="West";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;A.getSlideFactor=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.Control.Panel=OpenLayers.Class(OpenLayers.Control,{controls:null,autoActivate:true,defaultControl:null,saveState:false,activeState:null,initialize:function(A){OpenLayers.Control.prototype.initialize.apply(this,[A]);this.controls=[];this.activeState={}},destroy:function(){OpenLayers.Control.prototype.destroy.apply(this,arguments);for(var A=this.controls.length-1;A>=0;A--){if(this.controls[A].events){this.controls[A].events.un({activate:this.redraw,deactivate:this.redraw,scope:this})}OpenLayers.Event.stopObservingElement(this.controls[A].panel_div);this.controls[A].panel_div=null}this.activeState=null},activate:function(){if(OpenLayers.Control.prototype.activate.apply(this,arguments)){var C;for(var B=0,A=this.controls.length;B<A;B++){C=this.controls[B];if(C===this.defaultControl||(this.saveState&&this.activeState[C.id])){C.activate()}}if(this.saveState===true){this.defaultControl=null}this.redraw();return true}else{return false}},deactivate:function(){if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)){var C;for(var B=0,A=this.controls.length;B<A;B++){C=this.controls[B];this.activeState[C.id]=C.deactivate()}return true}else{return false}},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);this.addControlsToMap(this.controls);return this.div},redraw:function(){if(this.div.children.length>0){for(var B=this.div.children.length,D=B-1;D>=0;D--){this.div.removeChild(this.div.children[D])}}this.div.innerHTML="";if(this.active){for(var D=0,A=this.controls.length;D<A;D++){var C=this.controls[D].panel_div;if(this.controls[D].active){C.className=this.controls[D].displayClass+"ItemActive"}else{C.className=this.controls[D].displayClass+"ItemInactive"}this.div.appendChild(C)}}},activateControl:function(C){if(!this.active){return false}if(C.type==OpenLayers.Control.TYPE_BUTTON){C.trigger();this.redraw();return }if(C.type==OpenLayers.Control.TYPE_TOGGLE){if(C.active){C.deactivate()}else{C.activate()}this.redraw();return }var D;for(var B=0,A=this.controls.length;B<A;B++){D=this.controls[B];if(D!=C&&(D.type===OpenLayers.Control.TYPE_TOOL||D.type==null)){D.deactivate()}}C.activate()},addControls:function(B){if(!(B instanceof Array)){B=[B]}this.controls=this.controls.concat(B);for(var D=0,A=B.length;D<A;D++){var C=document.createElement("div");B[D].panel_div=C;if(B[D].title!=""){B[D].panel_div.title=B[D].title}OpenLayers.Event.observe(B[D].panel_div,"click",OpenLayers.Function.bind(this.onClick,this,B[D]));OpenLayers.Event.observe(B[D].panel_div,"dblclick",OpenLayers.Function.bind(this.onDoubleClick,this,B[D]));OpenLayers.Event.observe(B[D].panel_div,"mousedown",OpenLayers.Function.bindAsEventListener(OpenLayers.Event.stop))}if(this.map){this.addControlsToMap(B);this.redraw()}},addControlsToMap:function(B){var D;for(var C=0,A=B.length;C<A;C++){D=B[C];if(D.autoActivate===true){D.autoActivate=false;this.map.addControl(D);D.autoActivate=true}else{this.map.addControl(D);D.deactivate()}D.events.on({activate:this.redraw,deactivate:this.redraw,scope:this})}},onClick:function(B,A){OpenLayers.Event.stop(A?A:window.event);this.activateControl(B)},onDoubleClick:function(B,A){OpenLayers.Event.stop(A?A:window.event)},getControlsBy:function(C,A){var D=(typeof A.test=="function");var B=OpenLayers.Array.filter(this.controls,function(E){return E[C]==A||(D&&A.test(E[C]))});return B},getControlsByName:function(A){return this.getControlsBy("name",A)},getControlsByClass:function(A){return this.getControlsBy("CLASS_NAME",A)},CLASS_NAME:"OpenLayers.Control.Panel"});OpenLayers.Control.Scale=OpenLayers.Class(OpenLayers.Control,{element:null,geodesic:false,initialize:function(B,A){OpenLayers.Control.prototype.initialize.apply(this,[A]);this.element=OpenLayers.Util.getElement(B)},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.element){this.element=document.createElement("div");this.div.appendChild(this.element)}this.map.events.register("moveend",this,this.updateScale);this.updateScale();return this.div},updateScale:function(){var C;if(this.geodesic===true){var A=this.map.getUnits();if(!A){return }var B=OpenLayers.INCHES_PER_UNIT;C=(this.map.getGeodesicPixelSize().w||0.000001)*B.km*OpenLayers.DOTS_PER_INCH}else{C=this.map.getScale()}if(!C){return }if(C>=9500&&C<=950000){C=Math.round(C/1000)+"K"}else{if(C>=950000){C=Math.round(C/1000000)+"M"}else{C=Math.round(C)}}this.element.innerHTML=OpenLayers.i18n("scale",{scaleDenom:C})},CLASS_NAME:"OpenLayers.Control.Scale"});OpenLayers.Control.ScaleLine=OpenLayers.Class(OpenLayers.Control,{maxWidth:100,topOutUnits:"km",topInUnits:"m",bottomOutUnits:"mi",bottomInUnits:"ft",eTop:null,eBottom:null,geodesic:false,initialize:function(A){OpenLayers.Control.prototype.initialize.apply(this,[A])},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.eTop){this.eTop=document.createElement("div");this.eTop.className=this.displayClass+"Top";var A=this.topInUnits.length;this.div.appendChild(this.eTop);if((this.topOutUnits=="")||(this.topInUnits=="")){this.eTop.style.visibility="hidden"}else{this.eTop.style.visibility="visible"}this.eBottom=document.createElement("div");this.eBottom.className=this.displayClass+"Bottom";this.div.appendChild(this.eBottom);if((this.bottomOutUnits=="")||(this.bottomInUnits=="")){this.eBottom.style.visibility="hidden"}else{this.eBottom.style.visibility="visible"}}this.map.events.register("moveend",this,this.update);this.update();return this.div},getBarLen:function(B){var D=parseInt(Math.log(B)/Math.log(10));var A=Math.pow(10,D);var C=parseInt(B/A);var E;if(C>5){E=5}else{if(C>2){E=2}else{E=1}}return E*A},update:function(){var J=this.map.getResolution();if(!J){return }var O=this.map.getUnits();var E=OpenLayers.INCHES_PER_UNIT;var L=this.maxWidth*J*E[O];var N=1;if(this.geodesic===true){var B=(this.map.getGeodesicPixelSize().w||0.000001)*this.maxWidth;var F=L/E.km;N=B/F;L*=N}var A;var D;if(L>100000){A=this.topOutUnits;D=this.bottomOutUnits}else{A=this.topInUnits;D=this.bottomInUnits}var H=L/E[A];var K=L/E[D];var I=this.getBarLen(H);var G=this.getBarLen(K);H=I/E[O]*E[A];K=G/E[O]*E[D];var C=H/J/N;var M=K/J/N;if(this.eBottom.style.visibility=="visible"){this.eBottom.style.width=Math.round(M)+"px";this.eBottom.innerHTML=G+" "+D}if(this.eTop.style.visibility=="visible"){this.eTop.style.width=Math.round(C)+"px";this.eTop.innerHTML=I+" "+A}},CLASS_NAME:"OpenLayers.Control.ScaleLine"});OpenLayers.Control.ZoomIn=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_BUTTON,trigger:function(){this.map.zoomIn()},CLASS_NAME:"OpenLayers.Control.ZoomIn"});OpenLayers.Control.ZoomOut=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_BUTTON,trigger:function(){this.map.zoomOut()},CLASS_NAME:"OpenLayers.Control.ZoomOut"});OpenLayers.Control.ZoomToMaxExtent=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_BUTTON,trigger:function(){if(this.map){this.map.zoomToMaxExtent()}},CLASS_NAME:"OpenLayers.Control.ZoomToMaxExtent"});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 J=false;var C=OpenLayers.Event.observers[D];if(C){var E=0;while(!J&&E<C.length){var I=C[E];if((I.name==A)&&(I.observer==G)&&(I.useCapture==B)){C.splice(E,1);if(C.length==0){delete OpenLayers.Event.observers[D]}J=true;break}E++}}if(J){if(F.removeEventListener){F.removeEventListener(A,G,B)}else{if(F&&F.detachEvent){F.detachEvent("on"+A,G)}}}return J},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.ar=OpenLayers.Util.applyDefaults({permalink:"وصلة دائمة",baseLayer:"الطبقة الاساسية",readNotImplemented:"القراءة غير محققة.",writeNotImplemented:"الكتابة غير محققة",errorLoadingGML:"خطأ عند تحميل الملف جي ام ال ${url}",scale:"النسبة = 1 : ${scaleDenom}",W:"غ",E:"شر",N:"شم",S:"ج"});OpenLayers.Lang["be-tarask"]=OpenLayers.Util.applyDefaults({unhandledRequest:"Неапрацаваны вынік запыту ${statusText}",permalink:"Сталая спасылка",overlays:"Слаі",baseLayer:"Базавы слой",sameProjection:"Аглядная мапа працуе толькі калі яна мае тую ж праекцыю, што і асноўная мапа",readNotImplemented:"Функцыянальнасьць чытаньня ня створаная.",writeNotImplemented:"Функцыянальнасьць запісу ня створаная.",noFID:"Немагчыма абнавіць магчымасьць, для якога не існуе FID.",errorLoadingGML:"Памылка загрузкі файла GML ${url}",browserNotSupported:"Ваш браўзэр не падтрымлівае вэктарную графіку. У цяперашні момант падтрымліваюцца: ${renderers}",componentShouldBe:"addFeatures : кампанэнт павінен быць ${geomType}",getFeatureError:"getFeatureFromEvent выкліканы для слоя бяз рэндэру. Звычайна гэта азначае, што Вы зьнішчылі слой, але пакінулі зьвязаны зь ім апрацоўшчык.",minZoomLevelError:"Уласьцівасьць minZoomLevel прызначана толькі для выкарыстаньня са слаямі вытворнымі ад FixedZoomLevels. Тое, што  гэты wfs-слой правяраецца на minZoomLevel — рэха прошлага. Але мы ня можам выдаліць гэтую магчымасьць, таму што ад яе залежаць некаторыя заснаваныя на OL дастасаваньні. Тым ня менш, праверка minZoomLevel будзе выдаленая ў вэрсіі 3.0. Калі ласка, выкарыстоўваеце замест яе ўстаноўкі мінімальнага/максымальнага памераў, як апісана тут: http://trac.openlayers.org/wiki/SettingZoomLevels",commitSuccess:"WFS-транзакцыя: ПОСЬПЕХ ${response}",commitFailed:"WFS-транзакцыя: ПАМЫЛКА ${response}",googleWarning:"Не атрымалася загрузіць слой Google. \x3cbr\x3e\x3cbr\x3eКаб пазбавіцца гэтага паведамленьня, выберыце новы базавы слой у сьпісе ў верхнім правым куце.\x3cbr\x3e\x3cbr\x3e Хутчэй за ўсё, прычына ў тым, што скрыпт бібліятэкі Google Maps ня быў уключаныя альбо не ўтрымлівае слушны API-ключ для Вашага сайта.\x3cbr\x3e\x3cbr\x3eРаспрацоўшчыкам: Для таго, каб даведацца як зрабіць так, каб усё працавала, \x3ca href='http://trac.openlayers.org/wiki/Google' target='_blank'\x3eнацісьніце тут\x3c/a\x3e",getLayerWarning:"Немагчыма загрузіць слой ${layerType}.\x3cbr\x3e\x3cbr\x3eКаб пазбавіцца гэтага паведамленьня, выберыце новы базавы слой у сьпісе ў верхнім правым куце.\x3cbr\x3e\x3cbr\x3eХутчэй за ўсё, прычына ў тым, што скрыпт бібліятэкі ${layerLib} ня быў слушна ўключаны.\x3cbr\x3e\x3cbr\x3eРаспрацоўшчыкам: Для таго, каб даведацца як зрабіць так, каб усё працавала, \x3ca href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'\x3eнацісьніце тут\x3c/a\x3e",scale:"Маштаб = 1 : ${scaleDenom}",W:"З",E:"У",N:"Пн",S:"Пд",layerAlreadyAdded:"Вы паспрабавалі дадаць слой ${layerName} на мапу, але ён ужо дададзены",reprojectDeprecated:"Вы выкарыстоўваеце ўстаноўку 'reproject' для слоя ${layerName}. Гэтая ўстаноўка зьяўляецца састарэлай: яна выкарыстоўвалася для падтрымкі паказу зьвестак на камэрцыйных базавых мапах, але гэта функцыя цяпер рэалізаваная ў убудаванай падтрымцы сфэрычнай праекцыі Мэркатара. Дадатковая інфармацыя ёсьць на http://trac.openlayers.org/wiki/SphericalMercator.",methodDeprecated:"Гэты мэтад састарэлы і будзе выдалены ў вэрсіі 3.0. Калі ласка, замест яго выкарыстоўвайце ${newMethod}.",boundsAddError:"Вам неабходна падаць абодва значэньні x і y для функцыі складаньня.",lonlatAddError:"Вам неабходна падаць абодва значэньні lon і lat для функцыі складаньня.",pixelAddError:"Вам неабходна падаць абодва значэньні x і y для функцыі складаньня.",unsupportedGeometryType:"Тып геамэтрыі не падтрымліваецца: ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition failed: верагодна элемэнт з ідэнтыфікатарам ${elemId} займае няслушнае месца.",filterEvaluateNotImplemented:"evaluate не рэалізаваны для гэтага тыпу фільтру."});OpenLayers.Lang.bg=OpenLayers.Util.applyDefaults({permalink:"Постоянна препратка",baseLayer:"Основен слой",errorLoadingGML:"Грешка при зареждане на GML файл ${url}",scale:"Мащаб = 1 : ${scaleDenom}",layerAlreadyAdded:"Опитахте да добавите слой ${layerName} в картата, но той вече е добавен",methodDeprecated:"Този метод е остарял и ще бъде премахват в 3.0. Вместо него използвайте ${newMethod}."});OpenLayers.Lang.br=OpenLayers.Util.applyDefaults({unhandledRequest:"Distro evel reked anveret ${statusText}",permalink:"Peurliamm",overlays:"Gwiskadoù",baseLayer:"Gwiskad diazez",sameProjection:"Ne'z ar gartenn lec'hiañ en-dro nemet pa vez heñvel ar banndres anezhi ha hini ar gartenn bennañ",readNotImplemented:"N'eo ket emplementet al lenn.",writeNotImplemented:"N'eo ket emplementet ar skrivañ.",noFID:"N'haller ket hizivaat un elfenn ma n'eus ket a niverenn-anaout (FID) eviti.",errorLoadingGML:"Fazi e-ser kargañ ar restr GML ${url}",browserNotSupported:"N'eo ket skoret an daskor vektorel gant ho merdeer. Setu aze an daskorerioù skoret evit ar poent :\n${renderers}",componentShouldBe:"addFeatures : bez' e tlefe ar parzh besañ eus ar seurt ${geomType}",getFeatureError:"Galvet eo bet getFeatureFromEvent called war ur gwiskad hep daskorer. Kement-se a dalvez ez eus bet freuzet ur gwiskad hag hoc'h eus miret un embreger bennak stag outañ.",minZoomLevelError:"Ne zleer implijout ar perzh minZoomLevel nemet evit gwiskadoù FixedZoomLevels-descendent. Ar fed ma wiria ar gwiskad WHS-se hag-eñ ez eus eus minZoomLevel zo un aspadenn gozh. Koulskoude n'omp ket evit e ziverkañ kuit da derriñ arloadoù diazezet war OL a c'hallfe bezañ stag outañ. Setu perak eo dispredet -- Lamet kuit e vo ar gwiriañ minZoomLevel a-is er stumm 3.0. Ober gant an arventennoù bihanañ/brasañ evel deskrivet amañ e plas : http://trac.openlayers.org/wiki/SettingZoomLevels",commitSuccess:"Treuzgread WFS : MAT EO ${response}",commitFailed:"Treuzgread WFS Transaction: C'HWITET ${response}",googleWarning:"N'eus ket bet gallet kargañ ar gwiskad Google ent reizh.\x3cbr\x3e\x3cbr\x3eEvit en em zizober eus ar c'hemenn-mañ, dibabit ur BaseLayer nevez en diuzer gwiskadoù er c'horn dehoù el laez.\x3cbr\x3e\x3cbr\x3eSur a-walc'h eo peogwir n'eo ket bet ensoc'het levraoueg Google Maps pe neuze ne glot ket an alc'hwez API gant ho lec'hienn.\x3cbr\x3e\x3cbr\x3eDiorroerien : Evit reizhañ an dra-se, \x3ca href='http://trac.openlayers.org/wiki/Google' target='_blank'\x3eclick here\x3c/a\x3e",getLayerWarning:"N'haller ket kargañ ar gwiskad ${layerType} ent reizh.\x3cbr\x3e\x3cbr\x3eEvit en em zizober eus ar c'hemenn-mañ, dibabit ur BaseLayer nevez en diuzer gwiskadoù er c'horn dehoù el laez.\x3cbr\x3e\x3cbr\x3eSur a-walc'h eo peogwir n'eo ket bet ensoc'het mat al levraoueg ${layerLib}.\x3cbr\x3e\x3cbr\x3eDiorroerien : Evit gouzout penaos reizhañ an dra-se, \x3ca href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'\x3eclick here\x3c/a\x3e",scale:"Skeul = 1 : ${scaleDenom}",W:"K",E:"R",N:"N",S:"S",layerAlreadyAdded:"Klasket hoc'h eus ouzhpennañ ar gwiskad : ${layerName} d'ar gartenn, met ouzhpennet e oa bet c'hoazh",reprojectDeprecated:"Emaoc'h oc'h implijout an dibarzh 'reproject' war ar gwiskad ${layerName}. Dispredet eo an dibarzh-mañ : bet eo hag e talveze da ziskwel roadennoù war-c'horre kartennoù diazez kenwerzhel, un dra hag a c'haller ober bremañ gant an arc'hwel dre skor banndres boullek Mercator. Muioc'h a ditouroù a c'haller da gaout war http://trac.openlayers.org/wiki/SphericalMercator.",methodDeprecated:"Dispredet eo an daore-se ha tennet e vo kuit eus ar stumm 3.0. Grit gant ${newMethod} e plas.",boundsAddError:"Rekis eo tremen an div dalvoudenn x ha y d'an arc'hwel add.",lonlatAddError:"Rekis eo tremen an div dalvoudenn hedred ha ledred d'an arc'hwel add.",pixelAddError:"Rekis eo tremen an div dalvoudenn x ha y d'an arc'hwel add.",unsupportedGeometryType:"Seurt mentoniezh anskoret : ${geomType}",pagePositionFailed:"C'hwitet eo OpenLayers.Util.pagePosition : marteze emañ lec'hiet fall an elfenn id ${elemId}.",filterEvaluateNotImplemented:"N'eo ket bet emplementet ar priziañ evit seurt siloù c'hoazh."});OpenLayers.Lang.el=OpenLayers.Util.applyDefaults({scale:"Κλίμακα ~ 1 : ${scaleDenom}"});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}",W:"W",E:"E",N:"N",S:"S",graticule:"Graticule",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.",filterEvaluateNotImplemented:"evaluate is not implemented for this filter type.",end:""};OpenLayers.Lang.fi=OpenLayers.Util.applyDefaults({permalink:"Ikilinkki",overlays:"Kerrokset",baseLayer:"Peruskerros",sameProjection:"Yleiskuvakarttaa voi käyttää vain, kun sillä on sama projektio kuin pääkartalla.",W:"L",E:"I",N:"P",S:"E"});OpenLayers.Lang.fur=OpenLayers.Util.applyDefaults({permalink:"Leam Permanent",overlays:"Livei parsore",baseLayer:"Livel di base",browserNotSupported:"Il to sgarfadôr nol supuarte la renderizazion vetoriâl. Al moment a son supuartâts:\n${renderers}",scale:"Scjale = 1 : ${scaleDenom}",W:"O",E:"E",N:"N",S:"S"});OpenLayers.Lang.gl=OpenLayers.Util.applyDefaults({unhandledRequest:"Solicitude non xerada; a resposta foi: ${statusText}",permalink:"Ligazón permanente",overlays:"Capas superpostas",baseLayer:"Capa base",sameProjection:"A vista xeral do mapa só funciona cando está na mesma proxección có mapa principal",readNotImplemented:"Lectura non implementada.",writeNotImplemented:"Escritura non implementada.",noFID:"Non se pode actualizar a funcionalidade para a que non hai FID.",errorLoadingGML:"Erro ao cargar o ficheiro GML ${url}",browserNotSupported:"O seu navegador non soporta a renderización de vectores. Os renderizadores soportados actualmente son:\n${renderers}",componentShouldBe:"addFeatures: o compoñente debera ser de tipo ${geomType}",getFeatureError:"getFeatureFromEvent ten sido chamado a unha capa sen renderizador. Isto normalmente significa que destruíu unha capa, mais non o executador que está asociado con ela.",minZoomLevelError:"A propiedade minZoomLevel é só para uso conxuntamente coas capas FixedZoomLevels-descendent. O feito de que esa capa wfs verifique o minZoomLevel é unha reliquia do pasado. Non podemos, con todo, eliminala sen a posibilidade de non romper as aplicacións baseadas en OL que poidan depender dela. Por iso a estamos deixando obsoleta (a comprobación minZoomLevel de embaixo será eliminada na versión 3.0). Por favor, no canto diso use o axuste de resolución mín/máx tal e como está descrito aquí: http://trac.openlayers.org/wiki/SettingZoomLevels",commitSuccess:"Transacción WFS: ÉXITO ${response}",commitFailed:"Transacción WFS: FALLIDA ${response}",googleWarning:"A capa do Google non puido cargarse correctamente.\x3cbr\x3e\x3cbr\x3ePara evitar esta mensaxe, escolla unha nova capa base no seleccionador de capas na marxe superior dereita.\x3cbr\x3e\x3cbr\x3eProbablemente, isto acontece porque a escritura da libraría do Google Maps ou ben non foi incluída ou ben non contén a clave API correcta para o seu sitio.\x3cbr\x3e\x3cbr\x3eDesenvolvedores: para axudar a facer funcionar isto correctamente, \x3ca href='http://trac.openlayers.org/wiki/Google' target='_blank'\x3epremede aquí\x3c/a\x3e",getLayerWarning:"A capa ${layerType} foi incapaz de cargarse correctamente.\x3cbr\x3e\x3cbr\x3ePara evitar esta mensaxe, escolla unha nova capa base no seleccionador de capas na marxe superior dereita.\x3cbr\x3e\x3cbr\x3eProbablemente, isto acontece porque a escritura da libraría ${layerLib} non foi ben incluída.\x3cbr\x3e\x3cbr\x3eDesenvolvedores: para axudar a facer funcionar isto correctamente, \x3ca href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'\x3epremede aquí\x3c/a\x3e",scale:"Escala = 1 : ${scaleDenom}",W:"O",E:"L",N:"N",S:"S",layerAlreadyAdded:"Intentou engadir a capa: ${layerName} ao mapa, pero xa fora engadida",reprojectDeprecated:'Está usando a opción "reproject" na capa ${layerName}. Esta opción está obsoleta: o seu uso foi deseñado para a visualización de datos sobre mapas base comerciais, pero esta funcionalidade debera agora ser obtida utilizando a proxección Spherical Mercator. Hai dispoñible máis información en http://trac.openlayers.org/wiki/SphericalMercator.',methodDeprecated:"Este método está obsoleto e será eliminado na versión 3.0. Por favor, no canto deste use ${newMethod}.",boundsAddError:"Debe achegar os valores x e y á función add.",lonlatAddError:"Debe achegar tanto o valor lon coma o lat á función add.",pixelAddError:"Debe achegar os valores x e y á función add.",unsupportedGeometryType:"Tipo xeométrico non soportado: ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition fallou: o elemento con id ${elemId} pode non estar na súa posición.",filterEvaluateNotImplemented:"avaliar non está implementado para este tipo de filtro."});OpenLayers.Lang.gsw=OpenLayers.Util.applyDefaults({unhandledRequest:"Nit behandleti Aafrogsruckmäldig ${statusText}",permalink:"Permalink",overlays:"Iberlagerige",baseLayer:"Grundcharte",sameProjection:"D Ibersichts-Charte funktioniert nume, wänn si di glych Projäktion brucht wie d Hauptcharte",readNotImplemented:"Läse nit implementiert.",writeNotImplemented:"Schrybe nit implementiert.",noFID:"E Feature, wu s kei FID derfir git, cha nit aktualisiert wäre.",errorLoadingGML:"Fähler bim Lade vu dr GML-Datei ${url}",browserNotSupported:"Dyy Browser unterstitzt kei Vektordarstellig. Aktuäll unterstitzti Renderer:\n${renderers}",componentShouldBe:"addFeatures : Komponänt sott dr Typ ${geomType} syy",getFeatureError:"getFeatureFromEvent isch uf eme Layer ohni Renderer ufgruefe wore. Des heisst normalerwys, ass Du e Layer kaputt gmacht hesch, aber nit dr Handler, wu derzue ghert.",minZoomLevelError:"D minZoomLevel-Eigeschaft isch nume dänk fir d Layer, wu vu dr FixedZoomLevels abstamme. Ass dää wfs-Layer minZoomLevel prieft, scih e Relikt us dr Vergangeheit. Mir chenne s aber nit ändere ohni OL_basierti Aawändige villicht kaputt gehn, wu dervu abhänge.  Us däm Grund het die Funktion d Eigeschaft 'deprecated' iberchuu. D minZoomLevel-Priefig unte wird in dr Version 3.0 usegnuu. Bitte verwänd statt däm e min/max-Uflesig wie s do bschriben isch: http://trac.openlayers.org/wiki/SettingZoomLevels",commitSuccess:"WFS-Transaktion: ERFOLGRYCH ${response}",commitFailed:"WFS-Transaktion: FÄHLGSCHLAA ${response}",googleWarning:"Dr Google-Layer het nit korräkt chenne glade wäre.\x3cbr\x3e\x3cbr\x3eGo die Mäldig nimi z kriege, wehl e andere Hintergrundlayer us em LayerSwitcher im rächte obere Ecke.\x3cbr\x3e\x3cbr\x3eDää Fähler git s seli hyfig, wel s Skript vu dr Google-Maps-Bibliothek nit yybunde woren isch oder wel s kei giltige API-Schlissel fir Dyy URL din het.\x3cbr\x3e\x3cbr\x3eEntwickler: Fir Hilf zum korräkte Yybinde vum Google-Layer \x3ca href='http://trac.openlayers.org/wiki/Google' target='_blank'\x3edoo drucke\x3c/a\x3e",getLayerWarning:"Dr ${layerType}-Layer het nit korräkt chenne glade wäre.\x3cbr\x3e\x3cbr\x3eGo die Mäldig nimi z kriege, wehl e andere Hintergrundlayer us em LayerSwitcher im rächte obere Ecke.\x3cbr\x3e\x3cbr\x3eDää Fähler git s seli hyfig, wel s Skript vu dr '${layerLib}'-Bibliothek nit yybunde woren isch oder wel s kei giltige API-Schlissel fir Dyy URL din het.\x3cbr\x3e\x3cbr\x3eEntwickler: Fir Hilf zum korräkte Yybinde vu Layer \x3ca href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'\x3edoo drucke\x3c/a\x3e",scale:"Maßstab = 1 : ${scaleDenom}",W:"W",E:"O",N:"N",S:"S",layerAlreadyAdded:"Du hesch versuecht dää Layer in d Charte yyzfiege: ${layerName}, aber är isch schoi yygfiegt",reprojectDeprecated:"Du bruchsch d 'reproject'-Option bim ${layerName}-Layer. Die Option isch nimi giltig: si isch aagleit wore go   Date iber kommerziälli Grundcharte lege, aber des sott mer jetz mache mit dr Unterstitzig vu Spherical Mercator. Meh Informatione git s uf http://trac.openlayers.org/wiki/SphericalMercator.",methodDeprecated:"Die Methode isch veraltet un wird us dr Version 3.0 usegnuu. Bitte verwäbnd statt däm ${newMethod}.",boundsAddError:"Du muesch e x-Wärt un e y-Wärt yygee bi dr Zuefieg-Funktion",lonlatAddError:"Du meusch e Lengi- un e Breiti-Grad yygee bi dr Zuefieg-Funktion.",pixelAddError:"Du muesch x- un y-Wärt aagee bi dr Zuefieg-Funktion.",unsupportedGeometryType:"Nit unterstitze Geometrii-Typ: ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition fählgschlaa: Elemänt mit ID ${elemId} isch villicht falsch gsetzt.",filterEvaluateNotImplemented:"evaluiere isch nit implemäntiert in däm Filtertyp."});OpenLayers.Lang.hr=OpenLayers.Util.applyDefaults({unhandledRequest:"Nepodržani zahtjev ${statusText}",permalink:"Permalink",overlays:"Overlays",baseLayer:"Osnovna karta",sameProjection:"Pregledna karta radi jedino kao je u istoj projekciji kao i glava karta",readNotImplemented:"Čitanje nije implementirano.",writeNotImplemented:"Pisanje nije implementirano.",noFID:"Ne mogu ažurirati značajku za koju ne postoji FID.",errorLoadingGML:"Greška u učitavanju GML datoteke ${url}",browserNotSupported:"Vaš preglednik ne podržava vektorsko renderiranje. Trenutno podržani rendereri su: ${renderers}",componentShouldBe:"addFeatures : komponenta bi trebala biti ${geomType}",getFeatureError:"getFeatureFromEvent je pozvao Layer bez renderera. Ovo obično znači da ste uništiili Layer, a ne neki Handler koji je povezan s njim.",commitSuccess:"WFS Transakcija: USPJEŠNA ${response}",commitFailed:"WFS Transakcija: NEUSPJEŠNA ${response}",scale:"Mjerilo = 1 : ${scaleDenom}",layerAlreadyAdded:"Pokušali ste dodati layer:  ${layerName} na kartu, ali je već dodan",methodDeprecated:"Ova metoda nije odobrena i biti će maknuta u 3.0. Koristite ${newMethod}.",boundsAddError:"Morate dati obje vrijednosti ,  x i y  da bi dodali funkciju.",lonlatAddError:"Morate dati obje vrijednosti , (lon i lat) da bi dodali funkciju.",pixelAddError:"Morate dati obje vrijednosti ,  x i y  da bi dodali funkciju.",unsupportedGeometryType:"Nepodržani tip geometrije: ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition nije uspjelo: element sa id ${elemId} može biti krivo smješten."});OpenLayers.Lang.hsb=OpenLayers.Util.applyDefaults({unhandledRequest:"Wotmołwa njewobdźěłaneho naprašowanja ${statusText}",permalink:"Trajny wotkaz",overlays:"Naworštowanja",baseLayer:"Zakładna runina",sameProjection:"Přehladowa karta jenož funguje, hdyž je w samsnej projekciji kaž hłowna karta",readNotImplemented:"Čitanje njeimplementowane.",writeNotImplemented:"Pisanje njeimplementowane.",noFID:"Funkcija, za kotruž FID njeje, njeda so aktualizować.",errorLoadingGML:"Zmylk při začitowanju dataje ${url}",browserNotSupported:"Twój wobhladowak wektorowe rysowanje njepodpěruje. Tuchwilu podpěrowane rysowaki su:\n${renderers}",componentShouldBe:"addFeatures: komponenta měła ${geomType} być",getFeatureError:"getFeatureFromEvent bu na woršće bjez rysowak zawołany. To zwjetša woznamjenja, zo sy worštu zničił, ale nic wobdźěłak, kotryž je z njej zwjazany.",minZoomLevelError:"Kajkosć minZoomLevel je jenož za wužiwanje z worštami myslena, kotrež wot FixedZoomLevels pochadźeja. Zo tuta woršta wfs za minZoomLevel přepruwuje, je relikt zańdźenosće. Njemóžemy wšak ju wotstronić, bjeztoho zo aplikacije, kotrež na OpenLayers bazěruja a snano tutu kajkosć wužiwaja, hižo njefunguja. Tohodla smy ju jako zestarjenu woznamjenili -- přepruwowanje za minZoomLevel budu so we wersiji 3.0 wotstronjeć. Prošu wužij město toho nastajenje min/max, kaž je tu wopisane: http://trac.openlayers.org/wiki/SettingZoomLevels",commitSuccess:"WFS-Transakcija: WUSPĚŠNA ${response}",commitFailed:"WFS-Transakcija: NJEPORADŹENA ${response}",googleWarning:"Woršta Google njemóžeše so korektnje začitać.\x3cbr\x3e\x3cbr\x3eZo by tutu zdźělenku wotbył, wubjer nowy BaseLayer z wuběra worštow horjeka naprawo.\x3cbr\x3e\x3cbr\x3eNajskerje so to stawa, dokelž skript biblioteki Google Maps pak njebu zapřijaty pak njewobsahuje korektny kluč API za twoje sydło.\x3cbr\x3e\x3cbr\x3eWuwiwarjo: Za pomoc ke korektnemu fungowanju worštow\n\x3ca href='http://trac.openlayers.org/wiki/Google' target='_blank'\x3etu kliknyć\x3c/a\x3e",getLayerWarning:"Woršta ${layerType} njemóžeše so korektnje začitać.\x3cbr\x3e\x3cbr\x3eZo by tutu zdźělenku wotbył, wubjer nowy BaseLayer z wuběra worštow horjeka naprawo.\x3cbr\x3e\x3cbr\x3eNajskerje so to stawa, dokelž skript biblioteki ${layerLib} njebu korektnje zapřijaty.\x3cbr\x3e\x3cbr\x3eWuwiwarjo: Za pomoc ke korektnemu fungowanju worštow\n\x3ca href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'\x3etu kliknyć\x3c/a\x3e",scale:"Měritko = 1 : ${scaleDenom}",W:"Z",E:"W",N:"S",S:"J",layerAlreadyAdded:"Sy spytał runinu ${layerName} karće dodać, ale je so hižo dodała",reprojectDeprecated:'Wužiwaš opciju "reproject" wořšty ${layerName}. Tuta opcija je zestarjena: jeje wužiwanje bě myslene, zo by zwobraznjenje datow nad komercielnymi bazowymi kartami podpěrało, ale funkcionalnosć měła so nětko z pomocu Sperical Mercator docpěć. Dalše informacije steja na http://trac.openlayers.org/wiki/SphericalMercator k dispoziciji.',methodDeprecated:"Tuta metoda je so njeschwaliła a budźe so w 3.0 wotstronjeć. Prošu wužij ${newMethod} město toho.",boundsAddError:'Dyrbiš hódnotu x kaž tež y funkciji "add" přepodać.',lonlatAddError:'Dyrbiš hódnotu lon kaž tež lat funkciji "add" přepodać.',pixelAddError:'Dyrbiš hódnotu x kaž tež y funkciji "add" přepodać.',unsupportedGeometryType:"Njepodpěrowany geometrijowy typ: ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition je so njeporadźił: element z id ${elemId} bu snano wopak zaměstnjeny.",filterEvaluateNotImplemented:"wuhódnoćenje njeje za tutón filtrowy typ implementowany."});OpenLayers.Lang.hu=OpenLayers.Util.applyDefaults({unhandledRequest:"Nem kezelt kérés visszatérése ${statusText}",permalink:"Permalink",overlays:"Rávetítések",baseLayer:"Alapréteg",sameProjection:"Az áttekintő térkép csak abban az esetben működik, ha ugyanazon a vetületen van, mint a fő térkép.",readNotImplemented:"Olvasás nincs végrehajtva.",writeNotImplemented:"Írás nincs végrehajtva.",noFID:"Nem frissíthető olyan jellemző, amely nem rendelkezik FID-del.",errorLoadingGML:"Hiba GML-fájl betöltésekor ${url}",browserNotSupported:"A böngészője nem támogatja a vektoros renderelést. A jelenleg támogatott renderelők:\n${renderers}",componentShouldBe:"addFeatures : az összetevőnek ilyen típusúnak kell lennie: ${geomType}",getFeatureError:"getFeatureFromEvent réteget hívott meg renderelő nélkül. Ez rendszerint azt jelenti, hogy megsemmisített egy fóliát, de néhány ahhoz társított kezelőt nem.",minZoomLevelError:"A minZoomLevel tulajdonságot csak a következővel való használatra szánták: FixedZoomLevels-leszármazott fóliák. Ez azt jelenti, hogy a minZoomLevel wfs fólia jelölőnégyzetei már a múlté. Mi azonban nem távolíthatjuk el annak a veszélye nélkül, hogy az esetlegesen ettől függő OL alapú alkalmazásokat tönkretennénk. Ezért ezt érvénytelenítjük -- a minZoomLevel az alul levő jelölőnégyzet a 3.0-s verzióból el lesz távolítva. Kérjük, helyette használja a  min/max felbontás beállítást, amelyről az alábbi helyen talál leírást: http://trac.openlayers.org/wiki/SettingZoomLevels",commitSuccess:"WFS tranzakció: SIKERES ${response}",commitFailed:"WFS tranzakció: SIKERTELEN ${response}",googleWarning:"A Google fólia betöltése sikertelen.\x3cbr\x3e\x3cbr\x3eAhhoz, hogy ez az üzenet eltűnjön, válasszon egy új BaseLayer fóliát a jobb felső sarokban található fóliakapcsoló segítségével.\x3cbr\x3e\x3cbr\x3eNagy valószínűséggel ez azért van, mert a Google Maps könyvtár parancsfájlja nem található, vagy nem tartalmazza az Ön oldalához tartozó megfelelő API-kulcsot.\x3cbr\x3e\x3cbr\x3eFejlesztőknek: A helyes működtetésre vonatkozó segítség az alábbi helyen érhető el, \x3ca href='http://trac.openlayers.org/wiki/Google' target='_blank'\x3ekattintson ide\x3c/a\x3e",getLayerWarning:"A(z) ${layerType} fólia nem töltődött be helyesen.\x3cbr\x3e\x3cbr\x3eAhhoz, hogy ez az üzenet eltűnjön, válasszon egy új BaseLayer fóliát a jobb felső sarokban található fóliakapcsoló segítségével.\x3cbr\x3e\x3cbr\x3eNagy valószínűséggel ez azért van, mert a(z) ${layerLib} könyvtár parancsfájlja helytelen.\x3cbr\x3e\x3cbr\x3eFejlesztőknek: A helyes működtetésre vonatkozó segítség az alábbi helyen érhető el, \x3ca href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'\x3ekattintson ide\x3c/a\x3e",scale:"Lépték = 1 : ${scaleDenom}",W:"Ny",E:"K",N:"É",S:"D",layerAlreadyAdded:"Megpróbálta hozzáadni a(z) ${layerName} fóliát a térképhez, de az már hozzá van adva",reprojectDeprecated:"Ön a 'reproject' beállítást használja a(z) ${layerName} fólián. Ez a beállítás érvénytelen: használata az üzleti alaptérképek fölötti adatok megjelenítésének támogatására szolgált, de ezt a funkció ezentúl a Gömbi Mercator használatával érhető el. További információ az alábbi helyen érhető el: http://trac.openlayers.org/wiki/SphericalMercator",methodDeprecated:"Ez a módszer érvénytelenítve lett és a 3.0-s verzióból el lesz távolítva. Használja a(z) ${newMethod} módszert helyette.",boundsAddError:"Az x és y értékeknek egyaránt meg kell felelnie, hogy a funkciót hozzáadhassa.",lonlatAddError:"A hossz. és szél. értékeknek egyaránt meg kell felelnie, hogy a funkciót hozzáadhassa.",pixelAddError:"Az x és y értékeknek egyaránt meg kell felelnie, hogy a funkciót hozzáadhassa.",unsupportedGeometryType:"Nem támogatott geometriatípus: ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition sikertelen: lehetséges, hogy a(z) ${elemId} azonosítójú elem téves helyre került.",filterEvaluateNotImplemented:"ennél a szűrőtípusnál kiértékelés nem hajtódik végre."});OpenLayers.Lang.ia=OpenLayers.Util.applyDefaults({unhandledRequest:"Le responsa a un requesta non esseva maneate: ${statusText}",permalink:"Permaligamine",overlays:"Superpositiones",baseLayer:"Strato de base",sameProjection:"Le mini-carta functiona solmente si illo es in le mesme projection que le carta principal",readNotImplemented:"Lectura non implementate.",writeNotImplemented:"Scriptura non implementate.",noFID:"Non pote actualisar un elemento sin FID.",errorLoadingGML:"Error al cargamento del file GML ${url}",browserNotSupported:"Tu navigator non supporta le rendition de vectores. Le renditores actualmente supportate es:\n${renderers}",componentShouldBe:"addFeatures: le componente debe esser del typo ${geomType}",getFeatureError:"getFeatureFromEvent ha essite appellate in un strato sin renditor. Isto significa generalmente que tu ha destruite un strato, ma lassava un gestor associate con illo.",minZoomLevelError:"Le proprietate minZoomLevel es solmente pro uso con le stratos descendente de FixedZoomLevels. Le facto que iste strato WFS verifica minZoomLevel es un reliquia del passato. Nonobstante, si nos lo remove immediatemente, nos pote rumper applicationes a base de OL que depende de illo. Ergo nos lo declara obsolete; le verification de minZoomLevel in basso essera removite in version 3.0. Per favor usa in su loco le configuration de resolutiones min/max como describite a: http://trac.openlayers.org/wiki/SettingZoomLevels",commitSuccess:"Transaction WFS: SUCCESSO ${response}",commitFailed:"Transaction WFS: FALLEVA ${response}",googleWarning:"Le strato Google non poteva esser cargate correctemente.\x3cbr\x3e\x3cbr\x3ePro disfacer te de iste message, selige un nove BaseLayer in le selector de strato in alto a dextra.\x3cbr\x3e\x3cbr\x3eMulto probabilemente, isto es proque le script del libreria de Google Maps non esseva includite o non contine le clave API correcte pro tu sito.\x3cbr\x3e\x3cbr\x3eDisveloppatores: Pro adjuta de corriger isto, \x3ca href='http://trac.openlayers.org/wiki/Google' target='_blank'\x3eclicca hic\x3c/a",getLayerWarning:"Le strato ${layerType} non poteva esser cargate correctemente.\x3cbr\x3e\x3cbr\x3ePro disfacer te de iste message, selige un nove BaseLayer in le selector de strato in alto a dextra.\x3cbr\x3e\x3cbr\x3eMulto probabilemente, isto es proque le script del libreria de ${layerLib} non esseva correctemente includite.\x3cbr\x3e\x3cbr\x3eDisveloppatores: Pro adjuta de corriger isto, \x3ca href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'\x3eclicca hic\x3c/a\x3e",scale:"Scala = 1 : ${scaleDenom}",W:"W",E:"E",N:"N",S:"S",layerAlreadyAdded:"Tu tentava adder le strato: ${layerName} al carta, ma illo es ja presente",reprojectDeprecated:"Tu usa le option 'reproject' in le strato ${layerName} layer. Iste option es obsolescente: illo esseva pro poter monstrar datos super cartas de base commercial, ma iste functionalitate pote ora esser attingite con le uso de Spherical Mercator. Ulterior information es disponibile a http://trac.openlayers.org/wiki/SphericalMercator.",methodDeprecated:"Iste methodo ha essite declarate obsolescente e essera removite in version 3.0. Per favor usa ${newMethod} in su loco.",boundsAddError:"Tu debe passar le duo valores x e y al function add.",lonlatAddError:"Tu debe passar le duo valores lon e lat al function add.",pixelAddError:"Tu debe passar le duo valores x e y al function add.",unsupportedGeometryType:"Typo de geometria non supportate: ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition falleva: le elemento con id ${elemId} pote esser mal placiate.",filterEvaluateNotImplemented:'"evaluate" non es implementate pro iste typo de filtro.'});OpenLayers.Lang.id=OpenLayers.Util.applyDefaults({unhandledRequest:"Permintaan yang tak tertangani menghasilkan ${statusText}",permalink:"Pranala permanen",overlays:"Hamparan",baseLayer:"Lapisan Dasar",sameProjection:"Peta tinjauan hanya bekerja bila dalam proyeksi yang sama dengan peta utama",readNotImplemented:"Membaca tidak diterapkan.",writeNotImplemented:"Menyimpan tidak diterapkan.",noFID:"Tidak dapat memperbarui fitur yang tidak memiliki FID.",errorLoadingGML:"Kesalahan dalam memuat berkas GML ${url}",browserNotSupported:"Peramban Anda tidak mendukung penggambaran vektor. Penggambar yang didukung saat ini adalah:\n${renderers}",componentShouldBe:"addFeatures : komponen harus berupa ${geomType}",getFeatureError:"getFeatureFromEvent diterapkan pada lapisan tanpa penggambar. Ini biasanya berarti Anda menghapus sebuah lapisan, tetapi tidak menghapus penangan yang terkait dengannya.",minZoomLevelError:"Properti minZoomLevel hanya ditujukan bekerja dengan lapisan FixedZoomLevels-descendent. Pengecekan minZoomLevel oleh lapisan wfs adalah peninggalan masa lalu. Kami tidak dapat menghapusnya tanpa kemungkinan merusak aplikasi berbasis OL yang mungkin bergantung padanya. Karenanya, kami menganggapnya tidak berlaku -- Cek minZoomLevel di bawah ini akan dihapus pada 3.0. Silakan gunakan penyetelan resolusi min/maks seperti dijabarkan di sini: http://trac.openlayers.org/wiki/SettingZoomLevels",commitSuccess:"WFS Transaksi: BERHASIL ${respon}",commitFailed:"WFS Transaksi: GAGAL ${respon}",googleWarning:"Lapisan Google tidak dapat dimuat dengan benar.\x3cbr\x3e\x3cbr\x3eUntuk menghilangkan pesan ini, pilih suatu BaseLayer baru melalui penukar lapisan (layer switcher) di ujung kanan atas.\x3cbr\x3e\x3cbr\x3eKemungkinan besar ini karena pustaka skrip Google Maps tidak disertakan atau tidak mengandung kunci API yang tepat untuk situs Anda.\x3cbr\x3e\x3cbr\x3ePengembang: Untuk bantuan mengatasi masalah ini, \x3ca href='http://trac.openlayers.org/wiki/Google' target='_blank'\x3eklik di sini\x3c/a\x3e",getLayerWarning:"Lapisan ${layerType} tidak dapat dimuat dengan benar.\x3cbr\x3e\x3cbr\x3eUntuk menghilangkan pesan ini, pilih suatu BaseLayer baru melalui penukar lapisan (layer switcher) di ujung kanan atas.\x3cbr\x3e\x3cbr\x3eKemungkinan besar ini karena pustaka skrip Google Maps tidak disertakan dengan benar.\x3cbr\x3e\x3cbr\x3ePengembang: Untuk bantuan mengatasi masalah ini, \x3ca href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'\x3eklik di sini\x3c/a\x3e",scale:"Sekala = 1 : ${scaleDenom}",W:"B",E:"T",N:"U",S:"S",layerAlreadyAdded:"Anda mencoba menambahkan lapisan: ${layerName} ke dalam peta, tapi lapisan itu telah ditambahkan",reprojectDeprecated:"Anda menggunakan opsi 'reproject' pada lapisan ${layerName}. Opsi ini telah ditinggalkan: penggunaannya dirancang untuk mendukung tampilan data melalui peta dasar komersial, tapi fungsionalitas tersebut saat ini harus dilakukan dengan menggunakan dukungan Spherical Mercator. Informasi lebih lanjut tersedia di http://trac.openlayers.org/wiki/SphericalMercator.",methodDeprecated:"Metode ini telah usang dan akan dihapus di 3.0. Sebaliknya, harap gunakan ${newMethod}.",boundsAddError:"Anda harus memberikan kedua nilai x dan y ke fungsi penambah.",lonlatAddError:"Anda harus memberikan kedua nilai lon dan lat ke fungsi penambah.",pixelAddError:"Anda harus memberikan kedua nilai x dan y ke fungsi penambah.",unsupportedGeometryType:"Tipe geometri tak didukung: ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition gagal: elemen dengan id ${elemId} mungkin salah tempat.",filterEvaluateNotImplemented:"evaluasi tidak tersedia untuk tipe filter ini."});OpenLayers.Lang.io=OpenLayers.Util.applyDefaults({scale:"Skalo = 1 : ${scaleDenom}"});OpenLayers.Lang.is=OpenLayers.Util.applyDefaults({permalink:"Varanlegur tengill",overlays:"Þekjur",baseLayer:"Grunnlag",sameProjection:"Yfirlitskortið virkar aðeins ef það er í sömu vörpun og aðalkortið",readNotImplemented:"Skrifun er óútfærð.",writeNotImplemented:"Lestur er óútfærður.",errorLoadingGML:"Villa kom upp við að hlaða inn GML skránni ${url}",scale:"Skali = 1 : ${scaleDenom}",layerAlreadyAdded:"Þú reyndir að bæta laginu ${layerName} á kortið en það er þegar búið að bæta því við",methodDeprecated:"Þetta fall hefur verið úrelt og verður fjarlægt í 3.0. Notaðu ${newMethod} í staðin."});OpenLayers.Lang.ja=OpenLayers.Util.applyDefaults({unhandledRequest:"未処理の要求は ${statusText} を返します",permalink:"パーマリンク",overlays:"オーバーレイ",baseLayer:"基底レイヤー",sameProjection:"概観地図はメインの地図と同じ投影法をとる場合のみ機能します",readNotImplemented:"読み込みは実装されていません。",writeNotImplemented:"書き込みは実装されていません。",noFID:"FID のない地物は更新できません。",errorLoadingGML:"GML ファイル ${url} の読み込みエラー",browserNotSupported:"あなたのブラウザはベクターグラフィックスの描写に対応していません。現時点で対応しているソフトウェアは以下のものです。\n${renderers}",componentShouldBe:"addFeatures: 要素は ${geomType} であるべきです",getFeatureError:"getFeatureFromEvent がレンダラーのないレイヤーから呼ばれました。通常、これはあなたがレイヤーを、それに関連づけられたいくつかのハンドラを除いて、破壊してしまったことを意味します。",minZoomLevelError:"minZoomLevel プロパティは FixedZoomLevels を継承するレイヤーでの使用のみを想定しています。この minZoomLevel に対する WFS レイヤーの検査は歴史的なものです。しかしながら、この検査を除去するとそれに依存する OpenLayers ベースのアプリケーションを破壊してしまう可能性があります。よって廃止が予定されており、この minZoomLevel 検査はバージョン3.0で除去されます。代わりに、http://trac.openlayers.org/wiki/SettingZoomLevels で解説されている、最小および最大解像度設定を使用してください。",commitSuccess:"WFS トランザクション: 成功 ${response}",commitFailed:"WFS トランザクション: 失敗 ${response}",googleWarning:"Google レイヤーが正しく読み込みを行えませんでした。\x3cbr\x3e\x3cbr\x3eこのメッセージを消すには、右上の隅にあるレイヤー切り替え部分で新しい基底レイヤーを選んでください。\x3cbr\x3e\x3cbr\x3eおそらく、これは Google マップ用ライブラリのスクリプトが組み込まれていないか、あなたのサイトに対応する正しい API キーが設定されていないためです。\x3cbr\x3e\x3cbr\x3e開発者の方へ: 正しい動作をさせるために\x3ca href='http://trac.openlayers.org/wiki/Google' target='_blank'\x3eこちらのウィキ\x3c/a\x3eを参照してください。",getLayerWarning:"${layerType} レイヤーが正しく読み込みを行えませんでした。\x3cbr\x3e\x3cbr\x3eこのメッセージを消すには、右上の隅にあるレイヤー切り替え部分で新しい基底レイヤーを選んでください。\x3cbr\x3e\x3cbr\x3eおそらく、これは ${layerLib} ライブラリのスクリプトが正しく組み込まれていないためです。\x3cbr\x3e\x3cbr\x3e開発者の方へ: 正しい動作をさせるために\x3ca href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'\x3eこちらのウィキ\x3c/a\x3eを参照してください。",scale:"縮尺 = 1 : ${scaleDenom}",W:"西",E:"東",N:"北",S:"南",layerAlreadyAdded:"あなたは「${layerName}」を地図に追加しようと試みましたが、そのレイヤーは既に追加されています",reprojectDeprecated:"あなたは「${layerName}」レイヤーで reproject オプションを使っています。このオプションは商用の基底地図上に情報を表示する目的で設計されましたが、現在ではその機能は Spherical Mercator サポートを利用して実現されており、このオプションの使用は非推奨です。追加の情報は http://trac.openlayers.org/wiki/SphericalMercator で入手できます。",methodDeprecated:"このメソッドは廃止が予定されており、バージョン3.0で除去されます。代わりに ${newMethod} を使用してください。",boundsAddError:"x と y 両方の値を add 関数に渡さなければなりません。",lonlatAddError:"lon と lat 両方の値を add 関数に渡さなければなりません。",pixelAddError:"x と y の値両方を add 関数に渡さなければなりません。",unsupportedGeometryType:"未対応の形状型: ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition が失敗しました: id ${elemId} をもつ要素が誤った位置にある可能性があります。",filterEvaluateNotImplemented:"このフィルター型について evaluate は実装されていません。"});OpenLayers.Lang.km=OpenLayers.Util.applyDefaults({permalink:"តំណភ្ជាប់អចិន្ត្រៃយ៍",baseLayer:"ស្រទាប់បាត​",errorLoadingGML:"កំហុសកំឡុងពេលផ្ទុកឯកសារ GML ${url}",scale:"មាត្រដ្ឋាន = ១ ៖ ${scaleDenom}"});OpenLayers.Lang.ksh=OpenLayers.Util.applyDefaults({unhandledRequest:"Met dä Antwoot op en Aanfrooch ham_mer nix aanjefange: ${statusText}",permalink:"Lengk op Duuer",overlays:"Drövver jelaat",baseLayer:"Jrund-Nivoh",sameProjection:"De Övverseeschs_Kaat deiht et bloß, wann se de sälve Projäxjuhn bruche deiht, wi de Houp_Kaat",readNotImplemented:'„\x3ccode lang="en"\x3eread\x3c/code\x3e“ is em Projramm nit fürjesinn.',writeNotImplemented:'„\x3ccode lang="en"\x3ewrite\x3c/code\x3e“ is em Projramm nit fürjesinn.',noFID:'En Saach, woh kein \x3ci lang="en"\x3eFID\x3c/i\x3e för doh es, löht sesch nit ändere.',errorLoadingGML:'Fähler beim \x3ci lang="en"\x3eGML\x3c/i\x3e-Datei-Laade vun \x3ccode\x3e${url}\x3c/code\x3e',browserNotSupported:"Dinge Brauser kann kein Väktore ußjävve. De Zoote Ußjaabe, di em Momang jon, sen:\n${renderers}",componentShouldBe:'\x3ccode lang="en"\x3eaddFeatures\x3c/code\x3e: dä Aandeil sullt vun dä Zoot „\x3ccode lang="en"\x3e${geomType}\x3c/code\x3e“ sin.',getFeatureError:'\x3ccode lang="en"\x3egetFeatureFromEvent\x3c/code\x3e es vun enem Nivoh opjeroofe woode, woh et kei Projramm zom Ußjävve jit. Dat bedügg för jewöhnlesch, dat De e Nivoh kapott jemaat häs, ävver nit e Projramm för domet ömzejonn, wat domet verbonge es.',minZoomLevelError:'De Eijeschaff „\x3ccode lang="en"\x3eminZoomLevel\x3c/code\x3e“ es bloß doför jedaach, dat mer se met dä Nivvohß bruch, di vun \x3ccode lang="en"\x3eFixedZoomLevels\x3c/code\x3e affhange don. Dat dat \x3ci lang="en"\x3eWFS\x3c/i\x3e-Nivvoh övverhoup de Eijeschaff „\x3ccode lang="en"\x3eminZoomLevel\x3c/code\x3e“ pröhfe deiht, es noch övveresch vun fröhjer. Mer künne dat ävver jez nit fott lohße, oohne dat mer Jevaa loufe, dat Aanwendunge vun OpenLayers nit mieh loufe, di sesch doh velleijsch noch drop am verlohße sin. Dröm sare mer, dat mer et nit mieh han welle, un de „\x3ccode lang="en"\x3eminZoomLevel\x3c/code\x3e“-Eijeschaff weed hee vun de Version 3.0 af nit mieh jeprööf wäde. Nemm doför de Enstellung för de hühßte un de kleinßte Oplöhsung, esu wi et en http://trac.openlayers.org/wiki/SettingZoomLevels opjeschrevve es.',commitSuccess:'Dä \x3ci lang="en"\x3eWFS\x3c/i\x3e-Vörjang es joot jeloufe: ${response}',commitFailed:'Dä \x3ci lang="en"\x3eWFS\x3c/i\x3e-Vörjang es scheif jejange: ${response}',googleWarning:'Dat Nivvoh \x3ccode lang="en"\x3eGoogle\x3c/code\x3e kunnt nit reschtesch jelaade wääde.\x3cbr /\x3e\x3cbr /\x3eÖm hee di Nohreesch loß ze krijje, donn en ander Jrund-Nivvoh ußsöhke, rähß bovve en de Äk.\x3cbr /\x3e\x3cbr /\x3eWascheinlesch es dat wiel dat \x3ci lang="en"\x3eGoogle-Maps\x3c/i\x3e-Skrepp entweeder nit reschtesch enjebonge wood, udder nit dä reschtejje \x3ci lang="en"\x3eAPI\x3c/i\x3e-Schlößel för Ding Web-ßait scheke deiht.\x3cbr /\x3e\x3cbr /\x3eFör Projrammierer jidd_et Hölp do_drövver, \x3ca href="http://trac.openlayers.org/wiki/Google" target="_blank"\x3ewi mer dat aan et Loufe brengk\x3c/a\x3e.',getLayerWarning:'Dat Nivvoh \x3ccode\x3e${layerType}\x3c/code\x3e kunnt nit reschtesch jelaade wääde.\x3cbr /\x3e\x3cbr /\x3eÖm hee di Nohreesch loß ze krijje, donn en ander Jrund-Nivvoh ußsöhkre, rähß bovve en de Äk.\x3cbr /\x3e\x3cbr /\x3eWascheinlesch es dat, wiel dat Skrepp \x3ccode\x3e${layerLib}\x3c/code\x3e nit reschtesch enjebonge wood.\x3cbr /\x3e\x3cbr /\x3eFör Projrammierer jidd_Et Hölp do_drövver, \x3ca href="http://trac.openlayers.org/wiki/${layerLib}" target="_blank"\x3ewi mer dat aan et Loufe brengk\x3c/a\x3e.',scale:"Mohßshtaab = 1 : ${scaleDenom}",W:"W",E:"O",N:"N",S:"S",layerAlreadyAdded:"Do häß versöhk, dat Nivvoh \x3ccode\x3e${layerName}\x3c/code\x3e en di Kaat eren ze bränge, et wohr ävver ald do dren.",reprojectDeprecated:"Do bruchs de Ußwahl \x3ccode\x3ereproject\x3c/code\x3e op däm Nivvoh \x3ccode\x3e${layerName}\x3c/code\x3e. Di Ußwahl es nit mieh jähn jesinn. Se wohr doför jedaach, öm Date op jeschääfsmäßesch eruß jejovve Kaate bovve drop ze moole, wat ävver enzwesche besser met dä Öngershtözung för de ßfääresche Mäkaator Beldscher jeiht. Doh kanns De mieh drövver fenge op dä Sigg: http://trac.openlayers.org/wiki/SphericalMercator.",methodDeprecated:"Hee di Metood es nim_mih aktoäll un et weed se en dä Version 3.0 nit mieh jävve. Nemm \x3ccode\x3e${newMethod}\x3c/code\x3e doföör.",boundsAddError:"Do moß beeds vun de \x3ccode\x3ex\x3c/code\x3e un \x3ccode\x3ey\x3c/code\x3e Wääte aan de Fungkßjohn \x3ccode\x3eadd\x3c/code\x3e jävve.",lonlatAddError:"Do moß beeds \x3ccode\x3elon\x3c/code\x3e un \x3ccode\x3elat\x3c/code\x3e aan de Fungkßjohn \x3ccode\x3eadd\x3c/code\x3e jävve.",pixelAddError:"Do moß beeds \x3ccode\x3ex\x3c/code\x3e un \x3ccode\x3ey\x3c/code\x3e aan de Fungkßjohn \x3ccode\x3eadd\x3c/code\x3e jävve.",unsupportedGeometryType:"De Zoot Jommetrii dom_mer nit ongershtöze: \x3ccode\x3e${geomType}\x3c/code\x3e",pagePositionFailed:'\x3ccode lang="en"\x3eOpenLayers.Util.pagePosition\x3c/code\x3e es donevve jejange: dat Denge met dä Kännong \x3ccode\x3e${elemId}\x3c/code\x3e künnt am verkeehte Plaz sin.',filterEvaluateNotImplemented:'„\x3ccode lang="en"\x3eevaluate\x3c/code\x3e“ es för di Zoot Fellter nit enjereschdt.'});OpenLayers.Lang.nds=OpenLayers.Util.applyDefaults({unhandledRequest:"Unbehannelt Trüchmellels för de Anfraag ${statusText}",permalink:"Permalink",overlays:"Overlays",baseLayer:"Achtergrundkoort",sameProjection:"De Översichtskoort geiht blot, wenn de sülve Projekschoon as bi de Hööftkoort bruukt warrt",readNotImplemented:"Lesen is nich inricht.",writeNotImplemented:"Schrieven is nich inricht.",noFID:"En Feature, dat keen FID hett, kann nich aktuell maakt warrn.",errorLoadingGML:"Fehler bi’t Laden vun de GML-Datei ${url}",browserNotSupported:"Dien Browser ünnerstütt keen Vektorbiller. Ünnerstütt Renderers:\n${renderers}",componentShouldBe:"addFeatures : Kumponent schull man den Typ ${geomType} hebben",getFeatureError:"getFeatureFromEvent is von en Laag ahn Render opropen worrn. Dat bedüüdt normalerwies, dat en Laag wegmaakt worrn is, aver nich de Handler, de dor op verwiest.",commitSuccess:"WFS-Transakschoon: hett klappt ${response}",commitFailed:"WFS-Transakschoon: hett nich klappt ${response}",scale:"Skaal = 1 : ${scaleDenom}",layerAlreadyAdded:"Du versöchst de Laag „${layerName}“ to de Koort totofögen, man de is al toföögt",methodDeprecated:"Disse Methood is oold un schall dat in 3.0 nich mehr geven. Bruuk dor man beter ${newMethod} för.",boundsAddError:"De Weert x un y, de mööt all beid an de add-Funkschoon övergeven warrn.",lonlatAddError:"De Weert lon un lat, de mööt all beid an de add-Funkschoon övergeven warrn.",pixelAddError:"De Weert x un y, de mööt all beid an de add-Funkschoon övergeven warrn.",unsupportedGeometryType:"Nich ünnerstütt Geometrie-Typ: ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition güng nich: Element mit de Id ${elemId} is villicht an’n verkehrten Platz."});OpenLayers.Lang.nn=OpenLayers.Util.applyDefaults({scale:"Skala = 1 : ${scaleDenom}",layerAlreadyAdded:"Du freista å leggja til laget «${layerName}» på kartet, men det har alt vorte lagt til.",boundsAddError:"Du er nøydd til å gje både ein x- og ein y-verdi til «add»-funksjonen.",lonlatAddError:"Du er nøydd til å gje både lon- og lat-verdiar til «add»-funksjonen.",pixelAddError:"Du er nøydd til å gje både ein x- og ein y-verdi til «add»-funksjonen."});OpenLayers.Lang.oc=OpenLayers.Util.applyDefaults({unhandledRequest:"Requèsta pas gerida, retorna ${statusText}",permalink:"Permaligam",overlays:"Calques",baseLayer:"Calc de basa",sameProjection:"La carta de situacion fonciona pas que quora sa projeccion es la meteissa que la de la carta principala",readNotImplemented:"Lectura pas implementada.",writeNotImplemented:"Escritura pas implementada.",noFID:"Impossible de metre a jorn un objècte sens identificant (fid).",errorLoadingGML:"Error al cargament del fichièr GML ${url}",browserNotSupported:"Vòstre navegidor supòrta pas lo rendut vectorial. Los renderers actualament suportats son : \n${renderers}",componentShouldBe:"addFeatures : lo compausant deuriá èsser de tipe ${geomType}",getFeatureError:"getFeatureFromEvent es estat apelat sus un calc sens renderer. Aquò significa generalament qu'avètz destruch aqueste jaç, mas qu'avètz conservat un handler que li èra associat.",minZoomLevelError:"La proprietat minZoomLevel deu èsser utilizada solament per de jaces FixedZoomLevels-descendent. Lo fach qu'aqueste jaç WFS verifique la preséncia de minZoomLevel es una relica del passat. Çaquelà, la podèm suprimir sens copar d'aplicacions que ne poirián dependre. Es per aquò que la depreciam -- la verificacion del minZoomLevel serà suprimida en version 3.0. A la plaça, mercés d'utilizar los paramètres de resolucions min/max tal coma descrich sus : http://trac.openlayers.org/wiki/SettingZoomLevels",commitSuccess:"Transaccion WFS : SUCCES ${response}",commitFailed:"Transaccion WFS : FRACAS ${response}",googleWarning:"Lo jaç Google es pas estat en mesura de se cargar corrèctament.\x3cbr\x3e\x3cbr\x3ePer suprimir aqueste messatge, causissètz una BaseLayer novèla dins lo selector de jaç en naut a drecha.\x3cbr\x3e\x3cbr\x3eAquò es possiblament causat par la non-inclusion de la librariá Google Maps, o alara perque que la clau de l'API correspond pas a vòstre site.\x3cbr\x3e\x3cbr\x3eDesvolopaires : per saber cossí corregir aquò, \x3ca href='http://trac.openlayers.org/wiki/Google' target='_blank'\x3eclicatz aicí\x3c/a\x3e",getLayerWarning:"Lo jaç ${layerType} es pas en mesura de se cargar corrèctament.\x3cbr\x3e\x3cbr\x3ePer suprimir aqueste messatge, causissètz una  BaseLayer novèla dins lo selector de jaç en naut a drecha.\x3cbr\x3e\x3cbr\x3eAquò es possiblament causat per la non-inclusion de la librariá ${layerLib}.\x3cbr\x3e\x3cbr\x3eDesvolopaires : per saber cossí corregir aquí, \x3ca href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'\x3eclicatz aicí\x3c/a\x3e",scale:"Escala ~ 1 : ${scaleDenom}",W:"O",E:"È",N:"N",S:"S",layerAlreadyAdded:"Avètz ensajat d'apondre a la carta lo calc : ${layerName}, mas ja es present",reprojectDeprecated:"Utilizatz l'opcion 'reproject' sul jaç ${layerName}. Aquesta opcion es despreciada : Son usatge permetiá d'afichar de donadas al dessús de jaces raster comercials. Aquesta foncionalitat ara es suportada en utilizant lo supòrt de la projeccion Mercator Esferica. Mai d'informacion es disponibla sus http://trac.openlayers.org/wiki/SphericalMercator.",methodDeprecated:"Aqueste metòde es despreciada, e serà suprimida a la version 3.0. Mercés d'utilizar ${newMethod} a la plaça.",boundsAddError:"Vos cal passar las doas valors x e y a la foncion add.",lonlatAddError:"Vos cal passar las doas valors lon e lat a la foncion add.",pixelAddError:"Vos cal passar las doas valors x e y a la foncion add.",unsupportedGeometryType:"Tipe de geometria pas suportat : ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition a fracassat : l'element d'id ${elemId} poiriá èsser mal posicionat.",filterEvaluateNotImplemented:"evaluar es pas encara estat implementat per aqueste tipe de filtre."});OpenLayers.Lang.pt=OpenLayers.Util.applyDefaults({unhandledRequest:"Servidor devolveu erro não contemplado ${statusText}",permalink:"Ligação permanente",overlays:"Sobreposições",baseLayer:"Camada Base",sameProjection:"O mapa panorâmico só funciona quando está na mesma projeção que o mapa principal",readNotImplemented:"Leitura não implementada.",writeNotImplemented:"Escrita não implementada.",noFID:"Não é possível atualizar um elemento para a qual não há FID.",errorLoadingGML:"Erro ao carregar ficheiro GML ${url}",browserNotSupported:"O seu navegador não suporta renderização vetorial. Actualmente os renderizadores suportados são:\n${renderers}",componentShouldBe:"addFeatures: componente deve ser um(a) ${geomType}",getFeatureError:"getFeatureFromEvent foi chamado numa camada sem renderizador. Isto normalmente significa que destruiu uma camada, mas não um manipulador ''(handler)'' que lhe está associado.",minZoomLevelError:"A propriedade minZoomLevel só deve ser usada com as camadas descendentes da FixedZoomLevels. A verificação da propriedade por esta camada wfs é uma relíquia do passado. No entanto, não podemos removê-la sem correr o risco de afectar aplicações OL que dependam dela. Portanto, estamos a torná-la obsoleta -- a verificação minZoomLevel será removida na versão 3.0. Em vez dela, por favor, use as opções de resolução min/max descritas aqui: http://trac.openlayers.org/wiki/SettingZoomLevels",commitSuccess:"Transacção WFS: SUCESSO ${response}",commitFailed:"Transacção WFS: FALHOU ${response}",googleWarning:"A Camada Google não foi correctamente carregada.\x3cbr\x3e\x3cbr\x3ePara deixar de receber esta mensagem, seleccione uma nova Camada-Base no ''switcher'' de camadas no canto superior direito.\x3cbr\x3e\x3cbr\x3eProvavelmente, isto acontece porque o ''script'' da biblioteca do Google Maps não foi incluído ou não contém a chave API correcta para o seu sítio.\x3cbr\x3e\x3cbr\x3eProgramadores: Para ajuda sobre como solucionar o problema \x3ca href='http://trac.openlayers.org/wiki/Google' target='_blank'\x3eclique aqui\x3c/a\x3e .",getLayerWarning:"A camada ${layerType} não foi correctamente carregada.\x3cbr\x3e\x3cbr\x3ePara desactivar esta mensagem, seleccione uma nova Camada-Base no ''switcher'' de camadas no canto superior direito.\x3cbr\x3e\x3cbr\x3eProvavelmente, isto acontece porque o ''script'' da biblioteca ${layerLib} não foi incluído correctamente.\x3cbr\x3e\x3cbr\x3eProgramadores: Para ajuda sobre como solucionar o problema \x3ca href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'\x3eclique aqui\x3c/a\x3e .",scale:"Escala = 1 : ${scaleDenom}",W:"O",E:"E",N:"N",S:"S",layerAlreadyAdded:"Você tentou adicionar a camada: ${layerName} ao mapa, mas ela já tinha sido adicionada antes",reprojectDeprecated:"Está usando a opção 'reproject' na camada ${layerName}. Esta opção é obsoleta: foi concebida para permitir a apresentação de dados sobre mapas-base comerciais, mas esta funcionalidade é agora suportada pelo Mercator Esférico. Mais informação está disponível em http://trac.openlayers.org/wiki/SphericalMercator.",methodDeprecated:"Este método foi declarado obsoleto e será removido na versão 3.0. Por favor, use ${newMethod} em vez disso.",boundsAddError:"Você deve passar tanto o valor x como o y à função de adição.",lonlatAddError:"Você deve passar tanto o valor lon como o lat à função de adição.",pixelAddError:"Você deve passar tanto o valor x como o y à função de adição.",unsupportedGeometryType:"Tipo de geometria não suportado: ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition falhou: o elemento com o id ${elemId} poderá estar mal-posicionado.",filterEvaluateNotImplemented:"avaliar não está implementado para este tipo de filtro."});OpenLayers.Lang.ru=OpenLayers.Util.applyDefaults({unhandledRequest:"Необработанный запрос вернул ${statusText}",permalink:"Постоянная ссылка",overlays:"Слои",baseLayer:"Основной слой",sameProjection:"Обзорная карта работает только тогда, когда имеет ту же проекцию, что и основная",readNotImplemented:"Чтение не реализовано.",writeNotImplemented:"Запись не реализована.",noFID:"Невозможно обновить объект, для которого нет FID.",errorLoadingGML:"Ошибка при загрузке файла GML ${url}",browserNotSupported:"Ваш браузер не поддерживает векторную графику. На данный момент поддерживаются:\n${renderers}",componentShouldBe:"addFeatures: компонент должен быть ${geomType}",getFeatureError:"getFeatureFromEvent вызван для слоя без рендерера. Обычно это говорит о том, что вы уничтожили слой, но оставили связанный с ним обработчик.",minZoomLevelError:"Свойство minZoomLevel предназначено только для использования со слоями, являющимися потомками FixedZoomLevels. То, что этот WFS-слой проверяется на minZoomLevel — реликт прошлого. Однако мы не можем удалить эту функцию, так как, возможно, от неё зависят некоторые основанные на OpenLayers приложения. Функция объявлена устаревшей — проверка minZoomLevel будет удалена в 3.0. Пожалуйста, используйте вместо неё настройку мин/макс разрешения, описанную здесь: http://trac.openlayers.org/wiki/SettingZoomLevels",commitSuccess:"Транзакция WFS: УСПЕШНО ${response}",commitFailed:"Транзакция WFS: ОШИБКА ${response}",googleWarning:"Слой Google не удалось нормально загрузить.\x3cbr\x3e\x3cbr\x3eЧтобы избавиться от этого сообщения, выбите другой основной слой в переключателе в правом верхнем углу.\x3cbr\x3e\x3cbr\x3eСкорее всего, причина в том, что библиотека Google Maps не была включена или не содержит корректного API-ключа для вашего сайта.\x3cbr\x3e\x3cbr\x3eРазработчикам: чтобы узнать, как сделать, чтобы всё заработало, \x3ca href='http://trac.openlayers.org/wiki/Google' target='_blank'\x3eщёлкните тут\x3c/a\x3e",getLayerWarning:"Слой ${layerType} не удалось нормально загрузить. \x3cbr\x3e\x3cbr\x3eЧтобы избавиться от этого сообщения, выбите другой основной слой в переключателе в правом верхнем углу.\x3cbr\x3e\x3cbr\x3eСкорее всего, причина в том, что библиотека ${layerLib} не была включена или была включена некорректно.\x3cbr\x3e\x3cbr\x3eРазработчикам: чтобы узнать, как сделать, чтобы всё заработало, \x3ca href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'\x3eщёлкните тут\x3c/a\x3e",scale:"Масштаб = 1 : ${scaleDenom}",W:"З",E:"В",N:"С",S:"Ю",layerAlreadyAdded:"Вы попытались добавить слой «${layerName}» на карту, но он уже был добавлен",reprojectDeprecated:"Вы используете опцию 'reproject' для слоя ${layerName}. Эта опция является устаревшей: ее использование предполагалось для поддержки показа данных поверх коммерческих базовых карт, но теперь этот функционал несёт встроенная поддержка сферической проекции Меркатора. Больше сведений доступно на http://trac.openlayers.org/wiki/SphericalMercator.",methodDeprecated:"Этот метод считается устаревшим и будет удалён в версии 3.0. Пожалуйста, пользуйтесь ${newMethod}.",boundsAddError:"Функции add надо передавать оба значения, x и y.",lonlatAddError:"Функции add надо передавать оба значения, lon и lat.",pixelAddError:"Функции add надо передавать оба значения, x и y.",unsupportedGeometryType:"Неподдерживаемый тип геометрии: ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition failed: элемент с id ${elemId} может находиться не в нужном месте.",filterEvaluateNotImplemented:"evaluate не реализовано для фильтра данного типа."});OpenLayers.Lang.sk=OpenLayers.Util.applyDefaults({unhandledRequest:"Neobslúžené požiadavky vracajú ${statusText}",permalink:"Trvalý odkaz",overlays:"Prekrytia",baseLayer:"Základná vrstva",sameProjection:"Prehľadová mapka funguje iba vtedy, keď je v rovnakej projekcii ako hlavná mapa",readNotImplemented:"Čítanie nie je implementované.",writeNotImplemented:"Zápis nie je implementovaný.",noFID:"Nie je možné aktualizovať vlastnosť, pre ktorú neexistuje FID.",errorLoadingGML:"Chyba pri načítaní súboru GML ${url}",browserNotSupported:"Váš prehliadač nepodporuje vykresľovanie vektorov. Momentálne podporované vykresľovače sú:\n${renderers}",componentShouldBe:"addFeatures: komponent by mal byť ${geomType}",getFeatureError:"getFeatureFromEvent bola zavolaná na vrstve bez vykresľovača. To zvyčajne znamená, že ste odstránili vrstvu, ale nie niektorú z obslúh, ktorá je s ňou asociovaná.",minZoomLevelError:"Vlastnosť minZoomLevel je určený iba na použitie s vrstvami odvodenými od FixedZoomLevels. To, že táto wfs vrstva kontroluje minZoomLevel je pozostatok z minulosti. Nemôžeme ho však odstrániť, aby sme sa vyhli možnému porušeniu aplikácií založených na Open Layers, ktoré na tomto môže závisieť. Preto ho označujeme ako zavrhovaný - dolu uvedená kontrola minZoomLevel bude odstránená vo verzii 3.0. Použite prosím namiesto toho kontrolu min./max. rozlíšenia podľa tu uvedeného popisu: http://trac.openlayers.org/wiki/SettingZoomLevels",commitSuccess:"Transakcia WFS: ÚSPEŠNÁ ${response}",commitFailed:"Transakcia WFS: ZLYHALA ${response}",googleWarning:"Vrstvu Google nebolo možné správne načítať.\x3cbr\x3e\x3cbr\x3eAby ste sa tejto správy zbavili vyberte novú BaseLayer v prepínači vrstiev v pravom hornom rohu.\x3cbr\x3e\x3cbr\x3eToto sa stalo pravdepodobne preto, že skript knižnice Google Maps buď nebol načítaný alebo neobsahuje správny kľúč API pre vašu lokalitu.\x3cbr\x3e\x3cbr\x3eVývojári: Tu môžete získať \x3ca href='http://trac.openlayers.org/wiki/Google' target='_blank'\x3epomoc so sfunkčnením\x3c/a\x3e",getLayerWarning:"Vrstvu ${layerType} nebolo možné správne načítať.\x3cbr\x3e\x3cbr\x3eAby ste sa tejto správy zbavili vyberte novú BaseLayer v prepínači vrstiev v pravom hornom rohu.\x3cbr\x3e\x3cbr\x3eToto sa stalo pravdepodobne preto, že skript knižnice ${layerType} buď nebol načítaný alebo neobsahuje správny kľúč API pre vašu lokalitu.\x3cbr\x3e\x3cbr\x3eVývojári: Tu môžete získať \x3ca href='http://trac.openlayers.org/wiki/${layerType}' target='_blank'\x3epomoc so sfunkčnením\x3c/a\x3e",scale:"Mierka = 1 : ${scaleDenom}",layerAlreadyAdded:"Pokúsili ste sa do mapy pridať vrstvu ${layerName}, ale tá už bola pridaná",reprojectDeprecated:"Používate voľby „reproject“ vrstvy ${layerType}. Táto voľba je zzavrhovaná: jej použitie bolo navrhnuté na podporu zobrazovania údajov nad komerčnými základovými mapami, ale túto funkcionalitu je teraz možné dosiahnuť pomocou Spherical Mercator. Ďalšie informácie získate na stránke http://trac.openlayers.org/wiki/SphericalMercator.",methodDeprecated:"Táto metóda je zavrhovaná a bude odstránená vo verzii 3.0. Použite prosím namiesto nej metódu ${newMethod}.",boundsAddError:"Sčítacej funkcii musíte dať hodnoty x aj y.",lonlatAddError:"Sčítacej funkcii musíte dať hodnoty lon (zem. dĺžka) aj lat (zem. šírka).",pixelAddError:"Sčítacej funkcii musíte dať hodnoty x aj y.",unsupportedGeometryType:"Nepodporovaný typ geometrie: ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition zlyhalo: prvok s id ${elemId} môže byť zle umiestnený.",filterEvaluateNotImplemented:"evaluate nie je implementovaný pre tento typ filtra"});OpenLayers.Lang.te=OpenLayers.Util.applyDefaults({permalink:"స్థిరలింకు",W:"ప",E:"తూ",N:"ఉ",S:"ద"});OpenLayers.Lang.vi=OpenLayers.Util.applyDefaults({unhandledRequest:"Không xử lý được phản hồi ${statusText} cho yêu cầu",permalink:"Liên kết thường trực",overlays:"Lấp bản đồ",baseLayer:"Lớp nền",sameProjection:"Bản đồ toàn cảnh chỉ hoạt động khi cùng phép chiếu với bản đồ chính",readNotImplemented:"Chưa hỗ trợ chức năng đọc.",writeNotImplemented:"Chưa hỗ trợ chức năng viết.",noFID:"Không thể cập nhật tính năng thiếu FID.",errorLoadingGML:"Lỗi tải tập tin GML tại ${url}",browserNotSupported:"Trình duyệt của bạn không hỗ trợ chức năng vẽ bằng vectơ. Hiện hỗ trợ các bộ kết xuất:\n${renderers}",componentShouldBe:"addFeatures: bộ phận cần phải là ${geomType}",getFeatureError:"getFeatureFromEvent được gọi từ lớp không có bộ kết xuất. Thường thì có lẽ lớp bị xóa nhưng một phần xử lý của nó vẫn còn.",minZoomLevelError:"Chỉ nên sử dụng thuộc tính minZoomLevel với các lớp FixedZoomLevels-descendent. Việc lớp wfs này tìm cho minZoomLevel là di tích còn lại từ xưa. Tuy nhiên, nếu chúng tôi dời nó thì sẽ vỡ các chương trình OpenLayers mà dựa trên nó. Bởi vậy chúng tôi phản đối sử dụng nó\x26nbsp;– bước tìm cho minZoomLevel sẽ được dời vào phiên bản 3.0. Xin sử dụng thiết lập độ phân tích tối thiểu / tối đa thay thế, theo hướng dẫn này: http://trac.openlayers.org/wiki/SettingZoomLevels",commitSuccess:"Giao dịch WFS: THÀNH CÔNG ${response}",commitFailed:"Giao dịch WFS: THẤT BẠI ${response}",googleWarning:"Không thể tải lớp Google đúng đắn.\x3cbr\x3e\x3cbr\x3eĐể tránh thông báo này lần sau, hãy chọn BaseLayer mới dùng điều khiển chọn lớp ở góc trên phải.\x3cbr\x3e\x3cbr\x3eChắc script thư viện Google Maps hoặc không được bao gồm hoặc không chứa khóa API hợp với website của bạn.\x3cbr\x3e\x3cbr\x3e\x3ca href='http://trac.openlayers.org/wiki/Google' target='_blank'\x3eTrợ giúp về tính năng này\x3c/a\x3e cho người phát triển.",getLayerWarning:"Không thể tải lớp ${layerType} đúng đắn.\x3cbr\x3e\x3cbr\x3eĐể tránh thông báo này lần sau, hãy chọn BaseLayer mới dùng điều khiển chọn lớp ở góc trên phải.\x3cbr\x3e\x3cbr\x3eChắc script thư viện ${layerLib} không được bao gồm đúng kiểu.\x3cbr\x3e\x3cbr\x3e\x3ca href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'\x3eTrợ giúp về tính năng này\x3c/a\x3e cho người phát triển.",scale:"Tỷ lệ = 1 : ${scaleDenom}",W:"T",E:"Đ",N:"B",S:"N",layerAlreadyAdded:"Bạn muốn thêm lớp ${layerName} vào bản đồ, nhưng lớp này đã được thêm",reprojectDeprecated:"Bạn đang áp dụng chế độ “reproject” vào lớp ${layerName}. Chế độ này đã bị phản đối: nó có mục đích hỗ trợ lấp dữ liệu trên các nền bản đồ thương mại; nên thực hiện hiệu ứng đó dùng tính năng Mercator Hình cầu. Có sẵn thêm chi tiết tại http://trac.openlayers.org/wiki/SphericalMercator .",methodDeprecated:"Phương thức này đã bị phản đối và sẽ bị dời vào phiên bản 3.0. Xin hãy sử dụng ${newMethod} thay thế.",boundsAddError:"Cần phải cho cả giá trị x và y vào hàm add.",lonlatAddError:"Cần phải cho cả giá trị lon và lat vào hàm add.",pixelAddError:"Cần phải cho cả giá trị x và y vào hàm add.",unsupportedGeometryType:"Không hỗ trợ kiểu địa lý: ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition bị thất bại: nguyên tố với ID ${elemId} có thể ở chỗ sai.",filterEvaluateNotImplemented:"chưa hỗ trợ evaluate cho loại bộ lọc này."});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.Popup.Framed=OpenLayers.Class(OpenLayers.Popup.Anchored,{imageSrc:null,imageSize:null,isAlphaImage:false,positionBlocks:null,blocks:null,fixedRelativePosition:false,initialize:function(G,C,F,B,A,E,D){OpenLayers.Popup.Anchored.prototype.initialize.apply(this,arguments);if(this.fixedRelativePosition){this.updateRelativePosition();this.calculateRelativePosition=function(H){return this.relativePosition}}this.contentDiv.style.position="absolute";this.contentDiv.style.zIndex=1;if(E){this.closeDiv.style.zIndex=1}this.groupDiv.style.position="absolute";this.groupDiv.style.top="0px";this.groupDiv.style.left="0px";this.groupDiv.style.height="100%";this.groupDiv.style.width="100%"},destroy:function(){this.imageSrc=null;this.imageSize=null;this.isAlphaImage=null;this.fixedRelativePosition=false;this.positionBlocks=null;for(var A=0;A<this.blocks.length;A++){var B=this.blocks[A];if(B.image){B.div.removeChild(B.image)}B.image=null;if(B.div){this.groupDiv.removeChild(B.div)}B.div=null}this.blocks=null;OpenLayers.Popup.Anchored.prototype.destroy.apply(this,arguments)},setBackgroundColor:function(A){},setBorder:function(){},setOpacity:function(A){},setSize:function(A){OpenLayers.Popup.Anchored.prototype.setSize.apply(this,arguments);this.updateBlocks()},updateRelativePosition:function(){this.padding=this.positionBlocks[this.relativePosition].padding;if(this.closeDiv){var A=this.getContentDivPadding();this.closeDiv.style.right=A.right+this.padding.right+"px";this.closeDiv.style.top=A.top+this.padding.top+"px"}this.updateBlocks()},calculateNewPx:function(A){var B=OpenLayers.Popup.Anchored.prototype.calculateNewPx.apply(this,arguments);B=B.offset(this.positionBlocks[this.relativePosition].offset);return B},createBlocks:function(){this.blocks=[];var F=null;for(var E in this.positionBlocks){F=E;break}var A=this.positionBlocks[F];for(var D=0;D<A.blocks.length;D++){var H={};this.blocks.push(H);var B=this.id+"_FrameDecorationDiv_"+D;H.div=OpenLayers.Util.createDiv(B,null,null,null,"absolute",null,"hidden",null);var C=this.id+"_FrameDecorationImg_"+D;var G=(this.isAlphaImage)?OpenLayers.Util.createAlphaImageDiv:OpenLayers.Util.createImage;H.image=G(C,null,this.imageSize,this.imageSrc,"absolute",null,null,null);H.div.appendChild(H.image);this.groupDiv.appendChild(H.div)}},updateBlocks:function(){if(!this.blocks){this.createBlocks()}if(this.size&&this.relativePosition){var G=this.positionBlocks[this.relativePosition];for(var E=0;E<G.blocks.length;E++){var B=G.blocks[E];var D=this.blocks[E];var C=B.anchor.left;var H=B.anchor.bottom;var A=B.anchor.right;var J=B.anchor.top;var I=(isNaN(B.size.w))?this.size.w-(A+C):B.size.w;var F=(isNaN(B.size.h))?this.size.h-(H+J):B.size.h;D.div.style.width=(I<0?0:I)+"px";D.div.style.height=(F<0?0:F)+"px";D.div.style.left=(C!=null)?C+"px":"";D.div.style.bottom=(H!=null)?H+"px":"";D.div.style.right=(A!=null)?A+"px":"";D.div.style.top=(J!=null)?J+"px":"";D.image.style.left=B.position.x+"px";D.image.style.top=B.position.y+"px"}this.contentDiv.style.left=this.padding.left+"px";this.contentDiv.style.top=this.padding.top+"px"}},CLASS_NAME:"OpenLayers.Popup.Framed"});OpenLayers.Projection=OpenLayers.Class({proj:null,projCode:null,initialize:function(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.Protocol.WFS.v1=OpenLayers.Class(OpenLayers.Protocol,{version:null,srsName:"EPSG:4326",featureType:null,featureNS:null,geometryName:"the_geom",schema:null,featurePrefix:"feature",formatOptions:null,readFormat:null,initialize:function(B){OpenLayers.Protocol.prototype.initialize.apply(this,[B]);if(!B.format){this.format=OpenLayers.Format.WFST(OpenLayers.Util.extend({version:this.version,featureType:this.featureType,featureNS:this.featureNS,featurePrefix:this.featurePrefix,geometryName:this.geometryName,srsName:this.srsName,schema:this.schema},this.formatOptions))}if(!this.featureNS&&this.featurePrefix){var A=this.format.readNode;this.format.readNode=function(C,D){if(!this.featureNS&&C.prefix==this.featurePrefix){this.featureNS=C.namespaceURI;this.setNamespace("feature",this.featureNS)}return A.apply(this,arguments)}}},destroy:function(){if(this.options&&!this.options.format){this.format.destroy()}this.format=null;OpenLayers.Protocol.prototype.destroy.apply(this)},read:function(B){OpenLayers.Protocol.prototype.read.apply(this,arguments);B=OpenLayers.Util.extend({},B);OpenLayers.Util.applyDefaults(B,this.options||{});var A=new OpenLayers.Protocol.Response({requestType:"read"});var C=OpenLayers.Format.XML.prototype.write.apply(this.format,[this.format.writeNode("wfs:GetFeature",B)]);A.priv=OpenLayers.Request.POST({url:B.url,callback:this.createCallback(this.handleRead,A,B),params:B.params,headers:B.headers,data:C});return A},handleRead:function(A,B){if(B.callback){var C=A.priv;if(C.status>=200&&C.status<300){A.features=this.parseFeatures(C);A.code=OpenLayers.Protocol.Response.SUCCESS}else{A.code=OpenLayers.Protocol.Response.FAILURE}B.callback.call(B.scope,A)}},parseFeatures:function(A){var B=A.responseXML;if(!B||!B.documentElement){B=A.responseText}if(!B||B.length<=0){return null}return(this.readFormat!==null)?this.readFormat.read(B):this.format.read(B)},commit:function(C,B){B=OpenLayers.Util.extend({},B);OpenLayers.Util.applyDefaults(B,this.options);var A=new OpenLayers.Protocol.Response({requestType:"commit",reqFeatures:C});A.priv=OpenLayers.Request.POST({url:B.url,data:this.format.write(C,B),callback:this.createCallback(this.handleCommit,A,B)});return A},handleCommit:function(A,B){if(B.callback){var C=A.priv;var D=C.responseXML;if(!D||!D.documentElement){D=C.responseText}var E=this.format.read(D)||{};A.insertIds=E.insertIds||[];A.code=(E.success)?OpenLayers.Protocol.Response.SUCCESS:OpenLayers.Protocol.Response.FAILURE;B.callback.call(B.scope,A)}},filterDelete:function(E,C){C=OpenLayers.Util.extend({},C);OpenLayers.Util.applyDefaults(C,this.options);var B=new OpenLayers.Protocol.Response({requestType:"commit"});var A=this.format.createElementNSPlus("wfs:Transaction",{attributes:{service:"WFS",version:this.version}});var D=this.format.createElementNSPlus("wfs:Delete",{attributes:{typeName:(C.featureNS?this.featurePrefix+":":"")+C.featureType}});if(C.featureNS){D.setAttribute("xmlns:"+this.featurePrefix,C.featureNS)}var G=this.format.writeNode("ogc:Filter",E);D.appendChild(G);A.appendChild(D);var F=OpenLayers.Format.XML.prototype.write.apply(this.format,[A]);return OpenLayers.Request.POST({url:this.url,callback:C.callback||function(){},data:F})},abort:function(A){if(A){A.priv.abort()}},CLASS_NAME:"OpenLayers.Protocol.WFS.v1"});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,symbolMetrics:null,isGecko:null,supportUse:null,initialize:function(A){if(!this.supported()){return }OpenLayers.Renderer.Elements.prototype.initialize.apply(this,arguments);this.translationParameters={x:0,y:0};this.supportUse=(navigator.userAgent.toLowerCase().indexOf("applewebkit/5")==-1);this.isGecko=(navigator.userAgent.toLowerCase().indexOf("gecko/")!=-1);this.symbolMetrics={}},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=this.supportUse===false?"svg":"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(O,R,B){R=R||O._style;B=B||O._options;var J=parseFloat(O.getAttributeNS(null,"r"));var I=1;var D;if(O._geometryClass=="OpenLayers.Geometry.Point"&&J){O.style.visibility="";if(R.graphic===false){O.style.visibility="hidden"}else{if(R.externalGraphic){D=this.getPosition(O);if(R.graphicTitle){O.setAttributeNS(null,"title",R.graphicTitle)}if(R.graphicWidth&&R.graphicHeight){O.setAttributeNS(null,"preserveAspectRatio","none")}var N=R.graphicWidth||R.graphicHeight;var L=R.graphicHeight||R.graphicWidth;N=N?N:R.pointRadius*2;L=L?L:R.pointRadius*2;var S=(R.graphicXOffset!=undefined)?R.graphicXOffset:-(0.5*N);var F=(R.graphicYOffset!=undefined)?R.graphicYOffset:-(0.5*L);var A=R.graphicOpacity||R.fillOpacity;O.setAttributeNS(null,"x",(D.x+S).toFixed());O.setAttributeNS(null,"y",(D.y+F).toFixed());O.setAttributeNS(null,"width",N);O.setAttributeNS(null,"height",L);O.setAttributeNS(this.xlinkns,"href",R.externalGraphic);O.setAttributeNS(null,"style","opacity: "+A)}else{if(this.isComplexSymbol(R.graphicName)){var C=R.pointRadius*3;var K=C*2;var M=this.importSymbol(R.graphicName);D=this.getPosition(O);I=this.symbolMetrics[M][0]*3/K;var G=O.parentNode;var H=O.nextSibling;if(G){G.removeChild(O)}if(this.supportUse===false){var E=document.getElementById(M);O.firstChild&&O.removeChild(O.firstChild);O.appendChild(E.firstChild.cloneNode(true));O.setAttributeNS(null,"viewBox",E.getAttributeNS(null,"viewBox"))}else{O.setAttributeNS(this.xlinkns,"href","#"+M)}O.setAttributeNS(null,"width",K);O.setAttributeNS(null,"height",K);O.setAttributeNS(null,"x",D.x-C);O.setAttributeNS(null,"y",D.y-C);if(H){G.insertBefore(O,H)}else{if(G){G.appendChild(O)}}}else{O.setAttributeNS(null,"r",R.pointRadius)}}}var Q=R.rotation;if((Q!==undefined||O._rotation!==undefined)&&D){O._rotation=Q;Q|=0;if(O.nodeName!=="svg"){O.setAttributeNS(null,"transform","rotate("+Q+" "+D.x+" "+D.y+")")}else{var P=this.symbolMetrics[M];O.firstChild.setAttributeNS(null,"transform","rotate("+R.rotation+" "+P[1]+" "+P[2]+")")}}}if(B.isFilled){O.setAttributeNS(null,"fill",R.fillColor);O.setAttributeNS(null,"fill-opacity",R.fillOpacity)}else{O.setAttributeNS(null,"fill","none")}if(B.isStroked){O.setAttributeNS(null,"stroke",R.strokeColor);O.setAttributeNS(null,"stroke-opacity",R.strokeOpacity);O.setAttributeNS(null,"stroke-width",R.strokeWidth*I);O.setAttributeNS(null,"stroke-linecap",R.strokeLinecap||"round");O.setAttributeNS(null,"stroke-linejoin","round");R.strokeDashstyle&&O.setAttributeNS(null,"stroke-dasharray",this.dashStyle(R,I))}else{O.setAttributeNS(null,"stroke","none")}if(R.pointerEvents){O.setAttributeNS(null,"pointer-events",R.pointerEvents)}if(R.cursor!=null){O.setAttributeNS(null,"cursor",R.cursor)}return O},dashStyle:function(C,B){var A=C.strokeWidth*B;var D=C.strokeDashstyle;switch(D){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 OpenLayers.String.trim(D).replace(/\s+/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,G){var F="";var H=true;var A=true;var C,I;for(var D=0,E=G.components.length;D<E;D++){F+=" M";C=this.getComponentsString(G.components[D].components," ");I=C.path;if(I){F+=" "+I;A=C.complete&&A}else{H=false}}F+=" z";if(H){B.setAttributeNS(null,"d",F);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(E,G){var F=null;var B=true;for(var D=0,A=G.components.length;D<A;D++){if((D%3)==0&&(D/3)==0){var C=this.getShortString(G.components[D]);if(!C){B=false}F="M "+C}else{if((D%3)==1){var C=this.getShortString(G.components[D]);if(!C){B=false}F+=" C "+C}else{var C=this.getShortString(G.components[D]);if(!C){B=false}F+=" "+C}}}F+=" Z";if(B){E.setAttributeNS(null,"d",F);return E}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);if(A.fontColor){G.setAttributeNS(null,"fill",A.fontColor)}if(A.fontOpacity){G.setAttributeNS(null,"opacity",A.fontOpacity)}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)}if(A.labelSelect===true){G.setAttributeNS(null,"pointer-events","visible");G._featureId=C;F._featureId=C;F._geometry=I;F._geometryClass=I.CLASS_NAME}else{G.setAttributeNS(null,"pointer-events","none")}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(D,C){var F=[];var A=true;var E=D.length;var I=[];var G,H;for(var B=0;B<E;B++){H=D[B];F.push(H);G=this.getShortString(H);if(G){I.push(G)}else{if(B>0){if(this.getShortString(D[B-1])){I.push(this.clipLine(D[B],D[B-1]))}}if(B<E-1){if(this.getShortString(D[B+1])){I.push(this.clipLine(D[B],D[B+1]))}}A=false}}return{path:I.join(C||","),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")}var G=this.nodeFactory(B,"symbol");var C=this.nodeFactory(null,"polygon");G.appendChild(C);var L=new OpenLayers.Bounds(Number.MAX_VALUE,Number.MAX_VALUE,0,0);var J=[];var I,H;for(var F=0;F<D.length;F=F+2){I=D[F];H=D[F+1];L.left=Math.min(L.left,I);L.bottom=Math.min(L.bottom,H);L.right=Math.max(L.right,I);L.top=Math.max(L.top,H);J.push(I,",",H)}C.setAttributeNS(null,"points",J.join(" "));var A=L.getWidth();var K=L.getHeight();var M=[L.left-A,L.bottom-K,A*3,K*3];G.setAttributeNS(null,"viewBox",M.join(" "));this.symbolMetrics[B]=[Math.max(A,K),L.getCenterLonLat().lon,L.getCenterLonLat().lat];this.defs.appendChild(G);return G.id},getFeatureIdFromEvent:function(A){var C=OpenLayers.Renderer.Elements.prototype.getFeatureIdFromEvent.apply(this,arguments);if(this.supportUse===false&&!C){var B=A.target;C=B.parentNode&&B!=this.rendererRoot&&B.parentNode._featureId}return C},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)},destroy:function(){OpenLayers.Renderer.Elements.prototype.destroy.apply(this,arguments)},supported:function(){return !!(document.namespaces)},setExtent:function(I,A){OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments);var C=this.getResolution();var B=(I.left/C)|0;var F=(I.top/C-this.size.h)|0;if(A||!this.offset){this.offset={x:B,y:F};B=0;F=0}else{B=B-this.offset.x;F=F-this.offset.y}var K=B+" "+F;this.root.coordorigin=K;var H=[this.root,this.vectorRoot,this.textRoot];var G;for(var D=0,E=H.length;D<E;++D){G=H[D];var J=this.size.w+" "+this.size.h;G.coordsize=J}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(E,B,Q,K){B=B||E._style;Q=Q||E._options;var C=B.fillColor;if(E._geometryClass==="OpenLayers.Geometry.Point"){if(B.externalGraphic){if(B.graphicTitle){E.title=B.graphicTitle}var D=B.graphicWidth||B.graphicHeight;var L=B.graphicHeight||B.graphicWidth;D=D?D:B.pointRadius*2;L=L?L:B.pointRadius*2;var G=this.getResolution();var I=(B.graphicXOffset!=undefined)?B.graphicXOffset:-(0.5*D);var F=(B.graphicYOffset!=undefined)?B.graphicYOffset:-(0.5*L);E.style.left=(((K.x/G-this.offset.x)+I)|0)+"px";E.style.top=(((K.y/G-this.offset.y)-(F+L))|0)+"px";E.style.width=D+"px";E.style.height=L+"px";E.style.flip="y";C="none";Q.isStroked=false}else{if(this.isComplexSymbol(B.graphicName)){var A=this.importSymbol(B.graphicName);E.path=A.path;E.coordorigin=A.left+","+A.bottom;var P=A.size;E.coordsize=P+","+P;this.drawCircle(E,K,B.pointRadius);E.style.flip="y"}else{this.drawCircle(E,K,B.pointRadius)}}}if(Q.isFilled){E.fillcolor=C}else{E.filled="false"}var J=E.getElementsByTagName("fill");var O=(J.length==0)?null:J[0];if(!Q.isFilled){if(O){E.removeChild(O)}}else{if(!O){O=this.createNode("olv:fill",E.id+"_fill")}O.opacity=B.fillOpacity;if(E._geometryClass==="OpenLayers.Geometry.Point"&&B.externalGraphic){if(B.graphicOpacity){O.opacity=B.graphicOpacity}O.src=B.externalGraphic;O.type="frame";if(!(B.graphicWidth&&B.graphicHeight)){O.aspect="atmost"}}if(O.parentNode!=E){E.appendChild(O)}}var N=B.rotation;if((N!==undefined||E._rotation!==undefined)){E._rotation=N;if(B.externalGraphic){this.graphicRotate(E,I,F,B);O.opacity=0}else{if(E._geometryClass==="OpenLayers.Geometry.Point"){E.style.rotation=N||0}}}var H=E.getElementsByTagName("stroke");var M=(H.length==0)?null:H[0];if(!Q.isStroked){E.stroked=false;if(M){M.on=false}}else{if(!M){M=this.createNode("olv:stroke",E.id+"_stroke");E.appendChild(M)}M.on=true;M.color=B.strokeColor;M.weight=B.strokeWidth+"px";M.opacity=B.strokeOpacity;M.endcap=B.strokeLinecap=="butt"?"flat":(B.strokeLinecap||"round");if(B.strokeDashstyle){M.dashstyle=this.dashStyle(B)}}if(B.cursor!="inherit"&&B.cursor!=null){E.style.cursor=B.cursor}return E},graphicRotate:function(N,R,E,Q){var Q=Q||N._style;var O=Q.rotation||0;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,E,Q)}},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 F=O*Math.PI/180;var H=Math.sin(F);var D=Math.cos(F);var G="progid:DXImageTransform.Microsoft.Matrix(M11="+D+",M12="+(-H)+",M21="+H+",M22="+D+",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,-E);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){A.style.visibility="visible";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)|0,(D.bottom/A-this.offset.y)|0,(D.right/A-this.offset.x)|0,(D.top/A-this.offset.y)|0);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=OpenLayers.Function.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)|0)-A)+"px";D.style.top=(((E.y/B-this.offset.y)|0)-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,J,G){this.setNodeDimension(B,J);var C=this.getResolution();var A=J.components.length;var E=new Array(A);var H,K,I;for(var F=0;F<A;F++){H=J.components[F];K=(H.x/C-this.offset.x)|0;I=(H.y/C-this.offset.y)|0;E[F]=" "+K+","+I+" l "}var D=(G)?" x e":" e";B.path="m"+E.join("")+D;return B},drawPolygon:function(B,J){this.setNodeDimension(B,J);var C=this.getResolution();var L=[];var F,E,D,H,A,G,K,I;for(D=0,H=J.components.length;D<H;D++){F=J.components[D];L.push("m");for(E=0,A=F.components.length;E<A;E++){G=F.components[E];K=(G.x/C-this.offset.x)|0;I=(G.y/C-this.offset.y)|0;L.push(" "+K+","+I);if(E==0){L.push(" l")}}L.push(" x ")}L.push("e");B.path=L.join("");return B},drawRectangle:function(B,C){var A=this.getResolution();B.style.left=((C.x/A-this.offset.x)|0)+"px";B.style.top=((C.y/A-this.offset.y)|0)+"px";B.style.width=((C.width/A)|0)+"px";B.style.height=((C.height/A)|0)+"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)|0)+"px";G.style.top=((H.y/C-this.offset.y)|0)+"px";G.style.flip="y";F.innerText=A.label;if(A.fontColor){F.style.color=A.fontColor}if(A.fontOpacity){F.style.filter="alpha(opacity="+(A.fontOpacity*100)+")"}if(A.fontFamily){F.style.fontFamily=A.fontFamily}if(A.fontSize){F.style.fontSize=A.fontSize}if(A.fontWeight){F.style.fontWeight=A.fontWeight}if(A.labelSelect===true){G._featureId=D;F._featureId=D;F._geometry=H;F._geometryClass=H.CLASS_NAME}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";if(E.length==1){E+="m"}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 I=[];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)|0;F=(D.y/B-this.offset.y)|0;if((C%3)==0&&(C/3)==0){I.push("m")}else{if((C%3)==1){I.push(" c")}}I.push(" "+H+","+F)}I.push(" x e");A.path=I.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")}var J=new OpenLayers.Bounds(Number.MAX_VALUE,Number.MAX_VALUE,0,0);var E=["m"];for(var F=0;F<C.length;F=F+2){var H=C[F];var G=C[F+1];J.left=Math.min(J.left,H);J.bottom=Math.min(J.bottom,G);J.right=Math.max(J.right,H);J.top=Math.max(J.top,G);E.push(H);E.push(G);if(F==0){E.push("l")}}E.push("x e");var K=E.join(" ");var I=(J.getWidth()-J.getHeight())/2;if(I>0){J.bottom=J.bottom-I;J.top=J.top+I}else{J.left=J.left+I;J.right=J.right-I}A={path:K,size:J.getWidth(),left:J.left,bottom:J.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.Tile=OpenLayers.Class({EVENT_TYPES:["loadstart","loadend","reload","unload"],events:null,id:null,layer:null,url:null,bounds:null,size:null,position:null,isLoading:false,initialize:function(D,A,E,B,C){this.layer=D;this.position=A.clone();this.bounds=E.clone();this.url=B;this.size=C.clone();this.id=OpenLayers.Util.createUniqueID("Tile_");this.events=new OpenLayers.Events(this,null,this.EVENT_TYPES)},unload:function(){if(this.isLoading){this.isLoading=false;this.events.triggerEvent("unload")}},destroy:function(){this.layer=null;this.bounds=null;this.size=null;this.position=null;this.events.destroy();this.events=null},clone:function(A){if(A==null){A=new OpenLayers.Tile(this.layer,this.position,this.bounds,this.url,this.size)}OpenLayers.Util.applyDefaults(A,this);return A},draw:function(){var A=this.layer.maxExtent;var B=(A&&this.bounds.intersectsBounds(A,false));this.shouldDraw=(B||this.layer.displayOutsideMaxExtent);this.clear();return this.shouldDraw},moveTo:function(B,A,C){if(C==null){C=true}this.bounds=B.clone();this.position=A.clone();if(C){this.draw()}},clear:function(){},getBoundsFromBaseLayer:function(A){var F=OpenLayers.i18n("reprojectDeprecated",{layerName:this.layer.name});OpenLayers.Console.warn(F);var D=this.layer.map.getLonLatFromLayerPx(A);var C=A.clone();C.x+=this.size.w;C.y+=this.size.h;var B=this.layer.map.getLonLatFromLayerPx(C);if(D.lon>B.lon){if(D.lon<0){D.lon=-180-(D.lon+180)}else{B.lon=180+B.lon+180}}var E=new OpenLayers.Bounds(D.lon,B.lat,B.lon,D.lat);return E},showTile:function(){if(this.shouldDraw){this.show()}},show:function(){},hide:function(){},CLASS_NAME:"OpenLayers.Tile"});OpenLayers.Control.MouseToolbar=OpenLayers.Class(OpenLayers.Control.MouseDefaults,{mode:null,buttons:null,direction:"vertical",buttonClicked:null,initialize:function(A,B){OpenLayers.Control.prototype.initialize.apply(this,arguments);this.position=new OpenLayers.Pixel(OpenLayers.Control.MouseToolbar.X,OpenLayers.Control.MouseToolbar.Y);if(A){this.position=A}if(B){this.direction=B}this.measureDivs=[]},destroy:function(){for(var B in this.buttons){var A=this.buttons[B];A.map=null;A.events.destroy()}OpenLayers.Control.MouseDefaults.prototype.destroy.apply(this,arguments)},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);OpenLayers.Control.MouseDefaults.prototype.draw.apply(this,arguments);this.buttons={};var B=new OpenLayers.Size(28,28);var A=new OpenLayers.Pixel(OpenLayers.Control.MouseToolbar.X,0);this._addButton("zoombox","drag-rectangle-off.png","drag-rectangle-on.png",A,B,"Shift->Drag to zoom to area");A=A.add((this.direction=="vertical"?0:B.w),(this.direction=="vertical"?B.h:0));this._addButton("pan","panning-hand-off.png","panning-hand-on.png",A,B,"Drag the map to pan.");A=A.add((this.direction=="vertical"?0:B.w),(this.direction=="vertical"?B.h:0));this.switchModeTo("pan");return this.div},_addButton:function(A,E,D,I,G,H){var F=OpenLayers.Util.getImagesLocation()+E;var C=OpenLayers.Util.getImagesLocation()+D;var B=OpenLayers.Util.createAlphaImageDiv("OpenLayers_Control_MouseToolbar_"+A,I,G,F,"absolute");this.div.appendChild(B);B.imgLocation=F;B.activeImgLocation=C;B.events=new OpenLayers.Events(this,B,null,true);B.events.on({mousedown:this.buttonDown,mouseup:this.buttonUp,dblclick:OpenLayers.Event.stop,scope:this});B.action=A;B.title=H;B.alt=H;B.map=this.map;this.buttons[A]=B;return B},buttonDown:function(A){if(!OpenLayers.Event.isLeftClick(A)){return }this.buttonClicked=A.element.action;OpenLayers.Event.stop(A)},buttonUp:function(A){if(!OpenLayers.Event.isLeftClick(A)){return }if(this.buttonClicked!=null){if(this.buttonClicked==A.element.action){this.switchModeTo(A.element.action)}OpenLayers.Event.stop(A);this.buttonClicked=null}},defaultDblClick:function(B){this.switchModeTo("pan");this.performedDrag=false;var A=this.map.getLonLatFromViewPortPx(B.xy);this.map.setCenter(A,this.map.zoom+1);OpenLayers.Event.stop(B);return false},defaultMouseDown:function(A){if(!OpenLayers.Event.isLeftClick(A)){return }this.mouseDragStart=A.xy.clone();this.performedDrag=false;this.startViaKeyboard=false;if(A.shiftKey&&this.mode!="zoombox"){this.switchModeTo("zoombox");this.startViaKeyboard=true}else{if(A.altKey&&this.mode!="measure"){this.switchModeTo("measure")}else{if(!this.mode){this.switchModeTo("pan")}}}switch(this.mode){case"zoombox":this.map.div.style.cursor="crosshair";this.zoomBox=OpenLayers.Util.createDiv("zoomBox",this.mouseDragStart,null,null,"absolute","2px solid red");this.zoomBox.style.backgroundColor="white";this.zoomBox.style.filter="alpha(opacity=50)";this.zoomBox.style.opacity="0.50";this.zoomBox.style.fontSize="1px";this.zoomBox.style.zIndex=this.map.Z_INDEX_BASE.Popup-1;this.map.viewPortDiv.appendChild(this.zoomBox);this.performedDrag=true;break;case"measure":var C="";if(this.measureStart){var B=this.map.getLonLatFromViewPortPx(this.mouseDragStart);C=OpenLayers.Util.distVincenty(this.measureStart,B);C=Math.round(C*100)/100;C=C+"km";this.measureStartBox=this.measureBox}this.measureStart=this.map.getLonLatFromViewPortPx(this.mouseDragStart);this.measureBox=OpenLayers.Util.createDiv(null,this.mouseDragStart.add(-2-parseInt(this.map.layerContainerDiv.style.left),-2-parseInt(this.map.layerContainerDiv.style.top)),null,null,"absolute");this.measureBox.style.width="4px";this.measureBox.style.height="4px";this.measureBox.style.fontSize="1px";this.measureBox.style.backgroundColor="red";this.measureBox.style.zIndex=this.map.Z_INDEX_BASE.Popup-1;this.map.layerContainerDiv.appendChild(this.measureBox);if(C){this.measureBoxDistance=OpenLayers.Util.createDiv(null,this.mouseDragStart.add(-2-parseInt(this.map.layerContainerDiv.style.left),2-parseInt(this.map.layerContainerDiv.style.top)),null,null,"absolute");this.measureBoxDistance.innerHTML=C;this.measureBoxDistance.style.zIndex=this.map.Z_INDEX_BASE.Popup-1;this.map.layerContainerDiv.appendChild(this.measureBoxDistance);this.measureDivs.push(this.measureBoxDistance)}this.measureBox.style.zIndex=this.map.Z_INDEX_BASE.Popup-1;this.map.layerContainerDiv.appendChild(this.measureBox);this.measureDivs.push(this.measureBox);break;default:this.map.div.style.cursor="move";break}document.onselectstart=OpenLayers.Function.False;OpenLayers.Event.stop(A)},switchModeTo:function(C){if(C!=this.mode){if(this.mode&&this.buttons[this.mode]){OpenLayers.Util.modifyAlphaImageDiv(this.buttons[this.mode],null,null,null,this.buttons[this.mode].imgLocation)}if(this.mode=="measure"&&C!="measure"){for(var B=0,A=this.measureDivs.length;B<A;B++){if(this.measureDivs[B]){this.map.layerContainerDiv.removeChild(this.measureDivs[B])}}this.measureDivs=[];this.measureStart=null}this.mode=C;if(this.buttons[C]){OpenLayers.Util.modifyAlphaImageDiv(this.buttons[C],null,null,null,this.buttons[C].activeImgLocation)}switch(this.mode){case"zoombox":this.map.div.style.cursor="crosshair";break;default:this.map.div.style.cursor="";break}}},leaveMode:function(){this.switchModeTo("pan")},defaultMouseMove:function(E){if(this.mouseDragStart!=null){switch(this.mode){case"zoombox":var D=Math.abs(this.mouseDragStart.x-E.xy.x);var B=Math.abs(this.mouseDragStart.y-E.xy.y);this.zoomBox.style.width=Math.max(1,D)+"px";this.zoomBox.style.height=Math.max(1,B)+"px";if(E.xy.x<this.mouseDragStart.x){this.zoomBox.style.left=E.xy.x+"px"}if(E.xy.y<this.mouseDragStart.y){this.zoomBox.style.top=E.xy.y+"px"}break;default:var D=this.mouseDragStart.x-E.xy.x;var B=this.mouseDragStart.y-E.xy.y;var F=this.map.getSize();var A=new OpenLayers.Pixel(F.w/2+D,F.h/2+B);var C=this.map.getLonLatFromViewPortPx(A);this.map.setCenter(C,null,true);this.mouseDragStart=E.xy.clone()}this.performedDrag=true}},defaultMouseUp:function(A){if(!OpenLayers.Event.isLeftClick(A)){return }switch(this.mode){case"zoombox":this.zoomBoxEnd(A);if(this.startViaKeyboard){this.leaveMode()}break;case"pan":if(this.performedDrag){this.map.setCenter(this.map.center)}}document.onselectstart=null;this.mouseDragStart=null;this.map.div.style.cursor="default"},defaultMouseOut:function(A){if(this.mouseDragStart!=null&&OpenLayers.Util.mouseLeft(A,this.map.div)){if(this.zoomBox){this.removeZoomBox();if(this.startViaKeyboard){this.leaveMode()}}this.mouseDragStart=null;this.map.div.style.cursor="default"}},defaultClick:function(A){if(this.performedDrag){this.performedDrag=false;return false}},CLASS_NAME:"OpenLayers.Control.MouseToolbar"});OpenLayers.Control.MouseToolbar.X=6;OpenLayers.Control.MouseToolbar.Y=300;OpenLayers.Control.NavigationHistory=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOGGLE,previous:null,previousOptions:null,next:null,nextOptions:null,limit:50,autoActivate:true,clearOnDeactivate:false,registry:null,nextStack:null,previousStack:null,listeners:null,restoring:false,initialize:function(A){OpenLayers.Control.prototype.initialize.apply(this,[A]);this.registry=OpenLayers.Util.extend({moveend:this.getState},this.registry);var B={trigger:OpenLayers.Function.bind(this.previousTrigger,this),displayClass:this.displayClass+" "+this.displayClass+"Previous"};OpenLayers.Util.extend(B,this.previousOptions);this.previous=new OpenLayers.Control.Button(B);var C={trigger:OpenLayers.Function.bind(this.nextTrigger,this),displayClass:this.displayClass+" "+this.displayClass+"Next"};OpenLayers.Util.extend(C,this.nextOptions);this.next=new OpenLayers.Control.Button(C);this.clear()},onPreviousChange:function(B,A){if(B&&!this.previous.active){this.previous.activate()}else{if(!B&&this.previous.active){this.previous.deactivate()}}},onNextChange:function(B,A){if(B&&!this.next.active){this.next.activate()}else{if(!B&&this.next.active){this.next.deactivate()}}},destroy:function(){OpenLayers.Control.prototype.destroy.apply(this);this.previous.destroy();this.next.destroy();this.deactivate();for(var A in this){this[A]=null}},setMap:function(A){this.map=A;this.next.setMap(A);this.previous.setMap(A)},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);this.next.draw();this.previous.draw()},previousTrigger:function(){var B=this.previousStack.shift();var A=this.previousStack.shift();if(A!=undefined){this.nextStack.unshift(B);this.previousStack.unshift(A);this.restoring=true;this.restore(A);this.restoring=false;this.onNextChange(this.nextStack[0],this.nextStack.length);this.onPreviousChange(this.previousStack[1],this.previousStack.length-1)}else{this.previousStack.unshift(B)}return A},nextTrigger:function(){var A=this.nextStack.shift();if(A!=undefined){this.previousStack.unshift(A);this.restoring=true;this.restore(A);this.restoring=false;this.onNextChange(this.nextStack[0],this.nextStack.length);this.onPreviousChange(this.previousStack[1],this.previousStack.length-1)}return A},clear:function(){this.previousStack=[];this.previous.deactivate();this.nextStack=[];this.next.deactivate()},getState:function(){return{center:this.map.getCenter(),resolution:this.map.getResolution(),projection:this.map.getProjectionObject(),units:this.map.getProjectionObject().getUnits()||this.map.units||this.map.baseLayer.units}},restore:function(E){var A,D;if(this.map.getProjectionObject()==E.projection){D=this.map.getZoomForResolution(E.resolution);A=E.center}else{A=E.center.clone();A.transform(E.projection,this.map.getProjectionObject());var F=E.units;var B=this.map.getProjectionObject().getUnits()||this.map.units||this.map.baseLayer.units;var C=F&&B?OpenLayers.INCHES_PER_UNIT[F]/OpenLayers.INCHES_PER_UNIT[B]:1;D=this.map.getZoomForResolution(C*E.resolution)}this.map.setCenter(A,D)},setListeners:function(){this.listeners={};for(var A in this.registry){this.listeners[A]=OpenLayers.Function.bind(function(){if(!this.restoring){var B=this.registry[A].apply(this,arguments);this.previousStack.unshift(B);if(this.previousStack.length>1){this.onPreviousChange(this.previousStack[1],this.previousStack.length-1)}if(this.previousStack.length>(this.limit+1)){this.previousStack.pop()}if(this.nextStack.length>0){this.nextStack=[];this.onNextChange(null,0)}}return true},this)}},activate:function(){var A=false;if(this.map){if(OpenLayers.Control.prototype.activate.apply(this)){if(this.listeners==null){this.setListeners()}for(var B in this.listeners){this.map.events.register(B,this,this.listeners[B])}A=true;if(this.previousStack.length==0){this.initStack()}}}return A},initStack:function(){if(this.map.getCenter()){this.listeners.moveend()}},deactivate:function(){var B=false;if(this.map){if(OpenLayers.Control.prototype.deactivate.apply(this)){for(var A in this.listeners){this.map.events.unregister(A,this,this.listeners[A])}if(this.clearOnDeactivate){this.clear()}B=true}}return B},CLASS_NAME:"OpenLayers.Control.NavigationHistory"});OpenLayers.Control.PanPanel=OpenLayers.Class(OpenLayers.Control.Panel,{slideFactor:50,initialize:function(A){OpenLayers.Control.Panel.prototype.initialize.apply(this,[A]);this.addControls([new OpenLayers.Control.Pan(OpenLayers.Control.Pan.NORTH,{slideFactor:this.slideFactor}),new OpenLayers.Control.Pan(OpenLayers.Control.Pan.SOUTH,{slideFactor:this.slideFactor}),new OpenLayers.Control.Pan(OpenLayers.Control.Pan.EAST,{slideFactor:this.slideFactor}),new OpenLayers.Control.Pan(OpenLayers.Control.Pan.WEST,{slideFactor:this.slideFactor})])},CLASS_NAME:"OpenLayers.Control.PanPanel"});OpenLayers.Control.PanZoomBar=OpenLayers.Class(OpenLayers.Control.PanZoom,{zoomStopWidth:18,zoomStopHeight:11,slider:null,sliderEvents:null,zoombarDiv:null,divEvents:null,zoomWorldIcon:false,forceFixedZoomLevel:false,mouseDragStart:null,zoomStart:null,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);delete this.mouseDragStart;delete this.zoomStart},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.forceFixedZoomLevel||!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.mouseDragStart){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.forceFixedZoomLevel&&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.mouseDragStart=null;this.zoomStart=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.Control.Permalink=OpenLayers.Class(OpenLayers.Control,{argParserClass:OpenLayers.Control.ArgParser,element:null,base:"",displayProjection:null,initialize:function(B,C,A){OpenLayers.Control.prototype.initialize.apply(this,[A]);this.element=OpenLayers.Util.getElement(B);this.base=C||document.location.href},destroy:function(){if(this.element.parentNode==this.div){this.div.removeChild(this.element)}this.element=null;this.map.events.unregister("moveend",this,this.updateLink);OpenLayers.Control.prototype.destroy.apply(this,arguments)},setMap:function(D){OpenLayers.Control.prototype.setMap.apply(this,arguments);for(var B=0,A=this.map.controls.length;B<A;B++){var C=this.map.controls[B];if(C.CLASS_NAME==this.argParserClass.CLASS_NAME){if(C.displayProjection!=this.displayProjection){this.displayProjection=C.displayProjection}break}}if(B==this.map.controls.length){this.map.addControl(new this.argParserClass({displayProjection:this.displayProjection}))}},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.element){this.div.className=this.displayClass;this.element=document.createElement("a");this.element.innerHTML=OpenLayers.i18n("permalink");this.element.href="";this.div.appendChild(this.element)}this.map.events.on({moveend:this.updateLink,changelayer:this.updateLink,changebaselayer:this.updateLink,scope:this});this.updateLink();return this.div},updateLink:function(){var A=this.base;if(A.indexOf("?")!=-1){A=A.substring(0,A.indexOf("?"))}A+="?"+OpenLayers.Util.getParameterString(this.createParams());this.element.href=A},createParams:function(A,J,E){A=A||this.map.getCenter();var D=OpenLayers.Util.getParameters(this.base);if(A){D.zoom=J||this.map.getZoom();var I=A.lat;var B=A.lon;if(this.displayProjection){var C=OpenLayers.Projection.transform({x:B,y:I},this.map.getProjectionObject(),this.displayProjection);B=C.x;I=C.y}D.lat=Math.round(I*100000)/100000;D.lon=Math.round(B*100000)/100000;E=E||this.map.layers;D.layers="";for(var F=0,H=E.length;F<H;F++){var G=E[F];if(G.isBaseLayer){D.layers+=(G==this.map.baseLayer)?"B":"0"}else{D.layers+=(G.getVisibility())?"T":"F"}}}return D},CLASS_NAME:"OpenLayers.Control.Permalink"});OpenLayers.Control.ZoomPanel=OpenLayers.Class(OpenLayers.Control.Panel,{initialize:function(A){OpenLayers.Control.Panel.prototype.initialize.apply(this,[A]);this.addControls([new OpenLayers.Control.ZoomIn(),new OpenLayers.Control.ZoomToMaxExtent(),new OpenLayers.Control.ZoomOut()])},CLASS_NAME:"OpenLayers.Control.ZoomPanel"});OpenLayers.Format.CSWGetDomain=function(B){B=OpenLayers.Util.applyDefaults(B,OpenLayers.Format.CSWGetDomain.DEFAULTS);var A=OpenLayers.Format.CSWGetDomain["v"+B.version.replace(/\./g,"_")];if(!A){throw"Unsupported CSWGetDomain version: "+B.version}return new A(B)};OpenLayers.Format.CSWGetDomain.DEFAULTS={version:"2.0.2"};OpenLayers.Format.CSWGetRecords=function(B){B=OpenLayers.Util.applyDefaults(B,OpenLayers.Format.CSWGetRecords.DEFAULTS);var A=OpenLayers.Format.CSWGetRecords["v"+B.version.replace(/\./g,"_")];if(!A){throw"Unsupported CSWGetRecords version: "+B.version}return new A(B)};OpenLayers.Format.CSWGetRecords.DEFAULTS={version:"2.0.2"};OpenLayers.Format.JSON=OpenLayers.Class(OpenLayers.Format,{indent:"    ",space:" ",newline:"\n",level:0,pretty:false,initialize:function(A){OpenLayers.Format.prototype.initialize.apply(this,[A])},read:function(json,filter){try{if(/^[\],:{}\s]*$/.test(json.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){var object=eval("("+json+")");if(typeof filter==="function"){function walk(k,v){if(v&&typeof v==="object"){for(var i in v){if(v.hasOwnProperty(i)){v[i]=walk(i,v[i])}}}return filter(k,v)}object=walk("",object)}if(this.keepData){this.data=object}return object}}catch(e){}return null},write:function(E,C){this.pretty=!!C;var A=null;var B=typeof E;if(this.serialize[B]){try{A=this.serialize[B].apply(this,[E])}catch(D){OpenLayers.Console.error("Trouble serializing: "+D)}}return A},writeIndent:function(){var B=[];if(this.pretty){for(var A=0;A<this.level;++A){B.push(this.indent)}}return B.join("")},writeNewline:function(){return(this.pretty)?this.newline:""},writeSpace:function(){return(this.pretty)?this.space:""},serialize:{object:function(C){if(C==null){return"null"}if(C.constructor==Date){return this.serialize.date.apply(this,[C])}if(C.constructor==Array){return this.serialize.array.apply(this,[C])}var F=["{"];this.level+=1;var D,B,E;var A=false;for(D in C){if(C.hasOwnProperty(D)){B=OpenLayers.Format.JSON.prototype.write.apply(this,[D,this.pretty]);E=OpenLayers.Format.JSON.prototype.write.apply(this,[C[D],this.pretty]);if(B!=null&&E!=null){if(A){F.push(",")}F.push(this.writeNewline(),this.writeIndent(),B,":",this.writeSpace(),E);A=true}}}this.level-=1;F.push(this.writeNewline(),this.writeIndent(),"}");return F.join("")},array:function(E){var C;var D=["["];this.level+=1;for(var B=0,A=E.length;B<A;++B){C=OpenLayers.Format.JSON.prototype.write.apply(this,[E[B],this.pretty]);if(C!=null){if(B>0){D.push(",")}D.push(this.writeNewline(),this.writeIndent(),C)}}this.level-=1;D.push(this.writeNewline(),this.writeIndent(),"]");return D.join("")},string:function(B){var A={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};if(/["\\\x00-\x1f]/.test(B)){return'"'+B.replace(/([\x00-\x1f\\"])/g,function(D,C){var E=A[C];if(E){return E}E=C.charCodeAt();return"\\u00"+Math.floor(E/16).toString(16)+(E%16).toString(16)})+'"'}return'"'+B+'"'},number:function(A){return isFinite(A)?String(A):"null"},"boolean":function(A){return String(A)},date:function(A){function B(C){return(C<10)?"0"+C:C}return'"'+A.getFullYear()+"-"+B(A.getMonth()+1)+"-"+B(A.getDate())+"T"+B(A.getHours())+":"+B(A.getMinutes())+":"+B(A.getSeconds())+'"'}},CLASS_NAME:"OpenLayers.Format.JSON"});OpenLayers.Format.WFST=function(B){B=OpenLayers.Util.applyDefaults(B,OpenLayers.Format.WFST.DEFAULTS);var A=OpenLayers.Format.WFST["v"+B.version.replace(/\./g,"_")];if(!A){throw"Unsupported WFST version: "+B.version}return new A(B)};OpenLayers.Format.WFST.DEFAULTS={version:"1.0.0"};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(typeof B!=="string"){B=String(B)}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 I,F;for(var G=0,H=B.length;G<H;++G){I=B[G];F=(I.prefix)?(I.prefix+":"+C):C;if((C=="*")||(F==I.nodeName)){if((D=="*")||(D==I.namespaceURI)){A.push(I)}}}}return A},getAttributeNodeNS:function(C,B,A){var I=null;if(C.getAttributeNodeNS){I=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){I=H;break}}}}return I},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){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[C.namespaceURI?this.namespaceAlias[C.namespaceURI]:this.defaultPrefix];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(D,B,A){OpenLayers.Util.extend(this,A);this.control=D;this.callbacks=B;var C=this.map||D.map;if(C){this.setMap(C)}this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")},setMap:function(A){this.map=A},checkModifiers:function(A){if(this.keyMask==null){return true}var B=(A.shiftKey?OpenLayers.Handler.MOD_SHIFT:0)|(A.ctrlKey?OpenLayers.Handler.MOD_CTRL:0)|(A.altKey?OpenLayers.Handler.MOD_ALT:0);return(B==this.keyMask)},activate:function(){if(this.active){return false}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.layers=[];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.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.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)}}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);if(D&&D.layers){this.addLayers(D.layers);if(D.center){this.setCenter(D.center,D.zoom)}}},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}if(this.panTween){this.panTween.stop();this.panTween=null}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}if(this.events.triggerEvent("preaddlayer",{layer:C})===false){return }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(C){if(C!=this.baseLayer){if(OpenLayers.Util.indexOf(this.layers,C)!=-1){var A=this.getCenter();var D=OpenLayers.Util.getResolutionFromScale(this.getScale(),C.units);if(this.baseLayer!=null&&!this.allOverlays){this.baseLayer.setVisibility(false)}this.baseLayer=C;this.viewRequestID++;if(!this.allOverlays||this.baseLayer.visibility){this.baseLayer.setVisibility(true)}if(A!=null){var B=this.getZoomForResolution(D||this.resolution,true);this.setCenter(A,B,false,true)}this.events.triggerEvent("changebaselayer",{layer:this.baseLayer})}}},addControl:function(B,A){this.controls.push(B);this.addControlToMap(B,A)},addControls:function(B,G){var E=(arguments.length===1)?[]:G;for(var D=0,A=B.length;D<A;D++){var F=B[D];var C=(E[D])?E[D]:null;this.addControl(F,C)}},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)}}if(B.autoActivate){B.activate()}},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(){var C=this.getCurrentSize();if(C&&!isNaN(C.h)&&!isNaN(C.w)){this.events.clearMouseCache();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()}var A=this.getCenter();if(this.baseLayer!=null&&A!=null){var E=this.getZoom();this.zoom=null;this.setCenter(A,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)){A.w=this.div.offsetWidth;A.h=this.div.offsetHeight}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,M,P){if(!P){P={}}if(M!=null){M=parseFloat(M);if(!this.fractionalZoom){M=Math.round(M)}}var L=P.dragging;var C=P.forceZoomChange;var H=P.noEvent;if(this.panTween&&P.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(M==null){M=this.getZoom()}var D=this.getResolutionForZoom(M);var N=this.calculateBounds(G,D);if(!this.restrictedExtent.containsBounds(N)){var O=this.restrictedExtent.getCenterLonLat();if(N.getWidth()>this.restrictedExtent.getWidth()){G=new OpenLayers.LonLat(O.lon,G.lat)}else{if(N.left<this.restrictedExtent.left){G=G.add(this.restrictedExtent.left-N.left,0)}else{if(N.right>this.restrictedExtent.right){G=G.add(this.restrictedExtent.right-N.right,0)}}}if(N.getHeight()>this.restrictedExtent.getHeight()){G=new OpenLayers.LonLat(G.lon,O.lat)}else{if(N.bottom<this.restrictedExtent.bottom){G=G.add(0,this.restrictedExtent.bottom-N.bottom)}else{if(N.top>this.restrictedExtent.top){G=G.add(0,this.restrictedExtent.top-N.top)}}}}}var B=C||((this.isValidZoomLevel(M))&&(M!=this.getZoom()));var E=(this.isValidLonLat(G))&&(!G.equals(this.center));if(B||E||!L){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=M;this.resolution=this.getResolutionForZoom(M);this.viewRequestID++}var A=this.getExtent();if(this.baseLayer.visibility){this.baseLayer.moveTo(A,B,L);if(L){this.baseLayer.events.triggerEvent("move")}else{this.baseLayer.events.triggerEvent("moveend",{zoomChanged:B})}}A=this.baseLayer.getExtent();for(var F=0,J=this.layers.length;F<J;F++){var I=this.layers[F];if(I!==this.baseLayer&&!I.isBaseLayer){var K=I.calculateInRange();if(I.inRange!=K){I.inRange=K;if(!K){I.display(false)}this.events.triggerEvent("changelayer",{layer:I,property:"visibility"})}if(K&&I.visibility){I.moveTo(A,B,L);if(L){I.events.triggerEvent("move")}else{I.events.triggerEvent("moveend",{zoomChanged:B})}}}}if(B){for(var F=0,J=this.popups.length;F<J;F++){this.popups[F].updatePosition()}}this.events.triggerEvent("move");if(B){this.events.triggerEvent("zoomend")}}if(!L&&!H){this.events.triggerEvent("moveend")}this.dragging=!!L},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()}else{if(this.allOverlays===true&&this.layers.length>0){A=this.layers[0].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},getGeodesicPixelSize:function(G){var D=G?this.getLonLatFromPixel(G):(this.getCenter()||new OpenLayers.LonLat(0,0));var E=this.getResolution();var C=D.add(-E/2,0);var I=D.add(E/2,0);var B=D.add(0,-E/2);var F=D.add(0,E/2);var H=new OpenLayers.Projection("EPSG:4326");var A=this.getProjectionObject()||H;if(!A.equals(H)){C.transform(A,H);I.transform(A,H);B.transform(A,H);F.transform(A,H)}return new OpenLayers.Size(OpenLayers.Util.distVincenty(C,I),OpenLayers.Util.distVincenty(B,F))},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.Popup.FramedCloud=OpenLayers.Class(OpenLayers.Popup.Framed,{contentDisplayClass:"olFramedCloudPopupContent",autoSize:true,panMapIfOutOfView:true,imageSize:new OpenLayers.Size(1276,736),isAlphaImage:false,fixedRelativePosition:false,positionBlocks:{tl:{offset:new OpenLayers.Pixel(44,0),padding:new OpenLayers.Bounds(8,40,8,9),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,51,22,0),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,"auto"),anchor:new OpenLayers.Bounds(null,50,0,0),position:new OpenLayers.Pixel(-1238,0)},{size:new OpenLayers.Size("auto",19),anchor:new OpenLayers.Bounds(0,32,22,null),position:new OpenLayers.Pixel(0,-631)},{size:new OpenLayers.Size(22,18),anchor:new OpenLayers.Bounds(null,32,0,null),position:new OpenLayers.Pixel(-1238,-632)},{size:new OpenLayers.Size(81,35),anchor:new OpenLayers.Bounds(null,0,0,null),position:new OpenLayers.Pixel(0,-688)}]},tr:{offset:new OpenLayers.Pixel(-45,0),padding:new OpenLayers.Bounds(8,40,8,9),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,51,22,0),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,"auto"),anchor:new OpenLayers.Bounds(null,50,0,0),position:new OpenLayers.Pixel(-1238,0)},{size:new OpenLayers.Size("auto",19),anchor:new OpenLayers.Bounds(0,32,22,null),position:new OpenLayers.Pixel(0,-631)},{size:new OpenLayers.Size(22,19),anchor:new OpenLayers.Bounds(null,32,0,null),position:new OpenLayers.Pixel(-1238,-631)},{size:new OpenLayers.Size(81,35),anchor:new OpenLayers.Bounds(0,0,null,null),position:new OpenLayers.Pixel(-215,-687)}]},bl:{offset:new OpenLayers.Pixel(45,0),padding:new OpenLayers.Bounds(8,9,8,40),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,21,22,32),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,"auto"),anchor:new OpenLayers.Bounds(null,21,0,32),position:new OpenLayers.Pixel(-1238,0)},{size:new OpenLayers.Size("auto",21),anchor:new OpenLayers.Bounds(0,0,22,null),position:new OpenLayers.Pixel(0,-629)},{size:new OpenLayers.Size(22,21),anchor:new OpenLayers.Bounds(null,0,0,null),position:new OpenLayers.Pixel(-1238,-629)},{size:new OpenLayers.Size(81,33),anchor:new OpenLayers.Bounds(null,null,0,0),position:new OpenLayers.Pixel(-101,-674)}]},br:{offset:new OpenLayers.Pixel(-44,0),padding:new OpenLayers.Bounds(8,9,8,40),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,21,22,32),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,"auto"),anchor:new OpenLayers.Bounds(null,21,0,32),position:new OpenLayers.Pixel(-1238,0)},{size:new OpenLayers.Size("auto",21),anchor:new OpenLayers.Bounds(0,0,22,null),position:new OpenLayers.Pixel(0,-629)},{size:new OpenLayers.Size(22,21),anchor:new OpenLayers.Bounds(null,0,0,null),position:new OpenLayers.Pixel(-1238,-629)},{size:new OpenLayers.Size(81,33),anchor:new OpenLayers.Bounds(0,null,null,0),position:new OpenLayers.Pixel(-311,-674)}]}},minSize:new OpenLayers.Size(105,10),maxSize:new OpenLayers.Size(1200,660),initialize:function(G,C,F,B,A,E,D){this.imageSrc=OpenLayers.Util.getImagesLocation()+"cloud-popup-relative.png";OpenLayers.Popup.Framed.prototype.initialize.apply(this,arguments);this.contentDiv.className=this.contentDisplayClass},destroy:function(){OpenLayers.Popup.Framed.prototype.destroy.apply(this,arguments)},CLASS_NAME:"OpenLayers.Popup.FramedCloud"});OpenLayers.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(B){var E=OpenLayers.Util.extend(this.DEFAULT_CONFIG,{proxy:OpenLayers.ProxyHost});B=OpenLayers.Util.applyDefaults(B,E);var D=new OpenLayers.Request.XMLHttpRequest();var A=B.url;if(B.params){var C=OpenLayers.Util.getParameterString(B.params);if(C.length>0){var G=(A.indexOf("?")>-1)?"&":"?";A+=G+C}}if(B.proxy&&(A.indexOf("http")==0)){if(typeof B.proxy=="function"){A=B.proxy(A)}else{A=B.proxy+encodeURIComponent(A)}}D.open(B.method,A,B.async,B.user,B.password);for(var F in B.headers){D.setRequestHeader(F,B.headers[F])}var I=this.events;var H=this;D.onreadystatechange=function(){if(D.readyState==OpenLayers.Request.XMLHttpRequest.DONE){var J=I.triggerEvent("complete",{request:D,config:B,requestUrl:A});if(J!==false){H.runCallbacks({request:D,config:B,requestUrl:A})}}};if(B.async===false){D.send(B.data)}else{window.setTimeout(function(){if(D._aborted!==true){D.send(B.data)}},0)}return D},runCallbacks:function(D){var E=D.request;var C=D.config;var A=(C.scope)?OpenLayers.Function.bind(C.callback,C.scope):C.callback;var F;if(C.success){F=(C.scope)?OpenLayers.Function.bind(C.success,C.scope):C.success}var B;if(C.failure){B=(C.scope)?OpenLayers.Function.bind(C.failure,C.scope):C.failure}A(E);if(!E.status||(E.status>=200&&E.status<300)){this.events.triggerEvent("success",D);if(F){F(E)}}if(E.status&&(E.status<200||E.status>=300)){this.events.triggerEvent("failure",D);if(B){B(E)}}},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.Tile.Image=OpenLayers.Class(OpenLayers.Tile,{url:null,imgDiv:null,frame:null,layerAlphaHack:null,isBackBuffer:false,lastRatio:1,isFirstDraw:true,backBufferTile:null,initialize:function(D,A,E,B,C){OpenLayers.Tile.prototype.initialize.apply(this,arguments);this.url=B;this.frame=document.createElement("div");this.frame.style.overflow="hidden";this.frame.style.position="absolute";this.layerAlphaHack=this.layer.alpha&&OpenLayers.Util.alphaHack()},destroy:function(){if(this.imgDiv!=null){if(this.layerAlphaHack){OpenLayers.Event.stopObservingElement(this.imgDiv.childNodes[0])}OpenLayers.Event.stopObservingElement(this.imgDiv);if(this.imgDiv.parentNode==this.frame){this.frame.removeChild(this.imgDiv);this.imgDiv.map=null}this.imgDiv.urls=null;this.imgDiv.src=OpenLayers.Util.getImagesLocation()+"blank.gif"}this.imgDiv=null;if((this.frame!=null)&&(this.frame.parentNode==this.layer.div)){this.layer.div.removeChild(this.frame)}this.frame=null;if(this.backBufferTile){this.backBufferTile.destroy();this.backBufferTile=null}this.layer.events.unregister("loadend",this,this.resetBackBuffer);OpenLayers.Tile.prototype.destroy.apply(this,arguments)},clone:function(A){if(A==null){A=new OpenLayers.Tile.Image(this.layer,this.position,this.bounds,this.url,this.size)}A=OpenLayers.Tile.prototype.clone.apply(this,[A]);A.imgDiv=null;return A},draw:function(){if(this.layer!=this.layer.map.baseLayer&&this.layer.reproject){this.bounds=this.getBoundsFromBaseLayer(this.position)}var A=OpenLayers.Tile.prototype.draw.apply(this,arguments);if((OpenLayers.Util.indexOf(this.layer.SUPPORTED_TRANSITIONS,this.layer.transitionEffect)!=-1)||this.layer.singleTile){if(A){if(!this.backBufferTile){this.backBufferTile=this.clone();this.backBufferTile.hide();this.backBufferTile.isBackBuffer=true;this.events.register("loadend",this,this.resetBackBuffer);this.layer.events.register("loadend",this,this.resetBackBuffer)}this.startTransition()}else{if(this.backBufferTile){this.backBufferTile.clear()}}}else{if(A&&this.isFirstDraw){this.events.register("loadend",this,this.showTile);this.isFirstDraw=false}}if(!A){return false}if(this.isLoading){this.events.triggerEvent("reload")}else{this.isLoading=true;this.events.triggerEvent("loadstart")}return this.renderTile()},resetBackBuffer:function(){this.showTile();if(this.backBufferTile&&(this.isFirstDraw||!this.layer.numLoadingTiles)){this.isFirstDraw=false;var A=this.layer.maxExtent;var B=(A&&this.bounds.intersectsBounds(A,false));if(B){this.backBufferTile.position=this.position;this.backBufferTile.bounds=this.bounds;this.backBufferTile.size=this.size;this.backBufferTile.imageSize=this.layer.getImageSize(this.bounds)||this.size;this.backBufferTile.imageOffset=this.layer.imageOffset;this.backBufferTile.resolution=this.layer.getResolution();this.backBufferTile.renderTile()}this.backBufferTile.hide()}},renderTile:function(){if(this.imgDiv==null){this.initImgDiv()}this.imgDiv.viewRequestID=this.layer.map.viewRequestID;if(this.layer.async){this.layer.getURLasync(this.bounds,this,"url",this.positionImage)}else{if(this.layer.url instanceof Array){this.imgDiv.urls=this.layer.url.slice()}this.url=this.layer.getURL(this.bounds);this.positionImage()}return true},positionImage:function(){if(this.layer===null){return }OpenLayers.Util.modifyDOMElement(this.frame,null,this.position,this.size);var A=this.layer.getImageSize(this.bounds);if(this.layerAlphaHack){OpenLayers.Util.modifyAlphaImageDiv(this.imgDiv,null,null,A,this.url)}else{OpenLayers.Util.modifyDOMElement(this.imgDiv,null,null,A);this.imgDiv.src=this.url}},clear:function(){if(this.imgDiv){this.hide();if(OpenLayers.Tile.Image.useBlankTile){this.imgDiv.src=OpenLayers.Util.getImagesLocation()+"blank.gif"}}},initImgDiv:function(){var D=this.layer.imageOffset;var B=this.layer.getImageSize(this.bounds);if(this.layerAlphaHack){this.imgDiv=OpenLayers.Util.createAlphaImageDiv(null,D,B,null,"relative",null,null,null,true)}else{this.imgDiv=OpenLayers.Util.createImage(null,D,B,null,"relative",null,null,true)}this.imgDiv.className="olTileImage";this.frame.style.zIndex=this.isBackBuffer?0:1;this.frame.appendChild(this.imgDiv);this.layer.div.appendChild(this.frame);if(this.layer.opacity!=null){OpenLayers.Util.modifyDOMElement(this.imgDiv,null,null,null,null,null,null,this.layer.opacity)}this.imgDiv.map=this.layer.map;var C=function(){if(this.isLoading){this.isLoading=false;this.events.triggerEvent("loadend")}};if(this.layerAlphaHack){OpenLayers.Event.observe(this.imgDiv.childNodes[0],"load",OpenLayers.Function.bind(C,this))}else{OpenLayers.Event.observe(this.imgDiv,"load",OpenLayers.Function.bind(C,this))}var A=function(){if(this.imgDiv._attempts>OpenLayers.IMAGE_RELOAD_ATTEMPTS){C.call(this)}};OpenLayers.Event.observe(this.imgDiv,"error",OpenLayers.Function.bind(A,this))},checkImgURL:function(){if(this.layer){var A=this.layerAlphaHack?this.imgDiv.firstChild.src:this.imgDiv.src;if(!OpenLayers.Util.isEquivalentUrl(A,this.url)){this.hide()}}},startTransition:function(){if(!this.backBufferTile||!this.backBufferTile.imgDiv){return }var D=1;if(this.backBufferTile.resolution){D=this.backBufferTile.resolution/this.layer.getResolution()}if(D!=this.lastRatio){if(this.layer.transitionEffect=="resize"){var C=new OpenLayers.LonLat(this.backBufferTile.bounds.left,this.backBufferTile.bounds.top);var B=new OpenLayers.Size(this.backBufferTile.size.w*D,this.backBufferTile.size.h*D);var A=this.layer.map.getLayerPxFromLonLat(C);OpenLayers.Util.modifyDOMElement(this.backBufferTile.frame,null,A,B);var E=this.backBufferTile.imageSize;E=new OpenLayers.Size(E.w*D,E.h*D);var F=this.backBufferTile.imageOffset;if(F){F=new OpenLayers.Pixel(F.x*D,F.y*D)}OpenLayers.Util.modifyDOMElement(this.backBufferTile.imgDiv,null,F,E);this.backBufferTile.show()}}else{if(this.layer.singleTile){this.backBufferTile.show()}else{this.backBufferTile.hide()}}this.lastRatio=D},show:function(){this.frame.style.display="";if(OpenLayers.Util.indexOf(this.layer.SUPPORTED_TRANSITIONS,this.layer.transitionEffect)!=-1){if(navigator.userAgent.toLowerCase().indexOf("gecko")!=-1){this.frame.scrollLeft=this.frame.scrollLeft}}},hide:function(){this.frame.style.display="none"},CLASS_NAME:"OpenLayers.Tile.Image"});OpenLayers.Tile.Image.useBlankTile=(OpenLayers.Util.getBrowserName()=="safari"||OpenLayers.Util.getBrowserName()=="opera");OpenLayers.Control.OverviewMap=OpenLayers.Class(OpenLayers.Control,{element:null,ovmap:null,size:new OpenLayers.Size(180,90),layers:null,minRectSize:15,minRectDisplayClass:"RectReplacement",minRatio:8,maxRatio:32,mapOptions:null,autoPan:false,handlers:null,resolutionFactor:1,maximized:false,initialize:function(A){this.layers=[];this.handlers={};OpenLayers.Control.prototype.initialize.apply(this,[A])},destroy:function(){if(!this.mapDiv){return }if(this.handlers.click){this.handlers.click.destroy()}if(this.handlers.drag){this.handlers.drag.destroy()}this.mapDiv.removeChild(this.extentRectangle);this.extentRectangle=null;if(this.rectEvents){this.rectEvents.destroy();this.rectEvents=null}if(this.ovmap){this.ovmap.destroy();this.ovmap=null}this.element.removeChild(this.mapDiv);this.mapDiv=null;this.div.removeChild(this.element);this.element=null;if(this.maximizeDiv){OpenLayers.Event.stopObservingElement(this.maximizeDiv);this.div.removeChild(this.maximizeDiv);this.maximizeDiv=null}if(this.minimizeDiv){OpenLayers.Event.stopObservingElement(this.minimizeDiv);this.div.removeChild(this.minimizeDiv);this.minimizeDiv=null}this.map.events.un({moveend:this.update,changebaselayer:this.baseLayerDraw,scope:this});OpenLayers.Control.prototype.destroy.apply(this,arguments)},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!(this.layers.length>0)){if(this.map.baseLayer){var D=this.map.baseLayer.clone();this.layers=[D]}else{this.map.events.register("changebaselayer",this,this.baseLayerDraw);return this.div}}this.element=document.createElement("div");this.element.className=this.displayClass+"Element";this.element.style.display="none";this.mapDiv=document.createElement("div");this.mapDiv.style.width=this.size.w+"px";this.mapDiv.style.height=this.size.h+"px";this.mapDiv.style.position="relative";this.mapDiv.style.overflow="hidden";this.mapDiv.id=OpenLayers.Util.createUniqueID("overviewMap");this.extentRectangle=document.createElement("div");this.extentRectangle.style.position="absolute";this.extentRectangle.style.zIndex=1000;this.extentRectangle.className=this.displayClass+"ExtentRectangle";this.mapDiv.appendChild(this.extentRectangle);this.element.appendChild(this.mapDiv);this.div.appendChild(this.element);if(!this.outsideViewport){this.div.className+=" "+this.displayClass+"Container";var E=OpenLayers.Util.getImagesLocation();var B=E+"layer-switcher-maximize.png";this.maximizeDiv=OpenLayers.Util.createAlphaImageDiv(this.displayClass+"MaximizeButton",null,new OpenLayers.Size(18,18),B,"absolute");this.maximizeDiv.style.display="none";this.maximizeDiv.className=this.displayClass+"MaximizeButton";OpenLayers.Event.observe(this.maximizeDiv,"click",OpenLayers.Function.bindAsEventListener(this.maximizeControl,this));this.div.appendChild(this.maximizeDiv);var B=E+"layer-switcher-minimize.png";this.minimizeDiv=OpenLayers.Util.createAlphaImageDiv("OpenLayers_Control_minimizeDiv",null,new OpenLayers.Size(18,18),B,"absolute");this.minimizeDiv.style.display="none";this.minimizeDiv.className=this.displayClass+"MinimizeButton";OpenLayers.Event.observe(this.minimizeDiv,"click",OpenLayers.Function.bindAsEventListener(this.minimizeControl,this));this.div.appendChild(this.minimizeDiv);var F=["dblclick","mousedown"];for(var C=0,A=F.length;C<A;C++){OpenLayers.Event.observe(this.maximizeDiv,F[C],OpenLayers.Event.stop);OpenLayers.Event.observe(this.minimizeDiv,F[C],OpenLayers.Event.stop)}this.minimizeControl()}else{this.element.style.display=""}if(this.map.getExtent()){this.update()}this.map.events.register("moveend",this,this.update);if(this.maximized){this.maximizeControl()}return this.div},baseLayerDraw:function(){this.draw();this.map.events.unregister("changebaselayer",this,this.baseLayerDraw)},rectDrag:function(I){var D=this.handlers.drag.last.x-I.x;var B=this.handlers.drag.last.y-I.y;if(D!=0||B!=0){var G=this.rectPxBounds.top;var A=this.rectPxBounds.left;var E=Math.abs(this.rectPxBounds.getHeight());var C=this.rectPxBounds.getWidth();var F=Math.max(0,(G-B));F=Math.min(F,this.ovmap.size.h-this.hComp-E);var H=Math.max(0,(A-D));H=Math.min(H,this.ovmap.size.w-this.wComp-C);this.setRectPxBounds(new OpenLayers.Bounds(H,F+E,H+C,F))}},mapDivClick:function(I){var B=this.rectPxBounds.getCenterPixel();var E=I.xy.x-B.x;var D=I.xy.y-B.y;var G=this.rectPxBounds.top;var C=this.rectPxBounds.left;var J=Math.abs(this.rectPxBounds.getHeight());var A=this.rectPxBounds.getWidth();var F=Math.max(0,(G+D));F=Math.min(F,this.ovmap.size.h-J);var H=Math.max(0,(C+E));H=Math.min(H,this.ovmap.size.w-A);this.setRectPxBounds(new OpenLayers.Bounds(H,F+J,H+A,F));this.updateMapToRect()},maximizeControl:function(A){this.element.style.display="";this.showToggle(false);if(A!=null){OpenLayers.Event.stop(A)}},minimizeControl:function(A){this.element.style.display="none";this.showToggle(true);if(A!=null){OpenLayers.Event.stop(A)}},showToggle:function(A){this.maximizeDiv.style.display=A?"":"none";this.minimizeDiv.style.display=A?"none":""},update:function(){if(this.ovmap==null){this.createMap()}if(this.autoPan||!this.isSuitableOverview()){this.updateOverview()}this.updateRectToMap()},isSuitableOverview:function(){var B=this.map.getExtent();var A=this.map.maxExtent;var C=new OpenLayers.Bounds(Math.max(B.left,A.left),Math.max(B.bottom,A.bottom),Math.min(B.right,A.right),Math.min(B.top,A.top));if(this.ovmap.getProjection()!=this.map.getProjection()){C=C.transform(this.map.getProjectionObject(),this.ovmap.getProjectionObject())}var D=this.ovmap.getResolution()/this.map.getResolution();return((D>this.minRatio)&&(D<=this.maxRatio)&&(this.ovmap.getExtent().containsBounds(C)))},updateOverview:function(){var C=this.map.getResolution();var B=this.ovmap.getResolution();var D=B/C;if(D>this.maxRatio){B=this.minRatio*C}else{if(D<=this.minRatio){B=this.maxRatio*C}}var A;if(this.ovmap.getProjection()!=this.map.getProjection()){A=this.map.center.clone();A.transform(this.map.getProjectionObject(),this.ovmap.getProjectionObject())}else{A=this.map.center}this.ovmap.setCenter(A,this.ovmap.getZoomForResolution(B*this.resolutionFactor));this.updateRectToMap()},createMap:function(){var B=OpenLayers.Util.extend({controls:[],maxResolution:"auto",fallThrough:false},this.mapOptions);this.ovmap=new OpenLayers.Map(this.mapDiv,B);OpenLayers.Event.stopObserving(window,"unload",this.ovmap.unloadDestroy);this.ovmap.addLayers(this.layers);this.ovmap.zoomToMaxExtent();this.wComp=parseInt(OpenLayers.Element.getStyle(this.extentRectangle,"border-left-width"))+parseInt(OpenLayers.Element.getStyle(this.extentRectangle,"border-right-width"));this.wComp=(this.wComp)?this.wComp:2;this.hComp=parseInt(OpenLayers.Element.getStyle(this.extentRectangle,"border-top-width"))+parseInt(OpenLayers.Element.getStyle(this.extentRectangle,"border-bottom-width"));this.hComp=(this.hComp)?this.hComp:2;this.handlers.drag=new OpenLayers.Handler.Drag(this,{move:this.rectDrag,done:this.updateMapToRect},{map:this.ovmap});this.handlers.click=new OpenLayers.Handler.Click(this,{click:this.mapDivClick},{single:true,"double":false,stopSingle:true,stopDouble:true,pixelTolerance:1,map:this.ovmap});this.handlers.click.activate();this.rectEvents=new OpenLayers.Events(this,this.extentRectangle,null,true);this.rectEvents.register("mouseover",this,function(D){if(!this.handlers.drag.active&&!this.map.dragging){this.handlers.drag.activate()}});this.rectEvents.register("mouseout",this,function(D){if(!this.handlers.drag.dragging){this.handlers.drag.deactivate()}});if(this.ovmap.getProjection()!=this.map.getProjection()){var C=this.map.getProjectionObject().getUnits()||this.map.units||this.map.baseLayer.units;var A=this.ovmap.getProjectionObject().getUnits()||this.ovmap.units||this.ovmap.baseLayer.units;this.resolutionFactor=C&&A?OpenLayers.INCHES_PER_UNIT[C]/OpenLayers.INCHES_PER_UNIT[A]:1}},updateRectToMap:function(){var B;if(this.ovmap.getProjection()!=this.map.getProjection()){B=this.map.getExtent().transform(this.map.getProjectionObject(),this.ovmap.getProjectionObject())}else{B=this.map.getExtent()}var A=this.getRectBoundsFromMapBounds(B);if(A){this.setRectPxBounds(A)}},updateMapToRect:function(){var A=this.getMapBoundsFromRectBounds(this.rectPxBounds);if(this.ovmap.getProjection()!=this.map.getProjection()){A=A.transform(this.ovmap.getProjectionObject(),this.map.getProjectionObject())}this.map.panTo(A.getCenterLonLat())},setRectPxBounds:function(D){var G=Math.max(D.top,0);var E=Math.max(D.left,0);var B=Math.min(D.top+Math.abs(D.getHeight()),this.ovmap.size.h-this.hComp);var H=Math.min(D.left+D.getWidth(),this.ovmap.size.w-this.wComp);var C=Math.max(H-E,0);var I=Math.max(B-G,0);if(C<this.minRectSize||I<this.minRectSize){this.extentRectangle.className=this.displayClass+this.minRectDisplayClass;var F=E+(C/2)-(this.minRectSize/2);var A=G+(I/2)-(this.minRectSize/2);this.extentRectangle.style.top=Math.round(A)+"px";this.extentRectangle.style.left=Math.round(F)+"px";this.extentRectangle.style.height=this.minRectSize+"px";this.extentRectangle.style.width=this.minRectSize+"px"}else{this.extentRectangle.className=this.displayClass+"ExtentRectangle";this.extentRectangle.style.top=Math.round(G)+"px";this.extentRectangle.style.left=Math.round(E)+"px";this.extentRectangle.style.height=Math.round(I)+"px";this.extentRectangle.style.width=Math.round(C)+"px"}this.rectPxBounds=new OpenLayers.Bounds(Math.round(E),Math.round(B),Math.round(H),Math.round(G))},getRectBoundsFromMapBounds:function(D){var A=new OpenLayers.LonLat(D.left,D.bottom);var F=new OpenLayers.LonLat(D.right,D.top);var C=this.getOverviewPxFromLonLat(A);var B=this.getOverviewPxFromLonLat(F);var E=null;if(C&&B){E=new OpenLayers.Bounds(C.x,C.y,B.x,B.y)}return E},getMapBoundsFromRectBounds:function(D){var C=new OpenLayers.Pixel(D.left,D.bottom);var B=new OpenLayers.Pixel(D.right,D.top);var A=this.getLonLatFromOverviewPx(C);var E=this.getLonLatFromOverviewPx(B);return new OpenLayers.Bounds(A.lon,A.lat,E.lon,E.lat)},getLonLatFromOverviewPx:function(F){var C=this.ovmap.size;var B=this.ovmap.getResolution();var A=this.ovmap.getExtent().getCenterLonLat();var E=F.x-(C.w/2);var D=F.y-(C.h/2);return new OpenLayers.LonLat(A.lon+E*B,A.lat-D*B)},getOverviewPxFromLonLat:function(D){var B=this.ovmap.getResolution();var C=this.ovmap.getExtent();var A=null;if(C){A=new OpenLayers.Pixel(Math.round(1/B*(D.lon-C.left)),Math.round(1/B*(C.top-D.lat)))}return A},CLASS_NAME:"OpenLayers.Control.OverviewMap"});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)}}if(this.layer!=null&&this.marker!=null){this.layer.removeMarker(this.marker)}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.Format.CSWGetDomain.v2_0_2=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance",csw:"http://www.opengis.net/cat/csw/2.0.2"},defaultPrefix:"csw",version:"2.0.2",schemaLocation:"http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd",PropertyName:null,ParameterName:null,initialize:function(A){OpenLayers.Format.XML.prototype.initialize.apply(this,[A])},read:function(A){if(typeof A=="string"){A=OpenLayers.Format.XML.prototype.read.apply(this,[A])}if(A&&A.nodeType==9){A=A.documentElement}var B={};this.readNode(A,B);return B},readers:{csw:{GetDomainResponse:function(A,B){this.readChildNodes(A,B)},DomainValues:function(D,E){if(!(E.DomainValues instanceof Array)){E.DomainValues=[]}var B=D.attributes;var F={};for(var C=0,A=B.length;C<A;++C){F[B[C].name]=B[C].nodeValue}this.readChildNodes(D,F);E.DomainValues.push(F)},PropertyName:function(A,B){B.PropertyName=this.getChildValue(A)},ParameterName:function(A,B){B.ParameterName=this.getChildValue(A)},ListOfValues:function(A,B){if(!(B.ListOfValues instanceof Array)){B.ListOfValues=[]}this.readChildNodes(A,B.ListOfValues)},Value:function(D,F){var B=D.attributes;var E={};for(var C=0,A=B.length;C<A;++C){E[B[C].name]=B[C].nodeValue}E.value=this.getChildValue(D);F.push({Value:E})},ConceptualScheme:function(A,B){B.ConceptualScheme={};this.readChildNodes(A,B.ConceptualScheme)},Name:function(A,B){B.Name=this.getChildValue(A)},Document:function(A,B){B.Document=this.getChildValue(A)},Authority:function(A,B){B.Authority=this.getChildValue(A)},RangeOfValues:function(A,B){B.RangeOfValues={};this.readChildNodes(A,B.RangeOfValues)},MinValue:function(D,F){var B=D.attributes;var E={};for(var C=0,A=B.length;C<A;++C){E[B[C].name]=B[C].nodeValue}E.value=this.getChildValue(D);F.MinValue=E},MaxValue:function(D,F){var B=D.attributes;var E={};for(var C=0,A=B.length;C<A;++C){E[B[C].name]=B[C].nodeValue}E.value=this.getChildValue(D);F.MaxValue=E}}},write:function(A){var B=this.writeNode("csw:GetDomain",A);return OpenLayers.Format.XML.prototype.write.apply(this,[B])},writers:{csw:{GetDomain:function(A){var B=this.createElementNSPlus("csw:GetDomain",{attributes:{service:"CSW",version:this.version}});if(A.PropertyName||this.PropertyName){this.writeNode("csw:PropertyName",A.PropertyName||this.PropertyName,B)}else{if(A.ParameterName||this.ParameterName){this.writeNode("csw:ParameterName",A.ParameterName||this.ParameterName,B)}}this.readChildNodes(B,A);return B},PropertyName:function(B){var A=this.createElementNSPlus("csw:PropertyName",{value:B});return A},ParameterName:function(B){var A=this.createElementNSPlus("csw:ParameterName",{value:B});return A}}},CLASS_NAME:"OpenLayers.Format.CSWGetDomain.v2_0_2"});OpenLayers.Format.Context=OpenLayers.Class({version:null,layerOptions:null,layerParams:null,parser:null,initialize:function(A){OpenLayers.Util.extend(this,A);this.options=A},read:function(F,D){if(typeof F=="string"){F=OpenLayers.Format.XML.prototype.read.apply(this,[F])}var B=F.documentElement;var A=this.version;if(!A){A=B.getAttribute("version")}var H=this.getParser(A);var E=H.read(F,D);var G;if(D&&D.map){this.context=E;if(D.map instanceof OpenLayers.Map){G=this.mergeContextToMap(E,D.map)}else{var C=D.map;if(OpenLayers.Util.isElement(C)||typeof C=="string"){C={div:C}}G=this.contextToMap(E,C)}}else{G=E}return G},getLayerFromContext:function(G){var C,F;var I={queryable:G.queryable,visibility:G.visibility,maxExtent:G.maxExtent,metadata:OpenLayers.Util.applyDefaults(G.metadata,{styles:G.styles}),numZoomLevels:G.numZoomLevels,units:G.units,isBaseLayer:G.isBaseLayer,opacity:G.opacity,displayInLayerSwitcher:G.displayInLayerSwitcher,singleTile:G.singleTile,tileSize:(G.tileSize)?new OpenLayers.Size(G.tileSize.width,G.tileSize.height):undefined,minScale:G.minScale||G.maxScaleDenominator,maxScale:G.maxScale||G.minScaleDenominator};if(this.layerOptions){OpenLayers.Util.applyDefaults(I,this.layerOptions)}var B={layers:G.name,transparent:G.transparent,version:G.version};if(G.formats&&G.formats.length>0){B.format=G.formats[0].value;for(C=0,F=G.formats.length;C<F;C++){var H=G.formats[C];if(H.current==true){B.format=H.value;break}}}if(G.styles&&G.styles.length>0){for(C=0,F=G.styles.length;C<F;C++){var A=G.styles[C];if(A.current==true){if(A.href){B.sld=A.href}else{if(A.body){B.sld_body=A.body}else{B.styles=A.name}}break}}}if(this.layerParams){OpenLayers.Util.applyDefaults(B,this.layerParams)}var D=null;var E=G.service;if(E==OpenLayers.Format.Context.serviceTypes.WFS){I.strategies=[new OpenLayers.Strategy.BBOX()];I.protocol=new OpenLayers.Protocol.WFS({url:G.url,featurePrefix:G.name.split(":")[0],featureType:G.name.split(":").pop()});D=new OpenLayers.Layer.Vector(G.title||G.name,I)}else{if(E==OpenLayers.Format.Context.serviceTypes.KML){I.strategies=[new OpenLayers.Strategy.Fixed()];I.protocol=new OpenLayers.Protocol.HTTP({url:G.url,format:new OpenLayers.Format.KML()});D=new OpenLayers.Layer.Vector(G.title||G.name,I)}else{if(E==OpenLayers.Format.Context.serviceTypes.GML){I.strategies=[new OpenLayers.Strategy.Fixed()];I.protocol=new OpenLayers.Protocol.HTTP({url:G.url,format:new OpenLayers.Format.GML()});D=new OpenLayers.Layer.Vector(G.title||G.name,I)}else{if(G.features){D=new OpenLayers.Layer.Vector(G.title||G.name,I);D.addFeatures(G.features)}else{if(G.categoryLayer!==true){D=new OpenLayers.Layer.WMS(G.title||G.name,G.url,B,I)}}}}}return D},getLayersFromContext:function(D){var E=[];for(var C=0,A=D.length;C<A;C++){var B=this.getLayerFromContext(D[C]);if(B!==null){E.push(B)}}return E},contextToMap:function(B,A){A=OpenLayers.Util.applyDefaults({maxExtent:B.maxExtent,projection:B.projection},A);var C=new OpenLayers.Map(A);C.addLayers(this.getLayersFromContext(B.layersContext));C.setCenter(B.bounds.getCenterLonLat(),C.getZoomForExtent(B.bounds,true));return C},mergeContextToMap:function(A,B){B.addLayers(this.getLayersFromContext(A.layersContext));return B},write:function(D,B){D=this.toContext(D);var A=B&&B.version;var E=this.getParser(A);var C=E.write(D,B);return C},CLASS_NAME:"OpenLayers.Format.Context"});OpenLayers.Format.Context.serviceTypes={WMS:"urn:ogc:serviceType:WMS",WFS:"urn:ogc:serviceType:WFS",WCS:"urn:ogc:serviceType:WCS",GML:"urn:ogc:serviceType:GML",SLD:"urn:ogc:serviceType:SLD",FES:"urn:ogc:serviceType:FES",KML:"urn:ogc:serviceType:KML"};if(!OpenLayers.Format.OWSCommon){OpenLayers.Format.OWSCommon={}}OpenLayers.Format.OWSCommon.v1=OpenLayers.Class(OpenLayers.Format.XML,{regExes:{trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)},readers:{ows:{ServiceIdentification:function(A,B){B.serviceIdentification={};this.readChildNodes(A,B.serviceIdentification)},Title:function(A,B){B.title=this.getChildValue(A)},Abstract:function(A,B){B["abstract"]=this.getChildValue(A)},Keywords:function(A,B){B.keywords={};this.readChildNodes(A,B.keywords)},Keyword:function(B,A){A[this.getChildValue(B)]=true},ServiceType:function(A,B){B.serviceType={codeSpace:A.getAttribute("codeSpace"),value:this.getChildValue(A)}},ServiceTypeVersion:function(A,B){B.serviceTypeVersion=this.getChildValue(A)},Fees:function(A,B){B.fees=this.getChildValue(A)},AccessConstraints:function(A,B){B.accessConstraints=this.getChildValue(A)},ServiceProvider:function(A,B){B.serviceProvider={};this.readChildNodes(A,B.serviceProvider)},ProviderName:function(A,B){B.providerName=this.getChildValue(A)},ProviderSite:function(A,B){B.providerSite=this.getAttributeNS(A,this.namespaces.xlink,"href")},ServiceContact:function(A,B){B.serviceContact={};this.readChildNodes(A,B.serviceContact)},IndividualName:function(B,A){A.individualName=this.getChildValue(B)},PositionName:function(B,A){A.positionName=this.getChildValue(B)},ContactInfo:function(B,A){A.contactInfo={};this.readChildNodes(B,A.contactInfo)},Phone:function(B,A){A.phone={};this.readChildNodes(B,A.phone)},Voice:function(B,A){A.voice=this.getChildValue(B)},Address:function(B,A){A.address={};this.readChildNodes(B,A.address)},DeliveryPoint:function(B,A){A.deliveryPoint=this.getChildValue(B)},City:function(B,A){A.city=this.getChildValue(B)},AdministrativeArea:function(B,A){A.administrativeArea=this.getChildValue(B)},PostalCode:function(B,A){A.postalCode=this.getChildValue(B)},Country:function(B,A){A.country=this.getChildValue(B)},ElectronicMailAddress:function(B,A){A.electronicMailAddress=this.getChildValue(B)},Role:function(B,A){A.role=this.getChildValue(B)},OperationsMetadata:function(A,B){B.operationsMetadata={};this.readChildNodes(A,B.operationsMetadata)},Operation:function(C,B){var A=C.getAttribute("name");B[A]={};this.readChildNodes(C,B[A])},DCP:function(B,A){A.dcp={};this.readChildNodes(B,A.dcp)},HTTP:function(B,A){A.http={};this.readChildNodes(B,A.http)},Get:function(B,A){A.get=this.getAttributeNS(B,this.namespaces.xlink,"href")},Post:function(B,A){A.post=this.getAttributeNS(B,this.namespaces.xlink,"href")},Parameter:function(C,A){if(!A.parameters){A.parameters={}}var B=C.getAttribute("name");A.parameters[B]={};this.readChildNodes(C,A.parameters[B])},Value:function(A,B){B[this.getChildValue(A)]=true},OutputFormat:function(A,B){B.formats.push({value:this.getChildValue(A)});this.readChildNodes(A,B)},WGS84BoundingBox:function(B,C){var A={};A.crs=B.getAttribute("crs");if(C.BoundingBox){C.BoundingBox.push(A)}else{C.projection=A.crs;A=C}this.readChildNodes(B,A)},BoundingBox:function(A,B){this.readers.ows["WGS84BoundingBox"].apply(this,[A,B])},LowerCorner:function(B,C){var D=this.getChildValue(B).replace(this.regExes.trimSpace,"");D=D.replace(this.regExes.trimComma,",");var A=D.split(this.regExes.splitSpace);C.left=A[0];C.bottom=A[1]},UpperCorner:function(B,C){var D=this.getChildValue(B).replace(this.regExes.trimSpace,"");D=D.replace(this.regExes.trimComma,",");var A=D.split(this.regExes.splitSpace);C.right=A[0];C.top=A[1];C.bounds=new OpenLayers.Bounds(C.left,C.bottom,C.right,C.top);delete C.left;delete C.bottom;delete C.right;delete C.top}}},writers:{ows:{BoundingBox:function(A){var B=this.createElementNSPlus("ows:BoundingBox",{attributes:{crs:A.projection}});this.writeNode("ows:LowerCorner",A,B);this.writeNode("ows:UpperCorner",A,B);return B},LowerCorner:function(A){var B=this.createElementNSPlus("ows:LowerCorner",{value:A.bounds.left+" "+A.bounds.bottom});return B},UpperCorner:function(A){var B=this.createElementNSPlus("ows:UpperCorner",{value:A.bounds.right+" "+A.bounds.top});return B},Title:function(B){var A=this.createElementNSPlus("ows:Title",{value:B});return A},OutputFormat:function(B){var A=this.createElementNSPlus("ows:OutputFormat",{value:B});return A}}},CLASS_NAME:"OpenLayers.Format.OWSCommon.v1"});OpenLayers.Format.SOSCapabilities=OpenLayers.Class(OpenLayers.Format.XML,{defaultVersion:"1.0.0",version:null,parser:null,initialize:function(A){OpenLayers.Format.XML.prototype.initialize.apply(this,[A]);this.options=A},read:function(E){if(typeof E=="string"){E=OpenLayers.Format.XML.prototype.read.apply(this,[E])}var C=E.documentElement;var B=this.version||C.getAttribute("version")||this.defaultVersion;if(!this.parser||this.parser.version!==B){var D=OpenLayers.Format.SOSCapabilities["v"+B.replace(/\./g,"_")];if(!D){throw"Can't find a SOS capabilities parser for version "+B}var F=new D(this.options)}var A=F.read(E);A.version=B;return A},CLASS_NAME:"OpenLayers.Format.SOSCapabilities"});OpenLayers.Format.WFSCapabilities=OpenLayers.Class(OpenLayers.Format.XML,{defaultVersion:"1.1.0",version:null,initialize:function(A){OpenLayers.Format.XML.prototype.initialize.apply(this,[A]);this.options=A},read:function(E){if(typeof E=="string"){E=OpenLayers.Format.XML.prototype.read.apply(this,[E])}var C=E.documentElement;var B=this.version;if(!B){B=C.getAttribute("version");if(!B){B=this.defaultVersion}}var D=OpenLayers.Format.WFSCapabilities["v"+B.replace(/\./g,"_")];if(!D){throw"Can't find a WFS capabilities parser for version "+B}var F=new D(this.options);var A=F.read(E);A.version=B;return A},CLASS_NAME:"OpenLayers.Format.WFSCapabilities"});OpenLayers.Format.WFSDescribeFeatureType=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{xsd:"http://www.w3.org/2001/XMLSchema"},initialize:function(A){OpenLayers.Format.XML.prototype.initialize.apply(this,[A])},readers:{xsd:{schema:function(D,I){var E=[];var B={};var F={complexTypes:E,customTypes:B};this.readChildNodes(D,F);var G=D.attributes;var K,A;for(var H=0,J=G.length;H<J;++H){K=G[H];A=K.name;if(A.indexOf("xmlns")==0){this.setNamespace(A.split(":")[1]||"",K.value)}else{I[A]=K.value}}I.featureTypes=E;I.targetPrefix=this.namespaceAlias[I.targetNamespace];var L,C;for(var H=0,J=E.length;H<J;++H){L=E[H];C=B[L.typeName];if(B[L.typeName]){L.typeName=C.name}}},complexType:function(B,C){var A={typeName:B.getAttribute("name")};this.readChildNodes(B,A);C.complexTypes.push(A)},complexContent:function(A,B){this.readChildNodes(A,B)},extension:function(A,B){this.readChildNodes(A,B)},sequence:function(A,B){var C={elements:[]};this.readChildNodes(A,C);B.properties=C.elements},element:function(A,C){if(C.elements){var D={};var B=A.attributes;var G;for(var E=0,F=B.length;E<F;++E){G=B[E];D[G.name]=G.value}var H=D.type;if(!H){H={};this.readChildNodes(A,H);D.restriction=H;D.type=H.base}var J=H.base||H;D.localType=J.split(":").pop();C.elements.push(D)}if(C.complexTypes){var H=A.getAttribute("type");var I=H.split(":").pop();C.customTypes[I]={name:A.getAttribute("name"),type:H}}},simpleType:function(A,B){this.readChildNodes(A,B)},restriction:function(A,B){B.base=A.getAttribute("base");this.readRestriction(A,B)}}},readRestriction:function(D,F){var C=D.childNodes;var H,G,E;for(var B=0,A=C.length;B<A;++B){H=C[B];if(H.nodeType==1){G=H.nodeName.split(":").pop();E=H.getAttribute("value");if(!F[G]){F[G]=E}else{if(typeof F[G]=="string"){F[G]=[F[G]]}F[G].push(E)}}}},read:function(B){if(typeof B=="string"){B=OpenLayers.Format.XML.prototype.read.apply(this,[B])}if(B&&B.nodeType==9){B=B.documentElement}var A={};this.readNode(B,A);return A},CLASS_NAME:"OpenLayers.Format.WFSDescribeFeatureType"});OpenLayers.Format.WFST.v1=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance",wfs:"http://www.opengis.net/wfs",gml:"http://www.opengis.net/gml",ogc:"http://www.opengis.net/ogc"},defaultPrefix:"wfs",version:null,schemaLocations:null,srsName:null,extractAttributes:true,xy:true,stateName:null,initialize:function(A){this.stateName={};this.stateName[OpenLayers.State.INSERT]="wfs:Insert";this.stateName[OpenLayers.State.UPDATE]="wfs:Update";this.stateName[OpenLayers.State.DELETE]="wfs:Delete";OpenLayers.Format.XML.prototype.initialize.apply(this,[A])},getSrsName:function(C,B){var A=B&&B.srsName;if(!A){if(C&&C.layer){A=C.layer.projection.getCode()}else{A=this.srsName}}return A},read:function(B,A){A=A||{};OpenLayers.Util.applyDefaults(A,{output:"features"});if(typeof B=="string"){B=OpenLayers.Format.XML.prototype.read.apply(this,[B])}if(B&&B.nodeType==9){B=B.documentElement}var C={};if(B){this.readNode(B,C)}if(C.features&&A.output==="features"){C=C.features}return C},readers:{wfs:{FeatureCollection:function(A,B){B.features=[];this.readChildNodes(A,B)}}},write:function(A){var B=this.writeNode("wfs:Transaction",A);var C=this.schemaLocationAttr();if(C){this.setAttributeNS(B,this.namespaces.xsi,"xsi:schemaLocation",C)}return OpenLayers.Format.XML.prototype.write.apply(this,[B])},writers:{wfs:{GetFeature:function(B){var D=this.createElementNSPlus("wfs:GetFeature",{attributes:{service:"WFS",version:this.version,outputFormat:B&&B.outputFormat,maxFeatures:B&&B.maxFeatures,"xsi:schemaLocation":this.schemaLocationAttr(B)}});if(typeof this.featureType=="string"){this.writeNode("Query",B,D)}else{for(var C=0,A=this.featureType.length;C<A;C++){B.featureType=this.featureType[C];this.writeNode("Query",B,D)}}return D},Transaction:function(E){var F=this.createElementNSPlus("wfs:Transaction",{attributes:{service:"WFS",version:this.version}});if(E){var B,D;for(var C=0,A=E.length;C<A;++C){D=E[C];B=this.stateName[D.state];if(B){this.writeNode(B,D,F)}}}return F},Insert:function(A){var B=this.createElementNSPlus("wfs:Insert");this.srsName=this.getSrsName(A);this.writeNode("feature:_typeName",A,B);return B},Update:function(B){var C=this.createElementNSPlus("wfs:Update",{attributes:{typeName:(this.featureNS?this.featurePrefix+":":"")+this.featureType}});if(this.featureNS){C.setAttribute("xmlns:"+this.featurePrefix,this.featureNS)}if(this.geometryName!==null){this.writeNode("Property",{name:this.geometryName,value:B},C)}for(var A in B.attributes){if(B.attributes[A]!==undefined){this.writeNode("Property",{name:A,value:B.attributes[A]},C)}}this.writeNode("ogc:Filter",new OpenLayers.Filter.FeatureId({fids:[B.fid]}),C);return C},Property:function(B){var A=this.createElementNSPlus("wfs:Property");this.writeNode("Name",B.name,A);if(B.value!==null){this.writeNode("Value",B.value,A)}return A},Name:function(A){return this.createElementNSPlus("wfs:Name",{value:A})},Value:function(C){var B;if(C instanceof OpenLayers.Feature.Vector){B=this.createElementNSPlus("wfs:Value");this.srsName=this.getSrsName(C);var A=this.writeNode("feature:_geometry",C.geometry).firstChild;B.appendChild(A)}else{B=this.createElementNSPlus("wfs:Value",{value:C})}return B},Delete:function(A){var B=this.createElementNSPlus("wfs:Delete",{attributes:{typeName:(this.featureNS?this.featurePrefix+":":"")+this.featureType}});if(this.featureNS){B.setAttribute("xmlns:"+this.featurePrefix,this.featureNS)}this.writeNode("ogc:Filter",new OpenLayers.Filter.FeatureId({fids:[A.fid]}),B);return B}}},schemaLocationAttr:function(A){A=OpenLayers.Util.extend({featurePrefix:this.featurePrefix,schema:this.schema},A);var F=OpenLayers.Util.extend({},this.schemaLocations);if(A.schema){F[A.featurePrefix]=A.schema}var E=[];var C;for(var B in F){C=this.namespaces[B];if(C){E.push(C+" "+F[B])}}var D=E.join(" ")||undefined;return D},setFilterProperty:function(C){if(C.filters){for(var B=0,A=C.filters.length;B<A;++B){this.setFilterProperty(C.filters[B])}}else{if(C instanceof OpenLayers.Filter.Spatial){C.property=this.geometryName}}},CLASS_NAME:"OpenLayers.Format.WFST.v1"});OpenLayers.Format.WMSCapabilities=OpenLayers.Class(OpenLayers.Format.XML,{defaultVersion:"1.1.1",version:null,parser:null,initialize:function(A){OpenLayers.Format.XML.prototype.initialize.apply(this,[A]);this.options=A},read:function(E){if(typeof E=="string"){E=OpenLayers.Format.XML.prototype.read.apply(this,[E])}var C=E.documentElement;var B=this.version||C.getAttribute("version")||this.defaultVersion;if(!this.parser||this.parser.version!==B){var D=OpenLayers.Format.WMSCapabilities["v"+B.replace(/\./g,"_")];if(!D){throw"Can't find a WMS capabilities parser for version "+B}this.parser=new D(this.options)}var A=this.parser.read(E);A.version=B;return A},CLASS_NAME:"OpenLayers.Format.WMSCapabilities"});OpenLayers.Format.WMSDescribeLayer=OpenLayers.Class(OpenLayers.Format.XML,{defaultVersion:"1.1.1",version:null,initialize:function(A){OpenLayers.Format.XML.prototype.initialize.apply(this,[A]);this.options=A},read:function(E){if(typeof E=="string"){E=OpenLayers.Format.XML.prototype.read.apply(this,[E])}var C=E.documentElement;var B=this.version;if(!B){B=C.getAttribute("version");if(!B){B=this.defaultVersion}}if(B=="1.1.1"||B=="1.1.0"){B="1.1"}var D=OpenLayers.Format.WMSDescribeLayer["v"+B.replace(/\./g,"_")];if(!D){throw"Can't find a WMS DescribeLayer parser for version "+B}var F=new D(this.options);var A=F.read(E);A.version=B;return A},CLASS_NAME:"OpenLayers.Format.WMSDescribeLayer"});OpenLayers.Format.WMSGetFeatureInfo=OpenLayers.Class(OpenLayers.Format.XML,{layerIdentifier:"_layer",featureIdentifier:"_feature",regExes:{trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)},gmlFormat:null,initialize:function(A){OpenLayers.Format.XML.prototype.initialize.apply(this,arguments);OpenLayers.Util.extend(this,A);this.options=A},read:function(E){var A;if(typeof E=="string"){E=OpenLayers.Format.XML.prototype.read.apply(this,[E])}var B=E.documentElement;if(B){var C=this;var D=this["read_"+B.nodeName];if(D){A=D.call(this,B)}else{A=new OpenLayers.Format.GML((this.options?this.options:{})).read(E)}}else{A=E}return A},read_msGMLOutput:function(H){var E=[];var B=this.getSiblingNodesByTagCriteria(H,this.layerIdentifier);if(B){for(var I=0,L=B.length;I<L;++I){var C=B[I];var J=C.nodeName;if(C.prefix){J=J.split(":")[1]}var J=J.replace(this.layerIdentifier,"");var K=this.getSiblingNodesByTagCriteria(C,this.featureIdentifier);if(K){for(var G=0;G<K.length;G++){var A=K[G];var D=this.parseGeometry(A);var F=this.parseAttributes(A);var M=new OpenLayers.Feature.Vector(D.geometry,F,null);M.bounds=D.bounds;M.type=J;E.push(M)}}}}return E},read_FeatureInfoResponse:function(F){var C=[];var H=this.getElementsByTagNameNS(F,"*","FIELDS");for(var G=0,I=H.length;G<I;G++){var A=H[G];var J=null;var E={};for(var D=0,K=A.attributes.length;D<K;D++){var B=A.attributes[D];E[B.nodeName]=B.nodeValue}C.push(new OpenLayers.Feature.Vector(J,E,null))}return C},getSiblingNodesByTagCriteria:function(F,I){var A=[];var C,E,D,G,B;if(F&&F.hasChildNodes()){C=F.childNodes;D=C.length;for(var H=0;H<D;H++){B=C[H];while(B&&B.nodeType!=1){B=B.nextSibling;H++}E=(B?B.nodeName:"");if(E.length>0&&E.indexOf(I)>-1){A.push(B)}else{G=this.getSiblingNodesByTagCriteria(B,I);if(G.length>0){(A.length==0)?A=G:A.push(G)}}}}return A},parseAttributes:function(E){var F={};if(E.nodeType==1){var C=E.childNodes;var D=C.length;for(var G=0;G<D;++G){var B=C[G];if(B.nodeType==1){var J=B.childNodes;if(J.length==1){var I=J[0];if(I.nodeType==3||I.nodeType==4){var A=(B.prefix)?B.nodeName.split(":")[1]:B.nodeName;var H=I.nodeValue.replace(this.regExes.trimSpace,"");F[A]=H}}}}}return F},parseGeometry:function(C){if(!this.gmlFormat){this.gmlFormat=new OpenLayers.Format.GML()}var A=this.gmlFormat.parseFeature(C);var D,B=null;if(A){D=A.geometry&&A.geometry.clone();B=A.bounds&&A.bounds.clone();A.destroy()}return{geometry:D,bounds:B}},CLASS_NAME:"OpenLayers.Format.WMSGetFeatureInfo"});OpenLayers.Format.WMTSCapabilities=OpenLayers.Class(OpenLayers.Format.XML,{defaultVersion:"1.0.0",version:null,parser:null,yx:{"urn:ogc:def:crs:EPSG::4326":true},initialize:function(A){OpenLayers.Format.XML.prototype.initialize.apply(this,[A]);this.options=A},read:function(D){if(typeof D=="string"){D=OpenLayers.Format.XML.prototype.read.apply(this,[D])}var B=D.documentElement;var A=this.version||B.getAttribute("version")||this.defaultVersion;if(!this.parser||this.parser.version!==A){var C=OpenLayers.Format.WMTSCapabilities["v"+A.replace(/\./g,"_")];if(!C){throw new Error("Can't find a WMTS capabilities parser for version "+A)}this.parser=new C(this.options)}return this.parser.read(D)},createLayer:function(E,F){var J;var K={layer:true,matrixSet:true};for(var C in K){if(!(C in F)){throw new Error("Missing property '"+C+"' in layer configuration.")}}var G=E.contents;var D=G.tileMatrixSets[F.matrixSet];var I=G.layers;var B;for(var H=0,L=G.layers.length;H<L;++H){if(G.layers[H].identifier===F.layer){B=G.layers[H];break}}if(B&&D){var A;for(var H=0,L=B.styles.length;H<L;++H){A=B.styles[H];if(A.isDefault){break}}J=new OpenLayers.Layer.WMTS(OpenLayers.Util.applyDefaults(F,{url:E.operationsMetadata.GetTile.dcp.http.get,name:B.title,style:A,matrixIds:D.matrixIds}))}return J},CLASS_NAME:"OpenLayers.Format.WMTSCapabilities"});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,documentDrag:false,documentEvents: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:OpenLayers.Function.True}document.onselectstart=OpenLayers.Function.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.documentDrag===true&&this.documentEvents){if(A.element===document){this.adjustXY(A);this.setEvent(A)}else{this.destroyDocumentEvents()}}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=OpenLayers.Function.False}this.last=this.evt.xy}return true},removeTimeout:function(){this.timeoutId=null},mouseup:function(B){if(this.started){if(this.documentDrag===true&&this.documentEvents){this.adjustXY(B);this.destroyDocumentEvents()}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)){if(this.documentDrag===true){this.documentEvents=new OpenLayers.Events(this,document,null,null,{includeXY:true});this.documentEvents.on({mousemove:this.mousemove,mouseup:this.mouseup});OpenLayers.Element.addClass(document.body,"olDragDown")}else{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},adjustXY:function(A){var B=OpenLayers.Util.pagePosition(this.map.div);A.xy.x-=B[0];A.xy.y-=B[1]},destroyDocumentEvents:function(){OpenLayers.Element.removeClass(document.body,"olDragDown");this.documentEvents.destroy();this.documentEvents=null},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.Hover=OpenLayers.Class(OpenLayers.Handler,{delay:500,pixelTolerance:null,stopMove:false,px:null,timerId:null,initialize:function(C,B,A){OpenLayers.Handler.prototype.initialize.apply(this,arguments)},mousemove:function(A){if(this.passesTolerance(A.xy)){this.clearTimer();this.callback("move",[A]);this.px=A.xy;A=OpenLayers.Util.extend({},A);this.timerId=window.setTimeout(OpenLayers.Function.bind(this.delayedCall,this,A),this.delay)}return !this.stopMove},mouseout:function(A){if(OpenLayers.Util.mouseLeft(A,this.map.div)){this.clearTimer();this.callback("move",[A])}return true},passesTolerance:function(B){var C=true;if(this.pixelTolerance&&this.px){var A=Math.sqrt(Math.pow(this.px.x-B.x,2)+Math.pow(this.px.y-B.y,2));if(A<this.pixelTolerance){C=false}}return C},clearTimer:function(){if(this.timerId!=null){window.clearTimeout(this.timerId);this.timerId=null}},delayedCall:function(A){this.callback("pause",[A])},deactivate:function(){var A=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.clearTimer();A=true}return A},CLASS_NAME:"OpenLayers.Handler.Hover"});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,interval:0,delta:0,cumulative:true,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(I){if(!this.map||!this.checkModifiers(I)){return }var F=false;var K=false;var E=false;var B=OpenLayers.Event.element(I);while((B!=null)&&!E&&!F){if(!F){try{if(B.currentStyle){C=B.currentStyle.overflow}else{var A=document.defaultView.getComputedStyle(B,null);var C=A.getPropertyValue("overflow")}F=(C&&(C=="auto")||(C=="scroll"))}catch(D){}}if(!K){for(var G=0,H=this.map.layers.length;G<H;G++){if(B==this.map.layers[G].div||B==this.map.layers[G].pane){K=true;break}}}E=(B==this.map.div);B=B.parentNode}if(!F&&E){if(K){var J=0;if(!I){I=window.event}if(I.wheelDelta){J=I.wheelDelta/120;if(window.opera&&window.opera.version()<9.2){J=-J}}else{if(I.detail){J=-I.detail/3}}this.delta=this.delta+J;if(this.interval){window.clearTimeout(this._timeoutId);this._timeoutId=window.setTimeout(OpenLayers.Function.bind(function(){this.wheelZoom(I)},this),this.interval)}else{this.wheelZoom(I)}}OpenLayers.Event.stop(I)}},wheelZoom:function(A){var B=this.delta;this.delta=0;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,this.cumulative?B:-1])}else{this.callback("up",[A,this.cumulative?B:1])}}},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"],RESOLUTION_PROPERTIES:["scales","resolutions","maxScale","minScale","maxResolution","minResolution","numZoomLevels","maxZoomLevel"],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"],metadata:{},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.getOptions())}OpenLayers.Util.applyDefaults(A,this);A.map=null;return A},getOptions:function(){var A={};for(var B in this.options){A[B]=this[B]}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(C){if(this.options==null){this.options={}}OpenLayers.Util.extend(this.options,C);OpenLayers.Util.extend(this,C);if(typeof this.projection=="string"){this.projection=new OpenLayers.Projection(this.projection)}if(this.projection&&this.projection.getUnits()){this.units=this.projection.getUnits()}if(this.map){var A=this.RESOLUTION_PROPERTIES.concat(["projection","units","minExtent","maxExtent"]);for(var B in C){if(C.hasOwnProperty(B)&&OpenLayers.Util.indexOf(A,B)>=0){this.initResolutions();break}}}},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.minExtent=this.minExtent||this.map.minExtent;this.projection=this.projection||this.map.projection;if(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(A){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){if(A!=(this.div.style.display!="none")){this.div.style.display=(A&&this.calculateInRange())?"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 E,A;var F={},D=true;for(E=0,A=this.RESOLUTION_PROPERTIES.length;E<A;E++){var H=this.RESOLUTION_PROPERTIES[E];F[H]=this.options[H];if(D&&this.options[H]){D=false}}if(this.alwaysInRange==null){this.alwaysInRange=D}if(F.resolutions==null){F.resolutions=this.resolutionsFromScales(F.scales)}if(F.resolutions==null){F.resolutions=this.calculateResolutions(F)}if(F.resolutions==null){for(E=0,A=this.RESOLUTION_PROPERTIES.length;E<A;E++){var H=this.RESOLUTION_PROPERTIES[E];F[H]=this.options[H]!=null?this.options[H]:this.map[H]}if(F.resolutions==null){F.resolutions=this.resolutionsFromScales(F.scales)}if(F.resolutions==null){F.resolutions=this.calculateResolutions(F)}}var C;if(this.options.maxResolution&&this.options.maxResolution!=="auto"){C=this.options.maxResolution}if(this.options.minScale){C=OpenLayers.Util.getResolutionFromScale(this.options.minScale,this.units)}var B;if(this.options.minResolution&&this.options.minResolution!=="auto"){B=this.options.minResolution}if(this.options.maxScale){B=OpenLayers.Util.getResolutionFromScale(this.options.maxScale,this.units)}if(F.resolutions){F.resolutions.sort(function(J,I){return(I-J)});if(!C){C=F.resolutions[0]}if(!B){var G=F.resolutions.length-1;B=F.resolutions[G]}}this.resolutions=F.resolutions;if(this.resolutions){A=this.resolutions.length;this.scales=new Array(A);for(E=0;E<A;E++){this.scales[E]=OpenLayers.Util.getScaleFromResolution(this.resolutions[E],this.units)}this.numZoomLevels=A}this.minResolution=B;if(B){this.maxScale=OpenLayers.Util.getScaleFromResolution(B,this.units)}this.maxResolution=C;if(C){this.minScale=OpenLayers.Util.getScaleFromResolution(C,this.units)}},resolutionsFromScales:function(D){if(D==null){return }var B,C,A;A=D.length;B=new Array(A);for(C=0;C<A;C++){B[C]=OpenLayers.Util.getResolutionFromScale(D[C],this.units)}return B},calculateResolutions:function(J){var L=J.maxResolution;if(J.minScale!=null){L=OpenLayers.Util.getResolutionFromScale(J.minScale,this.units)}else{if(L=="auto"&&this.maxExtent!=null){var K=this.map.getSize();var I=this.maxExtent.getWidth()/K.w;var G=this.maxExtent.getHeight()/K.h;L=Math.max(I,G)}}var F=J.minResolution;if(J.maxScale!=null){F=OpenLayers.Util.getResolutionFromScale(J.maxScale,this.units)}else{if(J.minResolution=="auto"&&this.minExtent!=null){var K=this.map.getSize();var I=this.minExtent.getWidth()/K.w;var G=this.minExtent.getHeight()/K.h;F=Math.max(I,G)}}var A=J.maxZoomLevel;var B=J.numZoomLevels;if(typeof F==="number"&&typeof L==="number"&&B===undefined){var H=L/F;B=Math.floor(Math.log(H)/Math.log(2))+1}else{if(B===undefined&&A!=null){B=A+1}}if(typeof B!=="number"||B<=0||(typeof L!=="number"&&typeof F!=="number")){return }var D=new Array(B);var C=2;if(typeof F=="number"&&typeof L=="number"){C=Math.pow((L/F),(1/(B-1)))}var E;if(typeof L==="number"){for(E=0;E<B;E++){D[E]=L/Math.pow(C,E)}}else{for(E=0;E<B;E++){D[B-1-E]=F*Math.pow(C,E)}}return D},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 M;if(this.map.fractionalZoom){var J=0;var C=this.resolutions.length-1;var D=this.resolutions[J];var B=this.resolutions[C];var I;for(var F=0,G=this.resolutions.length;F<G;++F){I=this.resolutions[F];if(I>=E){D=I;J=F}if(I<=E){B=I;C=F;break}}var H=D-B;if(H>0){M=J+((D-E)/H)}else{M=J}}else{var K;var L=Number.POSITIVE_INFINITY;for(var F=0,G=this.resolutions.length;F<G;F++){if(A){K=Math.abs(this.resolutions[F]-E);if(K>L){break}L=K}else{if(this.resolutions[F]<E){break}}}M=Math.max(0,F-1)}return M},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)}if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"opacity"})}}},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"});OpenLayers.Marker.Box=OpenLayers.Class(OpenLayers.Marker,{bounds:null,div:null,initialize:function(B,C,A){this.bounds=B;this.div=OpenLayers.Util.createDiv();this.div.style.overflow="hidden";this.events=new OpenLayers.Events(this,this.div,null);this.setBorder(C,A)},destroy:function(){this.bounds=null;this.div=null;OpenLayers.Marker.prototype.destroy.apply(this,arguments)},setBorder:function(A,B){if(!A){A="red"}if(!B){B=2}this.div.style.border=B+"px solid "+A},draw:function(A,B){OpenLayers.Util.modifyDOMElement(this.div,null,A,B);return this.div},onScreen:function(){var B=false;if(this.map){var A=this.map.getExtent();B=A.containsBounds(this.bounds,true,true)}return B},display:function(A){this.div.style.display=(A)?"":"none"},CLASS_NAME:"OpenLayers.Marker.Box"});(function(){var E=window.XMLHttpRequest;var A=!!window.controllers,H=window.document.all&&!window.opera,I=H&&window.navigator.userAgent.match(/MSIE ([\.0-9]+)/)&&RegExp.$1==7;function C(){this._object=E&&!I?new E:new window.ActiveXObject("Microsoft.XMLHTTP");this._listeners=[]}if(A&&E.wrapped){C.wrapped=E.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(M,P,L,Q,K){delete this._headers;if(arguments.length<3){L=true}this._async=L;var O=this,N=this.readyState,J;if(H&&L){J=function(){if(N!=C.DONE){D(O);O.abort()}};window.attachEvent("onunload",J)}if(C.onopen){C.onopen.apply(this,arguments)}if(arguments.length>4){this._object.open(M,P,L,Q,K)}else{if(arguments.length>3){this._object.open(M,P,L,Q)}else{this._object.open(M,P,L)}}if(!A&&!H){this.readyState=C.OPENED;B(this)}this._object.onreadystatechange=function(){if(A&&!L){return }O.readyState=O._object.readyState;F(O);if(O._aborted){O.readyState=C.UNSENT;return }if(O.readyState==C.DONE){D(O);if(H&&L){window.detachEvent("onunload",J)}}if(N!=O.readyState){B(O)}N=O.readyState}};C.prototype.send=function(J){if(C.onsend){C.onsend.apply(this,arguments)}if(J&&J.nodeType){J=window.XMLSerializer?new window.XMLSerializer().serializeToString(J):J.xml;if(!this._headers["Content-Type"]){this._object.setRequestHeader("Content-Type","application/xml")}}this._object.send(J);if(A&&!this._async){this.readyState=C.OPENED;F(this);while(this.readyState<C.DONE){this.readyState++;B(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();D(this)};C.prototype.getAllResponseHeaders=function(){return this._object.getAllResponseHeaders()};C.prototype.getResponseHeader=function(J){return this._object.getResponseHeader(J)};C.prototype.setRequestHeader=function(J,K){if(!this._headers){this._headers={}}this._headers[J]=K;return this._object.setRequestHeader(J,K)};C.prototype.addEventListener=function(M,L,K){for(var J=0,N;N=this._listeners[J];J++){if(N[0]==M&&N[1]==L&&N[2]==K){return }}this._listeners.push([M,L,K])};C.prototype.removeEventListener=function(M,L,K){for(var J=0,N;N=this._listeners[J];J++){if(N[0]==M&&N[1]==L&&N[2]==K){break}}if(N){this._listeners.splice(J,1)}};C.prototype.dispatchEvent=function(K){var L={type:K.type,target:this,currentTarget:this,eventPhase:2,bubbles:K.bubbles,cancelable:K.cancelable,timeStamp:K.timeStamp,stopPropagation:function(){},preventDefault:function(){},initEvent:function(){}};if(L.type=="readystatechange"&&this.onreadystatechange){(this.onreadystatechange.handleEvent||this.onreadystatechange).apply(this,[L])}for(var J=0,M;M=this._listeners[J];J++){if(M[0]==L.type&&!M[2]){(M[1].handleEvent||M[1]).apply(this,[L])}}};C.prototype.toString=function(){return"[object XMLHttpRequest]"};C.toString=function(){return"[XMLHttpRequest]"};function B(J){if(C.onreadystatechange){C.onreadystatechange.apply(J)}J.dispatchEvent({type:"readystatechange",bubbles:false,cancelable:false,timeStamp:new Date+0})}function G(L){var K=L.responseXML,J=L.responseText;if(H&&J&&K&&!K.documentElement&&L.getResponseHeader("Content-Type").match(/[^\/]+\/[^\+]+\+xml/)){K=new window.ActiveXObject("Microsoft.XMLDOM");K.async=false;K.validateOnParse=false;K.loadXML(J)}if(K){if((H&&K.parseError!=0)||!K.documentElement||(K.documentElement&&K.documentElement.tagName=="parsererror")){return null}}return K}function F(J){try{J.responseText=J._object.responseText}catch(K){}try{J.responseXML=G(J._object)}catch(K){}try{J.status=J._object.status}catch(K){}try{J.statusText=J._object.statusText}catch(K){}}function D(J){J._object.onreadystatechange=new window.Function}if(!window.Function.prototype.apply){window.Function.prototype.apply=function(J,K){if(!K){K=[]}J.__func=this;J.__func(K[0],K[1],K[2],K[3],K[4]);delete J.__func}}OpenLayers.Request.XMLHttpRequest=C})();OpenLayers.Tile.Image.IFrame=OpenLayers.Class(OpenLayers.Tile.Image,{initialize:function(D,A,E,B,C){OpenLayers.Tile.Image.prototype.initialize.apply(this,arguments);this.layerAlphaHack=false},destroy:function(){if(this.imgDiv!=null){OpenLayers.Event.stopObservingElement(this.imgDiv.firstChild)}OpenLayers.Tile.Image.prototype.destroy.apply(this,arguments)},clear:function(){if(this.imgDiv){var A=this.imgDiv.firstChild;OpenLayers.Event.stopObservingElement(A);this.imgDiv.removeChild(A)}},clone:function(A){if(A==null){A=new OpenLayers.Tile.Image.IFrame(this.layer,this.position,this.bounds,this.url,this.size)}A=OpenLayers.Tile.Image.prototype.clone.apply(this,[A]);return A},renderTile:function(){if(OpenLayers.Tile.Image.prototype.renderTile.apply(this,arguments)){var A=this.createRequestForm();this.imgDiv.appendChild(A);A.submit();this.imgDiv.removeChild(A)}},initImgDiv:function(){this.imgDiv=this.createImgDiv();OpenLayers.Util.modifyDOMElement(this.imgDiv,this.id,null,this.layer.getImageSize(),"relative");this.imgDiv.className="olTileImage";this.frame.appendChild(this.imgDiv);this.layer.div.appendChild(this.frame);if(this.layer.opacity!=null){OpenLayers.Util.modifyDOMElement(this.imgDiv,null,null,null,null,null,null,this.layer.opacity)}this.imgDiv.map=this.layer.map},createImgDiv:function(){var B=document.createElement("div");if(OpenLayers.Util.getBrowserName()=="msie"){B.style.backgroundColor="#FFFFFF";B.style.filter="chroma(color=#FFFFFF)"}OpenLayers.Util.modifyDOMElement(B,null,new OpenLayers.Pixel(0,0),this.layer.getImageSize(),"absolute");var A=document.createElement("div");A.appendChild(B);return A},createIFrame:function(){var C=this.id+"_iFrame";var A;if(OpenLayers.Util.getBrowserName()=="msie"){A=document.createElement('<iframe name="'+C+'">');A.style.backgroundColor="#FFFFFF";A.style.filter="chroma(color=#FFFFFF)"}else{A=document.createElement("iframe");A.style.backgroundColor="transparent";A.name=C}A.id=C;A.scrolling="no";A.marginWidth="0px";A.marginHeight="0px";A.frameBorder="0";OpenLayers.Util.modifyDOMElement(A,C,new OpenLayers.Pixel(0,0),this.layer.getImageSize(),"absolute");var B=function(){this.show();if(this.isLoading){this.isLoading=false;this.events.triggerEvent("loadend")}};OpenLayers.Event.observe(A,"load",OpenLayers.Function.bind(B,this));return A},createRequestForm:function(){var B=document.createElement("form");B.method="POST";var F=this.layer.params._OLSALT;F=(F?F+"_":"")+this.bounds.toBBOX();B.action=OpenLayers.Util.urlAppend(this.layer.url,F);this.imgDiv.insertBefore(this.createIFrame(),this.imgDiv.firstChild);B.target=this.id+"_iFrame";var C=this.layer.getImageSize();var E=OpenLayers.Util.extend({BBOX:this.encodeBBOX?this.bounds.toBBOX():this.bounds.toArray(),WIDTH:C.w,HEIGHT:C.h},this.layer.params);for(var A in E){var D=document.createElement("input");D.type="hidden";D.name=A;D.value=E[A];B.appendChild(D)}return B},CLASS_NAME:"OpenLayers.Tile.Image.IFrame"});OpenLayers.ProxyHost="";OpenLayers.nullHandler=function(A){OpenLayers.Console.userError(OpenLayers.i18n("unhandledRequest",{statusText:A.statusText}))};OpenLayers.loadURL=function(D,G,B,E,C){if(typeof G=="string"){G=OpenLayers.Util.getParameters(G)}var F=(E)?E:OpenLayers.nullHandler;var A=(C)?C:OpenLayers.nullHandler;return OpenLayers.Request.GET({url:D,params:G,success:F,failure:A,scope:B})};OpenLayers.parseXMLString=function(C){var A=C.indexOf("<");if(A>0){C=C.substring(A)}var B=OpenLayers.Util.Try(function(){var D=new ActiveXObject("Microsoft.XMLDOM");D.loadXML(C);return D},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});return B};OpenLayers.Ajax={emptyFunction:function(){},getTransport:function(){return OpenLayers.Util.Try(function(){return new XMLHttpRequest()},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")})||false},activeRequestCount:0};OpenLayers.Ajax.Responders={responders:[],register:function(B){for(var A=0;A<this.responders.length;A++){if(B==this.responders[A]){return }}this.responders.push(B)},unregister:function(A){OpenLayers.Util.removeItem(this.reponders,A)},dispatch:function(F,C,E){var A;for(var B=0;B<this.responders.length;B++){A=this.responders[B];if(A[F]&&typeof A[F]=="function"){try{A[F].apply(A,[C,E])}catch(D){}}}}};OpenLayers.Ajax.Responders.register({onCreate:function(){OpenLayers.Ajax.activeRequestCount++},onComplete:function(){OpenLayers.Ajax.activeRequestCount--}});OpenLayers.Ajax.Base=OpenLayers.Class({initialize:function(A){this.options={method:"post",asynchronous:true,contentType:"application/xml",parameters:""};OpenLayers.Util.extend(this.options,A||{});this.options.method=this.options.method.toLowerCase();if(typeof this.options.parameters=="string"){this.options.parameters=OpenLayers.Util.getParameters(this.options.parameters)}}});OpenLayers.Ajax.Request=OpenLayers.Class(OpenLayers.Ajax.Base,{_complete:false,initialize:function(B,A){OpenLayers.Ajax.Base.prototype.initialize.apply(this,[A]);if(OpenLayers.ProxyHost&&OpenLayers.String.startsWith(B,"http")){B=OpenLayers.ProxyHost+encodeURIComponent(B)}this.transport=OpenLayers.Ajax.getTransport();this.request(B)},request:function(B){this.url=B;this.method=this.options.method;var D=OpenLayers.Util.extend({},this.options.parameters);if(this.method!="get"&&this.method!="post"){D._method=this.method;this.method="post"}this.parameters=D;if(D=OpenLayers.Util.getParameterString(D)){if(this.method=="get"){this.url+=((this.url.indexOf("?")>-1)?"&":"?")+D}else{if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){D+="&_="}}}try{var A=new OpenLayers.Ajax.Response(this);if(this.options.onCreate){this.options.onCreate(A)}OpenLayers.Ajax.Responders.dispatch("onCreate",this,A);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);if(this.options.asynchronous){window.setTimeout(OpenLayers.Function.bind(this.respondToReadyState,this,1),10)}this.transport.onreadystatechange=OpenLayers.Function.bind(this.onStateChange,this);this.setRequestHeaders();this.body=this.method=="post"?(this.options.postBody||D):null;this.transport.send(this.body);if(!this.options.asynchronous&&this.transport.overrideMimeType){this.onStateChange()}}catch(C){this.dispatchException(C)}},onStateChange:function(){var A=this.transport.readyState;if(A>1&&!((A==4)&&this._complete)){this.respondToReadyState(this.transport.readyState)}},setRequestHeaders:function(){var E={"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript, text/html, application/xml, text/xml, */*",OpenLayers:true};if(this.method=="post"){E["Content-type"]=this.options.contentType+(this.options.encoding?"; charset="+this.options.encoding:"");if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005){E.Connection="close"}}if(typeof this.options.requestHeaders=="object"){var C=this.options.requestHeaders;if(typeof C.push=="function"){for(var B=0,D=C.length;B<D;B+=2){E[C[B]]=C[B+1]}}else{for(var B in C){E[B]=C[B]}}}for(var A in E){this.transport.setRequestHeader(A,E[A])}},success:function(){var A=this.getStatus();return !A||(A>=200&&A<300)},getStatus:function(){try{return this.transport.status||0}catch(A){return 0}},respondToReadyState:function(A){var C=OpenLayers.Ajax.Request.Events[A];var B=new OpenLayers.Ajax.Response(this);if(C=="Complete"){try{this._complete=true;(this.options["on"+B.status]||this.options["on"+(this.success()?"Success":"Failure")]||OpenLayers.Ajax.emptyFunction)(B)}catch(D){this.dispatchException(D)}var E=B.getHeader("Content-type")}try{(this.options["on"+C]||OpenLayers.Ajax.emptyFunction)(B);OpenLayers.Ajax.Responders.dispatch("on"+C,this,B)}catch(D){this.dispatchException(D)}if(C=="Complete"){this.transport.onreadystatechange=OpenLayers.Ajax.emptyFunction}},getHeader:function(A){try{return this.transport.getResponseHeader(A)}catch(B){return null}},dispatchException:function(C){var D=this.options.onException;if(D){D(this,C);OpenLayers.Ajax.Responders.dispatch("onException",this,C)}else{var E=false;var A=OpenLayers.Ajax.Responders.responders;for(var B=0;B<A.length;B++){if(A[B].onException){E=true;break}}if(E){OpenLayers.Ajax.Responders.dispatch("onException",this,C)}else{throw C}}}});OpenLayers.Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];OpenLayers.Ajax.Response=OpenLayers.Class({status:0,statusText:"",initialize:function(C){this.request=C;var D=this.transport=C.transport,A=this.readyState=D.readyState;if((A>2&&!(!!(window.attachEvent&&!window.opera)))||A==4){this.status=this.getStatus();this.statusText=this.getStatusText();this.responseText=D.responseText==null?"":String(D.responseText)}if(A==4){var B=D.responseXML;this.responseXML=B===undefined?null:B}},getStatus:OpenLayers.Ajax.Request.prototype.getStatus,getStatusText:function(){try{return this.transport.statusText||""}catch(A){return""}},getHeader:OpenLayers.Ajax.Request.prototype.getHeader,getResponseHeader:function(A){return this.transport.getResponseHeader(A)}});OpenLayers.Ajax.getElementsByTagNameNS=function(B,A,C,E){var D=null;if(B.getElementsByTagNameNS){D=B.getElementsByTagNameNS(A,E)}else{D=B.getElementsByTagName(C+":"+E)}return D};OpenLayers.Ajax.serializeXMLToString=function(A){var B=new XMLSerializer();var C=B.serializeToString(A);return C};OpenLayers.Control.DragFeature=OpenLayers.Class(OpenLayers.Control,{geometryTypes:null,onStart:function(B,A){},onDrag:function(B,A){},onComplete:function(B,A){},documentDrag:false,layer:null,feature:null,dragCallbacks:{},featureCallbacks:{},lastPixel:null,initialize:function(B,A){OpenLayers.Control.prototype.initialize.apply(this,[A]);this.layer=B;this.handlers={drag:new OpenLayers.Handler.Drag(this,OpenLayers.Util.extend({down:this.downFeature,move:this.moveFeature,up:this.upFeature,out:this.cancel,done:this.doneDragging},this.dragCallbacks),{documentDrag:this.documentDrag}),feature:new OpenLayers.Handler.Feature(this,this.layer,OpenLayers.Util.extend({over:this.overFeature,out:this.outFeature},this.featureCallbacks),{geometryTypes:this.geometryTypes})}},destroy:function(){this.layer=null;OpenLayers.Control.prototype.destroy.apply(this,[])},activate:function(){return(this.handlers.feature.activate()&&OpenLayers.Control.prototype.activate.apply(this,arguments))},deactivate:function(){this.handlers.drag.deactivate();this.handlers.feature.deactivate();this.feature=null;this.dragging=false;this.lastPixel=null;OpenLayers.Element.removeClass(this.map.viewPortDiv,this.displayClass+"Over");return OpenLayers.Control.prototype.deactivate.apply(this,arguments)},overFeature:function(A){if(!this.handlers.drag.dragging){this.feature=A;this.handlers.drag.activate();this.over=true;OpenLayers.Element.addClass(this.map.viewPortDiv,this.displayClass+"Over")}else{if(this.feature.id==A.id){this.over=true}else{this.over=false}}},downFeature:function(A){this.lastPixel=A;this.onStart(this.feature,A)},moveFeature:function(A){var B=this.map.getResolution();this.feature.geometry.move(B*(A.x-this.lastPixel.x),B*(this.lastPixel.y-A.y));this.layer.drawFeature(this.feature);this.lastPixel=A;this.onDrag(this.feature,A)},upFeature:function(A){if(!this.over){this.handlers.drag.deactivate()}},doneDragging:function(A){this.onComplete(this.feature,A)},outFeature:function(A){if(!this.handlers.drag.dragging){this.over=false;this.handlers.drag.deactivate();OpenLayers.Element.removeClass(this.map.viewPortDiv,this.displayClass+"Over");this.feature=null}else{if(this.feature.id==A.id){this.over=false}}},cancel:function(){this.handlers.drag.deactivate();this.over=false},setMap:function(A){this.handlers.drag.setMap(A);this.handlers.feature.setMap(A);OpenLayers.Control.prototype.setMap.apply(this,arguments)},CLASS_NAME:"OpenLayers.Control.DragFeature"});OpenLayers.Control.DragPan=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOOL,panned:false,interval:25,documentDrag:false,draw:function(){this.handler=new OpenLayers.Handler.Drag(this,{move:this.panMap,done:this.panMapDone},{interval:this.interval,documentDrag:this.documentDrag})},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,{autoActivate:true,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})},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.Control.WMSGetFeatureInfo=OpenLayers.Class(OpenLayers.Control,{hover:false,drillDown:false,maxFeatures:10,clickCallback:"click",layers:null,queryVisible:false,url:null,layerUrls:null,infoFormat:"text/html",vendorParams:{},format:null,formatOptions:null,handlerOptions:null,handler:null,hoverRequest:null,EVENT_TYPES:["beforegetfeatureinfo","nogetfeatureinfo","getfeatureinfo"],initialize:function(A){this.EVENT_TYPES=OpenLayers.Control.WMSGetFeatureInfo.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);A=A||{};A.handlerOptions=A.handlerOptions||{};OpenLayers.Control.prototype.initialize.apply(this,[A]);if(!this.format){this.format=new OpenLayers.Format.WMSGetFeatureInfo(A.formatOptions)}if(this.drillDown===true){this.hover=false}if(this.hover){this.handler=new OpenLayers.Handler.Hover(this,{move:this.cancelHover,pause:this.getInfoForHover},OpenLayers.Util.extend(this.handlerOptions.hover||{},{delay:250}))}else{var B={};B[this.clickCallback]=this.getInfoForClick;this.handler=new OpenLayers.Handler.Click(this,B,this.handlerOptions.click||{})}},activate:function(){if(!this.active){this.handler.activate()}return OpenLayers.Control.prototype.activate.apply(this,arguments)},deactivate:function(){return OpenLayers.Control.prototype.deactivate.apply(this,arguments)},getInfoForClick:function(A){this.events.triggerEvent("beforegetfeatureinfo",{xy:A.xy});OpenLayers.Element.addClass(this.map.viewPortDiv,"olCursorWait");this.request(A.xy,{})},getInfoForHover:function(A){this.events.triggerEvent("beforegetfeatureinfo",{xy:A.xy});this.request(A.xy,{hover:true})},cancelHover:function(){if(this.hoverRequest){this.hoverRequest.abort();this.hoverRequest=null}},findLayers:function(){var E=this.layers||this.map.layers;var F=[];var D,B;for(var C=0,A=E.length;C<A;++C){D=E[C];if(D instanceof OpenLayers.Layer.WMS&&(!this.queryVisible||D.getVisibility())){B=D.url instanceof Array?D.url[0]:D.url;if(this.drillDown===false&&!this.url){this.url=B}if(this.drillDown===true||this.urlMatches(B)){F.push(D)}}}return F},urlMatches:function(B){var D=OpenLayers.Util.isEquivalentUrl(this.url,B);if(!D&&this.layerUrls){for(var C=0,A=this.layerUrls.length;C<A;++C){if(OpenLayers.Util.isEquivalentUrl(this.layerUrls[C],B)){D=true;break}}}return D},buildWMSOptions:function(A,D,B,H){var G=[],I=[];for(var E=0,F=D.length;E<F;E++){G=G.concat(D[E].params.LAYERS);I=I.concat(this.getStyleNames(D[E]))}var C=OpenLayers.Util.extend({service:"WMS",version:D[0].params.VERSION,request:"GetFeatureInfo",layers:G,query_layers:G,styles:I,bbox:this.map.getExtent().toBBOX(null,D[0].reverseAxisOrder()),feature_count:this.maxFeatures,height:this.map.getSize().h,width:this.map.getSize().w,format:H,info_format:this.infoFormat},(parseFloat(D[0].params.VERSION)>=1.3)?{crs:this.map.getProjection(),i:B.x,j:B.y}:{srs:this.map.getProjection(),x:B.x,y:B.y});OpenLayers.Util.applyDefaults(C,this.vendorParams);return{url:A,params:OpenLayers.Util.upperCaseObject(C),callback:function(J){this.handleResponse(B,J)},scope:this}},getStyleNames:function(B){var A;if(B.params.STYLES){A=B.params.STYLES}else{if(B.params.LAYERS instanceof Array){A=new Array(B.params.LAYERS.length)}else{A=B.params.LAYERS.replace(/[^,]/g,"")}}return A},request:function(B,L){var D=this.findLayers();if(D.length==0){this.events.triggerEvent("nogetfeatureinfo");OpenLayers.Element.removeClass(this.map.viewPortDiv,"olCursorWait");return }L=L||{};if(this.drillDown===false){var J=this.buildWMSOptions(this.url,D,B,D[0].params.FORMAT);var C=OpenLayers.Request.GET(J);if(L.hover===true){this.hoverRequest=C}}else{this._requestCount=0;this._numRequests=0;this.features=[];var I={},A;for(var E=0,H=D.length;E<H;E++){var F=D[E];var G,K=false;A=F.url instanceof Array?F.url[0]:F.url;if(A in I){I[A].push(F)}else{this._numRequests++;I[A]=[F]}}var D;for(var A in I){D=I[A];var J=this.buildWMSOptions(A,D,B,D[0].params.FORMAT);OpenLayers.Request.GET(J)}}},triggerGetFeatureInfo:function(B,C,A){this.events.triggerEvent("getfeatureinfo",{text:B.responseText,features:A,request:B,xy:C});OpenLayers.Element.removeClass(this.map.viewPortDiv,"olCursorWait")},handleResponse:function(D,B){var C=B.responseXML;if(!C||!C.documentElement){C=B.responseText}var A=this.format.read(C);if(this.drillDown===false){this.triggerGetFeatureInfo(B,D,A)}else{this._requestCount++;this._features=(this._features||[]).concat(A);if(this._requestCount===this._numRequests){this.triggerGetFeatureInfo(B,D,this._features.concat());delete this._features;delete this._requestCount;delete this._numRequests}}},CLASS_NAME:"OpenLayers.Control.WMSGetFeatureInfo"});OpenLayers.Control.WMTSGetFeatureInfo=OpenLayers.Class(OpenLayers.Control,{hover:false,requestEncoding:"KVP",drillDown:false,maxFeatures:10,clickCallback:"click",layers:null,queryVisible:true,infoFormat:"text/html",vendorParams:{},format:null,formatOptions:null,handlerOptions:null,handler:null,hoverRequest:null,EVENT_TYPES:["beforegetfeatureinfo","getfeatureinfo","exception"],pending:0,initialize:function(A){this.EVENT_TYPES=OpenLayers.Control.WMTSGetFeatureInfo.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);A=A||{};A.handlerOptions=A.handlerOptions||{};OpenLayers.Control.prototype.initialize.apply(this,[A]);if(!this.format){this.format=new OpenLayers.Format.WMSGetFeatureInfo(A.formatOptions)}if(this.drillDown===true){this.hover=false}if(this.hover){this.handler=new OpenLayers.Handler.Hover(this,{move:this.cancelHover,pause:this.getInfoForHover},OpenLayers.Util.extend(this.handlerOptions.hover||{},{delay:250}))}else{var B={};B[this.clickCallback]=this.getInfoForClick;this.handler=new OpenLayers.Handler.Click(this,B,this.handlerOptions.click||{})}},activate:function(){if(!this.active){this.handler.activate()}return OpenLayers.Control.prototype.activate.apply(this,arguments)},deactivate:function(){return OpenLayers.Control.prototype.deactivate.apply(this,arguments)},getInfoForClick:function(A){this.request(A.xy,{})},getInfoForHover:function(A){this.request(A.xy,{hover:true})},cancelHover:function(){if(this.hoverRequest){--this.pending;if(this.pending<=0){OpenLayers.Element.removeClass(this.map.viewPortDiv,"olCursorWait");this.pending=0}this.hoverRequest.abort();this.hoverRequest=null}},findLayers:function(){var C=this.layers||this.map.layers;var D=[];var B;for(var A=C.length-1;A>=0;--A){B=C[A];if(B instanceof OpenLayers.Layer.WMTS&&B.requestEncoding===this.requestEncoding&&(!this.queryVisible||B.getVisibility())){D.push(B);if(!this.drillDown||this.hover){break}}}return D},buildRequestOptions:function(B,C){var F=this.map.getLonLatFromPixel(C);var E=B.getURL(new OpenLayers.Bounds(F.lon,F.lat,F.lon,F.lat));var D=OpenLayers.Util.getParameters(E);var A=B.getTileInfo(F);OpenLayers.Util.extend(D,{service:"WMTS",version:B.version,request:"GetFeatureInfo",infoFormat:this.infoFormat,i:A.i,j:A.j});OpenLayers.Util.applyDefaults(D,this.vendorParams);return{url:B.url instanceof Array?B.url[0]:B.url,params:OpenLayers.Util.upperCaseObject(D),callback:function(G){this.handleResponse(C,G,B)},scope:this}},request:function(H,I){I=I||{};var C=this.findLayers();if(C.length>0){var G,E;for(var D=0,F=C.length;D<F;D++){E=C[D];G=this.events.triggerEvent("beforegetfeatureinfo",{xy:H,layer:E});if(G!==false){++this.pending;var A=this.buildRequestOptions(E,H);var B=OpenLayers.Request.GET(A);if(I.hover===true){this.hoverRequest=B}}}if(this.pending>0){OpenLayers.Element.addClass(this.map.viewPortDiv,"olCursorWait")}}},handleResponse:function(G,E,B){--this.pending;if(this.pending<=0){OpenLayers.Element.removeClass(this.map.viewPortDiv,"olCursorWait");this.pending=0}if(E.status&&(E.status<200||E.status>=300)){this.events.triggerEvent("exception",{xy:G,request:E,layer:B})}else{var F=E.responseXML;if(!F||!F.documentElement){F=E.responseText}var D,C;try{D=this.format.read(F)}catch(A){C=true;this.events.triggerEvent("exception",{xy:G,request:E,error:A,layer:B})}if(!C){this.events.triggerEvent("getfeatureinfo",{text:E.responseText,features:D,request:E,xy:G,layer:B})}}},setMap:function(A){this.handler.setMap(A);OpenLayers.Control.prototype.setMap.apply(this,arguments)},CLASS_NAME:"OpenLayers.Control.WMTSGetFeatureInfo"});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,url: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},getVisibility:function(){return !(this.style&&this.style.display=="none"||!this.layer||this.layer&&this.layer.styleMap&&this.layer.styleMap.createSymbolizer(this,this.renderIntent).display=="none"||this.layer&&!this.layer.getVisibility())},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.Feature.WFS=OpenLayers.Class(OpenLayers.Feature,{initialize:function(C,B){var A=arguments;var D=this.processXMLNode(B);A=new Array(C,D.lonlat,D);OpenLayers.Feature.prototype.initialize.apply(this,A);this.createMarker();this.layer.addMarker(this.marker)},destroy:function(){if(this.marker!=null){this.layer.removeMarker(this.marker)}OpenLayers.Feature.prototype.destroy.apply(this,arguments)},processXMLNode:function(B){var A=OpenLayers.Ajax.getElementsByTagNameNS(B,"http://www.opengis.net/gml","gml","Point");var D=OpenLayers.Util.getXmlNodeValue(OpenLayers.Ajax.getElementsByTagNameNS(A[0],"http://www.opengis.net/gml","gml","coordinates")[0]);var C=D.split(",");return{lonlat:new OpenLayers.LonLat(parseFloat(C[0]),parseFloat(C[1])),id:null}},CLASS_NAME:"OpenLayers.Feature.WFS"});OpenLayers.Format.OWSCommon.v1_0_0=OpenLayers.Class(OpenLayers.Format.OWSCommon.v1,{namespaces:{ows:"http://www.opengis.net/ows/1.0",xlink:"http://www.w3.org/1999/xlink"},readers:{ows:OpenLayers.Format.OWSCommon.v1.prototype.readers.ows},writers:{ows:OpenLayers.Format.OWSCommon.v1.prototype.writers.ows},CLASS_NAME:"OpenLayers.Format.OWSCommon.v1_1_0"});OpenLayers.Format.OWSCommon.v1_1_0=OpenLayers.Class(OpenLayers.Format.OWSCommon.v1,{namespaces:{ows:"http://www.opengis.net/ows/1.1",xlink:"http://www.w3.org/1999/xlink"},readers:{ows:OpenLayers.Util.applyDefaults({AllowedValues:function(A,B){B.allowedValues={};this.readChildNodes(A,B.allowedValues)},AnyValue:function(A,B){B.anyValue=true},Range:function(A,B){B.range={};this.readChildNodes(A,B.range)},MinimumValue:function(B,A){A.minValue=this.getChildValue(B)},MaximumValue:function(B,A){A.maxValue=this.getChildValue(B)},Identifier:function(A,B){B.identifier=this.getChildValue(A)},SupportedCRS:function(A,B){B.supportedCRS=this.getChildValue(A)}},OpenLayers.Format.OWSCommon.v1.prototype.readers.ows)},CLASS_NAME:"OpenLayers.Format.OWSCommon.v1_1_0"});OpenLayers.Format.OWSContext=OpenLayers.Class(OpenLayers.Format.Context,{defaultVersion:"0.3.1",getParser:function(A){var B=A||this.version||this.defaultVersion;if(B==="0.3.0"){B=this.defaultVersion}if(!this.parser||this.parser.VERSION!=B){var C=OpenLayers.Format.OWSContext["v"+B.replace(/\./g,"_")];if(!C){throw"Can't find a OWSContext parser for version "+B}this.parser=new C(this.options)}return this.parser},toContext:function(B){var A={};if(B.CLASS_NAME=="OpenLayers.Map"){A.bounds=B.getExtent();A.maxExtent=B.maxExtent;A.projection=B.projection;A.size=B.getSize();A.layers=B.layers}return A},CLASS_NAME:"OpenLayers.Format.OWSContext"});OpenLayers.Format.WFSCapabilities.v1=OpenLayers.Class(OpenLayers.Format.WFSCapabilities,{initialize:function(A){OpenLayers.Format.XML.prototype.initialize.apply(this,[A]);this.options=A},read:function(C){if(typeof C=="string"){C=OpenLayers.Format.XML.prototype.read.apply(this,[C])}var A={};var B=C.documentElement;this.runChildNodes(A,B);return A},runChildNodes:function(F,E){var C=E.childNodes;var B,D;for(var A=0;A<C.length;++A){B=C[A];if(B.nodeType==1){D=this["read_cap_"+B.nodeName];if(D){D.apply(this,[F,B])}}}},read_cap_FeatureTypeList:function(C,B){var A={featureTypes:[]};this.runChildNodes(A,B);C.featureTypeList=A},read_cap_FeatureType:function(A,D,B){var C={};this.runChildNodes(C,D);A.featureTypes.push(C)},read_cap_Name:function(D,B){var A=this.getChildValue(B);if(A){var C=A.split(":");D.name=C.pop();if(C.length>0){D.featureNS=this.lookupNamespaceURI(B,C[0])}}},read_cap_Title:function(B,A){var C=this.getChildValue(A);if(C){B.title=C}},read_cap_Abstract:function(C,B){var A=this.getChildValue(B);if(A){C["abstract"]=A}},CLASS_NAME:"OpenLayers.Format.WFSCapabilities.v1"});OpenLayers.Format.WMC=OpenLayers.Class(OpenLayers.Format.Context,{defaultVersion:"1.1.0",getParser:function(A){var B=A||this.version||this.defaultVersion;if(!this.parser||this.parser.VERSION!=B){var C=OpenLayers.Format.WMC["v"+B.replace(/\./g,"_")];if(!C){throw"Can't find a WMC parser for version "+B}this.parser=new C(this.options)}return this.parser},layerToContext:function(A){var C=this.getParser();var B={queryable:A.queryable,visibility:A.visibility,name:A.params.LAYERS,title:A.name,metadataURL:A.metadataURL,version:A.params.VERSION,url:A.url,maxExtent:A.maxExtent,transparent:A.params.TRANSPARENT,numZoomLevels:A.numZoomLevels,units:A.units,isBaseLayer:A.isBaseLayer,opacity:A.opacity,displayInLayerSwitcher:A.displayInLayerSwitcher,singleTile:A.singleTile,tileSize:(A.singleTile||!A.tileSize)?undefined:{width:A.tileSize.w,height:A.tileSize.h},minScale:(A.options.resolutions||A.options.scales||A.options.maxResolution||A.options.minScale)?A.minScale:undefined,maxScale:(A.options.resolutions||A.options.scales||A.options.minResolution||A.options.maxScale)?A.maxScale:undefined,formats:[{value:A.params.FORMAT,current:true}],styles:[{href:A.params.SLD,body:A.params.SLD_BODY,name:A.params.STYLES||C.defaultStyleName,title:C.defaultStyleTitle,current:true}]};return B},toContext:function(F){var D={};var E=F.layers;if(F.CLASS_NAME=="OpenLayers.Map"){D.bounds=F.getExtent();D.maxExtent=F.maxExtent;D.projection=F.projection;D.size=F.getSize()}else{OpenLayers.Util.applyDefaults(D,F);if(D.layers!=undefined){delete (D.layers)}}if(D.layersContext==undefined){D.layersContext=[]}if(E!=undefined&&E instanceof Array){for(var C=0,A=E.length;C<A;C++){var B=E[C];if(B instanceof OpenLayers.Layer.WMS){D.layersContext.push(this.layerToContext(B))}}}return D},CLASS_NAME:"OpenLayers.Format.WMC"});OpenLayers.Format.WMSCapabilities.v1=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{wms:"http://www.opengis.net/wms",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},defaultPrefix:"wms",initialize:function(A){OpenLayers.Format.XML.prototype.initialize.apply(this,[A])},read:function(B){if(typeof B=="string"){B=OpenLayers.Format.XML.prototype.read.apply(this,[B])}if(B&&B.nodeType==9){B=B.documentElement}var A={};this.readNode(B,A);this.postProcessLayers(A);return A},postProcessLayers:function(B){if(B.capability){B.capability.layers=[];var E=B.capability.nestedLayers;for(var D=0,A=E.length;D<A;++D){var C=E[D];this.processLayer(B.capability,C)}}},processLayer:function(A,I,C){if(I.formats===undefined){I.formats=A.request.getmap.formats}if(C){I.styles=I.styles.concat(C.styles);var F=["queryable","cascaded","fixedWidth","fixedHeight","opaque","noSubsets","llbbox","minScale","maxScale","attribution"];var L=["srs","bbox","dimensions","authorityURLs"];var K;for(var E=0;E<F.length;E++){K=F[E];if(K in C){if(I[K]==null){I[K]=C[K]}if(I[K]==null){var H=["cascaded","fixedWidth","fixedHeight"];var B=["queryable","opaque","noSubsets"];if(OpenLayers.Util.indexOf(H,K)!=-1){I[K]=0}if(OpenLayers.Util.indexOf(B,K)!=-1){I[K]=false}}}}for(var E=0;E<L.length;E++){K=L[E];I[K]=OpenLayers.Util.extend(I[K],C[K])}}for(var G=0,J=I.nestedLayers.length;G<J;G++){var D=I.nestedLayers[G];this.processLayer(A,D,I)}if(I.name){A.layers.push(I)}},readers:{wms:{Service:function(A,B){B.service={};this.readChildNodes(A,B.service)},Name:function(A,B){B.name=this.getChildValue(A)},Title:function(A,B){B.title=this.getChildValue(A)},Abstract:function(A,B){B["abstract"]=this.getChildValue(A)},BoundingBox:function(B,C){var D={};D.bbox=[parseFloat(B.getAttribute("minx")),parseFloat(B.getAttribute("miny")),parseFloat(B.getAttribute("maxx")),parseFloat(B.getAttribute("maxy"))];var A={x:parseFloat(B.getAttribute("resx")),y:parseFloat(B.getAttribute("resy"))};if(!(isNaN(A.x)&&isNaN(A.y))){D.res=A}return D},OnlineResource:function(A,B){B.href=this.getAttributeNS(A,this.namespaces.xlink,"href")},ContactInformation:function(A,B){B.contactInformation={};this.readChildNodes(A,B.contactInformation)},ContactPersonPrimary:function(A,B){B.personPrimary={};this.readChildNodes(A,B.personPrimary)},ContactPerson:function(A,B){B.person=this.getChildValue(A)},ContactOrganization:function(A,B){B.organization=this.getChildValue(A)},ContactPosition:function(A,B){B.position=this.getChildValue(A)},ContactAddress:function(A,B){B.contactAddress={};this.readChildNodes(A,B.contactAddress)},AddressType:function(A,B){B.type=this.getChildValue(A)},Address:function(A,B){B.address=this.getChildValue(A)},City:function(A,B){B.city=this.getChildValue(A)},StateOrProvince:function(A,B){B.stateOrProvince=this.getChildValue(A)},PostCode:function(A,B){B.postcode=this.getChildValue(A)},Country:function(A,B){B.country=this.getChildValue(A)},ContactVoiceTelephone:function(A,B){B.phone=this.getChildValue(A)},ContactFacsimileTelephone:function(A,B){B.fax=this.getChildValue(A)},ContactElectronicMailAddress:function(A,B){B.email=this.getChildValue(A)},Fees:function(B,C){var A=this.getChildValue(B);if(A&&A.toLowerCase()!="none"){C.fees=A}},AccessConstraints:function(A,B){var C=this.getChildValue(A);if(C&&C.toLowerCase()!="none"){B.accessConstraints=C}},Capability:function(A,B){B.capability={nestedLayers:[]};this.readChildNodes(A,B.capability)},Request:function(A,B){B.request={};this.readChildNodes(A,B.request)},GetCapabilities:function(A,B){B.getcapabilities={formats:[]};this.readChildNodes(A,B.getcapabilities)},Format:function(A,B){if(B.formats instanceof Array){B.formats.push(this.getChildValue(A))}else{B.format=this.getChildValue(A)}},DCPType:function(A,B){this.readChildNodes(A,B)},HTTP:function(A,B){this.readChildNodes(A,B)},Get:function(A,B){this.readChildNodes(A,B)},Post:function(A,B){this.readChildNodes(A,B)},GetMap:function(A,B){B.getmap={formats:[]};this.readChildNodes(A,B.getmap)},GetFeatureInfo:function(A,B){B.getfeatureinfo={formats:[]};this.readChildNodes(A,B.getfeatureinfo)},Exception:function(A,B){B.exception={formats:[]};this.readChildNodes(A,B.exception)},Layer:function(B,E){var K=B.getAttributeNode("queryable");var C=(K&&K.specified)?B.getAttribute("queryable"):null;K=B.getAttributeNode("cascaded");var I=(K&&K.specified)?B.getAttribute("cascaded"):null;K=B.getAttributeNode("opaque");var F=(K&&K.specified)?B.getAttribute("opaque"):null;var J=B.getAttribute("noSubsets");var A=B.getAttribute("fixedWidth");var H=B.getAttribute("fixedHeight");var G={nestedLayers:[],styles:[],srs:{},metadataURLs:[],bbox:{},dimensions:{},authorityURLs:{},identifiers:{},keywords:[],queryable:(C&&C!=="")?(C==="1"||C==="true"):null,cascaded:(I!==null)?parseInt(I):null,opaque:F?(F==="1"||F==="true"):null,noSubsets:(J!==null)?(J==="1"||J==="true"):null,fixedWidth:(A!=null)?parseInt(A):null,fixedHeight:(H!=null)?parseInt(H):null};E.nestedLayers.push(G);this.readChildNodes(B,G);if(G.name){var D=G.name.split(":");if(D.length>0){G.prefix=D[0]}}},Attribution:function(A,B){B.attribution={};this.readChildNodes(A,B.attribution)},LogoURL:function(A,B){B.logo={width:A.getAttribute("width"),height:A.getAttribute("height")};this.readChildNodes(A,B.logo)},Style:function(B,C){var A={};C.styles.push(A);this.readChildNodes(B,A)},LegendURL:function(B,C){var A={width:B.getAttribute("width"),height:B.getAttribute("height")};C.legend=A;this.readChildNodes(B,A)},MetadataURL:function(A,B){var C={type:A.getAttribute("type")};B.metadataURLs.push(C);this.readChildNodes(A,C)},DataURL:function(A,B){B.dataURL={};this.readChildNodes(A,B.dataURL)},FeatureListURL:function(A,B){B.featureListURL={};this.readChildNodes(A,B.featureListURL)},AuthorityURL:function(B,D){var A=B.getAttribute("name");var C={};this.readChildNodes(B,C);D.authorityURLs[A]=C.href},Identifier:function(A,C){var B=A.getAttribute("authority");C.identifiers[B]=this.getChildValue(A)},KeywordList:function(A,B){this.readChildNodes(A,B)},SRS:function(A,B){B.srs[this.getChildValue(A)]=true}}},CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1"});OpenLayers.Format.WMSDescribeLayer.v1_1=OpenLayers.Class(OpenLayers.Format.WMSDescribeLayer,{initialize:function(A){OpenLayers.Format.WMSDescribeLayer.prototype.initialize.apply(this,[A])},read:function(D){if(typeof D=="string"){D=OpenLayers.Format.XML.prototype.read.apply(this,[D])}var I=D.documentElement;var B=I.childNodes;var F=[];var A,L;for(var E=0;E<B.length;++E){A=B[E];L=A.nodeName;if(L=="LayerDescription"){var G=A.getAttribute("name");var K="";var C="";var J="";if(A.getAttribute("owsType")){K=A.getAttribute("owsType");C=A.getAttribute("owsURL")}else{if(A.getAttribute("wfs")!=""){K="WFS";C=A.getAttribute("wfs")}else{if(A.getAttribute("wcs")!=""){K="WCS";C=A.getAttribute("wcs")}}}var H=A.getElementsByTagName("Query");if(H.length>0){J=H[0].getAttribute("typeName");if(!J){J=H[0].getAttribute("typename")}}F.push({layerName:G,owsType:K,owsURL:C,typeName:J})}}return F},CLASS_NAME:"OpenLayers.Format.WMSDescribeLayer.v1_1"});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})},destroy:function(){if(this.dragHandler){this.dragHandler.destroy();this.dragHandler=null}OpenLayers.Handler.prototype.destroy.apply(this,arguments)},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.Handler.RegularPolygon=OpenLayers.Class(OpenLayers.Handler.Drag,{sides:4,radius:null,snapAngle:null,snapToggle:"shiftKey",layerOptions:null,persist:false,irregular:false,angle:null,fixedRadius:false,feature:null,layer:null,origin:null,initialize:function(C,B,A){if(!(A&&A.layerOptions&&A.layerOptions.styleMap)){this.style=OpenLayers.Util.extend(OpenLayers.Feature.Vector.style["default"],{})}OpenLayers.Handler.prototype.initialize.apply(this,[C,B,A]);this.options=(A)?A:{}},setOptions:function(A){OpenLayers.Util.extend(this.options,A);OpenLayers.Util.extend(this,A)},activate:function(){var A=false;if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){var B=OpenLayers.Util.extend({displayInLayerSwitcher:false,calculateInRange:OpenLayers.Function.True},this.layerOptions);this.layer=new OpenLayers.Layer.Vector(this.CLASS_NAME,B);this.map.addLayer(this.layer);A=true}return A},deactivate:function(){var A=false;if(OpenLayers.Handler.Drag.prototype.deactivate.apply(this,arguments)){if(this.dragging){this.cancel()}if(this.layer.map!=null){this.layer.destroy(false);if(this.feature){this.feature.destroy()}}this.layer=null;this.feature=null;A=true}return A},down:function(A){this.fixedRadius=!!(this.radius);var B=this.map.getLonLatFromPixel(A.xy);this.origin=new OpenLayers.Geometry.Point(B.lon,B.lat);if(!this.fixedRadius||this.irregular){this.radius=this.map.getResolution()}if(this.persist){this.clear()}this.feature=new OpenLayers.Feature.Vector();this.createGeometry();this.callback("create",[this.origin,this.feature]);this.layer.addFeatures([this.feature],{silent:true});this.layer.drawFeature(this.feature,this.style)},move:function(C){var F=this.map.getLonLatFromPixel(C.xy);var A=new OpenLayers.Geometry.Point(F.lon,F.lat);if(this.irregular){var G=Math.sqrt(2)*Math.abs(A.y-this.origin.y)/2;this.radius=Math.max(this.map.getResolution()/2,G)}else{if(this.fixedRadius){this.origin=A}else{this.calculateAngle(A,C);this.radius=Math.max(this.map.getResolution()/2,A.distanceTo(this.origin))}}this.modifyGeometry();if(this.irregular){var D=A.x-this.origin.x;var B=A.y-this.origin.y;var E;if(B==0){E=D/(this.radius*Math.sqrt(2))}else{E=D/B}this.feature.geometry.resize(1,this.origin,E);this.feature.geometry.move(D/2,B/2)}this.layer.drawFeature(this.feature,this.style)},up:function(A){this.finalize();if(this.start==this.last){this.callback("done",[A.xy])}},out:function(A){this.finalize()},createGeometry:function(){this.angle=Math.PI*((1/this.sides)-(1/2));if(this.snapAngle){this.angle+=this.snapAngle*(Math.PI/180)}this.feature.geometry=OpenLayers.Geometry.Polygon.createRegularPolygon(this.origin,this.radius,this.sides,this.snapAngle)},modifyGeometry:function(){var D,A;var B=this.feature.geometry.components[0];if(B.components.length!=(this.sides+1)){this.createGeometry();B=this.feature.geometry.components[0]}for(var C=0;C<this.sides;++C){A=B.components[C];D=this.angle+(C*2*Math.PI/this.sides);A.x=this.origin.x+(this.radius*Math.cos(D));A.y=this.origin.y+(this.radius*Math.sin(D));A.clearBounds()}},calculateAngle:function(A,B){var D=Math.atan2(A.y-this.origin.y,A.x-this.origin.x);if(this.snapAngle&&(this.snapToggle&&!B[this.snapToggle])){var C=(Math.PI/180)*this.snapAngle;this.angle=Math.round(D/C)*C}else{this.angle=D}},cancel:function(){this.callback("cancel",null);this.finalize()},finalize:function(){this.origin=null;this.radius=this.options.radius},clear:function(){if(this.layer){this.layer.renderer.clear();this.layer.destroyFeatures()}},callback:function(B,A){if(this.callbacks[B]){this.callbacks[B].apply(this.control,[this.feature.geometry.clone()])}if(!this.persist&&(B=="done"||B=="cancel")){this.clear()}},CLASS_NAME:"OpenLayers.Handler.RegularPolygon"});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;this.pane=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)}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.HTTPRequest=OpenLayers.Class(OpenLayers.Layer,{URL_HASH_FACTOR:(Math.sqrt(5)-1)/2,url:null,params:null,reproject:false,initialize:function(D,C,E,B){var A=arguments;A=[D,B];OpenLayers.Layer.prototype.initialize.apply(this,A);this.url=C;this.params=OpenLayers.Util.extend({},E)},destroy:function(){this.url=null;this.params=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments)},clone:function(A){if(A==null){A=new OpenLayers.Layer.HTTPRequest(this.name,this.url,this.params,this.getOptions())}A=OpenLayers.Layer.prototype.clone.apply(this,[A]);return A},setUrl:function(A){this.url=A},mergeNewParams:function(B){this.params=OpenLayers.Util.extend(this.params,B);var A=this.redraw();if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"params"})}return A},redraw:function(A){if(A){return this.mergeNewParams({_olSalt:Math.random()})}else{return OpenLayers.Layer.prototype.redraw.apply(this,[])}},selectUrl:function(E,D){var C=1;for(var B=0,A=E.length;B<A;B++){C*=E.charCodeAt(B)*this.URL_HASH_FACTOR;C-=Math.floor(C)}return D[Math.floor(C*D.length)]},getFullRequestString:function(G,D){var B=D||this.url;var F=OpenLayers.Util.extend({},this.params);F=OpenLayers.Util.extend(F,G);var E=OpenLayers.Util.getParameterString(F);if(B instanceof Array){B=this.selectUrl(E,B)}var A=OpenLayers.Util.upperCaseObject(OpenLayers.Util.getParameters(B));for(var C in F){if(C.toUpperCase() in A){delete F[C]}}E=OpenLayers.Util.getParameterString(F);return OpenLayers.Util.urlAppend(B,E)},CLASS_NAME:"OpenLayers.Layer.HTTPRequest"});OpenLayers.Layer.Image=OpenLayers.Class(OpenLayers.Layer,{isBaseLayer:true,url:null,extent:null,size:null,tile:null,aspectRatio:null,initialize:function(C,B,E,D,A){this.url=B;this.extent=E;this.maxExtent=E;this.size=D;OpenLayers.Layer.prototype.initialize.apply(this,[C,A]);this.aspectRatio=(this.extent.getHeight()/this.size.h)/(this.extent.getWidth()/this.size.w)},destroy:function(){if(this.tile){this.removeTileMonitoringHooks(this.tile);this.tile.destroy();this.tile=null}OpenLayers.Layer.prototype.destroy.apply(this,arguments)},clone:function(A){if(A==null){A=new OpenLayers.Layer.Image(this.name,this.url,this.extent,this.size,this.getOptions())}A=OpenLayers.Layer.prototype.clone.apply(this,[A]);return A},setMap:function(A){if(this.options.maxResolution==null){this.options.maxResolution=this.aspectRatio*this.extent.getWidth()/this.size.w}OpenLayers.Layer.prototype.setMap.apply(this,arguments)},moveTo:function(E,A,F){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);var B=(this.tile==null);if(A||B){this.setTileSize();var D=new OpenLayers.LonLat(this.extent.left,this.extent.top);var C=this.map.getLayerPxFromLonLat(D);if(B){this.tile=new OpenLayers.Tile.Image(this,C,this.extent,null,this.tileSize);this.addTileMonitoringHooks(this.tile)}else{this.tile.size=this.tileSize.clone();this.tile.position=C.clone()}this.tile.draw()}},setTileSize:function(){var B=this.extent.getWidth()/this.map.getResolution();var A=this.extent.getHeight()/this.map.getResolution();this.tileSize=new OpenLayers.Size(B,A)},addTileMonitoringHooks:function(A){A.onLoadStart=function(){this.events.triggerEvent("loadstart")};A.events.register("loadstart",this,A.onLoadStart);A.onLoadEnd=function(){this.events.triggerEvent("loadend")};A.events.register("loadend",this,A.onLoadEnd);A.events.register("unload",this,A.onLoadEnd)},removeTileMonitoringHooks:function(A){A.unload();A.events.un({loadstart:A.onLoadStart,loadend:A.onLoadEnd,unload:A.onLoadEnd,scope:this})},setUrl:function(A){this.url=A;this.tile.draw()},getURL:function(A){return this.url},CLASS_NAME:"OpenLayers.Layer.Image"});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},getLonLatFromViewPortPx:function(A){return OpenLayers.Layer.prototype.getLonLatFromViewPortPx.apply(this,arguments)},getViewPortPxFromLonLat:function(A){return OpenLayers.Layer.prototype.getViewPortPxFromLonLat.apply(this,arguments)},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=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.Tile.WFS=OpenLayers.Class(OpenLayers.Tile,{features:null,url:null,request:null,initialize:function(D,A,E,B,C){OpenLayers.Tile.prototype.initialize.apply(this,arguments);this.url=B;this.features=[]},destroy:function(){OpenLayers.Tile.prototype.destroy.apply(this,arguments);this.destroyAllFeatures();this.features=null;this.url=null;if(this.request){this.request.abort();this.request=null}},clear:function(){this.destroyAllFeatures()},draw:function(){if(OpenLayers.Tile.prototype.draw.apply(this,arguments)){if(this.isLoading){this.events.triggerEvent("reload")}else{this.isLoading=true;this.events.triggerEvent("loadstart")}this.loadFeaturesForRegion(this.requestSuccess)}},loadFeaturesForRegion:function(B,A){if(this.request){this.request.abort()}this.request=OpenLayers.Request.GET({url:this.url,success:B,failure:A,scope:this})},requestSuccess:function(B){if(this.features){var D=B.responseXML;if(!D||!D.documentElement){D=B.responseText}if(this.layer.vectorMode){this.layer.addFeatures(this.layer.formatObject.read(D))}else{var A=new OpenLayers.Format.XML();if(typeof D=="string"){D=A.read(D)}var C=A.getElementsByTagNameNS(D,"http://www.opengis.net/gml","featureMember");this.addResults(C)}}if(this.events){this.events.triggerEvent("loadend")}this.request=null},addResults:function(C){for(var B=0;B<C.length;B++){var A=new this.layer.featureClass(this.layer,C[B]);this.features.push(A)}},destroyAllFeatures:function(){while(this.features.length>0){var A=this.features.shift();A.destroy()}},CLASS_NAME:"OpenLayers.Tile.WFS"});OpenLayers.Control.DrawFeature=OpenLayers.Class(OpenLayers.Control,{layer:null,callbacks:null,EVENT_TYPES:["featureadded"],multi:false,featureAdded:function(){},handlerOptions:null,initialize:function(B,C,A){this.EVENT_TYPES=OpenLayers.Control.DrawFeature.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);OpenLayers.Control.prototype.initialize.apply(this,[A]);this.callbacks=OpenLayers.Util.extend({done:this.drawFeature,modify:function(F,E){this.layer.events.triggerEvent("sketchmodified",{vertex:F,feature:E})},create:function(F,E){this.layer.events.triggerEvent("sketchstarted",{vertex:F,feature:E})}},this.callbacks);this.layer=B;this.handlerOptions=this.handlerOptions||{};if(!("multi" in this.handlerOptions)){this.handlerOptions.multi=this.multi}var D=this.layer.styleMap&&this.layer.styleMap.styles.temporary;if(D){this.handlerOptions.layerOptions=OpenLayers.Util.applyDefaults(this.handlerOptions.layerOptions,{styleMap:new OpenLayers.StyleMap({"default":D})})}this.handler=new C(this,this.callbacks,this.handlerOptions)},drawFeature:function(C){var A=new OpenLayers.Feature.Vector(C);var B=this.layer.events.triggerEvent("sketchcomplete",{feature:A});if(B!==false){A.state=OpenLayers.State.INSERT;this.layer.addFeatures([A]);this.featureAdded(A);this.events.triggerEvent("featureadded",{feature:A})}},CLASS_NAME:"OpenLayers.Control.DrawFeature"});OpenLayers.Control.Measure=OpenLayers.Class(OpenLayers.Control,{EVENT_TYPES:["measure","measurepartial"],handlerOptions:null,callbacks:null,displaySystem:"metric",geodesic:false,displaySystemUnits:{geographic:["dd"],english:["mi","ft","in"],metric:["km","m"]},partialDelay:300,delayedTrigger:null,persist:false,initialize:function(B,A){this.EVENT_TYPES=OpenLayers.Control.Measure.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);OpenLayers.Control.prototype.initialize.apply(this,[A]);this.callbacks=OpenLayers.Util.extend({done:this.measureComplete,point:this.measurePartial},this.callbacks);this.handlerOptions=OpenLayers.Util.extend({persist:this.persist},this.handlerOptions);this.handler=new B(this,this.callbacks,this.handlerOptions)},cancel:function(){this.handler.cancel()},updateHandler:function(B,A){var C=this.active;if(C){this.deactivate()}this.handler=new B(this,this.callbacks,A);if(C){this.activate()}},measureComplete:function(A){if(this.delayedTrigger){window.clearTimeout(this.delayedTrigger)}this.measure(A,"measure")},measurePartial:function(A,B){if(B.getLength()>0){B=B.clone();this.delayedTrigger=window.setTimeout(OpenLayers.Function.bind(function(){this.measure(B,"measurepartial")},this),this.partialDelay)}},measure:function(D,B){var C,A;if(D.CLASS_NAME.indexOf("LineString")>-1){C=this.getBestLength(D);A=1}else{C=this.getBestArea(D);A=2}this.events.triggerEvent(B,{measure:C[0],units:C[1],order:A,geometry:D})},getBestArea:function(F){var B=this.displaySystemUnits[this.displaySystem];var E,D;for(var C=0,A=B.length;C<A;++C){E=B[C];D=this.getArea(F,E);if(D>1){break}}return[D,E]},getArea:function(F,A){var B,C;if(this.geodesic){B=F.getGeodesicArea(this.map.getProjectionObject());C="m"}else{B=F.getArea();C=this.map.getUnits()}var E=OpenLayers.INCHES_PER_UNIT[A];if(E){var D=OpenLayers.INCHES_PER_UNIT[C];B*=Math.pow((D/E),2)}return B},getBestLength:function(F){var B=this.displaySystemUnits[this.displaySystem];var E,D;for(var C=0,A=B.length;C<A;++C){E=B[C];D=this.getLength(F,E);if(D>1){break}}return[D,E]},getLength:function(F,A){var B,C;if(this.geodesic){B=F.getGeodesicLength(this.map.getProjectionObject());C="m"}else{B=F.getLength();C=this.map.getUnits()}var E=OpenLayers.INCHES_PER_UNIT[A];if(E){var D=OpenLayers.INCHES_PER_UNIT[C];B*=(D/E)}return B},CLASS_NAME:"OpenLayers.Control.Measure"});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){var B;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));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;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.WFSCapabilities.v1_0_0=OpenLayers.Class(OpenLayers.Format.WFSCapabilities.v1,{initialize:function(A){OpenLayers.Format.WFSCapabilities.v1.prototype.initialize.apply(this,[A])},read_cap_Service:function(B,C){var A={};this.runChildNodes(A,C);B.service=A},read_cap_Fees:function(A,C){var B=this.getChildValue(C);if(B&&B.toLowerCase()!="none"){A.fees=B}},read_cap_AccessConstraints:function(A,B){var C=this.getChildValue(B);if(C&&C.toLowerCase()!="none"){A.accessConstraints=C}},read_cap_OnlineResource:function(A,C){var B=this.getChildValue(C);if(B&&B.toLowerCase()!="none"){A.onlineResource=B}},read_cap_Keywords:function(A,C){var B=this.getChildValue(C);if(B&&B.toLowerCase()!="none"){A.keywords=B.split(", ")}},read_cap_Capability:function(A,C){var B={};this.runChildNodes(B,C);A.capability=B},read_cap_Request:function(C,B){var A={};this.runChildNodes(A,B);C.request=A},read_cap_GetFeature:function(B,A){var C={href:{},formats:[]};this.runChildNodes(C,A);B.getfeature=C},read_cap_ResultFormat:function(E,D){var C=D.childNodes;var B;for(var A=0;A<C.length;A++){B=C[A];if(B.nodeType==1){E.formats.push(B.nodeName)}}},read_cap_DCPType:function(B,A){this.runChildNodes(B,A)},read_cap_HTTP:function(B,A){this.runChildNodes(B.href,A)},read_cap_Get:function(B,A){B.get=A.getAttribute("onlineResource")},read_cap_Post:function(B,A){B.post=A.getAttribute("onlineResource")},CLASS_NAME:"OpenLayers.Format.WFSCapabilities.v1_0_0"});OpenLayers.Format.WFSCapabilities.v1_1_0=OpenLayers.Class(OpenLayers.Format.WFSCapabilities.v1,{initialize:function(A){OpenLayers.Format.WFSCapabilities.v1.prototype.initialize.apply(this,[A])},CLASS_NAME:"OpenLayers.Format.WFSCapabilities.v1_1_0"});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,I,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(",")}I=F[E].geometry;H=I.CLASS_NAME.split(".")[2].toLowerCase();if(!this.extract[H]){return null}if(this.internalProjection&&this.externalProjection){I=I.clone();I.transform(this.internalProjection,this.externalProjection)}D=this.extract[H].apply(this,[I]);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(F){var B;var D=OpenLayers.String.trim(F).split(this.regExes.parenComma);var E=[];for(var C=0,A=D.length;C<A;++C){B=D[C].replace(this.regExes.trimParens,"$1");E.push(this.parse.point.apply(this,[B]).geometry)}return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiPoint(E))},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.Format.WMC.v1=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{ol:"http://openlayers.org/context",wmc:"http://www.opengis.net/context",sld:"http://www.opengis.net/sld",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},schemaLocation:"",getNamespacePrefix:function(A){var B=null;if(A==null){B=this.namespaces[this.defaultPrefix]}else{for(B in this.namespaces){if(this.namespaces[B]==A){break}}}return B},defaultPrefix:"wmc",rootPrefix:null,defaultStyleName:"",defaultStyleTitle:"Default",initialize:function(A){OpenLayers.Format.XML.prototype.initialize.apply(this,[A])},read:function(C){if(typeof C=="string"){C=OpenLayers.Format.XML.prototype.read.apply(this,[C])}var A=C.documentElement;this.rootPrefix=A.prefix;var B={version:A.getAttribute("version")};this.runChildNodes(B,A);return B},runChildNodes:function(E,D){var B=D.childNodes;var A,C,G,I;for(var F=0,H=B.length;F<H;++F){A=B[F];if(A.nodeType==1){G=this.getNamespacePrefix(A.namespaceURI);I=A.nodeName.split(":").pop();C=this["read_"+G+"_"+I];if(C){C.apply(this,[E,A])}}}},read_wmc_General:function(A,B){this.runChildNodes(A,B)},read_wmc_BoundingBox:function(A,B){A.projection=B.getAttribute("SRS");A.bounds=new OpenLayers.Bounds(parseFloat(B.getAttribute("minx")),parseFloat(B.getAttribute("miny")),parseFloat(B.getAttribute("maxx")),parseFloat(B.getAttribute("maxy")))},read_wmc_LayerList:function(A,B){A.layersContext=[];this.runChildNodes(A,B)},read_wmc_Layer:function(A,B){var C={visibility:(B.getAttribute("hidden")!="1"),queryable:(B.getAttribute("queryable")=="1"),formats:[],styles:[]};this.runChildNodes(C,B);A.layersContext.push(C)},read_wmc_Extension:function(B,A){this.runChildNodes(B,A)},read_ol_units:function(B,A){B.units=this.getChildValue(A)},read_ol_maxExtent:function(C,B){var A=new OpenLayers.Bounds(B.getAttribute("minx"),B.getAttribute("miny"),B.getAttribute("maxx"),B.getAttribute("maxy"));C.maxExtent=A},read_ol_transparent:function(B,A){B.transparent=this.getChildValue(A)},read_ol_numZoomLevels:function(B,A){B.numZoomLevels=parseInt(this.getChildValue(A))},read_ol_opacity:function(B,A){B.opacity=parseFloat(this.getChildValue(A))},read_ol_singleTile:function(B,A){B.singleTile=(this.getChildValue(A)=="true")},read_ol_tileSize:function(B,A){var C={width:A.getAttribute("width"),height:A.getAttribute("height")};B.tileSize=C},read_ol_isBaseLayer:function(B,A){B.isBaseLayer=(this.getChildValue(A)=="true")},read_ol_displayInLayerSwitcher:function(B,A){B.displayInLayerSwitcher=(this.getChildValue(A)=="true")},read_wmc_Server:function(C,B){C.version=B.getAttribute("version");var D={};var A=B.getElementsByTagName("OnlineResource");if(A.length>0){this.read_wmc_OnlineResource(D,A[0])}C.url=D.href},read_wmc_FormatList:function(B,A){this.runChildNodes(B,A)},read_wmc_Format:function(B,A){var C={value:this.getChildValue(A)};if(A.getAttribute("current")=="1"){C.current=true}B.formats.push(C)},read_wmc_StyleList:function(B,A){this.runChildNodes(B,A)},read_wmc_Style:function(C,B){var A={};this.runChildNodes(A,B);if(B.getAttribute("current")=="1"){A.current=true}C.styles.push(A)},read_wmc_SLD:function(A,B){this.runChildNodes(A,B)},read_sld_StyledLayerDescriptor:function(C,B){var A=OpenLayers.Format.XML.prototype.write.apply(this,[B]);C.body=A},read_wmc_OnlineResource:function(B,A){B.href=this.getAttributeNS(A,this.namespaces.xlink,"href")},read_wmc_Name:function(C,B){var A=this.getChildValue(B);if(A){C.name=A}},read_wmc_Title:function(B,A){var C=this.getChildValue(A);if(C){B.title=C}},read_wmc_MetadataURL:function(C,B){var D={};var A=B.getElementsByTagName("OnlineResource");if(A.length>0){this.read_wmc_OnlineResource(D,A[0])}C.metadataURL=D.href},read_wmc_Abstract:function(C,B){var A=this.getChildValue(B);if(A){C["abstract"]=A}},read_wmc_LegendURL:function(C,D){var B={width:D.getAttribute("width"),height:D.getAttribute("height")};var A=D.getElementsByTagName("OnlineResource");if(A.length>0){this.read_wmc_OnlineResource(B,A[0])}C.legend=B},write:function(C,B){var A=this.createElementDefaultNS("ViewContext");this.setAttributes(A,{version:this.VERSION,id:(B&&typeof B.id=="string")?B.id:OpenLayers.Util.createUniqueID("OpenLayers_Context_")});this.setAttributeNS(A,this.namespaces.xsi,"xsi:schemaLocation",this.schemaLocation);A.appendChild(this.write_wmc_General(C));A.appendChild(this.write_wmc_LayerList(C));return OpenLayers.Format.XML.prototype.write.apply(this,[A])},createElementDefaultNS:function(C,B,A){var D=this.createElementNS(this.namespaces[this.defaultPrefix],C);if(B){D.appendChild(this.createTextNode(B))}if(A){this.setAttributes(D,A)}return D},setAttributes:function(B,D){var C;for(var A in D){C=D[A].toString();if(C.match(/[A-Z]/)){this.setAttributeNS(B,null,A,C)}else{B.setAttribute(A,C)}}},write_wmc_General:function(A){var C=this.createElementDefaultNS("General");if(A.size){C.appendChild(this.createElementDefaultNS("Window",null,{width:A.size.w,height:A.size.h}))}var B=A.bounds;C.appendChild(this.createElementDefaultNS("BoundingBox",null,{minx:B.left.toPrecision(18),miny:B.bottom.toPrecision(18),maxx:B.right.toPrecision(18),maxy:B.top.toPrecision(18),SRS:A.projection}));C.appendChild(this.createElementDefaultNS("Title",A.title));C.appendChild(this.write_ol_MapExtension(A));return C},write_ol_MapExtension:function(B){var D=this.createElementDefaultNS("Extension");var C=B.maxExtent;if(C){var A=this.createElementNS(this.namespaces.ol,"ol:maxExtent");this.setAttributes(A,{minx:C.left.toPrecision(18),miny:C.bottom.toPrecision(18),maxx:C.right.toPrecision(18),maxy:C.top.toPrecision(18)});D.appendChild(A)}return D},write_wmc_LayerList:function(C){var D=this.createElementDefaultNS("LayerList");for(var B=0,A=C.layersContext.length;B<A;++B){D.appendChild(this.write_wmc_Layer(C.layersContext[B]))}return D},write_wmc_Layer:function(A){var B=this.createElementDefaultNS("Layer",null,{queryable:A.queryable?"1":"0",hidden:A.visibility?"0":"1"});B.appendChild(this.write_wmc_Server(A));B.appendChild(this.createElementDefaultNS("Name",A.name));B.appendChild(this.createElementDefaultNS("Title",A.title));if(A.metadataURL){B.appendChild(this.write_wmc_MetadataURL(A.metadataURL))}return B},write_wmc_LayerExtension:function(B){var D=this.createElementDefaultNS("Extension");var A=B.maxExtent;var H=this.createElementNS(this.namespaces.ol,"ol:maxExtent");this.setAttributes(H,{minx:A.left.toPrecision(18),miny:A.bottom.toPrecision(18),maxx:A.right.toPrecision(18),maxy:A.top.toPrecision(18)});D.appendChild(H);if(B.tileSize&&!B.singleTile){var I=this.createElementNS(this.namespaces.ol,"ol:tileSize");this.setAttributes(I,B.tileSize);D.appendChild(I)}var G=["transparent","numZoomLevels","units","isBaseLayer","opacity","displayInLayerSwitcher","singleTile"];var C;for(var E=0,F=G.length;E<F;++E){C=this.createOLPropertyNode(B,G[E]);if(C){D.appendChild(C)}}return D},createOLPropertyNode:function(B,C){var A=null;if(B[C]!=null){A=this.createElementNS(this.namespaces.ol,"ol:"+C);A.appendChild(this.createTextNode(B[C].toString()))}return A},write_wmc_Server:function(A){var B=this.createElementDefaultNS("Server");this.setAttributes(B,{service:"OGC:WMS",version:A.version});B.appendChild(this.write_wmc_OnlineResource(A.url));return B},write_wmc_MetadataURL:function(B){var A=this.createElementDefaultNS("MetadataURL");A.appendChild(this.write_wmc_OnlineResource(B));return A},write_wmc_FormatList:function(C){var D=this.createElementDefaultNS("FormatList");for(var B=0,A=C.formats.length;B<A;B++){var E=C.formats[B];D.appendChild(this.createElementDefaultNS("Format",E.value,(E.current&&E.current==true)?{current:"1"}:null))}return D},write_wmc_StyleList:function(E){var C=this.createElementDefaultNS("StyleList");var J=E.styles;if(J&&J instanceof Array){var A;for(var D=0,F=J.length;D<F;D++){var K=J[D];var B=this.createElementDefaultNS("Style",null,(K.current&&K.current==true)?{current:"1"}:null);if(K.href){A=this.createElementDefaultNS("SLD");var G=this.write_wmc_OnlineResource(K.href);A.appendChild(G);A.appendChild(this.createElementDefaultNS("Name",K.name));if(K.title){A.appendChild(this.createElementDefaultNS("Title",K.title))}B.appendChild(A)}else{if(K.body){A=this.createElementDefaultNS("SLD");var H=OpenLayers.Format.XML.prototype.read.apply(this,[K.body]);var I=H.documentElement;if(A.ownerDocument&&A.ownerDocument.importNode){I=A.ownerDocument.importNode(I,true)}A.appendChild(I);A.appendChild(this.createElementDefaultNS("Name",K.name));if(K.title){A.appendChild(this.createElementDefaultNS("Title",K.title))}B.appendChild(A)}else{B.appendChild(this.createElementDefaultNS("Name",K.name));B.appendChild(this.createElementDefaultNS("Title",K.title));if(K["abstract"]){B.appendChild(this.createElementDefaultNS("Abstract",K["abstract"]))}}}C.appendChild(B)}}return C},write_wmc_OnlineResource:function(A){var B=this.createElementDefaultNS("OnlineResource");this.setAttributeNS(B,this.namespaces.xlink,"xlink:type","simple");this.setAttributeNS(B,this.namespaces.xlink,"xlink:href",A);return B},CLASS_NAME:"OpenLayers.Format.WMC.v1"});OpenLayers.Format.WMSCapabilities.v1_1=OpenLayers.Class(OpenLayers.Format.WMSCapabilities.v1,{readers:{wms:OpenLayers.Util.applyDefaults({WMT_MS_Capabilities:function(A,B){this.readChildNodes(A,B)},Keyword:function(A,B){if(B.keywords){B.keywords.push(this.getChildValue(A))}},DescribeLayer:function(A,B){B.describelayer={formats:[]};this.readChildNodes(A,B.describelayer)},GetLegendGraphic:function(A,B){B.getlegendgraphic={formats:[]};this.readChildNodes(A,B.getlegendgraphic)},GetStyles:function(A,B){B.getstyles={formats:[]};this.readChildNodes(A,B.getstyles)},PutStyles:function(A,B){B.putstyles={formats:[]};this.readChildNodes(A,B.putstyles)},UserDefinedSymbolization:function(A,B){var C={supportSLD:parseInt(A.getAttribute("SupportSLD"))==1,userLayer:parseInt(A.getAttribute("UserLayer"))==1,userStyle:parseInt(A.getAttribute("UserStyle"))==1,remoteWFS:parseInt(A.getAttribute("RemoteWFS"))==1};B.userSymbols=C},LatLonBoundingBox:function(A,B){B.llbbox=[parseFloat(A.getAttribute("minx")),parseFloat(A.getAttribute("miny")),parseFloat(A.getAttribute("maxx")),parseFloat(A.getAttribute("maxy"))]},BoundingBox:function(A,B){var C=OpenLayers.Format.WMSCapabilities.v1.prototype.readers.wms.BoundingBox.apply(this,[A,B]);C.srs=A.getAttribute("SRS");B.bbox[C.srs]=C},ScaleHint:function(E,F){var D=E.getAttribute("min");var A=E.getAttribute("max");var C=Math.pow(2,0.5);var B=OpenLayers.INCHES_PER_UNIT.m;F.maxScale=parseFloat(((D/C)*B*OpenLayers.DOTS_PER_INCH).toPrecision(13));F.minScale=parseFloat(((A/C)*B*OpenLayers.DOTS_PER_INCH).toPrecision(13))},Dimension:function(B,D){var A=B.getAttribute("name").toLowerCase();var C={name:A,units:B.getAttribute("units"),unitsymbol:B.getAttribute("unitSymbol")};D.dimensions[C.name]=C},Extent:function(D,E){var B=D.getAttribute("name").toLowerCase();if(B in E.dimensions){var C=E.dimensions[B];C.nearestVal=D.getAttribute("nearestValue")==="1";C.multipleVal=D.getAttribute("multipleValues")==="1";C.current=D.getAttribute("current")==="1";C["default"]=D.getAttribute("default")||"";var A=this.getChildValue(D);C.values=A.split(",")}}},OpenLayers.Format.WMSCapabilities.v1.prototype.readers.wms)},CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1_1"});OpenLayers.Format.WMSCapabilities.v1_3=OpenLayers.Class(OpenLayers.Format.WMSCapabilities.v1,{readers:{wms:OpenLayers.Util.applyDefaults({WMS_Capabilities:function(A,B){this.readChildNodes(A,B)},LayerLimit:function(A,B){B.layerLimit=parseInt(this.getChildValue(A))},MaxWidth:function(A,B){B.maxWidth=parseInt(this.getChildValue(A))},MaxHeight:function(A,B){B.maxHeight=parseInt(this.getChildValue(A))},BoundingBox:function(A,B){var C=OpenLayers.Format.WMSCapabilities.v1.prototype.readers.wms.BoundingBox.apply(this,[A,B]);C.srs=A.getAttribute("CRS");B.bbox[C.srs]=C},CRS:function(A,B){this.readers.wms.SRS.apply(this,[A,B])},EX_GeographicBoundingBox:function(A,B){B.llbbox=[];this.readChildNodes(A,B.llbbox)},westBoundLongitude:function(A,B){B[0]=this.getChildValue(A)},eastBoundLongitude:function(A,B){B[2]=this.getChildValue(A)},southBoundLatitude:function(A,B){B[1]=this.getChildValue(A)},northBoundLatitude:function(A,B){B[3]=this.getChildValue(A)},MinScaleDenominator:function(A,B){B.maxScale=parseFloat(this.getChildValue(A)).toPrecision(16)},MaxScaleDenominator:function(A,B){B.minScale=parseFloat(this.getChildValue(A)).toPrecision(16)},Dimension:function(B,D){var A=B.getAttribute("name").toLowerCase();var C={name:A,units:B.getAttribute("units"),unitsymbol:B.getAttribute("unitSymbol"),nearestVal:B.getAttribute("nearestValue")==="1",multipleVal:B.getAttribute("multipleValues")==="1","default":B.getAttribute("default")||"",current:B.getAttribute("current")==="1",values:this.getChildValue(B).split(",")};D.dimensions[C.name]=C},Keyword:function(B,C){var A={value:this.getChildValue(B),vocabulary:B.getAttribute("vocabulary")};if(C.keywords){C.keywords.push(A)}}},OpenLayers.Format.WMSCapabilities.v1.prototype.readers.wms),sld:{UserDefinedSymbolization:function(A,B){this.readers.wms.UserDefinedSymbolization.apply(this,[A,B]);B.userSymbols.inlineFeature=parseInt(A.getAttribute("InlineFeature"))==1;B.userSymbols.remoteWCS=parseInt(A.getAttribute("RemoteWCS"))==1},DescribeLayer:function(A,B){this.readers.wms.DescribeLayer.apply(this,[A,B])},GetLegendGraphic:function(A,B){this.readers.wms.GetLegendGraphic.apply(this,[A,B])}}},CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1_3"});OpenLayers.Format.WMTSCapabilities.v1_0_0=OpenLayers.Class(OpenLayers.Format.OWSCommon.v1_1_0,{version:"1.0.0",namespaces:{ows:"http://www.opengis.net/ows/1.1",wmts:"http://www.opengis.net/wmts/1.0",xlink:"http://www.w3.org/1999/xlink"},yx:null,defaultPrefix:"wmts",initialize:function(B){OpenLayers.Format.XML.prototype.initialize.apply(this,[B]);this.options=B;var A=OpenLayers.Util.extend({},OpenLayers.Format.WMTSCapabilities.prototype.yx);this.yx=OpenLayers.Util.extend(A,this.yx)},read:function(B){if(typeof B=="string"){B=OpenLayers.Format.XML.prototype.read.apply(this,[B])}if(B&&B.nodeType==9){B=B.documentElement}var A={};this.readNode(B,A);A.version=this.version;return A},readers:{wmts:{Capabilities:function(A,B){this.readChildNodes(A,B)},Contents:function(A,B){B.contents={};B.contents.layers=[];B.contents.tileMatrixSets={};this.readChildNodes(A,B.contents)},Layer:function(B,C){var A={styles:[],formats:[],tileMatrixSetLinks:[]};A.layers=[];this.readChildNodes(B,A);C.layers.push(A)},Style:function(B,C){var A={};A.isDefault=(B.getAttribute("isDefault")==="true");this.readChildNodes(B,A);C.styles.push(A)},Format:function(A,B){B.formats.push(this.getChildValue(A))},TileMatrixSetLink:function(B,C){var A={};this.readChildNodes(B,A);C.tileMatrixSetLinks.push(A)},TileMatrixSet:function(B,C){if(C.layers){var A={matrixIds:[]};this.readChildNodes(B,A);C.tileMatrixSets[A.identifier]=A}else{C.tileMatrixSet=this.getChildValue(B)}},TileMatrix:function(B,C){var A={supportedCRS:C.supportedCRS};this.readChildNodes(B,A);C.matrixIds.push(A)},ScaleDenominator:function(A,B){B.scaleDenominator=parseFloat(this.getChildValue(A))},TopLeftCorner:function(D,F){var C=this.getChildValue(D);var E=C.split(" ");var A;if(F.supportedCRS){var B=F.supportedCRS.replace(/urn:ogc:def:crs:(\w+):.+:(\w+)$/,"urn:ogc:def:crs:$1::$2");A=!!this.yx[B]}if(A){F.topLeftCorner=new OpenLayers.LonLat(E[1],E[0])}else{F.topLeftCorner=new OpenLayers.LonLat(E[0],E[1])}},TileWidth:function(A,B){B.tileWidth=parseInt(this.getChildValue(A))},TileHeight:function(A,B){B.tileHeight=parseInt(this.getChildValue(A))},MatrixWidth:function(A,B){B.matrixWidth=parseInt(this.getChildValue(A))},MatrixHeight:function(A,B){B.matrixHeight=parseInt(this.getChildValue(A))},WSDL:function(A,B){B.wsdl={};B.wsdl.href=A.getAttribute("xlink:href")},ServiceMetadataURL:function(A,B){B.serviceMetadataUrl={};B.serviceMetadataUrl.href=A.getAttribute("xlink:href")}},ows:OpenLayers.Format.OWSCommon.v1_1_0.prototype.readers.ows},CLASS_NAME:"OpenLayers.Format.WMTSCapabilities.v1_0_0"});OpenLayers.Layer.Boxes=OpenLayers.Class(OpenLayers.Layer.Markers,{initialize:function(B,A){OpenLayers.Layer.Markers.prototype.initialize.apply(this,arguments)},drawMarker:function(A){var D=A.bounds;var F=this.map.getLayerPxFromLonLat(new OpenLayers.LonLat(D.left,D.top));var C=this.map.getLayerPxFromLonLat(new OpenLayers.LonLat(D.right,D.bottom));if(C==null||F==null){A.display(false)}else{var E=new OpenLayers.Size(Math.max(1,C.x-F.x),Math.max(1,C.y-F.y));var B=A.draw(F,E);if(!A.drawn){this.div.appendChild(B);A.drawn=true}}},removeMarker:function(A){OpenLayers.Util.removeItem(this.markers,A);if((A.div!=null)&&(A.div.parentNode==this.div)){this.div.removeChild(A.div)}},CLASS_NAME:"OpenLayers.Layer.Boxes"});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(I){var M=I.responseXML;if(!M||!M.documentElement){M=OpenLayers.Format.XML.prototype.read(I.responseText)}if(this.useFeedTitle){var A=null;try{A=M.getElementsByTagNameNS("*","title")[0].firstChild.nodeValue}catch(H){A=M.getElementsByTagName("title")[0].firstChild.nodeValue}if(A){this.setName(A)}}var Q={};OpenLayers.Util.extend(Q,this.formatOptions);if(this.map&&!this.projection.equals(this.map.getProjectionObject())){Q.externalProjection=this.projection;Q.internalProjection=this.map.getProjectionObject()}var N=new OpenLayers.Format.GeoRSS(Q);var B=N.read(M);for(var F=0,G=B.length;F<G;F++){var E={};var P=B[F];if(!P.geometry){continue}var K=P.attributes.title?P.attributes.title:"Untitled";var O=P.attributes.description?P.attributes.description:"No description.";var J=P.attributes.link?P.attributes.link:"";var L=P.geometry.getBounds().getCenterLonLat();E.icon=this.icon==null?OpenLayers.Marker.defaultIcon():this.icon.clone();E.popupSize=this.popupSize?this.popupSize.clone():new OpenLayers.Size(250,120);if(K||O){E.title=K;E.description=O;var C='<div class="olLayerGeoRSSClose">[x]</div>';C+='<div class="olLayerGeoRSSTitle">';if(J){C+='<a class="link" href="'+J+'" target="_blank">'}C+=K;if(J){C+="</a>"}C+="</div>";C+='<div style="" class="olLayerGeoRSSDescription">';C+=O;C+="</div>";E.popupContentHTML=C}var P=new OpenLayers.Feature(this,L,E);this.features.push(P);var D=P.createMarker();D.events.register("click",P,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:21,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,0.000001341104507446289,6.705522537231445e-7],type:null,wrapDateLine:true,sphericalMercator:false,version:null,initialize:function(C,B){B=B||{};if(!B.version){B.version=typeof GMap2==="function"?"2":"3"}var A=OpenLayers.Layer.Google["v"+B.version.replace(/\./g,"_")];if(A){OpenLayers.Util.applyDefaults(B,A)}else{throw"Unsupported Google Maps API version: "+B.version}OpenLayers.Util.applyDefaults(B,A.DEFAULTS);if(B.maxExtent){B.maxExtent=B.maxExtent.clone()}OpenLayers.Layer.EventPane.prototype.initialize.apply(this,[C,B]);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,[C,B]);if(this.sphericalMercator){OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator);this.initMercatorParameters()}},clone:function(){return new OpenLayers.Layer.Google(this.name,this.getOptions())},setVisibility:function(B){var A=this.opacity==null?1:this.opacity;OpenLayers.Layer.EventPane.prototype.setVisibility.apply(this,arguments);this.setOpacity(A)},display:function(A){if(!this._dragging){this.setGMapVisibility(A)}OpenLayers.Layer.EventPane.prototype.display.apply(this,arguments)},moveTo:function(B,A,C){this._dragging=C;OpenLayers.Layer.EventPane.prototype.moveTo.apply(this,arguments);delete this._dragging},setOpacity:function(B){if(B!==this.opacity){if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"opacity"})}this.opacity=B}if(this.getVisibility()){var A=this.getMapContainer();OpenLayers.Util.modifyDOMElement(A,null,null,null,null,null,null,B)}},destroy:function(){if(this.map){this.setGMapVisibility(false);var A=OpenLayers.Layer.Google.cache[this.map.id];if(A&&A.count<=1){this.removeGMapElements()}}OpenLayers.Layer.EventPane.prototype.destroy.apply(this,arguments)},removeGMapElements:function(){var D=OpenLayers.Layer.Google.cache[this.map.id];if(D){var B=this.mapObject&&this.getMapContainer();if(B&&B.parentNode){B.parentNode.removeChild(B)}var C=D.termsOfUse;if(C&&C.parentNode){C.parentNode.removeChild(C)}var A=D.poweredBy;if(A&&A.parentNode){A.parentNode.removeChild(A)}}},removeMap:function(B){if(this.visibility&&this.mapObject){this.setGMapVisibility(false)}var A=OpenLayers.Layer.Google.cache[B.id];if(A){if(A.count<=1){this.removeGMapElements();delete OpenLayers.Layer.Google.cache[B.id]}else{--A.count}}delete this.termsOfUse;delete this.poweredBy;delete this.mapObject;delete this.dragObject;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},getWarningHTML:function(){return OpenLayers.i18n("googleWarning")},getMapObjectCenter:function(){return this.mapObject.getCenter()},getMapObjectZoom:function(){return this.mapObject.getZoom()},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},getXFromMapObjectPixel:function(A){return A.x},getYFromMapObjectPixel:function(A){return A.y},CLASS_NAME:"OpenLayers.Layer.Google"});OpenLayers.Layer.Google.cache={};OpenLayers.Layer.Google.v2={termsOfUse:null,poweredBy:null,dragObject:null,loadMapObject:function(){if(!this.type){this.type=G_NORMAL_MAP}var F,D,A;var C=OpenLayers.Layer.Google.cache[this.map.id];if(C){F=C.mapObject;D=C.termsOfUse;A=C.poweredBy;++C.count}else{var B=this.map.viewPortDiv;var G=document.createElement("div");G.id=this.map.id+"_GMap2Container";G.style.position="absolute";G.style.width="100%";G.style.height="100%";B.appendChild(G);try{F=new GMap2(G);D=G.lastChild;B.appendChild(D);D.style.zIndex="1100";D.style.right="";D.style.bottom="";D.className="olLayerGoogleCopyright";A=G.lastChild;B.appendChild(A);A.style.zIndex="1100";A.style.right="";A.style.bottom="";A.className="olLayerGooglePoweredBy gmnoprint"}catch(E){throw (E)}OpenLayers.Layer.Google.cache[this.map.id]={mapObject:F,termsOfUse:D,poweredBy:A,count:1}}this.mapObject=F;this.termsOfUse=D;this.poweredBy=A;if(OpenLayers.Util.indexOf(this.mapObject.getMapTypes(),this.type)===-1){this.mapObject.addMapType(this.type)}if(typeof F.getDragObject=="function"){this.dragObject=F.getDragObject()}else{this.dragPanMapObject=null}if(this.isBaseLayer===false){this.setGMapVisibility(this.div.style.display!=="none")}},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}},setGMapVisibility:function(C){var B=OpenLayers.Layer.Google.cache[this.map.id];if(B){var A=this.mapObject.getContainer();if(C===true){this.mapObject.setMapType(this.type);A.style.display="";this.termsOfUse.style.left="";this.termsOfUse.style.display="";this.poweredBy.style.display="";B.displayed=this.id}else{if(B.displayed===this.id){delete B.displayed}if(!B.displayed){A.style.display="none";this.termsOfUse.style.display="none";this.termsOfUse.style.left="-9999px";this.poweredBy.style.display="none"}}}},getMapContainer:function(){return this.mapObject.getContainer()},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},setMapObjectCenter:function(A,B){this.mapObject.setCenter(A,B)},dragPanMapObject:function(B,A){this.dragObject.moveBy(new GSize(-B,A))},getMapObjectLonLatFromMapObjectPixel:function(A){return this.mapObject.fromContainerPixelToLatLng(A)},getMapObjectPixelFromMapObjectLonLat:function(A){return this.mapObject.fromLatLngToContainerPixel(A)},getMapObjectZoomFromMapObjectBounds:function(A){return this.mapObject.getBoundsZoomLevel(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},getMapObjectPixelFromXY:function(A,B){return new GPoint(A,B)}};OpenLayers.Layer.Grid=OpenLayers.Class(OpenLayers.Layer.HTTPRequest,{tileSize:null,grid:null,singleTile:false,ratio:1.5,buffer:2,numLoadingTiles:0,initialize:function(C,B,D,A){OpenLayers.Layer.HTTPRequest.prototype.initialize.apply(this,arguments);this.events.addEventType("tileloaded");this.grid=[]},destroy:function(){this.clearGrid();this.grid=null;this.tileSize=null;OpenLayers.Layer.HTTPRequest.prototype.destroy.apply(this,arguments)},clearGrid:function(){if(this.grid){for(var F=0,B=this.grid.length;F<B;F++){var E=this.grid[F];for(var C=0,A=E.length;C<A;C++){var D=E[C];this.removeTileMonitoringHooks(D);D.destroy()}}this.grid=[]}},clone:function(A){if(A==null){A=new OpenLayers.Layer.Grid(this.name,this.url,this.params,this.getOptions())}A=OpenLayers.Layer.HTTPRequest.prototype.clone.apply(this,[A]);if(this.tileSize!=null){A.tileSize=this.tileSize.clone()}A.grid=[];return A},moveTo:function(D,A,E){OpenLayers.Layer.HTTPRequest.prototype.moveTo.apply(this,arguments);D=D||this.map.getExtent();if(D!=null){var C=!this.grid.length||A;var B=this.getTilesBounds();if(this.singleTile){if(C||(!E&&!B.containsBounds(D))){this.initSingleTile(D)}}else{if(C||!B.containsBounds(D,true)){this.initGriddedTiles(D)}else{this.moveGriddedTiles(D)}}}},setTileSize:function(A){if(this.singleTile){A=this.map.getSize();A.h=parseInt(A.h*this.ratio);A.w=parseInt(A.w*this.ratio)}OpenLayers.Layer.HTTPRequest.prototype.setTileSize.apply(this,[A])},getGridBounds:function(){var A="The getGridBounds() function is deprecated. It will be removed in 3.0. Please use getTilesBounds() instead.";OpenLayers.Console.warn(A);return this.getTilesBounds()},getTilesBounds:function(){var E=null;if(this.grid.length){var A=this.grid.length-1;var D=this.grid[A][0];var B=this.grid[0].length-1;var C=this.grid[0][B];E=new OpenLayers.Bounds(D.bounds.left,D.bounds.bottom,C.bounds.right,C.bounds.top)}return E},initSingleTile:function(F){var A=F.getCenterLonLat();var H=F.getWidth()*this.ratio;var B=F.getHeight()*this.ratio;var G=new OpenLayers.Bounds(A.lon-(H/2),A.lat-(B/2),A.lon+(H/2),A.lat+(B/2));var D=new OpenLayers.LonLat(G.left,G.top);var C=this.map.getLayerPxFromLonLat(D);if(!this.grid.length){this.grid[0]=[]}var E=this.grid[0][0];if(!E){E=this.addTile(G,C);this.addTileMonitoringHooks(E);E.draw();this.grid[0][0]=E}else{E.moveTo(G,C)}this.removeExcessTiles(1,1)},calculateGridLayout:function(A,O,E){var K=E*this.tileSize.w;var C=E*this.tileSize.h;var I=A.left-O.left;var L=Math.floor(I/K)-this.buffer;var J=I/K-L;var F=-J*this.tileSize.w;var M=O.left+L*K;var B=A.top-(O.bottom+C);var H=Math.ceil(B/C)+this.buffer;var N=H-B/C;var D=-N*this.tileSize.h;var G=O.bottom+H*C;return{tilelon:K,tilelat:C,tileoffsetlon:M,tileoffsetlat:G,tileoffsetx:F,tileoffsety:D}},initGriddedTiles:function(I){var G=this.map.getSize();var V=Math.ceil(G.h/this.tileSize.h)+Math.max(1,2*this.buffer);var X=Math.ceil(G.w/this.tileSize.w)+Math.max(1,2*this.buffer);var O=this.getMaxExtent();var R=this.map.getResolution();var Q=this.calculateGridLayout(I,O,R);var F=Math.round(Q.tileoffsetx);var C=Math.round(Q.tileoffsety);var K=Q.tileoffsetlon;var N=Q.tileoffsetlat;var E=Q.tilelon;var J=Q.tilelat;this.origin=new OpenLayers.Pixel(F,C);var U=F;var W=K;var T=0;var A=parseInt(this.map.layerContainerDiv.style.left);var S=parseInt(this.map.layerContainerDiv.style.top);do{var H=this.grid[T++];if(!H){H=[];this.grid.push(H)}K=W;F=U;var D=0;do{var B=new OpenLayers.Bounds(K,N,K+E,N+J);var M=F;M-=A;var L=C;L-=S;var P=new OpenLayers.Pixel(M,L);var Y=H[D++];if(!Y){Y=this.addTile(B,P);this.addTileMonitoringHooks(Y);H.push(Y)}else{Y.moveTo(B,P,false)}K+=E;F+=this.tileSize.w}while((K<=I.right+E*this.buffer)||D<X);N-=J;C+=this.tileSize.h}while((N>=I.bottom-J*this.buffer)||T<V);this.removeExcessTiles(T,D);this.spiralTileLoad()},getMaxExtent:function(){return this.maxExtent},spiralTileLoad:function(){var B=[];var H=["right","down","left","up"];var G=0;var A=-1;var J=OpenLayers.Util.indexOf(H,"right");var K=0;while(K<H.length){var I=G;var C=A;switch(H[J]){case"right":C++;break;case"down":I++;break;case"left":C--;break;case"up":I--;break}var F=null;if((I<this.grid.length)&&(I>=0)&&(C<this.grid[0].length)&&(C>=0)){F=this.grid[I][C]}if((F!=null)&&(!F.queued)){B.unshift(F);F.queued=true;K=0;G=I;A=C}else{J=(J+1)%4;K++}}for(var D=0,E=B.length;D<E;D++){var F=B[D];F.draw();F.queued=false}},addTile:function(B,A){},addTileMonitoringHooks:function(A){A.onLoadStart=function(){if(this.numLoadingTiles==0){this.events.triggerEvent("loadstart")}this.numLoadingTiles++};A.events.register("loadstart",this,A.onLoadStart);A.onLoadEnd=function(){this.numLoadingTiles--;this.events.triggerEvent("tileloaded");if(this.numLoadingTiles==0){this.events.triggerEvent("loadend")}};A.events.register("loadend",this,A.onLoadEnd);A.events.register("unload",this,A.onLoadEnd)},removeTileMonitoringHooks:function(A){A.unload();A.events.un({loadstart:A.onLoadStart,loadend:A.onLoadEnd,unload:A.onLoadEnd,scope:this})},moveGriddedTiles:function(C){var B=this.buffer||1;while(true){var A=this.grid[0][0].position;var D=this.map.getViewPortPxFromLayerPx(A);if(D.x>-this.tileSize.w*(B-1)){this.shiftColumn(true)}else{if(D.x<-this.tileSize.w*B){this.shiftColumn(false)}else{if(D.y>-this.tileSize.h*(B-1)){this.shiftRow(true)}else{if(D.y<-this.tileSize.h*B){this.shiftRow(false)}else{break}}}}}},shiftRow:function(M){var C=(M)?0:(this.grid.length-1);var B=this.grid;var F=B[C];var E=this.map.getResolution();var H=(M)?-this.tileSize.h:this.tileSize.h;var G=E*-H;var L=(M)?B.pop():B.shift();for(var I=0,K=F.length;I<K;I++){var D=F[I];var A=D.bounds.clone();var J=D.position.clone();A.bottom=A.bottom+G;A.top=A.top+G;J.y=J.y+H;L[I].moveTo(A,J)}if(M){B.unshift(L)}else{B.push(L)}},shiftColumn:function(L){var D=(L)?-this.tileSize.w:this.tileSize.w;var C=this.map.getResolution();var J=C*D;for(var E=0,G=this.grid.length;E<G;E++){var K=this.grid[E];var I=(L)?0:(K.length-1);var B=K[I];var A=B.bounds.clone();var F=B.position.clone();A.left=A.left+J;A.right=A.right+J;F.x=F.x+D;var H=L?this.grid[E].pop():this.grid[E].shift();H.moveTo(A,F);if(L){K.unshift(H)}else{K.push(H)}}},removeExcessTiles:function(E,C){while(this.grid.length>E){var F=this.grid.pop();for(var B=0,A=F.length;B<A;B++){var D=F[B];this.removeTileMonitoringHooks(D);D.destroy()}}while(this.grid[0].length>C){for(var B=0,A=this.grid.length;B<A;B++){var F=this.grid[B];var D=F.pop();this.removeTileMonitoringHooks(D);D.destroy()}}},onMapResize:function(){if(this.singleTile){this.clearGrid();this.setTileSize()}},getTileBounds:function(D){var C=this.maxExtent;var F=this.getResolution();var E=F*this.tileSize.w;var B=F*this.tileSize.h;var H=this.getLonLatFromViewPortPx(D);var A=C.left+(E*Math.floor((H.lon-C.left)/E));var G=C.bottom+(B*Math.floor((H.lat-C.bottom)/B));return new OpenLayers.Bounds(A,G,A+E,G+B)},CLASS_NAME:"OpenLayers.Layer.Grid"});OpenLayers.Layer.MultiMap=OpenLayers.Class(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:1,MAX_ZOOM_LEVEL:17,RESOLUTIONS:[9,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],type:null,initialize:function(B,A){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);if(this.sphericalMercator){OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator);this.initMercatorParameters();this.RESOLUTIONS.unshift(10)}},loadMapObject:function(){try{this.mapObject=new MultimapViewer(this.div)}catch(A){}},getWarningHTML:function(){return OpenLayers.i18n("getLayerWarning",{layerType:"MM",layerLib:"MultiMap"})},setMapObjectCenter:function(A,B){this.mapObject.goToPosition(A,B)},getMapObjectCenter:function(){return this.mapObject.getCurrentPosition()},getMapObjectZoom:function(){return this.mapObject.getZoomFactor()},getMapObjectLonLatFromMapObjectPixel:function(A){A.x=A.x-(this.map.getSize().w/2);A.y=A.y-(this.map.getSize().h/2);return this.mapObject.getMapPositionAt(A)},getMapObjectPixelFromMapObjectLonLat:function(A){return this.mapObject.geoPosToContainerPixels(A)},getLongitudeFromMapObjectLonLat:function(A){return this.sphericalMercator?this.forwardMercator(A.lon,A.lat).lon:A.lon},getLatitudeFromMapObjectLonLat:function(A){return this.sphericalMercator?this.forwardMercator(A.lon,A.lat).lat:A.lat},getMapObjectLonLatFromLonLat:function(D,C){var A;if(this.sphericalMercator){var B=this.inverseMercator(D,C);A=new MMLatLon(B.lat,B.lon)}else{A=new MMLatLon(C,D)}return A},getXFromMapObjectPixel:function(A){return A.x},getYFromMapObjectPixel:function(A){return A.y},getMapObjectPixelFromXY:function(A,B){return new MMPoint(A,B)},CLASS_NAME:"OpenLayers.Layer.MultiMap"});OpenLayers.Layer.VirtualEarth=OpenLayers.Class(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:1,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],type:null,wrapDateLine:true,sphericalMercator:false,animationEnabled:true,initialize:function(B,A){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);if(this.sphericalMercator){OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator);this.initMercatorParameters()}},loadMapObject:function(){var A=OpenLayers.Util.createDiv(this.name);var C=this.map.getSize();A.style.width=C.w+"px";A.style.height=C.h+"px";this.div.appendChild(A);try{this.mapObject=new VEMap(this.name)}catch(B){}if(this.mapObject!=null){try{this.mapObject.LoadMap(null,null,this.type,true);this.mapObject.AttachEvent("onmousedown",OpenLayers.Function.True)}catch(B){}this.mapObject.HideDashboard();if(typeof this.mapObject.SetAnimationEnabled=="function"){this.mapObject.SetAnimationEnabled(this.animationEnabled)}}if(!this.mapObject||!this.mapObject.vemapcontrol||!this.mapObject.vemapcontrol.PanMap||(typeof this.mapObject.vemapcontrol.PanMap!="function")){this.dragPanMapObject=null}},onMapResize:function(){this.mapObject.Resize(this.map.size.w,this.map.size.h)},getWarningHTML:function(){return OpenLayers.i18n("getLayerWarning",{layerType:"VE",layerLib:"VirtualEarth"})},setMapObjectCenter:function(A,B){this.mapObject.SetCenterAndZoom(A,B)},getMapObjectCenter:function(){return this.mapObject.GetCenter()},dragPanMapObject:function(B,A){this.mapObject.vemapcontrol.PanMap(B,-A)},getMapObjectZoom:function(){return this.mapObject.GetZoomLevel()},getMapObjectLonLatFromMapObjectPixel:function(A){return(typeof VEPixel!="undefined")?this.mapObject.PixelToLatLong(A):this.mapObject.PixelToLatLong(A.x,A.y)},getMapObjectPixelFromMapObjectLonLat:function(A){return this.mapObject.LatLongToPixel(A)},getLongitudeFromMapObjectLonLat:function(A){return this.sphericalMercator?this.forwardMercator(A.Longitude,A.Latitude).lon:A.Longitude},getLatitudeFromMapObjectLonLat:function(A){return this.sphericalMercator?this.forwardMercator(A.Longitude,A.Latitude).lat:A.Latitude},getMapObjectLonLatFromLonLat:function(D,B){var C;if(this.sphericalMercator){var A=this.inverseMercator(D,B);C=new VELatLong(A.lat,A.lon)}else{C=new VELatLong(B,D)}return C},getXFromMapObjectPixel:function(A){return A.x},getYFromMapObjectPixel:function(A){return A.y},getMapObjectPixelFromXY:function(A,B){return(typeof VEPixel!="undefined")?new VEPixel(A,B):new Msn.VE.Pixel(A,B)},CLASS_NAME:"OpenLayers.Layer.VirtualEarth"});OpenLayers.Layer.Yahoo=OpenLayers.Class(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:0,MAX_ZOOM_LEVEL:17,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],type:null,wrapDateLine:true,sphericalMercator:false,initialize:function(B,A){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);if(this.sphericalMercator){OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator);this.initMercatorParameters()}},loadMapObject:function(){try{var A=this.getMapObjectSizeFromOLSize(this.map.getSize());this.mapObject=new YMap(this.div,this.type,A);this.mapObject.disableKeyControls();this.mapObject.disableDragMap();if(!this.mapObject.moveByXY||(typeof this.mapObject.moveByXY!="function")){this.dragPanMapObject=null}}catch(B){}},onMapResize:function(){try{var A=this.getMapObjectSizeFromOLSize(this.map.getSize());this.mapObject.resizeTo(A)}catch(B){}},setMap:function(A){OpenLayers.Layer.EventPane.prototype.setMap.apply(this,arguments);this.map.events.register("moveend",this,this.fixYahooEventPane)},fixYahooEventPane:function(){var A=OpenLayers.Util.getElement("ygddfdiv");if(A!=null){if(A.parentNode!=null){A.parentNode.removeChild(A)}this.map.events.unregister("moveend",this,this.fixYahooEventPane)}},getWarningHTML:function(){return OpenLayers.i18n("getLayerWarning",{layerType:"Yahoo",layerLib:"Yahoo"})},getOLZoomFromMapObjectZoom:function(A){var B=null;if(A!=null){B=OpenLayers.Layer.FixedZoomLevels.prototype.getOLZoomFromMapObjectZoom.apply(this,[A]);B=18-B}return B},getMapObjectZoomFromOLZoom:function(A){var B=null;if(A!=null){B=OpenLayers.Layer.FixedZoomLevels.prototype.getMapObjectZoomFromOLZoom.apply(this,[A]);B=18-B}return B},setMapObjectCenter:function(A,B){this.mapObject.drawZoomAndCenter(A,B)},getMapObjectCenter:function(){return this.mapObject.getCenterLatLon()},dragPanMapObject:function(B,A){this.mapObject.moveByXY({x:-B,y:A})},getMapObjectZoom:function(){return this.mapObject.getZoomLevel()},getMapObjectLonLatFromMapObjectPixel:function(A){return this.mapObject.convertXYLatLon(A)},getMapObjectPixelFromMapObjectLonLat:function(A){return this.mapObject.convertLatLonXY(A)},getLongitudeFromMapObjectLonLat:function(A){return this.sphericalMercator?this.forwardMercator(A.Lon,A.Lat).lon:A.Lon},getLatitudeFromMapObjectLonLat:function(A){return this.sphericalMercator?this.forwardMercator(A.Lon,A.Lat).lat:A.Lat},getMapObjectLonLatFromLonLat:function(D,C){var A;if(this.sphericalMercator){var B=this.inverseMercator(D,C);A=new YGeoPoint(B.lat,B.lon)}else{A=new YGeoPoint(C,D)}return A},getXFromMapObjectPixel:function(A){return A.x},getYFromMapObjectPixel:function(A){return A.y},getMapObjectPixelFromXY:function(A,B){return new YCoordPoint(A,B)},getMapObjectSizeFromOLSize:function(A){return new YSize(A.w,A.h)},CLASS_NAME:"OpenLayers.Layer.Yahoo"});OpenLayers.Style=OpenLayers.Class({id:null,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"]);this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")},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(J){var A=this.defaultsPerSymbolizer?{}:this.createLiterals(OpenLayers.Util.extend({},this.defaultStyle),J);var I=this.rules;var H,B;var C=[];var F=false;for(var D=0,E=I.length;D<E;D++){H=I[D];var G=H.evaluate(J);if(G){if(H instanceof OpenLayers.Rule&&H.elseFilter){C.push(H)}else{F=true;this.applySymbolizer(H,A,J)}}}if(F==false&&C.length>0){F=true;for(var D=0,E=C.length;D<E;D++){this.applySymbolizer(C[D],A,J)}}if(I.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=OpenLayers.Util.extend({},C.attributes||C.data);OpenLayers.Util.extend(B,this.context);for(var A in this.propertyStyles){D[A]=OpenLayers.Style.createLiteral(D[A],B,C,A)}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){Array.prototype.push.apply(this.rules,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]}}},clone:function(){var B=OpenLayers.Util.extend({},this);if(this.rules){B.rules=[];for(var C=0,A=this.rules.length;C<A;++C){B.rules.push(this.rules[C].clone())}}B.context=this.context&&OpenLayers.Util.extend({},this.context);var D=OpenLayers.Util.extend({},this.defaultStyle);return new OpenLayers.Style(D,B)},CLASS_NAME:"OpenLayers.Style"});OpenLayers.Style.createLiteral=function(D,B,A,C){if(typeof D=="string"&&D.indexOf("${")!=-1){D=OpenLayers.String.format(D,B,[A,C]);D=(isNaN(D)||!D)?D:parseFloat(D)}return D};OpenLayers.Style.SYMBOLIZER_PREFIXES=["Point","Line","Polygon","Text","Raster"];OpenLayers.Control.Navigation=OpenLayers.Class(OpenLayers.Control,{dragPan:null,dragPanOptions:null,documentDrag:false,zoomBox:null,zoomBoxEnabled:true,zoomWheelEnabled:true,mouseWheelOptions:null,handleRightClicks:false,zoomBoxKeyMask:OpenLayers.Handler.MOD_SHIFT,autoActivate:true,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();if(this.zoomBoxEnabled){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=OpenLayers.Function.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,documentDrag:this.documentDrag},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.mouseWheelOptions)},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(I,C){var H=this.map.getZoom();var F=this.map.getZoom()+Math.round(C);F=Math.max(F,0);F=Math.min(F,this.map.getNumZoomLevels());if(F===H){return }var J=this.map.getSize();var E=J.w/2-I.xy.x;var D=I.xy.y-J.h/2;var G=this.map.baseLayer.getResolutionForZoom(F);var A=this.map.getLonLatFromPixel(I.xy);var B=new OpenLayers.LonLat(A.lon+E*G,A.lat+D*G);this.map.setCenter(B,F)},wheelUp:function(A,B){this.wheelChange(A,B||1)},wheelDown:function(A,B){this.wheelChange(A,B||-1)},disableZoomBox:function(){this.zoomBoxEnabled=false;this.zoomBox.deactivate()},enableZoomBox:function(){this.zoomBoxEnabled=true;if(this.active){this.zoomBox.activate()}},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.Filter=OpenLayers.Class({initialize:function(A){OpenLayers.Util.extend(this,A)},destroy:function(){},evaluate:function(A){return true},clone:function(){return null},CLASS_NAME:"OpenLayers.Filter"});OpenLayers.Format.WMC.v1_0_0=OpenLayers.Class(OpenLayers.Format.WMC.v1,{VERSION:"1.0.0",schemaLocation:"http://www.opengis.net/context http://schemas.opengis.net/context/1.0.0/context.xsd",initialize:function(A){OpenLayers.Format.WMC.v1.prototype.initialize.apply(this,[A])},write_wmc_Layer:function(A){var B=OpenLayers.Format.WMC.v1.prototype.write_wmc_Layer.apply(this,[A]);B.appendChild(this.write_wmc_FormatList(A));B.appendChild(this.write_wmc_StyleList(A));B.appendChild(this.write_wmc_LayerExtension(A))},CLASS_NAME:"OpenLayers.Format.WMC.v1_0_0"});OpenLayers.Format.WMC.v1_1_0=OpenLayers.Class(OpenLayers.Format.WMC.v1,{VERSION:"1.1.0",schemaLocation:"http://www.opengis.net/context http://schemas.opengis.net/context/1.1.0/context.xsd",initialize:function(A){OpenLayers.Format.WMC.v1.prototype.initialize.apply(this,[A])},read_sld_MinScaleDenominator:function(C,B){var A=parseFloat(this.getChildValue(B));if(A>0){C.maxScale=A}},read_sld_MaxScaleDenominator:function(B,A){B.minScale=parseFloat(this.getChildValue(A))},write_wmc_Layer:function(B){var C=OpenLayers.Format.WMC.v1.prototype.write_wmc_Layer.apply(this,[B]);if(B.maxScale){var D=this.createElementNS(this.namespaces.sld,"sld:MinScaleDenominator");D.appendChild(this.createTextNode(B.maxScale.toPrecision(16)));C.appendChild(D)}if(B.minScale){var A=this.createElementNS(this.namespaces.sld,"sld:MaxScaleDenominator");A.appendChild(this.createTextNode(B.minScale.toPrecision(16)));C.appendChild(A)}C.appendChild(this.write_wmc_FormatList(B));C.appendChild(this.write_wmc_StyleList(B));C.appendChild(this.write_wmc_LayerExtension(B));return C},CLASS_NAME:"OpenLayers.Format.WMC.v1_1_0"});OpenLayers.Format.WMSCapabilities.v1_1_0=OpenLayers.Class(OpenLayers.Format.WMSCapabilities.v1_1,{version:"1.1.0",initialize:function(A){OpenLayers.Format.WMSCapabilities.v1_1.prototype.initialize.apply(this,[A])},readers:{wms:OpenLayers.Util.applyDefaults({SRS:function(E,F){var D=this.getChildValue(E);var B=D.split(/ +/);for(var C=0,A=B.length;C<A;C++){F.srs[B[C]]=true}}},OpenLayers.Format.WMSCapabilities.v1_1.prototype.readers.wms)},CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1_1_0"});OpenLayers.Format.WMSCapabilities.v1_1_1=OpenLayers.Class(OpenLayers.Format.WMSCapabilities.v1_1,{version:"1.1.1",initialize:function(A){OpenLayers.Format.WMSCapabilities.v1_1.prototype.initialize.apply(this,[A])},readers:{wms:OpenLayers.Util.applyDefaults({SRS:function(A,B){B.srs[this.getChildValue(A)]=true}},OpenLayers.Format.WMSCapabilities.v1_1.prototype.readers.wms)},CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1_1_1"});OpenLayers.Format.WMSCapabilities.v1_3_0=OpenLayers.Class(OpenLayers.Format.WMSCapabilities.v1_3,{version:"1.3.0",CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1_3_0"});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,b,B){var O=B&&B.point;var T=B&&B.tolerance;var E=false;var V=A.x1-b.x1;var Z=A.y1-b.y1;var L=A.x2-A.x1;var S=A.y2-A.y1;var P=b.y2-b.y1;var I=b.x2-b.x1;var X=(P*L)-(I*S);var D=(I*Z)-(P*V);var C=(L*Z)-(S*V);if(X==0){if(D==0&&C==0){E=true}}else{var Y=D/X;var W=C/X;if(Y>=0&&Y<=1&&W>=0&&W<=1){if(!O){E=true}else{var G=A.x1+(Y*L);var F=A.y1+(Y*S);E=new OpenLayers.Geometry.Point(G,F)}}}if(T){var N;if(E){if(O){var K=[A,b];var U,G,F;outer:for(var R=0;R<2;++R){U=K[R];for(var Q=1;Q<3;++Q){G=U["x"+Q];F=U["y"+Q];N=Math.sqrt(Math.pow(G-E.x,2)+Math.pow(F-E.y,2));if(N<T){E.x=G;E.y=F;break outer}}}}}else{var K=[A,b];var M,a,G,F,J,H;outer:for(var R=0;R<2;++R){M=K[R];a=K[(R+1)%2];for(var Q=1;Q<3;++Q){J={x:M["x"+Q],y:M["y"+Q]};H=OpenLayers.Geometry.distanceToSegment(J,a);if(H.distance<T){if(O){E=new OpenLayers.Geometry.Point(J.x,J.y)}else{E=true}break outer}}}}}return E};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.Layer.ArcGIS93Rest=OpenLayers.Class(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{format:"png"},isBaseLayer:true,initialize:function(D,C,E,B){var A=[];E=OpenLayers.Util.upperCaseObject(E);A.push(D,C,E,B);OpenLayers.Layer.Grid.prototype.initialize.apply(this,A);OpenLayers.Util.applyDefaults(this.params,OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS));if(this.params.TRANSPARENT&&this.params.TRANSPARENT.toString().toLowerCase()=="true"){if((B==null)||(!B.isBaseLayer)){this.isBaseLayer=false}if(this.params.FORMAT=="jpg"){this.params.FORMAT=OpenLayers.Util.alphaHack()?"gif":"png"}}},destroy:function(){OpenLayers.Layer.Grid.prototype.destroy.apply(this,arguments)},clone:function(A){if(A==null){A=new OpenLayers.Layer.ArcGIS93Rest(this.name,this.url,this.params,this.getOptions())}A=OpenLayers.Layer.Grid.prototype.clone.apply(this,[A]);return A},getURL:function(E){E=this.adjustBounds(E);var D=this.projection.getCode().split(":");var C=D[D.length-1];var G=this.getImageSize();var H={BBOX:E.toBBOX(),SIZE:G.w+","+G.h,F:"image",BBOXSR:C,IMAGESR:C};if(this.layerDefs){var F=[];var A;for(A in this.layerDefs){if(this.layerDefs.hasOwnProperty(A)){if(this.layerDefs[A]){F.push(A);F.push(":");F.push(this.layerDefs[A]);F.push(";")}}}if(F.length>0){H.LAYERDEFS=F.join("")}}var B=this.getFullRequestString(H);return B},setLayerFilter:function(B,A){if(!this.layerDefs){this.layerDefs={}}if(A){this.layerDefs[B]=A}else{delete this.layerDefs[B]}},clearLayerFilter:function(A){if(A){delete this.layerDefs[A]}else{delete this.layerDefs}},mergeNewParams:function(C){var B=OpenLayers.Util.upperCaseObject(C);var A=[B];return OpenLayers.Layer.Grid.prototype.mergeNewParams.apply(this,A)},addTile:function(B,A){return new OpenLayers.Tile.Image(this,A,B,null,this.tileSize)},CLASS_NAME:"OpenLayers.Layer.ArcGIS93Rest"});OpenLayers.Layer.Google.v3={DEFAULTS:{maxExtent:new OpenLayers.Bounds(-128*156543.0339,-128*156543.0339,128*156543.0339,128*156543.0339),sphericalMercator:true,maxResolution:156543.0339,units:"m",projection:"EPSG:900913"},loadMapObject:function(){if(!this.type){this.type=google.maps.MapTypeId.ROADMAP}var D;var C=OpenLayers.Layer.Google.cache[this.map.id];if(C){D=C.mapObject;++C.count}else{var B=this.map.viewPortDiv;var E=document.createElement("div");E.id=this.map.id+"_GMapContainer";E.style.position="absolute";E.style.width="100%";E.style.height="100%";B.appendChild(E);var A=this.map.getCenter();D=new google.maps.Map(E,{center:A?new google.maps.LatLng(A.lat,A.lon):new google.maps.LatLng(0,0),zoom:this.map.getZoom()||0,mapTypeId:this.type,disableDefaultUI:true,keyboardShortcuts:false,draggable:false,disableDoubleClickZoom:true,scrollwheel:false});C={mapObject:D,count:1};OpenLayers.Layer.Google.cache[this.map.id]=C;this.repositionListener=google.maps.event.addListenerOnce(D,"center_changed",OpenLayers.Function.bind(this.repositionMapElements,this))}this.mapObject=D;this.setGMapVisibility(this.visibility)},repositionMapElements:function(){google.maps.event.trigger(this.mapObject,"resize");var E=this.mapObject.getDiv().firstChild;if(!E||E.childNodes.length<3){this.repositionTimer=window.setTimeout(OpenLayers.Function.bind(this.repositionMapElements,this),250);return false}var D=OpenLayers.Layer.Google.cache[this.map.id];var B=this.map.viewPortDiv;var C=E.lastChild;B.appendChild(C);C.style.zIndex="1100";C.style.bottom="";C.className="olLayerGoogleCopyright olLayerGoogleV3";C.style.display="";D.termsOfUse=C;var A=E.lastChild;B.appendChild(A);A.style.zIndex="1100";A.style.bottom="";A.className="olLayerGooglePoweredBy olLayerGoogleV3 gmnoprint";A.style.display="";D.poweredBy=A;this.setGMapVisibility(this.visibility)},onMapResize:function(){if(this.visibility){google.maps.event.trigger(this.mapObject,"resize")}else{if(!this._resized){var A=this;google.maps.event.addListenerOnce(this.mapObject,"tilesloaded",function(){delete A._resized;google.maps.event.trigger(A.mapObject,"resize");A.moveTo(A.map.getCenter(),A.map.getZoom())})}this._resized=true}},setGMapVisibility:function(G){var B=OpenLayers.Layer.Google.cache[this.map.id];if(B){var E=this.type;var F=this.map.layers;var D;for(var C=F.length-1;C>=0;--C){D=F[C];if(D instanceof OpenLayers.Layer.Google&&D.visibility===true&&D.inRange===true){E=D.type;G=true;break}}var A=this.mapObject.getDiv();if(G===true){this.mapObject.setMapTypeId(E);A.style.left="";if(B.termsOfUse&&B.termsOfUse.style){B.termsOfUse.style.left="";B.termsOfUse.style.display="";B.poweredBy.style.display=""}B.displayed=this.id}else{delete B.displayed;A.style.left="-9999px";if(B.termsOfUse&&B.termsOfUse.style){B.termsOfUse.style.display="none";B.termsOfUse.style.left="-9999px";B.poweredBy.style.display="none"}}}},getMapContainer:function(){return this.mapObject.getDiv()},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 google.maps.LatLngBounds(new google.maps.LatLng(A.lat,A.lon),new google.maps.LatLng(D.lat,D.lon))}return B},getMapObjectLonLatFromMapObjectPixel:function(H){var B=this.map.getSize();var F=this.getLongitudeFromMapObjectLonLat(this.mapObject.center);var D=this.getLatitudeFromMapObjectLonLat(this.mapObject.center);var A=this.map.getResolution();var G=H.x-(B.w/2);var E=H.y-(B.h/2);var C=new OpenLayers.LonLat(F+G*A,D-E*A);if(this.wrapDateLine){C=C.wrapDateLine(this.maxExtent)}return this.getMapObjectLonLatFromLonLat(C.lon,C.lat)},getMapObjectPixelFromMapObjectLonLat:function(F){var E=this.getLongitudeFromMapObjectLonLat(F);var D=this.getLatitudeFromMapObjectLonLat(F);var B=this.map.getResolution();var C=this.map.getExtent();var A=new OpenLayers.Pixel((1/B*(E-C.left)),(1/B*(C.top-D)));return this.getMapObjectPixelFromXY(A.x,A.y)},setMapObjectCenter:function(A,B){this.mapObject.setOptions({center:A,zoom:B})},getMapObjectZoomFromMapObjectBounds:function(A){return this.mapObject.getBoundsZoomLevel(A)},getMapObjectLonLatFromLonLat:function(D,B){var C;if(this.sphericalMercator){var A=this.inverseMercator(D,B);C=new google.maps.LatLng(A.lat,A.lon)}else{C=new google.maps.LatLng(B,D)}return C},getMapObjectPixelFromXY:function(A,B){return new google.maps.Point(A,B)},destroy:function(){if(this.repositionListener){google.maps.event.removeListener(this.repositionListener)}if(this.repositionTimer){window.clearTimeout(this.repositionTimer)}OpenLayers.Layer.Google.prototype.destroy.apply(this,arguments)}};OpenLayers.Layer.KaMap=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:true,units:null,resolution:OpenLayers.DOTS_PER_INCH,DEFAULT_PARAMS:{i:"jpeg",map:""},initialize:function(D,C,E,B){var A=[];A.push(D,C,E,B);OpenLayers.Layer.Grid.prototype.initialize.apply(this,A);this.params=OpenLayers.Util.applyDefaults(this.params,this.DEFAULT_PARAMS)},getURL:function(C){C=this.adjustBounds(C);var D=this.map.getResolution();var E=Math.round((this.map.getScale()*10000))/10000;var B=Math.round(C.left/D);var A=-Math.round(C.top/D);return this.getFullRequestString({t:A,l:B,s:E})},addTile:function(C,A){var B=this.getURL(C);return new OpenLayers.Tile.Image(this,A,C,B,this.tileSize)},calculateGridLayout:function(A,O,E){var K=E*this.tileSize.w;var C=E*this.tileSize.h;var I=A.left;var L=Math.floor(I/K)-this.buffer;var J=I/K-L;var F=-J*this.tileSize.w;var M=L*K;var B=A.top;var H=Math.ceil(B/C)+this.buffer;var N=H-B/C;var D=-(N+1)*this.tileSize.h;var G=H*C;return{tilelon:K,tilelat:C,tileoffsetlon:M,tileoffsetlat:G,tileoffsetx:F,tileoffsety:D}},clone:function(A){if(A==null){A=new OpenLayers.Layer.KaMap(this.name,this.url,this.params,this.getOptions())}A=OpenLayers.Layer.Grid.prototype.clone.apply(this,[A]);if(this.tileSize!=null){A.tileSize=this.tileSize.clone()}A.grid=[];return A},getTileBounds:function(C){var E=this.getResolution();var D=E*this.tileSize.w;var B=E*this.tileSize.h;var G=this.getLonLatFromViewPortPx(C);var A=D*Math.floor(G.lon/D);var F=B*Math.floor(G.lat/B);return new OpenLayers.Bounds(A,F,A+D,F+B)},CLASS_NAME:"OpenLayers.Layer.KaMap"});OpenLayers.Layer.MapGuide=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:true,useHttpTile:false,singleTile:false,useOverlay:false,useAsyncOverlay:true,TILE_PARAMS:{operation:"GETTILEIMAGE",version:"1.2.0"},SINGLE_TILE_PARAMS:{operation:"GETMAPIMAGE",format:"PNG",locale:"en",clip:"1",version:"1.0.0"},OVERLAY_PARAMS:{operation:"GETDYNAMICMAPOVERLAYIMAGE",format:"PNG",locale:"en",clip:"1",version:"2.0.0"},FOLDER_PARAMS:{tileColumnsPerFolder:30,tileRowsPerFolder:30,format:"png",querystring:null},defaultSize:new OpenLayers.Size(300,300),initialize:function(C,B,D,A){OpenLayers.Layer.Grid.prototype.initialize.apply(this,arguments);if(A==null||A.isBaseLayer==null){this.isBaseLayer=((this.transparent!="true")&&(this.transparent!=true))}if(A&&A.useOverlay!=null){this.useOverlay=A.useOverlay}if(this.singleTile){if(this.useOverlay){OpenLayers.Util.applyDefaults(this.params,this.OVERLAY_PARAMS);if(!this.useAsyncOverlay){this.params.version="1.0.0"}}else{OpenLayers.Util.applyDefaults(this.params,this.SINGLE_TILE_PARAMS)}}else{if(this.useHttpTile){OpenLayers.Util.applyDefaults(this.params,this.FOLDER_PARAMS)}else{OpenLayers.Util.applyDefaults(this.params,this.TILE_PARAMS)}this.setTileSize(this.defaultSize)}},clone:function(A){if(A==null){A=new OpenLayers.Layer.MapGuide(this.name,this.url,this.params,this.getOptions())}A=OpenLayers.Layer.Grid.prototype.clone.apply(this,[A]);return A},addTile:function(B,A){return new OpenLayers.Tile.Image(this,A,B,null,this.tileSize)},getURL:function(A){var D;var B=A.getCenterLonLat();var H=this.map.getSize();if(this.singleTile){var E={setdisplaydpi:OpenLayers.DOTS_PER_INCH,setdisplayheight:H.h*this.ratio,setdisplaywidth:H.w*this.ratio,setviewcenterx:B.lon,setviewcentery:B.lat,setviewscale:this.map.getScale()};if(this.useOverlay&&!this.useAsyncOverlay){var I={};I=OpenLayers.Util.extend(I,E);I.operation="GETVISIBLEMAPEXTENT";I.version="1.0.0";I.session=this.params.session;I.mapName=this.params.mapName;I.format="text/xml";D=this.getFullRequestString(I);OpenLayers.Request.GET({url:D,async:false})}D=this.getFullRequestString(E)}else{var G=this.map.getResolution();var F=Math.floor((A.left-this.maxExtent.left)/G);F=Math.round(F/this.tileSize.w);var C=Math.floor((this.maxExtent.top-A.top)/G);C=Math.round(C/this.tileSize.h);if(this.useHttpTile){D=this.getImageFilePath({tilecol:F,tilerow:C,scaleindex:this.resolutions.length-this.map.zoom-1})}else{D=this.getFullRequestString({tilecol:F,tilerow:C,scaleindex:this.resolutions.length-this.map.zoom-1})}}return D},getFullRequestString:function(F,E){var B=(E==null)?this.url:E;if(typeof B=="object"){B=B[Math.floor(Math.random()*B.length)]}var I=B;var G=OpenLayers.Util.extend({},this.params);G=OpenLayers.Util.extend(G,F);var D=OpenLayers.Util.upperCaseObject(OpenLayers.Util.getParameters(B));for(var H in G){if(H.toUpperCase() in D){delete G[H]}}var A=OpenLayers.Util.getParameterString(G);A=A.replace(/,/g,"+");if(A!=""){var C=B.charAt(B.length-1);if((C=="&")||(C=="?")){I+=A}else{if(B.indexOf("?")==-1){I+="?"+A}else{I+="&"+A}}}return I},getImageFilePath:function(G,E){var C=(E==null)?this.url:E;if(typeof C=="object"){C=C[Math.floor(Math.random()*C.length)]}var B=C;var D="";var F="";if(G.tilerow<0){D="-"}if(G.tilerow==0){D+="0"}else{D+=Math.floor(Math.abs(G.tilerow/this.params.tileRowsPerFolder))*this.params.tileRowsPerFolder}if(G.tilecol<0){F="-"}if(G.tilecol==0){F+="0"}else{F+=Math.floor(Math.abs(G.tilecol/this.params.tileColumnsPerFolder))*this.params.tileColumnsPerFolder}var A="/S"+Math.floor(G.scaleindex)+"/"+this.params.basemaplayergroupname+"/R"+D+"/C"+F+"/"+(G.tilerow%this.params.tileRowsPerFolder)+"_"+(G.tilecol%this.params.tileColumnsPerFolder)+"."+this.params.format;if(this.params.querystring){A+="?"+this.params.querystring}B+=A;return B},calculateGridLayout:function(A,O,E){var K=E*this.tileSize.w;var C=E*this.tileSize.h;var I=A.left-O.left;var L=Math.floor(I/K)-this.buffer;var J=I/K-L;var F=-J*this.tileSize.w;var M=O.left+L*K;var B=O.top-A.top+C;var H=Math.floor(B/C)-this.buffer;var N=H-B/C;var D=N*this.tileSize.h;var G=O.top-C*H;return{tilelon:K,tilelat:C,tileoffsetlon:M,tileoffsetlat:G,tileoffsetx:F,tileoffsety:D}},CLASS_NAME:"OpenLayers.Layer.MapGuide"});OpenLayers.Layer.MapServer=OpenLayers.Class(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{mode:"map",map_imagetype:"png"},initialize:function(D,C,E,B){var A=[];A.push(D,C,E,B);OpenLayers.Layer.Grid.prototype.initialize.apply(this,A);this.params=OpenLayers.Util.applyDefaults(this.params,this.DEFAULT_PARAMS);if(B==null||B.isBaseLayer==null){this.isBaseLayer=((this.params.transparent!="true")&&(this.params.transparent!=true))}},clone:function(A){if(A==null){A=new OpenLayers.Layer.MapServer(this.name,this.url,this.params,this.getOptions())}A=OpenLayers.Layer.Grid.prototype.clone.apply(this,[A]);return A},addTile:function(B,A){return new OpenLayers.Tile.Image(this,A,B,null,this.tileSize)},getURL:function(C){C=this.adjustBounds(C);var B=[C.left,C.bottom,C.right,C.top];var D=this.getImageSize();var A=this.getFullRequestString({mapext:B,imgext:B,map_size:[D.w,D.h],imgx:D.w/2,imgy:D.h/2,imgxy:[D.w,D.h]});return A},getFullRequestString:function(F,E){var B=(E==null)?this.url:E;var G=OpenLayers.Util.extend({},this.params);G=OpenLayers.Util.extend(G,F);var A=OpenLayers.Util.getParameterString(G);if(B instanceof Array){B=this.selectUrl(A,B)}var D=OpenLayers.Util.upperCaseObject(OpenLayers.Util.getParameters(B));for(var H in G){if(H.toUpperCase() in D){delete G[H]}}A=OpenLayers.Util.getParameterString(G);var I=B;A=A.replace(/,/g,"+");if(A!=""){var C=B.charAt(B.length-1);if((C=="&")||(C=="?")){I+=A}else{if(B.indexOf("?")==-1){I+="?"+A}else{I+="&"+A}}}return I},CLASS_NAME:"OpenLayers.Layer.MapServer"});OpenLayers.Layer.TMS=OpenLayers.Class(OpenLayers.Layer.Grid,{serviceVersion:"1.0.0",isBaseLayer:true,tileOrigin:null,serverResolutions:null,zoomOffset:0,initialize:function(D,C,B){var A=[];A.push(D,C,{},B);OpenLayers.Layer.Grid.prototype.initialize.apply(this,A)},destroy:function(){OpenLayers.Layer.Grid.prototype.destroy.apply(this,arguments)},clone:function(A){if(A==null){A=new OpenLayers.Layer.TMS(this.name,this.url,this.getOptions())}A=OpenLayers.Layer.Grid.prototype.clone.apply(this,[A]);return A},getURL:function(D){D=this.adjustBounds(D);var C=this.map.getResolution();var A=Math.round((D.left-this.tileOrigin.lon)/(C*this.tileSize.w));var G=Math.round((D.bottom-this.tileOrigin.lat)/(C*this.tileSize.h));var F=this.serverResolutions!=null?OpenLayers.Util.indexOf(this.serverResolutions,C):this.map.getZoom()+this.zoomOffset;var E=this.serviceVersion+"/"+this.layername+"/"+F+"/"+A+"/"+G+"."+this.type;var B=this.url;if(B instanceof Array){B=this.selectUrl(E,B)}return B+E},addTile:function(B,A){return new OpenLayers.Tile.Image(this,A,B,null,this.tileSize)},setMap:function(A){OpenLayers.Layer.Grid.prototype.setMap.apply(this,arguments);if(!this.tileOrigin){this.tileOrigin=new OpenLayers.LonLat(this.map.maxExtent.left,this.map.maxExtent.bottom)}},CLASS_NAME:"OpenLayers.Layer.TMS"});OpenLayers.Layer.TileCache=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:true,format:"image/png",serverResolutions:null,initialize:function(C,B,D,A){this.layername=D;OpenLayers.Layer.Grid.prototype.initialize.apply(this,[C,B,{},A]);this.extension=this.format.split("/")[1].toLowerCase();this.extension=(this.extension=="jpg")?"jpeg":this.extension},clone:function(A){if(A==null){A=new OpenLayers.Layer.TileCache(this.name,this.url,this.layername,this.getOptions())}A=OpenLayers.Layer.Grid.prototype.clone.apply(this,[A]);return A},getURL:function(B){var F=this.map.getResolution();var G=this.maxExtent;var K=this.tileSize;var A=Math.round((B.left-G.left)/(F*K.w));var J=Math.round((B.bottom-G.bottom)/(F*K.h));var H=this.serverResolutions!=null?OpenLayers.Util.indexOf(this.serverResolutions,F):this.map.getZoom();function E(O,N){O=String(O);var L=[];for(var M=0;M<N;++M){L.push("0")}return L.join("").substring(0,N-O.length)+O}var D=[this.layername,E(H,2),E(parseInt(A/1000000),3),E((parseInt(A/1000)%1000),3),E((parseInt(A)%1000),3),E(parseInt(J/1000000),3),E((parseInt(J/1000)%1000),3),E((parseInt(J)%1000),3)+"."+this.extension];var I=D.join("/");var C=this.url;if(C instanceof Array){C=this.selectUrl(I,C)}C=(C.charAt(C.length-1)=="/")?C:C+"/";return C+I},addTile:function(C,A){var B=this.getURL(C);return new OpenLayers.Tile.Image(this,A,C,B,this.tileSize)},CLASS_NAME:"OpenLayers.Layer.TileCache"});OpenLayers.Layer.WMS=OpenLayers.Class(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{service:"WMS",version:"1.1.1",request:"GetMap",styles:"",exceptions:"application/vnd.ogc.se_inimage",format:"image/jpeg"},reproject:false,isBaseLayer:true,encodeBBOX:false,noMagic:false,yx:{"EPSG:4326":true},initialize:function(D,C,E,B){var A=[];E=OpenLayers.Util.upperCaseObject(E);if(parseFloat(E.VERSION)>=1.3&&!E.EXCEPTIONS){E.EXCEPTIONS="INIMAGE"}A.push(D,C,E,B);OpenLayers.Layer.Grid.prototype.initialize.apply(this,A);OpenLayers.Util.applyDefaults(this.params,OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS));if(!this.noMagic&&this.params.TRANSPARENT&&this.params.TRANSPARENT.toString().toLowerCase()=="true"){if((B==null)||(!B.isBaseLayer)){this.isBaseLayer=false}if(this.params.FORMAT=="image/jpeg"){this.params.FORMAT=OpenLayers.Util.alphaHack()?"image/gif":"image/png"}}},destroy:function(){OpenLayers.Layer.Grid.prototype.destroy.apply(this,arguments)},clone:function(A){if(A==null){A=new OpenLayers.Layer.WMS(this.name,this.url,this.params,this.getOptions())}A=OpenLayers.Layer.Grid.prototype.clone.apply(this,[A]);return A},reverseAxisOrder:function(){return(parseFloat(this.params.VERSION)>=1.3&&!!this.yx[this.map.getProjectionObject().getCode()])},getURL:function(C){C=this.adjustBounds(C);var D=this.getImageSize();var E={};var B=this.reverseAxisOrder();E.BBOX=this.encodeBBOX?C.toBBOX(null,B):C.toArray(B);E.WIDTH=D.w;E.HEIGHT=D.h;var A=this.getFullRequestString(E);return A},addTile:function(B,A){return new OpenLayers.Tile.Image(this,A,B,null,this.tileSize)},mergeNewParams:function(C){var B=OpenLayers.Util.upperCaseObject(C);var A=[B];return OpenLayers.Layer.Grid.prototype.mergeNewParams.apply(this,A)},getFullRequestString:function(D,B){var A=this.map.getProjection();var C=(A=="none")?null:A;if(parseFloat(this.params.VERSION)>=1.3){this.params.CRS=C}else{this.params.SRS=C}return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,arguments)},CLASS_NAME:"OpenLayers.Layer.WMS"});OpenLayers.Layer.WMTS=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:true,version:"1.0.0",requestEncoding:"KVP",url:null,layer:null,matrixSet:null,style:null,format:"image/jpeg",tileOrigin:null,tileFullExtent:null,formatSuffix:null,matrixIds:null,dimensions:null,params:null,zoomOffset:0,formatSuffixMap:{"image/png":"png","image/png8":"png","image/png24":"png","image/png32":"png",png:"png","image/jpeg":"jpg","image/jpg":"jpg",jpeg:"jpg",jpg:"jpg"},matrix:null,initialize:function(C){var F={url:true,layer:true,style:true,matrixSet:true};for(var G in F){if(!(G in C)){throw new Error("Missing property '"+G+"' in layer configuration.")}}C.params=OpenLayers.Util.upperCaseObject(C.params);var B=[C.name,C.url,C.params,C];OpenLayers.Layer.Grid.prototype.initialize.apply(this,B);if(!this.formatSuffix){this.formatSuffix=this.formatSuffixMap[this.format]||this.format.split("/").pop()}if(this.matrixIds){var A=this.matrixIds.length;if(A&&typeof this.matrixIds[0]==="string"){var E=this.matrixIds;this.matrixIds=new Array(A);for(var D=0;D<A;++D){this.matrixIds[D]={identifier:E[D]}}}}},setMap:function(){OpenLayers.Layer.Grid.prototype.setMap.apply(this,arguments);this.updateMatrixProperties()},updateMatrixProperties:function(){this.matrix=this.getMatrix();if(this.matrix){if(this.matrix.topLeftCorner){this.tileOrigin=this.matrix.topLeftCorner}if(this.matrix.tileWidth&&this.matrix.tileHeight){this.tileSize=new OpenLayers.Size(this.matrix.tileWidth,this.matrix.tileHeight)}if(!this.tileOrigin){this.tileOrigin=new OpenLayers.LonLat(this.maxExtent.left,this.maxExtent.top)}if(!this.tileFullExtent){this.tileFullExtent=this.maxExtent}}},moveTo:function(B,A,C){if(A||!this.matrix){this.updateMatrixProperties()}return OpenLayers.Layer.Grid.prototype.moveTo.apply(this,arguments)},clone:function(A){if(A==null){A=new OpenLayers.Layer.WMTS(this.options)}A=OpenLayers.Layer.Grid.prototype.clone.apply(this,[A]);return A},getMatrix:function(){var B;if(!this.matrixIds||this.matrixIds.length===0){B={identifier:this.map.getZoom()+this.zoomOffset}}else{if("scaleDenominator" in this.matrixIds[0]){var A=OpenLayers.METERS_PER_INCH*OpenLayers.INCHES_PER_UNIT[this.units]*this.map.getResolution()/0.00028;var E=Number.POSITIVE_INFINITY;var F;for(var C=0,D=this.matrixIds.length;C<D;++C){F=Math.abs(1-(this.matrixIds[C].scaleDenominator/A));if(F<E){E=F;B=this.matrixIds[C]}}}else{B=this.matrixIds[this.map.getZoom()+this.zoomOffset]}}return B},getTileInfo:function(F){var B=this.map.getResolution();var D=(F.lon-this.tileOrigin.lon)/(B*this.tileSize.w);var C=(this.tileOrigin.lat-F.lat)/(B*this.tileSize.h);var A=Math.floor(D);var E=Math.floor(C);return{col:A,row:E,i:Math.floor((D-A)*this.tileSize.w),j:Math.floor((C-E)*this.tileSize.h)}},getURL:function(D){D=this.adjustBounds(D);var B="";if(!this.tileFullExtent||this.tileFullExtent.intersectsBounds(D)){var A=D.getCenterLonLat();var F=this.getTileInfo(A);var H=this.matrix.identifier;if(this.requestEncoding.toUpperCase()==="REST"){var E=this.version+"/"+this.layer+"/"+this.style+"/";if(this.dimensions){for(var C=0;C<this.dimensions.length;C++){if(this.params[this.dimensions[C]]){E=E+this.params[this.dimensions[C]]+"/"}}}E=E+this.matrixSet+"/"+this.matrix.identifier+"/"+F.row+"/"+F.col+"."+this.formatSuffix;if(this.url instanceof Array){B=this.selectUrl(E,this.url)}else{B=this.url}if(!B.match(/\/$/)){B=B+"/"}B=B+E}else{if(this.requestEncoding.toUpperCase()==="KVP"){var G={SERVICE:"WMTS",REQUEST:"GetTile",VERSION:this.version,LAYER:this.layer,STYLE:this.style,TILEMATRIXSET:this.matrixSet,TILEMATRIX:this.matrix.identifier,TILEROW:F.row,TILECOL:F.col,FORMAT:this.format};B=OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,[G])}}}return B},mergeNewParams:function(A){if(this.requestEncoding.toUpperCase()==="KVP"){return OpenLayers.Layer.Grid.prototype.mergeNewParams.apply(this,[OpenLayers.Util.upperCaseObject(A)])}},addTile:function(B,A){return new OpenLayers.Tile.Image(this,A,B,null,this.tileSize)},CLASS_NAME:"OpenLayers.Layer.WMTS"});OpenLayers.Layer.WorldWind=OpenLayers.Class(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{},isBaseLayer:true,lzd:null,zoomLevels:null,initialize:function(D,C,E,G,F,B){this.lzd=E;this.zoomLevels=G;var A=[];A.push(D,C,F,B);OpenLayers.Layer.Grid.prototype.initialize.apply(this,A);this.params=OpenLayers.Util.applyDefaults(this.params,this.DEFAULT_PARAMS)},addTile:function(B,A){return new OpenLayers.Tile.Image(this,A,B,null,this.tileSize)},getZoom:function(){var B=this.map.getZoom();var A=this.map.getMaxExtent();B=B-Math.log(this.maxResolution/(this.lzd/512))/Math.log(2);return B},getURL:function(E){E=this.adjustBounds(E);var D=this.getZoom();var B=this.map.getMaxExtent();var C=this.lzd/Math.pow(2,this.getZoom());var A=Math.floor((E.left-B.left)/C);var F=Math.floor((E.bottom-B.bottom)/C);if(this.map.getResolution()<=(this.lzd/512)&&this.getZoom()<=this.zoomLevels){return this.getFullRequestString({L:D,X:A,Y:F})}else{return OpenLayers.Util.getImagesLocation()+"blank.gif"}},CLASS_NAME:"OpenLayers.Layer.WorldWind"});OpenLayers.Layer.XYZ=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:true,sphericalMercator:false,zoomOffset:0,initialize:function(D,C,B){if(B&&B.sphericalMercator||this.sphericalMercator){B=OpenLayers.Util.extend({maxExtent:new OpenLayers.Bounds(-128*156543.0339,-128*156543.0339,128*156543.0339,128*156543.0339),maxResolution:156543.0339,numZoomLevels:19,units:"m",projection:"EPSG:900913"},B)}C=C||this.url;D=D||this.name;var A=[D,C,{},B];OpenLayers.Layer.Grid.prototype.initialize.apply(this,A)},clone:function(A){if(A==null){A=new OpenLayers.Layer.XYZ(this.name,this.url,this.getOptions())}A=OpenLayers.Layer.Grid.prototype.clone.apply(this,[A]);return A},getURL:function(E){var C=this.map.getResolution();var A=Math.round((E.left-this.maxExtent.left)/(C*this.tileSize.w));var H=Math.round((this.maxExtent.top-E.top)/(C*this.tileSize.h));var G=this.map.getZoom()+this.zoomOffset;var B=this.url;var D=""+A+H+G;if(B instanceof Array){B=this.selectUrl(D,B)}var F=OpenLayers.String.format(B,{x:A,y:H,z:G});return F},addTile:function(B,A){return new OpenLayers.Tile.Image(this,A,B,null,this.tileSize)},setMap:function(A){OpenLayers.Layer.Grid.prototype.setMap.apply(this,arguments);if(!this.tileOrigin){this.tileOrigin=new OpenLayers.LonLat(this.maxExtent.left,this.maxExtent.bottom)}},CLASS_NAME:"OpenLayers.Layer.XYZ"});OpenLayers.Layer.OSM=OpenLayers.Class(OpenLayers.Layer.XYZ,{name:"OpenStreetMap",attribution:"Data CC-By-SA by <a href='http://openstreetmap.org/'>OpenStreetMap</a>",sphericalMercator:true,url:"http://tile.openstreetmap.org/${z}/${x}/${y}.png",clone:function(A){if(A==null){A=new OpenLayers.Layer.OSM(this.name,this.url,this.getOptions())}A=OpenLayers.Layer.XYZ.prototype.clone.apply(this,[A]);return A},CLASS_NAME:"OpenLayers.Layer.OSM"});OpenLayers.Layer.Zoomify=OpenLayers.Class(OpenLayers.Layer.Grid,{url:null,size:null,isBaseLayer:true,standardTileSize:256,numberOfTiers:0,tileCountUpToTier:new Array(),tierSizeInTiles:new Array(),tierImageSize:new Array(),initialize:function(D,C,E,B){this.initializeZoomify(E);var A=[];A.push(D,C,E,{},B);OpenLayers.Layer.Grid.prototype.initialize.apply(this,A)},initializeZoomify:function(C){var D=C.clone();var A=new OpenLayers.Size(Math.ceil(D.w/this.standardTileSize),Math.ceil(D.h/this.standardTileSize));this.tierSizeInTiles.push(A);this.tierImageSize.push(D);while(D.w>this.standardTileSize||D.h>this.standardTileSize){D=new OpenLayers.Size(Math.floor(D.w/2),Math.floor(D.h/2));A=new OpenLayers.Size(Math.ceil(D.w/this.standardTileSize),Math.ceil(D.h/this.standardTileSize));this.tierSizeInTiles.push(A);this.tierImageSize.push(D)}this.tierSizeInTiles.reverse();this.tierImageSize.reverse();this.numberOfTiers=this.tierSizeInTiles.length;this.tileCountUpToTier[0]=0;for(var B=1;B<this.numberOfTiers;B++){this.tileCountUpToTier.push(this.tierSizeInTiles[B-1].w*this.tierSizeInTiles[B-1].h+this.tileCountUpToTier[B-1])}},destroy:function(){OpenLayers.Layer.Grid.prototype.destroy.apply(this,arguments);this.tileCountUpToTier.length=0;this.tierSizeInTiles.length=0;this.tierImageSize.length=0},clone:function(A){if(A==null){A=new OpenLayers.Layer.Zoomify(this.name,this.url,this.size,this.options)}A=OpenLayers.Layer.Grid.prototype.clone.apply(this,[A]);return A},getURL:function(D){D=this.adjustBounds(D);var C=this.map.getResolution();var A=Math.round((D.left-this.tileOrigin.lon)/(C*this.tileSize.w));var H=Math.round((this.tileOrigin.lat-D.top)/(C*this.tileSize.h));var G=this.map.getZoom();var F=A+H*this.tierSizeInTiles[G].w+this.tileCountUpToTier[G];var E="TileGroup"+Math.floor((F)/256)+"/"+G+"-"+A+"-"+H+".jpg";var B=this.url;if(B instanceof Array){B=this.selectUrl(E,B)}return B+E},getImageSize:function(){if(arguments.length>0){bounds=this.adjustBounds(arguments[0]);var C=this.map.getResolution();var A=Math.round((bounds.left-this.tileOrigin.lon)/(C*this.tileSize.w));var F=Math.round((this.tileOrigin.lat-bounds.top)/(C*this.tileSize.h));var E=this.map.getZoom();var B=this.standardTileSize;var D=this.standardTileSize;if(A==this.tierSizeInTiles[E].w-1){var B=this.tierImageSize[E].w%this.standardTileSize}if(F==this.tierSizeInTiles[E].h-1){var D=this.tierImageSize[E].h%this.standardTileSize}return(new OpenLayers.Size(B,D))}else{return this.tileSize}},addTile:function(B,A){return new OpenLayers.Tile.Image(this,A,B,null,this.tileSize)},setMap:function(A){OpenLayers.Layer.Grid.prototype.setMap.apply(this,arguments);this.tileOrigin=new OpenLayers.LonLat(this.map.maxExtent.left,this.map.maxExtent.top)},calculateGridLayout:function(A,O,E){var K=E*this.tileSize.w;var C=E*this.tileSize.h;var I=A.left-O.left;var L=Math.floor(I/K)-this.buffer;var J=I/K-L;var F=-J*this.tileSize.w;var M=O.left+L*K;var B=O.top-A.top+C;var H=Math.floor(B/C)-this.buffer;var N=H-B/C;var D=N*this.tileSize.h;var G=O.top-C*H;return{tilelon:K,tilelat:C,tileoffsetlon:M,tileoffsetlat:G,tileoffsetx:F,tileoffsety:D}},CLASS_NAME:"OpenLayers.Layer.Zoomify"});OpenLayers.Protocol.SQL.Gears=OpenLayers.Class(OpenLayers.Protocol.SQL,{FID_PREFIX:"__gears_fid__",NULL_GEOMETRY:"__gears_null_geometry__",NULL_FEATURE_STATE:"__gears_null_feature_state__",jsonParser:null,wktParser:null,fidRegExp:null,saveFeatureState:true,typeOfFid:"string",db:null,initialize:function(A){if(!this.supported()){return }OpenLayers.Protocol.SQL.prototype.initialize.apply(this,[A]);this.jsonParser=new OpenLayers.Format.JSON();this.wktParser=new OpenLayers.Format.WKT();this.fidRegExp=new RegExp("^"+this.FID_PREFIX);this.initializeDatabase()},initializeDatabase:function(){this.db=google.gears.factory.create("beta.database");this.db.open(this.databaseName);this.db.execute("CREATE TABLE IF NOT EXISTS "+this.tableName+" (fid TEXT UNIQUE, geometry TEXT, properties TEXT,  state TEXT)")},destroy:function(){this.db.close();this.db=null;this.jsonParser=null;this.wktParser=null;OpenLayers.Protocol.SQL.prototype.destroy.apply(this)},supported:function(){return !!(window.google&&google.gears)},read:function(B){OpenLayers.Protocol.prototype.read.apply(this,arguments);B=OpenLayers.Util.applyDefaults(B,this.options);var C,D=[];var A=this.db.execute("SELECT * FROM "+this.tableName);while(A.isValidRow()){C=this.unfreezeFeature(A);if(this.evaluateFilter(C,B.filter)){if(!B.noFeatureStateReset){C.state=null}D.push(C)}A.next()}A.close();var E=new OpenLayers.Protocol.Response({code:OpenLayers.Protocol.Response.SUCCESS,requestType:"read",features:D});if(B&&B.callback){B.callback.call(B.scope,E)}return E},unfreezeFeature:function(D){var A;var B=D.fieldByName("geometry");if(B==this.NULL_GEOMETRY){A=new OpenLayers.Feature.Vector()}else{A=this.wktParser.read(B)}A.attributes=this.jsonParser.read(D.fieldByName("properties"));A.fid=this.extractFidFromField(D.fieldByName("fid"));var C=D.fieldByName("state");if(C==this.NULL_FEATURE_STATE){C=null}A.state=C;return A},extractFidFromField:function(A){if(!A.match(this.fidRegExp)&&this.typeOfFid=="number"){A=parseFloat(A)}return A},create:function(B,A){A=OpenLayers.Util.applyDefaults(A,this.options);var C=this.createOrUpdate(B);C.requestType="create";if(A&&A.callback){A.callback.call(A.scope,C)}return C},update:function(B,A){A=OpenLayers.Util.applyDefaults(A,this.options);var C=this.createOrUpdate(B);C.requestType="update";if(A&&A.callback){A.callback.call(A.scope,C)}return C},createOrUpdate:function(E){if(!(E instanceof Array)){E=[E]}var C,A=E.length,B;var D=new Array(A);for(C=0;C<A;C++){B=E[C];var F=this.freezeFeature(B);this.db.execute("REPLACE INTO "+this.tableName+" (fid, geometry, properties, state) VALUES (?, ?, ?, ?)",F);var G=B.clone();G.fid=this.extractFidFromField(F[0]);D[C]=G}return new OpenLayers.Protocol.Response({code:OpenLayers.Protocol.Response.SUCCESS,features:D,reqFeatures:E})},freezeFeature:function(B){B.fid=B.fid!=null?""+B.fid:OpenLayers.Util.createUniqueID(this.FID_PREFIX);var D=B.geometry!=null?B.geometry.toString():this.NULL_GEOMETRY;var A=this.jsonParser.write(B.attributes);var C=this.getFeatureStateForFreeze(B);return[B.fid,D,A,C]},getFeatureStateForFreeze:function(A){var B;if(!this.saveFeatureState){B=this.NULL_FEATURE_STATE}else{if(this.createdOffline(A)){B=OpenLayers.State.INSERT}else{B=A.state}}return B},"delete":function(F,C){if(!(F instanceof Array)){F=[F]}C=OpenLayers.Util.applyDefaults(C,this.options);var E,A,D;for(E=0,A=F.length;E<A;E++){D=F[E];if(this.saveFeatureState&&!this.createdOffline(D)){var B=D.clone();B.fid=D.fid;if(B.geometry){B.geometry.destroy();B.geometry=null}B.state=D.state;this.createOrUpdate(B)}else{this.db.execute("DELETE FROM "+this.tableName+" WHERE fid = ?",[D.fid])}}var G=new OpenLayers.Protocol.Response({code:OpenLayers.Protocol.Response.SUCCESS,requestType:"delete",reqFeatures:F});if(C&&C.callback){C.callback.call(C.scope,G)}return G},createdOffline:function(A){return(typeof A.fid=="string"&&!!(A.fid.match(this.fidRegExp)))},commit:function(C,L){var B,E=[],G=0,H=0;function J(M){if(++H<G){M.last=false}this.callUserCallback(L,M)}var K,I=[],A=[],D=[];for(var F=C.length-1;F>=0;F--){K=C[F];switch(K.state){case OpenLayers.State.INSERT:I.push(K);break;case OpenLayers.State.UPDATE:A.push(K);break;case OpenLayers.State.DELETE:D.push(K);break}}if(I.length>0){G++;B=OpenLayers.Util.applyDefaults({callback:J,scope:this},L.create);E.push(this.create(I,B))}if(A.length>0){G++;B=OpenLayers.Util.applyDefaults({callback:J,scope:this},L.update);E.push(this.update(A,B))}if(D.length>0){G++;B=OpenLayers.Util.applyDefaults({callback:J,scope:this},L["delete"]);E.push(this["delete"](D,B))}return E},clear:function(){this.db.execute("DELETE FROM "+this.tableName)},callUserCallback:function(A,C){var B=A[C.requestType];if(B&&B.callback){B.callback.call(B.scope,C)}if(C.last&&A.callback){A.callback.call(A.scope)}},CLASS_NAME:"OpenLayers.Protocol.SQL.Gears"});OpenLayers.Rule=OpenLayers.Class({id:null,name:null,title:null,description:null,context:null,filter:null,elseFilter:false,symbolizer:null,symbolizers:null,minScaleDenominator:null,maxScaleDenominator:null,initialize:function(A){this.symbolizer={};OpenLayers.Util.extend(this,A);if(this.symbolizers){delete this.symbolizer}this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")},destroy:function(){for(var A in this.symbolizer){this.symbolizer[A]=null}this.symbolizer=null;delete this.symbolizers},evaluate:function(C){var B=this.getContext(C);var A=true;if(this.minScaleDenominator||this.maxScaleDenominator){var D=C.layer.map.getScale()}if(this.minScaleDenominator){A=D>=OpenLayers.Style.createLiteral(this.minScaleDenominator,B)}if(A&&this.maxScaleDenominator){A=D<OpenLayers.Style.createLiteral(this.maxScaleDenominator,B)}if(A&&this.filter){if(this.filter.CLASS_NAME=="OpenLayers.Filter.FeatureId"){A=this.filter.evaluate(C)}else{A=this.filter.evaluate(B)}}return A},getContext:function(B){var A=this.context;if(!A){A=B.attributes||B.data}if(typeof this.context=="function"){A=this.context(B)}return A},clone:function(){var B=OpenLayers.Util.extend({},this);if(this.symbolizers){var A=this.symbolizers.length;B.symbolizers=new Array(A);for(var D=0;D<A;++D){B.symbolizers[D]=this.symbolizers[D].clone()}}else{B.symbolizer={};var F,E;for(var C in this.symbolizer){F=this.symbolizer[C];E=typeof F;if(E==="object"){B.symbolizer[C]=OpenLayers.Util.extend({},F)}else{if(E==="string"){B.symbolizer[C]=F}}}}B.filter=this.filter&&this.filter.clone();B.context=this.context&&OpenLayers.Util.extend({},this.context);return new OpenLayers.Rule(B)},CLASS_NAME:"OpenLayers.Rule"});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.Control.NavToolbar=OpenLayers.Class(OpenLayers.Control.Panel,{initialize:function(A){OpenLayers.Control.Panel.prototype.initialize.apply(this,[A]);this.addControls([new OpenLayers.Control.Navigation(),new OpenLayers.Control.ZoomBox()])},draw:function(){var A=OpenLayers.Control.Panel.prototype.draw.apply(this,arguments);this.activateControl(this.controls[0]);return A},CLASS_NAME:"OpenLayers.Control.NavToolbar"});OpenLayers.Filter.Comparison=OpenLayers.Class(OpenLayers.Filter,{type:null,property:null,value:null,matchCase:true,lowerBoundary:null,upperBoundary:null,initialize:function(A){OpenLayers.Filter.prototype.initialize.apply(this,[A])},evaluate:function(C){if(C instanceof OpenLayers.Feature.Vector){C=C.attributes}var A=false;var B=C[this.property];switch(this.type){case OpenLayers.Filter.Comparison.EQUAL_TO:var E=this.value;if(!this.matchCase&&typeof B=="string"&&typeof E=="string"){A=(B.toUpperCase()==E.toUpperCase())}else{A=(B==E)}break;case OpenLayers.Filter.Comparison.NOT_EQUAL_TO:var E=this.value;if(!this.matchCase&&typeof B=="string"&&typeof E=="string"){A=(B.toUpperCase()!=E.toUpperCase())}else{A=(B!=E)}break;case OpenLayers.Filter.Comparison.LESS_THAN:A=B<this.value;break;case OpenLayers.Filter.Comparison.GREATER_THAN:A=B>this.value;break;case OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO:A=B<=this.value;break;case OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO:A=B>=this.value;break;case OpenLayers.Filter.Comparison.BETWEEN:A=(B>=this.lowerBoundary)&&(B<=this.upperBoundary);break;case OpenLayers.Filter.Comparison.LIKE:var D=new RegExp(this.value,"gi");A=D.test(B);break}return A},value2regex:function(D,B,A){if(D=="."){var C="'.' is an unsupported wildCard character for OpenLayers.Filter.Comparison";OpenLayers.Console.error(C);return null}D=D?D:"*";B=B?B:".";A=A?A:"!";this.value=this.value.replace(new RegExp("\\"+A+"(.|$)","g"),"\\$1");this.value=this.value.replace(new RegExp("\\"+B,"g"),".");this.value=this.value.replace(new RegExp("\\"+D,"g"),".*");this.value=this.value.replace(new RegExp("\\\\.\\*","g"),"\\"+D);this.value=this.value.replace(new RegExp("\\\\\\.","g"),"\\"+B);return this.value},regex2value:function(){var A=this.value;A=A.replace(/!/g,"!!");A=A.replace(/(\\)?\\\./g,function(C,B){return B?C:"!."});A=A.replace(/(\\)?\\\*/g,function(C,B){return B?C:"!*"});A=A.replace(/\\\\/g,"\\");A=A.replace(/\.\*/g,"*");return A},clone:function(){return OpenLayers.Util.extend(new OpenLayers.Filter.Comparison(),this)},CLASS_NAME:"OpenLayers.Filter.Comparison"});OpenLayers.Filter.Comparison.EQUAL_TO="==";OpenLayers.Filter.Comparison.NOT_EQUAL_TO="!=";OpenLayers.Filter.Comparison.LESS_THAN="<";OpenLayers.Filter.Comparison.GREATER_THAN=">";OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO="<=";OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO=">=";OpenLayers.Filter.Comparison.BETWEEN="..";OpenLayers.Filter.Comparison.LIKE="~";OpenLayers.Filter.FeatureId=OpenLayers.Class(OpenLayers.Filter,{fids:null,initialize:function(A){this.fids=[];OpenLayers.Filter.prototype.initialize.apply(this,[A])},evaluate:function(C){for(var B=0,A=this.fids.length;B<A;B++){var D=C.fid||C.id;if(D==this.fids[B]){return true}}return false},clone:function(){var A=new OpenLayers.Filter.FeatureId();OpenLayers.Util.extend(A,this);A.fids=this.fids.slice();return A},CLASS_NAME:"OpenLayers.Filter.FeatureId"});OpenLayers.Filter.Logical=OpenLayers.Class(OpenLayers.Filter,{filters:null,type:null,initialize:function(A){this.filters=[];OpenLayers.Filter.prototype.initialize.apply(this,[A])},destroy:function(){this.filters=null;OpenLayers.Filter.prototype.destroy.apply(this)},evaluate:function(C){switch(this.type){case OpenLayers.Filter.Logical.AND:for(var B=0,A=this.filters.length;B<A;B++){if(this.filters[B].evaluate(C)==false){return false}}return true;case OpenLayers.Filter.Logical.OR:for(var B=0,A=this.filters.length;B<A;B++){if(this.filters[B].evaluate(C)==true){return true}}return false;case OpenLayers.Filter.Logical.NOT:return(!this.filters[0].evaluate(C))}},clone:function(){var C=[];for(var B=0,A=this.filters.length;B<A;++B){C.push(this.filters[B].clone())}return new OpenLayers.Filter.Logical({type:this.type,filters:C})},CLASS_NAME:"OpenLayers.Filter.Logical"});OpenLayers.Filter.Logical.AND="&&";OpenLayers.Filter.Logical.OR="||";OpenLayers.Filter.Logical.NOT="!";OpenLayers.Filter.Spatial=OpenLayers.Class(OpenLayers.Filter,{type:null,property:null,value:null,distance:null,distanceUnits:null,initialize:function(A){OpenLayers.Filter.prototype.initialize.apply(this,[A])},evaluate:function(C){var A=false;switch(this.type){case OpenLayers.Filter.Spatial.BBOX:case OpenLayers.Filter.Spatial.INTERSECTS:if(C.geometry){var B=this.value;if(this.value.CLASS_NAME=="OpenLayers.Bounds"){B=this.value.toGeometry()}if(C.geometry.intersects(B)){A=true}}break;default:OpenLayers.Console.error(OpenLayers.i18n("filterEvaluateNotImplemented"));break}return A},clone:function(){var A=OpenLayers.Util.applyDefaults({value:this.value&&this.value.clone&&this.value.clone()},this);return new OpenLayers.Filter.Spatial(A)},CLASS_NAME:"OpenLayers.Filter.Spatial"});OpenLayers.Filter.Spatial.BBOX="BBOX";OpenLayers.Filter.Spatial.INTERSECTS="INTERSECTS";OpenLayers.Filter.Spatial.DWITHIN="DWITHIN";OpenLayers.Filter.Spatial.WITHIN="WITHIN";OpenLayers.Filter.Spatial.CONTAINS="CONTAINS";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;OpenLayers.Geometry.prototype.destroy.apply(this,arguments)},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(G){if(!G){return this.components.length&&this.components[0].getCentroid()}var K=this.components.length;if(!K){return false}var B=[];var C=[];var D=0;var H=Number.MAX_VALUE;var L;for(var J=0;J<K;++J){L=this.components[J];var E=L.getArea();var F=L.getCentroid(true);if(isNaN(E)||isNaN(F.x)||isNaN(F.y)){continue}B.push(E);D+=E;H=(E<H&&E>0)?E:H;C.push(F)}K=B.length;if(D===0){for(var J=0;J<K;++J){B[J]=1}D=B.length}else{for(var J=0;J<K;++J){B[J]/=H}D/=H}var I=0,A=0,F,E;for(var J=0;J<K;++J){F=C[J];E=B[J];I+=F.x*E;A+=F.y*E}return new OpenLayers.Geometry.Point(I/D,A/D)},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(H,I){var C=!(I&&I.edge===false);var A=C&&I&&I.details;var J,D,B;var E=Number.POSITIVE_INFINITY;for(var F=0,G=this.components.length;F<G;++F){J=this.components[F].distanceTo(H,I);B=A?J.distance:J;if(B<E){E=B;D=J;if(E==0){break}}}return D},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.Geometry.Rectangle=OpenLayers.Class(OpenLayers.Geometry,{x:null,y:null,width:null,height:null,initialize:function(B,D,C,A){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);this.x=B;this.y=D;this.width=C;this.height=A},calculateBounds:function(){this.bounds=new OpenLayers.Bounds(this.x,this.y,this.x+this.width,this.y+this.height)},getLength:function(){var A=(2*this.width)+(2*this.height);return A},getArea:function(){var A=this.width*this.height;return A},CLASS_NAME:"OpenLayers.Geometry.Rectangle"});OpenLayers.Geometry.Surface=OpenLayers.Class(OpenLayers.Geometry,{initialize:function(){OpenLayers.Geometry.prototype.initialize.apply(this,arguments)},CLASS_NAME:"OpenLayers.Geometry.Surface"});OpenLayers.Layer.KaMapCache=OpenLayers.Class(OpenLayers.Layer.KaMap,{IMAGE_EXTENSIONS:{jpeg:"jpg",gif:"gif",png:"png",png8:"png",png24:"png",dithered:"png"},DEFAULT_FORMAT:"jpeg",initialize:function(C,B,D,A){OpenLayers.Layer.KaMap.prototype.initialize.apply(this,arguments);this.extension=this.IMAGE_EXTENSIONS[this.params.i.toLowerCase()||DEFAULT_FORMAT]},getURL:function(A){A=this.adjustBounds(A);var F=this.map.getResolution();var E=Math.round((this.map.getScale()*10000))/10000;var D=Math.round(A.left/F);var C=-Math.round(A.top/F);var I=Math.floor(D/this.tileSize.w/this.params.metaTileSize.w)*this.tileSize.w*this.params.metaTileSize.w;var H=Math.floor(C/this.tileSize.h/this.params.metaTileSize.h)*this.tileSize.h*this.params.metaTileSize.h;var B=this.url;if(B instanceof Array){B=this.selectUrl(paramsString,B)}var G=[B,"/",this.params.map,"/",E,"/",this.params.g.replace(/\s/g,"_"),"/def/t",H,"/l",I,"/t",C,"l",D,".",this.extension];return G.join("")},CLASS_NAME:"OpenLayers.Layer.KaMapCache"});OpenLayers.Layer.MapServer.Untiled=OpenLayers.Class(OpenLayers.Layer.MapServer,{singleTile:true,initialize:function(C,B,E,A){OpenLayers.Layer.MapServer.prototype.initialize.apply(this,arguments);var D="The OpenLayers.Layer.MapServer.Untiled class is deprecated and will be removed in 3.0. Instead, you should use the normal OpenLayers.Layer.MapServer class, passing it the option 'singleTile' as true.";OpenLayers.Console.warn(D)},clone:function(A){if(A==null){A=new OpenLayers.Layer.MapServer.Untiled(this.name,this.url,this.params,this.getOptions())}A=OpenLayers.Layer.MapServer.prototype.clone.apply(this,[A]);return A},CLASS_NAME:"OpenLayers.Layer.MapServer.Untiled"});OpenLayers.Layer.Vector=OpenLayers.Class(OpenLayers.Layer,{EVENT_TYPES:["beforefeatureadded","beforefeaturesadded","featureadded","featuresadded","beforefeatureremoved","beforefeaturesremoved","featureremoved","featuresremoved","beforefeatureselected","featureselected","featureunselected","beforefeaturemodified","featuremodified","afterfeaturemodified","vertexmodified","sketchstarted","sketchmodified","sketchcomplete","refresh"],isBaseLayer:false,isFixed:false,isVector:true,features:null,filter: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)},clone:function(E){if(E==null){E=new OpenLayers.Layer.Vector(this.name,this.getOptions())}E=OpenLayers.Layer.prototype.clone.apply(this,[E]);var C=this.features;var A=C.length;var D=new Array(A);for(var B=0;B<A;++B){D[B]=C[B].clone()}E.features=D;return E},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=this.renderers[C];var D=(typeof B=="function")?B:OpenLayers.Renderer[B];if(D&&D.prototype.supported()){this.renderer=new D(this.div,this.rendererOptions);break}}},displayError:function(){if(this.reportError){OpenLayers.Console.userError(OpenLayers.i18n("browserNotSupported",{renderers:this.renderers.join("\n")}))}},setMap:function(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){this.drawn=false;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 H=!J||!J.silent;if(H){var A={features:B};var G=this.events.triggerEvent("beforefeaturesadded",A);if(G===false){return }B=A.features}var D=[];for(var C=0,F=B.length;C<F;C++){if(C!=(B.length-1)){this.renderer.locked=true}else{this.renderer.locked=false}var I=B[C];if(this.geometryType&&!(I.geometry instanceof this.geometryType)){var E=OpenLayers.i18n("componentShouldBe",{geomType:this.geometryType.prototype.CLASS_NAME});throw E}I.layer=this;if(!I.style&&this.style){I.style=OpenLayers.Util.extend({},this.style)}if(H){if(this.events.triggerEvent("beforefeatureadded",{feature:I})===false){continue}this.preFeatureInsert(I)}D.push(I);this.features.push(I);this.drawFeature(I);if(H){this.events.triggerEvent("featureadded",{feature:I});this.onFeatureInsert(I)}}if(H){this.events.triggerEvent("featuresadded",{features:D})}},removeFeatures:function(E,A){if(!E||E.length===0){return }if(E===this.features){return this.removeAllFeatures(A)}if(!(E instanceof Array)){E=[E]}if(E===this.selectedFeatures){E=E.slice()}var D=!A||!A.silent;if(D){this.events.triggerEvent("beforefeaturesremoved",{features:E})}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})}},removeAllFeatures:function(A){var D=!A||!A.silent;var E=this.features;if(D){this.events.triggerEvent("beforefeaturesremoved",{features:E})}var C;for(var B=E.length-1;B>=0;B--){C=E[B];if(D){this.events.triggerEvent("beforefeatureremoved",{feature:C})}C.layer=null;if(D){this.events.triggerEvent("featureremoved",{feature:C})}}this.renderer.clear();this.features=[];this.unrenderedFeatures={};this.selectedFeatures=[];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)},getFeatureBy:function(E,D){var C=null;for(var B=0,A=this.features.length;B<A;++B){if(this.features[B][E]==D){C=this.features[B];break}}return C},getFeatureById:function(A){return this.getFeatureBy("id",A)},getFeatureByFid:function(A){return this.getFeatureBy("fid",A)},onFeatureInsert:function(A){},preFeatureInsert:function(A){},getDataExtent:function(){var B=null;var D=this.features;if(D&&(D.length>0)){B=new OpenLayers.Bounds();var E=null;for(var C=0,A=D.length;C<A;C++){E=D[C].geometry;if(E){B.extend(E.getBounds())}}}return B},CLASS_NAME:"OpenLayers.Layer.Vector"});OpenLayers.Layer.WMS.Post=OpenLayers.Class(OpenLayers.Layer.WMS,{tileClass:null,unsupportedBrowsers:["mozilla","firefox","opera"],SUPPORTED_TRANSITIONS:[],initialize:function(D,C,E,B){var A=[];A.push(D,C,E,B);OpenLayers.Layer.WMS.prototype.initialize.apply(this,A);this.tileClass=OpenLayers.Util.indexOf(this.unsupportedBrowsers,OpenLayers.Util.getBrowserName())!=-1?OpenLayers.Tile.Image:OpenLayers.Tile.Image.IFrame},addTile:function(B,A){return new this.tileClass(this,A,B,null,this.tileSize)},CLASS_NAME:"OpenLayers.Layer.WMS.Post"});OpenLayers.Layer.WMS.Untiled=OpenLayers.Class(OpenLayers.Layer.WMS,{singleTile:true,initialize:function(C,B,E,A){OpenLayers.Layer.WMS.prototype.initialize.apply(this,arguments);var D="The OpenLayers.Layer.WMS.Untiled class is deprecated and will be removed in 3.0. Instead, you should use the normal OpenLayers.Layer.WMS class, passing it the option 'singleTile' as true.";OpenLayers.Console.warn(D)},clone:function(A){if(A==null){A=new OpenLayers.Layer.WMS.Untiled(this.name,this.url,this.params,this.getOptions())}A=OpenLayers.Layer.WMS.prototype.clone.apply(this,[A]);return A},CLASS_NAME:"OpenLayers.Layer.WMS.Untiled"});OpenLayers.Strategy.Filter=OpenLayers.Class(OpenLayers.Strategy,{filter:null,cache:null,caching:false,initialize:function(A){OpenLayers.Strategy.prototype.initialize.apply(this,[A]);if(!this.filter||!(this.filter instanceof OpenLayers.Filter)){throw new Error("Filter strategy must be constructed with a filter")}},activate:function(){var A=OpenLayers.Strategy.prototype.activate.apply(this,arguments);if(A){this.cache=[];this.layer.events.on({beforefeaturesadded:this.handleAdd,beforefeaturesremoved:this.handleRemove,scope:this})}return A},deactivate:function(){this.cache=null;if(this.layer&&this.layer.events){this.layer.events.un({beforefeaturesadded:this.handleAdd,beforefeaturesremoved:this.handleRemove,scope:this})}return OpenLayers.Strategy.prototype.deactivate.apply(this,arguments)},handleAdd:function(E){if(!this.caching){var D=E.features;E.features=[];var B;for(var A=0,C=D.length;A<C;++A){B=D[A];if(this.filter.evaluate(B)){E.features.push(B)}else{this.cache.push(B)}}}},handleRemove:function(A){if(!this.caching){this.cache=[]}},setFilter:function(A){this.filter=A;var C=this.cache;this.cache=[];this.handleAdd({features:this.layer.features});if(this.cache.length>0){this.caching=true;this.layer.removeFeatures(this.cache.slice(),{silent:true});this.caching=false}if(C.length>0){var B={features:C};this.handleAdd(B);this.caching=true;this.layer.addFeatures(B.features,{silent:true});this.caching=false}},CLASS_NAME:"OpenLayers.Strategy.Filter"});OpenLayers.Style2=OpenLayers.Class({id:null,name:null,title:null,description:null,layerName:null,isDefault:false,rules:null,initialize:function(A){OpenLayers.Util.extend(this,A);this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")},destroy:function(){for(var B=0,A=this.rules.length;B<A;B++){this.rules[B].destroy()}delete this.rules},clone:function(){var B=OpenLayers.Util.extend({},this);if(this.rules){B.rules=[];for(var C=0,A=this.rules.length;C<A;++C){B.rules.push(this.rules[C].clone())}}return new OpenLayers.Style2(B)},CLASS_NAME:"OpenLayers.Style2"});OpenLayers.Control.GetFeature=OpenLayers.Class(OpenLayers.Control,{protocol:null,multipleKey:null,toggleKey:null,modifiers:null,multiple:false,click:true,single:true,clickout:true,toggle:false,clickTolerance:5,hover:false,box:false,maxFeatures:10,features:null,hoverFeature:null,handlerOptions:null,handlers:null,hoverResponse:null,filterType:OpenLayers.Filter.Spatial.BBOX,EVENT_TYPES:["featureselected","featuresselected","featureunselected","clickout","beforefeatureselected","beforefeaturesselected","hoverfeature","outfeature"],initialize:function(A){this.EVENT_TYPES=OpenLayers.Control.GetFeature.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);A.handlerOptions=A.handlerOptions||{};OpenLayers.Control.prototype.initialize.apply(this,[A]);this.features={};this.handlers={};if(this.click){this.handlers.click=new OpenLayers.Handler.Click(this,{click:this.selectClick},this.handlerOptions.click||{})}if(this.box){this.handlers.box=new OpenLayers.Handler.Box(this,{done:this.selectBox},OpenLayers.Util.extend(this.handlerOptions.box,{boxDivClassName:"olHandlerBoxSelectFeature"}))}if(this.hover){this.handlers.hover=new OpenLayers.Handler.Hover(this,{move:this.cancelHover,pause:this.selectHover},OpenLayers.Util.extend(this.handlerOptions.hover,{delay:250}))}},activate:function(){if(!this.active){for(var A in this.handlers){this.handlers[A].activate()}}return OpenLayers.Control.prototype.activate.apply(this,arguments)},deactivate:function(){if(this.active){for(var A in this.handlers){this.handlers[A].deactivate()}}return OpenLayers.Control.prototype.deactivate.apply(this,arguments)},selectClick:function(A){var B=this.pixelToBounds(A.xy);this.setModifiers(A);this.request(B,{single:this.single})},selectBox:function(A){var C;if(A instanceof OpenLayers.Bounds){var D=this.map.getLonLatFromPixel(new OpenLayers.Pixel(A.left,A.bottom));var B=this.map.getLonLatFromPixel(new OpenLayers.Pixel(A.right,A.top));C=new OpenLayers.Bounds(D.lon,D.lat,B.lon,B.lat)}else{if(this.click){return }C=this.pixelToBounds(A)}this.setModifiers(this.handlers.box.dragHandler.evt);this.request(C)},selectHover:function(A){var B=this.pixelToBounds(A.xy);this.request(B,{single:true,hover:true})},cancelHover:function(){if(this.hoverResponse){this.protocol.abort(this.hoverResponse);this.hoverResponse=null;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olCursorWait")}},request:function(D,B){B=B||{};var C=new OpenLayers.Filter.Spatial({type:this.filterType,value:D});OpenLayers.Element.addClass(this.map.viewPortDiv,"olCursorWait");var A=this.protocol.read({maxFeatures:B.single==true?this.maxFeatures:undefined,filter:C,callback:function(E){if(E.success()){if(E.features.length){if(B.single==true){this.selectBestFeature(E.features,D.getCenterLonLat(),B)}else{this.select(E.features)}}else{if(B.hover){this.hoverSelect()}else{this.events.triggerEvent("clickout");if(this.clickout){this.unselectAll()}}}}OpenLayers.Element.removeClass(this.map.viewPortDiv,"olCursorWait")},scope:this});if(B.hover==true){this.hoverResponse=A}},selectBestFeature:function(B,A,I){I=I||{};if(B.length){var G=new OpenLayers.Geometry.Point(A.lon,A.lat);var H,D,E;var F=Number.MAX_VALUE;for(var C=0;C<B.length;++C){H=B[C];if(H.geometry){E=G.distanceTo(H.geometry,{edge:false});if(E<F){F=E;D=H;if(F==0){break}}}}if(I.hover==true){this.hoverSelect(D)}else{this.select(D||B)}}},setModifiers:function(A){this.modifiers={multiple:this.multiple||(this.multipleKey&&A[this.multipleKey]),toggle:this.toggle||(this.toggleKey&&A[this.toggleKey])}},select:function(E){if(!this.modifiers.multiple&&!this.modifiers.toggle){this.unselectAll()}if(!(E instanceof Array)){E=[E]}var B=this.events.triggerEvent("beforefeaturesselected",{features:E});if(B!==false){var F=[];var D;for(var C=0,A=E.length;C<A;++C){D=E[C];if(this.features[D.fid||D.id]){if(this.modifiers.toggle){this.unselect(this.features[D.fid||D.id])}}else{B=this.events.triggerEvent("beforefeatureselected",{feature:D});if(B!==false){this.features[D.fid||D.id]=D;F.push(D);this.events.triggerEvent("featureselected",{feature:D})}}}this.events.triggerEvent("featuresselected",{features:F})}},hoverSelect:function(A){var C=A?A.fid||A.id:null;var B=this.hoverFeature?this.hoverFeature.fid||this.hoverFeature.id:null;if(B&&B!=C){this.events.triggerEvent("outfeature",{feature:this.hoverFeature});this.hoverFeature=null}if(C&&C!=B){this.events.triggerEvent("hoverfeature",{feature:A});this.hoverFeature=A}},unselect:function(A){delete this.features[A.fid||A.id];this.events.triggerEvent("featureunselected",{feature:A})},unselectAll:function(){for(var A in this.features){this.unselect(this.features[A])}},setMap:function(B){for(var A in this.handlers){this.handlers[A].setMap(B)}OpenLayers.Control.prototype.setMap.apply(this,arguments)},pixelToBounds:function(B){var E=B.add(-this.clickTolerance/2,this.clickTolerance/2);var A=B.add(this.clickTolerance/2,-this.clickTolerance/2);var C=this.map.getLonLatFromPixel(E);var D=this.map.getLonLatFromPixel(A);return new OpenLayers.Bounds(C.lon,C.lat,D.lon,D.lat)},CLASS_NAME:"OpenLayers.Control.GetFeature"});OpenLayers.Control.Snapping=OpenLayers.Class(OpenLayers.Control,{EVENT_TYPES:["beforesnap","snap","unsnap"],DEFAULTS:{tolerance:10,node:true,edge:true,vertex:true},greedy:true,precedence:["node","vertex","edge"],resolution:null,geoToleranceCache:null,layer:null,feature:null,point:null,initialize:function(A){Array.prototype.push.apply(this.EVENT_TYPES,OpenLayers.Control.prototype.EVENT_TYPES);OpenLayers.Control.prototype.initialize.apply(this,[A]);this.options=A||{};if(this.options.layer){this.setLayer(this.options.layer)}var B=OpenLayers.Util.extend({},this.options.defaults);this.defaults=OpenLayers.Util.applyDefaults(B,this.DEFAULTS);this.setTargets(this.options.targets);if(this.targets.length===0&&this.layer){this.addTargetLayer(this.layer)}this.geoToleranceCache={}},setLayer:function(A){if(this.active){this.deactivate();this.layer=A;this.activate()}else{this.layer=A}},setTargets:function(B){this.targets=[];if(B&&B.length){var D;for(var C=0,A=B.length;C<A;++C){D=B[C];if(D instanceof OpenLayers.Layer.Vector){this.addTargetLayer(D)}else{this.addTarget(D)}}}},addTargetLayer:function(A){this.addTarget({layer:A})},addTarget:function(A){A=OpenLayers.Util.applyDefaults(A,this.defaults);A.nodeTolerance=A.nodeTolerance||A.tolerance;A.vertexTolerance=A.vertexTolerance||A.tolerance;A.edgeTolerance=A.edgeTolerance||A.tolerance;this.targets.push(A)},removeTargetLayer:function(B){var C;for(var A=this.targets.length-1;A>=0;--A){C=this.targets[A];if(C.layer===B){this.removeTarget(C)}}},removeTarget:function(A){return OpenLayers.Util.removeItem(this.targets,A)},activate:function(){var A=OpenLayers.Control.prototype.activate.call(this);if(A){if(this.layer&&this.layer.events){this.layer.events.on({sketchstarted:this.onSketchModified,sketchmodified:this.onSketchModified,vertexmodified:this.onVertexModified,scope:this})}}return A},deactivate:function(){var A=OpenLayers.Control.prototype.deactivate.call(this);if(A){if(this.layer&&this.layer.events){this.layer.events.un({sketchstarted:this.onSketchModified,sketchmodified:this.onSketchModified,vertexmodified:this.onVertexModified,scope:this})}}this.feature=null;this.point=null;return A},onSketchModified:function(A){this.feature=A.feature;this.considerSnapping(A.vertex,A.vertex)},onVertexModified:function(A){this.feature=A.feature;var B=this.layer.map.getLonLatFromViewPortPx(A.pixel);this.considerSnapping(A.vertex,new OpenLayers.Geometry.Point(B.lon,B.lat))},considerSnapping:function(H,D){var A={rank:Number.POSITIVE_INFINITY,dist:Number.POSITIVE_INFINITY,x:null,y:null};var C=false;var I,F;for(var B=0,E=this.targets.length;B<E;++B){F=this.targets[B];I=this.testTarget(F,D);if(I){if(this.greedy){A=I;A.target=F;C=true;break}else{if((I.rank<A.rank)||(I.rank===A.rank&&I.dist<A.dist)){A=I;A.target=F;C=true}}}}if(C){var G=this.events.triggerEvent("beforesnap",{point:H,x:A.x,y:A.y,distance:A.dist,layer:A.target.layer,snapType:this.precedence[A.rank]});if(G!==false){H.x=A.x;H.y=A.y;this.point=H;this.events.triggerEvent("snap",{point:H,snapType:this.precedence[A.rank],layer:A.target.layer,distance:A.dist})}else{C=false}}if(this.point&&!C){H.x=D.x;H.y=D.y;this.point=null;this.events.triggerEvent("unsnap",{point:H})}},testTarget:function(V,F){var T={node:this.getGeoTolerance(V.nodeTolerance),vertex:this.getGeoTolerance(V.vertexTolerance),edge:this.getGeoTolerance(V.edgeTolerance)};var G=Math.max(T.node,T.vertex,T.edge);var H={rank:Number.POSITIVE_INFINITY,dist:Number.POSITIVE_INFINITY};var E=false;var C=V.layer.features;var B,A,D,U,L,M,K;var J=this.precedence.length;var I=new OpenLayers.LonLat(F.x,F.y);for(var R=0,S=C.length;R<S;++R){B=C[R];if(B!==this.feature&&!B._sketch&&B.state!==OpenLayers.State.DELETE&&(!V.filter||V.filter.evaluate(B.attributes))){if(B.atPoint(I,G,G)){for(var Q=0,N=Math.min(H.rank+1,J);Q<N;++Q){A=this.precedence[Q];if(V[A]){if(A==="edge"){L=B.geometry.distanceTo(F,{details:true});M=L.distance;if(M<=T[A]&&M<H.dist){H={rank:Q,dist:M,x:L.x0,y:L.y0};E=true;break}}else{D=B.geometry.getVertices(A==="node");K=false;for(var P=0,O=D.length;P<O;++P){U=D[P];M=U.distanceTo(F);if(M<=T[A]&&(Q<H.rank||(Q===H.rank&&M<H.dist))){H={rank:Q,dist:M,x:U.x,y:U.y};E=true;K=true}}if(K){break}}}}}}}return E?H:null},getGeoTolerance:function(A){var B=this.layer.map.getResolution();if(B!==this.resolution){this.resolution=B;this.geoToleranceCache={}}var C=this.geoToleranceCache[A];if(C===undefined){C=A*B;this.geoToleranceCache[A]=C}return C},destroy:function(){if(this.active){this.deactivate()}delete this.layer;delete this.targets;OpenLayers.Control.prototype.destroy.call(this)},CLASS_NAME:"OpenLayers.Control.Snapping"});OpenLayers.Format.Filter=OpenLayers.Class(OpenLayers.Format.XML,{defaultVersion:"1.0.0",version:null,parser:null,initialize:function(A){OpenLayers.Format.XML.prototype.initialize.apply(this,[A])},write:function(C,B){var A=(B&&B.version)||this.version||this.defaultVersion;if(!this.parser||this.parser.VERSION!=A){var D=OpenLayers.Format.Filter["v"+A.replace(/\./g,"_")];if(!D){throw"Can't find a Filter parser for version "+A}this.parser=new D(this.options)}return this.parser.write(C)},read:function(C){if(typeof C=="string"){C=OpenLayers.Format.XML.prototype.read.apply(this,[C])}var A=this.version;if(!A){A=this.defaultVersion}if(!this.parser||this.parser.VERSION!=A){var D=OpenLayers.Format.Filter["v"+A.replace(/\./g,"_")];if(!D){throw"Can't find a Filter parser for version "+A}this.parser=new D(this.options)}var B=this.parser.read(C);return B},CLASS_NAME:"OpenLayers.Format.Filter"});OpenLayers.Format.SLD=OpenLayers.Class(OpenLayers.Format.XML,{defaultVersion:"1.0.0",version:null,namedLayersAsArray:false,parser:null,initialize:function(A){OpenLayers.Format.XML.prototype.initialize.apply(this,[A])},write:function(D,C){var B=(C&&C.version)||this.version||this.defaultVersion;if(!this.parser||this.parser.VERSION!=B){var E=OpenLayers.Format.SLD["v"+B.replace(/\./g,"_")];if(!E){throw"Can't find a SLD parser for version "+B}this.parser=new E(this.options)}var A=this.parser.write(D);return OpenLayers.Format.XML.prototype.write.apply(this,[A])},read:function(E,C){if(typeof E=="string"){E=OpenLayers.Format.XML.prototype.read.apply(this,[E])}var B=E.documentElement;var A=this.version;if(!A){A=B.getAttribute("version");if(!A){A=this.defaultVersion}}if(!this.parser||this.parser.VERSION!=A){var F=OpenLayers.Format.SLD["v"+A.replace(/\./g,"_")];if(!F){throw"Can't find a SLD parser for version "+A}this.parser=new F(this.options)}var D=this.parser.read(E,C);return D},CLASS_NAME:"OpenLayers.Format.SLD"});OpenLayers.Format.Text=OpenLayers.Class(OpenLayers.Format,{defaultStyle:null,extractStyles:true,initialize:function(A){A=A||{};if(A.extractStyles!==false){A.defaultStyle={externalGraphic:OpenLayers.Util.getImagesLocation()+"marker.png",graphicWidth:21,graphicHeight:25,graphicXOffset:-10.5,graphicYOffset:-12.5}}OpenLayers.Format.prototype.initialize.apply(this,[A])},read:function(J){var A=J.split("\n");var B;var G=[];for(var T=0;T<(A.length-1);T++){var S=A[T].replace(/^\s*/,"").replace(/\s*$/,"");if(S.charAt(0)!="#"){if(!B){B=S.split("\t")}else{var L=S.split("\t");var D=new OpenLayers.Geometry.Point(0,0);var H={};var P=this.defaultStyle?OpenLayers.Util.applyDefaults({},this.defaultStyle):null;var Q,R,C,N;var K=false;for(var I=0;I<L.length;I++){if(L[I]){if(B[I]=="point"){var O=L[I].split(",");D.y=parseFloat(O[0]);D.x=parseFloat(O[1]);K=true}else{if(B[I]=="lat"){D.y=parseFloat(L[I]);K=true}else{if(B[I]=="lon"){D.x=parseFloat(L[I]);K=true}else{if(B[I]=="title"){H.title=L[I]}else{if(B[I]=="image"||B[I]=="icon"&&P){P.externalGraphic=L[I]}else{if(B[I]=="iconSize"&&P){var M=L[I].split(",");P.graphicWidth=parseFloat(M[0]);P.graphicHeight=parseFloat(M[1])}else{if(B[I]=="iconOffset"&&P){var F=L[I].split(",");P.graphicXOffset=parseFloat(F[0]);P.graphicYOffset=parseFloat(F[1])}else{if(B[I]=="description"){H.description=L[I]}else{if(B[I]=="overflow"){H.overflow=L[I]}else{H[B[I]]=L[I]}}}}}}}}}}}if(K){if(this.internalProjection&&this.externalProjection){D.transform(this.externalProjection,this.internalProjection)}var E=new OpenLayers.Feature.Vector(D,H,P);G.push(E)}}}}return G},CLASS_NAME:"OpenLayers.Format.Text"});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.Handler.Point=OpenLayers.Class(OpenLayers.Handler,{point:null,layer:null,multi:false,drawing:false,mouseDown:false,lastDown:null,lastUp:null,persist:false,layerOptions:null,initialize:function(C,B,A){if(!(A&&A.layerOptions&&A.layerOptions.styleMap)){this.style=OpenLayers.Util.extend(OpenLayers.Feature.Vector.style["default"],{})}OpenLayers.Handler.prototype.initialize.apply(this,arguments)},activate:function(){if(!OpenLayers.Handler.prototype.activate.apply(this,arguments)){return false}var A=OpenLayers.Util.extend({displayInLayerSwitcher:false,calculateInRange:OpenLayers.Function.True},this.layerOptions);this.layer=new OpenLayers.Layer.Vector(this.CLASS_NAME,A);this.map.addLayer(this.layer);return true},createFeature:function(A){var B=this.map.getLonLatFromPixel(A);this.point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(B.lon,B.lat));this.callback("create",[this.point.geometry,this.point]);this.point.geometry.clearBounds();this.layer.addFeatures([this.point],{silent:true})},deactivate:function(){if(!OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){return false}if(this.drawing){this.cancel()}this.destroyFeature();if(this.layer.map!=null){this.layer.destroy(false)}this.layer=null;return true},destroyFeature:function(){if(this.layer){this.layer.destroyFeatures()}this.point=null},finalize:function(B){var A=B?"cancel":"done";this.drawing=false;this.mouseDown=false;this.lastDown=null;this.lastUp=null;this.callback(A,[this.geometryClone()]);if(B||!this.persist){this.destroyFeature()}},cancel:function(){this.finalize(true)},click:function(A){OpenLayers.Event.stop(A);return false},dblclick:function(A){OpenLayers.Event.stop(A);return false},modifyFeature:function(A){var B=this.map.getLonLatFromPixel(A);this.point.geometry.x=B.lon;this.point.geometry.y=B.lat;this.callback("modify",[this.point.geometry,this.point]);this.point.geometry.clearBounds();this.drawFeature()},drawFeature:function(){this.layer.drawFeature(this.point,this.style)},getGeometry:function(){var A=this.point&&this.point.geometry;if(A&&this.multi){A=new OpenLayers.Geometry.MultiPoint([A])}return A},geometryClone:function(){var A=this.getGeometry();return A&&A.clone()},mousedown:function(A){if(!this.checkModifiers(A)){return true}if(this.lastDown&&this.lastDown.equals(A.xy)){return true}this.drawing=true;if(this.lastDown==null){if(this.persist){this.destroyFeature()}this.createFeature(A.xy)}else{this.modifyFeature(A.xy)}this.lastDown=A.xy;return false},mousemove:function(A){if(this.drawing){this.modifyFeature(A.xy)}return true},mouseup:function(A){if(this.drawing){this.finalize();return false}else{return true}},CLASS_NAME:"OpenLayers.Handler.Point"});OpenLayers.Layer.GML=OpenLayers.Class(OpenLayers.Layer.Vector,{loaded:false,format:null,formatOptions:null,initialize:function(D,C,B){var A=[];A.push(D,B);OpenLayers.Layer.Vector.prototype.initialize.apply(this,A);this.url=C},setVisibility:function(A,B){OpenLayers.Layer.Vector.prototype.setVisibility.apply(this,arguments);if(this.visibility&&!this.loaded){this.loadGML()}},moveTo:function(C,A,B){OpenLayers.Layer.Vector.prototype.moveTo.apply(this,arguments);if(this.visibility&&!this.loaded){this.loadGML()}},loadGML:function(){if(!this.loaded){this.events.triggerEvent("loadstart");OpenLayers.Request.GET({url:this.url,success:this.requestSuccess,failure:this.requestFailure,scope:this});this.loaded=true}},setUrl:function(A){this.url=A;this.destroyFeatures();this.loaded=false;this.loadGML()},requestSuccess:function(C){var D=C.responseXML;if(!D||!D.documentElement){D=C.responseText}var A={};OpenLayers.Util.extend(A,this.formatOptions);if(this.map&&!this.projection.equals(this.map.getProjectionObject())){A.externalProjection=this.projection;A.internalProjection=this.map.getProjectionObject()}var B=this.format?new this.format(A):new OpenLayers.Format.GML(A);this.addFeatures(B.read(D));this.events.triggerEvent("loadend")},requestFailure:function(A){OpenLayers.Console.userError(OpenLayers.i18n("errorLoadingGML",{url:this.url}));this.events.triggerEvent("loadend")},CLASS_NAME:"OpenLayers.Layer.GML"});OpenLayers.Layer.PointTrack=OpenLayers.Class(OpenLayers.Layer.Vector,{dataFrom:null,initialize:function(B,A){OpenLayers.Layer.Vector.prototype.initialize.apply(this,arguments)},addNodes:function(F){if(F.length<2){OpenLayers.Console.error("At least two point features have to be added to createa line from");return }var J=new Array(F.length-1);var G,A,H;for(var C=0,E=F.length;C<E;C++){G=F[C];H=G.geometry;if(!H){var D=G.lonlat;H=new OpenLayers.Geometry.Point(D.lon,D.lat)}else{if(H.CLASS_NAME!="OpenLayers.Geometry.Point"){OpenLayers.Console.error("Only features with point geometries are supported.");return }}if(C>0){var B=(this.dataFrom!=null)?(F[C+this.dataFrom].data||F[C+this.dataFrom].attributes):null;var I=new OpenLayers.Geometry.LineString([A,H]);J[C-1]=new OpenLayers.Feature.Vector(I,B)}A=H}this.addFeatures(J)},CLASS_NAME:"OpenLayers.Layer.PointTrack"});OpenLayers.Layer.PointTrack.dataFrom={SOURCE_NODE:-1,TARGET_NODE:0};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.Layer.WFS=OpenLayers.Class(OpenLayers.Layer.Vector,OpenLayers.Layer.Markers,{isBaseLayer:false,tile:null,ratio:2,DEFAULT_PARAMS:{service:"WFS",version:"1.0.0",request:"GetFeature"},featureClass:null,format:null,formatObject:null,formatOptions:null,vectorMode:true,encodeBBOX:false,extractAttributes:false,initialize:function(D,C,E,B){if(B==undefined){B={}}if(B.featureClass||!OpenLayers.Layer.Vector||!OpenLayers.Feature.Vector){this.vectorMode=false}E=OpenLayers.Util.upperCaseObject(E);OpenLayers.Util.extend(B,{reportError:false});var A=[];A.push(D,B);OpenLayers.Layer.Vector.prototype.initialize.apply(this,A);if(!this.renderer||!this.vectorMode){this.vectorMode=false;if(!B.featureClass){B.featureClass=OpenLayers.Feature.WFS}OpenLayers.Layer.Markers.prototype.initialize.apply(this,A)}if(this.params&&this.params.typename&&!this.options.typename){this.options.typename=this.params.typename}if(!this.options.geometry_column){this.options.geometry_column="the_geom"}this.params=OpenLayers.Util.applyDefaults(E,OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS));this.url=C},destroy:function(){if(this.vectorMode){OpenLayers.Layer.Vector.prototype.destroy.apply(this,arguments)}else{OpenLayers.Layer.Markers.prototype.destroy.apply(this,arguments)}if(this.tile){this.tile.destroy()}this.tile=null;this.ratio=null;this.featureClass=null;this.format=null;if(this.formatObject&&this.formatObject.destroy){this.formatObject.destroy()}this.formatObject=null;this.formatOptions=null;this.vectorMode=null;this.encodeBBOX=null;this.extractAttributes=null},setMap:function(B){if(this.vectorMode){OpenLayers.Layer.Vector.prototype.setMap.apply(this,arguments);var A={extractAttributes:this.extractAttributes};OpenLayers.Util.extend(A,this.formatOptions);if(this.map&&!this.projection.equals(this.map.getProjectionObject())){A.externalProjection=this.projection;A.internalProjection=this.map.getProjectionObject()}this.formatObject=this.format?new this.format(A):new OpenLayers.Format.GML(A)}else{OpenLayers.Layer.Markers.prototype.setMap.apply(this,arguments)}},moveTo:function(A,B,N){if(this.vectorMode){OpenLayers.Layer.Vector.prototype.moveTo.apply(this,arguments)}else{OpenLayers.Layer.Markers.prototype.moveTo.apply(this,arguments)}if(N){return false}if(B){if(this.vectorMode){this.renderer.clear()}}if(this.options.minZoomLevel){OpenLayers.Console.warn(OpenLayers.i18n("minZoomLevelError"));if(this.map.getZoom()<this.options.minZoomLevel){return null}}if(A==null){A=this.map.getExtent()}var M=(this.tile==null);var G=(!M&&!this.tile.bounds.containsBounds(A));if(B||M||(!N&&G)){var C=A.getCenterLonLat();var L=A.getWidth()*this.ratio;var H=A.getHeight()*this.ratio;var J=new OpenLayers.Bounds(C.lon-(L/2),C.lat-(H/2),C.lon+(L/2),C.lat+(H/2));var O=this.map.getSize();O.w=O.w*this.ratio;O.h=O.h*this.ratio;var I=new OpenLayers.LonLat(J.left,J.top);var K=this.map.getLayerPxFromLonLat(I);var D=this.getFullRequestString();var F=null;var E=this.params.filter||this.params.FILTER;if(E){F={FILTER:E}}else{F={BBOX:this.encodeBBOX?J.toBBOX():J.toArray()}}if(this.map&&!this.projection.equals(this.map.getProjectionObject())){var P=J.clone();P.transform(this.map.getProjectionObject(),this.projection);if(!E){F.BBOX=this.encodeBBOX?P.toBBOX():P.toArray()}}D+="&"+OpenLayers.Util.getParameterString(F);if(!this.tile){this.tile=new OpenLayers.Tile.WFS(this,K,J,D,O);this.addTileMonitoringHooks(this.tile);this.tile.draw()}else{if(this.vectorMode){this.destroyFeatures();this.renderer.clear()}else{this.clearMarkers()}this.removeTileMonitoringHooks(this.tile);this.tile.destroy();this.tile=null;this.tile=new OpenLayers.Tile.WFS(this,K,J,D,O);this.addTileMonitoringHooks(this.tile);this.tile.draw()}}},addTileMonitoringHooks:function(A){A.onLoadStart=function(){if(this==this.layer.tile){this.layer.events.triggerEvent("loadstart")}};A.events.register("loadstart",A,A.onLoadStart);A.onLoadEnd=function(){if(this==this.layer.tile){this.layer.events.triggerEvent("tileloaded");this.layer.events.triggerEvent("loadend")}};A.events.register("loadend",A,A.onLoadEnd);A.events.register("unload",A,A.onLoadEnd)},removeTileMonitoringHooks:function(A){A.unload();A.events.un({loadstart:A.onLoadStart,loadend:A.onLoadEnd,unload:A.onLoadEnd,scope:A})},onMapResize:function(){if(this.vectorMode){OpenLayers.Layer.Vector.prototype.onMapResize.apply(this,arguments)}else{OpenLayers.Layer.Markers.prototype.onMapResize.apply(this,arguments)}},display:function(){if(this.vectorMode){OpenLayers.Layer.Vector.prototype.display.apply(this,arguments)}else{OpenLayers.Layer.Markers.prototype.display.apply(this,arguments)}},mergeNewParams:function(C){var B=OpenLayers.Util.upperCaseObject(C);var A=[B];return OpenLayers.Layer.HTTPRequest.prototype.mergeNewParams.apply(this,A)},clone:function(A){if(A==null){A=new OpenLayers.Layer.WFS(this.name,this.url,this.params,this.getOptions())}if(this.vectorMode){A=OpenLayers.Layer.Vector.prototype.clone.apply(this,[A])}else{A=OpenLayers.Layer.Markers.prototype.clone.apply(this,[A])}return A},getFullRequestString:function(C,B){var A=this.projection.getCode()||this.map.getProjection();this.params.SRS=(A=="none")?null:A;return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,arguments)},commit:function(){if(!this.writer){var A={};if(this.map&&!this.projection.equals(this.map.getProjectionObject())){A.externalProjection=this.projection;A.internalProjection=this.map.getProjectionObject()}this.writer=new OpenLayers.Format.WFS(A,this)}var B=this.writer.write(this.features);OpenLayers.Request.POST({url:this.url,data:B,success:this.commitSuccess,failure:this.commitFailure,scope:this})},commitSuccess:function(C){var A=C.responseText;if(A.indexOf("SUCCESS")!=-1){this.commitReport(OpenLayers.i18n("commitSuccess",{response:A}));for(var B=0;B<this.features.length;B++){this.features[B].state=null}}else{if(A.indexOf("FAILED")!=-1||A.indexOf("Exception")!=-1){this.commitReport(OpenLayers.i18n("commitFailed",{response:A}))}}},commitFailure:function(A){},commitReport:function(B,A){OpenLayers.Console.userError(B)},refresh:function(){if(this.tile){if(this.vectorMode){this.renderer.clear();this.features.length=0}else{this.clearMarkers();this.markers.length=0}this.tile.draw()}},getDataExtent:function(){var A;if(this.vectorMode){A=OpenLayers.Layer.Vector.prototype.getDataExtent.apply(this)}else{A=OpenLayers.Layer.Markers.prototype.getDataExtent.apply(this)}return A},setOpacity:function(A){if(this.vectorMode){OpenLayers.Layer.Vector.prototype.setOpacity.apply(this,[A])}else{OpenLayers.Layer.Markers.prototype.setOpacity.apply(this,[A])}},CLASS_NAME:"OpenLayers.Layer.WFS"});OpenLayers.Protocol.HTTP=OpenLayers.Class(OpenLayers.Protocol,{url:null,headers:null,params:null,callback:null,scope:null,readWithPOST:false,wildcarded:false,initialize:function(A){A=A||{};this.params={};this.headers={};OpenLayers.Protocol.prototype.initialize.apply(this,arguments)},destroy:function(){this.params=null;this.headers=null;OpenLayers.Protocol.prototype.destroy.apply(this)},read:function(A){OpenLayers.Protocol.prototype.read.apply(this,arguments);A=OpenLayers.Util.applyDefaults(A,this.options);A.params=OpenLayers.Util.applyDefaults(A.params,this.options.params);if(A.filter){A.params=this.filterToParams(A.filter,A.params)}var B=(A.readWithPOST!==undefined)?A.readWithPOST:this.readWithPOST;var C=new OpenLayers.Protocol.Response({requestType:"read"});if(B){C.priv=OpenLayers.Request.POST({url:A.url,callback:this.createCallback(this.handleRead,C,A),data:OpenLayers.Util.getParameterString(A.params),headers:{"Content-Type":"application/x-www-form-urlencoded"}})}else{C.priv=OpenLayers.Request.GET({url:A.url,callback:this.createCallback(this.handleRead,C,A),params:A.params,headers:A.headers})}return C},handleRead:function(B,A){this.handleResponse(B,A)},filterToParams:function(D,G){G=G||{};var C=D.CLASS_NAME;var E=C.substring(C.lastIndexOf(".")+1);switch(E){case"Spatial":switch(D.type){case OpenLayers.Filter.Spatial.BBOX:G.bbox=D.value.toArray();break;case OpenLayers.Filter.Spatial.DWITHIN:G.tolerance=D.distance;case OpenLayers.Filter.Spatial.WITHIN:G.lon=D.value.x;G.lat=D.value.y;break;default:OpenLayers.Console.warn("Unknown spatial filter type "+D.type)}break;case"Comparison":var H=OpenLayers.Protocol.HTTP.COMP_TYPE_TO_OP_STR[D.type];if(H!==undefined){var F=D.value;if(D.type==OpenLayers.Filter.Comparison.LIKE){F=this.regex2value(F);if(this.wildcarded){F="%"+F+"%"}}G[D.property+"__"+H]=F;G.queryable=G.queryable||[];G.queryable.push(D.property)}else{OpenLayers.Console.warn("Unknown comparison filter type "+D.type)}break;case"Logical":if(D.type===OpenLayers.Filter.Logical.AND){for(var B=0,A=D.filters.length;B<A;B++){G=this.filterToParams(D.filters[B],G)}}else{OpenLayers.Console.warn("Unsupported logical filter type "+D.type)}break;default:OpenLayers.Console.warn("Unknown filter type "+E)}return G},regex2value:function(A){A=A.replace(/%/g,"\\%");A=A.replace(/\\\\\.(\*)?/g,function(C,B){return B?C:"\\\\_"});A=A.replace(/\\\\\.\*/g,"\\\\%");A=A.replace(/(\\)?\.(\*)?/g,function(C,B,D){return B||D?C:"_"});A=A.replace(/(\\)?\.\*/g,function(C,B){return B?C:"%"});A=A.replace(/\\\./g,".");A=A.replace(/(\\)?\\\*/g,function(C,B){return B?C:"*"});return A},create:function(B,A){A=OpenLayers.Util.applyDefaults(A,this.options);var C=new OpenLayers.Protocol.Response({reqFeatures:B,requestType:"create"});C.priv=OpenLayers.Request.POST({url:A.url,callback:this.createCallback(this.handleCreate,C,A),headers:A.headers,data:this.format.write(B)});return C},handleCreate:function(B,A){this.handleResponse(B,A)},update:function(C,B){B=B||{};var A=B.url||C.url||this.options.url+"/"+C.fid;B=OpenLayers.Util.applyDefaults(B,this.options);var D=new OpenLayers.Protocol.Response({reqFeatures:C,requestType:"update"});D.priv=OpenLayers.Request.PUT({url:A,callback:this.createCallback(this.handleUpdate,D,B),headers:B.headers,data:this.format.write(C)});return D},handleUpdate:function(B,A){this.handleResponse(B,A)},"delete":function(C,B){B=B||{};var A=B.url||C.url||this.options.url+"/"+C.fid;B=OpenLayers.Util.applyDefaults(B,this.options);var D=new OpenLayers.Protocol.Response({reqFeatures:C,requestType:"delete"});D.priv=OpenLayers.Request.DELETE({url:A,callback:this.createCallback(this.handleDelete,D,B),headers:B.headers});return D},handleDelete:function(B,A){this.handleResponse(B,A)},handleResponse:function(C,A){var B=C.priv;if(A.callback){if(B.status>=200&&B.status<300){if(C.requestType!="delete"){C.features=this.parseFeatures(B)}C.code=OpenLayers.Protocol.Response.SUCCESS}else{C.code=OpenLayers.Protocol.Response.FAILURE}A.callback.call(A.scope,C)}},parseFeatures:function(A){var B=A.responseXML;if(!B||!B.documentElement){B=A.responseText}if(!B||B.length<=0){return null}return this.format.read(B)},commit:function(B,P){P=OpenLayers.Util.applyDefaults(P,this.options);var D=[],L=0;var J={};J[OpenLayers.State.INSERT]=[];J[OpenLayers.State.UPDATE]=[];J[OpenLayers.State.DELETE]=[];var O,K,C=[];for(var E=0,I=B.length;E<I;++E){O=B[E];K=J[O.state];if(K){K.push(O);C.push(O)}}var G=(J[OpenLayers.State.INSERT].length>0?1:0)+J[OpenLayers.State.UPDATE].length+J[OpenLayers.State.DELETE].length;var N=true;var A=new OpenLayers.Protocol.Response({reqFeatures:C});function H(R){var Q=R.features?R.features.length:0;var T=new Array(Q);for(var S=0;S<Q;++S){T[S]=R.features[S].fid}A.insertIds=T;M.apply(this,[R])}function M(Q){this.callUserCallback(Q,P);N=N&&Q.success();L++;if(L>=G){if(P.callback){A.code=N?OpenLayers.Protocol.Response.SUCCESS:OpenLayers.Protocol.Response.FAILURE;P.callback.apply(P.scope,[A])}}}var F=J[OpenLayers.State.INSERT];if(F.length>0){D.push(this.create(F,OpenLayers.Util.applyDefaults({callback:H,scope:this},P.create)))}F=J[OpenLayers.State.UPDATE];for(var E=F.length-1;E>=0;--E){D.push(this.update(F[E],OpenLayers.Util.applyDefaults({callback:M,scope:this},P.update)))}F=J[OpenLayers.State.DELETE];for(var E=F.length-1;E>=0;--E){D.push(this["delete"](F[E],OpenLayers.Util.applyDefaults({callback:M,scope:this},P["delete"])))}return D},abort:function(A){if(A){A.priv.abort()}},callUserCallback:function(C,A){var B=A[C.requestType];if(B&&B.callback){B.callback.call(B.scope,C)}},CLASS_NAME:"OpenLayers.Protocol.HTTP"});(function(){var A=OpenLayers.Protocol.HTTP.COMP_TYPE_TO_OP_STR={};A[OpenLayers.Filter.Comparison.EQUAL_TO]="eq";A[OpenLayers.Filter.Comparison.NOT_EQUAL_TO]="ne";A[OpenLayers.Filter.Comparison.LESS_THAN]="lt";A[OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO]="lte";A[OpenLayers.Filter.Comparison.GREATER_THAN]="gt";A[OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO]="gte";A[OpenLayers.Filter.Comparison.LIKE]="ilike"})();OpenLayers.Strategy.BBOX=OpenLayers.Class(OpenLayers.Strategy,{bounds:null,resolution:null,ratio:2,resFactor:null,response:null,initialize:function(A){OpenLayers.Strategy.prototype.initialize.apply(this,[A])},activate:function(){var A=OpenLayers.Strategy.prototype.activate.call(this);if(A){this.layer.events.on({moveend:this.update,scope:this});this.layer.events.on({refresh:this.update,scope:this})}return A},deactivate:function(){var A=OpenLayers.Strategy.prototype.deactivate.call(this);if(A){this.layer.events.un({moveend:this.update,scope:this});this.layer.events.un({refresh:this.update,scope:this})}return A},update:function(B){var A=this.getMapBounds();if((B&&B.force)||this.invalidBounds(A)){this.calculateBounds(A);this.resolution=this.layer.map.getResolution();this.triggerRead()}},getMapBounds:function(){var A=this.layer.map.getExtent();if(!this.layer.projection.equals(this.layer.map.getProjectionObject())){A=A.clone().transform(this.layer.map.getProjectionObject(),this.layer.projection)}return A},invalidBounds:function(A){if(!A){A=this.getMapBounds()}var C=!this.bounds||!this.bounds.containsBounds(A);if(!C&&this.resFactor){var B=this.resolution/this.layer.map.getResolution();C=(B>=this.resFactor||B<=(1/this.resFactor))}return C},calculateBounds:function(B){if(!B){B=this.getMapBounds()}var A=B.getCenterLonLat();var D=B.getWidth()*this.ratio;var C=B.getHeight()*this.ratio;this.bounds=new OpenLayers.Bounds(A.lon-(D/2),A.lat-(C/2),A.lon+(D/2),A.lat+(C/2))},triggerRead:function(){if(this.response){this.layer.protocol.abort(this.response);this.layer.events.triggerEvent("loadend")}this.layer.events.triggerEvent("loadstart");this.response=this.layer.protocol.read({filter:this.createFilter(),callback:this.merge,scope:this})},createFilter:function(){var A=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.BBOX,value:this.bounds,projection:this.layer.projection});if(this.layer.filter){A=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.AND,filters:[this.layer.filter,A]})}return A},merge:function(G){this.layer.destroyFeatures();var E=G.features;if(E&&E.length>0){var F=this.layer.projection;var D=this.layer.map.getProjectionObject();if(!D.equals(F)){var C;for(var B=0,A=E.length;B<A;++B){C=E[B].geometry;if(C){C.transform(F,D)}}}this.layer.addFeatures(E)}this.response=null;this.layer.events.triggerEvent("loadend")},CLASS_NAME:"OpenLayers.Strategy.BBOX"});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}this.initLayer(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"})}},initLayer:function(A){if(A instanceof Array){this.layers=A;this.layer=new OpenLayers.Layer.Vector.RootContainer(this.id+"_container",{layers:A})}else{this.layer=A}},destroy:function(){if(this.active&&this.layers){this.map.removeLayer(this.layer)}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);if(!this.handlers.feature.lastFeature){this.handlers.feature.lastFeature=B.selectedFeatures[0]}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 J=this.map.getLonLatFromPixel(new OpenLayers.Pixel(E.right,E.top));var A=new OpenLayers.Bounds(H.lon,H.lat,J.lon,J.lat);if(!this.multipleSelect()){this.unselectAll()}var I=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 K=F.features[C];if(!K.getVisibility()){continue}if(this.geometryTypes==null||OpenLayers.Util.indexOf(this.geometryTypes,K.geometry.CLASS_NAME)>-1){if(A.toGeometry().intersects(K.geometry)){if(OpenLayers.Util.indexOf(F.selectedFeatures,K)==-1){this.select(K)}}}}}this.multiple=I}},setMap:function(A){this.handlers.feature.setMap(A);if(this.box){this.handlers.box.setMap(A)}OpenLayers.Control.prototype.setMap.apply(this,arguments)},setLayer:function(B){var A=this.active;this.unselectAll();this.deactivate();if(this.layers){this.layer.destroy();this.layers=null}this.initLayer(B);this.handlers.feature.layer=this.layer;if(A){this.activate()}},CLASS_NAME:"OpenLayers.Control.SelectFeature"});OpenLayers.Format.Filter.v1=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{ogc:"http://www.opengis.net/ogc",gml:"http://www.opengis.net/gml",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},defaultPrefix:"ogc",schemaLocation:null,initialize:function(A){OpenLayers.Format.XML.prototype.initialize.apply(this,[A])},read:function(A){var B={};this.readers.ogc.Filter.apply(this,[A,B]);return B.filter},readers:{ogc:{Filter:function(B,A){var C={fids:[],filters:[]};this.readChildNodes(B,C);if(C.fids.length>0){A.filter=new OpenLayers.Filter.FeatureId({fids:C.fids})}else{if(C.filters.length>0){A.filter=C.filters[0]}}},FeatureId:function(A,B){var C=A.getAttribute("fid");if(C){B.fids.push(C)}},And:function(B,C){var A=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.AND});this.readChildNodes(B,A);C.filters.push(A)},Or:function(B,C){var A=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.OR});this.readChildNodes(B,A);C.filters.push(A)},Not:function(B,C){var A=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.NOT});this.readChildNodes(B,A);C.filters.push(A)},PropertyIsLessThan:function(B,C){var A=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.LESS_THAN});this.readChildNodes(B,A);C.filters.push(A)},PropertyIsGreaterThan:function(B,C){var A=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.GREATER_THAN});this.readChildNodes(B,A);C.filters.push(A)},PropertyIsLessThanOrEqualTo:function(B,C){var A=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO});this.readChildNodes(B,A);C.filters.push(A)},PropertyIsGreaterThanOrEqualTo:function(B,C){var A=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO});this.readChildNodes(B,A);C.filters.push(A)},PropertyIsBetween:function(B,C){var A=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.BETWEEN});this.readChildNodes(B,A);C.filters.push(A)},Literal:function(A,B){B.value=OpenLayers.String.numericIf(this.getChildValue(A))},PropertyName:function(B,A){A.property=this.getChildValue(B)},LowerBoundary:function(B,A){A.lowerBoundary=OpenLayers.String.numericIf(this.readOgcExpression(B))},UpperBoundary:function(B,A){A.upperBoundary=OpenLayers.String.numericIf(this.readOgcExpression(B))},Intersects:function(A,B){this.readSpatial(A,B,OpenLayers.Filter.Spatial.INTERSECTS)},Within:function(A,B){this.readSpatial(A,B,OpenLayers.Filter.Spatial.WITHIN)},Contains:function(A,B){this.readSpatial(A,B,OpenLayers.Filter.Spatial.CONTAINS)},DWithin:function(A,B){this.readSpatial(A,B,OpenLayers.Filter.Spatial.DWITHIN)},Distance:function(A,B){B.distance=parseInt(this.getChildValue(A));B.distanceUnits=A.getAttribute("units")}}},readSpatial:function(C,D,B){var A=new OpenLayers.Filter.Spatial({type:B});this.readChildNodes(C,A);A.value=A.components[0];delete A.components;D.filters.push(A)},readOgcExpression:function(A){var C={};this.readChildNodes(A,C);var B=C.value;if(B===undefined){B=this.getChildValue(A)}return B},write:function(A){return this.writers.ogc.Filter.apply(this,[A])},writers:{ogc:{Filter:function(C){var D=this.createElementNSPlus("ogc:Filter");var B=C.CLASS_NAME.split(".").pop();if(B=="FeatureId"){for(var A=0;A<C.fids.length;++A){this.writeNode("FeatureId",C.fids[A],D)}}else{this.writeNode(this.getFilterType(C),C,D)}return D},FeatureId:function(A){return this.createElementNSPlus("ogc:FeatureId",{attributes:{fid:A}})},And:function(C){var D=this.createElementNSPlus("ogc:And");var B;for(var A=0;A<C.filters.length;++A){B=C.filters[A];this.writeNode(this.getFilterType(B),B,D)}return D},Or:function(C){var D=this.createElementNSPlus("ogc:Or");var B;for(var A=0;A<C.filters.length;++A){B=C.filters[A];this.writeNode(this.getFilterType(B),B,D)}return D},Not:function(B){var C=this.createElementNSPlus("ogc:Not");var A=B.filters[0];this.writeNode(this.getFilterType(A),A,C);return C},PropertyIsLessThan:function(A){var B=this.createElementNSPlus("ogc:PropertyIsLessThan");this.writeNode("PropertyName",A,B);this.writeNode("Literal",A.value,B);return B},PropertyIsGreaterThan:function(A){var B=this.createElementNSPlus("ogc:PropertyIsGreaterThan");this.writeNode("PropertyName",A,B);this.writeNode("Literal",A.value,B);return B},PropertyIsLessThanOrEqualTo:function(A){var B=this.createElementNSPlus("ogc:PropertyIsLessThanOrEqualTo");this.writeNode("PropertyName",A,B);this.writeNode("Literal",A.value,B);return B},PropertyIsGreaterThanOrEqualTo:function(A){var B=this.createElementNSPlus("ogc:PropertyIsGreaterThanOrEqualTo");this.writeNode("PropertyName",A,B);this.writeNode("Literal",A.value,B);return B},PropertyIsBetween:function(A){var B=this.createElementNSPlus("ogc:PropertyIsBetween");this.writeNode("PropertyName",A,B);this.writeNode("LowerBoundary",A,B);this.writeNode("UpperBoundary",A,B);return B},PropertyName:function(A){return this.createElementNSPlus("ogc:PropertyName",{value:A.property})},Literal:function(A){return this.createElementNSPlus("ogc:Literal",{value:A})},LowerBoundary:function(A){var B=this.createElementNSPlus("ogc:LowerBoundary");this.writeNode("Literal",A.lowerBoundary,B);return B},UpperBoundary:function(A){var B=this.createElementNSPlus("ogc:UpperBoundary");this.writeNode("Literal",A.upperBoundary,B);return B},INTERSECTS:function(A){return this.writeSpatial(A,"Intersects")},WITHIN:function(A){return this.writeSpatial(A,"Within")},CONTAINS:function(A){return this.writeSpatial(A,"Contains")},DWITHIN:function(A){var B=this.writeSpatial(A,"DWithin");this.writeNode("Distance",A,B);return B},Distance:function(A){return this.createElementNSPlus("ogc:Distance",{attributes:{units:A.distanceUnits},value:A.distance})}}},getFilterType:function(A){var B=this.filterMap[A.type];if(!B){throw"Filter writing not supported for rule type: "+A.type}return B},filterMap:{"&&":"And","||":"Or","!":"Not","==":"PropertyIsEqualTo","!=":"PropertyIsNotEqualTo","<":"PropertyIsLessThan",">":"PropertyIsGreaterThan","<=":"PropertyIsLessThanOrEqualTo",">=":"PropertyIsGreaterThanOrEqualTo","..":"PropertyIsBetween","~":"PropertyIsLike",BBOX:"BBOX",DWITHIN:"DWITHIN",WITHIN:"WITHIN",CONTAINS:"CONTAINS",INTERSECTS:"INTERSECTS"},CLASS_NAME:"OpenLayers.Format.Filter.v1"});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.Layer.Text=OpenLayers.Class(OpenLayers.Layer.Markers,{location:null,features:null,formatOptions:null,selectedFeature:null,initialize:function(B,A){OpenLayers.Layer.Markers.prototype.initialize.apply(this,arguments);this.features=new Array()},destroy:function(){OpenLayers.Layer.Markers.prototype.destroy.apply(this,arguments);this.clearFeatures();this.features=null},loadText:function(){if(!this.loaded){if(this.location!=null){var A=function(B){this.events.triggerEvent("loadend")};this.events.triggerEvent("loadstart");OpenLayers.Request.GET({url:this.location,success:this.parseData,failure:A,scope:this});this.loaded=true}}},moveTo:function(C,A,B){OpenLayers.Layer.Markers.prototype.moveTo.apply(this,arguments);if(this.visibility&&!this.loaded){this.loadText()}},parseData:function(J){var L=J.responseText;var N={};OpenLayers.Util.extend(N,this.formatOptions);if(this.map&&!this.projection.equals(this.map.getProjectionObject())){N.externalProjection=this.projection;N.internalProjection=this.map.getProjectionObject()}var B=new OpenLayers.Format.Text(N);var C=B.read(L);for(var G=0,H=C.length;G<H;G++){var F={};var M=C[G];var K;var I,D;K=new OpenLayers.LonLat(M.geometry.x,M.geometry.y);if(M.style.graphicWidth&&M.style.graphicHeight){I=new OpenLayers.Size(M.style.graphicWidth,M.style.graphicHeight)}if(M.style.graphicXOffset!==undefined&&M.style.graphicYOffset!==undefined){D=new OpenLayers.Pixel(M.style.graphicXOffset,M.style.graphicYOffset)}if(M.style.externalGraphic!=null){F.icon=new OpenLayers.Icon(M.style.externalGraphic,I,D)}else{F.icon=OpenLayers.Marker.defaultIcon();if(I!=null){F.icon.setSize(I)}}if((M.attributes.title!=null)&&(M.attributes.description!=null)){F.popupContentHTML="<h2>"+M.attributes.title+"</h2><p>"+M.attributes.description+"</p>"}F.overflow=M.attributes.overflow||"auto";var A=new OpenLayers.Feature(this,K,F);this.features.push(A);var E=A.createMarker();if((M.attributes.title!=null)&&(M.attributes.description!=null)){E.events.register("click",A,this.markerClick)}this.addMarker(E)}this.events.triggerEvent("loadend")},markerClick:function(B){var D=(this==this.layer.selectedFeature);this.layer.selectedFeature=(!D)?this:null;for(var C=0,A=this.layer.map.popups.length;C<A;C++){this.layer.map.removePopup(this.layer.map.popups[C])}if(!D){this.layer.map.addPopup(this.createPopup())}OpenLayers.Event.stop(B)},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.Text"});OpenLayers.Control.ModifyFeature=OpenLayers.Class(OpenLayers.Control,{geometryTypes:null,clickout:true,toggle:true,standalone:false,layer:null,feature:null,vertices:null,virtualVertices:null,selectControl:null,dragControl:null,handlers:null,deleteCodes:null,virtualStyle:null,mode:null,modified:false,radiusHandle:null,dragHandle:null,onModificationStart:function(){},onModification:function(){},onModificationEnd:function(){},initialize:function(D,C){this.layer=D;this.vertices=[];this.virtualVertices=[];this.virtualStyle=OpenLayers.Util.extend({},this.layer.style||this.layer.styleMap.createSymbolizer());this.virtualStyle.fillOpacity=0.3;this.virtualStyle.strokeOpacity=0.3;this.deleteCodes=[46,68];this.mode=OpenLayers.Control.ModifyFeature.RESHAPE;OpenLayers.Control.prototype.initialize.apply(this,[C]);if(!(this.deleteCodes instanceof Array)){this.deleteCodes=[this.deleteCodes]}var F=this;var A={geometryTypes:this.geometryTypes,clickout:this.clickout,toggle:this.toggle,onBeforeSelect:this.beforeSelectFeature,onSelect:this.selectFeature,onUnselect:this.unselectFeature,scope:this};if(this.standalone===false){this.selectControl=new OpenLayers.Control.SelectFeature(D,A)}var B={geometryTypes:["OpenLayers.Geometry.Point"],snappingOptions:this.snappingOptions,onStart:function(H,G){F.dragStart.apply(F,[H,G])},onDrag:function(H,G){F.dragVertex.apply(F,[H,G])},onComplete:function(G){F.dragComplete.apply(F,[G])},featureCallbacks:{over:function(G){if(F.standalone!==true||G._sketch||F.feature===G){F.dragControl.overFeature.apply(F.dragControl,[G])}}}};this.dragControl=new OpenLayers.Control.DragFeature(D,B);var E={keydown:this.handleKeypress};this.handlers={keyboard:new OpenLayers.Handler.Keyboard(this,E)}},destroy:function(){this.layer=null;this.standalone||this.selectControl.destroy();this.dragControl.destroy();OpenLayers.Control.prototype.destroy.apply(this,[])},activate:function(){return((this.standalone||this.selectControl.activate())&&this.handlers.keyboard.activate()&&OpenLayers.Control.prototype.activate.apply(this,arguments))},deactivate:function(){var C=false;if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)){this.layer.removeFeatures(this.vertices,{silent:true});this.layer.removeFeatures(this.virtualVertices,{silent:true});this.vertices=[];this.dragControl.deactivate();var A=this.feature;var B=A&&A.geometry&&A.layer;if(this.standalone===false){if(B){this.selectControl.unselect.apply(this.selectControl,[A])}this.selectControl.deactivate()}else{if(B){this.unselectFeature(A)}}this.handlers.keyboard.deactivate();C=true}return C},beforeSelectFeature:function(A){return this.layer.events.triggerEvent("beforefeaturemodified",{feature:A})},selectFeature:function(A){this.feature=A;this.modified=false;this.resetVertices();this.dragControl.activate();this.onModificationStart(this.feature)},unselectFeature:function(A){this.layer.removeFeatures(this.vertices,{silent:true});this.vertices=[];this.layer.destroyFeatures(this.virtualVertices,{silent:true});this.virtualVertices=[];if(this.dragHandle){this.layer.destroyFeatures([this.dragHandle],{silent:true});delete this.dragHandle}if(this.radiusHandle){this.layer.destroyFeatures([this.radiusHandle],{silent:true});delete this.radiusHandle}this.feature=null;this.dragControl.deactivate();this.onModificationEnd(A);this.layer.events.triggerEvent("afterfeaturemodified",{feature:A,modified:this.modified});this.modified=false},dragStart:function(B,A){if(B!=this.feature&&!B.geometry.parent&&B!=this.dragHandle&&B!=this.radiusHandle){if(this.standalone===false&&this.feature){this.selectControl.clickFeature.apply(this.selectControl,[this.feature])}if(this.geometryTypes==null||OpenLayers.Util.indexOf(this.geometryTypes,B.geometry.CLASS_NAME)!=-1){this.standalone||this.selectControl.clickFeature.apply(this.selectControl,[B]);this.dragControl.overFeature.apply(this.dragControl,[B]);this.dragControl.lastPixel=A;this.dragControl.handlers.drag.started=true;this.dragControl.handlers.drag.start=A;this.dragControl.handlers.drag.last=A}}},dragVertex:function(B,A){this.modified=true;if(this.feature.geometry.CLASS_NAME=="OpenLayers.Geometry.Point"){if(this.feature!=B){this.feature=B}this.layer.events.triggerEvent("vertexmodified",{vertex:B.geometry,feature:this.feature,pixel:A})}else{if(B._index){B.geometry.parent.addComponent(B.geometry,B._index);delete B._index;OpenLayers.Util.removeItem(this.virtualVertices,B);this.vertices.push(B)}else{if(B==this.dragHandle){this.layer.removeFeatures(this.vertices,{silent:true});this.vertices=[];if(this.radiusHandle){this.layer.destroyFeatures([this.radiusHandle],{silent:true});this.radiusHandle=null}}else{if(B!==this.radiusHandle){this.layer.events.triggerEvent("vertexmodified",{vertex:B.geometry,feature:this.feature,pixel:A})}}}if(this.virtualVertices.length>0){this.layer.destroyFeatures(this.virtualVertices,{silent:true});this.virtualVertices=[]}this.layer.drawFeature(this.feature,this.standalone?undefined:this.selectControl.renderIntent)}this.layer.drawFeature(B)},dragComplete:function(A){this.resetVertices();this.setFeatureState();this.onModification(this.feature);this.layer.events.triggerEvent("featuremodified",{feature:this.feature})},setFeatureState:function(){if(this.feature.state!=OpenLayers.State.INSERT&&this.feature.state!=OpenLayers.State.DELETE){this.feature.state=OpenLayers.State.UPDATE}},resetVertices:function(){if(this.dragControl.feature){this.dragControl.outFeature(this.dragControl.feature)}if(this.vertices.length>0){this.layer.removeFeatures(this.vertices,{silent:true});this.vertices=[]}if(this.virtualVertices.length>0){this.layer.removeFeatures(this.virtualVertices,{silent:true});this.virtualVertices=[]}if(this.dragHandle){this.layer.destroyFeatures([this.dragHandle],{silent:true});this.dragHandle=null}if(this.radiusHandle){this.layer.destroyFeatures([this.radiusHandle],{silent:true});this.radiusHandle=null}if(this.feature&&this.feature.geometry.CLASS_NAME!="OpenLayers.Geometry.Point"){if((this.mode&OpenLayers.Control.ModifyFeature.DRAG)){this.collectDragHandle()}if((this.mode&(OpenLayers.Control.ModifyFeature.ROTATE|OpenLayers.Control.ModifyFeature.RESIZE))){this.collectRadiusHandle()}if(this.mode&OpenLayers.Control.ModifyFeature.RESHAPE){if(!(this.mode&OpenLayers.Control.ModifyFeature.RESIZE)){this.collectVertices()}}}},handleKeypress:function(A){var B=A.keyCode;if(this.feature&&OpenLayers.Util.indexOf(this.deleteCodes,B)!=-1){var C=this.dragControl.feature;if(C&&OpenLayers.Util.indexOf(this.vertices,C)!=-1&&!this.dragControl.handlers.drag.dragging&&C.geometry.parent){C.geometry.parent.removeComponent(C.geometry);this.layer.drawFeature(this.feature,this.standalone?undefined:this.selectControl.renderIntent);this.resetVertices();this.setFeatureState();this.onModification(this.feature);this.layer.events.triggerEvent("featuremodified",{feature:this.feature})}}},collectVertices:function(){this.vertices=[];this.virtualVertices=[];var A=this;function B(H){var D,E,I,F;if(H.CLASS_NAME=="OpenLayers.Geometry.Point"){E=new OpenLayers.Feature.Vector(H);E._sketch=true;A.vertices.push(E)}else{var C=H.components.length;if(H.CLASS_NAME=="OpenLayers.Geometry.LinearRing"){C-=1}for(D=0;D<C;++D){I=H.components[D];if(I.CLASS_NAME=="OpenLayers.Geometry.Point"){E=new OpenLayers.Feature.Vector(I);E._sketch=true;A.vertices.push(E)}else{B(I)}}if(H.CLASS_NAME!="OpenLayers.Geometry.MultiPoint"){for(D=0,F=H.components.length;D<F-1;++D){var L=H.components[D];var M=H.components[D+1];if(L.CLASS_NAME=="OpenLayers.Geometry.Point"&&M.CLASS_NAME=="OpenLayers.Geometry.Point"){var J=(L.x+M.x)/2;var G=(L.y+M.y)/2;var K=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(J,G),null,A.virtualStyle);K.geometry.parent=H;K._index=D+1;K._sketch=true;A.virtualVertices.push(K)}}}}}B.call(this,this.feature.geometry);this.layer.addFeatures(this.virtualVertices,{silent:true});this.layer.addFeatures(this.vertices,{silent:true})},collectDragHandle:function(){var D=this.feature.geometry;var A=D.getBounds().getCenterLonLat();var C=new OpenLayers.Geometry.Point(A.lon,A.lat);var B=new OpenLayers.Feature.Vector(C);C.move=function(E,F){OpenLayers.Geometry.Point.prototype.move.call(this,E,F);D.move(E,F)};B._sketch=true;this.dragHandle=B;this.layer.addFeatures([this.dragHandle],{silent:true})},collectRadiusHandle:function(){var H=this.feature.geometry;var A=H.getBounds();var B=A.getCenterLonLat();var I=new OpenLayers.Geometry.Point(B.lon,B.lat);var G=new OpenLayers.Geometry.Point(A.right,A.bottom);var F=new OpenLayers.Feature.Vector(G);var C=(this.mode&OpenLayers.Control.ModifyFeature.RESIZE);var E=(this.mode&OpenLayers.Control.ModifyFeature.RESHAPE);var D=(this.mode&OpenLayers.Control.ModifyFeature.ROTATE);G.move=function(T,S){OpenLayers.Geometry.Point.prototype.move.call(this,T,S);var U=this.x-I.x;var P=this.y-I.y;var V=U-T;var Q=P-S;if(D){var K=Math.atan2(Q,V);var J=Math.atan2(P,U);var N=J-K;N*=180/Math.PI;H.rotate(N,I)}if(C){var M,R;if(E){M=P/Q;R=(U/V)/M}else{var O=Math.sqrt((V*V)+(Q*Q));var L=Math.sqrt((U*U)+(P*P));M=L/O}H.resize(M,I,R)}};F._sketch=true;this.radiusHandle=F;this.layer.addFeatures([this.radiusHandle],{silent:true})},setMap:function(A){this.standalone||this.selectControl.setMap(A);this.dragControl.setMap(A);OpenLayers.Control.prototype.setMap.apply(this,arguments)},CLASS_NAME:"OpenLayers.Control.ModifyFeature"});OpenLayers.Control.ModifyFeature.RESHAPE=1;OpenLayers.Control.ModifyFeature.RESIZE=2;OpenLayers.Control.ModifyFeature.ROTATE=4;OpenLayers.Control.ModifyFeature.DRAG=8;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(K){var C=false;var J=K.CLASS_NAME;if(J=="OpenLayers.Geometry.LineString"||J=="OpenLayers.Geometry.LinearRing"||J=="OpenLayers.Geometry.Point"){var N=this.getSortedSegments();var L;if(J=="OpenLayers.Geometry.Point"){L=[{x1:K.x,y1:K.y,x2:K.x,y2:K.y}]}else{L=K.getSortedSegments()}var Q,G,E,A,P,O,D,B;outer:for(var H=0,I=N.length;H<I;++H){Q=N[H];G=Q.x1;E=Q.x2;A=Q.y1;P=Q.y2;inner:for(var F=0,M=L.length;F<M;++F){O=L[F];if(O.x1>E){break}if(O.x2<G){continue}D=O.y1;B=O.y2;if(Math.min(D,B)>Math.max(A,P)){continue}if(Math.max(D,B)<Math.min(A,P)){continue}if(OpenLayers.Geometry.segmentsIntersect(Q,O)){C=true;break outer}}}}else{C=K.intersects(this)}return C},getSortedSegments:function(){var A=this.components.length-1;var B=new Array(A),E,D;for(var C=0;C<A;++C){E=this.components[C];D=this.components[C+1];if(E.x<D.x){B[C]={x1:E.x,y1:E.y,x2:D.x,y2:D.y}}else{B[C]={x1:D.x,y1:D.y,x2:E.x,y2:E.y}}}function F(H,G){return H.x1-G.x1}return B.sort(F)},splitWithSegment:function(Q,B){var C=!(B&&B.edge===false);var N=B&&B.tolerance;var A=[];var S=this.getVertices();var M=[];var U=[];var H=false;var E,D,K;var I,P,T;var F={point:true,tolerance:N};var G=null;for(var L=0,J=S.length-2;L<=J;++L){E=S[L];M.push(E.clone());D=S[L+1];T={x1:E.x,y1:E.y,x2:D.x,y2:D.y};K=OpenLayers.Geometry.segmentsIntersect(Q,T,F);if(K instanceof OpenLayers.Geometry.Point){if((K.x===Q.x1&&K.y===Q.y1)||(K.x===Q.x2&&K.y===Q.y2)||K.equals(E)||K.equals(D)){P=true}else{P=false}if(P||C){if(!K.equals(U[U.length-1])){U.push(K.clone())}if(L===0){if(K.equals(E)){continue}}if(K.equals(D)){continue}H=true;if(!K.equals(E)){M.push(K)}A.push(new OpenLayers.Geometry.LineString(M));M=[K.clone()]}}}if(H){M.push(D.clone());A.push(new OpenLayers.Geometry.LineString(M))}if(U.length>0){var O=Q.x1<Q.x2?1:-1;var R=Q.y1<Q.y2?1:-1;G={lines:A,points:U.sort(function(W,V){return(O*W.x-O*V.x)||(R*W.y-R*V.y)})}}return G},split:function(U,B){var K=null;var D=B&&B.mutual;var I,E,J,C;if(U instanceof OpenLayers.Geometry.LineString){var T=this.getVertices();var G,F,S,H,A,M;var P=[];J=[];for(var Q=0,L=T.length-2;Q<=L;++Q){G=T[Q];F=T[Q+1];S={x1:G.x,y1:G.y,x2:F.x,y2:F.y};C=C||[U];if(D){P.push(G.clone())}for(var O=0;O<C.length;++O){H=C[O].splitWithSegment(S,B);if(H){A=H.lines;if(A.length>0){A.unshift(O,1);Array.prototype.splice.apply(C,A);O+=A.length-2}if(D){for(var N=0,R=H.points.length;N<R;++N){M=H.points[N];if(!M.equals(G)){P.push(M);J.push(new OpenLayers.Geometry.LineString(P));if(M.equals(F)){P=[]}else{P=[M.clone()]}}}}}}}if(D&&J.length>0&&P.length>0){P.push(F.clone());J.push(new OpenLayers.Geometry.LineString(P))}}else{K=U.splitWith(this,B)}if(C&&C.length>1){E=true}else{C=[]}if(J&&J.length>1){I=true}else{J=[]}if(E||I){if(D){K=[J,C]}else{K=C}}return K},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 I=!(G&&G.edge===false);var X=I&&G&&G.details;var O,E={};var R=Number.POSITIVE_INFINITY;if(H instanceof OpenLayers.Geometry.Point){var P=this.getSortedSegments();var N=H.x;var M=H.y;var V;for(var T=0,U=P.length;T<U;++T){V=P[T];O=OpenLayers.Geometry.distanceToSegment(H,V);if(O.distance<R){R=O.distance;E=O;if(R===0){break}}else{if(V.x2>N&&((M>V.y1&&M<V.y2)||(M<V.y1&&M>V.y2))){break}}}if(X){E={distance:E.distance,x0:E.x,y0:E.y,x1:N,y1:M}}else{E=E.distance}}else{if(H instanceof OpenLayers.Geometry.LineString){var D=this.getSortedSegments();var C=H.getSortedSegments();var B,A,L,W,F;var K=C.length;var J={point:true};outer:for(var T=0,U=D.length;T<U;++T){B=D[T];W=B.x1;F=B.y1;for(var S=0;S<K;++S){A=C[S];L=OpenLayers.Geometry.segmentsIntersect(B,A,J);if(L){R=0;E={distance:0,x0:L.x,y0:L.y,x1:L.x,y1:L.y};break outer}else{O=OpenLayers.Geometry.distanceToSegment({x:W,y:F},A);if(O.distance<R){R=O.distance;E={distance:R,x0:W,y0:F,x1:O.x,y1:O.y}}}}}if(!X){E=E.distance}if(R!==0){if(B){O=H.distanceTo(new OpenLayers.Geometry.Point(B.x2,B.y2),G);var Q=X?O.distance:O;if(Q<R){if(X){E={distance:R,x0:O.x1,y0:O.y1,x1:O.x0,y1:O.y0}}else{E=Q}}}}}else{E=H.distanceTo(this,G);if(X){E={distance:E.distance,x0:E.x1,y0:E.y1,x1:E.x0,y1:E.y0}}}}return E},CLASS_NAME:"OpenLayers.Geometry.LineString"});OpenLayers.Control.TransformFeature=OpenLayers.Class(OpenLayers.Control,{EVENT_TYPES:["beforesetfeature","setfeature","beforetransform","transform","transformcomplete"],geometryTypes:null,layer:null,preserveAspectRatio:false,rotate:true,feature:null,renderIntent:"temporary",rotationHandleSymbolizer:null,box:null,center:null,scale:1,ratio:1,rotation:0,handles:null,rotationHandles:null,dragControl:null,initialize:function(B,A){this.EVENT_TYPES=OpenLayers.Control.TransformFeature.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);OpenLayers.Control.prototype.initialize.apply(this,[A]);this.layer=B;if(!this.rotationHandleSymbolizer){this.rotationHandleSymbolizer={stroke:false,pointRadius:10,fillOpacity:0,cursor:"pointer"}}this.createBox();this.createControl()},activate:function(){var A=false;if(OpenLayers.Control.prototype.activate.apply(this,arguments)){this.dragControl.activate();this.layer.addFeatures([this.box]);this.rotate&&this.layer.addFeatures(this.rotationHandles);this.layer.addFeatures(this.handles);A=true}return A},deactivate:function(){var A=false;if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)){this.layer.removeFeatures(this.handles);this.rotate&&this.layer.removeFeatures(this.rotationHandles);this.layer.removeFeatures([this.box]);this.dragControl.deactivate();A=true}return A},setMap:function(A){this.dragControl.setMap(A);OpenLayers.Control.prototype.setMap.apply(this,arguments)},setFeature:function(J,C){C=OpenLayers.Util.applyDefaults(C,{rotation:0,scale:1,ratio:1});var I={feature:J};var E=this.rotation;var A=this.center;OpenLayers.Util.extend(this,C);if(this.events.triggerEvent("beforesetfeature",I)===false){return }this.feature=J;this.activate();this._setfeature=true;var B=this.feature.geometry.getBounds();this.box.move(B.getCenterLonLat());this.box.geometry.rotate(-E,A);this._angle=0;var F;if(this.rotation){var G=J.geometry.clone();G.rotate(-this.rotation,this.center);var D=new OpenLayers.Feature.Vector(G.getBounds().toGeometry());D.geometry.rotate(this.rotation,this.center);this.box.geometry.rotate(this.rotation,this.center);this.box.move(D.geometry.getBounds().getCenterLonLat());var H=D.geometry.components[0].components[0];F=H.getBounds().getCenterLonLat()}else{F=new OpenLayers.LonLat(B.left,B.bottom)}this.handles[0].move(F);delete this._setfeature;this.events.triggerEvent("setfeature",I)},createBox:function(){var E=this;this.center=new OpenLayers.Geometry.Point(0,0);var F=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString([new OpenLayers.Geometry.Point(-1,-1),new OpenLayers.Geometry.Point(0,-1),new OpenLayers.Geometry.Point(1,-1),new OpenLayers.Geometry.Point(1,0),new OpenLayers.Geometry.Point(1,1),new OpenLayers.Geometry.Point(0,1),new OpenLayers.Geometry.Point(-1,1),new OpenLayers.Geometry.Point(-1,0),new OpenLayers.Geometry.Point(-1,-1)]),null,typeof this.renderIntent=="string"?null:this.renderIntent);F.geometry.move=function(N,O){E._moving=true;OpenLayers.Geometry.LineString.prototype.move.apply(this,arguments);E.center.move(N,O);delete E._moving};var A=function(N,O){OpenLayers.Geometry.Point.prototype.move.apply(this,arguments);this._rotationHandle&&this._rotationHandle.geometry.move(N,O);this._handle.geometry.move(N,O)};var M=function(P,N,O){OpenLayers.Geometry.Point.prototype.resize.apply(this,arguments);this._rotationHandle&&this._rotationHandle.geometry.resize(P,N,O);this._handle.geometry.resize(P,N,O)};var K=function(O,N){OpenLayers.Geometry.Point.prototype.rotate.apply(this,arguments);this._rotationHandle&&this._rotationHandle.geometry.rotate(O,N);this._handle.geometry.rotate(O,N)};var H=function(Y,W){var d=this.x,a=this.y;OpenLayers.Geometry.Point.prototype.move.call(this,Y,W);if(E._moving){return }var b=E.dragControl.handlers.drag.evt;var N=!E._setfeature&&E.preserveAspectRatio;var R=!N&&!(b&&b.shiftKey);var X=new OpenLayers.Geometry.Point(d,a);var U=E.center;this.rotate(-E.rotation,U);X.rotate(-E.rotation,U);var Z=this.x-U.x;var S=this.y-U.y;var c=Z-(this.x-X.x);var T=S-(this.y-X.y);this.x=d;this.y=a;var P,V=1;if(R){P=Math.abs(T)<0.00001?1:S/T;V=(Math.abs(c)<0.00001?1:(Z/c))/P}else{var Q=Math.sqrt((c*c)+(T*T));var O=Math.sqrt((Z*Z)+(S*S));P=O/Q}E._moving=true;E.box.geometry.rotate(-E.rotation,U);delete E._moving;E.box.geometry.resize(P,U,V);E.box.geometry.rotate(E.rotation,U);E.transformFeature({scale:P,ratio:V})};var C=function(V,T){var b=this.x,Y=this.y;OpenLayers.Geometry.Point.prototype.move.call(this,V,T);if(E._moving){return }var Z=E.dragControl.handlers.drag.evt;var U=(Z&&Z.shiftKey)?45:1;var S=E.center;var X=this.x-S.x;var Q=this.y-S.y;var a=X-V;var R=Q-T;this.x=b;this.y=Y;var O=Math.atan2(R,a);var N=Math.atan2(Q,X);var P=N-O;P*=180/Math.PI;E._angle=(E._angle+P)%360;var W=E.rotation%U;if(Math.abs(E._angle)>=U||W!==0){P=Math.round(E._angle/U)*U-W;E._angle=0;E.box.geometry.rotate(P,S);E.transformFeature({rotation:P})}};var L=new Array(8);var I=new Array(4);var J,G,B;for(var D=0;D<8;++D){J=F.geometry.components[D];G=new OpenLayers.Feature.Vector(J.clone(),null,typeof this.renderIntent=="string"?null:this.renderIntent);if(D%2==0){B=new OpenLayers.Feature.Vector(J.clone(),null,typeof this.rotationHandleSymbolizer=="string"?null:this.rotationHandleSymbolizer);B.geometry.move=C;J._rotationHandle=B;I[D/2]=B}J.move=A;J.resize=M;J.rotate=K;G.geometry.move=H;J._handle=G;L[D]=G}this.box=F;this.rotationHandles=I;this.handles=L},createControl:function(){var A=this;this.dragControl=new OpenLayers.Control.DragFeature(this.layer,{documentDrag:true,moveFeature:function(B){if(this.feature===A.feature){this.feature=A.box}OpenLayers.Control.DragFeature.prototype.moveFeature.apply(this,arguments)},onDrag:function(C,B){if(C===A.box){A.transformFeature({center:A.center});A.drawHandles()}},onStart:function(E,C){var B=!A.geometryTypes||OpenLayers.Util.indexOf(A.geometryTypes,E.geometry.CLASS_NAME)!==-1;var D=OpenLayers.Util.indexOf(A.handles,E);D+=OpenLayers.Util.indexOf(A.rotationHandles,E);if(E!==A.feature&&E!==A.box&&D==-2&&B){A.setFeature(E)}},onComplete:function(C,B){A.events.triggerEvent("transformcomplete",{feature:A.feature})}})},drawHandles:function(){var B=this.layer;for(var A=0;A<8;++A){if(this.rotate&&A%2===0){B.drawFeature(this.rotationHandles[A/2],this.rotationHandleSymbolizer)}B.drawFeature(this.handles[A],this.renderIntent)}},transformFeature:function(E){if(!this._setfeature){this.scale*=(E.scale||1);this.ratio*=(E.ratio||1);var B=this.rotation;this.rotation=(this.rotation+(E.rotation||0))%360;if(this.events.triggerEvent("beforetransform",E)!==false){var D=this.feature;var C=D.geometry;var A=this.center;C.rotate(-B,A);if(E.scale||E.ratio){C.resize(E.scale,A,E.ratio)}else{if(E.center){D.move(E.center.getBounds().getCenterLonLat())}}C.rotate(this.rotation,A);this.layer.drawFeature(D);D.toState(OpenLayers.State.UPDATE);this.events.triggerEvent("transform",E)}}this.layer.drawFeature(this.box,this.renderIntent);this.drawHandles()},destroy:function(){var B;for(var A=0;A<8;++A){B=this.box.geometry.components[A];B._handle.destroy();B._handle=null;B._rotationHandle&&B._rotationHandle.destroy();B._rotationHandle=null}this.box.destroy();this.box=null;this.layer=null;this.dragControl.destroy();OpenLayers.Control.prototype.destroy.apply(this,arguments)},CLASS_NAME:"OpenLayers.Control.TransformFeature"});OpenLayers.Format.GPX=OpenLayers.Class(OpenLayers.Format.XML,{extractWaypoints:true,extractTracks:true,extractRoutes:true,extractAttributes:true,initialize:function(A){this.externalProjection=new OpenLayers.Projection("EPSG:4326");OpenLayers.Format.XML.prototype.initialize.apply(this,[A])},read:function(S){if(typeof S=="string"){S=OpenLayers.Format.XML.prototype.read.apply(this,[S])}var C=[];if(this.extractTracks){var O=S.getElementsByTagName("trk");for(var N=0,P=O.length;N<P;N++){var I={};if(this.extractAttributes){I=this.parseAttributes(O[N])}var G=this.getElementsByTagNameNS(O[N],O[N].namespaceURI,"trkseg");for(var M=0,F=G.length;M<F;M++){var H=this.extractSegment(G[M],"trkpt");C.push(new OpenLayers.Feature.Vector(H,I))}}}if(this.extractRoutes){var A=S.getElementsByTagName("rte");for(var L=0,K=A.length;L<K;L++){var I={};if(this.extractAttributes){I=this.parseAttributes(A[L])}var R=this.extractSegment(A[L],"rtept");C.push(new OpenLayers.Feature.Vector(R,I))}}if(this.extractWaypoints){var B=S.getElementsByTagName("wpt");for(var J=0,P=B.length;J<P;J++){var I={};if(this.extractAttributes){I=this.parseAttributes(B[J])}var E=new OpenLayers.Geometry.Point(B[J].getAttribute("lon"),B[J].getAttribute("lat"));C.push(new OpenLayers.Feature.Vector(E,I))}}if(this.internalProjection&&this.externalProjection){for(var Q=0,D=C.length;Q<D;Q++){C[Q].geometry.transform(this.externalProjection,this.internalProjection)}}return C},extractSegment:function(E,F){var D=this.getElementsByTagNameNS(E,E.namespaceURI,F);var B=[];for(var C=0,A=D.length;C<A;C++){B.push(new OpenLayers.Geometry.Point(D[C].getAttribute("lon"),D[C].getAttribute("lat")))}return new OpenLayers.Geometry.LineString(B)},parseAttributes:function(B){var A={};var D=B.firstChild;while(D){if(D.nodeType==1){var C=D.firstChild;if(C.nodeType==3||C.nodeType==4){name=(D.prefix)?D.nodeName.split(":")[1]:D.nodeName;if(name!="trkseg"&&name!="rtept"){A[name]=C.nodeValue}}}D=D.nextSibling}return A},CLASS_NAME:"OpenLayers.Format.GPX"});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 F=0;var E=0;for(var C=0;C<this.components.length-1;C++){var B=this.components[C];var H=this.components[C+1];F+=(B.x+H.x)*(B.x*H.y-H.x*B.y);E+=(B.y+H.y)*(B.x*H.y-H.x*B.y)}var D=-1*this.getArea();var A=F/(6*D);var G=E/(6*D);return new OpenLayers.Geometry.Point(A,G)}else{return null}},getArea:function(){var E=0;if(this.components&&(this.components.length>2)){var D=0;for(var C=0,B=this.components.length;C<B-1;C++){var A=this.components[C];var F=this.components[C+1];D+=(A.x+F.x)*(F.y-A.y)}E=-D/2}return E},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(L){var R=OpenLayers.Number.limitSigDigs;var K=14;var J=R(L.x,K);var I=R(L.y,K);function Q(W,T,V,S,U){return(((T-S)*W)+((S*V)-(T*U)))/(V-U)}var A=this.components.length-1;var G,F,P,D,N,B,E,C;var H=0;for(var M=0;M<A;++M){G=this.components[M];P=R(G.x,K);D=R(G.y,K);F=this.components[M+1];N=R(F.x,K);B=R(F.y,K);if(D==B){if(I==D){if(P<=N&&(J>=P&&J<=N)||P>=N&&(J<=P&&J>=N)){H=-1;break}}continue}E=R(Q(I,P,D,N,B),K);if(E==J){if(D<B&&(I>=D&&I<=B)||D>B&&(I<=D&&I>=B)){H=-1;break}}if(E<=J){continue}if(P!=N&&(E<Math.min(P,N)||E>Math.max(P,N))){continue}if(D<B&&(I>=D&&I<B)||D>B&&(I<D&&I>=B)){++H}}var O=(H==-1)?1:!!(H&1);return O},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.MultiLineString=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.LineString"],initialize:function(A){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments)},split:function(K,P){var G=null;var O=P&&P.mutual;var L,A,N,J,B;var E=[];var M=[K];for(var F=0,H=this.components.length;F<H;++F){A=this.components[F];J=false;for(var D=0;D<M.length;++D){L=A.split(M[D],P);if(L){if(O){N=L[0];for(var C=0,I=N.length;C<I;++C){if(C===0&&E.length){E[E.length-1].addComponent(N[C])}else{E.push(new OpenLayers.Geometry.MultiLineString([N[C]]))}}J=true;L=L[1]}if(L.length){L.unshift(D,1);Array.prototype.splice.apply(M,L);break}}}if(!J){if(E.length){E[E.length-1].addComponent(A.clone())}else{E=[new OpenLayers.Geometry.MultiLineString(A.clone())]}}}if(E&&E.length>1){J=true}else{E=[]}if(M&&M.length>1){B=true}else{M=[]}if(J||B){if(O){G=[E,M]}else{G=M}}return G},splitWith:function(K,P){var G=null;var O=P&&P.mutual;var L,C,N,J,A,E,M;if(K instanceof OpenLayers.Geometry.LineString){M=[];E=[K];for(var F=0,H=this.components.length;F<H;++F){A=false;C=this.components[F];for(var D=0;D<E.length;++D){L=E[D].split(C,P);if(L){if(O){N=L[0];if(N.length){N.unshift(D,1);Array.prototype.splice.apply(E,N);D+=N.length-2}L=L[1];if(L.length===0){L=[C.clone()]}}for(var B=0,I=L.length;B<I;++B){if(B===0&&M.length){M[M.length-1].addComponent(L[B])}else{M.push(new OpenLayers.Geometry.MultiLineString([L[B]]))}}A=true}}if(!A){if(M.length){M[M.length-1].addComponent(C.clone())}else{M=[new OpenLayers.Geometry.MultiLineString([C.clone()])]}}}}else{G=K.split(this)}if(E&&E.length>1){J=true}else{E=[]}if(M&&M.length>1){A=true}else{M=[]}if(J||A){if(O){G=[E,M]}else{G=M}}return G},CLASS_NAME:"OpenLayers.Geometry.MultiLineString"});OpenLayers.Handler.Path=OpenLayers.Class(OpenLayers.Handler.Point,{line:null,freehand:false,freehandToggle:"shiftKey",initialize:function(C,B,A){OpenLayers.Handler.Point.prototype.initialize.apply(this,arguments)},createFeature:function(A){var B=this.control.map.getLonLatFromPixel(A);this.point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(B.lon,B.lat));this.line=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString([this.point.geometry]));this.callback("create",[this.point.geometry,this.getSketch()]);this.point.geometry.clearBounds();this.layer.addFeatures([this.line,this.point],{silent:true})},destroyFeature:function(){OpenLayers.Handler.Point.prototype.destroyFeature.apply(this);this.line=null},removePoint:function(){if(this.point){this.layer.removeFeatures([this.point])}},addPoint:function(A){this.layer.removeFeatures([this.point]);var B=this.control.map.getLonLatFromPixel(A);this.point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(B.lon,B.lat));this.line.geometry.addComponent(this.point.geometry,this.line.geometry.components.length);this.callback("point",[this.point.geometry,this.getGeometry()]);this.callback("modify",[this.point.geometry,this.getSketch()]);this.drawFeature()},freehandMode:function(A){return(this.freehandToggle&&A[this.freehandToggle])?!this.freehand:this.freehand},modifyFeature:function(A){var B=this.control.map.getLonLatFromPixel(A);this.point.geometry.x=B.lon;this.point.geometry.y=B.lat;this.callback("modify",[this.point.geometry,this.getSketch()]);this.point.geometry.clearBounds();this.drawFeature()},drawFeature:function(){this.layer.drawFeature(this.line,this.style);this.layer.drawFeature(this.point,this.style)},getSketch:function(){return this.line},getGeometry:function(){var A=this.line&&this.line.geometry;if(A&&this.multi){A=new OpenLayers.Geometry.MultiLineString([A])}return A},mousedown:function(A){if(this.lastDown&&this.lastDown.equals(A.xy)){return false}if(this.lastDown==null){if(this.persist){this.destroyFeature()}this.createFeature(A.xy)}else{if((this.lastUp==null)||!this.lastUp.equals(A.xy)){this.addPoint(A.xy)}}this.mouseDown=true;this.lastDown=A.xy;this.drawing=true;return false},mousemove:function(A){if(this.drawing){if(this.mouseDown&&this.freehandMode(A)){this.addPoint(A.xy)}else{this.modifyFeature(A.xy)}}return true},mouseup:function(A){this.mouseDown=false;if(this.drawing){if(this.freehandMode(A)){this.removePoint();this.finalize()}else{if(this.lastUp==null){this.addPoint(A.xy)}this.lastUp=A.xy}return false}return true},dblclick:function(A){if(!this.freehandMode(A)){var B=this.line.geometry.components.length-1;this.line.geometry.removeComponent(this.line.geometry.components[B]);this.removePoint();this.finalize()}return false},CLASS_NAME:"OpenLayers.Handler.Path"});OpenLayers.Control.Split=OpenLayers.Class(OpenLayers.Control,{EVENT_TYPES:["beforesplit","split","aftersplit"],layer:null,source:null,sourceOptions:null,tolerance:null,edge:true,deferDelete:false,mutual:true,targetFilter:null,sourceFilter:null,handler:null,initialize:function(A){Array.prototype.push.apply(this.EVENT_TYPES,OpenLayers.Control.prototype.EVENT_TYPES);OpenLayers.Control.prototype.initialize.apply(this,[A]);this.options=A||{};if(this.options.source){this.setSource(this.options.source)}},setSource:function(A){if(this.active){this.deactivate();if(this.handler){this.handler.destroy();delete this.handler}this.source=A;this.activate()}else{this.source=A}},activate:function(){var A=OpenLayers.Control.prototype.activate.call(this);if(A){if(!this.source){if(!this.handler){this.handler=new OpenLayers.Handler.Path(this,{done:function(B){this.onSketchComplete({feature:new OpenLayers.Feature.Vector(B)})}},{layerOptions:this.sourceOptions})}this.handler.activate()}else{if(this.source.events){this.source.events.on({sketchcomplete:this.onSketchComplete,afterfeaturemodified:this.afterFeatureModified,scope:this})}}}return A},deactivate:function(){var A=OpenLayers.Control.prototype.deactivate.call(this);if(A){if(this.source&&this.source.events){this.layer.events.un({sketchcomplete:this.onSketchComplete,afterfeaturemodified:this.afterFeatureModified,scope:this})}}return A},onSketchComplete:function(A){this.feature=null;return !this.considerSplit(A.feature)},afterFeatureModified:function(B){if(B.modified){var A=B.feature;if(A.geometry instanceof OpenLayers.Geometry.LineString||A.geometry instanceof OpenLayers.Geometry.MultiLineString){this.feature=B.feature;this.considerSplit(B.feature)}}},removeByGeometry:function(C,D){for(var B=0,A=C.length;B<A;++B){if(C[B].geometry===D){C.splice(B,1);break}}},isEligible:function(A){return(A.state!==OpenLayers.State.DELETE)&&(A.geometry instanceof OpenLayers.Geometry.LineString||A.geometry instanceof OpenLayers.Geometry.MultiLineString)&&(this.feature!==A)&&(!this.targetFilter||this.targetFilter.evaluate(A.attributes))},considerSplit:function(C){var H=false;var F=false;if(!this.sourceFilter||this.sourceFilter.evaluate(C.attributes)){var G=this.layer&&this.layer.features||[];var V,M,A;var J=[],U=[];var D=(this.layer===this.source)&&this.mutual;var B={edge:this.edge,tolerance:this.tolerance,mutual:D};var I=[C.geometry];var L,E;var O,N;for(var S=0,T=G.length;S<T;++S){L=G[S];if(this.isEligible(L)){E=[L.geometry];for(var R=0;R<I.length;++R){O=I[R];for(var P=0;P<E.length;++P){V=E[P];if(O.getBounds().intersectsBounds(V.getBounds())){M=O.split(V,B);if(M){A=this.events.triggerEvent("beforesplit",{source:C,target:L});if(A!==false){if(D){N=M[0];if(N.length>1){N.unshift(R,1);Array.prototype.splice.apply(I,N);R+=N.length-3}M=M[1]}if(M.length>1){M.unshift(P,1);Array.prototype.splice.apply(E,M);P+=M.length-3}}}}}}if(E&&E.length>1){this.geomsToFeatures(L,E);this.events.triggerEvent("split",{original:L,features:E});Array.prototype.push.apply(J,E);U.push(L);F=true}}}if(I&&I.length>1){this.geomsToFeatures(C,I);this.events.triggerEvent("split",{original:C,features:I});Array.prototype.push.apply(J,I);U.push(C);H=true}if(H||F){if(this.deferDelete){var K,Q=[];for(var S=0,T=U.length;S<T;++S){K=U[S];if(K.state===OpenLayers.State.INSERT){Q.push(K)}else{K.state=OpenLayers.State.DELETE;this.layer.drawFeature(K)}}this.layer.destroyFeatures(Q,{silent:true});for(var S=0,T=J.length;S<T;++S){J[S].state=OpenLayers.State.INSERT}}else{this.layer.destroyFeatures(U,{silent:true})}this.layer.addFeatures(J,{silent:true});this.events.triggerEvent("aftersplit",{source:C,features:J})}}return H},geomsToFeatures:function(C,D){var F=C.clone();delete F.geometry;var E;for(var B=0,A=D.length;B<A;++B){E=F.clone();E.geometry=D[B];E.state=OpenLayers.State.INSERT;D[B]=E}},destroy:function(){if(this.active){this.deactivate()}OpenLayers.Control.prototype.destroy.call(this)},CLASS_NAME:"OpenLayers.Control.Split"});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(I,F,B,K){var C=Math.PI*((1/B)-(1/2));if(K){C+=(K/180)*Math.PI}var A,H,G;var J=[];for(var E=0;E<B;++E){A=C+(E*2*Math.PI/B);H=I.x+(F*Math.cos(A));G=I.y+(F*Math.sin(A));J.push(new OpenLayers.Geometry.Point(H,G))}var D=new OpenLayers.Geometry.LinearRing(J);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(M){var L=this.getElementsByTagNameNS(M,this.georssns,"point");var G=this.getElementsByTagNameNS(M,this.geons,"lat");var A=this.getElementsByTagNameNS(M,this.geons,"long");var O=this.getElementsByTagNameNS(M,this.georssns,"line");var J=this.getElementsByTagNameNS(M,this.georssns,"polygon");var C=this.getElementsByTagNameNS(M,this.georssns,"where");var D=this.getElementsByTagNameNS(M,this.georssns,"box");if(L.length>0||(G.length>0&&A.length>0)){var K;if(L.length>0){K=OpenLayers.String.trim(L[0].firstChild.nodeValue).split(/\s+/);if(K.length!=2){K=OpenLayers.String.trim(L[0].firstChild.nodeValue).split(/\s*,\s*/)}}else{K=[parseFloat(G[0].firstChild.nodeValue),parseFloat(A[0].firstChild.nodeValue)]}var H=new OpenLayers.Geometry.Point(parseFloat(K[1]),parseFloat(K[0]))}else{if(O.length>0){var I=OpenLayers.String.trim(this.concatChildValues(O[0])).split(/\s+/);var E=[];var L;for(var B=0,F=I.length;B<F;B+=2){L=new OpenLayers.Geometry.Point(parseFloat(I[B+1]),parseFloat(I[B]));E.push(L)}H=new OpenLayers.Geometry.LineString(E)}else{if(J.length>0){var I=OpenLayers.String.trim(this.concatChildValues(J[0])).split(/\s+/);var E=[];var L;for(var B=0,F=I.length;B<F;B+=2){L=new OpenLayers.Geometry.Point(parseFloat(I[B+1]),parseFloat(I[B]));E.push(L)}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 N=this.gmlParser.parseFeature(C[0]);H=N.geometry}else{if(D.length>0){var I=OpenLayers.String.trim(D[0].firstChild.nodeValue).split(/\s+/);var E=[];var L;if(I.length>3){L=new OpenLayers.Geometry.Point(parseFloat(I[1]),parseFloat(I[0]));E.push(L);L=new OpenLayers.Geometry.Point(parseFloat(I[1]),parseFloat(I[2]));E.push(L);L=new OpenLayers.Geometry.Point(parseFloat(I[3]),parseFloat(I[2]));E.push(L);L=new OpenLayers.Geometry.Point(parseFloat(I[3]),parseFloat(I[0]));E.push(L);L=new OpenLayers.Geometry.Point(parseFloat(I[1]),parseFloat(I[0]));E.push(L)}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(H){var D=this.createGeometryFromItem(H);var F=this.getChildValue(H,"*","title",this.featureTitle);var G=this.getChildValue(H,"*","description",this.getChildValue(H,"*","content",this.getChildValue(H,"*","summary",this.featureDescription)));var E=this.getChildValue(H,"*","link");if(!E){try{E=this.getElementsByTagNameNS(H,"*","link")[0].getAttribute("href")}catch(C){E=null}}var A=this.getChildValue(H,"*","id",null);var B={title:F,description:G,link:E};var I=new OpenLayers.Feature.Vector(D,B);I.fid=A;return I},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.Format.KML=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{kml:"http://www.opengis.net/kml/2.2",gx:"http://www.google.com/kml/ext/2.2"},kmlns:"http://earth.google.com/kml/2.0",placemarksDesc:"No description available",foldersName:"OpenLayers export",foldersDesc:"Exported on "+new Date(),extractAttributes:true,extractStyles:false,extractTracks:false,trackAttributes:null,internalns:null,features:null,styles:null,styleBaseUrl:"",fetched:null,maxDepth:0,initialize:function(A){this.regExes={trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g),kmlColor:(/(\w{2})(\w{2})(\w{2})(\w{2})/),kmlIconPalette:(/root:\/\/icons\/palette-(\d+)(\.\w+)/),straightBracket:(/\$\[(.*?)\]/g)};this.externalProjection=new OpenLayers.Projection("EPSG:4326");OpenLayers.Format.XML.prototype.initialize.apply(this,[A])},read:function(B){this.features=[];this.styles={};this.fetched={};var A={depth:0,styleBaseUrl:this.styleBaseUrl};return this.parseData(B,A)},parseData:function(G,C){if(typeof G=="string"){G=OpenLayers.Format.XML.prototype.read.apply(this,[G])}var E=["Link","NetworkLink","Style","StyleMap","Placemark"];for(var D=0,A=E.length;D<A;++D){var F=E[D];var B=this.getElementsByTagNameNS(G,"*",F);if(B.length==0){continue}switch(F.toLowerCase()){case"link":case"networklink":this.parseLinks(B,C);break;case"style":if(this.extractStyles){this.parseStyles(B,C)}break;case"stylemap":if(this.extractStyles){this.parseStyleMaps(B,C)}break;case"placemark":this.parseFeatures(B,C);break}}return this.features},parseLinks:function(C,D){if(D.depth>=this.maxDepth){return false}var G=OpenLayers.Util.extend({},D);G.depth++;for(var E=0,A=C.length;E<A;E++){var B=this.parseProperty(C[E],"*","href");if(B&&!this.fetched[B]){this.fetched[B]=true;var F=this.fetchLink(B);if(F){this.parseData(F,G)}}}},fetchLink:function(A){var B=OpenLayers.Request.GET({url:A,async:false});if(B){return B.responseText}},parseStyles:function(B,C){for(var E=0,A=B.length;E<A;E++){var F=this.parseStyle(B[E]);if(F){var D=(C.styleBaseUrl||"")+"#"+F.id;this.styles[D]=F}}},parseKmlColor:function(B){var A=null;if(B){var C=B.match(this.regExes.kmlColor);if(C){A={color:"#"+C[4]+C[3]+C[2],opacity:parseInt(C[1],16)/255}}}return A},parseStyle:function(U){var c={};var O=["LineStyle","PolyStyle","IconStyle","BalloonStyle","LabelStyle"];var E,f,G,D;for(var Z=0,b=O.length;Z<b;++Z){E=O[Z];styleTypeNode=this.getElementsByTagNameNS(U,"*",E)[0];if(!styleTypeNode){continue}switch(E.toLowerCase()){case"linestyle":var C=this.parseProperty(styleTypeNode,"*","color");var W=this.parseKmlColor(C);if(W){c.strokeColor=W.color;c.strokeOpacity=W.opacity}var T=this.parseProperty(styleTypeNode,"*","width");if(T){c.strokeWidth=T}break;case"polystyle":var C=this.parseProperty(styleTypeNode,"*","color");var W=this.parseKmlColor(C);if(W){c.fillOpacity=W.opacity;c.fillColor=W.color}var X=this.parseProperty(styleTypeNode,"*","fill");if(X=="0"){c.fillColor="none"}var H=this.parseProperty(styleTypeNode,"*","outline");if(H=="0"){c.strokeWidth="0"}break;case"iconstyle":var j=parseFloat(this.parseProperty(styleTypeNode,"*","scale")||1);var T=32*j;var R=32*j;var g=this.getElementsByTagNameNS(styleTypeNode,"*","Icon")[0];if(g){var Y=this.parseProperty(g,"*","href");if(Y){var N=this.parseProperty(g,"*","w");var a=this.parseProperty(g,"*","h");var F="http://maps.google.com/mapfiles/kml";if(OpenLayers.String.startsWith(Y,F)&&!N&&!a){N=64;a=64;j=j/2}N=N||a;a=a||N;if(N){T=parseInt(N)*j}if(a){R=parseInt(a)*j}var B=Y.match(this.regExes.kmlIconPalette);if(B){var d=B[1];var Q=B[2];var M=this.parseProperty(g,"*","x");var L=this.parseProperty(g,"*","y");var K=M?M/32:0;var J=L?(7-L/32):7;var I=J*8+K;Y="http://maps.google.com/mapfiles/kml/pal"+d+"/icon"+I+Q}c.graphicOpacity=1;c.externalGraphic=Y}}var P=this.getElementsByTagNameNS(styleTypeNode,"*","hotSpot")[0];if(P){var M=parseFloat(P.getAttribute("x"));var L=parseFloat(P.getAttribute("y"));var V=P.getAttribute("xunits");if(V=="pixels"){c.graphicXOffset=-M*j}else{if(V=="insetPixels"){c.graphicXOffset=-T+(M*j)}else{if(V=="fraction"){c.graphicXOffset=-T*M}}}var e=P.getAttribute("yunits");if(e=="pixels"){c.graphicYOffset=-R+(L*j)+1}else{if(e=="insetPixels"){c.graphicYOffset=-(L*j)+1}else{if(e=="fraction"){c.graphicYOffset=-R*(1-L)+1}}}}c.graphicWidth=T;c.graphicHeight=R;break;case"balloonstyle":var A=OpenLayers.Util.getXmlNodeValue(styleTypeNode);if(A){c.balloonStyle=A.replace(this.regExes.straightBracket,"${$1}")}break;case"labelstyle":var C=this.parseProperty(styleTypeNode,"*","color");var W=this.parseKmlColor(C);if(W){c.fontColor=W.color;c.fontOpacity=W.opacity}break;default:}}if(!c.strokeColor&&c.fillColor){c.strokeColor=c.fillColor}var S=U.getAttribute("id");if(S&&c){c.id=S}return c},parseStyleMaps:function(A,L){for(var G=0,H=A.length;G<H;G++){var D=A[G];var C=this.getElementsByTagNameNS(D,"*","Pair");var B=D.getAttribute("id");for(var F=0,K=C.length;F<K;F++){var E=C[F];var J=this.parseProperty(E,"*","key");var I=this.parseProperty(E,"*","styleUrl");if(I&&J=="normal"){this.styles[(L.styleBaseUrl||"")+"#"+B]=this.styles[(L.styleBaseUrl||"")+I]}if(I&&J=="highlight"){}}}},parseFeatures:function(B,L){var F=[];for(var G=0,H=B.length;G<H;G++){var C=B[G];var K=this.parseFeature.apply(this,[C]);if(K){if(this.extractStyles&&K.attributes&&K.attributes.styleUrl){K.style=this.getStyle(K.attributes.styleUrl,L)}if(this.extractStyles){var J=this.getElementsByTagNameNS(C,"*","Style")[0];if(J){var E=this.parseStyle(J);if(E){K.style=OpenLayers.Util.extend(K.style,E)}}}if(this.extractTracks){var I=this.getElementsByTagNameNS(C,this.namespaces.gx,"Track");if(I&&I.length>0){var D=I[0];var A={features:[],feature:K};this.readNode(D,A);if(A.features.length>0){F.push.apply(F,A.features)}}}else{F.push(K)}}else{throw"Bad Placemark: "+G}}this.features=this.features.concat(F)},readers:{kml:{when:function(B,A){A.whens.push(OpenLayers.Date.parse(this.getChildValue(B)))},_trackPointAttribute:function(C,A){var B=C.nodeName.split(":").pop();A.attributes[B].push(this.getChildValue(C))}},gx:{Track:function(C,B){var E={whens:[],points:[],angles:[]};if(this.trackAttributes){var A;E.attributes={};for(var F=0,K=this.trackAttributes.length;F<K;++F){A=this.trackAttributes[F];E.attributes[A]=[];if(!(A in this.readers.kml)){this.readers.kml[A]=this.readers.kml._trackPointAttribute}}}this.readChildNodes(C,E);if(E.whens.length!==E.points.length){throw new Error("gx:Track with unequal number of when ("+E.whens.length+") and gx:coord ("+E.points.length+") elements.")}var I=E.angles.length>0;if(I&&E.whens.length!==E.angles.length){throw new Error("gx:Track with unequal number of when ("+E.whens.length+") and gx:angles ("+E.angles.length+") elements.")}var L,J,H;for(var F=0,K=E.whens.length;F<K;++F){L=B.feature.clone();L.fid=B.feature.fid||B.feature.id;J=E.points[F];L.geometry=J;if("z" in J){L.attributes.altitude=J.z}if(this.internalProjection&&this.externalProjection){L.geometry.transform(this.externalProjection,this.internalProjection)}if(this.trackAttributes){for(var D=0,G=this.trackAttributes.length;D<G;++D){L.attributes[A]=E.attributes[this.trackAttributes[D]][F]}}L.attributes.when=E.whens[F];L.attributes.trackId=B.feature.id;if(I){H=E.angles[F];L.attributes.heading=parseFloat(H[0]);L.attributes.tilt=parseFloat(H[1]);L.attributes.roll=parseFloat(H[2])}B.features.push(L)}},coord:function(C,B){var E=this.getChildValue(C);var D=E.replace(this.regExes.trimSpace,"").split(/\s+/);var A=new OpenLayers.Geometry.Point(D[0],D[1]);if(D.length>2){A.z=parseFloat(D[2])}B.points.push(A)},angles:function(B,A){var D=this.getChildValue(B);var C=D.replace(this.regExes.trimSpace,"").split(/\s+/);A.angles.push(C)}}},parseFeature:function(B){var C=["MultiGeometry","Polygon","LineString","Point"];var I,E,J,A;for(var G=0,H=C.length;G<H;++G){I=C[G];this.internalns=B.namespaceURI?B.namespaceURI:this.kmlns;E=this.getElementsByTagNameNS(B,this.internalns,I);if(E.length>0){var A=this.parseGeometry[I.toLowerCase()];if(A){J=A.apply(this,[E[0]]);if(this.internalProjection&&this.externalProjection){J.transform(this.externalProjection,this.internalProjection)}}else{OpenLayers.Console.error(OpenLayers.i18n("unsupportedGeometryType",{geomType:I}))}break}}var F;if(this.extractAttributes){F=this.parseAttributes(B)}var K=new OpenLayers.Feature.Vector(J,F);var D=B.getAttribute("id")||B.getAttribute("name");if(D!=null){K.fid=D}return K},getStyle:function(B,A){var C=OpenLayers.Util.removeTail(B);var F=OpenLayers.Util.extend({},A);F.depth++;F.styleBaseUrl=C;if(!this.styles[B]&&!OpenLayers.String.startsWith(B,"#")&&F.depth<=this.maxDepth&&!this.fetched[C]){var E=this.fetchLink(C);if(E){this.parseData(E,F)}}var D=OpenLayers.Util.extend({},this.styles[B]);return D},parseGeometry:{point:function(D){var C=this.getElementsByTagNameNS(D,this.internalns,"coordinates");var E=[];if(C.length>0){var B=C[0].firstChild.nodeValue;B=B.replace(this.regExes.removeSpace,"");E=B.split(",")}var A=null;if(E.length>1){if(E.length==2){E[2]=null}A=new OpenLayers.Geometry.Point(E[0],E[1],E[2])}else{throw"Bad coordinate string: "+B}return A},linestring:function(C,E){var D=this.getElementsByTagNameNS(C,this.internalns,"coordinates");var K=null;if(D.length>0){var B=this.getChildValue(D[0]);B=B.replace(this.regExes.trimSpace,"");B=B.replace(this.regExes.trimComma,",");var A=B.split(this.regExes.splitSpace);var H=A.length;var J=new Array(H);var I,G;for(var F=0;F<H;++F){I=A[F].split(",");G=I.length;if(G>1){if(I.length==2){I[2]=null}J[F]=new OpenLayers.Geometry.Point(I[0],I[1],I[2])}else{throw"Bad LineString point coordinates: "+A[F]}}if(H){if(E){K=new OpenLayers.Geometry.LinearRing(J)}else{K=new OpenLayers.Geometry.LineString(J)}}else{throw"Bad LineString coordinates: "+B}}return K},polygon:function(F){var C=this.getElementsByTagNameNS(F,this.internalns,"LinearRing");var G=C.length;var E=new Array(G);if(G>0){var B;for(var D=0,A=C.length;D<A;++D){B=this.parseGeometry.linestring.apply(this,[C[D],true]);if(B){E[D]=B}else{throw"Bad LinearRing geometry: "+D}}}return new OpenLayers.Geometry.Polygon(E)},multigeometry:function(E){var H,G;var F=[];var C=E.childNodes;for(var B=0,A=C.length;B<A;++B){H=C[B];if(H.nodeType==1){var D=(H.prefix)?H.nodeName.split(":")[1]:H.nodeName;var G=this.parseGeometry[D.toLowerCase()];if(G){F.push(G.apply(this,[H]))}}}return new OpenLayers.Geometry.Collection(F)}},parseAttributes:function(D){var F={};var H=D.getElementsByTagName("ExtendedData");if(H.length){F=this.parseExtendedData(H[0])}var B,M,L;var C=D.childNodes;for(var I=0,J=C.length;I<J;++I){B=C[I];if(B.nodeType==1){M=B.childNodes;if(M.length>=1&&M.length<=3){var L;switch(M.length){case 1:L=M[0];break;case 2:var G=M[0];var E=M[1];L=(G.nodeType==3||G.nodeType==4)?G:E;break;case 3:default:L=M[1];break}if(L.nodeType==3||L.nodeType==4){var A=(B.prefix)?B.nodeName.split(":")[1]:B.nodeName;var K=OpenLayers.Util.getXmlNodeValue(L);if(K){K=K.replace(this.regExes.trimSpace,"");F[A]=K}}}}}return F},parseExtendedData:function(B){var D={};var F,H,E,J;var C=B.getElementsByTagName("Data");for(F=0,H=C.length;F<H;F++){E=C[F];J=E.getAttribute("name");var G={};var K=E.getElementsByTagName("value");if(K.length){G.value=this.getChildValue(K[0])}var A=E.getElementsByTagName("displayName");if(A.length){G.displayName=this.getChildValue(A[0])}D[J]=G}var I=B.getElementsByTagName("SimpleData");for(F=0,H=I.length;F<H;F++){var G={};E=I[F];J=E.getAttribute("name");G.value=this.getChildValue(E);G.displayName=J;D[J]=G}return D},parseProperty:function(C,D,B){var E;var A=this.getElementsByTagNameNS(C,D,B);try{E=OpenLayers.Util.getXmlNodeValue(A[0])}catch(F){E=null}return E},write:function(D){if(!(D instanceof Array)){D=[D]}var B=this.createElementNS(this.kmlns,"kml");var E=this.createFolderXML();for(var C=0,A=D.length;C<A;++C){E.appendChild(this.createPlacemarkXML(D[C]))}B.appendChild(E);return OpenLayers.Format.XML.prototype.write.apply(this,[B])},createFolderXML:function(){var C=this.createElementNS(this.kmlns,"Folder");if(this.foldersName){var E=this.createElementNS(this.kmlns,"name");var D=this.createTextNode(this.foldersName);E.appendChild(D);C.appendChild(E)}if(this.foldersDesc){var A=this.createElementNS(this.kmlns,"description");var B=this.createTextNode(this.foldersDesc);A.appendChild(B);C.appendChild(A)}return C},createPlacemarkXML:function(E){var G=this.createElementNS(this.kmlns,"name");var C=E.style&&E.style.label?E.style.label:E.attributes.name||E.id;G.appendChild(this.createTextNode(C));var D=this.createElementNS(this.kmlns,"description");var F=E.attributes.description||this.placemarksDesc;D.appendChild(this.createTextNode(F));var B=this.createElementNS(this.kmlns,"Placemark");if(E.fid!=null){B.setAttribute("id",E.fid)}B.appendChild(G);B.appendChild(D);var A=this.buildGeometryNode(E.geometry);B.appendChild(A);return B},buildGeometryNode:function(E){if(this.internalProjection&&this.externalProjection){E=E.clone();E.transform(this.internalProjection,this.externalProjection)}var C=E.CLASS_NAME;var B=C.substring(C.lastIndexOf(".")+1);var A=this.buildGeometry[B.toLowerCase()];var D=null;if(A){D=A.apply(this,[E])}return D},buildGeometry:{point:function(B){var A=this.createElementNS(this.kmlns,"Point");A.appendChild(this.buildCoordinatesNode(B));return A},multipoint:function(A){return this.buildGeometry.collection.apply(this,[A])},linestring:function(B){var A=this.createElementNS(this.kmlns,"LineString");A.appendChild(this.buildCoordinatesNode(B));return A},multilinestring:function(A){return this.buildGeometry.collection.apply(this,[A])},linearring:function(B){var A=this.createElementNS(this.kmlns,"LinearRing");A.appendChild(this.buildCoordinatesNode(B));return A},polygon:function(H){var B=this.createElementNS(this.kmlns,"Polygon");var G=H.components;var E,F,D;for(var C=0,A=G.length;C<A;++C){D=(C==0)?"outerBoundaryIs":"innerBoundaryIs";E=this.createElementNS(this.kmlns,D);F=this.buildGeometry.linearring.apply(this,[G[C]]);E.appendChild(F);B.appendChild(E)}return B},multipolygon:function(A){return this.buildGeometry.collection.apply(this,[A])},collection:function(D){var B=this.createElementNS(this.kmlns,"MultiGeometry");var E;for(var C=0,A=D.components.length;C<A;++C){E=this.buildGeometryNode.apply(this,[D.components[C]]);if(E){B.appendChild(E)}}return B}},buildCoordinatesNode:function(E){var A=this.createElementNS(this.kmlns,"coordinates");var I;var H=E.components;if(H){var G;var F=H.length;var C=new Array(F);for(var D=0;D<F;++D){G=H[D];C[D]=G.x+","+G.y}I=C.join(" ")}else{I=E.x+","+E.y}var B=this.createTextNode(I);A.appendChild(B);return A},CLASS_NAME:"OpenLayers.Format.KML"});OpenLayers.Format.OSM=OpenLayers.Class(OpenLayers.Format.XML,{checkTags:false,interestingTagsExclude:null,areaTags:null,initialize:function(A){var D={interestingTagsExclude:["source","source_ref","source:ref","history","attribution","created_by"],areaTags:["area","building","leisure","tourism","ruins","historic","landuse","military","natural","sport"]};D=OpenLayers.Util.extend(D,A);var E={};for(var B=0;B<D.interestingTagsExclude.length;B++){E[D.interestingTagsExclude[B]]=true}D.interestingTagsExclude=E;var C={};for(var B=0;B<D.areaTags.length;B++){C[D.areaTags[B]]=true}D.areaTags=C;this.externalProjection=new OpenLayers.Projection("EPSG:4326");OpenLayers.Format.XML.prototype.initialize.apply(this,[D])},read:function(L){if(typeof L=="string"){L=OpenLayers.Format.XML.prototype.read.apply(this,[L])}var B=this.getNodes(L);var M=this.getWays(L);var G=new Array(M.length);for(var F=0;F<M.length;F++){var J=new Array(M[F].nodes.length);var A=this.isWayArea(M[F])?1:0;for(var E=0;E<M[F].nodes.length;E++){var C=B[M[F].nodes[E]];var K=new OpenLayers.Geometry.Point(C.lon,C.lat);K.osm_id=parseInt(M[F].nodes[E]);J[E]=K;C.used=true}var I=null;if(A){I=new OpenLayers.Geometry.Polygon(new OpenLayers.Geometry.LinearRing(J))}else{I=new OpenLayers.Geometry.LineString(J)}if(this.internalProjection&&this.externalProjection){I.transform(this.externalProjection,this.internalProjection)}var H=new OpenLayers.Feature.Vector(I,M[F].tags);H.osm_id=parseInt(M[F].id);H.fid="way."+H.osm_id;G[F]=H}for(var D in B){var C=B[D];if(!C.used||this.checkTags){var O=null;if(this.checkTags){var N=this.getTags(C.node,true);if(C.used&&!N[1]){continue}O=N[0]}else{O=this.getTags(C.node)}var H=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(C.lon,C.lat),O);if(this.internalProjection&&this.externalProjection){H.geometry.transform(this.externalProjection,this.internalProjection)}H.osm_id=parseInt(D);H.fid="node."+H.osm_id;G.push(H)}C.node=null}return G},getNodes:function(E){var D=E.getElementsByTagName("node");var A={};for(var B=0;B<D.length;B++){var C=D[B];var F=C.getAttribute("id");A[F]={lat:C.getAttribute("lat"),lon:C.getAttribute("lon"),node:C}}return A},getWays:function(G){var F=G.getElementsByTagName("way");var H=[];for(var D=0;D<F.length;D++){var B=F[D];var C={id:B.getAttribute("id")};C.tags=this.getTags(B);var E=B.getElementsByTagName("nd");C.nodes=new Array(E.length);for(var A=0;A<E.length;A++){C.nodes[A]=E[A].getAttribute("ref")}H.push(C)}return H},getTags:function(E,G){var A=E.getElementsByTagName("tag");var C={};var F=false;for(var B=0;B<A.length;B++){var D=A[B].getAttribute("k");C[D]=A[B].getAttribute("v");if(G){if(!this.interestingTagsExclude[D]){F=true}}}return G?[C,F]:C},isWayArea:function(B){var A=false;var D=false;if(B.nodes[0]==B.nodes[B.nodes.length-1]){A=true}if(this.checkTags){for(var C in B.tags){if(this.areaTags[C]){D=true;break}}}return A&&(this.checkTags?D:true)},write:function(D){if(!(D instanceof Array)){D=[D]}this.osm_id=1;this.created_nodes={};var E=this.createElementNS(null,"osm");E.setAttribute("version","0.5");E.setAttribute("generator","OpenLayers "+OpenLayers.VERSION_NUMBER);for(var C=D.length-1;C>=0;C--){var A=this.createFeatureNodes(D[C]);for(var B=0;B<A.length;B++){E.appendChild(A[B])}}return OpenLayers.Format.XML.prototype.write.apply(this,[E])},createFeatureNodes:function(C){var B=[];var E=C.geometry.CLASS_NAME;var D=E.substring(E.lastIndexOf(".")+1);D=D.toLowerCase();var A=this.createXML[D];if(A){B=A.apply(this,[C])}return B},createXML:{point:function(A){var E=null;var C=A.geometry?A.geometry:A;var D=false;if(A.osm_id){E=A.osm_id;if(this.created_nodes[E]){D=true}}else{E=-this.osm_id;this.osm_id++}if(D){B=this.created_nodes[E]}else{var B=this.createElementNS(null,"node")}this.created_nodes[E]=B;B.setAttribute("id",E);B.setAttribute("lon",C.x);B.setAttribute("lat",C.y);if(A.attributes){this.serializeTags(A,B)}this.setState(A,B);return D?[]:[B]},linestring:function(D){var A=[];var H=D.geometry;if(D.osm_id){id=D.osm_id}else{id=-this.osm_id;this.osm_id++}var B=this.createElementNS(null,"way");B.setAttribute("id",id);for(var C=0;C<H.components.length;C++){var F=this.createXML.point.apply(this,[H.components[C]]);if(F.length){F=F[0];var E=F.getAttribute("id");A.push(F)}else{E=H.components[C].osm_id;F=this.created_nodes[E]}this.setState(D,F);var G=this.createElementNS(null,"nd");G.setAttribute("ref",E);B.appendChild(G)}this.serializeTags(D,B);A.push(B);return A},polygon:function(B){var A=OpenLayers.Util.extend({area:"yes"},B.attributes);var C=new OpenLayers.Feature.Vector(B.geometry.components[0],A);C.osm_id=B.osm_id;return this.createXML.linestring.apply(this,[C])}},serializeTags:function(C,D){for(var B in C.attributes){var A=this.createElementNS(null,"tag");A.setAttribute("k",B);A.setAttribute("v",C.attributes[B]);D.appendChild(A)}},setState:function(A,B){if(A.state){var C=null;switch(A.state){case OpenLayers.State.UPDATE:C="modify";case OpenLayers.State.DELETE:C="delete"}if(C){B.setAttribute("action",C)}}},CLASS_NAME:"OpenLayers.Format.OSM"});OpenLayers.Geometry.MultiPolygon=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.Polygon"],initialize:function(A){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments)},CLASS_NAME:"OpenLayers.Geometry.MultiPolygon"});OpenLayers.Handler.Polygon=OpenLayers.Class(OpenLayers.Handler.Path,{polygon:null,initialize:function(C,B,A){OpenLayers.Handler.Path.prototype.initialize.apply(this,arguments)},createFeature:function(A){var B=this.control.map.getLonLatFromPixel(A);this.point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(B.lon,B.lat));this.line=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LinearRing([this.point.geometry]));this.polygon=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon([this.line.geometry]));this.callback("create",[this.point.geometry,this.getSketch()]);this.point.geometry.clearBounds();this.layer.addFeatures([this.polygon,this.point],{silent:true})},destroyFeature:function(){OpenLayers.Handler.Path.prototype.destroyFeature.apply(this);this.polygon=null},drawFeature:function(){this.layer.drawFeature(this.polygon,this.style);this.layer.drawFeature(this.point,this.style)},getSketch:function(){return this.polygon},getGeometry:function(){var A=this.polygon&&this.polygon.geometry;if(A&&this.multi){A=new OpenLayers.Geometry.MultiPolygon([A])}return A},dblclick:function(A){if(!this.freehandMode(A)){var B=this.line.geometry.components.length-2;this.line.geometry.removeComponent(this.line.geometry.components[B]);this.removePoint();this.finalize()}return false},CLASS_NAME:"OpenLayers.Handler.Polygon"});OpenLayers.Control.EditingToolbar=OpenLayers.Class(OpenLayers.Control.Panel,{initialize:function(C,B){OpenLayers.Control.Panel.prototype.initialize.apply(this,[B]);this.addControls([new OpenLayers.Control.Navigation()]);var A=[new OpenLayers.Control.DrawFeature(C,OpenLayers.Handler.Point,{displayClass:"olControlDrawFeaturePoint"}),new OpenLayers.Control.DrawFeature(C,OpenLayers.Handler.Path,{displayClass:"olControlDrawFeaturePath"}),new OpenLayers.Control.DrawFeature(C,OpenLayers.Handler.Polygon,{displayClass:"olControlDrawFeaturePolygon"})];this.addControls(A)},draw:function(){var A=OpenLayers.Control.Panel.prototype.draw.apply(this,arguments);this.activateControl(this.controls[0]);return A},CLASS_NAME:"OpenLayers.Control.EditingToolbar"});OpenLayers.Control.SLDSelect=OpenLayers.Class(OpenLayers.Control,{EVENT_TYPES:["selected"],clearOnDeactivate:false,layers:null,callbacks:null,selectionSymbolizer:{Polygon:{fillColor:"#FF0000",stroke:false},Line:{strokeColor:"#FF0000",strokeWidth:2},Point:{graphicName:"square",fillColor:"#FF0000",pointRadius:5}},layerOptions:null,handlerOptions:null,sketchStyle:null,wfsCache:{},layerCache:{},initialize:function(B,A){this.EVENT_TYPES=OpenLayers.Control.SLDSelect.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);OpenLayers.Control.prototype.initialize.apply(this,[A]);this.callbacks=OpenLayers.Util.extend({done:this.select,click:this.select},this.callbacks);this.handlerOptions=this.handlerOptions||{};this.layerOptions=OpenLayers.Util.applyDefaults(this.layerOptions,{displayInLayerSwitcher:false});if(this.sketchStyle){this.handlerOptions.layerOptions=OpenLayers.Util.applyDefaults(this.handlerOptions.layerOptions,{styleMap:new OpenLayers.StyleMap({"default":this.sketchStyle})})}this.handler=new B(this,this.callbacks,this.handlerOptions)},destroy:function(){for(var A in this.layerCache){delete this.layerCache[A]}for(var A in this.wfsCache){delete this.wfsCache[A]}OpenLayers.Control.prototype.destroy.apply(this,arguments)},coupleLayerVisiblity:function(A){this.setVisibility(A.object.getVisibility())},createSelectionLayer:function(B){var A;if(!this.layerCache[B.id]){A=new OpenLayers.Layer.WMS.Post(B.name,B.url,B.params,OpenLayers.Util.applyDefaults(this.layerOptions,B.getOptions()));this.layerCache[B.id]=A;if(this.layerOptions.displayInLayerSwitcher===false){B.events.on({visibilitychanged:this.coupleLayerVisiblity,scope:A})}this.map.addLayer(A)}else{A=this.layerCache[B.id]}return A},createSLD:function(F,D,G){var A={version:"1.0.0",namedLayers:{}};var I=[F.params.LAYERS].join(",").split(",");for(var E=0,H=I.length;E<H;E++){var B=I[E];A.namedLayers[B]={name:B,userStyles:[]};var K=this.selectionSymbolizer;var J=G[E];if(J.type.indexOf("Polygon")>=0){K={Polygon:this.selectionSymbolizer.Polygon}}else{if(J.type.indexOf("LineString")>=0){K={Line:this.selectionSymbolizer.Line}}else{if(J.type.indexOf("Point")>=0){K={Point:this.selectionSymbolizer.Point}}}}var C=D[E];A.namedLayers[B].userStyles.push({name:"default",rules:[new OpenLayers.Rule({symbolizer:K,filter:C,maxScaleDenominator:F.options.minScale})]})}return new OpenLayers.Format.SLD().write(A)},parseDescribeLayer:function(C){var G=new OpenLayers.Format.WMSDescribeLayer();var H=C.responseXML;if(!H||!H.documentElement){H=C.responseText}var B=G.read(H);var F=[];var A=null;for(var D=0,E=B.length;D<E;D++){if(B[D].owsType=="WFS"){F.push(B[D].typeName);A=B[D].owsURL}}var I={url:A,params:{SERVICE:"WFS",TYPENAME:F.toString(),REQUEST:"DescribeFeatureType",VERSION:"1.0.0"},callback:function(K){var M=new OpenLayers.Format.WFSDescribeFeatureType();var L=K.responseXML;if(!L||!L.documentElement){L=K.responseText}var J=M.read(L);this.control.wfsCache[this.layer.id]=J;this.control._queue&&this.control.applySelection()},scope:this};OpenLayers.Request.GET(I)},getGeometryAttributes:function(D){var K=[];var A=this.wfsCache[D.id];for(var C=0,E=A.featureTypes.length;C<E;C++){var H=A.featureTypes[C];var F=H.properties;for(var B=0,J=F.length;B<J;B++){var I=F[B];var G=I.type;if((G.indexOf("LineString")>=0)||(G.indexOf("GeometryAssociationType")>=0)||(G.indexOf("GeometryPropertyType")>=0)||(G.indexOf("Point")>=0)||(G.indexOf("Polygon")>=0)){K.push(I)}}}return K},activate:function(){var B=OpenLayers.Control.prototype.activate.call(this);if(B){for(var E=0,A=this.layers.length;E<A;E++){var D=this.layers[E];if(D&&!this.wfsCache[D.id]){var C={url:D.url,params:{SERVICE:"WMS",VERSION:D.params.VERSION,LAYERS:D.params.LAYERS,REQUEST:"DescribeLayer"},callback:this.parseDescribeLayer,scope:{layer:D,control:this}};OpenLayers.Request.GET(C)}}}return B},deactivate:function(){var F=OpenLayers.Control.prototype.deactivate.call(this);if(F){for(var E=0,A=this.layers.length;E<A;E++){var D=this.layers[E];if(D&&this.clearOnDeactivate===true){var C=this.layerCache;var B=C[D.id];if(B){D.events.un({visibilitychanged:this.coupleLayerVisiblity,scope:B});B.destroy();delete C[D.id]}}}}return F},setLayers:function(A){if(this.active){this.deactivate();this.layers=A;this.activate()}else{this.layers=A}},createFilter:function(A,C){var B=null;if(this.handler instanceof OpenLayers.Handler.RegularPolygon){if(this.handler.irregular===true){B=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.BBOX,property:A.name,value:C.getBounds()})}else{B=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.INTERSECTS,property:A.name,value:C})}}else{if(this.handler instanceof OpenLayers.Handler.Polygon){B=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.INTERSECTS,property:A.name,value:C})}else{if(this.handler instanceof OpenLayers.Handler.Path){if(A.type.indexOf("Point")>=0){B=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.DWITHIN,property:A.name,distance:this.map.getExtent().getWidth()*0.01,distanceUnits:this.map.getUnits(),value:C})}else{B=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.INTERSECTS,property:A.name,value:C})}}else{if(this.handler instanceof OpenLayers.Handler.Click){if(A.type.indexOf("Polygon")>=0){B=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.INTERSECTS,property:A.name,value:C})}else{B=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.DWITHIN,property:A.name,distance:this.map.getExtent().getWidth()*0.01,distanceUnits:this.map.getUnits(),value:C})}}}}}return B},select:function(A){this._queue=function(){for(var G=0,J=this.layers.length;G<J;G++){var H=this.layers[G];var I=this.getGeometryAttributes(H);var D=[];for(var F=0,L=I.length;F<L;F++){var M=I[F];if(M!==null){if(!(A instanceof OpenLayers.Geometry)){var K=this.map.getLonLatFromPixel(A.xy);A=new OpenLayers.Geometry.Point(K.lon,K.lat)}var C=this.createFilter(M,A);if(C!==null){D.push(C)}}}var E=this.createSelectionLayer(H);var B=this.createSLD(H,D,I);this.events.triggerEvent("selected",{layer:H,filters:D});E.mergeNewParams({SLD_BODY:B});delete this._queue}};this.applySelection()},applySelection:function(){var C=true;for(var B=0,A=this.layers.length;B<A;B++){if(!this.wfsCache[this.layers[B].id]){C=false;break}}C&&this._queue.call(this)},CLASS_NAME:"OpenLayers.Control.SLDSelect"});OpenLayers.Format.ArcXML=OpenLayers.Class(OpenLayers.Format.XML,{fontStyleKeys:["antialiasing","blockout","font","fontcolor","fontsize","fontstyle","glowing","interval","outline","printmode","shadow","transparency"],request:null,response:null,initialize:function(A){this.request=new OpenLayers.Format.ArcXML.Request();this.response=new OpenLayers.Format.ArcXML.Response();if(A){if(A.requesttype=="feature"){this.request.get_image=null;var C=this.request.get_feature.query;this.addCoordSys(C.featurecoordsys,A.featureCoordSys);this.addCoordSys(C.filtercoordsys,A.filterCoordSys);if(A.polygon){C.isspatial=true;C.spatialfilter.polygon=A.polygon}else{if(A.envelope){C.isspatial=true;C.spatialfilter.envelope={minx:0,miny:0,maxx:0,maxy:0};this.parseEnvelope(C.spatialfilter.envelope,A.envelope)}}}else{if(A.requesttype=="image"){this.request.get_feature=null;var B=this.request.get_image.properties;this.parseEnvelope(B.envelope,A.envelope);this.addLayers(B.layerlist,A.layers);this.addImageSize(B.imagesize,A.tileSize);this.addCoordSys(B.featurecoordsys,A.featureCoordSys);this.addCoordSys(B.filtercoordsys,A.filterCoordSys)}else{this.request=null}}}OpenLayers.Format.XML.prototype.initialize.apply(this,[A])},parseEnvelope:function(B,A){if(A&&A.length==4){B.minx=A[0];B.miny=A[1];B.maxx=A[2];B.maxy=A[3]}},addLayers:function(D,C){for(var B=0,A=C.length;B<A;B++){D.push(C[B])}},addImageSize:function(B,A){if(A!==null){B.width=A.w;B.height=A.h;B.printwidth=A.w;B.printheight=A.h}},addCoordSys:function(A,B){if(typeof B=="string"){A.id=parseInt(B);A.string=B}else{if(typeof B=="object"&&B.proj!==null){A.id=B.proj.srsProjNumber;A.string=B.proj.srsCode}else{A=B}}},iserror:function(C){var A=null;if(!C){A=(this.response.error!=="")}else{C=OpenLayers.Format.XML.prototype.read.apply(this,[C]);var B=C.documentElement.getElementsByTagName("ERROR");A=(B!==null&&B.length>0)}return A},read:function(F){if(typeof F=="string"){F=OpenLayers.Format.XML.prototype.read.apply(this,[F])}var A=null;if(F&&F.documentElement){if(F.documentElement.nodeName=="ARCXML"){A=F.documentElement}else{A=F.documentElement.getElementsByTagName("ARCXML")[0]}}if(!A||A.firstChild.nodeName==="parsererror"){var C,E;try{C=F.firstChild.nodeValue;E=F.firstChild.childNodes[1].firstChild.nodeValue}catch(D){}throw {message:"Error parsing the ArcXML request",error:C,source:E}}var B=this.parseResponse(A);return B},write:function(C){if(!C){C=this.request}var Q=this.createElementNS("","ARCXML");Q.setAttribute("version","1.1");var H=this.createElementNS("","REQUEST");if(C.get_image!=null){var K=this.createElementNS("","GET_IMAGE");H.appendChild(K);var J=this.createElementNS("","PROPERTIES");K.appendChild(J);var B=C.get_image.properties;if(B.featurecoordsys!=null){var O=this.createElementNS("","FEATURECOORDSYS");J.appendChild(O);if(B.featurecoordsys.id===0){O.setAttribute("string",B.featurecoordsys.string)}else{O.setAttribute("id",B.featurecoordsys.id)}}if(B.filtercoordsys!=null){var M=this.createElementNS("","FILTERCOORDSYS");J.appendChild(M);if(B.filtercoordsys.id===0){M.setAttribute("string",B.filtercoordsys.string)}else{M.setAttribute("id",B.filtercoordsys.id)}}if(B.envelope!=null){var U=this.createElementNS("","ENVELOPE");J.appendChild(U);U.setAttribute("minx",B.envelope.minx);U.setAttribute("miny",B.envelope.miny);U.setAttribute("maxx",B.envelope.maxx);U.setAttribute("maxy",B.envelope.maxy)}var S=this.createElementNS("","IMAGESIZE");J.appendChild(S);S.setAttribute("height",B.imagesize.height);S.setAttribute("width",B.imagesize.width);if(B.imagesize.height!=B.imagesize.printheight||B.imagesize.width!=B.imagesize.printwidth){S.setAttribute("printheight",B.imagesize.printheight);S.setArrtibute("printwidth",B.imagesize.printwidth)}if(B.background!=null){var A=this.createElementNS("","BACKGROUND");J.appendChild(A);A.setAttribute("color",B.background.color.r+","+B.background.color.g+","+B.background.color.b);if(B.background.transcolor!==null){A.setAttribute("transcolor",B.background.transcolor.r+","+B.background.transcolor.g+","+B.background.transcolor.b)}}if(B.layerlist!=null&&B.layerlist.length>0){var G=this.createElementNS("","LAYERLIST");J.appendChild(G);for(var P=0;P<B.layerlist.length;P++){var N=this.createElementNS("","LAYERDEF");G.appendChild(N);N.setAttribute("id",B.layerlist[P].id);N.setAttribute("visible",B.layerlist[P].visible);if(typeof B.layerlist[P].query=="object"){var F=B.layerlist[P].query;if(F.where.length<0){continue}var X=null;if(typeof F.spatialfilter=="boolean"&&F.spatialfilter){X=this.createElementNS("","SPATIALQUERY")}else{X=this.createElementNS("","QUERY")}X.setAttribute("where",F.where);if(typeof F.accuracy=="number"&&F.accuracy>0){X.setAttribute("accuracy",F.accuracy)}if(typeof F.featurelimit=="number"&&F.featurelimit<2000){X.setAttribute("featurelimit",F.featurelimit)}if(typeof F.subfields=="string"&&F.subfields!="#ALL#"){X.setAttribute("subfields",F.subfields)}if(typeof F.joinexpression=="string"&&F.joinexpression.length>0){X.setAttribute("joinexpression",F.joinexpression)}if(typeof F.jointables=="string"&&F.jointables.length>0){X.setAttribute("jointables",F.jointables)}N.appendChild(X)}if(typeof B.layerlist[P].renderer=="object"){this.addRenderer(N,B.layerlist[P].renderer)}}}}else{if(C.get_feature!=null){var K=this.createElementNS("","GET_FEATURES");K.setAttribute("outputmode","newxml");K.setAttribute("checkesc","true");if(C.get_feature.geometry){K.setAttribute("geometry",C.get_feature.geometry)}else{K.setAttribute("geometry","false")}if(C.get_feature.compact){K.setAttribute("compact",C.get_feature.compact)}if(C.get_feature.featurelimit=="number"){K.setAttribute("featurelimit",C.get_feature.featurelimit)}K.setAttribute("globalenvelope","true");H.appendChild(K);if(C.get_feature.layer!=null&&C.get_feature.layer.length>0){var V=this.createElementNS("","LAYER");V.setAttribute("id",C.get_feature.layer);K.appendChild(V)}var R=C.get_feature.query;if(R!=null){var T=null;if(R.isspatial){T=this.createElementNS("","SPATIALQUERY")}else{T=this.createElementNS("","QUERY")}K.appendChild(T);if(typeof R.accuracy=="number"){T.setAttribute("accuracy",R.accuracy)}if(R.featurecoordsys!=null){var E=this.createElementNS("","FEATURECOORDSYS");if(R.featurecoordsys.id==0){E.setAttribute("string",R.featurecoordsys.string)}else{E.setAttribute("id",R.featurecoordsys.id)}T.appendChild(E)}if(R.filtercoordsys!=null){var D=this.createElementNS("","FILTERCOORDSYS");if(R.filtercoordsys.id===0){D.setAttribute("string",R.filtercoordsys.string)}else{D.setAttribute("id",R.filtercoordsys.id)}T.appendChild(D)}if(R.buffer>0){var L=this.createElementNS("","BUFFER");L.setAttribute("distance",R.buffer);T.appendChild(L)}if(R.isspatial){var I=this.createElementNS("","SPATIALFILTER");I.setAttribute("relation",R.spatialfilter.relation);T.appendChild(I);if(R.spatialfilter.envelope){var W=this.createElementNS("","ENVELOPE");W.setAttribute("minx",R.spatialfilter.envelope.minx);W.setAttribute("miny",R.spatialfilter.envelope.miny);W.setAttribute("maxx",R.spatialfilter.envelope.maxx);W.setAttribute("maxy",R.spatialfilter.envelope.maxy);I.appendChild(W)}else{if(typeof R.spatialfilter.polygon=="object"){I.appendChild(this.writePolygonGeometry(R.spatialfilter.polygon))}}}if(R.where!=null&&R.where.length>0){T.setAttribute("where",R.where)}}}}Q.appendChild(H);return OpenLayers.Format.XML.prototype.write.apply(this,[Q])},addGroupRenderer:function(B,A){var E=this.createElementNS("","GROUPRENDERER");B.appendChild(E);for(var C=0;C<A.length;C++){var D=A[C];this.addRenderer(E,D)}},addRenderer:function(C,B){if(B instanceof Array){this.addGroupRenderer(C,B)}else{var A=this.createElementNS("",B.type.toUpperCase()+"RENDERER");C.appendChild(A);if(A.tagName=="VALUEMAPRENDERER"){this.addValueMapRenderer(A,B)}else{if(A.tagName=="VALUEMAPLABELRENDERER"){this.addValueMapLabelRenderer(A,B)}else{if(A.tagName=="SIMPLELABELRENDERER"){this.addSimpleLabelRenderer(A,B)}else{if(A.tagName=="SCALEDEPENDENTRENDERER"){this.addScaleDependentRenderer(A,B)}}}}}},addScaleDependentRenderer:function(A,B){if(typeof B.lower=="string"||typeof B.lower=="number"){A.setAttribute("lower",B.lower)}if(typeof B.upper=="string"||typeof B.upper=="number"){A.setAttribute("upper",B.upper)}this.addRenderer(A,B.renderer)},addValueMapLabelRenderer:function(H,G){H.setAttribute("lookupfield",G.lookupfield);H.setAttribute("labelfield",G.labelfield);if(typeof G.exacts=="object"){for(var A=0,J=G.exacts.length;A<J;A++){var E=G.exacts[A];var D=this.createElementNS("","EXACT");if(typeof E.value=="string"){D.setAttribute("value",E.value)}if(typeof E.label=="string"){D.setAttribute("label",E.label)}if(typeof E.method=="string"){D.setAttribute("method",E.method)}H.appendChild(D);if(typeof E.symbol=="object"){var B=null;if(E.symbol.type=="text"){B=this.createElementNS("","TEXTSYMBOL")}if(B!=null){var K=this.fontStyleKeys;for(var C=0,F=K.length;C<F;C++){var I=K[C];if(E.symbol[I]){B.setAttribute(I,E.symbol[I])}}D.appendChild(B)}}}}},addValueMapRenderer:function(J,I){J.setAttribute("lookupfield",I.lookupfield);if(typeof I.ranges=="object"){for(var A=0,B=I.ranges.length;A<B;A++){var G=I.ranges[A];var E=this.createElementNS("","RANGE");E.setAttribute("lower",G.lower);E.setAttribute("upper",G.upper);J.appendChild(E);if(typeof G.symbol=="object"){var D=null;if(G.symbol.type=="simplepolygon"){D=this.createElementNS("","SIMPLEPOLYGONSYMBOL")}if(D!=null){if(typeof G.symbol.boundarycolor=="string"){D.setAttribute("boundarycolor",G.symbol.boundarycolor)}if(typeof G.symbol.fillcolor=="string"){D.setAttribute("fillcolor",G.symbol.fillcolor)}if(typeof G.symbol.filltransparency=="number"){D.setAttribute("filltransparency",G.symbol.filltransparency)}E.appendChild(D)}}}}else{if(typeof I.exacts=="object"){for(var C=0,K=I.exacts.length;C<K;C++){var H=I.exacts[C];var F=this.createElementNS("","EXACT");if(typeof H.value=="string"){F.setAttribute("value",H.value)}if(typeof H.label=="string"){F.setAttribute("label",H.label)}if(typeof H.method=="string"){F.setAttribute("method",H.method)}J.appendChild(F);if(typeof H.symbol=="object"){var D=null;if(H.symbol.type=="simplemarker"){D=this.createElementNS("","SIMPLEMARKERSYMBOL")}if(D!=null){if(typeof H.symbol.antialiasing=="string"){D.setAttribute("antialiasing",H.symbol.antialiasing)}if(typeof H.symbol.color=="string"){D.setAttribute("color",H.symbol.color)}if(typeof H.symbol.outline=="string"){D.setAttribute("outline",H.symbol.outline)}if(typeof H.symbol.overlap=="string"){D.setAttribute("overlap",H.symbol.overlap)}if(typeof H.symbol.shadow=="string"){D.setAttribute("shadow",H.symbol.shadow)}if(typeof H.symbol.transparency=="number"){D.setAttribute("transparency",H.symbol.transparency)}if(typeof H.symbol.usecentroid=="string"){D.setAttribute("usecentroid",H.symbol.usecentroid)}if(typeof H.symbol.width=="number"){D.setAttribute("width",H.symbol.width)}F.appendChild(D)}}}}}},addSimpleLabelRenderer:function(F,H){F.setAttribute("field",H.field);var E=["featureweight","howmanylabels","labelbufferratio","labelpriorities","labelweight","linelabelposition","rotationalangles"];for(var D=0,A=E.length;D<A;D++){var C=E[D];if(H[C]){F.setAttribute(C,H[C])}}if(H.symbol.type=="text"){var G=H.symbol;var B=this.createElementNS("","TEXTSYMBOL");F.appendChild(B);var E=this.fontStyleKeys;for(var D=0,A=E.length;D<A;D++){var C=E[D];if(G[C]){B.setAttribute(C,H[C])}}}},writePolygonGeometry:function(G){if(!(G instanceof OpenLayers.Geometry.Polygon)){throw {message:"Cannot write polygon geometry to ArcXML with an "+G.CLASS_NAME+" object.",geometry:G}}var B=this.createElementNS("","POLYGON");for(var E=0,C=G.components.length;E<C;E++){var A=G.components[E];var I=this.createElementNS("","RING");for(var D=0,J=A.components.length;D<J;D++){var H=A.components[D];var F=this.createElementNS("","POINT");F.setAttribute("x",H.x);F.setAttribute("y",H.y);I.appendChild(F)}B.appendChild(I)}return B},parseResponse:function(Z){if(typeof Z=="string"){var N=new OpenLayers.Format.XML();Z=N.read(Z)}var A=new OpenLayers.Format.ArcXML.Response();var a=Z.getElementsByTagName("ERROR");if(a!=null&&a.length>0){A.error=this.getChildValue(a,"Unknown error.")}else{var R=Z.getElementsByTagName("RESPONSE");if(R==null||R.length==0){A.error="No RESPONSE tag found in ArcXML response.";return A}var Q=R[0].firstChild.nodeName;if(Q=="#text"){Q=R[0].firstChild.nextSibling.nodeName}if(Q=="IMAGE"){var C=Z.getElementsByTagName("ENVELOPE");var W=Z.getElementsByTagName("OUTPUT");if(C==null||C.length==0){A.error="No ENVELOPE tag found in ArcXML response."}else{if(W==null||W.length==0){A.error="No OUTPUT tag found in ArcXML response."}else{var U=this.parseAttributes(C[0]);var V=this.parseAttributes(W[0]);if(typeof V.type=="string"){A.image={envelope:U,output:{type:V.type,data:this.getChildValue(W[0])}}}else{A.image={envelope:U,output:V}}}}}else{if(Q=="FEATURES"){var I=R[0].getElementsByTagName("FEATURES");var P=I[0].getElementsByTagName("FEATURECOUNT");A.features.featurecount=P[0].getAttribute("count");if(A.features.featurecount>0){var D=I[0].getElementsByTagName("ENVELOPE");A.features.envelope=this.parseAttributes(D[0],typeof (0));var X=I[0].getElementsByTagName("FEATURE");for(var M=0;M<X.length;M++){var H=new OpenLayers.Feature.Vector();var S=X[M].getElementsByTagName("FIELD");for(var F=0;F<S.length;F++){var G=S[F].getAttribute("name");var K=S[F].getAttribute("value");H.attributes[G]=K}var T=X[M].getElementsByTagName("POLYGON");if(T.length>0){var J=T[0].getElementsByTagName("RING");var E=[];for(var O=0;O<J.length;O++){var Y=[];Y.push(this.parsePointGeometry(J[O]));var L=J[O].getElementsByTagName("HOLE");for(var B=0;B<L.length;B++){Y.push(this.parsePointGeometry(L[B]))}L=null;E.push(new OpenLayers.Geometry.Polygon(Y));Y=null}J=null;if(E.length==1){H.geometry=E[0]}else{H.geometry=new OpenLayers.Geometry.MultiPolygon(E)}}A.features.feature.push(H)}}}else{A.error="Unidentified response type."}}}return A},parseAttributes:function(D,C){var B={};for(var A=0;A<D.attributes.length;A++){if(C=="number"){B[D.attributes[A].nodeName]=parseFloat(D.attributes[A].nodeValue)}else{B[D.attributes[A].nodeName]=D.attributes[A].nodeValue}}return B},parsePointGeometry:function(D){var B=[];var E=D.getElementsByTagName("COORDS");if(E.length>0){var F=this.getChildValue(E[0]);F=F.split(/;/);for(var H=0;H<F.length;H++){var G=F[H].split(/ /);B.push(new OpenLayers.Geometry.Point(parseFloat(G[0]),parseFloat(G[1])))}E=null}else{var A=D.getElementsByTagName("POINT");if(A.length>0){for(var C=0;C<A.length;C++){B.push(new OpenLayers.Geometry.Point(parseFloat(A[C].getAttribute("x")),parseFloat(A[C].getAttribute("y"))))}}A=null}return new OpenLayers.Geometry.LinearRing(B)},CLASS_NAME:"OpenLayers.Format.ArcXML"});OpenLayers.Format.ArcXML.Request=OpenLayers.Class({initialize:function(B){var A={get_image:{properties:{background:null,draw:true,envelope:{minx:0,miny:0,maxx:0,maxy:0},featurecoordsys:{id:0,string:"",datumtransformid:0,datumtransformstring:""},filtercoordsys:{id:0,string:"",datumtransformid:0,datumtransformstring:""},imagesize:{height:0,width:0,dpi:96,printheight:0,printwidth:0,scalesymbols:false},layerlist:[],output:{baseurl:"",legendbaseurl:"",legendname:"",legendpath:"",legendurl:"",name:"",path:"",type:"jpg",url:""}}},get_feature:{layer:"",query:{isspatial:false,featurecoordsys:{id:0,string:"",datumtransformid:0,datumtransformstring:""},filtercoordsys:{id:0,string:"",datumtransformid:0,datumtransformstring:""},buffer:0,where:"",spatialfilter:{relation:"envelope_intersection",envelope:null}}},environment:{separators:{cs:" ",ts:";"}},layer:[],workspaces:[]};return OpenLayers.Util.extend(this,A)},CLASS_NAME:"OpenLayers.Format.ArcXML.Request"});OpenLayers.Format.ArcXML.Response=OpenLayers.Class({initialize:function(B){var A={image:{envelope:null,output:""},features:{featurecount:0,envelope:null,feature:[]},error:""};return OpenLayers.Util.extend(this,A)},CLASS_NAME:"OpenLayers.Format.ArcXML.Response"});OpenLayers.Format.GML=OpenLayers.Class(OpenLayers.Format.XML,{featureNS:"http://mapserver.gis.umn.edu/mapserver",featurePrefix:"feature",featureName:"featureMember",layerName:"features",geometryName:"geometry",collectionName:"FeatureCollection",gmlns:"http://www.opengis.net/gml",extractAttributes:true,xy:true,initialize:function(A){this.regExes={trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)};OpenLayers.Format.XML.prototype.initialize.apply(this,[A])},read:function(D){if(typeof D=="string"){D=OpenLayers.Format.XML.prototype.read.apply(this,[D])}var E=this.getElementsByTagNameNS(D.documentElement,this.gmlns,this.featureName);var C=[];for(var B=0;B<E.length;B++){var A=this.parseFeature(E[B]);if(A){C.push(A)}}return C},parseFeature:function(D){var E=["MultiPolygon","Polygon","MultiLineString","LineString","MultiPoint","Point","Envelope"];var O,H,P,C;for(var K=0;K<E.length;++K){O=E[K];H=this.getElementsByTagNameNS(D,this.gmlns,O);if(H.length>0){C=this.parseGeometry[O.toLowerCase()];if(C){P=C.apply(this,[H[0]]);if(this.internalProjection&&this.externalProjection){P.transform(this.externalProjection,this.internalProjection)}}else{OpenLayers.Console.error(OpenLayers.i18n("unsupportedGeometryType",{geomType:O}))}break}}var B;var J=this.getElementsByTagNameNS(D,this.gmlns,"Box");for(K=0;K<J.length;++K){var N=J[K];var M=this.parseGeometry.box.apply(this,[N]);var L=N.parentNode;var G=L.localName||L.nodeName.split(":").pop();if(G==="boundedBy"){B=M}else{P=M.toGeometry()}}var I;if(this.extractAttributes){I=this.parseAttributes(D)}var Q=new OpenLayers.Feature.Vector(P,I);Q.bounds=B;Q.gml={featureType:D.firstChild.nodeName.split(":")[1],featureNS:D.firstChild.namespaceURI,featureNSPrefix:D.firstChild.prefix};var A=D.firstChild;var F;while(A){if(A.nodeType==1){F=A.getAttribute("fid")||A.getAttribute("id");if(F){break}}A=A.nextSibling}Q.fid=F;return Q},parseGeometry:{point:function(D){var B,A;var E=[];var B=this.getElementsByTagNameNS(D,this.gmlns,"pos");if(B.length>0){A=B[0].firstChild.nodeValue;A=A.replace(this.regExes.trimSpace,"");E=A.split(this.regExes.splitSpace)}if(E.length==0){B=this.getElementsByTagNameNS(D,this.gmlns,"coordinates");if(B.length>0){A=B[0].firstChild.nodeValue;A=A.replace(this.regExes.removeSpace,"");E=A.split(",")}}if(E.length==0){B=this.getElementsByTagNameNS(D,this.gmlns,"coord");if(B.length>0){var F=this.getElementsByTagNameNS(B[0],this.gmlns,"X");var C=this.getElementsByTagNameNS(B[0],this.gmlns,"Y");if(F.length>0&&C.length>0){E=[F[0].firstChild.nodeValue,C[0].firstChild.nodeValue]}}}if(E.length==2){E[2]=null}if(this.xy){return new OpenLayers.Geometry.Point(E[0],E[1],E[2])}else{return new OpenLayers.Geometry.Point(E[1],E[0],E[2])}},multipoint:function(E){var B=this.getElementsByTagNameNS(E,this.gmlns,"Point");var D=[];if(B.length>0){var A;for(var C=0;C<B.length;++C){A=this.parseGeometry.point.apply(this,[B[C]]);if(A){D.push(A)}}}return new OpenLayers.Geometry.MultiPoint(D)},linestring:function(C,E){var D,B;var L=[];var M=[];D=this.getElementsByTagNameNS(C,this.gmlns,"posList");if(D.length>0){B=this.getChildValue(D[0]);B=B.replace(this.regExes.trimSpace,"");L=B.split(this.regExes.splitSpace);var H=parseInt(D[0].getAttribute("dimension"));var F,K,J,I;for(var G=0;G<L.length/H;++G){F=G*H;K=L[F];J=L[F+1];I=(H==2)?null:L[F+2];if(this.xy){M.push(new OpenLayers.Geometry.Point(K,J,I))}else{M.push(new OpenLayers.Geometry.Point(J,K,I))}}}if(L.length==0){D=this.getElementsByTagNameNS(C,this.gmlns,"coordinates");if(D.length>0){B=this.getChildValue(D[0]);B=B.replace(this.regExes.trimSpace,"");B=B.replace(this.regExes.trimComma,",");var A=B.split(this.regExes.splitSpace);for(var G=0;G<A.length;++G){L=A[G].split(",");if(L.length==2){L[2]=null}if(this.xy){M.push(new OpenLayers.Geometry.Point(L[0],L[1],L[2]))}else{M.push(new OpenLayers.Geometry.Point(L[1],L[0],L[2]))}}}}var N=null;if(M.length!=0){if(E){N=new OpenLayers.Geometry.LinearRing(M)}else{N=new OpenLayers.Geometry.LineString(M)}}return N},multilinestring:function(E){var B=this.getElementsByTagNameNS(E,this.gmlns,"LineString");var D=[];if(B.length>0){var A;for(var C=0;C<B.length;++C){A=this.parseGeometry.linestring.apply(this,[B[C]]);if(A){D.push(A)}}}return new OpenLayers.Geometry.MultiLineString(D)},polygon:function(E){var B=this.getElementsByTagNameNS(E,this.gmlns,"LinearRing");var D=[];if(B.length>0){var A;for(var C=0;C<B.length;++C){A=this.parseGeometry.linestring.apply(this,[B[C],true]);if(A){D.push(A)}}}return new OpenLayers.Geometry.Polygon(D)},multipolygon:function(E){var A=this.getElementsByTagNameNS(E,this.gmlns,"Polygon");var D=[];if(A.length>0){var C;for(var B=0;B<A.length;++B){C=this.parseGeometry.polygon.apply(this,[A[B]]);if(C){D.push(C)}}}return new OpenLayers.Geometry.MultiPolygon(D)},envelope:function(B){var E=[];var A;var F;var J=this.getElementsByTagNameNS(B,this.gmlns,"lowerCorner");if(J.length>0){var H=[];if(J.length>0){A=J[0].firstChild.nodeValue;A=A.replace(this.regExes.trimSpace,"");H=A.split(this.regExes.splitSpace)}if(H.length==2){H[2]=null}if(this.xy){var D=new OpenLayers.Geometry.Point(H[0],H[1],H[2])}else{var D=new OpenLayers.Geometry.Point(H[1],H[0],H[2])}}var G=this.getElementsByTagNameNS(B,this.gmlns,"upperCorner");if(G.length>0){var H=[];if(G.length>0){A=G[0].firstChild.nodeValue;A=A.replace(this.regExes.trimSpace,"");H=A.split(this.regExes.splitSpace)}if(H.length==2){H[2]=null}if(this.xy){var I=new OpenLayers.Geometry.Point(H[0],H[1],H[2])}else{var I=new OpenLayers.Geometry.Point(H[1],H[0],H[2])}}if(D&&I){E.push(new OpenLayers.Geometry.Point(D.x,D.y));E.push(new OpenLayers.Geometry.Point(I.x,D.y));E.push(new OpenLayers.Geometry.Point(I.x,I.y));E.push(new OpenLayers.Geometry.Point(D.x,I.y));E.push(new OpenLayers.Geometry.Point(D.x,D.y));var C=new OpenLayers.Geometry.LinearRing(E);F=new OpenLayers.Geometry.Polygon([C])}return F},box:function(E){var C=this.getElementsByTagNameNS(E,this.gmlns,"coordinates");var B;var F,A=null,D=null;if(C.length>0){B=C[0].firstChild.nodeValue;F=B.split(" ");if(F.length==2){A=F[0].split(",");D=F[1].split(",")}}if(A!==null&&D!==null){return new OpenLayers.Bounds(parseFloat(A[0]),parseFloat(A[1]),parseFloat(D[0]),parseFloat(D[1]))}}},parseAttributes:function(E){var F={};var A=E.firstChild;var D,G,C,J,I,B,H;while(A){if(A.nodeType==1){D=A.childNodes;for(G=0;G<D.length;++G){C=D[G];if(C.nodeType==1){J=C.childNodes;if(J.length==1){I=J[0];if(I.nodeType==3||I.nodeType==4){B=(C.prefix)?C.nodeName.split(":")[1]:C.nodeName;H=I.nodeValue.replace(this.regExes.trimSpace,"");F[B]=H}}else{F[C.nodeName.split(":").pop()]=null}}}break}A=A.nextSibling}return F},write:function(C){if(!(C instanceof Array)){C=[C]}var B=this.createElementNS("http://www.opengis.net/wfs","wfs:"+this.collectionName);for(var A=0;A<C.length;A++){B.appendChild(this.createFeatureXML(C[A]))}return OpenLayers.Format.XML.prototype.write.apply(this,[B])},createFeatureXML:function(J){var H=J.geometry;var E=this.buildGeometryNode(H);var I=this.createElementNS(this.featureNS,this.featurePrefix+":"+this.geometryName);I.appendChild(E);var A=this.createElementNS(this.gmlns,"gml:"+this.featureName);var K=this.createElementNS(this.featureNS,this.featurePrefix+":"+this.layerName);var C=J.fid||J.id;K.setAttribute("fid",C);K.appendChild(I);for(var G in J.attributes){var F=this.createTextNode(J.attributes[G]);var D=G.substring(G.lastIndexOf(":")+1);var B=this.createElementNS(this.featureNS,this.featurePrefix+":"+D);B.appendChild(F);K.appendChild(B)}A.appendChild(K);return A},buildGeometryNode:function(D){if(this.externalProjection&&this.internalProjection){D=D.clone();D.transform(this.internalProjection,this.externalProjection)}var C=D.CLASS_NAME;var B=C.substring(C.lastIndexOf(".")+1);var A=this.buildGeometry[B.toLowerCase()];return A.apply(this,[D])},buildGeometry:{point:function(B){var A=this.createElementNS(this.gmlns,"gml:Point");A.appendChild(this.buildCoordinatesNode(B));return A},multipoint:function(F){var D=this.createElementNS(this.gmlns,"gml:MultiPoint");var C=F.components;var B,E;for(var A=0;A<C.length;A++){B=this.createElementNS(this.gmlns,"gml:pointMember");E=this.buildGeometry.point.apply(this,[C[A]]);B.appendChild(E);D.appendChild(B)}return D},linestring:function(B){var A=this.createElementNS(this.gmlns,"gml:LineString");A.appendChild(this.buildCoordinatesNode(B));return A},multilinestring:function(F){var D=this.createElementNS(this.gmlns,"gml:MultiLineString");var A=F.components;var C,E;for(var B=0;B<A.length;++B){C=this.createElementNS(this.gmlns,"gml:lineStringMember");E=this.buildGeometry.linestring.apply(this,[A[B]]);C.appendChild(E);D.appendChild(C)}return D},linearring:function(B){var A=this.createElementNS(this.gmlns,"gml:LinearRing");A.appendChild(this.buildCoordinatesNode(B));return A},polygon:function(G){var D=this.createElementNS(this.gmlns,"gml:Polygon");var F=G.components;var C,E,B;for(var A=0;A<F.length;++A){B=(A==0)?"outerBoundaryIs":"innerBoundaryIs";C=this.createElementNS(this.gmlns,"gml:"+B);E=this.buildGeometry.linearring.apply(this,[F[A]]);C.appendChild(E);D.appendChild(C)}return D},multipolygon:function(F){var D=this.createElementNS(this.gmlns,"gml:MultiPolygon");var A=F.components;var E,B;for(var C=0;C<A.length;++C){E=this.createElementNS(this.gmlns,"gml:polygonMember");B=this.buildGeometry.polygon.apply(this,[A[C]]);E.appendChild(B);D.appendChild(E)}return D},bounds:function(B){var A=this.createElementNS(this.gmlns,"gml:Box");A.appendChild(this.buildCoordinatesNode(B));return A}},buildCoordinatesNode:function(F){var A=this.createElementNS(this.gmlns,"gml:coordinates");A.setAttribute("decimal",".");A.setAttribute("cs",",");A.setAttribute("ts"," ");var E=[];if(F instanceof OpenLayers.Bounds){E.push(F.left+","+F.bottom);E.push(F.right+","+F.top)}else{var C=(F.components)?F.components:[F];for(var B=0;B<C.length;B++){E.push(C[B].x+","+C[B].y)}}var D=this.createTextNode(E.join(" "));A.appendChild(D);return A},CLASS_NAME:"OpenLayers.Format.GML"});OpenLayers.Format.GeoJSON=OpenLayers.Class(OpenLayers.Format.JSON,{ignoreExtraDims:false,initialize:function(A){OpenLayers.Format.JSON.prototype.initialize.apply(this,[A])},read:function(I,G,A){G=(G)?G:"FeatureCollection";var D=null;var C=null;if(typeof I=="string"){C=OpenLayers.Format.JSON.prototype.read.apply(this,[I,A])}else{C=I}if(!C){OpenLayers.Console.error("Bad JSON: "+I)}else{if(typeof (C.type)!="string"){OpenLayers.Console.error("Bad GeoJSON - no type: "+I)}else{if(this.isValidType(C,G)){switch(G){case"Geometry":try{D=this.parseGeometry(C)}catch(B){OpenLayers.Console.error(B)}break;case"Feature":try{D=this.parseFeature(C);D.type="Feature"}catch(B){OpenLayers.Console.error(B)}break;case"FeatureCollection":D=[];switch(C.type){case"Feature":try{D.push(this.parseFeature(C))}catch(B){D=null;OpenLayers.Console.error(B)}break;case"FeatureCollection":for(var E=0,F=C.features.length;E<F;++E){try{D.push(this.parseFeature(C.features[E]))}catch(B){D=null;OpenLayers.Console.error(B)}}break;default:try{var H=this.parseGeometry(C);D.push(new OpenLayers.Feature.Vector(H))}catch(B){D=null;OpenLayers.Console.error(B)}}break}}}}return D},isValidType:function(C,A){var B=false;switch(A){case"Geometry":if(OpenLayers.Util.indexOf(["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon","Box","GeometryCollection"],C.type)==-1){OpenLayers.Console.error("Unsupported geometry type: "+C.type)}else{B=true}break;case"FeatureCollection":B=true;break;default:if(C.type==A){B=true}else{OpenLayers.Console.error("Cannot convert types from "+C.type+" to "+A)}}return B},parseFeature:function(D){var B,F,A,E;A=(D.properties)?D.properties:{};E=(D.geometry&&D.geometry.bbox)||D.bbox;try{F=this.parseGeometry(D.geometry)}catch(C){throw C}B=new OpenLayers.Feature.Vector(F,A);if(E){B.bounds=OpenLayers.Bounds.fromArray(E)}if(D.id){B.fid=D.id}return B},parseGeometry:function(E){if(E==null){return null}var G,F=false;if(E.type=="GeometryCollection"){if(!(E.geometries instanceof Array)){throw"GeometryCollection must have geometries array: "+E}var B=E.geometries.length;var D=new Array(B);for(var A=0;A<B;++A){D[A]=this.parseGeometry.apply(this,[E.geometries[A]])}G=new OpenLayers.Geometry.Collection(D);F=true}else{if(!(E.coordinates instanceof Array)){throw"Geometry must have coordinates array: "+E}if(!this.parseCoords[E.type.toLowerCase()]){throw"Unsupported geometry type: "+E.type}try{G=this.parseCoords[E.type.toLowerCase()].apply(this,[E.coordinates])}catch(C){throw C}}if(this.internalProjection&&this.externalProjection&&!F){G.transform(this.externalProjection,this.internalProjection)}return G},parseCoords:{point:function(A){if(this.ignoreExtraDims==false&&A.length!=2){throw"Only 2D points are supported: "+A}return new OpenLayers.Geometry.Point(A[0],A[1])},multipoint:function(F){var C=[];var E=null;for(var B=0,A=F.length;B<A;++B){try{E=this.parseCoords.point.apply(this,[F[B]])}catch(D){throw D}C.push(E)}return new OpenLayers.Geometry.MultiPoint(C)},linestring:function(F){var C=[];var E=null;for(var B=0,A=F.length;B<A;++B){try{E=this.parseCoords.point.apply(this,[F[B]])}catch(D){throw D}C.push(E)}return new OpenLayers.Geometry.LineString(C)},multilinestring:function(F){var C=[];var B=null;for(var D=0,A=F.length;D<A;++D){try{B=this.parseCoords.linestring.apply(this,[F[D]])}catch(E){throw E}C.push(B)}return new OpenLayers.Geometry.MultiLineString(C)},polygon:function(G){var F=[];var E,B;for(var C=0,A=G.length;C<A;++C){try{B=this.parseCoords.linestring.apply(this,[G[C]])}catch(D){throw D}E=new OpenLayers.Geometry.LinearRing(B.components);F.push(E)}return new OpenLayers.Geometry.Polygon(F)},multipolygon:function(F){var B=[];var E=null;for(var C=0,A=F.length;C<A;++C){try{E=this.parseCoords.polygon.apply(this,[F[C]])}catch(D){throw D}B.push(E)}return new OpenLayers.Geometry.MultiPolygon(B)},box:function(A){if(A.length!=2){throw"GeoJSON box coordinates must have 2 elements"}return new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing([new OpenLayers.Geometry.Point(A[0][0],A[0][1]),new OpenLayers.Geometry.Point(A[1][0],A[0][1]),new OpenLayers.Geometry.Point(A[1][0],A[1][1]),new OpenLayers.Geometry.Point(A[0][0],A[1][1]),new OpenLayers.Geometry.Point(A[0][0],A[0][1])])])}},write:function(E,D){var A={type:null};if(E instanceof Array){A.type="FeatureCollection";var G=E.length;A.features=new Array(G);for(var C=0;C<G;++C){var B=E[C];if(!B instanceof OpenLayers.Feature.Vector){var F="FeatureCollection only supports collections of features: "+B;throw F}A.features[C]=this.extract.feature.apply(this,[B])}}else{if(E.CLASS_NAME.indexOf("OpenLayers.Geometry")==0){A=this.extract.geometry.apply(this,[E])}else{if(E instanceof OpenLayers.Feature.Vector){A=this.extract.feature.apply(this,[E]);if(E.layer&&E.layer.projection){A.crs=this.createCRSObject(E)}}}}return OpenLayers.Format.JSON.prototype.write.apply(this,[A,D])},createCRSObject:function(B){var C=B.layer.projection.toString();var A={};if(C.match(/epsg:/i)){var D=parseInt(C.substring(C.indexOf(":")+1));if(D==4326){A={type:"OGC",properties:{urn:"urn:ogc:def:crs:OGC:1.3:CRS84"}}}else{A={type:"EPSG",properties:{code:D}}}}return A},extract:{feature:function(B){var A=this.extract.geometry.apply(this,[B.geometry]);return{type:"Feature",id:B.fid==null?B.id:B.fid,properties:B.attributes,geometry:A}},geometry:function(D){if(D==null){return null}if(this.internalProjection&&this.externalProjection){D=D.clone();D.transform(this.internalProjection,this.externalProjection)}var A=D.CLASS_NAME.split(".")[2];var C=this.extract[A.toLowerCase()].apply(this,[D]);var B;if(A=="Collection"){B={type:"GeometryCollection",geometries:C}}else{B={type:A,coordinates:C}}return B},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},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},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},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},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},collection:function(C){var A=C.components.length;var D=new Array(A);for(var B=0;B<A;++B){D[B]=this.extract.geometry.apply(this,[C.components[B]])}return D}},CLASS_NAME:"OpenLayers.Format.GeoJSON"});OpenLayers.Format.ArcXML.Features=OpenLayers.Class(OpenLayers.Format.XML,{initialize:function(A){OpenLayers.Format.XML.prototype.initialize.apply(this,[A])},read:function(C){var B=new OpenLayers.Format.ArcXML();var A=B.read(C);return A.features.feature}});if(!OpenLayers.Format.GML){OpenLayers.Format.GML={}}OpenLayers.Format.GML.Base=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{gml:"http://www.opengis.net/gml",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance",wfs:"http://www.opengis.net/wfs"},defaultPrefix:"gml",schemaLocation:null,featureType:null,featureNS:null,geometryName:"geometry",extractAttributes:true,srsName:null,xy:true,geometryTypes:null,singleFeatureType:null,regExes:{trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)},initialize:function(A){OpenLayers.Format.XML.prototype.initialize.apply(this,[A]);this.setGeometryTypes();if(A&&A.featureNS){this.setNamespace("feature",A.featureNS)}this.singleFeatureType=!A||(typeof A.featureType==="string")},read:function(E){if(typeof E=="string"){E=OpenLayers.Format.XML.prototype.read.apply(this,[E])}if(E&&E.nodeType==9){E=E.documentElement}var C=[];this.readNode(E,{features:C});if(C.length==0){var D=this.getElementsByTagNameNS(E,this.namespaces.gml,"featureMember");if(D.length){for(var B=0,A=D.length;B<A;++B){this.readNode(D[B],{features:C})}}else{var D=this.getElementsByTagNameNS(E,this.namespaces.gml,"featureMembers");if(D.length){this.readNode(D[0],{features:C})}}}return C},readers:{gml:{featureMember:function(A,B){this.readChildNodes(A,B)},featureMembers:function(A,B){this.readChildNodes(A,B)},name:function(A,B){B.name=this.getChildValue(A)},boundedBy:function(B,C){var A={};this.readChildNodes(B,A);if(A.components&&A.components.length>0){C.bounds=A.components[0]}},Point:function(B,A){var C={points:[]};this.readChildNodes(B,C);if(!A.components){A.components=[]}A.components.push(C.points[0])},coordinates:function(E,G){var H=this.getChildValue(E).replace(this.regExes.trimSpace,"");H=H.replace(this.regExes.trimComma,",");var A=H.split(this.regExes.splitSpace);var F;var D=A.length;var C=new Array(D);for(var B=0;B<D;++B){F=A[B].split(",");if(this.xy){C[B]=new OpenLayers.Geometry.Point(F[0],F[1],F[2])}else{C[B]=new OpenLayers.Geometry.Point(F[1],F[0],F[2])}}G.points=C},coord:function(A,B){var C={};this.readChildNodes(A,C);if(!B.points){B.points=[]}B.points.push(new OpenLayers.Geometry.Point(C.x,C.y,C.z))},X:function(A,B){B.x=this.getChildValue(A)},Y:function(A,B){B.y=this.getChildValue(A)},Z:function(A,B){B.z=this.getChildValue(A)},MultiPoint:function(B,A){var C={components:[]};this.readChildNodes(B,C);A.components=[new OpenLayers.Geometry.MultiPoint(C.components)]},pointMember:function(A,B){this.readChildNodes(A,B)},LineString:function(B,A){var C={};this.readChildNodes(B,C);if(!A.components){A.components=[]}A.components.push(new OpenLayers.Geometry.LineString(C.points))},MultiLineString:function(B,A){var C={components:[]};this.readChildNodes(B,C);A.components=[new OpenLayers.Geometry.MultiLineString(C.components)]},lineStringMember:function(A,B){this.readChildNodes(A,B)},Polygon:function(B,A){var C={outer:null,inner:[]};this.readChildNodes(B,C);C.inner.unshift(C.outer);if(!A.components){A.components=[]}A.components.push(new OpenLayers.Geometry.Polygon(C.inner))},LinearRing:function(B,C){var A={};this.readChildNodes(B,A);C.components=[new OpenLayers.Geometry.LinearRing(A.points)]},MultiPolygon:function(B,A){var C={components:[]};this.readChildNodes(B,C);A.components=[new OpenLayers.Geometry.MultiPolygon(C.components)]},polygonMember:function(A,B){this.readChildNodes(A,B)},GeometryCollection:function(B,A){var C={components:[]};this.readChildNodes(B,C);A.components=[new OpenLayers.Geometry.Collection(C.components)]},geometryMember:function(A,B){this.readChildNodes(A,B)}},feature:{"*":function(C,D){var A;var B=C.localName||C.nodeName.split(":").pop();if(D.features){if(!this.singleFeatureType&&(OpenLayers.Util.indexOf(this.featureType,B)!==-1)){A="_typeName"}else{if(B===this.featureType){A="_typeName"}}}else{if(C.childNodes.length==0||(C.childNodes.length==1&&C.firstChild.nodeType==3)){if(this.extractAttributes){A="_attribute"}}else{A="_geometry"}}if(A){this.readers.feature[A].apply(this,[C,D])}},_typeName:function(C,D){var A={components:[],attributes:{}};this.readChildNodes(C,A);if(A.name){A.attributes.name=A.name}var B=new OpenLayers.Feature.Vector(A.components[0],A.attributes);if(!this.singleFeatureType){B.type=C.nodeName.split(":").pop();B.namespace=C.namespaceURI}var E=C.getAttribute("fid")||this.getAttributeNS(C,this.namespaces.gml,"id");if(E){B.fid=E}if(this.internalProjection&&this.externalProjection&&B.geometry){B.geometry.transform(this.externalProjection,this.internalProjection)}if(A.bounds){B.bounds=A.bounds}D.features.push(B)},_geometry:function(A,B){this.readChildNodes(A,B)},_attribute:function(B,D){var A=B.localName||B.nodeName.split(":").pop();var C=this.getChildValue(B);D.attributes[A]=C}},wfs:{FeatureCollection:function(A,B){this.readChildNodes(A,B)}}},write:function(C){var B;if(C instanceof Array){B="featureMembers"}else{B="featureMember"}var A=this.writeNode("gml:"+B,C);this.setAttributeNS(A,this.namespaces.xsi,"xsi:schemaLocation",this.schemaLocation);return OpenLayers.Format.XML.prototype.write.apply(this,[A])},writers:{gml:{featureMember:function(A){var B=this.createElementNSPlus("gml:featureMember");this.writeNode("feature:_typeName",A,B);return B},MultiPoint:function(C){var B=this.createElementNSPlus("gml:MultiPoint");for(var A=0;A<C.components.length;++A){this.writeNode("pointMember",C.components[A],B)}return B},pointMember:function(B){var A=this.createElementNSPlus("gml:pointMember");this.writeNode("Point",B,A);return A},MultiLineString:function(C){var B=this.createElementNSPlus("gml:MultiLineString");for(var A=0;A<C.components.length;++A){this.writeNode("lineStringMember",C.components[A],B)}return B},lineStringMember:function(B){var A=this.createElementNSPlus("gml:lineStringMember");this.writeNode("LineString",B,A);return A},MultiPolygon:function(C){var B=this.createElementNSPlus("gml:MultiPolygon");for(var A=0;A<C.components.length;++A){this.writeNode("polygonMember",C.components[A],B)}return B},polygonMember:function(B){var A=this.createElementNSPlus("gml:polygonMember");this.writeNode("Polygon",B,A);return A},GeometryCollection:function(D){var C=this.createElementNSPlus("gml:GeometryCollection");for(var B=0,A=D.components.length;B<A;++B){this.writeNode("geometryMember",D.components[B],C)}return C},geometryMember:function(B){var A=this.createElementNSPlus("gml:geometryMember");var C=this.writeNode("feature:_geometry",B);A.appendChild(C.firstChild);return A}},feature:{_typeName:function(B){var C=this.createElementNSPlus("feature:"+this.featureType,{attributes:{fid:B.fid}});if(B.geometry){this.writeNode("feature:_geometry",B.geometry,C)}for(var A in B.attributes){var D=B.attributes[A];if(D!=null){this.writeNode("feature:_attribute",{name:A,value:D},C)}}return C},_geometry:function(C){if(this.externalProjection&&this.internalProjection){C=C.clone().transform(this.internalProjection,this.externalProjection)}var B=this.createElementNSPlus("feature:"+this.geometryName);var A=this.geometryTypes[C.CLASS_NAME];var D=this.writeNode("gml:"+A,C,B);if(this.srsName){D.setAttribute("srsName",this.srsName)}return B},_attribute:function(A){return this.createElementNSPlus("feature:"+A.name,{value:A.value})}},wfs:{FeatureCollection:function(C){var D=this.createElementNSPlus("wfs:FeatureCollection");for(var B=0,A=C.length;B<A;++B){this.writeNode("gml:featureMember",C[B],D)}return D}}},setGeometryTypes:function(){this.geometryTypes={"OpenLayers.Geometry.Point":"Point","OpenLayers.Geometry.MultiPoint":"MultiPoint","OpenLayers.Geometry.LineString":"LineString","OpenLayers.Geometry.MultiLineString":"MultiLineString","OpenLayers.Geometry.Polygon":"Polygon","OpenLayers.Geometry.MultiPolygon":"MultiPolygon","OpenLayers.Geometry.Collection":"GeometryCollection"}},CLASS_NAME:"OpenLayers.Format.GML.Base"});OpenLayers.Format.WFS=OpenLayers.Class(OpenLayers.Format.GML,{layer:null,wfsns:"http://www.opengis.net/wfs",ogcns:"http://www.opengis.net/ogc",initialize:function(A,B){OpenLayers.Format.GML.prototype.initialize.apply(this,[A]);this.layer=B;if(this.layer.featureNS){this.featureNS=this.layer.featureNS}if(this.layer.options.geometry_column){this.geometryName=this.layer.options.geometry_column}if(this.layer.options.typename){this.featureName=this.layer.options.typename}},write:function(B){var C=this.createElementNS(this.wfsns,"wfs:Transaction");C.setAttribute("version","1.0.0");C.setAttribute("service","WFS");for(var A=0;A<B.length;A++){switch(B[A].state){case OpenLayers.State.INSERT:C.appendChild(this.insert(B[A]));break;case OpenLayers.State.UPDATE:C.appendChild(this.update(B[A]));break;case OpenLayers.State.DELETE:C.appendChild(this.remove(B[A]));break}}return OpenLayers.Format.XML.prototype.write.apply(this,[C])},createFeatureXML:function(F){var C=this.buildGeometryNode(F.geometry);var G=this.createElementNS(this.featureNS,"feature:"+this.geometryName);G.appendChild(C);var B=this.createElementNS(this.featureNS,"feature:"+this.featureName);B.appendChild(G);for(var A in F.attributes){var H=this.createTextNode(F.attributes[A]);var D=A;if(A.search(":")!=-1){D=A.split(":")[1]}var E=this.createElementNS(this.featureNS,"feature:"+D);E.appendChild(H);B.appendChild(E)}return B},insert:function(B){var A=this.createElementNS(this.wfsns,"wfs:Insert");A.appendChild(this.createFeatureXML(B));return A},update:function(J){if(!J.fid){OpenLayers.Console.userError(OpenLayers.i18n("noFID"))}var F=this.createElementNS(this.wfsns,"wfs:Update");F.setAttribute("typeName",this.featurePrefix+":"+this.featureName);F.setAttribute("xmlns:"+this.featurePrefix,this.featureNS);var H=this.createElementNS(this.wfsns,"wfs:Property");var A=this.createElementNS(this.wfsns,"wfs:Name");var C=this.createTextNode(this.geometryName);A.appendChild(C);H.appendChild(A);var I=this.createElementNS(this.wfsns,"wfs:Value");var D=this.buildGeometryNode(J.geometry);if(J.layer){D.setAttribute("srsName",J.layer.projection.getCode())}I.appendChild(D);H.appendChild(I);F.appendChild(H);for(var E in J.attributes){H=this.createElementNS(this.wfsns,"wfs:Property");A=this.createElementNS(this.wfsns,"wfs:Name");A.appendChild(this.createTextNode(E));H.appendChild(A);I=this.createElementNS(this.wfsns,"wfs:Value");I.appendChild(this.createTextNode(J.attributes[E]));H.appendChild(I);F.appendChild(H)}var G=this.createElementNS(this.ogcns,"ogc:Filter");var B=this.createElementNS(this.ogcns,"ogc:FeatureId");B.setAttribute("fid",J.fid);G.appendChild(B);F.appendChild(G);return F},remove:function(B){if(!B.fid){OpenLayers.Console.userError(OpenLayers.i18n("noFID"));return false}var A=this.createElementNS(this.wfsns,"wfs:Delete");A.setAttribute("typeName",this.featurePrefix+":"+this.featureName);A.setAttribute("xmlns:"+this.featurePrefix,this.featureNS);var C=this.createElementNS(this.ogcns,"ogc:Filter");var D=this.createElementNS(this.ogcns,"ogc:FeatureId");D.setAttribute("fid",B.fid);C.appendChild(D);A.appendChild(C);return A},destroy:function(){this.layer=null},CLASS_NAME:"OpenLayers.Format.WFS"});OpenLayers.Layer.ArcIMS=OpenLayers.Class(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{ClientVersion:"9.2",ServiceName:""},tileSize:null,featureCoordSys:"4326",filterCoordSys:"4326",layers:null,async:true,name:"ArcIMS",isBaseLayer:true,DEFAULT_OPTIONS:{tileSize:new OpenLayers.Size(512,512),featureCoordSys:"4326",filterCoordSys:"4326",layers:null,isBaseLayer:true,async:true,name:"ArcIMS"},initialize:function(C,B,A){this.tileSize=new OpenLayers.Size(512,512);this.params=OpenLayers.Util.applyDefaults({ServiceName:A.serviceName},this.DEFAULT_PARAMS);this.options=OpenLayers.Util.applyDefaults(A,this.DEFAULT_OPTIONS);OpenLayers.Layer.Grid.prototype.initialize.apply(this,[C,B,this.params,A]);if(this.transparent){if(!this.isBaseLayer){this.isBaseLayer=false}if(this.format=="image/jpeg"){this.format=OpenLayers.Util.alphaHack()?"image/gif":"image/png"}}if(this.options.layers===null){this.options.layers=[]}},destroy:function(){OpenLayers.Layer.Grid.prototype.destroy.apply(this,arguments)},getURL:function(D){var A="";D=this.adjustBounds(D);var C=new OpenLayers.Format.ArcXML(OpenLayers.Util.extend(this.options,{requesttype:"image",envelope:D.toArray(),tileSize:this.tileSize}));var B=new OpenLayers.Request.POST({url:this.getFullRequestString(),data:C.write(),async:false});if(B!=null){var F=B.responseXML;if(!F||!F.documentElement){F=B.responseText}var E=new OpenLayers.Format.ArcXML();var G=E.read(F);A=this.getUrlOrImage(G.image.output)}return A},getURLasync:function(C,A,E,D){C=this.adjustBounds(C);var B=new OpenLayers.Format.ArcXML(OpenLayers.Util.extend(this.options,{requesttype:"image",envelope:C.toArray(),tileSize:this.tileSize}));OpenLayers.Request.POST({url:this.getFullRequestString(),async:true,data:B.write(),callback:function(F){var H=F.responseXML;if(!H||!H.documentElement){H=F.responseText}var G=new OpenLayers.Format.ArcXML();var I=G.read(H);A[E]=this.getUrlOrImage(I.image.output);D.apply(A)},scope:this})},getUrlOrImage:function(A){var B="";if(A.url){B=A.url}else{if(A.data){B="data:image/"+A.type+";base64,"+A.data}}return B},setLayerQuery:function(C,A){for(var B=0;B<this.options.layers.length;B++){if(C==this.options.layers[B].id){this.options.layers[B].query=A;return }}this.options.layers.push({id:C,visible:true,query:A})},getFeatureInfo:function(H,F,K){var B=K.buffer||1;var I=K.callback||function(){};var J=K.scope||window;var A={};OpenLayers.Util.extend(A,this.options);A.requesttype="feature";if(H instanceof OpenLayers.LonLat){A.polygon=null;A.envelope=[H.lon-B,H.lat-B,H.lon+B,H.lat+B]}else{if(H instanceof OpenLayers.Geometry.Polygon){A.envelope=null;A.polygon=H}}var E=new OpenLayers.Format.ArcXML(A);OpenLayers.Util.extend(E.request.get_feature,K);E.request.get_feature.layer=F.id;if(typeof F.query.accuracy=="number"){E.request.get_feature.query.accuracy=F.query.accuracy}else{var G=this.map.getCenter();var D=this.map.getViewPortPxFromLonLat(G);D.x++;var C=this.map.getLonLatFromPixel(D);E.request.get_feature.query.accuracy=C.lon-G.lon}E.request.get_feature.query.where=F.query.where;E.request.get_feature.query.spatialfilter.relation="area_intersection";OpenLayers.Request.POST({url:this.getFullRequestString({CustomService:"Query"}),data:E.write(),callback:function(M){var L=E.parseResponse(M.responseText);if(!E.iserror()){I.call(J,L.features)}else{I.call(J,null)}}})},clone:function(A){if(A==null){A=new OpenLayers.Layer.ArcIMS(this.name,this.url,this.getOptions())}A=OpenLayers.Layer.Grid.prototype.clone.apply(this,[A]);return A},addTile:function(B,A){return new OpenLayers.Tile.Image(this,A,B,null,this.tileSize)},CLASS_NAME:"OpenLayers.Layer.ArcIMS"});OpenLayers.Format.GML.v2=OpenLayers.Class(OpenLayers.Format.GML.Base,{schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/2.1.2/feature.xsd",initialize:function(A){OpenLayers.Format.GML.Base.prototype.initialize.apply(this,[A])},readers:{gml:OpenLayers.Util.applyDefaults({outerBoundaryIs:function(B,A){var C={};this.readChildNodes(B,C);A.outer=C.components[0]},innerBoundaryIs:function(B,A){var C={};this.readChildNodes(B,C);A.inner.push(C.components[0])},Box:function(D,B){var E={};this.readChildNodes(D,E);if(!B.components){B.components=[]}var C=E.points[0];var A=E.points[1];B.components.push(new OpenLayers.Bounds(C.x,C.y,A.x,A.y))}},OpenLayers.Format.GML.Base.prototype.readers.gml),feature:OpenLayers.Format.GML.Base.prototype.readers.feature,wfs:OpenLayers.Format.GML.Base.prototype.readers.wfs},write:function(C){var B;if(C instanceof Array){B="wfs:FeatureCollection"}else{B="gml:featureMember"}var A=this.writeNode(B,C);this.setAttributeNS(A,this.namespaces.xsi,"xsi:schemaLocation",this.schemaLocation);return OpenLayers.Format.XML.prototype.write.apply(this,[A])},writers:{gml:OpenLayers.Util.applyDefaults({Point:function(B){var A=this.createElementNSPlus("gml:Point");this.writeNode("coordinates",[B],A);return A},coordinates:function(D){var C=D.length;var E=new Array(C);var A;for(var B=0;B<C;++B){A=D[B];if(this.xy){E[B]=A.x+","+A.y}else{E[B]=A.y+","+A.x}if(A.z!=undefined){E[B]+=","+A.z}}return this.createElementNSPlus("gml:coordinates",{attributes:{decimal:".",cs:",",ts:" "},value:(C==1)?E[0]:E.join(" ")})},LineString:function(B){var A=this.createElementNSPlus("gml:LineString");this.writeNode("coordinates",B.components,A);return A},Polygon:function(C){var B=this.createElementNSPlus("gml:Polygon");this.writeNode("outerBoundaryIs",C.components[0],B);for(var A=1;A<C.components.length;++A){this.writeNode("innerBoundaryIs",C.components[A],B)}return B},outerBoundaryIs:function(A){var B=this.createElementNSPlus("gml:outerBoundaryIs");this.writeNode("LinearRing",A,B);return B},innerBoundaryIs:function(A){var B=this.createElementNSPlus("gml:innerBoundaryIs");this.writeNode("LinearRing",A,B);return B},LinearRing:function(A){var B=this.createElementNSPlus("gml:LinearRing");this.writeNode("coordinates",A.components,B);return B},Box:function(B){var A=this.createElementNSPlus("gml:Box");this.writeNode("coordinates",[{x:B.left,y:B.bottom},{x:B.right,y:B.top}],A);if(this.srsName){A.setAttribute("srsName",this.srsName)}return A}},OpenLayers.Format.GML.Base.prototype.writers.gml),feature:OpenLayers.Format.GML.Base.prototype.writers.feature,wfs:OpenLayers.Format.GML.Base.prototype.writers.wfs},CLASS_NAME:"OpenLayers.Format.GML.v2"});OpenLayers.Format.GML.v3=OpenLayers.Class(OpenLayers.Format.GML.Base,{schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd",curve:false,multiCurve:true,surface:false,multiSurface:true,initialize:function(A){OpenLayers.Format.GML.Base.prototype.initialize.apply(this,[A])},readers:{gml:OpenLayers.Util.applyDefaults({featureMembers:function(A,B){this.readChildNodes(A,B)},Curve:function(B,A){var C={points:[]};this.readChildNodes(B,C);if(!A.components){A.components=[]}A.components.push(new OpenLayers.Geometry.LineString(C.points))},segments:function(A,B){this.readChildNodes(A,B)},LineStringSegment:function(B,A){var C={};this.readChildNodes(B,C);if(C.points){Array.prototype.push.apply(A.points,C.points)}},pos:function(B,D){var E=this.getChildValue(B).replace(this.regExes.trimSpace,"");var C=E.split(this.regExes.splitSpace);var A;if(this.xy){A=new OpenLayers.Geometry.Point(C[0],C[1],C[2])}else{A=new OpenLayers.Geometry.Point(C[1],C[0],C[2])}D.points=[A]},posList:function(A,D){var H=this.getChildValue(A).replace(this.regExes.trimSpace,"");var K=H.split(this.regExes.splitSpace);var E=parseInt(A.getAttribute("dimension"))||2;var B,L,J,G;var I=K.length/E;var M=new Array(I);for(var C=0,F=K.length;C<F;C+=E){L=K[C];J=K[C+1];G=(E==2)?undefined:K[C+2];if(this.xy){M[C/E]=new OpenLayers.Geometry.Point(L,J,G)}else{M[C/E]=new OpenLayers.Geometry.Point(J,L,G)}}D.points=M},Surface:function(A,B){this.readChildNodes(A,B)},patches:function(A,B){this.readChildNodes(A,B)},PolygonPatch:function(A,B){this.readers.gml.Polygon.apply(this,[A,B])},exterior:function(B,A){var C={};this.readChildNodes(B,C);A.outer=C.components[0]},interior:function(B,A){var C={};this.readChildNodes(B,C);A.inner.push(C.components[0])},MultiCurve:function(B,A){var C={components:[]};this.readChildNodes(B,C);if(C.components.length>0){A.components=[new OpenLayers.Geometry.MultiLineString(C.components)]}},curveMember:function(A,B){this.readChildNodes(A,B)},MultiSurface:function(B,A){var C={components:[]};this.readChildNodes(B,C);if(C.components.length>0){A.components=[new OpenLayers.Geometry.MultiPolygon(C.components)]}},surfaceMember:function(A,B){this.readChildNodes(A,B)},surfaceMembers:function(A,B){this.readChildNodes(A,B)},pointMembers:function(A,B){this.readChildNodes(A,B)},lineStringMembers:function(A,B){this.readChildNodes(A,B)},polygonMembers:function(A,B){this.readChildNodes(A,B)},geometryMembers:function(A,B){this.readChildNodes(A,B)},Envelope:function(D,B){var E={points:new Array(2)};this.readChildNodes(D,E);if(!B.components){B.components=[]}var C=E.points[0];var A=E.points[1];B.components.push(new OpenLayers.Bounds(C.x,C.y,A.x,A.y))},lowerCorner:function(B,A){var C={};this.readers.gml.pos.apply(this,[B,C]);A.points[0]=C.points[0]},upperCorner:function(B,A){var C={};this.readers.gml.pos.apply(this,[B,C]);A.points[1]=C.points[0]}},OpenLayers.Format.GML.Base.prototype.readers.gml),feature:OpenLayers.Format.GML.Base.prototype.readers.feature,wfs:OpenLayers.Format.GML.Base.prototype.readers.wfs},write:function(C){var B;if(C instanceof Array){B="featureMembers"}else{B="featureMember"}var A=this.writeNode("gml:"+B,C);this.setAttributeNS(A,this.namespaces.xsi,"xsi:schemaLocation",this.schemaLocation);return OpenLayers.Format.XML.prototype.write.apply(this,[A])},writers:{gml:OpenLayers.Util.applyDefaults({featureMembers:function(C){var D=this.createElementNSPlus("gml:featureMembers");for(var B=0,A=C.length;B<A;++B){this.writeNode("feature:_typeName",C[B],D)}return D},Point:function(B){var A=this.createElementNSPlus("gml:Point");this.writeNode("pos",B,A);return A},pos:function(A){var B=(this.xy)?(A.x+" "+A.y):(A.y+" "+A.x);return this.createElementNSPlus("gml:pos",{value:B})},LineString:function(B){var A=this.createElementNSPlus("gml:LineString");this.writeNode("posList",B.components,A);return A},Curve:function(B){var A=this.createElementNSPlus("gml:Curve");this.writeNode("segments",B,A);return A},segments:function(B){var A=this.createElementNSPlus("gml:segments");this.writeNode("LineStringSegment",B,A);return A},LineStringSegment:function(B){var A=this.createElementNSPlus("gml:LineStringSegment");this.writeNode("posList",B.components,A);return A},posList:function(D){var B=D.length;var E=new Array(B);var A;for(var C=0;C<B;++C){A=D[C];if(this.xy){E[C]=A.x+" "+A.y}else{E[C]=A.y+" "+A.x}}return this.createElementNSPlus("gml:posList",{value:E.join(" ")})},Surface:function(B){var A=this.createElementNSPlus("gml:Surface");this.writeNode("patches",B,A);return A},patches:function(B){var A=this.createElementNSPlus("gml:patches");this.writeNode("PolygonPatch",B,A);return A},PolygonPatch:function(D){var C=this.createElementNSPlus("gml:PolygonPatch",{attributes:{interpolation:"planar"}});this.writeNode("exterior",D.components[0],C);for(var B=1,A=D.components.length;B<A;++B){this.writeNode("interior",D.components[B],C)}return C},Polygon:function(D){var C=this.createElementNSPlus("gml:Polygon");this.writeNode("exterior",D.components[0],C);for(var B=1,A=D.components.length;B<A;++B){this.writeNode("interior",D.components[B],C)}return C},exterior:function(A){var B=this.createElementNSPlus("gml:exterior");this.writeNode("LinearRing",A,B);return B},interior:function(A){var B=this.createElementNSPlus("gml:interior");this.writeNode("LinearRing",A,B);return B},LinearRing:function(A){var B=this.createElementNSPlus("gml:LinearRing");this.writeNode("posList",A.components,B);return B},MultiCurve:function(D){var C=this.createElementNSPlus("gml:MultiCurve");for(var B=0,A=D.components.length;B<A;++B){this.writeNode("curveMember",D.components[B],C)}return C},curveMember:function(B){var A=this.createElementNSPlus("gml:curveMember");if(this.curve){this.writeNode("Curve",B,A)}else{this.writeNode("LineString",B,A)}return A},MultiSurface:function(D){var C=this.createElementNSPlus("gml:MultiSurface");for(var B=0,A=D.components.length;B<A;++B){this.writeNode("surfaceMember",D.components[B],C)}return C},surfaceMember:function(A){var B=this.createElementNSPlus("gml:surfaceMember");if(this.surface){this.writeNode("Surface",A,B)}else{this.writeNode("Polygon",A,B)}return B},Envelope:function(B){var A=this.createElementNSPlus("gml:Envelope");this.writeNode("lowerCorner",B,A);this.writeNode("upperCorner",B,A);if(this.srsName){A.setAttribute("srsName",this.srsName)}return A},lowerCorner:function(A){var B=(this.xy)?(A.left+" "+A.bottom):(A.bottom+" "+A.left);return this.createElementNSPlus("gml:lowerCorner",{value:B})},upperCorner:function(A){var B=(this.xy)?(A.right+" "+A.top):(A.top+" "+A.right);return this.createElementNSPlus("gml:upperCorner",{value:B})}},OpenLayers.Format.GML.Base.prototype.writers.gml),feature:OpenLayers.Format.GML.Base.prototype.writers.feature,wfs:OpenLayers.Format.GML.Base.prototype.writers.wfs},setGeometryTypes:function(){this.geometryTypes={"OpenLayers.Geometry.Point":"Point","OpenLayers.Geometry.MultiPoint":"MultiPoint","OpenLayers.Geometry.LineString":(this.curve===true)?"Curve":"LineString","OpenLayers.Geometry.MultiLineString":(this.multiCurve===false)?"MultiLineString":"MultiCurve","OpenLayers.Geometry.Polygon":(this.surface===true)?"Surface":"Polygon","OpenLayers.Geometry.MultiPolygon":(this.multiSurface===false)?"MultiPolygon":"MultiSurface","OpenLayers.Geometry.Collection":"GeometryCollection"}},CLASS_NAME:"OpenLayers.Format.GML.v3"});OpenLayers.Format.Atom=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{atom:"http://www.w3.org/2005/Atom",georss:"http://www.georss.org/georss"},feedTitle:"untitled",defaultEntryTitle:"untitled",gmlParser:null,xy:false,initialize:function(A){OpenLayers.Format.XML.prototype.initialize.apply(this,[A])},read:function(A){if(typeof A=="string"){A=OpenLayers.Format.XML.prototype.read.apply(this,[A])}return this.parseFeatures(A)},write:function(C){var D;if(C instanceof Array){D=this.createElementNSPlus("atom:feed");D.appendChild(this.createElementNSPlus("atom:title",{value:this.feedTitle}));for(var A=0,B=C.length;A<B;A++){D.appendChild(this.buildEntryNode(C[A]))}}else{D=this.buildEntryNode(C)}return OpenLayers.Format.XML.prototype.write.apply(this,[D])},buildContentNode:function(B){var A=this.createElementNSPlus("atom:content",{attributes:{type:B.type||null}});if(B.src){A.setAttribute("src",B.src)}else{if(B.type=="text"||B.type==null){A.appendChild(this.createTextNode(B.value))}else{if(B.type=="html"){if(typeof B.value!="string"){throw"HTML content must be in form of an escaped string"}A.appendChild(this.createTextNode(B.value))}else{if(B.type=="xhtml"){A.appendChild(B.value)}else{if(B.type=="xhtml"||B.type.match(/(\+|\/)xml$/)){A.appendChild(B.value)}else{A.appendChild(this.createTextNode(B.value))}}}}}return A},buildEntryNode:function(M){var C=M.attributes;var I=C.atom||{};var J=this.createElementNSPlus("atom:entry");if(I.authors){var H=I.authors instanceof Array?I.authors:[I.authors];for(var D=0,L=H.length;D<L;D++){J.appendChild(this.buildPersonConstructNode("author",H[D]))}}if(I.categories){var E=I.categories instanceof Array?I.categories:[I.categories];var A;for(var D=0,L=E.length;D<L;D++){A=E[D];J.appendChild(this.createElementNSPlus("atom:category",{attributes:{term:A.term,scheme:A.scheme||null,label:A.label||null}}))}}if(I.content){J.appendChild(this.buildContentNode(I.content))}if(I.contributors){var F=I.contributors instanceof Array?I.contributors:[I.contributors];for(var D=0,L=F.length;D<L;D++){J.appendChild(this.buildPersonConstructNode("contributor",F[D]))}}if(M.fid){J.appendChild(this.createElementNSPlus("atom:id",{value:M.fid}))}if(I.links){var K=I.links instanceof Array?I.links:[I.links];var G;for(var D=0,L=K.length;D<L;D++){G=K[D];J.appendChild(this.createElementNSPlus("atom:link",{attributes:{href:G.href,rel:G.rel||null,type:G.type||null,hreflang:G.hreflang||null,title:G.title||null,length:G.length||null}}))}}if(I.published){J.appendChild(this.createElementNSPlus("atom:published",{value:I.published}))}if(I.rights){J.appendChild(this.createElementNSPlus("atom:rights",{value:I.rights}))}if(I.summary||C.description){J.appendChild(this.createElementNSPlus("atom:summary",{value:I.summary||C.description}))}J.appendChild(this.createElementNSPlus("atom:title",{value:I.title||C.title||this.defaultEntryTitle}));if(I.updated){J.appendChild(this.createElementNSPlus("atom:updated",{value:I.updated}))}if(M.geometry){var B=this.createElementNSPlus("georss:where");B.appendChild(this.buildGeometryNode(M.geometry));J.appendChild(B)}return J},initGmlParser:function(){this.gmlParser=new OpenLayers.Format.GML.v3({xy:this.xy,featureNS:"http://example.com#feature",internalProjection:this.internalProjection,externalProjection:this.externalProjection})},buildGeometryNode:function(B){if(!this.gmlParser){this.initGmlParser()}var A=this.gmlParser.writeNode("feature:_geometry",B);return A.firstChild},buildPersonConstructNode:function(B,F){var D=["uri","email"];var A=this.createElementNSPlus("atom:"+B);A.appendChild(this.createElementNSPlus("atom:name",{value:F.name}));for(var C=0,E=D.length;C<E;C++){if(F[D[C]]){A.appendChild(this.createElementNSPlus("atom:"+D[C],{value:F[D[C]]}))}}return A},getFirstChildValue:function(D,B,C,F){var E;var A=this.getElementsByTagNameNS(D,B,C);if(A&&A.length>0){E=this.getChildValue(A[0],F)}else{E=F}return E},parseFeature:function(D){var K={};var L=null;var A=null;var I=null;var B=this.namespaces.atom;this.parsePersonConstructs(D,"author",K);A=this.getElementsByTagNameNS(D,B,"category");if(A.length>0){K.categories=[]}for(var G=0,M=A.length;G<M;G++){L={};L.term=A[G].getAttribute("term");I=A[G].getAttribute("scheme");if(I){L.scheme=I}I=A[G].getAttribute("label");if(I){L.label=I}K.categories.push(L)}A=this.getElementsByTagNameNS(D,B,"content");if(A.length>0){L={};I=A[0].getAttribute("type");if(I){L.type=I}I=A[0].getAttribute("src");if(I){L.src=I}else{if(L.type=="text"||L.type=="html"||L.type==null){L.value=this.getFirstChildValue(D,B,"content",null)}else{if(L.type=="xhtml"||L.type.match(/(\+|\/)xml$/)){L.value=this.getChildEl(A[0])}else{L.value=this.getFirstChildValue(D,B,"content",null)}}K.content=L}}this.parsePersonConstructs(D,"contributor",K);K.id=this.getFirstChildValue(D,B,"id",null);A=this.getElementsByTagNameNS(D,B,"link");if(A.length>0){K.links=new Array(A.length)}var C=["rel","type","hreflang","title","length"];for(var G=0,M=A.length;G<M;G++){L={};L.href=A[G].getAttribute("href");for(var E=0,H=C.length;E<H;E++){I=A[G].getAttribute(C[E]);if(I){L[C[E]]=I}}K.links[G]=L}L=this.getFirstChildValue(D,B,"published",null);if(L){K.published=L}L=this.getFirstChildValue(D,B,"rights",null);if(L){K.rights=L}L=this.getFirstChildValue(D,B,"summary",null);if(L){K.summary=L}K.title=this.getFirstChildValue(D,B,"title",null);K.updated=this.getFirstChildValue(D,B,"updated",null);var F={title:K.title,description:K.summary,atom:K};var J=this.parseLocations(D)[0];var N=new OpenLayers.Feature.Vector(J,F);N.fid=K.id;return N},parseFeatures:function(E){var D=[];var A=this.getElementsByTagNameNS(E,this.namespaces.atom,"entry");if(A.length==0){A=[E]}for(var B=0,C=A.length;B<C;B++){D.push(this.parseFeature(A[B]))}return D},parseLocations:function(C){var A=this.namespaces.georss;var I={components:[]};var F=this.getElementsByTagNameNS(C,A,"where");if(F&&F.length>0){if(!this.gmlParser){this.initGmlParser()}for(var E=0,N=F.length;E<N;E++){this.gmlParser.readChildNodes(F[E],I)}}var H=I.components;var L=this.getElementsByTagNameNS(C,A,"point");if(L&&L.length>0){for(var E=0,N=L.length;E<N;E++){var P=OpenLayers.String.trim(L[E].firstChild.nodeValue).split(/\s+/);if(P.length!=2){P=OpenLayers.String.trim(L[E].firstChild.nodeValue).split(/\s*,\s*/)}H.push(new OpenLayers.Geometry.Point(parseFloat(P[1]),parseFloat(P[0])))}}var O=this.getElementsByTagNameNS(C,A,"line");if(O&&O.length>0){var K;var B;var M;for(var E=0,N=O.length;E<N;E++){K=OpenLayers.String.trim(O[E].firstChild.nodeValue).split(/\s+/);M=[];for(var D=0,G=K.length;D<G;D+=2){B=new OpenLayers.Geometry.Point(parseFloat(K[D+1]),parseFloat(K[D]));M.push(B)}H.push(new OpenLayers.Geometry.LineString(M))}}var J=this.getElementsByTagNameNS(C,A,"polygon");if(J&&J.length>0){var K;var B;var M;for(var E=0,N=J.length;E<N;E++){K=OpenLayers.String.trim(J[E].firstChild.nodeValue).split(/\s+/);M=[];for(var D=0,G=K.length;D<G;D+=2){B=new OpenLayers.Geometry.Point(parseFloat(K[D+1]),parseFloat(K[D]));M.push(B)}H.push(new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing(H)]))}}if(this.internalProjection&&this.externalProjection){for(var E=0,N=H.length;E<N;E++){if(H[E]){H[E].transform(this.externalProjection,this.internalProjection)}}}return H},parsePersonConstructs:function(D,A,G){var K=[];var C=this.namespaces.atom;var B=this.getElementsByTagNameNS(D,C,A);var E=["uri","email"];for(var H=0,M=B.length;H<M;H++){var L={};L.name=this.getFirstChildValue(B[H],C,"name",null);for(var F=0,I=E.length;F<I;F++){var J=this.getFirstChildValue(B[H],C,E[F],null);if(J){L[E[F]]=J}}K.push(L)}if(K.length>0){G[A+"s"]=K}},CLASS_NAME:"OpenLayers.Format.Atom"});OpenLayers.Format.Filter.v1_0_0=OpenLayers.Class(OpenLayers.Format.GML.v2,OpenLayers.Format.Filter.v1,{VERSION:"1.0.0",schemaLocation:"http://www.opengis.net/ogc/filter/1.0.0/filter.xsd",initialize:function(A){OpenLayers.Format.GML.v2.prototype.initialize.apply(this,[A])},readers:{ogc:OpenLayers.Util.applyDefaults({PropertyIsEqualTo:function(B,C){var A=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.EQUAL_TO});this.readChildNodes(B,A);C.filters.push(A)},PropertyIsNotEqualTo:function(B,C){var A=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.NOT_EQUAL_TO});this.readChildNodes(B,A);C.filters.push(A)},PropertyIsLike:function(D,E){var C=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.LIKE});this.readChildNodes(D,C);var F=D.getAttribute("wildCard");var B=D.getAttribute("singleChar");var A=D.getAttribute("escape");C.value2regex(F,B,A);E.filters.push(C)}},OpenLayers.Format.Filter.v1.prototype.readers.ogc),gml:OpenLayers.Format.GML.v2.prototype.readers.gml,feature:OpenLayers.Format.GML.v2.prototype.readers.feature},writers:{ogc:OpenLayers.Util.applyDefaults({PropertyIsEqualTo:function(A){var B=this.createElementNSPlus("ogc:PropertyIsEqualTo");this.writeNode("PropertyName",A,B);this.writeNode("Literal",A.value,B);return B},PropertyIsNotEqualTo:function(A){var B=this.createElementNSPlus("ogc:PropertyIsNotEqualTo");this.writeNode("PropertyName",A,B);this.writeNode("Literal",A.value,B);return B},PropertyIsLike:function(A){var B=this.createElementNSPlus("ogc:PropertyIsLike",{attributes:{wildCard:"*",singleChar:".",escape:"!"}});this.writeNode("PropertyName",A,B);this.writeNode("Literal",A.regex2value(),B);return B},BBOX:function(A){var C=this.createElementNSPlus("ogc:BBOX");this.writeNode("PropertyName",A,C);var B=this.writeNode("gml:Box",A.value,C);if(A.projection){B.setAttribute("srsName",A.projection)}return C}},OpenLayers.Format.Filter.v1.prototype.writers.ogc),gml:OpenLayers.Format.GML.v2.prototype.writers.gml,feature:OpenLayers.Format.GML.v2.prototype.writers.feature},writeSpatial:function(B,A){var C=this.createElementNSPlus("ogc:"+A);this.writeNode("PropertyName",B,C);var D;if(B.value instanceof OpenLayers.Geometry){D=this.writeNode("feature:_geometry",B.value).firstChild}else{D=this.writeNode("gml:Box",B.value)}if(B.projection){D.setAttribute("srsName",B.projection)}C.appendChild(D);return C},CLASS_NAME:"OpenLayers.Format.Filter.v1_0_0"});OpenLayers.Format.Filter.v1_1_0=OpenLayers.Class(OpenLayers.Format.GML.v3,OpenLayers.Format.Filter.v1,{VERSION:"1.1.0",schemaLocation:"http://www.opengis.net/ogc/filter/1.1.0/filter.xsd",initialize:function(A){OpenLayers.Format.GML.v3.prototype.initialize.apply(this,[A])},readers:{ogc:OpenLayers.Util.applyDefaults({PropertyIsEqualTo:function(B,D){var C=B.getAttribute("matchCase");var A=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.EQUAL_TO,matchCase:!(C==="false"||C==="0")});this.readChildNodes(B,A);D.filters.push(A)},PropertyIsNotEqualTo:function(B,D){var C=B.getAttribute("matchCase");var A=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.NOT_EQUAL_TO,matchCase:!(C==="false"||C==="0")});this.readChildNodes(B,A);D.filters.push(A)},PropertyIsLike:function(D,E){var C=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.LIKE});this.readChildNodes(D,C);var F=D.getAttribute("wildCard");var B=D.getAttribute("singleChar");var A=D.getAttribute("escapeChar");C.value2regex(F,B,A);E.filters.push(C)}},OpenLayers.Format.Filter.v1.prototype.readers.ogc),gml:OpenLayers.Format.GML.v3.prototype.readers.gml,feature:OpenLayers.Format.GML.v3.prototype.readers.feature},writers:{ogc:OpenLayers.Util.applyDefaults({PropertyIsEqualTo:function(A){var B=this.createElementNSPlus("ogc:PropertyIsEqualTo",{attributes:{matchCase:A.matchCase}});this.writeNode("PropertyName",A,B);this.writeNode("Literal",A.value,B);return B},PropertyIsNotEqualTo:function(A){var B=this.createElementNSPlus("ogc:PropertyIsNotEqualTo",{attributes:{matchCase:A.matchCase}});this.writeNode("PropertyName",A,B);this.writeNode("Literal",A.value,B);return B},PropertyIsLike:function(A){var B=this.createElementNSPlus("ogc:PropertyIsLike",{attributes:{wildCard:"*",singleChar:".",escapeChar:"!"}});this.writeNode("PropertyName",A,B);this.writeNode("Literal",A.regex2value(),B);return B},BBOX:function(A){var C=this.createElementNSPlus("ogc:BBOX");this.writeNode("PropertyName",A,C);var B=this.writeNode("gml:Envelope",A.value);if(A.projection){B.setAttribute("srsName",A.projection)}C.appendChild(B);return C}},OpenLayers.Format.Filter.v1.prototype.writers.ogc),gml:OpenLayers.Format.GML.v3.prototype.writers.gml,feature:OpenLayers.Format.GML.v3.prototype.writers.feature},writeSpatial:function(B,A){var C=this.createElementNSPlus("ogc:"+A);this.writeNode("PropertyName",B,C);var D;if(B.value instanceof OpenLayers.Geometry){D=this.writeNode("feature:_geometry",B.value).firstChild}else{D=this.writeNode("gml:Envelope",B.value)}if(B.projection){D.setAttribute("srsName",B.projection)}C.appendChild(D);return C},CLASS_NAME:"OpenLayers.Format.Filter.v1_1_0"});OpenLayers.Format.SOSCapabilities.v1_0_0=OpenLayers.Class(OpenLayers.Format.SOSCapabilities,{namespaces:{ows:"http://www.opengis.net/ows/1.1",sos:"http://www.opengis.net/sos/1.0",gml:"http://www.opengis.net/gml",xlink:"http://www.w3.org/1999/xlink"},regExes:{trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)},initialize:function(A){OpenLayers.Format.XML.prototype.initialize.apply(this,[A]);this.options=A},read:function(B){if(typeof B=="string"){B=OpenLayers.Format.XML.prototype.read.apply(this,[B])}if(B&&B.nodeType==9){B=B.documentElement}var A={};this.readNode(B,A);return A},readers:{gml:OpenLayers.Util.applyDefaults({name:function(A,B){B.name=this.getChildValue(A)},TimePeriod:function(A,B){B.timePeriod={};this.readChildNodes(A,B.timePeriod)},beginPosition:function(B,A){A.beginPosition=this.getChildValue(B)},endPosition:function(B,A){A.endPosition=this.getChildValue(B)}},OpenLayers.Format.GML.v3.prototype.readers.gml),sos:{Capabilities:function(A,B){this.readChildNodes(A,B)},Contents:function(A,B){B.contents={};this.readChildNodes(A,B.contents)},ObservationOfferingList:function(B,A){A.offeringList={};this.readChildNodes(B,A.offeringList)},ObservationOffering:function(B,A){var C=this.getAttributeNS(B,this.namespaces.gml,"id");A[C]={procedures:[],observedProperties:[],featureOfInterestIds:[],responseFormats:[],resultModels:[],responseModes:[]};this.readChildNodes(B,A[C])},time:function(A,B){B.time={};this.readChildNodes(A,B.time)},procedure:function(A,B){B.procedures.push(this.getAttributeNS(A,this.namespaces.xlink,"href"))},observedProperty:function(A,B){B.observedProperties.push(this.getAttributeNS(A,this.namespaces.xlink,"href"))},featureOfInterest:function(A,B){B.featureOfInterestIds.push(this.getAttributeNS(A,this.namespaces.xlink,"href"))},responseFormat:function(A,B){B.responseFormats.push(this.getChildValue(A))},resultModel:function(A,B){B.resultModels.push(this.getChildValue(A))},responseMode:function(A,B){B.responseModes.push(this.getChildValue(A))}},ows:OpenLayers.Format.OWSCommon.v1_1_0.prototype.readers.ows},CLASS_NAME:"OpenLayers.Format.SOSCapabilities.v1_0_0"});OpenLayers.Format.SOSGetFeatureOfInterest=OpenLayers.Class(OpenLayers.Format.XML,{VERSION:"1.0.0",namespaces:{sos:"http://www.opengis.net/sos/1.0",gml:"http://www.opengis.net/gml",sa:"http://www.opengis.net/sampling/1.0",xsi:"http://www.w3.org/2001/XMLSchema-instance"},schemaLocation:"http://www.opengis.net/sos/1.0 http://schemas.opengis.net/sos/1.0.0/sosAll.xsd",defaultPrefix:"sos",regExes:{trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)},initialize:function(A){OpenLayers.Format.XML.prototype.initialize.apply(this,[A])},read:function(F){if(typeof F=="string"){F=OpenLayers.Format.XML.prototype.read.apply(this,[F])}if(F&&F.nodeType==9){F=F.documentElement}var G={features:[]};this.readNode(F,G);var E=[];for(var D=0,A=G.features.length;D<A;D++){var B=G.features[D];if(this.internalProjection&&this.externalProjection&&B.components[0]){B.components[0].transform(this.externalProjection,this.internalProjection)}var C=new OpenLayers.Feature.Vector(B.components[0],B.attributes);E.push(C)}return E},readers:{sa:{SamplingPoint:function(B,C){if(!C.attributes){var A={attributes:{}};C.features.push(A);C=A}C.attributes.id=this.getAttributeNS(B,this.namespaces.gml,"id");this.readChildNodes(B,C)},position:function(A,B){this.readChildNodes(A,B)}},gml:OpenLayers.Util.applyDefaults({FeatureCollection:function(A,B){this.readChildNodes(A,B)},featureMember:function(B,C){var A={attributes:{}};C.features.push(A);this.readChildNodes(B,A)},name:function(A,B){B.attributes.name=this.getChildValue(A)},pos:function(A,B){if(!this.externalProjection){this.externalProjection=new OpenLayers.Projection(A.getAttribute("srsName"))}OpenLayers.Format.GML.v3.prototype.readers.gml.pos.apply(this,[A,B])}},OpenLayers.Format.GML.v3.prototype.readers.gml)},writers:{sos:{GetFeatureOfInterest:function(B){var D=this.createElementNSPlus("GetFeatureOfInterest",{attributes:{version:this.VERSION,service:"SOS","xsi:schemaLocation":this.schemaLocation}});for(var C=0,A=B.fois.length;C<A;C++){this.writeNode("FeatureOfInterestId",{foi:B.fois[C]},D)}return D},FeatureOfInterestId:function(A){var B=this.createElementNSPlus("FeatureOfInterestId",{value:A.foi});return B}}},CLASS_NAME:"OpenLayers.Format.SOSGetFeatureOfInterest"});OpenLayers.Format.SOSGetObservation=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{ows:"http://www.opengis.net/ows",gml:"http://www.opengis.net/gml",sos:"http://www.opengis.net/sos/1.0",ogc:"http://www.opengis.net/ogc",om:"http://www.opengis.net/om/1.0",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},regExes:{trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)},VERSION:"1.0.0",schemaLocation:"http://www.opengis.net/sos/1.0 http://schemas.opengis.net/sos/1.0.0/sosGetObservation.xsd",defaultPrefix:"sos",initialize:function(A){OpenLayers.Format.XML.prototype.initialize.apply(this,[A])},read:function(A){if(typeof A=="string"){A=OpenLayers.Format.XML.prototype.read.apply(this,[A])}if(A&&A.nodeType==9){A=A.documentElement}var B={measurements:[]};this.readNode(A,B);return B},write:function(A){var B=this.writeNode("sos:GetObservation",A);B.setAttribute("xmlns:om",this.namespaces.om);this.setAttributeNS(B,this.namespaces.xsi,"xsi:schemaLocation",this.schemaLocation);return OpenLayers.Format.XML.prototype.write.apply(this,[B])},readers:{om:{ObservationCollection:function(A,B){B.id=this.getAttributeNS(A,this.namespaces.gml,"id");this.readChildNodes(A,B)},member:function(A,B){this.readChildNodes(A,B)},Measurement:function(B,C){var A={};C.measurements.push(A);this.readChildNodes(B,A)},samplingTime:function(B,A){var C={};A.samplingTime=C;this.readChildNodes(B,C)},observedProperty:function(B,A){A.observedProperty=this.getAttributeNS(B,this.namespaces.xlink,"href");this.readChildNodes(B,A)},procedure:function(B,A){A.procedure=this.getAttributeNS(B,this.namespaces.xlink,"href");this.readChildNodes(B,A)},result:function(C,B){var A={};B.result=A;if(this.getChildValue(C)!==""){A.value=this.getChildValue(C);A.uom=C.getAttribute("uom")}else{this.readChildNodes(C,A)}}},gml:OpenLayers.Util.applyDefaults({TimeInstant:function(A,B){var C={};B.timeInstant=C;this.readChildNodes(A,C)},timePosition:function(A,B){B.timePosition=this.getChildValue(A)}},OpenLayers.Format.GML.v3.prototype.readers.gml)},writers:{sos:{GetObservation:function(A){var B=this.createElementNSPlus("GetObservation",{attributes:{version:this.VERSION,service:"SOS"}});this.writeNode("offering",A,B);this.writeNode("eventTime",A,B);this.writeNode("procedure",A,B);this.writeNode("observedProperty",A,B);this.writeNode("responseFormat",A,B);this.writeNode("resultModel",A,B);this.writeNode("responseMode",A,B);return B},responseFormat:function(A){return this.createElementNSPlus("responseFormat",{value:A.responseFormat})},procedure:function(A){return this.createElementNSPlus("procedure",{value:A.procedure})},offering:function(A){return this.createElementNSPlus("offering",{value:A.offering})},observedProperty:function(A){return this.createElementNSPlus("observedProperty",{value:A.observedProperty})},eventTime:function(A){var B=this.createElementNSPlus("eventTime");if(A.eventTime==="latest"){this.writeNode("ogc:TM_Equals",A,B)}return B},resultModel:function(A){return this.createElementNSPlus("resultModel",{value:A.resultModel})},responseMode:function(A){return this.createElementNSPlus("responseMode",{value:A.responseMode})}},ogc:{TM_Equals:function(A){var B=this.createElementNSPlus("ogc:TM_Equals");this.writeNode("ogc:PropertyName",{property:"urn:ogc:data:time:iso8601"},B);if(A.eventTime==="latest"){this.writeNode("gml:TimeInstant",{value:"latest"},B)}return B},PropertyName:function(A){return this.createElementNSPlus("ogc:PropertyName",{value:A.property})}},gml:{TimeInstant:function(A){var B=this.createElementNSPlus("gml:TimeInstant");this.writeNode("gml:timePosition",A,B);return B},timePosition:function(A){var B=this.createElementNSPlus("gml:timePosition",{value:A.value});return B}}},CLASS_NAME:"OpenLayers.Format.SOSGetObservation"});OpenLayers.Format.CSWGetRecords.v2_0_2=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance",csw:"http://www.opengis.net/cat/csw/2.0.2",dc:"http://purl.org/dc/elements/1.1/",dct:"http://purl.org/dc/terms/",ows:"http://www.opengis.net/ows"},defaultPrefix:"csw",version:"2.0.2",schemaLocation:"http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd",requestId:null,resultType:null,outputFormat:null,outputSchema:null,startPosition:null,maxRecords:null,DistributedSearch:null,ResponseHandler:null,Query:null,regExes:{trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)},initialize:function(A){OpenLayers.Format.XML.prototype.initialize.apply(this,[A])},read:function(A){if(typeof A=="string"){A=OpenLayers.Format.XML.prototype.read.apply(this,[A])}if(A&&A.nodeType==9){A=A.documentElement}var B={};this.readNode(A,B);return B},readers:{csw:{GetRecordsResponse:function(B,C){C.records=[];this.readChildNodes(B,C);var A=this.getAttributeNS(B,"","version");if(A!=""){C.version=A}},RequestId:function(A,B){B.RequestId=this.getChildValue(A)},SearchStatus:function(A,C){C.SearchStatus={};var B=this.getAttributeNS(A,"","timestamp");if(B!=""){C.SearchStatus.timestamp=B}},SearchResults:function(D,E){this.readChildNodes(D,E);var B=D.attributes;var F={};for(var C=0,A=B.length;C<A;++C){if((B[C].name=="numberOfRecordsMatched")||(B[C].name=="numberOfRecordsReturned")||(B[C].name=="nextRecord")){F[B[C].name]=parseInt(B[C].nodeValue)}else{F[B[C].name]=B[C].nodeValue}}E.SearchResults=F},SummaryRecord:function(B,C){var A={type:"SummaryRecord"};this.readChildNodes(B,A);C.records.push(A)},BriefRecord:function(B,C){var A={type:"BriefRecord"};this.readChildNodes(B,A);C.records.push(A)},DCMIRecord:function(B,C){var A={type:"DCMIRecord"};this.readChildNodes(B,A);C.records.push(A)},Record:function(B,C){var A={type:"Record"};this.readChildNodes(B,A);C.records.push(A)}},dc:{"*":function(F,G){var D=F.localName||F.nodeName.split(":").pop();if(!(G[D] instanceof Array)){G[D]=new Array()}var C={};var B=F.attributes;for(var E=0,A=B.length;E<A;++E){C[B[E].name]=B[E].nodeValue}C.value=this.getChildValue(F);G[D].push(C)}},dct:{"*":function(B,C){var A=B.localName||B.nodeName.split(":").pop();if(!(C[A] instanceof Array)){C[A]=new Array()}C[A].push(this.getChildValue(B))}},ows:OpenLayers.Util.applyDefaults({BoundingBox:function(A,B){if(B.bounds){B.BoundingBox=[{crs:B.projection,value:[B.bounds.left,B.bounds.bottom,B.bounds.right,B.bounds.top]}];delete B.projection;delete B.bounds}OpenLayers.Format.OWSCommon.v1_0_0.prototype.readers.ows["BoundingBox"].apply(this,arguments)}},OpenLayers.Format.OWSCommon.v1_0_0.prototype.readers.ows)},write:function(A){var B=this.writeNode("csw:GetRecords",A);return OpenLayers.Format.XML.prototype.write.apply(this,[B])},writers:{csw:{GetRecords:function(B){if(!B){B={}}var E=this.createElementNSPlus("csw:GetRecords",{attributes:{service:"CSW",version:this.version,requestId:B.requestId||this.requestId,resultType:B.resultType||this.resultType,outputFormat:B.outputFormat||this.outputFormat,outputSchema:B.outputSchema||this.outputSchema,startPosition:B.startPosition||this.startPosition,maxRecords:B.maxRecords||this.maxRecords}});if(B.DistributedSearch||this.DistributedSearch){this.writeNode("csw:DistributedSearch",B.DistributedSearch||this.DistributedSearch,E)}var D=B.ResponseHandler||this.ResponseHandler;if(D instanceof Array&&D.length>0){for(var C=0,A=D.length;C<A;C++){this.writeNode("csw:ResponseHandler",D[C],E)}}this.writeNode("Query",B.Query||this.Query,E);return E},DistributedSearch:function(A){var B=this.createElementNSPlus("csw:DistributedSearch",{attributes:{hopCount:A.hopCount}});return B},ResponseHandler:function(A){var B=this.createElementNSPlus("csw:ResponseHandler",{value:A.value});return B},Query:function(B){if(!B){B={}}var E=this.createElementNSPlus("csw:Query",{attributes:{typeNames:B.typeNames||"csw:Record"}});var D=B.ElementName;if(D instanceof Array&&D.length>0){for(var C=0,A=D.length;C<A;C++){this.writeNode("csw:ElementName",D[C],E)}}else{this.writeNode("csw:ElementSetName",B.ElementSetName||{value:"summary"},E)}if(B.Constraint){this.writeNode("csw:Constraint",B.Constraint,E)}return E},ElementName:function(A){var B=this.createElementNSPlus("csw:ElementName",{value:A.value});return B},ElementSetName:function(A){var B=this.createElementNSPlus("csw:ElementSetName",{attributes:{typeNames:A.typeNames},value:A.value});return B},Constraint:function(A){var B=this.createElementNSPlus("csw:Constraint",{attributes:{version:A.version}});if(A.Filter){var C=new OpenLayers.Format.Filter({version:A.version});B.appendChild(C.write(A.Filter))}else{if(A.CqlText){var D=this.createElementNSPlus("CqlText",{value:A.CqlText.value});B.appendChild(D)}}return B}}},CLASS_NAME:"OpenLayers.Format.CSWGetRecords.v2_0_2"});OpenLayers.Format.SLD.v1=OpenLayers.Class(OpenLayers.Format.Filter.v1_0_0,{namespaces:{sld:"http://www.opengis.net/sld",ogc:"http://www.opengis.net/ogc",gml:"http://www.opengis.net/gml",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},defaultPrefix:"sld",schemaLocation:null,multipleSymbolizers:false,featureTypeCounter:null,defaultSymbolizer:{fillColor:"#808080",fillOpacity:1,strokeColor:"#000000",strokeOpacity:1,strokeWidth:1,strokeDashstyle:"solid",pointRadius:3,graphicName:"square"},initialize:function(A){OpenLayers.Format.Filter.v1_0_0.prototype.initialize.apply(this,[A])},read:function(C,A){A=OpenLayers.Util.applyDefaults(A,this.options);var B={namedLayers:A.namedLayersAsArray===true?[]:{}};this.readChildNodes(C,B);return B},readers:OpenLayers.Util.applyDefaults({sld:{StyledLayerDescriptor:function(A,B){B.version=A.getAttribute("version");this.readChildNodes(A,B)},Name:function(A,B){B.name=this.getChildValue(A)},Title:function(A,B){B.title=this.getChildValue(A)},Abstract:function(A,B){B.description=this.getChildValue(A)},NamedLayer:function(D,E){var C={userStyles:[],namedStyles:[]};this.readChildNodes(D,C);for(var B=0,A=C.userStyles.length;B<A;++B){C.userStyles[B].layerName=C.name}if(E.namedLayers instanceof Array){E.namedLayers.push(C)}else{E.namedLayers[C.name]=C}},NamedStyle:function(B,A){A.namedStyles.push(this.getChildName(B.firstChild))},UserStyle:function(C,A){var D={defaultsPerSymbolizer:true,rules:[]};this.featureTypeCounter=-1;this.readChildNodes(C,D);var B;if(this.multipleSymbolizers){delete D.defaultsPerSymbolizer;B=new OpenLayers.Style2(D)}else{B=new OpenLayers.Style(this.defaultSymbolizer,D)}A.userStyles.push(B)},IsDefault:function(B,A){if(this.getChildValue(B)=="1"){A.isDefault=true}},FeatureTypeStyle:function(B,A){++this.featureTypeCounter;var C={rules:this.multipleSymbolizers?A.rules:[]};this.readChildNodes(B,C);if(!this.multipleSymbolizers){A.rules=C.rules}},Rule:function(B,D){var A;if(this.multipleSymbolizers){A={symbolizers:[]}}var C=new OpenLayers.Rule(A);this.readChildNodes(B,C);D.rules.push(C)},ElseFilter:function(A,B){B.elseFilter=true},MinScaleDenominator:function(A,B){B.minScaleDenominator=parseFloat(this.getChildValue(A))},MaxScaleDenominator:function(A,B){B.maxScaleDenominator=parseFloat(this.getChildValue(A))},TextSymbolizer:function(B,C){var A={};this.readChildNodes(B,A);if(this.multipleSymbolizers){A.zIndex=this.featureTypeCounter;C.symbolizers.push(new OpenLayers.Symbolizer.Text(A))}else{C.symbolizer.Text=OpenLayers.Util.applyDefaults(A,C.symbolizer.Text)}},Label:function(B,A){var D={};this.readChildNodes(B,D);if(D.property){A.label="${"+D.property+"}"}else{var C=this.readOgcExpression(B);if(C){A.label=C}}},Font:function(B,A){this.readChildNodes(B,A)},Halo:function(B,A){var C={};this.readChildNodes(B,C);A.haloRadius=C.haloRadius;A.haloColor=C.fillColor;A.haloOpacity=C.fillOpacity},Radius:function(C,B){var A=this.readOgcExpression(C);if(A!=null){B.haloRadius=A}},RasterSymbolizer:function(B,C){var A={};this.readChildNodes(B,A);if(this.multipleSymbolizers){A.zIndex=this.featureTypeCounter;C.symbolizers.push(new OpenLayers.Symbolizer.Raster(A))}else{C.symbolizer.Raster=OpenLayers.Util.applyDefaults(A,C.symbolizer.Raster)}},Geometry:function(A,B){B.geometry={};this.readChildNodes(A,B.geometry)},ColorMap:function(B,A){A.colorMap=[];this.readChildNodes(B,A.colorMap)},ColorMapEntry:function(B,A){var C=B.getAttribute("quantity");var D=B.getAttribute("opacity");A.push({color:B.getAttribute("color"),quantity:C!==null?parseFloat(C):undefined,label:B.getAttribute("label")||undefined,opacity:D!==null?parseFloat(D):undefined})},LineSymbolizer:function(B,C){var A={};this.readChildNodes(B,A);if(this.multipleSymbolizers){A.zIndex=this.featureTypeCounter;C.symbolizers.push(new OpenLayers.Symbolizer.Line(A))}else{C.symbolizer.Line=OpenLayers.Util.applyDefaults(A,C.symbolizer.Line)}},PolygonSymbolizer:function(B,C){var A={fill:false,stroke:false};if(!this.multipleSymbolizers){A=C.symbolizer.Polygon||A}this.readChildNodes(B,A);if(this.multipleSymbolizers){A.zIndex=this.featureTypeCounter;C.symbolizers.push(new OpenLayers.Symbolizer.Polygon(A))}else{C.symbolizer.Polygon=A}},PointSymbolizer:function(B,C){var A={fill:false,stroke:false,graphic:false};if(!this.multipleSymbolizers){A=C.symbolizer.Point||A}this.readChildNodes(B,A);if(this.multipleSymbolizers){A.zIndex=this.featureTypeCounter;C.symbolizers.push(new OpenLayers.Symbolizer.Point(A))}else{C.symbolizer.Point=A}},Stroke:function(B,A){A.stroke=true;this.readChildNodes(B,A)},Fill:function(B,A){A.fill=true;this.readChildNodes(B,A)},CssParameter:function(C,B){var A=C.getAttribute("name");var E=this.cssMap[A];if(E){var D=this.readOgcExpression(C);if(D){B[E]=D}}},Graphic:function(E,D){D.graphic=true;var H={};this.readChildNodes(E,H);var C=["stroke","strokeColor","strokeWidth","strokeOpacity","strokeLinecap","fill","fillColor","fillOpacity","graphicName","rotation","graphicFormat"];var G,F;for(var B=0,A=C.length;B<A;++B){G=C[B];F=H[G];if(F!=undefined){D[G]=F}}if(H.opacity!=undefined){D.graphicOpacity=H.opacity}if(H.size!=undefined){D.pointRadius=H.size/2}if(H.href!=undefined){D.externalGraphic=H.href}if(H.rotation!=undefined){D.rotation=H.rotation}},ExternalGraphic:function(A,B){this.readChildNodes(A,B)},Mark:function(A,B){this.readChildNodes(A,B)},WellKnownName:function(A,B){B.graphicName=this.getChildValue(A)},Opacity:function(B,C){var A=this.readOgcExpression(B);if(A){C.opacity=A}},Size:function(B,C){var A=this.readOgcExpression(B);if(A){C.size=A}},Rotation:function(B,C){var A=this.readOgcExpression(B);if(A){C.rotation=A}},OnlineResource:function(A,B){B.href=this.getAttributeNS(A,this.namespaces.xlink,"href")},Format:function(A,B){B.graphicFormat=this.getChildValue(A)}}},OpenLayers.Format.Filter.v1_0_0.prototype.readers),cssMap:{stroke:"strokeColor","stroke-opacity":"strokeOpacity","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-dasharray":"strokeDashstyle",fill:"fillColor","fill-opacity":"fillOpacity","font-family":"fontFamily","font-size":"fontSize","font-weight":"fontWeight","font-style":"fontStyle"},getCssProperty:function(A){var B=null;for(var C in this.cssMap){if(this.cssMap[C]==A){B=C;break}}return B},getGraphicFormat:function(A){var D,C;for(var B in this.graphicFormats){if(this.graphicFormats[B].test(A)){D=B;break}}return D||this.defautlGraphicFormat},defaultGraphicFormat:"image/png",graphicFormats:{"image/jpeg":/\.jpe?g$/i,"image/gif":/\.gif$/i,"image/png":/\.png$/i},write:function(A){return this.writers.sld.StyledLayerDescriptor.apply(this,[A])},writers:OpenLayers.Util.applyDefaults({sld:{StyledLayerDescriptor:function(E){var B=this.createElementNSPlus("sld:StyledLayerDescriptor",{attributes:{version:this.VERSION,"xsi:schemaLocation":this.schemaLocation}});B.setAttribute("xmlns:ogc",this.namespaces.ogc);B.setAttribute("xmlns:gml",this.namespaces.gml);if(E.name){this.writeNode("Name",E.name,B)}if(E.title){this.writeNode("Title",E.title,B)}if(E.description){this.writeNode("Abstract",E.description,B)}if(E.namedLayers instanceof Array){for(var D=0,A=E.namedLayers.length;D<A;++D){this.writeNode("NamedLayer",E.namedLayers[D],B)}}else{for(var C in E.namedLayers){this.writeNode("NamedLayer",E.namedLayers[C],B)}}return B},Name:function(A){return this.createElementNSPlus("sld:Name",{value:A})},Title:function(A){return this.createElementNSPlus("sld:Title",{value:A})},Abstract:function(A){return this.createElementNSPlus("sld:Abstract",{value:A})},NamedLayer:function(C){var D=this.createElementNSPlus("sld:NamedLayer");this.writeNode("Name",C.name,D);if(C.namedStyles){for(var B=0,A=C.namedStyles.length;B<A;++B){this.writeNode("NamedStyle",C.namedStyles[B],D)}}if(C.userStyles){for(var B=0,A=C.userStyles.length;B<A;++B){this.writeNode("UserStyle",C.userStyles[B],D)}}return D},NamedStyle:function(A){var B=this.createElementNSPlus("sld:NamedStyle");this.writeNode("Name",A,B);return B},UserStyle:function(B){var D=this.createElementNSPlus("sld:UserStyle");if(B.name){this.writeNode("Name",B.name,D)}if(B.title){this.writeNode("Title",B.title,D)}if(B.description){this.writeNode("Abstract",B.description,D)}if(B.isDefault){this.writeNode("IsDefault",B.isDefault,D)}if(this.multipleSymbolizers&&B.rules){var K={0:[]};var C=[0];var J,A,N,I,H;for(var F=0,M=B.rules.length;F<M;++F){J=B.rules[F];if(J.symbolizers){A={};for(var E=0,G=J.symbolizers.length;E<G;++E){N=J.symbolizers[E];I=N.zIndex;if(!(I in A)){H=J.clone();H.symbolizers=[];A[I]=H}A[I].symbolizers.push(N.clone())}for(I in A){if(!(I in K)){C.push(I);K[I]=[]}K[I].push(A[I])}}else{K[0].push(J.clone())}}C.sort();var L;for(var F=0,M=C.length;F<M;++F){L=K[C[F]];if(L.length>0){H=B.clone();H.rules=K[C[F]];this.writeNode("FeatureTypeStyle",H,D)}}}else{this.writeNode("FeatureTypeStyle",B,D)}return D},IsDefault:function(A){return this.createElementNSPlus("sld:IsDefault",{value:(A)?"1":"0"})},FeatureTypeStyle:function(C){var D=this.createElementNSPlus("sld:FeatureTypeStyle");for(var B=0,A=C.rules.length;B<A;++B){this.writeNode("Rule",C.rules[B],D)}return D},Rule:function(H){var G=this.createElementNSPlus("sld:Rule");if(H.name){this.writeNode("Name",H.name,G)}if(H.title){this.writeNode("Title",H.title,G)}if(H.description){this.writeNode("Abstract",H.description,G)}if(H.elseFilter){this.writeNode("ElseFilter",null,G)}else{if(H.filter){this.writeNode("ogc:Filter",H.filter,G)}}if(H.minScaleDenominator!=undefined){this.writeNode("MinScaleDenominator",H.minScaleDenominator,G)}if(H.maxScaleDenominator!=undefined){this.writeNode("MaxScaleDenominator",H.maxScaleDenominator,G)}var F,E;if(this.multipleSymbolizers&&H.symbolizers){var E;for(var C=0,D=H.symbolizers.length;C<D;++C){E=H.symbolizers[C];F=E.CLASS_NAME.split(".").pop();this.writeNode(F+"Symbolizer",E,G)}}else{var B=OpenLayers.Style.SYMBOLIZER_PREFIXES;for(var C=0,A=B.length;C<A;++C){F=B[C];E=H.symbolizer[F];if(E){this.writeNode(F+"Symbolizer",E,G)}}}return G},ElseFilter:function(){return this.createElementNSPlus("sld:ElseFilter")},MinScaleDenominator:function(A){return this.createElementNSPlus("sld:MinScaleDenominator",{value:A})},MaxScaleDenominator:function(A){return this.createElementNSPlus("sld:MaxScaleDenominator",{value:A})},LineSymbolizer:function(A){var B=this.createElementNSPlus("sld:LineSymbolizer");this.writeNode("Stroke",A,B);return B},Stroke:function(A){var B=this.createElementNSPlus("sld:Stroke");if(A.strokeColor!=undefined){this.writeNode("CssParameter",{symbolizer:A,key:"strokeColor"},B)}if(A.strokeOpacity!=undefined){this.writeNode("CssParameter",{symbolizer:A,key:"strokeOpacity"},B)}if(A.strokeWidth!=undefined){this.writeNode("CssParameter",{symbolizer:A,key:"strokeWidth"},B)}if(A.strokeDashstyle!=undefined&&A.strokeDashstyle!=="solid"){this.writeNode("CssParameter",{symbolizer:A,key:"strokeDashstyle"},B)}if(A.strokeLinecap!=undefined){this.writeNode("CssParameter",{symbolizer:A,key:"strokeLinecap"},B)}return B},CssParameter:function(A){return this.createElementNSPlus("sld:CssParameter",{attributes:{name:this.getCssProperty(A.key)},value:A.symbolizer[A.key]})},TextSymbolizer:function(A){var B=this.createElementNSPlus("sld:TextSymbolizer");if(A.label!=null){this.writeNode("Label",A.label,B)}if(A.fontFamily!=null||A.fontSize!=null||A.fontWeight!=null||A.fontStyle!=null){this.writeNode("Font",A,B)}if(A.haloRadius!=null||A.haloColor!=null||A.haloOpacity!=null){this.writeNode("Halo",A,B)}if(A.fillColor!=null||A.fillOpacity!=null){this.writeNode("Fill",A,B)}return B},Font:function(A){var B=this.createElementNSPlus("sld:Font");if(A.fontFamily){this.writeNode("CssParameter",{symbolizer:A,key:"fontFamily"},B)}if(A.fontSize){this.writeNode("CssParameter",{symbolizer:A,key:"fontSize"},B)}if(A.fontWeight){this.writeNode("CssParameter",{symbolizer:A,key:"fontWeight"},B)}if(A.fontStyle){this.writeNode("CssParameter",{symbolizer:A,key:"fontStyle"},B)}return B},Label:function(B){var F=this.createElementNSPlus("sld:Label");var G=B.split("${");F.appendChild(this.createTextNode(G[0]));var E,D;for(var C=1,A=G.length;C<A;C++){E=G[C];D=E.indexOf("}");if(D>0){this.writeNode("ogc:PropertyName",{property:E.substring(0,D)},F);F.appendChild(this.createTextNode(E.substring(++D)))}else{F.appendChild(this.createTextNode("${"+E))}}return F},Halo:function(A){var B=this.createElementNSPlus("sld:Halo");if(A.haloRadius){this.writeNode("Radius",A.haloRadius,B)}if(A.haloColor||A.haloOpacity){this.writeNode("Fill",{fillColor:A.haloColor,fillOpacity:A.haloOpacity},B)}return B},Radius:function(A){return this.createElementNSPlus("sld:Radius",{value:A})},RasterSymbolizer:function(A){var B=this.createElementNSPlus("sld:RasterSymbolizer");if(A.geometry){this.writeNode("Geometry",A.geometry,B)}if(A.opacity){this.writeNode("Opacity",A.opacity,B)}if(A.colorMap){this.writeNode("ColorMap",A.colorMap,B)}return B},Geometry:function(B){var A=this.createElementNSPlus("sld:Geometry");if(B.property){this.writeNode("ogc:PropertyName",B,A)}return A},ColorMap:function(B){var D=this.createElementNSPlus("sld:ColorMap");for(var C=0,A=B.length;C<A;++C){this.writeNode("ColorMapEntry",B[C],D)}return D},ColorMapEntry:function(B){var C=this.createElementNSPlus("sld:ColorMapEntry");var A=B;C.setAttribute("color",A.color);A.opacity!==undefined&&C.setAttribute("opacity",parseFloat(A.opacity));A.quantity!==undefined&&C.setAttribute("quantity",parseFloat(A.quantity));A.label!==undefined&&C.setAttribute("label",A.label);return C},PolygonSymbolizer:function(A){var B=this.createElementNSPlus("sld:PolygonSymbolizer");if(A.fill!==false){this.writeNode("Fill",A,B)}if(A.stroke!==false){this.writeNode("Stroke",A,B)}return B},Fill:function(A){var B=this.createElementNSPlus("sld:Fill");if(A.fillColor){this.writeNode("CssParameter",{symbolizer:A,key:"fillColor"},B)}if(A.fillOpacity!=null){this.writeNode("CssParameter",{symbolizer:A,key:"fillOpacity"},B)}return B},PointSymbolizer:function(A){var B=this.createElementNSPlus("sld:PointSymbolizer");this.writeNode("Graphic",A,B);return B},Graphic:function(A){var B=this.createElementNSPlus("sld:Graphic");if(A.externalGraphic!=undefined){this.writeNode("ExternalGraphic",A,B)}else{this.writeNode("Mark",A,B)}if(A.graphicOpacity!=undefined){this.writeNode("Opacity",A.graphicOpacity,B)}if(A.pointRadius!=undefined){this.writeNode("Size",A.pointRadius*2,B)}if(A.rotation!=undefined){this.writeNode("Rotation",A.rotation,B)}return B},ExternalGraphic:function(A){var B=this.createElementNSPlus("sld:ExternalGraphic");this.writeNode("OnlineResource",A.externalGraphic,B);var C=A.graphicFormat||this.getGraphicFormat(A.externalGraphic);this.writeNode("Format",C,B);return B},Mark:function(A){var B=this.createElementNSPlus("sld:Mark");if(A.graphicName){this.writeNode("WellKnownName",A.graphicName,B)}if(A.fill!==false){this.writeNode("Fill",A,B)}if(A.stroke!==false){this.writeNode("Stroke",A,B)}return B},WellKnownName:function(A){return this.createElementNSPlus("sld:WellKnownName",{value:A})},Opacity:function(A){return this.createElementNSPlus("sld:Opacity",{value:A})},Size:function(A){return this.createElementNSPlus("sld:Size",{value:A})},Rotation:function(A){return this.createElementNSPlus("sld:Rotation",{value:A})},OnlineResource:function(A){return this.createElementNSPlus("sld:OnlineResource",{attributes:{"xlink:type":"simple","xlink:href":A}})},Format:function(A){return this.createElementNSPlus("sld:Format",{value:A})}}},OpenLayers.Format.Filter.v1_0_0.prototype.writers),CLASS_NAME:"OpenLayers.Format.SLD.v1"});OpenLayers.Format.WFST.v1_0_0=OpenLayers.Class(OpenLayers.Format.Filter.v1_0_0,OpenLayers.Format.WFST.v1,{version:"1.0.0",srsNameInQuery:false,schemaLocations:{wfs:"http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd"},initialize:function(A){OpenLayers.Format.Filter.v1_0_0.prototype.initialize.apply(this,[A]);OpenLayers.Format.WFST.v1.prototype.initialize.apply(this,[A])},readers:{wfs:OpenLayers.Util.applyDefaults({WFS_TransactionResponse:function(A,B){B.insertIds=[];B.success=false;this.readChildNodes(A,B)},InsertResult:function(B,A){var C={fids:[]};this.readChildNodes(B,C);A.insertIds.push(C.fids[0])},TransactionResult:function(A,B){this.readChildNodes(A,B)},Status:function(A,B){this.readChildNodes(A,B)},SUCCESS:function(A,B){B.success=true}},OpenLayers.Format.WFST.v1.prototype.readers.wfs),gml:OpenLayers.Format.GML.v2.prototype.readers.gml,feature:OpenLayers.Format.GML.v2.prototype.readers.feature,ogc:OpenLayers.Format.Filter.v1_0_0.prototype.readers.ogc},writers:{wfs:OpenLayers.Util.applyDefaults({Query:function(B){B=OpenLayers.Util.extend({featureNS:this.featureNS,featurePrefix:this.featurePrefix,featureType:this.featureType,srsName:this.srsName,srsNameInQuery:this.srsNameInQuery},B);var D=this.createElementNSPlus("wfs:Query",{attributes:{typeName:(B.featureNS?B.featurePrefix+":":"")+B.featureType}});if(B.srsNameInQuery&&B.srsName){D.setAttribute("srsName",B.srsName)}if(B.featureNS){D.setAttribute("xmlns:"+B.featurePrefix,B.featureNS)}if(B.propertyNames){for(var C=0,A=B.propertyNames.length;C<A;C++){this.writeNode("ogc:PropertyName",{property:B.propertyNames[C]},D)}}if(B.filter){this.setFilterProperty(B.filter);this.writeNode("ogc:Filter",B.filter,D)}return D}},OpenLayers.Format.WFST.v1.prototype.writers.wfs),gml:OpenLayers.Format.GML.v2.prototype.writers.gml,feature:OpenLayers.Format.GML.v2.prototype.writers.feature,ogc:OpenLayers.Format.Filter.v1_0_0.prototype.writers.ogc},CLASS_NAME:"OpenLayers.Format.WFST.v1_0_0"});OpenLayers.Format.WFST.v1_1_0=OpenLayers.Class(OpenLayers.Format.Filter.v1_1_0,OpenLayers.Format.WFST.v1,{version:"1.1.0",schemaLocations:{wfs:"http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"},initialize:function(A){OpenLayers.Format.Filter.v1_1_0.prototype.initialize.apply(this,[A]);OpenLayers.Format.WFST.v1.prototype.initialize.apply(this,[A])},readers:{wfs:OpenLayers.Util.applyDefaults({FeatureCollection:function(A,B){B.numberOfFeatures=parseInt(A.getAttribute("numberOfFeatures"));OpenLayers.Format.WFST.v1.prototype.readers.wfs["FeatureCollection"].apply(this,arguments)},TransactionResponse:function(A,B){B.insertIds=[];B.success=false;this.readChildNodes(A,B)},TransactionSummary:function(A,B){B.success=true},InsertResults:function(A,B){this.readChildNodes(A,B)},Feature:function(B,A){var C={fids:[]};this.readChildNodes(B,C);A.insertIds.push(C.fids[0])}},OpenLayers.Format.WFST.v1.prototype.readers.wfs),gml:OpenLayers.Format.GML.v3.prototype.readers.gml,feature:OpenLayers.Format.GML.v3.prototype.readers.feature,ogc:OpenLayers.Format.Filter.v1_1_0.prototype.readers.ogc},writers:{wfs:OpenLayers.Util.applyDefaults({GetFeature:function(A){var B=OpenLayers.Format.WFST.v1.prototype.writers.wfs["GetFeature"].apply(this,arguments);A&&A.resultType&&this.setAttributes(B,{resultType:A.resultType});return B},Query:function(B){B=OpenLayers.Util.extend({featureNS:this.featureNS,featurePrefix:this.featurePrefix,featureType:this.featureType,srsName:this.srsName},B);var D=this.createElementNSPlus("wfs:Query",{attributes:{typeName:(B.featureNS?B.featurePrefix+":":"")+B.featureType,srsName:B.srsName}});if(B.featureNS){D.setAttribute("xmlns:"+B.featurePrefix,B.featureNS)}if(B.propertyNames){for(var C=0,A=B.propertyNames.length;C<A;C++){this.writeNode("wfs:PropertyName",{property:B.propertyNames[C]},D)}}if(B.filter){this.setFilterProperty(B.filter);this.writeNode("ogc:Filter",B.filter,D)}return D},PropertyName:function(A){return this.createElementNSPlus("wfs:PropertyName",{value:A.property})}},OpenLayers.Format.WFST.v1.prototype.writers.wfs),gml:OpenLayers.Format.GML.v3.prototype.writers.gml,feature:OpenLayers.Format.GML.v3.prototype.writers.feature,ogc:OpenLayers.Format.Filter.v1_1_0.prototype.writers.ogc},CLASS_NAME:"OpenLayers.Format.WFST.v1_1_0"});OpenLayers.Protocol.SOS.v1_0_0=OpenLayers.Class(OpenLayers.Protocol,{fois:null,formatOptions:null,initialize:function(A){OpenLayers.Protocol.prototype.initialize.apply(this,[A]);if(!A.format){this.format=new OpenLayers.Format.SOSGetFeatureOfInterest(this.formatOptions)}},destroy:function(){if(this.options&&!this.options.format){this.format.destroy()}this.format=null;OpenLayers.Protocol.prototype.destroy.apply(this)},read:function(B){B=OpenLayers.Util.extend({},B);OpenLayers.Util.applyDefaults(B,this.options||{});var A=new OpenLayers.Protocol.Response({requestType:"read"});var D=this.format;var C=OpenLayers.Format.XML.prototype.write.apply(D,[D.writeNode("sos:GetFeatureOfInterest",{fois:this.fois})]);A.priv=OpenLayers.Request.POST({url:B.url,callback:this.createCallback(this.handleRead,A,B),data:C});return A},handleRead:function(A,B){if(B.callback){var C=A.priv;if(C.status>=200&&C.status<300){A.features=this.parseFeatures(C);A.code=OpenLayers.Protocol.Response.SUCCESS}else{A.code=OpenLayers.Protocol.Response.FAILURE}B.callback.call(B.scope,A)}},parseFeatures:function(A){var B=A.responseXML;if(!B||!B.documentElement){B=A.responseText}if(!B||B.length<=0){return null}return this.format.read(B)},CLASS_NAME:"OpenLayers.Protocol.SOS.v1_0_0"});OpenLayers.Format.SLD.v1_0_0=OpenLayers.Class(OpenLayers.Format.SLD.v1,{VERSION:"1.0.0",schemaLocation:"http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd",initialize:function(A){OpenLayers.Format.SLD.v1.prototype.initialize.apply(this,[A])},CLASS_NAME:"OpenLayers.Format.SLD.v1_0_0"});OpenLayers.Protocol.WFS.v1_0_0=OpenLayers.Class(OpenLayers.Protocol.WFS.v1,{version:"1.0.0",CLASS_NAME:"OpenLayers.Protocol.WFS.v1_0_0"});OpenLayers.Protocol.WFS.v1_1_0=OpenLayers.Class(OpenLayers.Protocol.WFS.v1,{version:"1.1.0",CLASS_NAME:"OpenLayers.Protocol.WFS.v1_1_0"});OpenLayers.Format.OWSContext.v0_3_1=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{owc:"http://www.opengis.net/ows-context",gml:"http://www.opengis.net/gml",kml:"http://www.opengis.net/kml/2.2",ogc:"http://www.opengis.net/ogc",ows:"http://www.opengis.net/ows",sld:"http://www.opengis.net/sld",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},VERSION:"0.3.1",schemaLocation:"http://www.opengis.net/ows-context http://www.ogcnetwork.net/schemas/owc/0.3.1/owsContext.xsd",defaultPrefix:"owc",extractAttributes:true,xy:true,regExes:{trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)},featureNS:"http://mapserver.gis.umn.edu/mapserver",featureType:"vector",geometryName:"geometry",nestingLayerLookup:null,initialize:function(A){OpenLayers.Format.XML.prototype.initialize.apply(this,[A]);OpenLayers.Format.GML.v2.prototype.setGeometryTypes.call(this)},setNestingPath:function(B){if(B.layersContext){for(var C=0,A=B.layersContext.length;C<A;C++){var F=B.layersContext[C];var D=[];var E=B.title||"";if(B.metadata&&B.metadata.nestingPath){D=B.metadata.nestingPath.slice()}if(E!=""){D.push(E)}F.metadata.nestingPath=D;if(F.layersContext){this.setNestingPath(F)}}}},decomposeNestingPath:function(B){var A=[];if(B instanceof Array){while(B.length>0){A.push(B.slice());B.pop()}A.reverse()}return A},read:function(B){if(typeof B=="string"){B=OpenLayers.Format.XML.prototype.read.apply(this,[B])}if(B&&B.nodeType==9){B=B.documentElement}var A={};this.readNode(B,A);this.setNestingPath({layersContext:A.layersContext});var C=[];this.processLayer(C,A);delete A.layersContext;A.layersContext=C;return A},processLayer:function(B,E){if(E.layersContext){for(var D=0,A=E.layersContext.length;D<A;D++){var C=E.layersContext[D];B.push(C);if(C.layersContext){this.processLayer(B,C)}}}},write:function(D,C){var B="OWSContext";this.nestingLayerLookup={};C=C||{};OpenLayers.Util.applyDefaults(C,D);var A=this.writeNode(B,C);this.nestingLayerLookup=null;this.setAttributeNS(A,this.namespaces.xsi,"xsi:schemaLocation",this.schemaLocation);return OpenLayers.Format.XML.prototype.write.apply(this,[A])},readers:{kml:{Document:function(A,B){B.features=new OpenLayers.Format.KML({kmlns:this.namespaces.kml,extractStyles:true}).read(A)}},owc:{OWSContext:function(A,B){this.readChildNodes(A,B)},General:function(A,B){this.readChildNodes(A,B)},ResourceList:function(A,B){this.readChildNodes(A,B)},Layer:function(A,C){var B={metadata:{},visibility:(A.getAttribute("hidden")!="1"),queryable:(A.getAttribute("queryable")=="1"),opacity:((A.getAttribute("opacity")!=null)?parseFloat(A.getAttribute("opacity")):null),name:A.getAttribute("name"),categoryLayer:(A.getAttribute("name")==null),formats:[],styles:[]};if(!C.layersContext){C.layersContext=[]}C.layersContext.push(B);this.readChildNodes(A,B)},InlineGeometry:function(B,D){D.features=[];var C=this.getElementsByTagNameNS(B,this.namespaces.gml,"featureMember");var A;if(C.length>=1){A=C[0]}if(A&&A.firstChild){var E=(A.firstChild.nextSibling)?A.firstChild.nextSibling:A.firstChild;this.setNamespace("feature",E.namespaceURI);this.featureType=E.localName||E.nodeName.split(":").pop();this.readChildNodes(B,D)}},Server:function(A,B){if((!B.service&&!B.version)||(B.service!=OpenLayers.Format.Context.serviceTypes.WMS)){B.service=A.getAttribute("service");B.version=A.getAttribute("version");this.readChildNodes(A,B)}},Name:function(A,B){B.name=this.getChildValue(A);this.readChildNodes(A,B)},Title:function(A,B){B.title=this.getChildValue(A);this.readChildNodes(A,B)},StyleList:function(A,B){this.readChildNodes(A,B.styles)},Style:function(B,C){var A={};C.push(A);this.readChildNodes(B,A)},LegendURL:function(B,C){var A={};C.legend=A;this.readChildNodes(B,A)},OnlineResource:function(A,B){B.url=this.getAttributeNS(A,this.namespaces.xlink,"href");this.readChildNodes(A,B)}},ows:OpenLayers.Format.OWSCommon.v1_0_0.prototype.readers.ows,gml:OpenLayers.Format.GML.v2.prototype.readers.gml,sld:OpenLayers.Format.SLD.v1_0_0.prototype.readers.sld,feature:OpenLayers.Format.GML.v2.prototype.readers.feature},writers:{owc:{OWSContext:function(A){var B=this.createElementNSPlus("OWSContext",{attributes:{version:this.VERSION,id:A.id||OpenLayers.Util.createUniqueID("OpenLayers_OWSContext_")}});this.writeNode("General",A,B);this.writeNode("ResourceList",A,B);return B},General:function(A){var B=this.createElementNSPlus("General");this.writeNode("ows:BoundingBox",A,B);this.writeNode("ows:Title",A.title||"OpenLayers OWSContext",B);return B},ResourceList:function(C){var F=this.createElementNSPlus("ResourceList");for(var E=0,B=C.layers.length;E<B;E++){var D=C.layers[E];var A=this.decomposeNestingPath(D.metadata.nestingPath);this.writeNode("_Layer",{layer:D,subPaths:A},F)}return F},Server:function(A){var B=this.createElementNSPlus("Server",{attributes:{version:A.version,service:A.service}});this.writeNode("OnlineResource",A,B);return B},OnlineResource:function(A){var B=this.createElementNSPlus("OnlineResource",{attributes:{"xlink:href":A.url}});return B},InlineGeometry:function(C){var D=this.createElementNSPlus("InlineGeometry");this.writeNode("gml:boundedBy",C.getDataExtent(),D);for(var B=0,A=C.features.length;B<A;B++){this.writeNode("gml:featureMember",C.features[B],D)}return D},StyleList:function(D){var C=this.createElementNSPlus("StyleList");for(var B=0,A=D.length;B<A;B++){this.writeNode("Style",D[B],C)}return C},Style:function(A){var B=this.createElementNSPlus("Style");this.writeNode("Name",A,B);this.writeNode("Title",A,B);this.writeNode("LegendURL",A,B);return B},Name:function(B){var A=this.createElementNSPlus("Name",{value:B.name});return A},Title:function(B){var A=this.createElementNSPlus("Title",{value:B.title});return A},LegendURL:function(A){var B=this.createElementNSPlus("LegendURL");this.writeNode("OnlineResource",A.legend,B);return B},_WMS:function(A){var B=this.createElementNSPlus("Layer",{attributes:{name:A.params.LAYERS,queryable:A.queryable?"1":"0",hidden:A.visibility?"0":"1",opacity:A.opacity?A.opacity:null}});this.writeNode("ows:Title",A.name,B);this.writeNode("ows:OutputFormat",A.params.FORMAT,B);this.writeNode("Server",{service:OpenLayers.Format.Context.serviceTypes.WMS,version:A.params.VERSION,url:A.url},B);if(A.metadata.styles&&A.metadata.styles.length>0){this.writeNode("StyleList",A.metadata.styles,B)}return B},_Layer:function(B){var C,G,D,F;C=B.layer;G=B.subPaths;D=null;F=null;if(G.length>0){var E=G[0].join("/");var A=E.lastIndexOf("/");D=this.nestingLayerLookup[E];F=(A>0)?E.substring(A+1,E.length):E;if(!D){D=this.createElementNSPlus("Layer");this.writeNode("ows:Title",F,D);this.nestingLayerLookup[E]=D}B.subPaths.shift();this.writeNode("_Layer",B,D);return D}else{if(C instanceof OpenLayers.Layer.WMS){D=this.writeNode("_WMS",C)}else{if(C instanceof OpenLayers.Layer.Vector){if(C.protocol instanceof OpenLayers.Protocol.WFS.v1){D=this.writeNode("_WFS",C)}else{if(C.protocol instanceof OpenLayers.Protocol.HTTP){if(C.protocol.format instanceof OpenLayers.Format.GML){C.protocol.format.version="2.1.2";D=this.writeNode("_GML",C)}else{if(C.protocol.format instanceof OpenLayers.Format.KML){C.protocol.format.version="2.2";D=this.writeNode("_KML",C)}}}else{this.setNamespace("feature",this.featureNS);D=this.writeNode("_InlineGeometry",C)}}}}if(C.options.maxScale){this.writeNode("sld:MinScaleDenominator",C.options.maxScale,D)}if(C.options.minScale){this.writeNode("sld:MaxScaleDenominator",C.options.minScale,D)}this.nestingLayerLookup[C.name]=D;return D}},_WFS:function(A){var B=this.createElementNSPlus("Layer",{attributes:{name:A.protocol.featurePrefix+":"+A.protocol.featureType,hidden:A.visibility?"0":"1"}});this.writeNode("ows:Title",A.name,B);this.writeNode("Server",{service:OpenLayers.Format.Context.serviceTypes.WFS,version:A.protocol.version,url:A.protocol.url},B);return B},_InlineGeometry:function(A){var B=this.createElementNSPlus("Layer",{attributes:{name:this.featureType,hidden:A.visibility?"0":"1"}});this.writeNode("ows:Title",A.name,B);this.writeNode("InlineGeometry",A,B);return B},_GML:function(A){var B=this.createElementNSPlus("Layer");this.writeNode("ows:Title",A.name,B);this.writeNode("Server",{service:OpenLayers.Format.Context.serviceTypes.GML,url:A.protocol.url,version:A.protocol.format.version},B);return B},_KML:function(A){var B=this.createElementNSPlus("Layer");this.writeNode("ows:Title",A.name,B);this.writeNode("Server",{service:OpenLayers.Format.Context.serviceTypes.KML,version:A.protocol.format.version,url:A.protocol.url},B);return B}},gml:OpenLayers.Util.applyDefaults({boundedBy:function(B){var A=this.createElementNSPlus("gml:boundedBy");this.writeNode("gml:Box",B,A);return A}},OpenLayers.Format.GML.v2.prototype.writers.gml),ows:OpenLayers.Format.OWSCommon.v1_0_0.prototype.writers.ows,sld:OpenLayers.Format.SLD.v1_0_0.prototype.writers.sld,feature:OpenLayers.Format.GML.v2.prototype.writers.feature},CLASS_NAME:"OpenLayers.Format.OWSContext.v0_3_1"});
