var OpenLayers={singleFile:true};(function(){var G=(typeof OpenLayers=="object"&&OpenLayers.singleFile);window.OpenLayers={_scriptName:(!G)?"lib/OpenLayers.js":"OpenLayers.js",_getScriptLocation:function(){var O="";var Q=new RegExp("(^|(.*?\\/))("+OpenLayers._scriptName+")(\\?|$)");var L=document.getElementsByTagName("script");for(var N=0,K=L.length;N<K;N++){var P=L[N].getAttribute("src");if(P){var M=P.match(Q);if(M){O=M[1];break}}}return O}};if(!G){var H=new Array("OpenLayers/Util.js","OpenLayers/BaseTypes.js","OpenLayers/BaseTypes/Class.js","OpenLayers/BaseTypes/Bounds.js","OpenLayers/BaseTypes/Element.js","OpenLayers/BaseTypes/LonLat.js","OpenLayers/BaseTypes/Pixel.js","OpenLayers/BaseTypes/Size.js","OpenLayers/Console.js","OpenLayers/Tween.js","Rico/Corner.js","Rico/Color.js","OpenLayers/Ajax.js","OpenLayers/Events.js","OpenLayers/Request.js","OpenLayers/Request/XMLHttpRequest.js","OpenLayers/Projection.js","OpenLayers/Map.js","OpenLayers/Layer.js","OpenLayers/Icon.js","OpenLayers/Marker.js","OpenLayers/Marker/Box.js","OpenLayers/Popup.js","OpenLayers/Tile.js","OpenLayers/Tile/Image.js","OpenLayers/Tile/WFS.js","OpenLayers/Layer/Image.js","OpenLayers/Layer/SphericalMercator.js","OpenLayers/Layer/EventPane.js","OpenLayers/Layer/FixedZoomLevels.js","OpenLayers/Layer/Google.js","OpenLayers/Layer/VirtualEarth.js","OpenLayers/Layer/Yahoo.js","OpenLayers/Layer/HTTPRequest.js","OpenLayers/Layer/Grid.js","OpenLayers/Layer/MapGuide.js","OpenLayers/Layer/MapServer.js","OpenLayers/Layer/MapServer/Untiled.js","OpenLayers/Layer/KaMap.js","OpenLayers/Layer/KaMapCache.js","OpenLayers/Layer/MultiMap.js","OpenLayers/Layer/Markers.js","OpenLayers/Layer/Text.js","OpenLayers/Layer/WorldWind.js","OpenLayers/Layer/ArcGIS93Rest.js","OpenLayers/Layer/WMS.js","OpenLayers/Layer/WMS/Untiled.js","OpenLayers/Layer/ArcIMS.js","OpenLayers/Layer/GeoRSS.js","OpenLayers/Layer/Boxes.js","OpenLayers/Layer/XYZ.js","OpenLayers/Layer/TMS.js","OpenLayers/Layer/TileCache.js","OpenLayers/Popup/Anchored.js","OpenLayers/Popup/AnchoredBubble.js","OpenLayers/Popup/Framed.js","OpenLayers/Popup/FramedCloud.js","OpenLayers/Feature.js","OpenLayers/Feature/Vector.js","OpenLayers/Feature/WFS.js","OpenLayers/Handler.js","OpenLayers/Handler/Click.js","OpenLayers/Handler/Hover.js","OpenLayers/Handler/Point.js","OpenLayers/Handler/Path.js","OpenLayers/Handler/Polygon.js","OpenLayers/Handler/Feature.js","OpenLayers/Handler/Drag.js","OpenLayers/Handler/RegularPolygon.js","OpenLayers/Handler/Box.js","OpenLayers/Handler/MouseWheel.js","OpenLayers/Handler/Keyboard.js","OpenLayers/Control.js","OpenLayers/Control/Attribution.js","OpenLayers/Control/Button.js","OpenLayers/Control/ZoomBox.js","OpenLayers/Control/ZoomToMaxExtent.js","OpenLayers/Control/DragPan.js","OpenLayers/Control/Navigation.js","OpenLayers/Control/MouseDefaults.js","OpenLayers/Control/MousePosition.js","OpenLayers/Control/OverviewMap.js","OpenLayers/Control/KeyboardDefaults.js","OpenLayers/Control/PanZoom.js","OpenLayers/Control/PanZoomBar.js","OpenLayers/Control/ArgParser.js","OpenLayers/Control/Permalink.js","OpenLayers/Control/Scale.js","OpenLayers/Control/ScaleLine.js","OpenLayers/Control/Snapping.js","OpenLayers/Control/Split.js","OpenLayers/Control/LayerSwitcher.js","OpenLayers/Control/DrawFeature.js","OpenLayers/Control/DragFeature.js","OpenLayers/Control/ModifyFeature.js","OpenLayers/Control/Panel.js","OpenLayers/Control/SelectFeature.js","OpenLayers/Control/NavigationHistory.js","OpenLayers/Control/Measure.js","OpenLayers/Control/WMSGetFeatureInfo.js","OpenLayers/Geometry.js","OpenLayers/Geometry/Rectangle.js","OpenLayers/Geometry/Collection.js","OpenLayers/Geometry/Point.js","OpenLayers/Geometry/MultiPoint.js","OpenLayers/Geometry/Curve.js","OpenLayers/Geometry/LineString.js","OpenLayers/Geometry/LinearRing.js","OpenLayers/Geometry/Polygon.js","OpenLayers/Geometry/MultiLineString.js","OpenLayers/Geometry/MultiPolygon.js","OpenLayers/Geometry/Surface.js","OpenLayers/Renderer.js","OpenLayers/Renderer/Elements.js","OpenLayers/Renderer/SVG.js","OpenLayers/Renderer/Canvas.js","OpenLayers/Renderer/VML.js","OpenLayers/Layer/Vector.js","OpenLayers/Layer/Vector/RootContainer.js","OpenLayers/Strategy.js","OpenLayers/Strategy/Fixed.js","OpenLayers/Strategy/Cluster.js","OpenLayers/Strategy/Paging.js","OpenLayers/Strategy/BBOX.js","OpenLayers/Strategy/Save.js","OpenLayers/Protocol.js","OpenLayers/Protocol/HTTP.js","OpenLayers/Protocol/SQL.js","OpenLayers/Protocol/SQL/Gears.js","OpenLayers/Protocol/WFS.js","OpenLayers/Protocol/WFS/v1.js","OpenLayers/Protocol/WFS/v1_0_0.js","OpenLayers/Protocol/WFS/v1_1_0.js","OpenLayers/Layer/PointTrack.js","OpenLayers/Layer/GML.js","OpenLayers/Style.js","OpenLayers/StyleMap.js","OpenLayers/Rule.js","OpenLayers/Filter.js","OpenLayers/Filter/FeatureId.js","OpenLayers/Filter/Logical.js","OpenLayers/Filter/Comparison.js","OpenLayers/Filter/Spatial.js","OpenLayers/Format.js","OpenLayers/Format/XML.js","OpenLayers/Format/ArcXML.js","OpenLayers/Format/ArcXML/Features.js","OpenLayers/Format/GML.js","OpenLayers/Format/GML/Base.js","OpenLayers/Format/GML/v2.js","OpenLayers/Format/GML/v3.js","OpenLayers/Format/KML.js","OpenLayers/Format/GeoRSS.js","OpenLayers/Format/WFS.js","OpenLayers/Format/WFSCapabilities.js","OpenLayers/Format/WFSCapabilities/v1.js","OpenLayers/Format/WFSCapabilities/v1_0_0.js","OpenLayers/Format/WFSCapabilities/v1_1_0.js","OpenLayers/Format/WFSDescribeFeatureType.js","OpenLayers/Format/WMSDescribeLayer.js","OpenLayers/Format/WMSDescribeLayer/v1_1.js","OpenLayers/Format/WKT.js","OpenLayers/Format/OSM.js","OpenLayers/Format/GPX.js","OpenLayers/Format/Filter.js","OpenLayers/Format/Filter/v1.js","OpenLayers/Format/Filter/v1_0_0.js","OpenLayers/Format/Filter/v1_1_0.js","OpenLayers/Format/SLD.js","OpenLayers/Format/SLD/v1.js","OpenLayers/Format/SLD/v1_0_0.js","OpenLayers/Format/SLD/v1.js","OpenLayers/Format/WFST.js","OpenLayers/Format/WFST/v1.js","OpenLayers/Format/WFST/v1_0_0.js","OpenLayers/Format/WFST/v1_1_0.js","OpenLayers/Format/Text.js","OpenLayers/Format/JSON.js","OpenLayers/Format/GeoJSON.js","OpenLayers/Format/WMC.js","OpenLayers/Format/WMC/v1.js","OpenLayers/Format/WMC/v1_0_0.js","OpenLayers/Format/WMC/v1_1_0.js","OpenLayers/Format/WMSCapabilities.js","OpenLayers/Format/WMSCapabilities/v1_1.js","OpenLayers/Format/WMSCapabilities/v1_1_0.js","OpenLayers/Format/WMSCapabilities/v1_1_1.js","OpenLayers/Format/WMSGetFeatureInfo.js","OpenLayers/Layer/WFS.js","OpenLayers/Control/GetFeature.js","OpenLayers/Control/MouseToolbar.js","OpenLayers/Control/NavToolbar.js","OpenLayers/Control/PanPanel.js","OpenLayers/Control/Pan.js","OpenLayers/Control/ZoomIn.js","OpenLayers/Control/ZoomOut.js","OpenLayers/Control/ZoomPanel.js","OpenLayers/Control/EditingToolbar.js","OpenLayers/Lang.js","OpenLayers/Lang/en.js");var B=navigator.userAgent;var D=(B.match("MSIE")||B.match("Safari"));if(D){var A=new Array(H.length)}var I=OpenLayers._getScriptLocation()+"lib/";for(var C=0,F=H.length;C<F;C++){if(D){A[C]="<script src='"+I+H[C]+"'><\/script>"}else{var J=document.createElement("script");J.src=I+H[C];var E=document.getElementsByTagName("head").length?document.getElementsByTagName("head")[0]:document.body;E.appendChild(J)}}if(D){document.write(A.join(""))}}})();OpenLayers.VERSION_NUMBER="OpenLayers 2.8 -- $Revision: 126428 $";OpenLayers.String={startsWith:function(B,A){return(B.indexOf(A)==0)},contains:function(B,A){return(B.indexOf(A)!=-1)},trim:function(A){return A.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},camelize:function(F){var D=F.split("-");var B=D[0];for(var C=1,A=D.length;C<A;C++){var E=D[C];B+=E.charAt(0).toUpperCase()+E.substring(1)}return B},format:function(D,C,A){if(!C){C=window}var B=function(I,E){var H;var G=E.split(/\.+/);for(var F=0;F<G.length;F++){if(F==0){H=C}H=H[G[F]]}if(typeof H=="function"){H=A?H.apply(null,A):H()}if(typeof H=="undefined"){return"undefined"}else{return H}};return D.replace(OpenLayers.String.tokenRegEx,B)},tokenRegEx:/\$\{([\w.]+?)\}/g,numberRegEx:/^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/,isNumeric:function(A){return OpenLayers.String.numberRegEx.test(A)},numericIf:function(A){return OpenLayers.String.isNumeric(A)?parseFloat(A):A}};if(!String.prototype.startsWith){String.prototype.startsWith=function(A){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.String.startsWith"}));return OpenLayers.String.startsWith(this,A)}}if(!String.prototype.contains){String.prototype.contains=function(A){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.String.contains"}));return OpenLayers.String.contains(this,A)}}if(!String.prototype.trim){String.prototype.trim=function(){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.String.trim"}));return OpenLayers.String.trim(this)}}if(!String.prototype.camelize){String.prototype.camelize=function(){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.String.camelize"}));return OpenLayers.String.camelize(this)}}OpenLayers.Number={decimalSeparator:".",thousandsSeparator:",",limitSigDigs:function(A,C){var B=0;if(C>0){B=parseFloat(A.toPrecision(C))}return B},format:function(C,A,G,I){A=(typeof A!="undefined")?A:0;G=(typeof G!="undefined")?G:OpenLayers.Number.thousandsSeparator;I=(typeof I!="undefined")?I:OpenLayers.Number.decimalSeparator;if(A!=null){C=parseFloat(C.toFixed(A))}var B=C.toString().split(".");if(B.length==1&&A==null){A=0}var D=B[0];if(G){var E=/(-?[0-9]+)([0-9]{3})/;while(E.test(D)){D=D.replace(E,"$1"+G+"$2")}}var F;if(A==0){F=D}else{var H=B.length>1?B[1]:"0";if(A!=null){H=H+new Array(A-H.length+1).join("0")}F=D+I+H}return F}};if(!Number.prototype.limitSigDigs){Number.prototype.limitSigDigs=function(A){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.Number.limitSigDigs"}));return OpenLayers.Number.limitSigDigs(this,A)}}OpenLayers.Function={bind:function(C,B){var A=Array.prototype.slice.apply(arguments,[2]);return function(){var D=A.concat(Array.prototype.slice.apply(arguments,[0]));return C.apply(B,D)}},bindAsEventListener:function(B,A){return function(C){return B.call(A,C||window.event)}}};if(!Function.prototype.bind){Function.prototype.bind=function(){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.Function.bind"}));Array.prototype.unshift.apply(arguments,[this]);return OpenLayers.Function.bind.apply(null,arguments)}}if(!Function.prototype.bindAsEventListener){Function.prototype.bindAsEventListener=function(A){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.Function.bindAsEventListener"}));return OpenLayers.Function.bindAsEventListener(this,A)}}OpenLayers.Array={filter:function(G,F,B){var D=[];if(Array.prototype.filter){D=G.filter(F,B)}else{var A=G.length;if(typeof F!="function"){throw new TypeError()}for(var C=0;C<A;C++){if(C in G){var E=G[C];if(F.call(B,E,C,G)){D.push(E)}}}}return D}};OpenLayers.Class=function(){var D=function(){if(arguments&&arguments[0]!=OpenLayers.Class.isPrototype){this.initialize.apply(this,arguments)}};var C={};var F,B;for(var E=0,A=arguments.length;E<A;++E){if(typeof arguments[E]=="function"){if(E==0&&A>1){B=arguments[E].prototype.initialize;arguments[E].prototype.initialize=function(){};C=new arguments[E];if(B===undefined){delete arguments[E].prototype.initialize}else{arguments[E].prototype.initialize=B}}F=arguments[E].prototype}else{F=arguments[E]}OpenLayers.Util.extend(C,F)}D.prototype=C;return D};OpenLayers.Class.isPrototype=function(){};OpenLayers.Class.create=function(){return function(){if(arguments&&arguments[0]!=OpenLayers.Class.isPrototype){this.initialize.apply(this,arguments)}}};OpenLayers.Class.inherit=function(){var D=arguments[0];var E=new D(OpenLayers.Class.isPrototype);for(var C=1,A=arguments.length;C<A;C++){if(typeof arguments[C]=="function"){var B=arguments[C];arguments[C]=new B(OpenLayers.Class.isPrototype)}OpenLayers.Util.extend(E,arguments[C])}return E};OpenLayers.Util={};OpenLayers.Util.getElement=function(){var D=[];for(var C=0,A=arguments.length;C<A;C++){var B=arguments[C];if(typeof B=="string"){B=document.getElementById(B)}if(arguments.length==1){return B}D.push(B)}return D};if(typeof window.$==="undefined"){window.$=OpenLayers.Util.getElement}OpenLayers.Util.extend=function(A,E){A=A||{};if(E){for(var D in E){var C=E[D];if(C!==undefined){A[D]=C}}var B=typeof window.Event=="function"&&E instanceof window.Event;if(!B&&E.hasOwnProperty&&E.hasOwnProperty("toString")){A.toString=E.toString}}return A};OpenLayers.Util.removeItem=function(C,B){for(var A=C.length-1;A>=0;A--){if(C[A]==B){C.splice(A,1)}}return C};OpenLayers.Util.clearArray=function(A){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"array = []"}));A.length=0};OpenLayers.Util.indexOf=function(D,C){for(var B=0,A=D.length;B<A;B++){if(D[B]==C){return B}}return -1};OpenLayers.Util.modifyDOMElement=function(E,H,D,F,A,C,G,B){if(H){E.id=H}if(D){E.style.left=D.x+"px";E.style.top=D.y+"px"}if(F){E.style.width=F.w+"px";E.style.height=F.h+"px"}if(A){E.style.position=A}if(C){E.style.border=C}if(G){E.style.overflow=G}if(parseFloat(B)>=0&&parseFloat(B)<1){E.style.filter="alpha(opacity="+(B*100)+")";E.style.opacity=B}else{if(parseFloat(B)==1){E.style.filter="";E.style.opacity=""}}};OpenLayers.Util.createDiv=function(A,I,H,F,E,C,B,G){var D=document.createElement("div");if(F){D.style.backgroundImage="url("+F+")"}if(!A){A=OpenLayers.Util.createUniqueID("OpenLayersDiv")}if(!E){E="absolute"}OpenLayers.Util.modifyDOMElement(D,A,I,H,E,C,B,G);return D};OpenLayers.Util.createImage=function(A,H,G,E,D,C,F,I){var B=document.createElement("img");if(!A){A=OpenLayers.Util.createUniqueID("OpenLayersDiv")}if(!D){D="relative"}OpenLayers.Util.modifyDOMElement(B,A,H,G,D,C,null,F);if(I){B.style.display="none";OpenLayers.Event.observe(B,"load",OpenLayers.Function.bind(OpenLayers.Util.onImageLoad,B));OpenLayers.Event.observe(B,"error",OpenLayers.Function.bind(OpenLayers.Util.onImageLoadError,B))}B.style.alt=A;B.galleryImg="no";if(E){B.src=E}return B};OpenLayers.Util.setOpacity=function(B,A){OpenLayers.Util.modifyDOMElement(B,null,null,null,null,null,null,A)};OpenLayers.Util.onImageLoad=function(){if(!this.viewRequestID||(this.map&&this.viewRequestID==this.map.viewRequestID)){this.style.backgroundColor="transparent";this.style.display=""}};OpenLayers.Util.onImageLoadErrorColor="pink";OpenLayers.IMAGE_RELOAD_ATTEMPTS=0;OpenLayers.Util.onImageLoadError=function(){this._attempts=(this._attempts)?(this._attempts+1):1;if(this._attempts<=OpenLayers.IMAGE_RELOAD_ATTEMPTS){var D=this.urls;if(D&&D instanceof Array&&D.length>1){var E=this.src.toString();var C,A;for(A=0;C=D[A];A++){if(E.indexOf(C)!=-1){break}}var F=Math.floor(D.length*Math.random());var B=D[F];A=0;while(B==C&&A++<4){F=Math.floor(D.length*Math.random());B=D[F]}this.src=E.replace(C,B)}else{this.src=this.src}}else{this.style.backgroundColor=OpenLayers.Util.onImageLoadErrorColor}this.style.display=""};OpenLayers.Util.alphaHackNeeded=null;OpenLayers.Util.alphaHack=function(){if(OpenLayers.Util.alphaHackNeeded==null){var D=navigator.appVersion.split("MSIE");var A=parseFloat(D[1]);var B=false;try{B=!!(document.body.filters)}catch(C){}OpenLayers.Util.alphaHackNeeded=(B&&(A>=5.5)&&(A<7))}return OpenLayers.Util.alphaHackNeeded};OpenLayers.Util.modifyAlphaImageDiv=function(A,B,J,I,G,F,C,D,H){OpenLayers.Util.modifyDOMElement(A,B,J,I,F,null,null,H);var E=A.childNodes[0];if(G){E.src=G}OpenLayers.Util.modifyDOMElement(E,A.id+"_innerImage",null,I,"relative",C);if(OpenLayers.Util.alphaHack()){if(A.style.display!="none"){A.style.display="inline-block"}if(D==null){D="scale"}A.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+E.src+"', sizingMethod='"+D+"')";if(parseFloat(A.style.opacity)>=0&&parseFloat(A.style.opacity)<1){A.style.filter+=" alpha(opacity="+A.style.opacity*100+")"}E.style.filter="alpha(opacity=0)"}};OpenLayers.Util.createAlphaImageDiv=function(B,J,I,G,F,C,D,H,K){var A=OpenLayers.Util.createDiv();var E=OpenLayers.Util.createImage(null,null,null,null,null,null,null,false);A.appendChild(E);if(K){E.style.display="none";OpenLayers.Event.observe(E,"load",OpenLayers.Function.bind(OpenLayers.Util.onImageLoad,A));OpenLayers.Event.observe(E,"error",OpenLayers.Function.bind(OpenLayers.Util.onImageLoadError,A))}OpenLayers.Util.modifyAlphaImageDiv(A,B,J,I,G,F,C,D,H);return A};OpenLayers.Util.upperCaseObject=function(B){var A={};for(var C in B){A[C.toUpperCase()]=B[C]}return A};OpenLayers.Util.applyDefaults=function(D,C){D=D||{};var B=typeof window.Event=="function"&&C instanceof window.Event;for(var A in C){if(D[A]===undefined||(!B&&C.hasOwnProperty&&C.hasOwnProperty(A)&&!D.hasOwnProperty(A))){D[A]=C[A]}}if(!B&&C&&C.hasOwnProperty&&C.hasOwnProperty("toString")&&!D.hasOwnProperty("toString")){D.toString=C.toString}return D};OpenLayers.Util.getParameterString=function(H){var G=[];for(var C in H){var E=H[C];if((E!=null)&&(typeof E!="function")){var B;if(typeof E=="object"&&E.constructor==Array){var F=[];for(var D=0,A=E.length;D<A;D++){F.push(encodeURIComponent(E[D]))}B=F.join(",")}else{B=encodeURIComponent(E)}G.push(encodeURIComponent(C)+"="+B)}}return G.join("&")};OpenLayers.ImgPath="";OpenLayers.Util.getImagesLocation=function(){return OpenLayers.ImgPath||(OpenLayers._getScriptLocation()+"img/")};OpenLayers.Util.Try=function(){var D=null;for(var C=0,A=arguments.length;C<A;C++){var B=arguments[C];try{D=B();break}catch(E){}}return D};OpenLayers.Util.getNodes=function(C,B){var A=OpenLayers.Util.Try(function(){return OpenLayers.Util._getNodes(C.documentElement.childNodes,B)},function(){return OpenLayers.Util._getNodes(C.childNodes,B)});return A};OpenLayers.Util._getNodes=function(C,E){var B=[];for(var D=0,A=C.length;D<A;D++){if(C[D].nodeName==E){B.push(C[D])}}return B};OpenLayers.Util.getTagText=function(C,D,B){var A=OpenLayers.Util.getNodes(C,D);if(A&&(A.length>0)){if(!B){B=0}if(A[B].childNodes.length>1){return A.childNodes[1].nodeValue}else{if(A[B].childNodes.length==1){return A[B].firstChild.nodeValue}}}else{return""}};OpenLayers.Util.getXmlNodeValue=function(A){var B=null;OpenLayers.Util.Try(function(){B=A.text;if(!B){B=A.textContent}if(!B){B=A.firstChild.nodeValue}},function(){B=A.textContent});return B};OpenLayers.Util.mouseLeft=function(A,C){var B=(A.relatedTarget)?A.relatedTarget:A.toElement;while(B!=C&&B!=null){B=B.parentNode}return(B!=C)};OpenLayers.Util.DEFAULT_PRECISION=14;OpenLayers.Util.toFloat=function(B,A){if(A==null){A=OpenLayers.Util.DEFAULT_PRECISION}var B;if(A==0){B=parseFloat(B)}else{B=parseFloat(parseFloat(B).toPrecision(A))}return B};OpenLayers.Util.rad=function(A){return A*Math.PI/180};OpenLayers.Util.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;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 M={};var D=A.split(/[&;]/);for(var H=0,I=D.length;H<I;++H){var G=D[H].split("=");if(G[0]){var K=decodeURIComponent(G[0]);var J=G[1]||"";J=J.split(",");for(var F=0,L=J.length;F<L;F++){J[F]=decodeURIComponent(J[F])}if(J.length==1){J=J[0]}M[K]=J}}return M};OpenLayers.Util.getArgs=function(A){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.Util.getParameters"}));return OpenLayers.Util.getParameters(A)};OpenLayers.Util.lastSeqID=0;OpenLayers.Util.createUniqueID=function(A){if(A==null){A="id_"}OpenLayers.Util.lastSeqID+=1;return A+OpenLayers.Util.lastSeqID};OpenLayers.INCHES_PER_UNIT={inches:1,ft:12,mi:63360,m:39.3701,km:39370.1,dd:4374754,yd:36};OpenLayers.INCHES_PER_UNIT["in"]=OpenLayers.INCHES_PER_UNIT.inches;OpenLayers.INCHES_PER_UNIT.degrees=OpenLayers.INCHES_PER_UNIT.dd;OpenLayers.INCHES_PER_UNIT.nmi=1852*OpenLayers.INCHES_PER_UNIT.m;OpenLayers.METERS_PER_INCH=0.0254000508001016;OpenLayers.Util.extend(OpenLayers.INCHES_PER_UNIT,{Inch:OpenLayers.INCHES_PER_UNIT.inches,Meter:1/OpenLayers.METERS_PER_INCH,Foot:0.3048006096012192/OpenLayers.METERS_PER_INCH,IFoot:0.3048/OpenLayers.METERS_PER_INCH,ClarkeFoot:0.3047972651151/OpenLayers.METERS_PER_INCH,SearsFoot:0.30479947153867626/OpenLayers.METERS_PER_INCH,GoldCoastFoot:0.3047997101815088/OpenLayers.METERS_PER_INCH,IInch:0.0254/OpenLayers.METERS_PER_INCH,MicroInch:0.0000254/OpenLayers.METERS_PER_INCH,Mil:2.54e-8/OpenLayers.METERS_PER_INCH,Centimeter:0.01/OpenLayers.METERS_PER_INCH,Kilometer:1000/OpenLayers.METERS_PER_INCH,Yard:0.9144018288036576/OpenLayers.METERS_PER_INCH,SearsYard:0.914398414616029/OpenLayers.METERS_PER_INCH,IndianYard:0.9143985307444408/OpenLayers.METERS_PER_INCH,IndianYd37:0.91439523/OpenLayers.METERS_PER_INCH,IndianYd62:0.9143988/OpenLayers.METERS_PER_INCH,IndianYd75:0.9143985/OpenLayers.METERS_PER_INCH,IndianFoot:0.30479951/OpenLayers.METERS_PER_INCH,IndianFt37:0.30479841/OpenLayers.METERS_PER_INCH,IndianFt62:0.3047996/OpenLayers.METERS_PER_INCH,IndianFt75:0.3047995/OpenLayers.METERS_PER_INCH,Mile:1609.3472186944373/OpenLayers.METERS_PER_INCH,IYard:0.9144/OpenLayers.METERS_PER_INCH,IMile:1609.344/OpenLayers.METERS_PER_INCH,NautM:1852/OpenLayers.METERS_PER_INCH,"Lat-66":110943.31648893273/OpenLayers.METERS_PER_INCH,"Lat-83":110946.25736872235/OpenLayers.METERS_PER_INCH,Decimeter:0.1/OpenLayers.METERS_PER_INCH,Millimeter:0.001/OpenLayers.METERS_PER_INCH,Dekameter:10/OpenLayers.METERS_PER_INCH,Decameter:10/OpenLayers.METERS_PER_INCH,Hectometer:100/OpenLayers.METERS_PER_INCH,GermanMeter:1.0000135965/OpenLayers.METERS_PER_INCH,CaGrid:0.999738/OpenLayers.METERS_PER_INCH,ClarkeChain:20.1166194976/OpenLayers.METERS_PER_INCH,GunterChain:20.11684023368047/OpenLayers.METERS_PER_INCH,BenoitChain:20.116782494375872/OpenLayers.METERS_PER_INCH,SearsChain:20.11676512155/OpenLayers.METERS_PER_INCH,ClarkeLink:0.201166194976/OpenLayers.METERS_PER_INCH,GunterLink:0.2011684023368047/OpenLayers.METERS_PER_INCH,BenoitLink:0.20116782494375873/OpenLayers.METERS_PER_INCH,SearsLink:0.2011676512155/OpenLayers.METERS_PER_INCH,Rod:5.02921005842012/OpenLayers.METERS_PER_INCH,IntnlChain:20.1168/OpenLayers.METERS_PER_INCH,IntnlLink:0.201168/OpenLayers.METERS_PER_INCH,Perch:5.02921005842012/OpenLayers.METERS_PER_INCH,Pole:5.02921005842012/OpenLayers.METERS_PER_INCH,Furlong:201.1684023368046/OpenLayers.METERS_PER_INCH,Rood:3.778266898/OpenLayers.METERS_PER_INCH,CapeFoot:0.3047972615/OpenLayers.METERS_PER_INCH,Brealey:375/OpenLayers.METERS_PER_INCH,ModAmFt:0.304812252984506/OpenLayers.METERS_PER_INCH,Fathom:1.8288/OpenLayers.METERS_PER_INCH,"NautM-UK":1853.184/OpenLayers.METERS_PER_INCH,"50kilometers":50000/OpenLayers.METERS_PER_INCH,"150kilometers":150000/OpenLayers.METERS_PER_INCH});OpenLayers.Util.extend(OpenLayers.INCHES_PER_UNIT,{mm:OpenLayers.INCHES_PER_UNIT.Meter/1000,cm:OpenLayers.INCHES_PER_UNIT.Meter/100,dm:OpenLayers.INCHES_PER_UNIT.Meter*100,km:OpenLayers.INCHES_PER_UNIT.Meter*1000,kmi:OpenLayers.INCHES_PER_UNIT.nmi,fath:OpenLayers.INCHES_PER_UNIT.Fathom,ch:OpenLayers.INCHES_PER_UNIT.IntnlChain,link:OpenLayers.INCHES_PER_UNIT.IntnlLink,"us-in":OpenLayers.INCHES_PER_UNIT.inches,"us-ft":OpenLayers.INCHES_PER_UNIT.Foot,"us-yd":OpenLayers.INCHES_PER_UNIT.Yard,"us-ch":OpenLayers.INCHES_PER_UNIT.GunterChain,"us-mi":OpenLayers.INCHES_PER_UNIT.Mile,"ind-yd":OpenLayers.INCHES_PER_UNIT.IndianYd37,"ind-ft":OpenLayers.INCHES_PER_UNIT.IndianFt37,"ind-ch":20.11669506/OpenLayers.METERS_PER_INCH});OpenLayers.DOTS_PER_INCH=72;OpenLayers.Util.normalizeScale=function(B){var A=(B>1)?(1/B):B;return A};OpenLayers.Util.getResolutionFromScale=function(D,A){if(A==null){A="degrees"}var C=OpenLayers.Util.normalizeScale(D);var B=1/(C*OpenLayers.INCHES_PER_UNIT[A]*OpenLayers.DOTS_PER_INCH);return B};OpenLayers.Util.getScaleFromResolution=function(B,A){if(A==null){A="degrees"}var C=B*OpenLayers.INCHES_PER_UNIT[A]*OpenLayers.DOTS_PER_INCH;return C};OpenLayers.Util.safeStopPropagation=function(A){OpenLayers.Event.stop(A,true)};OpenLayers.Util.pagePosition=function(E){var A=0,D=0;var B=E;var F=E;while(B){if(B==document.body){if(OpenLayers.Element.getStyle(F,"position")=="absolute"){break}}A+=B.offsetTop||0;D+=B.offsetLeft||0;F=B;try{B=B.offsetParent}catch(C){OpenLayers.Console.error(OpenLayers.i18n("pagePositionFailed",{elemId:B.id}));break}}B=E;while(B){A-=B.scrollTop||0;D-=B.scrollLeft||0;B=B.parentNode}return[D,A]};OpenLayers.Util.isEquivalentUrl=function(F,E,C){C=C||{};OpenLayers.Util.applyDefaults(C,{ignoreCase:true,ignorePort80:true,ignoreHash:true});var B=OpenLayers.Util.createUrlObject(F,C);var A=OpenLayers.Util.createUrlObject(E,C);for(var D in B){if(D!=="args"){if(B[D]!=A[D]){return false}}}for(var D in B.args){if(B.args[D]!=A.args[D]){return false}delete A.args[D]}for(var D in A.args){return false}return true};OpenLayers.Util.createUrlObject=function(B,J){J=J||{};if(!(/^\w+:\/\//).test(B)){var F=window.location;var D=F.port?":"+F.port:"";var G=F.protocol+"//"+F.host.split(":").shift()+D;if(B.indexOf("/")===0){B=G+B}else{var E=F.pathname.split("/");E.pop();B=G+E.join("/")+"/"+B}}if(J.ignoreCase){B=B.toLowerCase()}var H=document.createElement("a");H.href=B;var C={};C.host=H.host.split(":").shift();C.protocol=H.protocol;if(J.ignorePort80){C.port=(H.port=="80"||H.port=="0")?"":H.port}else{C.port=(H.port==""||H.port=="0")?"80":H.port}C.hash=(J.ignoreHash||H.hash==="#")?"":H.hash;var A=H.search;if(!A){var I=B.indexOf("?");A=(I!=-1)?B.substr(I):""}C.args=OpenLayers.Util.getParameters(A);C.pathname=(H.pathname.charAt(0)=="/")?H.pathname:"/"+H.pathname;return C};OpenLayers.Util.removeTail=function(B){var C=null;var A=B.indexOf("?");var D=B.indexOf("#");if(A==-1){C=(D!=-1)?B.substr(0,D):B}else{C=(D!=-1)?B.substr(0,Math.min(A,D)):B.substr(0,A)}return C};OpenLayers.Util.getBrowserName=function(){var B="";var A=navigator.userAgent.toLowerCase();if(A.indexOf("opera")!=-1){B="opera"}else{if(A.indexOf("msie")!=-1){B="msie"}else{if(A.indexOf("safari")!=-1){B="safari"}else{if(A.indexOf("mozilla")!=-1){if(A.indexOf("firefox")!=-1){B="firefox"}else{B="mozilla"}}}}}return B};OpenLayers.Util.getRenderedDimensions=function(B,L,M){var I,E;var A=document.createElement("div");A.style.visibility="hidden";var K=(M&&M.containerElement)?M.containerElement:document.body;if(L){if(L.w){I=L.w;A.style.width=I+"px"}else{if(L.h){E=L.h;A.style.height=E+"px"}}}if(M&&M.displayClass){A.className=M.displayClass}var F=document.createElement("div");F.innerHTML=B;F.style.overflow="visible";if(F.childNodes){for(var D=0,C=F.childNodes.length;D<C;D++){if(!F.childNodes[D].style){continue}F.childNodes[D].style.overflow="visible"}}A.appendChild(F);K.appendChild(A);var J=false;var H=A.parentNode;while(H&&H.tagName.toLowerCase()!="body"){var G=OpenLayers.Element.getStyle(H,"position");if(G=="absolute"){J=true;break}else{if(G&&G!="static"){break}}H=H.parentNode}if(!J){A.style.position="absolute"}if(!I){I=parseInt(F.scrollWidth);A.style.width=I+"px"}if(!E){E=parseInt(F.scrollHeight)}A.removeChild(F);K.removeChild(A);return new OpenLayers.Size(I,E)};OpenLayers.Util.getScrollbarWidth=function(){var C=OpenLayers.Util._scrollbarWidth;if(C==null){var E=null;var D=null;var A=0;var B=0;E=document.createElement("div");E.style.position="absolute";E.style.top="-1000px";E.style.left="-1000px";E.style.width="100px";E.style.height="50px";E.style.overflow="hidden";D=document.createElement("div");D.style.width="100%";D.style.height="200px";E.appendChild(D);document.body.appendChild(E);A=D.offsetWidth;E.style.overflow="scroll";B=D.offsetWidth;document.body.removeChild(document.body.lastChild);OpenLayers.Util._scrollbarWidth=(A-B);C=OpenLayers.Util._scrollbarWidth}return C};OpenLayers.Element={visible:function(A){return OpenLayers.Util.getElement(A).style.display!="none"},toggle:function(){for(var C=0,A=arguments.length;C<A;C++){var B=OpenLayers.Util.getElement(arguments[C]);var D=OpenLayers.Element.visible(B)?"hide":"show";OpenLayers.Element[D](B)}},hide:function(){for(var C=0,A=arguments.length;C<A;C++){var B=OpenLayers.Util.getElement(arguments[C]);B.style.display="none"}},show:function(){for(var C=0,A=arguments.length;C<A;C++){var B=OpenLayers.Util.getElement(arguments[C]);B.style.display=""}},remove:function(A){A=OpenLayers.Util.getElement(A);A.parentNode.removeChild(A)},getHeight:function(A){A=OpenLayers.Util.getElement(A);return A.offsetHeight},getDimensions:function(B){B=OpenLayers.Util.getElement(B);if(OpenLayers.Element.getStyle(B,"display")!="none"){return{width:B.offsetWidth,height:B.offsetHeight}}var A=B.style;var E=A.visibility;var C=A.position;A.visibility="hidden";A.position="absolute";A.display="";var F=B.clientWidth;var D=B.clientHeight;A.display="none";A.position=C;A.visibility=E;return{width:F,height:D}},hasClass:function(B,A){var C=B.className;return(!!C&&new RegExp("(^|\\s)"+A+"(\\s|$)").test(C))},addClass:function(B,A){if(!OpenLayers.Element.hasClass(B,A)){B.className+=(B.className?" ":"")+A}return B},removeClass:function(B,A){var C=B.className;if(C){B.className=OpenLayers.String.trim(C.replace(new RegExp("(^|\\s+)"+A+"(\\s+|$)")," "))}return B},toggleClass:function(B,A){if(OpenLayers.Element.hasClass(B,A)){OpenLayers.Element.removeClass(B,A)}else{OpenLayers.Element.addClass(B,A)}return B},getStyle:function(C,D){C=OpenLayers.Util.getElement(C);var E=null;if(C&&C.style){E=C.style[OpenLayers.String.camelize(D)];if(!E){if(document.defaultView&&document.defaultView.getComputedStyle){var B=document.defaultView.getComputedStyle(C,null);E=B?B.getPropertyValue(D):null}else{if(C.currentStyle){E=C.currentStyle[OpenLayers.String.camelize(D)]}}}var A=["left","top","right","bottom"];if(window.opera&&(OpenLayers.Util.indexOf(A,D)!=-1)&&(OpenLayers.Element.getStyle(C,"position")=="static")){E="auto"}}return E=="auto"?null:E}};OpenLayers.Size=OpenLayers.Class({w:0,h:0,initialize:function(A,B){this.w=parseFloat(A);this.h=parseFloat(B)},toString:function(){return("w="+this.w+",h="+this.h)},clone:function(){return new OpenLayers.Size(this.w,this.h)},equals:function(B){var A=false;if(B!=null){A=((this.w==B.w&&this.h==B.h)||(isNaN(this.w)&&isNaN(this.h)&&isNaN(B.w)&&isNaN(B.h)))}return A},CLASS_NAME:"OpenLayers.Size"});OpenLayers.Console={log:function(){},debug:function(){},info:function(){},warn:function(){},error:function(){},userError:function(A){alert(A)},assert:function(){},dir:function(){},dirxml:function(){},trace:function(){},group:function(){},groupEnd:function(){},time:function(){},timeEnd:function(){},profile:function(){},profileEnd:function(){},count:function(){},CLASS_NAME:"OpenLayers.Console"};(function(){var B=document.getElementsByTagName("script");for(var C=0,A=B.length;C<A;++C){if(B[C].src.indexOf("firebug.js")!=-1){if(console){OpenLayers.Util.extend(OpenLayers.Console,console);break}}}})();OpenLayers.Icon=OpenLayers.Class({url:null,size:null,offset:null,calculateOffset:null,imageDiv:null,px:null,initialize:function(A,B,D,C){this.url=A;this.size=(B)?B:new OpenLayers.Size(20,20);this.offset=D?D:new OpenLayers.Pixel(-(this.size.w/2),-(this.size.h/2));this.calculateOffset=C;var E=OpenLayers.Util.createUniqueID("OL_Icon_");this.imageDiv=OpenLayers.Util.createAlphaImageDiv(E)},destroy:function(){this.erase();OpenLayers.Event.stopObservingElement(this.imageDiv.firstChild);this.imageDiv.innerHTML="";this.imageDiv=null},clone:function(){return new OpenLayers.Icon(this.url,this.size,this.offset,this.calculateOffset)},setSize:function(A){if(A!=null){this.size=A}this.draw()},setUrl:function(A){if(A!=null){this.url=A}this.draw()},draw:function(A){OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv,null,null,this.size,this.url,"absolute");this.moveTo(A);return this.imageDiv},erase:function(){if(this.imageDiv!=null&&this.imageDiv.parentNode!=null){OpenLayers.Element.remove(this.imageDiv)}},setOpacity:function(A){OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv,null,null,null,null,null,null,null,A)},moveTo:function(A){if(A!=null){this.px=A}if(this.imageDiv!=null){if(this.px==null){this.display(false)}else{if(this.calculateOffset){this.offset=this.calculateOffset(this.size)}var B=this.px.offset(this.offset);OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv,null,B)}}},display:function(A){this.imageDiv.style.display=(A)?"":"none"},isDrawn:function(){var A=(this.imageDiv&&this.imageDiv.parentNode&&(this.imageDiv.parentNode.nodeType!=11));return A},CLASS_NAME:"OpenLayers.Icon"});OpenLayers.Popup=OpenLayers.Class({events:null,id:"",lonlat:null,div:null,contentSize:null,size:null,contentHTML:null,backgroundColor:"",opacity:"",border:"",contentDiv:null,groupDiv:null,closeDiv:null,autoSize:false,minSize:null,maxSize:null,displayClass:"olPopup",contentDisplayClass:"olPopupContent",padding:0,disableFirefoxOverflowHack:false,fixPadding:function(){if(typeof this.padding=="number"){this.padding=new OpenLayers.Bounds(this.padding,this.padding,this.padding,this.padding)}},panMapIfOutOfView:false,keepInMap:false,closeOnMove:false,map:null,initialize:function(G,C,F,B,E,D){if(G==null){G=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")}this.id=G;this.lonlat=C;this.contentSize=(F!=null)?F:new OpenLayers.Size(OpenLayers.Popup.WIDTH,OpenLayers.Popup.HEIGHT);if(B!=null){this.contentHTML=B}this.backgroundColor=OpenLayers.Popup.COLOR;this.opacity=OpenLayers.Popup.OPACITY;this.border=OpenLayers.Popup.BORDER;this.div=OpenLayers.Util.createDiv(this.id,null,null,null,null,null,"hidden");this.div.className=this.displayClass;var A=this.id+"_GroupDiv";this.groupDiv=OpenLayers.Util.createDiv(A,null,null,null,"relative",null,"hidden");var G=this.div.id+"_contentDiv";this.contentDiv=OpenLayers.Util.createDiv(G,null,this.contentSize.clone(),null,"relative");this.contentDiv.className=this.contentDisplayClass;this.groupDiv.appendChild(this.contentDiv);this.div.appendChild(this.groupDiv);if(E){this.addCloseBox(D)}this.registerEvents()},destroy:function(){this.id=null;this.lonlat=null;this.size=null;this.contentHTML=null;this.backgroundColor=null;this.opacity=null;this.border=null;if(this.closeOnMove&&this.map){this.map.events.unregister("movestart",this,this.hide)}this.events.destroy();this.events=null;if(this.closeDiv){OpenLayers.Event.stopObservingElement(this.closeDiv);this.groupDiv.removeChild(this.closeDiv)}this.closeDiv=null;this.div.removeChild(this.groupDiv);this.groupDiv=null;if(this.map!=null){this.map.removePopup(this)}this.map=null;this.div=null;this.autoSize=null;this.minSize=null;this.maxSize=null;this.padding=null;this.panMapIfOutOfView=null},draw:function(A){if(A==null){if((this.lonlat!=null)&&(this.map!=null)){A=this.map.getLayerPxFromLonLat(this.lonlat)}}if(this.closeOnMove){this.map.events.register("movestart",this,this.hide)}if(!this.disableFirefoxOverflowHack&&OpenLayers.Util.getBrowserName()=="firefox"){this.map.events.register("movestart",this,function(){var B=document.defaultView.getComputedStyle(this.contentDiv,null);var C=B.getPropertyValue("overflow");if(C!="hidden"){this.contentDiv._oldOverflow=C;this.contentDiv.style.overflow="hidden"}});this.map.events.register("moveend",this,function(){var B=this.contentDiv._oldOverflow;if(B){this.contentDiv.style.overflow=B;this.contentDiv._oldOverflow=null}})}this.moveTo(A);if(!this.autoSize&&!this.size){this.setSize(this.contentSize)}this.setBackgroundColor();this.setOpacity();this.setBorder();this.setContentHTML();if(this.panMapIfOutOfView){this.panIntoView()}return this.div},updatePosition:function(){if((this.lonlat)&&(this.map)){var A=this.map.getLayerPxFromLonLat(this.lonlat);if(A){this.moveTo(A)}}},moveTo:function(A){if((A!=null)&&(this.div!=null)){this.div.style.left=A.x+"px";this.div.style.top=A.y+"px"}},visible:function(){return OpenLayers.Element.visible(this.div)},toggle:function(){if(this.visible()){this.hide()}else{this.show()}},show:function(){OpenLayers.Element.show(this.div);if(this.panMapIfOutOfView){this.panIntoView()}},hide:function(){OpenLayers.Element.hide(this.div)},setSize:function(C){this.size=C.clone();var B=this.getContentDivPadding();var A=B.left+B.right;var E=B.top+B.bottom;this.fixPadding();A+=this.padding.left+this.padding.right;E+=this.padding.top+this.padding.bottom;if(this.closeDiv){var D=parseInt(this.closeDiv.style.width);A+=D+B.right}this.size.w+=A;this.size.h+=E;if(OpenLayers.Util.getBrowserName()=="msie"){this.contentSize.w+=B.left+B.right;this.contentSize.h+=B.bottom+B.top}if(this.div!=null){this.div.style.width=this.size.w+"px";this.div.style.height=this.size.h+"px"}if(this.contentDiv!=null){this.contentDiv.style.width=C.w+"px";this.contentDiv.style.height=C.h+"px"}},updateSize:function(){var E="<div class='"+this.contentDisplayClass+"'>"+this.contentDiv.innerHTML+"</div>";var H=(this.map)?this.map.layerContainerDiv:document.body;var I=OpenLayers.Util.getRenderedDimensions(E,null,{displayClass:this.displayClass,containerElement:H});var G=this.getSafeContentSize(I);var F=null;if(G.equals(I)){F=I}else{var B=new OpenLayers.Size();B.w=(G.w<I.w)?G.w:null;B.h=(G.h<I.h)?G.h:null;if(B.w&&B.h){F=G}else{var D=OpenLayers.Util.getRenderedDimensions(E,B,{displayClass:this.contentDisplayClass,containerElement:H});var C=OpenLayers.Element.getStyle(this.contentDiv,"overflow");if((C!="hidden")&&(D.equals(G))){var A=OpenLayers.Util.getScrollbarWidth();if(B.w){D.h+=A}else{D.w+=A}}F=this.getSafeContentSize(D)}}this.setSize(F)},setBackgroundColor:function(A){if(A!=undefined){this.backgroundColor=A}if(this.div!=null){this.div.style.backgroundColor=this.backgroundColor}},setOpacity:function(A){if(A!=undefined){this.opacity=A}if(this.div!=null){this.div.style.opacity=this.opacity;this.div.style.filter="alpha(opacity="+this.opacity*100+")"}},setBorder:function(A){if(A!=undefined){this.border=A}if(this.div!=null){this.div.style.border=this.border}},setContentHTML:function(A){if(A!=null){this.contentHTML=A}if((this.contentDiv!=null)&&(this.contentHTML!=null)&&(this.contentHTML!=this.contentDiv.innerHTML)){this.contentDiv.innerHTML=this.contentHTML;if(this.autoSize){this.registerImageListeners();this.updateSize()}}},registerImageListeners:function(){var F=function(){this.popup.updateSize();if(this.popup.visible()&&this.popup.panMapIfOutOfView){this.popup.panIntoView()}OpenLayers.Event.stopObserving(this.img,"load",this.img._onImageLoad)};var B=this.contentDiv.getElementsByTagName("img");for(var E=0,A=B.length;E<A;E++){var C=B[E];if(C.width==0||C.height==0){var D={popup:this,img:C};C._onImgLoad=OpenLayers.Function.bind(F,D);OpenLayers.Event.observe(C,"load",C._onImgLoad)}}},getSafeContentSize:function(K){var D=K.clone();var I=this.getContentDivPadding();var J=I.left+I.right;var G=I.top+I.bottom;this.fixPadding();J+=this.padding.left+this.padding.right;G+=this.padding.top+this.padding.bottom;if(this.closeDiv){var C=parseInt(this.closeDiv.style.width);J+=C+I.right}if(this.minSize){D.w=Math.max(D.w,(this.minSize.w-J));D.h=Math.max(D.h,(this.minSize.h-G))}if(this.maxSize){D.w=Math.min(D.w,(this.maxSize.w-J));D.h=Math.min(D.h,(this.maxSize.h-G))}if(this.map&&this.map.size){var F=0,E=0;if(this.keepInMap&&!this.panMapIfOutOfView){var H=this.map.getPixelFromLonLat(this.lonlat);switch(this.relativePosition){case"tr":F=H.x;E=this.map.size.h-H.y;break;case"tl":F=this.map.size.w-H.x;E=this.map.size.h-H.y;break;case"bl":F=this.map.size.w-H.x;E=H.y;break;case"br":F=H.x;E=H.y;break;default:F=H.x;E=this.map.size.h-H.y;break}}var A=this.map.size.h-this.map.paddingForPopups.top-this.map.paddingForPopups.bottom-G-E;var B=this.map.size.w-this.map.paddingForPopups.left-this.map.paddingForPopups.right-J-F;if(B>0){D.w=Math.min(D.w,B)}if(A>0){D.h=Math.min(D.h,A)}}return D},getContentDivPadding:function(){var A=this._contentDivPadding;if(!A){if(this.div.parentNode==null){this.div.style.display="none";document.body.appendChild(this.div)}A=new OpenLayers.Bounds(OpenLayers.Element.getStyle(this.contentDiv,"padding-left"),OpenLayers.Element.getStyle(this.contentDiv,"padding-bottom"),OpenLayers.Element.getStyle(this.contentDiv,"padding-right"),OpenLayers.Element.getStyle(this.contentDiv,"padding-top"));this._contentDivPadding=A;if(this.div.parentNode==document.body){document.body.removeChild(this.div);this.div.style.display=""}}return A},addCloseBox:function(C){this.closeDiv=OpenLayers.Util.createDiv(this.id+"_close",null,new OpenLayers.Size(17,17));this.closeDiv.className="olPopupCloseBox";var B=this.getContentDivPadding();this.closeDiv.style.right=B.right+"px";this.closeDiv.style.top=B.top+"px";this.groupDiv.appendChild(this.closeDiv);var A=C||function(D){this.hide();OpenLayers.Event.stop(D)};OpenLayers.Event.observe(this.closeDiv,"click",OpenLayers.Function.bindAsEventListener(A,this))},panIntoView:function(){var E=this.map.getSize();var D=this.map.getViewPortPxFromLayerPx(new OpenLayers.Pixel(parseInt(this.div.style.left),parseInt(this.div.style.top)));var C=D.clone();if(D.x<this.map.paddingForPopups.left){C.x=this.map.paddingForPopups.left}else{if((D.x+this.size.w)>(E.w-this.map.paddingForPopups.right)){C.x=E.w-this.map.paddingForPopups.right-this.size.w}}if(D.y<this.map.paddingForPopups.top){C.y=this.map.paddingForPopups.top}else{if((D.y+this.size.h)>(E.h-this.map.paddingForPopups.bottom)){C.y=E.h-this.map.paddingForPopups.bottom-this.size.h}}var B=D.x-C.x;var A=D.y-C.y;this.map.pan(B,A)},registerEvents:function(){this.events=new OpenLayers.Events(this,this.div,null,true);this.events.on({mousedown:this.onmousedown,mousemove:this.onmousemove,mouseup:this.onmouseup,click:this.onclick,mouseout:this.onmouseout,dblclick:this.ondblclick,scope:this})},onmousedown:function(A){this.mousedown=true;OpenLayers.Event.stop(A,true)},onmousemove:function(A){if(this.mousedown){OpenLayers.Event.stop(A,true)}},onmouseup:function(A){if(this.mousedown){this.mousedown=false;OpenLayers.Event.stop(A,true)}},onclick:function(A){OpenLayers.Event.stop(A,true)},onmouseout:function(A){this.mousedown=false},ondblclick:function(A){OpenLayers.Event.stop(A,true)},CLASS_NAME:"OpenLayers.Popup"});OpenLayers.Popup.WIDTH=200;OpenLayers.Popup.HEIGHT=200;OpenLayers.Popup.COLOR="white";OpenLayers.Popup.OPACITY=1;OpenLayers.Popup.BORDER="0px";OpenLayers.Bounds=OpenLayers.Class({left:null,bottom:null,right:null,top:null,centerLonLat:null,initialize:function(D,A,B,C){if(D!=null){this.left=OpenLayers.Util.toFloat(D)}if(A!=null){this.bottom=OpenLayers.Util.toFloat(A)}if(B!=null){this.right=OpenLayers.Util.toFloat(B)}if(C!=null){this.top=OpenLayers.Util.toFloat(C)}},clone:function(){return new OpenLayers.Bounds(this.left,this.bottom,this.right,this.top)},equals:function(B){var A=false;if(B!=null){A=((this.left==B.left)&&(this.right==B.right)&&(this.top==B.top)&&(this.bottom==B.bottom))}return A},toString:function(){return("left-bottom=("+this.left+","+this.bottom+") right-top=("+this.right+","+this.top+")")},toArray:function(){return[this.left,this.bottom,this.right,this.top]},toBBOX:function(A){if(A==null){A=6}var B=Math.pow(10,A);var C=Math.round(this.left*B)/B+","+Math.round(this.bottom*B)/B+","+Math.round(this.right*B)/B+","+Math.round(this.top*B)/B;return C},toGeometry:function(){return new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing([new OpenLayers.Geometry.Point(this.left,this.bottom),new OpenLayers.Geometry.Point(this.right,this.bottom),new OpenLayers.Geometry.Point(this.right,this.top),new OpenLayers.Geometry.Point(this.left,this.top)])])},getWidth:function(){return(this.right-this.left)},getHeight:function(){return(this.top-this.bottom)},getSize:function(){return new OpenLayers.Size(this.getWidth(),this.getHeight())},getCenterPixel:function(){return new OpenLayers.Pixel((this.left+this.right)/2,(this.bottom+this.top)/2)},getCenterLonLat:function(){if(!this.centerLonLat){this.centerLonLat=new OpenLayers.LonLat((this.left+this.right)/2,(this.bottom+this.top)/2)}return this.centerLonLat},scale:function(F,H){if(H==null){H=this.getCenterLonLat()}var A=[];var E,D;if(H.CLASS_NAME=="OpenLayers.LonLat"){E=H.lon;D=H.lat}else{E=H.x;D=H.y}var C=(this.left-E)*F+E;var B=(this.bottom-D)*F+D;var I=(this.right-E)*F+E;var G=(this.top-D)*F+D;return new OpenLayers.Bounds(C,B,I,G)},add:function(A,C){if((A==null)||(C==null)){var B=OpenLayers.i18n("boundsAddError");OpenLayers.Console.error(B);return null}return new OpenLayers.Bounds(this.left+A,this.bottom+C,this.right+A,this.top+C)},extend:function(A){var B=null;if(A){switch(A.CLASS_NAME){case"OpenLayers.LonLat":B=new OpenLayers.Bounds(A.lon,A.lat,A.lon,A.lat);break;case"OpenLayers.Geometry.Point":B=new OpenLayers.Bounds(A.x,A.y,A.x,A.y);break;case"OpenLayers.Bounds":B=A;break}if(B){this.centerLonLat=null;if((this.left==null)||(B.left<this.left)){this.left=B.left}if((this.bottom==null)||(B.bottom<this.bottom)){this.bottom=B.bottom}if((this.right==null)||(B.right>this.right)){this.right=B.right}if((this.top==null)||(B.top>this.top)){this.top=B.top}}}},containsLonLat:function(B,A){return this.contains(B.lon,B.lat,A)},containsPixel:function(B,A){return this.contains(B.x,B.y,A)},contains:function(B,D,A){if(A==null){A=true}if(B==null||D==null){return false}B=OpenLayers.Util.toFloat(B);D=OpenLayers.Util.toFloat(D);var C=false;if(A){C=((B>=this.left)&&(B<=this.right)&&(D>=this.bottom)&&(D<=this.top))}else{C=((B>this.left)&&(B<this.right)&&(D>this.bottom)&&(D<this.top))}return C},intersectsBounds:function(E,B){if(B==null){B=true}var D=false;var H=(this.left==E.right||this.right==E.left||this.top==E.bottom||this.bottom==E.top);if(B||!H){var G=(((E.bottom>=this.bottom)&&(E.bottom<=this.top))||((this.bottom>=E.bottom)&&(this.bottom<=E.top)));var F=(((E.top>=this.bottom)&&(E.top<=this.top))||((this.top>E.bottom)&&(this.top<E.top)));var C=(((E.left>=this.left)&&(E.left<=this.right))||((this.left>=E.left)&&(this.left<=E.right)));var A=(((E.right>=this.left)&&(E.right<=this.right))||((this.right>=E.left)&&(this.right<=E.right)));D=((G||F)&&(C||A))}return D},containsBounds:function(G,B,A){if(B==null){B=false}if(A==null){A=true}var C=this.contains(G.left,G.bottom,A);var D=this.contains(G.right,G.bottom,A);var F=this.contains(G.left,G.top,A);var E=this.contains(G.right,G.top,A);return(B)?(C||D||F||E):(C&&D&&F&&E)},determineQuadrant:function(C){var B="";var A=this.getCenterLonLat();B+=(C.lat<A.lat)?"b":"t";B+=(C.lon<A.lon)?"l":"r";return B},transform:function(D,B){this.centerLonLat=null;var E=OpenLayers.Projection.transform({x:this.left,y:this.bottom},D,B);var A=OpenLayers.Projection.transform({x:this.right,y:this.bottom},D,B);var C=OpenLayers.Projection.transform({x:this.left,y:this.top},D,B);var F=OpenLayers.Projection.transform({x:this.right,y:this.top},D,B);this.left=Math.min(E.x,C.x);this.bottom=Math.min(E.y,A.y);this.right=Math.max(A.x,F.x);this.top=Math.max(C.y,F.y);return this},wrapDateLine:function(A,C){C=C||{};var D=C.leftTolerance||0;var B=C.rightTolerance||0;var E=this.clone();if(A){while(E.left<A.left&&(E.right-B)<=A.left){E=E.add(A.getWidth(),0)}while((E.left+D)>=A.right&&E.right>A.right){E=E.add(-A.getWidth(),0)}}return E},CLASS_NAME:"OpenLayers.Bounds"});OpenLayers.Bounds.fromString=function(B){var A=B.split(",");return OpenLayers.Bounds.fromArray(A)};OpenLayers.Bounds.fromArray=function(A){return new OpenLayers.Bounds(parseFloat(A[0]),parseFloat(A[1]),parseFloat(A[2]),parseFloat(A[3]))};OpenLayers.Bounds.fromSize=function(A){return new OpenLayers.Bounds(0,A.h,A.w,0)};OpenLayers.Bounds.oppositeQuadrant=function(A){var B="";B+=(A.charAt(0)=="t")?"b":"t";B+=(A.charAt(1)=="l")?"r":"l";return B};OpenLayers.LonLat=OpenLayers.Class({lon:0,lat:0,initialize:function(B,A){this.lon=OpenLayers.Util.toFloat(B);this.lat=OpenLayers.Util.toFloat(A)},toString:function(){return("lon="+this.lon+",lat="+this.lat)},toShortString:function(){return(this.lon+", "+this.lat)},clone:function(){return new OpenLayers.LonLat(this.lon,this.lat)},add:function(C,A){if((C==null)||(A==null)){var B=OpenLayers.i18n("lonlatAddError");OpenLayers.Console.error(B);return null}return new OpenLayers.LonLat(this.lon+C,this.lat+A)},equals:function(B){var A=false;if(B!=null){A=((this.lon==B.lon&&this.lat==B.lat)||(isNaN(this.lon)&&isNaN(this.lat)&&isNaN(B.lon)&&isNaN(B.lat)))}return A},transform:function(C,B){var A=OpenLayers.Projection.transform({x:this.lon,y:this.lat},C,B);this.lon=A.x;this.lat=A.y;return this},wrapDateLine:function(A){var B=this.clone();if(A){while(B.lon<A.left){B.lon+=A.getWidth()}while(B.lon>A.right){B.lon-=A.getWidth()}}return B},CLASS_NAME:"OpenLayers.LonLat"});OpenLayers.LonLat.fromString=function(B){var A=B.split(",");return new OpenLayers.LonLat(parseFloat(A[0]),parseFloat(A[1]))};OpenLayers.Pixel=OpenLayers.Class({x:0,y:0,initialize:function(A,B){this.x=parseFloat(A);this.y=parseFloat(B)},toString:function(){return("x="+this.x+",y="+this.y)},clone:function(){return new OpenLayers.Pixel(this.x,this.y)},equals:function(A){var B=false;if(A!=null){B=((this.x==A.x&&this.y==A.y)||(isNaN(this.x)&&isNaN(this.y)&&isNaN(A.x)&&isNaN(A.y)))}return B},add:function(A,C){if((A==null)||(C==null)){var B=OpenLayers.i18n("pixelAddError");OpenLayers.Console.error(B);return null}return new OpenLayers.Pixel(this.x+A,this.y+C)},offset:function(A){var B=this.clone();if(A){B=this.add(A.x,A.y)}return B},CLASS_NAME:"OpenLayers.Pixel"});OpenLayers.Control=OpenLayers.Class({id:null,map:null,div:null,type:null,allowSelection:false,displayClass:"",title:"",active:null,handler:null,eventListeners:null,events:null,EVENT_TYPES:["activate","deactivate"],initialize:function(A){this.displayClass=this.CLASS_NAME.replace("OpenLayers.","ol").replace(/\./g,"");OpenLayers.Util.extend(this,A);this.events=new OpenLayers.Events(this,null,this.EVENT_TYPES);if(this.eventListeners instanceof Object){this.events.on(this.eventListeners)}if(this.id==null){this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")}},destroy:function(){if(this.events){if(this.eventListeners){this.events.un(this.eventListeners)}this.events.destroy();this.events=null}this.eventListeners=null;if(this.handler){this.handler.destroy();this.handler=null}if(this.handlers){for(var A in this.handlers){if(this.handlers.hasOwnProperty(A)&&typeof this.handlers[A].destroy=="function"){this.handlers[A].destroy()}}this.handlers=null}if(this.map){this.map.removeControl(this);this.map=null}},setMap:function(A){this.map=A;if(this.handler){this.handler.setMap(A)}},draw:function(A){if(this.div==null){this.div=OpenLayers.Util.createDiv(this.id);this.div.className=this.displayClass;if(!this.allowSelection){this.div.className+=" olControlNoSelect";this.div.setAttribute("unselectable","on",0);this.div.onselectstart=function(){return(false)}}if(this.title!=""){this.div.title=this.title}}if(A!=null){this.position=A.clone()}this.moveTo(this.position);return this.div},moveTo:function(A){if((A!=null)&&(this.div!=null)){this.div.style.left=A.x+"px";this.div.style.top=A.y+"px"}},activate:function(){if(this.active){return false}if(this.handler){this.handler.activate()}this.active=true;if(this.map){OpenLayers.Element.addClass(this.map.viewPortDiv,this.displayClass.replace(/ /g,"")+"Active")}this.events.triggerEvent("activate");return true},deactivate:function(){if(this.active){if(this.handler){this.handler.deactivate()}this.active=false;if(this.map){OpenLayers.Element.removeClass(this.map.viewPortDiv,this.displayClass.replace(/ /g,"")+"Active")}this.events.triggerEvent("deactivate");return true}return false},CLASS_NAME:"OpenLayers.Control"});OpenLayers.Control.TYPE_BUTTON=1;OpenLayers.Control.TYPE_TOGGLE=2;OpenLayers.Control.TYPE_TOOL=3;OpenLayers.Lang={code:null,defaultCode:"en",getCode:function(){if(!OpenLayers.Lang.code){OpenLayers.Lang.setCode()}return OpenLayers.Lang.code},setCode:function(B){var D;if(!B){B=(OpenLayers.Util.getBrowserName()=="msie")?navigator.userLanguage:navigator.language}var C=B.split("-");C[0]=C[0].toLowerCase();if(typeof OpenLayers.Lang[C[0]]=="object"){D=C[0]}if(C[1]){var A=C[0]+"-"+C[1].toUpperCase();if(typeof OpenLayers.Lang[A]=="object"){D=A}}if(!D){OpenLayers.Console.warn("Failed to find OpenLayers.Lang."+C.join("-")+" dictionary, falling back to default language");D=OpenLayers.Lang.defaultCode}OpenLayers.Lang.code=D},translate:function(B,A){var D=OpenLayers.Lang[OpenLayers.Lang.getCode()];var C=D[B];if(!C){C=B}if(A){C=OpenLayers.String.format(C,A)}return C}};OpenLayers.i18n=OpenLayers.Lang.translate;OpenLayers.Popup.Anchored=OpenLayers.Class(OpenLayers.Popup,{relativePosition:null,keepInMap:true,anchor:null,initialize:function(H,D,G,C,B,F,E){var A=[H,D,G,C,F,E];OpenLayers.Popup.prototype.initialize.apply(this,A);this.anchor=(B!=null)?B:{size:new OpenLayers.Size(0,0),offset:new OpenLayers.Pixel(0,0)}},destroy:function(){this.anchor=null;this.relativePosition=null;OpenLayers.Popup.prototype.destroy.apply(this,arguments)},show:function(){this.updatePosition();OpenLayers.Popup.prototype.show.apply(this,arguments)},moveTo:function(C){var B=this.relativePosition;this.relativePosition=this.calculateRelativePosition(C);var D=this.calculateNewPx(C);var A=new Array(D);OpenLayers.Popup.prototype.moveTo.apply(this,A);if(this.relativePosition!=B){this.updateRelativePosition()}},setSize:function(B){OpenLayers.Popup.prototype.setSize.apply(this,arguments);if((this.lonlat)&&(this.map)){var A=this.map.getLayerPxFromLonLat(this.lonlat);this.moveTo(A)}},calculateRelativePosition:function(B){var D=this.map.getLonLatFromLayerPx(B);var C=this.map.getExtent();var A=C.determineQuadrant(D);return OpenLayers.Bounds.oppositeQuadrant(A)},updateRelativePosition:function(){},calculateNewPx:function(B){var E=B.offset(this.anchor.offset);var A=this.size||this.contentSize;var D=(this.relativePosition.charAt(0)=="t");E.y+=(D)?-A.h:this.anchor.size.h;var C=(this.relativePosition.charAt(1)=="l");E.x+=(C)?-A.w:this.anchor.size.w;return E},CLASS_NAME:"OpenLayers.Popup.Anchored"});OpenLayers.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.Control.LayerSwitcher=OpenLayers.Class(OpenLayers.Control,{activeColor:"darkblue",layerStates:null,layersDiv:null,baseLayersDiv:null,baseLayers:null,dataLbl:null,dataLayersDiv:null,dataLayers:null,minimizeDiv:null,maximizeDiv:null,ascending:true,initialize:function(A){OpenLayers.Control.prototype.initialize.apply(this,arguments);this.layerStates=[]},destroy:function(){OpenLayers.Event.stopObservingElement(this.div);OpenLayers.Event.stopObservingElement(this.minimizeDiv);OpenLayers.Event.stopObservingElement(this.maximizeDiv);this.clearLayersArray("base");this.clearLayersArray("data");this.map.events.un({addlayer:this.redraw,changelayer:this.redraw,removelayer:this.redraw,changebaselayer:this.redraw,scope:this});OpenLayers.Control.prototype.destroy.apply(this,arguments)},setMap:function(A){OpenLayers.Control.prototype.setMap.apply(this,arguments);this.map.events.on({addlayer:this.redraw,changelayer:this.redraw,removelayer:this.redraw,changebaselayer:this.redraw,scope:this})},draw:function(){OpenLayers.Control.prototype.draw.apply(this);this.loadContents();if(!this.outsideViewport){this.minimizeControl()}this.redraw();return this.div},clearLayersArray:function(D){var E=this[D+"Layers"];if(E){for(var C=0,A=E.length;C<A;C++){var B=E[C];OpenLayers.Event.stopObservingElement(B.inputElem);OpenLayers.Event.stopObservingElement(B.labelSpan)}}this[D+"LayersDiv"].innerHTML="";this[D+"Layers"]=[]},checkRedraw:function(){var E=false;if(!this.layerStates.length||(this.map.layers.length!=this.layerStates.length)){E=true}else{for(var C=0,A=this.layerStates.length;C<A;C++){var D=this.layerStates[C];var B=this.map.layers[C];if((D.name!=B.name)||(D.inRange!=B.inRange)||(D.id!=B.id)||(D.visibility!=B.visibility)){E=true;break}}}return E},redraw:function(){if(!this.checkRedraw()){return this.div}this.clearLayersArray("base");this.clearLayersArray("data");var D=false;var L=false;var H=this.map.layers.length;this.layerStates=new Array(H);for(var F=0;F<H;F++){var G=this.map.layers[F];this.layerStates[F]={name:G.name,visibility:G.visibility,inRange:G.inRange,id:G.id}}var E=this.map.layers.slice();if(!this.ascending){E.reverse()}for(var F=0,H=E.length;F<H;F++){var G=E[F];var I=G.isBaseLayer;if(G.displayInLayerSwitcher){if(I){L=true}else{D=true}var K=(I)?(G==this.map.baseLayer):G.getVisibility();var J=document.createElement("input");J.id=this.id+"_input_"+G.name;J.name=(I)?"baseLayers":G.name;J.type=(I)?"radio":"checkbox";J.value=G.name;J.checked=K;J.defaultChecked=K;if(!I&&!G.inRange){J.disabled=true}var A={inputElem:J,layer:G,layerSwitcher:this};OpenLayers.Event.observe(J,"mouseup",OpenLayers.Function.bindAsEventListener(this.onInputClick,A));var B=document.createElement("span");if(!I&&!G.inRange){B.style.color="gray"}B.innerHTML=G.name;B.style.verticalAlign=(I)?"bottom":"baseline";OpenLayers.Event.observe(B,"click",OpenLayers.Function.bindAsEventListener(this.onInputClick,A));var N=document.createElement("br");var M=(I)?this.baseLayers:this.dataLayers;M.push({layer:G,inputElem:J,labelSpan:B});var C=(I)?this.baseLayersDiv:this.dataLayersDiv;C.appendChild(J);C.appendChild(B);C.appendChild(N)}}this.dataLbl.style.display=(D)?"":"none";this.baseLbl.style.display=(L)?"":"none";return this.div},onInputClick:function(A){if(!this.inputElem.disabled){if(this.inputElem.type=="radio"){this.inputElem.checked=true;this.layer.map.setBaseLayer(this.layer)}else{this.inputElem.checked=!this.inputElem.checked;this.layerSwitcher.updateMap()}}OpenLayers.Event.stop(A)},onLayerClick:function(A){this.updateMap()},updateMap:function(){for(var B=0,A=this.baseLayers.length;B<A;B++){var C=this.baseLayers[B];if(C.inputElem.checked){this.map.setBaseLayer(C.layer,false)}}for(var B=0,A=this.dataLayers.length;B<A;B++){var C=this.dataLayers[B];C.layer.setVisibility(C.inputElem.checked)}},maximizeControl:function(A){this.div.style.width="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=this.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.PanZoom=OpenLayers.Class(OpenLayers.Control,{slideFactor:50,slideRatio:null,buttons:null,position:null,initialize:function(A){this.position=new OpenLayers.Pixel(OpenLayers.Control.PanZoom.X,OpenLayers.Control.PanZoom.Y);OpenLayers.Control.prototype.initialize.apply(this,arguments)},destroy:function(){OpenLayers.Control.prototype.destroy.apply(this,arguments);this.removeButtons();this.buttons=null;this.position=null},draw:function(B){OpenLayers.Control.prototype.draw.apply(this,arguments);B=this.position;this.buttons=[];var C=new OpenLayers.Size(18,18);var A=new OpenLayers.Pixel(B.x+C.w/2,B.y);this._addButton("panup","north-mini.png",A,C);B.y=A.y+C.h;this._addButton("panleft","west-mini.png",B,C);this._addButton("panright","east-mini.png",B.add(C.w,0),C);this._addButton("pandown","south-mini.png",A.add(0,C.h*2),C);this._addButton("zoomin","zoom-plus-mini.png",A.add(0,C.h*3+5),C);this._addButton("zoomworld","zoom-world-mini.png",A.add(0,C.h*4+5),C);this._addButton("zoomout","zoom-minus-mini.png",A.add(0,C.h*5+5),C);return this.div},_addButton:function(A,D,I,G){var F=OpenLayers.Util.getImagesLocation()+D;var B=OpenLayers.Util.createAlphaImageDiv(this.id+"_"+A,I,G,F,"absolute");this.div.appendChild(B);OpenLayers.Event.observe(B,"mousedown",OpenLayers.Function.bindAsEventListener(this.buttonDown,B));OpenLayers.Event.observe(B,"dblclick",OpenLayers.Function.bindAsEventListener(this.doubleClick,B));OpenLayers.Event.observe(B,"click",OpenLayers.Function.bindAsEventListener(this.doubleClick,B));B.action=A;B.map=this.map;if(!this.slideRatio){var C=this.slideFactor;var E=function(){return C}}else{var H=this.slideRatio;var E=function(J){return this.map.getSize()[J]*H}}B.getSlideFactor=E;this.buttons.push(B);return B},_removeButton:function(A){OpenLayers.Event.stopObservingElement(A);A.map=null;this.div.removeChild(A);OpenLayers.Util.removeItem(this.buttons,A)},removeButtons:function(){for(var A=this.buttons.length-1;A>=0;--A){this._removeButton(this.buttons[A])}},doubleClick:function(A){OpenLayers.Event.stop(A);return false},buttonDown:function(A){if(!OpenLayers.Event.isLeftClick(A)){return }switch(this.action){case"panup":this.map.pan(0,-this.getSlideFactor("h"));break;case"pandown":this.map.pan(0,this.getSlideFactor("h"));break;case"panleft":this.map.pan(-this.getSlideFactor("w"),0);break;case"panright":this.map.pan(this.getSlideFactor("w"),0);break;case"zoomin":this.map.zoomIn();break;case"zoomout":this.map.zoomOut();break;case"zoomworld":this.map.zoomToMaxExtent();break}OpenLayers.Event.stop(A)},CLASS_NAME:"OpenLayers.Control.PanZoom"});OpenLayers.Control.PanZoom.X=4;OpenLayers.Control.PanZoom.Y=4;OpenLayers.Control.ScaleLine=OpenLayers.Class(OpenLayers.Control,{maxWidth:100,topOutUnits:"km",topInUnits:"m",bottomOutUnits:"mi",bottomInUnits:"ft",eTop:null,eBottom:null,initialize:function(A){OpenLayers.Control.prototype.initialize.apply(this,[A])},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.eTop){this.div.style.display="block";this.div.style.position="absolute";this.eTop=document.createElement("div");this.eTop.className=this.displayClass+"Top";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 L=this.map.getUnits();var C=OpenLayers.INCHES_PER_UNIT;var I=this.maxWidth*H*C[L];var A;var D;if(I>100000){A=this.topOutUnits;D=this.bottomOutUnits}else{A=this.topInUnits;D=this.bottomInUnits}var F=I/C[A];var J=I/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;if(this.eBottom.style.visibility=="visible"){this.eBottom.style.width=Math.round(K)+"px";this.eBottom.innerHTML=E+" "+D}if(this.eTop.style.visibility=="visible"){this.eTop.style.width=Math.round(B)+"px";this.eTop.innerHTML=G+" "+A}},CLASS_NAME:"OpenLayers.Control.ScaleLine"});OpenLayers.Event={observers:false,KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(A){return A.target||A.srcElement},isLeftClick:function(A){return(((A.which)&&(A.which==1))||((A.button)&&(A.button==1)))},isRightClick:function(A){return(((A.which)&&(A.which==3))||((A.button)&&(A.button==2)))},stop:function(B,A){if(!A){if(B.preventDefault){B.preventDefault()}else{B.returnValue=false}}if(B.stopPropagation){B.stopPropagation()}else{B.cancelBubble=true}},findElement:function(C,B){var A=OpenLayers.Event.element(C);while(A.parentNode&&(!A.tagName||(A.tagName.toUpperCase()!=B.toUpperCase()))){A=A.parentNode}return A},observe:function(B,D,C,A){var E=OpenLayers.Util.getElement(B);A=A||false;if(D=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||E.attachEvent)){D="keydown"}if(!this.observers){this.observers={}}if(!E._eventCacheID){var F="eventCacheID_";if(E.id){F=E.id+"_"+F}E._eventCacheID=OpenLayers.Util.createUniqueID(F)}var G=E._eventCacheID;if(!this.observers[G]){this.observers[G]=[]}this.observers[G].push({element:E,name:D,observer:C,useCapture:A});if(E.addEventListener){E.addEventListener(D,C,A)}else{if(E.attachEvent){E.attachEvent("on"+D,C)}}},stopObservingElement:function(A){var B=OpenLayers.Util.getElement(A);var C=B._eventCacheID;this._removeElementObservers(OpenLayers.Event.observers[C])},_removeElementObservers:function(E){if(E){for(var B=E.length-1;B>=0;B--){var C=E[B];var A=new Array(C.element,C.name,C.observer,C.useCapture);var D=OpenLayers.Event.stopObserving.apply(this,A)}}},stopObserving:function(H,A,G,B){B=B||false;var F=OpenLayers.Util.getElement(H);var D=F._eventCacheID;if(A=="keypress"){if(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||F.detachEvent){A="keydown"}}var J=false;var C=OpenLayers.Event.observers[D];if(C){var E=0;while(!J&&E<C.length){var I=C[E];if((I.name==A)&&(I.observer==G)&&(I.useCapture==B)){C.splice(E,1);if(C.length==0){delete OpenLayers.Event.observers[D]}J=true;break}E++}}if(J){if(F.removeEventListener){F.removeEventListener(A,G,B)}else{if(F&&F.detachEvent){F.detachEvent("on"+A,G)}}}return J},unloadCache:function(){if(OpenLayers.Event&&OpenLayers.Event.observers){for(var A in OpenLayers.Event.observers){var B=OpenLayers.Event.observers[A];OpenLayers.Event._removeElementObservers.apply(this,[B])}OpenLayers.Event.observers=false}},CLASS_NAME:"OpenLayers.Event"};OpenLayers.Event.observe(window,"unload",OpenLayers.Event.unloadCache,false);if(window.Event){OpenLayers.Util.applyDefaults(window.Event,OpenLayers.Event)}else{var Event=OpenLayers.Event}OpenLayers.Events=OpenLayers.Class({BROWSER_EVENTS:["mouseover","mouseout","mousedown","mouseup","mousemove","click","dblclick","rightclick","dblrightclick","resize","focus","blur"],listeners:null,object:null,element:null,eventTypes:null,eventHandler:null,fallThrough:null,includeXY:false,clearMouseListener:null,initialize:function(C,E,G,F,B){OpenLayers.Util.extend(this,B);this.object=C;this.fallThrough=F;this.listeners={};this.eventHandler=OpenLayers.Function.bindAsEventListener(this.handleBrowserEvent,this);this.clearMouseListener=OpenLayers.Function.bind(this.clearMouseCache,this);this.eventTypes=[];if(G!=null){for(var D=0,A=G.length;D<A;D++){this.addEventType(G[D])}}if(E!=null){this.attachToElement(E)}},destroy:function(){if(this.element){OpenLayers.Event.stopObservingElement(this.element);if(this.element.hasScrollEvent){OpenLayers.Event.stopObserving(window,"scroll",this.clearMouseListener)}}this.element=null;this.listeners=null;this.object=null;this.eventTypes=null;this.fallThrough=null;this.eventHandler=null},addEventType:function(A){if(!this.listeners[A]){this.eventTypes.push(A);this.listeners[A]=[]}},attachToElement:function(D){if(this.element){OpenLayers.Event.stopObservingElement(this.element)}this.element=D;for(var C=0,A=this.BROWSER_EVENTS.length;C<A;C++){var B=this.BROWSER_EVENTS[C];this.addEventType(B);OpenLayers.Event.observe(D,B,this.eventHandler)}OpenLayers.Event.observe(D,"dragstart",OpenLayers.Event.stop)},on:function(A){for(var B in A){if(B!="scope"){this.register(B,A.scope,A[B])}}},register:function(B,D,C){if((C!=null)&&(OpenLayers.Util.indexOf(this.eventTypes,B)!=-1)){if(D==null){D=this.object}var A=this.listeners[B];A.push({obj:D,func:C})}},registerPriority:function(B,D,C){if(C!=null){if(D==null){D=this.object}var A=this.listeners[B];if(A!=null){A.unshift({obj:D,func:C})}}},un:function(A){for(var B in A){if(B!="scope"){this.unregister(B,A.scope,A[B])}}},unregister:function(D,F,E){if(F==null){F=this.object}var C=this.listeners[D];if(C!=null){for(var B=0,A=C.length;B<A;B++){if(C[B].obj==F&&C[B].func==E){C.splice(B,1);break}}}},remove:function(A){if(this.listeners[A]!=null){this.listeners[A]=[]}},triggerEvent:function(E,B){var D=this.listeners[E];if(!D||D.length==0){return }if(B==null){B={}}B.object=this.object;B.element=this.element;if(!B.type){B.type=E}var D=D.slice(),F;for(var C=0,A=D.length;C<A;C++){var G=D[C];F=G.func.apply(G.obj,[B]);if((F!=undefined)&&(F==false)){break}}if(!this.fallThrough){OpenLayers.Event.stop(B,true)}return F},handleBrowserEvent:function(A){if(this.includeXY){A.xy=this.getMousePosition(A)}this.triggerEvent(A.type,A)},clearMouseCache:function(){this.element.scrolls=null;this.element.lefttop=null;this.element.offsets=null},getMousePosition:function(A){if(!this.includeXY){this.clearMouseCache()}else{if(!this.element.hasScrollEvent){OpenLayers.Event.observe(window,"scroll",this.clearMouseListener);this.element.hasScrollEvent=true}}if(!this.element.scrolls){this.element.scrolls=[(document.documentElement.scrollLeft||document.body.scrollLeft),(document.documentElement.scrollTop||document.body.scrollTop)]}if(!this.element.lefttop){this.element.lefttop=[(document.documentElement.clientLeft||0),(document.documentElement.clientTop||0)]}if(!this.element.offsets){this.element.offsets=OpenLayers.Util.pagePosition(this.element);this.element.offsets[0]+=this.element.scrolls[0];this.element.offsets[1]+=this.element.scrolls[1]}return new OpenLayers.Pixel((A.clientX+this.element.scrolls[0])-this.element.offsets[0]-this.element.lefttop[0],(A.clientY+this.element.scrolls[1])-this.element.offsets[1]-this.element.lefttop[1])},CLASS_NAME:"OpenLayers.Events"});OpenLayers.Lang.en={unhandledRequest:"Unhandled request return ${statusText}",permalink:"Permalink",overlays:"Overlays",baseLayer:"Base Layer",sameProjection:"The overview map only works when it is in the same projection as the main map",readNotImplemented:"Read not implemented.",writeNotImplemented:"Write not implemented.",noFID:"Can't update a feature for which there is no FID.",errorLoadingGML:"Error in loading GML file ${url}",browserNotSupported:"Your browser does not support vector rendering. Currently supported renderers are:\n${renderers}",componentShouldBe:"addFeatures : component should be an ${geomType}",getFeatureError:"getFeatureFromEvent called on layer with no renderer. This usually means you destroyed a layer, but not some handler which is associated with it.",minZoomLevelError:"The minZoomLevel property is only intended for use with the FixedZoomLevels-descendent layers. That this wfs layer checks for minZoomLevel is a relic of thepast. We cannot, however, remove it without possibly breaking OL based applications that may depend on it. Therefore we are deprecating it -- the minZoomLevel check below will be removed at 3.0. Please instead use min/max resolution setting as described here: http://trac.openlayers.org/wiki/SettingZoomLevels",commitSuccess:"WFS Transaction: SUCCESS ${response}",commitFailed:"WFS Transaction: FAILED ${response}",googleWarning:"The Google Layer was unable to load correctly.<br><br>To get rid of this message, select a new BaseLayer in the layer switcher in the upper-right corner.<br><br>Most likely, this is because the Google Maps library script was either not included, or does not contain the correct API key for your site.<br><br>Developers: For help getting this working correctly, <a href='http://trac.openlayers.org/wiki/Google' target='_blank'>click here</a>",getLayerWarning:"The ${layerType} Layer was unable to load correctly.<br><br>To get rid of this message, select a new BaseLayer in the layer switcher in the upper-right corner.<br><br>Most likely, this is because the ${layerLib} library script was not correctly included.<br><br>Developers: For help getting this working correctly, <a href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'>click here</a>",scale:"Scale = 1 : ${scaleDenom}",layerAlreadyAdded:"You tried to add the layer: ${layerName} to the map, but it has already been added",reprojectDeprecated:"You are using the 'reproject' option on the ${layerName} layer. This option is deprecated: its use was designed to support displaying data over commercial basemaps, but that functionality should now be achieved by using Spherical Mercator support. More information is available from http://trac.openlayers.org/wiki/SphericalMercator.",methodDeprecated:"This method has been deprecated and will be removed in 3.0. Please use ${newMethod} instead.",boundsAddError:"You must pass both x and y values to the add function.",lonlatAddError:"You must pass both lon and lat values to the add function.",pixelAddError:"You must pass both x and y values to the add function.",unsupportedGeometryType:"Unsupported geometry type: ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition failed: element with id ${elemId} may be misplaced.",end:"",filterEvaluateNotImplemented:"evaluate is not implemented for this filter type."};OpenLayers.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.Tile=OpenLayers.Class({EVENT_TYPES:["loadstart","loadend","reload","unload"],events:null,id:null,layer:null,url:null,bounds:null,size:null,position:null,isLoading:false,initialize:function(D,A,E,B,C){this.layer=D;this.position=A.clone();this.bounds=E.clone();this.url=B;this.size=C.clone();this.id=OpenLayers.Util.createUniqueID("Tile_");this.events=new OpenLayers.Events(this,null,this.EVENT_TYPES)},unload:function(){if(this.isLoading){this.isLoading=false;this.events.triggerEvent("unload")}},destroy:function(){this.layer=null;this.bounds=null;this.size=null;this.position=null;this.events.destroy();this.events=null},clone:function(A){if(A==null){A=new OpenLayers.Tile(this.layer,this.position,this.bounds,this.url,this.size)}OpenLayers.Util.applyDefaults(A,this);return A},draw:function(){var A=this.layer.maxExtent;var B=(A&&this.bounds.intersectsBounds(A,false));this.shouldDraw=(B||this.layer.displayOutsideMaxExtent);this.clear();return this.shouldDraw},moveTo:function(B,A,C){if(C==null){C=true}this.bounds=B.clone();this.position=A.clone();if(C){this.draw()}},clear:function(){},getBoundsFromBaseLayer:function(A){var F=OpenLayers.i18n("reprojectDeprecated",{layerName:this.layer.name});OpenLayers.Console.warn(F);var D=this.layer.map.getLonLatFromLayerPx(A);var C=A.clone();C.x+=this.size.w;C.y+=this.size.h;var B=this.layer.map.getLonLatFromLayerPx(C);if(D.lon>B.lon){if(D.lon<0){D.lon=-180-(D.lon+180)}else{B.lon=180+B.lon+180}}var E=new OpenLayers.Bounds(D.lon,B.lat,B.lon,D.lat);return E},showTile:function(){if(this.shouldDraw){this.show()}},show:function(){},hide:function(){},CLASS_NAME:"OpenLayers.Tile"});OpenLayers.Control.PanZoomBar=OpenLayers.Class(OpenLayers.Control.PanZoom,{zoomStopWidth:18,zoomStopHeight:11,slider:null,sliderEvents:null,zoomBarDiv:null,divEvents:null,zoomWorldIcon:false,initialize:function(){OpenLayers.Control.PanZoom.prototype.initialize.apply(this,arguments)},destroy:function(){this._removeZoomBar();this.map.events.un({changebaselayer:this.redraw,scope:this});OpenLayers.Control.PanZoom.prototype.destroy.apply(this,arguments)},setMap:function(A){OpenLayers.Control.PanZoom.prototype.setMap.apply(this,arguments);this.map.events.register("changebaselayer",this,this.redraw)},redraw:function(){if(this.div!=null){this.removeButtons();this._removeZoomBar()}this.draw()},draw:function(B){OpenLayers.Control.prototype.draw.apply(this,arguments);B=this.position.clone();this.buttons=[];var D=new OpenLayers.Size(18,18);var A=new OpenLayers.Pixel(B.x+D.w/2,B.y);var C=D.w;if(this.zoomWorldIcon){A=new OpenLayers.Pixel(B.x+D.w,B.y)}this._addButton("panup","north-mini.png",A,D);B.y=A.y+D.h;this._addButton("panleft","west-mini.png",B,D);if(this.zoomWorldIcon){this._addButton("zoomworld","zoom-world-mini.png",B.add(D.w,0),D);C*=2}this._addButton("panright","east-mini.png",B.add(C,0),D);this._addButton("pandown","south-mini.png",A.add(0,D.h*2),D);this._addButton("zoomin","zoom-plus-mini.png",A.add(0,D.h*3+5),D);A=this._addZoomBar(A.add(0,D.h*4+5));this._addButton("zoomout","zoom-minus-mini.png",A,D);return this.div},_addZoomBar:function(A){var E=OpenLayers.Util.getImagesLocation();var G=this.id+"_"+this.map.id;var B=this.map.getNumZoomLevels()-1-this.map.getZoom();var C=OpenLayers.Util.createAlphaImageDiv(G,A.add(-1,B*this.zoomStopHeight),new OpenLayers.Size(20,9),E+"slider.png","absolute");this.slider=C;this.sliderEvents=new OpenLayers.Events(this,C,null,true,{includeXY:true});this.sliderEvents.on({mousedown:this.zoomBarDown,mousemove:this.zoomBarDrag,mouseup:this.zoomBarUp,dblclick:this.doubleClick,click:this.doubleClick});var D=new OpenLayers.Size();D.h=this.zoomStopHeight*this.map.getNumZoomLevels();D.w=this.zoomStopWidth;var F=null;if(OpenLayers.Util.alphaHack()){var G=this.id+"_"+this.map.id;F=OpenLayers.Util.createAlphaImageDiv(G,A,new OpenLayers.Size(D.w,this.zoomStopHeight),E+"zoombar.png","absolute",null,"crop");F.style.height=D.h+"px"}else{F=OpenLayers.Util.createDiv("OpenLayers_Control_PanZoomBar_Zoombar"+this.map.id,A,D,E+"zoombar.png")}this.zoombarDiv=F;this.divEvents=new OpenLayers.Events(this,F,null,true,{includeXY:true});this.divEvents.on({mousedown:this.divClick,mousemove:this.passEventToSlider,dblclick:this.doubleClick,click:this.doubleClick});this.div.appendChild(F);this.startTop=parseInt(F.style.top);this.div.appendChild(C);this.map.events.register("zoomend",this,this.moveZoomBar);A=A.add(0,this.zoomStopHeight*this.map.getNumZoomLevels());return A},_removeZoomBar:function(){this.sliderEvents.un({mousedown:this.zoomBarDown,mousemove:this.zoomBarDrag,mouseup:this.zoomBarUp,dblclick:this.doubleClick,click:this.doubleClick});this.sliderEvents.destroy();this.divEvents.un({mousedown:this.divClick,mousemove:this.passEventToSlider,dblclick:this.doubleClick,click:this.doubleClick});this.divEvents.destroy();this.div.removeChild(this.zoombarDiv);this.zoombarDiv=null;this.div.removeChild(this.slider);this.slider=null;this.map.events.unregister("zoomend",this,this.moveZoomBar)},passEventToSlider:function(A){this.sliderEvents.handleBrowserEvent(A)},divClick:function(A){if(!OpenLayers.Event.isLeftClick(A)){return }var E=A.xy.y;var D=OpenLayers.Util.pagePosition(A.object)[1];var C=(E-D)/this.zoomStopHeight;if(!this.map.fractionalZoom){C=Math.floor(C)}var B=(this.map.getNumZoomLevels()-1)-C;B=Math.min(Math.max(B,0),this.map.getNumZoomLevels()-1);this.map.zoomTo(B);OpenLayers.Event.stop(A)},zoomBarDown:function(A){if(!OpenLayers.Event.isLeftClick(A)){return }this.map.events.on({mousemove:this.passEventToSlider,mouseup:this.passEventToSlider,scope:this});this.mouseDragStart=A.xy.clone();this.zoomStart=A.xy.clone();this.div.style.cursor="move";this.zoombarDiv.offsets=null;OpenLayers.Event.stop(A)},zoomBarDrag:function(B){if(this.mouseDragStart!=null){var A=this.mouseDragStart.y-B.xy.y;var D=OpenLayers.Util.pagePosition(this.zoombarDiv);if((B.clientY-D[1])>0&&(B.clientY-D[1])<parseInt(this.zoombarDiv.style.height)-2){var C=parseInt(this.slider.style.top)-A;this.slider.style.top=C+"px";this.mouseDragStart=B.xy.clone()}OpenLayers.Event.stop(B)}},zoomBarUp:function(B){if(!OpenLayers.Event.isLeftClick(B)){return }if(this.zoomStart){this.div.style.cursor="";this.map.events.un({mouseup:this.passEventToSlider,mousemove:this.passEventToSlider,scope:this});var A=this.zoomStart.y-B.xy.y;var C=this.map.zoom;if(this.map.fractionalZoom){C+=A/this.zoomStopHeight;C=Math.min(Math.max(C,0),this.map.getNumZoomLevels()-1)}else{C+=Math.round(A/this.zoomStopHeight)}this.map.zoomTo(C);this.moveZoomBar();this.mouseDragStart=null;OpenLayers.Event.stop(B)}},moveZoomBar:function(){var A=((this.map.getNumZoomLevels()-1)-this.map.getZoom())*this.zoomStopHeight+this.startTop+1;this.slider.style.top=A+"px"},CLASS_NAME:"OpenLayers.Control.PanZoomBar"});OpenLayers.Handler=OpenLayers.Class({id:null,control:null,map:null,keyMask:null,active:false,evt:null,initialize:function(C,B,A){OpenLayers.Util.extend(this,A);this.control=C;this.callbacks=B;if(C.map){this.setMap(C.map)}OpenLayers.Util.extend(this,A);this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")},setMap:function(A){this.map=A},checkModifiers:function(A){if(this.keyMask==null){return true}var B=(A.shiftKey?OpenLayers.Handler.MOD_SHIFT:0)|(A.ctrlKey?OpenLayers.Handler.MOD_CTRL:0)|(A.altKey?OpenLayers.Handler.MOD_ALT:0);return(B==this.keyMask)},activate:function(){if(this.active){return false}var C=OpenLayers.Events.prototype.BROWSER_EVENTS;for(var B=0,A=C.length;B<A;B++){if(this[C[B]]){this.register(C[B],this[C[B]])}}this.active=true;return true},deactivate:function(){if(!this.active){return false}var C=OpenLayers.Events.prototype.BROWSER_EVENTS;for(var B=0,A=C.length;B<A;B++){if(this[C[B]]){this.unregister(C[B],this[C[B]])}}this.active=false;return true},callback:function(B,A){if(B&&this.callbacks[B]){this.callbacks[B].apply(this.control,A)}},register:function(A,B){this.map.events.registerPriority(A,this,B);this.map.events.registerPriority(A,this,this.setEvent)},unregister:function(A,B){this.map.events.unregister(A,this,B);this.map.events.unregister(A,this,this.setEvent)},setEvent:function(A){this.evt=A;return true},destroy:function(){this.deactivate();this.control=this.map=null},CLASS_NAME:"OpenLayers.Handler"});OpenLayers.Handler.MOD_NONE=0;OpenLayers.Handler.MOD_SHIFT=1;OpenLayers.Handler.MOD_CTRL=2;OpenLayers.Handler.MOD_ALT=4;OpenLayers.Map=OpenLayers.Class({Z_INDEX_BASE:{BaseLayer:100,Overlay:325,Feature:725,Popup:750,Control:1000},EVENT_TYPES:["preaddlayer","addlayer","removelayer","changelayer","movestart","move","moveend","zoomend","popupopen","popupclose","addmarker","removemarker","clearmarkers","mouseover","mouseout","mousemove","dragstart","drag","dragend","changebaselayer"],id:null,fractionalZoom:false,events:null,allOverlays:false,div:null,dragging:false,size:null,viewPortDiv:null,layerContainerOrigin:null,layerContainerDiv:null,layers:null,controls:null,popups:null,baseLayer:null,center:null,resolution:null,zoom:0,panRatio:1.5,viewRequestID:0,tileSize:null,projection:"EPSG:4326",units:"degrees",resolutions:null,maxResolution:1.40625,minResolution:null,maxScale:null,minScale:null,maxExtent:null,minExtent:null,restrictedExtent:null,numZoomLevels:16,theme:null,displayProjection:null,fallThrough:true,panTween:null,eventListeners:null,panMethod:OpenLayers.Easing.Expo.easeOut,panDuration:50,paddingForPopups:null,initialize:function(H,D){if(arguments.length===1&&typeof H==="object"){D=H;H=D&&D.div}this.tileSize=new OpenLayers.Size(OpenLayers.Map.TILE_WIDTH,OpenLayers.Map.TILE_HEIGHT);this.maxExtent=new OpenLayers.Bounds(-180,-90,180,90);this.paddingForPopups=new OpenLayers.Bounds(15,15,15,15);OpenLayers.Util.extend(this,D);this.id=OpenLayers.Util.createUniqueID("OpenLayers.Map_");this.div=OpenLayers.Util.getElement(H);if(!this.div){this.div=document.createElement("div");this.div.style.height="1px";this.div.style.width="1px"}OpenLayers.Element.addClass(this.div,"olMap");var G=this.div.id+"_OpenLayers_ViewPort";this.viewPortDiv=OpenLayers.Util.createDiv(G,null,null,null,"relative",null,"hidden");this.viewPortDiv.style.width="100%";this.viewPortDiv.style.height="100%";this.viewPortDiv.className="olMapViewport";this.div.appendChild(this.viewPortDiv);G=this.div.id+"_OpenLayers_Container";this.layerContainerDiv=OpenLayers.Util.createDiv(G);this.layerContainerDiv.style.zIndex=this.Z_INDEX_BASE.Popup-1;this.viewPortDiv.appendChild(this.layerContainerDiv);this.events=new OpenLayers.Events(this,this.div,this.EVENT_TYPES,this.fallThrough,{includeXY:true});this.updateSize();if(this.eventListeners instanceof Object){this.events.on(this.eventListeners)}this.events.register("movestart",this,this.updateSize);if(OpenLayers.String.contains(navigator.appName,"Microsoft")){this.events.register("resize",this,this.updateSize)}else{this.updateSizeDestroy=OpenLayers.Function.bind(this.updateSize,this);OpenLayers.Event.observe(window,"resize",this.updateSizeDestroy)}if(this.theme){var F=true;var C=document.getElementsByTagName("link");for(var E=0,A=C.length;E<A;++E){if(OpenLayers.Util.isEquivalentUrl(C.item(E).href,this.theme)){F=false;break}}if(F){var B=document.createElement("link");B.setAttribute("rel","stylesheet");B.setAttribute("type","text/css");B.setAttribute("href",this.theme);document.getElementsByTagName("head")[0].appendChild(B)}}this.layers=[];if(this.controls==null){if(OpenLayers.Control!=null){this.controls=[new OpenLayers.Control.Navigation(),new OpenLayers.Control.PanZoom(),new OpenLayers.Control.ArgParser(),new OpenLayers.Control.Attribution()]}else{this.controls=[]}}for(var E=0,A=this.controls.length;E<A;E++){this.addControlToMap(this.controls[E])}this.popups=[];this.unloadDestroy=OpenLayers.Function.bind(this.destroy,this);OpenLayers.Event.observe(window,"unload",this.unloadDestroy)},render:function(A){this.div=OpenLayers.Util.getElement(A);OpenLayers.Element.addClass(this.div,"olMap");this.events.attachToElement(this.div);this.viewPortDiv.parentNode.removeChild(this.viewPortDiv);this.div.appendChild(this.viewPortDiv);this.updateSize()},unloadDestroy:null,updateSizeDestroy:null,destroy:function(){if(!this.unloadDestroy){return false}OpenLayers.Event.stopObserving(window,"unload",this.unloadDestroy);this.unloadDestroy=null;if(this.updateSizeDestroy){OpenLayers.Event.stopObserving(window,"resize",this.updateSizeDestroy)}else{this.events.unregister("resize",this,this.updateSize)}this.paddingForPopups=null;if(this.controls!=null){for(var A=this.controls.length-1;A>=0;--A){this.controls[A].destroy()}this.controls=null}if(this.layers!=null){for(var A=this.layers.length-1;A>=0;--A){this.layers[A].destroy(false)}this.layers=null}if(this.viewPortDiv){this.div.removeChild(this.viewPortDiv)}this.viewPortDiv=null;if(this.eventListeners){this.events.un(this.eventListeners);this.eventListeners=null}this.events.destroy();this.events=null},setOptions:function(A){OpenLayers.Util.extend(this,A)},getTileSize:function(){return this.tileSize},getBy:function(E,C,A){var D=(typeof A.test=="function");var B=OpenLayers.Array.filter(this[E],function(F){return F[C]==A||(D&&A.test(F[C]))});return B},getLayersBy:function(B,A){return this.getBy("layers",B,A)},getLayersByName:function(A){return this.getLayersBy("name",A)},getLayersByClass:function(A){return this.getLayersBy("CLASS_NAME",A)},getControlsBy:function(B,A){return this.getBy("controls",B,A)},getControlsByClass:function(A){return this.getControlsBy("CLASS_NAME",A)},getLayer:function(E){var B=null;for(var D=0,A=this.layers.length;D<A;D++){var C=this.layers[D];if(C.id==E){B=C;break}}return B},setLayerZIndex:function(B,A){B.setZIndex(this.Z_INDEX_BASE[B.isBaseLayer?"BaseLayer":"Overlay"]+A*5)},resetLayersZIndex:function(){for(var C=0,A=this.layers.length;C<A;C++){var B=this.layers[C];this.setLayerZIndex(B,C)}},addLayer:function(C){for(var B=0,A=this.layers.length;B<A;B++){if(this.layers[B]==C){var D=OpenLayers.i18n("layerAlreadyAdded",{layerName:C.name});OpenLayers.Console.warn(D);return false}}if(this.allOverlays){C.isBaseLayer=false}this.events.triggerEvent("preaddlayer",{layer:C});C.div.className="olLayerDiv";C.div.style.overflow="";this.setLayerZIndex(C,this.layers.length);if(C.isFixed){this.viewPortDiv.appendChild(C.div)}else{this.layerContainerDiv.appendChild(C.div)}this.layers.push(C);C.setMap(this);if(C.isBaseLayer||(this.allOverlays&&!this.baseLayer)){if(this.baseLayer==null){this.setBaseLayer(C)}else{C.setVisibility(false)}}else{C.redraw()}this.events.triggerEvent("addlayer",{layer:C});C.afterAdd()},addLayers:function(C){for(var B=0,A=C.length;B<A;B++){this.addLayer(C[B])}},removeLayer:function(C,E){if(E==null){E=true}if(C.isFixed){this.viewPortDiv.removeChild(C.div)}else{this.layerContainerDiv.removeChild(C.div)}OpenLayers.Util.removeItem(this.layers,C);C.removeMap(this);C.map=null;if(this.baseLayer==C){this.baseLayer=null;if(E){for(var B=0,A=this.layers.length;B<A;B++){var D=this.layers[B];if(D.isBaseLayer||this.allOverlays){this.setBaseLayer(D);break}}}}this.resetLayersZIndex();this.events.triggerEvent("removelayer",{layer:C})},getNumLayers:function(){return this.layers.length},getLayerIndex:function(A){return OpenLayers.Util.indexOf(this.layers,A)},setLayerIndex:function(D,B){var E=this.getLayerIndex(D);if(B<0){B=0}else{if(B>this.layers.length){B=this.layers.length}}if(E!=B){this.layers.splice(E,1);this.layers.splice(B,0,D);for(var C=0,A=this.layers.length;C<A;C++){this.setLayerZIndex(this.layers[C],C)}this.events.triggerEvent("changelayer",{layer:D,property:"order"});if(this.allOverlays){if(B===0){this.setBaseLayer(D)}else{if(this.baseLayer!==this.layers[0]){this.setBaseLayer(this.layers[0])}}}}},raiseLayer:function(B,C){var A=this.getLayerIndex(B)+C;this.setLayerIndex(B,A)},setBaseLayer:function(E){var D=null;if(this.baseLayer){D=this.baseLayer.getExtent()}if(E!=this.baseLayer){if(OpenLayers.Util.indexOf(this.layers,E)!=-1){if(this.baseLayer!=null&&!this.allOverlays){this.baseLayer.setVisibility(false)}this.baseLayer=E;this.viewRequestID++;if(!this.allOverlays){this.baseLayer.visibility=true}var A=this.getCenter();if(A!=null){var B=(D)?D.getCenterLonLat():A;var C=(D)?this.getZoomForExtent(D,true):this.getZoomForResolution(this.resolution,true);this.setCenter(B,C,false,true)}this.events.triggerEvent("changebaselayer",{layer:this.baseLayer})}}},addControl:function(B,A){this.controls.push(B);this.addControlToMap(B,A)},addControlToMap:function(B,A){B.outsideViewport=(B.div!=null);if(this.displayProjection&&!B.displayProjection){B.displayProjection=this.displayProjection}B.setMap(this);var C=B.draw(A);if(C){if(!B.outsideViewport){C.style.zIndex=this.Z_INDEX_BASE.Control+this.controls.length;this.viewPortDiv.appendChild(C)}}},getControl:function(E){var B=null;for(var C=0,A=this.controls.length;C<A;C++){var D=this.controls[C];if(D.id==E){B=D;break}}return B},removeControl:function(A){if((A)&&(A==this.getControl(A.id))){if(A.div&&(A.div.parentNode==this.viewPortDiv)){this.viewPortDiv.removeChild(A.div)}OpenLayers.Util.removeItem(this.controls,A)}},addPopup:function(A,D){if(D){for(var B=this.popups.length-1;B>=0;--B){this.removePopup(this.popups[B])}}A.map=this;this.popups.push(A);var C=A.draw();if(C){C.style.zIndex=this.Z_INDEX_BASE.Popup+this.popups.length;this.layerContainerDiv.appendChild(C)}},removePopup:function(A){OpenLayers.Util.removeItem(this.popups,A);if(A.div){try{this.layerContainerDiv.removeChild(A.div)}catch(B){}}A.map=null},getSize:function(){var A=null;if(this.size!=null){A=this.size.clone()}return A},updateSize:function(){this.events.clearMouseCache();var C=this.getCurrentSize();var F=this.getSize();if(F==null){this.size=F=C}if(!C.equals(F)){this.size=C;for(var D=0,B=this.layers.length;D<B;D++){this.layers[D].onMapResize()}if(this.baseLayer!=null){var A=new OpenLayers.Pixel(C.w/2,C.h/2);var G=this.getLonLatFromViewPortPx(A);var E=this.getZoom();this.zoom=null;this.setCenter(this.getCenter(),E)}}},getCurrentSize:function(){var A=new OpenLayers.Size(this.div.clientWidth,this.div.clientHeight);if(A.w==0&&A.h==0||isNaN(A.w)&&isNaN(A.h)){var B=OpenLayers.Element.getDimensions(this.div);A.w=B.width;A.h=B.height}if(A.w==0&&A.h==0||isNaN(A.w)&&isNaN(A.h)){A.w=parseInt(this.div.style.width);A.h=parseInt(this.div.style.height)}return A},calculateBounds:function(A,B){var E=null;if(A==null){A=this.getCenter()}if(B==null){B=this.getResolution()}if((A!=null)&&(B!=null)){var D=this.getSize();var F=D.w*B;var C=D.h*B;E=new OpenLayers.Bounds(A.lon-F/2,A.lat-C/2,A.lon+F/2,A.lat+C/2)}return E},getCenter:function(){var A=null;if(this.center){A=this.center.clone()}return A},getZoom:function(){return this.zoom},pan:function(D,C,E){E=OpenLayers.Util.applyDefaults(E,{animate:true,dragging:false});var F=this.getViewPortPxFromLonLat(this.getCenter());var B=F.add(D,C);if(!E.dragging||!B.equals(F)){var A=this.getLonLatFromViewPortPx(B);if(E.animate){this.panTo(A)}else{this.setCenter(A,null,E.dragging)}}},panTo:function(B){if(this.panMethod&&this.getExtent().scale(this.panRatio).containsLonLat(B)){if(!this.panTween){this.panTween=new OpenLayers.Tween(this.panMethod)}var A=this.getCenter();if(B.lon==A.lon&&B.lat==A.lat){return }var D={lon:A.lon,lat:A.lat};var C={lon:B.lon,lat:B.lat};this.panTween.start(D,C,this.panDuration,{callbacks:{start:OpenLayers.Function.bind(function(E){this.events.triggerEvent("movestart")},this),eachStep:OpenLayers.Function.bind(function(E){E=new OpenLayers.LonLat(E.lon,E.lat);this.moveTo(E,this.zoom,{dragging:true,noEvent:true})},this),done:OpenLayers.Function.bind(function(E){E=new OpenLayers.LonLat(E.lon,E.lat);this.moveTo(E,this.zoom,{noEvent:true});this.events.triggerEvent("moveend")},this)}})}else{this.setCenter(B)}},setCenter:function(C,A,B,D){this.moveTo(C,A,{dragging:B,forceZoomChange:D,caller:"setCenter"})},moveTo:function(G,M,P){if(!P){P={}}var L=P.dragging;var C=P.forceZoomChange;var H=P.noEvent;if(this.panTween&&P.caller=="setCenter"){this.panTween.stop()}if(!this.center&&!this.isValidLonLat(G)){G=this.maxExtent.getCenterLonLat()}if(this.restrictedExtent!=null){if(G==null){G=this.getCenter()}if(M==null){M=this.getZoom()}var D=this.getResolutionForZoom(M);var N=this.calculateBounds(G,D);if(!this.restrictedExtent.containsBounds(N)){var O=this.restrictedExtent.getCenterLonLat();if(N.getWidth()>this.restrictedExtent.getWidth()){G=new OpenLayers.LonLat(O.lon,G.lat)}else{if(N.left<this.restrictedExtent.left){G=G.add(this.restrictedExtent.left-N.left,0)}else{if(N.right>this.restrictedExtent.right){G=G.add(this.restrictedExtent.right-N.right,0)}}}if(N.getHeight()>this.restrictedExtent.getHeight()){G=new OpenLayers.LonLat(G.lon,O.lat)}else{if(N.bottom<this.restrictedExtent.bottom){G=G.add(0,this.restrictedExtent.bottom-N.bottom)}else{if(N.top>this.restrictedExtent.top){G=G.add(0,this.restrictedExtent.top-N.top)}}}}}var B=C||((this.isValidZoomLevel(M))&&(M!=this.getZoom()));var E=(this.isValidLonLat(G))&&(!G.equals(this.center));if(B||E||!L){if(!this.dragging&&!H){this.events.triggerEvent("movestart")}if(E){if((!B)&&(this.center)){this.centerLayerContainer(G)}this.center=G.clone()}if((B)||(this.layerContainerOrigin==null)){this.layerContainerOrigin=this.center.clone();this.layerContainerDiv.style.left="0px";this.layerContainerDiv.style.top="0px"}if(B){this.zoom=M;this.resolution=this.getResolutionForZoom(M);this.viewRequestID++}var A=this.getExtent();if(this.baseLayer.visibility){this.baseLayer.moveTo(A,B,L);if(L){this.baseLayer.events.triggerEvent("move")}else{this.baseLayer.events.triggerEvent("moveend",{zoomChanged:B})}}A=this.baseLayer.getExtent();for(var F=0,J=this.layers.length;F<J;F++){var I=this.layers[F];if(I!==this.baseLayer&&!I.isBaseLayer){var K=I.calculateInRange();if(I.inRange!=K){I.inRange=K;if(!K){I.display(false)}this.events.triggerEvent("changelayer",{layer:I,property:"visibility"})}if(K&&I.visibility){I.moveTo(A,B,L);if(L){I.events.triggerEvent("move")}else{I.events.triggerEvent("moveend",{zoomChanged:B})}}}}if(B){for(var F=0,J=this.popups.length;F<J;F++){this.popups[F].updatePosition()}}this.events.triggerEvent("move");if(B){this.events.triggerEvent("zoomend")}}if(!L&&!H){this.events.triggerEvent("moveend")}this.dragging=!!L},centerLayerContainer:function(B){var A=this.getViewPortPxFromLonLat(this.layerContainerOrigin);var C=this.getViewPortPxFromLonLat(B);if((A!=null)&&(C!=null)){this.layerContainerDiv.style.left=Math.round(A.x-C.x)+"px";this.layerContainerDiv.style.top=Math.round(A.y-C.y)+"px"}},isValidZoomLevel:function(A){return((A!=null)&&(A>=0)&&(A<this.getNumZoomLevels()))},isValidLonLat:function(C){var B=false;if(C!=null){var A=this.getMaxExtent();B=A.containsLonLat(C)}return B},getProjection:function(){var A=this.getProjectionObject();return A?A.getCode():null},getProjectionObject:function(){var A=null;if(this.baseLayer!=null){A=this.baseLayer.projection}return A},getMaxResolution:function(){var A=null;if(this.baseLayer!=null){A=this.baseLayer.maxResolution}return A},getMaxExtent:function(B){var A=null;if(B&&B.restricted&&this.restrictedExtent){A=this.restrictedExtent}else{if(this.baseLayer!=null){A=this.baseLayer.maxExtent}}return A},getNumZoomLevels:function(){var A=null;if(this.baseLayer!=null){A=this.baseLayer.numZoomLevels}return A},getExtent:function(){var A=null;if(this.baseLayer!=null){A=this.baseLayer.getExtent()}return A},getResolution:function(){var A=null;if(this.baseLayer!=null){A=this.baseLayer.getResolution()}return A},getUnits:function(){var A=null;if(this.baseLayer!=null){A=this.baseLayer.units}return A},getScale:function(){var C=null;if(this.baseLayer!=null){var B=this.getResolution();var A=this.baseLayer.units;C=OpenLayers.Util.getScaleFromResolution(B,A)}return C},getZoomForExtent:function(C,B){var A=null;if(this.baseLayer!=null){A=this.baseLayer.getZoomForExtent(C,B)}return A},getResolutionForZoom:function(B){var A=null;if(this.baseLayer){A=this.baseLayer.getResolutionForZoom(B)}return A},getZoomForResolution:function(A,C){var B=null;if(this.baseLayer!=null){B=this.baseLayer.getZoomForResolution(A,C)}return B},zoomTo:function(A){if(this.isValidZoomLevel(A)){this.setCenter(null,A)}},zoomIn:function(){this.zoomTo(this.getZoom()+1)},zoomOut:function(){this.zoomTo(this.getZoom()-1)},zoomToExtent:function(D,C){var B=D.getCenterLonLat();if(this.baseLayer.wrapDateLine){var A=this.getMaxExtent();D=D.clone();while(D.right<D.left){D.right+=A.getWidth()}B=D.getCenterLonLat().wrapDateLine(A)}this.setCenter(B,this.getZoomForExtent(D,C))},zoomToMaxExtent:function(C){var B=(C)?C.restricted:true;var A=this.getMaxExtent({restricted:B});this.zoomToExtent(A)},zoomToScale:function(H,G){var D=OpenLayers.Util.getResolutionFromScale(H,this.baseLayer.units);var C=this.getSize();var F=C.w*D;var B=C.h*D;var A=this.getCenter();var E=new OpenLayers.Bounds(A.lon-F/2,A.lat-B/2,A.lon+F/2,A.lat+B/2);this.zoomToExtent(E,G)},getLonLatFromViewPortPx:function(A){var B=null;if(this.baseLayer!=null){B=this.baseLayer.getLonLatFromViewPortPx(A)}return B},getViewPortPxFromLonLat:function(B){var A=null;if(this.baseLayer!=null){A=this.baseLayer.getViewPortPxFromLonLat(B)}return A},getLonLatFromPixel:function(A){return this.getLonLatFromViewPortPx(A)},getPixelFromLonLat:function(B){var A=this.getViewPortPxFromLonLat(B);A.x=Math.round(A.x);A.y=Math.round(A.y);return A},getViewPortPxFromLayerPx:function(D){var C=null;if(D!=null){var B=parseInt(this.layerContainerDiv.style.left);var A=parseInt(this.layerContainerDiv.style.top);C=D.add(B,A)}return C},getLayerPxFromViewPortPx:function(C){var D=null;if(C!=null){var B=-parseInt(this.layerContainerDiv.style.left);var A=-parseInt(this.layerContainerDiv.style.top);D=C.add(B,A);if(isNaN(D.x)||isNaN(D.y)){D=null}}return D},getLonLatFromLayerPx:function(A){A=this.getViewPortPxFromLayerPx(A);return this.getLonLatFromViewPortPx(A)},getLayerPxFromLonLat:function(B){var A=this.getPixelFromLonLat(B);return this.getLayerPxFromViewPortPx(A)},CLASS_NAME:"OpenLayers.Map"});OpenLayers.Map.TILE_WIDTH=256;OpenLayers.Map.TILE_HEIGHT=256;OpenLayers.Marker=OpenLayers.Class({icon:null,lonlat:null,events:null,map:null,initialize:function(C,B){this.lonlat=C;var A=(B)?B:OpenLayers.Marker.defaultIcon();if(this.icon==null){this.icon=A}else{this.icon.url=A.url;this.icon.size=A.size;this.icon.offset=A.offset;this.icon.calculateOffset=A.calculateOffset}this.events=new OpenLayers.Events(this,this.icon.imageDiv,null)},destroy:function(){this.erase();this.map=null;this.events.destroy();this.events=null;if(this.icon!=null){this.icon.destroy();this.icon=null}},draw:function(A){return this.icon.draw(A)},erase:function(){if(this.icon!=null){this.icon.erase()}},moveTo:function(A){if((A!=null)&&(this.icon!=null)){this.icon.moveTo(A)}this.lonlat=this.map.getLonLatFromLayerPx(A)},isDrawn:function(){var A=(this.icon&&this.icon.isDrawn());return A},onScreen:function(){var B=false;if(this.map){var A=this.map.getExtent();B=A.containsLonLat(this.lonlat)}return B},inflate:function(B){if(this.icon){var A=new OpenLayers.Size(this.icon.size.w*B,this.icon.size.h*B);this.icon.setSize(A)}},setOpacity:function(A){this.icon.setOpacity(A)},setUrl:function(A){this.icon.setUrl(A)},display:function(A){this.icon.display(A)},CLASS_NAME:"OpenLayers.Marker"});OpenLayers.Marker.defaultIcon=function(){var A=OpenLayers.Util.getImagesLocation()+"marker.png";var B=new OpenLayers.Size(21,25);var C=function(D){return new OpenLayers.Pixel(-(D.w/2),-D.h)};return new OpenLayers.Icon(A,B,null,C)};OpenLayers.Tile.Image=OpenLayers.Class(OpenLayers.Tile,{url:null,imgDiv:null,frame:null,layerAlphaHack:null,isBackBuffer:false,lastRatio:1,isFirstDraw:true,backBufferTile:null,initialize:function(D,A,E,B,C){OpenLayers.Tile.prototype.initialize.apply(this,arguments);this.url=B;this.frame=document.createElement("div");this.frame.style.overflow="hidden";this.frame.style.position="absolute";this.layerAlphaHack=this.layer.alpha&&OpenLayers.Util.alphaHack()},destroy:function(){if(this.imgDiv!=null){if(this.layerAlphaHack){OpenLayers.Event.stopObservingElement(this.imgDiv.childNodes[0].id)}OpenLayers.Event.stopObservingElement(this.imgDiv.id);if(this.imgDiv.parentNode==this.frame){this.frame.removeChild(this.imgDiv);this.imgDiv.map=null}this.imgDiv.urls=null;this.imgDiv.src=LMI.Urls.getImg("blank.gif")}this.imgDiv=null;if((this.frame!=null)&&(this.frame.parentNode==this.layer.div)){this.layer.div.removeChild(this.frame)}this.frame=null;if(this.backBufferTile){this.backBufferTile.destroy();this.backBufferTile=null}this.layer.events.unregister("loadend",this,this.resetBackBuffer);OpenLayers.Tile.prototype.destroy.apply(this,arguments)},clone:function(A){if(A==null){A=new OpenLayers.Tile.Image(this.layer,this.position,this.bounds,this.url,this.size)}A=OpenLayers.Tile.prototype.clone.apply(this,[A]);A.imgDiv=null;return A},draw:function(){if(this.layer!=this.layer.map.baseLayer&&this.layer.reproject){this.bounds=this.getBoundsFromBaseLayer(this.position)}var A=OpenLayers.Tile.prototype.draw.apply(this,arguments);if(OpenLayers.Util.indexOf(this.layer.SUPPORTED_TRANSITIONS,this.layer.transitionEffect)!=-1){if(A){if(!this.backBufferTile){this.backBufferTile=this.clone();this.backBufferTile.hide();this.backBufferTile.isBackBuffer=true;this.events.register("loadend",this,this.resetBackBuffer);this.layer.events.register("loadend",this,this.resetBackBuffer)}this.startTransition()}else{if(this.backBufferTile){this.backBufferTile.clear()}}}else{if(A&&this.isFirstDraw){this.events.register("loadend",this,this.showTile);this.isFirstDraw=false}}if(!A){return false}if(this.isLoading){this.events.triggerEvent("reload")}else{this.isLoading=true;this.events.triggerEvent("loadstart")}return this.renderTile()},resetBackBuffer:function(){this.showTile();if(this.backBufferTile&&(this.isFirstDraw||!this.layer.numLoadingTiles)){this.isFirstDraw=false;var A=this.layer.maxExtent;var B=(A&&this.bounds.intersectsBounds(A,false));if(B){this.backBufferTile.position=this.position;this.backBufferTile.bounds=this.bounds;this.backBufferTile.size=this.size;this.backBufferTile.imageSize=this.layer.imageSize||this.size;this.backBufferTile.imageOffset=this.layer.imageOffset;this.backBufferTile.resolution=this.layer.getResolution();this.backBufferTile.renderTile()}this.backBufferTile.hide()}},renderTile:function(){if(this.imgDiv==null){this.initImgDiv()}this.imgDiv.viewRequestID=this.layer.map.viewRequestID;if(this.layer.async){this.layer.getURLasync(this.bounds,this,"url",this.positionImage)}else{if(this.layer.url instanceof Array){this.imgDiv.urls=this.layer.url.slice()}this.url=this.layer.getURL(this.bounds);this.positionImage()}return true},positionImage:function(){if(this.layer==null){return }OpenLayers.Util.modifyDOMElement(this.frame,null,this.position,this.size);var A=this.layer.getImageSize();if(this.layerAlphaHack){OpenLayers.Util.modifyAlphaImageDiv(this.imgDiv,null,null,A,this.url)}else{OpenLayers.Util.modifyDOMElement(this.imgDiv,null,null,A);this.imgDiv.src=this.url}},clear:function(){if(this.imgDiv){this.hide();if(OpenLayers.Tile.Image.useBlankTile){this.imgDiv.src=LMI.Urls.getImg("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(OpenLayers.Util.indexOf(this.layer.SUPPORTED_TRANSITIONS,this.layer.transitionEffect)!=-1){if(navigator.userAgent.toLowerCase().indexOf("gecko")!=-1){this.frame.scrollLeft=this.frame.scrollLeft}}},hide:function(){this.frame.style.display="none"},CLASS_NAME:"OpenLayers.Tile.Image"});OpenLayers.Tile.Image.useBlankTile=(OpenLayers.Util.getBrowserName()=="safari"||OpenLayers.Util.getBrowserName()=="opera");OpenLayers.Control.OverviewMap=OpenLayers.Class(OpenLayers.Control,{element:null,ovmap:null,size:new OpenLayers.Size(180,90),layers:null,minRectSize:15,minRectDisplayClass:"RectReplacement",minRatio:8,maxRatio:32,mapOptions:null,autoPan:false,handlers:null,resolutionFactor:1,initialize:function(A){this.layers=[];this.handlers={};OpenLayers.Control.prototype.initialize.apply(this,[A])},destroy:function(){if(!this.mapDiv){return }this.handlers.click.destroy();this.mapDiv.removeChild(this.extentRectangle);this.extentRectangle=null;this.rectEvents.destroy();this.rectEvents=null;this.ovmap.destroy();this.ovmap=null;this.element.removeChild(this.mapDiv);this.mapDiv=null;this.div.removeChild(this.element);this.element=null;if(this.maximizeDiv){OpenLayers.Event.stopObservingElement(this.maximizeDiv);this.div.removeChild(this.maximizeDiv);this.maximizeDiv=null}if(this.minimizeDiv){OpenLayers.Event.stopObservingElement(this.minimizeDiv);this.div.removeChild(this.minimizeDiv);this.minimizeDiv=null}this.map.events.un({moveend:this.update,changebaselayer:this.baseLayerDraw,scope:this});OpenLayers.Control.prototype.destroy.apply(this,arguments)},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!(this.layers.length>0)){if(this.map.baseLayer){var D=this.map.baseLayer.clone();this.layers=[D]}else{this.map.events.register("changebaselayer",this,this.baseLayerDraw);return this.div}}this.element=document.createElement("div");this.element.className=this.displayClass+"Element";this.element.style.display="none";this.mapDiv=document.createElement("div");this.mapDiv.style.width=this.size.w+"px";this.mapDiv.style.height=this.size.h+"px";this.mapDiv.style.position="relative";this.mapDiv.style.overflow="hidden";this.mapDiv.id=OpenLayers.Util.createUniqueID("overviewMap");this.extentRectangle=document.createElement("div");this.extentRectangle.style.position="absolute";this.extentRectangle.style.zIndex=1000;this.extentRectangle.className=this.displayClass+"ExtentRectangle";this.mapDiv.appendChild(this.extentRectangle);this.element.appendChild(this.mapDiv);this.div.appendChild(this.element);if(!this.outsideViewport){this.div.className+=" "+this.displayClass+"Container";var B=LMI.Urls.getImg("mapping/layer-switcher-maximize.png");this.maximizeDiv=OpenLayers.Util.createAlphaImageDiv(this.displayClass+"MaximizeButton",null,new OpenLayers.Size(18,18),B,"absolute");this.maximizeDiv.style.display="none";this.maximizeDiv.className=this.displayClass+"MaximizeButton";OpenLayers.Event.observe(this.maximizeDiv,"click",OpenLayers.Function.bindAsEventListener(this.maximizeControl,this));this.div.appendChild(this.maximizeDiv);var B=LMI.Urls.getImg("mapping/layer-switcher-minimize.png");this.minimizeDiv=OpenLayers.Util.createAlphaImageDiv("OpenLayers_Control_minimizeDiv",null,new OpenLayers.Size(18,18),B,"absolute");this.minimizeDiv.style.display="none";this.minimizeDiv.className=this.displayClass+"MinimizeButton";OpenLayers.Event.observe(this.minimizeDiv,"click",OpenLayers.Function.bindAsEventListener(this.minimizeControl,this));this.div.appendChild(this.minimizeDiv);var E=["dblclick","mousedown"];for(var C=0,A=E.length;C<A;C++){OpenLayers.Event.observe(this.maximizeDiv,E[C],OpenLayers.Event.stop);OpenLayers.Event.observe(this.minimizeDiv,E[C],OpenLayers.Event.stop)}this.minimizeControl()}else{this.element.style.display=""}if(this.map.getExtent()){this.update()}this.map.events.register("moveend",this,this.update);return this.div},baseLayerDraw:function(){this.draw();this.map.events.unregister("changebaselayer",this,this.baseLayerDraw)},rectDrag:function(I){var D=this.handlers.drag.last.x-I.x;var B=this.handlers.drag.last.y-I.y;if(D!=0||B!=0){var G=this.rectPxBounds.top;var A=this.rectPxBounds.left;var E=Math.abs(this.rectPxBounds.getHeight());var C=this.rectPxBounds.getWidth();var F=Math.max(0,(G-B));F=Math.min(F,this.ovmap.size.h-this.hComp-E);var H=Math.max(0,(A-D));H=Math.min(H,this.ovmap.size.w-this.wComp-C);this.setRectPxBounds(new OpenLayers.Bounds(H,F+E,H+C,F))}},mapDivClick:function(I){var B=this.rectPxBounds.getCenterPixel();var E=I.xy.x-B.x;var D=I.xy.y-B.y;var G=this.rectPxBounds.top;var C=this.rectPxBounds.left;var J=Math.abs(this.rectPxBounds.getHeight());var A=this.rectPxBounds.getWidth();var F=Math.max(0,(G+D));F=Math.min(F,this.ovmap.size.h-J);var H=Math.max(0,(C+E));H=Math.min(H,this.ovmap.size.w-A);this.setRectPxBounds(new OpenLayers.Bounds(H,F+J,H+A,F));this.updateMapToRect()},maximizeControl:function(A){this.element.style.display="";this.showToggle(false);if(A!=null){OpenLayers.Event.stop(A)}},minimizeControl:function(A){this.element.style.display="none";this.showToggle(true);if(A!=null){OpenLayers.Event.stop(A)}},showToggle:function(A){this.maximizeDiv.style.display=A?"":"none";this.minimizeDiv.style.display=A?"none":""},update:function(){if(this.ovmap==null){this.createMap()}if(this.autoPan||!this.isSuitableOverview()){this.updateOverview()}this.updateRectToMap()},isSuitableOverview:function(){var B=this.map.getExtent();var A=this.map.maxExtent;var C=new OpenLayers.Bounds(Math.max(B.left,A.left),Math.max(B.bottom,A.bottom),Math.min(B.right,A.right),Math.min(B.top,A.top));if(this.ovmap.getProjection()!=this.map.getProjection()){C=C.transform(this.map.getProjectionObject(),this.ovmap.getProjectionObject())}var D=this.ovmap.getResolution()/this.map.getResolution();return((D>this.minRatio)&&(D<=this.maxRatio)&&(this.ovmap.getExtent().containsBounds(C)))},updateOverview:function(){var C=this.map.getResolution();var B=this.ovmap.getResolution();var D=B/C;if(D>this.maxRatio){B=this.minRatio*C}else{if(D<=this.minRatio){B=this.maxRatio*C}}var A;if(this.ovmap.getProjection()!=this.map.getProjection()){A=this.map.center.clone();A.transform(this.map.getProjectionObject(),this.ovmap.getProjectionObject())}else{A=this.map.center}this.ovmap.setCenter(A,this.ovmap.getZoomForResolution(B*this.resolutionFactor));this.updateRectToMap()},createMap:function(){var B=OpenLayers.Util.extend({controls:[],maxResolution:"auto",fallThrough:false},this.mapOptions);this.ovmap=new OpenLayers.Map(this.mapDiv,B);OpenLayers.Event.stopObserving(window,"unload",this.ovmap.unloadDestroy);this.ovmap.addLayers(this.layers);this.ovmap.zoomToMaxExtent();this.wComp=parseInt(OpenLayers.Element.getStyle(this.extentRectangle,"border-left-width"))+parseInt(OpenLayers.Element.getStyle(this.extentRectangle,"border-right-width"));this.wComp=(this.wComp)?this.wComp:2;this.hComp=parseInt(OpenLayers.Element.getStyle(this.extentRectangle,"border-top-width"))+parseInt(OpenLayers.Element.getStyle(this.extentRectangle,"border-bottom-width"));this.hComp=(this.hComp)?this.hComp:2;this.handlers.drag=new OpenLayers.Handler.Drag(this,{move:this.rectDrag,done:this.updateMapToRect},{map:this.ovmap});this.handlers.click=new OpenLayers.Handler.Click(this,{click:this.mapDivClick},{single:true,"double":false,stopSingle:true,stopDouble:true,pixelTolerance:1,map:this.ovmap});this.handlers.click.activate();this.rectEvents=new OpenLayers.Events(this,this.extentRectangle,null,true);this.rectEvents.register("mouseover",this,function(D){if(!this.handlers.drag.active&&!this.map.dragging){this.handlers.drag.activate()}});this.rectEvents.register("mouseout",this,function(D){if(!this.handlers.drag.dragging){this.handlers.drag.deactivate()}});if(this.ovmap.getProjection()!=this.map.getProjection()){var C=this.map.getProjectionObject().getUnits()||this.map.units||this.map.baseLayer.units;var A=this.ovmap.getProjectionObject().getUnits()||this.ovmap.units||this.ovmap.baseLayer.units;this.resolutionFactor=C&&A?OpenLayers.INCHES_PER_UNIT[C]/OpenLayers.INCHES_PER_UNIT[A]:1}},updateRectToMap:function(){var B;if(this.ovmap.getProjection()!=this.map.getProjection()){B=this.map.getExtent().transform(this.map.getProjectionObject(),this.ovmap.getProjectionObject())}else{B=this.map.getExtent()}var A=this.getRectBoundsFromMapBounds(B);if(A){this.setRectPxBounds(A)}},updateMapToRect:function(){var A=this.getMapBoundsFromRectBounds(this.rectPxBounds);if(this.ovmap.getProjection()!=this.map.getProjection()){A=A.transform(this.ovmap.getProjectionObject(),this.map.getProjectionObject())}this.map.panTo(A.getCenterLonLat())},setRectPxBounds:function(D){var G=Math.max(D.top,0);var E=Math.max(D.left,0);var B=Math.min(D.top+Math.abs(D.getHeight()),this.ovmap.size.h-this.hComp);var H=Math.min(D.left+D.getWidth(),this.ovmap.size.w-this.wComp);var C=Math.max(H-E,0);var I=Math.max(B-G,0);if(C<this.minRectSize||I<this.minRectSize){this.extentRectangle.className=this.displayClass+this.minRectDisplayClass;var F=E+(C/2)-(this.minRectSize/2);var A=G+(I/2)-(this.minRectSize/2);this.extentRectangle.style.top=Math.round(A)+"px";this.extentRectangle.style.left=Math.round(F)+"px";this.extentRectangle.style.height=this.minRectSize+"px";this.extentRectangle.style.width=this.minRectSize+"px"}else{this.extentRectangle.className=this.displayClass+"ExtentRectangle";this.extentRectangle.style.top=Math.round(G)+"px";this.extentRectangle.style.left=Math.round(E)+"px";this.extentRectangle.style.height=Math.round(I)+"px";this.extentRectangle.style.width=Math.round(C)+"px"}this.rectPxBounds=new OpenLayers.Bounds(Math.round(E),Math.round(B),Math.round(H),Math.round(G))},getRectBoundsFromMapBounds:function(D){var A=new OpenLayers.LonLat(D.left,D.bottom);var F=new OpenLayers.LonLat(D.right,D.top);var C=this.getOverviewPxFromLonLat(A);var B=this.getOverviewPxFromLonLat(F);var E=null;if(C&&B){E=new OpenLayers.Bounds(C.x,C.y,B.x,B.y)}return E},getMapBoundsFromRectBounds:function(D){var C=new OpenLayers.Pixel(D.left,D.bottom);var B=new OpenLayers.Pixel(D.right,D.top);var A=this.getLonLatFromOverviewPx(C);var E=this.getLonLatFromOverviewPx(B);return new OpenLayers.Bounds(A.lon,A.lat,E.lon,E.lat)},getLonLatFromOverviewPx:function(F){var C=this.ovmap.size;var B=this.ovmap.getResolution();var A=this.ovmap.getExtent().getCenterLonLat();var E=F.x-(C.w/2);var D=F.y-(C.h/2);return new OpenLayers.LonLat(A.lon+E*B,A.lat-D*B)},getOverviewPxFromLonLat:function(D){var B=this.ovmap.getResolution();var C=this.ovmap.getExtent();var A=null;if(C){A=new OpenLayers.Pixel(Math.round(1/B*(D.lon-C.left)),Math.round(1/B*(C.top-D.lat)))}return A},CLASS_NAME:"OpenLayers.Control.OverviewMap"});OpenLayers.Handler.Click=OpenLayers.Class(OpenLayers.Handler,{delay:300,single:true,"double":false,pixelTolerance:0,stopSingle:false,stopDouble:false,timerId:null,down:null,rightclickTimerId:null,initialize:function(C,B,A){OpenLayers.Handler.prototype.initialize.apply(this,arguments);if(this.pixelTolerance!=null){this.mousedown=function(D){this.down=D.xy;return true}}},mousedown:null,mouseup:function(B){var A=true;if(this.checkModifiers(B)&&this.control.handleRightClicks&&OpenLayers.Event.isRightClick(B)){A=this.rightclick(B)}return A},rightclick:function(B){if(this.passesTolerance(B)){if(this.rightclickTimerId!=null){this.clearTimer();this.callback("dblrightclick",[B]);return !this.stopDouble}else{var A=this["double"]?OpenLayers.Util.extend({},B):this.callback("rightclick",[B]);var C=OpenLayers.Function.bind(this.delayedRightCall,this,A);this.rightclickTimerId=window.setTimeout(C,this.delay)}}return !this.stopSingle},delayedRightCall:function(A){this.rightclickTimerId=null;if(A){this.callback("rightclick",[A])}return !this.stopSingle},dblclick:function(A){if(this.passesTolerance(A)){if(this["double"]){this.callback("dblclick",[A])}this.clearTimer()}return !this.stopDouble},click:function(B){if(this.passesTolerance(B)){if(this.timerId!=null){this.clearTimer()}else{var A=this.single?OpenLayers.Util.extend({},B):null;this.timerId=window.setTimeout(OpenLayers.Function.bind(this.delayedCall,this,A),this.delay)}}return !this.stopSingle},passesTolerance:function(B){var C=true;if(this.pixelTolerance!=null&&this.down){var A=Math.sqrt(Math.pow(this.down.x-B.xy.x,2)+Math.pow(this.down.y-B.xy.y,2));if(A>this.pixelTolerance){C=false}}return C},clearTimer:function(){if(this.timerId!=null){window.clearTimeout(this.timerId);this.timerId=null}if(this.rightclickTimerId!=null){window.clearTimeout(this.rightclickTimerId);this.rightclickTimerId=null}},delayedCall:function(A){this.timerId=null;if(A){this.callback("click",[A])}},deactivate:function(){var A=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.clearTimer();this.down=null;A=true}return A},CLASS_NAME:"OpenLayers.Handler.Click"});OpenLayers.Handler.Drag=OpenLayers.Class(OpenLayers.Handler,{started:false,stopDown:true,dragging:false,last:null,start:null,oldOnselectstart:null,interval:0,timeoutId:null,initialize:function(C,B,A){OpenLayers.Handler.prototype.initialize.apply(this,arguments)},down:function(A){},move:function(A){},up:function(A){},out:function(A){},mousedown:function(B){var A=true;this.dragging=false;if(this.checkModifiers(B)&&OpenLayers.Event.isLeftClick(B)){this.started=true;this.start=B.xy;this.last=B.xy;OpenLayers.Element.addClass(this.map.viewPortDiv,"olDragDown");this.down(B);this.callback("down",[B.xy]);OpenLayers.Event.stop(B);if(!this.oldOnselectstart){this.oldOnselectstart=(document.onselectstart)?document.onselectstart:function(){return true};document.onselectstart=function(){return false}}A=!this.stopDown}else{this.started=false;this.start=null;this.last=null}return A},mousemove:function(A){if(this.started&&!this.timeoutId&&(A.xy.x!=this.last.x||A.xy.y!=this.last.y)){if(this.interval>0){this.timeoutId=setTimeout(OpenLayers.Function.bind(this.removeTimeout,this),this.interval)}this.dragging=true;this.move(A);this.callback("move",[A.xy]);if(!this.oldOnselectstart){this.oldOnselectstart=document.onselectstart;document.onselectstart=function(){return false}}this.last=this.evt.xy}return true},removeTimeout:function(){this.timeoutId=null},mouseup:function(B){if(this.started){var A=(this.start!=this.last);this.started=false;this.dragging=false;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown");this.up(B);this.callback("up",[B.xy]);if(A){this.callback("done",[B.xy])}document.onselectstart=this.oldOnselectstart}return true},mouseout:function(B){if(this.started&&OpenLayers.Util.mouseLeft(B,this.map.div)){var A=(this.start!=this.last);this.started=false;this.dragging=false;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown");this.out(B);this.callback("out",[]);if(A){this.callback("done",[B.xy])}if(document.onselectstart){document.onselectstart=this.oldOnselectstart}}return true},click:function(A){return(this.start==this.last)},activate:function(){var A=false;if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.dragging=false;A=true}return A},deactivate:function(){var A=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.started=false;this.dragging=false;this.start=null;this.last=null;A=true;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown")}return A},CLASS_NAME:"OpenLayers.Handler.Drag"});OpenLayers.Handler.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(I){if(!this.map||!this.checkModifiers(I)){return }var F=false;var J=false;var E=false;var B=OpenLayers.Event.element(I);while((B!=null)&&!E&&!F){if(!F){try{if(B.currentStyle){C=B.currentStyle.overflow}else{var A=document.defaultView.getComputedStyle(B,null);var C=A.getPropertyValue("overflow")}F=(C&&(C=="auto")||(C=="scroll"))}catch(D){}}if(!J){for(var G=0,H=this.map.layers.length;G<H;G++){if(B==this.map.layers[G].div||B==this.map.layers[G].pane){J=true;break}}}E=(B==this.map.div);B=B.parentNode}if(!F&&E){if(J){this.wheelZoom(I)}OpenLayers.Event.stop(I)}},wheelZoom:function(A){var B=0;if(!A){A=window.event}if(A.wheelDelta){B=A.wheelDelta/120;if(window.opera&&window.opera.version()<9.2){B=-B}}else{if(A.detail){B=-A.detail/3}}if(B){if(this.mousePosition){A.xy=this.mousePosition}if(!A.xy){A.xy=this.map.getPixelFromLonLat(this.map.getCenter())}if(B<0){this.callback("down",[A,B])}else{this.callback("up",[A,B])}}},mousemove:function(A){this.mousePosition=A.xy},activate:function(A){if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){var B=this.wheelListener;OpenLayers.Event.observe(window,"DOMMouseScroll",B);OpenLayers.Event.observe(window,"mousewheel",B);OpenLayers.Event.observe(document,"mousewheel",B);return true}else{return false}},deactivate:function(A){if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){var B=this.wheelListener;OpenLayers.Event.stopObserving(window,"DOMMouseScroll",B);OpenLayers.Event.stopObserving(window,"mousewheel",B);OpenLayers.Event.stopObserving(document,"mousewheel",B);return true}else{return false}},CLASS_NAME:"OpenLayers.Handler.MouseWheel"});OpenLayers.Layer=OpenLayers.Class({id:null,name:null,div:null,opacity:null,alwaysInRange:null,EVENT_TYPES:["loadstart","loadend","loadcancel","visibilitychanged","move","moveend"],events:null,map:null,isBaseLayer:false,alpha:false,displayInLayerSwitcher:true,visibility:true,attribution:null,inRange:false,imageSize:null,imageOffset:null,options:null,eventListeners:null,gutter:0,projection:null,units:null,scales:null,resolutions:null,maxExtent:null,minExtent:null,maxResolution:null,minResolution:null,numZoomLevels:null,minScale:null,maxScale:null,displayOutsideMaxExtent:false,wrapDateLine:false,transitionEffect:null,SUPPORTED_TRANSITIONS:["resize"],initialize:function(B,A){this.addOptions(A);this.name=B;if(this.id==null){this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");this.div=OpenLayers.Util.createDiv(this.id);this.div.style.width="100%";this.div.style.height="100%";this.div.dir="ltr";this.events=new OpenLayers.Events(this,this.div,this.EVENT_TYPES);if(this.eventListeners instanceof Object){this.events.on(this.eventListeners)}}if(this.wrapDateLine){this.displayOutsideMaxExtent=true}},destroy:function(A){if(A==null){A=true}if(this.map!=null){this.map.removeLayer(this,A)}this.projection=null;this.map=null;this.name=null;this.div=null;this.options=null;if(this.events){if(this.eventListeners){this.events.un(this.eventListeners)}this.events.destroy()}this.eventListeners=null;this.events=null},clone:function(A){if(A==null){A=new OpenLayers.Layer(this.name,this.options)}OpenLayers.Util.applyDefaults(A,this);A.map=null;return A},setName:function(A){if(A!=this.name){this.name=A;if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"name"})}}},addOptions:function(A){if(this.options==null){this.options={}}OpenLayers.Util.extend(this.options,A);OpenLayers.Util.extend(this,A)},onMapResize:function(){},redraw:function(){var B=false;if(this.map){this.inRange=this.calculateInRange();var C=this.getExtent();if(C&&this.inRange&&this.visibility){var A=true;this.moveTo(C,A,false);this.events.triggerEvent("moveend",{zoomChanged:A});B=true}}return B},moveTo:function(B,A,C){var D=this.visibility;if(!this.isBaseLayer){D=D&&this.inRange}this.display(D)},setMap:function(B){if(this.map==null){this.map=B;this.maxExtent=this.maxExtent||this.map.maxExtent;this.projection=this.projection||this.map.projection;if(this.projection&&typeof this.projection=="string"){this.projection=new OpenLayers.Projection(this.projection)}this.units=this.projection.getUnits()||this.units||this.map.units;this.initResolutions();if(!this.isBaseLayer){this.inRange=this.calculateInRange();var A=((this.visibility)&&(this.inRange));this.div.style.display=A?"":"none"}this.setTileSize()}},afterAdd:function(){},removeMap:function(A){},getImageSize:function(){return(this.imageSize||this.tileSize)},setTileSize:function(A){var B=(A)?A:((this.tileSize)?this.tileSize:this.map.getTileSize());this.tileSize=B;if(this.gutter){this.imageOffset=new OpenLayers.Pixel(-this.gutter,-this.gutter);this.imageSize=new OpenLayers.Size(B.w+(2*this.gutter),B.h+(2*this.gutter))}},getVisibility:function(){return this.visibility},setVisibility:function(A){if(A!=this.visibility){this.visibility=A;this.display(A);this.redraw();if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"visibility"})}this.events.triggerEvent("visibilitychanged")}},display:function(A){var B=this.calculateInRange();if(A!=(this.div.style.display!="none")){this.div.style.display=(A&&B)?"block":"none"}},calculateInRange:function(){var B=false;if(this.alwaysInRange){B=true}else{if(this.map){var A=this.map.getResolution();B=((A>=this.minResolution)&&(A<=this.maxResolution))}}return B},setIsBaseLayer:function(A){if(A!=this.isBaseLayer){this.isBaseLayer=A;if(this.map!=null){this.map.events.triggerEvent("changebaselayer",{layer:this})}}},initResolutions:function(){var M=new Array("projection","units","scales","resolutions","maxScale","minScale","maxResolution","minResolution","minExtent","maxExtent","numZoomLevels","maxZoomLevel");var B=["projection","units"];var E=false;var D={};for(var F=0,I=M.length;F<I;F++){var O=M[F];if(this.options[O]&&OpenLayers.Util.indexOf(B,O)==-1){E=true}D[O]=this.options[O]||this.map[O]}if(this.alwaysInRange==null){this.alwaysInRange=!E}if((this.options.minScale!=null||this.options.maxScale!=null)&&this.options.scales==null){D.scales=null}if((this.options.minResolution!=null||this.options.maxResolution!=null)&&this.options.resolutions==null){D.resolutions=null}if((!D.numZoomLevels)&&(D.maxZoomLevel)){D.numZoomLevels=D.maxZoomLevel+1}if((D.scales!=null)||(D.resolutions!=null)){if(D.scales!=null){D.resolutions=[];for(var F=0,I=D.scales.length;F<I;F++){var C=D.scales[F];D.resolutions[F]=OpenLayers.Util.getResolutionFromScale(C,D.units)}}D.numZoomLevels=D.resolutions.length}else{if(D.minScale){D.maxResolution=OpenLayers.Util.getResolutionFromScale(D.minScale,D.units)}else{if(D.maxResolution=="auto"){var N=this.map.getSize();var L=D.maxExtent.getWidth()/N.w;var H=D.maxExtent.getHeight()/N.h;D.maxResolution=Math.max(L,H)}}if(D.maxScale!=null){D.minResolution=OpenLayers.Util.getResolutionFromScale(D.maxScale,D.units)}else{if((D.minResolution=="auto")&&(D.minExtent!=null)){var N=this.map.getSize();var L=D.minExtent.getWidth()/N.w;var H=D.minExtent.getHeight()/N.h;D.minResolution=Math.max(L,H)}}if(D.minResolution!=null&&this.options.numZoomLevels==undefined){var K=D.maxResolution/D.minResolution;D.numZoomLevels=Math.floor(Math.log(K)/Math.log(2))+1}D.resolutions=new Array(D.numZoomLevels);var A=2;if(typeof D.minResolution=="number"&&D.numZoomLevels>1){A=Math.pow((D.maxResolution/D.minResolution),(1/(D.numZoomLevels-1)))}for(var F=0;F<D.numZoomLevels;F++){var J=D.maxResolution/Math.pow(A,F);D.resolutions[F]=J}}D.resolutions.sort(function(Q,P){return(P-Q)});this.resolutions=D.resolutions;this.maxResolution=D.resolutions[0];var G=D.resolutions.length-1;this.minResolution=D.resolutions[G];this.scales=[];for(var F=0,I=D.resolutions.length;F<I;F++){this.scales[F]=OpenLayers.Util.getScaleFromResolution(D.resolutions[F],D.units)}this.minScale=this.scales[0];this.maxScale=this.scales[this.scales.length-1];this.numZoomLevels=D.numZoomLevels},getResolution:function(){var A=this.map.getZoom();return this.getResolutionForZoom(A)},getExtent:function(){return this.map.calculateBounds()},getZoomForExtent:function(B,C){var D=this.map.getSize();var A=Math.max(B.getWidth()/D.w,B.getHeight()/D.h);return this.getZoomForResolution(A,C)},getDataExtent:function(){},getResolutionForZoom:function(C){C=Math.max(0,Math.min(C,this.resolutions.length-1));var B;if(this.map.fractionalZoom){var A=Math.floor(C);var D=Math.ceil(C);B=this.resolutions[A]-((C-A)*(this.resolutions[A]-this.resolutions[D]))}else{B=this.resolutions[Math.round(C)]}return B},getZoomForResolution:function(E,A){var M;if(this.map.fractionalZoom){var J=0;var C=this.resolutions.length-1;var D=this.resolutions[J];var B=this.resolutions[C];var I;for(var F=0,G=this.resolutions.length;F<G;++F){I=this.resolutions[F];if(I>=E){D=I;J=F}if(I<=E){B=I;C=F;break}}var H=D-B;if(H>0){M=J+((D-E)/H)}else{M=J}}else{var K;var L=Number.POSITIVE_INFINITY;for(var F=0,G=this.resolutions.length;F<G;F++){if(A){K=Math.abs(this.resolutions[F]-E);if(K>L){break}L=K}else{if(this.resolutions[F]<E){break}}}M=Math.max(0,F-1)}return M},getLonLatFromViewPortPx:function(B){var E=null;if(B!=null){var D=this.map.getSize();var A=this.map.getCenter();if(A){var C=this.map.getResolution();var G=B.x-(D.w/2);var F=B.y-(D.h/2);E=new OpenLayers.LonLat(A.lon+G*C,A.lat-F*C);if(this.wrapDateLine){E=E.wrapDateLine(this.maxExtent)}}}return E},getViewPortPxFromLonLat:function(D){var B=null;if(D!=null){var A=this.map.getResolution();var C=this.map.getExtent();B=new OpenLayers.Pixel((1/A*(D.lon-C.left)),(1/A*(C.top-D.lat)))}return B},setOpacity:function(B){if(B!=this.opacity){this.opacity=B;for(var D=0,A=this.div.childNodes.length;D<A;++D){var C=this.div.childNodes[D].firstChild;OpenLayers.Util.modifyDOMElement(C,null,null,null,null,null,null,B)}}},getZIndex:function(){return this.div.style.zIndex},setZIndex:function(A){this.div.style.zIndex=A},adjustBounds:function(B){if(this.gutter){var A=this.gutter*this.map.getResolution();B=new OpenLayers.Bounds(B.left-A,B.bottom-A,B.right+A,B.top+A)}if(this.wrapDateLine){var C={rightTolerance:this.getResolution()};B=B.wrapDateLine(this.maxExtent,C)}return B},CLASS_NAME:"OpenLayers.Layer"});OpenLayers.Control.DragPan=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOOL,panned:false,interval:25,draw:function(){this.handler=new OpenLayers.Handler.Drag(this,{move:this.panMap,done:this.panMapDone},{interval:this.interval})},panMap:function(A){this.panned=true;this.map.pan(this.handler.last.x-A.x,this.handler.last.y-A.y,{dragging:this.handler.dragging,animate:false})},panMapDone:function(A){if(this.panned){this.panMap(A);this.panned=false}},CLASS_NAME:"OpenLayers.Control.DragPan"});OpenLayers.Handler.Box=OpenLayers.Class(OpenLayers.Handler,{dragHandler:null,boxDivClassName:"olHandlerBoxZoomBox",boxCharacteristics:null,initialize:function(C,B,A){OpenLayers.Handler.prototype.initialize.apply(this,arguments);var B={down:this.startBox,move:this.moveBox,out:this.removeBox,up:this.endBox};this.dragHandler=new OpenLayers.Handler.Drag(this,B,{keyMask:this.keyMask})},setMap:function(A){OpenLayers.Handler.prototype.setMap.apply(this,arguments);if(this.dragHandler){this.dragHandler.setMap(A)}},startBox:function(A){this.zoomBox=OpenLayers.Util.createDiv("zoomBox",this.dragHandler.start);this.zoomBox.className=this.boxDivClassName;this.zoomBox.style.zIndex=this.map.Z_INDEX_BASE.Popup-1;this.map.viewPortDiv.appendChild(this.zoomBox);OpenLayers.Element.addClass(this.map.viewPortDiv,"olDrawBox")},moveBox:function(F){var D=this.dragHandler.start.x;var B=this.dragHandler.start.y;var C=Math.abs(D-F.x);var A=Math.abs(B-F.y);this.zoomBox.style.width=Math.max(1,C)+"px";this.zoomBox.style.height=Math.max(1,A)+"px";this.zoomBox.style.left=F.x<D?F.x+"px":D+"px";this.zoomBox.style.top=F.y<B?F.y+"px":B+"px";var E=this.getBoxCharacteristics();if(E.newBoxModel){if(F.x>D){this.zoomBox.style.width=Math.max(1,C-E.xOffset)+"px"}if(F.y>B){this.zoomBox.style.height=Math.max(1,A-E.yOffset)+"px"}}},endBox:function(B){var A;if(Math.abs(this.dragHandler.start.x-B.x)>5||Math.abs(this.dragHandler.start.y-B.y)>5){var G=this.dragHandler.start;var F=Math.min(G.y,B.y);var C=Math.max(G.y,B.y);var E=Math.min(G.x,B.x);var D=Math.max(G.x,B.x);A=new OpenLayers.Bounds(E,C,D,F)}else{A=this.dragHandler.start.clone()}this.removeBox();this.callback("done",[A])},removeBox:function(){this.map.viewPortDiv.removeChild(this.zoomBox);this.zoomBox=null;this.boxCharacteristics=null;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDrawBox")},activate:function(){if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.dragHandler.activate();return true}else{return false}},deactivate:function(){if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.dragHandler.deactivate();return true}else{return false}},getBoxCharacteristics:function(){if(!this.boxCharacteristics){var A=parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-left-width"))+parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-right-width"))+1;var C=parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-top-width"))+parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-bottom-width"))+1;var B=OpenLayers.Util.getBrowserName()=="msie"?document.compatMode!="BackCompat":true;this.boxCharacteristics={xOffset:A,yOffset:C,newBoxModel:B}}return this.boxCharacteristics},CLASS_NAME:"OpenLayers.Handler.Box"});OpenLayers.Layer.EventPane=OpenLayers.Class(OpenLayers.Layer,{smoothDragPan:true,isBaseLayer:true,isFixed:true,pane:null,mapObject:null,initialize:function(B,A){OpenLayers.Layer.prototype.initialize.apply(this,arguments);if(this.pane==null){this.pane=OpenLayers.Util.createDiv(this.div.id+"_EventPane")}},destroy:function(){this.mapObject=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments)},setMap:function(A){OpenLayers.Layer.prototype.setMap.apply(this,arguments);this.pane.style.zIndex=parseInt(this.div.style.zIndex)+1;this.pane.style.display=this.div.style.display;this.pane.style.width="100%";this.pane.style.height="100%";if(OpenLayers.Util.getBrowserName()=="msie"){this.pane.style.background="url("+LMI.Urls.getImg("blank.gif")+")"}if(this.isFixed){this.map.viewPortDiv.appendChild(this.pane)}else{this.map.layerContainerDiv.appendChild(this.pane)}this.loadMapObject();if(this.mapObject==null){this.loadWarningMessage()}},removeMap:function(A){if(this.pane&&this.pane.parentNode){this.pane.parentNode.removeChild(this.pane);this.pane=null}OpenLayers.Layer.prototype.removeMap.apply(this,arguments)},loadWarningMessage:function(){this.div.style.backgroundColor="darkblue";var G=this.map.getSize();var A=Math.min(G.w,300);var E=Math.min(G.h,200);var B=new OpenLayers.Size(A,E);var D=new OpenLayers.Pixel(G.w/2,G.h/2);var C=D.add(-B.w/2,-B.h/2);var F=OpenLayers.Util.createDiv(this.name+"_warning",C,B,null,null,null,"auto");F.style.padding="7px";F.style.backgroundColor="yellow";F.innerHTML=this.getWarningHTML();this.div.appendChild(F)},getWarningHTML:function(){return""},display:function(A){OpenLayers.Layer.prototype.display.apply(this,arguments);this.pane.style.display=this.div.style.display},setZIndex:function(A){OpenLayers.Layer.prototype.setZIndex.apply(this,arguments);this.pane.style.zIndex=parseInt(this.div.style.zIndex)+1},moveTo:function(C,D,J){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);if(this.mapObject!=null){var E=this.map.getCenter();var G=this.map.getZoom();if(E!=null){var F=this.getMapObjectCenter();var B=this.getOLLonLatFromMapObjectLonLat(F);var H=this.getMapObjectZoom();var M=this.getOLZoomFromMapObjectZoom(H);if(!(E.equals(B))||!(G==M)){if(J&&this.dragPanMapObject&&this.smoothDragPan){var I=this.map.getViewPortPxFromLonLat(B);var K=this.map.getViewPortPxFromLonLat(E);this.dragPanMapObject(K.x-I.x,I.y-K.y)}else{var A=this.getMapObjectLonLatFromOLLonLat(E);var L=this.getMapObjectZoomFromOLZoom(G);this.setMapObjectCenter(A,L,J)}}}}},getLonLatFromViewPortPx:function(A){var B=null;if((this.mapObject!=null)&&(this.getMapObjectCenter()!=null)){var D=this.getMapObjectPixelFromOLPixel(A);var C=this.getMapObjectLonLatFromMapObjectPixel(D);B=this.getOLLonLatFromMapObjectLonLat(C)}return B},getViewPortPxFromLonLat:function(B){var A=null;if((this.mapObject!=null)&&(this.getMapObjectCenter()!=null)){var D=this.getMapObjectLonLatFromOLLonLat(B);var C=this.getMapObjectPixelFromMapObjectLonLat(D);A=this.getOLPixelFromMapObjectPixel(C)}return A},getOLLonLatFromMapObjectLonLat:function(D){var A=null;if(D!=null){var C=this.getLongitudeFromMapObjectLonLat(D);var B=this.getLatitudeFromMapObjectLonLat(D);A=new OpenLayers.LonLat(C,B)}return A},getMapObjectLonLatFromOLLonLat:function(A){var B=null;if(A!=null){B=this.getMapObjectLonLatFromLonLat(A.lon,A.lat)}return B},getOLPixelFromMapObjectPixel:function(D){var B=null;if(D!=null){var A=this.getXFromMapObjectPixel(D);var C=this.getYFromMapObjectPixel(D);B=new OpenLayers.Pixel(A,C)}return B},getMapObjectPixelFromOLPixel:function(A){var B=null;if(A!=null){B=this.getMapObjectPixelFromXY(A.x,A.y)}return B},CLASS_NAME:"OpenLayers.Layer.EventPane"});OpenLayers.Layer.FixedZoomLevels=OpenLayers.Class({initialize:function(){},initResolutions:function(){var C=new Array("minZoomLevel","maxZoomLevel","numZoomLevels");for(var B=0,A=C.length;B<A;B++){var F=C[B];this[F]=(this.options[F]!=null)?this.options[F]:this.map[F]}if((this.minZoomLevel==null)||(this.minZoomLevel<this.MIN_ZOOM_LEVEL)){this.minZoomLevel=this.MIN_ZOOM_LEVEL}var G;var E=this.MAX_ZOOM_LEVEL-this.minZoomLevel+1;if(((this.options.numZoomLevels==null)&&(this.options.maxZoomLevel!=null))||((this.numZoomLevels==null)&&(this.maxZoomLevel!=null))){G=this.maxZoomLevel-this.minZoomLevel+1}else{G=this.numZoomLevels}if(G!=null){this.numZoomLevels=Math.min(G,E)}else{this.numZoomLevels=E}this.maxZoomLevel=this.minZoomLevel+this.numZoomLevels-1;if(this.RESOLUTIONS!=null){var D=0;this.resolutions=[];for(var B=this.minZoomLevel;B<=this.maxZoomLevel;B++){this.resolutions[D++]=this.RESOLUTIONS[B]}this.maxResolution=this.resolutions[0];this.minResolution=this.resolutions[this.resolutions.length-1]}},getResolution:function(){if(this.resolutions!=null){return OpenLayers.Layer.prototype.getResolution.apply(this,arguments)}else{var A=null;var C=this.map.getSize();var B=this.getExtent();if((C!=null)&&(B!=null)){A=Math.max(B.getWidth()/C.w,B.getHeight()/C.h)}return A}},getExtent:function(){var C=null;var B=this.map.getSize();var E=new OpenLayers.Pixel(0,0);var F=this.getLonLatFromViewPortPx(E);var A=new OpenLayers.Pixel(B.w,B.h);var D=this.getLonLatFromViewPortPx(A);if((F!=null)&&(D!=null)){C=new OpenLayers.Bounds(F.lon,D.lat,D.lon,F.lat)}return C},getZoomForResolution:function(A){if(this.resolutions!=null){return OpenLayers.Layer.prototype.getZoomForResolution.apply(this,arguments)}else{var B=OpenLayers.Layer.prototype.getExtent.apply(this,[]);return this.getZoomForExtent(B)}},getOLZoomFromMapObjectZoom:function(A){var B=null;if(A!=null){B=A-this.minZoomLevel}return B},getMapObjectZoomFromOLZoom:function(A){var B=null;if(A!=null){B=A+this.minZoomLevel}return B},CLASS_NAME:"OpenLayers.Layer.FixedZoomLevels"});OpenLayers.Layer.Markers=OpenLayers.Class(OpenLayers.Layer,{isBaseLayer:false,markers:null,drawn:false,initialize:function(B,A){OpenLayers.Layer.prototype.initialize.apply(this,arguments);this.markers=[]},destroy:function(){this.clearMarkers();this.markers=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments)},setOpacity:function(B){if(B!=this.opacity){this.opacity=B;for(var C=0,A=this.markers.length;C<A;C++){this.markers[C].setOpacity(this.opacity)}}},moveTo:function(D,B,E){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);if(B||!this.drawn){for(var C=0,A=this.markers.length;C<A;C++){this.drawMarker(this.markers[C])}this.drawn=true}},addMarker:function(A){this.markers.push(A);if(this.opacity!=null){A.setOpacity(this.opacity)}if(this.map&&this.map.getExtent()){A.map=this.map;this.drawMarker(A)}},removeMarker:function(A){if(this.markers&&this.markers.length){OpenLayers.Util.removeItem(this.markers,A);A.erase()}},clearMarkers:function(){if(this.markers!=null){while(this.markers.length>0){this.removeMarker(this.markers[0])}}},drawMarker:function(A){var B=this.map.getLayerPxFromLonLat(A.lonlat);if(B==null){A.display(false)}else{if(!A.isDrawn()){var C=A.draw(B);this.div.appendChild(C)}else{if(A.icon){A.icon.moveTo(B)}}}},getDataExtent:function(){var B=null;if(this.markers&&(this.markers.length>0)){var B=new OpenLayers.Bounds();for(var D=0,A=this.markers.length;D<A;D++){var C=this.markers[D];B.extend(C.lonlat)}}return B},CLASS_NAME:"OpenLayers.Layer.Markers"});OpenLayers.Layer.SphericalMercator={getExtent:function(){var A=null;if(this.sphericalMercator){A=this.map.calculateBounds()}else{A=OpenLayers.Layer.FixedZoomLevels.prototype.getExtent.apply(this)}return A},initMercatorParameters:function(){this.RESOLUTIONS=[];var A=156543.0339;for(var B=0;B<=this.MAX_ZOOM_LEVEL;++B){this.RESOLUTIONS[B]=A/Math.pow(2,B)}this.units="m";this.projection="EPSG:900913"},forwardMercator:function(C,B){var A=C*20037508.34/180;var D=Math.log(Math.tan((90+B)*Math.PI/360))/(Math.PI/180);D=D*20037508.34/180;return new OpenLayers.LonLat(A,D)},inverseMercator:function(A,D){var C=(A/20037508.34)*180;var B=(D/20037508.34)*180;B=180/Math.PI*(2*Math.atan(Math.exp(B*Math.PI/180))-Math.PI/2);return new OpenLayers.LonLat(C,B)},projectForward:function(A){var B=OpenLayers.Layer.SphericalMercator.forwardMercator(A.x,A.y);A.x=B.lon;A.y=B.lat;return A},projectInverse:function(A){var B=OpenLayers.Layer.SphericalMercator.inverseMercator(A.x,A.y);A.x=B.lon;A.y=B.lat;return A}};OpenLayers.Projection.addTransform("EPSG:4326","EPSG:900913",OpenLayers.Layer.SphericalMercator.projectForward);OpenLayers.Projection.addTransform("EPSG:900913","EPSG:4326",OpenLayers.Layer.SphericalMercator.projectInverse);OpenLayers.Control.ZoomBox=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOOL,out:false,alwaysZoom:false,draw:function(){this.handler=new OpenLayers.Handler.Box(this,{done:this.zoomBox},{keyMask:this.keyMask})},zoomBox:function(H){if(H instanceof OpenLayers.Bounds){if(!this.out){var I=this.map.getLonLatFromPixel(new OpenLayers.Pixel(H.left,H.bottom));var M=this.map.getLonLatFromPixel(new OpenLayers.Pixel(H.right,H.top));var B=new OpenLayers.Bounds(I.lon,I.lat,M.lon,M.lat)}else{var G=Math.abs(H.right-H.left);var J=Math.abs(H.top-H.bottom);var E=Math.min((this.map.size.h/J),(this.map.size.w/G));var N=this.map.getExtent();var A=this.map.getLonLatFromPixel(H.getCenterPixel());var C=A.lon-(N.getWidth()/2)*E;var F=A.lon+(N.getWidth()/2)*E;var L=A.lat-(N.getHeight()/2)*E;var D=A.lat+(N.getHeight()/2)*E;var B=new OpenLayers.Bounds(C,L,F,D)}var K=this.map.getZoom();this.map.zoomToExtent(B);if(K==this.map.getZoom()&&this.alwaysZoom==true){this.map.zoomTo(K+(this.out?-1:1))}}else{if(!this.out){this.map.setCenter(this.map.getLonLatFromPixel(H),this.map.getZoom()+1)}else{this.map.setCenter(this.map.getLonLatFromPixel(H),this.map.getZoom()-1)}}},CLASS_NAME:"OpenLayers.Control.ZoomBox"});OpenLayers.Layer.Google=OpenLayers.Class(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:0,MAX_ZOOM_LEVEL:19,RESOLUTIONS:[1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125,0.00002145767211914062,0.00001072883605957031,0.00000536441802978515,0.00000268220901489257],type:null,sphericalMercator:false,dragObject:null,termsOfUse:null,poweredBy:null,initialize:function(B,A){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);this.addContainerPxFunction();if(this.sphericalMercator){OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator);this.initMercatorParameters()}},loadMapObject:function(){try{this.mapObject=new GMap2(this.div);if(typeof this.mapObject.getDragObject=="function"){this.dragObject=this.mapObject.getDragObject()}else{this.dragPanMapObject=null}this.termsOfUse=this.div.lastChild;this.div.removeChild(this.termsOfUse);if(this.isFixed){this.map.viewPortDiv.appendChild(this.termsOfUse)}else{this.map.layerContainerDiv.appendChild(this.termsOfUse)}this.termsOfUse.style.zIndex="1000";this.termsOfUse.style.display=this.div.style.display;this.termsOfUse.style.right="";this.termsOfUse.style.bottom="";this.termsOfUse.className="olLayerGoogleCopyright";this.poweredBy=this.div.lastChild;this.div.removeChild(this.poweredBy);if(this.isFixed){this.map.viewPortDiv.appendChild(this.poweredBy)}else{this.map.layerContainerDiv.appendChild(this.poweredBy)}this.poweredBy.style.zIndex="1000";this.poweredBy.style.display=this.div.style.display;this.poweredBy.style.right="";this.poweredBy.style.bottom="";this.poweredBy.className="olLayerGooglePoweredBy gmnoprint"}catch(A){OpenLayers.Console.error(A)}},setMap:function(A){OpenLayers.Layer.EventPane.prototype.setMap.apply(this,arguments);if(this.type!=null){this.map.events.register("moveend",this,this.setMapType)}},setMapType:function(){if(this.mapObject.getCenter()!=null){if(OpenLayers.Util.indexOf(this.mapObject.getMapTypes(),this.type)==-1){this.mapObject.addMapType(this.type)}this.mapObject.setMapType(this.type);this.map.events.unregister("moveend",this,this.setMapType)}},onMapResize:function(){if(this.visibility&&this.mapObject.isLoaded()){this.mapObject.checkResize()}else{if(!this._resized){var A=this;var B=GEvent.addListener(this.mapObject,"load",function(){GEvent.removeListener(B);delete A._resized;A.mapObject.checkResize();A.moveTo(A.map.getCenter(),A.map.getZoom())})}this._resized=true}},display:function(A){OpenLayers.Layer.EventPane.prototype.display.apply(this,arguments);this.termsOfUse.style.display=this.div.style.display;this.poweredBy.style.display=this.div.style.display},removeMap:function(A){if(this.termsOfUse&&this.termsOfUse.parentNode){this.termsOfUse.parentNode.removeChild(this.termsOfUse);this.termsOfUse=null}if(this.poweredBy&&this.poweredBy.parentNode){this.poweredBy.parentNode.removeChild(this.poweredBy);this.poweredBy=null}OpenLayers.Layer.EventPane.prototype.removeMap.apply(this,arguments)},getOLBoundsFromMapObjectBounds:function(B){var C=null;if(B!=null){var A=B.getSouthWest();var D=B.getNorthEast();if(this.sphericalMercator){A=this.forwardMercator(A.lng(),A.lat());D=this.forwardMercator(D.lng(),D.lat())}else{A=new OpenLayers.LonLat(A.lng(),A.lat());D=new OpenLayers.LonLat(D.lng(),D.lat())}C=new OpenLayers.Bounds(A.lon,A.lat,D.lon,D.lat)}return C},getMapObjectBoundsFromOLBounds:function(C){var B=null;if(C!=null){var A=this.sphericalMercator?this.inverseMercator(C.bottom,C.left):new OpenLayers.LonLat(C.bottom,C.left);var D=this.sphericalMercator?this.inverseMercator(C.top,C.right):new OpenLayers.LonLat(C.top,C.right);B=new GLatLngBounds(new GLatLng(A.lat,A.lon),new GLatLng(D.lat,D.lon))}return B},addContainerPxFunction:function(){if((typeof GMap2!="undefined")&&!GMap2.prototype.fromLatLngToContainerPixel){GMap2.prototype.fromLatLngToContainerPixel=function(B){var A=this.fromLatLngToDivPixel(B);var C=this.getContainer().firstChild.firstChild;A.x+=C.offsetLeft;A.y+=C.offsetTop;return A}}},getWarningHTML:function(){return OpenLayers.i18n("googleWarning")},setMapObjectCenter:function(A,B){this.mapObject.setCenter(A,B)},dragPanMapObject:function(B,A){this.dragObject.moveBy(new GSize(-B,A))},getMapObjectCenter:function(){return this.mapObject.getCenter()},getMapObjectZoom:function(){return this.mapObject.getZoom()},getMapObjectLonLatFromMapObjectPixel:function(A){return this.mapObject.fromContainerPixelToLatLng(A)},getMapObjectPixelFromMapObjectLonLat:function(A){return this.mapObject.fromLatLngToContainerPixel(A)},getMapObjectZoomFromMapObjectBounds:function(A){return this.mapObject.getBoundsZoomLevel(A)},getLongitudeFromMapObjectLonLat:function(A){return this.sphericalMercator?this.forwardMercator(A.lng(),A.lat()).lon:A.lng()},getLatitudeFromMapObjectLonLat:function(B){var A=this.sphericalMercator?this.forwardMercator(B.lng(),B.lat()).lat:B.lat();return A},getMapObjectLonLatFromLonLat:function(D,B){var C;if(this.sphericalMercator){var A=this.inverseMercator(D,B);C=new GLatLng(A.lat,A.lon)}else{C=new GLatLng(B,D)}return C},getXFromMapObjectPixel:function(A){return A.x},getYFromMapObjectPixel:function(A){return A.y},getMapObjectPixelFromXY:function(A,B){return new GPoint(A,B)},CLASS_NAME:"OpenLayers.Layer.Google"});OpenLayers.Control.Navigation=OpenLayers.Class(OpenLayers.Control,{dragPan:null,dragPanOptions:null,zoomBox:null,zoomWheelEnabled:true,handleRightClicks:false,zoomBoxKeyMask:OpenLayers.Handler.MOD_SHIFT,initialize:function(A){this.handlers={};OpenLayers.Control.prototype.initialize.apply(this,arguments)},destroy:function(){this.deactivate();if(this.dragPan){this.dragPan.destroy()}this.dragPan=null;if(this.zoomBox){this.zoomBox.destroy()}this.zoomBox=null;OpenLayers.Control.prototype.destroy.apply(this,arguments)},activate:function(){this.dragPan.activate();if(this.zoomWheelEnabled){this.handlers.wheel.activate()}this.handlers.click.activate();this.zoomBox.activate();return OpenLayers.Control.prototype.activate.apply(this,arguments)},deactivate:function(){this.zoomBox.deactivate();this.dragPan.deactivate();this.handlers.click.deactivate();this.handlers.wheel.deactivate();return OpenLayers.Control.prototype.deactivate.apply(this,arguments)},draw:function(){if(this.handleRightClicks){this.map.viewPortDiv.oncontextmenu=function(){return false}}var A={dblclick:this.defaultDblClick,dblrightclick:this.defaultDblRightClick};var B={"double":true,stopDouble:true};this.handlers.click=new OpenLayers.Handler.Click(this,A,B);this.dragPan=new OpenLayers.Control.DragPan(OpenLayers.Util.extend({map:this.map},this.dragPanOptions));this.zoomBox=new OpenLayers.Control.ZoomBox({map:this.map,keyMask:this.zoomBoxKeyMask});this.dragPan.draw();this.zoomBox.draw();this.handlers.wheel=new OpenLayers.Handler.MouseWheel(this,{up:this.wheelUp,down:this.wheelDown});this.activate()},defaultDblClick:function(B){var A=this.map.getLonLatFromViewPortPx(B.xy);this.map.setCenter(A,this.map.zoom+1)},defaultDblRightClick:function(B){var A=this.map.getLonLatFromViewPortPx(B.xy);this.map.setCenter(A,this.map.zoom-1)},wheelChange:function(H,C){var F=this.map.getZoom()+C;if(!this.map.isValidZoomLevel(F)){return }var I=this.map.getSize();var E=I.w/2-H.xy.x;var D=H.xy.y-I.h/2;var G=this.map.baseLayer.getResolutionForZoom(F);var A=this.map.getLonLatFromPixel(H.xy);var B=new OpenLayers.LonLat(A.lon+E*G,A.lat+D*G);this.map.setCenter(B,F)},wheelUp:function(A){this.wheelChange(A,1)},wheelDown:function(A){this.wheelChange(A,-1)},disableZoomWheel:function(){this.zoomWheelEnabled=false;this.handlers.wheel.deactivate()},enableZoomWheel:function(){this.zoomWheelEnabled=true;if(this.active){this.handlers.wheel.activate()}},CLASS_NAME:"OpenLayers.Control.Navigation"});function DSMapObject_Iterator(A,B){this.coll=A;this.pos=(B?B:0)}function DSMapObject_HasNext(){if(this.coll&&(this.pos+1)<=this.coll.order.length){return true}this.pos=0;return false}function DSMapObject_Next(){return(this.coll.objects[this.coll.order[this.pos++]])}function DSMapObject_GetId(){return this.coll.order[this.pos-1]}function DSMapObject_SetIteratorOffset(A){this.pos=A}function DSMapObject_GetIteratorOffset(){return this.pos}function DSMapObject_Add(A){this.objects[this.currIdx]=A;this.order.push(this.currIdx);return this.currIdx++}function DSMapObject_Remove(C){var B,A;if(this.objects[C]){delete this.objects[C];for(B=0,A=this.order.length;B<A;++B){if(this.order[B]===C){this.order.splice(B,1)}}return true}return false}function DSMapObject_RemoveAll(){this.objects={};this.order=[];this.currPos=this.currIdx=0}function DSMapObject_GetByIndex(A){return this.objects[this.order[A]]}function DSMapObject_GetById(A){return this.objects[A]?this.objects[A]:null}function DSMapObject_Size(){return this.order.length}function DSMapObject_GetByProperty(A,C){for(var B=0;B<this.order.length;++B){if(this.objects[this.order[B]].getProperty(A)===C){return this.objects[this.order[B]]}}return null}function DSMapObject_GetIdsByProperty(A,D){var B,C=[];for(B=0;B<this.order.length;++B){if(this.objects[this.order[B]].getProperty(A)===D){C.push(this.order[B])}}return C}function DSMapObject_Collection(){this.objects={};this.order=[];this.currPos=this.currIdx=0}DSMapObject_Collection.prototype.add=DSMapObject_Add;DSMapObject_Collection.prototype.remove=DSMapObject_Remove;DSMapObject_Collection.prototype.getById=DSMapObject_GetById;DSMapObject_Collection.prototype.getByIndex=DSMapObject_GetByIndex;DSMapObject_Collection.prototype.size=DSMapObject_Size;DSMapObject_Collection.prototype.getByProperty=DSMapObject_GetByProperty;DSMapObject_Collection.prototype.getIdsByProperty=DSMapObject_GetIdsByProperty;DSMapObject_Collection.prototype.removeAll=DSMapObject_RemoveAll;DSMapObject_Iterator.prototype.next=DSMapObject_Next;DSMapObject_Iterator.prototype.getId=DSMapObject_GetId;DSMapObject_Iterator.prototype.hasNext=DSMapObject_HasNext;DSMapObject_Iterator.prototype.setOffset=DSMapObject_SetIteratorOffset;DSMapObject_Iterator.prototype.getOffset=DSMapObject_GetIteratorOffset;LMI.Mapping={};LMI.Mapping.Point=(function(){function A(C,B){this.init(C,B)}YAHOO.lang.extend(A,OpenLayers.LonLat,{init:function(C,B){this.lng=B;A.superclass.initialize.call(this,B,C)},add:function(){var B=A.superclass.add.apply(this,arguments);this.lng=this.lon;return B},transform:function(){A.superclass.transform.apply(this,arguments);this.lng=this.lon}});return A})();LMI.Mapping.Map=(function(){var F=YAHOO.util,B=F.Dom,E=LMI.Lang.forEach,G=LMI.Element,D=G.getOne,A=G.getAll;function C(H,I){this.init(H,I)}YAHOO.lang.extend(C,OpenLayers.Map,{init:function(H,J){var I=D(H);if(!I){throw new Error('Map: unable to find container: "'+H+'"')}B.addClass(I,"dsMap");this.initOptions(J);OpenLayers.ImgPath=this.getOption("imageBase");this.locale=this.getOption("defaultLocale");C.superclass.initialize.call(this,YAHOO.lang.merge(this.getBaseLayerMapOptions(),{div:I,controls:[],theme:null,paddingForPopups:this.getOption("paddingForPopups")}));this.viewport=this.viewPortDiv;this.objects=new DSMapObject_Collection();this.addLayer(this.getBaseLayer());this.markersLayer=new OpenLayers.Layer.Markers("Markers");this.markersLayer.displayInLayerSwitcher=false;this.addLayer(this.markersLayer);if(this.getOption("enableScales")){this.addControl(new OpenLayers.Control.ScaleLine())}if(this.getOption("printable")){this.initPrintability()}this.initEvents("zoom","recenter","resize");this.events.register("zoomend",this,function(){this.triggerEvent("zoom",this.getEventObject(),this)});this.events.register("moveend",this,function(){this.triggerEvent("recenter",this.getEventObject(),this)})},getCenterPoint:function(){var H=this.getCenter();if(this.displayProjection&&this.displayProjection.getCode()!==this.getProjectionObject().getCode()){H.transform(this.getProjectionObject(),this.displayProjection)}return new LMI.Mapping.Point(H.lat,H.lon)},centerAndZoom:function(H,I){if(this.displayProjection&&this.displayProjection.getCode()!==this.getProjectionObject().getCode()){H.transform(this.displayProjection,this.getProjectionObject())}this.setCenter(H,I)},getEventObject:function(){var H={};H.zoomLevel=this.getZoom();H.center=this.getCenter();return H},bestFit:function(H,O){var J=[],K,N,M,I,L;O=O||this.objects;I=new DSMapObject_Iterator(O);while(I.hasNext()){N=I.next();if(!N.isIncludedInBestFit()){continue}M=N.getBoundingBox();if(M){J.push(M.lower,M.upper)}else{if(N.lonlat){J.push(N.lonlat)}}}if(J.length===0){if(this.getOption("defaultLat")&&this.getOption("defaultLng")&&this.getOption("emptyZoom")){L=new OpenLayers.LonLat(this.getOption("defaultLng"),this.getOption("defaultLat"));if(this.displayProjection&&this.displayProjection.getCode()!==this.getProjectionObject().getCode()){L.transform(this.displayProjection,this.getProjectionObject())}this.setCenter(L,this.getOption("emptyZoom"))}}else{if(J.length===1){K=N.getProperty("zoomLevel");if(!K){K=this.getOption("singleZoom")}this.setCenter(J[0],K)}else{M=this.markersLayer.getDataExtent().scale(1.1);K=this.getZoomForExtent(M);if(K>this.getOption("closestZoomForBestFit")){K=this.getOption("closestZoomForBestFit")}this.setCenter(M.getCenterLonLat(),K)}}},initOptions:function(H){this.options=LMI.Lang.mergeObjects({},C.Defaults);if("config" in C){LMI.Lang.mergeObjects(this.options,C.config)}LMI.Lang.mergeObjects(this.options,H)},setLocale:function(H){this.locale=H},setOption:function(H,I){this.options[H]=I},getOption:function(H){return this.options[H]||""},getPointByXY:function(I,J){var H=this.getLonLatFromPixel(new OpenLayers.Pixel(I,J));if(this.displayProjection&&this.displayProjection.getCode()!==this.getProjectionObject().getCode()){H.transform(this.getProjectionObject(),this.displayProjection)}return H},addObject:function(I){var J=this.objects.add(I),H=I.point.clone();if(this.displayProjection&&this.displayProjection.getCode()!==this.getProjectionObject().getCode()){I.lonlat=H.transform(this.displayProjection,this.getProjectionObject())}this.markersLayer.addMarker(I);I.add(this);return J},batchAddObjects:function(J){var I,H;this.removeLayer(this.markersLayer,false);for(I=0,H=J.length;I<H;++I){this.addObject(J[I])}this.addLayer(this.markersLayer)},removeObject:function(K){var L=-1,I,H,J;if(typeof K==="object"){I=new DSMapObject_Iterator(this.objects);while(I.hasNext()){H=I.next();if(H===K){L=I.getId();break}}}else{L=K}J=this.objects.getById(L);if(J){J.remove(this);this.markersLayer.removeMarker(J);this.objects.remove(L)}},batchRemoveObjects:function(J){var I,H;this.removeLayer(this.markersLayer,false);for(I=0,H=J.length;I<H;++I){this.removeObject(J[I])}this.addLayer(this.markersLayer)},getZoomLevel:function(){return this.getZoom()},setZoomLevel:function(H){this.zoomTo(H)},getBaseLayer:function(){return null},getBaseLayerMapOptions:function(){return null},getExtentInGeoCoords:function(){var I=this.getExtent(),H=I.toArray(),J=new OpenLayers.LonLat(H[0],H[1]),K=new OpenLayers.LonLat(H[2],H[3]);if(this.displayProjection&&this.displayProjection.getCode()!==this.getProjectionObject().getCode()){J.transform(this.getProjectionObject(),this.displayProjection);K.transform(this.getProjectionObject(),this.displayProjection)}return new OpenLayers.Bounds(J.lon,J.lat,K.lon,K.lat)},initPrintability:function(){var J=G.create("canvas"),I=this.viewPortDiv,M=this,O,H,N,L,K=1;if(!!J.getContext){B.addClass(this.div,"dsPrintableMap");O=B.generateId(J);G.create("style",D("head"),{type:"text/css",text:"#"+O+" {display:none;position:relative;}@media print { #"+O+" { display: block; } }"});J.id=O;J.className="dsMapComposite";I.appendChild(J);H=J.getContext("2d");N=function(){L=I.offsetWidth;K=1;if(L>630){K=630/L;L=630}J.width=L;J.height=Math.round(I.offsetHeight*K);J.style.zIndex=parseInt(M.layerContainerDiv.style.zIndex,10)+1;E(M.layers,function(P){if(P.getVisibility()){E(A("img,canvas",P.div),function(Q){var R=Q,T=0,S=0;if(!B.hasClass(Q.parentNode,"screenOnly")){while(R&&R!==I){T+=R.offsetLeft;S+=R.offsetTop;R=R.offsetParent}H.drawImage(Q,Math.floor(T*K),Math.floor(S*K),Math.floor(K*Q.offsetWidth),Math.floor(K*Q.offsetHeight))}})}})};setInterval(N,2000)}},getLLPoint:function(){var H=this.getExtent().toArray(),I=new LMI.Mapping.Point(H[1],H[0]);if(this.displayProjection&&this.displayProjection.getCode()!==this.getProjectionObject().getCode()){I.transform(this.getProjectionObject(),this.displayProjection)}return I},getURPoint:function(){var H=this.getExtent().toArray(),I=new LMI.Mapping.Point(H[3],H[2]);if(this.displayProjection&&this.displayProjection.getCode()!==this.getProjectionObject().getCode()){I.transform(this.getProjectionObject(),this.displayProjection)}return I}});LMI.Lang.importFunctions(C,LMI.Event);return C})();LMI.Mapping.Map.Defaults={singleZoom:14,emptyZoom:5,closestZoomForBestFit:15,defaultLat:39.73926,defaultLng:-104.98478,defaultLocale:"",printable:false,enableScales:true,imageBase:"img/",pixelUrl:"img/pixel_trans.gif",paddingForPopups:new OpenLayers.Bounds(100,10,275,95)};OpenLayers.Util.getImagesLocation=function(){return""};(function(){var A=LMI.Mapping.Map.prototype;A.getBaseLayer=function(){return new OpenLayers.Layer.Google("Map",{numZoomLevels:20,sphericalMercator:true,isBaseLayer:true})};A.getBaseLayerMapOptions=function(){return{projection:new OpenLayers.Projection("EPSG:900913"),displayProjection:new OpenLayers.Projection("EPSG:4326"),units:"m",maxResolution:156543.0339,maxExtent:new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34)}}})();(function(){var C=OpenLayers.Layer.Google,B=C.prototype,A=B.loadMapObject;B.loadMapObject=function(){A.call(this);var D=this.termsOfUse,E=document.createElement("div");D.parentNode.insertBefore(E,D);E.appendChild(D);this.termsOfUse=E}})();LMI.Mapping.MapObject=(function(){function A(B,C){this.init(B,C)}YAHOO.lang.extend(A,OpenLayers.Marker,{init:function(B,C){this.setPoint(B);this.properties={};this.setIncludedInBestFit(true);A.superclass.initialize.call(this,B,C);this.element=C.imageDiv;this.initEvents("click","mouseout","mouseover","add","remove")},setPoint:function(B){this.point=B},getPoint:function(){return this.point},getBoundingBox:function(){if("boundingBox" in this){return this.boundingBox}return null},setXOffset:function(B){this.xOffset=B},getXOffset:function(){if("xOffset" in this){return this.xOffset}return 0},setYOffset:function(B){this.yOffset=B},getYOffset:function(){if("yOffset" in this){return this.yOffset}return 0},setZOffset:function(B){this.zOffset=B},getZOffset:function(){if("zOffset" in this){return this.zOffset}return 0},setProperty:function(B,C){this.properties[B]=C},setProperties:function(){var B,C;if(typeof arguments[0]==="object"){C=arguments[0];for(B in C){if(C.hasOwnProperty(B)){this.setProperty(B,C[B])}}}else{C=arguments.length;for(B=0;B<C;++B){this.properties[arguments[B]]=arguments[++B]}}return this},getProperty:function(B){return(B&&B in this.properties?this.properties[B]:"")},setIncludedInBestFit:function(B){this.includedInBestFit=!!B},isIncludedInBestFit:function(){return this.includedInBestFit},setZIndex:function(B){this.icon.imageDiv.style.zIndex=B},add:function(B){this.shownOnMap=true;this.map=B;this.triggerEvent("add",{map:B},this)},update:function(B){},remove:function(B){this.triggerEvent("remove",{map:B},this);this.shownOnMap=false;this.map=null}});LMI.Lang.importFunctions(A,LMI.Event);A.prototype._addEventListener=A.prototype.addEventListener;A.prototype.addEventListener=function(B,D){var C;if(B==="click"||B==="mouseout"||B==="mouseover"){if(B==="click"){YAHOO.util.Dom.setStyle(this.icon.imageDiv,"cursor","pointer")}if(this.getListeners(B).length===0){C=this;YAHOO.util.Event.on(this.icon.imageDiv,B,function(E){C.triggerEvent(B,E,C)})}}return this._addEventListener(B,D)};A.prototype.bindEvent=function(C,F,D,B){var E=function(G,H){D.call(F,G,H,B)};return this.addEventListener(C,E)};return A})();LMI.Mapping.Icon=(function(){function A(B,C){this.init(B,C)}YAHOO.lang.extend(A,LMI.Mapping.MapObject,{init:function(B,E){this.option=E;var C=new OpenLayers.Size(this.getWidth(),this.getHeight()),D=new OpenLayers.Icon(this.getRecommendedIconSrc(),C,null,this.calculateOffset);A.superclass.init.call(this,B,D)},calculateOffset:function(B){return new OpenLayers.Pixel(-B.w,-B.h)},getWidth:function(){return 24},getHeight:function(){return 27},getRecommendedIconSrc:function(){return LMI.Mapping.IconUrls["default"]}});return A})();(function(){var A=LMI.Mapping.Icon.prototype;A.calculateOffset=function(B){return new OpenLayers.Pixel(-12,-31)};A.getWidth=function(){return 36};A.getHeight=function(){return 31}})();LMI.Mapping.DSIcon=(function(){var B=LMI.Element;function A(D,C){this.init(D,C)}YAHOO.lang.extend(A,LMI.Mapping.Icon,{init:function(E,C){var D=new LMI.Mapping.Point(E.latitude,E.longitude);this.option=C;this.createLabelElement();A.superclass.init.call(this,D,C);if(E){this.setListing(E)}},setListing:function(D){var C=this;LMI.Lang.forEach(["name","streetAddress"],function(E){if(E in D){C.setProperty(E,D[E])}})},getRecommendedIconSrc:function(){return LMI.Urls.getImg(LMI.Data.Urls.defaultIcon)},update:function(){A.superclass.update.apply(this,arguments);if(this.labelElement){this.labelElement.style.left=this.element.style.left;this.labelElement.style.top=this.element.style.top;this.labelElement.style.zIndex=this.element.style.zIndex}},createLabelElement:function(){if(!this.labelElement&&this.option){this.labelElement=LMI.Element.create("div",null,{text:this.option,className:"DSIconLabel"})}},add:function(){A.superclass.add.apply(this,arguments);if(this.labelElement){this.element.appendChild(this.labelElement)}},remove:function(){A.superclass.remove.apply(this,arguments);if(this.labelElement){this.element.removeChild(this.labelElement)}}});return A})();LMI.Mapping.CenterIcon=(function(){function A(C,D){var B=new LMI.Mapping.Point(C.latitude,C.longitude);this.init(B,D)}YAHOO.lang.extend(A,LMI.Mapping.Icon,{getRecommendedIconSrc:function(){return this.option?LMI.Urls.getImg("mapping/map_node_faded_star.png"):LMI.Urls.getImg("mapping/map_node_red_star.png")}});return A})();(function(){var A=LMI.Mapping.CenterIcon.prototype;A.getRecommendedIconSrc=function(){return LMI.Mapping.IconUrls.center}})();LMI.Mapping.InteractiveMap=(function(){var D=YAHOO.util,A=D.Event,B=D.Dom,E=LMI.Strings.getString;function C(F,G){this.init(F,G)}C.Defaults={enableOverview:true,enableResize:true,overviewWidth:150,overviewHeight:150,popupLayerZindex:1100,zoomWheelEnabled:true};YAHOO.lang.extend(C,LMI.Mapping.Map,{init:function(){var G=YAHOO.env.ua.ie,F,H;C.superclass.init.apply(this,arguments);LMI.Data.map=this;this.initTouchEvents();this.animationDuration=1;this.sliders=[];if(this.getOption("enableResize")){if(G&&G<7){this.div.style.overflow="hidden"}A.on(window,"resize",this.resizeLayers,this,true)}if(this.getOption("enableOverview")){F=new OpenLayers.Control.OverviewMap({mapOptions:this.getBaseLayerMapOptions(),layers:[this.getBaseLayer()],autoPan:true,size:new OpenLayers.Size(110,110)});this.addControl(F);F.maximizeControl()}this.previewing=false;this.previewAnimation=null;this.Z_INDEX_BASE.PopupLayer=this.getOption("popupLayerZindex");H=this.div.id+"_OpenLayers_Popup_Container";this.popupContainerDiv=OpenLayers.Util.createDiv(H);this.popupContainerDiv.style.zIndex=this.Z_INDEX_BASE.PopupLayer-1;this.viewPortDiv.appendChild(this.popupContainerDiv);this.events.register("move",this,function(){this.popupContainerDiv.style.left=this.layerContainerDiv.style.left;this.popupContainerDiv.style.top=this.layerContainerDiv.style.top})},initOptions:function(F){var G=LMI.Lang.mergeObjects({},C.Defaults);LMI.Lang.mergeObjects(G,F);C.superclass.initOptions.call(this,G)},resizeLayers:function(){var F={oldWidth:this.getSize().w,oldHeight:this.getSize().h,zoomLevel:this.getZoomLevel()};this.updateSize();if(F.oldWidth!==this.getSize().w||F.oldHeight!==this.getSize().h){F.center=this.getCenter();F.newWidth=this.getSize().w;F.newHeight=this.getSize().h;this.triggerEvent("resize",F,this)}},addControls:function(G){if(!G){G=LMI.Mapping.DefaultControls({zoomWheelEnabled:this.getOption("zoomWheelEnabled")})}if(YAHOO.lang.isArray(G)){var F=this;LMI.Lang.forEach(G,function(H){F.addControls(H)})}else{C.superclass.addControl.apply(this,arguments)}},addPopup:function(F,I){var G,H;if(I){for(G=this.popups.length-1;G>=0;--G){this.removePopup(this.popups[G])}}F.map=this;this.popups.push(F);H=F.draw();if(H){H.style.zIndex=this.Z_INDEX_BASE.Popup+this.popups.length;this.popupContainerDiv.appendChild(H)}},removePopup:function(F){OpenLayers.Util.removeItem(this.popups,F);if(F.div){try{this.popupContainerDiv.removeChild(F.div)}catch(G){}}F.map=null},touchStart:function(J){var I=[],G,L,H=A.getTarget(J),F,K;this.touchMoves=0;this.startTouches=null;if(H.tagName.toLowerCase()!=="a"){F=B.getAncestorByTagName(F,"a")}else{F=H}if(!F){if(H.tagName.toLowerCase()!=="div"){K=B.getAncestorByTagName(H,"div")}else{K=H}if(!K||(K.id.match(/^OL_Icon/)===null&&K.id.match(/^OpenLayers.Control/)===null&&!B.hasClass(K,"widgetWrapper")&&!B.hasClass(K,"popup")&&!B.getAncestorByClassName(K,"olPopup"))){if(J.touches.length>0){L=J.touches[0];I.push({pageX:L.pageX,pageY:L.pageY})}if(J.touches.length>1){L=J.touches[1];I.push({pageX:L.pageX,pageY:L.pageY})}this.startTouches={touches:I,time:(new Date()).getTime()};A.stopEvent(J)}}},touchMove:function(F){if(this.startTouches!==null&&F.touches.length===1){this.pan((this.startTouches.touches[0].pageX-F.touches[0].pageX),(this.startTouches.touches[0].pageY-F.touches[0].pageY),{animate:false})}this.touchMoves++;this.previousMoveTouches={touches:F.touches,time:(new Date()).getTime()};A.stopEvent(F)},touchEnd:function(F){if(this.startTouches!==null){if(this.previousPanStart!==null&&Math.abs(this.startTouches.touches[0].pageX-this.previousPanStart.touches[0].pageX)<30&&Math.abs(this.startTouches.touches[0].pageY-this.previousPanStart.touches[0].pageY)<30&&this.startTouches.time-this.previousPanStart.time<500&&this.touchMoves===0){this.zoomIn()}else{if(this.previousMoveTouches!==null&&this.previousMoveTouches.touches.length===2){if(Math.abs(this.startTouches.touches[0].pageX-this.startTouches.touches[1].pageX)<Math.abs(this.previousMoveTouches.touches[0].pageX-this.previousMoveTouches.touches[1].pageX)||Math.abs(this.startTouches.touches[0].pageY-this.startTouches.touches[1].pageY)<Math.abs(this.previousMoveTouches.touches[0].pageY-this.previousMoveTouches.touches[1].pageY)){this.zoomIn()}else{if(Math.abs(this.startTouches.touches[0].pageX-this.startTouches.touches[1].pageX)>Math.abs(this.previousMoveTouches.touches[0].pageX-this.previousMoveTouches.touches[1].pageX)||Math.abs(this.startTouches.touches[0].pageY-this.startTouches.touches[1].pageY)>Math.abs(this.previousMoveTouches.touches[0].pageY-this.previousMoveTouches.touches[1].pageY)){this.zoomOut()}}}}}this.previousPanStart=this.startTouches;this.startTouches=null;this.previousMoveTouches=null;A.stopEvent(F)},initTouchEvents:function(){this.startTouches=null;this.previousPanStart=null;this.touchMoves=0;this.previousMoveTouches=null;A.on(this.div,"touchstart",this.touchStart,this,true);A.on(this.div,"touchmove",this.touchMove,this,true);A.on(this.div,"touchend",this.touchEnd,this,true)}});return C})();LMI.Mapping.DSMap=(function(){var B=LMI.Strings.getString,A=function(D,C){this.init(D,C)};A.Defaults={overviewWidth:110,overviewHeight:110,contextMenuItems:LMI.Lang.mergeObjects([],LMI.Mapping.InteractiveMap.Defaults.contextMenuItems)};A.contextAddLocation=function(C,E,D){LMI.Mapping.NewLocPoi.createFromPageXY(D,D.contextMenuOpenX,D.contextMenuOpenY)};A.Defaults.contextMenuItems.push({text:B("js.map.contextmenu.add.custom.loc"),className:"map_cm_addLocation",onclick:{fn:A.contextAddLocation}});YAHOO.lang.extend(A,LMI.Mapping.InteractiveMap,{initOptions:function(C){var D,E=A.Defaults;if(C){for(D in C){if(C.hasOwnProperty(D)){E[D]=C[D]}}}A.superclass.initOptions.call(this,E)},addControls:function(C){C=C||LMI.Mapping.DefaultControls({zoomWheelEnabled:this.getOption("zoomWheelEnabled")});A.superclass.addControls.call(this,C);if(this.overviewMap){this.overviewMap.addEventListener("expand",function(){LMI.MyList.setVisitorPreference(null,"overview_map_collapsed",false)});this.overviewMap.addEventListener("collapse",function(){LMI.MyList.setVisitorPreference(null,"overview_map_collapsed",true)})}}});return A})();LMI.Mapping.PanZoomBar=(function(){function A(B,C){this.initialize.apply(this,arguments)}YAHOO.lang.extend(A,OpenLayers.Control.PanZoomBar,{initialize:function(C,B){this.imageBase=C||"";this.zoomStopHeight=7;this.zoomStopWidth=19;A.superclass.initialize.call(this,B)},draw:function(B){var D=new OpenLayers.Pixel(5,2),C=this.imageBase;OpenLayers.Control.prototype.draw.apply(this,arguments);this.buttons=[];this._addButton("background",LMI.Urls.get(C+"map_pan_background.png"),D,new OpenLayers.Size(60,60));this._addButton("panup",LMI.Urls.get(C+"map_pan_n.png"),D.add(19,0),new OpenLayers.Size(22,16));this._addButton("panleft",LMI.Urls.get(C+"map_pan_w.png"),D.add(0,16),new OpenLayers.Size(19,22));this._addButton("panright",LMI.Urls.get(C+"map_pan_e.png"),D.add(41,16),new OpenLayers.Size(19,22));this._addButton("pandown",LMI.Urls.get(C+"map_pan_s.png"),D.add(19,37),new OpenLayers.Size(22,22));this._addButton("bestfit",LMI.Urls.get(C+"map_pan_center.png"),D.add(19,16),new OpenLayers.Size(22,22));this._addButton("zoomin",LMI.Urls.get(C+"map_zoom_in.png"),D.add(21,66),new OpenLayers.Size(19,26));if(!this.excludeZoomBar){D=this._addZoomBar(D.add(21,91))}else{D=D.add(21,92)}this._addButton("zoomout",LMI.Urls.get(C+"map_zoom_out.png"),D,new OpenLayers.Size(19,26));return this.div},_addZoomBar:function(B){var F=OpenLayers.Util.getImagesLocation()+this.imageBase,H=this.id+"_"+this.map.id,C=this.map.getNumZoomLevels()-1-this.map.getZoom(),D=OpenLayers.Util.createAlphaImageDiv(H,B.add(0,C*this.zoomStopHeight),new OpenLayers.Size(19,13),LMI.Urls.get(F+"map_zoom_thumb.png"),"absolute"),E=new OpenLayers.Size(),G=null;D.className="dsMapDraggable";this.slider=D;this.sliderEvents=new OpenLayers.Events(this,D,null,true,{includeXY:true});this.sliderEvents.on({mousedown:this.zoomBarDown,mousemove:this.zoomBarDrag,mouseup:this.zoomBarUp,dblclick:this.doubleClick,click:this.doubleClick});E.h=this.zoomStopHeight*this.map.getNumZoomLevels()+6;E.w=this.zoomStopWidth;if(OpenLayers.Util.alphaHack()){G=OpenLayers.Util.createAlphaImageDiv(H,B,new OpenLayers.Size(E.w,this.zoomStopHeight),LMI.Urls.get(F+"map_zoom_slider.png"),"absolute",null,"crop");G.style.height=E.h+"px"}else{G=OpenLayers.Util.createDiv("OpenLayers_Control_PanZoomBar_Zoombar"+this.map.id,B,E,LMI.Urls.get(F+"map_zoom_slider.png"))}G.style.cursor="pointer";this.zoombarDiv=G;this.divEvents=new OpenLayers.Events(this,G,null,true,{includeXY:true});this.divEvents.on({mousedown:this.divClick,mousemove:this.passEventToSlider,dblclick:this.doubleClick,click:this.doubleClick});this.div.appendChild(G);this.startTop=parseInt(G.style.top,10);this.div.appendChild(D);this.map.events.register("zoomend",this,this.moveZoomBar);B=B.add(0,E.h);return B},buttonDown:function(B){A.superclass.buttonDown.apply(this,arguments);if(this.action==="bestfit"){this.map.bestFit()}},destroy:function(){if(!this.excludeZoomBar){this._removeZoomBar()}this.map.events.un({changebaselayer:this.redraw,scope:this});OpenLayers.Control.PanZoom.prototype.destroy.apply(this,arguments)}});return A})();LMI.Mapping.TileSwitcher=(function(){var D;function F(){return D.getBaseLayer().name}function B(){}function C(){var G=null;if(LMI.Data.selectedTileSet){G=LMI.Data.selectedTileSet}else{if(LMI.Data.sessionPreferences&&"map_default_tileset" in LMI.Data.sessionPreferences){G=LMI.Data.sessionPreferences.map_default_tileset}}return G}function A(){var G=new LMI.Mapping.LayerSwitcher(),I=LMI.Data.tileSets,H=C();D.addControl(G);if(I){D.addLayers(I)}if(H&&H!==F()){G.switchLayer(H)}}function E(G){D=G;A();D.events.register("changelayer",null,B)}return{init:E,getActiveTileSetName:F}})();LMI.Mapping.LayerSwitcher=(function(){var E=LMI.Element,D=YAHOO.util,B=D.Dom,A=D.Event;function C(){this.initialize.apply(this,arguments)}YAHOO.lang.extend(C,OpenLayers.Control.LayerSwitcher,{loadContents:function(){this.div=E.create("ul",null,{className:"linkList horizontalLinkList mapTilesLinks"});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.maximizeDiv=this.minimizeDiv=E.create("div")},redraw:function(){if(!this.checkRedraw()){return this.div}this.clearLayersArray("base");this.clearLayersArray("data");var F=false,P=false,L=this.map.layers.length,H,I,J,M,G,O,K=this,Q,N;this.layerStates=[];for(I=0;I<L;I++){J=this.map.layers[I];this.layerStates[I]={name:J.name,visibility:J.visibility,inRange:J.inRange,id:J.id}}H=this.map.layers.slice();if(!this.ascending){H.reverse()}for(I=0,L=H.length;I<L;I++){J=H[I];M=J.isBaseLayer;if(J.displayInLayerSwitcher){if(M){P=true}else{F=true}G=(M)?(J===this.map.baseLayer):J.getVisibility();O=G?"selected":"";if(!M&&!J.inRange){O+=" disabled"}N=E.create("li",this.div,{className:J.name,children:[{tag:"a",href:"#",text:J.name,events:{click:this.getClickHandler()},className:O}]});Q=(M)?this.baseLayers:this.dataLayers;Q.push({layer:J,element:N})}}return this.div},getClickHandler:function(){var F=this;return function(G){A.stopEvent(G);F.switchLayer.call(F,this.parentNode.className)}},switchLayer:function(H){var K,G,J,I,F=this.map.layers.length;for(J=0;J<F;J++){I=this.map.layers[J];if(I.name===H){break}}K=E.getOne("."+H+" a",this.div);if(!B.hasClass(K,"disabled")){G=E.getAll("a",this.div);J=G.length;while(J--){if(B.hasClass(G[J],"selected")){B.removeClass(G[J],"selected");break}}B.addClass(K,"selected");I.map.setBaseLayer(I)}},updateMap:function(){var F=this.baseLayers.length,H,G;while(F--){H=this.baseLayers[F];G=E.getOne("."+H.name+" a",this.div);if(B.hasClass(G,"selected")){this.map.setBaseLayer(H.layer,false)}}F=this.dataLayers.length;while(F--){H=this.dataLayers[F];G=E.getOne("."+H.name+" a",this.div);H.layer.setVisibility(B.hasClass(G,"selected"))}},draw:function(){OpenLayers.Control.prototype.draw.apply(this);this.loadContents();this.redraw();return this.div},clearLayersArray:function(H){var I=this[H+"Layers"],G,F;if(I){F=I.length;while(F--){G=I[F];E.destroy(G.element)}}this[H+"Layers"]=[]}});return C})();LMI.Mapping.DefaultControls=function(B){var D=LMI.Mapping,A=LMI.Data.mapOptions.imageBase+"large_controls/",C=false;if(B&&"zoomWheelEnabled" in B){C=B.zoomWheelEnabled}return[new D.PanZoomBar(A),new OpenLayers.Control.Navigation({zoomWheelEnabled:C}),new OpenLayers.Control.DragPan()]};LMI.Mapping.FlyoutFactory=(function(){var A=YAHOO.lang.hasOwnProperty;function B(){this.init()}B.prototype={init:function(){this.contents={"default":B.defaultFlyoutContent,ambig:B.defaultAmbigContent};this.styles={"default":{creator:LMI.DefaultFlyoutStyle.getStyle,xOffset:3,yOffset:8,zOffset:5}}},clone:function(){var D,C,E=new LMI.Mapping.FlyoutFactory();for(D in this.contents){if(A(this.contents,D)){E.contents[D]=this.contents[D]}}for(D in this.styles){if(A(this.styles,D)){E.styles[D]={};for(C in this.styles[D]){if(A(this.styles[D],C)){E.styles[D][C]=this.styles[D][C]}}}}return E},addContentCreator:function(D,C){this.contents[D]=C},addStyle:function(F,E,C){var D={creator:E};this.styles[F]=D},getFlyout:function(C,H,F,E){F=F||"default";E=E||"default";var G=this.contents[F](H),D=this.styles[E];return new LMI.Mapping.Flyout(C,D.creator(G,H),H)}};return B})();LMI.Mapping.Flyout=(function(){var A=YAHOO.util.Dom;function B(C,D){this.initialize.apply(this,arguments)}YAHOO.lang.extend(B,OpenLayers.Popup.Anchored,{autoSize:true,panMapIfOutOfView:true,initialize:function(C,D,E){this.content=D;OpenLayers.Popup.COLOR="transparent";B.superclass.initialize.call(this,null,C,null,null,E.icon,false);A.setStyle(this.groupDiv,"overflow","visible")},setContentHTML:function(){this.setContent()},setContent:function(C){if(C){this.content=C}if((this.contentDiv!==null)&&(this.content!==null)){this.contentDiv.appendChild(this.content);if(this.autoSize){this.registerImageListeners();this.updateSize()}}},calculateRelativePosition:function(C){return"br"},setOpacity:function(C){if(C!==undefined){this.opacity=C}if(this.opacity>=1){if(this.div!==null){this.div.style.opacity="";this.div.style.filter=""}}else{B.superclass.setOpacity.apply(this,arguments)}},onclick:function(C){}});return B})();LMI.DefaultContentCreator=(function(){var A=YAHOO.util.Event,D=LMI.Element,C=LMI.Strings.getString,B={};B.getLocInfoElement=function(J){var E=J.getProperty("listing"),F=J.getProperty("name"),H=J.getProperty("prettyDetailsUrl"),G=D.create("div",null,{className:"flyoutTop"}),I;if(F){if(E){if(LMI.Data.state.pageType===J.getProperty("listingSource").toUpperCase()){I=D.create("a",G,{text:F,href:LMI.Urls.get("detailssearch.ds")+"?detailsListingId="+J.getProperty("id"),className:"fn flyoutName detailsLink"})}else{I=D.create("a",G,{text:F,href:H,className:"fn flyoutName"})}A.on(I,"click",function(K){if(LMI.Data.state.pageType==="YELLOW"){LMI.Omniture.listingClickThrough(this,J.getProperty("id"),J.getProperty("categoryId"))}})}else{D.create("span",G,{text:F,className:"fn flyoutName"})}}else{D.create("span",G,{text:C("js.no.flyout.name"),className:"fn flyoutName"})}return G};B.getAddressElement=function(H){var G,I,E=D.create("div",null,{className:"locInfo"}),F;I=H.getProperty("phoneNumber");if(I){D.create("span",E,{className:"tel",text:I})}F=D.create("div",null,{className:"adr"});I=H.getProperty("streetAddress");if(I){D.create("div",F,{text:I,className:"street-address"})}G=H.getProperty("state");if(G){if(I){D.create("text",F,{text:", "})}}I=H.getProperty("state");if(I){if(G){D.create("text",F,{text:", "})}D.create("span",F,{text:I,className:"region"})}E.appendChild(F);return E};B.getLinksElement=function(F){var H=D.create("ul",null,{className:"linkList"}),G=F.getProperty("id"),E=F.getProperty("categoryId");if(F.getProperty("listing")){D.create("li",H,{children:[{tag:"a",text:C("js.getdirs"),href:LMI.Urls.get("displaydirections.ds")+"?dirsListingId="+G,className:"directions",events:{click:function(I){if(LMI.Data.state.pageType==="YELLOW"){LMI.Omniture.listingClickThrough(this,G,E)}}}}]});D.create("li",H,{children:[{tag:"a",text:C("js.inplacespc"),href:LMI.Urls.get("displaymywww.ds"),className:"inlist"}]})}else{if(F.getProperty("id")){D.create("li",H,{children:[{tag:"a",text:C("js.map.saved.location.edit"),id:"edit_"+G,href:"#",events:{click:function(I){F.showFlyout("edit");A.stopEvent(I)}}}]});D.create("li",H,{children:[{tag:"a",text:C("js.map.saved.location.remove"),id:"delete_"+G,href:"#",events:{click:function(I){var J=this.id.replace("delete_","");LMI.Data.form.setVar("savedLocationIds",J);LMI.Data.form.go(LMI.Urls.get("removemyplaces.ds"));A.stopEvent(I)}}}]})}}return H};B.getFindNearbyForm=function(I,H){var E=I.point.clone(),G=I.map,F;F=D.create("form",null,{action:LMI.Urls.get("displaysearchmap.ds"),className:"fnForm",children:[{tag:"input",type:"hidden",name:"mapLevel",value:G.getZoomLevel()},{tag:"input",type:"hidden",name:"latitude",value:E.lat},{tag:"input",type:"hidden",name:"longitude",value:E.lon},{tag:"input",type:"hidden",name:"geocodePrecision",value:I.getProperty("geocodePrecision")},{tag:"input",type:"hidden",name:"findNearByListingIds",value:I.getProperty("id")},{tag:"input",type:"hidden",name:"businessName",value:I.getProperty("name")||I.getProperty("displayValue")},{tag:"div",className:"textInp",children:[{tag:"input",type:"text",name:"what",className:"fnWhat",autocomplete:"off",events:{click:function(){this.focus()}}}]},{tag:"input",type:"image",src:LMI.Urls.getImg("btn_find_nearby.gif"),value:LMI.Strings.getString("js.flyout.findnearby"),className:"fnSubmit"}]});if(H){D.create("input",F,{type:"hidden",name:"ignoreWhere",value:"true"})}LMI.FindNearby.initForm(F);return F};B.getContent=function(F){var G,E=D.create("div");E.appendChild(B.getLocInfoElement(F));E.appendChild(B.getAddressElement(F));G=B.getLinksElement(F);E.appendChild(G);if(F.getProperty("id")){if(F.isFindNearbyEnabled()){F.findNearby=true;D.create("p",E,{text:C("js.flyout.findnearby.label")});G=B.getFindNearbyForm(F);E.appendChild(G)}}return E};return B})();LMI.AmbigContentCreator=(function(){var A=YAHOO.util.Event,C=LMI.Element,B={};B.getContent=function(G){var H,E,L,F=G.getProperty("id"),J=C.create("div",null,{className:"ambigFlyout"}),K,I,D;C.create("div",J,{className:"flyoutTop",children:[{tag:"span",text:LMI.Strings.getString("js.multimatches")+":",className:"flyoutName"}]});H=C.create("ul",J);LMI.Lang.forEach([G].concat(G.collisions),function(N,M){E=N.getProperty("name")||N.getProperty("displayValue");D=N.getProperty("prettyDetailsUrl");I=M===0?"first":"";if(N.getProperty("featuredStatus")){I+=" "+N.getProperty("featuredStatus")}C.create("li",H,{className:I,children:[{tag:"a",text:E,href:D?LMI.Urls.get(D):"#",id:F,events:{click:function(O){G.hideFlyout();N.showFlyout();A.stopEvent(O)}}}]})});return J};return B})();LMI.DefaultFlyoutStyle=(function(){var D=LMI.Element,B=D.create,C=D.getOne;function A(G,I){var F="img/mapping/",E=LMI.Urls.get(F+"flyout_box.png"),H=B("div",null,{className:"flyout",id:"LMIMapFlyout",children:[{tag:"img",src:LMI.Urls.get(F+"flyout_close.png"),alt:"",className:"flyoutClose",events:{click:function(){if(I){I.hideFlyout()}}}},{tag:"div",className:"content",children:[{tag:"img",src:LMI.Urls.get(F+"flyout_print.gif"),className:"printonly",alt:""}]},{tag:"div",className:"flyoutCorner flyoutBL",children:[{tag:"img",src:E,alt:""}]},{tag:"div",className:"flyoutCorner flyoutTR",children:[{tag:"img",src:E,alt:""}]},{tag:"div",className:"flyoutCorner flyoutBR",children:[{tag:"img",src:E,alt:""}]},{tag:"div",className:"flyoutCorner flyoutTL",children:[{tag:"img",src:E,alt:""}]},{tag:"img",src:LMI.Urls.get(F+"flyout_pointer.png"),alt:"",className:"flyoutPointer"}]});if(G){C("div.content",H).appendChild(G)}return H}return{getStyle:A}})();LMI.Mapping.FlyoutProvider=(function(){var B=new DSMapObject_Collection();function C(G,F,N,H){var R=G.icon.imageDiv,P=F.icon.imageDiv,L=G.getWidth()/2,I=F.getWidth()/2,M=G.getHeight()/2,K=F.getHeight()/2,E=parseInt(R.style.left,10)+L,S=parseInt(R.style.top,10)+M,D=parseInt(P.style.left,10)+I,Q=parseInt(P.style.top,10)+K,O=(L+I)-Math.abs(D-E),J=(M+K)-Math.abs(Q-S);if(!N){N=0}if(!H){H=0}return(O>N&&J>H)}function A(){}A.prototype={initFlyout:function(){this.flyouts={};this.bindEvent("click",this,this.flyoutClickHandler);this.bindEvent("add",this,this.flyoutAddHandler);this.bindEvent("remove",this,this.flyoutRemoveHandler)},findCollisions:function(){var E,D=new DSMapObject_Iterator(B);this.collisions=[];while(D.hasNext()){E=D.next();if(E!==this&&E.icon.imageDiv&&C(this,E,(E.getWidth()/3),(E.getHeight()/3))){this.collisions.push(E)}}},flyoutAddHandler:function(){this._flyoutCollectionId=B.add(this)},flyoutRemoveHandler:function(){this.hideFlyout();this.flyouts={};B.remove(this._flyoutCollectionId);this._flyoutCollectionId=null},flyoutClickHandler:function(D){if(this.getActiveFlyout()){this.hideFlyout()}else{this.findCollisions();if(this.collisions.length){this.showFlyout("ambig")}else{this.showFlyout("default")}}YAHOO.util.Event.stopEvent(D)},showFlyout:function(F,E){var G,D;F=F||"default";if(!(F in this.flyouts)){D=this.flyoutPoint||this.point;D=D.clone();if(this.map.displayProjection&&this.map.displayProjection.getCode()!==this.map.getProjectionObject().getCode()){D.transform(this.map.displayProjection,this.map.getProjectionObject())}G=this.flyouts[F]={type:F,id:null,flyout:this.getFlyoutFactory().getFlyout(D,this,F,E)}}else{G=this.flyouts[F]}G.id=G.flyout.id;this.map.addPopup(G.flyout,true)},hideFlyout:function(){var D=this.getActiveFlyout();if(D){this.map.removePopup(D.flyout);D.id=null}},getActiveFlyout:function(){var E,D;for(D in this.flyouts){if(this.flyouts.hasOwnProperty(D)){E=this.flyouts[D];if(typeof E==="object"&&E.id){return E}}}return null}};return A})();LMI.Mapping.DSPoi=(function(){var A=YAHOO.util.Event,C=LMI.Element;function B(E,D){this.init(E,D)}YAHOO.lang.extend(B,LMI.Mapping.Icon,{init:function(F,D){var E=new LMI.Mapping.Point(F.latitude,F.longitude);B.superclass.init.call(this,E,D);this.setListing(F);this.initFlyout()},getRecommendedIconSrc:function(){return LMI.Mapping.IconUrls["default"]},setListing:function(F){var E=this,D=["id","name","note","city","state","listing","inList","categoryId","displayValue","prettyDetailsUrl"];LMI.Lang.forEach(D,function(G){if(G in F){E.setProperty(G,F[G])}});if("geocodePrecision" in F&&F.geocodePrecision){this.setProperty("geocodePrecision",F.geocodePrecision.name)}if("streetAddress" in F){this.setProperty("streetAddress",F.streetAddress)}else{if("address" in F){this.setProperty("streetAddress",F.address)}}if("urls" in F&&F.urls.length){this.setProperty("url",F.urls[0].value)}if("phoneNumbers" in F&&F.phoneNumbers.length){this.setProperty("phoneNumber",F.phoneNumbers[0].value)}if("emailAddresses" in F&&F.emailAddresses.length){this.setProperty("email",F.emailAddresses[0].value)}if("listingSource" in F&&F.listingSource.name){this.setProperty("listingSource",F.listingSource.name)}},getFlyoutFactory:function(){return B.flyoutFactory},isFindNearbyEnabled:function(){return true}});YAHOO.lang.augment(B,LMI.Mapping.FlyoutProvider);B.flyoutFactory=new LMI.Mapping.FlyoutFactory();B.flyoutFactory.addContentCreator("default",LMI.DefaultContentCreator.getContent);B.flyoutFactory.addContentCreator("ambig",LMI.AmbigContentCreator.getContent);return B})();(function(){if(typeof G_HYBRID_MAP!=="undefined"){LMI.Data.tileSets=[new OpenLayers.Layer.Google("Hybrid",{type:G_HYBRID_MAP,numZoomLevels:20,sphericalMercator:true,isBaseLayer:true}),new OpenLayers.Layer.Google("Satellite",{type:G_SATELLITE_MAP,numZoomLevels:20,sphericalMercator:true,isBaseLayer:true}),new OpenLayers.Layer.Google("Terrain",{type:G_PHYSICAL_MAP,numZoomLevels:20,sphericalMercator:true,isBaseLayer:true})]}})();