var OpenLayers={singleFile:true};(function(){var F=(typeof OpenLayers=="object"&&OpenLayers.singleFile);window.OpenLayers={_scriptName:(!F)?"lib/OpenLayers.js":"OpenLayers.js",_getScriptLocation:function(){var N="";var O=OpenLayers._scriptName;var J=document.getElementsByTagName("script");for(var L=0;L<J.length;L++){var P=J[L].getAttribute("src");if(P){var K=P.lastIndexOf(O);var M=P.lastIndexOf("?");if(M<0){M=P.length;}if((K>-1)&&(K+O.length==M)){N=P.slice(0,M-O.length);break;}}}return N;}};if(!F){var G=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/Projection.js","OpenLayers/Map.js","OpenLayers/Layer.js","OpenLayers/Icon.js","OpenLayers/Marker.js","OpenLayers/Marker/Box.js","OpenLayers/Popup.js","OpenLayers/Tile.js","OpenLayers/Tile/Image.js","OpenLayers/Tile/WFS.js","OpenLayers/Layer/Image.js","OpenLayers/Layer/SphericalMercator.js","OpenLayers/Layer/EventPane.js","OpenLayers/Layer/FixedZoomLevels.js","OpenLayers/Layer/Google.js","OpenLayers/Layer/VirtualEarth.js","OpenLayers/Layer/Yahoo.js","OpenLayers/Layer/HTTPRequest.js","OpenLayers/Layer/Grid.js","OpenLayers/Layer/MapGuide.js","OpenLayers/Layer/MapServer.js","OpenLayers/Layer/MapServer/Untiled.js","OpenLayers/Layer/KaMap.js","OpenLayers/Layer/MultiMap.js","OpenLayers/Layer/Markers.js","OpenLayers/Layer/Text.js","OpenLayers/Layer/WorldWind.js","OpenLayers/Layer/WMS.js","OpenLayers/Layer/WMS/Untiled.js","OpenLayers/Layer/GeoRSS.js","OpenLayers/Layer/Boxes.js","OpenLayers/Layer/TMS.js","OpenLayers/Layer/TileCache.js","OpenLayers/Popup/Anchored.js","OpenLayers/Popup/AnchoredBubble.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/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/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/VML.js","OpenLayers/Layer/Vector.js","OpenLayers/Layer/PointTrack.js","OpenLayers/Layer/GML.js","OpenLayers/Style.js","OpenLayers/StyleMap.js","OpenLayers/Rule.js","OpenLayers/Rule/FeatureId.js","OpenLayers/Rule/Logical.js","OpenLayers/Rule/Comparison.js","OpenLayers/Format.js","OpenLayers/Format/XML.js","OpenLayers/Format/GML.js","OpenLayers/Format/KML.js","OpenLayers/Format/GeoRSS.js","OpenLayers/Format/WFS.js","OpenLayers/Format/WKT.js","OpenLayers/Format/OSM.js","OpenLayers/Format/SLD.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/Layer/WFS.js","OpenLayers/Control/MouseToolbar.js","OpenLayers/Control/NavToolbar.js","OpenLayers/Control/EditingToolbar.js","OpenLayers/Lang.js","OpenLayers/Lang/en.js");var B=navigator.userAgent;var D=(B.match("MSIE")||B.match("Safari"));if(D){var A=new Array(G.length);}var H=OpenLayers._getScriptLocation()+"lib/";for(var C=0;C<G.length;C++){if(D){A[C]="<script src='"+H+G[C]+"'><\/script>";}else{var I=document.createElement("script");I.src=H+G[C];var E=document.getElementsByTagName("head").length?document.getElementsByTagName("head")[0]:document.body;E.appendChild(I);}}if(D){document.write(A.join(""));}}})();OpenLayers.VERSION_NUMBER="$Revision: 6368 $";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*$/,"$1");},camelize:function(E){var C=E.split("-");var A=C[0];for(var B=1;B<C.length;B++){var D=C[B];A+=D.charAt(0).toUpperCase()+D.substring(1);}return A;},format:function(C,B){if(!B){B=window;}var F=C.split("${");var E,D;for(var A=1;A<F.length;A++){E=F[A];D=E.indexOf("}");if(D>0){F[A]=B[E.substring(0,D)]+E.substring(++D);}else{F[A]="${"+E;}}return F.join("");}};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.String.limitSigDigs"}));return OpenLayers.Number.limitSigDigs(this,A);};}OpenLayers.Function={bind:function(C,B){var A=Array.prototype.slice.apply(arguments,[2]);return function(){var D=A.concat(Array.prototype.slice.apply(arguments,[0]));return C.apply(B,D);};},bindAsEventListener:function(B,A){return function(C){return B.call(A,C||window.event);};}};if(!Function.prototype.bind){Function.prototype.bind=function(){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.String.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.String.bindAsEventListener"}));return OpenLayers.Function.bindAsEventListener(this,A);};}OpenLayers.Array={filter:function(G,F,B){var D=[];if(Array.prototype.filter){D=G.filter(F,B);}else{var A=G.length;if(typeof F!="function"){throw new TypeError();}for(var C=0;C<A;C++){if(C in G){var E=G[C];if(F.call(B,E,C,G)){D.push(E);}}}}return D;}};OpenLayers.Class=function(){var B=function(){if(arguments&&arguments[0]!=OpenLayers.Class.isPrototype){this.initialize.apply(this,arguments);}};var A={};var D;for(var C=0;C<arguments.length;++C){if(typeof arguments[C]=="function"){D=arguments[C].prototype;}else{D=arguments[C];}OpenLayers.Util.extend(A,D);}B.prototype=A;return B;};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 C=arguments[0];var D=new C(OpenLayers.Class.isPrototype);for(var B=1;B<arguments.length;B++){if(typeof arguments[B]=="function"){var A=arguments[B];arguments[B]=new A(OpenLayers.Class.isPrototype);}OpenLayers.Util.extend(D,arguments[B]);}return D;};OpenLayers.Util={};OpenLayers.Util.getElement=function(){var C=[];for(var B=0;B<arguments.length;B++){var A=arguments[B];if(typeof A=="string"){A=document.getElementById(A);}if(arguments.length==1){return A;}C.push(A);}return C;};if($==null){var $=OpenLayers.Util.getElement;}OpenLayers.Util.extend=function(A,D){if(A&&D){for(var C in D){var B=D[C];if(B!==undefined){A[C]=B;}}if(D.hasOwnProperty&&D.hasOwnProperty("toString")){A.toString=D.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(C,B){for(var A=0;A<C.length;A++){if(C[A]==B){return A;}}return -1;};OpenLayers.Util.modifyDOMElement=function(E,H,D,F,A,C,G,B){if(H){E.id=H;}if(D){E.style.left=D.x+"px";E.style.top=D.y+"px";}if(F){E.style.width=F.w+"px";E.style.height=F.h+"px";}if(A){E.style.position=A;}if(C){E.style.border=C;}if(G){E.style.overflow=G;}if(parseFloat(B)>=0&&parseFloat(B)<1){E.style.filter="alpha(opacity="+(B*100)+")";E.style.opacity=B;}else{if(parseFloat(B)==1){E.style.filter="";E.style.opacity="";}}};OpenLayers.Util.createDiv=function(A,I,H,F,E,C,B,G){var D=document.createElement("div");if(F){D.style.backgroundImage="url("+F+")";}if(!A){A=OpenLayers.Util.createUniqueID("OpenLayersDiv");}if(!E){E="absolute";}OpenLayers.Util.modifyDOMElement(D,A,I,H,E,C,B,G);return D;};OpenLayers.Util.createImage=function(A,H,G,E,D,C,F,I){var B=document.createElement("img");if(!A){A=OpenLayers.Util.createUniqueID("OpenLayersDiv");}if(!D){D="relative";}OpenLayers.Util.modifyDOMElement(B,A,H,G,D,C,null,F);if(I){B.style.display="none";OpenLayers.Event.observe(B,"load",OpenLayers.Function.bind(OpenLayers.Util.onImageLoad,B));OpenLayers.Event.observe(B,"error",OpenLayers.Function.bind(OpenLayers.Util.onImageLoadError,B));}B.style.alt=A;B.galleryImg="no";if(E){B.src=E;}return B;};OpenLayers.Util.setOpacity=function(B,A){OpenLayers.Util.modifyDOMElement(B,null,null,null,null,null,null,A);};OpenLayers.Util.onImageLoad=function(){if(!this.viewRequestID||(this.map&&this.viewRequestID==this.map.viewRequestID)){this.style.backgroundColor=null;this.style.display="";}};OpenLayers.Util.onImageLoadErrorColor="pink";OpenLayers.IMAGE_RELOAD_ATTEMPTS=0;OpenLayers.Util.onImageLoadError=function(){this._attempts=(this._attempts)?(this._attempts+1):1;if(this._attempts<=OpenLayers.IMAGE_RELOAD_ATTEMPTS){this.src=this.src;}else{this.src="images/no_tile.png";this.style.backgroundColor=OpenLayers.Util.onImageLoadErrorColor;}this.style.display="";};OpenLayers.Util.alphaHack=function(){var D=navigator.appVersion.split("MSIE");var A=parseFloat(D[1]);var B=false;try{B=!!(document.body.filters);}catch(C){}return(B&&(A>=5.5)&&(A<7));};OpenLayers.Util.modifyAlphaImageDiv=function(A,B,J,I,G,F,C,D,H){OpenLayers.Util.modifyDOMElement(A,B,J,I,null,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()){A.style.display="inline-block";if(D==null){D="scale";}if(G&&G.toLowerCase().indexOf(".png")!=-1){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(C,B){for(var A in B){if(C[A]===undefined||(B.hasOwnProperty&&B.hasOwnProperty(A)&&!C.hasOwnProperty(A))){C[A]=B[A];}}if(B.hasOwnProperty&&B.hasOwnProperty("toString")&&!C.hasOwnProperty("toString")){C.toString=B.toString;}return C;};OpenLayers.Util.getParameterString=function(G){var F=[];for(var B in G){var D=G[B];if((D!=null)&&(typeof D!="function")){var A;if(typeof D=="object"&&D.constructor==Array){var E=[];for(var C=0;C<D.length;C++){E.push(encodeURIComponent(D[C]));}A=E.join(",");}else{A=encodeURIComponent(D);}F.push(encodeURIComponent(B)+"="+A);}}return F.join("&");};OpenLayers.ImgPath="";OpenLayers.Util.getImagesLocation=function(){return OpenLayers.ImgPath||(OpenLayers._getScriptLocation()+"img/");};OpenLayers.Util.Try=function(){var C=null;for(var B=0;B<arguments.length;B++){var A=arguments[B];try{C=A();break;}catch(D){}}return C;};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(B,D){var A=[];for(var C=0;C<B.length;C++){if(B[C].nodeName==D){A.push(B[C]);}}return A;};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.rad=function(A){return A*Math.PI/180;};OpenLayers.Util.distVincenty=function(F,D){var k=6378137,j=6356752.3142,e=1/298.257223563;var M=OpenLayers.Util.rad(D.lon-F.lon);var i=Math.atan((1-e)*Math.tan(OpenLayers.Util.rad(F.lat)));var h=Math.atan((1-e)*Math.tan(OpenLayers.Util.rad(D.lat)));var K=Math.sin(i),H=Math.cos(i);var J=Math.sin(h),G=Math.cos(h);var Q=M,N=2*Math.PI;var P=20;while(Math.abs(Q-N)>1e-12&&--P>0){var X=Math.sin(Q),E=Math.cos(Q);var l=Math.sqrt((G*X)*(G*X)+(H*J-K*G*E)*(H*J-K*G*E));if(l==0){return 0;}var Z=K*J+H*G*E;var W=Math.atan2(l,Z);var I=Math.asin(H*G*X/l);var c=Math.cos(I)*Math.cos(I);var O=Z-2*K*J/c;var T=e/16*c*(4+e*(4-3*c));N=Q;Q=M+(1-T)*e*Math.sin(I)*(W+T*l*(O+T*Z*(-1+2*O*O)));}if(P==0){return NaN;}var S=c*(k*k-j*j)/(j*j);var V=1+S/16384*(4096+S*(-768+S*(320-175*S)));var U=S/1024*(256+S*(-128+S*(74-47*S)));var Y=U*l*(O+U/4*(Z*(-1+2*O*O)-U/6*O*(-3+4*l*l)*(-3+4*O*O)));var R=j*V*(W-Y);var g=R.toFixed(3)/1000;return g;};OpenLayers.Util.getParameters=function(B){B=B||window.location.href;if(B==null){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 H=0;H<D.length;++H){var G=D[H].split("=");if(G[0]){var J=decodeURIComponent(G[0]);var I=G[1]||"";I=I.split(",");for(var F=0;F<I.length;F++){I[F]=decodeURIComponent(I[F]);}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.DOTS_PER_INCH=72;OpenLayers.Util.normalizeScale=function(B){var A=(B>1)?(1/B):B;return A;};OpenLayers.Util.getResolutionFromScale=function(D,A){if(A==null){A="degrees";}var C=OpenLayers.Util.normalizeScale(D);var B=1/(C*OpenLayers.INCHES_PER_UNIT[A]*OpenLayers.DOTS_PER_INCH);return B;};OpenLayers.Util.getScaleFromResolution=function(B,A){if(A==null){A="degrees";}var C=B*OpenLayers.INCHES_PER_UNIT[A]*OpenLayers.DOTS_PER_INCH;return C;};OpenLayers.Util.safeStopPropagation=function(A){OpenLayers.Event.stop(A,true);};OpenLayers.Util.pagePosition=function(E){var A=0,D=0;var B=E;var F=E;while(B){if(B==document.body){if(F&&F.style&&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(H,G,C){C=C||{};OpenLayers.Util.applyDefaults(C,{ignoreCase:true,ignorePort80:true,ignoreHash:true});var B=OpenLayers.Util.createUrlObject(H,C);var A=OpenLayers.Util.createUrlObject(G,C);for(var D in B){if(C.test){alert(D+"\n1:"+B[D]+"\n2:"+A[D]);}var F=B[D];var E=A[D];switch(D){case"args":break;case"host":case"port":case"protocol":if((F=="")||(E=="")){break;}default:if((D!="args")&&(B[D]!=A[D])){return false;}break;}}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(E,C){C=C||{};var Q={};if(C.ignoreCase){E=E.toLowerCase();}var S=document.createElement("a");S.href=E;Q.host=S.host;var J=S.port;if(J.length<=0){var N=Q.host.length-(J.length);Q.host=Q.host.substring(0,N);}Q.protocol=S.protocol;Q.port=((J=="80")&&(C.ignorePort80))?"":J;Q.hash=(C.ignoreHash)?"":S.hash;var B=S.search;if(!B){var H=E.indexOf("?");B=(H!=-1)?E.substr(H):"";}Q.args=OpenLayers.Util.getParameters(B);if(((Q.protocol=="file:")&&(E.indexOf("file:")!=-1))||((Q.protocol!="file:")&&(Q.host!=""))){Q.pathname=S.pathname;var K=Q.pathname.indexOf("?");if(K!=-1){Q.pathname=Q.pathname.substring(0,K);}}else{var I=OpenLayers.Util.removeTail(E);var P=0;do{var F=I.indexOf("../");if(F==0){P++;I=I.substr(3);}else{if(F>=0){var L=I.substr(0,F-1);var O=L.indexOf("/");L=(O!=-1)?L.substr(0,O+1):"";var R=I.substr(F+3);I=L+R;}}}while(F!=-1);var D=document.createElement("a");var M=window.location.href;if(C.ignoreCase){M=M.toLowerCase();}D.href=M;Q.protocol=D.protocol;var A=(D.pathname.indexOf("/")!=-1)?"/":"\\";var G=D.pathname.split(A);G.pop();while((P>0)&&(G.length>0)){G.pop();P--;}I=G.join("/")+"/"+I;Q.pathname=I;}if((Q.protocol=="file:")||(Q.protocol=="")){Q.host="localhost";}return Q;};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.Rico=new Object();OpenLayers.Rico.Corner={round:function(D,B){D=OpenLayers.Util.getElement(D);this._setOptions(B);var A=this.options.color;if(this.options.color=="fromElement"){A=this._background(D);}var C=this.options.bgColor;if(this.options.bgColor=="fromParent"){C=this._background(D.offsetParent);}this._roundCornersImpl(D,A,C);},changeColor:function(C,B){C.style.backgroundColor=B;var A=C.parentNode.getElementsByTagName("span");for(var D=0;D<A.length;D++){A[D].style.backgroundColor=B;}},changeOpacity:function(C,F){var D=F;var A="alpha(opacity="+F*100+")";C.style.opacity=D;C.style.filter=A;var B=C.parentNode.getElementsByTagName("span");for(var E=0;E<B.length;E++){B[E].style.opacity=D;B[E].style.filter=A;}},reRound:function(D,C){var B=D.parentNode.childNodes[0];var A=D.parentNode.childNodes[2];D.parentNode.removeChild(B);D.parentNode.removeChild(A);this.round(D.parentNode,C);},_roundCornersImpl:function(C,A,B){if(this.options.border){this._renderBorder(C,B);}if(this._isTopRounded()){this._roundTopCorners(C,A,B);}if(this._isBottomRounded()){this._roundBottomCorners(C,A,B);}},_renderBorder:function(D,E){var B="1px solid "+this._borderColor(E);var A="border-left: "+B;var F="border-right: "+B;var C="style='"+A+";"+F+"'";D.innerHTML="<div "+C+">"+D.innerHTML+"</div>";},_roundTopCorners:function(C,A,E){var D=this._createCorner(E);for(var B=0;B<this.options.numSlices;B++){D.appendChild(this._createCornerSlice(A,E,B,"top"));}C.style.paddingTop=0;C.insertBefore(D,C.firstChild);},_roundBottomCorners:function(C,A,E){var D=this._createCorner(E);for(var B=(this.options.numSlices-1);B>=0;B--){D.appendChild(this._createCornerSlice(A,E,B,"bottom"));}C.style.paddingBottom=0;C.appendChild(D);},_createCorner:function(B){var A=document.createElement("div");A.style.backgroundColor=(this._isTransparent()?"transparent":B);return A;},_createCornerSlice:function(C,D,G,A){var E=document.createElement("span");var B=E.style;B.backgroundColor=C;B.display="block";B.height="1px";B.overflow="hidden";B.fontSize="1px";var F=this._borderColor(C,D);if(this.options.border&&G==0){B.borderTopStyle="solid";B.borderTopWidth="1px";B.borderLeftWidth="0px";B.borderRightWidth="0px";B.borderBottomWidth="0px";B.height="0px";B.borderColor=F;}else{if(F){B.borderColor=F;B.borderStyle="solid";B.borderWidth="0px 1px";}}if(!this.options.compact&&(G==(this.options.numSlices-1))){B.height="2px";}this._setMargin(E,G,A);this._setBorder(E,G,A);return E;},_setOptions:function(A){this.options={corners:"all",color:"fromElement",bgColor:"fromParent",blend:true,border:false,compact:false};OpenLayers.Util.extend(this.options,A||{});this.options.numSlices=this.options.compact?2:4;if(this._isTransparent()){this.options.blend=false;}},_whichSideTop:function(){if(this._hasString(this.options.corners,"all","top")){return"";}if(this.options.corners.indexOf("tl")>=0&&this.options.corners.indexOf("tr")>=0){return"";}if(this.options.corners.indexOf("tl")>=0){return"left";}else{if(this.options.corners.indexOf("tr")>=0){return"right";}}return"";},_whichSideBottom:function(){if(this._hasString(this.options.corners,"all","bottom")){return"";}if(this.options.corners.indexOf("bl")>=0&&this.options.corners.indexOf("br")>=0){return"";}if(this.options.corners.indexOf("bl")>=0){return"left";}else{if(this.options.corners.indexOf("br")>=0){return"right";}}return"";},_borderColor:function(A,B){if(A=="transparent"){return B;}else{if(this.options.border){return this.options.border;}else{if(this.options.blend){return this._blend(B,A);}else{return"";}}}},_setMargin:function(D,E,B){var C=this._marginSize(E);var A=B=="top"?this._whichSideTop():this._whichSideBottom();if(A=="left"){D.style.marginLeft=C+"px";D.style.marginRight="0px";}else{if(A=="right"){D.style.marginRight=C+"px";D.style.marginLeft="0px";}else{D.style.marginLeft=C+"px";D.style.marginRight=C+"px";}}},_setBorder:function(D,E,B){var C=this._borderSize(E);var A=B=="top"?this._whichSideTop():this._whichSideBottom();if(A=="left"){D.style.borderLeftWidth=C+"px";D.style.borderRightWidth="0px";}else{if(A=="right"){D.style.borderRightWidth=C+"px";D.style.borderLeftWidth="0px";}else{D.style.borderLeftWidth=C+"px";D.style.borderRightWidth=C+"px";}}if(this.options.border!=false){D.style.borderLeftWidth=C+"px";D.style.borderRightWidth=C+"px";}},_marginSize:function(E){if(this._isTransparent()){return 0;}var D=[5,3,2,1];var A=[3,2,1,0];var C=[2,1];var B=[1,0];if(this.options.compact&&this.options.blend){return B[E];}else{if(this.options.compact){return C[E];}else{if(this.options.blend){return A[E];}else{return D[E];}}}},_borderSize:function(E){var D=[5,3,2,1];var B=[2,1,1,1];var A=[1,0];var C=[0,2,0,0];if(this.options.compact&&(this.options.blend||this._isTransparent())){return 1;}else{if(this.options.compact){return A[E];}else{if(this.options.blend){return B[E];}else{if(this.options.border){return C[E];}else{if(this._isTransparent()){return D[E];}}}}}return 0;},_hasString:function(B){for(var A=1;A<arguments.length;A++){if(B.indexOf(arguments[A])>=0){return true;}}return false;},_blend:function(C,A){var B=OpenLayers.Rico.Color.createFromHex(C);B.blend(OpenLayers.Rico.Color.createFromHex(A));return B;},_background:function(A){try{return OpenLayers.Rico.Color.createColorFromBackground(A).asHex();}catch(B){return"#ffffff";}},_isTransparent:function(){return this.options.color=="transparent";},_isTopRounded:function(){return this._hasString(this.options.corners,"all","top","tl","tr");},_isBottomRounded:function(){return this._hasString(this.options.corners,"all","bottom","bl","br");},_hasSingleTextChild:function(A){return A.childNodes.length==1&&A.childNodes[0].nodeType==3;}};OpenLayers.ProxyHost="";OpenLayers.nullHandler=function(A){alert(OpenLayers.i18n("unhandledRequest",{statusText:A.statusText}));};OpenLayers.loadURL=function(E,H,B,F,C){var G=(F)?OpenLayers.Function.bind(F,B):OpenLayers.nullHandler;var A=(C)?OpenLayers.Function.bind(C,B):OpenLayers.nullHandler;var D=new OpenLayers.Ajax.Request(E,{method:"get",parameters:H,onComplete:G,onFailure:A});return D.transport;};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]=pair[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.Bounds=OpenLayers.Class({left:null,bottom:null,right:null,top:null,initialize:function(D,A,B,C){if(D!=null){this.left=parseFloat(D);}if(A!=null){this.bottom=parseFloat(A);}if(B!=null){this.right=parseFloat(B);}if(C!=null){this.top=parseFloat(C);}},clone:function(){return new OpenLayers.Bounds(this.left,this.bottom,this.right,this.top);},equals:function(B){var A=false;if(B!=null){A=((this.left==B.left)&&(this.right==B.right)&&(this.top==B.top)&&(this.bottom==B.bottom));}return A;},toString:function(){return("left-bottom=("+this.left+","+this.bottom+") right-top=("+this.right+","+this.top+")");},toArray:function(){return[this.left,this.bottom,this.right,this.top];},toBBOX:function(A){if(A==null){A=6;}var B=Math.pow(10,A);var C=Math.round(this.left*B)/B+","+Math.round(this.bottom*B)/B+","+Math.round(this.right*B)/B+","+Math.round(this.top*B)/B;return C;},toGeometry:function(){return new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing([new OpenLayers.Geometry.Point(this.left,this.bottom),new OpenLayers.Geometry.Point(this.right,this.bottom),new OpenLayers.Geometry.Point(this.right,this.top),new OpenLayers.Geometry.Point(this.left,this.top)])]);},getWidth:function(){return(this.right-this.left);},getHeight:function(){return(this.top-this.bottom);},getSize:function(){return new OpenLayers.Size(this.getWidth(),this.getHeight());},getCenterPixel:function(){return new OpenLayers.Pixel((this.left+this.right)/2,(this.bottom+this.top)/2);},getCenterLonLat:function(){return new OpenLayers.LonLat((this.left+this.right)/2,(this.bottom+this.top)/2);},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){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;}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(D,B){if(B==null){B=true;}var F=(D.bottom==this.bottom&&D.top==this.top)?true:(((D.bottom>this.bottom)&&(D.bottom<this.top))||((this.bottom>D.bottom)&&(this.bottom<D.top)));var E=(D.bottom==this.bottom&&D.top==this.top)?true:(((D.top>this.bottom)&&(D.top<this.top))||((this.top>D.bottom)&&(this.top<D.top)));var A=(D.right==this.right&&D.left==this.left)?true:(((D.right>this.left)&&(D.right<this.right))||((this.right>D.left)&&(this.right<D.right)));var C=(D.right==this.right&&D.left==this.left)?true:(((D.left>this.left)&&(D.left<this.right))||((this.left>D.left)&&(this.left<D.right)));return(this.containsBounds(D,true,B)||D.containsBounds(this,true,B)||((E||F)&&(C||A)));},containsBounds:function(E,D,B){if(D==null){D=false;}if(B==null){B=true;}var C;var G;var A;var F;if(B){C=(E.left>=this.left)&&(E.left<=this.right);G=(E.top>=this.bottom)&&(E.top<=this.top);A=(E.right>=this.left)&&(E.right<=this.right);F=(E.bottom>=this.bottom)&&(E.bottom<=this.top);}else{C=(E.left>this.left)&&(E.left<this.right);G=(E.top>this.bottom)&&(E.top<this.top);A=(E.right>this.left)&&(E.right<this.right);F=(E.bottom>this.bottom)&&(E.bottom<this.top);}return(D)?(G||F)&&(C||A):(G&&C&&F&&A);},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){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.Element={visible:function(A){return OpenLayers.Util.getElement(A).style.display!="none";},toggle:function(){for(var B=0;B<arguments.length;B++){var A=OpenLayers.Util.getElement(arguments[B]);var C=OpenLayers.Element.visible(A)?"hide":"show";OpenLayers.Element[C](A);}},hide:function(){for(var B=0;B<arguments.length;B++){var A=OpenLayers.Util.getElement(arguments[B]);A.style.display="none";}},show:function(){for(var B=0;B<arguments.length;B++){var A=OpenLayers.Util.getElement(arguments[B]);A.style.display="";}},remove:function(A){A=OpenLayers.Util.getElement(A);A.parentNode.removeChild(A);},getHeight:function(A){A=OpenLayers.Util.getElement(A);return A.offsetHeight;},getDimensions:function(B){B=OpenLayers.Util.getElement(B);if(OpenLayers.Element.getStyle(B,"display")!="none"){return{width:B.offsetWidth,height:B.offsetHeight};}var A=B.style;var E=A.visibility;var C=A.position;A.visibility="hidden";A.position="absolute";A.display="";var F=B.clientWidth;var D=B.clientHeight;A.display="none";A.position=C;A.visibility=E;return{width:F,height:D};},getStyle:function(C,D){C=OpenLayers.Util.getElement(C);var 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.LonLat=OpenLayers.Class({lon:0,lat:0,initialize:function(B,A){this.lon=parseFloat(B);this.lat=parseFloat(A);},toString:function(){return("lon="+this.lon+",lat="+this.lat);},toShortString:function(){return(this.lon+", "+this.lat);},clone:function(){return new OpenLayers.LonLat(this.lon,this.lat);},add:function(C,A){if((C==null)||(A==null)){var B=OpenLayers.i18n("lonlatAddError");OpenLayers.Console.error(B);return null;}return new OpenLayers.LonLat(this.lon+C,this.lat+A);},equals:function(B){var A=false;if(B!=null){A=((this.lon==B.lon&&this.lat==B.lat)||(isNaN(this.lon)&&isNaN(this.lat)&&isNaN(B.lon)&&isNaN(B.lat)));}return A;},transform:function(C,B){var A=OpenLayers.Projection.transform({x:this.lon,y:this.lat},C,B);this.lon=A.x;this.lat=A.y;return this;},wrapDateLine:function(A){var B=this.clone();if(A){while(B.lon<A.left){B.lon+=A.getWidth();}while(B.lon>A.right){B.lon-=A.getWidth();}}return B;},CLASS_NAME:"OpenLayers.LonLat"});OpenLayers.LonLat.fromString=function(B){var A=B.split(",");return new OpenLayers.LonLat(parseFloat(A[0]),parseFloat(A[1]));};OpenLayers.Pixel=OpenLayers.Class({x:0,y:0,initialize:function(A,B){this.x=parseFloat(A);this.y=parseFloat(B);},toString:function(){return("x="+this.x+",y="+this.y);},clone:function(){return new OpenLayers.Pixel(this.x,this.y);},equals:function(A){var B=false;if(A!=null){B=((this.x==A.x&&this.y==A.y)||(isNaN(this.x)&&isNaN(this.y)&&isNaN(A.x)&&isNaN(A.y)));}return B;},add:function(A,C){if((A==null)||(C==null)){var B=OpenLayers.i18n("pixelAddError");OpenLayers.Console.error(B);return null;}return new OpenLayers.Pixel(this.x+A,this.y+C);},offset:function(A){var B=this.clone();if(A){B=this.add(A.x,A.y);}return B;},CLASS_NAME:"OpenLayers.Pixel"});OpenLayers.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(){},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(){if(window.console){var A=document.getElementsByTagName("script");for(var B=0;B<A.length;++B){if(A[B].src.indexOf("firebug.js")!=-1){OpenLayers.Util.extend(OpenLayers.Console,console);break;}}}})();OpenLayers.Control=OpenLayers.Class({id:null,map:null,div:null,type:null,displayClass:"",title:"",active:null,handler:null,eventListeners:null,events:null,EVENT_TYPES:["activate","deactivate"],initialize:function(A){this.displayClass=this.CLASS_NAME.replace("OpenLayers.","ol").replace(/\./g,"");OpenLayers.Util.extend(this,A);this.events=new OpenLayers.Events(this,null,this.EVENT_TYPES);if(this.eventListeners instanceof Object){this.events.on(this.eventListeners);}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.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;this.events.triggerEvent("activate");return true;},deactivate:function(){if(this.active){if(this.handler){this.handler.deactivate();}this.active=false;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.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(){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;},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";},CLASS_NAME:"OpenLayers.Icon"});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=OpenLayers.Class({events:null,id:"",lonlat:null,div:null,size:null,contentHTML:"",backgroundColor:"",opacity:"",border:"",contentDiv:null,groupDiv:null,closeDiv:null,padding:5,map:null,initialize:function(B,F,I,C,A,H){if(B==null){B=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");}this.id=B;this.lonlat=F;this.size=(I!=null)?I:new OpenLayers.Size(OpenLayers.Popup.WIDTH,OpenLayers.Popup.HEIGHT);if(C!=null){this.contentHTML=C;}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="olPopup";this.groupDiv=OpenLayers.Util.createDiv(null,null,null,null,"relative",null,"hidden");var B=this.div.id+"_contentDiv";this.contentDiv=OpenLayers.Util.createDiv(B,null,this.size.clone(),null,"relative",null,"hidden");this.contentDiv.className="olPopupContent";this.groupDiv.appendChild(this.contentDiv);this.div.appendChild(this.groupDiv);if(A){var D=new OpenLayers.Size(17,17);var E=OpenLayers.Util.getImagesLocation()+"close.gif";this.closeDiv=OpenLayers.Util.createAlphaImageDiv(this.id+"_close",null,D,E);this.closeDiv.style.right=this.padding+"px";this.closeDiv.style.top=this.padding+"px";this.groupDiv.appendChild(this.closeDiv);var G=H||function(J){this.hide();OpenLayers.Event.stop(J);};OpenLayers.Event.observe(this.closeDiv,"click",OpenLayers.Function.bindAsEventListener(G,this));}this.registerEvents();},destroy:function(){if(this.map!=null){this.map.removePopup(this);this.map=null;}this.events.destroy();this.events=null;this.div=null;},draw:function(A){if(A==null){if((this.lonlat!=null)&&(this.map!=null)){A=this.map.getLayerPxFromLonLat(this.lonlat);}}this.setSize();this.setBackgroundColor();this.setOpacity();this.setBorder();this.setContentHTML();this.moveTo(A);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(){OpenLayers.Element.toggle(this.div);},show:function(){OpenLayers.Element.show(this.div);},hide:function(){OpenLayers.Element.hide(this.div);},setSize:function(A){if(A!=undefined){this.size=A;}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=this.size.w+"px";this.contentDiv.style.height=this.size.h+"px";}},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.contentDiv.innerHTML=this.contentHTML;}},registerEvents:function(){this.events=new OpenLayers.Events(this,this.div,null,true);this.events.on({mousedown:this.onmousedown,mousemove:this.onmousemove,mouseup:this.onmouseup,click:this.onclick,mouseout:this.onmouseout,dblclick:this.ondblclick,scope:this});},onmousedown:function(A){this.mousedown=true;OpenLayers.Event.stop(A,true);},onmousemove:function(A){if(this.mousedown){OpenLayers.Event.stop(A,true);}},onmouseup:function(A){if(this.mousedown){this.mousedown=false;OpenLayers.Event.stop(A,true);}},onclick:function(A){OpenLayers.Event.stop(A,true);},onmouseout:function(A){this.mousedown=false;},ondblclick:function(A){OpenLayers.Event.stop(A,true);},CLASS_NAME:"OpenLayers.Popup"});OpenLayers.Popup.WIDTH=200;OpenLayers.Popup.HEIGHT=200;OpenLayers.Popup.COLOR="white";OpenLayers.Popup.OPACITY=1;OpenLayers.Popup.BORDER="0px";OpenLayers.Renderer=OpenLayers.Class({container:null,extent:null,size:null,resolution:null,map:null,initialize:function(A){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){this.extent=A.clone();this.resolution=null;},setSize:function(A){this.size=A.clone();this.resolution=null;},getResolution:function(){this.resolution=this.resolution||this.map.getResolution();return this.resolution;},drawFeature:function(A,B){if(B==null){B=A.style;}if(A.geometry){this.drawGeometry(A.geometry,B,A.id);}},drawGeometry:function(C,A,B){},clear:function(){},getFeatureIdFromEvent:function(A){},eraseFeatures:function(B){if(!(B instanceof Array)){B=[B];}for(var A=0;A<B.length;++A){this.eraseGeometry(B[A].geometry);}},eraseGeometry:function(A){},CLASS_NAME:"OpenLayers.Renderer"});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){if(this.callbacks&&this.callbacks.done){this.callbacks.done.call(this,this.finish);this.playing=false;}window.clearInterval(this.interval);this.interval=null;}},CLASS_NAME:"OpenLayers.Tween"});OpenLayers.Easing={CLASS_NAME:"OpenLayers.Easing"};OpenLayers.Easing.Linear={easeIn:function(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.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.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(D){OpenLayers.Control.prototype.setMap.apply(this,arguments);for(var B=0;B<this.map.controls.length;B++){var C=this.map.controls[B];if((C!=this)&&(C.CLASS_NAME=="OpenLayers.Control.ArgParser")){if(C.displayProjection!=this.displayProjection){this.displayProjection=C.displayProjection;}break;}}if(B==this.map.controls.length){var A=OpenLayers.Util.getParameters();if(A.layers){this.layers=A.layers;this.map.events.register("addlayer",this,this.configureLayers);this.configureLayers();}if(A.lat&&A.lon){this.center=new OpenLayers.LonLat(parseFloat(A.lon),parseFloat(A.lat));if(A.zoom){this.zoom=parseInt(A.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 B=0;B<this.layers.length;B++){var A=this.map.layers[B];var C=this.layers.charAt(B);if(C=="B"){this.map.setBaseLayer(A);}else{if((C=="T")||(C=="F")){A.setVisibility(C=="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 C=[];if(this.map&&this.map.layers){for(var B=0;B<this.map.layers.length;B++){var A=this.map.layers[B];if(A.attribution&&A.getVisibility()){C.push(A.attribution);}}this.div.innerHTML=C.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.LayerSwitcher=OpenLayers.Class(OpenLayers.Control,{activeColor:"#2d4a5f",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(C){var D=this[C+"Layers"];if(D){for(var B=0;B<D.length;B++){var A=D[B];OpenLayers.Event.stopObservingElement(A.inputElem);OpenLayers.Event.stopObservingElement(A.labelSpan);}}this[C+"LayersDiv"].innerHTML="";this[C+"Layers"]=[];},checkRedraw:function(){var D=false;if(!this.layerStates.length||(this.map.layers.length!=this.layerStates.length)){D=true;}else{for(var B=0;B<this.layerStates.length;B++){var C=this.layerStates[B];var A=this.map.layers[B];if((C.name!=A.name)||(C.inRange!=A.inRange)||(C.id!=A.id)||(C.visibility!=A.visibility)){D=true;break;}}}return D;},redraw:function(){if(!this.checkRedraw()){return this.div;}this.clearLayersArray("base");this.clearLayersArray("data");var D=false;var K=false;this.layerStates=new Array(this.map.layers.length);for(var F=0;F<this.map.layers.length;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;F<E.length;F++){var G=E[F];var H=G.isBaseLayer;if(G.displayInLayerSwitcher){if(H){K=true;}else{D=true;}var J=(H)?(G==this.map.baseLayer):G.getVisibility();var I=document.createElement("input");I.id="input_"+G.name;I.name=(H)?"baseLayers":G.name;I.type=(H)?"radio":"checkbox";I.value=G.name;I.checked=J;I.defaultChecked=J;if(!H&&!G.inRange){I.disabled=true;}var A={inputElem:I,layer:G,layerSwitcher:this};OpenLayers.Event.observe(I,"mouseup",OpenLayers.Function.bindAsEventListener(this.onInputClick,A));var B=document.createElement("span");if(!H&&!G.inRange){B.style.color="gray";}B.innerHTML=G.name;B.style.verticalAlign=(H)?"bottom":"baseline";OpenLayers.Event.observe(B,"click",OpenLayers.Function.bindAsEventListener(this.onInputClick,A));var M=document.createElement("br");var L=(H)?this.baseLayers:this.dataLayers;L.push({layer:G,inputElem:I,labelSpan:B});var C=(H)?this.baseLayersDiv:this.dataLayersDiv;C.appendChild(I);C.appendChild(B);C.appendChild(M);}}this.dataLbl.style.display=(D)?"":"none";this.baseLbl.style.display=(K)?"":"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 A=0;A<this.baseLayers.length;A++){var B=this.baseLayers[A];if(B.inputElem.checked){this.map.setBaseLayer(B.layer,false);}}for(var A=0;A<this.dataLayers.length;A++){var B=this.dataLayers[A];B.layer.setVisibility(B.inputElem.checked);}},maximizeControl:function(A){this.div.style.width="20em";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(){this.div.style.position="absolute";this.div.style.top="25px";this.div.style.right="0px";this.div.style.left="";this.div.style.fontFamily="sans-serif";this.div.style.fontWeight="bold";this.div.style.marginTop="3px";this.div.style.marginLeft="3px";this.div.style.marginBottom="3px";this.div.style.fontSize="smaller";this.div.style.color="white";this.div.style.backgroundColor="transparent";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="layersDiv";this.layersDiv.style.paddingTop="5px";this.layersDiv.style.paddingLeft="10px";this.layersDiv.style.paddingBottom="5px";this.layersDiv.style.paddingRight="75px";this.layersDiv.style.backgroundColor=this.activeColor;this.layersDiv.style.width="100%";this.layersDiv.style.height="100%";this.baseLbl=document.createElement("div");this.baseLbl.innerHTML=OpenLayers.i18n("baseLayer");this.baseLbl.style.marginTop="3px";this.baseLbl.style.marginLeft="3px";this.baseLbl.style.marginBottom="3px";this.baseLayersDiv=document.createElement("div");this.baseLayersDiv.style.paddingLeft="10px";this.dataLbl=document.createElement("div");this.dataLbl.innerHTML=OpenLayers.i18n("overlays");this.dataLbl.style.marginTop="3px";this.dataLbl.style.marginLeft="3px";this.dataLbl.style.marginBottom="3px";this.dataLayersDiv=document.createElement("div");this.dataLayersDiv.style.paddingLeft="10px";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);OpenLayers.Rico.Corner.round(this.div,{corners:"tl bl",bgColor:"transparent",color:this.activeColor,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");this.maximizeDiv.style.top="5px";this.maximizeDiv.style.right="0px";this.maximizeDiv.style.left="";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");this.minimizeDiv.style.top="5px";this.minimizeDiv.style.right="0px";this.minimizeDiv.style.left="";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=function(){return 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,{element:null,prefix:"",separator:", ",suffix:"",numdigits:5,granularity:10,lastXy:null,displayProjection:null,initialize:function(A){OpenLayers.Control.prototype.initialize.apply(this,arguments);},destroy:function(){if(this.map){this.map.events.unregister("mousemove",this,this.redraw);}OpenLayers.Control.prototype.destroy.apply(this,arguments);},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.element){this.div.left="";this.div.top="";this.div.className=this.displayClass;this.element=this.div;}this.redraw();return this.div;},redraw:function(A){var C;if(A==null){C=new OpenLayers.LonLat(0,0);}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;}},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;},setMap:function(){OpenLayers.Control.prototype.setMap.apply(this,arguments);this.map.events.register("mousemove",this,this.redraw);},CLASS_NAME:"OpenLayers.Control.MousePosition"});OpenLayers.Control.NavigationHistory=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOGGLE,previous:null,previousOptions:null,next:null,nextOptions:null,limit:50,activateOnDraw: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:function(){return{center:this.map.getCenter(),resolution:this.map.getResolution()};}},this.registry);this.clear();var B={trigger:OpenLayers.Function.bind(this.previousTrigger,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+"Next"};OpenLayers.Util.extend(C,this.nextOptions);this.next=new OpenLayers.Control.Button(C);},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();if(this.activateOnDraw){this.activate();}},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.nextStack=[];},restore:function(B){var A=this.map.getZoomForResolution(B.resolution);this.map.setCenter(B.center,A);},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.PanZoom=OpenLayers.Class(OpenLayers.Control,{slideFactor:50,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);while(this.buttons.length){var A=this.buttons.shift();A.map=null;OpenLayers.Event.stopObservingElement(A);}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(F,A,E,D){var C=OpenLayers.Util.getImagesLocation()+A;var B=OpenLayers.Util.createAlphaImageDiv("OpenLayers_Control_PanZoom_"+F,E,D,C,"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=F;B.map=this.map;B.slideFactor=this.slideFactor;this.buttons.push(B);return B;},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.slideFactor);break;case"pandown":this.map.pan(0,this.slideFactor);break;case"panleft":this.map.pan(-this.slideFactor,0);break;case"panright":this.map.pan(this.slideFactor,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,defaultControl:null,initialize:function(A){OpenLayers.Control.prototype.initialize.apply(this,[A]);this.controls=[];},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;}},activate:function(){if(OpenLayers.Control.prototype.activate.apply(this,arguments)){for(var A=0;A<this.controls.length;A++){if(this.controls[A]==this.defaultControl){this.controls[A].activate();}}this.redraw();return true;}else{return false;}},deactivate:function(){if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)){for(var A=0;A<this.controls.length;A++){this.controls[A].deactivate();}return true;}else{return false;}},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);for(var A=0;A<this.controls.length;A++){this.map.addControl(this.controls[A]);this.controls[A].deactivate();this.controls[A].events.on({activate:this.redraw,deactivate:this.redraw,scope:this});}this.activate();return this.div;},redraw:function(){this.div.innerHTML="";if(this.active){for(var B=0;B<this.controls.length;B++){var A=this.controls[B].panel_div;if(this.controls[B].active){A.className=this.controls[B].displayClass+"ItemActive";}else{A.className=this.controls[B].displayClass+"ItemInactive";}this.div.appendChild(A);}}},activateControl:function(B){if(!this.active){return false;}if(B.type==OpenLayers.Control.TYPE_BUTTON){B.trigger();return ;}if(B.type==OpenLayers.Control.TYPE_TOGGLE){if(B.active){B.deactivate();}else{B.activate();}return ;}for(var A=0;A<this.controls.length;A++){if(this.controls[A]!=B){if(this.controls[A].type!=OpenLayers.Control.TYPE_TOGGLE){this.controls[A].deactivate();}}}B.activate();},addControls:function(A){if(!(A instanceof Array)){A=[A];}this.controls=this.controls.concat(A);for(var C=0;C<A.length;C++){var B=document.createElement("div");var D=document.createTextNode(" ");A[C].panel_div=B;if(A[C].title!=""){A[C].panel_div.title=A[C].title;}OpenLayers.Event.observe(A[C].panel_div,"click",OpenLayers.Function.bind(this.onClick,this,A[C]));OpenLayers.Event.observe(A[C].panel_div,"mousedown",OpenLayers.Function.bindAsEventListener(OpenLayers.Event.stop));}if(this.map){for(var C=0;C<A.length;C++){this.map.addControl(A[C]);A[C].deactivate();A[C].events.on({activate:this.redraw,deactivate:this.redraw,scope:this});}this.redraw();}},onClick:function(B,A){OpenLayers.Event.stop(A?A:window.event);this.activateControl(B);},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.Permalink=OpenLayers.Class(OpenLayers.Control,{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(C){OpenLayers.Control.prototype.setMap.apply(this,arguments);for(var A=0;A<this.map.controls.length;A++){var B=this.map.controls[A];if(B.CLASS_NAME=="OpenLayers.Control.ArgParser"){if(B.displayProjection!=this.displayProjection){this.displayProjection=B.displayProjection;}break;}}if(A==this.map.controls.length){this.map.addControl(new OpenLayers.Control.ArgParser({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});return this.div;},updateLink:function(){var A=this.map.getCenter();if(!A){return ;}var H=OpenLayers.Util.getParameters(this.base);H.zoom=this.map.getZoom();var F=A.lat;var G=A.lon;if(this.displayProjection){var E=OpenLayers.Projection.transform({x:G,y:F},this.map.getProjectionObject(),this.displayProjection);G=E.x;F=E.y;}H.lat=Math.round(F*100000)/100000;H.lon=Math.round(G*100000)/100000;H.layers="";for(var D=0;D<this.map.layers.length;D++){var C=this.map.layers[D];if(C.isBaseLayer){H.layers+=(C==this.map.baseLayer)?"B":"0";}else{H.layers+=(C.getVisibility())?"T":"F";}}var B=this.base;if(B.indexOf("?")!=-1){B=B.substring(0,B.indexOf("?"));}B+="?"+OpenLayers.Util.getParameterString(H);this.element.href=B;},CLASS_NAME:"OpenLayers.Control.Permalink"});OpenLayers.Control.Scale=OpenLayers.Class(OpenLayers.Control,{element:null,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.className=this.displayClass;this.div.appendChild(this.element);}this.map.events.register("moveend",this,this.updateScale);this.updateScale();return this.div;},updateScale:function(){var A=this.map.getScale();if(!A){return ;}if(A>=9500&&A<=950000){A=Math.round(A/1000)+"K";}else{if(A>=950000){A=Math.round(A/1000000)+"M";}else{A=Math.round(A);}}this.element.innerHTML=OpenLayers.i18n("scale",{scaleDenom:A});},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,initialize:function(A){OpenLayers.Control.prototype.initialize.apply(this,[A]);},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.eTop){this.div.className=this.displayClass;this.div.style.display="block";this.div.style.position="absolute";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 H=this.map.getResolution();if(!H){return ;}var I=this.maxWidth*H;var A;var D;if(I>0.1){A=this.topOutUnits;D=this.bottomOutUnits;}else{A=this.topInUnits;D=this.bottomInUnits;}var L=this.map.units;var C=OpenLayers.INCHES_PER_UNIT;var F=I*C[L]/C[A];var J=I*C[L]/C[D];var G=this.getBarLen(F);var E=this.getBarLen(J);F=G/C[L]*C[A];J=E/C[L]*C[D];var B=F/H;var K=J/H;this.eTop.style.width=Math.round(B)+"px";this.eBottom.style.width=Math.round(K)+"px";this.eTop.innerHTML=G+" "+A;this.eBottom.innerHTML=E+" "+D;},CLASS_NAME:"OpenLayers.Control.ScaleLine"});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)));},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","resize","focus","blur"],listeners:null,object:null,element:null,eventTypes:null,eventHandler:null,fallThrough:null,initialize:function(A,C,E,D){this.object=A;this.element=C;this.eventTypes=E;this.fallThrough=D;this.listeners={};this.eventHandler=OpenLayers.Function.bindAsEventListener(this.handleBrowserEvent,this);if(this.eventTypes!=null){for(var B=0;B<this.eventTypes.length;B++){this.addEventType(this.eventTypes[B]);}}if(this.element!=null){this.attachToElement(C);}},destroy:function(){if(this.element){OpenLayers.Event.stopObservingElement(this.element);}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.listeners[A]=[];}},attachToElement:function(C){for(var B=0;B<this.BROWSER_EVENTS.length;B++){var A=this.BROWSER_EVENTS[B];this.addEventType(A);OpenLayers.Event.observe(C,A,this.eventHandler);}OpenLayers.Event.observe(C,"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){if(D==null){D=this.object;}var A=this.listeners[B];if(A!=null){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(C,E,D){if(E==null){E=this.object;}var B=this.listeners[C];if(B!=null){for(var A=0;A<B.length;A++){if(B[A].obj==E&&B[A].func==D){B.splice(A,1);break;}}}},remove:function(A){if(this.listeners[A]!=null){this.listeners[A]=[];}},triggerEvent:function(D,A){if(A==null){A={};}A.object=this.object;A.element=this.element;if(!A.type){A.type=D;}var C=(this.listeners[D])?this.listeners[D].slice():null;if((C!=null)&&(C.length>0)){var E;for(var B=0;B<C.length;B++){var F=C[B];E=F.func.apply(F.obj,[A]);if((E!=undefined)&&(E==false)){break;}}if(!this.fallThrough){OpenLayers.Event.stop(A,true);}}return E;},handleBrowserEvent:function(A){A.xy=this.getMousePosition(A);this.triggerEvent(A.type,A);},getMousePosition:function(A){if(!this.element.offsets){this.element.offsets=OpenLayers.Util.pagePosition(this.element);this.element.offsets[0]+=(document.documentElement.scrollLeft||document.body.scrollLeft);this.element.offsets[1]+=(document.documentElement.scrollTop||document.body.scrollTop);}return new OpenLayers.Pixel((A.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))-this.element.offsets[0]-(document.documentElement.clientLeft||0),(A.clientY+(document.documentElement.scrollTop||document.body.scrollTop))-this.element.offsets[1]-(document.documentElement.clientTop||0));},CLASS_NAME:"OpenLayers.Events"});OpenLayers.Format=OpenLayers.Class({externalProjection:null,internalProjection:null,initialize:function(A){OpenLayers.Util.extend(this,A);},read:function(A){alert(OpenLayers.i18n("readNotImplemented"));},write:function(A){alert(OpenLayers.i18n("writeNotImplemented"));},CLASS_NAME:"OpenLayers.Format"});OpenLayers.Lang.en={unhandledRequest:"Unhandled request return ${statusText}",permalink:"Permalink",overlays:"Overlays",baseLayer:"Base Layer",sameProjection:"The overview map only works when it is in the same projection as the main map",readNotImplemented:"Read not implemented.",writeNotImplemented:"Write not implemented.",noFID:"Can't update a feature for which there is no FID.",errorLoadingGML:"Error in loading GML file ${url}",browserNotSupported:"Your browser does not support vector rendering. Currently supported renderers are:\n${renderers}",componentShouldBe:"addFeatures : component should be an ${geomType}",getFeatureError:"getFeatureFromEvent called on layer with no renderer. This usually means you destroyed a layer, but not some handler which is associated with it.",minZoomLevelError:"The minZoomLevel property is only intended for use with the FixedZoomLevels-descendent layers. That this wfs layer checks for minZoomLevel is a relic of thepast. We cannot, however, remove it without possibly breaking OL based applications that may depend on it. Therefore we are deprecating it -- the minZoomLevel check below will be removed at 3.0. Please instead use min/max resolution setting as described here: http://trac.openlayers.org/wiki/SettingZoomLevels",commitSuccess:"WFS Transaction: SUCCESS ${response}",commitFailed:"WFS Transaction: FAILED ${response}",googleWarning:"The Google Layer was unable to load correctly.<br><br>To get rid of this message, select a new BaseLayer in the layer switcher in the upper-right corner.<br><br>Most likely, this is because the Google Maps library script was either not included, or does not contain the correct API key for your site.<br><br>Developers: For help getting this working correctly, <a href='http://trac.openlayers.org/wiki/Google' target='_blank'>click here</a>",getLayerWarning:"The ${layerType} Layer was unable to load correctly.<br><br>To get rid of this message, select a new BaseLayer in the layer switcher in the upper-right corner.<br><br>Most likely, this is because the ${layerLib} library script was either not correctly included.<br><br>Developers: For help getting this working correctly, <a href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'>click here</a>",scale:"Scale = 1 : ${scaleDenom}",layerAlreadyAdded:"You tried to add the layer: ${layerName} to the map, but it has already been added",reprojectDeprecated:"You are using the 'reproject' option on the ${layerName} layer. This option is deprecated: its use was designed to support displaying data over commercial basemaps, but that functionality should now be achieved by using Spherical Mercator support. More information is available from http://trac.openlayers.org/wiki/SphericalMercator.",methodDeprecated:"This method has been deprecated and will be removed in 3.0. Please use ${newMethod} instead.",boundsAddError:"You must pass both x and y values to the add function.",lonlatAddError:"You must pass both lon and lat values to the add function.",pixelAddError:"You must pass both x and y values to the add function.",unsupportedGeometryType:"Unsupported geometry type: ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition failed: element with id ${elemId} may be misplaced.",end:""};OpenLayers.Lang.fr={overlays:"Couches de superposition"};OpenLayers.Popup.Anchored=OpenLayers.Class(OpenLayers.Popup,{relativePosition:null,anchor:null,initialize:function(H,E,C,D,B,G,F){var A=new Array(H,E,C,D,G,F);OpenLayers.Popup.prototype.initialize.apply(this,A);this.anchor=(B!=null)?B:{size:new OpenLayers.Size(0,0),offset:new OpenLayers.Pixel(0,0)};},draw:function(A){if(A==null){if((this.lonlat!=null)&&(this.map!=null)){A=this.map.getLayerPxFromLonLat(this.lonlat);}}this.relativePosition=this.calculateRelativePosition(A);return OpenLayers.Popup.prototype.draw.apply(this,arguments);},calculateRelativePosition:function(B){var D=this.map.getLonLatFromLayerPx(B);var C=this.map.getExtent();var A=C.determineQuadrant(D);return OpenLayers.Bounds.oppositeQuadrant(A);},moveTo:function(B){this.relativePosition=this.calculateRelativePosition(B);var C=this.calculateNewPx(B);var A=new Array(C);OpenLayers.Popup.prototype.moveTo.apply(this,A);},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);}},calculateNewPx:function(A){var D=A.offset(this.anchor.offset);var C=(this.relativePosition.charAt(0)=="t");D.y+=(C)?-this.size.h:this.anchor.size.h;var B=(this.relativePosition.charAt(1)=="l");D.x+=(B)?-this.size.w:this.anchor.size.w;return D;},CLASS_NAME:"OpenLayers.Popup.Anchored"});OpenLayers.Projection=OpenLayers.Class({proj:null,projCode:null,initialize:function(B,A){OpenLayers.Util.extend(this,A);this.projCode=B;if(window.Proj4js){this.proj=new Proj4js.Proj(B);}},getCode:function(){return this.proj?this.proj.srsCode:this.projCode;},getUnits:function(){return this.proj?this.proj.units:null;},toString:function(){return this.getCode();},equals:function(A){if(A&&A.getCode){return this.getCode()==A.getCode();}else{return false;}},destroy:function(){delete this.proj;delete this.projCode;},CLASS_NAME:"OpenLayers.Projection"});OpenLayers.Projection.transforms={};OpenLayers.Projection.addTransform=function(C,B,A){if(!OpenLayers.Projection.transforms[C]){OpenLayers.Projection.transforms[C]={};}OpenLayers.Projection.transforms[C][B]=A;};OpenLayers.Projection.transform=function(A,C,B){if(C.proj&&B.proj){A=Proj4js.transform(C.proj,B.proj,A);}else{if(C&&B&&OpenLayers.Projection.transforms[C.getCode()]&&OpenLayers.Projection.transforms[C.getCode()][B.getCode()]){OpenLayers.Projection.transforms[C.getCode()][B.getCode()](A);}}return A;};OpenLayers.Renderer.Elements=OpenLayers.Class(OpenLayers.Renderer,{rendererRoot:null,root:null,xmlns:null,minimumSymbolizer:{strokeLinecap:"round",strokeOpacity:1,fillOpacity:1,pointRadius:0},initialize:function(A){OpenLayers.Renderer.prototype.initialize.apply(this,arguments);this.rendererRoot=this.createRenderRoot();this.root=this.createRoot();this.rendererRoot.appendChild(this.root);this.container.appendChild(this.rendererRoot);},destroy:function(){this.clear();this.rendererRoot=null;this.root=null;this.xmlns=null;OpenLayers.Renderer.prototype.destroy.apply(this,arguments);},clear:function(){if(this.root){while(this.root.childNodes.length>0){this.root.removeChild(this.root.firstChild);}}},getNodeType:function(B,A){},drawGeometry:function(G,D,F){var C=G.CLASS_NAME;if((C=="OpenLayers.Geometry.Collection")||(C=="OpenLayers.Geometry.MultiPoint")||(C=="OpenLayers.Geometry.MultiLineString")||(C=="OpenLayers.Geometry.MultiPolygon")){for(var B=0;B<G.components.length;B++){this.drawGeometry(G.components[B],D,F);}return ;}if(D.display!="none"){var A=this.getNodeType(G,D);var E=this.nodeFactory(G.id,A);E._featureId=F;E._geometryClass=G.CLASS_NAME;E._style=D;E=this.drawGeometryNode(E,G);if(E.parentNode!=this.root){this.root.appendChild(E);}this.postDraw(E);}else{E=OpenLayers.Util.getElement(G.id);if(E){E.parentNode.removeChild(E);}}},drawGeometryNode:function(C,D,B){B=B||C._style;OpenLayers.Util.applyDefaults(B,this.minimumSymbolizer);var A={isFilled:true,isStroked:true};switch(D.CLASS_NAME){case"OpenLayers.Geometry.Point":this.drawPoint(C,D);break;case"OpenLayers.Geometry.LineString":A.isFilled=false;this.drawLineString(C,D);break;case"OpenLayers.Geometry.LinearRing":this.drawLinearRing(C,D);break;case"OpenLayers.Geometry.Polygon":this.drawPolygon(C,D);break;case"OpenLayers.Geometry.Surface":this.drawSurface(C,D);break;case"OpenLayers.Geometry.Rectangle":this.drawRectangle(C,D);break;default:break;}C._style=B;C._options=A;return this.setStyle(C,B,A,D);},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){},getFeatureIdFromEvent:function(A){var B=A.target||A.srcElement;return B._featureId;},eraseGeometry:function(C){if((C.CLASS_NAME=="OpenLayers.Geometry.MultiPoint")||(C.CLASS_NAME=="OpenLayers.Geometry.MultiLineString")||(C.CLASS_NAME=="OpenLayers.Geometry.MultiPolygon")){for(var B=0;B<C.components.length;B++){this.eraseGeometry(C.components[B]);}}else{var A=OpenLayers.Util.getElement(C.id);if(A&&A.parentNode){A.parentNode.removeChild(A);}}},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;},CLASS_NAME:"OpenLayers.Renderer.Elements"});OpenLayers.Tile=OpenLayers.Class({EVENT_TYPES:["loadstart","loadend","reload"],events:null,id:null,layer:null,url:null,bounds:null,size:null,position:null,isLoading:false,isBackBuffer:false,lastRatio:1,isFirstDraw:true,backBufferTile:null,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);},destroy:function(){if(OpenLayers.Util.indexOf(this.layer.SUPPORTED_TRANSITIONS,this.layer.transitionEffect)!=-1){this.layer.events.unregister("loadend",this,this.resetBackBuffer);this.events.unregister("loadend",this,this.resetBackBuffer);}else{this.events.unregister("loadend",this,this.showTile);}this.layer=null;this.bounds=null;this.size=null;this.position=null;this.events.destroy();this.events=null;if(this.backBufferTile){this.backBufferTile.destroy();this.backBufferTile=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 C=(A&&this.bounds.intersectsBounds(A,false));var B=(C||this.layer.displayOutsideMaxExtent);if(OpenLayers.Util.indexOf(this.layer.SUPPORTED_TRANSITIONS,this.layer.transitionEffect)!=-1){if(B){if(!this.backBufferTile){this.backBufferTile=this.clone();this.backBufferTile.hide();this.backBufferTile.isBackBuffer=true;this.events.register("loadend",this,this.resetBackBuffer);this.layer.events.register("loadend",this,this.resetBackBuffer);}this.startTransition();}else{if(this.backBufferTile){this.backBufferTile.clear();}}}else{if(B&&this.isFirstDraw){this.events.register("loadend",this,this.showTile);this.isFirstDraw=false;}}this.shouldDraw=B;this.clear();return B;},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;},startTransition:function(){},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.imageSize||this.size;this.backBufferTile.imageOffset=this.layer.imageOffset;this.backBufferTile.resolution=this.layer.getResolution();this.backBufferTile.renderTile();}}},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=function(){return false;};OpenLayers.Event.stop(A);},switchModeTo:function(B){if(B!=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"&&B!="measure"){for(var A=0;A<this.measureDivs.length;A++){if(this.measureDivs[A]){this.map.layerContainerDiv.removeChild(this.measureDivs[A]);}}this.measureDivs=[];this.measureStart=null;}this.mode=B;if(this.buttons[B]){OpenLayers.Util.modifyAlphaImageDiv(this.buttons[B],null,null,null,this.buttons[B].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.PanZoomBar=OpenLayers.Class(OpenLayers.Control.PanZoom,{zoomStopWidth:18,zoomStopHeight:11,slider:null,sliderEvents:null,zoomBarDiv:null,divEvents:null,zoomWorldIcon:false,initialize:function(){OpenLayers.Control.PanZoom.prototype.initialize.apply(this,arguments);},destroy:function(){this.div.removeChild(this.slider);this.slider=null;this.sliderEvents.destroy();this.sliderEvents=null;this.div.removeChild(this.zoombarDiv);this.zoomBarDiv=null;this.divEvents.destroy();this.divEvents=null;this.map.events.un({zoomend:this.moveZoomBar,changebaselayer:this.redraw,scope:this});OpenLayers.Control.PanZoom.prototype.destroy.apply(this,arguments);},setMap:function(A){OpenLayers.Control.PanZoom.prototype.setMap.apply(this,arguments);this.map.events.register("changebaselayer",this,this.redraw);},redraw:function(){if(this.div!=null){this.div.innerHTML="";}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="OpenLayers_Control_PanZoomBar_Slider"+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);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="OpenLayers_Control_PanZoomBar"+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;}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);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;},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;var B=(this.map.getNumZoomLevels()-1)-C;if(this.map.fractionalZoom){B=Math.min(Math.max(B,0),this.map.getNumZoomLevels()-1);}else{B=Math.floor(B);}this.map.zoomTo(B);OpenLayers.Event.stop(A);},zoomBarDown:function(A){if(!OpenLayers.Event.isLeftClick(A)){return ;}this.map.events.on({mousemove:this.passEventToSlider,mouseup:this.passEventToSlider,scope:this});this.mouseDragStart=A.xy.clone();this.zoomStart=A.xy.clone();this.div.style.cursor="move";this.zoombarDiv.offsets=null;OpenLayers.Event.stop(A);},zoomBarDrag:function(B){if(this.mouseDragStart!=null){var A=this.mouseDragStart.y-B.xy.y;var D=OpenLayers.Util.pagePosition(this.zoombarDiv);if((B.clientY-D[1])>0&&(B.clientY-D[1])<parseInt(this.zoombarDiv.style.height)-2){var C=parseInt(this.slider.style.top)-A;this.slider.style.top=C+"px";}this.mouseDragStart=B.xy.clone();OpenLayers.Event.stop(B);}},zoomBarUp:function(B){if(!OpenLayers.Event.isLeftClick(B)){return ;}if(this.zoomStart){this.div.style.cursor="";this.map.events.un({mouseup:this.passEventToSlider,mousemove:this.passEventToSlider,scope:this});var A=this.zoomStart.y-B.xy.y;var C=this.map.zoom;if(this.map.fractionalZoom){C+=A/this.zoomStopHeight;C=Math.min(Math.max(C,0),this.map.getNumZoomLevels()-1);}else{C+=Math.round(A/this.zoomStopHeight);}this.map.zoomTo(C);this.moveZoomBar();this.mouseDragStart=null;OpenLayers.Event.stop(B);}},moveZoomBar:function(){var A=((this.map.getNumZoomLevels()-1)-this.map.getZoom())*this.zoomStopHeight+this.startTop+1;this.slider.style.top=A+"px";},CLASS_NAME:"OpenLayers.Control.PanZoomBar"});OpenLayers.Format.XML=OpenLayers.Class(OpenLayers.Format,{xmldom:null,initialize:function(A){if(window.ActiveXObject){this.xmldom=new ActiveXObject("Microsoft.XMLDOM");}OpenLayers.Format.prototype.initialize.apply(this,[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;});return B;},write:function(B){var C;if(this.xmldom){C=B.xml;}else{var A=new XMLSerializer();if(B.nodeType==1){var D=document.implementation.createDocument("","",null);if(D.importNode){B=D.importNode(B,true);}D.appendChild(B);C=A.serializeToString(D);}else{C=A.serializeToString(B);}}return C;},createElementNS:function(C,A){var B;if(this.xmldom){if(typeof C=="string"){B=this.xmldom.createNode(1,A,C);}else{B=this.xmldom.createNode(1,A,"");}}else{B=document.createElementNS(C,A);}return B;},createTextNode:function(B){var A;if(this.xmldom){A=this.xmldom.createTextNode(B);}else{A=document.createTextNode(B);}return A;},getElementsByTagNameNS:function(F,E,A){var G=[];if(F.getElementsByTagNameNS){G=F.getElementsByTagNameNS(E,A);}else{var D=F.getElementsByTagName("*");var C,H;for(var B=0;B<D.length;++B){C=D[B];H=(C.prefix)?(C.prefix+":"+A):A;if((A=="*")||(H==C.nodeName)){if((E=="*")||(E==C.namespaceURI)){G.push(C);}}}}return G;},getAttributeNodeNS:function(G,F,B){var E=null;if(G.getAttributeNodeNS){E=G.getAttributeNodeNS(F,B);}else{var A=G.attributes;var D,H;for(var C=0;C<A.length;++C){D=A[C];if(D.namespaceURI==F){H=(D.prefix)?(D.prefix+":"+B):B;if(H==D.nodeName){E=D;break;}}}}return E;},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;try{B=A.firstChild.nodeValue;}catch(D){B=(C!=undefined)?C:"";}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;},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";}}},CLASS_NAME:"OpenLayers.Format.XML"});OpenLayers.Handler=OpenLayers.Class({id:null,control:null,map:null,keyMask:null,active:false,evt:null,initialize:function(C,B,A){OpenLayers.Util.extend(this,A);this.control=C;this.callbacks=B;if(C.map){this.setMap(C.map);}OpenLayers.Util.extend(this,A);this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");},setMap:function(A){this.map=A;},checkModifiers:function(A){if(this.keyMask==null){return true;}var B=(A.shiftKey?OpenLayers.Handler.MOD_SHIFT:0)|(A.ctrlKey?OpenLayers.Handler.MOD_CTRL:0)|(A.altKey?OpenLayers.Handler.MOD_ALT:0);return(B==this.keyMask);},activate:function(){if(this.active){return false;}var B=OpenLayers.Events.prototype.BROWSER_EVENTS;for(var A=0;A<B.length;A++){if(this[B[A]]){this.register(B[A],this[B[A]]);}}this.active=true;return true;},deactivate:function(){if(!this.active){return false;}var B=OpenLayers.Events.prototype.BROWSER_EVENTS;for(var A=0;A<B.length;A++){if(this[B[A]]){this.unregister(B[A],this[B[A]]);}}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.Lang.de=OpenLayers.Util.applyDefaults({unhandledRequest:"Unbehandelte Anfragerückmeldung ${statusText}",permalink:"Permalink",overlays:"Overlays",baseLayer:"Grundkarte",sameProjection:"Die Übersichtskarte funktioniert nur, wenn sie dieselbe Projektion wie die Hauptkarte verwendet",readNotImplemented:"Lesen nicht implementiert.",writeNotImplemented:"Schreiben nicht implementiert.",noFID:"Ein Feature, für das keine FID existiert, kann nicht aktualisiert werden.",errorLoadingGML:"Fehler beim Laden der GML-Datei ${url}",browserNotSupported:"Ihr Browser unterstützt keine Vektordarstellung. Aktuell unterstützte Renderer:\n${renderers}",componentShouldBe:"addFeatures : Komponente sollte vom Typ ${geomType} sein",commitSuccess:"WFS-Transaktion: ERFOLGREICH ${response}",commitFailed:"WFS-Transaktion: FEHLGESCHLAGEN ${response}",googleWarning:"Der Google-Layer konnte nicht korrekt geladen werden.<br><br>Um diese Meldung nicht mehr zu erhalten, wählen Sie einen anderen Hintergrundlayer aus dem LayerSwitcher in der rechten oberen Ecke.<br><br>Sehr wahrscheinlich tritt dieser Fehler auf, weil das Skript der Google-Maps-Bibliothek nicht eingebunden wurde oder keinen gültigen API-Schlüssel für Ihre URL enthält.<br><br>Entwickler: Für Hilfe zum korrekten Einbinden des Google-Layers <a href='http://trac.openlayers.org/wiki/Google' target='_blank'>hier klicken</a>",getLayerWarning:"Der ${layerType}-Layer konnte nicht korrekt geladen werden.<br><br>Um diese Meldung nicht mehr zu erhalten, wählen Sie einen anderen Hintergrundlayer aus dem LayerSwitcher in der rechten oberen Ecke.<br><br>Sehr wahrscheinlich tritt dieser Fehler auf, weil das Skript der \"${layerLib}\"-Bibliothek nicht eingebunden wurde.<br><br>Entwickler: Für Hilfe zum korrekten Einbinden von Layern <a href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'>hier klicken</a>",scale:"Maßstab = 1 : ${scaleDenom}",end:""},OpenLayers.Lang.en);OpenLayers.Lang["en-CA"]=OpenLayers.Util.applyDefaults({},OpenLayers.Lang.en);OpenLayers.Map=OpenLayers.Class({Z_INDEX_BASE:{BaseLayer:100,Overlay:325,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,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,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,initialize:function(G,C){this.tileSize=new OpenLayers.Size(OpenLayers.Map.TILE_WIDTH,OpenLayers.Map.TILE_HEIGHT);this.maxExtent=new OpenLayers.Bounds(-180,-90,180,90);this.theme=OpenLayers._getScriptLocation()+"theme/default/style.css";OpenLayers.Util.extend(this,C);this.id=OpenLayers.Util.createUniqueID("OpenLayers.Map_");this.div=OpenLayers.Util.getElement(G);var F=this.div.id+"_OpenLayers_ViewPort";this.viewPortDiv=OpenLayers.Util.createDiv(F,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);F=this.div.id+"_OpenLayers_Container";this.layerContainerDiv=OpenLayers.Util.createDiv(F);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);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 E=true;var B=document.getElementsByTagName("link");for(var D=0;D<B.length;++D){if(OpenLayers.Util.isEquivalentUrl(B.item(D).href,this.theme)){E=false;break;}}if(E){var A=document.createElement("link");A.setAttribute("rel","stylesheet");A.setAttribute("type","text/css");A.setAttribute("href",this.theme);document.getElementsByTagName("head")[0].appendChild(A);}}this.layers=[];if(this.controls==null){if(OpenLayers.Control!=null){this.controls=[new OpenLayers.Control.Navigation(),new OpenLayers.Control.PanZoom(),new OpenLayers.Control.ArgParser(),new OpenLayers.Control.Attribution()];}else{this.controls=[];}}for(var D=0;D<this.controls.length;D++){this.addControlToMap(this.controls[D]);}this.popups=[];this.unloadDestroy=OpenLayers.Function.bind(this.destroy,this);OpenLayers.Event.observe(window,"unload",this.unloadDestroy);},unloadDestroy:null,updateSizeDestroy:null,destroy:function(){if(!this.unloadDestroy){return false;}OpenLayers.Event.stopObserving(window,"unload",this.unloadDestroy);this.unloadDestroy=null;if(this.updateSizeDestroy){OpenLayers.Event.stopObserving(window,"resize",this.updateSizeDestroy);}else{this.events.unregister("resize",this,this.updateSize);}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(D){var A=null;for(var C=0;C<this.layers.length;C++){var B=this.layers[C];if(B.id==D){A=B;break;}}return A;},setLayerZIndex:function(B,A){B.setZIndex(this.Z_INDEX_BASE[B.isBaseLayer?"BaseLayer":"Overlay"]+A*5);},resetLayersZIndex:function(){for(var B=0;B<this.layers.length;B++){var A=this.layers[B];this.setLayerZIndex(A,B);}},addLayer:function(B){for(var A=0;A<this.layers.length;A++){if(this.layers[A]==B){var C=OpenLayers.i18n("layerAlreadyAdded",{layerName:B.name});OpenLayers.Console.warn(C);return false;}}this.events.triggerEvent("preaddlayer",{layer:B});B.div.className="olLayerDiv";B.div.style.overflow="";this.setLayerZIndex(B,this.layers.length);if(B.isFixed){this.viewPortDiv.appendChild(B.div);}else{this.layerContainerDiv.appendChild(B.div);}this.layers.push(B);B.setMap(this);if(B.isBaseLayer){if(this.baseLayer==null){this.setBaseLayer(B);}else{B.setVisibility(false);}}else{B.redraw();}this.events.triggerEvent("addlayer",{layer:B});},addLayers:function(B){for(var A=0;A<B.length;A++){this.addLayer(B[A]);}},removeLayer:function(B,D){if(D==null){D=true;}if(B.isFixed){this.viewPortDiv.removeChild(B.div);}else{this.layerContainerDiv.removeChild(B.div);}OpenLayers.Util.removeItem(this.layers,B);B.removeMap(this);B.map=null;if(this.baseLayer==B){this.baseLayer=null;if(D){for(var A=0;A<this.layers.length;A++){var C=this.layers[A];if(C.isBaseLayer){this.setBaseLayer(C);break;}}}}this.resetLayersZIndex();this.events.triggerEvent("removelayer",{layer:B});},getNumLayers:function(){return this.layers.length;},getLayerIndex:function(A){return OpenLayers.Util.indexOf(this.layers,A);},setLayerIndex:function(C,A){var D=this.getLayerIndex(C);if(A<0){A=0;}else{if(A>this.layers.length){A=this.layers.length;}}if(D!=A){this.layers.splice(D,1);this.layers.splice(A,0,C);for(var B=0;B<this.layers.length;B++){this.setLayerZIndex(this.layers[B],B);}this.events.triggerEvent("changelayer",{layer:C,property:"order"});}},raiseLayer:function(B,C){var A=this.getLayerIndex(B)+C;this.setLayerIndex(B,A);},setBaseLayer:function(E){var D=null;if(this.baseLayer){D=this.baseLayer.getExtent();}if(E!=this.baseLayer){if(OpenLayers.Util.indexOf(this.layers,E)!=-1){if(this.baseLayer!=null){this.baseLayer.setVisibility(false);}this.baseLayer=E;this.viewRequestID++;this.baseLayer.visibility=true;var A=this.getCenter();if(A!=null){var B=(D)?D.getCenterLonLat():A;var C=(D)?this.getZoomForExtent(D,true):this.getZoomForResolution(this.resolution,true);this.setCenter(B,C,false,true);}this.events.triggerEvent("changebaselayer",{layer:this.baseLayer});}}},addControl:function(B,A){this.controls.push(B);this.addControlToMap(B,A);},addControlToMap:function(B,A){B.outsideViewport=(B.div!=null);if(this.displayProjection&&!B.displayProjection){B.displayProjection=this.displayProjection;}B.setMap(this);var C=B.draw(A);if(C){if(!B.outsideViewport){C.style.zIndex=this.Z_INDEX_BASE.Control+this.controls.length;this.viewPortDiv.appendChild(C);}}},getControl:function(D){var A=null;for(var B=0;B<this.controls.length;B++){var C=this.controls[B];if(C.id==D){A=C;break;}}return A;},removeControl:function(A){if((A)&&(A==this.getControl(A.id))){if(A.div&&(A.div.parentNode==this.viewPortDiv)){this.viewPortDiv.removeChild(A.div);}OpenLayers.Util.removeItem(this.controls,A);}},addPopup:function(A,D){if(D){for(var B=this.popups.length-1;B>=0;--B){this.removePopup(this.popups[B]);}}A.map=this;this.popups.push(A);var C=A.draw();if(C){C.style.zIndex=this.Z_INDEX_BASE.Popup+this.popups.length;this.layerContainerDiv.appendChild(C);}},removePopup:function(A){OpenLayers.Util.removeItem(this.popups,A);if(A.div){try{this.layerContainerDiv.removeChild(A.div);}catch(B){}}A.map=null;},getSize:function(){var A=null;if(this.size!=null){A=this.size.clone();}return A;},updateSize:function(){this.events.element.offsets=null;var B=this.getCurrentSize();var E=this.getSize();if(E==null){this.size=E=B;}if(!B.equals(E)){this.size=B;for(var C=0;C<this.layers.length;C++){this.layers[C].onMapResize();}if(this.baseLayer!=null){var A=new OpenLayers.Pixel(B.w/2,B.h/2);var F=this.getLonLatFromViewPortPx(A);var D=this.getZoom();this.zoom=null;this.setCenter(this.getCenter(),D);}}},getCurrentSize:function(){var A=new OpenLayers.Size(this.div.clientWidth,this.div.clientHeight);if(A.w==0&&A.h==0||isNaN(A.w)&&isNaN(A.h)){var B=OpenLayers.Element.getDimensions(this.div);A.w=B.width;A.h=B.height;}if(A.w==0&&A.h==0||isNaN(A.w)&&isNaN(A.h)){A.w=parseInt(this.div.style.width);A.h=parseInt(this.div.style.height);}return A;},calculateBounds:function(A,B){var E=null;if(A==null){A=this.getCenter();}if(B==null){B=this.getResolution();}if((A!=null)&&(B!=null)){var D=this.getSize();var F=D.w*B;var C=D.h*B;E=new OpenLayers.Bounds(A.lon-F/2,A.lat-C/2,A.lon+F/2,A.lat+C/2);}return E;},getCenter:function(){return this.center;},getZoom:function(){return this.zoom;},pan:function(D,C,E){if(!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().containsLonLat(B)){if(!this.panTween){this.panTween=new OpenLayers.Tween(this.panMethod);}var A=this.getCenter();var D={lon:A.lon,lat:A.lat};var C={lon:B.lon,lat:B.lat};this.panTween.start(D,C,50,{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,L,O){if(!O){O={};}var K=O.dragging;var C=O.forceZoomChange;var H=O.noEvent;if(this.panTween&&O.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(L==null){L=this.getZoom();}var D=this.getResolutionForZoom(L);var M=this.calculateBounds(G,D);if(!this.restrictedExtent.containsBounds(M)){var N=this.restrictedExtent.getCenterLonLat();if(M.getWidth()>this.restrictedExtent.getWidth()){G=new OpenLayers.LonLat(N.lon,G.lat);}else{if(M.left<this.restrictedExtent.left){G=G.add(this.restrictedExtent.left-M.left,0);}else{if(M.right>this.restrictedExtent.right){G=G.add(this.restrictedExtent.right-M.right,0);}}}if(M.getHeight()>this.restrictedExtent.getHeight()){G=new OpenLayers.LonLat(G.lon,N.lat);}else{if(M.bottom<this.restrictedExtent.bottom){G=G.add(0,this.restrictedExtent.bottom-M.bottom);}else{if(M.top>this.restrictedExtent.top){G=G.add(0,this.restrictedExtent.top-M.top);}}}}}var B=C||((this.isValidZoomLevel(L))&&(L!=this.getZoom()));var E=(this.isValidLonLat(G))&&(!G.equals(this.center));if(B||E||!K){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=L;this.resolution=this.getResolutionForZoom(L);this.viewRequestID++;}var A=this.getExtent();this.baseLayer.moveTo(A,B,K);A=this.baseLayer.getExtent();for(var F=0;F<this.layers.length;F++){var I=this.layers[F];if(!I.isBaseLayer){var J=I.calculateInRange();if(I.inRange!=J){I.inRange=J;if(!J){I.display(false);}this.events.triggerEvent("changelayer",{layer:I,property:"visibility"});}if(J&&I.visibility){I.moveTo(A,B,K);}}}if(B){for(var F=0;F<this.popups.length;F++){this.popups[F].updatePosition();}}this.events.triggerEvent("move");if(B){this.events.triggerEvent("zoomend");}}if(!K&&!H){this.events.triggerEvent("moveend");}this.dragging=!!K;},centerLayerContainer:function(B){var A=this.getViewPortPxFromLonLat(this.layerContainerOrigin);var C=this.getViewPortPxFromLonLat(B);if((A!=null)&&(C!=null)){this.layerContainerDiv.style.left=(A.x-C.x)+"px";this.layerContainerDiv.style.top=(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(){var A=null;if(this.baseLayer!=null){A=this.baseLayer.maxExtent;}return A;},getNumZoomLevels:function(){var A=null;if(this.baseLayer!=null){A=this.baseLayer.numZoomLevels;}return A;},getExtent:function(){var A=null;if(this.baseLayer!=null){A=this.baseLayer.getExtent();}return A;},getResolution:function(){var A=null;if(this.baseLayer!=null){A=this.baseLayer.getResolution();}return A;},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(C){var B=C.getCenterLonLat();if(this.baseLayer.wrapDateLine){var A=this.getMaxExtent();C=C.clone();while(C.right<C.left){C.right+=A.getWidth();}B=C.getCenterLonLat().wrapDateLine(A);}this.setCenter(B,this.getZoomForExtent(C));},zoomToMaxExtent:function(){this.zoomToExtent(this.getMaxExtent());},zoomToScale:function(G){var D=OpenLayers.Util.getResolutionFromScale(G,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);},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(A){return this.getViewPortPxFromLonLat(A);},getViewPortPxFromLayerPx:function(D){var C=null;if(D!=null){var B=parseInt(this.layerContainerDiv.style.left);var A=parseInt(this.layerContainerDiv.style.top);C=D.add(B,A);}return C;},getLayerPxFromViewPortPx:function(C){var D=null;if(C!=null){var B=-parseInt(this.layerContainerDiv.style.left);var A=-parseInt(this.layerContainerDiv.style.top);D=C.add(B,A);if(isNaN(D.x)||isNaN(D.y)){D=null;}}return D;},getLonLatFromLayerPx:function(A){A=this.getViewPortPxFromLayerPx(A);return this.getLonLatFromViewPortPx(A);},getLayerPxFromLonLat:function(B){var A=this.getViewPortPxFromLonLat(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.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);},moveTo:function(A){if((A!=null)&&(this.icon!=null)){this.icon.moveTo(A);}this.lonlat=this.map.getLonLatFromLayerPx(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.AnchoredBubble=OpenLayers.Class(OpenLayers.Popup.Anchored,{rounded:false,initialize:function(G,D,B,C,A,F,E){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;},moveTo:function(A){OpenLayers.Popup.Anchored.prototype.moveTo.apply(this,arguments);this.setRicoCorners(!this.rounded);this.rounded=true;},setSize:function(A){OpenLayers.Popup.Anchored.prototype.setSize.apply(this,arguments);if(this.contentDiv!=null){var B=this.size.clone();B.h-=(2*OpenLayers.Popup.AnchoredBubble.CORNER_SIZE);B.h-=(2*this.padding);this.contentDiv.style.height=B.h+"px";this.contentDiv.style.width=B.w+"px";if(this.map){this.setRicoCorners(!this.rounded);this.rounded=true;}}},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.contentDiv,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(C){var A=this.getCornersToRound(this.relativePosition);var B={corners:A,color:this.backgroundColor,bgColor:"transparent",blend:false};if(C){OpenLayers.Rico.Corner.round(this.div,B);}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.Renderer.SVG=OpenLayers.Class(OpenLayers.Renderer.Elements,{xmlns:"http://www.w3.org/2000/svg",MAX_PIXEL:15000,localResolution:null,initialize:function(A){if(!this.supported()){return ;}OpenLayers.Renderer.Elements.prototype.initialize.apply(this,arguments);},destroy:function(){OpenLayers.Renderer.Elements.prototype.destroy.apply(this,arguments);},supported:function(){var A="http://www.w3.org/TR/SVG11/feature#";return(document.implementation&&(document.implementation.hasFeature("org.w3c.svg","1.0")||document.implementation.hasFeature(A+"SVG","1.1")||document.implementation.hasFeature(A+"BasicStructure","1.1")));},inValidRange:function(A,B){return(A>=-this.MAX_PIXEL&&A<=this.MAX_PIXEL&&B>=-this.MAX_PIXEL&&B<=this.MAX_PIXEL);},setExtent:function(B){OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments);var A=this.getResolution();if(!this.localResolution||A!=this.localResolution){this.left=-B.left/A;this.top=B.top/A;}var E=0;var D=0;if(this.localResolution&&A==this.localResolution){E=(this.left)-(-B.left/A);D=(this.top)-(B.top/A);}this.localResolution=A;var C=E+" "+D+" "+B.getWidth()/A+" "+B.getHeight()/A;this.rendererRoot.setAttributeNS(null,"viewBox",C);},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":A=B.externalGraphic?"image":"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(C,A,J){A=A||C._style;J=J||C._options;var H=C.getAttributeNS(null,"cx");if(C._geometryClass=="OpenLayers.Geometry.Point"&&H){if(A.externalGraphic){H=parseFloat(H);var G=parseFloat(C.getAttributeNS(null,"cy"));if(A.graphicWidth&&A.graphicHeight){C.setAttributeNS(null,"preserveAspectRatio","none");}var B=A.graphicWidth||A.graphicHeight;var I=A.graphicHeight||A.graphicWidth;B=B?B:A.pointRadius*2;I=I?I:A.pointRadius*2;var F=(A.graphicXOffset!=undefined)?A.graphicXOffset:-(0.5*B);var D=(A.graphicYOffset!=undefined)?A.graphicYOffset:-(0.5*I);var E=A.graphicOpacity||A.fillOpacity;C.setAttributeNS(null,"x",(H+F).toFixed());C.setAttributeNS(null,"y",(G+D).toFixed());C.setAttributeNS(null,"width",B);C.setAttributeNS(null,"height",I);C.setAttributeNS("http://www.w3.org/1999/xlink","href",A.externalGraphic);C.setAttributeNS(null,"style","opacity: "+E);}else{C.setAttributeNS(null,"r",A.pointRadius);}}if(J.isFilled){C.setAttributeNS(null,"fill",A.fillColor);C.setAttributeNS(null,"fill-opacity",A.fillOpacity);}else{C.setAttributeNS(null,"fill","none");}if(J.isStroked){C.setAttributeNS(null,"stroke",A.strokeColor);C.setAttributeNS(null,"stroke-opacity",A.strokeOpacity);C.setAttributeNS(null,"stroke-width",A.strokeWidth);C.setAttributeNS(null,"stroke-linecap",A.strokeLinecap);}else{C.setAttributeNS(null,"stroke","none");}if(A.pointerEvents){C.setAttributeNS(null,"pointer-events",A.pointerEvents);}if(A.cursor!=null){C.setAttributeNS(null,"cursor",A.cursor);}return C;},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(){return this.nodeFactory(this.container.id+"_root","g");},drawPoint:function(A,B){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);}else{D.setAttributeNS(null,"cx","");D.setAttributeNS(null,"cy","");D.setAttributeNS(null,"r",0);}},drawLineString:function(A,B){A.setAttributeNS(null,"points",this.getComponentsString(B.components));},drawLinearRing:function(A,B){A.setAttributeNS(null,"points",this.getComponentsString(B.components));},drawPolygon:function(F,H){var G="";var A=true;for(var D=0;D<H.components.length;D++){var C=H.components[D];G+=" M";for(var E=0;E<C.components.length;E++){var B=this.getShortString(C.components[E]);if(B){G+=" "+B;}else{A=false;}}}G+=" z";if(A){F.setAttributeNS(null,"d",G);F.setAttributeNS(null,"fill-rule","evenodd");}else{F.setAttributeNS(null,"d","");}},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);}else{C.setAttributeNS(null,"x","");C.setAttributeNS(null,"y","");C.setAttributeNS(null,"width",0);C.setAttributeNS(null,"height",0);}},drawSurface:function(D,F){var E=null;var A=true;for(var C=0;C<F.components.length;C++){if((C%3)==0&&(C/3)==0){var B=this.getShortString(F.components[C]);if(!B){A=false;}E="M "+B;}else{if((C%3)==1){var B=this.getShortString(F.components[C]);if(!B){A=false;}E+=" C "+B;}else{var B=this.getShortString(F.components[C]);if(!B){A=false;}E+=" "+B;}}}E+=" Z";if(A){D.setAttributeNS(null,"d",E);}else{D.setAttributeNS(null,"d","");}},getComponentsString:function(D){var A=[];for(var C=0;C<D.length;C++){var B=this.getShortString(D[C]);if(B){A.push(B);}}return A.join(",");},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;}},CLASS_NAME:"OpenLayers.Renderer.SVG"});OpenLayers.Renderer.VML=OpenLayers.Class(OpenLayers.Renderer.Elements,{xmlns:"urn:schemas-microsoft-com:vml",initialize:function(A){if(!this.supported()){return ;}if(!document.namespaces.v){document.namespaces.add("v",this.xmlns);var B=document.createStyleSheet();B.addRule("v\\:*","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(C){OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments);var A=this.getResolution();var D=C.left/A+" "+C.top/A;this.root.setAttribute("coordorigin",D);var B=C.getWidth()/A+" "+-C.getHeight()/A;this.root.setAttribute("coordsize",B);},setSize:function(A){OpenLayers.Renderer.prototype.setSize.apply(this,arguments);this.rendererRoot.style.width=this.size.w;this.rendererRoot.style.height=this.size.h;this.root.style.width=this.size.w;this.root.style.height=this.size.h;},getNodeType:function(C,B){var A=null;switch(C.CLASS_NAME){case"OpenLayers.Geometry.Point":A=B.externalGraphic?"v:rect":"v:oval";break;case"OpenLayers.Geometry.Rectangle":A="v:rect";break;case"OpenLayers.Geometry.LineString":case"OpenLayers.Geometry.LinearRing":case"OpenLayers.Geometry.Polygon":case"OpenLayers.Geometry.Curve":case"OpenLayers.Geometry.Surface":A="v:shape";break;default:break;}return A;},setStyle:function(C,A,M,I){A=A||C._style;M=M||C._options;if(C._geometryClass=="OpenLayers.Geometry.Point"){if(A.externalGraphic){var B=A.graphicWidth||A.graphicHeight;var J=A.graphicHeight||A.graphicWidth;B=B?B:A.pointRadius*2;J=J?J:A.pointRadius*2;var E=this.getResolution();var G=(A.graphicXOffset!=undefined)?A.graphicXOffset:-(0.5*B);var D=(A.graphicYOffset!=undefined)?A.graphicYOffset:-(0.5*J);C.style.left=((I.x/E)+G).toFixed();C.style.top=((I.y/E)-(D+J)).toFixed();C.style.width=B;C.style.height=J;A.fillColor="none";M.isStroked=false;}else{this.drawCircle(C,I,A.pointRadius);}}if(M.isFilled){C.setAttribute("fillcolor",A.fillColor);}else{C.setAttribute("filled","false");}var H=C.getElementsByTagName("fill");var L=(H.length==0)?null:H[0];if(!M.isFilled){if(L){C.removeChild(L);}}else{if(!L){L=this.createNode("v:fill",C.id+"_fill");}L.setAttribute("opacity",A.fillOpacity);if(C._geometryClass=="OpenLayers.Geometry.Point"&&A.externalGraphic){if(A.graphicOpacity){L.setAttribute("opacity",A.graphicOpacity);}L.setAttribute("src",A.externalGraphic);L.setAttribute("type","frame");C.style.flip="y";if(!(A.graphicWidth&&A.graphicHeight)){L.aspect="atmost";}}if(L.parentNode!=C){C.appendChild(L);}}if(M.isStroked){C.setAttribute("strokecolor",A.strokeColor);C.setAttribute("strokeweight",A.strokeWidth);}else{C.setAttribute("stroked","false");}var F=C.getElementsByTagName("stroke");var K=(F.length==0)?null:F[0];if(!M.isStroked){if(K){C.removeChild(K);}}else{if(!K){K=this.createNode("v:stroke",C.id+"_stroke");C.appendChild(K);}K.setAttribute("opacity",A.strokeOpacity);K.setAttribute("endcap",!A.strokeLinecap||A.strokeLinecap=="butt"?"flat":A.strokeLinecap);}if(A.cursor!=null){C.style.cursor=A.cursor;}return C;},postDraw:function(A){var C=A._style.fillColor;var B=A._style.strokeColor;if(C=="none"&&A.getAttribute("fillcolor")!=C){A.setAttribute("fillcolor",C);}if(B=="none"&&A.getAttribute("strokecolor")!=B){A.setAttribute("strokecolor",B);}},setNodeDimension:function(B,E){var D=E.getBounds();if(D){var A=this.getResolution();var C=new OpenLayers.Bounds((D.left/A).toFixed(),(D.bottom/A).toFixed(),(D.right/A).toFixed(),(D.top/A).toFixed());B.style.left=C.left;B.style.top=C.top;B.style.width=C.getWidth();B.style.height=C.getHeight();B.coordorigin=C.left+" "+C.top;B.coordsize=C.getWidth()+" "+C.getHeight();}},createNode:function(A,C){var B=document.createElement(A);if(C){B.setAttribute("id",C);}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(){return this.nodeFactory(this.container.id+"_root","v:group");},drawPoint:function(A,B){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).toFixed()-A;D.style.top=(E.y/B).toFixed()-A;var C=A*2;D.style.width=C;D.style.height=C;}},drawLineString:function(A,B){this.drawLine(A,B,false);},drawLinearRing:function(A,B){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);I=(H.y/C);E[F]=" "+K.toFixed()+","+I.toFixed()+" l ";}var D=(G)?" x e":" e";B.path="m"+E.join("")+D;},drawPolygon:function(A,H){this.setNodeDimension(A,H);var B=this.getResolution();var J=[];var E,D,F,I,G;for(var C=0;C<H.components.length;C++){E=H.components[C];J.push("m");for(D=0;D<E.components.length;D++){F=E.components[D];I=F.x/B;G=F.y/B;J.push(" "+I.toFixed()+","+G.toFixed());if(D==0){J.push(" l");}}J.push(" x ");}J.push("e");A.path=J.join("");},drawRectangle:function(B,C){var A=this.getResolution();B.style.left=C.x/A;B.style.top=C.y/A;B.style.width=C.width/A;B.style.height=C.height/A;},drawSurface:function(E,G){this.setNodeDimension(E,G);var C=this.getResolution();var F=[];var B,A,H;for(var D=0;D<G.components.length;D++){B=G.components[D];A=B.x/C;H=B.y/C;if((D%3)==0&&(D/3)==0){F.push("m");}else{if((D%3)==1){F.push(" c");}}F.push(" "+A+","+H);}F.push(" x e");E.path=F.join("");},CLASS_NAME:"OpenLayers.Renderer.VML"});OpenLayers.Tile.Image=OpenLayers.Class(OpenLayers.Tile,{url:null,imgDiv:null,frame:null,layerAlphaHack: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].id);}else{OpenLayers.Event.stopObservingElement(this.imgDiv.id);}if(this.imgDiv.parentNode==this.frame){this.frame.removeChild(this.imgDiv);this.imgDiv.map=null;}}this.imgDiv=null;if((this.frame!=null)&&(this.frame.parentNode==this.layer.div)){this.layer.div.removeChild(this.frame);}this.frame=null;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);}if(!OpenLayers.Tile.prototype.draw.apply(this,arguments)){return false;}if(this.isLoading){this.events.triggerEvent("reload");}else{this.isLoading=true;this.events.triggerEvent("loadstart");}return this.renderTile();},renderTile:function(){if(this.imgDiv==null){this.initImgDiv();}this.imgDiv.viewRequestID=this.layer.map.viewRequestID;this.url=this.layer.getURL(this.bounds);OpenLayers.Util.modifyDOMElement(this.frame,null,this.position,this.size);var A=this.layer.getImageSize();if(this.layerAlphaHack){OpenLayers.Util.modifyAlphaImageDiv(this.imgDiv,null,null,A,this.url);}else{OpenLayers.Util.modifyDOMElement(this.imgDiv,null,null,A);this.imgDiv.src=this.url;}return true;},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();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(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.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.loadURL(this.url,null,this,B);},requestSuccess:function(A){if(this.features){var C=A.responseXML;if(!C||A.fileType!="XML"){C=OpenLayers.parseXMLString(A.responseText);}if(this.layer.vectorMode){this.layer.addFeatures(this.layer.formatObject.read(C));}else{var B=OpenLayers.Ajax.getElementsByTagNameNS(C,"http://www.opengis.net/gml","gml","featureMember");this.addResults(B);}}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.Feature=OpenLayers.Class({layer:null,id:null,lonlat:null,data:null,marker:null,popupClass:OpenLayers.Popup.AnchoredBubble,popup:null,initialize:function(A,C,B){this.layer=A;this.lonlat=C;this.data=(B!=null)?B:{};this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");},destroy:function(){if((this.layer!=null)&&(this.layer.map!=null)){if(this.popup!=null){this.layer.map.removePopup(this.popup);}}this.layer=null;this.id=null;this.lonlat=null;this.data=null;if(this.marker!=null){this.destroyMarker(this.marker);this.marker=null;}if(this.popup!=null){this.destroyPopup(this.popup);this.popup=null;}},onScreen:function(){var B=false;if((this.layer!=null)&&(this.layer.map!=null)){var A=this.layer.map.getExtent();B=A.containsLonLat(this.lonlat);}return B;},createMarker:function(){if(this.lonlat!=null){this.marker=new OpenLayers.Marker(this.lonlat,this.data.icon);}return this.marker;},destroyMarker:function(){this.marker.destroy();},createPopup:function(B){if(this.lonlat!=null){var C=this.id+"_popup";var A=(this.marker)?this.marker.icon:null;if(!this.popup){this.popup=new this.popupClass(C,this.lonlat,this.data.popupSize,this.data.popupContentHTML,A,B);}if(this.data.overflow!=null){this.popup.contentDiv.style.overflow=this.data.overflow;}this.popup.feature=this;}return this.popup;},destroyPopup:function(){if(this.popup){this.popup.feature=null;this.popup.destroy();this.popup=null;}},CLASS_NAME:"OpenLayers.Feature"});OpenLayers.Format.WMC=OpenLayers.Class({defaultVersion:"1.1.0",version:null,parser:null,initialize:function(A){OpenLayers.Util.extend(this,A);this.options=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 G=OpenLayers.Format.WMC["v"+A.replace(/\./g,"_")];if(!G){throw"Can't find a WMS capabilities parser for version "+A;}this.parser=new G(this.options);}var D=this.parser.read(E,C);var F;if(C.map){this.context=D;if(C.map instanceof OpenLayers.Map){F=this.mergeContextToMap(D,C.map);}else{F=this.contextToMap(D,C.map);}}else{F=D;}return F;},contextToMap:function(A,C){var B=new OpenLayers.Map(C,{maxExtent:A.maxExtent,projection:A.projection});B.addLayers(A.layers);B.setCenter(A.bounds.getCenterLonLat(),B.getZoomForExtent(A.bounds,true));return B;},mergeContextToMap:function(A,B){B.addLayers(A.layers);return B;},write:function(E,B){if(E.CLASS_NAME=="OpenLayers.Map"){E=this.mapToContext(E);}var A=(B&&B.version)||this.version||this.defaultVersion;if(!this.parser||this.parser.VERSION!=A){var D=OpenLayers.Format.WMC["v"+A.replace(/\./g,"_")];if(!D){throw"Can't find a WMS capabilities parser for version "+A;}this.parser=new D(this.options);}var C=this.parser.write(E,B);return C;},mapToContext:function(B){var A={bounds:B.getExtent(),maxExtent:B.maxExtent,projection:B.projection,layers:B.layers,size:B.getSize()};return A;},CLASS_NAME:"OpenLayers.Format.WMC"});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(H,F){var D=F.childNodes;var C,E,G,B;for(var A=0;A<D.length;++A){C=D[A];if(C.nodeType==1){G=this.getNamespacePrefix(C.namespaceURI);B=C.nodeName.split(":").pop();E=this["read_"+G+"_"+B];if(E){E.apply(this,[H,C]);}}}},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.layers=[];this.runChildNodes(A,B);},read_wmc_Layer:function(B,C){var D={params:{},options:{visibility:(C.getAttribute("hidden")!="1")},queryable:(C.getAttribute("queryable")=="1"),formats:[],styles:[]};this.runChildNodes(D,C);D.params.layers=D.name;D.options.maxExtent=D.maxExtent;var A=this.getLayerFromInfo(D);B.layers.push(A);},getLayerFromInfo:function(B){var A=new OpenLayers.Layer.WMS(B.title,B.href,B.params,B.options);return A;},read_wmc_Extension:function(B,A){this.runChildNodes(B,A);},read_ol_units:function(B,A){B.options.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.params.transparent=this.getChildValue(A);},read_ol_numZoomLevels:function(B,A){B.options.numZoomLevels=parseInt(this.getChildValue(A));},read_ol_opacity:function(B,A){B.options.opacity=parseFloat(this.getChildValue(A));},read_ol_singleTile:function(B,A){B.options.singleTile=(this.getChildValue(A)=="true");},read_ol_isBaseLayer:function(B,A){B.options.isBaseLayer=(this.getChildValue(A)=="true");},read_ol_displayInLayerSwitcher:function(B,A){B.options.displayInLayerSwitcher=(this.getChildValue(A)=="true");},read_wmc_Server:function(B,A){B.params.version=A.getAttribute("version");this.runChildNodes(B,A);},read_wmc_FormatList:function(B,A){this.runChildNodes(B,A);},read_wmc_Format:function(C,A){var B=this.getChildValue(A);C.formats.push(B);if(A.getAttribute("current")=="1"){C.params.format=B;}},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"){if(A.href){C.params.sld=A.href;}else{if(A.body){C.params.sld_body=A.body;}else{C.params.styles=A.name;}}}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_Abstract:function(C,B){var A=this.getChildValue(B);if(A){C["abstract"]=A;}},read_wmc_LatLonBoundingBox:function(A,B){A.llbbox=[parseFloat(B.getAttribute("minx")),parseFloat(B.getAttribute("miny")),parseFloat(B.getAttribute("maxx")),parseFloat(B.getAttribute("maxy"))];},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(10),miny:B.bottom.toPrecision(10),maxx:B.right.toPrecision(10),maxy:B.top.toPrecision(10),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(10),miny:C.bottom.toPrecision(10),maxx:C.right.toPrecision(10),maxy:C.top.toPrecision(10)});D.appendChild(A);}return D;},write_wmc_LayerList:function(C){var D=this.createElementDefaultNS("LayerList");var B;for(var A=0;A<C.layers.length;++A){B=C.layers[A];if(B instanceof OpenLayers.Layer.WMS){D.appendChild(this.write_wmc_Layer(B));}}return D;},write_wmc_Layer:function(A){var B=this.createElementDefaultNS("Layer",null,{queryable:"1",hidden:A.visibility?"0":"1"});B.appendChild(this.write_wmc_Server(A));B.appendChild(this.createElementDefaultNS("Name",A.params.LAYERS));B.appendChild(this.createElementDefaultNS("Title",A.name));B.appendChild(this.write_wmc_FormatList(A));B.appendChild(this.write_wmc_StyleList(A));B.appendChild(this.write_wmc_LayerExtension(A));return B;},write_wmc_LayerExtension:function(F){var D=this.createElementDefaultNS("Extension");var A=F.maxExtent;var H=this.createElementNS(this.namespaces.ol,"ol:maxExtent");this.setAttributes(H,{minx:A.left.toPrecision(10),miny:A.bottom.toPrecision(10),maxx:A.right.toPrecision(10),maxy:A.top.toPrecision(10)});D.appendChild(H);var C=F.params.TRANSPARENT;if(C){var I=this.createElementNS(this.namespaces.ol,"ol:transparent");I.appendChild(this.createTextNode(C));D.appendChild(I);}var G=["numZoomLevels","units","isBaseLayer","opacity","displayInLayerSwitcher","singleTile"];var B;for(var E=0;E<G.length;++E){B=this.createOLPropertyNode(F,G[E]);if(B){D.appendChild(B);}}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.params.VERSION});B.appendChild(this.write_wmc_OnlineResource(A.url));return B;},write_wmc_FormatList:function(A){var B=this.createElementDefaultNS("FormatList");B.appendChild(this.createElementDefaultNS("Format",A.params.FORMAT,{current:"1"}));return B;},write_wmc_StyleList:function(E){var D=this.createElementDefaultNS("StyleList");var C=this.createElementDefaultNS("Style",null,{current:"1"});if(E.params.SLD){var B=this.createElementDefaultNS("SLD");var G=this.write_wmc_OnlineResource(E.params.SLD);B.appendChild(G);C.appendChild(B);}else{if(E.params.SLD_BODY){var B=this.createElementDefaultNS("SLD");var F=E.params.SLD_BODY;var H=OpenLayers.Format.XML.prototype.read.apply(this,[F]);var I=H.documentElement;if(B.ownerDocument&&B.ownerDocument.importNode){I=B.ownerDocument.importNode(I,true);}B.appendChild(I);C.appendChild(B);}else{var A=E.params.STYLES?E.params.STYLES:this.defaultStyleName;C.appendChild(this.createElementDefaultNS("Name",A));C.appendChild(this.createElementDefaultNS("Title",this.defaultStyleTitle));}}D.appendChild(C);return D;},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.Handler.Click=OpenLayers.Class(OpenLayers.Handler,{delay:300,single:true,"double":false,pixelTolerance:0,stopSingle:false,stopDouble:false,timerId:null,down: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,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;}},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,cursorDragMouseDownClassName:"olCursorDragMouseDown",cursorDragMouseUpClassName:"olCursorDragMouseUp",cursorDragMouseOutClassName:"olCursorDragMouseOut",cursorDragDefaultClassName:"olCursorDragDefault",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;this.map.div.className=this.cursorDragMouseDownClassName;this.down(B);this.callback("down",[B.xy]);OpenLayers.Event.stop(B);if(!this.oldOnselectstart){this.oldOnselectstart=(document.onselectstart)?document.onselectstart:function(){return true;};}document.onselectstart=function(){return false;};A=!this.stopDown;}else{this.started=false;this.start=null;this.last=null;}return A;},mousemove:function(A){if(this.started){if(A.xy.x!=this.last.x||A.xy.y!=this.last.y){this.dragging=true;this.move(A);this.callback("move",[A.xy]);if(!this.oldOnselectstart){this.oldOnselectstart=document.onselectstart;}document.onselectstart=function(){return false;};this.last=A.xy;}}return true;},mouseup:function(B){if(this.started){var A=(this.start!=this.last);this.started=false;this.dragging=false;this.map.div.className=this.cursorDragMouseUpClassName;this.up(B);this.callback("up",[B.xy]);if(A){this.callback("done",[B.xy]);}document.onselectstart=this.oldOnselectstart;}return true;},mouseout:function(B){if(this.started&&OpenLayers.Util.mouseLeft(B,this.map.div)){var A=(this.start!=this.last);this.started=false;this.dragging=false;this.map.div.className=this.cursorDragMouseOutClassName;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;this.map.div.className=this.cursorDragDefaultClassName;}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;}return A;},CLASS_NAME:"OpenLayers.Handler.Drag"});OpenLayers.Handler.Feature=OpenLayers.Class(OpenLayers.Handler,{EVENTMAP:{click:{"in":"click",out:"clickout"},mousemove:{"in":"over",out:"out"},dblclick:{"in":"dblclick",out:null},mousedown:{"in":null,out:null},mouseup:{"in":null,out:null}},feature:null,lastFeature:null,down:null,up:null,clickoutTolerance:4,geometryTypes:null,stopClick:true,stopDown:true,stopUp:true,layerIndex:null,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){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){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){var B=(this.feature!=this.lastFeature);if(this.geometryTypeMatches(this.feature)){if(E&&B){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(E&&B||(D&&this.lastFeature)){this.triggerCallback(C,"out",[this.lastFeature]);}}}else{if(E||(D&&this.lastFeature)){this.triggerCallback(C,"out",[this.lastFeature]);}}return F;},triggerCallback:function(D,E,B){var C=this.EVENTMAP[D][E];if(C){if(D=="click"&&E=="out"&&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.clickoutTolerance){this.callback(C,B);}}else{this.callback(C,B);}}},activate:function(){var A=false;if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.layerIndex=this.layer.div.style.zIndex;this.layer.div.style.zIndex=this.map.Z_INDEX_BASE.Popup-1;A=true;}return A;},deactivate:function(){var A=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){if(this.layer&&this.layer.div){this.layer.div.style.zIndex=this.layerIndex;}this.feature=null;this.lastFeature=null;this.down=null;this.up=null;A=true;}return A;},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","keypress","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 A=0;A<this.KEY_EVENTS.length;A++){OpenLayers.Event.observe(window,this.KEY_EVENTS[A],this.eventListener);}return true;}else{return false;}},deactivate:function(){var B=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){for(var A=0;A<this.KEY_EVENTS.length;A++){OpenLayers.Event.stopObserving(window,this.KEY_EVENTS[A],this.eventListener);}B=true;}return B;},handleKeyEvent:function(A){if(this.checkModifiers(A)){this.callback(A.type,[A.charCode||A.keyCode]);}},CLASS_NAME:"OpenLayers.Handler.Keyboard"});OpenLayers.Handler.MouseWheel=OpenLayers.Class(OpenLayers.Handler,{wheelListener:null,mousePosition:null,initialize:function(C,B,A){OpenLayers.Handler.prototype.initialize.apply(this,arguments);this.wheelListener=OpenLayers.Function.bindAsEventListener(this.onWheelEvent,this);},destroy:function(){OpenLayers.Handler.prototype.destroy.apply(this,arguments);this.wheelListener=null;},onWheelEvent:function(H){if(!this.map||!this.checkModifiers(H)){return ;}var F=false;var I=false;var E=false;var B=OpenLayers.Event.element(H);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(!I){for(var G=0;G<this.map.layers.length;G++){if(B==this.map.layers[G].div){I=true;break;}}}E=(B==this.map.div);B=B.parentNode;}if(!F&&E){if(I){this.wheelZoom(H);}OpenLayers.Event.stop(H);}},wheelZoom:function(A){var B=0;if(!A){A=window.event;}if(A.wheelDelta){B=A.wheelDelta/120;if(window.opera&&window.opera.version()<9.2){B=-B;}}else{if(A.detail){B=-A.detail/3;}}if(B){if(this.mousePosition){A.xy=this.mousePosition;}if(!A.xy){A.xy=this.map.getPixelFromLonLat(this.map.getCenter());}if(B<0){this.callback("down",[A,B]);}else{this.callback("up",[A,B]);}}},mousemove:function(A){this.mousePosition=A.xy;},activate:function(A){if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){var B=this.wheelListener;OpenLayers.Event.observe(window,"DOMMouseScroll",B);OpenLayers.Event.observe(window,"mousewheel",B);OpenLayers.Event.observe(document,"mousewheel",B);return true;}else{return false;}},deactivate:function(A){if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){var B=this.wheelListener;OpenLayers.Event.stopObserving(window,"DOMMouseScroll",B);OpenLayers.Event.stopObserving(window,"mousewheel",B);OpenLayers.Event.stopObserving(document,"mousewheel",B);return true;}else{return false;}},CLASS_NAME:"OpenLayers.Handler.MouseWheel"});OpenLayers.Layer=OpenLayers.Class({id:null,name:null,div:null,opacity:null,EVENT_TYPES:["loadstart","loadend","loadcancel","visibilitychanged"],events:null,map:null,isBaseLayer:false,alpha:false,displayInLayerSwitcher:true,visibility:true,attribution:null,inRange:false,imageSize:null,imageOffset:null,options:null,eventListeners:null,gutter:0,projection:null,units:null,scales:null,resolutions:null,maxExtent:null,minExtent:null,maxResolution:null,minResolution:null,numZoomLevels:null,minScale:null,maxScale:null,displayOutsideMaxExtent:false,wrapDateLine:false,transitionEffect:null,SUPPORTED_TRANSITIONS:["resize"],initialize:function(B,A){this.addOptions(A);this.name=B;if(this.id==null){this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");this.div=OpenLayers.Util.createDiv(this.id);this.div.style.width="100%";this.div.style.height="100%";this.events=new OpenLayers.Events(this,this.div,this.EVENT_TYPES);if(this.eventListeners instanceof Object){this.events.on(this.eventListeners);}}if(this.wrapDateLine){this.displayOutsideMaxExtent=true;}},destroy:function(A){if(A==null){A=true;}if(this.map!=null){this.map.removeLayer(this,A);}this.projection=null;this.map=null;this.name=null;this.div=null;this.options=null;if(this.events){if(this.eventListeners){this.events.un(this.eventListeners);}this.events.destroy();}this.eventListeners=null;this.events=null;},clone:function(A){if(A==null){A=new OpenLayers.Layer(this.name,this.options);}OpenLayers.Util.applyDefaults(A,this);A.map=null;return A;},setName:function(A){if(A!=this.name){this.name=A;if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"name"});}}},addOptions:function(A){if(this.options==null){this.options={};}OpenLayers.Util.extend(this.options,A);OpenLayers.Util.extend(this,A);},onMapResize:function(){},redraw:function(){var A=false;if(this.map){this.inRange=this.calculateInRange();var B=this.getExtent();if(B&&this.inRange&&this.visibility){this.moveTo(B,true,false);A=true;}}return A;},moveTo:function(B,A,C){var D=this.visibility;if(!this.isBaseLayer){D=D&&this.inRange;}this.display(D);},setMap:function(B){if(this.map==null){this.map=B;this.maxExtent=this.maxExtent||this.map.maxExtent;this.projection=this.projection||this.map.projection;if(this.projection&&typeof this.projection=="string"){this.projection=new OpenLayers.Projection(this.projection);}this.units=this.projection.getUnits()||this.units||this.map.units;this.initResolutions();if(!this.isBaseLayer){this.inRange=this.calculateInRange();var A=((this.visibility)&&(this.inRange));this.div.style.display=A?"":"none";}this.setTileSize();}},removeMap:function(A){},getImageSize:function(){return(this.imageSize||this.tileSize);},setTileSize:function(A){var B=(A)?A:((this.tileSize)?this.tileSize:this.map.getTileSize());this.tileSize=B;if(this.gutter){this.imageOffset=new OpenLayers.Pixel(-this.gutter,-this.gutter);this.imageSize=new OpenLayers.Size(B.w+(2*this.gutter),B.h+(2*this.gutter));}},getVisibility:function(){return this.visibility;},setVisibility:function(A){if(A!=this.visibility){this.visibility=A;this.display(A);this.redraw();if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"visibility"});}this.events.triggerEvent("visibilitychanged");}},display:function(A){if(A!=(this.div.style.display!="none")){this.div.style.display=(A)?"block":"none";}},calculateInRange:function(){var B=false;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 J=new Array("projection","units","scales","resolutions","maxScale","minScale","maxResolution","minResolution","minExtent","maxExtent","numZoomLevels","maxZoomLevel");var C={};for(var D=0;D<J.length;D++){var L=J[D];C[L]=this.options[L]||this.map[L];}if(this.options.minScale!=null&&this.options.maxScale!=null&&this.options.scales==null){C.scales=null;}if(this.options.minResolution!=null&&this.options.maxResolution!=null&&this.options.resolutions==null){C.resolutions=null;}if((!C.numZoomLevels)&&(C.maxZoomLevel)){C.numZoomLevels=C.maxZoomLevel+1;}if((C.scales!=null)||(C.resolutions!=null)){if(C.scales!=null){C.resolutions=[];for(var D=0;D<C.scales.length;D++){var B=C.scales[D];C.resolutions[D]=OpenLayers.Util.getResolutionFromScale(B,C.units);}}C.numZoomLevels=C.resolutions.length;}else{if(C.minScale){C.maxResolution=OpenLayers.Util.getResolutionFromScale(C.minScale,C.units);}else{if(C.maxResolution=="auto"){var K=this.map.getSize();var I=C.maxExtent.getWidth()/K.w;var F=C.maxExtent.getHeight()/K.h;C.maxResolution=Math.max(I,F);}}if(C.maxScale!=null){C.minResolution=OpenLayers.Util.getResolutionFromScale(C.maxScale,C.units);}else{if((C.minResolution=="auto")&&(C.minExtent!=null)){var K=this.map.getSize();var I=C.minExtent.getWidth()/K.w;var F=C.minExtent.getHeight()/K.h;C.minResolution=Math.max(I,F);}}if(C.minResolution!=null&&this.options.numZoomLevels==undefined){var H=C.maxResolution/C.minResolution;C.numZoomLevels=Math.floor(Math.log(H)/Math.log(2))+1;}C.resolutions=new Array(C.numZoomLevels);var A=2;if(typeof C.minResolution=="number"&&C.numZoomLevels>1){A=Math.pow((C.maxResolution/C.minResolution),(1/(C.numZoomLevels-1)));}for(var D=0;D<C.numZoomLevels;D++){var G=C.maxResolution/Math.pow(A,D);C.resolutions[D]=G;}}C.resolutions.sort(function(N,M){return(M-N);});this.resolutions=C.resolutions;this.maxResolution=C.resolutions[0];var E=C.resolutions.length-1;this.minResolution=C.resolutions[E];this.scales=[];for(var D=0;D<C.resolutions.length;D++){this.scales[D]=OpenLayers.Util.getScaleFromResolution(C.resolutions[D],C.units);}this.minScale=this.scales[0];this.maxScale=this.scales[this.scales.length-1];this.numZoomLevels=C.numZoomLevels;},getResolution:function(){var A=this.map.getZoom();return this.getResolutionForZoom(A);},getExtent:function(){return this.map.calculateBounds();},getZoomForExtent:function(B,C){var D=this.map.getSize();var A=Math.max(B.getWidth()/D.w,B.getHeight()/D.h);return this.getZoomForResolution(A,C);},getDataExtent:function(){},getResolutionForZoom:function(C){C=Math.max(0,Math.min(C,this.resolutions.length-1));var B;if(this.map.fractionalZoom){var A=Math.floor(C);var D=Math.ceil(C);B=this.resolutions[D]+((C-A)*(this.resolutions[A]-this.resolutions[D]));}else{B=this.resolutions[Math.round(C)];}return B;},getZoomForResolution:function(E,A){var L;if(this.map.fractionalZoom){var I=0;var C=this.resolutions.length-1;var D=this.resolutions[I];var B=this.resolutions[C];var H;for(var F=0;F<this.resolutions.length;++F){H=this.resolutions[F];if(H>=E){D=H;I=F;}if(H<=E){B=H;C=F;break;}}var G=D-B;if(G>0){L=I+((E-B)/G);}else{L=I;}}else{var J;var K=Number.POSITIVE_INFINITY;for(var F=0;F<this.resolutions.length;F++){if(A){J=Math.abs(this.resolutions[F]-E);if(J>K){break;}K=J;}else{if(this.resolutions[F]<E){break;}}}L=Math.max(0,F-1);}return L;},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(Math.round(1/A*(D.lon-C.left)),Math.round(1/A*(C.top-D.lat)));}return B;},setOpacity:function(A){if(A!=this.opacity){this.opacity=A;for(var C=0;C<this.div.childNodes.length;++C){var B=this.div.childNodes[C].firstChild;OpenLayers.Util.modifyDOMElement(B,null,null,null,null,null,null,A);}}},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"});OpenLayers.Control.DragFeature=OpenLayers.Class(OpenLayers.Control,{geometryTypes:null,onStart:function(B,A){},onDrag:function(B,A){},onComplete:function(B,A){},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)),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;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;this.map.div.style.cursor="move";}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();this.feature=null;this.map.div.style.cursor="default";}},doneDragging:function(A){this.onComplete(this.feature,A);},outFeature:function(A){if(!this.handlers.drag.dragging){this.over=false;this.handlers.drag.deactivate();this.map.div.style.cursor="default";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,draw:function(){this.handler=new OpenLayers.Handler.Drag(this,{move:this.panMap,done:this.panMapDone});},panMap:function(A){this.panned=true;this.map.pan(this.handler.last.x-A.x,this.handler.last.y-A.y,{dragging:this.handler.dragging,animate:false});},panMapDone:function(A){if(this.panned){this.panMap(A);this.panned=false;}},CLASS_NAME:"OpenLayers.Control.DragPan"});OpenLayers.Control.KeyboardDefaults=OpenLayers.Class(OpenLayers.Control,{slideFactor:75,initialize:function(){OpenLayers.Control.prototype.initialize.apply(this,arguments);},destroy:function(){if(this.handler){this.handler.destroy();}this.handler=null;OpenLayers.Control.prototype.destroy.apply(this,arguments);},draw:function(){this.handler=new OpenLayers.Handler.Keyboard(this,{keypress:this.defaultKeyPress});this.activate();},defaultKeyPress:function(B){switch(B){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 A=this.map.getSize();this.map.pan(0,-0.75*A.h);break;case 34:var A=this.map.getSize();this.map.pan(0,0.75*A.h);break;case 35:var A=this.map.getSize();this.map.pan(0.75*A.w,0);break;case 36:var A=this.map.getSize();this.map.pan(-0.75*A.w,0);break;case 43:this.map.zoomIn();break;case 45:this.map.zoomOut();break;case 107:this.map.zoomIn();break;case 109:this.map.zoomOut();break;}},CLASS_NAME:"OpenLayers.Control.KeyboardDefaults"});OpenLayers.State={UNKNOWN:"Unknown",INSERT:"Insert",UPDATE:"Update",DELETE:"Delete"};OpenLayers.Feature.Vector=OpenLayers.Class(OpenLayers.Feature,{fid:null,geometry:null,attributes:null,state:null,style:null,renderIntent:"default",initialize:function(C,A,B){OpenLayers.Feature.prototype.initialize.apply(this,[null,null,A]);this.lonlat=null;this.geometry=C;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.clone(),this.attributes,this.style);},onScreen:function(D){var C=false;if(this.layer&&this.layer.map){var A=this.layer.map.getExtent();if(D){var B=this.geometry.getBounds();C=A.intersectsBounds(B);}else{var E=A.toGeometry();C=E.intersects(this.geometry);}}return C;},createMarker:function(){return null;},destroyMarker:function(){},createPopup:function(){return null;},atPoint:function(B,D,C){var A=false;if(this.geometry){A=this.geometry.atPoint(B,D,C);}return A;},destroyPopup:function(){},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",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:0.2,pointRadius:0,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:""},select:{fillColor:"blue",fillOpacity:0.4,hoverFillColor:"white",hoverFillOpacity:0.8,strokeColor:"blue",strokeOpacity:1,strokeWidth:2,strokeLinecap:"round",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:0.2,pointRadius:0,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"pointer"},temporary:{fillColor:"yellow",fillOpacity:0.2,hoverFillColor:"white",hoverFillOpacity:0.8,strokeColor:"yellow",strokeOpacity:1,strokeLinecap:"round",strokeWidth:4,hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:0.2,pointRadius:0,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:""}};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.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]);},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(B,A){B.options.maxScale=this.getChildValue(A);},read_sld_MaxScaleDenominator:function(B,A){B.options.minScale=this.getChildValue(A);},write_wmc_Layer:function(B){var C=OpenLayers.Format.WMC.v1.prototype.write_wmc_Layer.apply(this,[B]);if(B.options.resolutions||B.options.scales||B.options.minResolution||B.options.maxScale){var D=this.createElementNS(this.namespaces.sld,"sld:MinScaleDenominator");D.appendChild(this.createTextNode(B.maxScale.toPrecision(10)));C.insertBefore(D,C.childNodes[3]);}if(B.options.resolutions||B.options.scales||B.options.maxResolution||B.options.minScale){var A=this.createElementNS(this.namespaces.sld,"sld:MaxScaleDenominator");A.appendChild(this.createTextNode(B.minScale.toPrecision(10)));C.insertBefore(A,C.childNodes[4]);}return C;},CLASS_NAME:"OpenLayers.Format.WMC.v1_1_0"});OpenLayers.Handler.Box=OpenLayers.Class(OpenLayers.Handler,{dragHandler:null,boxDivClassName:"olHandlerBoxZoomBox",cursorStartBoxClassName:"olCursorStartBox",cursorEndBoxClassName:"olCursorEndBox",cursorDefaultBoxClassName:"olCursorDefaultBox",initialize:function(C,B,A){OpenLayers.Handler.prototype.initialize.apply(this,arguments);var B={down:this.startBox,move:this.moveBox,out:this.removeBox,up:this.endBox};this.dragHandler=new OpenLayers.Handler.Drag(this,B,{keyMask:this.keyMask});},setMap:function(A){OpenLayers.Handler.prototype.setMap.apply(this,arguments);if(this.dragHandler){this.dragHandler.setMap(A);}},startBox:function(A){this.zoomBox=OpenLayers.Util.createDiv("zoomBox",this.dragHandler.start);this.zoomBox.className=this.boxDivClassName;this.zoomBox.style.zIndex=this.map.Z_INDEX_BASE.Popup-1;this.map.viewPortDiv.appendChild(this.zoomBox);this.map.div.className=this.cursorStartBoxClassName;},moveBox:function(C){var B=Math.abs(this.dragHandler.start.x-C.x);var A=Math.abs(this.dragHandler.start.y-C.y);this.zoomBox.style.width=Math.max(1,B)+"px";this.zoomBox.style.height=Math.max(1,A)+"px";if(C.x<this.dragHandler.start.x){this.zoomBox.style.left=C.x+"px";}if(C.y<this.dragHandler.start.y){this.zoomBox.style.top=C.y+"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.map.div.className=this.cursorEndBoxClassName;this.callback("done",[A]);},removeBox:function(){this.map.viewPortDiv.removeChild(this.zoomBox);this.zoomBox=null;},activate:function(){if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.dragHandler.activate();this.map.div.className=this.cursorDefaultBoxClassName;return true;}else{return false;}},deactivate:function(){if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.dragHandler.deactivate();return true;}else{return false;}},CLASS_NAME:"OpenLayers.Handler.Box"});OpenLayers.Handler.RegularPolygon=OpenLayers.Class(OpenLayers.Handler.Drag,{sides:4,radius:null,snapAngle:null,snapToggle:"shiftKey",persist:false,irregular:false,angle:null,fixedRadius:false,feature:null,layer:null,origin:null,initialize:function(C,B,A){this.style=OpenLayers.Util.extend(OpenLayers.Feature.Vector.style["default"],{});OpenLayers.Handler.prototype.initialize.apply(this,[C,B,A]);this.options=(A)?A:new Object();},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={displayInLayerSwitcher:false};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.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();},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 F,C,B,A;var D=this.feature.geometry.components[0];if(D.components.length!=(this.sides+1)){this.createGeometry();D=this.feature.geometry.components[0];}for(var E=0;E<this.sides;++E){A=D.components[E];F=this.angle+(E*2*Math.PI/this.sides);A.x=this.origin.x+(this.radius*Math.cos(F));A.y=this.origin.y+(this.radius*Math.sin(F));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(){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;OpenLayers.Layer.prototype.destroy.apply(this,arguments);},setMap:function(A){OpenLayers.Layer.prototype.setMap.apply(this,arguments);this.pane.style.zIndex=parseInt(this.div.style.zIndex)+1;this.pane.style.display=this.div.style.display;this.pane.style.width="100%";this.pane.style.height="100%";if(OpenLayers.Util.getBrowserName()=="msie"){this.pane.style.background="url("+OpenLayers.Util.getImagesLocation()+"blank.gif)";}if(this.isFixed){this.map.viewPortDiv.appendChild(this.pane);}else{this.map.layerContainerDiv.appendChild(this.pane);}this.loadMapObject();if(this.mapObject==null){this.loadWarningMessage();}},removeMap:function(A){if(this.pane&&this.pane.parentNode){this.pane.parentNode.removeChild(this.pane);this.pane=null;}OpenLayers.Layer.prototype.removeMap.apply(this,arguments);},loadWarningMessage:function(){this.div.style.backgroundColor="darkblue";var G=this.map.getSize();var A=Math.min(G.w,300);var E=Math.min(G.h,200);var B=new OpenLayers.Size(A,E);var D=new OpenLayers.Pixel(G.w/2,G.h/2);var C=D.add(-B.w/2,-B.h/2);var F=OpenLayers.Util.createDiv(this.name+"_warning",C,B,null,null,null,"auto");F.style.padding="7px";F.style.backgroundColor="yellow";F.innerHTML=this.getWarningHTML();this.div.appendChild(F);},getWarningHTML:function(){return"";},display:function(A){OpenLayers.Layer.prototype.display.apply(this,arguments);this.pane.style.display=this.div.style.display;},setZIndex:function(A){OpenLayers.Layer.prototype.setZIndex.apply(this,arguments);this.pane.style.zIndex=parseInt(this.div.style.zIndex)+1;},moveTo:function(C,D,J){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);if(this.mapObject!=null){var E=this.map.getCenter();var G=this.map.getZoom();if(E!=null){var F=this.getMapObjectCenter();var B=this.getOLLonLatFromMapObjectLonLat(F);var H=this.getMapObjectZoom();var M=this.getOLZoomFromMapObjectZoom(H);if(!(E.equals(B))||!(G==M)){if(J&&this.dragPanMapObject&&this.smoothDragPan){var I=this.map.getViewPortPxFromLonLat(B);var K=this.map.getViewPortPxFromLonLat(E);this.dragPanMapObject(K.x-I.x,I.y-K.y);}else{var A=this.getMapObjectLonLatFromOLLonLat(E);var L=this.getMapObjectZoomFromOLZoom(G);this.setMapObjectCenter(A,L,J);}}}}},getLonLatFromViewPortPx:function(A){var B=null;if((this.mapObject!=null)&&(this.getMapObjectCenter()!=null)){var D=this.getMapObjectPixelFromOLPixel(A);var C=this.getMapObjectLonLatFromMapObjectPixel(D);B=this.getOLLonLatFromMapObjectLonLat(C);}return B;},getViewPortPxFromLonLat:function(B){var A=null;if((this.mapObject!=null)&&(this.getMapObjectCenter()!=null)){var D=this.getMapObjectLonLatFromOLLonLat(B);var C=this.getMapObjectPixelFromMapObjectLonLat(D);A=this.getOLPixelFromMapObjectPixel(C);}return A;},getOLLonLatFromMapObjectLonLat:function(D){var A=null;if(D!=null){var C=this.getLongitudeFromMapObjectLonLat(D);var B=this.getLatitudeFromMapObjectLonLat(D);A=new OpenLayers.LonLat(C,B);}return A;},getMapObjectLonLatFromOLLonLat:function(A){var B=null;if(A!=null){B=this.getMapObjectLonLatFromLonLat(A.lon,A.lat);}return B;},getOLPixelFromMapObjectPixel:function(D){var B=null;if(D!=null){var A=this.getXFromMapObjectPixel(D);var C=this.getYFromMapObjectPixel(D);B=new OpenLayers.Pixel(A,C);}return B;},getMapObjectPixelFromOLPixel:function(A){var B=null;if(A!=null){B=this.getMapObjectPixelFromXY(A.x,A.y);}return B;},CLASS_NAME:"OpenLayers.Layer.EventPane"});OpenLayers.Layer.FixedZoomLevels=OpenLayers.Class({initialize:function(){},initResolutions:function(){var C=new Array("minZoomLevel","maxZoomLevel","numZoomLevels");for(var B=0;B<C.length;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 E=this.MAX_ZOOM_LEVEL-this.minZoomLevel+1;if(this.numZoomLevels!=null){this.numZoomLevels=Math.min(this.numZoomLevels,E);}else{if(this.maxZoomLevel!=null){var A=this.maxZoomLevel-this.minZoomLevel+1;this.numZoomLevels=Math.min(A,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];}}},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:"FixedZoomLevels.js"});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.options);}A=OpenLayers.Layer.prototype.clone.apply(this,[A]);return A;},setUrl:function(A){this.url=A;},mergeNewParams:function(A){this.params=OpenLayers.Util.extend(this.params,A);return this.redraw();},redraw:function(A){if(A){return this.mergeNewParams({_olSalt:Math.random()});}else{return OpenLayers.Layer.prototype.redraw.apply(this,[]);}},selectUrl:function(D,C){var B=1;for(var A=0;A<D.length;A++){B*=D.charCodeAt(A)*this.URL_HASH_FACTOR;B-=Math.floor(B);}return C[Math.floor(B*C.length)];},getFullRequestString:function(F,E){var B=E||this.url;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;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.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.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.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.options);}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);}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);},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();for(var A in this.markers){this.markers[A].destroy();}this.markers=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments);},setOpacity:function(A){if(A!=this.opacity){this.opacity=A;for(var B=0;B<this.markers.length;B++){this.markers[B].setOpacity(this.opacity);}}},moveTo:function(C,A,D){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);if(A||!this.drawn){for(var B=0;B<this.markers.length;B++){this.drawMarker(this.markers[B]);}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);if((A.icon!=null)&&(A.icon.imageDiv!=null)&&(A.icon.imageDiv.parentNode==this.div)){this.div.removeChild(A.icon.imageDiv);A.drawn=false;}}},clearMarkers:function(){if(this.markers!=null){while(this.markers.length>0){this.removeMarker(this.markers[0]);}}},destroyMarker:function(A){if(this.markers&&this.markers.length){OpenLayers.Util.removeItem(this.markers,A);if((A.icon!=null)&&(A.icon.imageDiv!=null)&&(A.icon.imageDiv.parentNode==this.div)){this.div.removeChild(A.icon.imageDiv);A.drawn=false;}A.destroy();}},destroyMarkers:function(){if(this.markers!=null){while(this.markers.length>0){this.destroyMarker(this.markers[0]);}}},drawMarker:function(A){var B=this.map.getLayerPxFromLonLat(A.lonlat);if(B==null){A.display(false);}else{var C=A.draw(B);if(!A.drawn){this.div.appendChild(C);A.drawn=true;}}},getDataExtent:function(){var A=null;if(this.markers&&(this.markers.length>0)){var A=new OpenLayers.Bounds();for(var C=0;C<this.markers.length;C++){var B=this.markers[C];A.extend(B.lonlat);}}return A;},CLASS_NAME:"OpenLayers.Layer.Markers"});OpenLayers.Layer.SphericalMercator={getExtent:function(){var A=null;if(this.sphericalMercator){A=this.map.calculateBounds();}else{A=OpenLayers.Layer.FixedZoomLevels.prototype.getExtent.apply(this);}return A;},initMercatorParameters:function(){this.RESOLUTIONS=[];var A=156543.0339;for(var B=0;B<=this.MAX_ZOOM_LEVEL;++B){this.RESOLUTIONS[B]=A/Math.pow(2,B);}this.units="m";this.projection="EPSG:900913";},forwardMercator:function(C,B){var A=C*20037508.34/180;var D=Math.log(Math.tan((90+B)*Math.PI/360))/(Math.PI/180);D=D*20037508.34/180;return new OpenLayers.LonLat(A,D);},inverseMercator:function(A,D){var C=(A/20037508.34)*180;var B=(D/20037508.34)*180;B=180/Math.PI*(2*Math.atan(Math.exp(B*Math.PI/180))-Math.PI/2);return new OpenLayers.LonLat(C,B);},projectForward:function(A){var B=OpenLayers.Layer.SphericalMercator.forwardMercator(A.x,A.y);A.x=B.lon;A.y=B.lat;return A;},projectInverse:function(A){var B=OpenLayers.Layer.SphericalMercator.inverseMercator(A.x,A.y);A.x=B.lon;A.y=B.lat;return A;}};OpenLayers.Projection.addTransform("EPSG:4326","EPSG:900913",OpenLayers.Layer.SphericalMercator.projectForward);OpenLayers.Projection.addTransform("EPSG:900913","EPSG:4326",OpenLayers.Layer.SphericalMercator.projectInverse);OpenLayers.Control.DrawFeature=OpenLayers.Class(OpenLayers.Control,{layer:null,callbacks:null,featureAdded:function(){},handlerOptions:null,initialize:function(B,C,A){OpenLayers.Control.prototype.initialize.apply(this,[A]);this.callbacks=OpenLayers.Util.extend({done:this.drawFeature},this.callbacks);this.layer=B;this.handler=new C(this,this.callbacks,this.handlerOptions);},drawFeature:function(B){var A=new OpenLayers.Feature.Vector(B);this.layer.addFeatures([A]);this.featureAdded(A);},CLASS_NAME:"OpenLayers.Control.DrawFeature"});OpenLayers.Control.SelectFeature=OpenLayers.Class(OpenLayers.Control,{multipleKey:null,toggleKey:null,multiple:false,clickout:true,toggle:false,hover:false,onSelect:function(){},onUnselect:function(){},geometryTypes:null,layer:null,callbacks:null,selectStyle:null,renderIntent:"select",handler:null,initialize:function(C,B){OpenLayers.Control.prototype.initialize.apply(this,[B]);this.layer=C;this.callbacks=OpenLayers.Util.extend({click:this.clickFeature,clickout:this.clickoutFeature,over:this.overFeature,out:this.outFeature},this.callbacks);var A={geometryTypes:this.geometryTypes};this.handler=new OpenLayers.Handler.Feature(this,C,this.callbacks,A);},unselectAll:function(A){var C;for(var B=this.layer.selectedFeatures.length-1;B>=0;--B){C=this.layer.selectedFeatures[B];if(!A||A.except!=C){this.unselect(C);}}},clickFeature:function(A){if(!this.hover){var B=(OpenLayers.Util.indexOf(this.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.handler.evt[this.multipleKey];},toggleSelect:function(){return this.toggle||this.handler.evt[this.toggleKey];},clickoutFeature:function(A){if(!this.hover&&this.clickout){this.unselectAll();}},overFeature:function(A){if(this.hover&&(OpenLayers.Util.indexOf(this.layer.selectedFeatures,A)==-1)){this.select(A);}},outFeature:function(A){if(this.hover){this.unselect(A);}},select:function(B){this.layer.selectedFeatures.push(B);var A=this.selectStyle||this.renderIntent;this.layer.drawFeature(B,A);this.layer.events.triggerEvent("featureselected",{feature:B});this.onSelect(B);},unselect:function(A){this.layer.drawFeature(A,"default");OpenLayers.Util.removeItem(this.layer.selectedFeatures,A);this.layer.events.triggerEvent("featureunselected",{feature:A});this.onUnselect(A);},setMap:function(A){this.handler.setMap(A);OpenLayers.Control.prototype.setMap.apply(this,arguments);},CLASS_NAME:"OpenLayers.Control.SelectFeature"});OpenLayers.Control.ZoomBox=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOOL,out:false,draw:function(){this.handler=new OpenLayers.Handler.Box(this,{done:this.zoomBox},{keyMask:this.keyMask});},zoomBox:function(H){if(H instanceof OpenLayers.Bounds){if(!this.out){var I=this.map.getLonLatFromPixel(new OpenLayers.Pixel(H.left,H.bottom));var L=this.map.getLonLatFromPixel(new OpenLayers.Pixel(H.right,H.top));var B=new OpenLayers.Bounds(I.lon,I.lat,L.lon,L.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 M=this.map.getExtent();var A=this.map.getLonLatFromPixel(H.getCenterPixel());var C=A.lon-(M.getWidth()/2)*E;var F=A.lon+(M.getWidth()/2)*E;var K=A.lat-(M.getHeight()/2)*E;var D=A.lat+(M.getHeight()/2)*E;var B=new OpenLayers.Bounds(C,K,F,D);}this.map.zoomToExtent(B);}else{if(!this.out){this.map.setCenter(this.map.getLonLatFromPixel(H),this.map.getZoom()+1);}else{this.map.setCenter(this.map.getLonLatFromPixel(H),this.map.getZoom()-1);}}},CLASS_NAME:"OpenLayers.Control.ZoomBox"});OpenLayers.Format.WKT=OpenLayers.Class(OpenLayers.Format,{initialize:function(A){this.regExes={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/};OpenLayers.Format.prototype.initialize.apply(this,[A]);},read:function(E){var D,C,G;var F=this.regExes.typeStr.exec(E);if(F){C=F[1].toLowerCase();G=F[2];if(this.parse[C]){D=this.parse[C].apply(this,[G]);}if(this.internalProjection&&this.externalProjection){if(D&&D.CLASS_NAME=="OpenLayers.Feature.Vector"){D.geometry.transform(this.externalProjection,this.internalProjection);}else{if(D&&typeof D=="object"){for(var B=0;B<D.length;B++){var A=D[B];A.geometry.transform(this.externalProjection,this.internalProjection);}}}}}return D;},write:function(C){var H,G,B,F,E;if(C.constructor==Array){H=C;E=true;}else{H=[C];E=false;}var D=[];if(E){D.push("GEOMETRYCOLLECTION(");}for(var A=0;A<H.length;++A){if(E&&A>0){D.push(",");}G=H[A].geometry;B=G.CLASS_NAME.split(".")[2].toLowerCase();if(!this.extract[B]){return null;}if(this.internalProjection&&this.externalProjection){G=G.clone();G.transform(this.internalProjection,this.externalProjection);}F=this.extract[B].apply(this,[G]);D.push(B.toUpperCase()+"("+F+")");}if(E){D.push(")");}return D.join("");},extract:{point:function(A){return A.x+" "+A.y;},multipoint:function(B){var C=[];for(var A=0;A<B.components.length;++A){C.push(this.extract.point.apply(this,[B.components[A]]));}return C.join(",");},linestring:function(A){var C=[];for(var B=0;B<A.components.length;++B){C.push(this.extract.point.apply(this,[A.components[B]]));}return C.join(",");},multilinestring:function(B){var C=[];for(var A=0;A<B.components.length;++A){C.push("("+this.extract.linestring.apply(this,[B.components[A]])+")");}return C.join(",");},polygon:function(B){var C=[];for(var A=0;A<B.components.length;++A){C.push("("+this.extract.linestring.apply(this,[B.components[A]])+")");}return C.join(",");},multipolygon:function(C){var B=[];for(var A=0;A<C.components.length;++A){B.push("("+this.extract.polygon.apply(this,[C.components[A]])+")");}return B.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(D){var B=OpenLayers.String.trim(D).split(",");var C=[];for(var A=0;A<B.length;++A){C.push(this.parse.point.apply(this,[B[A]]).geometry);}return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiPoint(C));},linestring:function(D){var B=OpenLayers.String.trim(D).split(",");var C=[];for(var A=0;A<B.length;++A){C.push(this.parse.point.apply(this,[B[A]]).geometry);}return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString(C));},multilinestring:function(E){var B;var A=OpenLayers.String.trim(E).split(this.regExes.parenComma);var D=[];for(var C=0;C<A.length;++C){B=A[C].replace(this.regExes.trimParens,"$1");D.push(this.parse.linestring.apply(this,[B]).geometry);}return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiLineString(D));},polygon:function(G){var B,A,E;var F=OpenLayers.String.trim(G).split(this.regExes.parenComma);var D=[];for(var C=0;C<F.length;++C){B=F[C].replace(this.regExes.trimParens,"$1");A=this.parse.linestring.apply(this,[B]).geometry;E=new OpenLayers.Geometry.LinearRing(A.components);D.push(E);}return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon(D));},multipolygon:function(E){var C;var A=OpenLayers.String.trim(E).split(this.regExes.doubleParenComma);var D=[];for(var B=0;B<A.length;++B){C=A[B].replace(this.regExes.trimParens,"$1");D.push(this.parse.polygon.apply(this,[C]).geometry);}return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiPolygon(D));},geometrycollection:function(D){D=D.replace(/,\s*([A-Za-z])/g,"|$1");var C=OpenLayers.String.trim(D).split("|");var B=[];for(var A=0;A<C.length;++A){B.push(OpenLayers.Format.WKT.prototype.read.apply(this,[C[A]]));}return B;}},CLASS_NAME:"OpenLayers.Format.WKT"});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.Google=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.000021457672119140625,0.000010728836059570312],type:null,windowResized:false,sphericalMercator:false,dragObject:null,initialize:function(B,A){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);this.addContainerPxFunction();if(this.sphericalMercator){OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator);this.initMercatorParameters();}},loadMapObject:function(){try{this.mapObject=new GMap2(this.div);if(typeof this.mapObject.getDragObject=="function"){this.dragObject=this.mapObject.getDragObject();}else{this.dragPanMapObject=null;}var A=this.div.lastChild;this.div.removeChild(A);this.pane.appendChild(A);A.className="olLayerGooglePoweredBy gmnoprint";A.style.left="";A.style.bottom="";var B=this.div.lastChild;this.div.removeChild(B);this.pane.appendChild(B);B.className="olLayerGoogleCopyright";B.style.right="";B.style.bottom="";}catch(C){OpenLayers.Console.error(C);}},setMap:function(A){OpenLayers.Layer.EventPane.prototype.setMap.apply(this,arguments);if(this.type!=null){this.map.events.register("moveend",this,this.setMapType);}},setMapType:function(){if(this.mapObject.getCenter()!=null){if(OpenLayers.Util.indexOf(this.mapObject.getMapTypes(),this.type)==-1){this.mapObject.addMapType(this.type);}this.mapObject.setMapType(this.type);this.map.events.unregister("moveend",this,this.setMapType);}},onMapResize:function(){if(this.visibility){this.mapObject.checkResize();}else{this.windowResized=true;}},display:function(C){OpenLayers.Layer.prototype.display.apply(this,arguments);if(this.div.style.display=="block"&&this.windowResized){var A=this.map.getCenter();var B=this.getMapObjectLonLatFromLonLat(A.lon,A.lat);this.mapObject.setCenter(B,this.map.getZoom());this.mapObject.checkResize();this.windowResized=false;}},getOLBoundsFromMapObjectBounds:function(B){var C=null;if(B!=null){var A=B.getSouthWest();var D=B.getNorthEast();if(this.sphericalMercator){A=this.forwardMercator(A.lng(),A.lat());D=this.forwardMercator(D.lng(),D.lat());}else{A=new OpenLayers.LonLat(A.lng(),A.lat());D=new OpenLayers.LonLat(D.lng(),D.lat());}C=new OpenLayers.Bounds(A.lon,A.lat,D.lon,D.lat);}return C;},getMapObjectBoundsFromOLBounds:function(C){var B=null;if(C!=null){var A=this.sphericalMercator?this.inverseMercator(C.bottom,C.left):new OpenLayers.LonLat(C.bottom,C.left);var D=this.sphericalMercator?this.inverseMercator(C.top,C.right):new OpenLayers.LonLat(C.top,C.right);B=new GLatLngBounds(new GLatLng(A.lat,A.lon),new GLatLng(D.lat,D.lon));}return B;},addContainerPxFunction:function(){if((typeof GMap2!="undefined")&&!GMap2.prototype.fromLatLngToContainerPixel){GMap2.prototype.fromLatLngToContainerPixel=function(B){var A=this.fromLatLngToDivPixel(B);var C=this.getContainer().firstChild.firstChild;A.x+=C.offsetLeft;A.y+=C.offsetTop;return A;};}},getWarningHTML:function(){return OpenLayers.i18n("googleWarning");},setMapObjectCenter:function(A,B){this.mapObject.setCenter(A,B);},dragPanMapObject:function(B,A){this.dragObject.moveBy(new GSize(-B,A));},getMapObjectCenter:function(){return this.mapObject.getCenter();},getMapObjectZoom:function(){return this.mapObject.getZoom();},getMapObjectLonLatFromMapObjectPixel:function(A){return this.mapObject.fromContainerPixelToLatLng(A);},getMapObjectPixelFromMapObjectLonLat:function(A){return this.mapObject.fromLatLngToContainerPixel(A);},getMapObjectZoomFromMapObjectBounds:function(A){return this.mapObject.getBoundsZoomLevel(A);},getLongitudeFromMapObjectLonLat:function(A){return this.sphericalMercator?this.forwardMercator(A.lng(),A.lat()).lon:A.lng();},getLatitudeFromMapObjectLonLat:function(B){var A=this.sphericalMercator?this.forwardMercator(B.lng(),B.lat()).lat:B.lat();return A;},getMapObjectLonLatFromLonLat:function(D,B){var C;if(this.sphericalMercator){var A=this.inverseMercator(D,B);C=new GLatLng(A.lat,A.lon);}else{C=new GLatLng(B,D);}return C;},getXFromMapObjectPixel:function(A){return A.x;},getYFromMapObjectPixel:function(A){return A.y;},getMapObjectPixelFromXY:function(A,B){return new GPoint(A,B);},CLASS_NAME:"OpenLayers.Layer.Google"});OpenLayers.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 D=0;D<this.grid.length;D++){var C=this.grid[D];for(var A=0;A<C.length;A++){var B=C[A];this.removeTileMonitoringHooks(B);B.destroy();}}this.grid=[];}},clone:function(A){if(A==null){A=new OpenLayers.Layer.Grid(this.name,this.url,this.params,this.options);}A=OpenLayers.Layer.HTTPRequest.prototype.clone.apply(this,[A]);if(this.tileSize!=null){A.tileSize=this.tileSize.clone();}A.grid=[];return A;},moveTo:function(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().clone();A.h=parseInt(A.h*this.ratio);A.w=parseInt(A.w*this.ratio);}OpenLayers.Layer.HTTPRequest.prototype.setTileSize.apply(this,[A]);},getGridBounds:function(){var A="The getGridBounds() function is deprecated. It will be removed in 3.0. Please use getTilesBounds() instead.";OpenLayers.Console.warn(A);return this.getTilesBounds();},getTilesBounds:function(){var 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.map.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();},spiralTileLoad:function(){var B=[];var G=["right","down","left","up"];var F=0;var A=-1;var I=OpenLayers.Util.indexOf(G,"right");var J=0;while(J<G.length){var H=F;var C=A;switch(G[I]){case"right":C++;break;case"down":H++;break;case"left":C--;break;case"up":H--;break;}var E=null;if((H<this.grid.length)&&(H>=0)&&(C<this.grid[0].length)&&(C>=0)){E=this.grid[H][C];}if((E!=null)&&(!E.queued)){B.unshift(E);E.queued=true;J=0;F=H;A=C;}else{I=(I+1)%4;J++;}}for(var D=0;D<B.length;D++){var E=B[D];E.draw();E.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);},removeTileMonitoringHooks:function(A){A.events.un({loadstart:A.onLoadStart,loadend: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(L){var C=(L)?0:(this.grid.length-1);var B=this.grid;var F=B[C];var E=this.map.getResolution();var H=(L)?-this.tileSize.h:this.tileSize.h;var G=E*-H;var K=(L)?B.pop():B.shift();for(var I=0;I<F.length;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;K[I].moveTo(A,J);}if(L){B.unshift(K);}else{B.push(K);}},shiftColumn:function(K){var D=(K)?-this.tileSize.w:this.tileSize.w;var C=this.map.getResolution();var I=C*D;for(var E=0;E<this.grid.length;E++){var J=this.grid[E];var H=(K)?0:(J.length-1);var B=J[H];var A=B.bounds.clone();var F=B.position.clone();A.left=A.left+I;A.right=A.right+I;F.x=F.x+D;var G=K?this.grid[E].pop():this.grid[E].shift();G.moveTo(A,F);if(K){J.unshift(G);}else{J.push(G);}}},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.setTileSize();}},getTileBounds:function(D){var C=this.map.getMaxExtent();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.Style=OpenLayers.Class({name:null,layerName:null,isDefault:false,rules:null,context:null,defaultStyle:null,propertyStyles:null,initialize:function(B,A){this.rules=[];this.setDefaultStyle(B||OpenLayers.Feature.Vector.style["default"]);OpenLayers.Util.extend(this,A);},destroy:function(){for(var A=0;A<this.rules.length;A++){this.rules[A].destroy();this.rules[A]=null;}this.rules=null;this.defaultStyle=null;},createSymbolizer:function(I){var A=OpenLayers.Util.extend({},this.defaultStyle);var H=this.rules;var G,B;var C=[];var E=false;for(var D=0;D<H.length;D++){G=H[D];var F=G.evaluate(I);if(F){if(G instanceof OpenLayers.Rule&&G.elseFilter){C.push(G);}else{E=true;this.applySymbolizer(G,A,I);}}}if(E==false&&C.length>0){E=true;for(var D=0;D<C.length;D++){this.applySymbolizer(C[D],A,I);}}if(H.length>0&&E==false){A.display="none";}else{A.display="";}return A;},applySymbolizer:function(F,E,C){var A=C.geometry?this.getSymbolizerPrefix(C.geometry):OpenLayers.Style.SYMBOLIZER_PREFIXES[0];var D=F.symbolizer[A]||F.symbolizer;var B=this.context||C.attributes||C.data;return this.createLiterals(OpenLayers.Util.extend(E,D),B);},createLiterals:function(C,B){for(var A in this.propertyStyles){C[A]=OpenLayers.Style.createLiteral(C[A],B);}return C;},findPropertyStyles:function(){var C={};var E=this.defaultStyle;this.addPropertyStyles(C,E);var G=this.rules;var D,F;for(var B=0;B<G.length;B++){var D=G[B].symbolizer;for(var A in D){F=D[A];if(typeof F=="object"){this.addPropertyStyles(C,F);}else{this.addPropertyStyles(C,D);break;}}}return C;},addPropertyStyles:function(B,C){var D;for(var A in C){D=C[A];if(typeof D=="string"&&D.match(/\$\{\w+\}/)){B[A]=true;}}return B;},addRules:function(A){this.rules=this.rules.concat(A);this.propertyStyles=this.findPropertyStyles();},setDefaultStyle:function(A){this.defaultStyle=A;this.propertyStyles=this.findPropertyStyles();},getSymbolizerPrefix:function(C){var B=OpenLayers.Style.SYMBOLIZER_PREFIXES;for(var A=0;A<B.length;A++){if(C.CLASS_NAME.indexOf(B[A])!=-1){return B[A];}}},CLASS_NAME:"OpenLayers.Style"});OpenLayers.Style.createLiteral=function(B,A){if(typeof B=="string"&&B.indexOf("${")!=-1){B=OpenLayers.String.format(B,A);B=isNaN(B)?B:parseFloat(B);}return B;};OpenLayers.Style.SYMBOLIZER_PREFIXES=["Point","Line","Polygon"];OpenLayers.Control.ModifyFeature=OpenLayers.Class(OpenLayers.Control,{geometryTypes:null,clickout:true,toggle:true,layer:null,feature:null,vertices:null,virtualVertices:null,selectControl:null,dragControl:null,handlers:null,deleteCodes:null,virtualStyle:null,mode:null,radiusHandle:null,dragHandle:null,onModificationStart:function(){},onModification:function(){},onModificationEnd:function(){},initialize:function(D,C){this.layer=D;this.vertices=[];this.virtualVertices=[];this.styleVirtual=OpenLayers.Util.extend({},this.layer.style||this.layer.styleMap.createSymbolizer());this.styleVirtual.fillOpacity=0.3;this.styleVirtual.strokeOpacity=0.3;this.deleteCodes=[46,100];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};this.selectControl=new OpenLayers.Control.SelectFeature(D,A);this.layer.events.on({featureselected:this.selectFeature,featureunselected:this.unselectFeature,scope:this});var B={geometryTypes:["OpenLayers.Geometry.Point"],snappingOptions:this.snappingOptions,onStart:function(H,G){F.dragStart.apply(F,[H,G]);},onDrag:function(G){F.dragVertex.apply(F,[G]);},onComplete:function(G){F.dragComplete.apply(F,[G]);}};this.dragControl=new OpenLayers.Control.DragFeature(D,B);var E={keypress:this.handleKeypress};this.handlers={keyboard:new OpenLayers.Handler.Keyboard(this,E)};},destroy:function(){this.layer.events.un({featureselected:this.selectFeature,featureunselected:this.unselectFeature,scope:this});this.layer=null;this.selectControl.destroy();this.dragControl.destroy();OpenLayers.Control.prototype.destroy.apply(this,[]);},activate:function(){return(this.selectControl.activate()&&this.handlers.keyboard.activate()&&OpenLayers.Control.prototype.activate.apply(this,arguments));},deactivate:function(){var A=false;if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)){this.layer.removeFeatures(this.vertices);this.layer.removeFeatures(this.virtualVertices);this.vertices=[];this.dragControl.deactivate();if(this.feature&&this.feature.geometry){this.selectControl.unselect.apply(this.selectControl,[this.feature]);}this.selectControl.deactivate();this.handlers.keyboard.deactivate();A=true;}return A;},selectFeature:function(B){var A=this.layer.events.triggerEvent("beforefeaturemodified",{feature:this.feature});if(A!==false){this.feature=B.feature;this.resetVertices();this.dragControl.activate();this.onModificationStart(this.feature);}},unselectFeature:function(A){this.layer.removeFeatures(this.vertices);this.vertices=[];this.layer.destroyFeatures(this.virtualVertices);this.virtualVertices=[];if(this.dragHandle){this.layer.destroyFeatures([this.dragHandle]);delete this.dragHandle;}if(this.radiusHandle){this.layer.destroyFeatures([this.radiusHandle]);delete this.radiusHandle;}this.feature=null;this.dragControl.deactivate();this.onModificationEnd(A.feature);this.layer.events.triggerEvent("afterfeaturemodified",{feature:A.feature});},dragStart:function(B,A){if(B!=this.feature&&!B.geometry.parent&&B!=this.dragHandle&&B!=this.radiusHandle){if(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.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(A){if(this.feature.geometry.CLASS_NAME=="OpenLayers.Geometry.Point"){if(this.feature!=A){this.feature=A;}}else{if(A._index){A.geometry.parent.addComponent(A.geometry,A._index);delete A._index;OpenLayers.Util.removeItem(this.virtualVertices,A);this.vertices.push(A);}else{if(A==this.dragHandle){this.layer.removeFeatures(this.vertices);this.vertices=[];if(this.radiusHandle){this.layer.destroyFeatures([this.radiusHandle]);this.radiusHandle=null;}}}if(this.virtualVertices.length>0){this.layer.destroyFeatures(this.virtualVertices);this.virtualVertices=[];}this.layer.drawFeature(this.feature,this.selectControl.renderIntent);}this.layer.drawFeature(A);},dragComplete:function(A){this.resetVertices();this.onModification(this.feature);this.layer.events.triggerEvent("featuremodified",{feature:this.feature});},resetVertices:function(){if(this.dragControl.feature){this.dragControl.outFeature(this.dragControl.feature);}if(this.vertices.length>0){this.layer.removeFeatures(this.vertices);this.vertices=[];}if(this.virtualVertices.length>0){this.layer.removeFeatures(this.virtualVertices);this.virtualVertices=[];}if(this.dragHandle){this.layer.destroyFeatures([this.dragHandle]);this.dragHandle=null;}if(this.radiusHandle){this.layer.destroyFeatures([this.radiusHandle]);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)){this.collectVertices();}}},handleKeypress:function(A){if(this.feature&&OpenLayers.Util.indexOf(this.deleteCodes,A)!=-1){var B=this.dragControl.feature;if(B&&OpenLayers.Util.indexOf(this.vertices,B)!=-1&&!this.dragControl.handlers.drag.dragging&&B.geometry.parent){B.geometry.parent.removeComponent(B.geometry);this.layer.drawFeature(this.feature,this.selectControl.renderIntent);this.resetVertices();this.onModification(this.feature);this.layer.events.triggerEvent("featuremodified",{feature:this.feature});}}},collectVertices:function(){this.vertices=[];this.virtualVertices=[];var A=this;function B(G){var D,E,H;if(G.CLASS_NAME=="OpenLayers.Geometry.Point"){E=new OpenLayers.Feature.Vector(G);A.vertices.push(E);}else{var C=G.components.length;if(G.CLASS_NAME=="OpenLayers.Geometry.LinearRing"){C-=1;}for(D=0;D<C;++D){H=G.components[D];if(H.CLASS_NAME=="OpenLayers.Geometry.Point"){E=new OpenLayers.Feature.Vector(H);A.vertices.push(E);}else{B(H);}}if(G.CLASS_NAME!="OpenLayers.Geometry.MultiPoint"){for(D=0;D<G.components.length-1;++D){var K=G.components[D];var L=G.components[D+1];if(K.CLASS_NAME=="OpenLayers.Geometry.Point"&&L.CLASS_NAME=="OpenLayers.Geometry.Point"){var I=(K.x+L.x)/2;var F=(K.y+L.y)/2;var J=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(I,F),null,A.styleVirtual);J.geometry.parent=G;J._index=D+1;A.virtualVertices.push(J);}}}}}B.call(this,this.feature.geometry);this.layer.addFeatures(this.vertices,{silent:true});this.layer.addFeatures(this.virtualVertices,{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);};this.dragHandle=B;this.layer.addFeatures([this.dragHandle],{silent:true});},collectRadiusHandle:function(){var H=this.feature.geometry;var G=H.getBounds();var B=G.getCenterLonLat();var F=new OpenLayers.Geometry.Point(B.lon,B.lat);var C=new OpenLayers.Geometry.Point(G.right,G.bottom);var A=new OpenLayers.Feature.Vector(C);var E=(this.mode&OpenLayers.Control.ModifyFeature.RESIZE);var D=(this.mode&OpenLayers.Control.ModifyFeature.ROTATE);C.move=function(Q,P){OpenLayers.Geometry.Point.prototype.move.call(this,Q,P);var R=this.x-F.x;var N=this.y-F.y;var S=R-Q;var O=N-P;if(D){var J=Math.atan2(O,S);var I=Math.atan2(N,R);var L=I-J;L*=180/Math.PI;H.rotate(L,F);}if(E){var M=Math.sqrt((S*S)+(O*O));var K=Math.sqrt((R*R)+(N*N));H.resize(K/M,F);}};this.radiusHandle=A;this.layer.addFeatures([this.radiusHandle],{silent:true});},setMap:function(A){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.Control.Navigation=OpenLayers.Class(OpenLayers.Control,{dragPan:null,zoomBox:null,zoomWheelEnabled: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();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(){this.handlers.click=new OpenLayers.Handler.Click(this,{dblclick:this.defaultDblClick},{"double":true,stopDouble:true});this.dragPan=new OpenLayers.Control.DragPan({map:this.map});this.zoomBox=new OpenLayers.Control.ZoomBox({map:this.map,keyMask:OpenLayers.Handler.MOD_SHIFT});this.dragPan.draw();this.zoomBox.draw();this.handlers.wheel=new OpenLayers.Handler.MouseWheel(this,{up:this.wheelUp,down:this.wheelDown});this.activate();},defaultDblClick:function(B){var A=this.map.getLonLatFromViewPortPx(B.xy);this.map.setCenter(A,this.map.zoom+1);},wheelChange:function(H,C){var F=this.map.getZoom()+C;if(!this.map.isValidZoomLevel(F)){return ;}var I=this.map.getSize();var E=I.w/2-H.xy.x;var D=H.xy.y-I.h/2;var G=this.map.baseLayer.getResolutionForZoom(F);var A=this.map.getLonLatFromPixel(H.xy);var B=new OpenLayers.LonLat(A.lon+E*G,A.lat+D*G);this.map.setCenter(B,F);},wheelUp:function(A){this.wheelChange(A,1);},wheelDown:function(A){this.wheelChange(A,-1);},disableZoomWheel:function(){this.zoomWheelEnabled=false;this.handlers.wheel.deactivate();},enableZoomWheel:function(){this.zoomWheelEnabled=true;if(this.active){this.handlers.wheel.activate();}},CLASS_NAME:"OpenLayers.Control.Navigation"});OpenLayers.Geometry=OpenLayers.Class({id:null,parent:null,bounds:null,initialize:function(){this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");},destroy:function(){this.id=null;this.bounds=null;},clone:function(){return new OpenLayers.Geometry();},setBounds:function(A){if(A){this.bounds=A.clone();}},clearBounds:function(){this.bounds=null;if(this.parent){this.parent.clearBounds();}},extendBounds:function(B){var A=this.getBounds();if(!A){this.setBounds(B);}else{this.bounds.extend(B);}},getBounds:function(){if(this.bounds==null){this.calculateBounds();}return this.bounds;},calculateBounds:function(){},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;},toString:function(){return OpenLayers.Format.WKT.prototype.write(new OpenLayers.Feature.Vector(this));},CLASS_NAME:"OpenLayers.Geometry"});OpenLayers.Geometry.segmentsIntersect=function(Q,P,M){var A=false;var N=Q.x1-P.x1;var B=Q.y1-P.y1;var O=Q.x2-Q.x1;var C=Q.y2-Q.y1;var L=P.y2-P.y1;var F=P.x2-P.x1;var I=(L*O)-(F*C);var H=(F*B)-(L*N);var G=(O*B)-(C*N);if(I==0){if(H==0&&G==0){A=true;}}else{var E=H/I;var D=G/I;if(E>=0&&E<=1&&D>=0&&D<=1){if(!M){A=true;}else{var K=Q.x1+(E*O);var J=Q.y1+(E*C);A=new OpenLayers.Geometry.Point(K,J);}}}return A;};OpenLayers.Layer.MapGuide=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:true,singleTile:false,TILE_PARAMS:{operation:"GETTILEIMAGE",version:"1.2.0"},SINGLE_TILE_PARAMS:{operation:"GETMAPIMAGE",format:"PNG",locale:"en",clip:"1",version:"1.0.0"},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(this.singleTile){OpenLayers.Util.applyDefaults(this.params,this.SINGLE_TILE_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.options);}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.getCurrentSize();if(this.singleTile){var E={};E.setdisplaydpi=OpenLayers.DOTS_PER_INCH;E.setdisplayheight=H.h*this.ratio;E.setdisplaywidth=H.w*this.ratio;E.setviewcenterx=B.lon;E.setviewcentery=B.lat;E.setviewscale=this.map.getScale();if(!this.isBaseLayer){this.params.operation="GETDYNAMICMAPOVERLAYIMAGE";var I={};I.operation="GETVISIBLEMAPEXTENT";I.version="1.0.0";I.session=this.params.session;I.mapName=this.params.mapName;I.format="text/xml";I=OpenLayers.Util.extend(I,E);new OpenLayers.Ajax.Request(this.url,{parameters:I,method:"get",asynchronous: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);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.getArgs(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;},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);if(arguments.length>0){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.options);}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.TileCache=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:true,tileOrigin:null,format:"image/png",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.options);}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.map.zoom;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);},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.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,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=="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.options);}A=OpenLayers.Layer.Grid.prototype.clone.apply(this,[A]);return A;},getURL:function(B){B=this.adjustBounds(B);var C=this.getImageSize();var D={BBOX:this.encodeBBOX?B.toBBOX():B.toArray(),WIDTH:C.w,HEIGHT:C.h};var A=this.getFullRequestString(D);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(C,B){var A=this.map.getProjection();this.params.SRS=(A=="none")?null:A;return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,arguments);},CLASS_NAME:"OpenLayers.Layer.WMS"});OpenLayers.Rule=OpenLayers.Class({name:"default",context:null,elseFilter:false,symbolizer:null,minScaleDenominator:null,maxScaleDenominator:null,initialize:function(A){this.symbolizer={};OpenLayers.Util.extend(this,A);},destroy:function(){for(var A in this.symbolizer){this.symbolizer[A]=null;}this.symbolizer=null;},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);}return A;},getContext:function(B){var A=this.context;if(!A){A=B.attributes||B.data;}return A;},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)};if(C instanceof OpenLayers.Style){this.styles["default"]=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);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(A,C,E){var D=[];for(var B in E){D.push(new OpenLayers.Rule.Comparison({type:OpenLayers.Rule.Comparison.EQUAL_TO,property:C,value:B,symbolizer:E[B]}));}this.styles[A].addRules(D);},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.Geometry.Collection=OpenLayers.Class(OpenLayers.Geometry,{components:null,componentTypes:null,initialize:function(A){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);this.components=[];if(A!=null){this.addComponents(A);}},destroy:function(){this.components.length=0;this.components=null;},clone:function(){var geometry=eval("new "+this.CLASS_NAME+"()");for(var i=0;i<this.components.length;i++){geometry.addComponent(this.components[i].clone());}OpenLayers.Util.applyDefaults(geometry,this);return geometry;},getComponentsString:function(){var A=[];for(var B=0;B<this.components.length;B++){A.push(this.components[B].toShortString());}return A.join(",");},calculateBounds:function(){this.bounds=null;if(this.components&&this.components.length>0){this.setBounds(this.components[0].getBounds());for(var A=1;A<this.components.length;A++){this.extendBounds(this.components[A].getBounds());}}},addComponents:function(B){if(!(B instanceof Array)){B=[B];}for(var A=0;A<B.length;A++){this.addComponent(B[A]);}},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 B=0;for(var A=0;A<this.components.length;A++){B+=this.components[A].getLength();}return B;},getArea:function(){var B=0;for(var A=0;A<this.components.length;A++){B+=this.components[A].getArea();}return B;},move:function(A,C){for(var B=0;B<this.components.length;B++){this.components[B].move(A,C);}},rotate:function(C,A){for(var B=0;B<this.components.length;++B){this.components[B].rotate(C,A);}},resize:function(D,A,C){for(var B=0;B<this.components.length;++B){this.components[B].resize(D,A,C);}},equals:function(C){var A=true;if(!C||!C.CLASS_NAME||(this.CLASS_NAME!=C.CLASS_NAME)){A=false;}else{if(!(C.components instanceof Array)||(C.components.length!=this.components.length)){A=false;}else{for(var B=0;B<this.components.length;++B){if(!this.components[B].equals(C.components[B])){A=false;break;}}}}return A;},transform:function(D,B){if(D&&B){for(var C=0;C<this.components.length;C++){var A=this.components[C];A.transform(D,B);}}return this;},intersects:function(C){var A=false;for(var B=0;B<this.components.length;++B){A=C.intersects(this.components[B]);if(A){break;}}return A;},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(B){var D=0;if((this.x!=null)&&(this.y!=null)&&(B!=null)&&(B.x!=null)&&(B.y!=null)){var C=Math.pow(this.x-B.x,2);var A=Math.pow(this.y-B.y,2);D=Math.sqrt(C+A);}return D;},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();},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();},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);}return this;},CLASS_NAME:"OpenLayers.Geometry.Point"});OpenLayers.Geometry.Surface=OpenLayers.Class(OpenLayers.Geometry,{initialize:function(){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);},CLASS_NAME:"OpenLayers.Geometry.Surface"});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.options);}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","featureadded","featuresadded","featureselected","featureunselected","beforefeaturemodified","featuremodified","afterfeaturemodified"],isBaseLayer:false,isFixed:false,isVector:true,features:null,selectedFeatures:null,reportError:true,style:null,styleMap:null,renderers:["SVG","VML"],renderer:null,geometryType:null,drawn:false,initialize:function(B,A){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=[];},destroy:function(){OpenLayers.Layer.prototype.destroy.apply(this,arguments);this.destroyFeatures();this.features=null;this.selectedFeatures=null;if(this.renderer){this.renderer.destroy();}this.renderer=null;this.geometryType=null;this.drawn=null;},assignRenderer:function(){for(var B=0;B<this.renderers.length;B++){var A=OpenLayers.Renderer[this.renderers[B]];if(A&&A.prototype.supported()){this.renderer=new A(this.div);break;}}},displayError:function(){if(this.reportError){alert(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());}},onMapResize:function(){OpenLayers.Layer.prototype.onMapResize.apply(this,arguments);this.renderer.setSize(this.map.getSize());},moveTo:function(E,A,F){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);if(!F){this.renderer.root.style.visibility="hidden";if(navigator.userAgent.toLowerCase().indexOf("gecko")!=-1){this.div.scrollLeft=this.div.scrollLeft;}this.div.style.left=-parseInt(this.map.layerContainerDiv.style.left)+"px";this.div.style.top=-parseInt(this.map.layerContainerDiv.style.top)+"px";var D=this.map.getExtent();this.renderer.setExtent(D);this.renderer.root.style.visibility="visible";}if(!this.drawn||A){this.drawn=true;for(var C=0;C<this.features.length;C++){var B=this.features[C];this.drawFeature(B);}}},addFeatures:function(F,B){if(!(F instanceof Array)){F=[F];}var E=!B||!B.silent;for(var D=0;D<F.length;D++){var C=F[D];if(this.geometryType&&!(C.geometry instanceof this.geometryType)){var A=OpenLayers.i18n("componentShouldBe",{geomType:this.geometryType.prototype.CLASS_NAME});throw A;}this.features.push(C);C.layer=this;if(!C.style&&this.style){C.style=OpenLayers.Util.extend({},this.style);}if(E){this.events.triggerEvent("beforefeatureadded",{feature:C});this.preFeatureInsert(C);}if(this.drawn){this.drawFeature(C);}if(E){this.events.triggerEvent("featureadded",{feature:C});this.onFeatureInsert(C);}}if(E){this.events.triggerEvent("featuresadded",{features:F});}},removeFeatures:function(C){if(!(C instanceof Array)){C=[C];}for(var B=C.length-1;B>=0;B--){var A=C[B];this.features=OpenLayers.Util.removeItem(this.features,A);if(A.geometry){this.renderer.eraseGeometry(A.geometry);}if(OpenLayers.Util.indexOf(this.selectedFeatures,A)!=-1){OpenLayers.Util.removeItem(this.selectedFeatures,A);}}},destroyFeatures:function(D){var C=(D==undefined);if(C){D=this.features;this.selectedFeatures=[];}this.eraseFeatures(D);var B;for(var A=D.length-1;A>=0;A--){B=D[A];if(!C){OpenLayers.Util.removeItem(this.selectedFeatures,B);}B.destroy();}},drawFeature:function(A,B){if(typeof B!="object"){var C=typeof B=="string"?B:A.renderIntent;B=A.style||this.style;if(!B){B=this.styleMap.createSymbolizer(A,C);}}this.renderer.drawFeature(A,B);},eraseFeatures:function(A){this.renderer.eraseFeatures(A);},getFeatureFromEvent:function(A){if(!this.renderer){OpenLayers.Console.error(OpenLayers.i18n("getFeatureError"));return null;}var B=this.renderer.getFeatureIdFromEvent(A);return this.getFeatureById(B);},getFeatureById:function(C){var B=null;for(var A=0;A<this.features.length;++A){if(this.features[A].id==C){B=this.features[A];break;}}return B;},onFeatureInsert:function(A){},preFeatureInsert:function(A){},CLASS_NAME:"OpenLayers.Layer.Vector"});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.options);}A=OpenLayers.Layer.WMS.prototype.clone.apply(this,[A]);return A;},CLASS_NAME:"OpenLayers.Layer.WMS.Untiled"});OpenLayers.Rule.Comparison=OpenLayers.Class(OpenLayers.Rule,{type:null,property:null,value:null,lowerBoundary:null,upperBoundary:null,initialize:function(A){OpenLayers.Rule.prototype.initialize.apply(this,[A]);},evaluate:function(C){if(!OpenLayers.Rule.prototype.evaluate.apply(this,arguments)){return false;}var B=this.getContext(C);switch(this.type){case OpenLayers.Rule.Comparison.EQUAL_TO:case OpenLayers.Rule.Comparison.LESS_THAN:case OpenLayers.Rule.Comparison.GREATER_THAN:case OpenLayers.Rule.Comparison.LESS_THAN_OR_EQUAL_TO:case OpenLayers.Rule.Comparison.GREATER_THAN_OR_EQUAL_TO:return this.binaryCompare(B,this.property,this.value);case OpenLayers.Rule.Comparison.BETWEEN:var A=B[this.property]>this.lowerBoundary;A=A&&B[this.property]<this.upperBoundary;return A;case OpenLayers.Rule.Comparison.LIKE:var D=new RegExp(this.value,"gi");return D.test(B[this.property]);}},value2regex:function(D,B,A){if(D=="."){var C="'.' is an unsupported wildCard character for OpenLayers.Rule.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"),"\\");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;},binaryCompare:function(A,C,B){switch(this.type){case OpenLayers.Rule.Comparison.EQUAL_TO:return A[C]==B;case OpenLayers.Rule.Comparison.NOT_EQUAL_TO:return A[C]!=B;case OpenLayers.Rule.Comparison.LESS_THAN:return A[C]<B;case OpenLayers.Rule.Comparison.GREATER_THAN:return A[C]>B;case OpenLayers.Rule.Comparison.LESS_THAN_OR_EQUAL_TO:return A[C]<=B;case OpenLayers.Rule.Comparison.GREATER_THAN_OR_EQUAL_TO:return A[C]>=B;}},CLASS_NAME:"OpenLayers.Rule.Comparison"});OpenLayers.Rule.Comparison.EQUAL_TO="==";OpenLayers.Rule.Comparison.NOT_EQUAL_TO="!=";OpenLayers.Rule.Comparison.LESS_THAN="<";OpenLayers.Rule.Comparison.GREATER_THAN=">";OpenLayers.Rule.Comparison.LESS_THAN_OR_EQUAL_TO="<=";OpenLayers.Rule.Comparison.GREATER_THAN_OR_EQUAL_TO=">=";OpenLayers.Rule.Comparison.BETWEEN="..";OpenLayers.Rule.Comparison.LIKE="~";OpenLayers.Rule.FeatureId=OpenLayers.Class(OpenLayers.Rule,{fids:null,initialize:function(A){this.fids=[];OpenLayers.Rule.prototype.initialize.apply(this,[A]);},evaluate:function(B){if(!OpenLayers.Rule.prototype.evaluate.apply(this,arguments)){return false;}for(var A=0;A<this.fids.length;A++){var C=B.fid||B.id;if(C==this.fids[A]){return true;}}return false;},CLASS_NAME:"OpenLayers.Rule.FeatureId"});OpenLayers.Rule.Logical=OpenLayers.Class(OpenLayers.Rule,{rules:null,type:null,initialize:function(A){this.rules=[];OpenLayers.Rule.prototype.initialize.apply(this,[A]);},destroy:function(){for(var A=0;A<this.rules.length;A++){this.rules[A].destroy();}this.rules=null;OpenLayers.Rule.prototype.destroy.apply(this,arguments);},evaluate:function(B){if(!OpenLayers.Rule.prototype.evaluate.apply(this,arguments)){return false;}switch(this.type){case OpenLayers.Rule.Logical.AND:for(var A=0;A<this.rules.length;A++){if(this.rules[A].evaluate(B)==false){return false;}}return true;case OpenLayers.Rule.Logical.OR:for(var A=0;A<this.rules.length;A++){if(this.rules[A].evaluate(B)==true){return true;}}return false;case OpenLayers.Rule.Logical.NOT:return(!this.rules[0].evaluate(B));}},CLASS_NAME:"OpenLayers.Rule.Logical"});OpenLayers.Rule.Logical.AND="&&";OpenLayers.Rule.Logical.OR="||";OpenLayers.Rule.Logical.NOT="!";OpenLayers.Format.SLD=OpenLayers.Class(OpenLayers.Format.XML,{sldns:"http://www.opengis.net/sld",ogcns:"http://www.opengis.net/ogc",gmlns:"http://www.opengis.net/gml",defaultStyle:{fillColor:"#808080",fillOpacity:1,strokeColor:"#000000",strokeOpacity:1,strokeWidth:1,pointRadius:6},withNamedLayer:false,overrideDefaultStyleKey:true,initialize:function(A){OpenLayers.Format.XML.prototype.initialize.apply(this,[A]);},read:function(E,I){if(typeof E=="string"){E=OpenLayers.Format.XML.prototype.read.apply(this,[E]);}I=I||{};OpenLayers.Util.applyDefaults(I,{withNamedLayer:false,overrideDefaultStyleKey:true});var F=this.getElementsByTagNameNS(E,this.sldns,"UserStyle");var J={};if(F.length>0){var C={};var H=new Array(F.length);var B,G,A;for(var D=0;D<F.length;D++){G=F[D];B=this.parseProperty(G,this.sldns,"Name");A=this.parseUserStyle(G,B);if(I.overrideDefaultStyleKey&&A.isDefault==true){B="default";}if(!C[A.layerName]){C[A.layerName]={};}C[A.layerName][B]=A;H[D]=A;}J=I.withNamedLayer?[H,C]:H;}return J;},parseUserStyle:function(H,B){var E=new OpenLayers.Style(this.defaultStyle,{name:B});E.isDefault=(this.parseProperty(H,this.sldns,"IsDefault")==1);var A=H.parentNode;var C=this.getElementsByTagNameNS(A,this.sldns,"Name");if(A.nodeName.indexOf("NamedLayer")!=-1&&C&&C.length>0&&C[0].parentNode==A){E.layerName=this.getChildValue(C[0]);}var G=this.getElementsByTagNameNS(H,this.sldns,"Rule");if(G.length>0){var I=E.rules;var F;for(var D=0;D<G.length;D++){F=this.parseProperty(G[D],this.sldns,"Name");I.push(this.parseRule(G[D],F));}}return E;},parseRule:function(J,D){var E=this.getElementsByTagNameNS(J,this.ogcns,"Filter");if(E&&E.length>0){var I=this.parseFilter(E[0]);}else{var I=new OpenLayers.Rule();var H=this.getElementsByTagNameNS(J,this.ogcns,"ElseFilter");if(H&&H.length>0){I.elseFilter=true;}}I.name=D;var F=this.getElementsByTagNameNS(J,this.sldns,"MinScaleDenominator");if(F&&F.length>0){I.minScaleDenominator=parseFloat(this.getChildValue(F[0]));}var A=this.getElementsByTagNameNS(J,this.sldns,"MaxScaleDenominator");if(A&&A.length>0){I.maxScaleDenominator=parseFloat(this.getChildValue(A[0]));}var G=OpenLayers.Style.SYMBOLIZER_PREFIXES;for(var N=0;N<G.length;N++){var M=this.getElementsByTagNameNS(J,this.sldns,G[N]+"Symbolizer");if(M&&M.length>0){var C={};var B=this.getElementsByTagNameNS(M[0],this.sldns,"Graphic");if(B&&B.length>0){C.externalGraphic=this.parseProperty(B[0],this.sldns,"OnlineResource","xlink:href");C.pointRadius=this.parseProperty(B[0],this.sldns,"Size");C.graphicOpacity=this.parseProperty(B[0],this.sldns,"Opacity");}var L=this.getElementsByTagNameNS(M[0],this.sldns,"Fill");if(L&&L.length>0){C.fillColor=this.parseProperty(L[0],this.sldns,"CssParameter","name","fill");C.fillOpacity=this.parseProperty(L[0],this.sldns,"CssParameter","name","fill-opacity")||1;}var K=this.getElementsByTagNameNS(M[0],this.sldns,"Stroke");if(K&&K.length>0){C.strokeColor=this.parseProperty(K[0],this.sldns,"CssParameter","name","stroke");C.strokeOpacity=this.parseProperty(K[0],this.sldns,"CssParameter","name","stroke-opacity")||1;C.strokeWidth=this.parseProperty(K[0],this.sldns,"CssParameter","name","stroke-width");C.strokeLinecap=this.parseProperty(K[0],this.sldns,"CssParameter","name","stroke-linecap");}I.symbolizer[G[N]]=C;}}return I;},parseFilter:function(H){var A=this.getNodeOrChildrenByTagName(H,"FeatureId");if(A){var G=new OpenLayers.Rule.FeatureId();for(var C=0;C<A.length;C++){G.fids.push(A[C].getAttribute("fid"));}return G;}A=this.getNodeOrChildrenByTagName(H,"And");if(A){var G=new OpenLayers.Rule.Logical({type:OpenLayers.Rule.Logical.AND});var B=A[0].childNodes;for(var C=0;C<B.length;C++){if(B[C].nodeType==1){G.rules.push(this.parseFilter(B[C]));}}return G;}A=this.getNodeOrChildrenByTagName(H,"Or");if(A){var G=new OpenLayers.Rule.Logical({type:OpenLayers.Rule.Logical.OR});var B=A[0].childNodes;for(var C=0;C<B.length;C++){if(B[C].nodeType==1){G.rules.push(this.parseFilter(B[C]));}}return G;}A=this.getNodeOrChildrenByTagName(H,"Not");if(A){var G=new OpenLayers.Rule.Logical({type:OpenLayers.Rule.Logical.NOT});G.rules.push(this.parseFilter(A[0]));return G;}for(var F in this.TYPES){var A=this.getNodeOrChildrenByTagName(H,F);if(A){A=A[0];var G=new OpenLayers.Rule.Comparison({type:OpenLayers.Rule.Comparison[this.TYPES[F]],property:this.parseProperty(A,this.ogcns,"PropertyName")});if(this.TYPES[F]=="BETWEEN"){G.lowerBoundary=this.parseProperty(A,this.ogcns,"LowerBoundary");G.upperBoudary=this.parseProperty(A,this.ogcns,"UpperBoundary");}else{G.value=this.parseProperty(A,this.ogcns,"Literal");if(this.TYPES[F]=="LIKE"){var E=A.getAttribute("wildCard");var D=A.getAttribute("singleChar");var I=A.getAttribute("escape");G.value2regex(E,D,I);}}return G;}}return new OpenLayers.Rule();},getNodeOrChildrenByTagName:function(C,B){var G=(C.prefix)?C.nodeName.split(":")[1]:C.nodeName;if(G==B){return[C];}else{var E=this.getElementsByTagNameNS(C,this.ogcns,B);}if(E.length>0){var D;var F=[];for(var A=0;A<E.length;A++){D=E[A];if(D.parentNode==C){F.push(D);}}return F.length>0?F:null;}return null;},parseProperty:function(H,B,D,F,C){var I=null;var E=this.getElementsByTagNameNS(H,B,D);if(E&&E.length>0){var G=F?this.getNodeWithAttribute(E,F):E[0];if(window.opera&&F){var A=F.indexOf(":");if(A!=-1){F=F.substring(++A);}}if(F&&C){G=this.getNodeWithAttribute(E,F,C);I=this.parseParameter(G);}if(F&&!C){var G=this.getNodeWithAttribute(E,F);I=G.getAttribute(F);}if(!F){var I=this.parseParameter(G);}}if(I){I=OpenLayers.String.trim(I);if(!isNaN(I)){I=parseFloat(I);}}return I;},parseParameter:function(B){if(!B){return null;}var D=B.childNodes;if(!D){return null;}var C=new Array(D.length);for(var A=0;A<D.length;A++){if(D[A].nodeName.indexOf("Literal")!=-1){C[A]=this.getChildValue(D[A]);}else{if(D[A].nodeName.indexOf("propertyName")!=-1){C[A]="${"+this.getChildValue(D[A])+"}";}else{if(D[A].nodeType==3){C[A]=D[A].text||D[A].textContent;}}}}return C.join("");},getNodeWithAttribute:function(A,B,D){for(var C=0;C<A.length;C++){var E=A[C].getAttribute(B);if(E){if(!D){return A[C];}else{if(E==D){return A[C];}}}}},TYPES:{PropertyIsEqualTo:"EQUAL_TO",PropertyIsNotEqualTo:"NOT_EQUAL_TO",PropertyIsLessThan:"LESS_THAN",PropertyIsGreaterThan:"GREATER_THAN",PropertyIsLessThanOrEqualTo:"LESS_THAN_OR_EQUAL_TO",PropertyIsGreaterThanOrEqualTo:"GREATER_THAN_OR_EQUAL_TO",PropertyIsBetween:"BETWEEN",PropertyIsLike:"LIKE"},CLASS_NAME:"OpenLayers.Format.SLD"});OpenLayers.Format.Text=OpenLayers.Class(OpenLayers.Format,{initialize:function(A){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={};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.externalGraphic=L[I];}else{if(B[I]=="iconSize"){var M=L[I].split(",");P.graphicWidth=parseFloat(M[0]);P.graphicHeight=parseFloat(M[1]);}else{if(B[I]=="iconOffset"){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];}}}}}}}}}}}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.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 B=0;if(this.components&&(this.components.length>0)){B+=Math.abs(this.components[0].getArea());for(var A=1;A<this.components.length;A++){B-=Math.abs(this.components[A].getArea());}}return B;},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(D){var A=false;var C;if(D.CLASS_NAME=="OpenLayers.Geometry.Point"){A=this.containsPoint(D);}else{if(D.CLASS_NAME=="OpenLayers.Geometry.LineString"||D.CLASS_NAME=="OpenLayers.Geometry.LinearRing"){for(C=0;C<this.components.length;++C){A=D.intersects(this.components[C]);if(A){break;}}if(!A){for(C=0;C<D.components.length;++C){A=this.containsPoint(D.components[C]);if(A){break;}}}}else{for(C=0;C<D.components.length;++C){A=this.intersects(D.components[C]);if(A){break;}}}}if(!A&&D.CLASS_NAME=="OpenLayers.Geometry.Polygon"){var B=this.components[0];for(C=0;C<B.components.length;++C){A=D.containsPoint(B.components[C]);if(A){break;}}}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.Handler.Point=OpenLayers.Class(OpenLayers.Handler,{point:null,layer:null,drawing:false,mouseDown:false,lastDown:null,lastUp:null,initialize:function(C,B,A){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={displayInLayerSwitcher:false,calculateInRange:function(){return true;}};this.layer=new OpenLayers.Layer.Vector(this.CLASS_NAME,A);this.map.addLayer(this.layer);return true;},createFeature:function(){this.point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point());},deactivate:function(){if(!OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){return false;}if(this.drawing){this.cancel();}if(this.layer.map!=null){this.layer.destroy(false);}this.layer=null;return true;},destroyFeature:function(){if(this.point){this.point.destroy();}this.point=null;},finalize:function(){this.layer.renderer.clear();this.drawing=false;this.mouseDown=false;this.lastDown=null;this.lastUp=null;this.callback("done",[this.geometryClone()]);this.destroyFeature();},cancel:function(){this.layer.renderer.clear();this.drawing=false;this.mouseDown=false;this.lastDown=null;this.lastUp=null;this.callback("cancel",[this.geometryClone()]);this.destroyFeature();},click:function(A){OpenLayers.Event.stop(A);return false;},dblclick:function(A){OpenLayers.Event.stop(A);return false;},drawFeature:function(){this.layer.drawFeature(this.point,this.style);},geometryClone:function(){return this.point.geometry.clone();},mousedown:function(A){if(!this.checkModifiers(A)){return true;}if(this.lastDown&&this.lastDown.equals(A.xy)){return true;}if(this.lastDown==null){this.createFeature();}this.lastDown=A.xy;this.drawing=true;var B=this.map.getLonLatFromPixel(A.xy);this.point.geometry.x=B.lon;this.point.geometry.y=B.lat;this.drawFeature();return false;},mousemove:function(A){if(this.drawing){var B=this.map.getLonLatFromPixel(A.xy);this.point.geometry.x=B.lon;this.point.geometry.y=B.lat;this.point.geometry.clearBounds();this.drawFeature();}return true;},mouseup:function(A){if(this.drawing){this.finalize();return false;}else{return true;}},CLASS_NAME:"OpenLayers.Handler.Point"});OpenLayers.Layer.PointTrack=OpenLayers.Class(OpenLayers.Layer.Vector,{dataFrom:null,initialize:function(B,A){OpenLayers.Layer.Vector.prototype.initialize.apply(this,arguments);},addNodes:function(E){if(E.length<2){OpenLayers.Console.error("At least two point features have to be added to createa line from");return ;}var I=new Array(E.length-1);var F,A,G;for(var C=0;C<E.length;C++){F=E[C];G=F.geometry;if(!G){var D=F.lonlat;G=new OpenLayers.Geometry.Point(D.lon,D.lat);}else{if(G.CLASS_NAME!="OpenLayers.Geometry.Point"){OpenLayers.Console.error("Only features with point geometries are supported.");return ;}}if(C>0){var B=(this.dataFrom!=null)?(E[C+this.dataFrom].data||E[C+this.dataFrom].attributes):null;var H=new OpenLayers.Geometry.LineString([A,G]);I[C-1]=new OpenLayers.Feature.Vector(H,B);}A=G;}this.addFeatures(I);},CLASS_NAME:"OpenLayers.Layer.PointTrack"});OpenLayers.Layer.PointTrack.dataFrom={SOURCE_NODE:-1,TARGET_NODE:0};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 B=0;if(this.components&&(this.components.length>1)){for(var A=1;A<this.components.length;A++){B+=this.components[A-1].distanceTo(this.components[A]);}}return B;},CLASS_NAME:"OpenLayers.Geometry.Curve"});OpenLayers.Geometry.LineString=OpenLayers.Class(OpenLayers.Geometry.Curve,{initialize:function(A){OpenLayers.Geometry.Curve.prototype.initialize.apply(this,arguments);},removeComponent:function(A){if(this.components&&(this.components.length>2)){OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments);}},intersects:function(J){var C=false;var I=J.CLASS_NAME;if(I=="OpenLayers.Geometry.LineString"||I=="OpenLayers.Geometry.LinearRing"||I=="OpenLayers.Geometry.Point"){var L=this.getSortedSegments();var K;if(I=="OpenLayers.Geometry.Point"){K=[{x1:J.x,y1:J.y,x2:J.x,y2:J.y}];}else{K=J.getSortedSegments();}var O,G,E,A,N,M,D,B;outer:for(var H=0;H<L.length;++H){O=L[H];G=O.x1;E=O.x2;A=O.y1;N=O.y2;inner:for(var F=0;F<K.length;++F){M=K[F];if(M.x1>E){break;}if(M.x2<G){continue;}D=M.y1;B=M.y2;if(Math.min(D,B)>Math.max(A,N)){continue;}if(Math.max(D,B)<Math.min(A,N)){continue;}if(OpenLayers.Geometry.segmentsIntersect(O,M)){C=true;break outer;}}}}else{C=J.intersects(this);}return C;},getSortedSegments:function(){var A=this.components.length-1;var B=new Array(A);for(var C=0;C<A;++C){point1=this.components[C];point2=this.components[C+1];if(point1.x<point2.x){B[C]={x1:point1.x,y1:point1.y,x2:point2.x,y2:point2.y};}else{B[C]={x1:point2.x,y1:point2.y,x2:point1.x,y2:point1.y};}}function D(F,E){return F.x1-E.x1;}return B.sort(D);},CLASS_NAME:"OpenLayers.Geometry.LineString"});OpenLayers.Format.KML=OpenLayers.Class(OpenLayers.Format.XML,{kmlns:"http://earth.google.com/kml/2.0",placemarksDesc:"No description available",foldersName:"OpenLayers export",foldersDesc:"Exported on "+new Date(),extractAttributes:true,extractStyles:false,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)};OpenLayers.Format.XML.prototype.initialize.apply(this,[A]);},read:function(B){this.features=[];this.styles={};this.fetched={};var A={depth:this.maxDepth,styleBaseUrl:this.styleBaseUrl};return this.parseData(B,A);},parseData:function(F,B){if(typeof F=="string"){F=OpenLayers.Format.XML.prototype.read.apply(this,[F]);}var D=["Link","NetworkLink","Style","StyleMap","Placemark"];for(var C=0;C<D.length;++C){var E=D[C];var A=this.getElementsByTagNameNS(F,"*",E);if(A.length==0){continue;}switch(E.toLowerCase()){case"link":case"networklink":this.parseLinks(A,B);break;case"style":if(this.extractStyles){this.parseStyles(A,B);}break;case"stylemap":if(this.extractStyles){this.parseStyleMaps(A,B);}break;case"placemark":this.parseFeatures(A,B);break;}}return this.features;},parseLinks:function(B,C){if(C.depth>=this.maxDepth){return false;}var F=OpenLayers.Util.extend({},C);F.depth++;for(var D=0;D<B.length;D++){var A=this.parseProperty(B[D],"*","href");if(A&&!this.fetched[A]){this.fetched[A]=true;var E=this.fetchLink(A);if(E){this.parseData(E,F);}}}},fetchLink:function(A){var B=new OpenLayers.Ajax.Request(A,{method:"get",asynchronous:false});if(B&&B.transport){return B.transport.responseText;}},parseStyles:function(A,B){for(var C=0;C<A.length;C++){var D=this.parseStyle(A[C]);if(D){styleName=(B.styleBaseUrl||"")+"#"+D.id;this.styles[styleName]=D;}}},parseStyle:function(S){var Y={};var M=["LineStyle","PolyStyle","IconStyle","BalloonStyle"];var D,d,F,C;for(var V=0;V<M.length;++V){D=M[V];styleTypeNode=this.getElementsByTagNameNS(S,"*",D)[0];if(!styleTypeNode){continue;}switch(D.toLowerCase()){case"linestyle":var U=this.parseProperty(styleTypeNode,"*","color");if(U){var B=(U.toString()).match(this.regExes.kmlColor);var E=B[1];Y.strokeOpacity=parseInt(E,16)/255;var e=B[2];var a=B[3];var O=B[4];Y.strokeColor="#"+O+a+e;}var R=this.parseProperty(styleTypeNode,"*","width");if(R){Y.strokeWidth=R;}case"polystyle":var U=this.parseProperty(styleTypeNode,"*","color");if(U){var B=(U.toString()).match(this.regExes.kmlColor);var E=B[1];Y.fillOpacity=parseInt(E,16)/255;var e=B[2];var a=B[3];var O=B[4];Y.fillColor="#"+O+a+e;}break;case"iconstyle":var f=this.getElementsByTagNameNS(styleTypeNode,"*","Icon")[0];Y.graphicWidth=32;Y.graphicHeight=32;if(f){var W=this.parseProperty(f,"*","href");if(W){var B=W.match(this.regExes.kmlIconPalette);if(B){var Z=B[1];var P=B[2];var K=this.parseProperty(f,"*","x");var J=this.parseProperty(f,"*","y");var I=K?K/32:0;var H=J?(7-J/32):7;var G=H*8+I;W="http://maps.google.com/mapfiles/kml/pal"+Z+"/icon"+G+P;}var L=this.parseProperty(f,"*","w");if(L){Y.graphicWidth=parseInt(L);}var X=this.parseProperty(f,"*","h");if(X){Y.graphicHeight=parseInt(X);}Y.graphicOpacity=1;Y.externalGraphic=W;}}var N=this.getElementsByTagNameNS(styleTypeNode,"*","hotSpot")[0];if(N){var K=N.getAttribute("x");var J=N.getAttribute("y");var T=N.getAttribute("xunits");if(T=="pixels"){Y.graphicXOffset=parseInt(K);}else{if(T=="insetPixels"){Y.graphicXOffset=Y.graphicWidth-parseInt(K);}else{if(T=="fraction"){Y.graphicXOffset=Y.graphicWidth*parseFloat(K);}}}var c=N.getAttribute("yunits");if(c=="pixels"){Y.graphicYOffset=parseInt(J);}else{if(c=="insetPixels"){Y.graphicYOffset=Y.graphicHeight-parseInt(J);}else{if(c=="fraction"){Y.graphicYOffset=Y.graphicHeight*parseFloat(J);}}}}break;case"balloonstyle":var A=OpenLayers.Util.getXmlNodeValue(styleTypeNode);if(A){Y.balloonStyle=A.replace(this.regExes.straightBracket,"${$1}");}break;default:}}if(!Y.strokeColor&&Y.fillColor){Y.strokeColor=Y.fillColor;}var Q=S.getAttribute("id");if(Q&&Y){Y.id=Q;}return Y;},parseStyleMaps:function(A,J){for(var G=0;G<A.length;G++){var D=A[G];var C=this.getElementsByTagNameNS(D,"*","Pair");var B=D.getAttribute("id");for(var F=0;F<C.length;F++){var E=C[F];var I=this.parseProperty(E,"*","key");var H=this.parseProperty(E,"*","styleUrl");if(H&&I=="normal"){this.styles[(J.styleBaseUrl||"")+"#"+B]=this.styles[(J.styleBaseUrl||"")+H];}if(H&&I=="highlight"){}}}},parseFeatures:function(A,B){var E=new Array(A.length);for(var D=0;D<A.length;D++){var F=A[D];var C=this.parseFeature.apply(this,[F]);if(C){if(this.extractStyles&&C.attributes&&C.attributes.styleUrl){C.style=this.getStyle(C.attributes.styleUrl);}var G=this.getElementsByTagNameNS(F,"*","Style")[0];if(G){var H=this.parseStyle(styleNode);if(H){C.style=OpenLayers.Util.extend({},C.style);OpenLayers.Util.extend(C.style,H);}}E[D]=C;}else{throw"Bad Placemark: "+D;}}this.features=this.features.concat(E);},parseFeature:function(B){var C=["MultiGeometry","Polygon","LineString","Point"];var H,E,I,A;for(var G=0;G<C.length;++G){H=C[G];this.internalns=B.namespaceURI?B.namespaceURI:this.kmlns;E=this.getElementsByTagNameNS(B,this.internalns,H);if(E.length>0){var A=this.parseGeometry[H.toLowerCase()];if(A){I=A.apply(this,[E[0]]);if(this.internalProjection&&this.externalProjection){I.transform(this.externalProjection,this.internalProjection);}}else{OpenLayers.Console.error(OpenLayers.i18n("unsupportedGeometryType",{geomType:H}));}break;}}var F;if(this.extractAttributes){F=this.parseAttributes(B);}var J=new OpenLayers.Feature.Vector(I,F);var D=B.getAttribute("id")||B.getAttribute("name");if(D!=null){J.fid=D;}return J;},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=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.concatChildValues(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(E){var B=this.getElementsByTagNameNS(E,this.internalns,"LinearRing");var F=B.length;var D=new Array(F);if(F>0){var A;for(var C=0;C<B.length;++C){A=this.parseGeometry.linestring.apply(this,[B[C],true]);if(A){D[C]=A;}else{throw"Bad LinearRing geometry: "+C;}}}return new OpenLayers.Geometry.Polygon(D);},multigeometry:function(D){var G,F;var E=[];var B=D.childNodes;for(var A=0;A<B.length;++A){G=B[A];if(G.nodeType==1){var C=(G.prefix)?G.nodeName.split(":")[1]:G.nodeName;var F=this.parseGeometry[C.toLowerCase()];if(F){E.push(F.apply(this,[G]));}}}return new OpenLayers.Geometry.Collection(E);}},parseAttributes:function(D){var E={};var B,I,H;var C=D.childNodes;for(var F=0;F<C.length;++F){B=C[F];if(B.nodeType==1){I=B.childNodes;if(I.length==1||I.length==3){var H;switch(I.length){case 1:H=I[0];break;case 3:default:H=I[1];break;}if(H.nodeType==3||H.nodeType==4){var A=(B.prefix)?B.nodeName.split(":")[1]:B.nodeName;var G=OpenLayers.Util.getXmlNodeValue(H);if(G){G=G.replace(this.regExes.trimSpace,"");E[A]=G;}}}}}return E;},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(C){if(!(C instanceof Array)){C=[C];}var A=this.createElementNS(this.kmlns,"kml");var D=this.createFolderXML();for(var B=0;B<C.length;++B){D.appendChild(this.createPlacemarkXML(C[B]));}A.appendChild(D);return OpenLayers.Format.XML.prototype.write.apply(this,[A]);},createFolderXML:function(){var E=this.createElementNS(this.kmlns,"name");var D=this.createTextNode(this.foldersName);E.appendChild(D);var A=this.createElementNS(this.kmlns,"description");var B=this.createTextNode(this.foldersDesc);A.appendChild(B);var C=this.createElementNS(this.kmlns,"Folder");C.appendChild(E);C.appendChild(A);return C;},createPlacemarkXML:function(E){var G=this.createElementNS(this.kmlns,"name");var C=(E.attributes.name)?E.attributes.name:E.id;G.appendChild(this.createTextNode(C));var D=this.createElementNS(this.kmlns,"description");var F=(E.attributes.description)?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(G){var A=this.createElementNS(this.kmlns,"Polygon");var F=G.components;var D,E,C;for(var B=0;B<F.length;++B){C=(B==0)?"outerBoundaryIs":"innerBoundaryIs";D=this.createElementNS(this.kmlns,C);E=this.buildGeometry.linearring.apply(this,[F[B]]);D.appendChild(E);A.appendChild(D);}return A;},multipolygon:function(A){return this.buildGeometry.collection.apply(this,[A]);},collection:function(C){var A=this.createElementNS(this.kmlns,"MultiGeometry");var D;for(var B=0;B<C.components.length;++B){D=this.buildGeometryNode.apply(this,[C.components[B]]);if(D){A.appendChild(D);}}return A;}},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;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.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(){this.line=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString());this.point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point());},destroyFeature:function(){OpenLayers.Handler.Point.prototype.destroyFeature.apply(this);if(this.line){this.line.destroy();}this.line=null;},addPoint:function(){this.line.geometry.addComponent(this.point.geometry.clone(),this.line.geometry.components.length);this.callback("point",[this.point.geometry]);},freehandMode:function(A){return(this.freehandToggle&&A[this.freehandToggle])?!this.freehand:this.freehand;},modifyFeature:function(){var A=this.line.geometry.components.length-1;this.line.geometry.components[A].x=this.point.geometry.x;this.line.geometry.components[A].y=this.point.geometry.y;this.line.geometry.components[A].clearBounds();},drawFeature:function(){this.layer.drawFeature(this.line,this.style);this.layer.drawFeature(this.point,this.style);},geometryClone:function(){return this.line.geometry.clone();},mousedown:function(A){if(this.lastDown&&this.lastDown.equals(A.xy)){return false;}if(this.lastDown==null){this.createFeature();}this.mouseDown=true;this.lastDown=A.xy;var B=this.control.map.getLonLatFromPixel(A.xy);this.point.geometry.x=B.lon;this.point.geometry.y=B.lat;if((this.lastUp==null)||!this.lastUp.equals(A.xy)){this.addPoint();}this.drawFeature();this.drawing=true;return false;},mousemove:function(A){if(this.drawing){var B=this.map.getLonLatFromPixel(A.xy);this.point.geometry.x=B.lon;this.point.geometry.y=B.lat;if(this.mouseDown&&this.freehandMode(A)){this.addPoint();}else{this.modifyFeature();}this.drawFeature();}return true;},mouseup:function(A){this.mouseDown=false;if(this.drawing){if(this.freehandMode(A)){this.finalize();}else{if(this.lastUp==null){this.addPoint();}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.finalize();}return false;},CLASS_NAME:"OpenLayers.Handler.Path"});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(){this.polygon=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon());this.line=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LinearRing());this.polygon.geometry.addComponent(this.line.geometry);this.point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point());},destroyFeature:function(){OpenLayers.Handler.Path.prototype.destroyFeature.apply(this);if(this.polygon){this.polygon.destroy();}this.polygon=null;},modifyFeature:function(){var A=this.line.geometry.components.length-2;this.line.geometry.components[A].x=this.point.geometry.x;this.line.geometry.components[A].y=this.point.geometry.y;this.line.geometry.components[A].clearBounds();},drawFeature:function(){this.layer.drawFeature(this.polygon,this.style);this.layer.drawFeature(this.point,this.style);},geometryClone:function(){return this.polygon.geometry.clone();},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.finalize();}return false;},CLASS_NAME:"OpenLayers.Handler.Polygon"});OpenLayers.Control.EditingToolbar=OpenLayers.Class(OpenLayers.Control.Panel,{initialize:function(D,B){OpenLayers.Control.Panel.prototype.initialize.apply(this,[B]);this.addControls([new OpenLayers.Control.Navigation()]);var A=[new OpenLayers.Control.DrawFeature(D,OpenLayers.Handler.Point,{displayClass:"olControlDrawFeaturePoint"}),new OpenLayers.Control.DrawFeature(D,OpenLayers.Handler.Path,{displayClass:"olControlDrawFeaturePath"}),new OpenLayers.Control.DrawFeature(D,OpenLayers.Handler.Polygon,{displayClass:"olControlDrawFeaturePolygon"})];for(var C=0;C<A.length;C++){A[C].featureAdded=function(E){E.state=OpenLayers.State.INSERT;};}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"});
