/*
  Geoportal.js -- IGN France Geoportal Map Viewer Library

  Copyright 2007-2010 IGN France, released under the BSD license.
  Please see http://api.ign.fr/geoportail/api/doc/webmaster/license.html
  Please see http://api.ign.fr/geoportail/api/doc/fr/webmaster/licence.html
  for the full text of the license.

  The full source of Geoportal API can be downloaded there :
  http://api.ign.fr/geoportail/api/doc/fr/developpeur/download.html
 */
/*--------------------------------------------------------------------------*/
/*
  Contains rewritting of http://hexmen.com/blog/2007/03/printf-sprintf/

  This code is unrestricted: you are free to use it however you like.
 */
/*--------------------------------------------------------------------------*/
/*
  Contains portions of Sarissa -- http://dev.abiss.gr/sarissa
     
  Sarissa is an ECMAScript library acting as a cross-browser wrapper for native XML APIs.
  The library supports Gecko based browsers like Mozilla and Firefox,
  Internet Explorer (5.5+ with MSXML3.0+), Konqueror, Safari and Opera
  @version 0.9.9.4
  @author: Copyright 2004-2008 Emmanouil Batsis, mailto: mbatsis at users full stop sourceforge full stop net

  Sarissa is free software distributed under Apache Software License 2.0 or higher (see <a href="asl.txt">asl.txt</a>).

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY 
  KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 
  WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE 
  AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 
  COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 
  OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 
  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
/*--------------------------------------------------------------------------*/
/*
  proj4js.js -- Javascript reprojection library.

  Authors:      Mike Adair madairATdmsolutions.ca
                Richard Greenwood richATgreenwoodmap.com
                Didier Richard didier.richardATign.fr
                Stephen Irons
  License:      LGPL as per: http://www.gnu.org/copyleft/lesser.html
                Note: This program is an almost direct port of the C library
                Proj4.
*/
/*--------------------------------------------------------------------------*/
/*
  Contains OpenLayers.js -- OpenLayers Map Viewer Library

  Copyright 2005-2007 MetaCarta, Inc., released under the BSD license.
  Please see http://svn.openlayers.org/trunk/openlayers/release-license.txt
  for the full text of the license.

  Includes compressed code under the following licenses:

  (For uncompressed versions of the code used please see the
  OpenLayers SVN repository: <http://openlayers.org/>)
*/
/*--------------------------------------------------------------------------*/
/* Contains portions of Prototype.js:
 *
 * Prototype JavaScript framework, version 1.4.0
 *  (c) 2005 Sam Stephenson <sam@conio.net>
 *
 *  Prototype is freely distributable under the terms of an MIT-style license.
 *  For details, see the Prototype web site: http://prototype.conio.net/
 *
/*--------------------------------------------------------------------------*/
/**  
*  
*  Contains portions of Rico <http://openrico.org/>
* 
*  Copyright 2005 Sabre Airline Solutions  
*  
*  Licensed under the Apache License, Version 2.0 (the "License"); you
*  may not use this file except in compliance with the License. You
*  may obtain a copy of the License at
*  
*         http://www.apache.org/licenses/LICENSE-2.0  
*  
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
*  implied. See the License for the specific language governing
*  permissions and limitations under the License. 
*
**/
/*--------------------------------------------------------------------------*/
/*
    Contains XMLHttpRequest of <http://code.google.com/p/xmlhttprequest>

Onderwerp: Re: XMLHttpRequest.js license
Van:       "Sergey Ilinsky" <sergey@ilinsky.com>
Datum:     Wo, 21 april, 2010 10:45 am
Aan:       bartvde@osgis.nl
--------------------------------------------------------------------------
I authorize OpenLayers to get the latest version of XMLHttpRequest.js
library and use it under Apache license (Just replace the license note in
the file). Is the written confirmation sufficient?

Sergey/

        http://www.apache.org/licenses/LICENSE-2.0
 */
/*--------------------------------------------------------------------------*/
var OpenLayers={singleFile:true};(function(){var l=(typeof OpenLayers=="object"&&OpenLayers.singleFile);window.OpenLayers={_scriptName:(!l)?"lib/OpenLayers.js":"OpenLayers.js",_getScriptLocation:function(){var v="";var z=new RegExp("(^|(.*?\\/))("+OpenLayers._scriptName+")(\\?|$)");var q=document.getElementsByTagName("script");for(var u=0,h=q.length;u<h;u++){var w=q[u].getAttribute("src");if(w){var r=w.match(z);if(r){v=r[1];break}}}return v}};if(!l){var m=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 f=(b.match("MSIE")||b.match("Safari"));if(f){var a=new Array(m.length)}var o=OpenLayers._getScriptLocation()+"lib/";for(var d=0,j=m.length;d<j;d++){if(f){a[d]="<script src='"+o+m[d]+"'><\/script>"}else{var p=document.createElement("script");p.src=o+m[d];var g=document.getElementsByTagName("head").length?document.getElementsByTagName("head")[0]:document.body;g.appendChild(p)}}if(f){document.write(a.join(""))}}})();OpenLayers.VERSION_NUMBER="OpenLayers 2.8 -- $Revision: 9492 $";OpenLayers.String={startsWith:function(b,a){return(b.indexOf(a)==0)},contains:function(b,a){return(b.indexOf(a)!=-1)},trim:function(a){return a.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},camelize:function(h){var f=h.split("-");var b=f[0];for(var d=1,a=f.length;d<a;d++){var g=f[d];b+=g.charAt(0).toUpperCase()+g.substring(1)}return b},format:function(f,d,a){if(!d){d=window}var b=function(m,g){var l;var j=g.split(/\.+/);for(var h=0;h<j.length;h++){if(h==0){l=d}l=l[j[h]]}if(typeof l=="function"){l=a?l.apply(null,a):l()}if(typeof l=="undefined"){return"undefined"}else{return l}};return f.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,d){var b=0;if(d>0){b=parseFloat(a.toPrecision(d))}return b},format:function(d,a,j,m){a=(typeof a!="undefined")?a:0;j=(typeof j!="undefined")?j:OpenLayers.Number.thousandsSeparator;m=(typeof m!="undefined")?m:OpenLayers.Number.decimalSeparator;if(a!=null){d=parseFloat(d.toFixed(a))}var b=d.toString().split(".");if(b.length==1&&a==null){a=0}var f=b[0];if(j){var g=/(-?[0-9]+)([0-9]{3})/;while(g.test(f)){f=f.replace(g,"$1"+j+"$2")}}var h;if(a==0){h=f}else{var l=b.length>1?b[1]:"0";if(a!=null){l=l+new Array(a-l.length+1).join("0")}h=f+m+l}return h}};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(d,b){var a=Array.prototype.slice.apply(arguments,[2]);return function(){var f=a.concat(Array.prototype.slice.apply(arguments,[0]));return d.apply(b,f)}},bindAsEventListener:function(b,a){return function(d){return b.call(a,d||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(j,h,b){var f=[];if(Array.prototype.filter){f=j.filter(h,b)}else{var a=j.length;if(typeof h!="function"){throw new TypeError()}for(var d=0;d<a;d++){if(d in j){var g=j[d];if(h.call(b,g,d,j)){f.push(g)}}}}return f}};OpenLayers.Class=function(){var f=function(){if(arguments&&arguments[0]!=OpenLayers.Class.isPrototype){this.initialize.apply(this,arguments)}};var d={};var h,b;for(var g=0,a=arguments.length;g<a;++g){if(typeof arguments[g]=="function"){if(g==0&&a>1){b=arguments[g].prototype.initialize;arguments[g].prototype.initialize=function(){};d=new arguments[g];if(b===undefined){delete arguments[g].prototype.initialize}else{arguments[g].prototype.initialize=b}}h=arguments[g].prototype}else{h=arguments[g]}OpenLayers.Util.extend(d,h)}f.prototype=d;return f};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 f=arguments[0];var g=new f(OpenLayers.Class.isPrototype);for(var d=1,a=arguments.length;d<a;d++){if(typeof arguments[d]=="function"){var b=arguments[d];arguments[d]=new b(OpenLayers.Class.isPrototype)}OpenLayers.Util.extend(g,arguments[d])}return g};OpenLayers.Util={};OpenLayers.Util.getElement=function(){var f=[];for(var d=0,a=arguments.length;d<a;d++){var b=arguments[d];if(typeof b=="string"){b=document.getElementById(b)}if(arguments.length==1){return b}f.push(b)}return f};if(typeof window.$==="undefined"){window.$=OpenLayers.Util.getElement}OpenLayers.Util.extend=function(a,g){a=a||{};if(g){for(var f in g){var d=g[f];if(d!==undefined){a[f]=d}}var b=typeof window.Event=="function"&&g instanceof window.Event;if(!b&&g.hasOwnProperty&&g.hasOwnProperty("toString")){a.toString=g.toString}}return a};OpenLayers.Util.removeItem=function(d,b){for(var a=d.length-1;a>=0;a--){if(d[a]==b){d.splice(a,1)}}return d};OpenLayers.Util.clearArray=function(a){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"array = []"}));a.length=0};OpenLayers.Util.indexOf=function(f,d){for(var b=0,a=f.length;b<a;b++){if(f[b]==d){return b}}return -1};OpenLayers.Util.modifyDOMElement=function(g,l,f,h,a,d,j,b){if(l){g.id=l}if(f){g.style.left=f.x+"px";g.style.top=f.y+"px"}if(h){g.style.width=h.w+"px";g.style.height=h.h+"px"}if(a){g.style.position=a}if(d){g.style.border=d}if(j){g.style.overflow=j}if(parseFloat(b)>=0&&parseFloat(b)<1){g.style.filter="alpha(opacity="+(b*100)+")";g.style.opacity=b}else{if(parseFloat(b)==1){g.style.filter="";g.style.opacity=""}}};OpenLayers.Util.createDiv=function(a,m,l,h,g,d,b,j){var f=document.createElement("div");if(h){f.style.backgroundImage="url("+h+")"}if(!a){a=OpenLayers.Util.createUniqueID("OpenLayersDiv")}if(!g){g="absolute"}OpenLayers.Util.modifyDOMElement(f,a,m,l,g,d,b,j);return f};OpenLayers.Util.createImage=function(a,l,j,g,f,d,h,m){var b=document.createElement("img");if(!a){a=OpenLayers.Util.createUniqueID("OpenLayersDiv")}if(!f){f="relative"}OpenLayers.Util.modifyDOMElement(b,a,l,j,f,d,null,h);if(m){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(g){b.src=g}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 f=this.urls;if(f&&f instanceof Array&&f.length>1){var g=this.src.toString();var d,a;for(a=0;d=f[a];a++){if(g.indexOf(d)!=-1){break}}var h=Math.floor(f.length*Math.random());var b=f[h];a=0;while(b==d&&a++<4){h=Math.floor(f.length*Math.random());b=f[h]}this.src=g.replace(d,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 f=navigator.appVersion.split("MSIE");var a=parseFloat(f[1]);var b=false;try{b=!!(document.body.filters)}catch(d){}OpenLayers.Util.alphaHackNeeded=(b&&(a>=5.5)&&(a<7))}return OpenLayers.Util.alphaHackNeeded};OpenLayers.Util.modifyAlphaImageDiv=function(a,b,o,m,j,h,d,f,l){OpenLayers.Util.modifyDOMElement(a,b,o,m,h,null,null,l);var g=a.childNodes[0];if(j){g.src=j}OpenLayers.Util.modifyDOMElement(g,a.id+"_innerImage",null,m,"relative",d);if(OpenLayers.Util.alphaHack()){if(a.style.display!="none"){a.style.display="inline-block"}if(f==null){f="scale"}a.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+g.src+"', sizingMethod='"+f+"')";if(parseFloat(a.style.opacity)>=0&&parseFloat(a.style.opacity)<1){a.style.filter+=" alpha(opacity="+a.style.opacity*100+")"}g.style.filter="alpha(opacity=0)"}};OpenLayers.Util.createAlphaImageDiv=function(b,o,m,j,h,d,f,l,p){var a=OpenLayers.Util.createDiv();var g=OpenLayers.Util.createImage(null,null,null,null,null,null,null,false);a.appendChild(g);if(p){g.style.display="none";OpenLayers.Event.observe(g,"load",OpenLayers.Function.bind(OpenLayers.Util.onImageLoad,a));OpenLayers.Event.observe(g,"error",OpenLayers.Function.bind(OpenLayers.Util.onImageLoadError,a))}OpenLayers.Util.modifyAlphaImageDiv(a,b,o,m,j,h,d,f,l);return a};OpenLayers.Util.upperCaseObject=function(b){var a={};for(var d in b){a[d.toUpperCase()]=b[d]}return a};OpenLayers.Util.applyDefaults=function(f,d){f=f||{};var b=typeof window.Event=="function"&&d instanceof window.Event;for(var a in d){if(f[a]===undefined||(!b&&d.hasOwnProperty&&d.hasOwnProperty(a)&&!f.hasOwnProperty(a))){f[a]=d[a]}}if(!b&&d&&d.hasOwnProperty&&d.hasOwnProperty("toString")&&!f.hasOwnProperty("toString")){f.toString=d.toString}return f};OpenLayers.Util.getParameterString=function(l){var j=[];for(var d in l){var g=l[d];if((g!=null)&&(typeof g!="function")){var b;if(typeof g=="object"&&g.constructor==Array){var h=[];for(var f=0,a=g.length;f<a;f++){h.push(encodeURIComponent(g[f]))}b=h.join(",")}else{b=encodeURIComponent(g)}j.push(encodeURIComponent(d)+"="+b)}}return j.join("&")};OpenLayers.ImgPath="";OpenLayers.Util.getImagesLocation=function(){return OpenLayers.ImgPath||(OpenLayers._getScriptLocation()+"img/")};OpenLayers.Util.Try=function(){var f=null;for(var d=0,a=arguments.length;d<a;d++){var b=arguments[d];try{f=b();break}catch(g){}}return f};OpenLayers.Util.getNodes=function(d,b){var a=OpenLayers.Util.Try(function(){return OpenLayers.Util._getNodes(d.documentElement.childNodes,b)},function(){return OpenLayers.Util._getNodes(d.childNodes,b)});return a};OpenLayers.Util._getNodes=function(d,g){var b=[];for(var f=0,a=d.length;f<a;f++){if(d[f].nodeName==g){b.push(d[f])}}return b};OpenLayers.Util.getTagText=function(d,f,b){var a=OpenLayers.Util.getNodes(d,f);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,d){var b=(a.relatedTarget)?a.relatedTarget:a.toElement;while(b!=d&&b!=null){b=b.parentNode}return(b!=d)};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(j,g){var T=6378137,S=6356752.3142,O=1/298.257223563;var r=OpenLayers.Util.rad(g.lon-j.lon);var R=Math.atan((1-O)*Math.tan(OpenLayers.Util.rad(j.lat)));var Q=Math.atan((1-O)*Math.tan(OpenLayers.Util.rad(g.lat)));var q=Math.sin(R),m=Math.cos(R);var p=Math.sin(Q),l=Math.cos(Q);var z=r,u=2*Math.PI;var w=20;while(Math.abs(z-u)>1e-12&&--w>0){var J=Math.sin(z),h=Math.cos(z);var U=Math.sqrt((l*J)*(l*J)+(m*p-q*l*h)*(m*p-q*l*h));if(U==0){return 0}var M=q*p+m*l*h;var I=Math.atan2(U,M);var o=Math.asin(m*l*J/U);var N=Math.cos(o)*Math.cos(o);var v=M-2*q*p/N;var F=O/16*N*(4+O*(4-3*N));u=z;z=r+(1-F)*O*Math.sin(o)*(I+F*U*(v+F*M*(-1+2*v*v)))}if(w==0){return NaN}var E=N*(T*T-S*S)/(S*S);var H=1+E/16384*(4096+E*(-768+E*(320-175*E)));var G=E/1024*(256+E*(-128+E*(74-47*E)));var K=G*U*(v+G/4*(M*(-1+2*v*v)-G/6*v*(-3+4*U*U)*(-3+4*v*v)));var D=S*H*(I-K);var P=D.toFixed(3)/1000;return P};OpenLayers.Util.getParameters=function(b){b=b||window.location.href;var a="";if(OpenLayers.String.contains(b,"?")){var d=b.indexOf("?")+1;var g=OpenLayers.String.contains(b,"#")?b.indexOf("#"):b.length;a=b.substring(d,g)}var u={};var f=a.split(/[&;]/);for(var m=0,o=f.length;m<o;++m){var l=f[m].split("=");if(l[0]){var q=decodeURIComponent(l[0]);var p=l[1]||"";p=p.split(",");for(var h=0,r=p.length;h<r;h++){p[h]=decodeURIComponent(p[h])}if(p.length==1){p=p[0]}u[q]=p}}return u};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(f,a){if(a==null){a="degrees"}var d=OpenLayers.Util.normalizeScale(f);var b=1/(d*OpenLayers.INCHES_PER_UNIT[a]*OpenLayers.DOTS_PER_INCH);return b};OpenLayers.Util.getScaleFromResolution=function(b,a){if(a==null){a="degrees"}var d=b*OpenLayers.INCHES_PER_UNIT[a]*OpenLayers.DOTS_PER_INCH;return d};OpenLayers.Util.safeStopPropagation=function(a){OpenLayers.Event.stop(a,true)};OpenLayers.Util.pagePosition=function(g){var a=0,f=0;var b=g;var h=g;while(b){if(b==document.body){if(OpenLayers.Element.getStyle(h,"position")=="absolute"){break}}a+=b.offsetTop||0;f+=b.offsetLeft||0;h=b;try{b=b.offsetParent}catch(d){OpenLayers.Console.error(OpenLayers.i18n("pagePositionFailed",{elemId:b.id}));break}}b=g;while(b){a-=b.scrollTop||0;f-=b.scrollLeft||0;b=b.parentNode}return[f,a]};OpenLayers.Util.isEquivalentUrl=function(h,g,d){d=d||{};OpenLayers.Util.applyDefaults(d,{ignoreCase:true,ignorePort80:true,ignoreHash:true});var b=OpenLayers.Util.createUrlObject(h,d);var a=OpenLayers.Util.createUrlObject(g,d);for(var f in b){if(f!=="args"){if(b[f]!=a[f]){return false}}}for(var f in b.args){if(b.args[f]!=a.args[f]){return false}delete a.args[f]}for(var f in a.args){return false}return true};OpenLayers.Util.createUrlObject=function(d,p){p=p||{};if(!(/^\w+:\/\//).test(d)){var j=window.location;var g=j.port?":"+j.port:"";var l=j.protocol+"//"+j.host.split(":").shift()+g;if(d.indexOf("/")===0){d=l+d}else{var h=j.pathname.split("/");h.pop();d=l+h.join("/")+"/"+d}}if(p.ignoreCase){d=d.toLowerCase()}var m=document.createElement("a");m.href=d;var f={};f.host=m.host.split(":").shift();f.protocol=m.protocol;if(p.ignorePort80){f.port=(m.port=="80"||m.port=="0")?"":m.port}else{f.port=(m.port==""||m.port=="0")?"80":m.port}f.hash=(p.ignoreHash||m.hash==="#")?"":m.hash;var b=m.search;if(!b){var o=d.indexOf("?");b=(o!=-1)?d.substr(o):""}f.args=OpenLayers.Util.getParameters(b);f.pathname=(m.pathname.charAt(0)=="/")?m.pathname:"/"+m.pathname;return f};OpenLayers.Util.removeTail=function(b){var d=null;var a=b.indexOf("?");var f=b.indexOf("#");if(a==-1){d=(f!=-1)?b.substr(0,f):b}else{d=(f!=-1)?b.substr(0,Math.min(a,f)):b.substr(0,a)}return d};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,u,v){var p,g;var a=document.createElement("div");a.style.visibility="hidden";var r=(v&&v.containerElement)?v.containerElement:document.body;if(u){if(u.w){p=u.w;a.style.width=p+"px"}else{if(u.h){g=u.h;a.style.height=g+"px"}}}if(v&&v.displayClass){a.className=v.displayClass}var j=document.createElement("div");j.innerHTML=b;j.style.overflow="visible";if(j.childNodes){for(var f=0,d=j.childNodes.length;f<d;f++){if(!j.childNodes[f].style){continue}j.childNodes[f].style.overflow="visible"}}a.appendChild(j);r.appendChild(a);var q=false;var o=a.parentNode;while(o&&o.tagName.toLowerCase()!="body"){var m=OpenLayers.Element.getStyle(o,"position");if(m=="absolute"){q=true;break}else{if(m&&m!="static"){break}}o=o.parentNode}if(!q){a.style.position="absolute"}if(!p){p=parseInt(j.scrollWidth);a.style.width=p+"px"}if(!g){g=parseInt(j.scrollHeight)}a.removeChild(j);r.removeChild(a);return new OpenLayers.Size(p,g)};OpenLayers.Util.getScrollbarWidth=function(){var d=OpenLayers.Util._scrollbarWidth;if(d==null){var g=null;var f=null;var a=0;var b=0;g=document.createElement("div");g.style.position="absolute";g.style.top="-1000px";g.style.left="-1000px";g.style.width="100px";g.style.height="50px";g.style.overflow="hidden";f=document.createElement("div");f.style.width="100%";f.style.height="200px";g.appendChild(f);document.body.appendChild(g);a=f.offsetWidth;g.style.overflow="scroll";b=f.offsetWidth;document.body.removeChild(document.body.lastChild);OpenLayers.Util._scrollbarWidth=(a-b);d=OpenLayers.Util._scrollbarWidth}return d};OpenLayers.Rico=new Object();OpenLayers.Rico.Corner={round:function(f,b){f=OpenLayers.Util.getElement(f);this._setOptions(b);var a=this.options.color;if(this.options.color=="fromElement"){a=this._background(f)}var d=this.options.bgColor;if(this.options.bgColor=="fromParent"){d=this._background(f.offsetParent)}this._roundCornersImpl(f,a,d)},changeColor:function(d,b){d.style.backgroundColor=b;var a=d.parentNode.getElementsByTagName("span");for(var f=0;f<a.length;f++){a[f].style.backgroundColor=b}},changeOpacity:function(d,h){var f=h;var a="alpha(opacity="+h*100+")";d.style.opacity=f;d.style.filter=a;var b=d.parentNode.getElementsByTagName("span");for(var g=0;g<b.length;g++){b[g].style.opacity=f;b[g].style.filter=a}},reRound:function(f,d){var b=f.parentNode.childNodes[0];var a=f.parentNode.childNodes[2];f.parentNode.removeChild(b);f.parentNode.removeChild(a);this.round(f.parentNode,d)},_roundCornersImpl:function(d,a,b){if(this.options.border){this._renderBorder(d,b)}if(this._isTopRounded()){this._roundTopCorners(d,a,b)}if(this._isBottomRounded()){this._roundBottomCorners(d,a,b)}},_renderBorder:function(f,g){var b="1px solid "+this._borderColor(g);var a="border-left: "+b;var h="border-right: "+b;var d="style='"+a+";"+h+"'";f.innerHTML="<div "+d+">"+f.innerHTML+"</div>"},_roundTopCorners:function(d,a,g){var f=this._createCorner(g);for(var b=0;b<this.options.numSlices;b++){f.appendChild(this._createCornerSlice(a,g,b,"top"))}d.style.paddingTop=0;d.insertBefore(f,d.firstChild)},_roundBottomCorners:function(d,a,g){var f=this._createCorner(g);for(var b=(this.options.numSlices-1);b>=0;b--){f.appendChild(this._createCornerSlice(a,g,b,"bottom"))}d.style.paddingBottom=0;d.appendChild(f)},_createCorner:function(b){var a=document.createElement("div");a.style.backgroundColor=(this._isTransparent()?"transparent":b);return a},_createCornerSlice:function(d,f,j,a){var g=document.createElement("span");var b=g.style;b.backgroundColor=d;b.display="block";b.height="1px";b.overflow="hidden";b.fontSize="1px";var h=this._borderColor(d,f);if(this.options.border&&j==0){b.borderTopStyle="solid";b.borderTopWidth="1px";b.borderLeftWidth="0px";b.borderRightWidth="0px";b.borderBottomWidth="0px";b.height="0px";b.borderColor=h}else{if(h){b.borderColor=h;b.borderStyle="solid";b.borderWidth="0px 1px"}}if(!this.options.compact&&(j==(this.options.numSlices-1))){b.height="2px"}this._setMargin(g,j,a);this._setBorder(g,j,a);return g},_setOptions:function(a){this.options={corners:"all",color:"fromElement",bgColor:"fromParent",blend:true,border:false,compact:false};OpenLayers.Util.extend(this.options,a||{});this.options.numSlices=this.options.compact?2:4;if(this._isTransparent()){this.options.blend=false}},_whichSideTop:function(){if(this._hasString(this.options.corners,"all","top")){return""}if(this.options.corners.indexOf("tl")>=0&&this.options.corners.indexOf("tr")>=0){return""}if(this.options.corners.indexOf("tl")>=0){return"left"}else{if(this.options.corners.indexOf("tr")>=0){return"right"}}return""},_whichSideBottom:function(){if(this._hasString(this.options.corners,"all","bottom")){return""}if(this.options.corners.indexOf("bl")>=0&&this.options.corners.indexOf("br")>=0){return""}if(this.options.corners.indexOf("bl")>=0){return"left"}else{if(this.options.corners.indexOf("br")>=0){return"right"}}return""},_borderColor:function(a,b){if(a=="transparent"){return b}else{if(this.options.border){return this.options.border}else{if(this.options.blend){return this._blend(b,a)}else{return""}}}},_setMargin:function(f,g,b){var d=this._marginSize(g);var a=b=="top"?this._whichSideTop():this._whichSideBottom();if(a=="left"){f.style.marginLeft=d+"px";f.style.marginRight="0px"}else{if(a=="right"){f.style.marginRight=d+"px";f.style.marginLeft="0px"}else{f.style.marginLeft=d+"px";f.style.marginRight=d+"px"}}},_setBorder:function(f,g,b){var d=this._borderSize(g);var a=b=="top"?this._whichSideTop():this._whichSideBottom();if(a=="left"){f.style.borderLeftWidth=d+"px";f.style.borderRightWidth="0px"}else{if(a=="right"){f.style.borderRightWidth=d+"px";f.style.borderLeftWidth="0px"}else{f.style.borderLeftWidth=d+"px";f.style.borderRightWidth=d+"px"}}if(this.options.border!=false){f.style.borderLeftWidth=d+"px";f.style.borderRightWidth=d+"px"}},_marginSize:function(g){if(this._isTransparent()){return 0}var f=[5,3,2,1];var a=[3,2,1,0];var d=[2,1];var b=[1,0];if(this.options.compact&&this.options.blend){return b[g]}else{if(this.options.compact){return d[g]}else{if(this.options.blend){return a[g]}else{return f[g]}}}},_borderSize:function(g){var f=[5,3,2,1];var b=[2,1,1,1];var a=[1,0];var d=[0,2,0,0];if(this.options.compact&&(this.options.blend||this._isTransparent())){return 1}else{if(this.options.compact){return a[g]}else{if(this.options.blend){return b[g]}else{if(this.options.border){return d[g]}else{if(this._isTransparent()){return f[g]}}}}}return 0},_hasString:function(b){for(var a=1;a<arguments.length;a++){if(b.indexOf(arguments[a])>=0){return true}}return false},_blend:function(d,a){var b=OpenLayers.Rico.Color.createFromHex(d);b.blend(OpenLayers.Rico.Color.createFromHex(a));return b},_background:function(a){try{return OpenLayers.Rico.Color.createColorFromBackground(a).asHex()}catch(b){return"#ffffff"}},_isTransparent:function(){return this.options.color=="transparent"},_isTopRounded:function(){return this._hasString(this.options.corners,"all","top","tl","tr")},_isBottomRounded:function(){return this._hasString(this.options.corners,"all","bottom","bl","br")},_hasSingleTextChild:function(a){return a.childNodes.length==1&&a.childNodes[0].nodeType==3}};(function(){if(window.google&&google.gears){return}var a=null;if(typeof GearsFactory!="undefined"){a=new GearsFactory()}else{try{a=new ActiveXObject("Gears.Factory");if(a.getBuildInfo().indexOf("ie_mobile")!=-1){a.privateSetGlobalObject(this)}}catch(b){if((typeof navigator.mimeTypes!="undefined")&&navigator.mimeTypes["application/x-googlegears"]){a=document.createElement("object");a.style.display="none";a.width=0;a.height=0;a.type="application/x-googlegears";document.documentElement.appendChild(a)}}}if(!a){return}if(!window.google){google={}}if(!google.gears){google.gears={factory:a}}})();OpenLayers.Element={visible:function(a){return OpenLayers.Util.getElement(a).style.display!="none"},toggle:function(){for(var d=0,a=arguments.length;d<a;d++){var b=OpenLayers.Util.getElement(arguments[d]);var f=OpenLayers.Element.visible(b)?"hide":"show";OpenLayers.Element[f](b)}},hide:function(){for(var d=0,a=arguments.length;d<a;d++){var b=OpenLayers.Util.getElement(arguments[d]);b.style.display="none"}},show:function(){for(var d=0,a=arguments.length;d<a;d++){var b=OpenLayers.Util.getElement(arguments[d]);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 g=a.visibility;var d=a.position;a.visibility="hidden";a.position="absolute";a.display="";var h=b.clientWidth;var f=b.clientHeight;a.display="none";a.position=d;a.visibility=g;return{width:h,height:f}},hasClass:function(b,a){var d=b.className;return(!!d&&new RegExp("(^|\\s)"+a+"(\\s|$)").test(d))},addClass:function(b,a){if(!OpenLayers.Element.hasClass(b,a)){b.className+=(b.className?" ":"")+a}return b},removeClass:function(b,a){var d=b.className;if(d){b.className=OpenLayers.String.trim(d.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(d,f){d=OpenLayers.Util.getElement(d);var g=null;if(d&&d.style){g=d.style[OpenLayers.String.camelize(f)];if(!g){if(document.defaultView&&document.defaultView.getComputedStyle){var b=document.defaultView.getComputedStyle(d,null);g=b?b.getPropertyValue(f):null}else{if(d.currentStyle){g=d.currentStyle[OpenLayers.String.camelize(f)]}}}var a=["left","top","right","bottom"];if(window.opera&&(OpenLayers.Util.indexOf(a,f)!=-1)&&(OpenLayers.Element.getStyle(d,"position")=="static")){g="auto"}}return g=="auto"?null:g}};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 d=0,a=b.length;d<a;++d){if(b[d].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,f,d){this.url=a;this.size=(b)?b:new OpenLayers.Size(20,20);this.offset=f?f:new OpenLayers.Pixel(-(this.size.w/2),-(this.size.h/2));this.calculateOffset=d;var g=OpenLayers.Util.createUniqueID("OL_Icon_");this.imageDiv=OpenLayers.Util.createAlphaImageDiv(g)},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(j,d,h,b,g,f){if(j==null){j=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")}this.id=j;this.lonlat=d;this.contentSize=(h!=null)?h: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 j=this.div.id+"_contentDiv";this.contentDiv=OpenLayers.Util.createDiv(j,null,this.contentSize.clone(),null,"relative");this.contentDiv.className=this.contentDisplayClass;this.groupDiv.appendChild(this.contentDiv);this.div.appendChild(this.groupDiv);if(g){this.addCloseBox(f)}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 d=b.getPropertyValue("overflow");if(d!="hidden"){this.contentDiv._oldOverflow=d;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(d){this.size=d.clone();var b=this.getContentDivPadding();var a=b.left+b.right;var g=b.top+b.bottom;this.fixPadding();a+=this.padding.left+this.padding.right;g+=this.padding.top+this.padding.bottom;if(this.closeDiv){var f=parseInt(this.closeDiv.style.width);a+=f+b.right}this.size.w+=a;this.size.h+=g;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=d.w+"px";this.contentDiv.style.height=d.h+"px"}},updateSize:function(){var g="<div class='"+this.contentDisplayClass+"'>"+this.contentDiv.innerHTML+"</div>";var l=(this.map)?this.map.layerContainerDiv:document.body;var m=OpenLayers.Util.getRenderedDimensions(g,null,{displayClass:this.displayClass,containerElement:l});var j=this.getSafeContentSize(m);var h=null;if(j.equals(m)){h=m}else{var b=new OpenLayers.Size();b.w=(j.w<m.w)?j.w:null;b.h=(j.h<m.h)?j.h:null;if(b.w&&b.h){h=j}else{var f=OpenLayers.Util.getRenderedDimensions(g,b,{displayClass:this.contentDisplayClass,containerElement:l});var d=OpenLayers.Element.getStyle(this.contentDiv,"overflow");if((d!="hidden")&&(f.equals(j))){var a=OpenLayers.Util.getScrollbarWidth();if(b.w){f.h+=a}else{f.w+=a}}h=this.getSafeContentSize(f)}}this.setSize(h)},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 h=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 g=0,a=b.length;g<a;g++){var d=b[g];if(d.width==0||d.height==0){var f={popup:this,img:d};d._onImgLoad=OpenLayers.Function.bind(h,f);OpenLayers.Event.observe(d,"load",d._onImgLoad)}}},getSafeContentSize:function(p){var f=p.clone();var m=this.getContentDivPadding();var o=m.left+m.right;var j=m.top+m.bottom;this.fixPadding();o+=this.padding.left+this.padding.right;j+=this.padding.top+this.padding.bottom;if(this.closeDiv){var d=parseInt(this.closeDiv.style.width);o+=d+m.right}if(this.minSize){f.w=Math.max(f.w,(this.minSize.w-o));f.h=Math.max(f.h,(this.minSize.h-j))}if(this.maxSize){f.w=Math.min(f.w,(this.maxSize.w-o));f.h=Math.min(f.h,(this.maxSize.h-j))}if(this.map&&this.map.size){var h=0,g=0;if(this.keepInMap&&!this.panMapIfOutOfView){var l=this.map.getPixelFromLonLat(this.lonlat);switch(this.relativePosition){case"tr":h=l.x;g=this.map.size.h-l.y;break;case"tl":h=this.map.size.w-l.x;g=this.map.size.h-l.y;break;case"bl":h=this.map.size.w-l.x;g=l.y;break;case"br":h=l.x;g=l.y;break;default:h=l.x;g=this.map.size.h-l.y;break}}var a=this.map.size.h-this.map.paddingForPopups.top-this.map.paddingForPopups.bottom-j-g;var b=this.map.size.w-this.map.paddingForPopups.left-this.map.paddingForPopups.right-o-h;f.w=Math.min(f.w,b);f.h=Math.min(f.h,a)}return f},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(d){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=d||function(f){this.hide();OpenLayers.Event.stop(f)};OpenLayers.Event.observe(this.closeDiv,"click",OpenLayers.Function.bindAsEventListener(a,this))},panIntoView:function(){var g=this.map.getSize();var f=this.map.getViewPortPxFromLayerPx(new OpenLayers.Pixel(parseInt(this.div.style.left),parseInt(this.div.style.top)));var d=f.clone();if(f.x<this.map.paddingForPopups.left){d.x=this.map.paddingForPopups.left}else{if((f.x+this.size.w)>(g.w-this.map.paddingForPopups.right)){d.x=g.w-this.map.paddingForPopups.right-this.size.w}}if(f.y<this.map.paddingForPopups.top){d.y=this.map.paddingForPopups.top}else{if((f.y+this.size.h)>(g.h-this.map.paddingForPopups.bottom)){d.y=g.h-this.map.paddingForPopups.bottom-this.size.h}}var b=f.x-d.x;var a=f.y-d.y;this.map.pan(b,a)},registerEvents:function(){this.events=new OpenLayers.Events(this,this.div,null,true);this.events.on({mousedown:this.onmousedown,mousemove:this.onmousemove,mouseup:this.onmouseup,click:this.onclick,mouseout:this.onmouseout,dblclick:this.ondblclick,scope:this})},onmousedown:function(a){this.mousedown=true;OpenLayers.Event.stop(a,true)},onmousemove:function(a){if(this.mousedown){OpenLayers.Event.stop(a,true)}},onmouseup:function(a){if(this.mousedown){this.mousedown=false;OpenLayers.Event.stop(a,true)}},onclick:function(a){OpenLayers.Event.stop(a,true)},onmouseout:function(a){this.mousedown=false},ondblclick:function(a){OpenLayers.Event.stop(a,true)},CLASS_NAME:"OpenLayers.Popup"});OpenLayers.Popup.WIDTH=200;OpenLayers.Popup.HEIGHT=200;OpenLayers.Popup.COLOR="white";OpenLayers.Popup.OPACITY=1;OpenLayers.Popup.BORDER="0px";OpenLayers.Protocol=OpenLayers.Class({format:null,options:null,autoDestroy:true,initialize:function(a){a=a||{};OpenLayers.Util.extend(this,a);this.options=a},destroy:function(){this.options=null;this.format=null},read:function(){},create:function(){},update:function(){},"delete":function(){},commit:function(){},abort:function(a){},CLASS_NAME:"OpenLayers.Protocol"});OpenLayers.Protocol.Response=OpenLayers.Class({code:null,requestType:null,last:true,features:null,reqFeatures:null,priv:null,initialize:function(a){OpenLayers.Util.extend(this,a)},success:function(){return this.code>0},CLASS_NAME:"OpenLayers.Protocol.Response"});OpenLayers.Protocol.Response.SUCCESS=1;OpenLayers.Protocol.Response.FAILURE=0;OpenLayers.Renderer=OpenLayers.Class({container:null,root:null,extent:null,locked:false,size:null,resolution:null,map:null,initialize:function(a,b){this.container=OpenLayers.Util.getElement(a)},destroy:function(){this.container=null;this.extent=null;this.size=null;this.resolution=null;this.map=null},supported:function(){return false},setExtent:function(a,b){this.extent=a.clone();if(b){this.resolution=null}},setSize:function(a){this.size=a.clone();this.resolution=null},getResolution:function(){this.resolution=this.resolution||this.map.getResolution();return this.resolution},drawFeature:function(a,b){if(b==null){b=a.style}if(a.geometry){var d=a.geometry.getBounds();if(d){if(!d.intersectsBounds(this.extent)){b={display:"none"}}var f=this.drawGeometry(a.geometry,b,a.id);if(b.display!="none"&&b.label&&f!==false){this.drawText(a.id,b,a.geometry.getCentroid())}else{this.removeText(a.id)}return f}}},drawGeometry:function(d,a,b){},drawText:function(d,b,a){},removeText:function(a){},clear:function(){},getFeatureIdFromEvent:function(a){},eraseFeatures:function(d){if(!(d instanceof Array)){d=[d]}for(var b=0,a=d.length;b<a;++b){this.eraseGeometry(d[b].geometry);this.removeText(d[b].id)}},eraseGeometry:function(a){},moveRoot:function(a){},getRenderLayerId:function(){return this.container.id},CLASS_NAME:"OpenLayers.Renderer"});OpenLayers.Strategy=OpenLayers.Class({layer:null,options:null,active:null,autoActivate:true,autoDestroy:true,initialize:function(a){OpenLayers.Util.extend(this,a);this.options=a;this.active=false},destroy:function(){this.deactivate();this.layer=null;this.options=null},setLayer:function(a){this.layer=a},activate:function(){if(!this.active){this.active=true;return true}return false},deactivate:function(){if(this.active){this.active=false;return true}return false},CLASS_NAME:"OpenLayers.Strategy"});OpenLayers.Rico.Color=OpenLayers.Class({initialize:function(d,b,a){this.rgb={r:d,g:b,b:a}},setRed:function(a){this.rgb.r=a},setGreen:function(a){this.rgb.g=a},setBlue:function(a){this.rgb.b=a},setHue:function(b){var a=this.asHSB();a.h=b;this.rgb=OpenLayers.Rico.Color.HSBtoRGB(a.h,a.s,a.b)},setSaturation:function(b){var a=this.asHSB();a.s=b;this.rgb=OpenLayers.Rico.Color.HSBtoRGB(a.h,a.s,a.b)},setBrightness:function(a){var d=this.asHSB();d.b=a;this.rgb=OpenLayers.Rico.Color.HSBtoRGB(d.h,d.s,d.b)},darken:function(b){var a=this.asHSB();this.rgb=OpenLayers.Rico.Color.HSBtoRGB(a.h,a.s,Math.max(a.b-b,0))},brighten:function(b){var a=this.asHSB();this.rgb=OpenLayers.Rico.Color.HSBtoRGB(a.h,a.s,Math.min(a.b+b,1))},blend:function(a){this.rgb.r=Math.floor((this.rgb.r+a.rgb.r)/2);this.rgb.g=Math.floor((this.rgb.g+a.rgb.g)/2);this.rgb.b=Math.floor((this.rgb.b+a.rgb.b)/2)},isBright:function(){var a=this.asHSB();return this.asHSB().b>0.5},isDark:function(){return !this.isBright()},asRGB:function(){return"rgb("+this.rgb.r+","+this.rgb.g+","+this.rgb.b+")"},asHex:function(){return"#"+this.rgb.r.toColorPart()+this.rgb.g.toColorPart()+this.rgb.b.toColorPart()},asHSB:function(){return OpenLayers.Rico.Color.RGBtoHSB(this.rgb.r,this.rgb.g,this.rgb.b)},toString:function(){return this.asHex()}});OpenLayers.Rico.Color.createFromHex=function(f){if(f.length==4){var b=f;var f="#";for(var d=1;d<4;d++){f+=(b.charAt(d)+b.charAt(d))}}if(f.indexOf("#")==0){f=f.substring(1)}var h=f.substring(0,2);var g=f.substring(2,4);var a=f.substring(4,6);return new OpenLayers.Rico.Color(parseInt(h,16),parseInt(g,16),parseInt(a,16))};OpenLayers.Rico.Color.createColorFromBackground=function(f){var b=RicoUtil.getElementsComputedStyle(OpenLayers.Util.getElement(f),"backgroundColor","background-color");if(b=="transparent"&&f.parentNode){return OpenLayers.Rico.Color.createColorFromBackground(f.parentNode)}if(b==null){return new OpenLayers.Rico.Color(255,255,255)}if(b.indexOf("rgb(")==0){var a=b.substring(4,b.length-1);var d=a.split(",");return new OpenLayers.Rico.Color(parseInt(d[0]),parseInt(d[1]),parseInt(d[2]))}else{if(b.indexOf("#")==0){return OpenLayers.Rico.Color.createFromHex(b)}else{return new OpenLayers.Rico.Color(255,255,255)}}};OpenLayers.Rico.Color.HSBtoRGB=function(m,j,r){var d=0;var g=0;var u=0;if(j==0){d=parseInt(r*255+0.5);g=d;u=d}else{var l=(m-Math.floor(m))*6;var o=l-Math.floor(l);var b=r*(1-j);var a=r*(1-j*o);var v=r*(1-(j*(1-o)));switch(parseInt(l)){case 0:d=(r*255+0.5);g=(v*255+0.5);u=(b*255+0.5);break;case 1:d=(a*255+0.5);g=(r*255+0.5);u=(b*255+0.5);break;case 2:d=(b*255+0.5);g=(r*255+0.5);u=(v*255+0.5);break;case 3:d=(b*255+0.5);g=(a*255+0.5);u=(r*255+0.5);break;case 4:d=(v*255+0.5);g=(b*255+0.5);u=(r*255+0.5);break;case 5:d=(r*255+0.5);g=(b*255+0.5);u=(a*255+0.5);break}}return{r:parseInt(d),g:parseInt(g),b:parseInt(u)}};OpenLayers.Rico.Color.RGBtoHSB=function(a,j,q){var l;var h;var p;var u=(a>j)?a:j;if(q>u){u=q}var m=(a<j)?a:j;if(q<m){m=q}p=u/255;if(u!=0){h=(u-m)/u}else{h=0}if(h==0){l=0}else{var d=(u-a)/(u-m);var o=(u-j)/(u-m);var f=(u-q)/(u-m);if(a==u){l=f-o}else{if(j==u){l=2+d-f}else{l=4+o-d}}l=l/6;if(l<0){l=l+1}}return{h:l,s:h,b:p}};OpenLayers.Bounds=OpenLayers.Class({left:null,bottom:null,right:null,top:null,centerLonLat:null,initialize:function(f,a,b,d){if(f!=null){this.left=OpenLayers.Util.toFloat(f)}if(a!=null){this.bottom=OpenLayers.Util.toFloat(a)}if(b!=null){this.right=OpenLayers.Util.toFloat(b)}if(d!=null){this.top=OpenLayers.Util.toFloat(d)}},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 d=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 d},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(h,l){if(l==null){l=this.getCenterLonLat()}var a=[];var g,f;if(l.CLASS_NAME=="OpenLayers.LonLat"){g=l.lon;f=l.lat}else{g=l.x;f=l.y}var d=(this.left-g)*h+g;var b=(this.bottom-f)*h+f;var m=(this.right-g)*h+g;var j=(this.top-f)*h+f;return new OpenLayers.Bounds(d,b,m,j)},add:function(a,d){if((a==null)||(d==null)){var b=OpenLayers.i18n("boundsAddError");OpenLayers.Console.error(b);return null}return new OpenLayers.Bounds(this.left+a,this.bottom+d,this.right+a,this.top+d)},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,f,a){if(a==null){a=true}if(b==null||f==null){return false}b=OpenLayers.Util.toFloat(b);f=OpenLayers.Util.toFloat(f);var d=false;if(a){d=((b>=this.left)&&(b<=this.right)&&(f>=this.bottom)&&(f<=this.top))}else{d=((b>this.left)&&(b<this.right)&&(f>this.bottom)&&(f<this.top))}return d},intersectsBounds:function(g,b){if(b==null){b=true}var f=false;var l=(this.left==g.right||this.right==g.left||this.top==g.bottom||this.bottom==g.top);if(b||!l){var j=(((g.bottom>=this.bottom)&&(g.bottom<=this.top))||((this.bottom>=g.bottom)&&(this.bottom<=g.top)));var h=(((g.top>=this.bottom)&&(g.top<=this.top))||((this.top>g.bottom)&&(this.top<g.top)));var d=(((g.left>=this.left)&&(g.left<=this.right))||((this.left>=g.left)&&(this.left<=g.right)));var a=(((g.right>=this.left)&&(g.right<=this.right))||((this.right>=g.left)&&(this.right<=g.right)));f=((j||h)&&(d||a))}return f},containsBounds:function(j,b,a){if(b==null){b=false}if(a==null){a=true}var d=this.contains(j.left,j.bottom,a);var f=this.contains(j.right,j.bottom,a);var h=this.contains(j.left,j.top,a);var g=this.contains(j.right,j.top,a);return(b)?(d||f||h||g):(d&&f&&h&&g)},determineQuadrant:function(d){var b="";var a=this.getCenterLonLat();b+=(d.lat<a.lat)?"b":"t";b+=(d.lon<a.lon)?"l":"r";return b},transform:function(f,b){this.centerLonLat=null;var g=OpenLayers.Projection.transform({x:this.left,y:this.bottom},f,b);var a=OpenLayers.Projection.transform({x:this.right,y:this.bottom},f,b);var d=OpenLayers.Projection.transform({x:this.left,y:this.top},f,b);var h=OpenLayers.Projection.transform({x:this.right,y:this.top},f,b);this.left=Math.min(g.x,d.x);this.bottom=Math.min(g.y,a.y);this.right=Math.max(a.x,h.x);this.top=Math.max(d.y,h.y);return this},wrapDateLine:function(a,d){d=d||{};var f=d.leftTolerance||0;var b=d.rightTolerance||0;var g=this.clone();if(a){while(g.left<a.left&&(g.right-b)<=a.left){g=g.add(a.getWidth(),0)}while((g.left+f)>=a.right&&g.right>a.right){g=g.add(-a.getWidth(),0)}}return g},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(d,a){if((d==null)||(a==null)){var b=OpenLayers.i18n("lonlatAddError");OpenLayers.Console.error(b);return null}return new OpenLayers.LonLat(this.lon+d,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(d,b){var a=OpenLayers.Projection.transform({x:this.lon,y:this.lat},d,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,d){if((a==null)||(d==null)){var b=OpenLayers.i18n("pixelAddError");OpenLayers.Console.error(b);return null}return new OpenLayers.Pixel(this.x+a,this.y+d)},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 f;if(!b){b=(OpenLayers.Util.getBrowserName()=="msie")?navigator.userLanguage:navigator.language}var d=b.split("-");d[0]=d[0].toLowerCase();if(typeof OpenLayers.Lang[d[0]]=="object"){f=d[0]}if(d[1]){var a=d[0]+"-"+d[1].toUpperCase();if(typeof OpenLayers.Lang[a]=="object"){f=a}}if(!f){OpenLayers.Console.warn("Failed to find OpenLayers.Lang."+d.join("-")+" dictionary, falling back to default language");f=OpenLayers.Lang.defaultCode}OpenLayers.Lang.code=f},translate:function(b,a){var f=OpenLayers.Lang[OpenLayers.Lang.getCode()];var d=f[b];if(!d){d=b}if(a){d=OpenLayers.String.format(d,a)}return d}};OpenLayers.i18n=OpenLayers.Lang.translate;OpenLayers.Popup.Anchored=OpenLayers.Class(OpenLayers.Popup,{relativePosition:null,keepInMap:true,anchor:null,initialize:function(l,f,j,d,b,h,g){var a=[l,f,j,d,h,g];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(d){var b=this.relativePosition;this.relativePosition=this.calculateRelativePosition(d);var f=this.calculateNewPx(d);var a=new Array(f);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 f=this.map.getLonLatFromLayerPx(b);var d=this.map.getExtent();var a=d.determineQuadrant(f);return OpenLayers.Bounds.oppositeQuadrant(a)},updateRelativePosition:function(){},calculateNewPx:function(b){var g=b.offset(this.anchor.offset);var a=this.size||this.contentSize;var f=(this.relativePosition.charAt(0)=="t");g.y+=(f)?-a.h:this.anchor.size.h;var d=(this.relativePosition.charAt(1)=="l");g.x+=(d)?-a.w:this.anchor.size.w;return g},CLASS_NAME:"OpenLayers.Popup.Anchored"});OpenLayers.Protocol.SQL=OpenLayers.Class(OpenLayers.Protocol,{databaseName:"ol",tableName:"ol_vector_features",postReadFiltering:true,initialize:function(a){OpenLayers.Protocol.prototype.initialize.apply(this,[a])},destroy:function(){OpenLayers.Protocol.prototype.destroy.apply(this)},supported:function(){return false},evaluateFilter:function(a,b){return b&&this.postReadFiltering?b.evaluate(a):true},CLASS_NAME:"OpenLayers.Protocol.SQL"});OpenLayers.Protocol.WFS=function(b){b=OpenLayers.Util.applyDefaults(b,OpenLayers.Protocol.WFS.DEFAULTS);var a=OpenLayers.Protocol.WFS["v"+b.version.replace(/\./g,"_")];if(!a){throw"Unsupported WFS version: "+b.version}return new a(b)};OpenLayers.Protocol.WFS.fromWMSLayer=function(f,d){var a,g;var j=f.params.LAYERS;var h=(j instanceof Array?j[0]:j).split(":");if(h.length>1){g=h[0]}a=h.pop();var b={url:f.url,featureType:a,featurePrefix:g,srsName:f.projection&&f.projection.getCode()||f.map&&f.map.getProjectionObject().getCode(),version:"1.1.0"};return new OpenLayers.Protocol.WFS(OpenLayers.Util.applyDefaults(d,b))};OpenLayers.Protocol.WFS.DEFAULTS={version:"1.0.0"};OpenLayers.Renderer.Canvas=OpenLayers.Class(OpenLayers.Renderer,{canvas:null,features:null,geometryMap:null,initialize:function(a){OpenLayers.Renderer.prototype.initialize.apply(this,arguments);this.root=document.createElement("canvas");this.container.appendChild(this.root);this.canvas=this.root.getContext("2d");this.features={};this.geometryMap={}},eraseGeometry:function(a){this.eraseFeatures(this.features[this.geometryMap[a.id]][0])},supported:function(){var a=document.createElement("canvas");return !!a.getContext},setExtent:function(a){this.extent=a.clone();this.resolution=null;this.redraw()},setSize:function(a){this.size=a.clone();this.root.style.width=a.w+"px";this.root.style.height=a.h+"px";this.root.width=a.w;this.root.height=a.h;this.resolution=null},drawFeature:function(a,b){if(b==null){b=a.style}b=OpenLayers.Util.extend({fillColor:"#000000",strokeColor:"#000000",strokeWidth:2,fillOpacity:1,strokeOpacity:1},b);this.features[a.id]=[a,b];if(a.geometry){this.geometryMap[a.geometry.id]=a.id}this.redraw()},drawGeometry:function(f,d){var b=f.CLASS_NAME;if((b=="OpenLayers.Geometry.Collection")||(b=="OpenLayers.Geometry.MultiPoint")||(b=="OpenLayers.Geometry.MultiLineString")||(b=="OpenLayers.Geometry.MultiPolygon")){for(var a=0;a<f.components.length;a++){this.drawGeometry(f.components[a],d)}return}switch(f.CLASS_NAME){case"OpenLayers.Geometry.Point":this.drawPoint(f,d);break;case"OpenLayers.Geometry.LineString":this.drawLineString(f,d);break;case"OpenLayers.Geometry.LinearRing":this.drawLinearRing(f,d);break;case"OpenLayers.Geometry.Polygon":this.drawPolygon(f,d);break;default:break}},drawExternalGraphic:function(m,a){var g=new Image();g.src=a.externalGraphic;if(a.graphicTitle){g.title=a.graphicTitle}var d=a.graphicWidth||a.graphicHeight;var l=a.graphicHeight||a.graphicWidth;d=d?d:a.pointRadius*2;l=l?l:a.pointRadius*2;var j=(a.graphicXOffset!=undefined)?a.graphicXOffset:-(0.5*d);var f=(a.graphicYOffset!=undefined)?a.graphicYOffset:-(0.5*l);var h=a.graphicOpacity||a.fillOpacity;var b={img:g,x:(m[0]+j),y:(m[1]+f),width:d,height:l,canvas:this.canvas};g.onload=OpenLayers.Function.bind(function(){this.canvas.drawImage(this.img,this.x,this.y,this.width,this.height)},b)},setCanvasStyle:function(b,a){if(b=="fill"){this.canvas.globalAlpha=a.fillOpacity;this.canvas.fillStyle=a.fillColor}else{if(b=="stroke"){this.canvas.globalAlpha=a.strokeOpacity;this.canvas.strokeStyle=a.strokeColor;this.canvas.lineWidth=a.strokeWidth}else{this.canvas.globalAlpha=0;this.canvas.lineWidth=1}}},drawPoint:function(d,a){if(a.graphic!==false){var b=this.getLocalXY(d);if(a.externalGraphic){this.drawExternalGraphic(b,a)}else{if(a.fill!==false){this.setCanvasStyle("fill",a);this.canvas.beginPath();this.canvas.arc(b[0],b[1],6,0,Math.PI*2,true);this.canvas.fill()}if(a.stroke!==false){this.setCanvasStyle("stroke",a);this.canvas.beginPath();this.canvas.arc(b[0],b[1],6,0,Math.PI*2,true);this.canvas.stroke();this.setCanvasStyle("reset")}}}},drawLineString:function(f,b){if(b.stroke!==false){this.setCanvasStyle("stroke",b);this.canvas.beginPath();var g=this.getLocalXY(f.components[0]);this.canvas.moveTo(g[0],g[1]);for(var a=1;a<f.components.length;a++){var d=this.getLocalXY(f.components[a]);this.canvas.lineTo(d[0],d[1])}this.canvas.stroke()}this.setCanvasStyle("reset")},drawLinearRing:function(g,d){if(d.fill!==false){this.setCanvasStyle("fill",d);this.canvas.beginPath();var h=this.getLocalXY(g.components[0]);this.canvas.moveTo(h[0],h[1]);for(var b=1;b<g.components.length-1;b++){var f=this.getLocalXY(g.components[b]);this.canvas.lineTo(f[0],f[1])}this.canvas.fill()}if(d.stroke!==false){var a=this.canvas.lineWidth;this.setCanvasStyle("stroke",d);this.canvas.beginPath();var h=this.getLocalXY(g.components[0]);this.canvas.moveTo(h[0],h[1]);for(var b=1;b<g.components.length;b++){var f=this.getLocalXY(g.components[b]);this.canvas.lineTo(f[0],f[1])}this.canvas.stroke()}this.setCanvasStyle("reset")},drawPolygon:function(d,b){this.drawLinearRing(d.components[0],b);for(var a=1;a<d.components.length;a++){this.drawLinearRing(d.components[a],{fillOpacity:0,strokeWidth:0,strokeOpacity:0,strokeColor:"#000000",fillColor:"#000000"})}},drawText:function(b,f){f=OpenLayers.Util.extend({fontColor:"#000000",labelAlign:"cm"},f);var g=this.getLocalXY(b);this.setCanvasStyle("reset");this.canvas.fillStyle=f.fontColor;this.canvas.globalAlpha=1;var h=f.fontWeight+" "+f.fontSize+" "+f.fontFamily;if(this.canvas.fillText){var d=OpenLayers.Renderer.Canvas.LABEL_ALIGN[f.labelAlign[0]]||"middle";this.canvas.font=h;this.canvas.textAlign=d;this.canvas.fillText(f.label,g[0],g[1])}else{if(this.canvas.mozDrawText){this.canvas.mozTextStyle=h;var a=this.canvas.mozMeasureText(f.label);switch(f.labelAlign[0]){case"l":break;case"r":g[0]-=a;break;case"c":default:g[0]-=a/2}this.canvas.translate(g[0],g[1]);this.canvas.mozDrawText(f.label);this.canvas.translate(-1*g[0],-1*g[1])}}this.setCanvasStyle("reset")},getLocalXY:function(b){var d=this.getResolution();var f=this.extent;var a=(b.x/d+(-f.left/d));var g=((f.top/d)-b.y/d);return[a,g]},clear:function(){this.canvas.clearRect(0,0,this.root.width,this.root.height)},getFeatureIdFromEvent:function(a){var h=this.map.getLonLatFromPixel(a.xy);var b=this.getResolution();var g=new OpenLayers.Bounds(h.lon-b*5,h.lat-b*5,h.lon+b*5,h.lat+b*5);var d=g.toGeometry();for(var f in this.features){if(!this.features.hasOwnProperty(f)){continue}if(this.features[f][0].geometry.intersects(d)){return f}}return null},eraseFeatures:function(b){if(!(b instanceof Array)){b=[b]}for(var a=0;a<b.length;++a){delete this.features[b[a].id]}this.redraw()},redraw:function(){if(!this.locked){this.clear();var g=[];var b,d;for(var h in this.features){if(!this.features.hasOwnProperty(h)){continue}b=this.features[h][0];d=this.features[h][1];if(!b.geometry){continue}this.drawGeometry(b.geometry,d);if(d.label){g.push([b,d])}}var f;for(var a=0;len=g.length,a<len;++a){f=g[a];this.drawText(f[0].geometry.getCentroid(),f[1])}}},CLASS_NAME:"OpenLayers.Renderer.Canvas"});OpenLayers.Renderer.Canvas.LABEL_ALIGN={l:"left",r:"right"};OpenLayers.ElementsIndexer=OpenLayers.Class({maxZIndex:null,order:null,indices:null,compare:null,initialize:function(a){this.compare=a?OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER_Y_ORDER:OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER_DRAWING_ORDER;this.order=[];this.indices={};this.maxZIndex=0},insert:function(d){if(this.exists(d)){this.remove(d)}var h=d.id;this.determineZIndex(d);var f=-1;var g=this.order.length;var a;while(g-f>1){a=parseInt((f+g)/2);var b=this.compare(this,d,OpenLayers.Util.getElement(this.order[a]));if(b>0){f=a}else{g=a}}this.order.splice(g,0,h);this.indices[h]=this.getZIndex(d);return this.getNextElement(g)},remove:function(b){var f=b.id;var a=OpenLayers.Util.indexOf(this.order,f);if(a>=0){this.order.splice(a,1);delete this.indices[f];if(this.order.length>0){var d=this.order[this.order.length-1];this.maxZIndex=this.indices[d]}else{this.maxZIndex=0}}},clear:function(){this.order=[];this.indices={};this.maxZIndex=0},exists:function(a){return(this.indices[a.id]!=null)},getZIndex:function(a){return a._style.graphicZIndex},determineZIndex:function(a){var b=a._style.graphicZIndex;if(b==null){b=this.maxZIndex;a._style.graphicZIndex=b}else{if(b>this.maxZIndex){this.maxZIndex=b}}},getNextElement:function(b){var a=b+1;if(a<this.order.length){var d=OpenLayers.Util.getElement(this.order[a]);if(d==undefined){d=this.getNextElement(a)}return d}else{return null}},CLASS_NAME:"OpenLayers.ElementsIndexer"});OpenLayers.ElementsIndexer.IndexingMethods={Z_ORDER:function(g,f,b){var a=g.getZIndex(f);var h=0;if(b){var d=g.getZIndex(b);h=a-d}return h},Z_ORDER_DRAWING_ORDER:function(d,b,a){var f=OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER(d,b,a);if(a&&f==0){f=1}return f},Z_ORDER_Y_ORDER:function(h,g,b){var j=OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER(h,g,b);if(b&&j==0){var d=g._geometry.getBounds().bottom;var f=b._geometry.getBounds().bottom;var a=f-d;j=(a==0)?1:a}return j}};OpenLayers.Renderer.Elements=OpenLayers.Class(OpenLayers.Renderer,{rendererRoot:null,root:null,vectorRoot:null,textRoot:null,xmlns:null,indexer:null,BACKGROUND_ID_SUFFIX:"_background",LABEL_ID_SUFFIX:"_label",minimumSymbolizer:{strokeLinecap:"round",strokeOpacity:1,strokeDashstyle:"solid",fillOpacity:1,pointRadius:0},initialize:function(a,b){OpenLayers.Renderer.prototype.initialize.apply(this,arguments);this.rendererRoot=this.createRenderRoot();this.root=this.createRoot("_root");this.vectorRoot=this.createRoot("_vroot");this.textRoot=this.createRoot("_troot");this.root.appendChild(this.vectorRoot);this.root.appendChild(this.textRoot);this.rendererRoot.appendChild(this.root);this.container.appendChild(this.rendererRoot);if(b&&(b.zIndexing||b.yOrdering)){this.indexer=new OpenLayers.ElementsIndexer(b.yOrdering)}},destroy:function(){this.clear();this.rendererRoot=null;this.root=null;this.xmlns=null;OpenLayers.Renderer.prototype.destroy.apply(this,arguments)},clear:function(){if(this.vectorRoot){while(this.vectorRoot.childNodes.length>0){this.vectorRoot.removeChild(this.vectorRoot.firstChild)}}if(this.textRoot){while(this.textRoot.childNodes.length>0){this.textRoot.removeChild(this.textRoot.firstChild)}}if(this.indexer){this.indexer.clear()}},getNodeType:function(b,a){},drawGeometry:function(j,f,h){var d=j.CLASS_NAME;var l=true;if((d=="OpenLayers.Geometry.Collection")||(d=="OpenLayers.Geometry.MultiPoint")||(d=="OpenLayers.Geometry.MultiLineString")||(d=="OpenLayers.Geometry.MultiPolygon")){for(var b=0,a=j.components.length;b<a;b++){l=this.drawGeometry(j.components[b],f,h)&&l}return l}l=false;if(f.display!="none"){if(f.backgroundGraphic){this.redrawBackgroundNode(j.id,j,f,h)}l=this.redrawNode(j.id,j,f,h)}if(l==false){var g=document.getElementById(j.id);if(g){if(g._style.backgroundGraphic){g.parentNode.removeChild(document.getElementById(j.id+this.BACKGROUND_ID_SUFFIX))}g.parentNode.removeChild(g)}}return l},redrawNode:function(j,h,b,g){var d=this.nodeFactory(j,this.getNodeType(h,b));d._featureId=g;d._geometry=h;d._geometryClass=h.CLASS_NAME;d._style=b;var a=this.drawGeometryNode(d,h,b);if(a===false){return false}d=a.node;if(this.indexer){var f=this.indexer.insert(d);if(f){this.vectorRoot.insertBefore(d,f)}else{this.vectorRoot.appendChild(d)}}else{if(d.parentNode!==this.vectorRoot){this.vectorRoot.appendChild(d)}}this.postDraw(d);return a.complete},redrawBackgroundNode:function(g,f,b,d){var a=OpenLayers.Util.extend({},b);a.externalGraphic=a.backgroundGraphic;a.graphicXOffset=a.backgroundXOffset;a.graphicYOffset=a.backgroundYOffset;a.graphicZIndex=a.backgroundGraphicZIndex;a.graphicWidth=a.backgroundWidth||a.graphicWidth;a.graphicHeight=a.backgroundHeight||a.graphicHeight;a.backgroundGraphic=null;a.backgroundXOffset=null;a.backgroundYOffset=null;a.backgroundGraphicZIndex=null;return this.redrawNode(g+this.BACKGROUND_ID_SUFFIX,f,a,null)},drawGeometryNode:function(d,g,b){b=b||d._style;OpenLayers.Util.applyDefaults(b,this.minimumSymbolizer);var a={isFilled:b.fill===undefined?true:b.fill,isStroked:b.stroke===undefined?!!b.strokeWidth:b.stroke};var f;switch(g.CLASS_NAME){case"OpenLayers.Geometry.Point":if(b.graphic===false){a.isFilled=false;a.isStroked=false}f=this.drawPoint(d,g);break;case"OpenLayers.Geometry.LineString":a.isFilled=false;f=this.drawLineString(d,g);break;case"OpenLayers.Geometry.LinearRing":f=this.drawLinearRing(d,g);break;case"OpenLayers.Geometry.Polygon":f=this.drawPolygon(d,g);break;case"OpenLayers.Geometry.Surface":f=this.drawSurface(d,g);break;case"OpenLayers.Geometry.Rectangle":f=this.drawRectangle(d,g);break;default:break}d._style=b;d._options=a;if(f!=false){return{node:this.setStyle(d,b,a,g),complete:f}}else{return false}},postDraw:function(a){},drawPoint:function(a,b){},drawLineString:function(a,b){},drawLinearRing:function(a,b){},drawPolygon:function(a,b){},drawRectangle:function(a,b){},drawCircle:function(a,b){},drawSurface:function(a,b){},removeText:function(b){var a=document.getElementById(b+this.LABEL_ID_SUFFIX);if(a){this.textRoot.removeChild(a)}},getFeatureIdFromEvent:function(a){var f=a.target;var b=f&&f.correspondingUseElement;var d=b?b:(f||a.srcElement);var g=d._featureId;return g},eraseGeometry:function(h){if((h.CLASS_NAME=="OpenLayers.Geometry.MultiPoint")||(h.CLASS_NAME=="OpenLayers.Geometry.MultiLineString")||(h.CLASS_NAME=="OpenLayers.Geometry.MultiPolygon")||(h.CLASS_NAME=="OpenLayers.Geometry.Collection")){for(var f=0,a=h.components.length;f<a;f++){this.eraseGeometry(h.components[f])}}else{var d=OpenLayers.Util.getElement(h.id);if(d&&d.parentNode){if(d.geometry){d.geometry.destroy();d.geometry=null}d.parentNode.removeChild(d);if(this.indexer){this.indexer.remove(d)}if(d._style.backgroundGraphic){var b=h.id+this.BACKGROUND_ID_SUFFIX;var g=OpenLayers.Util.getElement(b);if(g&&g.parentNode){g.parentNode.removeChild(g)}}}}},nodeFactory:function(d,a){var b=OpenLayers.Util.getElement(d);if(b){if(!this.nodeTypeCompare(b,a)){b.parentNode.removeChild(b);b=this.nodeFactory(d,a)}}else{b=this.createNode(a,d)}return b},nodeTypeCompare:function(b,a){},createNode:function(a,b){},moveRoot:function(b){var a=this.root;if(b.root.parentNode==this.rendererRoot){a=b.root}a.parentNode.removeChild(a);b.rendererRoot.appendChild(a)},getRenderLayerId:function(){return this.root.parentNode.parentNode.id},isComplexSymbol:function(a){return(a!="circle")&&!!a},CLASS_NAME:"OpenLayers.Renderer.Elements"});OpenLayers.Renderer.symbol={star:[350,75,379,161,469,161,397,215,423,301,350,250,277,301,303,215,231,161,321,161,350,75],cross:[4,0,6,0,6,4,10,4,10,6,6,6,6,10,4,10,4,6,0,6,0,4,4,4,4,0],x:[0,0,25,0,50,35,75,0,100,0,65,50,100,100,75,100,50,65,25,100,0,100,35,50,0,0],square:[0,0,0,1,1,1,1,0,0,0],triangle:[0,10,10,10,5,0,0,10]};OpenLayers.Strategy.Cluster=OpenLayers.Class(OpenLayers.Strategy,{distance:20,threshold:null,features:null,clusters:null,clustering:false,resolution:null,initialize:function(a){OpenLayers.Strategy.prototype.initialize.apply(this,[a])},activate:function(){var a=OpenLayers.Strategy.prototype.activate.call(this);if(a){this.layer.events.on({beforefeaturesadded:this.cacheFeatures,moveend:this.cluster,scope:this})}return a},deactivate:function(){var a=OpenLayers.Strategy.prototype.deactivate.call(this);if(a){this.clearCache();this.layer.events.un({beforefeaturesadded:this.cacheFeatures,moveend:this.cluster,scope:this})}return a},cacheFeatures:function(b){var a=true;if(!this.clustering){this.clearCache();this.features=b.features;this.cluster();a=false}return a},clearCache:function(){this.features=null},cluster:function(a){if((!a||a.zoomChanged)&&this.features){var d=this.layer.map.getResolution();if(d!=this.resolution||!this.clustersExist()){this.resolution=d;var m=[];var q,b,o;for(var g=0;g<this.features.length;++g){q=this.features[g];if(q.geometry){b=false;for(var f=0;f<m.length;++f){o=m[f];if(this.shouldCluster(o,q)){this.addToCluster(o,q);b=true;break}}if(!b){m.push(this.createCluster(this.features[g]))}}}this.layer.destroyFeatures();if(m.length>0){if(this.threshold>1){var l=m.slice();m=[];var p;for(var g=0,h=l.length;g<h;++g){p=l[g];if(p.attributes.count<this.threshold){Array.prototype.push.apply(m,p.cluster)}else{m.push(p)}}}this.clustering=true;this.layer.addFeatures(m);this.clustering=false}this.clusters=m}}},clustersExist:function(){var b=false;if(this.clusters&&this.clusters.length>0&&this.clusters.length==this.layer.features.length){b=true;for(var a=0;a<this.clusters.length;++a){if(this.clusters[a]!=this.layer.features[a]){b=false;break}}}return b},shouldCluster:function(a,b){var g=a.geometry.getBounds().getCenterLonLat();var d=b.geometry.getBounds().getCenterLonLat();var f=(Math.sqrt(Math.pow((g.lon-d.lon),2)+Math.pow((g.lat-d.lat),2))/this.resolution);return(f<=this.distance)},addToCluster:function(a,b){a.cluster.push(b);a.attributes.count+=1},createCluster:function(d){var b=d.geometry.getBounds().getCenterLonLat();var a=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(b.lon,b.lat),{count:1});a.cluster=[d];return a},CLASS_NAME:"OpenLayers.Strategy.Cluster"});OpenLayers.Strategy.Fixed=OpenLayers.Class(OpenLayers.Strategy,{preload:false,initialize:function(a){OpenLayers.Strategy.prototype.initialize.apply(this,[a])},destroy:function(){OpenLayers.Strategy.prototype.destroy.apply(this,arguments)},activate:function(){if(OpenLayers.Strategy.prototype.activate.apply(this,arguments)){this.layer.events.on({refresh:this.load,scope:this});if(this.layer.visibility==true||this.preload){this.load()}else{this.layer.events.on({visibilitychanged:this.load,scope:this})}return true}return false},deactivate:function(){var a=OpenLayers.Strategy.prototype.deactivate.call(this);if(a){this.layer.events.un({refresh:this.load,visibilitychanged:this.load,scope:this})}return a},load:function(a){this.layer.events.triggerEvent("loadstart");this.layer.protocol.read(OpenLayers.Util.applyDefaults({callback:this.merge,scope:this},a));this.layer.events.un({visibilitychanged:this.load,scope:this})},merge:function(j){this.layer.destroyFeatures();var g=j.features;if(g&&g.length>0){var h=this.layer.projection;var f=this.layer.map.getProjectionObject();if(!f.equals(h)){var d;for(var b=0,a=g.length;b<a;++b){d=g[b].geometry;if(d){d.transform(h,f)}}}this.layer.addFeatures(g)}this.layer.events.triggerEvent("loadend")},CLASS_NAME:"OpenLayers.Strategy.Fixed"});OpenLayers.Strategy.Paging=OpenLayers.Class(OpenLayers.Strategy,{features:null,length:10,num:null,paging:false,initialize:function(a){OpenLayers.Strategy.prototype.initialize.apply(this,[a])},activate:function(){var a=OpenLayers.Strategy.prototype.activate.call(this);if(a){this.layer.events.on({beforefeaturesadded:this.cacheFeatures,scope:this})}return a},deactivate:function(){var a=OpenLayers.Strategy.prototype.deactivate.call(this);if(a){this.clearCache();this.layer.events.un({beforefeaturesadded:this.cacheFeatures,scope:this})}return a},cacheFeatures:function(a){if(!this.paging){this.clearCache();this.features=a.features;this.pageNext(a)}},clearCache:function(){if(this.features){for(var a=0;a<this.features.length;++a){this.features[a].destroy()}}this.features=null;this.num=null},pageCount:function(){var a=this.features?this.features.length:0;return Math.ceil(a/this.length)},pageNum:function(){return this.num},pageLength:function(a){if(a&&a>0){this.length=a}return this.length},pageNext:function(a){var b=false;if(this.features){if(this.num===null){this.num=-1}var d=(this.num+1)*this.length;b=this.page(d,a)}return b},pagePrevious:function(){var a=false;if(this.features){if(this.num===null){this.num=this.pageCount()}var b=(this.num-1)*this.length;a=this.page(b)}return a},page:function(g,d){var f=false;if(this.features){if(g>=0&&g<this.features.length){var a=Math.floor(g/this.length);if(a!=this.num){this.paging=true;var b=this.features.slice(g,g+this.length);this.layer.removeFeatures(this.layer.features);this.num=a;if(d&&d.features){d.features=b}else{this.layer.addFeatures(b)}this.paging=false;f=true}}}return f},CLASS_NAME:"OpenLayers.Strategy.Paging"});OpenLayers.Strategy.Save=OpenLayers.Class(OpenLayers.Strategy,{auto:false,timer:null,initialize:function(a){OpenLayers.Strategy.prototype.initialize.apply(this,[a])},activate:function(){var a=OpenLayers.Strategy.prototype.activate.call(this);if(a){if(this.auto){if(typeof this.auto==="number"){this.timer=window.setInterval(OpenLayers.Function.bind(this.save,this),this.auto*1000)}else{this.layer.events.on({featureadded:this.triggerSave,afterfeaturemodified:this.triggerSave,scope:this})}}}return a},deactivate:function(){var a=OpenLayers.Strategy.prototype.deactivate.call(this);if(a){if(this.auto){if(typeof this.auto==="number"){window.clearInterval(this.timer)}else{this.layer.events.un({featureadded:this.triggerSave,afterfeaturemodified:this.triggerSave,scope:this})}}}return a},triggerSave:function(b){var a=b.feature;if(a.state===OpenLayers.State.INSERT||a.state===OpenLayers.State.UPDATE||a.state===OpenLayers.State.DELETE){this.save([b.feature])}},save:function(f){if(!f){f=this.layer.features}var h=this.layer.projection;var d=this.layer.map.getProjectionObject();if(!d.equals(h)){var a=f.length;var g=new Array(a);var l,j;for(var b=0;b<a;++b){l=f[b];j=l.clone();j.fid=l.fid;j.state=l.state;j._original=l;j.geometry.transform(d,h);g[b]=j}f=g}this.layer.protocol.commit(f,{callback:this.onCommit,scope:this})},onCommit:function(f){if(f.success()){var b=f.reqFeatures;var a,o;var d=[];var m=f.insertIds||[];var g=0;for(var h=0,l=b.length;h<l;++h){o=b[h];o=o._original||o;a=o.state;if(a){if(a==OpenLayers.State.DELETE){d.push(o)}else{if(a==OpenLayers.State.INSERT){o.fid=m[g];++g}}o.state=null}}if(d.length>0){this.layer.destroyFeatures(d)}}},CLASS_NAME:"OpenLayers.Strategy.Save"});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(d,b,f,a){this.playing=true;this.begin=d;this.finish=b;this.duration=f;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 h={};for(var d in this.begin){var a=this.begin[d];var g=this.finish[d];if(a==null||g==null||isNaN(a)||isNaN(g)){OpenLayers.Console.error("invalid value for Tween")}var j=g-a;h[d]=this.easing.apply(this,[this.time,a,j,this.duration])}this.time++;if(this.callbacks&&this.callbacks.eachStep){this.callbacks.eachStep.call(this,h)}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(f,a,h,g){return h*f/g+a},easeOut:function(f,a,h,g){return h*f/g+a},easeInOut:function(f,a,h,g){return h*f/g+a},CLASS_NAME:"OpenLayers.Easing.Linear"};OpenLayers.Easing.Expo={easeIn:function(f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOut:function(f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOut:function(f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},CLASS_NAME:"OpenLayers.Easing.Expo"};OpenLayers.Easing.Quad={easeIn:function(f,a,h,g){return h*(f/=g)*f+a},easeOut:function(f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOut:function(f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},CLASS_NAME:"OpenLayers.Easing.Quad"};OpenLayers.Control.ArgParser=OpenLayers.Class(OpenLayers.Control,{center:null,zoom:null,layers:null,displayProjection:null,initialize:function(a){OpenLayers.Control.prototype.initialize.apply(this,arguments)},setMap:function(g){OpenLayers.Control.prototype.setMap.apply(this,arguments);for(var d=0,a=this.map.controls.length;d<a;d++){var f=this.map.controls[d];if((f!=this)&&(f.CLASS_NAME=="OpenLayers.Control.ArgParser")){if(f.displayProjection!=this.displayProjection){this.displayProjection=f.displayProjection}break}}if(d==this.map.controls.length){var b=OpenLayers.Util.getParameters();if(b.layers){this.layers=b.layers;this.map.events.register("addlayer",this,this.configureLayers);this.configureLayers()}if(b.lat&&b.lon){this.center=new OpenLayers.LonLat(parseFloat(b.lon),parseFloat(b.lat));if(b.zoom){this.zoom=parseInt(b.zoom)}this.map.events.register("changebaselayer",this,this.setCenter);this.setCenter()}}},setCenter:function(){if(this.map.baseLayer){this.map.events.unregister("changebaselayer",this,this.setCenter);if(this.displayProjection){this.center.transform(this.displayProjection,this.map.getProjectionObject())}this.map.setCenter(this.center,this.zoom)}},configureLayers:function(){if(this.layers.length==this.map.layers.length){this.map.events.unregister("addlayer",this,this.configureLayers);for(var d=0,a=this.layers.length;d<a;d++){var b=this.map.layers[d];var f=this.layers.charAt(d);if(f=="B"){this.map.setBaseLayer(b)}else{if((f=="T")||(f=="F")){b.setVisibility(f=="T")}}}}},CLASS_NAME:"OpenLayers.Control.ArgParser"});OpenLayers.Control.Attribution=OpenLayers.Class(OpenLayers.Control,{separator:", ",initialize:function(a){OpenLayers.Control.prototype.initialize.apply(this,arguments)},destroy:function(){this.map.events.un({removelayer:this.updateAttribution,addlayer:this.updateAttribution,changelayer:this.updateAttribution,changebaselayer:this.updateAttribution,scope:this});OpenLayers.Control.prototype.destroy.apply(this,arguments)},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);this.map.events.on({changebaselayer:this.updateAttribution,changelayer:this.updateAttribution,addlayer:this.updateAttribution,removelayer:this.updateAttribution,scope:this});this.updateAttribution();return this.div},updateAttribution:function(){var f=[];if(this.map&&this.map.layers){for(var d=0,a=this.map.layers.length;d<a;d++){var b=this.map.layers[d];if(b.attribution&&b.getVisibility()){f.push(b.attribution)}}this.div.innerHTML=f.join(this.separator)}},CLASS_NAME:"OpenLayers.Control.Attribution"});OpenLayers.Control.Button=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_BUTTON,trigger:function(){},CLASS_NAME:"OpenLayers.Control.Button"});OpenLayers.Control.LayerSwitcher=OpenLayers.Class(OpenLayers.Control,{activeColor:"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(f){var g=this[f+"Layers"];if(g){for(var d=0,a=g.length;d<a;d++){var b=g[d];OpenLayers.Event.stopObservingElement(b.inputElem);OpenLayers.Event.stopObservingElement(b.labelSpan)}}this[f+"LayersDiv"].innerHTML="";this[f+"Layers"]=[]},checkRedraw:function(){var g=false;if(!this.layerStates.length||(this.map.layers.length!=this.layerStates.length)){g=true}else{for(var d=0,a=this.layerStates.length;d<a;d++){var f=this.layerStates[d];var b=this.map.layers[d];if((f.name!=b.name)||(f.inRange!=b.inRange)||(f.id!=b.id)||(f.visibility!=b.visibility)){g=true;break}}}return g},redraw:function(){if(!this.checkRedraw()){return this.div}this.clearLayersArray("base");this.clearLayersArray("data");var f=false;var q=false;var l=this.map.layers.length;this.layerStates=new Array(l);for(var h=0;h<l;h++){var j=this.map.layers[h];this.layerStates[h]={name:j.name,visibility:j.visibility,inRange:j.inRange,id:j.id}}var g=this.map.layers.slice();if(!this.ascending){g.reverse()}for(var h=0,l=g.length;h<l;h++){var j=g[h];var m=j.isBaseLayer;if(j.displayInLayerSwitcher){if(m){q=true}else{f=true}var p=(m)?(j==this.map.baseLayer):j.getVisibility();var o=document.createElement("input");o.id=this.id+"_input_"+j.name;o.name=(m)?"baseLayers":j.name;o.type=(m)?"radio":"checkbox";o.value=j.name;o.checked=p;o.defaultChecked=p;if(!m&&!j.inRange){o.disabled=true}var a={inputElem:o,layer:j,layerSwitcher:this};OpenLayers.Event.observe(o,"mouseup",OpenLayers.Function.bindAsEventListener(this.onInputClick,a));var b=document.createElement("span");if(!m&&!j.inRange){b.style.color="gray"}b.innerHTML=j.name;b.style.verticalAlign=(m)?"bottom":"baseline";OpenLayers.Event.observe(b,"click",OpenLayers.Function.bindAsEventListener(this.onInputClick,a));var u=document.createElement("br");var r=(m)?this.baseLayers:this.dataLayers;r.push({layer:j,inputElem:o,labelSpan:b});var d=(m)?this.baseLayersDiv:this.dataLayersDiv;d.appendChild(o);d.appendChild(b);d.appendChild(u)}}this.dataLbl.style.display=(f)?"":"none";this.baseLbl.style.display=(q)?"":"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 d=this.baseLayers[b];if(d.inputElem.checked){this.map.setBaseLayer(d.layer,false)}}for(var b=0,a=this.dataLayers.length;b<a;b++){var d=this.dataLayers[b];d.layer.setVisibility(d.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 d=OpenLayers.Util.getImagesLocation();var b=new OpenLayers.Size(18,18);var a=d+"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=d+"layer-switcher-minimize.png";var b=new OpenLayers.Size(18,18);this.minimizeDiv=OpenLayers.Util.createAlphaImageDiv("OpenLayers_Control_MinimizeDiv",null,b,a,"absolute");this.minimizeDiv.style.top="5px";this.minimizeDiv.style.right="0px";this.minimizeDiv.style.left="";this.minimizeDiv.style.display="none";OpenLayers.Event.observe(this.minimizeDiv,"click",OpenLayers.Function.bindAsEventListener(this.minimizeControl,this));this.div.appendChild(this.minimizeDiv)},ignoreEvent:function(a){OpenLayers.Event.stop(a)},mouseDown:function(a){this.isMouseDown=true;this.ignoreEvent(a)},mouseUp:function(a){if(this.isMouseDown){this.isMouseDown=false;this.ignoreEvent(a)}},CLASS_NAME:"OpenLayers.Control.LayerSwitcher"});OpenLayers.Control.MouseDefaults=OpenLayers.Class(OpenLayers.Control,{performedDrag:false,wheelObserver:null,initialize:function(){OpenLayers.Control.prototype.initialize.apply(this,arguments)},destroy:function(){if(this.handler){this.handler.destroy()}this.handler=null;this.map.events.un({click:this.defaultClick,dblclick:this.defaultDblClick,mousedown:this.defaultMouseDown,mouseup:this.defaultMouseUp,mousemove:this.defaultMouseMove,mouseout:this.defaultMouseOut,scope:this});OpenLayers.Event.stopObserving(window,"DOMMouseScroll",this.wheelObserver);OpenLayers.Event.stopObserving(window,"mousewheel",this.wheelObserver);OpenLayers.Event.stopObserving(document,"mousewheel",this.wheelObserver);this.wheelObserver=null;OpenLayers.Control.prototype.destroy.apply(this,arguments)},draw:function(){this.map.events.on({click:this.defaultClick,dblclick:this.defaultDblClick,mousedown:this.defaultMouseDown,mouseup:this.defaultMouseUp,mousemove:this.defaultMouseMove,mouseout:this.defaultMouseOut,scope:this});this.registerWheelEvents()},registerWheelEvents:function(){this.wheelObserver=OpenLayers.Function.bindAsEventListener(this.onWheelEvent,this);OpenLayers.Event.observe(window,"DOMMouseScroll",this.wheelObserver);OpenLayers.Event.observe(window,"mousewheel",this.wheelObserver);OpenLayers.Event.observe(document,"mousewheel",this.wheelObserver)},defaultClick:function(b){if(!OpenLayers.Event.isLeftClick(b)){return}var a=!this.performedDrag;this.performedDrag=false;return a},defaultDblClick:function(b){var a=this.map.getLonLatFromViewPortPx(b.xy);this.map.setCenter(a,this.map.zoom+1);OpenLayers.Event.stop(b);return false},defaultMouseDown:function(a){if(!OpenLayers.Event.isLeftClick(a)){return}this.mouseDragStart=a.xy.clone();this.performedDrag=false;if(a.shiftKey){this.map.div.style.cursor="crosshair";this.zoomBox=OpenLayers.Util.createDiv("zoomBox",this.mouseDragStart,null,null,"absolute","2px solid red");this.zoomBox.style.backgroundColor="white";this.zoomBox.style.filter="alpha(opacity=50)";this.zoomBox.style.opacity="0.50";this.zoomBox.style.fontSize="1px";this.zoomBox.style.zIndex=this.map.Z_INDEX_BASE.Popup-1;this.map.viewPortDiv.appendChild(this.zoomBox)}document.onselectstart=function(){return false};OpenLayers.Event.stop(a)},defaultMouseMove:function(g){this.mousePosition=g.xy.clone();if(this.mouseDragStart!=null){if(this.zoomBox){var f=Math.abs(this.mouseDragStart.x-g.xy.x);var b=Math.abs(this.mouseDragStart.y-g.xy.y);this.zoomBox.style.width=Math.max(1,f)+"px";this.zoomBox.style.height=Math.max(1,b)+"px";if(g.xy.x<this.mouseDragStart.x){this.zoomBox.style.left=g.xy.x+"px"}if(g.xy.y<this.mouseDragStart.y){this.zoomBox.style.top=g.xy.y+"px"}}else{var f=this.mouseDragStart.x-g.xy.x;var b=this.mouseDragStart.y-g.xy.y;var h=this.map.getSize();var a=new OpenLayers.Pixel(h.w/2+f,h.h/2+b);var d=this.map.getLonLatFromViewPortPx(a);this.map.setCenter(d,null,true);this.mouseDragStart=g.xy.clone();this.map.div.style.cursor="move"}this.performedDrag=true}},defaultMouseUp:function(a){if(!OpenLayers.Event.isLeftClick(a)){return}if(this.zoomBox){this.zoomBoxEnd(a)}else{if(this.performedDrag){this.map.setCenter(this.map.center)}}document.onselectstart=null;this.mouseDragStart=null;this.map.div.style.cursor=""},defaultMouseOut:function(a){if(this.mouseDragStart!=null&&OpenLayers.Util.mouseLeft(a,this.map.div)){if(this.zoomBox){this.removeZoomBox()}this.mouseDragStart=null}},defaultWheelUp:function(a){if(this.map.getZoom()<=this.map.getNumZoomLevels()){this.map.setCenter(this.map.getLonLatFromPixel(a.xy),this.map.getZoom()+1)}},defaultWheelDown:function(a){if(this.map.getZoom()>0){this.map.setCenter(this.map.getLonLatFromPixel(a.xy),this.map.getZoom()-1)}},zoomBoxEnd:function(b){if(this.mouseDragStart!=null){if(Math.abs(this.mouseDragStart.x-b.xy.x)>5||Math.abs(this.mouseDragStart.y-b.xy.y)>5){var l=this.map.getLonLatFromViewPortPx(this.mouseDragStart);var a=this.map.getLonLatFromViewPortPx(b.xy);var j=Math.max(l.lat,a.lat);var d=Math.min(l.lat,a.lat);var h=Math.min(l.lon,a.lon);var f=Math.max(l.lon,a.lon);var g=new OpenLayers.Bounds(h,d,f,j);this.map.zoomToExtent(g)}else{var a=this.map.getLonLatFromViewPortPx(b.xy);this.map.setCenter(new OpenLayers.LonLat((a.lon),(a.lat)),this.map.getZoom()+1)}this.removeZoomBox()}},removeZoomBox:function(){this.map.viewPortDiv.removeChild(this.zoomBox);this.zoomBox=null},onWheelEvent:function(d){var b=false;var a=OpenLayers.Event.element(d);while(a!=null){if(this.map&&a==this.map.div){b=true;break}a=a.parentNode}if(b){var f=0;if(!d){d=window.event}if(d.wheelDelta){f=d.wheelDelta/120;if(window.opera&&window.opera.version()<9.2){f=-f}}else{if(d.detail){f=-d.detail/3}}if(f){d.xy=this.mousePosition;if(f<0){this.defaultWheelDown(d)}else{this.defaultWheelUp(d)}}OpenLayers.Event.stop(d)}},CLASS_NAME:"OpenLayers.Control.MouseDefaults"});OpenLayers.Control.MousePosition=OpenLayers.Class(OpenLayers.Control,{element:null,prefix:"",separator:", ",suffix:"",numDigits:5,granularity:10,lastXy:null,displayProjection:null,initialize:function(a){OpenLayers.Control.prototype.initialize.apply(this,arguments)},destroy:function(){if(this.map){this.map.events.unregister("mousemove",this,this.redraw)}OpenLayers.Control.prototype.destroy.apply(this,arguments)},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.element){this.div.left="";this.div.top="";this.element=this.div}this.redraw();return this.div},redraw:function(a){var d;if(a==null){d=new OpenLayers.LonLat(0,0)}else{if(this.lastXy==null||Math.abs(a.xy.x-this.lastXy.x)>this.granularity||Math.abs(a.xy.y-this.lastXy.y)>this.granularity){this.lastXy=a.xy;return}d=this.map.getLonLatFromPixel(a.xy);if(!d){return}if(this.displayProjection){d.transform(this.map.getProjectionObject(),this.displayProjection)}this.lastXy=a.xy}var b=this.formatOutput(d);if(b!=this.element.innerHTML){this.element.innerHTML=b}},formatOutput:function(b){var d=parseInt(this.numDigits);var a=this.prefix+b.lon.toFixed(d)+this.separator+b.lat.toFixed(d)+this.suffix;return a},setMap:function(){OpenLayers.Control.prototype.setMap.apply(this,arguments);this.map.events.register("mousemove",this,this.redraw)},CLASS_NAME:"OpenLayers.Control.MousePosition"});OpenLayers.Control.Pan=OpenLayers.Class(OpenLayers.Control,{slideFactor:50,direction:null,type:OpenLayers.Control.TYPE_BUTTON,initialize:function(b,a){this.direction=b;this.CLASS_NAME+=this.direction;OpenLayers.Control.prototype.initialize.apply(this,[a])},trigger:function(){switch(this.direction){case OpenLayers.Control.Pan.NORTH:this.map.pan(0,-this.slideFactor);break;case OpenLayers.Control.Pan.SOUTH:this.map.pan(0,this.slideFactor);break;case OpenLayers.Control.Pan.WEST:this.map.pan(-this.slideFactor,0);break;case OpenLayers.Control.Pan.EAST:this.map.pan(this.slideFactor,0);break}},CLASS_NAME:"OpenLayers.Control.Pan"});OpenLayers.Control.Pan.NORTH="North";OpenLayers.Control.Pan.SOUTH="South";OpenLayers.Control.Pan.EAST="East";OpenLayers.Control.Pan.WEST="West";OpenLayers.Control.PanZoom=OpenLayers.Class(OpenLayers.Control,{slideFactor:50,slideRatio:null,buttons:null,position:null,initialize:function(a){this.position=new OpenLayers.Pixel(OpenLayers.Control.PanZoom.X,OpenLayers.Control.PanZoom.Y);OpenLayers.Control.prototype.initialize.apply(this,arguments)},destroy:function(){OpenLayers.Control.prototype.destroy.apply(this,arguments);this.removeButtons();this.buttons=null;this.position=null},draw:function(b){OpenLayers.Control.prototype.draw.apply(this,arguments);b=this.position;this.buttons=[];var d=new OpenLayers.Size(18,18);var a=new OpenLayers.Pixel(b.x+d.w/2,b.y);this._addButton("panup","north-mini.png",a,d);b.y=a.y+d.h;this._addButton("panleft","west-mini.png",b,d);this._addButton("panright","east-mini.png",b.add(d.w,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);this._addButton("zoomworld","zoom-world-mini.png",a.add(0,d.h*4+5),d);this._addButton("zoomout","zoom-minus-mini.png",a.add(0,d.h*5+5),d);return this.div},_addButton:function(a,f,m,j){var h=OpenLayers.Util.getImagesLocation()+f;var b=OpenLayers.Util.createAlphaImageDiv(this.id+"_"+a,m,j,h,"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 d=this.slideFactor;var g=function(){return d}}else{var l=this.slideRatio;var g=function(o){return this.map.getSize()[o]*l}}b.getSlideFactor=g;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.Panel=OpenLayers.Class(OpenLayers.Control,{controls:null,defaultControl:null,initialize:function(a){OpenLayers.Control.prototype.initialize.apply(this,[a]);this.controls=[]},destroy:function(){OpenLayers.Control.prototype.destroy.apply(this,arguments);for(var a=this.controls.length-1;a>=0;a--){if(this.controls[a].events){this.controls[a].events.un({activate:this.redraw,deactivate:this.redraw,scope:this})}OpenLayers.Event.stopObservingElement(this.controls[a].panel_div);this.controls[a].panel_div=null}},activate:function(){if(OpenLayers.Control.prototype.activate.apply(this,arguments)){for(var b=0,a=this.controls.length;b<a;b++){if(this.controls[b]==this.defaultControl){this.controls[b].activate()}}this.redraw();return true}else{return false}},deactivate:function(){if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)){for(var b=0,a=this.controls.length;b<a;b++){this.controls[b].deactivate()}return true}else{return false}},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);for(var b=0,a=this.controls.length;b<a;b++){this.map.addControl(this.controls[b]);this.controls[b].deactivate();this.controls[b].events.on({activate:this.redraw,deactivate:this.redraw,scope:this})}this.activate();return this.div},redraw:function(){this.div.innerHTML="";if(this.active){for(var d=0,a=this.controls.length;d<a;d++){var b=this.controls[d].panel_div;if(this.controls[d].active){b.className=this.controls[d].displayClass+"ItemActive"}else{b.className=this.controls[d].displayClass+"ItemInactive"}this.div.appendChild(b)}}},activateControl:function(d){if(!this.active){return false}if(d.type==OpenLayers.Control.TYPE_BUTTON){d.trigger();this.redraw();return}if(d.type==OpenLayers.Control.TYPE_TOGGLE){if(d.active){d.deactivate()}else{d.activate()}this.redraw();return}for(var b=0,a=this.controls.length;b<a;b++){if(this.controls[b]!=d){if(this.controls[b].type!=OpenLayers.Control.TYPE_TOGGLE){this.controls[b].deactivate()}}}d.activate()},addControls:function(b){if(!(b instanceof Array)){b=[b]}this.controls=this.controls.concat(b);for(var f=0,a=b.length;f<a;f++){var d=document.createElement("div");var g=document.createTextNode(" ");b[f].panel_div=d;if(b[f].title!=""){b[f].panel_div.title=b[f].title}OpenLayers.Event.observe(b[f].panel_div,"click",OpenLayers.Function.bind(this.onClick,this,b[f]));OpenLayers.Event.observe(b[f].panel_div,"mousedown",OpenLayers.Function.bindAsEventListener(OpenLayers.Event.stop))}if(this.map){for(var f=0,a=b.length;f<a;f++){this.map.addControl(b[f]);b[f].deactivate();b[f].events.on({activate:this.redraw,deactivate:this.redraw,scope:this})}this.redraw()}},onClick:function(b,a){OpenLayers.Event.stop(a?a:window.event);this.activateControl(b)},getControlsBy:function(d,a){var f=(typeof a.test=="function");var b=OpenLayers.Array.filter(this.controls,function(g){return g[d]==a||(f&&a.test(g[d]))});return b},getControlsByName:function(a){return this.getControlsBy("name",a)},getControlsByClass:function(a){return this.getControlsBy("CLASS_NAME",a)},CLASS_NAME:"OpenLayers.Control.Panel"});OpenLayers.Control.Scale=OpenLayers.Class(OpenLayers.Control,{element:null,initialize:function(b,a){OpenLayers.Control.prototype.initialize.apply(this,[a]);this.element=OpenLayers.Util.getElement(b)},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.element){this.element=document.createElement("div");this.div.appendChild(this.element)}this.map.events.register("moveend",this,this.updateScale);this.updateScale();return this.div},updateScale:function(){var a=this.map.getScale();if(!a){return}if(a>=9500&&a<=950000){a=Math.round(a/1000)+"K"}else{if(a>=950000){a=Math.round(a/1000000)+"M"}else{a=Math.round(a)}}this.element.innerHTML=OpenLayers.i18n("scale",{scaleDenom:a})},CLASS_NAME:"OpenLayers.Control.Scale"});OpenLayers.Control.ScaleLine=OpenLayers.Class(OpenLayers.Control,{maxWidth:100,topOutUnits:"km",topInUnits:"m",bottomOutUnits:"mi",bottomInUnits:"ft",eTop:null,eBottom:null,initialize:function(a){OpenLayers.Control.prototype.initialize.apply(this,[a])},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.eTop){this.div.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 f=parseInt(Math.log(b)/Math.log(10));var a=Math.pow(10,f);var d=parseInt(b/a);var g;if(d>5){g=5}else{if(d>2){g=2}else{g=1}}return g*a},update:function(){var l=this.map.getResolution();if(!l){return}var q=this.map.getUnits();var d=OpenLayers.INCHES_PER_UNIT;var m=this.maxWidth*l*d[q];var a;var f;if(m>100000){a=this.topOutUnits;f=this.bottomOutUnits}else{a=this.topInUnits;f=this.bottomInUnits}var h=m/d[a];var o=m/d[f];var j=this.getBarLen(h);var g=this.getBarLen(o);h=j/d[q]*d[a];o=g/d[q]*d[f];var b=h/l;var p=o/l;if(this.eBottom.style.visibility=="visible"){this.eBottom.style.width=Math.round(p)+"px";this.eBottom.innerHTML=g+" "+f}if(this.eTop.style.visibility=="visible"){this.eTop.style.width=Math.round(b)+"px";this.eTop.innerHTML=j+" "+a}},CLASS_NAME:"OpenLayers.Control.ScaleLine"});OpenLayers.Control.ZoomIn=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_BUTTON,trigger:function(){this.map.zoomIn()},CLASS_NAME:"OpenLayers.Control.ZoomIn"});OpenLayers.Control.ZoomOut=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_BUTTON,trigger:function(){this.map.zoomOut()},CLASS_NAME:"OpenLayers.Control.ZoomOut"});OpenLayers.Control.ZoomToMaxExtent=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_BUTTON,trigger:function(){if(this.map){this.map.zoomToMaxExtent()}},CLASS_NAME:"OpenLayers.Control.ZoomToMaxExtent"});OpenLayers.Event={observers:false,KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(a){return a.target||a.srcElement},isLeftClick:function(a){return(((a.which)&&(a.which==1))||((a.button)&&(a.button==1)))},isRightClick:function(a){return(((a.which)&&(a.which==3))||((a.button)&&(a.button==2)))},stop:function(b,a){if(!a){if(b.preventDefault){b.preventDefault()}else{b.returnValue=false}}if(b.stopPropagation){b.stopPropagation()}else{b.cancelBubble=true}},findElement:function(d,b){var a=OpenLayers.Event.element(d);while(a.parentNode&&(!a.tagName||(a.tagName.toUpperCase()!=b.toUpperCase()))){a=a.parentNode}return a},observe:function(b,f,d,a){var g=OpenLayers.Util.getElement(b);a=a||false;if(f=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||g.attachEvent)){f="keydown"}if(!this.observers){this.observers={}}if(!g._eventCacheID){var h="eventCacheID_";if(g.id){h=g.id+"_"+h}g._eventCacheID=OpenLayers.Util.createUniqueID(h)}var j=g._eventCacheID;if(!this.observers[j]){this.observers[j]=[]}this.observers[j].push({element:g,name:f,observer:d,useCapture:a});if(g.addEventListener){g.addEventListener(f,d,a)}else{if(g.attachEvent){g.attachEvent("on"+f,d)}}},stopObservingElement:function(a){var b=OpenLayers.Util.getElement(a);var d=b._eventCacheID;this._removeElementObservers(OpenLayers.Event.observers[d])},_removeElementObservers:function(g){if(g){for(var b=g.length-1;b>=0;b--){var d=g[b];var a=new Array(d.element,d.name,d.observer,d.useCapture);var f=OpenLayers.Event.stopObserving.apply(this,a)}}},stopObserving:function(l,a,j,b){b=b||false;var h=OpenLayers.Util.getElement(l);var f=h._eventCacheID;if(a=="keypress"){if(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||h.detachEvent){a="keydown"}}var o=false;var d=OpenLayers.Event.observers[f];if(d){var g=0;while(!o&&g<d.length){var m=d[g];if((m.name==a)&&(m.observer==j)&&(m.useCapture==b)){d.splice(g,1);if(d.length==0){delete OpenLayers.Event.observers[f]}o=true;break}g++}}if(o){if(h.removeEventListener){h.removeEventListener(a,j,b)}else{if(h&&h.detachEvent){h.detachEvent("on"+a,j)}}}return o},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(d,g,j,h,b){OpenLayers.Util.extend(this,b);this.object=d;this.fallThrough=h;this.listeners={};this.eventHandler=OpenLayers.Function.bindAsEventListener(this.handleBrowserEvent,this);this.clearMouseListener=OpenLayers.Function.bind(this.clearMouseCache,this);this.eventTypes=[];if(j!=null){for(var f=0,a=j.length;f<a;f++){this.addEventType(j[f])}}if(g!=null){this.attachToElement(g)}},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(f){if(this.element){OpenLayers.Event.stopObservingElement(this.element)}this.element=f;for(var d=0,a=this.BROWSER_EVENTS.length;d<a;d++){var b=this.BROWSER_EVENTS[d];this.addEventType(b);OpenLayers.Event.observe(f,b,this.eventHandler)}OpenLayers.Event.observe(f,"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,f,d){if((d!=null)&&(OpenLayers.Util.indexOf(this.eventTypes,b)!=-1)){if(f==null){f=this.object}var a=this.listeners[b];a.push({obj:f,func:d})}},registerPriority:function(b,f,d){if(d!=null){if(f==null){f=this.object}var a=this.listeners[b];if(a!=null){a.unshift({obj:f,func:d})}}},un:function(a){for(var b in a){if(b!="scope"){this.unregister(b,a.scope,a[b])}}},unregister:function(f,h,g){if(h==null){h=this.object}var d=this.listeners[f];if(d!=null){for(var b=0,a=d.length;b<a;b++){if(d[b].obj==h&&d[b].func==g){d.splice(b,1);break}}}},remove:function(a){if(this.listeners[a]!=null){this.listeners[a]=[]}},triggerEvent:function(g,b){var f=this.listeners[g];if(!f||f.length==0){return}if(b==null){b={}}b.object=this.object;b.element=this.element;if(!b.type){b.type=g}var f=f.slice(),h;for(var d=0,a=f.length;d<a;d++){var j=f[d];h=j.func.apply(j.obj,[b]);if((h!=undefined)&&(h==false)){break}}if(!this.fallThrough){OpenLayers.Event.stop(b,true)}return h},handleBrowserEvent:function(a){if(this.includeXY){a.xy=this.getMousePosition(a)}this.triggerEvent(a.type,a)},clearMouseCache:function(){this.element.scrolls=null;this.element.lefttop=null;this.element.offsets=null},getMousePosition:function(a){if(!this.includeXY){this.clearMouseCache()}else{if(!this.element.hasScrollEvent){OpenLayers.Event.observe(window,"scroll",this.clearMouseListener);this.element.hasScrollEvent=true}}if(!this.element.scrolls){this.element.scrolls=[(document.documentElement.scrollLeft||document.body.scrollLeft),(document.documentElement.scrollTop||document.body.scrollTop)]}if(!this.element.lefttop){this.element.lefttop=[(document.documentElement.clientLeft||0),(document.documentElement.clientTop||0)]}if(!this.element.offsets){this.element.offsets=OpenLayers.Util.pagePosition(this.element);this.element.offsets[0]+=this.element.scrolls[0];this.element.offsets[1]+=this.element.scrolls[1]}return new OpenLayers.Pixel((a.clientX+this.element.scrolls[0])-this.element.offsets[0]-this.element.lefttop[0],(a.clientY+this.element.scrolls[1])-this.element.offsets[1]-this.element.lefttop[1])},CLASS_NAME:"OpenLayers.Events"});OpenLayers.Format=OpenLayers.Class({options:null,externalProjection:null,internalProjection:null,data:null,keepData:false,initialize:function(a){OpenLayers.Util.extend(this,a);this.options=a},destroy:function(){},read:function(a){OpenLayers.Console.userError(OpenLayers.i18n("readNotImplemented"))},write:function(a){OpenLayers.Console.userError(OpenLayers.i18n("writeNotImplemented"))},CLASS_NAME:"OpenLayers.Format"});OpenLayers.Lang.en={unhandledRequest:"Unhandled request return ${statusText}",permalink:"Permalink",overlays:"Overlays",baseLayer:"Base Layer",sameProjection:"The overview map only works when it is in the same projection as the main map",readNotImplemented:"Read not implemented.",writeNotImplemented:"Write not implemented.",noFID:"Can't update a feature for which there is no FID.",errorLoadingGML:"Error in loading GML file ${url}",browserNotSupported:"Your browser does not support vector rendering. Currently supported renderers are:\n${renderers}",componentShouldBe:"addFeatures : component should be an ${geomType}",getFeatureError:"getFeatureFromEvent called on layer with no renderer. This usually means you destroyed a layer, but not some handler which is associated with it.",minZoomLevelError:"The minZoomLevel property is only intended for use with the FixedZoomLevels-descendent layers. That this wfs layer checks for minZoomLevel is a relic of thepast. We cannot, however, remove it without possibly breaking OL based applications that may depend on it. Therefore we are deprecating it -- the minZoomLevel check below will be removed at 3.0. Please instead use min/max resolution setting as described here: http://trac.openlayers.org/wiki/SettingZoomLevels",commitSuccess:"WFS Transaction: SUCCESS ${response}",commitFailed:"WFS Transaction: FAILED ${response}",googleWarning:"The Google Layer was unable to load correctly.<br><br>To get rid of this message, select a new BaseLayer in the layer switcher in the upper-right corner.<br><br>Most likely, this is because the Google Maps library script was either not included, or does not contain the correct API key for your site.<br><br>Developers: For help getting this working correctly, <a href='http://trac.openlayers.org/wiki/Google' target='_blank'>click here</a>",getLayerWarning:"The ${layerType} Layer was unable to load correctly.<br><br>To get rid of this message, select a new BaseLayer in the layer switcher in the upper-right corner.<br><br>Most likely, this is because the ${layerLib} library script was not correctly included.<br><br>Developers: For help getting this working correctly, <a href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'>click here</a>",scale:"Scale = 1 : ${scaleDenom}",layerAlreadyAdded:"You tried to add the layer: ${layerName} to the map, but it has already been added",reprojectDeprecated:"You are using the 'reproject' option on the ${layerName} layer. This option is deprecated: its use was designed to support displaying data over commercial basemaps, but that functionality should now be achieved by using Spherical Mercator support. More information is available from http://trac.openlayers.org/wiki/SphericalMercator.",methodDeprecated:"This method has been deprecated and will be removed in 3.0. Please use ${newMethod} instead.",boundsAddError:"You must pass both x and y values to the add function.",lonlatAddError:"You must pass both lon and lat values to the add function.",pixelAddError:"You must pass both x and y values to the add function.",unsupportedGeometryType:"Unsupported geometry type: ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition failed: element with id ${elemId} may be misplaced.",end:"",filterEvaluateNotImplemented:"evaluate is not implemented for this filter type."};OpenLayers.Lang.es={unhandledRequest:"Respuesta a petición no gestionada ${statusText}",permalink:"Enlace permanente",overlays:"Capas superpuestas",baseLayer:"Capa Base",sameProjection:"El mini mapa sólo funciona si está en la misma proyección que el mapa principal",readNotImplemented:"Lectura no implementada.",writeNotImplemented:"Escritura no implementada.",noFID:"No se puede actualizar un elemento para el que no existe FID.",errorLoadingGML:"Error cargando el fichero GML ${url}",browserNotSupported:"Su navegador no soporta renderización vectorial. Los renderizadores soportados actualmente son:\n${renderers}",componentShouldBe:"addFeatures : el componente debe ser del tipo ${geomType}",getFeatureError:"getFeatureFromEvent llamado en una capa sin renderizador. Esto normalmente quiere decir que se ha destruido una capa, pero no el manejador asociado a ella.",minZoomLevelError:"La propiedad minZoomLevel debe sólo utilizarse con las capas que tienen FixedZoomLevels. El hecho de que una capa wfs compruebe minZoomLevel is una reliquia del pasado. Sin embargo, no podemos eliminarla sin discontinuar probablemente las aplicaciones OL que puedan depender de ello. Así pues estamos haciéndolo obsoleto --la comprobación minZoomLevel se eliminará en la versión 3.0. Utilice el ajuste de resolution min/max en su lugar, tal como se describe aquí: http://trac.openlayers.org/wiki/SettingZoomLevels",commitSuccess:"Transacción WFS: ÉXITO ${response}",commitFailed:"Transacción WFS: FALLÓ ${response}",googleWarning:"La capa Google no pudo ser cargada correctamente.<br><br>Para evitar este mensaje, seleccione una nueva Capa Base en el selector de capas en la esquina superior derecha.<br><br>Probablemente, esto se debe a que el script de la biblioteca de Google Maps no fue correctamente incluido en su página, o no contiene la clave del API correcta para su sitio.<br><br>Desarrolladores: Para ayudar a hacer funcionar esto correctamente, <a href='http://trac.openlayers.org/wiki/Google' target='_blank'>haga clic aquí</a>",getLayerWarning:"La capa ${layerType} no pudo ser cargada correctamente.<br><br>Para evitar este mensaje, seleccione una nueva Capa Base en el selector de capas en la esquina superior derecha.<br><br>Probablemente, esto se debe a que el script de la biblioteca ${layerLib} no fue correctamente incluido en su página.<br><br>Desarrolladores: Para ayudar a hacer funcionar esto correctamente, <a href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'>haga clic aquí</a>",scale:"Escala = 1 : ${scaleDenom}",layerAlreadyAdded:"Intentó añadir la capa: ${layerName} al mapa, pero ya había sido añadida previamente",reprojectDeprecated:"Está usando la opción 'reproject' en la capa ${layerName}. Esta opción está obsoleta: su uso fue diseñado para soportar la visualización de datos sobre mapas base comerciales, pero esa funcionalidad debería conseguirse ahora mediante el soporte de la proyección Spherical Mercator. Más información disponible en http://trac.openlayers.org/wiki/SphericalMercator.",methodDeprecated:"Este método está obsoleto y se eliminará en la versión 3.0. Por favor utilice el método ${newMethod} en su lugar.",boundsAddError:"Debe proporcionar los valores x e y a la función add.",lonlatAddError:"Debe proporcionar los valores lon y lat a la función add.",pixelAddError:"Debe proporcionar los valores x e y a la función add.",unsupportedGeometryType:"Tipo de geometría no soportada: ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition falló: el elemento con id ${elemId} puede haberse colocado de manera errónea.",filterEvaluateNotImplemented:"evaluate no está implementado para este tipo de filtro.",end:""};OpenLayers.Lang.fr={unhandledRequest:"Requête non gérée, retournant ${statusText}",permalink:"Permalien",overlays:"Calques",baseLayer:"Calque de base",sameProjection:"La carte de situation ne fonctionne que lorsque sa projection est la même que celle de la carte principale",readNotImplemented:"Lecture non implémentée.",writeNotImplemented:"Ecriture non implémentée.",noFID:"Impossible de mettre à jour un objet sans identifiant (fid).",errorLoadingGML:"Erreur au chargement du fichier GML ${url}",browserNotSupported:"Votre navigateur ne supporte pas le rendu vectoriel. Les renderers actuellement supportés sont : \n${renderers}",componentShouldBe:"addFeatures : le composant devrait être de type ${geomType}",getFeatureError:"getFeatureFromEvent a été appelé sur un calque sans renderer. Cela signifie généralement que vous avez détruit cette couche, mais que vous avez conservé un handler qui lui était associé.",minZoomLevelError:"La propriété minZoomLevel doit seulement être utilisée pour des couches FixedZoomLevels-descendent. Le fait que cette couche WFS vérifie la présence de minZoomLevel est une relique du passé. Nous ne pouvons toutefois la supprimer sans casser des applications qui pourraient en dépendre. C'est pourquoi nous la déprécions -- la vérification du minZoomLevel sera supprimée en version 3.0. A la place, merci d'utiliser les paramètres de résolutions min/max tel que décrit sur : http://trac.openlayers.org/wiki/SettingZoomLevels",commitSuccess:"Transaction WFS : SUCCES ${response}",commitFailed:"Transaction WFS : ECHEC ${response}",googleWarning:"La couche Google n'a pas été en mesure de se charger correctement.<br><br>Pour supprimer ce message, choisissez une nouvelle BaseLayer dans le sélecteur de couche en haut à droite.<br><br>Cela est possiblement causé par la non-inclusion de la librairie Google Maps, ou alors parce que la clé de l'API ne correspond pas à votre site.<br><br>Développeurs : pour savoir comment corriger ceci, <a href='http://trac.openlayers.org/wiki/Google' target='_blank'>cliquez ici</a>",getLayerWarning:"La couche ${layerType} n'est pas en mesure de se charger correctement.<br><br>Pour supprimer ce message, choisissez une nouvelle BaseLayer dans le sélecteur de couche en haut à droite.<br><br>Cela est possiblement causé par la non-inclusion de la librairie ${layerLib}.<br><br>Développeurs : pour savoir comment corriger ceci, <a href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'>cliquez ici</a>",scale:"Echelle ~ 1 : ${scaleDenom}",layerAlreadyAdded:"Vous avez essayé d'ajouter à la carte le calque : ${layerName}, mais il est déjà présent",reprojectDeprecated:"Vous utilisez l'option 'reproject' sur la couche ${layerName}. Cette option est dépréciée : Son usage permettait d'afficher des données au dessus de couches raster commerciales.Cette fonctionalité est maintenant supportée en utilisant le support de la projection Mercator Sphérique. Plus d'information est disponible sur http://trac.openlayers.org/wiki/SphericalMercator.",methodDeprecated:"Cette méthode est dépréciée, et sera supprimée à la version 3.0. Merci d'utiliser ${newMethod} à la place.",boundsAddError:"Vous devez passer les deux valeurs x et y à la fonction add.",lonlatAddError:"Vous devez passer les deux valeurs lon et lat à la fonction add.",pixelAddError:"Vous devez passer les deux valeurs x et y à la fonction add.",unsupportedGeometryType:"Type de géométrie non supporté : ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition a échoué: l'élément d'id ${elemId} pourrait être mal positionné.",end:""};OpenLayers.Lang.it={unhandledRequest:"Codice di ritorno della richiesta ${statusText}",permalink:"Permalink",overlays:"Overlays",baseLayer:"Livello base",sameProjection:"La mini mappa funziona solamente se ha la stessa proiezione della mappa principale",readNotImplemented:"Lettura non implementata.",writeNotImplemented:"Scrittura non implementata.",noFID:"Impossibile aggiornare un elemento grafico che non abbia il FID.",errorLoadingGML:"Errore nel caricamento del file GML ${url}",browserNotSupported:"Il tuo browser non supporta il rendering vettoriale. I renderizzatore attualemnte supportati sono:\n${renderers}",componentShouldBe:"addFeatures : il componente dovrebbe essere di tipo ${geomType}",getFeatureError:"getFeatureFromEvent chiamata su di un livello senza renderizzatore. Ciò significa che il livello è stato cancellato, ma non i gestori associati ad esso.",minZoomLevelError:"La proprietà minZoomLevel è da utilizzare solamente con livelli che abbiano FixedZoomLevels. Il fatto che questo livello wfs controlli la proprietà minZoomLevel è un retaggio del passato. Non possiamo comunque rimuoverla senza rompere le vecchie applicazioni che dipendono su di essa.Quindi siamo costretti a deprecarla -- minZoomLevel e sarà rimossa dalla vesione 3.0. Si prega di utilizzare i settaggi di risoluzione min/max come descritto qui: http://trac.openlayers.org/wiki/SettingZoomLevels",commitSuccess:"Transazione WFS: SUCCESS ${response}",commitFailed:"Transazione WFS: FAILED ${response}",googleWarning:"Il livello Google non è riuscito a caricare correttamente.<br><br>Per evitare questo messaggio, seleziona un nuovo BaseLayer nel selettore di livelli nell'angolo in alto a destra.<br><br>Più precisamente, ciò accade perchè la libreria Google Maps non è stata inclusa nella pagina, oppure non contiene la corretta API key per il tuo sito.<br><br>Sviluppatori: Per aiuto su come farlo funzionare correttamente, <a href='http://trac.openlayers.org/wiki/Google' target='_blank'>clicca qui</a>",getLayerWarning:"Il livello ${layerType} non è riuscito a caricare correttamente.<br><br>Per evitare questo messaggio, seleziona un nuovo BaseLayer nel selettore di livelli nell'angolo in alto a destra.<br><br>Più precisamente, ciò accade perchè la libreria ${layerLib} non è stata inclusa nella pagina.<br><br>Sviluppatori: Per aiuto su come farlo funzionare correttamente, <a href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'>clicca qui</a>",scale:"Scala = 1 : ${scaleDenom}",layerAlreadyAdded:"Stai cercando di aggiungere il livello: ${layerName} alla mappa, ma tale livello è già stato aggiunto.",reprojectDeprecated:"Stai utilizzando l'opzione 'reproject' sul livello ${layerName}. Questa opzione è deprecata: il suo utilizzo è stato introdotto persupportare il disegno dei dati sopra mappe commerciali, ma tale funzionalità dovrebbe essere ottenuta tramite l'utilizzo della proiezione Spherical Mercator. Per maggiori informazioni consultare qui http://trac.openlayers.org/wiki/SphericalMercator.",methodDeprecated:"Questo metodo è stato deprecato e sarà rimosso dalla versione 3.0. Si prega di utilizzare il metodo ${newMethod} in alternativa.",boundsAddError:"Devi specificare i valori di x e y alla funzione add.",lonlatAddError:"Devi specificare i valori di lon e lat alla funzione add.",pixelAddError:"Devi specificare i valori di x e y alla funzione add.",unsupportedGeometryType:"Tipo di geometria non supportata: ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition fallita: l'elemento con id ${elemId} è posizionato in modo errato.",end:""};OpenLayers.Popup.AnchoredBubble=OpenLayers.Class(OpenLayers.Popup.Anchored,{rounded:false,initialize:function(j,d,h,b,a,g,f){this.padding=new OpenLayers.Bounds(0,OpenLayers.Popup.AnchoredBubble.CORNER_SIZE,0,OpenLayers.Popup.AnchoredBubble.CORNER_SIZE);OpenLayers.Popup.Anchored.prototype.initialize.apply(this,arguments)},draw:function(a){OpenLayers.Popup.Anchored.prototype.draw.apply(this,arguments);this.setContentHTML();this.setBackgroundColor();this.setOpacity();return this.div},updateRelativePosition:function(){this.setRicoCorners()},setSize:function(a){OpenLayers.Popup.Anchored.prototype.setSize.apply(this,arguments);this.setRicoCorners()},setBackgroundColor:function(a){if(a!=undefined){this.backgroundColor=a}if(this.div!=null){if(this.contentDiv!=null){this.div.style.background="transparent";OpenLayers.Rico.Corner.changeColor(this.groupDiv,this.backgroundColor)}}},setOpacity:function(a){OpenLayers.Popup.Anchored.prototype.setOpacity.call(this,a);if(this.div!=null){if(this.groupDiv!=null){OpenLayers.Rico.Corner.changeOpacity(this.groupDiv,this.opacity)}}},setBorder:function(a){this.border=0},setRicoCorners:function(){var a=this.getCornersToRound(this.relativePosition);var b={corners:a,color:this.backgroundColor,bgColor:"transparent",blend:false};if(!this.rounded){OpenLayers.Rico.Corner.round(this.div,b);this.rounded=true}else{OpenLayers.Rico.Corner.reRound(this.groupDiv,b);this.setBackgroundColor();this.setOpacity()}},getCornersToRound:function(){var a=["tl","tr","bl","br"];var b=OpenLayers.Bounds.oppositeQuadrant(this.relativePosition);OpenLayers.Util.removeItem(a,b);return a.join(" ")},CLASS_NAME:"OpenLayers.Popup.AnchoredBubble"});OpenLayers.Popup.AnchoredBubble.CORNER_SIZE=5;OpenLayers.Popup.Framed=OpenLayers.Class(OpenLayers.Popup.Anchored,{imageSrc:null,imageSize:null,isAlphaImage:false,positionBlocks:null,blocks:null,fixedRelativePosition:false,initialize:function(j,d,h,b,a,g,f){OpenLayers.Popup.Anchored.prototype.initialize.apply(this,arguments);if(this.fixedRelativePosition){this.updateRelativePosition();this.calculateRelativePosition=function(l){return this.relativePosition}}this.contentDiv.style.position="absolute";this.contentDiv.style.zIndex=1;if(g){this.closeDiv.style.zIndex=1}this.groupDiv.style.position="absolute";this.groupDiv.style.top="0px";this.groupDiv.style.left="0px";this.groupDiv.style.height="100%";this.groupDiv.style.width="100%"},destroy:function(){this.imageSrc=null;this.imageSize=null;this.isAlphaImage=null;this.fixedRelativePosition=false;this.positionBlocks=null;for(var a=0;a<this.blocks.length;a++){var b=this.blocks[a];if(b.image){b.div.removeChild(b.image)}b.image=null;if(b.div){this.groupDiv.removeChild(b.div)}b.div=null}this.blocks=null;OpenLayers.Popup.Anchored.prototype.destroy.apply(this,arguments)},setBackgroundColor:function(a){},setBorder:function(){},setOpacity:function(a){},setSize:function(a){OpenLayers.Popup.Anchored.prototype.setSize.apply(this,arguments);this.updateBlocks()},updateRelativePosition:function(){this.padding=this.positionBlocks[this.relativePosition].padding;if(this.closeDiv){var a=this.getContentDivPadding();this.closeDiv.style.right=a.right+this.padding.right+"px";this.closeDiv.style.top=a.top+this.padding.top+"px"}this.updateBlocks()},calculateNewPx:function(a){var b=OpenLayers.Popup.Anchored.prototype.calculateNewPx.apply(this,arguments);b=b.offset(this.positionBlocks[this.relativePosition].offset);return b},createBlocks:function(){this.blocks=[];var h=null;for(var g in this.positionBlocks){h=g;break}var a=this.positionBlocks[h];for(var f=0;f<a.blocks.length;f++){var l={};this.blocks.push(l);var b=this.id+"_FrameDecorationDiv_"+f;l.div=OpenLayers.Util.createDiv(b,null,null,null,"absolute",null,"hidden",null);var d=this.id+"_FrameDecorationImg_"+f;var j=(this.isAlphaImage)?OpenLayers.Util.createAlphaImageDiv:OpenLayers.Util.createImage;l.image=j(d,null,this.imageSize,this.imageSrc,"absolute",null,null,null);l.div.appendChild(l.image);this.groupDiv.appendChild(l.div)}},updateBlocks:function(){if(!this.blocks){this.createBlocks()}if(this.size&&this.relativePosition){var o=this.positionBlocks[this.relativePosition];for(var j=0;j<o.blocks.length;j++){var d=o.blocks[j];var g=this.blocks[j];var f=d.anchor.left;var p=d.anchor.bottom;var a=d.anchor.right;var u=d.anchor.top;var q=(isNaN(d.size.w))?this.size.w-(a+f):d.size.w;var m=(isNaN(d.size.h))?this.size.h-(p+u):d.size.h;g.div.style.width=(q<0?0:q)+"px";g.div.style.height=(m<0?0:m)+"px";g.div.style.left=(f!=null)?f+"px":"";g.div.style.bottom=(p!=null)?p+"px":"";g.div.style.right=(a!=null)?a+"px":"";g.div.style.top=(u!=null)?u+"px":"";g.image.style.left=d.position.x+"px";g.image.style.top=d.position.y+"px"}this.contentDiv.style.left=this.padding.left+"px";this.contentDiv.style.top=this.padding.top+"px"}},CLASS_NAME:"OpenLayers.Popup.Framed"});OpenLayers.Projection=OpenLayers.Class({proj:null,projCode:null,initialize:function(b,a){OpenLayers.Util.extend(this,a);this.projCode=b;if(window.Proj4js){this.proj=new Proj4js.Proj(b)}},getCode:function(){return this.proj?this.proj.srsCode:this.projCode},getUnits:function(){return this.proj?this.proj.units:null},toString:function(){return this.getCode()},equals:function(a){if(a&&a.getCode){return this.getCode()==a.getCode()}else{return false}},destroy:function(){delete this.proj;delete this.projCode},CLASS_NAME:"OpenLayers.Projection"});OpenLayers.Projection.transforms={};OpenLayers.Projection.addTransform=function(d,b,a){if(!OpenLayers.Projection.transforms[d]){OpenLayers.Projection.transforms[d]={}}OpenLayers.Projection.transforms[d][b]=a};OpenLayers.Projection.transform=function(a,d,b){if(d.proj&&b.proj){a=Proj4js.transform(d.proj,b.proj,a)}else{if(d&&b&&OpenLayers.Projection.transforms[d.getCode()]&&OpenLayers.Projection.transforms[d.getCode()][b.getCode()]){OpenLayers.Projection.transforms[d.getCode()][b.getCode()](a)}}return a};OpenLayers.Protocol.WFS.v1=OpenLayers.Class(OpenLayers.Protocol,{version:null,srsName:"EPSG:4326",featureType:null,featureNS:null,geometryName:"the_geom",schema:null,featurePrefix:"feature",formatOptions:null,initialize:function(b){OpenLayers.Protocol.prototype.initialize.apply(this,[b]);if(!b.format){this.format=OpenLayers.Format.WFST(OpenLayers.Util.extend({version:this.version,featureType:this.featureType,featureNS:this.featureNS,featurePrefix:this.featurePrefix,geometryName:this.geometryName,srsName:this.srsName,schema:this.schema},this.formatOptions))}if(!this.featureNS){var a=this.format.readNode;this.format.readNode=function(d,f){if(!this.featureNS&&d.prefix==this.featurePrefix){this.featureNS=d.namespaceURI;this.setNamespace("feature",this.featureNS)}return a.apply(this,arguments)}}},destroy:function(){if(this.options&&!this.options.format){this.format.destroy()}this.format=null;OpenLayers.Protocol.prototype.destroy.apply(this)},createCallback:function(d,a,b){return OpenLayers.Function.bind(function(){d.apply(this,[a,b])},this)},read:function(b){b=OpenLayers.Util.extend({},b);OpenLayers.Util.applyDefaults(b,this.options||{});var a=new OpenLayers.Protocol.Response({requestType:"read"});var d=OpenLayers.Format.XML.prototype.write.apply(this.format,[this.format.writeNode("wfs:GetFeature",b)]);a.priv=OpenLayers.Request.POST({url:b.url,callback:this.createCallback(this.handleRead,a,b),params:b.params,headers:b.headers,data:d});return a},handleRead:function(a,b){if(b.callback){var d=a.priv;if(d.status>=200&&d.status<300){a.features=this.parseFeatures(d);a.code=OpenLayers.Protocol.Response.SUCCESS}else{a.code=OpenLayers.Protocol.Response.FAILURE}b.callback.call(b.scope,a)}},parseFeatures:function(a){var b=a.responseXML;if(!b||!b.documentElement){b=a.responseText}if(!b||b.length<=0){return null}return this.format.read(b)},commit:function(d,b){b=OpenLayers.Util.extend({},b);OpenLayers.Util.applyDefaults(b,this.options);var a=new OpenLayers.Protocol.Response({requestType:"commit",reqFeatures:d});a.priv=OpenLayers.Request.POST({url:b.url,data:this.format.write(d,b),callback:this.createCallback(this.handleCommit,a,b)});return a},handleCommit:function(a,b){if(b.callback){var d=a.priv;var f=d.responseXML;if(!f||!f.documentElement){f=d.responseText}var g=this.format.read(f)||{};a.insertIds=g.insertIds||[];a.code=(g.success)?OpenLayers.Protocol.Response.SUCCESS:OpenLayers.Protocol.Response.FAILURE;b.callback.call(b.scope,a)}},filterDelete:function(g,d){d=OpenLayers.Util.extend({},d);OpenLayers.Util.applyDefaults(d,this.options);var b=new OpenLayers.Protocol.Response({requestType:"commit"});var a=this.format.createElementNSPlus("wfs:Transaction",{attributes:{service:"WFS",version:this.version}});var f=this.format.createElementNSPlus("wfs:Delete",{attributes:{typeName:(d.featureNS?this.featurePrefix+":":"")+d.featureType}});if(d.featureNS){f.setAttribute("xmlns:"+this.featurePrefix,d.featureNS)}var j=this.format.writeNode("ogc:Filter",g);f.appendChild(j);a.appendChild(f);var h=OpenLayers.Format.XML.prototype.write.apply(this.format,[a]);return OpenLayers.Request.POST({url:this.url,callback:d.callback||function(){},data:h})},abort:function(a){if(a){a.priv.abort()}},CLASS_NAME:"OpenLayers.Protocol.WFS.v1"});OpenLayers.Renderer.SVG=OpenLayers.Class(OpenLayers.Renderer.Elements,{xmlns:"http://www.w3.org/2000/svg",xlinkns:"http://www.w3.org/1999/xlink",MAX_PIXEL:15000,translationParameters:null,symbolSize:{},isGecko:null,initialize:function(a){if(!this.supported()){return}OpenLayers.Renderer.Elements.prototype.initialize.apply(this,arguments);this.translationParameters={x:0,y:0};this.isGecko=(navigator.userAgent.toLowerCase().indexOf("gecko/")!=-1)},destroy:function(){OpenLayers.Renderer.Elements.prototype.destroy.apply(this,arguments)},supported:function(){var a="http://www.w3.org/TR/SVG11/feature#";return(document.implementation&&(document.implementation.hasFeature("org.w3c.svg","1.0")||document.implementation.hasFeature(a+"SVG","1.1")||document.implementation.hasFeature(a+"BasicStructure","1.1")))},inValidRange:function(a,g,b){var f=a+(b?0:this.translationParameters.x);var d=g+(b?0:this.translationParameters.y);return(f>=-this.MAX_PIXEL&&f<=this.MAX_PIXEL&&d>=-this.MAX_PIXEL&&d<=this.MAX_PIXEL)},setExtent:function(b,f){OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments);var a=this.getResolution();var h=-b.left/a;var g=b.top/a;if(f){this.left=h;this.top=g;var d="0 0 "+this.size.w+" "+this.size.h;this.rendererRoot.setAttributeNS(null,"viewBox",d);this.translate(0,0);return true}else{var j=this.translate(h-this.left,g-this.top);if(!j){this.setExtent(b,true)}return j}},translate:function(a,d){if(!this.inValidRange(a,d,true)){return false}else{var b="";if(a||d){b="translate("+a+","+d+")"}this.root.setAttributeNS(null,"transform",b);this.translationParameters={x:a,y:d};return true}},setSize:function(a){OpenLayers.Renderer.prototype.setSize.apply(this,arguments);this.rendererRoot.setAttributeNS(null,"width",this.size.w);this.rendererRoot.setAttributeNS(null,"height",this.size.h)},getNodeType:function(d,b){var a=null;switch(d.CLASS_NAME){case"OpenLayers.Geometry.Point":if(b.externalGraphic){a="image"}else{if(this.isComplexSymbol(b.graphicName)){a="use"}else{a="circle"}}break;case"OpenLayers.Geometry.Rectangle":a="rect";break;case"OpenLayers.Geometry.LineString":a="polyline";break;case"OpenLayers.Geometry.LinearRing":a="polygon";break;case"OpenLayers.Geometry.Polygon":case"OpenLayers.Geometry.Curve":case"OpenLayers.Geometry.Surface":a="path";break;default:break}return a},setStyle:function(v,B,b){B=B||v._style;b=b||v._options;var m=parseFloat(v.getAttributeNS(null,"r"));var l=1;var f;if(v._geometryClass=="OpenLayers.Geometry.Point"&&m){v.style.visibility="";if(B.graphic===false){v.style.visibility="hidden"}else{if(B.externalGraphic){f=this.getPosition(v);if(B.graphicTitle){v.setAttributeNS(null,"title",B.graphicTitle)}if(B.graphicWidth&&B.graphicHeight){v.setAttributeNS(null,"preserveAspectRatio","none")}var u=B.graphicWidth||B.graphicHeight;var p=B.graphicHeight||B.graphicWidth;u=u?u:B.pointRadius*2;p=p?p:B.pointRadius*2;var C=(B.graphicXOffset!=undefined)?B.graphicXOffset:-(0.5*u);var g=(B.graphicYOffset!=undefined)?B.graphicYOffset:-(0.5*p);var a=B.graphicOpacity||B.fillOpacity;v.setAttributeNS(null,"x",(f.x+C).toFixed());v.setAttributeNS(null,"y",(f.y+g).toFixed());v.setAttributeNS(null,"width",u);v.setAttributeNS(null,"height",p);v.setAttributeNS(this.xlinkns,"href",B.externalGraphic);v.setAttributeNS(null,"style","opacity: "+a)}else{if(this.isComplexSymbol(B.graphicName)){var d=B.pointRadius*3;var o=d*2;var q=this.importSymbol(B.graphicName);var z="#"+q;f=this.getPosition(v);l=this.symbolSize[q]/o;var h=v.parentNode;var j=v.nextSibling;if(h){h.removeChild(v)}v.setAttributeNS(this.xlinkns,"href",z);v.setAttributeNS(null,"width",o);v.setAttributeNS(null,"height",o);v.setAttributeNS(null,"x",f.x-d);v.setAttributeNS(null,"y",f.y-d);if(j){h.insertBefore(v,j)}else{if(h){h.appendChild(v)}}}else{v.setAttributeNS(null,"r",B.pointRadius)}}}if(typeof B.rotation!="undefined"&&f){var w=OpenLayers.String.format("rotate(${0} ${1} ${2})",[B.rotation,f.x,f.y]);v.setAttributeNS(null,"transform",w)}}if(b.isFilled){v.setAttributeNS(null,"fill",B.fillColor);v.setAttributeNS(null,"fill-opacity",B.fillOpacity)}else{v.setAttributeNS(null,"fill","none")}if(b.isStroked){v.setAttributeNS(null,"stroke",B.strokeColor);v.setAttributeNS(null,"stroke-opacity",B.strokeOpacity);v.setAttributeNS(null,"stroke-width",B.strokeWidth*l);v.setAttributeNS(null,"stroke-linecap",B.strokeLinecap);v.setAttributeNS(null,"stroke-linejoin","round");v.setAttributeNS(null,"stroke-dasharray",this.dashStyle(B,l))}else{v.setAttributeNS(null,"stroke","none")}if(B.pointerEvents){v.setAttributeNS(null,"pointer-events",B.pointerEvents)}if(B.cursor!=null){v.setAttributeNS(null,"cursor",B.cursor)}return v},dashStyle:function(d,b){var a=d.strokeWidth*b;switch(d.strokeDashstyle){case"solid":return"none";case"dot":return[1,4*a].join();case"dash":return[4*a,4*a].join();case"dashdot":return[4*a,4*a,1,4*a].join();case"longdash":return[8*a,4*a].join();case"longdashdot":return[8*a,4*a,1,4*a].join();default:return d.strokeDashstyle.replace(/ /g,",")}},createNode:function(a,d){var b=document.createElementNS(this.xmlns,a);if(d){b.setAttributeNS(null,"id",d)}return b},nodeTypeCompare:function(b,a){return(a==b.nodeName)},createRenderRoot:function(){return this.nodeFactory(this.container.id+"_svgRoot","svg")},createRoot:function(a){return this.nodeFactory(this.container.id+a,"g")},createDefs:function(){var a=this.nodeFactory(this.container.id+"_defs","defs");this.rendererRoot.appendChild(a);return a},drawPoint:function(a,b){return this.drawCircle(a,b,1)},drawCircle:function(f,g,b){var d=this.getResolution();var a=(g.x/d+this.left);var h=(this.top-g.y/d);if(this.inValidRange(a,h)){f.setAttributeNS(null,"cx",a);f.setAttributeNS(null,"cy",h);f.setAttributeNS(null,"r",b);return f}else{return false}},drawLineString:function(b,d){var a=this.getComponentsString(d.components);if(a.path){b.setAttributeNS(null,"points",a.path);return(a.complete?b:null)}else{return false}},drawLinearRing:function(b,d){var a=this.getComponentsString(d.components);if(a.path){b.setAttributeNS(null,"points",a.path);return(a.complete?b:null)}else{return false}},drawPolygon:function(b,m){var l="";var o=true;var a=true;var f,p;for(var g=0,h=m.components.length;g<h;g++){l+=" M";f=this.getComponentsString(m.components[g].components," ");p=f.path;if(p){l+=" "+p;a=f.complete&&a}else{o=false}}l+=" z";if(o){b.setAttributeNS(null,"d",l);b.setAttributeNS(null,"fill-rule","evenodd");return a?b:null}else{return false}},drawRectangle:function(d,f){var b=this.getResolution();var a=(f.x/b+this.left);var g=(this.top-f.y/b);if(this.inValidRange(a,g)){d.setAttributeNS(null,"x",a);d.setAttributeNS(null,"y",g);d.setAttributeNS(null,"width",f.width/b);d.setAttributeNS(null,"height",f.height/b);return d}else{return false}},drawSurface:function(h,l){var j=null;var b=true;for(var g=0,a=l.components.length;g<a;g++){if((g%3)==0&&(g/3)==0){var f=this.getShortString(l.components[g]);if(!f){b=false}j="M "+f}else{if((g%3)==1){var f=this.getShortString(l.components[g]);if(!f){b=false}j+=" C "+f}else{var f=this.getShortString(l.components[g]);if(!f){b=false}j+=" "+f}}}j+=" Z";if(b){h.setAttributeNS(null,"d",j);return h}else{return false}},drawText:function(d,a,m){var b=this.getResolution();var l=(m.x/b+this.left);var g=(m.y/b-this.top);var j=this.nodeFactory(d+this.LABEL_ID_SUFFIX,"text");var h=this.nodeFactory(d+this.LABEL_ID_SUFFIX+"_tspan","tspan");j.setAttributeNS(null,"x",l);j.setAttributeNS(null,"y",-g);j.setAttributeNS(null,"pointer-events","none");if(a.fontColor){j.setAttributeNS(null,"fill",a.fontColor)}if(a.fontFamily){j.setAttributeNS(null,"font-family",a.fontFamily)}if(a.fontSize){j.setAttributeNS(null,"font-size",a.fontSize)}if(a.fontWeight){j.setAttributeNS(null,"font-weight",a.fontWeight)}var f=a.labelAlign||"cm";j.setAttributeNS(null,"text-anchor",OpenLayers.Renderer.SVG.LABEL_ALIGN[f[0]]||"middle");if(this.isGecko){j.setAttributeNS(null,"dominant-baseline",OpenLayers.Renderer.SVG.LABEL_ALIGN[f[1]]||"central")}else{h.setAttributeNS(null,"baseline-shift",OpenLayers.Renderer.SVG.LABEL_VSHIFT[f[1]]||"-35%")}h.textContent=a.label;if(!j.parentNode){j.appendChild(h);this.textRoot.appendChild(j)}},getComponentsString:function(g,f){var l=[];var a=true;var h=g.length;var p=[];var m,o,b;for(var d=0;d<h;d++){o=g[d];l.push(o);m=this.getShortString(o);if(m){p.push(m)}else{if(d>0){if(this.getShortString(g[d-1])){p.push(this.clipLine(g[d],g[d-1]))}}if(d<h-1){if(this.getShortString(g[d+1])){p.push(this.clipLine(g[d],g[d+1]))}}a=false}}return{path:p.join(f||","),complete:a}},clipLine:function(g,l){if(l.equals(g)){return""}var h=this.getResolution();var b=this.MAX_PIXEL-this.translationParameters.x;var a=this.MAX_PIXEL-this.translationParameters.y;var f=l.x/h+this.left;var o=this.top-l.y/h;var d=g.x/h+this.left;var m=this.top-g.y/h;var j;if(d<-b||d>b){j=(m-o)/(d-f);d=d<0?-b:b;m=o+(d-f)*j}if(m<-a||m>a){j=(d-f)/(m-o);m=m<0?-a:a;d=f+(m-o)*j}return d+","+m},getShortString:function(b){var d=this.getResolution();var a=(b.x/d+this.left);var f=(this.top-b.y/d);if(this.inValidRange(a,f)){return a+","+f}else{return false}},getPosition:function(a){return({x:parseFloat(a.getAttributeNS(null,"cx")),y:parseFloat(a.getAttributeNS(null,"cy"))})},importSymbol:function(g){if(!this.defs){this.defs=this.createDefs()}var b=this.container.id+"-"+g;if(document.getElementById(b)!=null){return b}var f=OpenLayers.Renderer.symbol[g];if(!f){throw new Error(g+" is not a valid symbol name");return}var j=this.nodeFactory(b,"symbol");var d=this.nodeFactory(null,"polygon");j.appendChild(d);var q=new OpenLayers.Bounds(Number.MAX_VALUE,Number.MAX_VALUE,0,0);var o="";var m,l;for(var h=0;h<f.length;h=h+2){m=f[h];l=f[h+1];q.left=Math.min(q.left,m);q.bottom=Math.min(q.bottom,l);q.right=Math.max(q.right,m);q.top=Math.max(q.top,l);o+=" "+m+","+l}d.setAttributeNS(null,"points",o);var a=q.getWidth();var p=q.getHeight();var r=[q.left-a,q.bottom-p,a*3,p*3];j.setAttributeNS(null,"viewBox",r.join(" "));this.symbolSize[b]=Math.max(a,p)*3;this.defs.appendChild(j);return j.id},CLASS_NAME:"OpenLayers.Renderer.SVG"});OpenLayers.Renderer.SVG.LABEL_ALIGN={l:"start",r:"end",b:"bottom",t:"hanging"};OpenLayers.Renderer.SVG.LABEL_VSHIFT={t:"-70%",b:"0"};OpenLayers.Renderer.VML=OpenLayers.Class(OpenLayers.Renderer.Elements,{xmlns:"urn:schemas-microsoft-com:vml",symbolCache:{},offset:null,initialize:function(b){if(!this.supported()){return}if(!document.namespaces.olv){document.namespaces.add("olv",this.xmlns);var g=document.createStyleSheet();var d=["shape","rect","oval","fill","stroke","imagedata","group","textbox"];for(var f=0,a=d.length;f<a;f++){g.addRule("olv\\:"+d[f],"behavior: url(#default#VML); position: absolute; display: inline-block;")}}OpenLayers.Renderer.Elements.prototype.initialize.apply(this,arguments);this.offset={x:0,y:0}},destroy:function(){OpenLayers.Renderer.Elements.prototype.destroy.apply(this,arguments)},supported:function(){return !!(document.namespaces)},setExtent:function(m,a){OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments);var d=this.getResolution();var b=m.left/d;var h=m.top/d-this.size.h;if(a){this.offset={x:b,y:h};b=0;h=0}else{b=b-this.offset.x;h=h-this.offset.y}var p=b+" "+h;this.root.coordorigin=p;var l=[this.root,this.vectorRoot,this.textRoot];var j;for(var f=0,g=l.length;f<g;++f){j=l[f];var o=this.size.w+" "+this.size.h;j.coordsize=o}this.root.style.flip="y";return true},setSize:function(j){OpenLayers.Renderer.prototype.setSize.apply(this,arguments);var f=[this.rendererRoot,this.root,this.vectorRoot,this.textRoot];var d=this.size.w+"px";var l=this.size.h+"px";var b;for(var g=0,a=f.length;g<a;++g){b=f[g];b.style.width=d;b.style.height=l}},getNodeType:function(d,b){var a=null;switch(d.CLASS_NAME){case"OpenLayers.Geometry.Point":if(b.externalGraphic){a="olv:rect"}else{if(this.isComplexSymbol(b.graphicName)){a="olv:shape"}else{a="olv:oval"}}break;case"OpenLayers.Geometry.Rectangle":a="olv:rect";break;case"OpenLayers.Geometry.LineString":case"OpenLayers.Geometry.LinearRing":case"OpenLayers.Geometry.Polygon":case"OpenLayers.Geometry.Curve":case"OpenLayers.Geometry.Surface":a="olv:shape";break;default:break}return a},setStyle:function(f,b,w,p){b=b||f._style;w=w||f._options;var m=1;if(f._geometryClass=="OpenLayers.Geometry.Point"){if(b.externalGraphic){if(b.graphicTitle){f.title=b.graphicTitle}var d=b.graphicWidth||b.graphicHeight;var q=b.graphicHeight||b.graphicWidth;d=d?d:b.pointRadius*2;q=q?q:b.pointRadius*2;var h=this.getResolution();var l=(b.graphicXOffset!=undefined)?b.graphicXOffset:-(0.5*d);var g=(b.graphicYOffset!=undefined)?b.graphicYOffset:-(0.5*q);f.style.left=((p.x/h-this.offset.x)+l).toFixed();f.style.top=((p.y/h-this.offset.y)-(g+q)).toFixed();f.style.width=d+"px";f.style.height=q+"px";f.style.flip="y";b.fillColor="none";w.isStroked=false}else{if(this.isComplexSymbol(b.graphicName)){var a=this.importSymbol(b.graphicName);f.path=a.path;f.coordorigin=a.left+","+a.bottom;var v=a.size;f.coordsize=v+","+v;this.drawCircle(f,p,b.pointRadius);f.style.flip="y"}else{this.drawCircle(f,p,b.pointRadius)}}}if(w.isFilled){f.fillcolor=b.fillColor}else{f.filled="false"}var o=f.getElementsByTagName("fill");var u=(o.length==0)?null:o[0];if(!w.isFilled){if(u){f.removeChild(u)}}else{if(!u){u=this.createNode("olv:fill",f.id+"_fill")}u.opacity=b.fillOpacity;if(f._geometryClass=="OpenLayers.Geometry.Point"&&b.externalGraphic){if(b.graphicOpacity){u.opacity=b.graphicOpacity}u.src=b.externalGraphic;u.type="frame";if(!(b.graphicWidth&&b.graphicHeight)){u.aspect="atmost"}}if(u.parentNode!=f){f.appendChild(u)}}if(typeof b.rotation!="undefined"){if(b.externalGraphic){this.graphicRotate(f,l,g);u.opacity=0}else{f.style.rotation=b.rotation}}if(w.isStroked){f.strokecolor=b.strokeColor;f.strokeweight=b.strokeWidth+"px"}else{f.stroked=false}var j=f.getElementsByTagName("stroke");var r=(j.length==0)?null:j[0];if(!w.isStroked){if(r){f.removeChild(r)}}else{if(!r){r=this.createNode("olv:stroke",f.id+"_stroke");f.appendChild(r)}r.opacity=b.strokeOpacity;r.endcap=!b.strokeLinecap||b.strokeLinecap=="butt"?"flat":b.strokeLinecap;r.dashstyle=this.dashStyle(b)}if(b.cursor!="inherit"&&b.cursor!=null){f.style.cursor=b.cursor}return f},graphicRotate:function(u,B,h){var z=z||u._style;var f=u._options;var a,o;if(!(z.graphicWidth&&z.graphicHeight)){var C=new Image();C.onreadystatechange=OpenLayers.Function.bind(function(){if(C.readyState=="complete"||C.readyState=="interactive"){a=C.width/C.height;o=Math.max(z.pointRadius*2,z.graphicWidth||0,z.graphicHeight||0);B=B*a;z.graphicWidth=o*a;z.graphicHeight=o;this.graphicRotate(u,B,h)}},this);C.src=z.externalGraphic;return}else{o=Math.max(z.graphicWidth,z.graphicHeight);a=z.graphicWidth/z.graphicHeight}var r=Math.round(z.graphicWidth||o*a);var p=Math.round(z.graphicHeight||o);u.style.width=r+"px";u.style.height=p+"px";var q=document.getElementById(u.id+"_image");if(!q){q=this.createNode("olv:imagedata",u.id+"_image");u.appendChild(q)}q.style.width=r+"px";q.style.height=p+"px";q.src=z.externalGraphic;q.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='', sizingMethod='scale')";var v=z.rotation*Math.PI/180;var l=Math.sin(v);var g=Math.cos(v);var j="progid:DXImageTransform.Microsoft.Matrix(M11="+g+",M12="+(-l)+",M21="+l+",M22="+g+",SizingMethod='auto expand')\n";var b=z.graphicOpacity||z.fillOpacity;if(b&&b!=1){j+="progid:DXImageTransform.Microsoft.BasicImage(opacity="+b+")\n"}u.style.filter=j;var w=new OpenLayers.Geometry.Point(-B,-h);var d=new OpenLayers.Bounds(0,0,r,p).toGeometry();d.rotate(z.rotation,w);var m=d.getBounds();u.style.left=Math.round(parseInt(u.style.left)+m.left)+"px";u.style.top=Math.round(parseInt(u.style.top)-m.bottom)+"px"},postDraw:function(a){var d=a._style.fillColor;var b=a._style.strokeColor;if(d=="none"&&a.fillcolor!=d){a.fillcolor=d}if(b=="none"&&a.strokecolor!=b){a.strokecolor=b}},setNodeDimension:function(b,g){var f=g.getBounds();if(f){var a=this.getResolution();var d=new OpenLayers.Bounds((f.left/a-this.offset.x).toFixed(),(f.bottom/a-this.offset.y).toFixed(),(f.right/a-this.offset.x).toFixed(),(f.top/a-this.offset.y).toFixed());b.style.left=d.left+"px";b.style.top=d.top+"px";b.style.width=d.getWidth()+"px";b.style.height=d.getHeight()+"px";b.coordorigin=d.left+" "+d.top;b.coordsize=d.getWidth()+" "+d.getHeight()}},dashStyle:function(a){var d=a.strokeDashstyle;switch(d){case"solid":case"dot":case"dash":case"dashdot":case"longdash":case"longdashdot":return d;default:var b=d.split(/[ ,]/);if(b.length==2){if(1*b[0]>=2*b[1]){return"longdash"}return(b[0]==1||b[1]==1)?"dot":"dash"}else{if(b.length==4){return(1*b[0]>=2*b[1])?"longdashdot":"dashdot"}}return"solid"}},createNode:function(a,d){var b=document.createElement(a);if(d){b.id=d}b.unselectable="on";b.onselectstart=function(){return(false)};return b},nodeTypeCompare:function(d,b){var f=b;var a=f.indexOf(":");if(a!=-1){f=f.substr(a+1)}var g=d.nodeName;a=g.indexOf(":");if(a!=-1){g=g.substr(a+1)}return(f==g)},createRenderRoot:function(){return this.nodeFactory(this.container.id+"_vmlRoot","div")},createRoot:function(a){return this.nodeFactory(this.container.id+a,"olv:group")},drawPoint:function(a,b){return this.drawCircle(a,b,1)},drawCircle:function(f,g,a){if(!isNaN(g.x)&&!isNaN(g.y)){var b=this.getResolution();f.style.left=((g.x/b-this.offset.x).toFixed()-a)+"px";f.style.top=((g.y/b-this.offset.y).toFixed()-a)+"px";var d=a*2;f.style.width=d+"px";f.style.height=d+"px";return f}return false},drawLineString:function(a,b){return this.drawLine(a,b,false)},drawLinearRing:function(a,b){return this.drawLine(a,b,true)},drawLine:function(b,o,j){this.setNodeDimension(b,o);var d=this.getResolution();var a=o.components.length;var g=new Array(a);var l,p,m;for(var h=0;h<a;h++){l=o.components[h];p=(l.x/d-this.offset.x);m=(l.y/d-this.offset.y);g[h]=" "+p.toFixed()+","+m.toFixed()+" l "}var f=(j)?" x e":" e";b.path="m"+g.join("")+f;return b},drawPolygon:function(b,p){this.setNodeDimension(b,p);var d=this.getResolution();var r=[];var h,g,f,m,a,l,q,o;for(f=0,m=p.components.length;f<m;f++){h=p.components[f];r.push("m");for(g=0,a=h.components.length;g<a;g++){l=h.components[g];q=l.x/d-this.offset.x;o=l.y/d-this.offset.y;r.push(" "+q.toFixed()+","+o.toFixed());if(g==0){r.push(" l")}}r.push(" x ")}r.push("e");b.path=r.join("");return b},drawRectangle:function(b,d){var a=this.getResolution();b.style.left=(d.x/a-this.offset.x)+"px";b.style.top=(d.y/a-this.offset.y)+"px";b.style.width=d.width/a+"px";b.style.height=d.height/a+"px";return b},drawText:function(f,a,l){var j=this.nodeFactory(f+this.LABEL_ID_SUFFIX,"olv:rect");var h=this.nodeFactory(f+this.LABEL_ID_SUFFIX+"_textbox","olv:textbox");var d=this.getResolution();j.style.left=(l.x/d-this.offset.x).toFixed()+"px";j.style.top=(l.y/d-this.offset.y).toFixed()+"px";j.style.flip="y";h.innerText=a.label;if(a.fillColor){h.style.color=a.fontColor}if(a.fontFamily){h.style.fontFamily=a.fontFamily}if(a.fontSize){h.style.fontSize=a.fontSize}if(a.fontWeight){h.style.fontWeight=a.fontWeight}h.style.whiteSpace="nowrap";h.inset="1px,0px,0px,0px";if(!j.parentNode){j.appendChild(h);this.textRoot.appendChild(j)}var g=a.labelAlign||"cm";var m=h.clientWidth*(OpenLayers.Renderer.VML.LABEL_SHIFT[g.substr(0,1)]);var b=h.clientHeight*(OpenLayers.Renderer.VML.LABEL_SHIFT[g.substr(1,1)]);j.style.left=parseInt(j.style.left)-m-1+"px";j.style.top=parseInt(j.style.top)+b+"px"},drawSurface:function(a,j){this.setNodeDimension(a,j);var b=this.getResolution();var m=[];var f,l,h;for(var d=0,g=j.components.length;d<g;d++){f=j.components[d];l=f.x/b-this.offset.x;h=f.y/b-this.offset.y;if((d%3)==0&&(d/3)==0){m.push("m")}else{if((d%3)==1){m.push(" c")}}m.push(" "+l+","+h)}m.push(" x e");a.path=m.join("");return a},moveRoot:function(b){var a=this.map.getLayer(b.container.id);if(a instanceof OpenLayers.Layer.Vector.RootContainer){a=this.map.getLayer(this.container.id)}a&&a.renderer.clear();OpenLayers.Renderer.Elements.prototype.moveRoot.apply(this,arguments);a&&a.redraw()},importSymbol:function(f){var b=this.container.id+"-"+f;var a=this.symbolCache[b];if(a){return a}var d=OpenLayers.Renderer.symbol[f];if(!d){throw new Error(f+" is not a valid symbol name");return}var l=new OpenLayers.Bounds(Number.MAX_VALUE,Number.MAX_VALUE,0,0);var g=["m"];for(var h=0;h<d.length;h=h+2){x=d[h];y=d[h+1];l.left=Math.min(l.left,x);l.bottom=Math.min(l.bottom,y);l.right=Math.max(l.right,x);l.top=Math.max(l.top,y);g.push(x);g.push(y);if(h==0){g.push("l")}}g.push("x e");var m=g.join(" ");var j=(l.getWidth()-l.getHeight())/2;if(j>0){l.bottom=l.bottom-j;l.top=l.top+j}else{l.left=l.left-j;l.right=l.right+j}a={path:m,size:l.getWidth(),left:l.left,bottom:l.bottom};this.symbolCache[b]=a;return a},CLASS_NAME:"OpenLayers.Renderer.VML"});OpenLayers.Renderer.VML.LABEL_SHIFT={l:0,c:0.5,r:1,t:0,m:0.5,b:1};OpenLayers.Tile=OpenLayers.Class({EVENT_TYPES:["loadstart","loadend","reload","unload"],events:null,id:null,layer:null,url:null,bounds:null,size:null,position:null,isLoading:false,initialize:function(f,a,g,b,d){this.layer=f;this.position=a.clone();this.bounds=g.clone();this.url=b;this.size=d.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,d){if(d==null){d=true}this.bounds=b.clone();this.position=a.clone();if(d){this.draw()}},clear:function(){},getBoundsFromBaseLayer:function(a){var h=OpenLayers.i18n("reprojectDeprecated",{layerName:this.layer.name});OpenLayers.Console.warn(h);var f=this.layer.map.getLonLatFromLayerPx(a);var d=a.clone();d.x+=this.size.w;d.y+=this.size.h;var b=this.layer.map.getLonLatFromLayerPx(d);if(f.lon>b.lon){if(f.lon<0){f.lon=-180-(f.lon+180)}else{b.lon=180+b.lon+180}}var g=new OpenLayers.Bounds(f.lon,b.lat,b.lon,f.lat);return g},showTile:function(){if(this.shouldDraw){this.show()}},show:function(){},hide:function(){},CLASS_NAME:"OpenLayers.Tile"});OpenLayers.Control.MouseToolbar=OpenLayers.Class(OpenLayers.Control.MouseDefaults,{mode:null,buttons:null,direction:"vertical",buttonClicked:null,initialize:function(a,b){OpenLayers.Control.prototype.initialize.apply(this,arguments);this.position=new OpenLayers.Pixel(OpenLayers.Control.MouseToolbar.X,OpenLayers.Control.MouseToolbar.Y);if(a){this.position=a}if(b){this.direction=b}this.measureDivs=[]},destroy:function(){for(var b in this.buttons){var a=this.buttons[b];a.map=null;a.events.destroy()}OpenLayers.Control.MouseDefaults.prototype.destroy.apply(this,arguments)},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);OpenLayers.Control.MouseDefaults.prototype.draw.apply(this,arguments);this.buttons={};var b=new OpenLayers.Size(28,28);var a=new OpenLayers.Pixel(OpenLayers.Control.MouseToolbar.X,0);this._addButton("zoombox","drag-rectangle-off.png","drag-rectangle-on.png",a,b,"Shift->Drag to zoom to area");a=a.add((this.direction=="vertical"?0:b.w),(this.direction=="vertical"?b.h:0));this._addButton("pan","panning-hand-off.png","panning-hand-on.png",a,b,"Drag the map to pan.");a=a.add((this.direction=="vertical"?0:b.w),(this.direction=="vertical"?b.h:0));this.switchModeTo("pan");return this.div},_addButton:function(a,g,f,m,j,l){var h=OpenLayers.Util.getImagesLocation()+g;var d=OpenLayers.Util.getImagesLocation()+f;var b=OpenLayers.Util.createAlphaImageDiv("OpenLayers_Control_MouseToolbar_"+a,m,j,h,"absolute");this.div.appendChild(b);b.imgLocation=h;b.activeImgLocation=d;b.events=new OpenLayers.Events(this,b,null,true);b.events.on({mousedown:this.buttonDown,mouseup:this.buttonUp,dblclick:OpenLayers.Event.stop,scope:this});b.action=a;b.title=l;b.alt=l;b.map=this.map;this.buttons[a]=b;return b},buttonDown:function(a){if(!OpenLayers.Event.isLeftClick(a)){return}this.buttonClicked=a.element.action;OpenLayers.Event.stop(a)},buttonUp:function(a){if(!OpenLayers.Event.isLeftClick(a)){return}if(this.buttonClicked!=null){if(this.buttonClicked==a.element.action){this.switchModeTo(a.element.action)}OpenLayers.Event.stop(a);this.buttonClicked=null}},defaultDblClick:function(b){this.switchModeTo("pan");this.performedDrag=false;var a=this.map.getLonLatFromViewPortPx(b.xy);this.map.setCenter(a,this.map.zoom+1);OpenLayers.Event.stop(b);return false},defaultMouseDown:function(a){if(!OpenLayers.Event.isLeftClick(a)){return}this.mouseDragStart=a.xy.clone();this.performedDrag=false;this.startViaKeyboard=false;if(a.shiftKey&&this.mode!="zoombox"){this.switchModeTo("zoombox");this.startViaKeyboard=true}else{if(a.altKey&&this.mode!="measure"){this.switchModeTo("measure")}else{if(!this.mode){this.switchModeTo("pan")}}}switch(this.mode){case"zoombox":this.map.div.style.cursor="crosshair";this.zoomBox=OpenLayers.Util.createDiv("zoomBox",this.mouseDragStart,null,null,"absolute","2px solid red");this.zoomBox.style.backgroundColor="white";this.zoomBox.style.filter="alpha(opacity=50)";this.zoomBox.style.opacity="0.50";this.zoomBox.style.fontSize="1px";this.zoomBox.style.zIndex=this.map.Z_INDEX_BASE.Popup-1;this.map.viewPortDiv.appendChild(this.zoomBox);this.performedDrag=true;break;case"measure":var d="";if(this.measureStart){var b=this.map.getLonLatFromViewPortPx(this.mouseDragStart);d=OpenLayers.Util.distVincenty(this.measureStart,b);d=Math.round(d*100)/100;d=d+"km";this.measureStartBox=this.measureBox}this.measureStart=this.map.getLonLatFromViewPortPx(this.mouseDragStart);this.measureBox=OpenLayers.Util.createDiv(null,this.mouseDragStart.add(-2-parseInt(this.map.layerContainerDiv.style.left),-2-parseInt(this.map.layerContainerDiv.style.top)),null,null,"absolute");this.measureBox.style.width="4px";this.measureBox.style.height="4px";this.measureBox.style.fontSize="1px";this.measureBox.style.backgroundColor="red";this.measureBox.style.zIndex=this.map.Z_INDEX_BASE.Popup-1;this.map.layerContainerDiv.appendChild(this.measureBox);if(d){this.measureBoxDistance=OpenLayers.Util.createDiv(null,this.mouseDragStart.add(-2-parseInt(this.map.layerContainerDiv.style.left),2-parseInt(this.map.layerContainerDiv.style.top)),null,null,"absolute");this.measureBoxDistance.innerHTML=d;this.measureBoxDistance.style.zIndex=this.map.Z_INDEX_BASE.Popup-1;this.map.layerContainerDiv.appendChild(this.measureBoxDistance);this.measureDivs.push(this.measureBoxDistance)}this.measureBox.style.zIndex=this.map.Z_INDEX_BASE.Popup-1;this.map.layerContainerDiv.appendChild(this.measureBox);this.measureDivs.push(this.measureBox);break;default:this.map.div.style.cursor="move";break}document.onselectstart=function(){return false};OpenLayers.Event.stop(a)},switchModeTo:function(d){if(d!=this.mode){if(this.mode&&this.buttons[this.mode]){OpenLayers.Util.modifyAlphaImageDiv(this.buttons[this.mode],null,null,null,this.buttons[this.mode].imgLocation)}if(this.mode=="measure"&&d!="measure"){for(var b=0,a=this.measureDivs.length;b<a;b++){if(this.measureDivs[b]){this.map.layerContainerDiv.removeChild(this.measureDivs[b])}}this.measureDivs=[];this.measureStart=null}this.mode=d;if(this.buttons[d]){OpenLayers.Util.modifyAlphaImageDiv(this.buttons[d],null,null,null,this.buttons[d].activeImgLocation)}switch(this.mode){case"zoombox":this.map.div.style.cursor="crosshair";break;default:this.map.div.style.cursor="";break}}},leaveMode:function(){this.switchModeTo("pan")},defaultMouseMove:function(g){if(this.mouseDragStart!=null){switch(this.mode){case"zoombox":var f=Math.abs(this.mouseDragStart.x-g.xy.x);var b=Math.abs(this.mouseDragStart.y-g.xy.y);this.zoomBox.style.width=Math.max(1,f)+"px";this.zoomBox.style.height=Math.max(1,b)+"px";if(g.xy.x<this.mouseDragStart.x){this.zoomBox.style.left=g.xy.x+"px"}if(g.xy.y<this.mouseDragStart.y){this.zoomBox.style.top=g.xy.y+"px"}break;default:var f=this.mouseDragStart.x-g.xy.x;var b=this.mouseDragStart.y-g.xy.y;var h=this.map.getSize();var a=new OpenLayers.Pixel(h.w/2+f,h.h/2+b);var d=this.map.getLonLatFromViewPortPx(a);this.map.setCenter(d,null,true);this.mouseDragStart=g.xy.clone()}this.performedDrag=true}},defaultMouseUp:function(a){if(!OpenLayers.Event.isLeftClick(a)){return}switch(this.mode){case"zoombox":this.zoomBoxEnd(a);if(this.startViaKeyboard){this.leaveMode()}break;case"pan":if(this.performedDrag){this.map.setCenter(this.map.center)}}document.onselectstart=null;this.mouseDragStart=null;this.map.div.style.cursor="default"},defaultMouseOut:function(a){if(this.mouseDragStart!=null&&OpenLayers.Util.mouseLeft(a,this.map.div)){if(this.zoomBox){this.removeZoomBox();if(this.startViaKeyboard){this.leaveMode()}}this.mouseDragStart=null;this.map.div.style.cursor="default"}},defaultClick:function(a){if(this.performedDrag){this.performedDrag=false;return false}},CLASS_NAME:"OpenLayers.Control.MouseToolbar"});OpenLayers.Control.MouseToolbar.X=6;OpenLayers.Control.MouseToolbar.Y=300;OpenLayers.Control.NavigationHistory=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOGGLE,previous:null,previousOptions:null,next:null,nextOptions:null,limit:50,activateOnDraw:true,clearOnDeactivate:false,registry:null,nextStack:null,previousStack:null,listeners:null,restoring:false,initialize:function(a){OpenLayers.Control.prototype.initialize.apply(this,[a]);this.registry=OpenLayers.Util.extend({moveend:function(){return{center:this.map.getCenter(),resolution:this.map.getResolution()}}},this.registry);this.clear();var b={trigger:OpenLayers.Function.bind(this.previousTrigger,this),displayClass:this.displayClass+" "+this.displayClass+"Previous"};OpenLayers.Util.extend(b,this.previousOptions);this.previous=new OpenLayers.Control.Button(b);var d={trigger:OpenLayers.Function.bind(this.nextTrigger,this),displayClass:this.displayClass+" "+this.displayClass+"Next"};OpenLayers.Util.extend(d,this.nextOptions);this.next=new OpenLayers.Control.Button(d)},onPreviousChange:function(b,a){if(b&&!this.previous.active){this.previous.activate()}else{if(!b&&this.previous.active){this.previous.deactivate()}}},onNextChange:function(b,a){if(b&&!this.next.active){this.next.activate()}else{if(!b&&this.next.active){this.next.deactivate()}}},destroy:function(){OpenLayers.Control.prototype.destroy.apply(this);this.previous.destroy();this.next.destroy();this.deactivate();for(var a in this){this[a]=null}},setMap:function(a){this.map=a;this.next.setMap(a);this.previous.setMap(a)},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);this.next.draw();this.previous.draw();if(this.activateOnDraw){this.activate()}},previousTrigger:function(){var b=this.previousStack.shift();var a=this.previousStack.shift();if(a!=undefined){this.nextStack.unshift(b);this.previousStack.unshift(a);this.restoring=true;this.restore(a);this.restoring=false;this.onNextChange(this.nextStack[0],this.nextStack.length);this.onPreviousChange(this.previousStack[1],this.previousStack.length-1)}else{this.previousStack.unshift(b)}return a},nextTrigger:function(){var a=this.nextStack.shift();if(a!=undefined){this.previousStack.unshift(a);this.restoring=true;this.restore(a);this.restoring=false;this.onNextChange(this.nextStack[0],this.nextStack.length);this.onPreviousChange(this.previousStack[1],this.previousStack.length-1)}return a},clear:function(){this.previousStack=[];this.nextStack=[]},restore:function(b){var a=this.map.getZoomForResolution(b.resolution);this.map.setCenter(b.center,a)},setListeners:function(){this.listeners={};for(var a in this.registry){this.listeners[a]=OpenLayers.Function.bind(function(){if(!this.restoring){var b=this.registry[a].apply(this,arguments);this.previousStack.unshift(b);if(this.previousStack.length>1){this.onPreviousChange(this.previousStack[1],this.previousStack.length-1)}if(this.previousStack.length>(this.limit+1)){this.previousStack.pop()}if(this.nextStack.length>0){this.nextStack=[];this.onNextChange(null,0)}}return true},this)}},activate:function(){var a=false;if(this.map){if(OpenLayers.Control.prototype.activate.apply(this)){if(this.listeners==null){this.setListeners()}for(var b in this.listeners){this.map.events.register(b,this,this.listeners[b])}a=true;if(this.previousStack.length==0){this.initStack()}}}return a},initStack:function(){if(this.map.getCenter()){this.listeners.moveend()}},deactivate:function(){var b=false;if(this.map){if(OpenLayers.Control.prototype.deactivate.apply(this)){for(var a in this.listeners){this.map.events.unregister(a,this,this.listeners[a])}if(this.clearOnDeactivate){this.clear()}b=true}}return b},CLASS_NAME:"OpenLayers.Control.NavigationHistory"});OpenLayers.Control.PanPanel=OpenLayers.Class(OpenLayers.Control.Panel,{initialize:function(a){OpenLayers.Control.Panel.prototype.initialize.apply(this,[a]);this.addControls([new OpenLayers.Control.Pan(OpenLayers.Control.Pan.NORTH),new OpenLayers.Control.Pan(OpenLayers.Control.Pan.SOUTH),new OpenLayers.Control.Pan(OpenLayers.Control.Pan.EAST),new OpenLayers.Control.Pan(OpenLayers.Control.Pan.WEST)])},CLASS_NAME:"OpenLayers.Control.PanPanel"});OpenLayers.Control.PanZoomBar=OpenLayers.Class(OpenLayers.Control.PanZoom,{zoomStopWidth:18,zoomStopHeight:11,slider:null,sliderEvents:null,zoomBarDiv:null,divEvents:null,zoomWorldIcon:false,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 f=new OpenLayers.Size(18,18);var a=new OpenLayers.Pixel(b.x+f.w/2,b.y);var d=f.w;if(this.zoomWorldIcon){a=new OpenLayers.Pixel(b.x+f.w,b.y)}this._addButton("panup","north-mini.png",a,f);b.y=a.y+f.h;this._addButton("panleft","west-mini.png",b,f);if(this.zoomWorldIcon){this._addButton("zoomworld","zoom-world-mini.png",b.add(f.w,0),f);d*=2}this._addButton("panright","east-mini.png",b.add(d,0),f);this._addButton("pandown","south-mini.png",a.add(0,f.h*2),f);this._addButton("zoomin","zoom-plus-mini.png",a.add(0,f.h*3+5),f);a=this._addZoomBar(a.add(0,f.h*4+5));this._addButton("zoomout","zoom-minus-mini.png",a,f);return this.div},_addZoomBar:function(a){var g=OpenLayers.Util.getImagesLocation();var j=this.id+"_"+this.map.id;var b=this.map.getNumZoomLevels()-1-this.map.getZoom();var d=OpenLayers.Util.createAlphaImageDiv(j,a.add(-1,b*this.zoomStopHeight),new OpenLayers.Size(20,9),g+"slider.png","absolute");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});var f=new OpenLayers.Size();f.h=this.zoomStopHeight*this.map.getNumZoomLevels();f.w=this.zoomStopWidth;var h=null;if(OpenLayers.Util.alphaHack()){var j=this.id+"_"+this.map.id;h=OpenLayers.Util.createAlphaImageDiv(j,a,new OpenLayers.Size(f.w,this.zoomStopHeight),g+"zoombar.png","absolute",null,"crop");h.style.height=f.h+"px"}else{h=OpenLayers.Util.createDiv("OpenLayers_Control_PanZoomBar_Zoombar"+this.map.id,a,f,g+"zoombar.png")}this.zoombarDiv=h;this.divEvents=new OpenLayers.Events(this,h,null,true,{includeXY:true});this.divEvents.on({mousedown:this.divClick,mousemove:this.passEventToSlider,dblclick:this.doubleClick,click:this.doubleClick});this.div.appendChild(h);this.startTop=parseInt(h.style.top);this.div.appendChild(d);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 g=a.xy.y;var f=OpenLayers.Util.pagePosition(a.object)[1];var d=(g-f)/this.zoomStopHeight;if(!this.map.fractionalZoom){d=Math.floor(d)}var b=(this.map.getNumZoomLevels()-1)-d;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 f=OpenLayers.Util.pagePosition(this.zoombarDiv);if((b.clientY-f[1])>0&&(b.clientY-f[1])<parseInt(this.zoombarDiv.style.height)-2){var d=parseInt(this.slider.style.top)-a;this.slider.style.top=d+"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 d=this.map.zoom;if(this.map.fractionalZoom){d+=a/this.zoomStopHeight;d=Math.min(Math.max(d,0),this.map.getNumZoomLevels()-1)}else{d+=Math.round(a/this.zoomStopHeight)}this.map.zoomTo(d);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.Control.Permalink=OpenLayers.Class(OpenLayers.Control,{argParserClass:OpenLayers.Control.ArgParser,element:null,base:"",displayProjection:null,initialize:function(b,d,a){OpenLayers.Control.prototype.initialize.apply(this,[a]);this.element=OpenLayers.Util.getElement(b);this.base=d||document.location.href},destroy:function(){if(this.element.parentNode==this.div){this.div.removeChild(this.element)}this.element=null;this.map.events.unregister("moveend",this,this.updateLink);OpenLayers.Control.prototype.destroy.apply(this,arguments)},setMap:function(f){OpenLayers.Control.prototype.setMap.apply(this,arguments);for(var b=0,a=this.map.controls.length;b<a;b++){var d=this.map.controls[b];if(d.CLASS_NAME==this.argParserClass.CLASS_NAME){if(d.displayProjection!=this.displayProjection){this.displayProjection=d.displayProjection}break}}if(b==this.map.controls.length){this.map.addControl(new this.argParserClass({displayProjection:this.displayProjection}))}},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.element){this.div.className=this.displayClass;this.element=document.createElement("a");this.element.innerHTML=OpenLayers.i18n("permalink");this.element.href="";this.div.appendChild(this.element)}this.map.events.on({moveend:this.updateLink,changelayer:this.updateLink,changebaselayer:this.updateLink,scope:this});this.updateLink();return this.div},updateLink:function(){var a=this.base;if(a.indexOf("?")!=-1){a=a.substring(0,a.indexOf("?"))}a+="?"+OpenLayers.Util.getParameterString(this.createParams());this.element.href=a},createParams:function(a,o,g){a=a||this.map.getCenter();var f=OpenLayers.Util.getParameters(this.base);if(a){f.zoom=o||this.map.getZoom();var m=a.lat;var b=a.lon;if(this.displayProjection){var d=OpenLayers.Projection.transform({x:b,y:m},this.map.getProjectionObject(),this.displayProjection);b=d.x;m=d.y}f.lat=Math.round(m*100000)/100000;f.lon=Math.round(b*100000)/100000;g=g||this.map.layers;f.layers="";for(var h=0,l=g.length;h<l;h++){var j=g[h];if(j.isBaseLayer){f.layers+=(j==this.map.baseLayer)?"B":"0"}else{f.layers+=(j.getVisibility())?"T":"F"}}}return f},CLASS_NAME:"OpenLayers.Control.Permalink"});OpenLayers.Control.ZoomPanel=OpenLayers.Class(OpenLayers.Control.Panel,{initialize:function(a){OpenLayers.Control.Panel.prototype.initialize.apply(this,[a]);this.addControls([new OpenLayers.Control.ZoomIn(),new OpenLayers.Control.ZoomToMaxExtent(),new OpenLayers.Control.ZoomOut()])},CLASS_NAME:"OpenLayers.Control.ZoomPanel"});OpenLayers.Format.JSON=OpenLayers.Class(OpenLayers.Format,{indent:"    ",space:" ",newline:"\n",level:0,pretty:false,initialize:function(a){OpenLayers.Format.prototype.initialize.apply(this,[a])},read:function(json,filter){try{if(/^[\],:{}\s]*$/.test(json.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){var object=eval("("+json+")");if(typeof filter==="function"){function walk(k,v){if(v&&typeof v==="object"){for(var i in v){if(v.hasOwnProperty(i)){v[i]=walk(i,v[i])}}}return filter(k,v)}object=walk("",object)}if(this.keepData){this.data=object}return object}}catch(e){}return null},write:function(g,d){this.pretty=!!d;var a=null;var b=typeof g;if(this.serialize[b]){try{a=this.serialize[b].apply(this,[g])}catch(f){OpenLayers.Console.error("Trouble serializing: "+f)}}return a},writeIndent:function(){var b=[];if(this.pretty){for(var a=0;a<this.level;++a){b.push(this.indent)}}return b.join("")},writeNewline:function(){return(this.pretty)?this.newline:""},writeSpace:function(){return(this.pretty)?this.space:""},serialize:{object:function(d){if(d==null){return"null"}if(d.constructor==Date){return this.serialize.date.apply(this,[d])}if(d.constructor==Array){return this.serialize.array.apply(this,[d])}var h=["{"];this.level+=1;var f,b,g;var a=false;for(f in d){if(d.hasOwnProperty(f)){b=OpenLayers.Format.JSON.prototype.write.apply(this,[f,this.pretty]);g=OpenLayers.Format.JSON.prototype.write.apply(this,[d[f],this.pretty]);if(b!=null&&g!=null){if(a){h.push(",")}h.push(this.writeNewline(),this.writeIndent(),b,":",this.writeSpace(),g);a=true}}}this.level-=1;h.push(this.writeNewline(),this.writeIndent(),"}");return h.join("")},array:function(g){var d;var f=["["];this.level+=1;for(var b=0,a=g.length;b<a;++b){d=OpenLayers.Format.JSON.prototype.write.apply(this,[g[b],this.pretty]);if(d!=null){if(b>0){f.push(",")}f.push(this.writeNewline(),this.writeIndent(),d)}}this.level-=1;f.push(this.writeNewline(),this.writeIndent(),"]");return f.join("")},string:function(b){var a={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};if(/["\\\x00-\x1f]/.test(b)){return'"'+b.replace(/([\x00-\x1f\\"])/g,function(f,d){var g=a[d];if(g){return g}g=d.charCodeAt();return"\\u00"+Math.floor(g/16).toString(16)+(g%16).toString(16)})+'"'}return'"'+b+'"'},number:function(a){return isFinite(a)?String(a):"null"},"boolean":function(a){return String(a)},date:function(a){function b(d){return(d<10)?"0"+d:d}return'"'+a.getFullYear()+"-"+b(a.getMonth()+1)+"-"+b(a.getDate())+"T"+b(a.getHours())+":"+b(a.getMinutes())+":"+b(a.getSeconds())+'"'}},CLASS_NAME:"OpenLayers.Format.JSON"});OpenLayers.Format.WFST=function(b){b=OpenLayers.Util.applyDefaults(b,OpenLayers.Format.WFST.DEFAULTS);var a=OpenLayers.Format.WFST["v"+b.version.replace(/\./g,"_")];if(!a){throw"Unsupported WFST version: "+b.version}return new a(b)};OpenLayers.Format.WFST.DEFAULTS={version:"1.0.0"};OpenLayers.Format.WMSCapabilities=OpenLayers.Class(OpenLayers.Format.XML,{defaultVersion:"1.1.1",version:null,parser:null,initialize:function(a){OpenLayers.Format.prototype.initialize.apply(this,[a]);this.options=a},read:function(g){if(typeof g=="string"){g=OpenLayers.Format.XML.prototype.read.apply(this,[g])}var d=g.documentElement;var b=this.version||d.getAttribute("version")||this.defaultVersion;if(!this.parser||this.parser.version!==b){var f=OpenLayers.Format.WMSCapabilities["v"+b.replace(/\./g,"_")];if(!f){throw"Can't find a WMS capabilities parser for version "+b}var h=new f(this.options)}var a=h.read(g);a.version=b;return a},CLASS_NAME:"OpenLayers.Format.WMSCapabilities"});OpenLayers.Format.XML=OpenLayers.Class(OpenLayers.Format,{namespaces:null,namespaceAlias:null,defaultPrefix:null,readers:{},writers:{},xmldom:null,initialize:function(a){if(window.ActiveXObject){this.xmldom=new ActiveXObject("Microsoft.XMLDOM")}OpenLayers.Format.prototype.initialize.apply(this,[a]);this.namespaces=OpenLayers.Util.extend({},this.namespaces);this.namespaceAlias={};for(var b in this.namespaces){this.namespaceAlias[this.namespaces[b]]=b}},destroy:function(){this.xmldom=null;OpenLayers.Format.prototype.destroy.apply(this,arguments)},setNamespace:function(a,b){this.namespaces[a]=b;this.namespaceAlias[b]=a},read:function(d){var a=d.indexOf("<");if(a>0){d=d.substring(a)}var b=OpenLayers.Util.Try(OpenLayers.Function.bind((function(){var f;if(window.ActiveXObject&&!this.xmldom){f=new ActiveXObject("Microsoft.XMLDOM")}else{f=this.xmldom}f.loadXML(d);return f}),this),function(){return new DOMParser().parseFromString(d,"text/xml")},function(){var f=new XMLHttpRequest();f.open("GET","data:text/xml;charset=utf-8,"+encodeURIComponent(d),false);if(f.overrideMimeType){f.overrideMimeType("text/xml")}f.send(null);return f.responseXML});if(this.keepData){this.data=b}return b},write:function(b){var d;if(this.xmldom){d=b.xml}else{var a=new XMLSerializer();if(b.nodeType==1){var f=document.implementation.createDocument("","",null);if(f.importNode){b=f.importNode(b,true)}f.appendChild(b);d=a.serializeToString(f)}else{d=a.serializeToString(b)}}return d},createElementNS:function(d,a){var b;if(this.xmldom){if(typeof d=="string"){b=this.xmldom.createNode(1,a,d)}else{b=this.xmldom.createNode(1,a,"")}}else{b=document.createElementNS(d,a)}return b},createTextNode:function(b){var a;if(this.xmldom){a=this.xmldom.createTextNode(b)}else{a=document.createTextNode(b)}return a},getElementsByTagNameNS:function(g,f,d){var a=[];if(g.getElementsByTagNameNS){a=g.getElementsByTagNameNS(f,d)}else{var b=g.getElementsByTagName("*");var m,h;for(var j=0,l=b.length;j<l;++j){m=b[j];h=(m.prefix)?(m.prefix+":"+d):d;if((d=="*")||(h==m.nodeName)){if((f=="*")||(f==m.namespaceURI)){a.push(m)}}}}return a},getAttributeNodeNS:function(d,b,a){var m=null;if(d.getAttributeNodeNS){m=d.getAttributeNodeNS(b,a)}else{var g=d.attributes;var l,f;for(var h=0,j=g.length;h<j;++h){l=g[h];if(l.namespaceURI==b){f=(l.prefix)?(l.prefix+":"+a):a;if(f==l.nodeName){m=l;break}}}}return m},getAttributeNS:function(g,f,a){var b="";if(g.getAttributeNS){b=g.getAttributeNS(f,a)||""}else{var d=this.getAttributeNodeNS(g,f,a);if(d){b=d.nodeValue}}return b},getChildValue:function(a,d){var b=d||"";if(a){for(var f=a.firstChild;f;f=f.nextSibling){switch(f.nodeType){case 3:case 4:b+=f.nodeValue}}}return b},concatChildValues:function(b,f){var d="";var g=b.firstChild;var a;while(g){a=g.nodeValue;if(a){d+=a}g=g.nextSibling}if(d==""&&f!=undefined){d=f}return d},isSimpleContent:function(a){var d=true;for(var b=a.firstChild;b;b=b.nextSibling){if(b.nodeType===1){d=false;break}}return d},contentType:function(d){var g=false,b=false;var a=OpenLayers.Format.XML.CONTENT_TYPE.EMPTY;for(var f=d.firstChild;f;f=f.nextSibling){switch(f.nodeType){case 1:b=true;break;case 8:break;default:g=true}if(b&&g){break}}if(b&&g){a=OpenLayers.Format.XML.CONTENT_TYPE.MIXED}else{if(b){return OpenLayers.Format.XML.CONTENT_TYPE.COMPLEX}else{if(g){return OpenLayers.Format.XML.CONTENT_TYPE.SIMPLE}}}return a},hasAttributeNS:function(d,b,a){var f=false;if(d.hasAttributeNS){f=d.hasAttributeNS(b,a)}else{f=!!this.getAttributeNodeNS(d,b,a)}return f},setAttributeNS:function(f,d,a,g){if(f.setAttributeNS){f.setAttributeNS(d,a,g)}else{if(this.xmldom){if(d){var b=f.ownerDocument.createNode(2,a,d);b.nodeValue=g;f.setAttributeNode(b)}else{f.setAttribute(a,g)}}else{throw"setAttributeNS not implemented"}}},createElementNSPlus:function(b,a){a=a||{};var f=a.uri||this.namespaces[a.prefix];if(!f){var h=b.indexOf(":");f=this.namespaces[b.substring(0,h)]}if(!f){f=this.namespaces[this.defaultPrefix]}var d=this.createElementNS(f,b);if(a.attributes){this.setAttributes(d,a.attributes)}var g=a.value;if(g!=null){if(typeof g=="boolean"){g=String(g)}d.appendChild(this.createTextNode(g))}return d},setAttributes:function(d,g){var f,b;for(var a in g){if(g[a]!=null&&g[a].toString){f=g[a].toString();b=this.namespaces[a.substring(0,a.indexOf(":"))]||null;this.setAttributeNS(d,b,a,f)}}},readNode:function(d,g){if(!g){g={}}var f=this.readers[this.namespaceAlias[d.namespaceURI]];if(f){var b=d.localName||d.nodeName.split(":").pop();var a=f[b]||f["*"];if(a){a.apply(this,[d,g])}}return g},readChildNodes:function(f,g){if(!g){g={}}var d=f.childNodes;var h;for(var b=0,a=d.length;b<a;++b){h=d[b];if(h.nodeType==1){this.readNode(h,g)}}return g},writeNode:function(a,h,f){var g,d;var b=a.indexOf(":");if(b>0){g=a.substring(0,b);d=a.substring(b+1)}else{if(f){g=this.namespaceAlias[f.namespaceURI]}else{g=this.defaultPrefix}d=a}var j=this.writers[g][d].apply(this,[h]);if(f){f.appendChild(j)}return j},getChildEl:function(d,a,b){return d&&this.getThisOrNextEl(d.firstChild,a,b)},getNextEl:function(d,a,b){return d&&this.getThisOrNextEl(d.nextSibling,a,b)},getThisOrNextEl:function(f,a,d){outer:for(var b=f;b;b=b.nextSibling){switch(b.nodeType){case 1:if((!a||a===(b.localName||b.nodeName.split(":").pop()))&&(!d||d===b.namespaceURI)){break outer}b=null;break outer;case 3:if(/^\s*$/.test(b.nodeValue)){break}case 4:case 6:case 12:case 10:case 11:b=null;break outer}}return b||null},lookupNamespaceURI:function(g,h){var f=null;if(g){if(g.lookupNamespaceURI){f=g.lookupNamespaceURI(h)}else{outer:switch(g.nodeType){case 1:if(g.namespaceURI!==null&&g.prefix===h){f=g.namespaceURI;break outer}var b=g.attributes.length;if(b){var a;for(var d=0;d<b;++d){a=g.attributes[d];if(a.prefix==="xmlns"&&a.name==="xmlns:"+h){f=a.value||null;break outer}else{if(a.name==="xmlns"&&h===null){f=a.value||null;break outer}}}}f=this.lookupNamespaceURI(g.parentNode,h);break outer;case 2:f=this.lookupNamespaceURI(g.ownerElement,h);break outer;case 9:f=this.lookupNamespaceURI(g.documentElement,h);break outer;case 6:case 12:case 10:case 11:break outer;default:f=this.lookupNamespaceURI(g.parentNode,h);break outer}}}return f},CLASS_NAME:"OpenLayers.Format.XML"});OpenLayers.Format.XML.CONTENT_TYPE={EMPTY:0,SIMPLE:1,COMPLEX:2,MIXED:3};OpenLayers.Format.XML.lookupNamespaceURI=OpenLayers.Function.bind(OpenLayers.Format.XML.prototype.lookupNamespaceURI,OpenLayers.Format.XML.prototype);OpenLayers.Handler=OpenLayers.Class({id:null,control:null,map:null,keyMask:null,active:false,evt:null,initialize:function(d,b,a){OpenLayers.Util.extend(this,a);this.control=d;this.callbacks=b;if(d.map){this.setMap(d.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 d=OpenLayers.Events.prototype.BROWSER_EVENTS;for(var b=0,a=d.length;b<a;b++){if(this[d[b]]){this.register(d[b],this[d[b]])}}this.active=true;return true},deactivate:function(){if(!this.active){return false}var d=OpenLayers.Events.prototype.BROWSER_EVENTS;for(var b=0,a=d.length;b<a;b++){if(this[d[b]]){this.unregister(d[b],this[d[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.Lang.de=OpenLayers.Util.applyDefaults({unhandledRequest:"Unbehandelte Anfragerückmeldung ${statusText}",permalink:"Permalink",overlays:"Overlays",baseLayer:"Grundkarte",sameProjection:"Die Übersichtskarte funktioniert nur, wenn sie dieselbe Projektion wie die Hauptkarte verwendet",readNotImplemented:"Lesen nicht implementiert.",writeNotImplemented:"Schreiben nicht implementiert.",noFID:"Ein Feature, für das keine FID existiert, kann nicht aktualisiert werden.",errorLoadingGML:"Fehler beim Laden der GML-Datei ${url}",browserNotSupported:"Ihr Browser unterstützt keine Vektordarstellung. Aktuell unterstützte Renderer:\n${renderers}",componentShouldBe:"addFeatures : Komponente sollte vom Typ ${geomType} sein",commitSuccess:"WFS-Transaktion: ERFOLGREICH ${response}",commitFailed:"WFS-Transaktion: FEHLGESCHLAGEN ${response}",googleWarning:"Der Google-Layer konnte nicht korrekt geladen werden.<br><br>Um diese Meldung nicht mehr zu erhalten, wählen Sie einen anderen Hintergrundlayer aus dem LayerSwitcher in der rechten oberen Ecke.<br><br>Sehr wahrscheinlich tritt dieser Fehler auf, weil das Skript der Google-Maps-Bibliothek nicht eingebunden wurde oder keinen gültigen API-Schlüssel für Ihre URL enthält.<br><br>Entwickler: Für Hilfe zum korrekten Einbinden des Google-Layers <a href='http://trac.openlayers.org/wiki/Google' target='_blank'>hier klicken</a>",getLayerWarning:"Der ${layerType}-Layer konnte nicht korrekt geladen werden.<br><br>Um diese Meldung nicht mehr zu erhalten, wählen Sie einen anderen Hintergrundlayer aus dem LayerSwitcher in der rechten oberen Ecke.<br><br>Sehr wahrscheinlich tritt dieser Fehler auf, weil das Skript der \"${layerLib}\"-Bibliothek nicht eingebunden wurde.<br><br>Entwickler: Für Hilfe zum korrekten Einbinden von Layern <a href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'>hier klicken</a>",scale:"Maßstab = 1 : ${scaleDenom}",end:""},OpenLayers.Lang.en);OpenLayers.Map=OpenLayers.Class({Z_INDEX_BASE:{BaseLayer:100,Overlay:325,Feature:725,Popup:750,Control:1000},EVENT_TYPES:["preaddlayer","addlayer","removelayer","changelayer","movestart","move","moveend","zoomend","popupopen","popupclose","addmarker","removemarker","clearmarkers","mouseover","mouseout","mousemove","dragstart","drag","dragend","changebaselayer"],id:null,fractionalZoom:false,events:null,allOverlays:false,div:null,dragging:false,size:null,viewPortDiv:null,layerContainerOrigin:null,layerContainerDiv:null,layers:null,controls:null,popups:null,baseLayer:null,center:null,resolution:null,zoom:0,panRatio:1.5,viewRequestID:0,tileSize:null,projection:"EPSG:4326",units:"degrees",resolutions:null,maxResolution:1.40625,minResolution:null,maxScale:null,minScale:null,maxExtent:null,minExtent:null,restrictedExtent:null,numZoomLevels:16,theme:null,displayProjection:null,fallThrough:true,panTween:null,eventListeners:null,panMethod:OpenLayers.Easing.Expo.easeOut,panDuration:50,paddingForPopups:null,initialize:function(l,f){if(arguments.length===1&&typeof l==="object"){f=l;l=f&&f.div}this.tileSize=new OpenLayers.Size(OpenLayers.Map.TILE_WIDTH,OpenLayers.Map.TILE_HEIGHT);this.maxExtent=new OpenLayers.Bounds(-180,-90,180,90);this.paddingForPopups=new OpenLayers.Bounds(15,15,15,15);this.theme=OpenLayers._getScriptLocation()+"theme/default/style.css";OpenLayers.Util.extend(this,f);this.id=OpenLayers.Util.createUniqueID("OpenLayers.Map_");this.div=OpenLayers.Util.getElement(l);if(!this.div){this.div=document.createElement("div");this.div.style.height="1px";this.div.style.width="1px"}OpenLayers.Element.addClass(this.div,"olMap");var j=this.div.id+"_OpenLayers_ViewPort";this.viewPortDiv=OpenLayers.Util.createDiv(j,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);j=this.div.id+"_OpenLayers_Container";this.layerContainerDiv=OpenLayers.Util.createDiv(j);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 h=true;var d=document.getElementsByTagName("link");for(var g=0,a=d.length;g<a;++g){if(OpenLayers.Util.isEquivalentUrl(d.item(g).href,this.theme)){h=false;break}}if(h){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 g=0,a=this.controls.length;g<a;g++){this.addControlToMap(this.controls[g])}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(g,d,a){var f=(typeof a.test=="function");var b=OpenLayers.Array.filter(this[g],function(h){return h[d]==a||(f&&a.test(h[d]))});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(g){var b=null;for(var f=0,a=this.layers.length;f<a;f++){var d=this.layers[f];if(d.id==g){b=d;break}}return b},setLayerZIndex:function(b,a){b.setZIndex(this.Z_INDEX_BASE[b.isBaseLayer?"BaseLayer":"Overlay"]+a*5)},resetLayersZIndex:function(){for(var d=0,a=this.layers.length;d<a;d++){var b=this.layers[d];this.setLayerZIndex(b,d)}},addLayer:function(d){for(var b=0,a=this.layers.length;b<a;b++){if(this.layers[b]==d){var f=OpenLayers.i18n("layerAlreadyAdded",{layerName:d.name});OpenLayers.Console.warn(f);return false}}if(this.allOverlays){d.isBaseLayer=false}this.events.triggerEvent("preaddlayer",{layer:d});d.div.className="olLayerDiv";d.div.style.overflow="";this.setLayerZIndex(d,this.layers.length);if(d.isFixed){this.viewPortDiv.appendChild(d.div)}else{this.layerContainerDiv.appendChild(d.div)}this.layers.push(d);d.setMap(this);if(d.isBaseLayer||(this.allOverlays&&!this.baseLayer)){if(this.baseLayer==null){this.setBaseLayer(d)}else{d.setVisibility(false)}}else{d.redraw()}this.events.triggerEvent("addlayer",{layer:d});d.afterAdd()},addLayers:function(d){for(var b=0,a=d.length;b<a;b++){this.addLayer(d[b])}},removeLayer:function(d,g){if(g==null){g=true}if(d.isFixed){this.viewPortDiv.removeChild(d.div)}else{this.layerContainerDiv.removeChild(d.div)}OpenLayers.Util.removeItem(this.layers,d);d.removeMap(this);d.map=null;if(this.baseLayer==d){this.baseLayer=null;if(g){for(var b=0,a=this.layers.length;b<a;b++){var f=this.layers[b];if(f.isBaseLayer||this.allOverlays){this.setBaseLayer(f);break}}}}this.resetLayersZIndex();this.events.triggerEvent("removelayer",{layer:d})},getNumLayers:function(){return this.layers.length},getLayerIndex:function(a){return OpenLayers.Util.indexOf(this.layers,a)},setLayerIndex:function(f,b){var g=this.getLayerIndex(f);if(b<0){b=0}else{if(b>this.layers.length){b=this.layers.length}}if(g!=b){this.layers.splice(g,1);this.layers.splice(b,0,f);for(var d=0,a=this.layers.length;d<a;d++){this.setLayerZIndex(this.layers[d],d)}this.events.triggerEvent("changelayer",{layer:f,property:"order"});if(this.allOverlays){if(b===0){this.setBaseLayer(f)}else{if(this.baseLayer!==this.layers[0]){this.setBaseLayer(this.layers[0])}}}}},raiseLayer:function(b,d){var a=this.getLayerIndex(b)+d;this.setLayerIndex(b,a)},setBaseLayer:function(g){var f=null;if(this.baseLayer){f=this.baseLayer.getExtent()}if(g!=this.baseLayer){if(OpenLayers.Util.indexOf(this.layers,g)!=-1){if(this.baseLayer!=null&&!this.allOverlays){this.baseLayer.setVisibility(false)}this.baseLayer=g;this.viewRequestID++;if(!this.allOverlays){this.baseLayer.visibility=true}var a=this.getCenter();if(a!=null){var b=(f)?f.getCenterLonLat():a;var d=(f)?this.getZoomForExtent(f,true):this.getZoomForResolution(this.resolution,true);this.setCenter(b,d,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 d=b.draw(a);if(d){if(!b.outsideViewport){d.style.zIndex=this.Z_INDEX_BASE.Control+this.controls.length;this.viewPortDiv.appendChild(d)}}},getControl:function(g){var b=null;for(var d=0,a=this.controls.length;d<a;d++){var f=this.controls[d];if(f.id==g){b=f;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,f){if(f){for(var b=this.popups.length-1;b>=0;--b){this.removePopup(this.popups[b])}}a.map=this;this.popups.push(a);var d=a.draw();if(d){d.style.zIndex=this.Z_INDEX_BASE.Popup+this.popups.length;this.layerContainerDiv.appendChild(d)}},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 d=this.getCurrentSize();var h=this.getSize();if(h==null){this.size=h=d}if(!d.equals(h)){this.size=d;for(var f=0,b=this.layers.length;f<b;f++){this.layers[f].onMapResize()}if(this.baseLayer!=null){var a=new OpenLayers.Pixel(d.w/2,d.h/2);var j=this.getLonLatFromViewPortPx(a);var g=this.getZoom();this.zoom=null;this.setCenter(this.getCenter(),g)}}},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 g=null;if(a==null){a=this.getCenter()}if(b==null){b=this.getResolution()}if((a!=null)&&(b!=null)){var f=this.getSize();var h=f.w*b;var d=f.h*b;g=new OpenLayers.Bounds(a.lon-h/2,a.lat-d/2,a.lon+h/2,a.lat+d/2)}return g},getCenter:function(){var a=null;if(this.center){a=this.center.clone()}return a},getZoom:function(){return this.zoom},pan:function(f,d,g){g=OpenLayers.Util.applyDefaults(g,{animate:true,dragging:false});var h=this.getViewPortPxFromLonLat(this.getCenter());var b=h.add(f,d);if(!g.dragging||!b.equals(h)){var a=this.getLonLatFromViewPortPx(b);if(g.animate){this.panTo(a)}else{this.setCenter(a,null,g.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 f={lon:a.lon,lat:a.lat};var d={lon:b.lon,lat:b.lat};this.panTween.start(f,d,this.panDuration,{callbacks:{start:OpenLayers.Function.bind(function(g){this.events.triggerEvent("movestart")},this),eachStep:OpenLayers.Function.bind(function(g){g=new OpenLayers.LonLat(g.lon,g.lat);this.moveTo(g,this.zoom,{dragging:true,noEvent:true})},this),done:OpenLayers.Function.bind(function(g){g=new OpenLayers.LonLat(g.lon,g.lat);this.moveTo(g,this.zoom,{noEvent:true});this.events.triggerEvent("moveend")},this)}})}else{this.setCenter(b)}},setCenter:function(d,a,b,f){this.moveTo(d,a,{dragging:b,forceZoomChange:f,caller:"setCenter"})},moveTo:function(j,r,w){if(!w){w={}}var q=w.dragging;var d=w.forceZoomChange;var l=w.noEvent;if(this.panTween&&w.caller=="setCenter"){this.panTween.stop()}if(!this.center&&!this.isValidLonLat(j)){j=this.maxExtent.getCenterLonLat()}if(this.restrictedExtent!=null){if(j==null){j=this.getCenter()}if(r==null){r=this.getZoom()}var f=this.getResolutionForZoom(r);var u=this.calculateBounds(j,f);if(!this.restrictedExtent.containsBounds(u)){var v=this.restrictedExtent.getCenterLonLat();if(u.getWidth()>this.restrictedExtent.getWidth()){j=new OpenLayers.LonLat(v.lon,j.lat)}else{if(u.left<this.restrictedExtent.left){j=j.add(this.restrictedExtent.left-u.left,0)}else{if(u.right>this.restrictedExtent.right){j=j.add(this.restrictedExtent.right-u.right,0)}}}if(u.getHeight()>this.restrictedExtent.getHeight()){j=new OpenLayers.LonLat(j.lon,v.lat)}else{if(u.bottom<this.restrictedExtent.bottom){j=j.add(0,this.restrictedExtent.bottom-u.bottom)}else{if(u.top>this.restrictedExtent.top){j=j.add(0,this.restrictedExtent.top-u.top)}}}}}var b=d||((this.isValidZoomLevel(r))&&(r!=this.getZoom()));var g=(this.isValidLonLat(j))&&(!j.equals(this.center));if(b||g||!q){if(!this.dragging&&!l){this.events.triggerEvent("movestart")}if(g){if((!b)&&(this.center)){this.centerLayerContainer(j)}this.center=j.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=r;this.resolution=this.getResolutionForZoom(r);this.viewRequestID++}var a=this.getExtent();if(this.baseLayer.visibility){this.baseLayer.moveTo(a,b,q);if(q){this.baseLayer.events.triggerEvent("move")}else{this.baseLayer.events.triggerEvent("moveend",{zoomChanged:b})}}a=this.baseLayer.getExtent();for(var h=0,o=this.layers.length;h<o;h++){var m=this.layers[h];if(m!==this.baseLayer&&!m.isBaseLayer){var p=m.calculateInRange();if(m.inRange!=p){m.inRange=p;if(!p){m.display(false)}this.events.triggerEvent("changelayer",{layer:m,property:"visibility"})}if(p&&m.visibility){m.moveTo(a,b,q);if(q){m.events.triggerEvent("move")}else{m.events.triggerEvent("moveend",{zoomChanged:b})}}}}if(b){for(var h=0,o=this.popups.length;h<o;h++){this.popups[h].updatePosition()}}this.events.triggerEvent("move");if(b){this.events.triggerEvent("zoomend")}}if(!q&&!l){this.events.triggerEvent("moveend")}this.dragging=!!q},centerLayerContainer:function(b){var a=this.getViewPortPxFromLonLat(this.layerContainerOrigin);var d=this.getViewPortPxFromLonLat(b);if((a!=null)&&(d!=null)){this.layerContainerDiv.style.left=Math.round(a.x-d.x)+"px";this.layerContainerDiv.style.top=Math.round(a.y-d.y)+"px"}},isValidZoomLevel:function(a){return((a!=null)&&(a>=0)&&(a<this.getNumZoomLevels()))},isValidLonLat:function(d){var b=false;if(d!=null){var a=this.getMaxExtent();b=a.containsLonLat(d)}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 d=null;if(this.baseLayer!=null){var b=this.getResolution();var a=this.baseLayer.units;d=OpenLayers.Util.getScaleFromResolution(b,a)}return d},getZoomForExtent:function(d,b){var a=null;if(this.baseLayer!=null){a=this.baseLayer.getZoomForExtent(d,b)}return a},getResolutionForZoom:function(b){var a=null;if(this.baseLayer){a=this.baseLayer.getResolutionForZoom(b)}return a},getZoomForResolution:function(a,d){var b=null;if(this.baseLayer!=null){b=this.baseLayer.getZoomForResolution(a,d)}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(f,d){var b=f.getCenterLonLat();if(this.baseLayer.wrapDateLine){var a=this.getMaxExtent();f=f.clone();while(f.right<f.left){f.right+=a.getWidth()}b=f.getCenterLonLat().wrapDateLine(a)}this.setCenter(b,this.getZoomForExtent(f,d))},zoomToMaxExtent:function(d){var b=(d)?d.restricted:true;var a=this.getMaxExtent({restricted:b});this.zoomToExtent(a)},zoomToScale:function(l,j){var f=OpenLayers.Util.getResolutionFromScale(l,this.baseLayer.units);var d=this.getSize();var h=d.w*f;var b=d.h*f;var a=this.getCenter();var g=new OpenLayers.Bounds(a.lon-h/2,a.lat-b/2,a.lon+h/2,a.lat+b/2);this.zoomToExtent(g,j)},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(f){var d=null;if(f!=null){var b=parseInt(this.layerContainerDiv.style.left);var a=parseInt(this.layerContainerDiv.style.top);d=f.add(b,a)}return d},getLayerPxFromViewPortPx:function(d){var f=null;if(d!=null){var b=-parseInt(this.layerContainerDiv.style.left);var a=-parseInt(this.layerContainerDiv.style.top);f=d.add(b,a);if(isNaN(f.x)||isNaN(f.y)){f=null}}return f},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(d,b){this.lonlat=d;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 d=function(f){return new OpenLayers.Pixel(-(f.w/2),-f.h)};return new OpenLayers.Icon(a,b,null,d)};OpenLayers.Popup.FramedCloud=OpenLayers.Class(OpenLayers.Popup.Framed,{contentDisplayClass:"olFramedCloudPopupContent",autoSize:true,panMapIfOutOfView:true,imageSize:new OpenLayers.Size(676,736),isAlphaImage:false,fixedRelativePosition:false,positionBlocks:{tl:{offset:new OpenLayers.Pixel(44,0),padding:new OpenLayers.Bounds(8,40,8,9),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,51,22,0),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,"auto"),anchor:new OpenLayers.Bounds(null,50,0,0),position:new OpenLayers.Pixel(-638,0)},{size:new OpenLayers.Size("auto",19),anchor:new OpenLayers.Bounds(0,32,22,null),position:new OpenLayers.Pixel(0,-631)},{size:new OpenLayers.Size(22,18),anchor:new OpenLayers.Bounds(null,32,0,null),position:new OpenLayers.Pixel(-638,-632)},{size:new OpenLayers.Size(81,35),anchor:new OpenLayers.Bounds(null,0,0,null),position:new OpenLayers.Pixel(0,-688)}]},tr:{offset:new OpenLayers.Pixel(-45,0),padding:new OpenLayers.Bounds(8,40,8,9),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,51,22,0),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,"auto"),anchor:new OpenLayers.Bounds(null,50,0,0),position:new OpenLayers.Pixel(-638,0)},{size:new OpenLayers.Size("auto",19),anchor:new OpenLayers.Bounds(0,32,22,null),position:new OpenLayers.Pixel(0,-631)},{size:new OpenLayers.Size(22,19),anchor:new OpenLayers.Bounds(null,32,0,null),position:new OpenLayers.Pixel(-638,-631)},{size:new OpenLayers.Size(81,35),anchor:new OpenLayers.Bounds(0,0,null,null),position:new OpenLayers.Pixel(-215,-687)}]},bl:{offset:new OpenLayers.Pixel(45,0),padding:new OpenLayers.Bounds(8,9,8,40),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,21,22,32),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,"auto"),anchor:new OpenLayers.Bounds(null,21,0,32),position:new OpenLayers.Pixel(-638,0)},{size:new OpenLayers.Size("auto",21),anchor:new OpenLayers.Bounds(0,0,22,null),position:new OpenLayers.Pixel(0,-629)},{size:new OpenLayers.Size(22,21),anchor:new OpenLayers.Bounds(null,0,0,null),position:new OpenLayers.Pixel(-638,-629)},{size:new OpenLayers.Size(81,33),anchor:new OpenLayers.Bounds(null,null,0,0),position:new OpenLayers.Pixel(-101,-674)}]},br:{offset:new OpenLayers.Pixel(-44,0),padding:new OpenLayers.Bounds(8,9,8,40),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,21,22,32),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,"auto"),anchor:new OpenLayers.Bounds(null,21,0,32),position:new OpenLayers.Pixel(-638,0)},{size:new OpenLayers.Size("auto",21),anchor:new OpenLayers.Bounds(0,0,22,null),position:new OpenLayers.Pixel(0,-629)},{size:new OpenLayers.Size(22,21),anchor:new OpenLayers.Bounds(null,0,0,null),position:new OpenLayers.Pixel(-638,-629)},{size:new OpenLayers.Size(81,33),anchor:new OpenLayers.Bounds(0,null,null,0),position:new OpenLayers.Pixel(-311,-674)}]}},minSize:new OpenLayers.Size(105,10),maxSize:new OpenLayers.Size(600,660),initialize:function(j,d,h,b,a,g,f){this.imageSrc=OpenLayers.Util.getImagesLocation()+"cloud-popup-relative.png";OpenLayers.Popup.Framed.prototype.initialize.apply(this,arguments);this.contentDiv.className=this.contentDisplayClass},destroy:function(){OpenLayers.Popup.Framed.prototype.destroy.apply(this,arguments)},CLASS_NAME:"OpenLayers.Popup.FramedCloud"});OpenLayers.Request={DEFAULT_CONFIG:{method:"GET",url:window.location.href,async:true,user:undefined,password:undefined,params:null,proxy:OpenLayers.ProxyHost,headers:{},data:null,callback:function(){},success:null,failure:null,scope:null},events:new OpenLayers.Events(this,null,["complete","success","failure"]),issue:function(f){var j=OpenLayers.Util.extend(this.DEFAULT_CONFIG,{proxy:OpenLayers.ProxyHost});f=OpenLayers.Util.applyDefaults(f,j);var h=new OpenLayers.Request.XMLHttpRequest();var a=f.url;if(f.params){var g=OpenLayers.Util.getParameterString(f.params);if(g.length>0){var m=(a.indexOf("?")>-1)?"&":"?";a+=m+g}}if(f.proxy&&(a.indexOf("http")==0)){a=f.proxy+encodeURIComponent(a)}h.open(f.method,a,f.async,f.user,f.password);for(var l in f.headers){h.setRequestHeader(l,f.headers[l])}var b=(f.scope)?OpenLayers.Function.bind(f.callback,f.scope):f.callback;var o;if(f.success){o=(f.scope)?OpenLayers.Function.bind(f.success,f.scope):f.success}var d;if(f.failure){d=(f.scope)?OpenLayers.Function.bind(f.failure,f.scope):f.failure}var p=this.events;h.onreadystatechange=function(){if(h.readyState==OpenLayers.Request.XMLHttpRequest.DONE){var q=p.triggerEvent("complete",{request:h,config:f,requestUrl:a});if(q!==false){b(h);if(!h.status||(h.status>=200&&h.status<300)){p.triggerEvent("success",{request:h,config:f,requestUrl:a});if(o){o(h)}}if(h.status&&(h.status<200||h.status>=300)){p.triggerEvent("failure",{request:h,config:f,requestUrl:a});if(d){d(h)}}}}};if(f.async===false){h.send(f.data)}else{window.setTimeout(function(){h.send(f.data)},0)}return h},GET:function(a){a=OpenLayers.Util.extend(a,{method:"GET"});return OpenLayers.Request.issue(a)},POST:function(a){a=OpenLayers.Util.extend(a,{method:"POST"});a.headers=a.headers?a.headers:{};if(!("CONTENT-TYPE" in OpenLayers.Util.upperCaseObject(a.headers))){a.headers["Content-Type"]="application/xml"}return OpenLayers.Request.issue(a)},PUT:function(a){a=OpenLayers.Util.extend(a,{method:"PUT"});a.headers=a.headers?a.headers:{};if(!("CONTENT-TYPE" in OpenLayers.Util.upperCaseObject(a.headers))){a.headers["Content-Type"]="application/xml"}return OpenLayers.Request.issue(a)},DELETE:function(a){a=OpenLayers.Util.extend(a,{method:"DELETE"});return OpenLayers.Request.issue(a)},HEAD:function(a){a=OpenLayers.Util.extend(a,{method:"HEAD"});return OpenLayers.Request.issue(a)},OPTIONS:function(a){a=OpenLayers.Util.extend(a,{method:"OPTIONS"});return OpenLayers.Request.issue(a)}};OpenLayers.Tile.Image=OpenLayers.Class(OpenLayers.Tile,{url:null,imgDiv:null,frame:null,layerAlphaHack:null,isBackBuffer:false,lastRatio:1,isFirstDraw:true,backBufferTile:null,initialize:function(f,a,g,b,d){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=OpenLayers.Util.getImagesLocation()+"blank.gif"}this.imgDiv=null;if((this.frame!=null)&&(this.frame.parentNode==this.layer.div)){this.layer.div.removeChild(this.frame)}this.frame=null;if(this.backBufferTile){this.backBufferTile.destroy();this.backBufferTile=null}this.layer.events.unregister("loadend",this,this.resetBackBuffer);OpenLayers.Tile.prototype.destroy.apply(this,arguments)},clone:function(a){if(a==null){a=new OpenLayers.Tile.Image(this.layer,this.position,this.bounds,this.url,this.size)}a=OpenLayers.Tile.prototype.clone.apply(this,[a]);a.imgDiv=null;return a},draw:function(){if(this.layer!=this.layer.map.baseLayer&&this.layer.reproject){this.bounds=this.getBoundsFromBaseLayer(this.position)}var a=OpenLayers.Tile.prototype.draw.apply(this,arguments);if(OpenLayers.Util.indexOf(this.layer.SUPPORTED_TRANSITIONS,this.layer.transitionEffect)!=-1){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=OpenLayers.Util.getImagesLocation()+"blank.gif"}}},initImgDiv:function(){var f=this.layer.imageOffset;var b=this.layer.getImageSize();if(this.layerAlphaHack){this.imgDiv=OpenLayers.Util.createAlphaImageDiv(null,f,b,null,"relative",null,null,null,true)}else{this.imgDiv=OpenLayers.Util.createImage(null,f,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 d=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(d,this))}else{OpenLayers.Event.observe(this.imgDiv,"load",OpenLayers.Function.bind(d,this))}var a=function(){if(this.imgDiv._attempts>OpenLayers.IMAGE_RELOAD_ATTEMPTS){d.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 f=1;if(this.backBufferTile.resolution){f=this.backBufferTile.resolution/this.layer.getResolution()}if(f!=this.lastRatio){if(this.layer.transitionEffect=="resize"){var d=new OpenLayers.LonLat(this.backBufferTile.bounds.left,this.backBufferTile.bounds.top);var b=new OpenLayers.Size(this.backBufferTile.size.w*f,this.backBufferTile.size.h*f);var a=this.layer.map.getLayerPxFromLonLat(d);OpenLayers.Util.modifyDOMElement(this.backBufferTile.frame,null,a,b);var g=this.backBufferTile.imageSize;g=new OpenLayers.Size(g.w*f,g.h*f);var h=this.backBufferTile.imageOffset;if(h){h=new OpenLayers.Pixel(h.x*f,h.y*f)}OpenLayers.Util.modifyDOMElement(this.backBufferTile.imgDiv,null,h,g);this.backBufferTile.show()}}else{if(this.layer.singleTile){this.backBufferTile.show()}else{this.backBufferTile.hide()}}this.lastRatio=f},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 f=this.map.baseLayer.clone();this.layers=[f]}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 g=OpenLayers.Util.getImagesLocation();var b=g+"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=g+"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 h=["dblclick","mousedown"];for(var d=0,a=h.length;d<a;d++){OpenLayers.Event.observe(this.maximizeDiv,h[d],OpenLayers.Event.stop);OpenLayers.Event.observe(this.minimizeDiv,h[d],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(m){var f=this.handlers.drag.last.x-m.x;var b=this.handlers.drag.last.y-m.y;if(f!=0||b!=0){var j=this.rectPxBounds.top;var a=this.rectPxBounds.left;var g=Math.abs(this.rectPxBounds.getHeight());var d=this.rectPxBounds.getWidth();var h=Math.max(0,(j-b));h=Math.min(h,this.ovmap.size.h-this.hComp-g);var l=Math.max(0,(a-f));l=Math.min(l,this.ovmap.size.w-this.wComp-d);this.setRectPxBounds(new OpenLayers.Bounds(l,h+g,l+d,h))}},mapDivClick:function(m){var b=this.rectPxBounds.getCenterPixel();var g=m.xy.x-b.x;var f=m.xy.y-b.y;var j=this.rectPxBounds.top;var d=this.rectPxBounds.left;var o=Math.abs(this.rectPxBounds.getHeight());var a=this.rectPxBounds.getWidth();var h=Math.max(0,(j+f));h=Math.min(h,this.ovmap.size.h-o);var l=Math.max(0,(d+g));l=Math.min(l,this.ovmap.size.w-a);this.setRectPxBounds(new OpenLayers.Bounds(l,h+o,l+a,h));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 d=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()){d=d.transform(this.map.getProjectionObject(),this.ovmap.getProjectionObject())}var f=this.ovmap.getResolution()/this.map.getResolution();return((f>this.minRatio)&&(f<=this.maxRatio)&&(this.ovmap.getExtent().containsBounds(d)))},updateOverview:function(){var d=this.map.getResolution();var b=this.ovmap.getResolution();var f=b/d;if(f>this.maxRatio){b=this.minRatio*d}else{if(f<=this.minRatio){b=this.maxRatio*d}}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(f){if(!this.handlers.drag.active&&!this.map.dragging){this.handlers.drag.activate()}});this.rectEvents.register("mouseout",this,function(f){if(!this.handlers.drag.dragging){this.handlers.drag.deactivate()}});if(this.ovmap.getProjection()!=this.map.getProjection()){var d=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=d&&a?OpenLayers.INCHES_PER_UNIT[d]/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(f){var j=Math.max(f.top,0);var g=Math.max(f.left,0);var b=Math.min(f.top+Math.abs(f.getHeight()),this.ovmap.size.h-this.hComp);var l=Math.min(f.left+f.getWidth(),this.ovmap.size.w-this.wComp);var d=Math.max(l-g,0);var m=Math.max(b-j,0);if(d<this.minRectSize||m<this.minRectSize){this.extentRectangle.className=this.displayClass+this.minRectDisplayClass;var h=g+(d/2)-(this.minRectSize/2);var a=j+(m/2)-(this.minRectSize/2);this.extentRectangle.style.top=Math.round(a)+"px";this.extentRectangle.style.left=Math.round(h)+"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(j)+"px";this.extentRectangle.style.left=Math.round(g)+"px";this.extentRectangle.style.height=Math.round(m)+"px";this.extentRectangle.style.width=Math.round(d)+"px"}this.rectPxBounds=new OpenLayers.Bounds(Math.round(g),Math.round(b),Math.round(l),Math.round(j))},getRectBoundsFromMapBounds:function(f){var a=new OpenLayers.LonLat(f.left,f.bottom);var h=new OpenLayers.LonLat(f.right,f.top);var d=this.getOverviewPxFromLonLat(a);var b=this.getOverviewPxFromLonLat(h);var g=null;if(d&&b){g=new OpenLayers.Bounds(d.x,d.y,b.x,b.y)}return g},getMapBoundsFromRectBounds:function(f){var d=new OpenLayers.Pixel(f.left,f.bottom);var b=new OpenLayers.Pixel(f.right,f.top);var a=this.getLonLatFromOverviewPx(d);var g=this.getLonLatFromOverviewPx(b);return new OpenLayers.Bounds(a.lon,a.lat,g.lon,g.lat)},getLonLatFromOverviewPx:function(h){var d=this.ovmap.size;var b=this.ovmap.getResolution();var a=this.ovmap.getExtent().getCenterLonLat();var g=h.x-(d.w/2);var f=h.y-(d.h/2);return new OpenLayers.LonLat(a.lon+g*b,a.lat-f*b)},getOverviewPxFromLonLat:function(f){var b=this.ovmap.getResolution();var d=this.ovmap.getExtent();var a=null;if(d){a=new OpenLayers.Pixel(Math.round(1/b*(f.lon-d.left)),Math.round(1/b*(d.top-f.lat)))}return a},CLASS_NAME:"OpenLayers.Control.OverviewMap"});OpenLayers.Feature=OpenLayers.Class({layer:null,id:null,lonlat:null,data:null,marker:null,popupClass:OpenLayers.Popup.AnchoredBubble,popup:null,initialize:function(a,d,b){this.layer=a;this.lonlat=d;this.data=(b!=null)?b:{};this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")},destroy:function(){if((this.layer!=null)&&(this.layer.map!=null)){if(this.popup!=null){this.layer.map.removePopup(this.popup)}}this.layer=null;this.id=null;this.lonlat=null;this.data=null;if(this.marker!=null){this.destroyMarker(this.marker);this.marker=null}if(this.popup!=null){this.destroyPopup(this.popup);this.popup=null}},onScreen:function(){var b=false;if((this.layer!=null)&&(this.layer.map!=null)){var a=this.layer.map.getExtent();b=a.containsLonLat(this.lonlat)}return b},createMarker:function(){if(this.lonlat!=null){this.marker=new OpenLayers.Marker(this.lonlat,this.data.icon)}return this.marker},destroyMarker:function(){this.marker.destroy()},createPopup:function(b){if(this.lonlat!=null){var d=this.id+"_popup";var a=(this.marker)?this.marker.icon:null;if(!this.popup){this.popup=new this.popupClass(d,this.lonlat,this.data.popupSize,this.data.popupContentHTML,a,b)}if(this.data.overflow!=null){this.popup.contentDiv.style.overflow=this.data.overflow}this.popup.feature=this}return this.popup},destroyPopup:function(){if(this.popup){this.popup.feature=null;this.popup.destroy();this.popup=null}},CLASS_NAME:"OpenLayers.Feature"});OpenLayers.Format.WFSCapabilities=OpenLayers.Class(OpenLayers.Format.XML,{defaultVersion:"1.1.0",version:null,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a]);this.options=a},read:function(g){if(typeof g=="string"){g=OpenLayers.Format.XML.prototype.read.apply(this,[g])}var d=g.documentElement;var b=this.version;if(!b){b=d.getAttribute("version");if(!b){b=this.defaultVersion}}var f=OpenLayers.Format.WFSCapabilities["v"+b.replace(/\./g,"_")];if(!f){throw"Can't find a WFS capabilities parser for version "+b}var h=new f(this.options);var a=h.read(g);a.version=b;return a},CLASS_NAME:"OpenLayers.Format.WFSCapabilities"});OpenLayers.Format.WFSDescribeFeatureType=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{xsd:"http://www.w3.org/2001/XMLSchema"},initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},readers:{xsd:{schema:function(f,m){var g=[];var b={};var h={complexTypes:g,customTypes:b};this.readChildNodes(f,h);var j=f.attributes;var p,a;for(var l=0,o=j.length;l<o;++l){p=j[l];a=p.name;if(a.indexOf("xmlns")==0){this.setNamespace(a.split(":")[1]||"",p.value)}else{m[a]=p.value}}m.featureTypes=g;m.targetPrefix=this.namespaceAlias[m.targetNamespace];var q,d;for(var l=0,o=g.length;l<o;++l){q=g[l];d=b[q.typeName];if(b[q.typeName]){q.typeName=d.name}}},complexType:function(b,d){var a={typeName:b.getAttribute("name")};this.readChildNodes(b,a);d.complexTypes.push(a)},complexContent:function(a,b){this.readChildNodes(a,b)},extension:function(a,b){this.readChildNodes(a,b)},sequence:function(a,b){var d={elements:[]};this.readChildNodes(a,d);b.properties=d.elements},element:function(a,d){if(d.elements){var f={};var b=a.attributes;var j;for(var g=0,h=b.length;g<h;++g){j=b[g];f[j.name]=j.value}var l=f.type;if(!l){l={};this.readChildNodes(a,l);f.restriction=l;f.type=l.base}var o=l.base||l;f.localType=o.split(":").pop();d.elements.push(f)}if(d.complexTypes){var l=a.getAttribute("type");var m=l.split(":").pop();d.customTypes[m]={name:a.getAttribute("name"),type:l}}},simpleType:function(a,b){this.readChildNodes(a,b)},restriction:function(a,b){b.base=a.getAttribute("base");this.readRestriction(a,b)}}},readRestriction:function(f,h){var d=f.childNodes;var l,j,g;for(var b=0,a=d.length;b<a;++b){l=d[b];if(l.nodeType==1){j=l.nodeName.split(":").pop();g=l.getAttribute("value");if(!h[j]){h[j]=g}else{if(typeof h[j]=="string"){h[j]=[h[j]]}h[j].push(g)}}}},read:function(b){if(typeof b=="string"){b=OpenLayers.Format.XML.prototype.read.apply(this,[b])}if(b&&b.nodeType==9){b=b.documentElement}var a={};this.readNode(b,a);return a},CLASS_NAME:"OpenLayers.Format.WFSDescribeFeatureType"});OpenLayers.Format.WFST.v1=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance",wfs:"http://www.opengis.net/wfs",gml:"http://www.opengis.net/gml",ogc:"http://www.opengis.net/ogc"},defaultPrefix:"wfs",version:null,schemaLocations:null,srsName:null,extractAttributes:true,xy:true,stateName:null,initialize:function(a){this.stateName={};this.stateName[OpenLayers.State.INSERT]="wfs:Insert";this.stateName[OpenLayers.State.UPDATE]="wfs:Update";this.stateName[OpenLayers.State.DELETE]="wfs:Delete";OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},getSrsName:function(d,b){var a=b&&b.srsName;if(!a){if(d&&d.layer){a=d.layer.projection.getCode()}else{a=this.srsName}}return a},read:function(a){if(typeof a=="string"){a=OpenLayers.Format.XML.prototype.read.apply(this,[a])}if(a&&a.nodeType==9){a=a.documentElement}var b={};this.readNode(a,b);if(b.features){b=b.features}return b},readers:{wfs:{FeatureCollection:function(a,b){b.features=[];this.readChildNodes(a,b)}}},write:function(a){var b=this.writeNode("wfs:Transaction",a);var d=this.schemaLocationAttr();if(d){this.setAttributeNS(b,this.namespaces.xsi,"xsi:schemaLocation",d)}return OpenLayers.Format.XML.prototype.write.apply(this,[b])},writers:{wfs:{GetFeature:function(a){var b=this.createElementNSPlus("wfs:GetFeature",{attributes:{service:"WFS",version:this.version,maxFeatures:a&&a.maxFeatures,"xsi:schemaLocation":this.schemaLocationAttr(a)}});this.writeNode("Query",a,b);return b},Query:function(a){a=OpenLayers.Util.extend({featureNS:this.featureNS,featurePrefix:this.featurePrefix,featureType:this.featureType,srsName:this.srsName},a);var b=this.createElementNSPlus("wfs:Query",{attributes:{typeName:(a.featureNS?a.featurePrefix+":":"")+a.featureType,srsName:a.srsName}});if(a.featureNS){b.setAttribute("xmlns:"+a.featurePrefix,a.featureNS)}if(a.filter){this.setFilterProperty(a.filter);this.writeNode("ogc:Filter",a.filter,b)}return b},Transaction:function(g){var h=this.createElementNSPlus("wfs:Transaction",{attributes:{service:"WFS",version:this.version}});if(g){var b,f;for(var d=0,a=g.length;d<a;++d){f=g[d];b=this.stateName[f.state];if(b){this.writeNode(b,f,h)}}}return h},Insert:function(a){var b=this.createElementNSPlus("wfs:Insert");this.srsName=this.getSrsName(a);this.writeNode("feature:_typeName",a,b);return b},Update:function(b){var d=this.createElementNSPlus("wfs:Update",{attributes:{typeName:(this.featureNS?this.featurePrefix+":":"")+this.featureType}});if(this.featureNS){d.setAttribute("xmlns:"+this.featurePrefix,this.featureNS)}this.writeNode("Property",{name:this.geometryName,value:b},d);for(var a in b.attributes){this.writeNode("Property",{name:a,value:b.attributes[a]},d)}this.writeNode("ogc:Filter",new OpenLayers.Filter.FeatureId({fids:[b.fid]}),d);return d},Property:function(b){var a=this.createElementNSPlus("wfs:Property");this.writeNode("Name",b.name,a);this.writeNode("Value",b.value,a);return a},Name:function(a){return this.createElementNSPlus("wfs:Name",{value:a})},Value:function(d){var b;if(d instanceof OpenLayers.Feature.Vector){b=this.createElementNSPlus("wfs:Value");this.srsName=this.getSrsName(d);var a=this.writeNode("feature:_geometry",d.geometry).firstChild;b.appendChild(a)}else{b=this.createElementNSPlus("wfs:Value",{value:d})}return b},Delete:function(a){var b=this.createElementNSPlus("wfs:Delete",{attributes:{typeName:(this.featureNS?this.featurePrefix+":":"")+this.featureType}});if(this.featureNS){b.setAttribute("xmlns:"+this.featurePrefix,this.featureNS)}this.writeNode("ogc:Filter",new OpenLayers.Filter.FeatureId({fids:[a.fid]}),b);return b}}},schemaLocationAttr:function(a){a=OpenLayers.Util.extend({featurePrefix:this.featurePrefix,schema:this.schema},a);var h=OpenLayers.Util.extend({},this.schemaLocations);if(a.schema){h[a.featurePrefix]=a.schema}var g=[];var d;for(var b in h){d=this.namespaces[b];if(d){g.push(d+" "+h[b])}}var f=g.join(" ")||undefined;return f},setFilterProperty:function(d){if(d.filters){for(var b=0,a=d.filters.length;b<a;++b){this.setFilterProperty(d.filters[b])}}else{if(d instanceof OpenLayers.Filter.Spatial){d.property=this.geometryName}}},CLASS_NAME:"OpenLayers.Format.WFST.v1"});OpenLayers.Format.WMC=OpenLayers.Class({defaultVersion:"1.1.0",version:null,layerOptions:null,layerParams:null,parser:null,initialize:function(a){OpenLayers.Util.extend(this,a);this.options=a},read:function(g,d){if(typeof g=="string"){g=OpenLayers.Format.XML.prototype.read.apply(this,[g])}var b=g.documentElement;var a=this.version;if(!a){a=b.getAttribute("version");if(!a){a=this.defaultVersion}}if(!this.parser||this.parser.VERSION!=a){var j=OpenLayers.Format.WMC["v"+a.replace(/\./g,"_")];if(!j){throw"Can't find a WMC parser for version "+a}this.parser=new j(this.options)}var f=this.parser.read(g,d);var h;if(d.map){this.context=f;if(d.map instanceof OpenLayers.Map){h=this.mergeContextToMap(f,d.map)}else{h=this.contextToMap(f,d.map)}}else{h=f}return h},contextToMap:function(a,d){var b=new OpenLayers.Map(d,{maxExtent:a.maxExtent,projection:a.projection});b.addLayers(a.layers);b.setCenter(a.bounds.getCenterLonLat(),b.getZoomForExtent(a.bounds,true));return b},mergeContextToMap:function(a,b){b.addLayers(a.layers);return b},write:function(g,b){if(g.CLASS_NAME=="OpenLayers.Map"){g=this.mapToContext(g)}var a=(b&&b.version)||this.version||this.defaultVersion;if(!this.parser||this.parser.VERSION!=a){var f=OpenLayers.Format.WMC["v"+a.replace(/\./g,"_")];if(!f){throw"Can't find a WMS capabilities parser for version "+a}this.parser=new f(this.options)}var d=this.parser.write(g,b);return d},mapToContext:function(b){var a={bounds:b.getExtent(),maxExtent:b.maxExtent,projection:b.projection,layers:b.layers,size:b.getSize()};return a},CLASS_NAME:"OpenLayers.Format.WMC"});OpenLayers.Format.WMSCapabilities.v1_1=OpenLayers.Class(OpenLayers.Format.XML,{initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a]);this.options=a},read:function(d){if(typeof d=="string"){d=OpenLayers.Format.XML.prototype.read.apply(this,[d])}var a={};var b=d.documentElement;this.runChildNodes(a,b);return a},runChildNodes:function(h,g){var d=g.childNodes;var b,f;for(var a=0;a<d.length;++a){b=d[a];if(b.nodeType==1){f=this["read_cap_"+b.nodeName];if(f){f.apply(this,[h,b])}}}},read_cap_Capability:function(a,d){var b={layers:[]};this.runChildNodes(b,d);a.capability=b},read_cap_Request:function(d,b){var a={};this.runChildNodes(a,b);d.request=a},read_cap_GetMap:function(d,b){var a={formats:[]};this.runChildNodes(a,b);d.getmap=a},read_cap_Format:function(b,a){if(b.formats){b.formats.push(this.getChildValue(a))}},read_cap_DCPType:function(d,b){var a=b.getElementsByTagName("OnlineResource");if(a.length>0){this.read_cap_OnlineResource(d,a[0])}},read_cap_Service:function(b,d){var a={};this.runChildNodes(a,d);b.service=a},read_cap_Layer:function(b,g,h){var l={formats:b.request.getmap.formats||[],styles:[],queryable:(g.getAttribute("queryable")==="1"||g.getAttribute("queryable")==="true")};if(h){l.styles=l.styles.concat(h.styles);l.llbbox=h.llbbox;l.minScale=h.minScale;l.maxScale=h.maxScale}var d=g.childNodes;var a,o,f;for(var j=0;j<d.length;++j){a=d[j];o=a.nodeName;f=this["read_cap_"+a.nodeName];if(f){if(o=="Layer"){f.apply(this,[b,a,l])}else{f.apply(this,[l,a])}}}if(l.name){var m=l.name.indexOf(":");if(m>0){l.prefix=l.name.substring(0,m)}b.layers.push(l)}},read_cap_ScaleHint:function(g,h){var f=h.getAttribute("min");var a=h.getAttribute("max");var d=Math.pow(2,0.5);var b=OpenLayers.INCHES_PER_UNIT.m;g.maxScale=parseFloat(((d*f)*b*OpenLayers.DOTS_PER_INCH).toPrecision(13));g.minScale=parseFloat(((d*a)*b*OpenLayers.DOTS_PER_INCH).toPrecision(13))},read_cap_Name:function(d,b){var a=this.getChildValue(b);if(a){d.name=a}},read_cap_Title:function(b,a){var d=this.getChildValue(a);if(d){b.title=d}},read_cap_Abstract:function(d,b){var a=this.getChildValue(b);if(a){d["abstract"]=a}},read_cap_LatLonBoundingBox:function(a,b){a.llbbox=[parseFloat(b.getAttribute("minx")),parseFloat(b.getAttribute("miny")),parseFloat(b.getAttribute("maxx")),parseFloat(b.getAttribute("maxy"))]},read_cap_Style:function(a,d){var b={};this.runChildNodes(b,d);a.styles.push(b)},read_cap_LegendURL:function(d,f){var b={width:f.getAttribute("width"),height:f.getAttribute("height")};var a=f.getElementsByTagName("OnlineResource");if(a.length>0){this.read_cap_OnlineResource(b,a[0])}d.legend=b},read_cap_OnlineResource:function(b,a){b.href=this.getAttributeNS(a,"http://www.w3.org/1999/xlink","href")},CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1_1"});OpenLayers.Format.WMSDescribeLayer=OpenLayers.Class(OpenLayers.Format.XML,{defaultVersion:"1.1.1",version:null,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a]);this.options=a},read:function(g){if(typeof g=="string"){g=OpenLayers.Format.XML.prototype.read.apply(this,[g])}var d=g.documentElement;var b=this.version;if(!b){b=d.getAttribute("version");if(!b){b=this.defaultVersion}}if(b=="1.1.1"||b=="1.1.0"){b="1.1"}var f=OpenLayers.Format.WMSDescribeLayer["v"+b.replace(/\./g,"_")];if(!f){throw"Can't find a WMS DescribeLayer parser for version "+b}var h=new f(this.options);var a=h.read(g);a.version=b;return a},CLASS_NAME:"OpenLayers.Format.WMSDescribeLayer"});OpenLayers.Format.WMSGetFeatureInfo=OpenLayers.Class(OpenLayers.Format.XML,{layerIdentifier:"_layer",featureIdentifier:"_feature",regExes:{trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)},gmlFormat:null,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,arguments);OpenLayers.Util.extend(this,a);this.options=a},read:function(g){var a;if(typeof g=="string"){g=OpenLayers.Format.XML.prototype.read.apply(this,[g])}var b=g.documentElement;if(b){var d=this;var f=this["read_"+b.nodeName];if(f){a=f.call(this,b)}else{a=new OpenLayers.Format.GML((this.options?this.options:{})).read(g)}}else{a=g}return a},read_msGMLOutput:function(l){var f=[];var b=this.getSiblingNodesByTagCriteria(l,this.layerIdentifier);if(b){for(var m=0,q=b.length;m<q;++m){var d=b[m];var o=d.nodeName;if(d.prefix){o=o.split(":")[1]}var o=o.replace(this.layerIdentifier,"");var p=this.getSiblingNodesByTagCriteria(d,this.featureIdentifier);if(p){for(var h=0;h<p.length;h++){var a=p[h];var r=this.parseGeometry(a);var g=this.parseAttributes(a);var u=new OpenLayers.Feature.Vector(r,g,null);u.type=o;f.push(u)}}}}return f},read_FeatureInfoResponse:function(h){var d=[];var m=this.getElementsByTagNameNS(h,"*","FIELDS");for(var l=0,o=m.length;l<o;l++){var a=m[l];var p=null;var g={};for(var f=0,q=a.attributes.length;f<q;f++){var b=a.attributes[f];g[b.nodeName]=b.nodeValue}d.push(new OpenLayers.Feature.Vector(p,g,null))}return d},getSiblingNodesByTagCriteria:function(h,m){var a=[];var d,g,f,j,b;if(h&&h.hasChildNodes()){d=h.childNodes;f=d.length;for(var l=0;l<f;l++){b=d[l];while(b&&b.nodeType!=1){b=b.nextSibling;l++}g=(b?b.nodeName:"");if(g.length>0&&g.indexOf(m)>-1){a.push(b)}else{j=this.getSiblingNodesByTagCriteria(b,m);if(j.length>0){(a.length==0)?a=j:a.push(j)}}}}return a},parseAttributes:function(f){var g={};if(f.nodeType==1){var d=f.childNodes;n=d.length;for(var h=0;h<n;++h){var b=d[h];if(b.nodeType==1){var m=b.childNodes;if(m.length==1){var l=m[0];if(l.nodeType==3||l.nodeType==4){var a=(b.prefix)?b.nodeName.split(":")[1]:b.nodeName;var j=l.nodeValue.replace(this.regExes.trimSpace,"");g[a]=j}}}}}return g},parseGeometry:function(b){if(!this.gmlFormat){this.gmlFormat=new OpenLayers.Format.GML()}var a=this.gmlFormat.parseFeature(b);var d=null;if(a&&a.geometry){d=a.geometry.clone();a.destroy()}return d},CLASS_NAME:"OpenLayers.Format.WMSGetFeatureInfo"});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(d,b,a){OpenLayers.Handler.prototype.initialize.apply(this,arguments);if(this.pixelTolerance!=null){this.mousedown=function(f){this.down=f.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 d=OpenLayers.Function.bind(this.delayedRightCall,this,a);this.rightclickTimerId=window.setTimeout(d,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 d=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){d=false}}return d},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(d,b,a){OpenLayers.Handler.prototype.initialize.apply(this,arguments)},down:function(a){},move:function(a){},up:function(a){},out:function(a){},mousedown:function(b){var a=true;this.dragging=false;if(this.checkModifiers(b)&&OpenLayers.Event.isLeftClick(b)){this.started=true;this.start=b.xy;this.last=b.xy;OpenLayers.Element.addClass(this.map.viewPortDiv,"olDragDown");this.down(b);this.callback("down",[b.xy]);OpenLayers.Event.stop(b);if(!this.oldOnselectstart){this.oldOnselectstart=(document.onselectstart)?document.onselectstart:function(){return true};document.onselectstart=function(){return false}}a=!this.stopDown}else{this.started=false;this.start=null;this.last=null}return a},mousemove:function(a){if(this.started&&!this.timeoutId&&(a.xy.x!=this.last.x||a.xy.y!=this.last.y)){if(this.interval>0){this.timeoutId=setTimeout(OpenLayers.Function.bind(this.removeTimeout,this),this.interval)}this.dragging=true;this.move(a);this.callback("move",[a.xy]);if(!this.oldOnselectstart){this.oldOnselectstart=document.onselectstart;document.onselectstart=function(){return false}}this.last=this.evt.xy}return true},removeTimeout:function(){this.timeoutId=null},mouseup:function(b){if(this.started){var a=(this.start!=this.last);this.started=false;this.dragging=false;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown");this.up(b);this.callback("up",[b.xy]);if(a){this.callback("done",[b.xy])}document.onselectstart=this.oldOnselectstart}return true},mouseout:function(b){if(this.started&&OpenLayers.Util.mouseLeft(b,this.map.div)){var a=(this.start!=this.last);this.started=false;this.dragging=false;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown");this.out(b);this.callback("out",[]);if(a){this.callback("done",[b.xy])}if(document.onselectstart){document.onselectstart=this.oldOnselectstart}}return true},click:function(a){return(this.start==this.last)},activate:function(){var a=false;if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.dragging=false;a=true}return a},deactivate:function(){var a=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.started=false;this.dragging=false;this.start=null;this.last=null;a=true;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown")}return a},CLASS_NAME:"OpenLayers.Handler.Drag"});OpenLayers.Handler.Feature=OpenLayers.Class(OpenLayers.Handler,{EVENTMAP:{click:{"in":"click",out:"clickout"},mousemove:{"in":"over",out:"out"},dblclick:{"in":"dblclick",out:null},mousedown:{"in":null,out:null},mouseup:{"in":null,out:null}},feature:null,lastFeature:null,down:null,up:null,clickTolerance:4,geometryTypes:null,stopClick:true,stopDown:true,stopUp:false,initialize:function(f,b,d,a){OpenLayers.Handler.prototype.initialize.apply(this,[f,d,a]);this.layer=b},mousedown:function(a){this.down=a.xy;return this.handle(a)?!this.stopDown:true},mouseup:function(a){this.up=a.xy;return this.handle(a)?!this.stopUp:true},click:function(a){return this.handle(a)?!this.stopClick:true},mousemove:function(a){if(!this.callbacks.over&&!this.callbacks.out){return true}this.handle(a);return true},dblclick:function(a){return !this.handle(a)},geometryTypeMatches:function(a){return this.geometryTypes==null||OpenLayers.Util.indexOf(this.geometryTypes,a.geometry.CLASS_NAME)>-1},handle:function(a){if(this.feature&&!this.feature.layer){this.feature=null}var d=a.type;var h=false;var g=!!(this.feature);var f=(d=="click"||d=="dblclick");this.feature=this.layer.getFeatureFromEvent(a);if(this.feature&&!this.feature.layer){this.feature=null}if(this.lastFeature&&!this.lastFeature.layer){this.lastFeature=null}if(this.feature){var b=(this.feature!=this.lastFeature);if(this.geometryTypeMatches(this.feature)){if(g&&b){if(this.lastFeature){this.triggerCallback(d,"out",[this.lastFeature])}this.triggerCallback(d,"in",[this.feature])}else{if(!g||f){this.triggerCallback(d,"in",[this.feature])}}this.lastFeature=this.feature;h=true}else{if(this.lastFeature&&(g&&b||f)){this.triggerCallback(d,"out",[this.lastFeature])}this.feature=null}}else{if(this.lastFeature&&(g||f)){this.triggerCallback(d,"out",[this.lastFeature])}}return h},triggerCallback:function(f,g,b){var d=this.EVENTMAP[f][g];if(d){if(f=="click"&&this.up&&this.down){var a=Math.sqrt(Math.pow(this.up.x-this.down.x,2)+Math.pow(this.up.y-this.down.y,2));if(a<=this.clickTolerance){this.callback(d,b)}}else{this.callback(d,b)}}},activate:function(){var a=false;if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.moveLayerToTop();this.map.events.on({removelayer:this.handleMapEvents,changelayer:this.handleMapEvents,scope:this});a=true}return a},deactivate:function(){var a=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.moveLayerBack();this.feature=null;this.lastFeature=null;this.down=null;this.up=null;this.map.events.un({removelayer:this.handleMapEvents,changelayer:this.handleMapEvents,scope:this});a=true}return a},handleMapEvents:function(a){if(!a.property||a.property=="order"){this.moveLayerToTop()}},moveLayerToTop:function(){var a=Math.max(this.map.Z_INDEX_BASE.Feature-1,this.layer.getZIndex())+1;this.layer.setZIndex(a)},moveLayerBack:function(){var a=this.layer.getZIndex()-1;if(a>=this.map.Z_INDEX_BASE.Feature){this.layer.setZIndex(a)}else{this.map.setLayerZIndex(this.layer,this.map.getLayerIndex(this.layer))}},CLASS_NAME:"OpenLayers.Handler.Feature"});OpenLayers.Handler.Hover=OpenLayers.Class(OpenLayers.Handler,{delay:500,pixelTolerance:null,stopMove:false,px:null,timerId:null,initialize:function(d,b,a){OpenLayers.Handler.prototype.initialize.apply(this,arguments)},mousemove:function(a){if(this.passesTolerance(a.xy)){this.clearTimer();this.callback("move",[a]);this.px=a.xy;a=OpenLayers.Util.extend({},a);this.timerId=window.setTimeout(OpenLayers.Function.bind(this.delayedCall,this,a),this.delay)}return !this.stopMove},mouseout:function(a){if(OpenLayers.Util.mouseLeft(a,this.map.div)){this.clearTimer();this.callback("move",[a])}return true},passesTolerance:function(b){var d=true;if(this.pixelTolerance&&this.px){var a=Math.sqrt(Math.pow(this.px.x-b.x,2)+Math.pow(this.px.y-b.y,2));if(a<this.pixelTolerance){d=false}}return d},clearTimer:function(){if(this.timerId!=null){window.clearTimeout(this.timerId);this.timerId=null}},delayedCall:function(a){this.callback("pause",[a])},deactivate:function(){var a=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.clearTimer();a=true}return a},CLASS_NAME:"OpenLayers.Handler.Hover"});OpenLayers.Handler.Keyboard=OpenLayers.Class(OpenLayers.Handler,{KEY_EVENTS:["keydown","keyup"],eventListener:null,initialize:function(d,b,a){OpenLayers.Handler.prototype.initialize.apply(this,arguments);this.eventListener=OpenLayers.Function.bindAsEventListener(this.handleKeyEvent,this)},destroy:function(){this.deactivate();this.eventListener=null;OpenLayers.Handler.prototype.destroy.apply(this,arguments)},activate:function(){if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){for(var b=0,a=this.KEY_EVENTS.length;b<a;b++){OpenLayers.Event.observe(document,this.KEY_EVENTS[b],this.eventListener)}return true}else{return false}},deactivate:function(){var d=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){for(var b=0,a=this.KEY_EVENTS.length;b<a;b++){OpenLayers.Event.stopObserving(document,this.KEY_EVENTS[b],this.eventListener)}d=true}return d},handleKeyEvent:function(a){if(this.checkModifiers(a)){this.callback(a.type,[a])}},CLASS_NAME:"OpenLayers.Handler.Keyboard"});OpenLayers.Handler.MouseWheel=OpenLayers.Class(OpenLayers.Handler,{wheelListener:null,mousePosition:null,initialize:function(d,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(m){if(!this.map||!this.checkModifiers(m)){return}var h=false;var o=false;var g=false;var b=OpenLayers.Event.element(m);while((b!=null)&&!g&&!h){if(!h){try{if(b.currentStyle){d=b.currentStyle.overflow}else{var a=document.defaultView.getComputedStyle(b,null);var d=a.getPropertyValue("overflow")}h=(d&&(d=="auto")||(d=="scroll"))}catch(f){}}if(!o){for(var j=0,l=this.map.layers.length;j<l;j++){if(b==this.map.layers[j].div||b==this.map.layers[j].pane){o=true;break}}}g=(b==this.map.div);b=b.parentNode}if(!h&&g){if(o){this.wheelZoom(m)}OpenLayers.Event.stop(m)}},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 d=this.getExtent();if(d&&this.inRange&&this.visibility){var a=true;this.moveTo(d,a,false);this.events.triggerEvent("moveend",{zoomChanged:a});b=true}}return b},moveTo:function(b,a,d){var f=this.visibility;if(!this.isBaseLayer){f=f&&this.inRange}this.display(f)},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 r=new Array("projection","units","scales","resolutions","maxScale","minScale","maxResolution","minResolution","minExtent","maxExtent","numZoomLevels","maxZoomLevel");var b=["projection","units"];var g=false;var f={};for(var h=0,m=r.length;h<m;h++){var v=r[h];if(this.options[v]&&OpenLayers.Util.indexOf(b,v)==-1){g=true}f[v]=this.options[v]||this.map[v]}if(this.alwaysInRange==null){this.alwaysInRange=!g}if((this.options.minScale!=null||this.options.maxScale!=null)&&this.options.scales==null){f.scales=null}if((this.options.minResolution!=null||this.options.maxResolution!=null)&&this.options.resolutions==null){f.resolutions=null}if((!f.numZoomLevels)&&(f.maxZoomLevel)){f.numZoomLevels=f.maxZoomLevel+1}if((f.scales!=null)||(f.resolutions!=null)){if(f.scales!=null){f.resolutions=[];for(var h=0,m=f.scales.length;h<m;h++){var d=f.scales[h];f.resolutions[h]=OpenLayers.Util.getResolutionFromScale(d,f.units)}}f.numZoomLevels=f.resolutions.length}else{if(f.minScale){f.maxResolution=OpenLayers.Util.getResolutionFromScale(f.minScale,f.units)}else{if(f.maxResolution=="auto"){var u=this.map.getSize();var q=f.maxExtent.getWidth()/u.w;var l=f.maxExtent.getHeight()/u.h;f.maxResolution=Math.max(q,l)}}if(f.maxScale!=null){f.minResolution=OpenLayers.Util.getResolutionFromScale(f.maxScale,f.units)}else{if((f.minResolution=="auto")&&(f.minExtent!=null)){var u=this.map.getSize();var q=f.minExtent.getWidth()/u.w;var l=f.minExtent.getHeight()/u.h;f.minResolution=Math.max(q,l)}}if(f.minResolution!=null&&this.options.numZoomLevels==undefined){var p=f.maxResolution/f.minResolution;f.numZoomLevels=Math.floor(Math.log(p)/Math.log(2))+1}f.resolutions=new Array(f.numZoomLevels);var a=2;if(typeof f.minResolution=="number"&&f.numZoomLevels>1){a=Math.pow((f.maxResolution/f.minResolution),(1/(f.numZoomLevels-1)))}for(var h=0;h<f.numZoomLevels;h++){var o=f.maxResolution/Math.pow(a,h);f.resolutions[h]=o}}f.resolutions.sort(function(z,w){return(w-z)});this.resolutions=f.resolutions;this.maxResolution=f.resolutions[0];var j=f.resolutions.length-1;this.minResolution=f.resolutions[j];this.scales=[];for(var h=0,m=f.resolutions.length;h<m;h++){this.scales[h]=OpenLayers.Util.getScaleFromResolution(f.resolutions[h],f.units)}this.minScale=this.scales[0];this.maxScale=this.scales[this.scales.length-1];this.numZoomLevels=f.numZoomLevels},getResolution:function(){var a=this.map.getZoom();return this.getResolutionForZoom(a)},getExtent:function(){return this.map.calculateBounds()},getZoomForExtent:function(b,d){var f=this.map.getSize();var a=Math.max(b.getWidth()/f.w,b.getHeight()/f.h);return this.getZoomForResolution(a,d)},getDataExtent:function(){},getResolutionForZoom:function(d){d=Math.max(0,Math.min(d,this.resolutions.length-1));var b;if(this.map.fractionalZoom){var a=Math.floor(d);var f=Math.ceil(d);b=this.resolutions[a]-((d-a)*(this.resolutions[a]-this.resolutions[f]))}else{b=this.resolutions[Math.round(d)]}return b},getZoomForResolution:function(g,a){var r;if(this.map.fractionalZoom){var o=0;var d=this.resolutions.length-1;var f=this.resolutions[o];var b=this.resolutions[d];var m;for(var h=0,j=this.resolutions.length;h<j;++h){m=this.resolutions[h];if(m>=g){f=m;o=h}if(m<=g){b=m;d=h;break}}var l=f-b;if(l>0){r=o+((f-g)/l)}else{r=o}}else{var p;var q=Number.POSITIVE_INFINITY;for(var h=0,j=this.resolutions.length;h<j;h++){if(a){p=Math.abs(this.resolutions[h]-g);if(p>q){break}q=p}else{if(this.resolutions[h]<g){break}}}r=Math.max(0,h-1)}return r},getLonLatFromViewPortPx:function(b){var g=null;if(b!=null){var f=this.map.getSize();var a=this.map.getCenter();if(a){var d=this.map.getResolution();var j=b.x-(f.w/2);var h=b.y-(f.h/2);g=new OpenLayers.LonLat(a.lon+j*d,a.lat-h*d);if(this.wrapDateLine){g=g.wrapDateLine(this.maxExtent)}}}return g},getViewPortPxFromLonLat:function(f){var b=null;if(f!=null){var a=this.map.getResolution();var d=this.map.getExtent();b=new OpenLayers.Pixel((1/a*(f.lon-d.left)),(1/a*(d.top-f.lat)))}return b},setOpacity:function(b){if(b!=this.opacity){this.opacity=b;for(var f=0,a=this.div.childNodes.length;f<a;++f){var d=this.div.childNodes[f].firstChild;OpenLayers.Util.modifyDOMElement(d,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 d={rightTolerance:this.getResolution()};b=b.wrapDateLine(this.maxExtent,d)}return b},CLASS_NAME:"OpenLayers.Layer"});OpenLayers.Marker.Box=OpenLayers.Class(OpenLayers.Marker,{bounds:null,div:null,initialize:function(b,d,a){this.bounds=b;this.div=OpenLayers.Util.createDiv();this.div.style.overflow="hidden";this.events=new OpenLayers.Events(this,this.div,null);this.setBorder(d,a)},destroy:function(){this.bounds=null;this.div=null;OpenLayers.Marker.prototype.destroy.apply(this,arguments)},setBorder:function(a,b){if(!a){a="red"}if(!b){b=2}this.div.style.border=b+"px solid "+a},draw:function(a,b){OpenLayers.Util.modifyDOMElement(this.div,null,a,b);return this.div},onScreen:function(){var b=false;if(this.map){var a=this.map.getExtent();b=a.containsBounds(this.bounds,true,true)}return b},display:function(a){this.div.style.display=(a)?"":"none"},CLASS_NAME:"OpenLayers.Marker.Box"});(function(){var f=window.XMLHttpRequest;var l=!!window.controllers,g=window.document.all&&!window.opera;function d(){this._object=f?new f:new window.ActiveXObject("Microsoft.XMLHTTP")}if(l&&f.wrapped){d.wrapped=f.wrapped}d.UNSENT=0;d.OPENED=1;d.HEADERS_RECEIVED=2;d.LOADING=3;d.DONE=4;d.prototype.readyState=d.UNSENT;d.prototype.responseText="";d.prototype.responseXML=null;d.prototype.status=0;d.prototype.statusText="";d.prototype.onreadystatechange=null;d.onreadystatechange=null;d.onopen=null;d.onsend=null;d.onabort=null;d.prototype.open=function(q,v,p,w,o){this._async=p;var u=this,r=this.readyState;if(g){var m=function(){if(u._object.readyState!=d.DONE){a(u)}};if(p){window.attachEvent("onunload",m)}}this._object.onreadystatechange=function(){if(l&&!p){return}u.readyState=u._object.readyState;j(u);if(u._aborted){u.readyState=d.UNSENT;return}if(u.readyState==d.DONE){a(u);if(g&&p){window.detachEvent("onunload",m)}}if(r!=u.readyState){h(u)}r=u.readyState};if(d.onopen){d.onopen.apply(this,arguments)}this._object.open(q,v,p,w,o);if(!p&&l){this.readyState=d.OPENED;h(this)}};d.prototype.send=function(m){if(d.onsend){d.onsend.apply(this,arguments)}if(m&&m.nodeType){m=window.XMLSerializer?new window.XMLSerializer().serializeToString(m):m.xml;if(!this._headers["Content-Type"]){this._object.setRequestHeader("Content-Type","application/xml")}}this._object.send(m);if(l&&!this._async){this.readyState=d.OPENED;j(this);while(this.readyState<d.DONE){this.readyState++;h(this);if(this._aborted){return}}}};d.prototype.abort=function(){if(d.onabort){d.onabort.apply(this,arguments)}if(this.readyState>d.UNSENT){this._aborted=true}this._object.abort();a(this)};d.prototype.getAllResponseHeaders=function(){return this._object.getAllResponseHeaders()};d.prototype.getResponseHeader=function(m){return this._object.getResponseHeader(m)};d.prototype.setRequestHeader=function(m,o){if(!this._headers){this._headers={}}this._headers[m]=o;return this._object.setRequestHeader(m,o)};d.prototype.toString=function(){return"[object XMLHttpRequest]"};d.toString=function(){return"[XMLHttpRequest]"};function h(m){if(m.onreadystatechange){m.onreadystatechange.apply(m)}if(d.onreadystatechange){d.onreadystatechange.apply(m)}}function b(o){var m=o.responseXML;if(g&&m&&!m.documentElement&&o.getResponseHeader("Content-Type").match(/[^\/]+\/[^\+]+\+xml/)){m=new ActiveXObject("Microsoft.XMLDOM");m.loadXML(o.responseText)}if(m){if((g&&m.parseError!=0)||(m.documentElement&&m.documentElement.tagName=="parsererror")){return null}}return m}function j(m){try{m.responseText=m._object.responseText}catch(o){}try{m.responseXML=b(m._object)}catch(o){}try{m.status=m._object.status}catch(o){}try{m.statusText=m._object.statusText}catch(o){}}function a(m){m._object.onreadystatechange=new window.Function;delete m._headers}if(!window.Function.prototype.apply){window.Function.prototype.apply=function(m,o){if(!o){o=[]}m.__func=this;m.__func(o[0],o[1],o[2],o[3],o[4]);delete m.__func}}OpenLayers.Request.XMLHttpRequest=d})();OpenLayers.ProxyHost="";OpenLayers.nullHandler=function(a){OpenLayers.Console.userError(OpenLayers.i18n("unhandledRequest",{statusText:a.statusText}))};OpenLayers.loadURL=function(f,j,b,g,d){if(typeof j=="string"){j=OpenLayers.Util.getParameters(j)}var h=(g)?g:OpenLayers.nullHandler;var a=(d)?d:OpenLayers.nullHandler;return OpenLayers.Request.GET({url:f,params:j,success:h,failure:a,scope:b})};OpenLayers.parseXMLString=function(d){var a=d.indexOf("<");if(a>0){d=d.substring(a)}var b=OpenLayers.Util.Try(function(){var f=new ActiveXObject("Microsoft.XMLDOM");f.loadXML(d);return f},function(){return new DOMParser().parseFromString(d,"text/xml")},function(){var f=new XMLHttpRequest();f.open("GET","data:text/xml;charset=utf-8,"+encodeURIComponent(d),false);if(f.overrideMimeType){f.overrideMimeType("text/xml")}f.send(null);return f.responseXML});return b};OpenLayers.Ajax={emptyFunction:function(){},getTransport:function(){return OpenLayers.Util.Try(function(){return new XMLHttpRequest()},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")})||false},activeRequestCount:0};OpenLayers.Ajax.Responders={responders:[],register:function(b){for(var a=0;a<this.responders.length;a++){if(b==this.responders[a]){return}}this.responders.push(b)},unregister:function(a){OpenLayers.Util.removeItem(this.reponders,a)},dispatch:function(h,d,g){var a;for(var b=0;b<this.responders.length;b++){a=this.responders[b];if(a[h]&&typeof a[h]=="function"){try{a[h].apply(a,[d,g])}catch(f){}}}}};OpenLayers.Ajax.Responders.register({onCreate:function(){OpenLayers.Ajax.activeRequestCount++},onComplete:function(){OpenLayers.Ajax.activeRequestCount--}});OpenLayers.Ajax.Base=OpenLayers.Class({initialize:function(a){this.options={method:"post",asynchronous:true,contentType:"application/xml",parameters:""};OpenLayers.Util.extend(this.options,a||{});this.options.method=this.options.method.toLowerCase();if(typeof this.options.parameters=="string"){this.options.parameters=OpenLayers.Util.getParameters(this.options.parameters)}}});OpenLayers.Ajax.Request=OpenLayers.Class(OpenLayers.Ajax.Base,{_complete:false,initialize:function(b,a){OpenLayers.Ajax.Base.prototype.initialize.apply(this,[a]);if(OpenLayers.ProxyHost&&OpenLayers.String.startsWith(b,"http")){b=OpenLayers.ProxyHost+encodeURIComponent(b)}this.transport=OpenLayers.Ajax.getTransport();this.request(b)},request:function(b){this.url=b;this.method=this.options.method;var f=OpenLayers.Util.extend({},this.options.parameters);if(this.method!="get"&&this.method!="post"){f._method=this.method;this.method="post"}this.parameters=f;if(f=OpenLayers.Util.getParameterString(f)){if(this.method=="get"){this.url+=((this.url.indexOf("?")>-1)?"&":"?")+f}else{if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){f+="&_="}}}try{var a=new OpenLayers.Ajax.Response(this);if(this.options.onCreate){this.options.onCreate(a)}OpenLayers.Ajax.Responders.dispatch("onCreate",this,a);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);if(this.options.asynchronous){window.setTimeout(OpenLayers.Function.bind(this.respondToReadyState,this,1),10)}this.transport.onreadystatechange=OpenLayers.Function.bind(this.onStateChange,this);this.setRequestHeaders();this.body=this.method=="post"?(this.options.postBody||f):null;this.transport.send(this.body);if(!this.options.asynchronous&&this.transport.overrideMimeType){this.onStateChange()}}catch(d){this.dispatchException(d)}},onStateChange:function(){var a=this.transport.readyState;if(a>1&&!((a==4)&&this._complete)){this.respondToReadyState(this.transport.readyState)}},setRequestHeaders:function(){var g={"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript, text/html, application/xml, text/xml, */*",OpenLayers:true};if(this.method=="post"){g["Content-type"]=this.options.contentType+(this.options.encoding?"; charset="+this.options.encoding:"");if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005){g.Connection="close"}}if(typeof this.options.requestHeaders=="object"){var d=this.options.requestHeaders;if(typeof d.push=="function"){for(var b=0,f=d.length;b<f;b+=2){g[d[b]]=d[b+1]}}else{for(var b in d){g[b]=d[b]}}}for(var a in g){this.transport.setRequestHeader(a,g[a])}},success:function(){var a=this.getStatus();return !a||(a>=200&&a<300)},getStatus:function(){try{return this.transport.status||0}catch(a){return 0}},respondToReadyState:function(a){var d=OpenLayers.Ajax.Request.Events[a];var b=new OpenLayers.Ajax.Response(this);if(d=="Complete"){try{this._complete=true;(this.options["on"+b.status]||this.options["on"+(this.success()?"Success":"Failure")]||OpenLayers.Ajax.emptyFunction)(b)}catch(f){this.dispatchException(f)}var g=b.getHeader("Content-type")}try{(this.options["on"+d]||OpenLayers.Ajax.emptyFunction)(b);OpenLayers.Ajax.Responders.dispatch("on"+d,this,b)}catch(f){this.dispatchException(f)}if(d=="Complete"){this.transport.onreadystatechange=OpenLayers.Ajax.emptyFunction}},getHeader:function(a){try{return this.transport.getResponseHeader(a)}catch(b){return null}},dispatchException:function(d){var f=this.options.onException;if(f){f(this,d);OpenLayers.Ajax.Responders.dispatch("onException",this,d)}else{var g=false;var a=OpenLayers.Ajax.Responders.responders;for(var b=0;b<a.length;b++){if(a[b].onException){g=true;break}}if(g){OpenLayers.Ajax.Responders.dispatch("onException",this,d)}else{throw d}}}});OpenLayers.Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];OpenLayers.Ajax.Response=OpenLayers.Class({status:0,statusText:"",initialize:function(d){this.request=d;var f=this.transport=d.transport,a=this.readyState=f.readyState;if((a>2&&!(!!(window.attachEvent&&!window.opera)))||a==4){this.status=this.getStatus();this.statusText=this.getStatusText();this.responseText=f.responseText==null?"":String(f.responseText)}if(a==4){var b=f.responseXML;this.responseXML=b===undefined?null:b}},getStatus:OpenLayers.Ajax.Request.prototype.getStatus,getStatusText:function(){try{return this.transport.statusText||""}catch(a){return""}},getHeader:OpenLayers.Ajax.Request.prototype.getHeader,getResponseHeader:function(a){return this.transport.getResponseHeader(a)}});OpenLayers.Ajax.getElementsByTagNameNS=function(b,a,d,g){var f=null;if(b.getElementsByTagNameNS){f=b.getElementsByTagNameNS(a,g)}else{f=b.getElementsByTagName(d+":"+g)}return f};OpenLayers.Ajax.serializeXMLToString=function(a){var b=new XMLSerializer();var d=b.serializeToString(a);return d};OpenLayers.Control.DragFeature=OpenLayers.Class(OpenLayers.Control,{geometryTypes:null,onStart:function(b,a){},onDrag:function(b,a){},onComplete:function(b,a){},layer:null,feature:null,dragCallbacks:{},featureCallbacks:{},lastPixel:null,initialize:function(b,a){OpenLayers.Control.prototype.initialize.apply(this,[a]);this.layer=b;this.handlers={drag:new OpenLayers.Handler.Drag(this,OpenLayers.Util.extend({down:this.downFeature,move:this.moveFeature,up:this.upFeature,out:this.cancel,done:this.doneDragging},this.dragCallbacks)),feature:new OpenLayers.Handler.Feature(this,this.layer,OpenLayers.Util.extend({over:this.overFeature,out:this.outFeature},this.featureCallbacks),{geometryTypes:this.geometryTypes})}},destroy:function(){this.layer=null;OpenLayers.Control.prototype.destroy.apply(this,[])},activate:function(){return(this.handlers.feature.activate()&&OpenLayers.Control.prototype.activate.apply(this,arguments))},deactivate:function(){this.handlers.drag.deactivate();this.handlers.feature.deactivate();this.feature=null;this.dragging=false;this.lastPixel=null;OpenLayers.Element.removeClass(this.map.viewPortDiv,this.displayClass+"Over");return OpenLayers.Control.prototype.deactivate.apply(this,arguments)},overFeature:function(a){if(!this.handlers.drag.dragging){this.feature=a;this.handlers.drag.activate();this.over=true;OpenLayers.Element.addClass(this.map.viewPortDiv,this.displayClass+"Over")}else{if(this.feature.id==a.id){this.over=true}else{this.over=false}}},downFeature:function(a){this.lastPixel=a;this.onStart(this.feature,a)},moveFeature:function(a){var b=this.map.getResolution();this.feature.geometry.move(b*(a.x-this.lastPixel.x),b*(this.lastPixel.y-a.y));this.layer.drawFeature(this.feature);this.lastPixel=a;this.onDrag(this.feature,a)},upFeature:function(a){if(!this.over){this.handlers.drag.deactivate()}},doneDragging:function(a){this.onComplete(this.feature,a)},outFeature:function(a){if(!this.handlers.drag.dragging){this.over=false;this.handlers.drag.deactivate();OpenLayers.Element.removeClass(this.map.viewPortDiv,this.displayClass+"Over");this.feature=null}else{if(this.feature.id==a.id){this.over=false}}},cancel:function(){this.handlers.drag.deactivate();this.over=false},setMap:function(a){this.handlers.drag.setMap(a);this.handlers.feature.setMap(a);OpenLayers.Control.prototype.setMap.apply(this,arguments)},CLASS_NAME:"OpenLayers.Control.DragFeature"});OpenLayers.Control.DragPan=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOOL,panned:false,interval:25,draw:function(){this.handler=new OpenLayers.Handler.Drag(this,{move:this.panMap,done:this.panMapDone},{interval:this.interval})},panMap:function(a){this.panned=true;this.map.pan(this.handler.last.x-a.x,this.handler.last.y-a.y,{dragging:this.handler.dragging,animate:false})},panMapDone:function(a){if(this.panned){this.panMap(a);this.panned=false}},CLASS_NAME:"OpenLayers.Control.DragPan"});OpenLayers.Control.KeyboardDefaults=OpenLayers.Class(OpenLayers.Control,{slideFactor:75,initialize:function(){OpenLayers.Control.prototype.initialize.apply(this,arguments)},destroy:function(){if(this.handler){this.handler.destroy()}this.handler=null;OpenLayers.Control.prototype.destroy.apply(this,arguments)},draw:function(){this.handler=new OpenLayers.Handler.Keyboard(this,{keydown:this.defaultKeyPress});this.activate()},defaultKeyPress:function(a){switch(a.keyCode){case OpenLayers.Event.KEY_LEFT:this.map.pan(-this.slideFactor,0);break;case OpenLayers.Event.KEY_RIGHT:this.map.pan(this.slideFactor,0);break;case OpenLayers.Event.KEY_UP:this.map.pan(0,-this.slideFactor);break;case OpenLayers.Event.KEY_DOWN:this.map.pan(0,this.slideFactor);break;case 33:var b=this.map.getSize();this.map.pan(0,-0.75*b.h);break;case 34:var b=this.map.getSize();this.map.pan(0,0.75*b.h);break;case 35:var b=this.map.getSize();this.map.pan(0.75*b.w,0);break;case 36:var b=this.map.getSize();this.map.pan(-0.75*b.w,0);break;case 43:case 61:case 187:case 107:this.map.zoomIn();break;case 45:case 109:case 189:case 95:this.map.zoomOut();break}},CLASS_NAME:"OpenLayers.Control.KeyboardDefaults"});OpenLayers.Control.WMSGetFeatureInfo=OpenLayers.Class(OpenLayers.Control,{hover:false,maxFeatures:10,layers:null,queryVisible:false,url:null,layerUrls:null,infoFormat:"text/html",vendorParams:{},format:null,formatOptions:null,handlerOptions:null,handler:null,hoverRequest:null,EVENT_TYPES:["getfeatureinfo"],initialize:function(a){this.EVENT_TYPES=OpenLayers.Control.WMSGetFeatureInfo.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);a=a||{};a.handlerOptions=a.handlerOptions||{};OpenLayers.Control.prototype.initialize.apply(this,[a]);if(!this.format){this.format=new OpenLayers.Format.WMSGetFeatureInfo(a.formatOptions)}if(this.hover){this.handler=new OpenLayers.Handler.Hover(this,{move:this.cancelHover,pause:this.getInfoForHover},OpenLayers.Util.extend(this.handlerOptions.hover||{},{delay:250}))}else{this.handler=new OpenLayers.Handler.Click(this,{click:this.getInfoForClick},this.handlerOptions.click||{})}},activate:function(){if(!this.active){this.handler.activate()}return OpenLayers.Control.prototype.activate.apply(this,arguments)},deactivate:function(){return OpenLayers.Control.prototype.deactivate.apply(this,arguments)},getInfoForClick:function(a){OpenLayers.Element.addClass(this.map.viewPortDiv,"olCursorWait");this.request(a.xy,{})},getInfoForHover:function(a){this.request(a.xy,{hover:true})},cancelHover:function(){if(this.hoverRequest){this.hoverRequest.abort();this.hoverRequest=null}},findLayers:function(){var h=[];var g=this.layers||this.map.layers;var f,b;for(var d=0,a=g.length;d<a;++d){f=g[d];if(f instanceof OpenLayers.Layer.WMS&&(!this.queryVisible||f.getVisibility())){b=f.url instanceof Array?f.url[0]:f.url;if(!this.url){this.url=b}if(this.urlMatches(b)){h.push(f)}}}return h},urlMatches:function(b){var f=OpenLayers.Util.isEquivalentUrl(this.url,b);if(!f&&this.layerUrls){for(var d=0,a=this.layerUrls.length;d<a;++d){if(OpenLayers.Util.isEquivalentUrl(this.layerUrls[d],b)){f=true;break}}}return f},request:function(a,m){m=m||{};var h=[];var j=[];var d=this.findLayers();if(d.length>0){for(var f=0,g=d.length;f<g;f++){h=h.concat(d[f].params.LAYERS);if(d[f].params.STYLES){j=j.concat(d[f].params.STYLES)}else{if(d[f].params.LAYERS instanceof Array){j=j.concat(new Array(d[f].params.LAYERS.length))}else{j=j.concat(d[f].params.LAYERS.replace(/[^,]/g,""))}}}var l={url:this.url,params:OpenLayers.Util.applyDefaults({service:"WMS",version:"1.1.0",request:"GetFeatureInfo",layers:h,query_layers:h,styles:j,bbox:this.map.getExtent().toBBOX(),srs:this.map.getProjection(),feature_count:this.maxFeatures,x:a.x,y:a.y,height:this.map.getSize().h,width:this.map.getSize().w,info_format:this.infoFormat},this.vendorParams),callback:function(o){this.handleResponse(a,o)},scope:this};var b=OpenLayers.Request.GET(l);if(m.hover===true){this.hoverRequest=b.priv}}else{OpenLayers.Element.removeClass(this.map.viewPortDiv,"olCursorWait")}},handleResponse:function(f,b){var d=b.responseXML;if(!d||!d.documentElement){d=b.responseText}var a=this.format.read(d);this.events.triggerEvent("getfeatureinfo",{text:b.responseText,features:a,request:b,xy:f});OpenLayers.Element.removeClass(this.map.viewPortDiv,"olCursorWait")},setMap:function(a){this.handler.setMap(a);OpenLayers.Control.prototype.setMap.apply(this,arguments)},CLASS_NAME:"OpenLayers.Control.WMSGetFeatureInfo"});OpenLayers.State={UNKNOWN:"Unknown",INSERT:"Insert",UPDATE:"Update",DELETE:"Delete"};OpenLayers.Feature.Vector=OpenLayers.Class(OpenLayers.Feature,{fid:null,geometry:null,attributes:null,bounds:null,state:null,style:null,renderIntent:"default",initialize:function(d,a,b){OpenLayers.Feature.prototype.initialize.apply(this,[null,null,a]);this.lonlat=null;this.geometry=d?d:null;this.state=null;this.attributes={};if(a){this.attributes=OpenLayers.Util.extend(this.attributes,a)}this.style=b?b:null},destroy:function(){if(this.layer){this.layer.removeFeatures(this);this.layer=null}this.geometry=null;OpenLayers.Feature.prototype.destroy.apply(this,arguments)},clone:function(){return new OpenLayers.Feature.Vector(this.geometry?this.geometry.clone():null,this.attributes,this.style)},onScreen:function(f){var d=false;if(this.layer&&this.layer.map){var a=this.layer.map.getExtent();if(f){var b=this.geometry.getBounds();d=a.intersectsBounds(b)}else{var g=a.toGeometry();d=g.intersects(this.geometry)}}return d},createMarker:function(){return null},destroyMarker:function(){},createPopup:function(){return null},atPoint:function(b,f,d){var a=false;if(this.geometry){a=this.geometry.atPoint(b,f,d)}return a},destroyPopup:function(){},move:function(a){if(!this.layer||!this.geometry.move){return}var b;if(a.CLASS_NAME=="OpenLayers.LonLat"){b=this.layer.getViewPortPxFromLonLat(a)}else{b=a}var f=this.layer.getViewPortPxFromLonLat(this.geometry.getBounds().getCenterLonLat());var d=this.layer.map.getResolution();this.geometry.move(d*(b.x-f.x),d*(f.y-b.y));this.layer.drawFeature(this);return f},toState:function(a){if(a==OpenLayers.State.UPDATE){switch(this.state){case OpenLayers.State.UNKNOWN:case OpenLayers.State.DELETE:this.state=a;break;case OpenLayers.State.UPDATE:case OpenLayers.State.INSERT:break}}else{if(a==OpenLayers.State.INSERT){switch(this.state){case OpenLayers.State.UNKNOWN:break;default:this.state=a;break}}else{if(a==OpenLayers.State.DELETE){switch(this.state){case OpenLayers.State.INSERT:break;case OpenLayers.State.DELETE:break;case OpenLayers.State.UNKNOWN:case OpenLayers.State.UPDATE:this.state=a;break}}else{if(a==OpenLayers.State.UNKNOWN){this.state=a}}}}},CLASS_NAME:"OpenLayers.Feature.Vector"});OpenLayers.Feature.Vector.style={"default":{fillColor:"#ee9900",fillOpacity:0.4,hoverFillColor:"white",hoverFillOpacity:0.8,strokeColor:"#ee9900",strokeOpacity:1,strokeWidth:1,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:0.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"inherit"},select:{fillColor:"blue",fillOpacity:0.4,hoverFillColor:"white",hoverFillOpacity:0.8,strokeColor:"blue",strokeOpacity:1,strokeWidth:2,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:0.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"pointer"},temporary:{fillColor:"#66cccc",fillOpacity:0.2,hoverFillColor:"white",hoverFillOpacity:0.8,strokeColor:"#66cccc",strokeOpacity:1,strokeLinecap:"round",strokeWidth:2,strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:0.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"inherit"},"delete":{display:"none"}};OpenLayers.Feature.WFS=OpenLayers.Class(OpenLayers.Feature,{initialize:function(d,b){var a=arguments;var f=this.processXMLNode(b);a=new Array(d,f.lonlat,f);OpenLayers.Feature.prototype.initialize.apply(this,a);this.createMarker();this.layer.addMarker(this.marker)},destroy:function(){if(this.marker!=null){this.layer.removeMarker(this.marker)}OpenLayers.Feature.prototype.destroy.apply(this,arguments)},processXMLNode:function(b){var a=OpenLayers.Ajax.getElementsByTagNameNS(b,"http://www.opengis.net/gml","gml","Point");var f=OpenLayers.Util.getXmlNodeValue(OpenLayers.Ajax.getElementsByTagNameNS(a[0],"http://www.opengis.net/gml","gml","coordinates")[0]);var d=f.split(",");return{lonlat:new OpenLayers.LonLat(parseFloat(d[0]),parseFloat(d[1])),id:null}},CLASS_NAME:"OpenLayers.Feature.WFS"});OpenLayers.Format.WFSCapabilities.v1=OpenLayers.Class(OpenLayers.Format.WFSCapabilities,{initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a]);this.options=a},read:function(d){if(typeof d=="string"){d=OpenLayers.Format.XML.prototype.read.apply(this,[d])}var a={};var b=d.documentElement;this.runChildNodes(a,b);return a},runChildNodes:function(h,g){var d=g.childNodes;var b,f;for(var a=0;a<d.length;++a){b=d[a];if(b.nodeType==1){f=this["read_cap_"+b.nodeName];if(f){f.apply(this,[h,b])}}}},read_cap_FeatureTypeList:function(d,b){var a={featureTypes:[]};this.runChildNodes(a,b);d.featureTypeList=a},read_cap_FeatureType:function(a,f,b){var d={};this.runChildNodes(d,f);a.featureTypes.push(d)},read_cap_Name:function(d,b){var a=this.getChildValue(b);if(a){d.name=a}},read_cap_Title:function(b,a){var d=this.getChildValue(a);if(d){b.title=d}},read_cap_Abstract:function(d,b){var a=this.getChildValue(b);if(a){d["abstract"]=a}},CLASS_NAME:"OpenLayers.Format.WFSCapabilities.v1"});OpenLayers.Format.WMC.v1=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{ol:"http://openlayers.org/context",wmc:"http://www.opengis.net/context",sld:"http://www.opengis.net/sld",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},schemaLocation:"",getNamespacePrefix:function(a){var b=null;if(a==null){b=this.namespaces[this.defaultPrefix]}else{for(b in this.namespaces){if(this.namespaces[b]==a){break}}}return b},defaultPrefix:"wmc",rootPrefix:null,defaultStyleName:"",defaultStyleTitle:"Default",initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},read:function(d){if(typeof d=="string"){d=OpenLayers.Format.XML.prototype.read.apply(this,[d])}var a=d.documentElement;this.rootPrefix=a.prefix;var b={version:a.getAttribute("version")};this.runChildNodes(b,a);return b},runChildNodes:function(g,f){var b=f.childNodes;var a,d,j,m;for(var h=0,l=b.length;h<l;++h){a=b[h];if(a.nodeType==1){j=this.getNamespacePrefix(a.namespaceURI);m=a.nodeName.split(":").pop();d=this["read_"+j+"_"+m];if(d){d.apply(this,[g,a])}}}},read_wmc_General:function(a,b){this.runChildNodes(a,b)},read_wmc_BoundingBox:function(a,b){a.projection=b.getAttribute("SRS");a.bounds=new OpenLayers.Bounds(parseFloat(b.getAttribute("minx")),parseFloat(b.getAttribute("miny")),parseFloat(b.getAttribute("maxx")),parseFloat(b.getAttribute("maxy")))},read_wmc_LayerList:function(a,b){a.layers=[];this.runChildNodes(a,b)},read_wmc_Layer:function(b,d){var f={params:this.layerParams||{},options:{visibility:(d.getAttribute("hidden")!="1"),queryable:(d.getAttribute("queryable")=="1")},formats:[],styles:[]};this.runChildNodes(f,d);f.params.layers=f.name;f.options.maxExtent=f.maxExtent;var a=this.getLayerFromInfo(f);b.layers.push(a)},getLayerFromInfo:function(d){var a=d.options;if(this.layerOptions){OpenLayers.Util.applyDefaults(a,this.layerOptions)}var b=new OpenLayers.Layer.WMS(d.title,d.href,d.params,a);return b},read_wmc_Extension:function(b,a){this.runChildNodes(b,a)},read_ol_units:function(b,a){b.options.units=this.getChildValue(a)},read_ol_maxExtent:function(d,b){var a=new OpenLayers.Bounds(b.getAttribute("minx"),b.getAttribute("miny"),b.getAttribute("maxx"),b.getAttribute("maxy"));d.maxExtent=a},read_ol_transparent:function(b,a){b.params.transparent=this.getChildValue(a)},read_ol_numZoomLevels:function(b,a){b.options.numZoomLevels=parseInt(this.getChildValue(a))},read_ol_opacity:function(b,a){b.options.opacity=parseFloat(this.getChildValue(a))},read_ol_singleTile:function(b,a){b.options.singleTile=(this.getChildValue(a)=="true")},read_ol_isBaseLayer:function(b,a){b.options.isBaseLayer=(this.getChildValue(a)=="true")},read_ol_displayInLayerSwitcher:function(b,a){b.options.displayInLayerSwitcher=(this.getChildValue(a)=="true")},read_wmc_Server:function(b,a){b.params.version=a.getAttribute("version");this.runChildNodes(b,a)},read_wmc_FormatList:function(b,a){this.runChildNodes(b,a)},read_wmc_Format:function(d,a){var b=this.getChildValue(a);d.formats.push(b);if(a.getAttribute("current")=="1"){d.params.format=b}},read_wmc_StyleList:function(b,a){this.runChildNodes(b,a)},read_wmc_Style:function(d,b){var a={};this.runChildNodes(a,b);if(b.getAttribute("current")=="1"){if(a.href){d.params.sld=a.href}else{if(a.body){d.params.sld_body=a.body}else{d.params.styles=a.name}}}d.styles.push(a)},read_wmc_SLD:function(a,b){this.runChildNodes(a,b)},read_sld_StyledLayerDescriptor:function(d,b){var a=OpenLayers.Format.XML.prototype.write.apply(this,[b]);d.body=a},read_wmc_OnlineResource:function(b,a){b.href=this.getAttributeNS(a,this.namespaces.xlink,"href")},read_wmc_Name:function(d,b){var a=this.getChildValue(b);if(a){d.name=a}},read_wmc_Title:function(b,a){var d=this.getChildValue(a);if(d){b.title=d}},read_wmc_MetadataURL:function(d,b){var f={};var a=b.getElementsByTagName("OnlineResource");if(a.length>0){this.read_wmc_OnlineResource(f,a[0])}d.options.metadataURL=f.href},read_wmc_Abstract:function(d,b){var a=this.getChildValue(b);if(a){d["abstract"]=a}},read_wmc_LatLonBoundingBox:function(a,b){a.llbbox=[parseFloat(b.getAttribute("minx")),parseFloat(b.getAttribute("miny")),parseFloat(b.getAttribute("maxx")),parseFloat(b.getAttribute("maxy"))]},read_wmc_LegendURL:function(d,f){var b={width:f.getAttribute("width"),height:f.getAttribute("height")};var a=f.getElementsByTagName("OnlineResource");if(a.length>0){this.read_wmc_OnlineResource(b,a[0])}d.legend=b},write:function(d,b){var a=this.createElementDefaultNS("ViewContext");this.setAttributes(a,{version:this.VERSION,id:(b&&typeof b.id=="string")?b.id:OpenLayers.Util.createUniqueID("OpenLayers_Context_")});this.setAttributeNS(a,this.namespaces.xsi,"xsi:schemaLocation",this.schemaLocation);a.appendChild(this.write_wmc_General(d));a.appendChild(this.write_wmc_LayerList(d));return OpenLayers.Format.XML.prototype.write.apply(this,[a])},createElementDefaultNS:function(d,b,a){var f=this.createElementNS(this.namespaces[this.defaultPrefix],d);if(b){f.appendChild(this.createTextNode(b))}if(a){this.setAttributes(f,a)}return f},setAttributes:function(b,f){var d;for(var a in f){d=f[a].toString();if(d.match(/[A-Z]/)){this.setAttributeNS(b,null,a,d)}else{b.setAttribute(a,d)}}},write_wmc_General:function(a){var d=this.createElementDefaultNS("General");if(a.size){d.appendChild(this.createElementDefaultNS("Window",null,{width:a.size.w,height:a.size.h}))}var b=a.bounds;d.appendChild(this.createElementDefaultNS("BoundingBox",null,{minx:b.left.toPrecision(10),miny:b.bottom.toPrecision(10),maxx:b.right.toPrecision(10),maxy:b.top.toPrecision(10),SRS:a.projection}));d.appendChild(this.createElementDefaultNS("Title",a.title));d.appendChild(this.write_ol_MapExtension(a));return d},write_ol_MapExtension:function(b){var f=this.createElementDefaultNS("Extension");var d=b.maxExtent;if(d){var a=this.createElementNS(this.namespaces.ol,"ol:maxExtent");this.setAttributes(a,{minx:d.left.toPrecision(10),miny:d.bottom.toPrecision(10),maxx:d.right.toPrecision(10),maxy:d.top.toPrecision(10)});f.appendChild(a)}return f},write_wmc_LayerList:function(f){var g=this.createElementDefaultNS("LayerList");var d;for(var b=0,a=f.layers.length;b<a;++b){d=f.layers[b];if(d instanceof OpenLayers.Layer.WMS){g.appendChild(this.write_wmc_Layer(d))}}return g},write_wmc_Layer:function(a){var b=this.createElementDefaultNS("Layer",null,{queryable:a.queryable?"1":"0",hidden:a.visibility?"0":"1"});b.appendChild(this.write_wmc_Server(a));b.appendChild(this.createElementDefaultNS("Name",a.params.LAYERS));b.appendChild(this.createElementDefaultNS("Title",a.name));if(a.metadataURL){b.appendChild(this.write_wmc_MetadataURL(a))}b.appendChild(this.write_wmc_FormatList(a));b.appendChild(this.write_wmc_StyleList(a));b.appendChild(this.write_wmc_LayerExtension(a));return b},write_wmc_LayerExtension:function(h){var f=this.createElementDefaultNS("Extension");var a=h.maxExtent;var m=this.createElementNS(this.namespaces.ol,"ol:maxExtent");this.setAttributes(m,{minx:a.left.toPrecision(10),miny:a.bottom.toPrecision(10),maxx:a.right.toPrecision(10),maxy:a.top.toPrecision(10)});f.appendChild(m);var d=h.params.TRANSPARENT;if(d){var o=this.createElementNS(this.namespaces.ol,"ol:transparent");o.appendChild(this.createTextNode(d));f.appendChild(o)}var l=["numZoomLevels","units","isBaseLayer","opacity","displayInLayerSwitcher","singleTile"];var b;for(var g=0,j=l.length;g<j;++g){b=this.createOLPropertyNode(h,l[g]);if(b){f.appendChild(b)}}return f},createOLPropertyNode:function(b,d){var a=null;if(b[d]!=null){a=this.createElementNS(this.namespaces.ol,"ol:"+d);a.appendChild(this.createTextNode(b[d].toString()))}return a},write_wmc_Server:function(a){var b=this.createElementDefaultNS("Server");this.setAttributes(b,{service:"OGC:WMS",version:a.params.VERSION});b.appendChild(this.write_wmc_OnlineResource(a.url));return b},write_wmc_MetadataURL:function(a){var b=this.createElementDefaultNS("MetadataURL");b.appendChild(this.write_wmc_OnlineResource(a.metadataURL));return b},write_wmc_FormatList:function(a){var b=this.createElementDefaultNS("FormatList");b.appendChild(this.createElementDefaultNS("Format",a.params.FORMAT,{current:"1"}));return b},write_wmc_StyleList:function(g){var f=this.createElementDefaultNS("StyleList");var d=this.createElementDefaultNS("Style",null,{current:"1"});if(g.params.SLD){var b=this.createElementDefaultNS("SLD");var j=this.write_wmc_OnlineResource(g.params.SLD);b.appendChild(j);d.appendChild(b)}else{if(g.params.SLD_BODY){var b=this.createElementDefaultNS("SLD");var h=g.params.SLD_BODY;var l=OpenLayers.Format.XML.prototype.read.apply(this,[h]);var m=l.documentElement;if(b.ownerDocument&&b.ownerDocument.importNode){m=b.ownerDocument.importNode(m,true)}b.appendChild(m);d.appendChild(b)}else{var a=g.params.STYLES?g.params.STYLES:this.defaultStyleName;d.appendChild(this.createElementDefaultNS("Name",a));d.appendChild(this.createElementDefaultNS("Title",this.defaultStyleTitle))}}f.appendChild(d);return f},write_wmc_OnlineResource:function(a){var b=this.createElementDefaultNS("OnlineResource");this.setAttributeNS(b,this.namespaces.xlink,"xlink:type","simple");this.setAttributeNS(b,this.namespaces.xlink,"xlink:href",a);return b},CLASS_NAME:"OpenLayers.Format.WMC.v1"});OpenLayers.Format.WMSCapabilities.v1_1_0=OpenLayers.Class(OpenLayers.Format.WMSCapabilities.v1_1,{version:"1.1.0",initialize:function(a){OpenLayers.Format.WMSCapabilities.v1_1.prototype.initialize.apply(this,[a])},CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1_1_0"});OpenLayers.Format.WMSCapabilities.v1_1_1=OpenLayers.Class(OpenLayers.Format.WMSCapabilities.v1_1,{version:"1.1.1",initialize:function(a){OpenLayers.Format.WMSCapabilities.v1_1.prototype.initialize.apply(this,[a])},CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1_1_1"});OpenLayers.Format.WMSDescribeLayer.v1_1=OpenLayers.Class(OpenLayers.Format.WMSDescribeLayer,{initialize:function(a){OpenLayers.Format.WMSDescribeLayer.prototype.initialize.apply(this,[a])},read:function(j){if(typeof j=="string"){j=OpenLayers.Format.XML.prototype.read.apply(this,[j])}var b=j.documentElement;var g=b.childNodes;var a=[];for(var f=0;f<g.length;++f){childNode=g[f];nodeName=childNode.nodeName;if(nodeName=="LayerDescription"){var l="";var h="";var d="";if(childNode.getAttribute("owsType")){l=childNode.getAttribute("owsType");h=childNode.getAttribute("owsURL")}else{if(childNode.getAttribute("wfs")!=""){l="WFS";h=childNode.getAttribute("wfs")}else{if(childNode.getAttribute("wcs")!=""){l="WCS";h=childNode.getAttribute("wcs")}}}query=childNode.getElementsByTagName("Query");if(query.length>0){d=query[0].getAttribute("typeName");if(!d){d=query[0].getAttribute("typename")}}a.push({owsType:l,owsURL:h,typeName:d})}}return a},CLASS_NAME:"OpenLayers.Format.WMSDescribeLayer.v1_1"});OpenLayers.Handler.Box=OpenLayers.Class(OpenLayers.Handler,{dragHandler:null,boxDivClassName:"olHandlerBoxZoomBox",boxCharacteristics:null,initialize:function(d,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(h){var f=this.dragHandler.start.x;var b=this.dragHandler.start.y;var d=Math.abs(f-h.x);var a=Math.abs(b-h.y);this.zoomBox.style.width=Math.max(1,d)+"px";this.zoomBox.style.height=Math.max(1,a)+"px";this.zoomBox.style.left=h.x<f?h.x+"px":f+"px";this.zoomBox.style.top=h.y<b?h.y+"px":b+"px";var g=this.getBoxCharacteristics();if(g.newBoxModel){if(h.x>f){this.zoomBox.style.width=Math.max(1,d-g.xOffset)+"px"}if(h.y>b){this.zoomBox.style.height=Math.max(1,a-g.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 j=this.dragHandler.start;var h=Math.min(j.y,b.y);var d=Math.max(j.y,b.y);var g=Math.min(j.x,b.x);var f=Math.max(j.x,b.x);a=new OpenLayers.Bounds(g,d,f,h)}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 d=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:d,newBoxModel:b}}return this.boxCharacteristics},CLASS_NAME:"OpenLayers.Handler.Box"});OpenLayers.Handler.RegularPolygon=OpenLayers.Class(OpenLayers.Handler.Drag,{sides:4,radius:null,snapAngle:null,snapToggle:"shiftKey",persist:false,irregular:false,angle:null,fixedRadius:false,feature:null,layer:null,origin:null,initialize:function(d,b,a){this.style=OpenLayers.Util.extend(OpenLayers.Feature.Vector.style["default"],{});OpenLayers.Handler.prototype.initialize.apply(this,[d,b,a]);this.options=(a)?a:new Object()},setOptions:function(a){OpenLayers.Util.extend(this.options,a);OpenLayers.Util.extend(this,a)},activate:function(){var a=false;if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){var b={displayInLayerSwitcher:false,calculateInRange:function(){return true}};this.layer=new OpenLayers.Layer.Vector(this.CLASS_NAME,b);this.map.addLayer(this.layer);a=true}return a},deactivate:function(){var a=false;if(OpenLayers.Handler.Drag.prototype.deactivate.apply(this,arguments)){if(this.dragging){this.cancel()}if(this.layer.map!=null){this.layer.destroy(false);if(this.feature){this.feature.destroy()}}this.layer=null;this.feature=null;a=true}return a},down:function(a){this.fixedRadius=!!(this.radius);var b=this.map.getLonLatFromPixel(a.xy);this.origin=new OpenLayers.Geometry.Point(b.lon,b.lat);if(!this.fixedRadius||this.irregular){this.radius=this.map.getResolution()}if(this.persist){this.clear()}this.feature=new OpenLayers.Feature.Vector();this.createGeometry();this.callback("create",[this.origin,this.feature]);this.layer.addFeatures([this.feature],{silent:true});this.layer.drawFeature(this.feature,this.style)},move:function(d){var h=this.map.getLonLatFromPixel(d.xy);var a=new OpenLayers.Geometry.Point(h.lon,h.lat);if(this.irregular){var j=Math.sqrt(2)*Math.abs(a.y-this.origin.y)/2;this.radius=Math.max(this.map.getResolution()/2,j)}else{if(this.fixedRadius){this.origin=a}else{this.calculateAngle(a,d);this.radius=Math.max(this.map.getResolution()/2,a.distanceTo(this.origin))}}this.modifyGeometry();if(this.irregular){var f=a.x-this.origin.x;var b=a.y-this.origin.y;var g;if(b==0){g=f/(this.radius*Math.sqrt(2))}else{g=f/b}this.feature.geometry.resize(1,this.origin,g);this.feature.geometry.move(f/2,b/2)}this.layer.drawFeature(this.feature,this.style)},up:function(a){this.finalize();if(this.start==this.last){this.callback("done",[a.xy])}},out:function(a){this.finalize()},createGeometry:function(){this.angle=Math.PI*((1/this.sides)-(1/2));if(this.snapAngle){this.angle+=this.snapAngle*(Math.PI/180)}this.feature.geometry=OpenLayers.Geometry.Polygon.createRegularPolygon(this.origin,this.radius,this.sides,this.snapAngle)},modifyGeometry:function(){var h,d,b,a;var f=this.feature.geometry.components[0];if(f.components.length!=(this.sides+1)){this.createGeometry();f=this.feature.geometry.components[0]}for(var g=0;g<this.sides;++g){a=f.components[g];h=this.angle+(g*2*Math.PI/this.sides);a.x=this.origin.x+(this.radius*Math.cos(h));a.y=this.origin.y+(this.radius*Math.sin(h));a.clearBounds()}},calculateAngle:function(a,b){var f=Math.atan2(a.y-this.origin.y,a.x-this.origin.x);if(this.snapAngle&&(this.snapToggle&&!b[this.snapToggle])){var d=(Math.PI/180)*this.snapAngle;this.angle=Math.round(f/d)*d}else{this.angle=f}},cancel:function(){this.callback("cancel",null);this.finalize()},finalize:function(){this.origin=null;this.radius=this.options.radius},clear:function(){this.layer.renderer.clear();this.layer.destroyFeatures()},callback:function(b,a){if(this.callbacks[b]){this.callbacks[b].apply(this.control,[this.feature.geometry.clone()])}if(!this.persist&&(b=="done"||b=="cancel")){this.clear()}},CLASS_NAME:"OpenLayers.Handler.RegularPolygon"});OpenLayers.Layer.EventPane=OpenLayers.Class(OpenLayers.Layer,{smoothDragPan:true,isBaseLayer:true,isFixed:true,pane:null,mapObject:null,initialize:function(b,a){OpenLayers.Layer.prototype.initialize.apply(this,arguments);if(this.pane==null){this.pane=OpenLayers.Util.createDiv(this.div.id+"_EventPane")}},destroy:function(){this.mapObject=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments)},setMap:function(a){OpenLayers.Layer.prototype.setMap.apply(this,arguments);this.pane.style.zIndex=parseInt(this.div.style.zIndex)+1;this.pane.style.display=this.div.style.display;this.pane.style.width="100%";this.pane.style.height="100%";if(OpenLayers.Util.getBrowserName()=="msie"){this.pane.style.background="url("+OpenLayers.Util.getImagesLocation()+"blank.gif)"}if(this.isFixed){this.map.viewPortDiv.appendChild(this.pane)}else{this.map.layerContainerDiv.appendChild(this.pane)}this.loadMapObject();if(this.mapObject==null){this.loadWarningMessage()}},removeMap:function(a){if(this.pane&&this.pane.parentNode){this.pane.parentNode.removeChild(this.pane);this.pane=null}OpenLayers.Layer.prototype.removeMap.apply(this,arguments)},loadWarningMessage:function(){this.div.style.backgroundColor="darkblue";var j=this.map.getSize();var a=Math.min(j.w,300);var g=Math.min(j.h,200);var b=new OpenLayers.Size(a,g);var f=new OpenLayers.Pixel(j.w/2,j.h/2);var d=f.add(-b.w/2,-b.h/2);var h=OpenLayers.Util.createDiv(this.name+"_warning",d,b,null,null,null,"auto");h.style.padding="7px";h.style.backgroundColor="yellow";h.innerHTML=this.getWarningHTML();this.div.appendChild(h)},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(d,f,o){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);if(this.mapObject!=null){var g=this.map.getCenter();var j=this.map.getZoom();if(g!=null){var h=this.getMapObjectCenter();var b=this.getOLLonLatFromMapObjectLonLat(h);var l=this.getMapObjectZoom();var r=this.getOLZoomFromMapObjectZoom(l);if(!(g.equals(b))||!(j==r)){if(o&&this.dragPanMapObject&&this.smoothDragPan){var m=this.map.getViewPortPxFromLonLat(b);var p=this.map.getViewPortPxFromLonLat(g);this.dragPanMapObject(p.x-m.x,m.y-p.y)}else{var a=this.getMapObjectLonLatFromOLLonLat(g);var q=this.getMapObjectZoomFromOLZoom(j);this.setMapObjectCenter(a,q,o)}}}}},getLonLatFromViewPortPx:function(a){var b=null;if((this.mapObject!=null)&&(this.getMapObjectCenter()!=null)){var f=this.getMapObjectPixelFromOLPixel(a);var d=this.getMapObjectLonLatFromMapObjectPixel(f);b=this.getOLLonLatFromMapObjectLonLat(d)}return b},getViewPortPxFromLonLat:function(b){var a=null;if((this.mapObject!=null)&&(this.getMapObjectCenter()!=null)){var f=this.getMapObjectLonLatFromOLLonLat(b);var d=this.getMapObjectPixelFromMapObjectLonLat(f);a=this.getOLPixelFromMapObjectPixel(d)}return a},getOLLonLatFromMapObjectLonLat:function(f){var a=null;if(f!=null){var d=this.getLongitudeFromMapObjectLonLat(f);var b=this.getLatitudeFromMapObjectLonLat(f);a=new OpenLayers.LonLat(d,b)}return a},getMapObjectLonLatFromOLLonLat:function(a){var b=null;if(a!=null){b=this.getMapObjectLonLatFromLonLat(a.lon,a.lat)}return b},getOLPixelFromMapObjectPixel:function(f){var b=null;if(f!=null){var a=this.getXFromMapObjectPixel(f);var d=this.getYFromMapObjectPixel(f);b=new OpenLayers.Pixel(a,d)}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 d=new Array("minZoomLevel","maxZoomLevel","numZoomLevels");for(var b=0,a=d.length;b<a;b++){var h=d[b];this[h]=(this.options[h]!=null)?this.options[h]:this.map[h]}if((this.minZoomLevel==null)||(this.minZoomLevel<this.MIN_ZOOM_LEVEL)){this.minZoomLevel=this.MIN_ZOOM_LEVEL}var j;var g=this.MAX_ZOOM_LEVEL-this.minZoomLevel+1;if(((this.options.numZoomLevels==null)&&(this.options.maxZoomLevel!=null))||((this.numZoomLevels==null)&&(this.maxZoomLevel!=null))){j=this.maxZoomLevel-this.minZoomLevel+1}else{j=this.numZoomLevels}if(j!=null){this.numZoomLevels=Math.min(j,g)}else{this.numZoomLevels=g}this.maxZoomLevel=this.minZoomLevel+this.numZoomLevels-1;if(this.RESOLUTIONS!=null){var f=0;this.resolutions=[];for(var b=this.minZoomLevel;b<=this.maxZoomLevel;b++){this.resolutions[f++]=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 d=this.map.getSize();var b=this.getExtent();if((d!=null)&&(b!=null)){a=Math.max(b.getWidth()/d.w,b.getHeight()/d.h)}return a}},getExtent:function(){var d=null;var b=this.map.getSize();var g=new OpenLayers.Pixel(0,0);var h=this.getLonLatFromViewPortPx(g);var a=new OpenLayers.Pixel(b.w,b.h);var f=this.getLonLatFromViewPortPx(a);if((h!=null)&&(f!=null)){d=new OpenLayers.Bounds(h.lon,f.lat,f.lon,h.lat)}return d},getZoomForResolution:function(a){if(this.resolutions!=null){return OpenLayers.Layer.prototype.getZoomForResolution.apply(this,arguments)}else{var b=OpenLayers.Layer.prototype.getExtent.apply(this,[]);return this.getZoomForExtent(b)}},getOLZoomFromMapObjectZoom:function(a){var b=null;if(a!=null){b=a-this.minZoomLevel}return b},getMapObjectZoomFromOLZoom:function(a){var b=null;if(a!=null){b=a+this.minZoomLevel}return b},CLASS_NAME:"OpenLayers.Layer.FixedZoomLevels"});OpenLayers.Layer.HTTPRequest=OpenLayers.Class(OpenLayers.Layer,{URL_HASH_FACTOR:(Math.sqrt(5)-1)/2,url:null,params:null,reproject:false,initialize:function(f,d,g,b){var a=arguments;a=[f,b];OpenLayers.Layer.prototype.initialize.apply(this,a);this.url=d;this.params=OpenLayers.Util.extend({},g)},destroy:function(){this.url=null;this.params=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments)},clone:function(a){if(a==null){a=new OpenLayers.Layer.HTTPRequest(this.name,this.url,this.params,this.options)}a=OpenLayers.Layer.prototype.clone.apply(this,[a]);return a},setUrl:function(a){this.url=a},mergeNewParams:function(a){this.params=OpenLayers.Util.extend(this.params,a);return this.redraw()},redraw:function(a){if(a){return this.mergeNewParams({_olSalt:Math.random()})}else{return OpenLayers.Layer.prototype.redraw.apply(this,[])}},selectUrl:function(g,f){var d=1;for(var b=0,a=g.length;b<a;b++){d*=g.charCodeAt(b)*this.URL_HASH_FACTOR;d-=Math.floor(d)}return f[Math.floor(d*f.length)]},getFullRequestString:function(h,g){var b=g||this.url;var j=OpenLayers.Util.extend({},this.params);j=OpenLayers.Util.extend(j,h);var a=OpenLayers.Util.getParameterString(j);if(b instanceof Array){b=this.selectUrl(a,b)}var f=OpenLayers.Util.upperCaseObject(OpenLayers.Util.getParameters(b));for(var l in j){if(l.toUpperCase() in f){delete j[l]}}a=OpenLayers.Util.getParameterString(j);var m=b;if(a!=""){var d=b.charAt(b.length-1);if((d=="&")||(d=="?")){m+=a}else{if(b.indexOf("?")==-1){m+="?"+a}else{m+="&"+a}}}return m},CLASS_NAME:"OpenLayers.Layer.HTTPRequest"});OpenLayers.Layer.Image=OpenLayers.Class(OpenLayers.Layer,{isBaseLayer:true,url:null,extent:null,size:null,tile:null,aspectRatio:null,initialize:function(d,b,g,f,a){this.url=b;this.extent=g;this.maxExtent=g;this.size=f;OpenLayers.Layer.prototype.initialize.apply(this,[d,a]);this.aspectRatio=(this.extent.getHeight()/this.size.h)/(this.extent.getWidth()/this.size.w)},destroy:function(){if(this.tile){this.removeTileMonitoringHooks(this.tile);this.tile.destroy();this.tile=null}OpenLayers.Layer.prototype.destroy.apply(this,arguments)},clone:function(a){if(a==null){a=new OpenLayers.Layer.Image(this.name,this.url,this.extent,this.size,this.options)}a=OpenLayers.Layer.prototype.clone.apply(this,[a]);return a},setMap:function(a){if(this.options.maxResolution==null){this.options.maxResolution=this.aspectRatio*this.extent.getWidth()/this.size.w}OpenLayers.Layer.prototype.setMap.apply(this,arguments)},moveTo:function(g,a,h){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);var b=(this.tile==null);if(a||b){this.setTileSize();var f=new OpenLayers.LonLat(this.extent.left,this.extent.top);var d=this.map.getLayerPxFromLonLat(f);if(b){this.tile=new OpenLayers.Tile.Image(this,d,this.extent,null,this.tileSize);this.addTileMonitoringHooks(this.tile)}else{this.tile.size=this.tileSize.clone();this.tile.position=d.clone()}this.tile.draw()}},setTileSize:function(){var b=this.extent.getWidth()/this.map.getResolution();var a=this.extent.getHeight()/this.map.getResolution();this.tileSize=new OpenLayers.Size(b,a)},addTileMonitoringHooks:function(a){a.onLoadStart=function(){this.events.triggerEvent("loadstart")};a.events.register("loadstart",this,a.onLoadStart);a.onLoadEnd=function(){this.events.triggerEvent("loadend")};a.events.register("loadend",this,a.onLoadEnd);a.events.register("unload",this,a.onLoadEnd)},removeTileMonitoringHooks:function(a){a.unload();a.events.un({loadstart:a.onLoadStart,loadend:a.onLoadEnd,unload:a.onLoadEnd,scope:this})},setUrl:function(a){this.url=a;this.tile.draw()},getURL:function(a){return this.url},CLASS_NAME:"OpenLayers.Layer.Image"});OpenLayers.Layer.Markers=OpenLayers.Class(OpenLayers.Layer,{isBaseLayer:false,markers:null,drawn:false,initialize:function(b,a){OpenLayers.Layer.prototype.initialize.apply(this,arguments);this.markers=[]},destroy:function(){this.clearMarkers();this.markers=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments)},setOpacity:function(b){if(b!=this.opacity){this.opacity=b;for(var d=0,a=this.markers.length;d<a;d++){this.markers[d].setOpacity(this.opacity)}}},moveTo:function(f,b,g){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);if(b||!this.drawn){for(var d=0,a=this.markers.length;d<a;d++){this.drawMarker(this.markers[d])}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 d=a.draw(b);this.div.appendChild(d)}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 f=0,a=this.markers.length;f<a;f++){var d=this.markers[f];b.extend(d.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(d,b){var a=d*20037508.34/180;var f=Math.log(Math.tan((90+b)*Math.PI/360))/(Math.PI/180);f=f*20037508.34/180;return new OpenLayers.LonLat(a,f)},inverseMercator:function(a,f){var d=(a/20037508.34)*180;var b=(f/20037508.34)*180;b=180/Math.PI*(2*Math.atan(Math.exp(b*Math.PI/180))-Math.PI/2);return new OpenLayers.LonLat(d,b)},projectForward:function(a){var b=OpenLayers.Layer.SphericalMercator.forwardMercator(a.x,a.y);a.x=b.lon;a.y=b.lat;return a},projectInverse:function(a){var b=OpenLayers.Layer.SphericalMercator.inverseMercator(a.x,a.y);a.x=b.lon;a.y=b.lat;return a}};OpenLayers.Projection.addTransform("EPSG:4326","EPSG:900913",OpenLayers.Layer.SphericalMercator.projectForward);OpenLayers.Projection.addTransform("EPSG:900913","EPSG:4326",OpenLayers.Layer.SphericalMercator.projectInverse);OpenLayers.Tile.WFS=OpenLayers.Class(OpenLayers.Tile,{features:null,url:null,request:null,initialize:function(f,a,g,b,d){OpenLayers.Tile.prototype.initialize.apply(this,arguments);this.url=b;this.features=[]},destroy:function(){OpenLayers.Tile.prototype.destroy.apply(this,arguments);this.destroyAllFeatures();this.features=null;this.url=null;if(this.request){this.request.abort();this.request=null}},clear:function(){this.destroyAllFeatures()},draw:function(){if(OpenLayers.Tile.prototype.draw.apply(this,arguments)){if(this.isLoading){this.events.triggerEvent("reload")}else{this.isLoading=true;this.events.triggerEvent("loadstart")}this.loadFeaturesForRegion(this.requestSuccess)}},loadFeaturesForRegion:function(b,a){if(this.request){this.request.abort()}this.request=OpenLayers.Request.GET({url:this.url,success:b,failure:a,scope:this})},requestSuccess:function(b){if(this.features){var f=b.responseXML;if(!f||!f.documentElement){f=b.responseText}if(this.layer.vectorMode){this.layer.addFeatures(this.layer.formatObject.read(f))}else{var a=new OpenLayers.Format.XML();if(typeof f=="string"){f=a.read(f)}var d=a.getElementsByTagNameNS(f,"http://www.opengis.net/gml","featureMember");this.addResults(d)}}if(this.events){this.events.triggerEvent("loadend")}this.request=null},addResults:function(d){for(var b=0;b<d.length;b++){var a=new this.layer.featureClass(this.layer,d[b]);this.features.push(a)}},destroyAllFeatures:function(){while(this.features.length>0){var a=this.features.shift();a.destroy()}},CLASS_NAME:"OpenLayers.Tile.WFS"});OpenLayers.Control.DrawFeature=OpenLayers.Class(OpenLayers.Control,{layer:null,callbacks:null,EVENT_TYPES:["featureadded"],featureAdded:function(){},handlerOptions:null,initialize:function(b,d,a){this.EVENT_TYPES=OpenLayers.Control.DrawFeature.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);OpenLayers.Control.prototype.initialize.apply(this,[a]);this.callbacks=OpenLayers.Util.extend({done:this.drawFeature,modify:function(h,g){this.layer.events.triggerEvent("sketchmodified",{vertex:h,feature:g})},create:function(h,g){this.layer.events.triggerEvent("sketchstarted",{vertex:h,feature:g})}},this.callbacks);this.layer=b;var f=this.layer.styleMap&&this.layer.styleMap.styles.temporary;if(f){this.handlerOptions=this.handlerOptions||{};this.handlerOptions.layerOptions=OpenLayers.Util.applyDefaults(this.handlerOptions.layerOptions,{styleMap:new OpenLayers.StyleMap({"default":f})})}this.handler=new d(this,this.callbacks,this.handlerOptions)},drawFeature:function(d){var a=new OpenLayers.Feature.Vector(d);var b=this.layer.events.triggerEvent("sketchcomplete",{feature:a});if(b!==false){a.state=OpenLayers.State.INSERT;this.layer.addFeatures([a]);this.featureAdded(a);this.events.triggerEvent("featureadded",{feature:a})}},CLASS_NAME:"OpenLayers.Control.DrawFeature"});OpenLayers.Control.Measure=OpenLayers.Class(OpenLayers.Control,{EVENT_TYPES:["measure","measurepartial"],handlerOptions:null,callbacks:null,displaySystem:"metric",geodesic:false,displaySystemUnits:{geographic:["dd"],english:["mi","ft","in"],metric:["km","m"]},partialDelay:300,delayedTrigger:null,persist:false,initialize:function(b,a){this.EVENT_TYPES=OpenLayers.Control.Measure.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);OpenLayers.Control.prototype.initialize.apply(this,[a]);this.callbacks=OpenLayers.Util.extend({done:this.measureComplete,point:this.measurePartial},this.callbacks);this.handlerOptions=OpenLayers.Util.extend({persist:this.persist},this.handlerOptions);this.handler=new b(this,this.callbacks,this.handlerOptions)},cancel:function(){this.handler.cancel()},updateHandler:function(b,a){var d=this.active;if(d){this.deactivate()}this.handler=new b(this,this.callbacks,a);if(d){this.activate()}},measureComplete:function(a){if(this.delayedTrigger){window.clearTimeout(this.delayedTrigger)}this.measure(a,"measure")},measurePartial:function(a,b){this.delayedTrigger=window.setTimeout(OpenLayers.Function.bind(function(){this.measure(b,"measurepartial")},this),this.partialDelay)},measure:function(f,b){var d,a;if(f.CLASS_NAME.indexOf("LineString")>-1){d=this.getBestLength(f);a=1}else{d=this.getBestArea(f);a=2}this.events.triggerEvent(b,{measure:d[0],units:d[1],order:a,geometry:f})},getBestArea:function(h){var b=this.displaySystemUnits[this.displaySystem];var g,f;for(var d=0,a=b.length;d<a;++d){g=b[d];f=this.getArea(h,g);if(f>1){break}}return[f,g]},getArea:function(h,a){var b,d;if(this.geodesic){b=h.getGeodesicArea(this.map.getProjectionObject());d="m"}else{b=h.getArea();d=this.map.getUnits()}var g=OpenLayers.INCHES_PER_UNIT[a];if(g){var f=OpenLayers.INCHES_PER_UNIT[d];b*=Math.pow((f/g),2)}return b},getBestLength:function(h){var b=this.displaySystemUnits[this.displaySystem];var g,f;for(var d=0,a=b.length;d<a;++d){g=b[d];f=this.getLength(h,g);if(f>1){break}}return[f,g]},getLength:function(h,a){var b,d;if(this.geodesic){b=h.getGeodesicLength(this.map.getProjectionObject());d="m"}else{b=h.getLength();d=this.map.getUnits()}var g=OpenLayers.INCHES_PER_UNIT[a];if(g){var f=OpenLayers.INCHES_PER_UNIT[d];b*=(f/g)}return b},CLASS_NAME:"OpenLayers.Control.Measure"});OpenLayers.Control.ZoomBox=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOOL,out:false,alwaysZoom:false,draw:function(){this.handler=new OpenLayers.Handler.Box(this,{done:this.zoomBox},{keyMask:this.keyMask})},zoomBox:function(l){if(l instanceof OpenLayers.Bounds){if(!this.out){var m=this.map.getLonLatFromPixel(new OpenLayers.Pixel(l.left,l.bottom));var r=this.map.getLonLatFromPixel(new OpenLayers.Pixel(l.right,l.top));var b=new OpenLayers.Bounds(m.lon,m.lat,r.lon,r.lat)}else{var j=Math.abs(l.right-l.left);var o=Math.abs(l.top-l.bottom);var g=Math.min((this.map.size.h/o),(this.map.size.w/j));var u=this.map.getExtent();var a=this.map.getLonLatFromPixel(l.getCenterPixel());var d=a.lon-(u.getWidth()/2)*g;var h=a.lon+(u.getWidth()/2)*g;var q=a.lat-(u.getHeight()/2)*g;var f=a.lat+(u.getHeight()/2)*g;var b=new OpenLayers.Bounds(d,q,h,f)}var p=this.map.getZoom();this.map.zoomToExtent(b);if(p==this.map.getZoom()&&this.alwaysZoom==true){this.map.zoomTo(p+(this.out?-1:1))}}else{if(!this.out){this.map.setCenter(this.map.getLonLatFromPixel(l),this.map.getZoom()+1)}else{this.map.setCenter(this.map.getLonLatFromPixel(l),this.map.getZoom()-1)}}},CLASS_NAME:"OpenLayers.Control.ZoomBox"});OpenLayers.Format.WFSCapabilities.v1_0_0=OpenLayers.Class(OpenLayers.Format.WFSCapabilities.v1,{initialize:function(a){OpenLayers.Format.WFSCapabilities.v1.prototype.initialize.apply(this,[a])},CLASS_NAME:"OpenLayers.Format.WFSCapabilities.v1_0_0"});OpenLayers.Format.WFSCapabilities.v1_1_0=OpenLayers.Class(OpenLayers.Format.WFSCapabilities.v1,{initialize:function(a){OpenLayers.Format.WFSCapabilities.v1.prototype.initialize.apply(this,[a])},CLASS_NAME:"OpenLayers.Format.WFSCapabilities.v1_1_0"});OpenLayers.Format.WKT=OpenLayers.Class(OpenLayers.Format,{initialize:function(a){this.regExes={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/};OpenLayers.Format.prototype.initialize.apply(this,[a])},read:function(h){var g,f,l;var j=this.regExes.typeStr.exec(h);if(j){f=j[1].toLowerCase();l=j[2];if(this.parse[f]){g=this.parse[f].apply(this,[l])}if(this.internalProjection&&this.externalProjection){if(g&&g.CLASS_NAME=="OpenLayers.Feature.Vector"){g.geometry.transform(this.externalProjection,this.internalProjection)}else{if(g&&f!="geometrycollection"&&typeof g=="object"){for(var d=0,a=g.length;d<a;d++){var b=g[d];b.geometry.transform(this.externalProjection,this.internalProjection)}}}}}return g},write:function(a){var h,m,l,f,b;if(a.constructor==Array){h=a;b=true}else{h=[a];b=false}var d=[];if(b){d.push("GEOMETRYCOLLECTION(")}for(var g=0,j=h.length;g<j;++g){if(b&&g>0){d.push(",")}m=h[g].geometry;l=m.CLASS_NAME.split(".")[2].toLowerCase();if(!this.extract[l]){return null}if(this.internalProjection&&this.externalProjection){m=m.clone();m.transform(this.internalProjection,this.externalProjection)}f=this.extract[l].apply(this,[m]);d.push(l.toUpperCase()+"("+f+")")}if(b){d.push(")")}return d.join("")},extract:{point:function(a){return a.x+" "+a.y},multipoint:function(d){var f=[];for(var b=0,a=d.components.length;b<a;++b){f.push(this.extract.point.apply(this,[d.components[b]]))}return f.join(",")},linestring:function(b){var f=[];for(var d=0,a=b.components.length;d<a;++d){f.push(this.extract.point.apply(this,[b.components[d]]))}return f.join(",")},multilinestring:function(d){var f=[];for(var b=0,a=d.components.length;b<a;++b){f.push("("+this.extract.linestring.apply(this,[d.components[b]])+")")}return f.join(",")},polygon:function(d){var f=[];for(var b=0,a=d.components.length;b<a;++b){f.push("("+this.extract.linestring.apply(this,[d.components[b]])+")")}return f.join(",")},multipolygon:function(f){var d=[];for(var b=0,a=f.components.length;b<a;++b){d.push("("+this.extract.polygon.apply(this,[f.components[b]])+")")}return d.join(",")}},parse:{point:function(b){var a=OpenLayers.String.trim(b).split(this.regExes.spaces);return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(a[0],a[1]))},multipoint:function(g){var d=OpenLayers.String.trim(g).split(",");var f=[];for(var b=0,a=d.length;b<a;++b){f.push(this.parse.point.apply(this,[d[b]]).geometry)}return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiPoint(f))},linestring:function(g){var d=OpenLayers.String.trim(g).split(",");var f=[];for(var b=0,a=d.length;b<a;++b){f.push(this.parse.point.apply(this,[d[b]]).geometry)}return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString(f))},multilinestring:function(h){var d;var b=OpenLayers.String.trim(h).split(this.regExes.parenComma);var g=[];for(var f=0,a=b.length;f<a;++f){d=b[f].replace(this.regExes.trimParens,"$1");g.push(this.parse.linestring.apply(this,[d]).geometry)}return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiLineString(g))},polygon:function(l){var d,b,h;var j=OpenLayers.String.trim(l).split(this.regExes.parenComma);var g=[];for(var f=0,a=j.length;f<a;++f){d=j[f].replace(this.regExes.trimParens,"$1");b=this.parse.linestring.apply(this,[d]).geometry;h=new OpenLayers.Geometry.LinearRing(b.components);g.push(h)}return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon(g))},multipolygon:function(h){var f;var b=OpenLayers.String.trim(h).split(this.regExes.doubleParenComma);var g=[];for(var d=0,a=b.length;d<a;++d){f=b[d].replace(this.regExes.trimParens,"$1");g.push(this.parse.polygon.apply(this,[f]).geometry)}return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiPolygon(g))},geometrycollection:function(g){g=g.replace(/,\s*([A-Za-z])/g,"|$1");var f=OpenLayers.String.trim(g).split("|");var d=[];for(var b=0,a=f.length;b<a;++b){d.push(OpenLayers.Format.WKT.prototype.read.apply(this,[f[b]]))}return d}},CLASS_NAME:"OpenLayers.Format.WKT"});OpenLayers.Format.WMC.v1_0_0=OpenLayers.Class(OpenLayers.Format.WMC.v1,{VERSION:"1.0.0",schemaLocation:"http://www.opengis.net/context http://schemas.opengis.net/context/1.0.0/context.xsd",initialize:function(a){OpenLayers.Format.WMC.v1.prototype.initialize.apply(this,[a])},CLASS_NAME:"OpenLayers.Format.WMC.v1_0_0"});OpenLayers.Format.WMC.v1_1_0=OpenLayers.Class(OpenLayers.Format.WMC.v1,{VERSION:"1.1.0",schemaLocation:"http://www.opengis.net/context http://schemas.opengis.net/context/1.1.0/context.xsd",initialize:function(a){OpenLayers.Format.WMC.v1.prototype.initialize.apply(this,[a])},read_sld_MinScaleDenominator:function(b,a){b.options.maxScale=this.getChildValue(a)},read_sld_MaxScaleDenominator:function(b,a){b.options.minScale=this.getChildValue(a)},write_wmc_Layer:function(b){var d=OpenLayers.Format.WMC.v1.prototype.write_wmc_Layer.apply(this,[b]);if(b.options.resolutions||b.options.scales||b.options.minResolution||b.options.maxScale){var f=this.createElementNS(this.namespaces.sld,"sld:MinScaleDenominator");f.appendChild(this.createTextNode(b.maxScale.toPrecision(10)));d.insertBefore(f,d.childNodes[3])}if(b.options.resolutions||b.options.scales||b.options.maxResolution||b.options.minScale){var a=this.createElementNS(this.namespaces.sld,"sld:MaxScaleDenominator");a.appendChild(this.createTextNode(b.minScale.toPrecision(10)));d.insertBefore(a,d.childNodes[4])}return d},CLASS_NAME:"OpenLayers.Format.WMC.v1_1_0"});OpenLayers.Layer.Boxes=OpenLayers.Class(OpenLayers.Layer.Markers,{initialize:function(b,a){OpenLayers.Layer.Markers.prototype.initialize.apply(this,arguments)},drawMarker:function(a){var f=a.bounds;var h=this.map.getLayerPxFromLonLat(new OpenLayers.LonLat(f.left,f.top));var d=this.map.getLayerPxFromLonLat(new OpenLayers.LonLat(f.right,f.bottom));if(d==null||h==null){a.display(false)}else{var g=new OpenLayers.Size(Math.max(1,d.x-h.x),Math.max(1,d.y-h.y));var b=a.draw(h,g);if(!a.drawn){this.div.appendChild(b);a.drawn=true}}},removeMarker:function(a){OpenLayers.Util.removeItem(this.markers,a);if((a.div!=null)&&(a.div.parentNode==this.div)){this.div.removeChild(a.div)}},CLASS_NAME:"OpenLayers.Layer.Boxes"});OpenLayers.Layer.GeoRSS=OpenLayers.Class(OpenLayers.Layer.Markers,{location:null,features:null,formatOptions:null,selectedFeature:null,icon:null,popupSize:null,useFeedTitle:true,initialize:function(d,a,b){OpenLayers.Layer.Markers.prototype.initialize.apply(this,[d,b]);this.location=a;this.features=[]},destroy:function(){OpenLayers.Layer.Markers.prototype.destroy.apply(this,arguments);this.clearFeatures();this.features=null},loadRSS:function(){if(!this.loaded){this.events.triggerEvent("loadstart");OpenLayers.Request.GET({url:this.location,success:this.parseData,scope:this});this.loaded=true}},moveTo:function(d,a,b){OpenLayers.Layer.Markers.prototype.moveTo.apply(this,arguments);if(this.visibility&&!this.loaded){this.loadRSS()}},parseData:function(m){var r=m.responseXML;if(!r||!r.documentElement){r=OpenLayers.Format.XML.prototype.read(m.responseText)}if(this.useFeedTitle){var a=null;try{a=r.getElementsByTagNameNS("*","title")[0].firstChild.nodeValue}catch(l){a=r.getElementsByTagName("title")[0].firstChild.nodeValue}if(a){this.setName(a)}}var z={};OpenLayers.Util.extend(z,this.formatOptions);if(this.map&&!this.projection.equals(this.map.getProjectionObject())){z.externalProjection=this.projection;z.internalProjection=this.map.getProjectionObject()}var u=new OpenLayers.Format.GeoRSS(z);var b=u.read(r);for(var h=0,j=b.length;h<j;h++){var g={};var w=b[h];if(!w.geometry){continue}var p=w.attributes.title?w.attributes.title:"Untitled";var v=w.attributes.description?w.attributes.description:"No description.";var o=w.attributes.link?w.attributes.link:"";var q=w.geometry.getBounds().getCenterLonLat();g.icon=this.icon==null?OpenLayers.Marker.defaultIcon():this.icon.clone();g.popupSize=this.popupSize?this.popupSize.clone():new OpenLayers.Size(250,120);if(p||v){g.title=p;g.description=v;var d='<div class="olLayerGeoRSSClose">[x]</div>';d+='<div class="olLayerGeoRSSTitle">';if(o){d+='<a class="link" href="'+o+'" target="_blank">'}d+=p;if(o){d+="</a>"}d+="</div>";d+='<div style="" class="olLayerGeoRSSDescription">';d+=v;d+="</div>";g.popupContentHTML=d}var w=new OpenLayers.Feature(this,q,g);this.features.push(w);var f=w.createMarker();f.events.register("click",w,this.markerClick);this.addMarker(f)}this.events.triggerEvent("loadend")},markerClick:function(d){var g=(this==this.layer.selectedFeature);this.layer.selectedFeature=(!g)?this:null;for(var f=0,a=this.layer.map.popups.length;f<a;f++){this.layer.map.removePopup(this.layer.map.popups[f])}if(!g){var b=this.createPopup();OpenLayers.Event.observe(b.div,"click",OpenLayers.Function.bind(function(){for(var j=0,h=this.layer.map.popups.length;j<h;j++){this.layer.map.removePopup(this.layer.map.popups[j])}},this));this.layer.map.addPopup(b)}OpenLayers.Event.stop(d)},clearFeatures:function(){if(this.features!=null){while(this.features.length>0){var a=this.features[0];OpenLayers.Util.removeItem(this.features,a);a.destroy()}}},CLASS_NAME:"OpenLayers.Layer.GeoRSS"});OpenLayers.Layer.Google=OpenLayers.Class(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:0,MAX_ZOOM_LEVEL:19,RESOLUTIONS:[1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125,0.00002145767211914062,0.00001072883605957031,0.00000536441802978515,0.00000268220901489257],type:null,sphericalMercator:false,dragObject:null,termsOfUse:null,poweredBy:null,initialize:function(b,a){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);this.addContainerPxFunction();if(this.sphericalMercator){OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator);this.initMercatorParameters()}},loadMapObject:function(){try{this.mapObject=new GMap2(this.div);if(typeof this.mapObject.getDragObject=="function"){this.dragObject=this.mapObject.getDragObject()}else{this.dragPanMapObject=null}this.termsOfUse=this.div.lastChild;this.div.removeChild(this.termsOfUse);if(this.isFixed){this.map.viewPortDiv.appendChild(this.termsOfUse)}else{this.map.layerContainerDiv.appendChild(this.termsOfUse)}this.termsOfUse.style.zIndex="1100";this.termsOfUse.style.display=this.div.style.display;this.termsOfUse.style.right="";this.termsOfUse.style.bottom="";this.termsOfUse.className="olLayerGoogleCopyright";this.poweredBy=this.div.lastChild;this.div.removeChild(this.poweredBy);if(this.isFixed){this.map.viewPortDiv.appendChild(this.poweredBy)}else{this.map.layerContainerDiv.appendChild(this.poweredBy)}this.poweredBy.style.zIndex="1100";this.poweredBy.style.display=this.div.style.display;this.poweredBy.style.right="";this.poweredBy.style.bottom="";this.poweredBy.className="olLayerGooglePoweredBy gmnoprint"}catch(a){OpenLayers.Console.error(a)}},setMap:function(a){OpenLayers.Layer.EventPane.prototype.setMap.apply(this,arguments);if(this.type!=null){this.map.events.register("moveend",this,this.setMapType)}},setMapType:function(){if(this.mapObject.getCenter()!=null){if(OpenLayers.Util.indexOf(this.mapObject.getMapTypes(),this.type)==-1){this.mapObject.addMapType(this.type)}this.mapObject.setMapType(this.type);this.map.events.unregister("moveend",this,this.setMapType)}},onMapResize:function(){if(this.visibility&&this.mapObject.isLoaded()){this.mapObject.checkResize()}else{if(!this._resized){var a=this;var b=GEvent.addListener(this.mapObject,"load",function(){GEvent.removeListener(b);delete a._resized;a.mapObject.checkResize();a.moveTo(a.map.getCenter(),a.map.getZoom())})}this._resized=true}},display:function(a){OpenLayers.Layer.EventPane.prototype.display.apply(this,arguments);this.termsOfUse.style.display=this.div.style.display;this.poweredBy.style.display=this.div.style.display},removeMap:function(a){if(this.termsOfUse&&this.termsOfUse.parentNode){this.termsOfUse.parentNode.removeChild(this.termsOfUse);this.termsOfUse=null}if(this.poweredBy&&this.poweredBy.parentNode){this.poweredBy.parentNode.removeChild(this.poweredBy);this.poweredBy=null}OpenLayers.Layer.EventPane.prototype.removeMap.apply(this,arguments)},getOLBoundsFromMapObjectBounds:function(b){var d=null;if(b!=null){var a=b.getSouthWest();var f=b.getNorthEast();if(this.sphericalMercator){a=this.forwardMercator(a.lng(),a.lat());f=this.forwardMercator(f.lng(),f.lat())}else{a=new OpenLayers.LonLat(a.lng(),a.lat());f=new OpenLayers.LonLat(f.lng(),f.lat())}d=new OpenLayers.Bounds(a.lon,a.lat,f.lon,f.lat)}return d},getMapObjectBoundsFromOLBounds:function(d){var b=null;if(d!=null){var a=this.sphericalMercator?this.inverseMercator(d.bottom,d.left):new OpenLayers.LonLat(d.bottom,d.left);var f=this.sphericalMercator?this.inverseMercator(d.top,d.right):new OpenLayers.LonLat(d.top,d.right);b=new GLatLngBounds(new GLatLng(a.lat,a.lon),new GLatLng(f.lat,f.lon))}return b},addContainerPxFunction:function(){if((typeof GMap2!="undefined")&&!GMap2.prototype.fromLatLngToContainerPixel){GMap2.prototype.fromLatLngToContainerPixel=function(b){var a=this.fromLatLngToDivPixel(b);var d=this.getContainer().firstChild.firstChild;a.x+=d.offsetLeft;a.y+=d.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(f,b){var d;if(this.sphericalMercator){var a=this.inverseMercator(f,b);d=new GLatLng(a.lat,a.lon)}else{d=new GLatLng(b,f)}return d},getXFromMapObjectPixel:function(a){return a.x},getYFromMapObjectPixel:function(a){return a.y},getMapObjectPixelFromXY:function(a,b){return new GPoint(a,b)},CLASS_NAME:"OpenLayers.Layer.Google"});OpenLayers.Layer.Grid=OpenLayers.Class(OpenLayers.Layer.HTTPRequest,{tileSize:null,grid:null,singleTile:false,ratio:1.5,buffer:2,numLoadingTiles:0,initialize:function(d,b,f,a){OpenLayers.Layer.HTTPRequest.prototype.initialize.apply(this,arguments);this.events.addEventType("tileloaded");this.grid=[]},destroy:function(){this.clearGrid();this.grid=null;this.tileSize=null;OpenLayers.Layer.HTTPRequest.prototype.destroy.apply(this,arguments)},clearGrid:function(){if(this.grid){for(var h=0,b=this.grid.length;h<b;h++){var g=this.grid[h];for(var d=0,a=g.length;d<a;d++){var f=g[d];this.removeTileMonitoringHooks(f);f.destroy()}}this.grid=[]}},clone:function(a){if(a==null){a=new OpenLayers.Layer.Grid(this.name,this.url,this.params,this.options)}a=OpenLayers.Layer.HTTPRequest.prototype.clone.apply(this,[a]);if(this.tileSize!=null){a.tileSize=this.tileSize.clone()}a.grid=[];return a},moveTo:function(f,a,g){OpenLayers.Layer.HTTPRequest.prototype.moveTo.apply(this,arguments);f=f||this.map.getExtent();if(f!=null){var d=!this.grid.length||a;var b=this.getTilesBounds();if(this.singleTile){if(d||(!g&&!b.containsBounds(f))){this.initSingleTile(f)}}else{if(d||!b.containsBounds(f,true)){this.initGriddedTiles(f)}else{this.moveGriddedTiles(f)}}}},setTileSize:function(a){if(this.singleTile){a=this.map.getSize().clone();a.h=parseInt(a.h*this.ratio);a.w=parseInt(a.w*this.ratio)}OpenLayers.Layer.HTTPRequest.prototype.setTileSize.apply(this,[a])},getGridBounds:function(){var a="The getGridBounds() function is deprecated. It will be removed in 3.0. Please use getTilesBounds() instead.";OpenLayers.Console.warn(a);return this.getTilesBounds()},getTilesBounds:function(){var g=null;if(this.grid.length){var a=this.grid.length-1;var f=this.grid[a][0];var b=this.grid[0].length-1;var d=this.grid[0][b];g=new OpenLayers.Bounds(f.bounds.left,f.bounds.bottom,d.bounds.right,d.bounds.top)}return g},initSingleTile:function(h){var a=h.getCenterLonLat();var l=h.getWidth()*this.ratio;var b=h.getHeight()*this.ratio;var j=new OpenLayers.Bounds(a.lon-(l/2),a.lat-(b/2),a.lon+(l/2),a.lat+(b/2));var f=new OpenLayers.LonLat(j.left,j.top);var d=this.map.getLayerPxFromLonLat(f);if(!this.grid.length){this.grid[0]=[]}var g=this.grid[0][0];if(!g){g=this.addTile(j,d);this.addTileMonitoringHooks(g);g.draw();this.grid[0][0]=g}else{g.moveTo(j,d)}this.removeExcessTiles(1,1)},calculateGridLayout:function(a,v,g){var p=g*this.tileSize.w;var d=g*this.tileSize.h;var m=a.left-v.left;var q=Math.floor(m/p)-this.buffer;var o=m/p-q;var h=-o*this.tileSize.w;var r=v.left+q*p;var b=a.top-(v.bottom+d);var l=Math.ceil(b/d)+this.buffer;var u=l-b/d;var f=-u*this.tileSize.h;var j=v.bottom+l*d;return{tilelon:p,tilelat:d,tileoffsetlon:r,tileoffsetlat:j,tileoffsetx:h,tileoffsety:f}},initGriddedTiles:function(m){var j=this.map.getSize();var F=Math.ceil(j.h/this.tileSize.h)+Math.max(1,2*this.buffer);var H=Math.ceil(j.w/this.tileSize.w)+Math.max(1,2*this.buffer);var v=this.maxExtent;var B=this.map.getResolution();var z=this.calculateGridLayout(m,v,B);var h=Math.round(z.tileoffsetx);var d=Math.round(z.tileoffsety);var p=z.tileoffsetlon;var u=z.tileoffsetlat;var g=z.tilelon;var o=z.tilelat;this.origin=new OpenLayers.Pixel(h,d);var E=h;var G=p;var D=0;var a=parseInt(this.map.layerContainerDiv.style.left);var C=parseInt(this.map.layerContainerDiv.style.top);do{var l=this.grid[D++];if(!l){l=[];this.grid.push(l)}p=G;h=E;var f=0;do{var b=new OpenLayers.Bounds(p,u,p+g,u+o);var r=h;r-=a;var q=d;q-=C;var w=new OpenLayers.Pixel(r,q);var I=l[f++];if(!I){I=this.addTile(b,w);this.addTileMonitoringHooks(I);l.push(I)}else{I.moveTo(b,w,false)}p+=g;h+=this.tileSize.w}while((p<=m.right+g*this.buffer)||f<H);u-=o;d+=this.tileSize.h}while((u>=m.bottom-o*this.buffer)||D<F);this.removeExcessTiles(D,f);this.spiralTileLoad()},spiralTileLoad:function(){var b=[];var l=["right","down","left","up"];var j=0;var a=-1;var o=OpenLayers.Util.indexOf(l,"right");var p=0;while(p<l.length){var m=j;var d=a;switch(l[o]){case"right":d++;break;case"down":m++;break;case"left":d--;break;case"up":m--;break}var h=null;if((m<this.grid.length)&&(m>=0)&&(d<this.grid[0].length)&&(d>=0)){h=this.grid[m][d]}if((h!=null)&&(!h.queued)){b.unshift(h);h.queued=true;p=0;j=m;a=d}else{o=(o+1)%4;p++}}for(var f=0,g=b.length;f<g;f++){var h=b[f];h.draw();h.queued=false}},addTile:function(b,a){},addTileMonitoringHooks:function(a){a.onLoadStart=function(){if(this.numLoadingTiles==0){this.events.triggerEvent("loadstart")}this.numLoadingTiles++};a.events.register("loadstart",this,a.onLoadStart);a.onLoadEnd=function(){this.numLoadingTiles--;this.events.triggerEvent("tileloaded");if(this.numLoadingTiles==0){this.events.triggerEvent("loadend")}};a.events.register("loadend",this,a.onLoadEnd);a.events.register("unload",this,a.onLoadEnd)},removeTileMonitoringHooks:function(a){a.unload();a.events.un({loadstart:a.onLoadStart,loadend:a.onLoadEnd,unload:a.onLoadEnd,scope:this})},moveGriddedTiles:function(d){var b=this.buffer||1;while(true){var a=this.grid[0][0].position;var f=this.map.getViewPortPxFromLayerPx(a);if(f.x>-this.tileSize.w*(b-1)){this.shiftColumn(true)}else{if(f.x<-this.tileSize.w*b){this.shiftColumn(false)}else{if(f.y>-this.tileSize.h*(b-1)){this.shiftRow(true)}else{if(f.y<-this.tileSize.h*b){this.shiftRow(false)}else{break}}}}}},shiftRow:function(r){var d=(r)?0:(this.grid.length-1);var b=this.grid;var h=b[d];var g=this.map.getResolution();var l=(r)?-this.tileSize.h:this.tileSize.h;var j=g*-l;var q=(r)?b.pop():b.shift();for(var m=0,p=h.length;m<p;m++){var f=h[m];var a=f.bounds.clone();var o=f.position.clone();a.bottom=a.bottom+j;a.top=a.top+j;o.y=o.y+l;q[m].moveTo(a,o)}if(r){b.unshift(q)}else{b.push(q)}},shiftColumn:function(q){var f=(q)?-this.tileSize.w:this.tileSize.w;var d=this.map.getResolution();var o=d*f;for(var g=0,j=this.grid.length;g<j;g++){var p=this.grid[g];var m=(q)?0:(p.length-1);var b=p[m];var a=b.bounds.clone();var h=b.position.clone();a.left=a.left+o;a.right=a.right+o;h.x=h.x+f;var l=q?this.grid[g].pop():this.grid[g].shift();l.moveTo(a,h);if(q){p.unshift(l)}else{p.push(l)}}},removeExcessTiles:function(g,d){while(this.grid.length>g){var h=this.grid.pop();for(var b=0,a=h.length;b<a;b++){var f=h[b];this.removeTileMonitoringHooks(f);f.destroy()}}while(this.grid[0].length>d){for(var b=0,a=this.grid.length;b<a;b++){var h=this.grid[b];var f=h.pop();this.removeTileMonitoringHooks(f);f.destroy()}}},onMapResize:function(){if(this.singleTile){this.clearGrid();this.setTileSize()}},getTileBounds:function(f){var d=this.maxExtent;var h=this.getResolution();var g=h*this.tileSize.w;var b=h*this.tileSize.h;var l=this.getLonLatFromViewPortPx(f);var a=d.left+(g*Math.floor((l.lon-d.left)/g));var j=d.bottom+(b*Math.floor((l.lat-d.bottom)/b));return new OpenLayers.Bounds(a,j,a+g,j+b)},CLASS_NAME:"OpenLayers.Layer.Grid"});OpenLayers.Layer.MultiMap=OpenLayers.Class(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:1,MAX_ZOOM_LEVEL:17,RESOLUTIONS:[9,1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125],type:null,initialize:function(b,a){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);if(this.sphericalMercator){OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator);this.initMercatorParameters();this.RESOLUTIONS.unshift(10)}},loadMapObject:function(){try{this.mapObject=new MultimapViewer(this.div)}catch(a){}},getWarningHTML:function(){return OpenLayers.i18n("getLayerWarning",{layerType:"MM",layerLib:"MultiMap"})},setMapObjectCenter:function(a,b){this.mapObject.goToPosition(a,b)},getMapObjectCenter:function(){return this.mapObject.getCurrentPosition()},getMapObjectZoom:function(){return this.mapObject.getZoomFactor()},getMapObjectLonLatFromMapObjectPixel:function(a){a.x=a.x-(this.map.getSize().w/2);a.y=a.y-(this.map.getSize().h/2);return this.mapObject.getMapPositionAt(a)},getMapObjectPixelFromMapObjectLonLat:function(a){return this.mapObject.geoPosToContainerPixels(a)},getLongitudeFromMapObjectLonLat:function(a){return this.sphericalMercator?this.forwardMercator(a.lon,a.lat).lon:a.lon},getLatitudeFromMapObjectLonLat:function(a){return this.sphericalMercator?this.forwardMercator(a.lon,a.lat).lat:a.lat},getMapObjectLonLatFromLonLat:function(f,d){var a;if(this.sphericalMercator){var b=this.inverseMercator(f,d);a=new MMLatLon(b.lat,b.lon)}else{a=new MMLatLon(d,f)}return a},getXFromMapObjectPixel:function(a){return a.x},getYFromMapObjectPixel:function(a){return a.y},getMapObjectPixelFromXY:function(a,b){return new MMPoint(a,b)},CLASS_NAME:"OpenLayers.Layer.MultiMap"});OpenLayers.Layer.Text=OpenLayers.Class(OpenLayers.Layer.Markers,{location:null,features:null,formatOptions:null,selectedFeature:null,initialize:function(b,a){OpenLayers.Layer.Markers.prototype.initialize.apply(this,arguments);this.features=new Array()},destroy:function(){OpenLayers.Layer.Markers.prototype.destroy.apply(this,arguments);this.clearFeatures();this.features=null},loadText:function(){if(!this.loaded){if(this.location!=null){var a=function(b){this.events.triggerEvent("loadend")};this.events.triggerEvent("loadstart");OpenLayers.Request.GET({url:this.location,success:this.parseData,failure:a,scope:this});this.loaded=true}}},moveTo:function(d,a,b){OpenLayers.Layer.Markers.prototype.moveTo.apply(this,arguments);if(this.visibility&&!this.loaded){this.loadText()}},parseData:function(o){var q=o.responseText;var u={};OpenLayers.Util.extend(u,this.formatOptions);if(this.map&&!this.projection.equals(this.map.getProjectionObject())){u.externalProjection=this.projection;u.internalProjection=this.map.getProjectionObject()}var b=new OpenLayers.Format.Text(u);var d=b.read(q);for(var j=0,l=d.length;j<l;j++){var h={};var r=d[j];var p;var m,f;p=new OpenLayers.LonLat(r.geometry.x,r.geometry.y);if(r.style.graphicWidth&&r.style.graphicHeight){m=new OpenLayers.Size(r.style.graphicWidth,r.style.graphicHeight)}if(r.style.graphicXOffset!==undefined&&r.style.graphicYOffset!==undefined){f=new OpenLayers.Pixel(r.style.graphicXOffset,r.style.graphicYOffset)}if(r.style.externalGraphic!=null){h.icon=new OpenLayers.Icon(r.style.externalGraphic,m,f)}else{h.icon=OpenLayers.Marker.defaultIcon();if(m!=null){h.icon.setSize(m)}}if((r.attributes.title!=null)&&(r.attributes.description!=null)){h.popupContentHTML="<h2>"+r.attributes.title+"</h2><p>"+r.attributes.description+"</p>"}h.overflow=r.attributes.overflow||"auto";var a=new OpenLayers.Feature(this,p,h);this.features.push(a);var g=a.createMarker();if((r.attributes.title!=null)&&(r.attributes.description!=null)){g.events.register("click",a,this.markerClick)}this.addMarker(g)}this.events.triggerEvent("loadend")},markerClick:function(b){var f=(this==this.layer.selectedFeature);this.layer.selectedFeature=(!f)?this:null;for(var d=0,a=this.layer.map.popups.length;d<a;d++){this.layer.map.removePopup(this.layer.map.popups[d])}if(!f){this.layer.map.addPopup(this.createPopup())}OpenLayers.Event.stop(b)},clearFeatures:function(){if(this.features!=null){while(this.features.length>0){var a=this.features[0];OpenLayers.Util.removeItem(this.features,a);a.destroy()}}},CLASS_NAME:"OpenLayers.Layer.Text"});OpenLayers.Layer.VirtualEarth=OpenLayers.Class(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:1,MAX_ZOOM_LEVEL:17,RESOLUTIONS:[1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125,0.00002145767211914062],type:null,sphericalMercator:false,initialize:function(b,a){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);if(this.sphericalMercator){OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator);this.initMercatorParameters()}},loadMapObject:function(){var a=OpenLayers.Util.createDiv(this.name);var d=this.map.getSize();a.style.width=d.w+"px";a.style.height=d.h+"px";this.div.appendChild(a);try{this.mapObject=new VEMap(this.name)}catch(b){}if(this.mapObject!=null){try{this.mapObject.LoadMap(null,null,this.type,true);this.mapObject.AttachEvent("onmousedown",function(){return true})}catch(b){}this.mapObject.HideDashboard()}if(!this.mapObject||!this.mapObject.vemapcontrol||!this.mapObject.vemapcontrol.PanMap||(typeof this.mapObject.vemapcontrol.PanMap!="function")){this.dragPanMapObject=null}},getWarningHTML:function(){return OpenLayers.i18n("getLayerWarning",{layerType:"VE",layerLib:"VirtualEarth"})},setMapObjectCenter:function(a,b){this.mapObject.SetCenterAndZoom(a,b)},getMapObjectCenter:function(){return this.mapObject.GetCenter()},dragPanMapObject:function(b,a){this.mapObject.vemapcontrol.PanMap(b,-a)},getMapObjectZoom:function(){return this.mapObject.GetZoomLevel()},getMapObjectLonLatFromMapObjectPixel:function(a){return(typeof VEPixel!="undefined")?this.mapObject.PixelToLatLong(a):this.mapObject.PixelToLatLong(a.x,a.y)},getMapObjectPixelFromMapObjectLonLat:function(a){return this.mapObject.LatLongToPixel(a)},getLongitudeFromMapObjectLonLat:function(a){return this.sphericalMercator?this.forwardMercator(a.Longitude,a.Latitude).lon:a.Longitude},getLatitudeFromMapObjectLonLat:function(a){return this.sphericalMercator?this.forwardMercator(a.Longitude,a.Latitude).lat:a.Latitude},getMapObjectLonLatFromLonLat:function(f,b){var d;if(this.sphericalMercator){var a=this.inverseMercator(f,b);d=new VELatLong(a.lat,a.lon)}else{d=new VELatLong(b,f)}return d},getXFromMapObjectPixel:function(a){return a.x},getYFromMapObjectPixel:function(a){return a.y},getMapObjectPixelFromXY:function(a,b){return(typeof VEPixel!="undefined")?new VEPixel(a,b):new Msn.VE.Pixel(a,b)},CLASS_NAME:"OpenLayers.Layer.VirtualEarth"});OpenLayers.Layer.Yahoo=OpenLayers.Class(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:0,MAX_ZOOM_LEVEL:17,RESOLUTIONS:[1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125,0.00002145767211914062,0.00001072883605957031],type:null,sphericalMercator:false,initialize:function(b,a){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);if(this.sphericalMercator){OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator);this.initMercatorParameters()}},loadMapObject:function(){try{var a=this.getMapObjectSizeFromOLSize(this.map.getSize());this.mapObject=new YMap(this.div,this.type,a);this.mapObject.disableKeyControls();this.mapObject.disableDragMap();if(!this.mapObject.moveByXY||(typeof this.mapObject.moveByXY!="function")){this.dragPanMapObject=null}}catch(b){}},onMapResize:function(){try{var a=this.getMapObjectSizeFromOLSize(this.map.getSize());this.mapObject.resizeTo(a)}catch(b){}},setMap:function(a){OpenLayers.Layer.EventPane.prototype.setMap.apply(this,arguments);this.map.events.register("moveend",this,this.fixYahooEventPane)},fixYahooEventPane:function(){var a=OpenLayers.Util.getElement("ygddfdiv");if(a!=null){if(a.parentNode!=null){a.parentNode.removeChild(a)}this.map.events.unregister("moveend",this,this.fixYahooEventPane)}},getWarningHTML:function(){return OpenLayers.i18n("getLayerWarning",{layerType:"Yahoo",layerLib:"Yahoo"})},getOLZoomFromMapObjectZoom:function(a){var b=null;if(a!=null){b=OpenLayers.Layer.FixedZoomLevels.prototype.getOLZoomFromMapObjectZoom.apply(this,[a]);b=18-b}return b},getMapObjectZoomFromOLZoom:function(a){var b=null;if(a!=null){b=OpenLayers.Layer.FixedZoomLevels.prototype.getMapObjectZoomFromOLZoom.apply(this,[a]);b=18-b}return b},setMapObjectCenter:function(a,b){this.mapObject.drawZoomAndCenter(a,b)},getMapObjectCenter:function(){return this.mapObject.getCenterLatLon()},dragPanMapObject:function(b,a){this.mapObject.moveByXY({x:-b,y:a})},getMapObjectZoom:function(){return this.mapObject.getZoomLevel()},getMapObjectLonLatFromMapObjectPixel:function(a){return this.mapObject.convertXYLatLon(a)},getMapObjectPixelFromMapObjectLonLat:function(a){return this.mapObject.convertLatLonXY(a)},getLongitudeFromMapObjectLonLat:function(a){return this.sphericalMercator?this.forwardMercator(a.Lon,a.Lat).lon:a.Lon},getLatitudeFromMapObjectLonLat:function(a){return this.sphericalMercator?this.forwardMercator(a.Lon,a.Lat).lat:a.Lat},getMapObjectLonLatFromLonLat:function(f,d){var a;if(this.sphericalMercator){var b=this.inverseMercator(f,d);a=new YGeoPoint(b.lat,b.lon)}else{a=new YGeoPoint(d,f)}return a},getXFromMapObjectPixel:function(a){return a.x},getYFromMapObjectPixel:function(a){return a.y},getMapObjectPixelFromXY:function(a,b){return new YCoordPoint(a,b)},getMapObjectSizeFromOLSize:function(a){return new YSize(a.w,a.h)},CLASS_NAME:"OpenLayers.Layer.Yahoo"});OpenLayers.Protocol.HTTP=OpenLayers.Class(OpenLayers.Protocol,{url:null,headers:null,params:null,callback:null,scope:null,readWithPOST:false,initialize:function(a){this.params={};this.headers={};OpenLayers.Protocol.prototype.initialize.apply(this,arguments)},destroy:function(){this.params=null;this.headers=null;OpenLayers.Protocol.prototype.destroy.apply(this)},createCallback:function(d,a,b){return OpenLayers.Function.bind(function(){d.apply(this,[a,b])},this)},read:function(a){a=OpenLayers.Util.applyDefaults(a,this.options);var b=(a.readWithPOST!==undefined)?a.readWithPOST:this.readWithPOST;var d=new OpenLayers.Protocol.Response({requestType:"read"});if(a.filter&&a.filter instanceof OpenLayers.Filter.Spatial){if(a.filter.type==OpenLayers.Filter.Spatial.BBOX){a.params=OpenLayers.Util.extend(a.params,{bbox:a.filter.value.toArray()})}}if(b){d.priv=OpenLayers.Request.POST({url:a.url,callback:this.createCallback(this.handleRead,d,a),data:OpenLayers.Util.getParameterString(a.params),headers:{"Content-Type":"application/x-www-form-urlencoded"}})}else{d.priv=OpenLayers.Request.GET({url:a.url,callback:this.createCallback(this.handleRead,d,a),params:a.params,headers:a.headers})}return d},handleRead:function(b,a){this.handleResponse(b,a)},create:function(b,a){a=OpenLayers.Util.applyDefaults(a,this.options);var d=new OpenLayers.Protocol.Response({reqFeatures:b,requestType:"create"});d.priv=OpenLayers.Request.POST({url:a.url,callback:this.createCallback(this.handleCreate,d,a),headers:a.headers,data:this.format.write(b)});return d},handleCreate:function(b,a){this.handleResponse(b,a)},update:function(d,b){var a=b.url||d.url||this.options.url;b=OpenLayers.Util.applyDefaults(b,this.options);var f=new OpenLayers.Protocol.Response({reqFeatures:d,requestType:"update"});f.priv=OpenLayers.Request.PUT({url:a,callback:this.createCallback(this.handleUpdate,f,b),headers:b.headers,data:this.format.write(d)});return f},handleUpdate:function(b,a){this.handleResponse(b,a)},"delete":function(d,b){var a=b.url||d.url||this.options.url;b=OpenLayers.Util.applyDefaults(b,this.options);var f=new OpenLayers.Protocol.Response({reqFeatures:d,requestType:"delete"});f.priv=OpenLayers.Request.DELETE({url:a,callback:this.createCallback(this.handleDelete,f,b),headers:b.headers});return f},handleDelete:function(b,a){this.handleResponse(b,a)},handleResponse:function(d,a){var b=d.priv;if(a.callback){if(b.status>=200&&b.status<300){if(d.requestType!="delete"){d.features=this.parseFeatures(b)}d.code=OpenLayers.Protocol.Response.SUCCESS}else{d.code=OpenLayers.Protocol.Response.FAILURE}a.callback.call(a.scope,d)}},parseFeatures:function(a){var b=a.responseXML;if(!b||!b.documentElement){b=a.responseText}if(!b||b.length<=0){return null}return this.format.read(b)},commit:function(b,w){w=OpenLayers.Util.applyDefaults(w,this.options);var f=[],q=0;var o={};o[OpenLayers.State.INSERT]=[];o[OpenLayers.State.UPDATE]=[];o[OpenLayers.State.DELETE]=[];var v,p,d=[];for(var g=0,m=b.length;g<m;++g){v=b[g];p=o[v.state];if(p){p.push(v);d.push(v)}}var j=(o[OpenLayers.State.INSERT].length>0?1:0)+o[OpenLayers.State.UPDATE].length+o[OpenLayers.State.DELETE].length;var u=true;var a=new OpenLayers.Protocol.Response({reqFeatures:d});function l(B){var z=B.features?B.features.length:0;var D=new Array(z);for(var C=0;C<z;++C){D[C]=B.features[C].fid}a.insertIds=D;r.apply(this,[B])}function r(z){this.callUserCallback(z,w);u=u&&z.success();q++;if(q>=j){if(w.callback){a.code=u?OpenLayers.Protocol.Response.SUCCESS:OpenLayers.Protocol.Response.FAILURE;w.callback.apply(w.scope,[a])}}}var h=o[OpenLayers.State.INSERT];if(h.length>0){f.push(this.create(h,OpenLayers.Util.applyDefaults({callback:l,scope:this},w.create)))}h=o[OpenLayers.State.UPDATE];for(var g=h.length-1;g>=0;--g){f.push(this.update(h[g],OpenLayers.Util.applyDefaults({callback:r,scope:this},w.update)))}h=o[OpenLayers.State.DELETE];for(var g=h.length-1;g>=0;--g){f.push(this["delete"](h[g],OpenLayers.Util.applyDefaults({callback:r,scope:this},w["delete"])))}return f},abort:function(a){if(a){a.priv.abort()}},callUserCallback:function(d,a){var b=a[d.requestType];if(b&&b.callback){b.callback.call(b.scope,d)}},CLASS_NAME:"OpenLayers.Protocol.HTTP"});OpenLayers.Style=OpenLayers.Class({name:null,title:null,description:null,layerName:null,isDefault:false,rules:null,context:null,defaultStyle:null,defaultsPerSymbolizer:false,propertyStyles:null,initialize:function(b,a){OpenLayers.Util.extend(this,a);this.rules=[];if(a&&a.rules){this.addRules(a.rules)}this.setDefaultStyle(b||OpenLayers.Feature.Vector.style["default"])},destroy:function(){for(var b=0,a=this.rules.length;b<a;b++){this.rules[b].destroy();this.rules[b]=null}this.rules=null;this.defaultStyle=null},createSymbolizer:function(o){var a=this.defaultsPerSymbolizer?{}:this.createLiterals(OpenLayers.Util.extend({},this.defaultStyle),o);var m=this.rules;var l,b;var d=[];var h=false;for(var f=0,g=m.length;f<g;f++){l=m[f];var j=l.evaluate(o);if(j){if(l instanceof OpenLayers.Rule&&l.elseFilter){d.push(l)}else{h=true;this.applySymbolizer(l,a,o)}}}if(h==false&&d.length>0){h=true;for(var f=0,g=d.length;f<g;f++){this.applySymbolizer(d[f],a,o)}}if(m.length>0&&h==false){a.display="none"}return a},applySymbolizer:function(h,f,b){var a=b.geometry?this.getSymbolizerPrefix(b.geometry):OpenLayers.Style.SYMBOLIZER_PREFIXES[0];var d=h.symbolizer[a]||h.symbolizer;if(this.defaultsPerSymbolizer===true){var g=this.defaultStyle;OpenLayers.Util.applyDefaults(d,{pointRadius:g.pointRadius});if(d.stroke===true||d.graphic===true){OpenLayers.Util.applyDefaults(d,{strokeWidth:g.strokeWidth,strokeColor:g.strokeColor,strokeOpacity:g.strokeOpacity,strokeDashstyle:g.strokeDashstyle,strokeLinecap:g.strokeLinecap})}if(d.fill===true||d.graphic===true){OpenLayers.Util.applyDefaults(d,{fillColor:g.fillColor,fillOpacity:g.fillOpacity})}if(d.graphic===true){OpenLayers.Util.applyDefaults(d,{pointRadius:this.defaultStyle.pointRadius,externalGraphic:this.defaultStyle.externalGraphic,graphicName:this.defaultStyle.graphicName,graphicOpacity:this.defaultStyle.graphicOpacity,graphicWidth:this.defaultStyle.graphicWidth,graphicHeight:this.defaultStyle.graphicHeight,graphicXOffset:this.defaultStyle.graphicXOffset,graphicYOffset:this.defaultStyle.graphicYOffset})}}return this.createLiterals(OpenLayers.Util.extend(f,d),b)},createLiterals:function(f,d){var b=this.context||d.attributes||d.data;for(var a in this.propertyStyles){f[a]=OpenLayers.Style.createLiteral(f[a],b,d)}return f},findPropertyStyles:function(){var f={};var h=this.defaultStyle;this.addPropertyStyles(f,h);var l=this.rules;var g,j;for(var d=0,a=l.length;d<a;d++){g=l[d].symbolizer;for(var b in g){j=g[b];if(typeof j=="object"){this.addPropertyStyles(f,j)}else{this.addPropertyStyles(f,g);break}}}return f},addPropertyStyles:function(b,d){var f;for(var a in d){f=d[a];if(typeof f=="string"&&f.match(/\$\{\w+\}/)){b[a]=true}}return b},addRules:function(a){this.rules=this.rules.concat(a);this.propertyStyles=this.findPropertyStyles()},setDefaultStyle:function(a){this.defaultStyle=a;this.propertyStyles=this.findPropertyStyles()},getSymbolizerPrefix:function(f){var d=OpenLayers.Style.SYMBOLIZER_PREFIXES;for(var b=0,a=d.length;b<a;b++){if(f.CLASS_NAME.indexOf(d[b])!=-1){return d[b]}}},CLASS_NAME:"OpenLayers.Style"});OpenLayers.Style.createLiteral=function(d,b,a){if(typeof d=="string"&&d.indexOf("${")!=-1){d=OpenLayers.String.format(d,b,[a]);d=(isNaN(d)||!d)?d:parseFloat(d)}return d};OpenLayers.Style.SYMBOLIZER_PREFIXES=["Point","Line","Polygon","Text"];OpenLayers.Control.Navigation=OpenLayers.Class(OpenLayers.Control,{dragPan:null,dragPanOptions:null,zoomBox:null,zoomWheelEnabled:true,handleRightClicks:false,zoomBoxKeyMask:OpenLayers.Handler.MOD_SHIFT,initialize:function(a){this.handlers={};OpenLayers.Control.prototype.initialize.apply(this,arguments)},destroy:function(){this.deactivate();if(this.dragPan){this.dragPan.destroy()}this.dragPan=null;if(this.zoomBox){this.zoomBox.destroy()}this.zoomBox=null;OpenLayers.Control.prototype.destroy.apply(this,arguments)},activate:function(){this.dragPan.activate();if(this.zoomWheelEnabled){this.handlers.wheel.activate()}this.handlers.click.activate();this.zoomBox.activate();return OpenLayers.Control.prototype.activate.apply(this,arguments)},deactivate:function(){this.zoomBox.deactivate();this.dragPan.deactivate();this.handlers.click.deactivate();this.handlers.wheel.deactivate();return OpenLayers.Control.prototype.deactivate.apply(this,arguments)},draw:function(){if(this.handleRightClicks){this.map.viewPortDiv.oncontextmenu=function(){return false}}var a={dblclick:this.defaultDblClick,dblrightclick:this.defaultDblRightClick};var b={"double":true,stopDouble:true};this.handlers.click=new OpenLayers.Handler.Click(this,a,b);this.dragPan=new OpenLayers.Control.DragPan(OpenLayers.Util.extend({map:this.map},this.dragPanOptions));this.zoomBox=new OpenLayers.Control.ZoomBox({map:this.map,keyMask:this.zoomBoxKeyMask});this.dragPan.draw();this.zoomBox.draw();this.handlers.wheel=new OpenLayers.Handler.MouseWheel(this,{up:this.wheelUp,down:this.wheelDown});this.activate()},defaultDblClick:function(b){var a=this.map.getLonLatFromViewPortPx(b.xy);this.map.setCenter(a,this.map.zoom+1)},defaultDblRightClick:function(b){var a=this.map.getLonLatFromViewPortPx(b.xy);this.map.setCenter(a,this.map.zoom-1)},wheelChange:function(l,d){var h=this.map.getZoom()+d;if(!this.map.isValidZoomLevel(h)){return}var m=this.map.getSize();var g=m.w/2-l.xy.x;var f=l.xy.y-m.h/2;var j=this.map.baseLayer.getResolutionForZoom(h);var a=this.map.getLonLatFromPixel(l.xy);var b=new OpenLayers.LonLat(a.lon+g*j,a.lat+f*j);this.map.setCenter(b,h)},wheelUp:function(a){this.wheelChange(a,1)},wheelDown:function(a){this.wheelChange(a,-1)},disableZoomWheel:function(){this.zoomWheelEnabled=false;this.handlers.wheel.deactivate()},enableZoomWheel:function(){this.zoomWheelEnabled=true;if(this.active){this.handlers.wheel.activate()}},CLASS_NAME:"OpenLayers.Control.Navigation"});OpenLayers.Filter=OpenLayers.Class({initialize:function(a){OpenLayers.Util.extend(this,a)},destroy:function(){},evaluate:function(a){return true},clone:function(){return null},CLASS_NAME:"OpenLayers.Filter"});OpenLayers.Geometry=OpenLayers.Class({id:null,parent:null,bounds:null,initialize:function(){this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")},destroy:function(){this.id=null;this.bounds=null},clone:function(){return new OpenLayers.Geometry()},setBounds:function(a){if(a){this.bounds=a.clone()}},clearBounds:function(){this.bounds=null;if(this.parent){this.parent.clearBounds()}},extendBounds:function(b){var a=this.getBounds();if(!a){this.setBounds(b)}else{this.bounds.extend(b)}},getBounds:function(){if(this.bounds==null){this.calculateBounds()}return this.bounds},calculateBounds:function(){},distanceTo:function(b,a){},getVertices:function(a){},atPoint:function(g,l,h){var d=false;var f=this.getBounds();if((f!=null)&&(g!=null)){var b=(l!=null)?l:0;var a=(h!=null)?h:0;var j=new OpenLayers.Bounds(this.bounds.left-b,this.bounds.bottom-a,this.bounds.right+b,this.bounds.top+a);d=j.containsLonLat(g)}return d},getLength:function(){return 0},getArea:function(){return 0},getCentroid:function(){return null},toString:function(){return OpenLayers.Format.WKT.prototype.write(new OpenLayers.Feature.Vector(this))},CLASS_NAME:"OpenLayers.Geometry"});OpenLayers.Geometry.fromWKT=function(h){var j=arguments.callee.format;if(!j){j=new OpenLayers.Format.WKT();arguments.callee.format=j}var f;var b=j.read(h);if(b instanceof OpenLayers.Feature.Vector){f=b.geometry}else{if(b instanceof Array){var a=b.length;var g=new Array(a);for(var d=0;d<a;++d){g[d]=b[d].geometry}f=new OpenLayers.Geometry.Collection(g)}}return f};OpenLayers.Geometry.segmentsIntersect=function(a,O,b){var B=b&&b.point;var G=b&&b.tolerance;var h=false;var I=a.x1-O.x1;var M=a.y1-O.y1;var v=a.x2-a.x1;var F=a.y2-a.y1;var C=O.y2-O.y1;var q=O.x2-O.x1;var K=(C*v)-(q*F);var g=(q*M)-(C*I);var f=(v*M)-(F*I);if(K==0){if(g==0&&f==0){h=true}}else{var L=g/K;var J=f/K;if(L>=0&&L<=1&&J>=0&&J<=1){if(!B){h=true}else{var m=a.x1+(L*v);var l=a.y1+(L*F);h=new OpenLayers.Geometry.Point(m,l)}}}if(G){var z;if(h){if(B){var u=[a,O];var H,m,l;outer:for(var E=0;E<2;++E){H=u[E];for(var D=1;D<3;++D){m=H["x"+D];l=H["y"+D];z=Math.sqrt(Math.pow(m-h.x,2)+Math.pow(l-h.y,2));if(z<G){h.x=m;h.y=l;break outer}}}}}else{var u=[a,O];var w,N,m,l,r,o;outer:for(var E=0;E<2;++E){w=u[E];N=u[(E+1)%2];for(var D=1;D<3;++D){r={x:w["x"+D],y:w["y"+D]};o=OpenLayers.Geometry.distanceToSegment(r,N);if(o.distance<G){if(B){h=new OpenLayers.Geometry.Point(r.x,r.y)}else{h=true}break outer}}}}}return h};OpenLayers.Geometry.distanceToSegment=function(p,f){var d=p.x;var o=p.y;var b=f.x1;var m=f.y1;var a=f.x2;var h=f.y2;var r=a-b;var q=h-m;var l=((r*(d-b))+(q*(o-m)))/(Math.pow(r,2)+Math.pow(q,2));var j,g;if(l<=0){j=b;g=m}else{if(l>=1){j=a;g=h}else{j=b+l*r;g=m+l*q}}return{distance:Math.sqrt(Math.pow(j-d,2)+Math.pow(g-o,2)),x:j,y:g}};OpenLayers.Layer.ArcGIS93Rest=OpenLayers.Class(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{format:"png"},isBaseLayer:true,initialize:function(f,d,g,b){var a=[];g=OpenLayers.Util.upperCaseObject(g);a.push(f,d,g,b);OpenLayers.Layer.Grid.prototype.initialize.apply(this,a);OpenLayers.Util.applyDefaults(this.params,OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS));if(this.params.TRANSPARENT&&this.params.TRANSPARENT.toString().toLowerCase()=="true"){if((b==null)||(!b.isBaseLayer)){this.isBaseLayer=false}if(this.params.FORMAT=="jpg"){this.params.FORMAT=OpenLayers.Util.alphaHack()?"gif":"png"}}},destroy:function(){OpenLayers.Layer.Grid.prototype.destroy.apply(this,arguments)},clone:function(a){if(a==null){a=new OpenLayers.Layer.ArcGIS93Rest(this.name,this.url,this.params,this.options)}a=OpenLayers.Layer.Grid.prototype.clone.apply(this,[a]);return a},getURL:function(g){g=this.adjustBounds(g);var f=this.projection.getCode().split(":");var d=f[f.length-1];var j=this.getImageSize();var l={BBOX:g.toBBOX(),SIZE:j.w+","+j.h,F:"image",BBOXSR:d,IMAGESR:d};if(this.layerDefs){var h=[];var a;for(a in this.layerDefs){if(this.layerDefs.hasOwnProperty(a)){if(this.layerDefs[a]){h.push(a);h.push(":");h.push(this.layerDefs[a]);h.push(";")}}}if(h.length>0){l.LAYERDEFS=h.join("")}}var b=this.getFullRequestString(l);return b},setLayerFilter:function(b,a){if(!this.layerDefs){this.layerDefs={}}if(a){this.layerDefs[b]=a}else{delete this.layerDefs[b]}},clearLayerFilter:function(a){if(a){delete this.layerDefs[a]}else{delete this.layerDefs}},mergeNewParams:function(d){var b=OpenLayers.Util.upperCaseObject(d);var a=[b];return OpenLayers.Layer.Grid.prototype.mergeNewParams.apply(this,a)},addTile:function(b,a){return new OpenLayers.Tile.Image(this,a,b,null,this.tileSize)},CLASS_NAME:"OpenLayers.Layer.ArcGIS93Rest"});OpenLayers.Layer.KaMap=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:true,units:null,resolution:OpenLayers.DOTS_PER_INCH,DEFAULT_PARAMS:{i:"jpeg",map:""},initialize:function(f,d,g,b){var a=[];a.push(f,d,g,b);OpenLayers.Layer.Grid.prototype.initialize.apply(this,a);this.params=OpenLayers.Util.applyDefaults(this.params,this.DEFAULT_PARAMS)},getURL:function(d){d=this.adjustBounds(d);var f=this.map.getResolution();var g=Math.round((this.map.getScale()*10000))/10000;var b=Math.round(d.left/f);var a=-Math.round(d.top/f);return this.getFullRequestString({t:a,l:b,s:g})},addTile:function(d,a){var b=this.getURL(d);return new OpenLayers.Tile.Image(this,a,d,b,this.tileSize)},calculateGridLayout:function(a,v,g){var p=g*this.tileSize.w;var d=g*this.tileSize.h;var m=a.left;var q=Math.floor(m/p)-this.buffer;var o=m/p-q;var h=-o*this.tileSize.w;var r=q*p;var b=a.top;var l=Math.ceil(b/d)+this.buffer;var u=l-b/d;var f=-(u+1)*this.tileSize.h;var j=l*d;return{tilelon:p,tilelat:d,tileoffsetlon:r,tileoffsetlat:j,tileoffsetx:h,tileoffsety:f}},clone:function(a){if(a==null){a=new OpenLayers.Layer.KaMap(this.name,this.url,this.params,this.options)}a=OpenLayers.Layer.Grid.prototype.clone.apply(this,[a]);if(this.tileSize!=null){a.tileSize=this.tileSize.clone()}a.grid=[];return a},getTileBounds:function(d){var g=this.getResolution();var f=g*this.tileSize.w;var b=g*this.tileSize.h;var j=this.getLonLatFromViewPortPx(d);var a=f*Math.floor(j.lon/f);var h=b*Math.floor(j.lat/b);return new OpenLayers.Bounds(a,h,a+f,h+b)},CLASS_NAME:"OpenLayers.Layer.KaMap"});OpenLayers.Layer.MapGuide=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:true,useHttpTile:false,singleTile:false,useOverlay:false,useAsyncOverlay:true,TILE_PARAMS:{operation:"GETTILEIMAGE",version:"1.2.0"},SINGLE_TILE_PARAMS:{operation:"GETMAPIMAGE",format:"PNG",locale:"en",clip:"1",version:"1.0.0"},OVERLAY_PARAMS:{operation:"GETDYNAMICMAPOVERLAYIMAGE",format:"PNG",locale:"en",clip:"1",version:"2.0.0"},FOLDER_PARAMS:{tileColumnsPerFolder:30,tileRowsPerFolder:30,format:"png",querystring:null},defaultSize:new OpenLayers.Size(300,300),initialize:function(d,b,f,a){OpenLayers.Layer.Grid.prototype.initialize.apply(this,arguments);if(a==null||a.isBaseLayer==null){this.isBaseLayer=((this.transparent!="true")&&(this.transparent!=true))}if(a&&a.useOverlay!=null){this.useOverlay=a.useOverlay}if(this.singleTile){if(this.useOverlay){OpenLayers.Util.applyDefaults(this.params,this.OVERLAY_PARAMS);if(!this.useAsyncOverlay){this.params.version="1.0.0"}}else{OpenLayers.Util.applyDefaults(this.params,this.SINGLE_TILE_PARAMS)}}else{if(this.useHttpTile){OpenLayers.Util.applyDefaults(this.params,this.FOLDER_PARAMS)}else{OpenLayers.Util.applyDefaults(this.params,this.TILE_PARAMS)}this.setTileSize(this.defaultSize)}},clone:function(a){if(a==null){a=new OpenLayers.Layer.MapGuide(this.name,this.url,this.params,this.options)}a=OpenLayers.Layer.Grid.prototype.clone.apply(this,[a]);return a},addTile:function(b,a){return new OpenLayers.Tile.Image(this,a,b,null,this.tileSize)},getURL:function(a){var f;var b=a.getCenterLonLat();var l=this.map.getCurrentSize();if(this.singleTile){var g={setdisplaydpi:OpenLayers.DOTS_PER_INCH,setdisplayheight:l.h*this.ratio,setdisplaywidth:l.w*this.ratio,setviewcenterx:b.lon,setviewcentery:b.lat,setviewscale:this.map.getScale()};if(this.useOverlay&&!this.useAsyncOverlay){var m={};m=OpenLayers.Util.extend(m,g);m.operation="GETVISIBLEMAPEXTENT";m.version="1.0.0";m.session=this.params.session;m.mapName=this.params.mapName;m.format="text/xml";f=this.getFullRequestString(m);OpenLayers.Request.GET({url:f,async:false})}f=this.getFullRequestString(g)}else{var j=this.map.getResolution();var h=Math.floor((a.left-this.maxExtent.left)/j);h=Math.round(h/this.tileSize.w);var d=Math.floor((this.maxExtent.top-a.top)/j);d=Math.round(d/this.tileSize.h);if(this.useHttpTile){f=this.getImageFilePath({tilecol:h,tilerow:d,scaleindex:this.resolutions.length-this.map.zoom-1})}else{f=this.getFullRequestString({tilecol:h,tilerow:d,scaleindex:this.resolutions.length-this.map.zoom-1})}}return f},getFullRequestString:function(h,g){var b=(g==null)?this.url:g;if(typeof b=="object"){b=b[Math.floor(Math.random()*b.length)]}var m=b;var j=OpenLayers.Util.extend({},this.params);j=OpenLayers.Util.extend(j,h);var f=OpenLayers.Util.upperCaseObject(OpenLayers.Util.getArgs(b));for(var l in j){if(l.toUpperCase() in f){delete j[l]}}var a=OpenLayers.Util.getParameterString(j);a=a.replace(/,/g,"+");if(a!=""){var d=b.charAt(b.length-1);if((d=="&")||(d=="?")){m+=a}else{if(b.indexOf("?")==-1){m+="?"+a}else{m+="&"+a}}}return m},getImageFilePath:function(j,g){var d=(g==null)?this.url:g;if(typeof d=="object"){d=d[Math.floor(Math.random()*d.length)]}var b=d;var f="";var h="";if(j.tilerow<0){f="-"}if(j.tilerow==0){f+="0"}else{f+=Math.floor(Math.abs(j.tilerow/this.params.tileRowsPerFolder))*this.params.tileRowsPerFolder}if(j.tilecol<0){h="-"}if(j.tilecol==0){h+="0"}else{h+=Math.floor(Math.abs(j.tilecol/this.params.tileColumnsPerFolder))*this.params.tileColumnsPerFolder}var a="/S"+Math.floor(j.scaleindex)+"/"+this.params.basemaplayergroupname+"/R"+f+"/C"+h+"/"+(j.tilerow%this.params.tileRowsPerFolder)+"_"+(j.tilecol%this.params.tileColumnsPerFolder)+"."+this.params.format;if(this.params.querystring){a+="?"+this.params.querystring}b+=a;return b},calculateGridLayout:function(a,v,g){var p=g*this.tileSize.w;var d=g*this.tileSize.h;var m=a.left-v.left;var q=Math.floor(m/p)-this.buffer;var o=m/p-q;var h=-o*this.tileSize.w;var r=v.left+q*p;var b=v.top-a.top+d;var l=Math.floor(b/d)-this.buffer;var u=l-b/d;var f=u*this.tileSize.h;var j=v.top-d*l;return{tilelon:p,tilelat:d,tileoffsetlon:r,tileoffsetlat:j,tileoffsetx:h,tileoffsety:f}},CLASS_NAME:"OpenLayers.Layer.MapGuide"});OpenLayers.Layer.MapServer=OpenLayers.Class(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{mode:"map",map_imagetype:"png"},initialize:function(f,d,g,b){var a=[];a.push(f,d,g,b);OpenLayers.Layer.Grid.prototype.initialize.apply(this,a);this.params=OpenLayers.Util.applyDefaults(this.params,this.DEFAULT_PARAMS);if(b==null||b.isBaseLayer==null){this.isBaseLayer=((this.params.transparent!="true")&&(this.params.transparent!=true))}},clone:function(a){if(a==null){a=new OpenLayers.Layer.MapServer(this.name,this.url,this.params,this.options)}a=OpenLayers.Layer.Grid.prototype.clone.apply(this,[a]);return a},addTile:function(b,a){return new OpenLayers.Tile.Image(this,a,b,null,this.tileSize)},getURL:function(d){d=this.adjustBounds(d);var b=[d.left,d.bottom,d.right,d.top];var f=this.getImageSize();var a=this.getFullRequestString({mapext:b,imgext:b,map_size:[f.w,f.h],imgx:f.w/2,imgy:f.h/2,imgxy:[f.w,f.h]});return a},getFullRequestString:function(h,g){var b=(g==null)?this.url:g;var j=OpenLayers.Util.extend({},this.params);j=OpenLayers.Util.extend(j,h);var a=OpenLayers.Util.getParameterString(j);if(b instanceof Array){b=this.selectUrl(a,b)}var f=OpenLayers.Util.upperCaseObject(OpenLayers.Util.getParameters(b));for(var l in j){if(l.toUpperCase() in f){delete j[l]}}a=OpenLayers.Util.getParameterString(j);var m=b;a=a.replace(/,/g,"+");if(a!=""){var d=b.charAt(b.length-1);if((d=="&")||(d=="?")){m+=a}else{if(b.indexOf("?")==-1){m+="?"+a}else{m+="&"+a}}}return m},CLASS_NAME:"OpenLayers.Layer.MapServer"});OpenLayers.Layer.TMS=OpenLayers.Class(OpenLayers.Layer.Grid,{serviceVersion:"1.0.0",isBaseLayer:true,tileOrigin:null,serverResolutions:null,initialize:function(f,d,b){var a=[];a.push(f,d,{},b);OpenLayers.Layer.Grid.prototype.initialize.apply(this,a)},destroy:function(){OpenLayers.Layer.Grid.prototype.destroy.apply(this,arguments)},clone:function(a){if(a==null){a=new OpenLayers.Layer.TMS(this.name,this.url,this.options)}a=OpenLayers.Layer.Grid.prototype.clone.apply(this,[a]);return a},getURL:function(f){f=this.adjustBounds(f);var d=this.map.getResolution();var a=Math.round((f.left-this.tileOrigin.lon)/(d*this.tileSize.w));var j=Math.round((f.bottom-this.tileOrigin.lat)/(d*this.tileSize.h));var h=this.serverResolutions!=null?OpenLayers.Util.indexOf(this.serverResolutions,d):this.map.getZoom();var g=this.serviceVersion+"/"+this.layername+"/"+h+"/"+a+"/"+j+"."+this.type;var b=this.url;if(b instanceof Array){b=this.selectUrl(g,b)}return b+g},addTile:function(b,a){return new OpenLayers.Tile.Image(this,a,b,null,this.tileSize)},setMap:function(a){OpenLayers.Layer.Grid.prototype.setMap.apply(this,arguments);if(!this.tileOrigin){this.tileOrigin=new OpenLayers.LonLat(this.map.maxExtent.left,this.map.maxExtent.bottom)}},CLASS_NAME:"OpenLayers.Layer.TMS"});OpenLayers.Layer.TileCache=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:true,format:"image/png",serverResolutions:null,initialize:function(d,b,f,a){this.layername=f;OpenLayers.Layer.Grid.prototype.initialize.apply(this,[d,b,{},a]);this.extension=this.format.split("/")[1].toLowerCase();this.extension=(this.extension=="jpg")?"jpeg":this.extension},clone:function(a){if(a==null){a=new OpenLayers.Layer.TileCache(this.name,this.url,this.layername,this.options)}a=OpenLayers.Layer.Grid.prototype.clone.apply(this,[a]);return a},getURL:function(b){var h=this.map.getResolution();var j=this.maxExtent;var p=this.tileSize;var a=Math.round((b.left-j.left)/(h*p.w));var o=Math.round((b.bottom-j.bottom)/(h*p.h));var l=this.serverResolutions!=null?OpenLayers.Util.indexOf(this.serverResolutions,h):this.map.getZoom();function g(v,u){v=String(v);var q=[];for(var r=0;r<u;++r){q.push("0")}return q.join("").substring(0,u-v.length)+v}var f=[this.layername,g(l,2),g(parseInt(a/1000000),3),g((parseInt(a/1000)%1000),3),g((parseInt(a)%1000),3),g(parseInt(o/1000000),3),g((parseInt(o/1000)%1000),3),g((parseInt(o)%1000),3)+"."+this.extension];var m=f.join("/");var d=this.url;if(d instanceof Array){d=this.selectUrl(m,d)}d=(d.charAt(d.length-1)=="/")?d:d+"/";return d+m},addTile:function(d,a){var b=this.getURL(d);return new OpenLayers.Tile.Image(this,a,d,b,this.tileSize)},CLASS_NAME:"OpenLayers.Layer.TileCache"});OpenLayers.Layer.WMS=OpenLayers.Class(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{service:"WMS",version:"1.1.1",request:"GetMap",styles:"",exceptions:"application/vnd.ogc.se_inimage",format:"image/jpeg"},reproject:false,isBaseLayer:true,encodeBBOX:false,noMagic:false,initialize:function(f,d,g,b){var a=[];g=OpenLayers.Util.upperCaseObject(g);a.push(f,d,g,b);OpenLayers.Layer.Grid.prototype.initialize.apply(this,a);OpenLayers.Util.applyDefaults(this.params,OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS));if(!this.noMagic&&this.params.TRANSPARENT&&this.params.TRANSPARENT.toString().toLowerCase()=="true"){if((b==null)||(!b.isBaseLayer)){this.isBaseLayer=false}if(this.params.FORMAT=="image/jpeg"){this.params.FORMAT=OpenLayers.Util.alphaHack()?"image/gif":"image/png"}}},destroy:function(){OpenLayers.Layer.Grid.prototype.destroy.apply(this,arguments)},clone:function(a){if(a==null){a=new OpenLayers.Layer.WMS(this.name,this.url,this.params,this.options)}a=OpenLayers.Layer.Grid.prototype.clone.apply(this,[a]);return a},getURL:function(b){b=this.adjustBounds(b);var d=this.getImageSize();var f={BBOX:this.encodeBBOX?b.toBBOX():b.toArray(),WIDTH:d.w,HEIGHT:d.h};var a=this.getFullRequestString(f);return a},addTile:function(b,a){return new OpenLayers.Tile.Image(this,a,b,null,this.tileSize)},mergeNewParams:function(d){var b=OpenLayers.Util.upperCaseObject(d);var a=[b];return OpenLayers.Layer.Grid.prototype.mergeNewParams.apply(this,a)},getFullRequestString:function(d,b){var a=this.map.getProjection();this.params.SRS=(a=="none")?null:a;return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,arguments)},CLASS_NAME:"OpenLayers.Layer.WMS"});OpenLayers.Layer.WorldWind=OpenLayers.Class(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{},isBaseLayer:true,lzd:null,zoomLevels:null,initialize:function(f,d,g,j,h,b){this.lzd=g;this.zoomLevels=j;var a=[];a.push(f,d,h,b);OpenLayers.Layer.Grid.prototype.initialize.apply(this,a);this.params=OpenLayers.Util.applyDefaults(this.params,this.DEFAULT_PARAMS)},addTile:function(b,a){return new OpenLayers.Tile.Image(this,a,b,null,this.tileSize)},getZoom:function(){var b=this.map.getZoom();var a=this.map.getMaxExtent();b=b-Math.log(this.maxResolution/(this.lzd/512))/Math.log(2);return b},getURL:function(g){g=this.adjustBounds(g);var f=this.getZoom();var b=this.map.getMaxExtent();var d=this.lzd/Math.pow(2,this.getZoom());var a=Math.floor((g.left-b.left)/d);var h=Math.floor((g.bottom-b.bottom)/d);if(this.map.getResolution()<=(this.lzd/512)&&this.getZoom()<=this.zoomLevels){return this.getFullRequestString({L:f,X:a,Y:h})}else{return OpenLayers.Util.getImagesLocation()+"blank.gif"}},CLASS_NAME:"OpenLayers.Layer.WorldWind"});OpenLayers.Layer.XYZ=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:true,sphericalMercator:false,initialize:function(f,d,b){if(b&&b.sphericalMercator||this.sphericalMercator){b=OpenLayers.Util.extend({maxExtent:new OpenLayers.Bounds(-128*156543.0339,-128*156543.0339,128*156543.0339,128*156543.0339),maxResolution:156543.0339,numZoomLevels:19,units:"m",projection:"EPSG:900913"},b)}d=d||this.url;f=f||this.name;var a=[f,d,{},b];OpenLayers.Layer.Grid.prototype.initialize.apply(this,a)},clone:function(a){if(a==null){a=new OpenLayers.Layer.XYZ(this.name,this.url,this.options)}a=OpenLayers.Layer.HTTPRequest.prototype.clone.apply(this,[a]);if(this.tileSize!=null){a.tileSize=this.tileSize.clone()}a.grid=[];return a},getURL:function(a){var f=this.map.getResolution();var j=Math.round((a.left-this.maxExtent.left)/(f*this.tileSize.w));var h=Math.round((this.maxExtent.top-a.top)/(f*this.tileSize.h));var g=this.map.getZoom();var d=Math.pow(2,g);var b=this.url;var m=""+j+h+g;if(b instanceof Array){b=this.selectUrl(m,b)}var l=OpenLayers.String.format(b,{x:j,y:h,z:g});return l},addTile:function(b,a){return new OpenLayers.Tile.Image(this,a,b,null,this.tileSize)},setMap:function(a){OpenLayers.Layer.Grid.prototype.setMap.apply(this,arguments);if(!this.tileOrigin){this.tileOrigin=new OpenLayers.LonLat(this.maxExtent.left,this.maxExtent.bottom)}},CLASS_NAME:"OpenLayers.Layer.XYZ"});OpenLayers.Layer.OSM=OpenLayers.Class(OpenLayers.Layer.XYZ,{name:"OpenStreetMap",attribution:"Data CC-By-SA by <a href='http://openstreetmap.org/'>OpenStreetMap</a>",sphericalMercator:true,url:"http://tile.openstreetmap.org/${z}/${x}/${y}.png",CLASS_NAME:"OpenLayers.Layer.OSM"});OpenLayers.Protocol.SQL.Gears=OpenLayers.Class(OpenLayers.Protocol.SQL,{FID_PREFIX:"__gears_fid__",NULL_GEOMETRY:"__gears_null_geometry__",NULL_FEATURE_STATE:"__gears_null_feature_state__",jsonParser:null,wktParser:null,fidRegExp:null,saveFeatureState:true,typeOfFid:"string",db:null,initialize:function(a){if(!this.supported()){return}OpenLayers.Protocol.SQL.prototype.initialize.apply(this,[a]);this.jsonParser=new OpenLayers.Format.JSON();this.wktParser=new OpenLayers.Format.WKT();this.fidRegExp=new RegExp("^"+this.FID_PREFIX);this.initializeDatabase()},initializeDatabase:function(){this.db=google.gears.factory.create("beta.database");this.db.open(this.databaseName);this.db.execute("CREATE TABLE IF NOT EXISTS "+this.tableName+" (fid TEXT UNIQUE, geometry TEXT, properties TEXT,  state TEXT)")},destroy:function(){this.db.close();this.db=null;this.jsonParser=null;this.wktParser=null;OpenLayers.Protocol.SQL.prototype.destroy.apply(this)},supported:function(){return !!(window.google&&google.gears)},read:function(b){b=OpenLayers.Util.applyDefaults(b,this.options);var d,f=[];var a=this.db.execute("SELECT * FROM "+this.tableName);while(a.isValidRow()){d=this.unfreezeFeature(a);if(this.evaluateFilter(d,b.filter)){if(!b.noFeatureStateReset){d.state=null}f.push(d)}a.next()}a.close();var g=new OpenLayers.Protocol.Response({code:OpenLayers.Protocol.Response.SUCCESS,requestType:"read",features:f});if(b&&b.callback){b.callback.call(b.scope,g)}return g},unfreezeFeature:function(f){var a;var b=f.fieldByName("geometry");if(b==this.NULL_GEOMETRY){a=new OpenLayers.Feature.Vector()}else{a=this.wktParser.read(b)}a.attributes=this.jsonParser.read(f.fieldByName("properties"));a.fid=this.extractFidFromField(f.fieldByName("fid"));var d=f.fieldByName("state");if(d==this.NULL_FEATURE_STATE){d=null}a.state=d;return a},extractFidFromField:function(a){if(!a.match(this.fidRegExp)&&this.typeOfFid=="number"){a=parseFloat(a)}return a},create:function(b,a){a=OpenLayers.Util.applyDefaults(a,this.options);var d=this.createOrUpdate(b);d.requestType="create";if(a&&a.callback){a.callback.call(a.scope,d)}return d},update:function(b,a){a=OpenLayers.Util.applyDefaults(a,this.options);var d=this.createOrUpdate(b);d.requestType="update";if(a&&a.callback){a.callback.call(a.scope,d)}return d},createOrUpdate:function(g){if(!(g instanceof Array)){g=[g]}var d,a=g.length,b;var f=new Array(a);for(d=0;d<a;d++){b=g[d];var h=this.freezeFeature(b);this.db.execute("REPLACE INTO "+this.tableName+" (fid, geometry, properties, state) VALUES (?, ?, ?, ?)",h);var j=b.clone();j.fid=this.extractFidFromField(h[0]);f[d]=j}return new OpenLayers.Protocol.Response({code:OpenLayers.Protocol.Response.SUCCESS,features:f,reqFeatures:g})},freezeFeature:function(b){b.fid=b.fid!=null?""+b.fid:OpenLayers.Util.createUniqueID(this.FID_PREFIX);var f=b.geometry!=null?b.geometry.toString():this.NULL_GEOMETRY;var a=this.jsonParser.write(b.attributes);var d=this.getFeatureStateForFreeze(b);return[b.fid,f,a,d]},getFeatureStateForFreeze:function(a){var b;if(!this.saveFeatureState){b=this.NULL_FEATURE_STATE}else{if(this.createdOffline(a)){b=OpenLayers.State.INSERT}else{b=a.state}}return b},"delete":function(h,d){if(!(h instanceof Array)){h=[h]}d=OpenLayers.Util.applyDefaults(d,this.options);var g,a,f;for(g=0,a=h.length;g<a;g++){f=h[g];if(this.saveFeatureState&&!this.createdOffline(f)){var b=f.clone();b.fid=f.fid;if(b.geometry){b.geometry.destroy();b.geometry=null}b.state=f.state;this.createOrUpdate(b)}else{this.db.execute("DELETE FROM "+this.tableName+" WHERE fid = ?",[f.fid])}}var j=new OpenLayers.Protocol.Response({code:OpenLayers.Protocol.Response.SUCCESS,requestType:"delete",reqFeatures:h});if(d&&d.callback){d.callback.call(d.scope,j)}return j},createdOffline:function(a){return(typeof a.fid=="string"&&!!(a.fid.match(this.fidRegExp)))},commit:function(d,q){var b,g=[],j=0,l=0;function o(r){if(++l<j){r.last=false}this.callUserCallback(q,r)}var p,m=[],a=[],f=[];for(var h=d.length-1;h>=0;h--){p=d[h];switch(p.state){case OpenLayers.State.INSERT:m.push(p);break;case OpenLayers.State.UPDATE:a.push(p);break;case OpenLayers.State.DELETE:f.push(p);break}}if(m.length>0){j++;b=OpenLayers.Util.applyDefaults({callback:o,scope:this},q.create);g.push(this.create(m,b))}if(a.length>0){j++;b=OpenLayers.Util.applyDefaults({callback:o,scope:this},q.update);g.push(this.update(a,b))}if(f.length>0){j++;b=OpenLayers.Util.applyDefaults({callback:o,scope:this},q["delete"]);g.push(this["delete"](f,b))}return g},clear:function(){this.db.execute("DELETE FROM "+this.tableName)},callUserCallback:function(a,d){var b=a[d.requestType];if(b&&b.callback){b.callback.call(b.scope,d)}if(d.last&&a.callback){a.callback.call(a.scope)}},CLASS_NAME:"OpenLayers.Protocol.SQL.Gears"});OpenLayers.Rule=OpenLayers.Class({id:null,name:"default",title:null,description:null,context:null,filter:null,elseFilter:false,symbolizer:null,minScaleDenominator:null,maxScaleDenominator:null,initialize:function(a){this.symbolizer={};OpenLayers.Util.extend(this,a);this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")},destroy:function(){for(var a in this.symbolizer){this.symbolizer[a]=null}this.symbolizer=null},evaluate:function(d){var b=this.getContext(d);var a=true;if(this.minScaleDenominator||this.maxScaleDenominator){var f=d.layer.map.getScale()}if(this.minScaleDenominator){a=f>=OpenLayers.Style.createLiteral(this.minScaleDenominator,b)}if(a&&this.maxScaleDenominator){a=f<OpenLayers.Style.createLiteral(this.maxScaleDenominator,b)}if(a&&this.filter){if(this.filter.CLASS_NAME=="OpenLayers.Filter.FeatureId"){a=this.filter.evaluate(d)}else{a=this.filter.evaluate(b)}}return a},getContext:function(b){var a=this.context;if(!a){a=b.attributes||b.data}if(typeof this.context=="function"){a=this.context(b)}return a},clone:function(){var a=OpenLayers.Util.extend({},this);a.symbolizer={};for(var b in this.symbolizer){value=this.symbolizer[b];type=typeof value;if(type==="object"){a.symbolizer[b]=OpenLayers.Util.extend({},value)}else{if(type==="string"){a.symbolizer[b]=value}}}a.filter=this.filter&&this.filter.clone();a.context=this.context&&OpenLayers.Util.extend({},this.context);return new OpenLayers.Rule(a)},CLASS_NAME:"OpenLayers.Rule"});OpenLayers.StyleMap=OpenLayers.Class({styles:null,extendDefault:true,initialize:function(d,a){this.styles={"default":new OpenLayers.Style(OpenLayers.Feature.Vector.style["default"]),select:new OpenLayers.Style(OpenLayers.Feature.Vector.style.select),temporary:new OpenLayers.Style(OpenLayers.Feature.Vector.style.temporary),"delete":new OpenLayers.Style(OpenLayers.Feature.Vector.style["delete"])};if(d instanceof OpenLayers.Style){this.styles["default"]=d;this.styles.select=d;this.styles.temporary=d;this.styles["delete"]=d}else{if(typeof d=="object"){for(var b in d){if(d[b] instanceof OpenLayers.Style){this.styles[b]=d[b]}else{if(typeof d[b]=="object"){this.styles[b]=new OpenLayers.Style(d[b])}else{this.styles["default"]=new OpenLayers.Style(d);this.styles.select=new OpenLayers.Style(d);this.styles.temporary=new OpenLayers.Style(d);this.styles["delete"]=new OpenLayers.Style(d);break}}}}}OpenLayers.Util.extend(this,a)},destroy:function(){for(var a in this.styles){this.styles[a].destroy()}this.styles=null},createSymbolizer:function(b,d){if(!b){b=new OpenLayers.Feature.Vector()}if(!this.styles[d]){d="default"}b.renderIntent=d;var a={};if(this.extendDefault&&d!="default"){a=this.styles["default"].createSymbolizer(b)}return OpenLayers.Util.extend(a,this.styles[d].createSymbolizer(b))},addUniqueValueRules:function(b,f,h,a){var g=[];for(var d in h){g.push(new OpenLayers.Rule({symbolizer:h[d],context:a,filter:new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.EQUAL_TO,property:f,value:d})}))}this.styles[b].addRules(g)},CLASS_NAME:"OpenLayers.StyleMap"});OpenLayers.Control.NavToolbar=OpenLayers.Class(OpenLayers.Control.Panel,{initialize:function(a){OpenLayers.Control.Panel.prototype.initialize.apply(this,[a]);this.addControls([new OpenLayers.Control.Navigation(),new OpenLayers.Control.ZoomBox()])},draw:function(){var a=OpenLayers.Control.Panel.prototype.draw.apply(this,arguments);this.activateControl(this.controls[0]);return a},CLASS_NAME:"OpenLayers.Control.NavToolbar"});OpenLayers.Filter.Comparison=OpenLayers.Class(OpenLayers.Filter,{type:null,property:null,value:null,matchCase:true,lowerBoundary:null,upperBoundary:null,initialize:function(a){OpenLayers.Filter.prototype.initialize.apply(this,[a])},evaluate:function(d){var a=false;switch(this.type){case OpenLayers.Filter.Comparison.EQUAL_TO:var b=d[this.property];var g=this.value;if(!this.matchCase&&typeof b=="string"&&typeof g=="string"){a=(b.toUpperCase()==g.toUpperCase())}else{a=(b==g)}break;case OpenLayers.Filter.Comparison.NOT_EQUAL_TO:var b=d[this.property];var g=this.value;if(!this.matchCase&&typeof b=="string"&&typeof g=="string"){a=(b.toUpperCase()!=g.toUpperCase())}else{a=(b!=g)}break;case OpenLayers.Filter.Comparison.LESS_THAN:a=d[this.property]<this.value;break;case OpenLayers.Filter.Comparison.GREATER_THAN:a=d[this.property]>this.value;break;case OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO:a=d[this.property]<=this.value;break;case OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO:a=d[this.property]>=this.value;break;case OpenLayers.Filter.Comparison.BETWEEN:a=(d[this.property]>=this.lowerBoundary)&&(d[this.property]<=this.upperBoundary);break;case OpenLayers.Filter.Comparison.LIKE:var f=new RegExp(this.value,"gi");a=f.test(d[this.property]);break}return a},value2regex:function(f,b,a){if(f=="."){var d="'.' is an unsupported wildCard character for OpenLayers.Filter.Comparison";OpenLayers.Console.error(d);return null}f=f?f:"*";b=b?b:".";a=a?a:"!";this.value=this.value.replace(new RegExp("\\"+a+"(.|$)","g"),"\\$1");this.value=this.value.replace(new RegExp("\\"+b,"g"),".");this.value=this.value.replace(new RegExp("\\"+f,"g"),".*");this.value=this.value.replace(new RegExp("\\\\.\\*","g"),"\\"+f);this.value=this.value.replace(new RegExp("\\\\\\.","g"),"\\"+b);return this.value},regex2value:function(){var a=this.value;a=a.replace(/!/g,"!!");a=a.replace(/(\\)?\\\./g,function(d,b){return b?d:"!."});a=a.replace(/(\\)?\\\*/g,function(d,b){return b?d:"!*"});a=a.replace(/\\\\/g,"\\");a=a.replace(/\.\*/g,"*");return a},clone:function(){return OpenLayers.Util.extend(new OpenLayers.Filter.Comparison(),this)},CLASS_NAME:"OpenLayers.Filter.Comparison"});OpenLayers.Filter.Comparison.EQUAL_TO="==";OpenLayers.Filter.Comparison.NOT_EQUAL_TO="!=";OpenLayers.Filter.Comparison.LESS_THAN="<";OpenLayers.Filter.Comparison.GREATER_THAN=">";OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO="<=";OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO=">=";OpenLayers.Filter.Comparison.BETWEEN="..";OpenLayers.Filter.Comparison.LIKE="~";OpenLayers.Filter.FeatureId=OpenLayers.Class(OpenLayers.Filter,{fids:null,initialize:function(a){this.fids=[];OpenLayers.Filter.prototype.initialize.apply(this,[a])},evaluate:function(d){for(var b=0,a=this.fids.length;b<a;b++){var f=d.fid||d.id;if(f==this.fids[b]){return true}}return false},clone:function(){var a=new OpenLayers.Filter.FeatureId();OpenLayers.Util.extend(a,this);a.fids=this.fids.slice();return a},CLASS_NAME:"OpenLayers.Filter.FeatureId"});OpenLayers.Filter.Logical=OpenLayers.Class(OpenLayers.Filter,{filters:null,type:null,initialize:function(a){this.filters=[];OpenLayers.Filter.prototype.initialize.apply(this,[a])},destroy:function(){this.filters=null;OpenLayers.Filter.prototype.destroy.apply(this)},evaluate:function(d){switch(this.type){case OpenLayers.Filter.Logical.AND:for(var b=0,a=this.filters.length;b<a;b++){if(this.filters[b].evaluate(d)==false){return false}}return true;case OpenLayers.Filter.Logical.OR:for(var b=0,a=this.filters.length;b<a;b++){if(this.filters[b].evaluate(d)==true){return true}}return false;case OpenLayers.Filter.Logical.NOT:return(!this.filters[0].evaluate(d))}},clone:function(){var d=[];for(var b=0,a=this.filters.length;b<a;++b){d.push(this.filters[b].clone())}return new OpenLayers.Filter.Logical({type:this.type,filters:d})},CLASS_NAME:"OpenLayers.Filter.Logical"});OpenLayers.Filter.Logical.AND="&&";OpenLayers.Filter.Logical.OR="||";OpenLayers.Filter.Logical.NOT="!";OpenLayers.Filter.Spatial=OpenLayers.Class(OpenLayers.Filter,{type:null,property:null,value:null,distance:null,distanceUnits:null,initialize:function(a){OpenLayers.Filter.prototype.initialize.apply(this,[a])},evaluate:function(d){var a=false;switch(this.type){case OpenLayers.Filter.Spatial.BBOX:case OpenLayers.Filter.Spatial.INTERSECTS:if(d.geometry){var b=this.value;if(this.value.CLASS_NAME=="OpenLayers.Bounds"){b=this.value.toGeometry()}if(d.geometry.intersects(b)){a=true}}break;default:OpenLayers.Console.error(OpenLayers.i18n("filterEvaluateNotImplemented"));break}return a},clone:function(){var a=OpenLayers.Util.applyDefaults({value:this.value&&this.value.clone&&this.value.clone()},this);return new OpenLayers.Filter.Spatial(a)},CLASS_NAME:"OpenLayers.Filter.Spatial"});OpenLayers.Filter.Spatial.BBOX="BBOX";OpenLayers.Filter.Spatial.INTERSECTS="INTERSECTS";OpenLayers.Filter.Spatial.DWITHIN="DWITHIN";OpenLayers.Filter.Spatial.WITHIN="WITHIN";OpenLayers.Filter.Spatial.CONTAINS="CONTAINS";OpenLayers.Geometry.Collection=OpenLayers.Class(OpenLayers.Geometry,{components:null,componentTypes:null,initialize:function(a){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);this.components=[];if(a!=null){this.addComponents(a)}},destroy:function(){this.components.length=0;this.components=null},clone:function(){var geometry=eval("new "+this.CLASS_NAME+"()");for(var i=0,len=this.components.length;i<len;i++){geometry.addComponent(this.components[i].clone())}OpenLayers.Util.applyDefaults(geometry,this);return geometry},getComponentsString:function(){var b=[];for(var d=0,a=this.components.length;d<a;d++){b.push(this.components[d].toShortString())}return b.join(",")},calculateBounds:function(){this.bounds=null;if(this.components&&this.components.length>0){this.setBounds(this.components[0].getBounds());for(var b=1,a=this.components.length;b<a;b++){this.extendBounds(this.components[b].getBounds())}}},addComponents:function(d){if(!(d instanceof Array)){d=[d]}for(var b=0,a=d.length;b<a;b++){this.addComponent(d[b])}},addComponent:function(b,a){var f=false;if(b){if(this.componentTypes==null||(OpenLayers.Util.indexOf(this.componentTypes,b.CLASS_NAME)>-1)){if(a!=null&&(a<this.components.length)){var g=this.components.slice(0,a);var d=this.components.slice(a,this.components.length);g.push(b);this.components=g.concat(d)}else{this.components.push(b)}b.parent=this;this.clearBounds();f=true}}return f},removeComponents:function(b){if(!(b instanceof Array)){b=[b]}for(var a=b.length-1;a>=0;--a){this.removeComponent(b[a])}},removeComponent:function(a){OpenLayers.Util.removeItem(this.components,a);this.clearBounds()},getLength:function(){var d=0;for(var b=0,a=this.components.length;b<a;b++){d+=this.components[b].getLength()}return d},getArea:function(){var d=0;for(var b=0,a=this.components.length;b<a;b++){d+=this.components[b].getArea()}return d},getGeodesicArea:function(b){var f=0;for(var d=0,a=this.components.length;d<a;d++){f+=this.components[d].getGeodesicArea(b)}return f},getCentroid:function(){return this.components.length&&this.components[0].getCentroid()},getGeodesicLength:function(b){var f=0;for(var d=0,a=this.components.length;d<a;d++){f+=this.components[d].getGeodesicLength(b)}return f},move:function(b,f){for(var d=0,a=this.components.length;d<a;d++){this.components[d].move(b,f)}},rotate:function(f,b){for(var d=0,a=this.components.length;d<a;++d){this.components[d].rotate(f,b)}},resize:function(f,a,d){for(var b=0;b<this.components.length;++b){this.components[b].resize(f,a,d)}return this},distanceTo:function(j,l){var b=!(l&&l.edge===false);var a=b&&l&&l.details;var m,d;var f=Number.POSITIVE_INFINITY;for(var g=0,h=this.components.length;g<h;++g){m=this.components[g].distanceTo(j,l);distance=a?m.distance:m;if(distance<f){f=distance;d=m;if(f==0){break}}}return d},equals:function(f){var b=true;if(!f||!f.CLASS_NAME||(this.CLASS_NAME!=f.CLASS_NAME)){b=false}else{if(!(f.components instanceof Array)||(f.components.length!=this.components.length)){b=false}else{for(var d=0,a=this.components.length;d<a;++d){if(!this.components[d].equals(f.components[d])){b=false;break}}}}return b},transform:function(g,d){if(g&&d){for(var f=0,a=this.components.length;f<a;f++){var b=this.components[f];b.transform(g,d)}this.bounds=null}return this},intersects:function(f){var b=false;for(var d=0,a=this.components.length;d<a;++d){b=f.intersects(this.components[d]);if(b){break}}return b},getVertices:function(b){var d=[];for(var f=0,a=this.components.length;f<a;++f){Array.prototype.push.apply(d,this.components[f].getVertices(b))}return d},CLASS_NAME:"OpenLayers.Geometry.Collection"});OpenLayers.Geometry.Point=OpenLayers.Class(OpenLayers.Geometry,{x:null,y:null,initialize:function(a,b){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);this.x=parseFloat(a);this.y=parseFloat(b)},clone:function(a){if(a==null){a=new OpenLayers.Geometry.Point(this.x,this.y)}OpenLayers.Util.applyDefaults(a,this);return a},calculateBounds:function(){this.bounds=new OpenLayers.Bounds(this.x,this.y,this.x,this.y)},distanceTo:function(h,o){var f=!(o&&o.edge===false);var a=f&&o&&o.details;var b,g,l,d,j,m;if(h instanceof OpenLayers.Geometry.Point){g=this.x;l=this.y;d=h.x;j=h.y;b=Math.sqrt(Math.pow(g-d,2)+Math.pow(l-j,2));m=!a?b:{x0:g,y0:l,x1:d,y1:j,distance:b}}else{m=h.distanceTo(this,o);if(a){m={x0:m.x1,y0:m.y1,x1:m.x0,y1:m.y0,distance:m.distance}}}return m},equals:function(a){var b=false;if(a!=null){b=((this.x==a.x&&this.y==a.y)||(isNaN(this.x)&&isNaN(this.y)&&isNaN(a.x)&&isNaN(a.y)))}return b},toShortString:function(){return(this.x+", "+this.y)},move:function(a,b){this.x=this.x+a;this.y=this.y+b;this.clearBounds()},rotate:function(f,b){f*=Math.PI/180;var a=this.distanceTo(b);var d=f+Math.atan2(this.y-b.y,this.x-b.x);this.x=b.x+(a*Math.cos(d));this.y=b.y+(a*Math.sin(d));this.clearBounds()},getCentroid:function(){return new OpenLayers.Geometry.Point(this.x,this.y)},resize:function(d,a,b){b=(b==undefined)?1:b;this.x=a.x+(d*b*(this.x-a.x));this.y=a.y+(d*(this.y-a.y));this.clearBounds();return this},intersects:function(b){var a=false;if(b.CLASS_NAME=="OpenLayers.Geometry.Point"){a=this.equals(b)}else{a=b.intersects(this)}return a},transform:function(b,a){if((b&&a)){OpenLayers.Projection.transform(this,b,a);this.bounds=null}return this},getVertices:function(a){return[this]},CLASS_NAME:"OpenLayers.Geometry.Point"});OpenLayers.Geometry.Rectangle=OpenLayers.Class(OpenLayers.Geometry,{x:null,y:null,width:null,height:null,initialize:function(b,f,d,a){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);this.x=b;this.y=f;this.width=d;this.height=a},calculateBounds:function(){this.bounds=new OpenLayers.Bounds(this.x,this.y,this.x+this.width,this.y+this.height)},getLength:function(){var a=(2*this.width)+(2*this.height);return a},getArea:function(){var a=this.width*this.height;return a},CLASS_NAME:"OpenLayers.Geometry.Rectangle"});OpenLayers.Geometry.Surface=OpenLayers.Class(OpenLayers.Geometry,{initialize:function(){OpenLayers.Geometry.prototype.initialize.apply(this,arguments)},CLASS_NAME:"OpenLayers.Geometry.Surface"});OpenLayers.Layer.KaMapCache=OpenLayers.Class(OpenLayers.Layer.KaMap,{IMAGE_EXTENSIONS:{jpeg:"jpg",gif:"gif",png:"png",png8:"png",png24:"png",dithered:"png"},DEFAULT_FORMAT:"jpeg",initialize:function(d,b,f,a){OpenLayers.Layer.KaMap.prototype.initialize.apply(this,arguments);this.extension=this.IMAGE_EXTENSIONS[this.params.i.toLowerCase()||DEFAULT_FORMAT]},getURL:function(a){a=this.adjustBounds(a);var h=this.map.getResolution();var g=Math.round((this.map.getScale()*10000))/10000;var f=Math.round(a.left/h);var d=-Math.round(a.top/h);var m=Math.floor(f/this.tileSize.w/this.params.metaTileSize.w)*this.tileSize.w*this.params.metaTileSize.w;var l=Math.floor(d/this.tileSize.h/this.params.metaTileSize.h)*this.tileSize.h*this.params.metaTileSize.h;var b=this.url;if(b instanceof Array){b=this.selectUrl(paramsString,b)}var j=[b,"/",this.params.map,"/",g,"/",this.params.g.replace(/\s/g,"_"),"/def/t",l,"/l",m,"/t",d,"l",f,".",this.extension];return j.join("")},CLASS_NAME:"OpenLayers.Layer.KaMapCache"});OpenLayers.Layer.MapServer.Untiled=OpenLayers.Class(OpenLayers.Layer.MapServer,{singleTile:true,initialize:function(d,b,g,a){OpenLayers.Layer.MapServer.prototype.initialize.apply(this,arguments);var f="The OpenLayers.Layer.MapServer.Untiled class is deprecated and will be removed in 3.0. Instead, you should use the normal OpenLayers.Layer.MapServer class, passing it the option 'singleTile' as true.";OpenLayers.Console.warn(f)},clone:function(a){if(a==null){a=new OpenLayers.Layer.MapServer.Untiled(this.name,this.url,this.params,this.options)}a=OpenLayers.Layer.MapServer.prototype.clone.apply(this,[a]);return a},CLASS_NAME:"OpenLayers.Layer.MapServer.Untiled"});OpenLayers.Layer.Vector=OpenLayers.Class(OpenLayers.Layer,{EVENT_TYPES:["beforefeatureadded","beforefeaturesadded","featureadded","featuresadded","beforefeatureremoved","featureremoved","featuresremoved","beforefeatureselected","featureselected","featureunselected","beforefeaturemodified","featuremodified","afterfeaturemodified","vertexmodified","sketchstarted","sketchmodified","sketchcomplete","refresh"],isBaseLayer:false,isFixed:false,isVector:true,features:null,selectedFeatures:null,unrenderedFeatures:null,reportError:true,style:null,styleMap:null,strategies:null,protocol:null,renderers:["SVG","VML","Canvas"],renderer:null,rendererOptions:null,geometryType:null,drawn:false,initialize:function(d,b){this.EVENT_TYPES=OpenLayers.Layer.Vector.prototype.EVENT_TYPES.concat(OpenLayers.Layer.prototype.EVENT_TYPES);OpenLayers.Layer.prototype.initialize.apply(this,arguments);if(!this.renderer||!this.renderer.supported()){this.assignRenderer()}if(!this.renderer||!this.renderer.supported()){this.renderer=null;this.displayError()}if(!this.styleMap){this.styleMap=new OpenLayers.StyleMap()}this.features=[];this.selectedFeatures=[];this.unrenderedFeatures={};if(this.strategies){for(var f=0,a=this.strategies.length;f<a;f++){this.strategies[f].setLayer(this)}}},destroy:function(){if(this.strategies){var d,b,a;for(b=0,a=this.strategies.length;b<a;b++){d=this.strategies[b];if(d.autoDestroy){d.destroy()}}this.strategies=null}if(this.protocol){if(this.protocol.autoDestroy){this.protocol.destroy()}this.protocol=null}this.destroyFeatures();this.features=null;this.selectedFeatures=null;this.unrenderedFeatures=null;if(this.renderer){this.renderer.destroy()}this.renderer=null;this.geometryType=null;this.drawn=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments)},refresh:function(a){if(this.calculateInRange()&&this.visibility){this.events.triggerEvent("refresh",a)}},assignRenderer:function(){for(var d=0,a=this.renderers.length;d<a;d++){var b=OpenLayers.Renderer[this.renderers[d]];if(b&&b.prototype.supported()){this.renderer=new b(this.div,this.rendererOptions);break}}},displayError:function(){if(this.reportError){OpenLayers.Console.userError(OpenLayers.i18n("browserNotSupported",{renderers:this.renderers.join("\n")}))}},setMap:function(a){OpenLayers.Layer.prototype.setMap.apply(this,arguments);if(!this.renderer){this.map.removeLayer(this)}else{this.renderer.map=this.map;this.renderer.setSize(this.map.getSize())}},afterAdd:function(){if(this.strategies){var d,b,a;for(b=0,a=this.strategies.length;b<a;b++){d=this.strategies[b];if(d.autoActivate){d.activate()}}}},removeMap:function(d){if(this.strategies){var f,b,a;for(b=0,a=this.strategies.length;b<a;b++){f=this.strategies[b];if(f.autoActivate){f.deactivate()}}}},onMapResize:function(){OpenLayers.Layer.prototype.onMapResize.apply(this,arguments);this.renderer.setSize(this.map.getSize())},moveTo:function(j,b,l){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);var g=true;if(!l){this.renderer.root.style.visibility="hidden";this.div.style.left=-parseInt(this.map.layerContainerDiv.style.left)+"px";this.div.style.top=-parseInt(this.map.layerContainerDiv.style.top)+"px";var h=this.map.getExtent();g=this.renderer.setExtent(h,b);this.renderer.root.style.visibility="visible";if(navigator.userAgent.toLowerCase().indexOf("gecko")!=-1){this.div.scrollLeft=this.div.scrollLeft}if(!b&&g){for(var f in this.unrenderedFeatures){var d=this.unrenderedFeatures[f];this.drawFeature(d)}}}if(!this.drawn||b||!g){this.drawn=true;var d;for(var f=0,a=this.features.length;f<a;f++){this.renderer.locked=(f!==(a-1));d=this.features[f];this.drawFeature(d)}}},display:function(a){OpenLayers.Layer.prototype.display.apply(this,arguments);var b=this.div.style.display;if(b!=this.renderer.root.style.display){this.renderer.root.style.display=b}},addFeatures:function(b,m){if(!(b instanceof Array)){b=[b]}var j=!m||!m.silent;if(j){var a={features:b};var h=this.events.triggerEvent("beforefeaturesadded",a);if(h===false){return}b=a.features}for(var d=0,g=b.length;d<g;d++){if(d!=(b.length-1)){this.renderer.locked=true}else{this.renderer.locked=false}var l=b[d];if(this.geometryType&&!(l.geometry instanceof this.geometryType)){var f=OpenLayers.i18n("componentShouldBe",{geomType:this.geometryType.prototype.CLASS_NAME});throw f}this.features.push(l);l.layer=this;if(!l.style&&this.style){l.style=OpenLayers.Util.extend({},this.style)}if(j){if(this.events.triggerEvent("beforefeatureadded",{feature:l})===false){continue}this.preFeatureInsert(l)}this.drawFeature(l);if(j){this.events.triggerEvent("featureadded",{feature:l});this.onFeatureInsert(l)}}if(j){this.events.triggerEvent("featuresadded",{features:b})}},removeFeatures:function(g,a){if(!g||g.length===0){return}if(!(g instanceof Array)){g=[g]}if(g===this.features){g=g.slice()}var f=!a||!a.silent;for(var d=g.length-1;d>=0;d--){if(d!=0&&g[d-1].geometry){this.renderer.locked=true}else{this.renderer.locked=false}var b=g[d];delete this.unrenderedFeatures[b.id];if(f){this.events.triggerEvent("beforefeatureremoved",{feature:b})}this.features=OpenLayers.Util.removeItem(this.features,b);b.layer=null;if(b.geometry){this.renderer.eraseFeatures(b)}if(OpenLayers.Util.indexOf(this.selectedFeatures,b)!=-1){OpenLayers.Util.removeItem(this.selectedFeatures,b)}if(f){this.events.triggerEvent("featureremoved",{feature:b})}}if(f){this.events.triggerEvent("featuresremoved",{features:g})}},destroyFeatures:function(f,a){var d=(f==undefined);if(d){f=this.features}if(f){this.removeFeatures(f,a);for(var b=f.length-1;b>=0;b--){f[b].destroy()}}},drawFeature:function(a,b){if(!this.drawn){return}if(typeof b!="object"){if(!b&&a.state===OpenLayers.State.DELETE){b="delete"}var d=b||a.renderIntent;b=a.style||this.style;if(!b){b=this.styleMap.createSymbolizer(a,d)}}if(!this.renderer.drawFeature(a,b)){this.unrenderedFeatures[a.id]=a}else{delete this.unrenderedFeatures[a.id]}},eraseFeatures:function(a){this.renderer.eraseFeatures(a)},getFeatureFromEvent:function(a){if(!this.renderer){OpenLayers.Console.error(OpenLayers.i18n("getFeatureError"));return null}var b=this.renderer.getFeatureIdFromEvent(a);return this.getFeatureById(b)},getFeatureById:function(f){var d=null;for(var b=0,a=this.features.length;b<a;++b){if(this.features[b].id==f){d=this.features[b];break}}return d},onFeatureInsert:function(a){},preFeatureInsert:function(a){},getDataExtent:function(){var b=null;if(this.features&&(this.features.length>0)){b=new OpenLayers.Bounds();for(var d=0,a=this.features.length;d<a;d++){b.extend(this.features[d].geometry.getBounds())}}return b},CLASS_NAME:"OpenLayers.Layer.Vector"});OpenLayers.Layer.WMS.Untiled=OpenLayers.Class(OpenLayers.Layer.WMS,{singleTile:true,initialize:function(d,b,g,a){OpenLayers.Layer.WMS.prototype.initialize.apply(this,arguments);var f="The OpenLayers.Layer.WMS.Untiled class is deprecated and will be removed in 3.0. Instead, you should use the normal OpenLayers.Layer.WMS class, passing it the option 'singleTile' as true.";OpenLayers.Console.warn(f)},clone:function(a){if(a==null){a=new OpenLayers.Layer.WMS.Untiled(this.name,this.url,this.params,this.options)}a=OpenLayers.Layer.WMS.prototype.clone.apply(this,[a]);return a},CLASS_NAME:"OpenLayers.Layer.WMS.Untiled"});OpenLayers.Control.GetFeature=OpenLayers.Class(OpenLayers.Control,{protocol:null,multipleKey:null,toggleKey:null,modifiers:null,multiple:false,click:true,clickout:true,toggle:false,clickTolerance:5,hover:false,box:false,maxFeatures:10,features:null,hoverFeature:null,handlerOptions:null,handlers:null,hoverResponse:null,EVENT_TYPES:["featureselected","featureunselected","clickout","beforefeatureselected","hoverfeature","outfeature"],initialize:function(a){this.EVENT_TYPES=OpenLayers.Control.GetFeature.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);a.handlerOptions=a.handlerOptions||{};OpenLayers.Control.prototype.initialize.apply(this,[a]);this.features={};this.handlers={};if(this.click){this.handlers.click=new OpenLayers.Handler.Click(this,{click:this.selectSingle},this.handlerOptions.click||{})}if(this.box){this.handlers.box=new OpenLayers.Handler.Box(this,{done:this.selectBox},OpenLayers.Util.extend(this.handlerOptions.box,{boxDivClassName:"olHandlerBoxSelectFeature"}))}if(this.hover){this.handlers.hover=new OpenLayers.Handler.Hover(this,{move:this.cancelHover,pause:this.selectHover},OpenLayers.Util.extend(this.handlerOptions.hover,{delay:250}))}},activate:function(){if(!this.active){for(var a in this.handlers){this.handlers[a].activate()}}return OpenLayers.Control.prototype.activate.apply(this,arguments)},deactivate:function(){if(this.active){for(var a in this.handlers){this.handlers[a].deactivate()}}return OpenLayers.Control.prototype.deactivate.apply(this,arguments)},unselectAll:function(a){var d;for(var b=this.features.length-1;b>=0;--b){d=this.features[b];if(!a||a.except!=d){this.unselect(d)}}},selectSingle:function(a){OpenLayers.Element.addClass(this.map.viewPortDiv,"olCursorWait");var b=this.pixelToBounds(a.xy);this.setModifiers(a);this.request(b,{single:true})},selectBox:function(a){if(a instanceof OpenLayers.Bounds){var f=this.map.getLonLatFromPixel(new OpenLayers.Pixel(a.left,a.bottom));var b=this.map.getLonLatFromPixel(new OpenLayers.Pixel(a.right,a.top));var d=new OpenLayers.Bounds(f.lon,f.lat,b.lon,b.lat);this.setModifiers(this.handlers.box.dragHandler.evt);this.request(d)}},selectHover:function(a){var b=this.pixelToBounds(a.xy);this.request(b,{single:true,hover:true})},cancelHover:function(){if(this.hoverResponse){this.protocol.abort(this.hoverResponse);this.hoverResponse=null}},request:function(f,b){b=b||{};var d=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.BBOX,value:f});var a=this.protocol.read({maxFeatures:b.single==true?this.maxFeatures:undefined,filter:d,callback:function(g){if(g.code==1){if(g.features.length){if(b.single==true){this.selectBestFeature(g.features,f.getCenterLonLat(),b)}else{this.select(g.features)}}else{if(b.hover){this.hoverSelect()}else{this.events.triggerEvent("clickout");if(this.clickout){this.unselectAll()}}}}OpenLayers.Element.removeClass(this.map.viewPortDiv,"olCursorWait")},scope:this});if(b.hover==true){this.hoverResponse=a}},selectBestFeature:function(b,a,m){m=m||{};if(b.length){var j=new OpenLayers.Geometry.Point(a.lon,a.lat);var l,f,g;var h=Number.MAX_VALUE;for(var d=0;d<b.length;++d){l=b[d];if(l.geometry){g=j.distanceTo(l.geometry,{edge:false});if(g<h){h=g;f=l;if(h==0){break}}}}if(m.hover==true){this.hoverSelect(f)}else{this.select(f||b)}}},setModifiers:function(a){this.modifiers={multiple:this.multiple||(this.multipleKey&&a[this.multipleKey]),toggle:this.toggle||(this.toggleKey&&a[this.toggleKey])}},select:function(f){if(!this.modifiers.multiple&&!this.modifiers.toggle){this.unselectAll()}if(!(f instanceof Array)){f=[f]}var d;for(var b=0,a=f.length;b<a;++b){d=f[b];if(this.features[d.fid||d.id]){if(this.modifiers.toggle){this.unselect(this.features[d.fid||d.id])}}else{cont=this.events.triggerEvent("beforefeatureselected",{feature:d});if(cont!==false){this.features[d.fid||d.id]=d;this.events.triggerEvent("featureselected",{feature:d})}}}},hoverSelect:function(a){var d=a?a.fid||a.id:null;var b=this.hoverFeature?this.hoverFeature.fid||this.hoverFeature.id:null;if(b&&b!=d){this.events.triggerEvent("outfeature",{feature:this.hoverFeature});this.hoverFeature=null}if(d&&d!=b){this.events.triggerEvent("hoverfeature",{feature:a});this.hoverFeature=a}},unselect:function(a){delete this.features[a.fid||a.id];this.events.triggerEvent("featureunselected",{feature:a})},unselectAll:function(){for(var a in this.features){this.unselect(this.features[a])}},setMap:function(b){for(var a in this.handlers){this.handlers[a].setMap(b)}OpenLayers.Control.prototype.setMap.apply(this,arguments)},pixelToBounds:function(b){var g=b.add(-this.clickTolerance/2,this.clickTolerance/2);var a=b.add(this.clickTolerance/2,-this.clickTolerance/2);var d=this.map.getLonLatFromPixel(g);var f=this.map.getLonLatFromPixel(a);return new OpenLayers.Bounds(d.lon,d.lat,f.lon,f.lat)},CLASS_NAME:"OpenLayers.Control.GetFeature"});OpenLayers.Control.Snapping=OpenLayers.Class(OpenLayers.Control,{EVENT_TYPES:["beforesnap","snap","unsnap"],DEFAULTS:{tolerance:10,node:true,edge:true,vertex:true},greedy:true,precedence:["node","vertex","edge"],resolution:null,geoToleranceCache:null,layer:null,feature:null,point:null,initialize:function(a){Array.prototype.push.apply(this.EVENT_TYPES,OpenLayers.Control.prototype.EVENT_TYPES);OpenLayers.Control.prototype.initialize.apply(this,[a]);this.options=a||{};if(this.options.layer){this.setLayer(this.options.layer)}var b=OpenLayers.Util.extend({},this.options.defaults);this.defaults=OpenLayers.Util.applyDefaults(b,this.DEFAULTS);this.setTargets(this.options.targets);if(this.targets.length===0&&this.layer){this.addTargetLayer(this.layer)}this.geoToleranceCache={}},setLayer:function(a){if(this.active){this.deactivate();this.layer=a;this.activate()}else{this.layer=a}},setTargets:function(b){this.targets=[];if(b&&b.length){var f;for(var d=0,a=b.length;d<a;++d){f=b[d];if(f instanceof OpenLayers.Layer.Vector){this.addTargetLayer(f)}else{this.addTarget(f)}}}},addTargetLayer:function(a){this.addTarget({layer:a})},addTarget:function(a){a=OpenLayers.Util.applyDefaults(a,this.defaults);a.nodeTolerance=a.nodeTolerance||a.tolerance;a.vertexTolerance=a.vertexTolerance||a.tolerance;a.edgeTolerance=a.edgeTolerance||a.tolerance;this.targets.push(a)},removeTargetLayer:function(b){var d;for(var a=this.targets.length-1;a>=0;--a){d=this.targets[a];if(d.layer===b){this.removeTarget(d)}}},removeTarget:function(a){return OpenLayers.Util.removeItem(this.targets,a)},activate:function(){var a=OpenLayers.Control.prototype.activate.call(this);if(a){if(this.layer&&this.layer.events){this.layer.events.on({sketchstarted:this.onSketchModified,sketchmodified:this.onSketchModified,vertexmodified:this.onVertexModified,scope:this})}}return a},deactivate:function(){var a=OpenLayers.Control.prototype.deactivate.call(this);if(a){if(this.layer&&this.layer.events){this.layer.events.un({sketchstarted:this.onSketchModified,sketchmodified:this.onSketchModified,vertexmodified:this.onVertexModified,scope:this})}}this.feature=null;this.point=null;return a},onSketchModified:function(a){this.feature=a.feature;this.considerSnapping(a.vertex,a.vertex)},onVertexModified:function(a){this.feature=a.feature;var b=this.layer.map.getLonLatFromViewPortPx(a.pixel);this.considerSnapping(a.vertex,new OpenLayers.Geometry.Point(b.lon,b.lat))},considerSnapping:function(l,f){var a={rank:Number.POSITIVE_INFINITY,dist:Number.POSITIVE_INFINITY,x:null,y:null};var d=false;var m,h;for(var b=0,g=this.targets.length;b<g;++b){h=this.targets[b];m=this.testTarget(h,f);if(m){if(this.greedy){a=m;a.target=h;d=true;break}else{if((m.rank<a.rank)||(m.rank===a.rank&&m.dist<a.dist)){a=m;a.target=h;d=true}}}}if(d){var j=this.events.triggerEvent("beforesnap",{point:l,x:a.x,y:a.y,distance:a.dist,layer:a.target.layer,snapType:this.precedence[a.rank]});if(j!==false){l.x=a.x;l.y=a.y;this.point=l;this.events.triggerEvent("snap",{point:l,snapType:this.precedence[a.rank],layer:a.target.layer,distance:a.dist})}else{d=false}}if(this.point&&!d){l.x=f.x;l.y=f.y;this.point=null;this.events.triggerEvent("unsnap",{point:l})}},testTarget:function(G,h){var E={node:this.getGeoTolerance(G.nodeTolerance),vertex:this.getGeoTolerance(G.vertexTolerance),edge:this.getGeoTolerance(G.edgeTolerance)};var l=Math.max(E.node,E.vertex,E.edge);var m={rank:Number.POSITIVE_INFINITY,dist:Number.POSITIVE_INFINITY};var g=false;var d=G.layer.features;var b,a,f,F,r,u,q;var p=this.precedence.length;var o=new OpenLayers.LonLat(h.x,h.y);for(var C=0,D=d.length;C<D;++C){b=d[C];if(b!==this.feature&&!b._sketch&&b.state!==OpenLayers.State.DELETE&&(!G.filter||G.filter.evaluate(b.attributes))){if(b.atPoint(o,l,l)){for(var B=0,v=Math.min(m.rank+1,p);B<v;++B){a=this.precedence[B];if(G[a]){if(a==="edge"){r=b.geometry.distanceTo(h,{details:true});u=r.distance;if(u<=E[a]&&u<m.dist){m={rank:B,dist:u,x:r.x0,y:r.y0};g=true;break}}else{f=b.geometry.getVertices(a==="node");q=false;for(var z=0,w=f.length;z<w;++z){F=f[z];u=F.distanceTo(h);if(u<=E[a]&&(B<m.rank||(B===m.rank&&u<m.dist))){m={rank:B,dist:u,x:F.x,y:F.y};g=true;q=true}}if(q){break}}}}}}}return g?m:null},getGeoTolerance:function(a){var b=this.layer.map.getResolution();if(b!==this.resolution){this.resolution=b;this.geoToleranceCache={}}var d=this.geoToleranceCache[a];if(d===undefined){d=a*b;this.geoToleranceCache[a]=d}return d},destroy:function(){if(this.active){this.deactivate()}delete this.layer;delete this.targets;OpenLayers.Control.prototype.destroy.call(this)},CLASS_NAME:"OpenLayers.Control.Snapping"});OpenLayers.Format.Filter=OpenLayers.Class(OpenLayers.Format.XML,{defaultVersion:"1.0.0",version:null,parser:null,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},write:function(d,b){var a=(b&&b.version)||this.version||this.defaultVersion;if(!this.parser||this.parser.VERSION!=a){var f=OpenLayers.Format.Filter["v"+a.replace(/\./g,"_")];if(!f){throw"Can't find a Filter parser for version "+a}this.parser=new f(this.options)}return this.parser.write(d)},read:function(d){if(typeof d=="string"){d=OpenLayers.Format.XML.prototype.read.apply(this,[d])}var a=this.version;if(!a){a=this.defaultVersion}if(!this.parser||this.parser.VERSION!=a){var f=OpenLayers.Format.Filter["v"+a.replace(/\./g,"_")];if(!f){throw"Can't find a Filter parser for version "+a}this.parser=new f(this.options)}var b=this.parser.read(d);return b},CLASS_NAME:"OpenLayers.Format.Filter"});OpenLayers.Format.SLD=OpenLayers.Class(OpenLayers.Format.XML,{defaultVersion:"1.0.0",version:null,namedLayersAsArray:false,parser:null,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},write:function(f,d){var b=(d&&d.version)||this.version||this.defaultVersion;if(!this.parser||this.parser.VERSION!=b){var g=OpenLayers.Format.SLD["v"+b.replace(/\./g,"_")];if(!g){throw"Can't find a SLD parser for version "+b}this.parser=new g(this.options)}var a=this.parser.write(f);return OpenLayers.Format.XML.prototype.write.apply(this,[a])},read:function(g,d){if(typeof g=="string"){g=OpenLayers.Format.XML.prototype.read.apply(this,[g])}var b=g.documentElement;var a=this.version;if(!a){a=b.getAttribute("version");if(!a){a=this.defaultVersion}}if(!this.parser||this.parser.VERSION!=a){var h=OpenLayers.Format.SLD["v"+a.replace(/\./g,"_")];if(!h){throw"Can't find a SLD parser for version "+a}this.parser=new h(this.options)}var f=this.parser.read(g,d);return f},CLASS_NAME:"OpenLayers.Format.SLD"});OpenLayers.Format.Text=OpenLayers.Class(OpenLayers.Format,{defaultStyle:null,extractStyles:true,initialize:function(a){a=a||{};if(a.extractStyles!==false){a.defaultStyle={externalGraphic:OpenLayers.Util.getImagesLocation()+"marker.png",graphicWidth:21,graphicHeight:25,graphicXOffset:-10.5,graphicYOffset:-12.5}}OpenLayers.Format.prototype.initialize.apply(this,[a])},read:function(o){var a=o.split("\n");var b;var j=[];for(var D=0;D<(a.length-1);D++){var C=a[D].replace(/^\s*/,"").replace(/\s*$/,"");if(C.charAt(0)!="#"){if(!b){b=C.split("\t")}else{var q=C.split("\t");var f=new OpenLayers.Geometry.Point(0,0);var l={};var w=this.defaultStyle?OpenLayers.Util.applyDefaults({},this.defaultStyle):null;var z,B,d,u;var p=false;for(var m=0;m<q.length;m++){if(q[m]){if(b[m]=="point"){var v=q[m].split(",");f.y=parseFloat(v[0]);f.x=parseFloat(v[1]);p=true}else{if(b[m]=="lat"){f.y=parseFloat(q[m]);p=true}else{if(b[m]=="lon"){f.x=parseFloat(q[m]);p=true}else{if(b[m]=="title"){l.title=q[m]}else{if(b[m]=="image"||b[m]=="icon"&&w){w.externalGraphic=q[m]}else{if(b[m]=="iconSize"&&w){var r=q[m].split(",");w.graphicWidth=parseFloat(r[0]);w.graphicHeight=parseFloat(r[1])}else{if(b[m]=="iconOffset"&&w){var h=q[m].split(",");w.graphicXOffset=parseFloat(h[0]);w.graphicYOffset=parseFloat(h[1])}else{if(b[m]=="description"){l.description=q[m]}else{if(b[m]=="overflow"){l.overflow=q[m]}else{l[b[m]]=q[m]}}}}}}}}}}}if(p){if(this.internalProjection&&this.externalProjection){f.transform(this.externalProjection,this.internalProjection)}var g=new OpenLayers.Feature.Vector(f,l,w);j.push(g)}}}}return j},CLASS_NAME:"OpenLayers.Format.Text"});OpenLayers.Geometry.MultiPoint=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.Point"],initialize:function(a){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments)},addPoint:function(a,b){this.addComponent(a,b)},removePoint:function(a){this.removeComponent(a)},CLASS_NAME:"OpenLayers.Geometry.MultiPoint"});OpenLayers.Handler.Point=OpenLayers.Class(OpenLayers.Handler,{point:null,layer:null,multi:false,drawing:false,mouseDown:false,lastDown:null,lastUp:null,persist:false,layerOptions:null,initialize:function(d,b,a){if(!(a&&a.layerOptions&&a.layerOptions.styleMap)){this.style=OpenLayers.Util.extend(OpenLayers.Feature.Vector.style["default"],{})}OpenLayers.Handler.prototype.initialize.apply(this,arguments)},activate:function(){if(!OpenLayers.Handler.prototype.activate.apply(this,arguments)){return false}var a=OpenLayers.Util.extend({displayInLayerSwitcher:false,calculateInRange:function(){return true}},this.layerOptions);this.layer=new OpenLayers.Layer.Vector(this.CLASS_NAME,a);this.map.addLayer(this.layer);return true},createFeature:function(a){var b=this.map.getLonLatFromPixel(a);this.point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(b.lon,b.lat));this.callback("create",[this.point.geometry,this.point]);this.point.geometry.clearBounds();this.layer.addFeatures([this.point],{silent:true})},deactivate:function(){if(!OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){return false}if(this.drawing){this.cancel()}this.destroyFeature();if(this.layer.map!=null){this.layer.destroy(false)}this.layer=null;return true},destroyFeature:function(){if(this.layer){this.layer.destroyFeatures()}this.point=null},finalize:function(b){var a=b?"cancel":"done";this.drawing=false;this.mouseDown=false;this.lastDown=null;this.lastUp=null;this.callback(a,[this.geometryClone()]);if(b||!this.persist){this.destroyFeature()}},cancel:function(){this.finalize(true)},click:function(a){OpenLayers.Event.stop(a);return false},dblclick:function(a){OpenLayers.Event.stop(a);return false},modifyFeature:function(a){var b=this.map.getLonLatFromPixel(a);this.point.geometry.x=b.lon;this.point.geometry.y=b.lat;this.callback("modify",[this.point.geometry,this.point]);this.point.geometry.clearBounds();this.drawFeature()},drawFeature:function(){this.layer.drawFeature(this.point,this.style)},getGeometry:function(){var a=this.point&&this.point.geometry;if(a&&this.multi){a=new OpenLayers.Geometry.MultiPoint([a])}return a},geometryClone:function(){var a=this.getGeometry();return a&&a.clone()},mousedown:function(a){if(!this.checkModifiers(a)){return true}if(this.lastDown&&this.lastDown.equals(a.xy)){return true}this.drawing=true;if(this.lastDown==null){if(this.persist){this.destroyFeature()}this.createFeature(a.xy)}else{this.modifyFeature(a.xy)}this.lastDown=a.xy;return false},mousemove:function(a){if(this.drawing){this.modifyFeature(a.xy)}return true},mouseup:function(a){if(this.drawing){this.finalize();return false}else{return true}},CLASS_NAME:"OpenLayers.Handler.Point"});OpenLayers.Layer.GML=OpenLayers.Class(OpenLayers.Layer.Vector,{loaded:false,format:null,formatOptions:null,initialize:function(f,d,b){var a=[];a.push(f,b);OpenLayers.Layer.Vector.prototype.initialize.apply(this,a);this.url=d},setVisibility:function(a,b){OpenLayers.Layer.Vector.prototype.setVisibility.apply(this,arguments);if(this.visibility&&!this.loaded){this.loadGML()}},moveTo:function(d,a,b){OpenLayers.Layer.Vector.prototype.moveTo.apply(this,arguments);if(this.visibility&&!this.loaded){this.loadGML()}},loadGML:function(){if(!this.loaded){this.events.triggerEvent("loadstart");OpenLayers.Request.GET({url:this.url,success:this.requestSuccess,failure:this.requestFailure,scope:this});this.loaded=true}},setUrl:function(a){this.url=a;this.destroyFeatures();this.loaded=false;this.loadGML()},requestSuccess:function(d){var f=d.responseXML;if(!f||!f.documentElement){f=d.responseText}var a={};OpenLayers.Util.extend(a,this.formatOptions);if(this.map&&!this.projection.equals(this.map.getProjectionObject())){a.externalProjection=this.projection;a.internalProjection=this.map.getProjectionObject()}var b=this.format?new this.format(a):new OpenLayers.Format.GML(a);this.addFeatures(b.read(f));this.events.triggerEvent("loadend")},requestFailure:function(a){OpenLayers.Console.userError(OpenLayers.i18n("errorLoadingGML",{url:this.url}));this.events.triggerEvent("loadend")},CLASS_NAME:"OpenLayers.Layer.GML"});OpenLayers.Layer.PointTrack=OpenLayers.Class(OpenLayers.Layer.Vector,{dataFrom:null,initialize:function(b,a){OpenLayers.Layer.Vector.prototype.initialize.apply(this,arguments)},addNodes:function(h){if(h.length<2){OpenLayers.Console.error("At least two point features have to be added to createa line from");return}var o=new Array(h.length-1);var j,a,l;for(var d=0,g=h.length;d<g;d++){j=h[d];l=j.geometry;if(!l){var f=j.lonlat;l=new OpenLayers.Geometry.Point(f.lon,f.lat)}else{if(l.CLASS_NAME!="OpenLayers.Geometry.Point"){OpenLayers.Console.error("Only features with point geometries are supported.");return}}if(d>0){var b=(this.dataFrom!=null)?(h[d+this.dataFrom].data||h[d+this.dataFrom].attributes):null;var m=new OpenLayers.Geometry.LineString([a,l]);o[d-1]=new OpenLayers.Feature.Vector(m,b)}a=l}this.addFeatures(o)},CLASS_NAME:"OpenLayers.Layer.PointTrack"});OpenLayers.Layer.PointTrack.dataFrom={SOURCE_NODE:-1,TARGET_NODE:0};OpenLayers.Layer.Vector.RootContainer=OpenLayers.Class(OpenLayers.Layer.Vector,{displayInLayerSwitcher:false,layers:null,initialize:function(b,a){OpenLayers.Layer.Vector.prototype.initialize.apply(this,arguments)},display:function(){},getFeatureFromEvent:function(a){var f=this.layers;var d;for(var b=0;b<f.length;b++){d=f[b].getFeatureFromEvent(a);if(d){return d}}},setMap:function(a){OpenLayers.Layer.Vector.prototype.setMap.apply(this,arguments);this.collectRoots();a.events.register("changelayer",this,this.handleChangeLayer)},removeMap:function(a){a.events.unregister("changelayer",this,this.handleChangeLayer);this.resetRoots();OpenLayers.Layer.Vector.prototype.removeMap.apply(this,arguments)},collectRoots:function(){var b;for(var a=0;a<this.map.layers.length;++a){b=this.map.layers[a];if(OpenLayers.Util.indexOf(this.layers,b)!=-1){b.renderer.moveRoot(this.renderer)}}},resetRoots:function(){var b;for(var a=0;a<this.layers.length;++a){b=this.layers[a];if(this.renderer&&b.renderer.getRenderLayerId()==this.id){this.renderer.moveRoot(b.renderer)}}},handleChangeLayer:function(a){var b=a.layer;if(a.property=="order"&&OpenLayers.Util.indexOf(this.layers,b)!=-1){this.resetRoots();this.collectRoots()}},CLASS_NAME:"OpenLayers.Layer.Vector.RootContainer"});OpenLayers.Layer.WFS=OpenLayers.Class(OpenLayers.Layer.Vector,OpenLayers.Layer.Markers,{isBaseLayer:false,tile:null,ratio:2,DEFAULT_PARAMS:{service:"WFS",version:"1.0.0",request:"GetFeature"},featureClass:null,format:null,formatObject:null,formatOptions:null,vectorMode:true,encodeBBOX:false,extractAttributes:false,initialize:function(f,d,g,b){if(b==undefined){b={}}if(b.featureClass||!OpenLayers.Layer.Vector||!OpenLayers.Feature.Vector){this.vectorMode=false}OpenLayers.Util.extend(b,{reportError:false});var a=[];a.push(f,b);OpenLayers.Layer.Vector.prototype.initialize.apply(this,a);if(!this.renderer||!this.vectorMode){this.vectorMode=false;if(!b.featureClass){b.featureClass=OpenLayers.Feature.WFS}OpenLayers.Layer.Markers.prototype.initialize.apply(this,a)}if(this.params&&this.params.typename&&!this.options.typename){this.options.typename=this.params.typename}if(!this.options.geometry_column){this.options.geometry_column="the_geom"}this.params=OpenLayers.Util.applyDefaults(g,OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS));this.url=d},destroy:function(){if(this.vectorMode){OpenLayers.Layer.Vector.prototype.destroy.apply(this,arguments)}else{OpenLayers.Layer.Markers.prototype.destroy.apply(this,arguments)}if(this.tile){this.tile.destroy()}this.tile=null;this.ratio=null;this.featureClass=null;this.format=null;if(this.formatObject&&this.formatObject.destroy){this.formatObject.destroy()}this.formatObject=null;this.formatOptions=null;this.vectorMode=null;this.encodeBBOX=null;this.extractAttributes=null},setMap:function(b){if(this.vectorMode){OpenLayers.Layer.Vector.prototype.setMap.apply(this,arguments);var a={extractAttributes:this.extractAttributes};OpenLayers.Util.extend(a,this.formatOptions);if(this.map&&!this.projection.equals(this.map.getProjectionObject())){a.externalProjection=this.projection;a.internalProjection=this.map.getProjectionObject()}this.formatObject=this.format?new this.format(a):new OpenLayers.Format.GML(a)}else{OpenLayers.Layer.Markers.prototype.setMap.apply(this,arguments)}},moveTo:function(a,b,u){if(this.vectorMode){OpenLayers.Layer.Vector.prototype.moveTo.apply(this,arguments)}else{OpenLayers.Layer.Markers.prototype.moveTo.apply(this,arguments)}if(u){return false}if(b){if(this.vectorMode){this.renderer.clear()}}if(this.options.minZoomLevel){OpenLayers.Console.warn(OpenLayers.i18n("minZoomLevelError"));if(this.map.getZoom()<this.options.minZoomLevel){return null}}if(a==null){a=this.map.getExtent()}var r=(this.tile==null);var j=(!r&&!this.tile.bounds.containsBounds(a));if(b||r||(!u&&j)){var d=a.getCenterLonLat();var q=a.getWidth()*this.ratio;var l=a.getHeight()*this.ratio;var o=new OpenLayers.Bounds(d.lon-(q/2),d.lat-(l/2),d.lon+(q/2),d.lat+(l/2));var v=this.map.getSize();v.w=v.w*this.ratio;v.h=v.h*this.ratio;var m=new OpenLayers.LonLat(o.left,o.top);var p=this.map.getLayerPxFromLonLat(m);var f=this.getFullRequestString();var h=null;var g=this.params.filter||this.params.FILTER;if(g){h={FILTER:g}}else{h={BBOX:this.encodeBBOX?o.toBBOX():o.toArray()}}if(this.map&&!this.projection.equals(this.map.getProjectionObject())){var w=o.clone();w.transform(this.map.getProjectionObject(),this.projection);if(!g){h.BBOX=this.encodeBBOX?w.toBBOX():w.toArray()}}f+="&"+OpenLayers.Util.getParameterString(h);if(!this.tile){this.tile=new OpenLayers.Tile.WFS(this,p,o,f,v);this.addTileMonitoringHooks(this.tile);this.tile.draw()}else{if(this.vectorMode){this.destroyFeatures();this.renderer.clear()}else{this.clearMarkers()}this.removeTileMonitoringHooks(this.tile);this.tile.destroy();this.tile=null;this.tile=new OpenLayers.Tile.WFS(this,p,o,f,v);this.addTileMonitoringHooks(this.tile);this.tile.draw()}}},addTileMonitoringHooks:function(a){a.onLoadStart=function(){if(this==this.layer.tile){this.layer.events.triggerEvent("loadstart")}};a.events.register("loadstart",a,a.onLoadStart);a.onLoadEnd=function(){if(this==this.layer.tile){this.layer.events.triggerEvent("tileloaded");this.layer.events.triggerEvent("loadend")}};a.events.register("loadend",a,a.onLoadEnd);a.events.register("unload",a,a.onLoadEnd)},removeTileMonitoringHooks:function(a){a.unload();a.events.un({loadstart:a.onLoadStart,loadend:a.onLoadEnd,unload:a.onLoadEnd,scope:a})},onMapResize:function(){if(this.vectorMode){OpenLayers.Layer.Vector.prototype.onMapResize.apply(this,arguments)}else{OpenLayers.Layer.Markers.prototype.onMapResize.apply(this,arguments)}},display:function(){if(this.vectorMode){OpenLayers.Layer.Vector.prototype.display.apply(this,arguments)}else{OpenLayers.Layer.Markers.prototype.display.apply(this,arguments)}},mergeNewParams:function(d){var b=OpenLayers.Util.upperCaseObject(d);var a=[b];return OpenLayers.Layer.HTTPRequest.prototype.mergeNewParams.apply(this,a)},clone:function(a){if(a==null){a=new OpenLayers.Layer.WFS(this.name,this.url,this.params,this.options)}if(this.vectorMode){a=OpenLayers.Layer.Vector.prototype.clone.apply(this,[a])}else{a=OpenLayers.Layer.Markers.prototype.clone.apply(this,[a])}return a},getFullRequestString:function(d,b){var a=this.projection.getCode()||this.map.getProjection();this.params.SRS=(a=="none")?null:a;return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,arguments)},commit:function(){if(!this.writer){var a={};if(this.map&&!this.projection.equals(this.map.getProjectionObject())){a.externalProjection=this.projection;a.internalProjection=this.map.getProjectionObject()}this.writer=new OpenLayers.Format.WFS(a,this)}var b=this.writer.write(this.features);OpenLayers.Request.POST({url:this.url,data:b,success:this.commitSuccess,failure:this.commitFailure,scope:this})},commitSuccess:function(d){var a=d.responseText;if(a.indexOf("SUCCESS")!=-1){this.commitReport(OpenLayers.i18n("commitSuccess",{response:a}));for(var b=0;b<this.features.length;b++){this.features[b].state=null}}else{if(a.indexOf("FAILED")!=-1||a.indexOf("Exception")!=-1){this.commitReport(OpenLayers.i18n("commitFailed",{response:a}))}}},commitFailure:function(a){},commitReport:function(b,a){OpenLayers.Console.userError(b)},refresh:function(){if(this.tile){if(this.vectorMode){this.renderer.clear();this.features.length=0}else{this.clearMarkers();this.markers.length=0}this.tile.draw()}},getDataExtent:function(){var a;if(this.vectorMode){a=OpenLayers.Layer.Vector.prototype.getDataExtent.apply(this)}else{a=OpenLayers.Layer.Markers.prototype.getDataExtent.apply(this)}return a},setOpacity:function(a){if(this.vectorMode){OpenLayers.Layer.Vector.prototype.setOpacity.apply(this,[a])}else{OpenLayers.Layer.Markers.prototype.setOpacity.apply(this,[a])}},CLASS_NAME:"OpenLayers.Layer.WFS"});OpenLayers.Strategy.BBOX=OpenLayers.Class(OpenLayers.Strategy,{bounds:null,resolution:null,ratio:2,resFactor:null,response:null,initialize:function(a){OpenLayers.Strategy.prototype.initialize.apply(this,[a])},activate:function(){var a=OpenLayers.Strategy.prototype.activate.call(this);if(a){this.layer.events.on({moveend:this.update,scope:this});this.layer.events.on({refresh:this.update,scope:this})}return a},deactivate:function(){var a=OpenLayers.Strategy.prototype.deactivate.call(this);if(a){this.layer.events.un({moveend:this.update,scope:this});this.layer.events.un({refresh:this.update,scope:this})}return a},update:function(b){var a=this.getMapBounds();if((b&&b.force)||this.invalidBounds(a)){this.calculateBounds(a);this.resolution=this.layer.map.getResolution();this.triggerRead()}},getMapBounds:function(){var a=this.layer.map.getExtent();if(!this.layer.projection.equals(this.layer.map.getProjectionObject())){a=a.clone().transform(this.layer.map.getProjectionObject(),this.layer.projection)}return a},invalidBounds:function(a){if(!a){a=this.getMapBounds()}var d=!this.bounds||!this.bounds.containsBounds(a);if(!d&&this.resFactor){var b=this.resolution/this.layer.map.getResolution();d=(b>=this.resFactor||b<=(1/this.resFactor))}return d},calculateBounds:function(b){if(!b){b=this.getMapBounds()}var a=b.getCenterLonLat();var f=b.getWidth()*this.ratio;var d=b.getHeight()*this.ratio;this.bounds=new OpenLayers.Bounds(a.lon-(f/2),a.lat-(d/2),a.lon+(f/2),a.lat+(d/2))},triggerRead:function(){this.layer.protocol.abort(this.response);this.layer.events.triggerEvent("loadstart");this.response=this.layer.protocol.read({filter:this.createFilter(),callback:this.merge,scope:this})},createFilter:function(){var a=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.BBOX,value:this.bounds,projection:this.layer.projection});if(this.layer.filter){a=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.AND,filters:[this.layer.filter,a]})}return a},merge:function(j){this.layer.destroyFeatures();var g=j.features;if(g&&g.length>0){var h=this.layer.projection;var f=this.layer.map.getProjectionObject();if(!f.equals(h)){var d;for(var b=0,a=g.length;b<a;++b){d=g[b].geometry;if(d){d.transform(h,f)}}}this.layer.addFeatures(g)}this.layer.events.triggerEvent("loadend")},CLASS_NAME:"OpenLayers.Strategy.BBOX"});OpenLayers.Control.SelectFeature=OpenLayers.Class(OpenLayers.Control,{EVENT_TYPES:["beforefeaturehighlighted","featurehighlighted","featureunhighlighted"],multipleKey:null,toggleKey:null,multiple:false,clickout:true,toggle:false,hover:false,highlightOnly:false,box:false,onBeforeSelect:function(){},onSelect:function(){},onUnselect:function(){},scope:null,geometryTypes:null,layer:null,layers:null,callbacks:null,selectStyle:null,renderIntent:"select",handlers:null,initialize:function(d,a){this.EVENT_TYPES=OpenLayers.Control.SelectFeature.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);OpenLayers.Control.prototype.initialize.apply(this,[a]);if(this.scope===null){this.scope=this}if(d instanceof Array){this.layers=d;this.layer=new OpenLayers.Layer.Vector.RootContainer(this.id+"_container",{layers:d})}else{this.layer=d}var b={click:this.clickFeature,clickout:this.clickoutFeature};if(this.hover){b.over=this.overFeature;b.out=this.outFeature}this.callbacks=OpenLayers.Util.extend(b,this.callbacks);this.handlers={feature:new OpenLayers.Handler.Feature(this,this.layer,this.callbacks,{geometryTypes:this.geometryTypes})};if(this.box){this.handlers.box=new OpenLayers.Handler.Box(this,{done:this.selectBox},{boxDivClassName:"olHandlerBoxSelectFeature"})}},destroy:function(){OpenLayers.Control.prototype.destroy.apply(this,arguments);if(this.layers){this.layer.destroy()}},activate:function(){if(!this.active){if(this.layers){this.map.addLayer(this.layer)}this.handlers.feature.activate();if(this.box&&this.handlers.box){this.handlers.box.activate()}}return OpenLayers.Control.prototype.activate.apply(this,arguments)},deactivate:function(){if(this.active){this.handlers.feature.deactivate();if(this.handlers.box){this.handlers.box.deactivate()}if(this.layers){this.map.removeLayer(this.layer)}}return OpenLayers.Control.prototype.deactivate.apply(this,arguments)},unselectAll:function(b){var h=this.layers||[this.layer];var g,f;for(var a=0;a<h.length;++a){g=h[a];for(var d=g.selectedFeatures.length-1;d>=0;--d){f=g.selectedFeatures[d];if(!b||b.except!=f){this.unselect(f)}}}},clickFeature:function(a){if(!this.hover){var b=(OpenLayers.Util.indexOf(a.layer.selectedFeatures,a)>-1);if(b){if(this.toggleSelect()){this.unselect(a)}else{if(!this.multipleSelect()){this.unselectAll({except:a})}}}else{if(!this.multipleSelect()){this.unselectAll({except:a})}this.select(a)}}},multipleSelect:function(){return this.multiple||(this.handlers.feature.evt&&this.handlers.feature.evt[this.multipleKey])},toggleSelect:function(){return this.toggle||(this.handlers.feature.evt&&this.handlers.feature.evt[this.toggleKey])},clickoutFeature:function(a){if(!this.hover&&this.clickout){this.unselectAll()}},overFeature:function(b){var a=b.layer;if(this.hover){if(this.highlightOnly){this.highlight(b)}else{if(OpenLayers.Util.indexOf(a.selectedFeatures,b)==-1){this.select(b)}}}},outFeature:function(a){if(this.hover){if(this.highlightOnly){if(a._lastHighlighter==this.id){if(a._prevHighlighter&&a._prevHighlighter!=this.id){delete a._lastHighlighter;var b=this.map.getControl(a._prevHighlighter);if(b){b.highlight(a)}}else{this.unhighlight(a)}}}else{this.unselect(a)}}},highlight:function(d){var b=d.layer;var a=this.events.triggerEvent("beforefeaturehighlighted",{feature:d});if(a!==false){d._prevHighlighter=d._lastHighlighter;d._lastHighlighter=this.id;var f=this.selectStyle||this.renderIntent;b.drawFeature(d,f);this.events.triggerEvent("featurehighlighted",{feature:d})}},unhighlight:function(b){var a=b.layer;b._lastHighlighter=b._prevHighlighter;delete b._prevHighlighter;a.drawFeature(b,b.style||b.layer.style||"default");this.events.triggerEvent("featureunhighlighted",{feature:b})},select:function(d){var a=this.onBeforeSelect.call(this.scope,d);var b=d.layer;if(a!==false){a=b.events.triggerEvent("beforefeatureselected",{feature:d});if(a!==false){b.selectedFeatures.push(d);this.highlight(d);b.events.triggerEvent("featureselected",{feature:d});this.onSelect.call(this.scope,d)}}},unselect:function(b){var a=b.layer;this.unhighlight(b);OpenLayers.Util.removeItem(a.selectedFeatures,b);a.events.triggerEvent("featureunselected",{feature:b});this.onUnselect.call(this.scope,b)},selectBox:function(g){if(g instanceof OpenLayers.Bounds){var m=this.map.getLonLatFromPixel(new OpenLayers.Pixel(g.left,g.bottom));var p=this.map.getLonLatFromPixel(new OpenLayers.Pixel(g.right,g.top));var a=new OpenLayers.Bounds(m.lon,m.lat,p.lon,p.lat);if(!this.multipleSelect()){this.unselectAll()}var o=this.multiple;this.multiple=true;var f=this.layers||[this.layer];var h;for(var b=0;b<f.length;++b){h=f[b];for(var d=0,j=h.features.length;d<j;++d){var q=h.features[d];if(this.geometryTypes==null||OpenLayers.Util.indexOf(this.geometryTypes,q.geometry.CLASS_NAME)>-1){if(a.toGeometry().intersects(q.geometry)){if(OpenLayers.Util.indexOf(h.selectedFeatures,q)==-1){this.select(q)}}}}}this.multiple=o}},setMap:function(a){this.handlers.feature.setMap(a);if(this.box){this.handlers.box.setMap(a)}OpenLayers.Control.prototype.setMap.apply(this,arguments)},CLASS_NAME:"OpenLayers.Control.SelectFeature"});OpenLayers.Format.Filter.v1=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{ogc:"http://www.opengis.net/ogc",gml:"http://www.opengis.net/gml",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},defaultPrefix:"ogc",schemaLocation:null,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},read:function(a){var b={};this.readers.ogc.Filter.apply(this,[a,b]);return b.filter},readers:{ogc:{Filter:function(b,a){var d={fids:[],filters:[]};this.readChildNodes(b,d);if(d.fids.length>0){a.filter=new OpenLayers.Filter.FeatureId({fids:d.fids})}else{if(d.filters.length>0){a.filter=d.filters[0]}}},FeatureId:function(a,b){var d=a.getAttribute("fid");if(d){b.fids.push(d)}},And:function(b,d){var a=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.AND});this.readChildNodes(b,a);d.filters.push(a)},Or:function(b,d){var a=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.OR});this.readChildNodes(b,a);d.filters.push(a)},Not:function(b,d){var a=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.NOT});this.readChildNodes(b,a);d.filters.push(a)},PropertyIsLessThan:function(b,d){var a=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.LESS_THAN});this.readChildNodes(b,a);d.filters.push(a)},PropertyIsGreaterThan:function(b,d){var a=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.GREATER_THAN});this.readChildNodes(b,a);d.filters.push(a)},PropertyIsLessThanOrEqualTo:function(b,d){var a=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO});this.readChildNodes(b,a);d.filters.push(a)},PropertyIsGreaterThanOrEqualTo:function(b,d){var a=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO});this.readChildNodes(b,a);d.filters.push(a)},PropertyIsBetween:function(b,d){var a=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.BETWEEN});this.readChildNodes(b,a);d.filters.push(a)},PropertyIsLike:function(f,g){var d=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.LIKE});this.readChildNodes(f,d);var h=f.getAttribute("wildCard");var b=f.getAttribute("singleChar");var a=f.getAttribute("escape");d.value2regex(h,b,a);g.filters.push(d)},Literal:function(a,b){b.value=OpenLayers.String.numericIf(this.getChildValue(a))},PropertyName:function(b,a){a.property=this.getChildValue(b)},LowerBoundary:function(b,a){a.lowerBoundary=OpenLayers.String.numericIf(this.readOgcExpression(b))},UpperBoundary:function(b,a){a.upperBoundary=OpenLayers.String.numericIf(this.readOgcExpression(b))},Intersects:function(a,b){this.readSpatial(a,b,OpenLayers.Filter.Spatial.INTERSECTS)},Within:function(a,b){this.readSpatial(a,b,OpenLayers.Filter.Spatial.WITHIN)},Contains:function(a,b){this.readSpatial(a,b,OpenLayers.Filter.Spatial.CONTAINS)},DWithin:function(a,b){this.readSpatial(a,b,OpenLayers.Filter.Spatial.DWITHIN)},Distance:function(a,b){b.distance=parseInt(this.getChildValue(a));b.distanceUnits=a.getAttribute("units")}}},readSpatial:function(d,f,b){var a=new OpenLayers.Filter.Spatial({type:b});this.readChildNodes(d,a);a.value=a.components[0];delete a.components;f.filters.push(a)},readOgcExpression:function(a){var d={};this.readChildNodes(a,d);var b=d.value;if(!b){b=this.getChildValue(a)}return b},write:function(a){return this.writers.ogc.Filter.apply(this,[a])},writers:{ogc:{Filter:function(d){var f=this.createElementNSPlus("ogc:Filter");var b=d.CLASS_NAME.split(".").pop();if(b=="FeatureId"){for(var a=0;a<d.fids.length;++a){this.writeNode("FeatureId",d.fids[a],f)}}else{this.writeNode(this.getFilterType(d),d,f)}return f},FeatureId:function(a){return this.createElementNSPlus("ogc:FeatureId",{attributes:{fid:a}})},And:function(d){var f=this.createElementNSPlus("ogc:And");var b;for(var a=0;a<d.filters.length;++a){b=d.filters[a];this.writeNode(this.getFilterType(b),b,f)}return f},Or:function(d){var f=this.createElementNSPlus("ogc:Or");var b;for(var a=0;a<d.filters.length;++a){b=d.filters[a];this.writeNode(this.getFilterType(b),b,f)}return f},Not:function(b){var d=this.createElementNSPlus("ogc:Not");var a=b.filters[0];this.writeNode(this.getFilterType(a),a,d);return d},PropertyIsLessThan:function(a){var b=this.createElementNSPlus("ogc:PropertyIsLessThan");this.writeNode("PropertyName",a,b);this.writeNode("Literal",a.value,b);return b},PropertyIsGreaterThan:function(a){var b=this.createElementNSPlus("ogc:PropertyIsGreaterThan");this.writeNode("PropertyName",a,b);this.writeNode("Literal",a.value,b);return b},PropertyIsLessThanOrEqualTo:function(a){var b=this.createElementNSPlus("ogc:PropertyIsLessThanOrEqualTo");this.writeNode("PropertyName",a,b);this.writeNode("Literal",a.value,b);return b},PropertyIsGreaterThanOrEqualTo:function(a){var b=this.createElementNSPlus("ogc:PropertyIsGreaterThanOrEqualTo");this.writeNode("PropertyName",a,b);this.writeNode("Literal",a.value,b);return b},PropertyIsBetween:function(a){var b=this.createElementNSPlus("ogc:PropertyIsBetween");this.writeNode("PropertyName",a,b);this.writeNode("LowerBoundary",a,b);this.writeNode("UpperBoundary",a,b);return b},PropertyIsLike:function(a){var b=this.createElementNSPlus("ogc:PropertyIsLike",{attributes:{wildCard:"*",singleChar:".",escape:"!"}});this.writeNode("PropertyName",a,b);this.writeNode("Literal",a.regex2value(),b);return b},PropertyName:function(a){return this.createElementNSPlus("ogc:PropertyName",{value:a.property})},Literal:function(a){return this.createElementNSPlus("ogc:Literal",{value:a})},LowerBoundary:function(a){var b=this.createElementNSPlus("ogc:LowerBoundary");this.writeNode("Literal",a.lowerBoundary,b);return b},UpperBoundary:function(a){var b=this.createElementNSPlus("ogc:UpperBoundary");this.writeNode("Literal",a.upperBoundary,b);return b},INTERSECTS:function(a){return this.writeSpatial(a,"Intersects")},WITHIN:function(a){return this.writeSpatial(a,"Within")},CONTAINS:function(a){return this.writeSpatial(a,"Contains")},DWITHIN:function(a){var b=this.writeSpatial(a,"DWithin");this.writeNode("Distance",a,b);return b},Distance:function(a){return this.createElementNSPlus("ogc:Distance",{attributes:{units:a.distanceUnits},value:a.distance})}}},getFilterType:function(a){var b=this.filterMap[a.type];if(!b){throw"Filter writing not supported for rule type: "+a.type}return b},filterMap:{"&&":"And","||":"Or","!":"Not","==":"PropertyIsEqualTo","!=":"PropertyIsNotEqualTo","<":"PropertyIsLessThan",">":"PropertyIsGreaterThan","<=":"PropertyIsLessThanOrEqualTo",">=":"PropertyIsGreaterThanOrEqualTo","..":"PropertyIsBetween","~":"PropertyIsLike",BBOX:"BBOX",DWITHIN:"DWITHIN",WITHIN:"WITHIN",CONTAINS:"CONTAINS",INTERSECTS:"INTERSECTS"},CLASS_NAME:"OpenLayers.Format.Filter.v1"});OpenLayers.Geometry.Curve=OpenLayers.Class(OpenLayers.Geometry.MultiPoint,{componentTypes:["OpenLayers.Geometry.Point"],initialize:function(a){OpenLayers.Geometry.MultiPoint.prototype.initialize.apply(this,arguments)},getLength:function(){var d=0;if(this.components&&(this.components.length>1)){for(var b=1,a=this.components.length;b<a;b++){d+=this.components[b-1].distanceTo(this.components[b])}}return d},getGeodesicLength:function(b){var g=this;if(b){var d=new OpenLayers.Projection("EPSG:4326");if(!d.equals(b)){g=this.clone().transform(b,d)}}var h=0;if(g.components&&(g.components.length>1)){var l,j;for(var f=1,a=g.components.length;f<a;f++){l=g.components[f-1];j=g.components[f];h+=OpenLayers.Util.distVincenty({lon:l.x,lat:l.y},{lon:j.x,lat:j.y})}}return h*1000},CLASS_NAME:"OpenLayers.Geometry.Curve"});OpenLayers.Control.ModifyFeature=OpenLayers.Class(OpenLayers.Control,{geometryTypes:null,clickout:true,toggle:true,layer:null,feature:null,vertices:null,virtualVertices:null,selectControl:null,dragControl:null,handlers:null,deleteCodes:null,virtualStyle:null,mode:null,modified:false,radiusHandle:null,dragHandle:null,onModificationStart:function(){},onModification:function(){},onModificationEnd:function(){},initialize:function(f,d){this.layer=f;this.vertices=[];this.virtualVertices=[];this.virtualStyle=OpenLayers.Util.extend({},this.layer.style||this.layer.styleMap.createSymbolizer());this.virtualStyle.fillOpacity=0.3;this.virtualStyle.strokeOpacity=0.3;this.deleteCodes=[46,68];this.mode=OpenLayers.Control.ModifyFeature.RESHAPE;OpenLayers.Control.prototype.initialize.apply(this,[d]);if(!(this.deleteCodes instanceof Array)){this.deleteCodes=[this.deleteCodes]}var h=this;var a={geometryTypes:this.geometryTypes,clickout:this.clickout,toggle:this.toggle,onBeforeSelect:this.beforeSelectFeature,onSelect:this.selectFeature,onUnselect:this.unselectFeature,scope:this};this.selectControl=new OpenLayers.Control.SelectFeature(f,a);var b={geometryTypes:["OpenLayers.Geometry.Point"],snappingOptions:this.snappingOptions,onStart:function(l,j){h.dragStart.apply(h,[l,j])},onDrag:function(l,j){h.dragVertex.apply(h,[l,j])},onComplete:function(j){h.dragComplete.apply(h,[j])}};this.dragControl=new OpenLayers.Control.DragFeature(f,b);var g={keydown:this.handleKeypress};this.handlers={keyboard:new OpenLayers.Handler.Keyboard(this,g)}},destroy:function(){this.layer=null;this.selectControl.destroy();this.dragControl.destroy();OpenLayers.Control.prototype.destroy.apply(this,[])},activate:function(){return(this.selectControl.activate()&&this.handlers.keyboard.activate()&&OpenLayers.Control.prototype.activate.apply(this,arguments))},deactivate:function(){var a=false;if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)){this.layer.removeFeatures(this.vertices,{silent:true});this.layer.removeFeatures(this.virtualVertices,{silent:true});this.vertices=[];this.dragControl.deactivate();if(this.feature&&this.feature.geometry&&this.feature.layer){this.selectControl.unselect.apply(this.selectControl,[this.feature])}this.selectControl.deactivate();this.handlers.keyboard.deactivate();a=true}return a},beforeSelectFeature:function(a){return this.layer.events.triggerEvent("beforefeaturemodified",{feature:a})},selectFeature:function(a){this.feature=a;this.modified=false;this.resetVertices();this.dragControl.activate();this.onModificationStart(this.feature)},unselectFeature:function(a){this.layer.removeFeatures(this.vertices,{silent:true});this.vertices=[];this.layer.destroyFeatures(this.virtualVertices,{silent:true});this.virtualVertices=[];if(this.dragHandle){this.layer.destroyFeatures([this.dragHandle],{silent:true});delete this.dragHandle}if(this.radiusHandle){this.layer.destroyFeatures([this.radiusHandle],{silent:true});delete this.radiusHandle}this.feature=null;this.dragControl.deactivate();this.onModificationEnd(a);this.layer.events.triggerEvent("afterfeaturemodified",{feature:a,modified:this.modified});this.modified=false},dragStart:function(b,a){if(b!=this.feature&&!b.geometry.parent&&b!=this.dragHandle&&b!=this.radiusHandle){if(this.feature){this.selectControl.clickFeature.apply(this.selectControl,[this.feature])}if(this.geometryTypes==null||OpenLayers.Util.indexOf(this.geometryTypes,b.geometry.CLASS_NAME)!=-1){this.selectControl.clickFeature.apply(this.selectControl,[b]);this.dragControl.overFeature.apply(this.dragControl,[b]);this.dragControl.lastPixel=a;this.dragControl.handlers.drag.started=true;this.dragControl.handlers.drag.start=a;this.dragControl.handlers.drag.last=a}}},dragVertex:function(b,a){this.modified=true;if(this.feature.geometry.CLASS_NAME=="OpenLayers.Geometry.Point"){if(this.feature!=b){this.feature=b}this.layer.events.triggerEvent("vertexmodified",{vertex:b.geometry,feature:this.feature,pixel:a})}else{if(b._index){b.geometry.parent.addComponent(b.geometry,b._index);delete b._index;OpenLayers.Util.removeItem(this.virtualVertices,b);this.vertices.push(b)}else{if(b==this.dragHandle){this.layer.removeFeatures(this.vertices,{silent:true});this.vertices=[];if(this.radiusHandle){this.layer.destroyFeatures([this.radiusHandle],{silent:true});this.radiusHandle=null}}else{if(b!==this.radiusHandle){this.layer.events.triggerEvent("vertexmodified",{vertex:b.geometry,feature:this.feature,pixel:a})}}}if(this.virtualVertices.length>0){this.layer.destroyFeatures(this.virtualVertices,{silent:true});this.virtualVertices=[]}this.layer.drawFeature(this.feature,this.selectControl.renderIntent)}this.layer.drawFeature(b)},dragComplete:function(a){this.resetVertices();this.setFeatureState();this.onModification(this.feature);this.layer.events.triggerEvent("featuremodified",{feature:this.feature})},setFeatureState:function(){if(this.feature.state!=OpenLayers.State.INSERT&&this.feature.state!=OpenLayers.State.DELETE){this.feature.state=OpenLayers.State.UPDATE}},resetVertices:function(){if(this.dragControl.feature){this.dragControl.outFeature(this.dragControl.feature)}if(this.vertices.length>0){this.layer.removeFeatures(this.vertices,{silent:true});this.vertices=[]}if(this.virtualVertices.length>0){this.layer.removeFeatures(this.virtualVertices,{silent:true});this.virtualVertices=[]}if(this.dragHandle){this.layer.destroyFeatures([this.dragHandle],{silent:true});this.dragHandle=null}if(this.radiusHandle){this.layer.destroyFeatures([this.radiusHandle],{silent:true});this.radiusHandle=null}if(this.feature&&this.feature.geometry.CLASS_NAME!="OpenLayers.Geometry.Point"){if((this.mode&OpenLayers.Control.ModifyFeature.DRAG)){this.collectDragHandle()}if((this.mode&(OpenLayers.Control.ModifyFeature.ROTATE|OpenLayers.Control.ModifyFeature.RESIZE))){this.collectRadiusHandle()}if(this.mode&OpenLayers.Control.ModifyFeature.RESHAPE){if(!(this.mode&OpenLayers.Control.ModifyFeature.RESIZE)){this.collectVertices()}}}},handleKeypress:function(a){var b=a.keyCode;if(this.feature&&OpenLayers.Util.indexOf(this.deleteCodes,b)!=-1){var d=this.dragControl.feature;if(d&&OpenLayers.Util.indexOf(this.vertices,d)!=-1&&!this.dragControl.handlers.drag.dragging&&d.geometry.parent){d.geometry.parent.removeComponent(d.geometry);this.layer.drawFeature(this.feature,this.selectControl.renderIntent);this.resetVertices();this.setFeatureState();this.onModification(this.feature);this.layer.events.triggerEvent("featuremodified",{feature:this.feature})}}},collectVertices:function(){this.vertices=[];this.virtualVertices=[];var a=this;function b(l){var f,g,m,h;if(l.CLASS_NAME=="OpenLayers.Geometry.Point"){g=new OpenLayers.Feature.Vector(l);g._sketch=true;a.vertices.push(g)}else{var d=l.components.length;if(l.CLASS_NAME=="OpenLayers.Geometry.LinearRing"){d-=1}for(f=0;f<d;++f){m=l.components[f];if(m.CLASS_NAME=="OpenLayers.Geometry.Point"){g=new OpenLayers.Feature.Vector(m);g._sketch=true;a.vertices.push(g)}else{b(m)}}if(l.CLASS_NAME!="OpenLayers.Geometry.MultiPoint"){for(f=0,h=l.components.length;f<h-1;++f){var q=l.components[f];var r=l.components[f+1];if(q.CLASS_NAME=="OpenLayers.Geometry.Point"&&r.CLASS_NAME=="OpenLayers.Geometry.Point"){var o=(q.x+r.x)/2;var j=(q.y+r.y)/2;var p=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(o,j),null,a.virtualStyle);p.geometry.parent=l;p._index=f+1;p._sketch=true;a.virtualVertices.push(p)}}}}}b.call(this,this.feature.geometry);this.layer.addFeatures(this.virtualVertices,{silent:true});this.layer.addFeatures(this.vertices,{silent:true})},collectDragHandle:function(){var f=this.feature.geometry;var a=f.getBounds().getCenterLonLat();var d=new OpenLayers.Geometry.Point(a.lon,a.lat);var b=new OpenLayers.Feature.Vector(d);d.move=function(g,h){OpenLayers.Geometry.Point.prototype.move.call(this,g,h);f.move(g,h)};b._sketch=true;this.dragHandle=b;this.layer.addFeatures([this.dragHandle],{silent:true})},collectRadiusHandle:function(){var l=this.feature.geometry;var a=l.getBounds();var b=a.getCenterLonLat();var m=new OpenLayers.Geometry.Point(b.lon,b.lat);var j=new OpenLayers.Geometry.Point(a.right,a.bottom);var h=new OpenLayers.Feature.Vector(j);var d=(this.mode&OpenLayers.Control.ModifyFeature.RESIZE);var g=(this.mode&OpenLayers.Control.ModifyFeature.RESHAPE);var f=(this.mode&OpenLayers.Control.ModifyFeature.ROTATE);j.move=function(D,C){OpenLayers.Geometry.Point.prototype.move.call(this,D,C);var E=this.x-m.x;var w=this.y-m.y;var F=E-D;var z=w-C;if(f){var p=Math.atan2(z,F);var o=Math.atan2(w,E);var u=o-p;u*=180/Math.PI;l.rotate(u,m)}if(d){var r,B;if(g){r=w/z;B=(E/F)/r}else{var v=Math.sqrt((F*F)+(z*z));var q=Math.sqrt((E*E)+(w*w));r=q/v}l.resize(r,m,B)}};h._sketch=true;this.radiusHandle=h;this.layer.addFeatures([this.radiusHandle],{silent:true})},setMap:function(a){this.selectControl.setMap(a);this.dragControl.setMap(a);OpenLayers.Control.prototype.setMap.apply(this,arguments)},CLASS_NAME:"OpenLayers.Control.ModifyFeature"});OpenLayers.Control.ModifyFeature.RESHAPE=1;OpenLayers.Control.ModifyFeature.RESIZE=2;OpenLayers.Control.ModifyFeature.ROTATE=4;OpenLayers.Control.ModifyFeature.DRAG=8;OpenLayers.Geometry.LineString=OpenLayers.Class(OpenLayers.Geometry.Curve,{initialize:function(a){OpenLayers.Geometry.Curve.prototype.initialize.apply(this,arguments)},removeComponent:function(a){if(this.components&&(this.components.length>2)){OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments)}},intersects:function(q){var d=false;var p=q.CLASS_NAME;if(p=="OpenLayers.Geometry.LineString"||p=="OpenLayers.Geometry.LinearRing"||p=="OpenLayers.Geometry.Point"){var v=this.getSortedSegments();var r;if(p=="OpenLayers.Geometry.Point"){r=[{x1:q.x,y1:q.y,x2:q.x,y2:q.y}]}else{r=q.getSortedSegments()}var B,l,g,a,z,w,f,b;outer:for(var m=0,o=v.length;m<o;++m){B=v[m];l=B.x1;g=B.x2;a=B.y1;z=B.y2;inner:for(var h=0,u=r.length;h<u;++h){w=r[h];if(w.x1>g){break}if(w.x2<l){continue}f=w.y1;b=w.y2;if(Math.min(f,b)>Math.max(a,z)){continue}if(Math.max(f,b)<Math.min(a,z)){continue}if(OpenLayers.Geometry.segmentsIntersect(B,w)){d=true;break outer}}}}else{d=q.intersects(this)}return d},getSortedSegments:function(){var a=this.components.length-1;var b=new Array(a);for(var d=0;d<a;++d){point1=this.components[d];point2=this.components[d+1];if(point1.x<point2.x){b[d]={x1:point1.x,y1:point1.y,x2:point2.x,y2:point2.y}}else{b[d]={x1:point2.x,y1:point2.y,x2:point1.x,y2:point1.y}}}function f(h,g){return h.x1-g.x1}return b.sort(f)},splitWithSegment:function(z,b){var d=!(b&&b.edge===false);var u=b&&b.tolerance;var a=[];var C=this.getVertices();var r=[];var E=[];var l=false;var g,f,p;var m,w,D;var h={point:true,tolerance:u};var j=null;for(var q=0,o=C.length-2;q<=o;++q){g=C[q];r.push(g.clone());f=C[q+1];D={x1:g.x,y1:g.y,x2:f.x,y2:f.y};p=OpenLayers.Geometry.segmentsIntersect(z,D,h);if(p instanceof OpenLayers.Geometry.Point){if((p.x===z.x1&&p.y===z.y1)||(p.x===z.x2&&p.y===z.y2)||p.equals(g)||p.equals(f)){w=true}else{w=false}if(w||d){if(!p.equals(E[E.length-1])){E.push(p.clone())}if(q===0){if(p.equals(g)){continue}}if(p.equals(f)){continue}l=true;if(!p.equals(g)){r.push(p)}a.push(new OpenLayers.Geometry.LineString(r));r=[p.clone()]}}}if(l){r.push(f.clone());a.push(new OpenLayers.Geometry.LineString(r))}if(E.length>0){var v=z.x1<z.x2?1:-1;var B=z.y1<z.y2?1:-1;j={lines:a,points:E.sort(function(G,F){return(v*G.x-v*F.x)||(B*G.y-B*F.y)})}}return j},split:function(F,b){var q=null;var f=b&&b.mutual;var o,g,p,d;if(F instanceof OpenLayers.Geometry.LineString){var E=this.getVertices();var l,h,D,m,a,u;var z=[];p=[];for(var B=0,r=E.length-2;B<=r;++B){l=E[B];h=E[B+1];D={x1:l.x,y1:l.y,x2:h.x,y2:h.y};d=d||[F];if(f){z.push(l.clone())}for(var w=0;w<d.length;++w){m=d[w].splitWithSegment(D,b);if(m){a=m.lines;if(a.length>0){a.unshift(w,1);Array.prototype.splice.apply(d,a);w+=a.length-2}if(f){for(var v=0,C=m.points.length;v<C;++v){u=m.points[v];if(!u.equals(l)){z.push(u);p.push(new OpenLayers.Geometry.LineString(z));if(u.equals(h)){z=[]}else{z=[u.clone()]}}}}}}}if(f&&p.length>0&&z.length>0){z.push(h.clone());p.push(new OpenLayers.Geometry.LineString(z))}}else{q=F.splitWith(this,b)}if(d&&d.length>1){g=true}else{d=[]}if(p&&p.length>1){o=true}else{p=[]}if(g||o){if(f){q=[p,d]}else{q=d}}return q},splitWith:function(b,a){return b.split(this,a)},getVertices:function(a){var b;if(a===true){b=[this.components[0],this.components[this.components.length-1]]}else{if(a===false){b=this.components.slice(1,this.components.length-1)}else{b=this.components.slice()}}return b},distanceTo:function(m,l){var o=!(l&&l.edge===false);var I=o&&l&&l.details;var w,g={};var C=Number.POSITIVE_INFINITY;if(m instanceof OpenLayers.Geometry.Point){var z=this.getSortedSegments();var v=m.x;var u=m.y;var G;for(var E=0,F=z.length;E<F;++E){G=z[E];w=OpenLayers.Geometry.distanceToSegment(m,G);if(w.distance<C){C=w.distance;g=w;if(C===0){break}}else{if(G.x2>v&&((u>G.y1&&u<G.y2)||(u<G.y1&&u>G.y2))){break}}}if(I){g={distance:g.distance,x0:g.x,y0:g.y,x1:v,y1:u}}else{g=g.distance}}else{if(m instanceof OpenLayers.Geometry.LineString){var f=this.getSortedSegments();var d=m.getSortedSegments();var b,a,r,H,h;var q=d.length;var p={point:true};outer:for(var E=0,F=f.length;E<F;++E){b=f[E];H=b.x1;h=b.y1;for(var D=0;D<q;++D){a=d[D];r=OpenLayers.Geometry.segmentsIntersect(b,a,p);if(r){C=0;g={distance:0,x0:r.x,y0:r.y,x1:r.x,y1:r.y};break outer}else{w=OpenLayers.Geometry.distanceToSegment({x:H,y:h},a);if(w.distance<C){C=w.distance;g={distance:C,x0:H,y0:h,x1:w.x,y1:w.y}}}}}if(!I){g=g.distance}if(C!==0){if(b){w=m.distanceTo(new OpenLayers.Geometry.Point(b.x2,b.y2),l);var B=I?w.distance:w;if(B<C){if(I){g={distance:C,x0:w.x1,y0:w.y1,x1:w.x0,y1:w.y0}}else{g=B}}}}}else{g=m.distanceTo(this,l);if(I){g={distance:g.distance,x0:g.x1,y0:g.y1,x1:g.x0,y1:g.y0}}}}return g},CLASS_NAME:"OpenLayers.Geometry.LineString"});OpenLayers.Format.GPX=OpenLayers.Class(OpenLayers.Format.XML,{extractWaypoints:true,extractTracks:true,extractRoutes:true,extractAttributes:true,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},read:function(F){if(typeof F=="string"){F=OpenLayers.Format.XML.prototype.read.apply(this,[F])}var d=[];if(this.extractTracks){var B=F.getElementsByTagName("trk");for(var z=0,C=B.length;z<C;z++){var q={};if(this.extractAttributes){q=this.parseAttributes(B[z])}var o=this.getElementsByTagNameNS(B[z],B[z].namespaceURI,"trkseg");for(var w=0,m=o.length;w<m;w++){var p=this.extractSegment(o[w],"trkpt");d.push(new OpenLayers.Feature.Vector(p,q))}}}if(this.extractRoutes){var a=F.getElementsByTagName("rte");for(var v=0,u=a.length;v<u;v++){var q={};if(this.extractAttributes){q=this.parseAttributes(a[v])}var E=this.extractSegment(a[v],"rtept");d.push(new OpenLayers.Feature.Vector(E,q))}}if(this.extractWaypoints){var b=F.getElementsByTagName("wpt");for(var r=0,C=b.length;r<C;r++){var q={};if(this.extractAttributes){q=this.parseAttributes(b[r])}var h=new OpenLayers.Geometry.Point(b[r].getAttribute("lon"),b[r].getAttribute("lat"));d.push(new OpenLayers.Feature.Vector(h,q))}}if(this.internalProjection&&this.externalProjection){for(var D=0,f=d.length;D<f;D++){d[D].geometry.transform(this.externalProjection,this.internalProjection)}}return d},extractSegment:function(g,h){var f=this.getElementsByTagNameNS(g,g.namespaceURI,h);var b=[];for(var d=0,a=f.length;d<a;d++){b.push(new OpenLayers.Geometry.Point(f[d].getAttribute("lon"),f[d].getAttribute("lat")))}return new OpenLayers.Geometry.LineString(b)},parseAttributes:function(b){var a={};var f=b.firstChild;while(f){if(f.nodeType==1){var d=f.firstChild;if(d.nodeType==3||d.nodeType==4){name=(f.prefix)?f.nodeName.split(":")[1]:f.nodeName;if(name!="trkseg"&&name!="rtept"){a[name]=d.nodeValue}}}f=f.nextSibling}return a},CLASS_NAME:"OpenLayers.Format.GPX"});OpenLayers.Geometry.LinearRing=OpenLayers.Class(OpenLayers.Geometry.LineString,{componentTypes:["OpenLayers.Geometry.Point"],initialize:function(a){OpenLayers.Geometry.LineString.prototype.initialize.apply(this,arguments)},addComponent:function(a,b){var d=false;var f=this.components.pop();if(b!=null||!a.equals(f)){d=OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,arguments)}var g=this.components[0];OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,[g]);return d},removeComponent:function(a){if(this.components.length>4){this.components.pop();OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments);var b=this.components[0];OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,[b])}},move:function(b,f){for(var d=0,a=this.components.length;d<a-1;d++){this.components[d].move(b,f)}},rotate:function(f,b){for(var d=0,a=this.components.length;d<a-1;++d){this.components[d].rotate(f,b)}},resize:function(g,b,f){for(var d=0,a=this.components.length;d<a-1;++d){this.components[d].resize(g,b,f)}return this},transform:function(g,d){if(g&&d){for(var f=0,a=this.components.length;f<a-1;f++){var b=this.components[f];b.transform(g,d)}this.bounds=null}return this},getCentroid:function(){if(this.components&&(this.components.length>2)){var j=0;var h=0;for(var f=0;f<this.components.length-1;f++){var d=this.components[f];var m=this.components[f+1];j+=(d.x+m.x)*(d.x*m.y-m.x*d.y);h+=(d.y+m.y)*(d.x*m.y-m.x*d.y)}var g=-1*this.getArea();var a=j/(6*g);var l=h/(6*g)}return new OpenLayers.Geometry.Point(a,l)},getArea:function(){var h=0;if(this.components&&(this.components.length>2)){var g=0;for(var f=0,d=this.components.length;f<d-1;f++){var a=this.components[f];var j=this.components[f+1];g+=(a.x+j.x)*(j.y-a.y)}h=-g/2}return h},getGeodesicArea:function(b){var f=this;if(b){var d=new OpenLayers.Projection("EPSG:4326");if(!d.equals(b)){f=this.clone().transform(b,d)}}var h=0;var a=f.components&&f.components.length;if(a>2){var l,j;for(var g=0;g<a-1;g++){l=f.components[g];j=f.components[g+1];h+=OpenLayers.Util.rad(j.x-l.x)*(2+Math.sin(OpenLayers.Util.rad(l.y))+Math.sin(OpenLayers.Util.rad(j.y)))}h=h*6378137*6378137/2}return h},containsPoint:function(q){var B=OpenLayers.Number.limitSigDigs;var p=14;var o=B(q.x,p);var m=B(q.y,p);function z(G,D,F,C,E){return(((D-C)*G)+((C*F)-(D*E)))/(F-E)}var a=this.components.length-1;var j,h,w,f,u,b,g,d;var l=0;for(var r=0;r<a;++r){j=this.components[r];w=B(j.x,p);f=B(j.y,p);h=this.components[r+1];u=B(h.x,p);b=B(h.y,p);if(f==b){if(m==f){if(w<=u&&(o>=w&&o<=u)||w>=u&&(o<=w&&o>=u)){l=-1;break}}continue}g=B(z(m,w,f,u,b),p);if(g==o){if(f<b&&(m>=f&&m<=b)||f>b&&(m<=f&&m>=b)){l=-1;break}}if(g<=o){continue}if(w!=u&&(g<Math.min(w,u)||g>Math.max(w,u))){continue}if(f<b&&(m>=f&&m<b)||f>b&&(m<f&&m>=b)){++l}}var v=(l==-1)?1:!!(l&1);return v},intersects:function(f){var b=false;if(f.CLASS_NAME=="OpenLayers.Geometry.Point"){b=this.containsPoint(f)}else{if(f.CLASS_NAME=="OpenLayers.Geometry.LineString"){b=f.intersects(this)}else{if(f.CLASS_NAME=="OpenLayers.Geometry.LinearRing"){b=OpenLayers.Geometry.LineString.prototype.intersects.apply(this,[f])}else{for(var d=0,a=f.components.length;d<a;++d){b=f.components[d].intersects(this);if(b){break}}}}}return b},getVertices:function(a){return(a===true)?[]:this.components.slice(0,this.components.length-1)},CLASS_NAME:"OpenLayers.Geometry.LinearRing"});OpenLayers.Geometry.MultiLineString=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.LineString"],initialize:function(a){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments)},split:function(q,z){var l=null;var w=z&&z.mutual;var r,a,v,p,b;var g=[];var u=[q];for(var h=0,m=this.components.length;h<m;++h){a=this.components[h];p=false;for(var f=0;f<u.length;++f){r=a.split(u[f],z);if(r){if(w){v=r[0];for(var d=0,o=v.length;d<o;++d){if(d===0&&g.length){g[g.length-1].addComponent(v[d])}else{g.push(new OpenLayers.Geometry.MultiLineString([v[d]]))}}p=true;r=r[1]}if(r.length){r.unshift(f,1);Array.prototype.splice.apply(u,r);break}}}if(!p){if(g.length){g[g.length-1].addComponent(a.clone())}else{g=[new OpenLayers.Geometry.MultiLineString(a.clone())]}}}if(g&&g.length>1){p=true}else{g=[]}if(u&&u.length>1){b=true}else{u=[]}if(p||b){if(w){l=[g,u]}else{l=u}}return l},splitWith:function(q,z){var l=null;var w=z&&z.mutual;var r,d,v,p,a,g,u;if(q instanceof OpenLayers.Geometry.LineString){u=[];g=[q];for(var h=0,m=this.components.length;h<m;++h){a=false;d=this.components[h];for(var f=0;f<g.length;++f){r=g[f].split(d,z);if(r){if(w){v=r[0];if(v.length){v.unshift(f,1);Array.prototype.splice.apply(g,v);f+=v.length-2}r=r[1];if(r.length===0){r=[d.clone()]}}for(var b=0,o=r.length;b<o;++b){if(b===0&&u.length){u[u.length-1].addComponent(r[b])}else{u.push(new OpenLayers.Geometry.MultiLineString([r[b]]))}}a=true}}if(!a){if(u.length){u[u.length-1].addComponent(d.clone())}else{u=[new OpenLayers.Geometry.MultiLineString([d.clone()])]}}}}else{l=q.split(this)}if(g&&g.length>1){p=true}else{g=[]}if(u&&u.length>1){a=true}else{u=[]}if(p||a){if(w){l=[g,u]}else{l=u}}return l},CLASS_NAME:"OpenLayers.Geometry.MultiLineString"});OpenLayers.Handler.Path=OpenLayers.Class(OpenLayers.Handler.Point,{line:null,freehand:false,freehandToggle:"shiftKey",initialize:function(d,b,a){OpenLayers.Handler.Point.prototype.initialize.apply(this,arguments)},createFeature:function(a){var b=this.control.map.getLonLatFromPixel(a);this.point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(b.lon,b.lat));this.line=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString([this.point.geometry]));this.callback("create",[this.point.geometry,this.getSketch()]);this.point.geometry.clearBounds();this.layer.addFeatures([this.line,this.point],{silent:true})},destroyFeature:function(){OpenLayers.Handler.Point.prototype.destroyFeature.apply(this);this.line=null},removePoint:function(){if(this.point){this.layer.removeFeatures([this.point])}},addPoint:function(a){this.layer.removeFeatures([this.point]);var b=this.control.map.getLonLatFromPixel(a);this.point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(b.lon,b.lat));this.line.geometry.addComponent(this.point.geometry,this.line.geometry.components.length);this.callback("point",[this.point.geometry,this.getGeometry()]);this.callback("modify",[this.point.geometry,this.getSketch()]);this.drawFeature()},freehandMode:function(a){return(this.freehandToggle&&a[this.freehandToggle])?!this.freehand:this.freehand},modifyFeature:function(a){var b=this.control.map.getLonLatFromPixel(a);this.point.geometry.x=b.lon;this.point.geometry.y=b.lat;this.callback("modify",[this.point.geometry,this.getSketch()]);this.point.geometry.clearBounds();this.drawFeature()},drawFeature:function(){this.layer.drawFeature(this.line,this.style);this.layer.drawFeature(this.point,this.style)},getSketch:function(){return this.line},getGeometry:function(){var a=this.line&&this.line.geometry;if(a&&this.multi){a=new OpenLayers.Geometry.MultiLineString([a])}return a},mousedown:function(a){if(this.lastDown&&this.lastDown.equals(a.xy)){return false}if(this.lastDown==null){if(this.persist){this.destroyFeature()}this.createFeature(a.xy)}else{if((this.lastUp==null)||!this.lastUp.equals(a.xy)){this.addPoint(a.xy)}}this.mouseDown=true;this.lastDown=a.xy;this.drawing=true;return false},mousemove:function(a){if(this.drawing){if(this.mouseDown&&this.freehandMode(a)){this.addPoint(a.xy)}else{this.modifyFeature(a.xy)}}return true},mouseup:function(a){this.mouseDown=false;if(this.drawing){if(this.freehandMode(a)){this.removePoint();this.finalize()}else{if(this.lastUp==null){this.addPoint(a.xy)}this.lastUp=a.xy}return false}return true},dblclick:function(a){if(!this.freehandMode(a)){var b=this.line.geometry.components.length-1;this.line.geometry.removeComponent(this.line.geometry.components[b]);this.removePoint();this.finalize()}return false},CLASS_NAME:"OpenLayers.Handler.Path"});OpenLayers.Control.Split=OpenLayers.Class(OpenLayers.Control,{EVENT_TYPES:["beforesplit","split","aftersplit"],layer:null,source:null,sourceOptions:null,tolerance:null,edge:true,deferDelete:false,mutual:true,targetFilter:null,sourceFilter:null,handler:null,initialize:function(a){Array.prototype.push.apply(this.EVENT_TYPES,OpenLayers.Control.prototype.EVENT_TYPES);OpenLayers.Control.prototype.initialize.apply(this,[a]);this.options=a||{};if(this.options.source){this.setSource(this.options.source)}},setSource:function(a){if(this.active){this.deactivate();if(this.handler){this.handler.destroy();delete this.handler}this.source=a;this.activate()}else{this.source=a}},activate:function(){var a=OpenLayers.Control.prototype.activate.call(this);if(a){if(!this.source){if(!this.handler){this.handler=new OpenLayers.Handler.Path(this,{done:function(b){this.onSketchComplete({feature:new OpenLayers.Feature.Vector(b)})}},{layerOptions:this.sourceOptions})}this.handler.activate()}else{if(this.source.events){this.source.events.on({sketchcomplete:this.onSketchComplete,afterfeaturemodified:this.afterFeatureModified,scope:this})}}}return a},deactivate:function(){var a=OpenLayers.Control.prototype.deactivate.call(this);if(a){if(this.source&&this.source.events){this.layer.events.un({sketchcomplete:this.onSketchComplete,afterfeaturemodified:this.afterFeatureModified,scope:this})}}return a},onSketchComplete:function(a){this.feature=null;return !this.considerSplit(a.feature)},afterFeatureModified:function(b){if(b.modified){var a=b.feature;if(a.geometry instanceof OpenLayers.Geometry.LineString||a.geometry instanceof OpenLayers.Geometry.MultiLineString){this.feature=b.feature;this.considerSplit(b.feature)}}},removeByGeometry:function(d,f){for(var b=0,a=d.length;b<a;++b){if(d[b].geometry===f){d.splice(b,1);break}}},isEligible:function(a){return(a.state!==OpenLayers.State.DELETE)&&(a.geometry instanceof OpenLayers.Geometry.LineString||a.geometry instanceof OpenLayers.Geometry.MultiLineString)&&(this.feature!==a)&&(!this.targetFilter||this.targetFilter.evaluate(a.attributes))},considerSplit:function(d){sourceSplit=false;targetSplit=false;if(!this.sourceFilter||this.sourceFilter.evaluate(d.attributes)){var h=this.layer&&this.layer.features||[];var F,r,l,a;var o=[],E=[];var f=(this.layer===this.source)&&this.mutual;var b={edge:this.edge,tolerance:this.tolerance,mutual:f};var m=[d.geometry];var q,g;var v,u;for(var C=0,D=h.length;C<D;++C){q=h[C];if(this.isEligible(q)){g=[q.geometry];for(var B=0;B<m.length;++B){v=m[B];for(var w=0;w<g.length;++w){F=g[w];if(v.getBounds().intersectsBounds(F.getBounds())){r=v.split(F,b);if(r){a=this.events.triggerEvent("beforesplit",{source:d,target:q});if(a!==false){if(f){u=r[0];if(u.length>1){u.unshift(B,1);Array.prototype.splice.apply(m,u);B+=u.length-3}r=r[1]}if(r.length>1){r.unshift(w,1);Array.prototype.splice.apply(g,r);w+=r.length-3}}}}}}if(g&&g.length>1){this.geomsToFeatures(q,g);this.events.triggerEvent("split",{original:q,features:g});Array.prototype.push.apply(o,g);E.push(q);targetSplit=true}}}if(m&&m.length>1){this.geomsToFeatures(d,m);this.events.triggerEvent("split",{original:d,features:m});Array.prototype.push.apply(o,m);E.push(d);sourceSplit=true}if(sourceSplit||targetSplit){if(this.deferDelete){var p,z=[];for(var C=0,D=E.length;C<D;++C){p=E[C];if(p.state===OpenLayers.State.INSERT){z.push(p)}else{p.state=OpenLayers.State.DELETE;this.layer.drawFeature(p)}}this.layer.destroyFeatures(z,{silent:true});for(var C=0,D=o.length;C<D;++C){o[C].state=OpenLayers.State.INSERT}}else{this.layer.destroyFeatures(E,{silent:true})}this.layer.addFeatures(o,{silent:true});this.events.triggerEvent("aftersplit",{source:d,features:o})}}return sourceSplit},geomsToFeatures:function(d,f){var h=d.clone();delete h.geometry;var g;for(var b=0,a=f.length;b<a;++b){g=h.clone();g.geometry=f[b];g.state=OpenLayers.State.INSERT;f[b]=g}},destroy:function(){if(this.active){this.deactivate()}OpenLayers.Control.prototype.destroy.call(this)},CLASS_NAME:"OpenLayers.Control.Split"});OpenLayers.Geometry.Polygon=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.LinearRing"],initialize:function(a){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments)},getArea:function(){var d=0;if(this.components&&(this.components.length>0)){d+=Math.abs(this.components[0].getArea());for(var b=1,a=this.components.length;b<a;b++){d-=Math.abs(this.components[b].getArea())}}return d},getGeodesicArea:function(b){var f=0;if(this.components&&(this.components.length>0)){f+=Math.abs(this.components[0].getGeodesicArea(b));for(var d=1,a=this.components.length;d<a;d++){f-=Math.abs(this.components[d].getGeodesicArea(b))}}return f},containsPoint:function(a){var g=this.components.length;var d=false;if(g>0){d=this.components[0].containsPoint(a);if(d!==1){if(d&&g>1){var f;for(var b=1;b<g;++b){f=this.components[b].containsPoint(a);if(f){if(f===1){d=1}else{d=false}break}}}}}return d},intersects:function(g){var b=false;var f,a;if(g.CLASS_NAME=="OpenLayers.Geometry.Point"){b=this.containsPoint(g)}else{if(g.CLASS_NAME=="OpenLayers.Geometry.LineString"||g.CLASS_NAME=="OpenLayers.Geometry.LinearRing"){for(f=0,a=this.components.length;f<a;++f){b=g.intersects(this.components[f]);if(b){break}}if(!b){for(f=0,a=g.components.length;f<a;++f){b=this.containsPoint(g.components[f]);if(b){break}}}}else{for(f=0,a=g.components.length;f<a;++f){b=this.intersects(g.components[f]);if(b){break}}}}if(!b&&g.CLASS_NAME=="OpenLayers.Geometry.Polygon"){var d=this.components[0];for(f=0,a=d.components.length;f<a;++f){b=g.containsPoint(d.components[f]);if(b){break}}}return b},distanceTo:function(f,b){var d=!(b&&b.edge===false);var a;if(!d&&this.intersects(f)){a=0}else{a=OpenLayers.Geometry.Collection.prototype.distanceTo.apply(this,[f,b])}return a},CLASS_NAME:"OpenLayers.Geometry.Polygon"});OpenLayers.Geometry.Polygon.createRegularPolygon=function(m,h,b,p){var d=Math.PI*((1/b)-(1/2));if(p){d+=(p/180)*Math.PI}var a,l,j;var o=[];for(var g=0;g<b;++g){a=d+(g*2*Math.PI/b);l=m.x+(h*Math.cos(a));j=m.y+(h*Math.sin(a));o.push(new OpenLayers.Geometry.Point(l,j))}var f=new OpenLayers.Geometry.LinearRing(o);return new OpenLayers.Geometry.Polygon([f])};OpenLayers.Format.GeoRSS=OpenLayers.Class(OpenLayers.Format.XML,{rssns:"http://backend.userland.com/rss2",featureNS:"http://mapserver.gis.umn.edu/mapserver",georssns:"http://www.georss.org/georss",geons:"http://www.w3.org/2003/01/geo/wgs84_pos#",featureTitle:"Untitled",featureDescription:"No Description",gmlParser:null,xy:false,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},createGeometryFromItem:function(r){var q=this.getElementsByTagNameNS(r,this.georssns,"point");var j=this.getElementsByTagNameNS(r,this.geons,"lat");var a=this.getElementsByTagNameNS(r,this.geons,"long");var v=this.getElementsByTagNameNS(r,this.georssns,"line");var o=this.getElementsByTagNameNS(r,this.georssns,"polygon");var d=this.getElementsByTagNameNS(r,this.georssns,"where");var f=this.getElementsByTagNameNS(r,this.georssns,"box");if(q.length>0||(j.length>0&&a.length>0)){var p;if(q.length>0){p=OpenLayers.String.trim(q[0].firstChild.nodeValue).split(/\s+/);if(p.length!=2){p=OpenLayers.String.trim(q[0].firstChild.nodeValue).split(/\s*,\s*/)}}else{p=[parseFloat(j[0].firstChild.nodeValue),parseFloat(a[0].firstChild.nodeValue)]}var l=new OpenLayers.Geometry.Point(parseFloat(p[1]),parseFloat(p[0]))}else{if(v.length>0){var m=OpenLayers.String.trim(this.concatChildValues(v[0])).split(/\s+/);var g=[];var q;for(var b=0,h=m.length;b<h;b+=2){q=new OpenLayers.Geometry.Point(parseFloat(m[b+1]),parseFloat(m[b]));g.push(q)}l=new OpenLayers.Geometry.LineString(g)}else{if(o.length>0){var m=OpenLayers.String.trim(this.concatChildValues(o[0])).split(/\s+/);var g=[];var q;for(var b=0,h=m.length;b<h;b+=2){q=new OpenLayers.Geometry.Point(parseFloat(m[b+1]),parseFloat(m[b]));g.push(q)}l=new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing(g)])}else{if(d.length>0){if(!this.gmlParser){this.gmlParser=new OpenLayers.Format.GML({xy:this.xy})}var u=this.gmlParser.parseFeature(d[0]);l=u.geometry}else{if(f.length>0){var m=OpenLayers.String.trim(f[0].firstChild.nodeValue).split(/\s+/);var g=[];var q;if(m.length>3){q=new OpenLayers.Geometry.Point(parseFloat(m[1]),parseFloat(m[0]));g.push(q);q=new OpenLayers.Geometry.Point(parseFloat(m[1]),parseFloat(m[2]));g.push(q);q=new OpenLayers.Geometry.Point(parseFloat(m[3]),parseFloat(m[2]));g.push(q);q=new OpenLayers.Geometry.Point(parseFloat(m[3]),parseFloat(m[0]));g.push(q);q=new OpenLayers.Geometry.Point(parseFloat(m[1]),parseFloat(m[0]));g.push(q)}l=new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing(g)])}}}}}if(l&&this.internalProjection&&this.externalProjection){l.transform(this.externalProjection,this.internalProjection)}return l},createFeatureFromItem:function(l){var f=this.createGeometryFromItem(l);var h=this.getChildValue(l,"*","title",this.featureTitle);var j=this.getChildValue(l,"*","description",this.getChildValue(l,"*","content",this.getChildValue(l,"*","summary",this.featureDescription)));var g=this.getChildValue(l,"*","link");if(!g){try{g=this.getElementsByTagNameNS(l,"*","link")[0].getAttribute("href")}catch(d){g=null}}var a=this.getChildValue(l,"*","id",null);var b={title:h,description:j,link:g};var m=new OpenLayers.Feature.Vector(f,b);m.fid=a;return m},getChildValue:function(f,b,d,h){var g;var a=this.getElementsByTagNameNS(f,b,d);if(a&&a[0]&&a[0].firstChild&&a[0].firstChild.nodeValue){g=a[0].firstChild.nodeValue}else{g=(h==undefined)?"":h}return g},read:function(g){if(typeof g=="string"){g=OpenLayers.Format.XML.prototype.read.apply(this,[g])}var a=null;a=this.getElementsByTagNameNS(g,"*","item");if(a.length==0){a=this.getElementsByTagNameNS(g,"*","entry")}var d=a.length;var f=new Array(d);for(var b=0;b<d;b++){f[b]=this.createFeatureFromItem(a[b])}return f},write:function(d){var f;if(d instanceof Array){f=this.createElementNS(this.rssns,"rss");for(var b=0,a=d.length;b<a;b++){f.appendChild(this.createFeatureXML(d[b]))}}else{f=this.createFeatureXML(d)}return OpenLayers.Format.XML.prototype.write.apply(this,[f])},createFeatureXML:function(o){var h=this.buildGeometryNode(o.geometry);var a=this.createElementNS(this.rssns,"item");var f=this.createElementNS(this.rssns,"title");f.appendChild(this.createTextNode(o.attributes.title?o.attributes.title:""));var b=this.createElementNS(this.rssns,"description");b.appendChild(this.createTextNode(o.attributes.description?o.attributes.description:""));a.appendChild(f);a.appendChild(b);if(o.attributes.link){var l=this.createElementNS(this.rssns,"link");l.appendChild(this.createTextNode(o.attributes.link));a.appendChild(l)}for(var m in o.attributes){if(m=="link"||m=="title"||m=="description"){continue}var j=this.createTextNode(o.attributes[m]);var g=m;if(m.search(":")!=-1){g=m.split(":")[1]}var d=this.createElementNS(this.featureNS,"feature:"+g);d.appendChild(j);a.appendChild(d)}a.appendChild(h);return a},buildGeometryNode:function(b){if(this.internalProjection&&this.externalProjection){b=b.clone();b.transform(this.internalProjection,this.externalProjection)}var a;if(b.CLASS_NAME=="OpenLayers.Geometry.Polygon"){a=this.createElementNS(this.georssns,"georss:polygon");a.appendChild(this.buildCoordinatesNode(b.components[0]))}else{if(b.CLASS_NAME=="OpenLayers.Geometry.LineString"){a=this.createElementNS(this.georssns,"georss:line");a.appendChild(this.buildCoordinatesNode(b))}else{if(b.CLASS_NAME=="OpenLayers.Geometry.Point"){a=this.createElementNS(this.georssns,"georss:point");a.appendChild(this.buildCoordinatesNode(b))}else{throw"Couldn't parse "+b.CLASS_NAME}}}return a},buildCoordinatesNode:function(h){var d=null;if(h.components){d=h.components}var g;if(d){var b=d.length;var f=new Array(b);for(var a=0;a<b;a++){f[a]=d[a].y+" "+d[a].x}g=f.join(" ")}else{g=h.y+" "+h.x}return this.createTextNode(g)},CLASS_NAME:"OpenLayers.Format.GeoRSS"});OpenLayers.Format.KML=OpenLayers.Class(OpenLayers.Format.XML,{kmlns:"http://earth.google.com/kml/2.0",placemarksDesc:"No description available",foldersName:"OpenLayers export",foldersDesc:"Exported on "+new Date(),extractAttributes:true,extractStyles:false,internalns:null,features:null,styles:null,styleBaseUrl:"",fetched:null,maxDepth:0,initialize:function(a){this.regExes={trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g),kmlColor:(/(\w{2})(\w{2})(\w{2})(\w{2})/),kmlIconPalette:(/root:\/\/icons\/palette-(\d+)(\.\w+)/),straightBracket:(/\$\[(.*?)\]/g)};OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},read:function(b){this.features=[];this.styles={};this.fetched={};var a={depth:0,styleBaseUrl:this.styleBaseUrl};return this.parseData(b,a)},parseData:function(j,d){if(typeof j=="string"){j=OpenLayers.Format.XML.prototype.read.apply(this,[j])}var g=["Link","NetworkLink","Style","StyleMap","Placemark"];for(var f=0,a=g.length;f<a;++f){var h=g[f];var b=this.getElementsByTagNameNS(j,"*",h);if(b.length==0){continue}switch(h.toLowerCase()){case"link":case"networklink":this.parseLinks(b,d);break;case"style":if(this.extractStyles){this.parseStyles(b,d)}break;case"stylemap":if(this.extractStyles){this.parseStyleMaps(b,d)}break;case"placemark":this.parseFeatures(b,d);break}}return this.features},parseLinks:function(d,f){if(f.depth>=this.maxDepth){return false}var j=OpenLayers.Util.extend({},f);j.depth++;for(var g=0,a=d.length;g<a;g++){var b=this.parseProperty(d[g],"*","href");if(b&&!this.fetched[b]){this.fetched[b]=true;var h=this.fetchLink(b);if(h){this.parseData(h,j)}}}},fetchLink:function(a){var b=OpenLayers.Request.GET({url:a,async:false});if(b){return b.responseText}},parseStyles:function(b,d){for(var f=0,a=b.length;f<a;f++){var g=this.parseStyle(b[f]);if(g){styleName=(d.styleBaseUrl||"")+"#"+g.id;this.styles[styleName]=g}}},parseStyle:function(F){var Q={};var O=["LineStyle","PolyStyle","IconStyle","BalloonStyle"];var Z,o,p,C;for(var T=0,u=O.length;T<u;++T){Z=O[T];styleTypeNode=this.getElementsByTagNameNS(F,"*",Z)[0];if(!styleTypeNode){continue}switch(Z.toLowerCase()){case"linestyle":var B=this.parseProperty(styleTypeNode,"*","color");if(B){var d=(B.toString()).match(this.regExes.kmlColor);var R=d[1];Q.strokeOpacity=parseInt(R,16)/255;var Y=d[2];var V=d[3];var P=d[4];Q.strokeColor="#"+P+V+Y}var a=this.parseProperty(styleTypeNode,"*","width");if(a){Q.strokeWidth=a}case"polystyle":var B=this.parseProperty(styleTypeNode,"*","color");if(B){var d=(B.toString()).match(this.regExes.kmlColor);var R=d[1];Q.fillOpacity=parseInt(R,16)/255;var Y=d[2];var V=d[3];var P=d[4];Q.fillColor="#"+P+V+Y}var q=this.parseProperty(styleTypeNode,"*","fill");if(q=="0"){Q.fillColor="none"}break;case"iconstyle":var G=parseFloat(this.parseProperty(styleTypeNode,"*","scale")||1);var a=32*G;var f=32*G;var j=this.getElementsByTagNameNS(styleTypeNode,"*","Icon")[0];if(j){var z=this.parseProperty(j,"*","href");if(z){var N=this.parseProperty(j,"*","w");var U=this.parseProperty(j,"*","h");var m="http://maps.google.com/mapfiles/kml";if(OpenLayers.String.startsWith(z,m)&&!N&&!U){N=64;U=64;G=G/2}N=N||U;U=U||N;if(N){a=parseInt(N)*G}if(U){f=parseInt(U)*G}var d=z.match(this.regExes.kmlIconPalette);if(d){var S=d[1];var v=d[2];var M=this.parseProperty(j,"*","x");var L=this.parseProperty(j,"*","y");var I=M?M/32:0;var H=L?(7-L/32):7;var E=H*8+I;z="http://maps.google.com/mapfiles/kml/pal"+S+"/icon"+E+v}Q.graphicOpacity=1;Q.externalGraphic=z}}var K=this.getElementsByTagNameNS(styleTypeNode,"*","hotSpot")[0];if(K){var M=parseFloat(K.getAttribute("x"));var L=parseFloat(K.getAttribute("y"));var D=K.getAttribute("xunits");if(D=="pixels"){Q.graphicXOffset=-M*G}else{if(D=="insetPixels"){Q.graphicXOffset=-a+(M*G)}else{if(D=="fraction"){Q.graphicXOffset=-a*M}}}var l=K.getAttribute("yunits");if(l=="pixels"){Q.graphicYOffset=-f+(L*G)+1}else{if(l=="insetPixels"){Q.graphicYOffset=-(L*G)+1}else{if(l=="fraction"){Q.graphicYOffset=-f*(1-L)+1}}}}Q.graphicWidth=a;Q.graphicHeight=f;break;case"balloonstyle":var W=OpenLayers.Util.getXmlNodeValue(styleTypeNode);if(W){Q.balloonStyle=W.replace(this.regExes.straightBracket,"${$1}")}break;default:}}if(!Q.strokeColor&&Q.fillColor){Q.strokeColor=Q.fillColor}var J=F.getAttribute("id");if(J&&Q){Q.id=J}return Q},parseStyleMaps:function(a,r){for(var l=0,m=a.length;l<m;l++){var f=a[l];var d=this.getElementsByTagNameNS(f,"*","Pair");var b=f.getAttribute("id");for(var h=0,q=d.length;h<q;h++){var g=d[h];var p=this.parseProperty(g,"*","key");var o=this.parseProperty(g,"*","styleUrl");if(o&&p=="normal"){this.styles[(r.styleBaseUrl||"")+"#"+b]=this.styles[(r.styleBaseUrl||"")+o]}if(o&&p=="highlight"){}}}},parseFeatures:function(a,m){var f=new Array(a.length);for(var g=0,h=a.length;g<h;g++){var b=a[g];var l=this.parseFeature.apply(this,[b]);if(l){if(this.extractStyles&&l.attributes&&l.attributes.styleUrl){l.style=this.getStyle(l.attributes.styleUrl,m)}if(this.extractStyles){var j=this.getElementsByTagNameNS(b,"*","Style")[0];if(j){var d=this.parseStyle(j);if(d){l.style=OpenLayers.Util.extend(l.style,d)}}}f[g]=l}else{throw"Bad Placemark: "+g}}this.features=this.features.concat(f)},parseFeature:function(b){var d=["MultiGeometry","Polygon","LineString","Point"];var m,g,o,a;for(var j=0,l=d.length;j<l;++j){m=d[j];this.internalns=b.namespaceURI?b.namespaceURI:this.kmlns;g=this.getElementsByTagNameNS(b,this.internalns,m);if(g.length>0){var a=this.parseGeometry[m.toLowerCase()];if(a){o=a.apply(this,[g[0]]);if(this.internalProjection&&this.externalProjection){o.transform(this.externalProjection,this.internalProjection)}}else{OpenLayers.Console.error(OpenLayers.i18n("unsupportedGeometryType",{geomType:m}))}break}}var h;if(this.extractAttributes){h=this.parseAttributes(b)}var p=new OpenLayers.Feature.Vector(o,h);var f=b.getAttribute("id")||b.getAttribute("name");if(f!=null){p.fid=f}return p},getStyle:function(b,a){var d=OpenLayers.Util.removeTail(b);var h=OpenLayers.Util.extend({},a);h.depth++;h.styleBaseUrl=d;if(!this.styles[b]&&!OpenLayers.String.startsWith(b,"#")&&h.depth<=this.maxDepth&&!this.fetched[d]){var g=this.fetchLink(d);if(g){this.parseData(g,h)}}var f=OpenLayers.Util.extend({},this.styles[b]);return f},parseGeometry:{point:function(f){var d=this.getElementsByTagNameNS(f,this.internalns,"coordinates");var g=[];if(d.length>0){var b=d[0].firstChild.nodeValue;b=b.replace(this.regExes.removeSpace,"");g=b.split(",")}var a=null;if(g.length>1){if(g.length==2){g[2]=null}a=new OpenLayers.Geometry.Point(g[0],g[1],g[2])}else{throw"Bad coordinate string: "+b}return a},linestring:function(d,g){var f=this.getElementsByTagNameNS(d,this.internalns,"coordinates");var p=null;if(f.length>0){var b=this.getChildValue(f[0]);b=b.replace(this.regExes.trimSpace,"");b=b.replace(this.regExes.trimComma,",");var a=b.split(this.regExes.splitSpace);var l=a.length;var o=new Array(l);var m,j;for(var h=0;h<l;++h){m=a[h].split(",");j=m.length;if(j>1){if(m.length==2){m[2]=null}o[h]=new OpenLayers.Geometry.Point(m[0],m[1],m[2])}else{throw"Bad LineString point coordinates: "+a[h]}}if(l){if(g){p=new OpenLayers.Geometry.LinearRing(o)}else{p=new OpenLayers.Geometry.LineString(o)}}else{throw"Bad LineString coordinates: "+b}}return p},polygon:function(h){var d=this.getElementsByTagNameNS(h,this.internalns,"LinearRing");var j=d.length;var g=new Array(j);if(j>0){var b;for(var f=0,a=d.length;f<a;++f){b=this.parseGeometry.linestring.apply(this,[d[f],true]);if(b){g[f]=b}else{throw"Bad LinearRing geometry: "+f}}}return new OpenLayers.Geometry.Polygon(g)},multigeometry:function(g){var l,j;var h=[];var d=g.childNodes;for(var b=0,a=d.length;b<a;++b){l=d[b];if(l.nodeType==1){var f=(l.prefix)?l.nodeName.split(":")[1]:l.nodeName;var j=this.parseGeometry[f.toLowerCase()];if(j){h.push(j.apply(this,[l]))}}}return new OpenLayers.Geometry.Collection(h)}},parseAttributes:function(f){var g={};var h=f.getElementsByTagName("ExtendedData");if(h.length){g=this.parseExtendedData(h[0])}var b,p,o;var d=f.childNodes;for(var j=0,l=d.length;j<l;++j){b=d[j];if(b.nodeType==1){p=b.childNodes;if(p.length==1||p.length==3){var o;switch(p.length){case 1:o=p[0];break;case 3:default:o=p[1];break}if(o.nodeType==3||o.nodeType==4){var a=(b.prefix)?b.nodeName.split(":")[1]:b.nodeName;var m=OpenLayers.Util.getXmlNodeValue(o);if(m){m=m.replace(this.regExes.trimSpace,"");g[a]=m}}}}}return g},parseExtendedData:function(b){var f={};var d=b.getElementsByTagName("Data");for(var h=0,l=d.length;h<l;h++){var g=d[h];var m=g.getAttribute("name");var j={};var o=g.getElementsByTagName("value");if(o.length){j.value=this.getChildValue(o[0])}var a=g.getElementsByTagName("displayName");if(a.length){j.displayName=this.getChildValue(a[0])}f[m]=j}return f},parseProperty:function(d,f,b){var g;var a=this.getElementsByTagNameNS(d,f,b);try{g=OpenLayers.Util.getXmlNodeValue(a[0])}catch(h){g=null}return g},write:function(f){if(!(f instanceof Array)){f=[f]}var b=this.createElementNS(this.kmlns,"kml");var g=this.createFolderXML();for(var d=0,a=f.length;d<a;++d){g.appendChild(this.createPlacemarkXML(f[d]))}b.appendChild(g);return OpenLayers.Format.XML.prototype.write.apply(this,[b])},createFolderXML:function(){var g=this.createElementNS(this.kmlns,"name");var f=this.createTextNode(this.foldersName);g.appendChild(f);var a=this.createElementNS(this.kmlns,"description");var b=this.createTextNode(this.foldersDesc);a.appendChild(b);var d=this.createElementNS(this.kmlns,"Folder");d.appendChild(g);d.appendChild(a);return d},createPlacemarkXML:function(g){var j=this.createElementNS(this.kmlns,"name");var d=(g.attributes.name)?g.attributes.name:g.id;j.appendChild(this.createTextNode(d));var f=this.createElementNS(this.kmlns,"description");var h=(g.attributes.description)?g.attributes.description:this.placemarksDesc;f.appendChild(this.createTextNode(h));var b=this.createElementNS(this.kmlns,"Placemark");if(g.fid!=null){b.setAttribute("id",g.fid)}b.appendChild(j);b.appendChild(f);var a=this.buildGeometryNode(g.geometry);b.appendChild(a);return b},buildGeometryNode:function(g){if(this.internalProjection&&this.externalProjection){g=g.clone();g.transform(this.internalProjection,this.externalProjection)}var d=g.CLASS_NAME;var b=d.substring(d.lastIndexOf(".")+1);var a=this.buildGeometry[b.toLowerCase()];var f=null;if(a){f=a.apply(this,[g])}return f},buildGeometry:{point:function(b){var a=this.createElementNS(this.kmlns,"Point");a.appendChild(this.buildCoordinatesNode(b));return a},multipoint:function(a){return this.buildGeometry.collection.apply(this,[a])},linestring:function(b){var a=this.createElementNS(this.kmlns,"LineString");a.appendChild(this.buildCoordinatesNode(b));return a},multilinestring:function(a){return this.buildGeometry.collection.apply(this,[a])},linearring:function(b){var a=this.createElementNS(this.kmlns,"LinearRing");a.appendChild(this.buildCoordinatesNode(b));return a},polygon:function(l){var b=this.createElementNS(this.kmlns,"Polygon");var j=l.components;var g,h,f;for(var d=0,a=j.length;d<a;++d){f=(d==0)?"outerBoundaryIs":"innerBoundaryIs";g=this.createElementNS(this.kmlns,f);h=this.buildGeometry.linearring.apply(this,[j[d]]);g.appendChild(h);b.appendChild(g)}return b},multipolygon:function(a){return this.buildGeometry.collection.apply(this,[a])},collection:function(f){var b=this.createElementNS(this.kmlns,"MultiGeometry");var g;for(var d=0,a=f.components.length;d<a;++d){g=this.buildGeometryNode.apply(this,[f.components[d]]);if(g){b.appendChild(g)}}return b}},buildCoordinatesNode:function(g){var a=this.createElementNS(this.kmlns,"coordinates");var m;var l=g.components;if(l){var j;var h=l.length;var d=new Array(h);for(var f=0;f<h;++f){j=l[f];d[f]=j.x+","+j.y}m=d.join(" ")}else{m=g.x+","+g.y}var b=this.createTextNode(m);a.appendChild(b);return a},CLASS_NAME:"OpenLayers.Format.KML"});OpenLayers.Format.OSM=OpenLayers.Class(OpenLayers.Format.XML,{checkTags:false,interestingTagsExclude:null,areaTags:null,initialize:function(a){var f={interestingTagsExclude:["source","source_ref","source:ref","history","attribution","created_by"],areaTags:["area","building","leisure","tourism","ruins","historic","landuse","military","natural","sport"]};f=OpenLayers.Util.extend(f,a);var g={};for(var b=0;b<f.interestingTagsExclude.length;b++){g[f.interestingTagsExclude[b]]=true}f.interestingTagsExclude=g;var d={};for(var b=0;b<f.areaTags.length;b++){d[f.areaTags[b]]=true}f.areaTags=d;OpenLayers.Format.XML.prototype.initialize.apply(this,[f])},read:function(r){if(typeof r=="string"){r=OpenLayers.Format.XML.prototype.read.apply(this,[r])}var b=this.getNodes(r);var u=this.getWays(r);var l=new Array(u.length);for(var h=0;h<u.length;h++){var p=new Array(u[h].nodes.length);var a=this.isWayArea(u[h])?1:0;for(var g=0;g<u[h].nodes.length;g++){var d=b[u[h].nodes[g]];var q=new OpenLayers.Geometry.Point(d.lon,d.lat);q.osm_id=parseInt(u[h].nodes[g]);p[g]=q;d.used=true}var o=null;if(a){o=new OpenLayers.Geometry.Polygon(new OpenLayers.Geometry.LinearRing(p))}else{o=new OpenLayers.Geometry.LineString(p)}if(this.internalProjection&&this.externalProjection){o.transform(this.externalProjection,this.internalProjection)}var m=new OpenLayers.Feature.Vector(o,u[h].tags);m.osm_id=parseInt(u[h].id);m.fid="way."+m.osm_id;l[h]=m}for(var f in b){var d=b[f];if(!d.used||this.checkTags){var w=null;if(this.checkTags){var v=this.getTags(d.node,true);if(d.used&&!v[1]){continue}w=v[0]}else{w=this.getTags(d.node)}var m=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(d.lon,d.lat),w);if(this.internalProjection&&this.externalProjection){m.geometry.transform(this.externalProjection,this.internalProjection)}m.osm_id=parseInt(f);m.fid="node."+m.osm_id;l.push(m)}d.node=null}return l},getNodes:function(g){var f=g.getElementsByTagName("node");var a={};for(var b=0;b<f.length;b++){var d=f[b];var h=d.getAttribute("id");a[h]={lat:d.getAttribute("lat"),lon:d.getAttribute("lon"),node:d}}return a},getWays:function(l){var h=l.getElementsByTagName("way");var m=[];for(var f=0;f<h.length;f++){var b=h[f];var d={id:b.getAttribute("id")};d.tags=this.getTags(b);var g=b.getElementsByTagName("nd");d.nodes=new Array(g.length);for(var a=0;a<g.length;a++){d.nodes[a]=g[a].getAttribute("ref")}m.push(d)}return m},getTags:function(g,l){var a=g.getElementsByTagName("tag");var d={};var h=false;for(var b=0;b<a.length;b++){var f=a[b].getAttribute("k");d[f]=a[b].getAttribute("v");if(l){if(!this.interestingTagsExclude[f]){h=true}}}return l?[d,h]:d},isWayArea:function(b){var a=false;var f=false;if(b.nodes[0]==b.nodes[b.nodes.length-1]){a=true}if(this.checkTags){for(var d in b.tags){if(this.areaTags[d]){f=true;break}}}return a&&(this.checkTags?f:true)},write:function(f){if(!(f instanceof Array)){f=[f]}this.osm_id=1;this.created_nodes={};var g=this.createElementNS(null,"osm");g.setAttribute("version","0.5");g.setAttribute("generator","OpenLayers "+OpenLayers.VERSION_NUMBER);for(var d=f.length-1;d>=0;d--){var a=this.createFeatureNodes(f[d]);for(var b=0;b<a.length;b++){g.appendChild(a[b])}}return OpenLayers.Format.XML.prototype.write.apply(this,[g])},createFeatureNodes:function(d){var b=[];var g=d.geometry.CLASS_NAME;var f=g.substring(g.lastIndexOf(".")+1);f=f.toLowerCase();var a=this.createXML[f];if(a){b=a.apply(this,[d])}return b},createXML:{point:function(a){var g=null;var d=a.geometry?a.geometry:a;var f=false;if(a.osm_id){g=a.osm_id;if(this.created_nodes[g]){f=true}}else{g=-this.osm_id;this.osm_id++}if(f){b=this.created_nodes[g]}else{var b=this.createElementNS(null,"node")}this.created_nodes[g]=b;b.setAttribute("id",g);b.setAttribute("lon",d.x);b.setAttribute("lat",d.y);if(a.attributes){this.serializeTags(a,b)}this.setState(a,b);return f?[]:[b]},linestring:function(f){var a=[];var l=f.geometry;if(f.osm_id){id=f.osm_id}else{id=-this.osm_id;this.osm_id++}var b=this.createElementNS(null,"way");b.setAttribute("id",id);for(var d=0;d<l.components.length;d++){var h=this.createXML.point.apply(this,[l.components[d]]);if(h.length){h=h[0];var g=h.getAttribute("id");a.push(h)}else{g=l.components[d].osm_id;h=this.created_nodes[g]}this.setState(f,h);var j=this.createElementNS(null,"nd");j.setAttribute("ref",g);b.appendChild(j)}this.serializeTags(f,b);a.push(b);return a},polygon:function(b){var a=OpenLayers.Util.extend({area:"yes"},b.attributes);var d=new OpenLayers.Feature.Vector(b.geometry.components[0],a);d.osm_id=b.osm_id;return this.createXML.linestring.apply(this,[d])}},serializeTags:function(d,f){for(var b in d.attributes){var a=this.createElementNS(null,"tag");a.setAttribute("k",b);a.setAttribute("v",d.attributes[b]);f.appendChild(a)}},setState:function(a,b){if(a.state){var d=null;switch(a.state){case OpenLayers.State.UPDATE:d="modify";case OpenLayers.State.DELETE:d="delete"}if(d){b.setAttribute("action",d)}}},CLASS_NAME:"OpenLayers.Format.OSM"});OpenLayers.Geometry.MultiPolygon=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.Polygon"],initialize:function(a){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments)},CLASS_NAME:"OpenLayers.Geometry.MultiPolygon"});OpenLayers.Handler.Polygon=OpenLayers.Class(OpenLayers.Handler.Path,{polygon:null,initialize:function(d,b,a){OpenLayers.Handler.Path.prototype.initialize.apply(this,arguments)},createFeature:function(a){var b=this.control.map.getLonLatFromPixel(a);this.point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(b.lon,b.lat));this.line=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LinearRing([this.point.geometry]));this.polygon=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon([this.line.geometry]));this.callback("create",[this.point.geometry,this.getSketch()]);this.point.geometry.clearBounds();this.layer.addFeatures([this.polygon,this.point],{silent:true})},destroyFeature:function(){OpenLayers.Handler.Path.prototype.destroyFeature.apply(this);this.polygon=null},drawFeature:function(){this.layer.drawFeature(this.polygon,this.style);this.layer.drawFeature(this.point,this.style)},getSketch:function(){return this.polygon},getGeometry:function(){var a=this.polygon&&this.polygon.geometry;if(a&&this.multi){a=new OpenLayers.Geometry.MultiPolygon([a])}return a},dblclick:function(a){if(!this.freehandMode(a)){var b=this.line.geometry.components.length-2;this.line.geometry.removeComponent(this.line.geometry.components[b]);this.removePoint();this.finalize()}return false},CLASS_NAME:"OpenLayers.Handler.Polygon"});OpenLayers.Control.EditingToolbar=OpenLayers.Class(OpenLayers.Control.Panel,{initialize:function(d,b){OpenLayers.Control.Panel.prototype.initialize.apply(this,[b]);this.addControls([new OpenLayers.Control.Navigation()]);var a=[new OpenLayers.Control.DrawFeature(d,OpenLayers.Handler.Point,{displayClass:"olControlDrawFeaturePoint"}),new OpenLayers.Control.DrawFeature(d,OpenLayers.Handler.Path,{displayClass:"olControlDrawFeaturePath"}),new OpenLayers.Control.DrawFeature(d,OpenLayers.Handler.Polygon,{displayClass:"olControlDrawFeaturePolygon"})];this.addControls(a)},draw:function(){var a=OpenLayers.Control.Panel.prototype.draw.apply(this,arguments);this.activateControl(this.controls[0]);return a},CLASS_NAME:"OpenLayers.Control.EditingToolbar"});OpenLayers.Format.ArcXML=OpenLayers.Class(OpenLayers.Format.XML,{fontStyleKeys:["antialiasing","blockout","font","fontcolor","fontsize","fontstyle","glowing","interval","outline","printmode","shadow","transparency"],request:null,response:null,initialize:function(a){this.request=new OpenLayers.Format.ArcXML.Request();this.response=new OpenLayers.Format.ArcXML.Response();if(a){if(a.requesttype=="feature"){this.request.get_image=null;var d=this.request.get_feature.query;this.addCoordSys(d.featurecoordsys,a.featureCoordSys);this.addCoordSys(d.filtercoordsys,a.filterCoordSys);if(a.polygon){d.isspatial=true;d.spatialfilter.polygon=a.polygon}else{if(a.envelope){d.isspatial=true;d.spatialfilter.envelope={minx:0,miny:0,maxx:0,maxy:0};this.parseEnvelope(d.spatialfilter.envelope,a.envelope)}}}else{if(a.requesttype=="image"){this.request.get_feature=null;var b=this.request.get_image.properties;this.parseEnvelope(b.envelope,a.envelope);this.addLayers(b.layerlist,a.layers);this.addImageSize(b.imagesize,a.tileSize);this.addCoordSys(b.featurecoordsys,a.featureCoordSys);this.addCoordSys(b.filtercoordsys,a.filterCoordSys)}else{this.request=null}}}OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},parseEnvelope:function(b,a){if(a&&a.length==4){b.minx=a[0];b.miny=a[1];b.maxx=a[2];b.maxy=a[3]}},addLayers:function(f,d){for(var b=0,a=d.length;b<a;b++){f.push(d[b])}},addImageSize:function(b,a){if(a!==null){b.width=a.w;b.height=a.h;b.printwidth=a.w;b.printheight=a.h}},addCoordSys:function(a,b){if(typeof b=="string"){a.id=parseInt(b);a.string=b}else{if(typeof b=="object"&&b.proj!==null){a.id=b.proj.srsProjNumber;a.string=b.proj.srsCode}else{a=b}}},iserror:function(d){var a=null;if(!d){a=(this.response.error!=="")}else{d=OpenLayers.Format.XML.prototype.read.apply(this,[d]);var b=d.documentElement.getElementsByTagName("ERROR");a=(b!==null&&b.length>0)}return a},read:function(h){if(typeof h=="string"){h=OpenLayers.Format.XML.prototype.read.apply(this,[h])}var a=null;if(h&&h.documentElement){if(h.documentElement.nodeName=="ARCXML"){a=h.documentElement}else{a=h.documentElement.getElementsByTagName("ARCXML")[0]}}if(!a){var d,g;try{d=h.firstChild.nodeValue;g=h.firstChild.childNodes[1].firstChild.nodeValue}catch(f){}throw {message:"Error parsing the ArcXML request",error:d,source:g}}var b=this.parseResponse(a);return b},write:function(d){if(!d){d=this.request}var z=this.createElementNS("","ARCXML");z.setAttribute("version","1.1");var l=this.createElementNS("","REQUEST");if(d.get_image!=null){var p=this.createElementNS("","GET_IMAGE");l.appendChild(p);var o=this.createElementNS("","PROPERTIES");p.appendChild(o);var b=d.get_image.properties;if(b.featurecoordsys!=null){var v=this.createElementNS("","FEATURECOORDSYS");o.appendChild(v);if(b.featurecoordsys.id===0){v.setAttribute("string",b.featurecoordsys.string)}else{v.setAttribute("id",b.featurecoordsys.id)}}if(b.filtercoordsys!=null){var r=this.createElementNS("","FILTERCOORDSYS");o.appendChild(r);if(b.filtercoordsys.id===0){r.setAttribute("string",b.filtercoordsys.string)}else{r.setAttribute("id",b.filtercoordsys.id)}}if(b.envelope!=null){var E=this.createElementNS("","ENVELOPE");o.appendChild(E);E.setAttribute("minx",b.envelope.minx);E.setAttribute("miny",b.envelope.miny);E.setAttribute("maxx",b.envelope.maxx);E.setAttribute("maxy",b.envelope.maxy)}var C=this.createElementNS("","IMAGESIZE");o.appendChild(C);C.setAttribute("height",b.imagesize.height);C.setAttribute("width",b.imagesize.width);if(b.imagesize.height!=b.imagesize.printheight||b.imagesize.width!=b.imagesize.printwidth){C.setAttribute("printheight",b.imagesize.printheight);C.setArrtibute("printwidth",b.imagesize.printwidth)}if(b.background!=null){var a=this.createElementNS("","BACKGROUND");o.appendChild(a);a.setAttribute("color",b.background.color.r+","+b.background.color.g+","+b.background.color.b);if(b.background.transcolor!==null){a.setAttribute("transcolor",b.background.transcolor.r+","+b.background.transcolor.g+","+b.background.transcolor.b)}}if(b.layerlist!=null&&b.layerlist.length>0){var j=this.createElementNS("","LAYERLIST");o.appendChild(j);for(var w=0;w<b.layerlist.length;w++){var u=this.createElementNS("","LAYERDEF");j.appendChild(u);u.setAttribute("id",b.layerlist[w].id);u.setAttribute("visible",b.layerlist[w].visible);if(typeof b.layerlist[w].query=="object"){var h=b.layerlist[w].query;if(h.where.length<0){continue}var H=null;if(typeof h.spatialfilter=="boolean"&&h.spatialfilter){H=this.createElementNS("","SPATIALQUERY")}else{H=this.createElementNS("","QUERY")}H.setAttribute("where",h.where);if(typeof h.accuracy=="number"&&h.accuracy>0){H.setAttribute("accuracy",h.accuracy)}if(typeof h.featurelimit=="number"&&h.featurelimit<2000){H.setAttribute("featurelimit",h.featurelimit)}if(typeof h.subfields=="string"&&h.subfields!="#ALL#"){H.setAttribute("subfields",h.subfields)}if(typeof h.joinexpression=="string"&&h.joinexpression.length>0){H.setAttribute("joinexpression",h.joinexpression)}if(typeof h.jointables=="string"&&h.jointables.length>0){H.setAttribute("jointables",h.jointables)}u.appendChild(H)}if(typeof b.layerlist[w].renderer=="object"){this.addRenderer(u,b.layerlist[w].renderer)}}}}else{if(d.get_feature!=null){var p=this.createElementNS("","GET_FEATURES");p.setAttribute("outputmode","newxml");p.setAttribute("checkesc","true");if(d.get_feature.geometry){p.setAttribute("geometry",d.get_feature.geometry)}else{p.setAttribute("geometry","false")}if(d.get_feature.compact){p.setAttribute("compact",d.get_feature.compact)}if(d.get_feature.featurelimit=="number"){p.setAttribute("featurelimit",d.get_feature.featurelimit)}p.setAttribute("globalenvelope","true");l.appendChild(p);if(d.get_feature.layer!=null&&d.get_feature.layer.length>0){var F=this.createElementNS("","LAYER");F.setAttribute("id",d.get_feature.layer);p.appendChild(F)}var B=d.get_feature.query;if(B!=null){var D=null;if(B.isspatial){D=this.createElementNS("","SPATIALQUERY")}else{D=this.createElementNS("","QUERY")}p.appendChild(D);if(typeof B.accuracy=="number"){D.setAttribute("accuracy",B.accuracy)}if(B.featurecoordsys!=null){var g=this.createElementNS("","FEATURECOORDSYS");if(B.featurecoordsys.id==0){g.setAttribute("string",B.featurecoordsys.string)}else{g.setAttribute("id",B.featurecoordsys.id)}D.appendChild(g)}if(B.filtercoordsys!=null){var f=this.createElementNS("","FILTERCOORDSYS");if(B.filtercoordsys.id===0){f.setAttribute("string",B.filtercoordsys.string)}else{f.setAttribute("id",B.filtercoordsys.id)}D.appendChild(f)}if(B.buffer>0){var q=this.createElementNS("","BUFFER");q.setAttribute("distance",B.buffer);D.appendChild(q)}if(B.isspatial){var m=this.createElementNS("","SPATIALFILTER");m.setAttribute("relation",B.spatialfilter.relation);D.appendChild(m);if(B.spatialfilter.envelope){var G=this.createElementNS("","ENVELOPE");G.setAttribute("minx",B.spatialfilter.envelope.minx);G.setAttribute("miny",B.spatialfilter.envelope.miny);G.setAttribute("maxx",B.spatialfilter.envelope.maxx);G.setAttribute("maxy",B.spatialfilter.envelope.maxy);m.appendChild(G)}else{if(typeof B.spatialfilter.polygon=="object"){m.appendChild(this.writePolygonGeometry(B.spatialfilter.polygon))}}}if(B.where!=null&&B.where.length>0){D.setAttribute("where",B.where)}}}}z.appendChild(l);return OpenLayers.Format.XML.prototype.write.apply(this,[z])},addGroupRenderer:function(b,a){var g=this.createElementNS("","GROUPRENDERER");b.appendChild(g);for(var d=0;d<a.length;d++){var f=a[d];this.addRenderer(g,f)}},addRenderer:function(d,b){if(b instanceof Array){this.addGroupRenderer(d,b)}else{var a=this.createElementNS("",b.type.toUpperCase()+"RENDERER");d.appendChild(a);if(a.tagName=="VALUEMAPRENDERER"){this.addValueMapRenderer(a,b)}else{if(a.tagName=="VALUEMAPLABELRENDERER"){this.addValueMapLabelRenderer(a,b)}else{if(a.tagName=="SIMPLELABELRENDERER"){this.addSimpleLabelRenderer(a,b)}else{if(a.tagName=="SCALEDEPENDENTRENDERER"){this.addScaleDependentRenderer(a,b)}}}}}},addScaleDependentRenderer:function(a,b){if(typeof b.lower=="string"||typeof b.lower=="number"){a.setAttribute("lower",b.lower)}if(typeof b.upper=="string"||typeof b.upper=="number"){a.setAttribute("upper",b.upper)}this.addRenderer(a,b.renderer)},addValueMapLabelRenderer:function(l,j){l.setAttribute("lookupfield",j.lookupfield);l.setAttribute("labelfield",j.labelfield);if(typeof j.exacts=="object"){for(var a=0,o=j.exacts.length;a<o;a++){var g=j.exacts[a];var f=this.createElementNS("","EXACT");if(typeof g.value=="string"){f.setAttribute("value",g.value)}if(typeof g.label=="string"){f.setAttribute("label",g.label)}if(typeof g.method=="string"){f.setAttribute("method",g.method)}l.appendChild(f);if(typeof g.symbol=="object"){var b=null;if(g.symbol.type=="text"){b=this.createElementNS("","TEXTSYMBOL")}if(b!=null){var p=this.fontStyleKeys;for(var d=0,h=p.length;d<h;d++){var m=p[d];if(g.symbol[m]){b.setAttribute(m,g.symbol[m])}}f.appendChild(b)}}}}},addValueMapRenderer:function(o,m){o.setAttribute("lookupfield",m.lookupfield);if(typeof m.ranges=="object"){for(var a=0,b=m.ranges.length;a<b;a++){var j=m.ranges[a];var g=this.createElementNS("","RANGE");g.setAttribute("lower",j.lower);g.setAttribute("upper",j.upper);o.appendChild(g);if(typeof j.symbol=="object"){var f=null;if(j.symbol.type=="simplepolygon"){f=this.createElementNS("","SIMPLEPOLYGONSYMBOL")}if(f!=null){if(typeof j.symbol.boundarycolor=="string"){f.setAttribute("boundarycolor",j.symbol.boundarycolor)}if(typeof j.symbol.fillcolor=="string"){f.setAttribute("fillcolor",j.symbol.fillcolor)}if(typeof j.symbol.filltransparency=="number"){f.setAttribute("filltransparency",j.symbol.filltransparency)}g.appendChild(f)}}}}else{if(typeof m.exacts=="object"){for(var d=0,p=m.exacts.length;d<p;d++){var l=m.exacts[d];var h=this.createElementNS("","EXACT");if(typeof l.value=="string"){h.setAttribute("value",l.value)}if(typeof l.label=="string"){h.setAttribute("label",l.label)}if(typeof l.method=="string"){h.setAttribute("method",l.method)}o.appendChild(h);if(typeof l.symbol=="object"){var f=null;if(l.symbol.type=="simplemarker"){f=this.createElementNS("","SIMPLEMARKERSYMBOL")}if(f!=null){if(typeof l.symbol.antialiasing=="string"){f.setAttribute("antialiasing",l.symbol.antialiasing)}if(typeof l.symbol.color=="string"){f.setAttribute("color",l.symbol.color)}if(typeof l.symbol.outline=="string"){f.setAttribute("outline",l.symbol.outline)}if(typeof l.symbol.overlap=="string"){f.setAttribute("overlap",l.symbol.overlap)}if(typeof l.symbol.shadow=="string"){f.setAttribute("shadow",l.symbol.shadow)}if(typeof l.symbol.transparency=="number"){f.setAttribute("transparency",l.symbol.transparency)}if(typeof l.symbol.usecentroid=="string"){f.setAttribute("usecentroid",l.symbol.usecentroid)}if(typeof l.symbol.width=="number"){f.setAttribute("width",l.symbol.width)}h.appendChild(f)}}}}}},addSimpleLabelRenderer:function(h,l){h.setAttribute("field",l.field);var g=["featureweight","howmanylabels","labelbufferratio","labelpriorities","labelweight","linelabelposition","rotationalangles"];for(var f=0,a=g.length;f<a;f++){var d=g[f];if(l[d]){h.setAttribute(d,l[d])}}if(l.symbol.type=="text"){var j=l.symbol;var b=this.createElementNS("","TEXTSYMBOL");h.appendChild(b);var g=this.fontStyleKeys;for(var f=0,a=g.length;f<a;f++){var d=g[f];if(j[d]){b.setAttribute(d,l[d])}}}},writePolygonGeometry:function(j){if(!(j instanceof OpenLayers.Geometry.Polygon)){throw {message:"Cannot write polygon geometry to ArcXML with an "+j.CLASS_NAME+" object.",geometry:j}}var b=this.createElementNS("","POLYGON");for(var g=0,d=j.components.length;g<d;g++){var a=j.components[g];var m=this.createElementNS("","RING");for(var f=0,o=a.components.length;f<o;f++){var l=a.components[f];var h=this.createElementNS("","POINT");h.setAttribute("x",l.x);h.setAttribute("y",l.y);m.appendChild(h)}b.appendChild(m)}return b},parseResponse:function(J){if(typeof J=="string"){var u=new OpenLayers.Format.XML();J=u.read(J)}var a=new OpenLayers.Format.ArcXML.Response();var K=J.getElementsByTagName("ERROR");if(K!=null&&K.length>0){a.error=this.getChildValue(K,"Unknown error.")}else{var B=J.getElementsByTagName("RESPONSE");if(B==null||B.length==0){a.error="No RESPONSE tag found in ArcXML response.";return a}var z=B[0].firstChild.nodeName;if(z=="#text"){z=B[0].firstChild.nextSibling.nodeName}if(z=="IMAGE"){var d=J.getElementsByTagName("ENVELOPE");var G=J.getElementsByTagName("OUTPUT");if(d==null||d.length==0){a.error="No ENVELOPE tag found in ArcXML response."}else{if(G==null||G.length==0){a.error="No OUTPUT tag found in ArcXML response."}else{var E=this.parseAttributes(d[0]);var F=this.parseAttributes(G[0]);if(typeof F.type=="string"){a.image={envelope:E,output:{type:F.type,data:this.getChildValue(G[0])}}}else{a.image={envelope:E,output:F}}}}}else{if(z=="FEATURES"){var m=B[0].getElementsByTagName("FEATURES");var w=m[0].getElementsByTagName("FEATURECOUNT");a.features.featurecount=w[0].getAttribute("count");if(a.features.featurecount>0){var f=m[0].getElementsByTagName("ENVELOPE");a.features.envelope=this.parseAttributes(f[0],typeof(0));var H=m[0].getElementsByTagName("FEATURE");for(var r=0;r<H.length;r++){var l=new OpenLayers.Feature.Vector();var C=H[r].getElementsByTagName("FIELD");for(var h=0;h<C.length;h++){var j=C[h].getAttribute("name");var p=C[h].getAttribute("value");l.attributes[j]=p}var D=H[r].getElementsByTagName("POLYGON");if(D.length>0){var o=D[0].getElementsByTagName("RING");var g=[];for(var v=0;v<o.length;v++){var I=[];I.push(this.parsePointGeometry(o[v]));var q=o[v].getElementsByTagName("HOLE");for(var b=0;b<q.length;b++){I.push(this.parsePointGeometry(q[b]))}q=null;g.push(new OpenLayers.Geometry.Polygon(I));I=null}o=null;if(g.length==1){l.geometry=g[0]}else{l.geometry=new OpenLayers.Geometry.MultiPolygon(g)}}a.features.feature.push(l)}}}else{a.error="Unidentified response type."}}}return a},parseAttributes:function(f,d){var b={};for(var a=0;a<f.attributes.length;a++){if(d=="number"){b[f.attributes[a].nodeName]=parseFloat(f.attributes[a].nodeValue)}else{b[f.attributes[a].nodeName]=f.attributes[a].nodeValue}}return b},parsePointGeometry:function(f){var b=[];var g=f.getElementsByTagName("COORDS");if(g.length>0){var h=this.getChildValue(g[0]);h=h.split(/;/);for(var l=0;l<h.length;l++){var j=h[l].split(/ /);b.push(new OpenLayers.Geometry.Point(parseFloat(j[0]),parseFloat(j[1])))}g=null}else{var a=f.getElementsByTagName("POINT");if(a.length>0){for(var d=0;d<a.length;d++){b.push(new OpenLayers.Geometry.Point(parseFloat(a[d].getAttribute("x")),parseFloat(a[d].getAttribute("y"))))}}a=null}return new OpenLayers.Geometry.LinearRing(b)},CLASS_NAME:"OpenLayers.Format.ArcXML"});OpenLayers.Format.ArcXML.Request=OpenLayers.Class({initialize:function(b){var a={get_image:{properties:{background:null,draw:true,envelope:{minx:0,miny:0,maxx:0,maxy:0},featurecoordsys:{id:0,string:"",datumtransformid:0,datumtransformstring:""},filtercoordsys:{id:0,string:"",datumtransformid:0,datumtransformstring:""},imagesize:{height:0,width:0,dpi:96,printheight:0,printwidth:0,scalesymbols:false},layerlist:[],output:{baseurl:"",legendbaseurl:"",legendname:"",legendpath:"",legendurl:"",name:"",path:"",type:"jpg",url:""}}},get_feature:{layer:"",query:{isspatial:false,featurecoordsys:{id:0,string:"",datumtransformid:0,datumtransformstring:""},filtercoordsys:{id:0,string:"",datumtransformid:0,datumtransformstring:""},buffer:0,where:"",spatialfilter:{relation:"envelope_intersection",envelope:null}}},environment:{separators:{cs:" ",ts:";"}},layer:[],workspaces:[]};return OpenLayers.Util.extend(this,a)},CLASS_NAME:"OpenLayers.Format.ArcXML.Request"});OpenLayers.Format.ArcXML.Response=OpenLayers.Class({initialize:function(b){var a={image:{envelope:null,output:""},features:{featurecount:0,envelope:null,feature:[]},error:""};return OpenLayers.Util.extend(this,a)},CLASS_NAME:"OpenLayers.Format.ArcXML.Response"});OpenLayers.Format.GML=OpenLayers.Class(OpenLayers.Format.XML,{featureNS:"http://mapserver.gis.umn.edu/mapserver",featurePrefix:"feature",featureName:"featureMember",layerName:"features",geometryName:"geometry",collectionName:"FeatureCollection",gmlns:"http://www.opengis.net/gml",extractAttributes:true,xy:true,initialize:function(a){this.regExes={trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)};OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},read:function(f){if(typeof f=="string"){f=OpenLayers.Format.XML.prototype.read.apply(this,[f])}var g=this.getElementsByTagNameNS(f.documentElement,this.gmlns,this.featureName);var d=[];for(var b=0;b<g.length;b++){var a=this.parseFeature(g[b]);if(a){d.push(a)}}return d},parseFeature:function(d){var f=["MultiPolygon","Polygon","MultiLineString","LineString","MultiPoint","Point","Envelope","Box"];var m,h,o,b;for(var l=0;l<f.length;++l){m=f[l];h=this.getElementsByTagNameNS(d,this.gmlns,m);if(h.length>0){var b=this.parseGeometry[m.toLowerCase()];if(b){o=b.apply(this,[h[0]]);if(this.internalProjection&&this.externalProjection){o.transform(this.externalProjection,this.internalProjection)}}else{OpenLayers.Console.error(OpenLayers.i18n("unsupportedGeometryType",{geomType:m}))}break}}var j;if(this.extractAttributes){j=this.parseAttributes(d)}var p=new OpenLayers.Feature.Vector(o,j);p.gml={featureType:d.firstChild.nodeName.split(":")[1],featureNS:d.firstChild.namespaceURI,featureNSPrefix:d.firstChild.prefix};var a=d.firstChild;var g;while(a){if(a.nodeType==1){g=a.getAttribute("fid")||a.getAttribute("id");if(g){break}}a=a.nextSibling}p.fid=g;return p},parseGeometry:{point:function(f){var b,a;var g=[];var b=this.getElementsByTagNameNS(f,this.gmlns,"pos");if(b.length>0){a=b[0].firstChild.nodeValue;a=a.replace(this.regExes.trimSpace,"");g=a.split(this.regExes.splitSpace)}if(g.length==0){b=this.getElementsByTagNameNS(f,this.gmlns,"coordinates");if(b.length>0){a=b[0].firstChild.nodeValue;a=a.replace(this.regExes.removeSpace,"");g=a.split(",")}}if(g.length==0){b=this.getElementsByTagNameNS(f,this.gmlns,"coord");if(b.length>0){var h=this.getElementsByTagNameNS(b[0],this.gmlns,"X");var d=this.getElementsByTagNameNS(b[0],this.gmlns,"Y");if(h.length>0&&d.length>0){g=[h[0].firstChild.nodeValue,d[0].firstChild.nodeValue]}}}if(g.length==2){g[2]=null}if(this.xy){return new OpenLayers.Geometry.Point(g[0],g[1],g[2])}else{return new OpenLayers.Geometry.Point(g[1],g[0],g[2])}},multipoint:function(g){var b=this.getElementsByTagNameNS(g,this.gmlns,"Point");var f=[];if(b.length>0){var a;for(var d=0;d<b.length;++d){a=this.parseGeometry.point.apply(this,[b[d]]);if(a){f.push(a)}}}return new OpenLayers.Geometry.MultiPoint(f)},linestring:function(d,g){var f,b;var r=[];var u=[];f=this.getElementsByTagNameNS(d,this.gmlns,"posList");if(f.length>0){b=this.getChildValue(f[0]);b=b.replace(this.regExes.trimSpace,"");r=b.split(this.regExes.splitSpace);var m=parseInt(f[0].getAttribute("dimension"));var h,q,p,o;for(var l=0;l<r.length/m;++l){h=l*m;q=r[h];p=r[h+1];o=(m==2)?null:r[h+2];if(this.xy){u.push(new OpenLayers.Geometry.Point(q,p,o))}else{u.push(new OpenLayers.Geometry.Point(p,q,o))}}}if(r.length==0){f=this.getElementsByTagNameNS(d,this.gmlns,"coordinates");if(f.length>0){b=this.getChildValue(f[0]);b=b.replace(this.regExes.trimSpace,"");b=b.replace(this.regExes.trimComma,",");var a=b.split(this.regExes.splitSpace);for(var l=0;l<a.length;++l){r=a[l].split(",");if(r.length==2){r[2]=null}if(this.xy){u.push(new OpenLayers.Geometry.Point(r[0],r[1],r[2]))}else{u.push(new OpenLayers.Geometry.Point(r[1],r[0],r[2]))}}}}var v=null;if(u.length!=0){if(g){v=new OpenLayers.Geometry.LinearRing(u)}else{v=new OpenLayers.Geometry.LineString(u)}}return v},multilinestring:function(g){var b=this.getElementsByTagNameNS(g,this.gmlns,"LineString");var f=[];if(b.length>0){var a;for(var d=0;d<b.length;++d){a=this.parseGeometry.linestring.apply(this,[b[d]]);if(a){f.push(a)}}}return new OpenLayers.Geometry.MultiLineString(f)},polygon:function(g){var b=this.getElementsByTagNameNS(g,this.gmlns,"LinearRing");var f=[];if(b.length>0){var a;for(var d=0;d<b.length;++d){a=this.parseGeometry.linestring.apply(this,[b[d],true]);if(a){f.push(a)}}}return new OpenLayers.Geometry.Polygon(f)},multipolygon:function(g){var a=this.getElementsByTagNameNS(g,this.gmlns,"Polygon");var f=[];if(a.length>0){var d;for(var b=0;b<a.length;++b){d=this.parseGeometry.polygon.apply(this,[a[b]]);if(d){f.push(d)}}}return new OpenLayers.Geometry.MultiPolygon(f)},envelope:function(b){var g=[];var a;var h;var o=this.getElementsByTagNameNS(b,this.gmlns,"lowerCorner");if(o.length>0){var l=[];if(o.length>0){a=o[0].firstChild.nodeValue;a=a.replace(this.regExes.trimSpace,"");l=a.split(this.regExes.splitSpace)}if(l.length==2){l[2]=null}if(this.xy){var f=new OpenLayers.Geometry.Point(l[0],l[1],l[2])}else{var f=new OpenLayers.Geometry.Point(l[1],l[0],l[2])}}var j=this.getElementsByTagNameNS(b,this.gmlns,"upperCorner");if(j.length>0){var l=[];if(j.length>0){a=j[0].firstChild.nodeValue;a=a.replace(this.regExes.trimSpace,"");l=a.split(this.regExes.splitSpace)}if(l.length==2){l[2]=null}if(this.xy){var m=new OpenLayers.Geometry.Point(l[0],l[1],l[2])}else{var m=new OpenLayers.Geometry.Point(l[1],l[0],l[2])}}if(f&&m){g.push(new OpenLayers.Geometry.Point(f.x,f.y));g.push(new OpenLayers.Geometry.Point(m.x,f.y));g.push(new OpenLayers.Geometry.Point(m.x,m.y));g.push(new OpenLayers.Geometry.Point(f.x,m.y));g.push(new OpenLayers.Geometry.Point(f.x,f.y));var d=new OpenLayers.Geometry.LinearRing(g);h=new OpenLayers.Geometry.Polygon([d])}return h}},parseAttributes:function(g){var h={};var a=g.firstChild;var f,j,d,o,m,b,l;while(a){if(a.nodeType==1){f=a.childNodes;for(j=0;j<f.length;++j){d=f[j];if(d.nodeType==1){o=d.childNodes;if(o.length==1){m=o[0];if(m.nodeType==3||m.nodeType==4){b=(d.prefix)?d.nodeName.split(":")[1]:d.nodeName;l=m.nodeValue.replace(this.regExes.trimSpace,"");h[b]=l}}else{h[d.nodeName.split(":").pop()]=null}}}break}a=a.nextSibling}return h},write:function(d){if(!(d instanceof Array)){d=[d]}var b=this.createElementNS("http://www.opengis.net/wfs","wfs:"+this.collectionName);for(var a=0;a<d.length;a++){b.appendChild(this.createFeatureXML(d[a]))}return OpenLayers.Format.XML.prototype.write.apply(this,[b])},createFeatureXML:function(o){var l=o.geometry;var g=this.buildGeometryNode(l);var m=this.createElementNS(this.featureNS,this.featurePrefix+":"+this.geometryName);m.appendChild(g);var a=this.createElementNS(this.gmlns,"gml:"+this.featureName);var p=this.createElementNS(this.featureNS,this.featurePrefix+":"+this.layerName);var d=o.fid||o.id;p.setAttribute("fid",d);p.appendChild(m);for(var j in o.attributes){var h=this.createTextNode(o.attributes[j]);var f=j.substring(j.lastIndexOf(":")+1);var b=this.createElementNS(this.featureNS,this.featurePrefix+":"+f);b.appendChild(h);p.appendChild(b)}a.appendChild(p);return a},buildGeometryNode:function(f){if(this.externalProjection&&this.internalProjection){f=f.clone();f.transform(this.internalProjection,this.externalProjection)}var d=f.CLASS_NAME;var b=d.substring(d.lastIndexOf(".")+1);var a=this.buildGeometry[b.toLowerCase()];return a.apply(this,[f])},buildGeometry:{point:function(b){var a=this.createElementNS(this.gmlns,"gml:Point");a.appendChild(this.buildCoordinatesNode(b));return a},multipoint:function(h){var f=this.createElementNS(this.gmlns,"gml:MultiPoint");var d=h.components;var b,g;for(var a=0;a<d.length;a++){b=this.createElementNS(this.gmlns,"gml:pointMember");g=this.buildGeometry.point.apply(this,[d[a]]);b.appendChild(g);f.appendChild(b)}return f},linestring:function(b){var a=this.createElementNS(this.gmlns,"gml:LineString");a.appendChild(this.buildCoordinatesNode(b));return a},multilinestring:function(h){var f=this.createElementNS(this.gmlns,"gml:MultiLineString");var a=h.components;var d,g;for(var b=0;b<a.length;++b){d=this.createElementNS(this.gmlns,"gml:lineStringMember");g=this.buildGeometry.linestring.apply(this,[a[b]]);d.appendChild(g);f.appendChild(d)}return f},linearring:function(b){var a=this.createElementNS(this.gmlns,"gml:LinearRing");a.appendChild(this.buildCoordinatesNode(b));return a},polygon:function(j){var f=this.createElementNS(this.gmlns,"gml:Polygon");var h=j.components;var d,g,b;for(var a=0;a<h.length;++a){b=(a==0)?"outerBoundaryIs":"innerBoundaryIs";d=this.createElementNS(this.gmlns,"gml:"+b);g=this.buildGeometry.linearring.apply(this,[h[a]]);d.appendChild(g);f.appendChild(d)}return f},multipolygon:function(h){var f=this.createElementNS(this.gmlns,"gml:MultiPolygon");var a=h.components;var g,b;for(var d=0;d<a.length;++d){g=this.createElementNS(this.gmlns,"gml:polygonMember");b=this.buildGeometry.polygon.apply(this,[a[d]]);g.appendChild(b);f.appendChild(g)}return f},bounds:function(b){var a=this.createElementNS(this.gmlns,"gml:Box");a.appendChild(this.buildCoordinatesNode(b));return a}},buildCoordinatesNode:function(h){var a=this.createElementNS(this.gmlns,"gml:coordinates");a.setAttribute("decimal",".");a.setAttribute("cs",",");a.setAttribute("ts"," ");var g=[];if(h instanceof OpenLayers.Bounds){g.push(h.left+","+h.bottom);g.push(h.right+","+h.top)}else{var d=(h.components)?h.components:[h];for(var b=0;b<d.length;b++){g.push(d[b].x+","+d[b].y)}}var f=this.createTextNode(g.join(" "));a.appendChild(f);return a},CLASS_NAME:"OpenLayers.Format.GML"});OpenLayers.Format.GeoJSON=OpenLayers.Class(OpenLayers.Format.JSON,{initialize:function(a){OpenLayers.Format.JSON.prototype.initialize.apply(this,[a])},read:function(m,j,a){j=(j)?j:"FeatureCollection";var f=null;var d=null;if(typeof m=="string"){d=OpenLayers.Format.JSON.prototype.read.apply(this,[m,a])}else{d=m}if(!d){OpenLayers.Console.error("Bad JSON: "+m)}else{if(typeof(d.type)!="string"){OpenLayers.Console.error("Bad GeoJSON - no type: "+m)}else{if(this.isValidType(d,j)){switch(j){case"Geometry":try{f=this.parseGeometry(d)}catch(b){OpenLayers.Console.error(b)}break;case"Feature":try{f=this.parseFeature(d);f.type="Feature"}catch(b){OpenLayers.Console.error(b)}break;case"FeatureCollection":f=[];switch(d.type){case"Feature":try{f.push(this.parseFeature(d))}catch(b){f=null;OpenLayers.Console.error(b)}break;case"FeatureCollection":for(var g=0,h=d.features.length;g<h;++g){try{f.push(this.parseFeature(d.features[g]))}catch(b){f=null;OpenLayers.Console.error(b)}}break;default:try{var l=this.parseGeometry(d);f.push(new OpenLayers.Feature.Vector(l))}catch(b){f=null;OpenLayers.Console.error(b)}}break}}}}return f},isValidType:function(d,a){var b=false;switch(a){case"Geometry":if(OpenLayers.Util.indexOf(["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon","Box","GeometryCollection"],d.type)==-1){OpenLayers.Console.error("Unsupported geometry type: "+d.type)}else{b=true}break;case"FeatureCollection":b=true;break;default:if(d.type==a){b=true}else{OpenLayers.Console.error("Cannot convert types from "+d.type+" to "+a)}}return b},parseFeature:function(f){var b,h,a,g;a=(f.properties)?f.properties:{};g=(f.geometry&&f.geometry.bbox)||f.bbox;try{h=this.parseGeometry(f.geometry)}catch(d){throw d}b=new OpenLayers.Feature.Vector(h,a);if(g){b.bounds=OpenLayers.Bounds.fromArray(g)}if(f.id){b.fid=f.id}return b},parseGeometry:function(g){if(g==null){return null}var j,h=false;if(g.type=="GeometryCollection"){if(!(g.geometries instanceof Array)){throw"GeometryCollection must have geometries array: "+g}var b=g.geometries.length;var f=new Array(b);for(var a=0;a<b;++a){f[a]=this.parseGeometry.apply(this,[g.geometries[a]])}j=new OpenLayers.Geometry.Collection(f);h=true}else{if(!(g.coordinates instanceof Array)){throw"Geometry must have coordinates array: "+g}if(!this.parseCoords[g.type.toLowerCase()]){throw"Unsupported geometry type: "+g.type}try{j=this.parseCoords[g.type.toLowerCase()].apply(this,[g.coordinates])}catch(d){throw d}}if(this.internalProjection&&this.externalProjection&&!h){j.transform(this.externalProjection,this.internalProjection)}return j},parseCoords:{point:function(a){if(a.length!=2){throw"Only 2D points are supported: "+a}return new OpenLayers.Geometry.Point(a[0],a[1])},multipoint:function(h){var d=[];var g=null;for(var b=0,a=h.length;b<a;++b){try{g=this.parseCoords.point.apply(this,[h[b]])}catch(f){throw f}d.push(g)}return new OpenLayers.Geometry.MultiPoint(d)},linestring:function(h){var d=[];var g=null;for(var b=0,a=h.length;b<a;++b){try{g=this.parseCoords.point.apply(this,[h[b]])}catch(f){throw f}d.push(g)}return new OpenLayers.Geometry.LineString(d)},multilinestring:function(h){var d=[];var b=null;for(var f=0,a=h.length;f<a;++f){try{b=this.parseCoords.linestring.apply(this,[h[f]])}catch(g){throw g}d.push(b)}return new OpenLayers.Geometry.MultiLineString(d)},polygon:function(j){var h=[];var g,b;for(var d=0,a=j.length;d<a;++d){try{b=this.parseCoords.linestring.apply(this,[j[d]])}catch(f){throw f}g=new OpenLayers.Geometry.LinearRing(b.components);h.push(g)}return new OpenLayers.Geometry.Polygon(h)},multipolygon:function(h){var b=[];var g=null;for(var d=0,a=h.length;d<a;++d){try{g=this.parseCoords.polygon.apply(this,[h[d]])}catch(f){throw f}b.push(g)}return new OpenLayers.Geometry.MultiPolygon(b)},box:function(a){if(a.length!=2){throw"GeoJSON box coordinates must have 2 elements"}return new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing([new OpenLayers.Geometry.Point(a[0][0],a[0][1]),new OpenLayers.Geometry.Point(a[1][0],a[0][1]),new OpenLayers.Geometry.Point(a[1][0],a[1][1]),new OpenLayers.Geometry.Point(a[0][0],a[1][1]),new OpenLayers.Geometry.Point(a[0][0],a[0][1])])])}},write:function(g,f){var a={type:null};if(g instanceof Array){a.type="FeatureCollection";var j=g.length;a.features=new Array(j);for(var d=0;d<j;++d){var b=g[d];if(!b instanceof OpenLayers.Feature.Vector){var h="FeatureCollection only supports collections of features: "+b;throw h}a.features[d]=this.extract.feature.apply(this,[b])}}else{if(g.CLASS_NAME.indexOf("OpenLayers.Geometry")==0){a=this.extract.geometry.apply(this,[g])}else{if(g instanceof OpenLayers.Feature.Vector){a=this.extract.feature.apply(this,[g]);if(g.layer&&g.layer.projection){a.crs=this.createCRSObject(g)}}}}return OpenLayers.Format.JSON.prototype.write.apply(this,[a,f])},createCRSObject:function(b){var d=b.layer.projection.toString();var a={};if(d.match(/epsg:/i)){var f=parseInt(d.substring(d.indexOf(":")+1));if(f==4326){a={type:"OGC",properties:{urn:"urn:ogc:def:crs:OGC:1.3:CRS84"}}}else{a={type:"EPSG",properties:{code:f}}}}return a},extract:{feature:function(b){var a=this.extract.geometry.apply(this,[b.geometry]);return{type:"Feature",id:b.fid==null?b.id:b.fid,properties:b.attributes,geometry:a}},geometry:function(f){if(f==null){return null}if(this.internalProjection&&this.externalProjection){f=f.clone();f.transform(this.internalProjection,this.externalProjection)}var a=f.CLASS_NAME.split(".")[2];var d=this.extract[a.toLowerCase()].apply(this,[f]);var b;if(a=="Collection"){b={type:"GeometryCollection",geometries:d}}else{b={type:a,coordinates:d}}return b},point:function(a){return[a.x,a.y]},multipoint:function(d){var f=[];for(var b=0,a=d.components.length;b<a;++b){f.push(this.extract.point.apply(this,[d.components[b]]))}return f},linestring:function(b){var f=[];for(var d=0,a=b.components.length;d<a;++d){f.push(this.extract.point.apply(this,[b.components[d]]))}return f},multilinestring:function(d){var f=[];for(var b=0,a=d.components.length;b<a;++b){f.push(this.extract.linestring.apply(this,[d.components[b]]))}return f},polygon:function(d){var f=[];for(var b=0,a=d.components.length;b<a;++b){f.push(this.extract.linestring.apply(this,[d.components[b]]))}return f},multipolygon:function(f){var d=[];for(var b=0,a=f.components.length;b<a;++b){d.push(this.extract.polygon.apply(this,[f.components[b]]))}return d},collection:function(d){var a=d.components.length;var f=new Array(a);for(var b=0;b<a;++b){f[b]=this.extract.geometry.apply(this,[d.components[b]])}return f}},CLASS_NAME:"OpenLayers.Format.GeoJSON"});OpenLayers.Format.ArcXML.Features=OpenLayers.Class(OpenLayers.Format.XML,{initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},read:function(d){var b=new OpenLayers.Format.ArcXML();var a=b.read(d);return a.features.feature}});if(!OpenLayers.Format.GML){OpenLayers.Format.GML={}}OpenLayers.Format.GML.Base=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{gml:"http://www.opengis.net/gml",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance",wfs:"http://www.opengis.net/wfs"},defaultPrefix:"gml",schemaLocation:null,featureType:null,featureNS:null,geometryName:"geometry",extractAttributes:true,srsName:null,xy:true,geometryTypes:null,singleFeatureType:null,regExes:{trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)},initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a]);this.setGeometryTypes();if(a&&a.featureNS){this.setNamespace("feature",a.featureNS)}this.singleFeatureType=!a||(typeof a.featureType==="string")},read:function(g){if(typeof g=="string"){g=OpenLayers.Format.XML.prototype.read.apply(this,[g])}if(g&&g.nodeType==9){g=g.documentElement}var d=[];this.readNode(g,{features:d});if(d.length==0){var f=this.getElementsByTagNameNS(g,this.namespaces.gml,"featureMember");if(f.length){for(var b=0,a=f.length;b<a;++b){this.readNode(f[b],{features:d})}}else{var f=this.getElementsByTagNameNS(g,this.namespaces.gml,"featureMembers");if(f.length){this.readNode(f[0],{features:d})}}}return d},readers:{gml:{featureMember:function(a,b){this.readChildNodes(a,b)},featureMembers:function(a,b){this.readChildNodes(a,b)},name:function(a,b){b.name=this.getChildValue(a)},boundedBy:function(b,d){var a={};this.readChildNodes(b,a);if(a.components&&a.components.length>0){d.bounds=a.components[0]}},Point:function(b,a){var d={points:[]};this.readChildNodes(b,d);if(!a.components){a.components=[]}a.components.push(d.points[0])},coordinates:function(g,j){var l=this.getChildValue(g).replace(this.regExes.trimSpace,"");l=l.replace(this.regExes.trimComma,",");var a=l.split(this.regExes.splitSpace);var h;var f=a.length;var d=new Array(f);for(var b=0;b<f;++b){h=a[b].split(",");if(this.xy){d[b]=new OpenLayers.Geometry.Point(h[0],h[1],h[2])}else{d[b]=new OpenLayers.Geometry.Point(h[1],h[0],h[2])}}j.points=d},coord:function(a,b){var d={};this.readChildNodes(a,d);if(!b.points){b.points=[]}b.points.push(new OpenLayers.Geometry.Point(d.x,d.y,d.z))},X:function(a,b){b.x=this.getChildValue(a)},Y:function(a,b){b.y=this.getChildValue(a)},Z:function(a,b){b.z=this.getChildValue(a)},MultiPoint:function(b,a){var d={components:[]};this.readChildNodes(b,d);a.components=[new OpenLayers.Geometry.MultiPoint(d.components)]},pointMember:function(a,b){this.readChildNodes(a,b)},LineString:function(b,a){var d={};this.readChildNodes(b,d);if(!a.components){a.components=[]}a.components.push(new OpenLayers.Geometry.LineString(d.points))},MultiLineString:function(b,a){var d={components:[]};this.readChildNodes(b,d);a.components=[new OpenLayers.Geometry.MultiLineString(d.components)]},lineStringMember:function(a,b){this.readChildNodes(a,b)},Polygon:function(b,a){var d={outer:null,inner:[]};this.readChildNodes(b,d);d.inner.unshift(d.outer);if(!a.components){a.components=[]}a.components.push(new OpenLayers.Geometry.Polygon(d.inner))},LinearRing:function(b,d){var a={};this.readChildNodes(b,a);d.components=[new OpenLayers.Geometry.LinearRing(a.points)]},MultiPolygon:function(b,a){var d={components:[]};this.readChildNodes(b,d);a.components=[new OpenLayers.Geometry.MultiPolygon(d.components)]},polygonMember:function(a,b){this.readChildNodes(a,b)},GeometryCollection:function(b,a){var d={components:[]};this.readChildNodes(b,d);a.components=[new OpenLayers.Geometry.Collection(d.components)]},geometryMember:function(a,b){this.readChildNodes(a,b)}},feature:{"*":function(d,f){var a;var b=d.localName||d.nodeName.split(":").pop();if(!this.singleFeatureType&&(OpenLayers.Util.indexOf(this.featureType,b)!=-1)){a="_typeName"}else{if(b==this.featureType){a="_typeName"}else{if(d.childNodes.length==0||(d.childNodes.length==1&&d.firstChild.nodeType==3)){if(this.extractAttributes){a="_attribute"}}else{a="_geometry"}}}if(a){this.readers.feature[a].apply(this,[d,f])}},_typeName:function(d,f){var a={components:[],attributes:{}};this.readChildNodes(d,a);if(a.name){a.attributes.name=a.name}var b=new OpenLayers.Feature.Vector(a.components[0],a.attributes);if(!this.singleFeatureType){b.type=d.nodeName.split(":").pop();b.namespace=d.namespaceURI}var g=d.getAttribute("fid")||this.getAttributeNS(d,this.namespaces.gml,"id");if(g){b.fid=g}if(this.internalProjection&&this.externalProjection&&b.geometry){b.geometry.transform(this.externalProjection,this.internalProjection)}if(a.bounds){b.geometry.bounds=a.bounds}f.features.push(b)},_geometry:function(a,b){this.readChildNodes(a,b)},_attribute:function(b,f){var a=b.localName||b.nodeName.split(":").pop();var d=this.getChildValue(b);f.attributes[a]=d}},wfs:{FeatureCollection:function(a,b){this.readChildNodes(a,b)}}},write:function(d){var b;if(d instanceof Array){b="featureMembers"}else{b="featureMember"}var a=this.writeNode("gml:"+b,d);this.setAttributeNS(a,this.namespaces.xsi,"xsi:schemaLocation",this.schemaLocation);return OpenLayers.Format.XML.prototype.write.apply(this,[a])},writers:{gml:{featureMember:function(a){var b=this.createElementNSPlus("gml:featureMember");this.writeNode("feature:_typeName",a,b);return b},MultiPoint:function(d){var b=this.createElementNSPlus("gml:MultiPoint");for(var a=0;a<d.components.length;++a){this.writeNode("pointMember",d.components[a],b)}return b},pointMember:function(b){var a=this.createElementNSPlus("gml:pointMember");this.writeNode("Point",b,a);return a},MultiLineString:function(d){var b=this.createElementNSPlus("gml:MultiLineString");for(var a=0;a<d.components.length;++a){this.writeNode("lineStringMember",d.components[a],b)}return b},lineStringMember:function(b){var a=this.createElementNSPlus("gml:lineStringMember");this.writeNode("LineString",b,a);return a},MultiPolygon:function(d){var b=this.createElementNSPlus("gml:MultiPolygon");for(var a=0;a<d.components.length;++a){this.writeNode("polygonMember",d.components[a],b)}return b},polygonMember:function(b){var a=this.createElementNSPlus("gml:polygonMember");this.writeNode("Polygon",b,a);return a},GeometryCollection:function(f){var d=this.createElementNSPlus("gml:GeometryCollection");for(var b=0,a=f.components.length;b<a;++b){this.writeNode("geometryMember",f.components[b],d)}return d},geometryMember:function(b){var a=this.createElementNSPlus("gml:geometryMember");var d=this.writeNode("feature:_geometry",b);a.appendChild(d.firstChild);return a}},feature:{_typeName:function(b){var d=this.createElementNSPlus("feature:"+this.featureType,{attributes:{fid:b.fid}});if(b.geometry){this.writeNode("feature:_geometry",b.geometry,d)}for(var a in b.attributes){var f=b.attributes[a];if(f!=null){this.writeNode("feature:_attribute",{name:a,value:f},d)}}return d},_geometry:function(d){if(this.externalProjection&&this.internalProjection){d=d.clone().transform(this.internalProjection,this.externalProjection)}var b=this.createElementNSPlus("feature:"+this.geometryName);var a=this.geometryTypes[d.CLASS_NAME];var f=this.writeNode("gml:"+a,d,b);if(this.srsName){f.setAttribute("srsName",this.srsName)}return b},_attribute:function(a){return this.createElementNSPlus("feature:"+a.name,{value:a.value})}},wfs:{FeatureCollection:function(d){var f=this.createElementNSPlus("wfs:FeatureCollection");for(var b=0,a=d.length;b<a;++b){this.writeNode("gml:featureMember",d[b],f)}return f}}},setGeometryTypes:function(){this.geometryTypes={"OpenLayers.Geometry.Point":"Point","OpenLayers.Geometry.MultiPoint":"MultiPoint","OpenLayers.Geometry.LineString":"LineString","OpenLayers.Geometry.MultiLineString":"MultiLineString","OpenLayers.Geometry.Polygon":"Polygon","OpenLayers.Geometry.MultiPolygon":"MultiPolygon","OpenLayers.Geometry.Collection":"GeometryCollection"}},CLASS_NAME:"OpenLayers.Format.GML.Base"});OpenLayers.Format.WFS=OpenLayers.Class(OpenLayers.Format.GML,{layer:null,wfsns:"http://www.opengis.net/wfs",ogcns:"http://www.opengis.net/ogc",initialize:function(a,b){OpenLayers.Format.GML.prototype.initialize.apply(this,[a]);this.layer=b;if(this.layer.featureNS){this.featureNS=this.layer.featureNS}if(this.layer.options.geometry_column){this.geometryName=this.layer.options.geometry_column}if(this.layer.options.typename){this.featureName=this.layer.options.typename}},write:function(b){var d=this.createElementNS(this.wfsns,"wfs:Transaction");d.setAttribute("version","1.0.0");d.setAttribute("service","WFS");for(var a=0;a<b.length;a++){switch(b[a].state){case OpenLayers.State.INSERT:d.appendChild(this.insert(b[a]));break;case OpenLayers.State.UPDATE:d.appendChild(this.update(b[a]));break;case OpenLayers.State.DELETE:d.appendChild(this.remove(b[a]));break}}return OpenLayers.Format.XML.prototype.write.apply(this,[d])},createFeatureXML:function(h){var d=this.buildGeometryNode(h.geometry);var j=this.createElementNS(this.featureNS,"feature:"+this.geometryName);j.appendChild(d);var b=this.createElementNS(this.featureNS,"feature:"+this.featureName);b.appendChild(j);for(var a in h.attributes){var l=this.createTextNode(h.attributes[a]);var f=a;if(a.search(":")!=-1){f=a.split(":")[1]}var g=this.createElementNS(this.featureNS,"feature:"+f);g.appendChild(l);b.appendChild(g)}return b},insert:function(b){var a=this.createElementNS(this.wfsns,"wfs:Insert");a.appendChild(this.createFeatureXML(b));return a},update:function(o){if(!o.fid){OpenLayers.Console.userError(OpenLayers.i18n("noFID"))}var h=this.createElementNS(this.wfsns,"wfs:Update");h.setAttribute("typeName",this.featurePrefix+":"+this.featureName);h.setAttribute("xmlns:"+this.featurePrefix,this.featureNS);var l=this.createElementNS(this.wfsns,"wfs:Property");var a=this.createElementNS(this.wfsns,"wfs:Name");var d=this.createTextNode(this.geometryName);a.appendChild(d);l.appendChild(a);var m=this.createElementNS(this.wfsns,"wfs:Value");var f=this.buildGeometryNode(o.geometry);if(o.layer){f.setAttribute("srsName",o.layer.projection.getCode())}m.appendChild(f);l.appendChild(m);h.appendChild(l);for(var g in o.attributes){l=this.createElementNS(this.wfsns,"wfs:Property");a=this.createElementNS(this.wfsns,"wfs:Name");a.appendChild(this.createTextNode(g));l.appendChild(a);m=this.createElementNS(this.wfsns,"wfs:Value");m.appendChild(this.createTextNode(o.attributes[g]));l.appendChild(m);h.appendChild(l)}var j=this.createElementNS(this.ogcns,"ogc:Filter");var b=this.createElementNS(this.ogcns,"ogc:FeatureId");b.setAttribute("fid",o.fid);j.appendChild(b);h.appendChild(j);return h},remove:function(b){if(!b.fid){OpenLayers.Console.userError(OpenLayers.i18n("noFID"));return false}var a=this.createElementNS(this.wfsns,"wfs:Delete");a.setAttribute("typeName",this.featurePrefix+":"+this.featureName);a.setAttribute("xmlns:"+this.featurePrefix,this.featureNS);var d=this.createElementNS(this.ogcns,"ogc:Filter");var f=this.createElementNS(this.ogcns,"ogc:FeatureId");f.setAttribute("fid",b.fid);d.appendChild(f);a.appendChild(d);return a},destroy:function(){this.layer=null},CLASS_NAME:"OpenLayers.Format.WFS"});OpenLayers.Layer.ArcIMS=OpenLayers.Class(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{ClientVersion:"9.2",ServiceName:""},tileSize:null,featureCoordSys:"4326",filterCoordSys:"4326",layers:null,async:true,name:"ArcIMS",isBaseLayer:true,DEFAULT_OPTIONS:{tileSize:new OpenLayers.Size(512,512),featureCoordSys:"4326",filterCoordSys:"4326",layers:null,isBaseLayer:true,async:true,name:"ArcIMS"},initialize:function(d,b,a){this.tileSize=new OpenLayers.Size(512,512);this.params=OpenLayers.Util.applyDefaults({ServiceName:a.serviceName},this.DEFAULT_PARAMS);this.options=OpenLayers.Util.applyDefaults(a,this.DEFAULT_OPTIONS);OpenLayers.Layer.Grid.prototype.initialize.apply(this,[d,b,this.params,a]);if(this.transparent){if(!this.isBaseLayer){this.isBaseLayer=false}if(this.format=="image/jpeg"){this.format=OpenLayers.Util.alphaHack()?"image/gif":"image/png"}}if(this.options.layers===null){this.options.layers=[]}},destroy:function(){OpenLayers.Layer.Grid.prototype.destroy.apply(this,arguments)},getURL:function(f){var a="";f=this.adjustBounds(f);var d=new OpenLayers.Format.ArcXML(OpenLayers.Util.extend(this.options,{requesttype:"image",envelope:f.toArray(),tileSize:this.tileSize}));var b=new OpenLayers.Request.POST({url:this.getFullRequestString(),data:d.write(),async:false});if(b!=null){var h=b.responseXML;if(!h||!h.documentElement){h=b.responseText}var g=new OpenLayers.Format.ArcXML();var j=g.read(h);a=this.getUrlOrImage(j.image.output)}return a},getURLasync:function(d,a,g,f){d=this.adjustBounds(d);var b=new OpenLayers.Format.ArcXML(OpenLayers.Util.extend(this.options,{requesttype:"image",envelope:d.toArray(),tileSize:this.tileSize}));OpenLayers.Request.POST({url:this.getFullRequestString(),async:true,data:b.write(),callback:function(h){var l=h.responseXML;if(!l||!l.documentElement){l=h.responseText}var j=new OpenLayers.Format.ArcXML();var m=j.read(l);a[g]=this.getUrlOrImage(m.image.output);f.apply(a)},scope:this})},getUrlOrImage:function(a){var b="";if(a.url){b=a.url}else{if(a.data){b="data:image/"+a.type+";base64,"+a.data}}return b},setLayerQuery:function(d,a){for(var b=0;b<this.options.layers.length;b++){if(d==this.options.layers[b].id){this.options.layers[b].query=a;return}}this.options.layers.push({id:d,visible:true,query:a})},getFeatureInfo:function(l,h,p){var b=p.buffer||1;var m=p.callback||function(){};var o=p.scope||window;var a={};OpenLayers.Util.extend(a,this.options);a.requesttype="feature";if(l instanceof OpenLayers.LonLat){a.polygon=null;a.envelope=[l.lon-b,l.lat-b,l.lon+b,l.lat+b]}else{if(l instanceof OpenLayers.Geometry.Polygon){a.envelope=null;a.polygon=l}}var g=new OpenLayers.Format.ArcXML(a);OpenLayers.Util.extend(g.request.get_feature,p);g.request.get_feature.layer=h.id;if(typeof h.query.accuracy=="number"){g.request.get_feature.query.accuracy=h.query.accuracy}else{var j=this.map.getCenter();var f=this.map.getViewPortPxFromLonLat(j);f.x++;var d=this.map.getLonLatFromPixel(f);g.request.get_feature.query.accuracy=d.lon-j.lon}g.request.get_feature.query.where=h.query.where;g.request.get_feature.query.spatialfilter.relation="area_intersection";OpenLayers.Request.POST({url:this.getFullRequestString({CustomService:"Query"}),data:g.write(),callback:function(r){var q=g.parseResponse(r.responseText);if(!g.iserror()){m.call(o,q.features)}else{m.call(o,null)}}})},addTile:function(b,a){return new OpenLayers.Tile.Image(this,a,b,null,this.tileSize)},CLASS_NAME:"OpenLayers.Layer.ArcIMS"});OpenLayers.Format.GML.v2=OpenLayers.Class(OpenLayers.Format.GML.Base,{schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/2.1.2/feature.xsd",initialize:function(a){OpenLayers.Format.GML.Base.prototype.initialize.apply(this,[a])},readers:{gml:OpenLayers.Util.applyDefaults({outerBoundaryIs:function(b,a){var d={};this.readChildNodes(b,d);a.outer=d.components[0]},innerBoundaryIs:function(b,a){var d={};this.readChildNodes(b,d);a.inner.push(d.components[0])},Box:function(f,b){var g={};this.readChildNodes(f,g);if(!b.components){b.components=[]}var d=g.points[0];var a=g.points[1];b.components.push(new OpenLayers.Bounds(d.x,d.y,a.x,a.y))}},OpenLayers.Format.GML.Base.prototype.readers.gml),feature:OpenLayers.Format.GML.Base.prototype.readers.feature,wfs:OpenLayers.Format.GML.Base.prototype.readers.wfs},write:function(d){var b;if(d instanceof Array){b="wfs:FeatureCollection"}else{b="gml:featureMember"}var a=this.writeNode(b,d);this.setAttributeNS(a,this.namespaces.xsi,"xsi:schemaLocation",this.schemaLocation);return OpenLayers.Format.XML.prototype.write.apply(this,[a])},writers:{gml:OpenLayers.Util.applyDefaults({Point:function(b){var a=this.createElementNSPlus("gml:Point");this.writeNode("coordinates",[b],a);return a},coordinates:function(f){var d=f.length;var g=new Array(d);var a;for(var b=0;b<d;++b){a=f[b];if(this.xy){g[b]=a.x+","+a.y}else{g[b]=a.y+","+a.x}if(a.z!=undefined){g[b]+=","+a.z}}return this.createElementNSPlus("gml:coordinates",{attributes:{decimal:".",cs:",",ts:" "},value:(d==1)?g[0]:g.join(" ")})},LineString:function(b){var a=this.createElementNSPlus("gml:LineString");this.writeNode("coordinates",b.components,a);return a},Polygon:function(d){var b=this.createElementNSPlus("gml:Polygon");this.writeNode("outerBoundaryIs",d.components[0],b);for(var a=1;a<d.components.length;++a){this.writeNode("innerBoundaryIs",d.components[a],b)}return b},outerBoundaryIs:function(a){var b=this.createElementNSPlus("gml:outerBoundaryIs");this.writeNode("LinearRing",a,b);return b},innerBoundaryIs:function(a){var b=this.createElementNSPlus("gml:innerBoundaryIs");this.writeNode("LinearRing",a,b);return b},LinearRing:function(a){var b=this.createElementNSPlus("gml:LinearRing");this.writeNode("coordinates",a.components,b);return b},Box:function(b){var a=this.createElementNSPlus("gml:Box");this.writeNode("coordinates",[{x:b.left,y:b.bottom},{x:b.right,y:b.top}],a);if(this.srsName){a.setAttribute("srsName",this.srsName)}return a}},OpenLayers.Format.GML.Base.prototype.writers.gml),feature:OpenLayers.Format.GML.Base.prototype.writers.feature,wfs:OpenLayers.Format.GML.Base.prototype.writers.wfs},CLASS_NAME:"OpenLayers.Format.GML.v2"});OpenLayers.Format.GML.v3=OpenLayers.Class(OpenLayers.Format.GML.Base,{schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd",curve:false,multiCurve:true,surface:false,multiSurface:true,initialize:function(a){OpenLayers.Format.GML.Base.prototype.initialize.apply(this,[a])},readers:{gml:OpenLayers.Util.applyDefaults({featureMembers:function(a,b){this.readChildNodes(a,b)},Curve:function(b,a){var d={points:[]};this.readChildNodes(b,d);if(!a.components){a.components=[]}a.components.push(new OpenLayers.Geometry.LineString(d.points))},segments:function(a,b){this.readChildNodes(a,b)},LineStringSegment:function(b,a){var d={};this.readChildNodes(b,d);if(d.points){Array.prototype.push.apply(a.points,d.points)}},pos:function(b,f){var g=this.getChildValue(b).replace(this.regExes.trimSpace,"");var d=g.split(this.regExes.splitSpace);var a;if(this.xy){a=new OpenLayers.Geometry.Point(d[0],d[1],d[2])}else{a=new OpenLayers.Geometry.Point(d[1],d[0],d[2])}f.points=[a]},posList:function(a,f){var m=this.getChildValue(a).replace(this.regExes.trimSpace,"");var q=m.split(this.regExes.splitSpace);var g=parseInt(a.getAttribute("dimension"))||2;var b,r,p,l;var o=q.length/g;var u=new Array(o);for(var d=0,h=q.length;d<h;d+=g){r=q[d];p=q[d+1];l=(g==2)?undefined:q[d+2];if(this.xy){u[d/g]=new OpenLayers.Geometry.Point(r,p,l)}else{u[d/g]=new OpenLayers.Geometry.Point(p,r,l)}}f.points=u},Surface:function(a,b){this.readChildNodes(a,b)},patches:function(a,b){this.readChildNodes(a,b)},PolygonPatch:function(a,b){this.readers.gml.Polygon.apply(this,[a,b])},exterior:function(b,a){var d={};this.readChildNodes(b,d);a.outer=d.components[0]},interior:function(b,a){var d={};this.readChildNodes(b,d);a.inner.push(d.components[0])},MultiCurve:function(b,a){var d={components:[]};this.readChildNodes(b,d);if(d.components.length>0){a.components=[new OpenLayers.Geometry.MultiLineString(d.components)]}},curveMember:function(a,b){this.readChildNodes(a,b)},MultiSurface:function(b,a){var d={components:[]};this.readChildNodes(b,d);if(d.components.length>0){a.components=[new OpenLayers.Geometry.MultiPolygon(d.components)]}},surfaceMember:function(a,b){this.readChildNodes(a,b)},surfaceMembers:function(a,b){this.readChildNodes(a,b)},pointMembers:function(a,b){this.readChildNodes(a,b)},lineStringMembers:function(a,b){this.readChildNodes(a,b)},polygonMembers:function(a,b){this.readChildNodes(a,b)},geometryMembers:function(a,b){this.readChildNodes(a,b)},Envelope:function(f,b){var g={points:new Array(2)};this.readChildNodes(f,g);if(!b.components){b.components=[]}var d=g.points[0];var a=g.points[1];b.components.push(new OpenLayers.Bounds(d.x,d.y,a.x,a.y))},lowerCorner:function(b,a){var d={};this.readers.gml.pos.apply(this,[b,d]);a.points[0]=d.points[0]},upperCorner:function(b,a){var d={};this.readers.gml.pos.apply(this,[b,d]);a.points[1]=d.points[0]}},OpenLayers.Format.GML.Base.prototype.readers.gml),feature:OpenLayers.Format.GML.Base.prototype.readers.feature,wfs:OpenLayers.Format.GML.Base.prototype.readers.wfs},write:function(d){var b;if(d instanceof Array){b="featureMembers"}else{b="featureMember"}var a=this.writeNode("gml:"+b,d);this.setAttributeNS(a,this.namespaces.xsi,"xsi:schemaLocation",this.schemaLocation);return OpenLayers.Format.XML.prototype.write.apply(this,[a])},writers:{gml:OpenLayers.Util.applyDefaults({featureMembers:function(d){var f=this.createElementNSPlus("gml:featureMembers");for(var b=0,a=d.length;b<a;++b){this.writeNode("feature:_typeName",d[b],f)}return f},Point:function(b){var a=this.createElementNSPlus("gml:Point");this.writeNode("pos",b,a);return a},pos:function(a){var b=(this.xy)?(a.x+" "+a.y):(a.y+" "+a.x);return this.createElementNSPlus("gml:pos",{value:b})},LineString:function(b){var a=this.createElementNSPlus("gml:LineString");this.writeNode("posList",b.components,a);return a},Curve:function(b){var a=this.createElementNSPlus("gml:Curve");this.writeNode("segments",b,a);return a},segments:function(b){var a=this.createElementNSPlus("gml:segments");this.writeNode("LineStringSegment",b,a);return a},LineStringSegment:function(b){var a=this.createElementNSPlus("gml:LineStringSegment");this.writeNode("posList",b.components,a);return a},posList:function(f){var b=f.length;var g=new Array(b);var a;for(var d=0;d<b;++d){a=f[d];if(this.xy){g[d]=a.x+" "+a.y}else{g[d]=a.y+" "+a.x}}return this.createElementNSPlus("gml:posList",{value:g.join(" ")})},Surface:function(b){var a=this.createElementNSPlus("gml:Surface");this.writeNode("patches",b,a);return a},patches:function(b){var a=this.createElementNSPlus("gml:patches");this.writeNode("PolygonPatch",b,a);return a},PolygonPatch:function(f){var d=this.createElementNSPlus("gml:PolygonPatch",{attributes:{interpolation:"planar"}});this.writeNode("exterior",f.components[0],d);for(var b=1,a=f.components.length;b<a;++b){this.writeNode("interior",f.components[b],d)}return d},Polygon:function(f){var d=this.createElementNSPlus("gml:Polygon");this.writeNode("exterior",f.components[0],d);for(var b=1,a=f.components.length;b<a;++b){this.writeNode("interior",f.components[b],d)}return d},exterior:function(a){var b=this.createElementNSPlus("gml:exterior");this.writeNode("LinearRing",a,b);return b},interior:function(a){var b=this.createElementNSPlus("gml:interior");this.writeNode("LinearRing",a,b);return b},LinearRing:function(a){var b=this.createElementNSPlus("gml:LinearRing");this.writeNode("posList",a.components,b);return b},MultiCurve:function(f){var d=this.createElementNSPlus("gml:MultiCurve");for(var b=0,a=f.components.length;b<a;++b){this.writeNode("curveMember",f.components[b],d)}return d},curveMember:function(b){var a=this.createElementNSPlus("gml:curveMember");if(this.curve){this.writeNode("Curve",b,a)}else{this.writeNode("LineString",b,a)}return a},MultiSurface:function(f){var d=this.createElementNSPlus("gml:MultiSurface");for(var b=0,a=f.components.length;b<a;++b){this.writeNode("surfaceMember",f.components[b],d)}return d},surfaceMember:function(a){var b=this.createElementNSPlus("gml:surfaceMember");if(this.surface){this.writeNode("Surface",a,b)}else{this.writeNode("Polygon",a,b)}return b},Envelope:function(b){var a=this.createElementNSPlus("gml:Envelope");this.writeNode("lowerCorner",b,a);this.writeNode("upperCorner",b,a);if(this.srsName){a.setAttribute("srsName",this.srsName)}return a},lowerCorner:function(a){var b=(this.xy)?(a.left+" "+a.bottom):(a.bottom+" "+a.left);return this.createElementNSPlus("gml:lowerCorner",{value:b})},upperCorner:function(a){var b=(this.xy)?(a.right+" "+a.top):(a.top+" "+a.right);return this.createElementNSPlus("gml:upperCorner",{value:b})}},OpenLayers.Format.GML.Base.prototype.writers.gml),feature:OpenLayers.Format.GML.Base.prototype.writers.feature,wfs:OpenLayers.Format.GML.Base.prototype.writers.wfs},setGeometryTypes:function(){this.geometryTypes={"OpenLayers.Geometry.Point":"Point","OpenLayers.Geometry.MultiPoint":"MultiPoint","OpenLayers.Geometry.LineString":(this.curve===true)?"Curve":"LineString","OpenLayers.Geometry.MultiLineString":(this.multiCurve===false)?"MultiLineString":"MultiCurve","OpenLayers.Geometry.Polygon":(this.surface===true)?"Surface":"Polygon","OpenLayers.Geometry.MultiPolygon":(this.multiSurface===false)?"MultiPolygon":"MultiSurface","OpenLayers.Geometry.Collection":"GeometryCollection"}},CLASS_NAME:"OpenLayers.Format.GML.v3"});OpenLayers.Format.Filter.v1_0_0=OpenLayers.Class(OpenLayers.Format.GML.v2,OpenLayers.Format.Filter.v1,{VERSION:"1.0.0",schemaLocation:"http://www.opengis.net/ogc/filter/1.0.0/filter.xsd",initialize:function(a){OpenLayers.Format.GML.v2.prototype.initialize.apply(this,[a])},readers:{ogc:OpenLayers.Util.applyDefaults({PropertyIsEqualTo:function(b,d){var a=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.EQUAL_TO});this.readChildNodes(b,a);d.filters.push(a)},PropertyIsNotEqualTo:function(b,d){var a=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.NOT_EQUAL_TO});this.readChildNodes(b,a);d.filters.push(a)}},OpenLayers.Format.Filter.v1.prototype.readers.ogc),gml:OpenLayers.Format.GML.v2.prototype.readers.gml,feature:OpenLayers.Format.GML.v2.prototype.readers.feature},writers:{ogc:OpenLayers.Util.applyDefaults({PropertyIsEqualTo:function(a){var b=this.createElementNSPlus("ogc:PropertyIsEqualTo");this.writeNode("PropertyName",a,b);this.writeNode("Literal",a.value,b);return b},PropertyIsNotEqualTo:function(a){var b=this.createElementNSPlus("ogc:PropertyIsNotEqualTo");this.writeNode("PropertyName",a,b);this.writeNode("Literal",a.value,b);return b},BBOX:function(a){var d=this.createElementNSPlus("ogc:BBOX");this.writeNode("PropertyName",a,d);var b=this.writeNode("gml:Box",a.value,d);if(a.projection){b.setAttribute("srsName",a.projection)}return d}},OpenLayers.Format.Filter.v1.prototype.writers.ogc),gml:OpenLayers.Format.GML.v2.prototype.writers.gml,feature:OpenLayers.Format.GML.v2.prototype.writers.feature},writeSpatial:function(b,a){var d=this.createElementNSPlus("ogc:"+a);this.writeNode("PropertyName",b,d);var f;if(b.value instanceof OpenLayers.Geometry){f=this.writeNode("feature:_geometry",b.value).firstChild}else{f=this.writeNode("gml:Box",b.value)}if(b.projection){f.setAttribute("srsName",b.projection)}d.appendChild(f);return d},CLASS_NAME:"OpenLayers.Format.Filter.v1_0_0"});OpenLayers.Format.Filter.v1_1_0=OpenLayers.Class(OpenLayers.Format.GML.v3,OpenLayers.Format.Filter.v1,{VERSION:"1.1.0",schemaLocation:"http://www.opengis.net/ogc/filter/1.1.0/filter.xsd",initialize:function(a){OpenLayers.Format.GML.v3.prototype.initialize.apply(this,[a])},readers:{ogc:OpenLayers.Util.applyDefaults({PropertyIsEqualTo:function(b,f){var d=b.getAttribute("matchCase");var a=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.EQUAL_TO,matchCase:!(d==="false"||d==="0")});this.readChildNodes(b,a);f.filters.push(a)},PropertyIsNotEqualTo:function(b,f){var d=b.getAttribute("matchCase");var a=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.NOT_EQUAL_TO,matchCase:!(d==="false"||d==="0")});this.readChildNodes(b,a);f.filters.push(a)}},OpenLayers.Format.Filter.v1.prototype.readers.ogc),gml:OpenLayers.Format.GML.v3.prototype.readers.gml,feature:OpenLayers.Format.GML.v3.prototype.readers.feature},writers:{ogc:OpenLayers.Util.applyDefaults({PropertyIsEqualTo:function(a){var b=this.createElementNSPlus("ogc:PropertyIsEqualTo",{attributes:{matchCase:a.matchCase}});this.writeNode("PropertyName",a,b);this.writeNode("Literal",a.value,b);return b},PropertyIsNotEqualTo:function(a){var b=this.createElementNSPlus("ogc:PropertyIsNotEqualTo",{attributes:{matchCase:a.matchCase}});this.writeNode("PropertyName",a,b);this.writeNode("Literal",a.value,b);return b},BBOX:function(a){var d=this.createElementNSPlus("ogc:BBOX");this.writeNode("PropertyName",a,d);var b=this.writeNode("gml:Envelope",a.value);if(a.projection){b.setAttribute("srsName",a.projection)}d.appendChild(b);return d}},OpenLayers.Format.Filter.v1.prototype.writers.ogc),gml:OpenLayers.Format.GML.v3.prototype.writers.gml,feature:OpenLayers.Format.GML.v3.prototype.writers.feature},writeSpatial:function(b,a){var d=this.createElementNSPlus("ogc:"+a);this.writeNode("PropertyName",b,d);var f;if(b.value instanceof OpenLayers.Geometry){f=this.writeNode("feature:_geometry",b.value).firstChild}else{f=this.writeNode("gml:Envelope",b.value)}if(b.projection){f.setAttribute("srsName",b.projection)}d.appendChild(f);return d},CLASS_NAME:"OpenLayers.Format.Filter.v1_1_0"});OpenLayers.Format.SLD.v1=OpenLayers.Class(OpenLayers.Format.Filter.v1_0_0,{namespaces:{sld:"http://www.opengis.net/sld",ogc:"http://www.opengis.net/ogc",gml:"http://www.opengis.net/gml",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},defaultPrefix:"sld",schemaLocation:null,defaultSymbolizer:{fillColor:"#808080",fillOpacity:1,strokeColor:"#000000",strokeOpacity:1,strokeWidth:1,strokeDashstyle:"solid",pointRadius:3,graphicName:"square"},initialize:function(a){OpenLayers.Format.Filter.v1_0_0.prototype.initialize.apply(this,[a])},read:function(d,a){a=OpenLayers.Util.applyDefaults(a,this.options);var b={namedLayers:a.namedLayersAsArray===true?[]:{}};this.readChildNodes(d,b);return b},readers:OpenLayers.Util.applyDefaults({sld:{StyledLayerDescriptor:function(a,b){b.version=a.getAttribute("version");this.readChildNodes(a,b)},Name:function(a,b){b.name=this.getChildValue(a)},Title:function(a,b){b.title=this.getChildValue(a)},Abstract:function(a,b){b.description=this.getChildValue(a)},NamedLayer:function(f,g){var d={userStyles:[],namedStyles:[]};this.readChildNodes(f,d);for(var b=0,a=d.userStyles.length;b<a;++b){d.userStyles[b].layerName=d.name}if(g.namedLayers instanceof Array){g.namedLayers.push(d)}else{g.namedLayers[d.name]=d}},NamedStyle:function(b,a){a.namedStyles.push(this.getChildName(b.firstChild))},UserStyle:function(d,a){var f={defaultsPerSymbolizer:true,rules:[]};this.readChildNodes(d,f);var b=new OpenLayers.Style(this.defaultSymbolizer,f);a.userStyles.push(b)},IsDefault:function(b,a){if(this.getChildValue(b)=="1"){a.isDefault=true}},FeatureTypeStyle:function(b,a){var d={rules:[]};this.readChildNodes(b,d);a.rules=d.rules},Rule:function(a,d){var b=new OpenLayers.Rule();this.readChildNodes(a,b);d.rules.push(b)},ElseFilter:function(a,b){b.elseFilter=true},MinScaleDenominator:function(a,b){b.minScaleDenominator=parseFloat(this.getChildValue(a))},MaxScaleDenominator:function(a,b){b.maxScaleDenominator=parseFloat(this.getChildValue(a))},TextSymbolizer:function(b,d){var a=d.symbolizer.Text||{};this.readChildNodes(b,a);d.symbolizer.Text=a},Label:function(b,a){var f={};this.readChildNodes(b,f);if(f.property){a.label="${"+f.property+"}"}else{var d=this.readOgcExpression(b);if(d){a.label=d}}},Font:function(b,a){this.readChildNodes(b,a)},Halo:function(b,a){var d={};this.readChildNodes(b,d);a.haloRadius=d.haloRadius;a.haloColor=d.fillColor;a.haloOpacity=d.fillOpacity},Radius:function(d,b){var a=this.readOgcExpression(d);if(a!=null){b.haloRadius=a}},LineSymbolizer:function(b,d){var a=d.symbolizer.Line||{};this.readChildNodes(b,a);d.symbolizer.Line=a},PolygonSymbolizer:function(b,d){var a=d.symbolizer.Polygon||{};this.readChildNodes(b,a);d.symbolizer.Polygon=a},PointSymbolizer:function(b,d){var a=d.symbolizer.Point||{};this.readChildNodes(b,a);d.symbolizer.Point=a},Stroke:function(b,a){a.stroke=true;this.readChildNodes(b,a)},Fill:function(b,a){a.fill=true;this.readChildNodes(b,a)},CssParameter:function(d,b){var a=d.getAttribute("name");var g=this.cssMap[a];if(g){var f=this.readOgcExpression(d);if(f){b[g]=f}}},Graphic:function(g,f){f.graphic=true;var l={};this.readChildNodes(g,l);var d=["strokeColor","strokeWidth","strokeOpacity","strokeLinecap","fillColor","fillOpacity","graphicName","rotation","graphicFormat"];var j,h;for(var b=0,a=d.length;b<a;++b){j=d[b];h=l[j];if(h!=undefined){f[j]=h}}if(l.opacity!=undefined){f.graphicOpacity=l.opacity}if(l.size!=undefined){f.pointRadius=l.size/2}if(l.href!=undefined){f.externalGraphic=l.href}if(l.rotation!=undefined){f.rotation=l.rotation}},ExternalGraphic:function(a,b){this.readChildNodes(a,b)},Mark:function(a,b){this.readChildNodes(a,b)},WellKnownName:function(a,b){b.graphicName=this.getChildValue(a)},Opacity:function(b,d){var a=this.readOgcExpression(b);if(a){d.opacity=a}},Size:function(b,d){var a=this.readOgcExpression(b);if(a){d.size=a}},Rotation:function(b,d){var a=this.readOgcExpression(b);if(a){d.rotation=a}},OnlineResource:function(a,b){b.href=this.getAttributeNS(a,this.namespaces.xlink,"href")},Format:function(a,b){b.graphicFormat=this.getChildValue(a)}}},OpenLayers.Format.Filter.v1_0_0.prototype.readers),cssMap:{stroke:"strokeColor","stroke-opacity":"strokeOpacity","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-dasharray":"strokeDashstyle",fill:"fillColor","fill-opacity":"fillOpacity","font-family":"fontFamily","font-size":"fontSize","font-weight":"fontWeight","font-style":"fontStyle"},getCssProperty:function(a){var b=null;for(var d in this.cssMap){if(this.cssMap[d]==a){b=d;break}}return b},getGraphicFormat:function(a){var f,d;for(var b in this.graphicFormats){if(this.graphicFormats[b].test(a)){f=b;break}}return f||this.defautlGraphicFormat},defaultGraphicFormat:"image/png",graphicFormats:{"image/jpeg":/\.jpe?g$/i,"image/gif":/\.gif$/i,"image/png":/\.png$/i},write:function(a){return this.writers.sld.StyledLayerDescriptor.apply(this,[a])},writers:OpenLayers.Util.applyDefaults({sld:{StyledLayerDescriptor:function(g){var b=this.createElementNSPlus("StyledLayerDescriptor",{attributes:{version:this.VERSION,"xsi:schemaLocation":this.schemaLocation}});if(g.name){this.writeNode("Name",g.name,b)}if(g.title){this.writeNode("Title",g.title,b)}if(g.description){this.writeNode("Abstract",g.description,b)}if(g.namedLayers instanceof Array){for(var f=0,a=g.namedLayers.length;f<a;++f){this.writeNode("NamedLayer",g.namedLayers[f],b)}}else{for(var d in g.namedLayers){this.writeNode("NamedLayer",g.namedLayers[d],b)}}return b},Name:function(a){return this.createElementNSPlus("Name",{value:a})},Title:function(a){return this.createElementNSPlus("Title",{value:a})},Abstract:function(a){return this.createElementNSPlus("Abstract",{value:a})},NamedLayer:function(d){var f=this.createElementNSPlus("NamedLayer");this.writeNode("Name",d.name,f);if(d.namedStyles){for(var b=0,a=d.namedStyles.length;b<a;++b){this.writeNode("NamedStyle",d.namedStyles[b],f)}}if(d.userStyles){for(var b=0,a=d.userStyles.length;b<a;++b){this.writeNode("UserStyle",d.userStyles[b],f)}}return f},NamedStyle:function(a){var b=this.createElementNSPlus("NamedStyle");this.writeNode("Name",a,b);return b},UserStyle:function(a){var b=this.createElementNSPlus("UserStyle");if(a.name){this.writeNode("Name",a.name,b)}if(a.title){this.writeNode("Title",a.title,b)}if(a.description){this.writeNode("Abstract",a.description,b)}if(a.isDefault){this.writeNode("IsDefault",a.isDefault,b)}this.writeNode("FeatureTypeStyle",a,b);return b},IsDefault:function(a){return this.createElementNSPlus("IsDefault",{value:(a)?"1":"0"})},FeatureTypeStyle:function(d){var f=this.createElementNSPlus("FeatureTypeStyle");for(var b=0,a=d.rules.length;b<a;++b){this.writeNode("Rule",d.rules[b],f)}return f},Rule:function(j){var h=this.createElementNSPlus("Rule");if(j.name){this.writeNode("Name",j.name,h)}if(j.title){this.writeNode("Title",j.title,h)}if(j.description){this.writeNode("Abstract",j.description,h)}if(j.elseFilter){this.writeNode("ElseFilter",null,h)}else{if(j.filter){this.writeNode("ogc:Filter",j.filter,h)}}if(j.minScaleDenominator!=undefined){this.writeNode("MinScaleDenominator",j.minScaleDenominator,h)}if(j.maxScaleDenominator!=undefined){this.writeNode("MaxScaleDenominator",j.maxScaleDenominator,h)}var d=OpenLayers.Style.SYMBOLIZER_PREFIXES;var g,f;for(var b=0,a=d.length;b<a;++b){g=d[b];f=j.symbolizer[g];if(f){this.writeNode(g+"Symbolizer",f,h)}}return h},ElseFilter:function(){return this.createElementNSPlus("ElseFilter")},MinScaleDenominator:function(a){return this.createElementNSPlus("MinScaleDenominator",{value:a})},MaxScaleDenominator:function(a){return this.createElementNSPlus("MaxScaleDenominator",{value:a})},LineSymbolizer:function(a){var b=this.createElementNSPlus("LineSymbolizer");this.writeNode("Stroke",a,b);return b},Stroke:function(a){var b=this.createElementNSPlus("Stroke");if(a.strokeColor!=undefined){this.writeNode("CssParameter",{symbolizer:a,key:"strokeColor"},b)}if(a.strokeOpacity!=undefined){this.writeNode("CssParameter",{symbolizer:a,key:"strokeOpacity"},b)}if(a.strokeWidth!=undefined){this.writeNode("CssParameter",{symbolizer:a,key:"strokeWidth"},b)}return b},CssParameter:function(a){return this.createElementNSPlus("CssParameter",{attributes:{name:this.getCssProperty(a.key)},value:a.symbolizer[a.key]})},TextSymbolizer:function(a){var b=this.createElementNSPlus("TextSymbolizer");if(a.label!=null){this.writeNode("Label",a.label,b)}if(a.fontFamily!=null||a.fontSize!=null||a.fontWeight!=null||a.fontStyle!=null){this.writeNode("Font",a,b)}if(a.haloRadius!=null||a.haloColor!=null||a.haloOpacity!=null){this.writeNode("Halo",a,b)}if(a.fillColor!=null||a.fillOpacity!=null){this.writeNode("Fill",a,b)}return b},Font:function(a){var b=this.createElementNSPlus("Font");if(a.fontFamily){this.writeNode("CssParameter",{symbolizer:a,key:"fontFamily"},b)}if(a.fontSize){this.writeNode("CssParameter",{symbolizer:a,key:"fontSize"},b)}if(a.fontWeight){this.writeNode("CssParameter",{symbolizer:a,key:"fontWeight"},b)}if(a.fontStyle){this.writeNode("CssParameter",{symbolizer:a,key:"fontStyle"},b)}return b},Label:function(b){var h=this.createElementNSPlus("Label");var j=b.split("${");h.appendChild(this.createTextNode(j[0]));var g,f;for(var d=1,a=j.length;d<a;d++){g=j[d];f=g.indexOf("}");if(f>0){this.writeNode("ogc:PropertyName",{property:g.substring(0,f)},h);h.appendChild(this.createTextNode(g.substring(++f)))}else{h.appendChild(this.createTextNode("${"+g))}}return h},Halo:function(a){var b=this.createElementNSPlus("Halo");if(a.haloRadius){this.writeNode("Radius",a.haloRadius,b)}if(a.haloColor||a.haloOpacity){this.writeNode("Fill",{fillColor:a.haloColor,fillOpacity:a.haloOpacity},b)}return b},Radius:function(a){return node=this.createElementNSPlus("Radius",{value:a})},PolygonSymbolizer:function(a){var b=this.createElementNSPlus("PolygonSymbolizer");if(a.fillColor!=undefined||a.fillOpacity!=undefined){this.writeNode("Fill",a,b)}if(a.strokeWidth!=undefined||a.strokeColor!=undefined||a.strokeOpacity!=undefined||a.strokeDashstyle!=undefined){this.writeNode("Stroke",a,b)}return b},Fill:function(a){var b=this.createElementNSPlus("Fill");if(a.fillColor){this.writeNode("CssParameter",{symbolizer:a,key:"fillColor"},b)}if(a.fillOpacity!=null){this.writeNode("CssParameter",{symbolizer:a,key:"fillOpacity"},b)}return b},PointSymbolizer:function(a){var b=this.createElementNSPlus("PointSymbolizer");this.writeNode("Graphic",a,b);return b},Graphic:function(a){var b=this.createElementNSPlus("Graphic");if(a.externalGraphic!=undefined){this.writeNode("ExternalGraphic",a,b)}else{this.writeNode("Mark",a,b)}if(a.graphicOpacity!=undefined){this.writeNode("Opacity",a.graphicOpacity,b)}if(a.pointRadius!=undefined){this.writeNode("Size",a.pointRadius*2,b)}if(a.rotation!=undefined){this.writeNode("Rotation",a.rotation,b)}return b},ExternalGraphic:function(a){var b=this.createElementNSPlus("ExternalGraphic");this.writeNode("OnlineResource",a.externalGraphic,b);var d=a.graphicFormat||this.getGraphicFormat(a.externalGraphic);this.writeNode("Format",d,b);return b},Mark:function(a){var b=this.createElementNSPlus("Mark");if(a.graphicName){this.writeNode("WellKnownName",a.graphicName,b)}this.writeNode("Fill",a,b);this.writeNode("Stroke",a,b);return b},WellKnownName:function(a){return this.createElementNSPlus("WellKnownName",{value:a})},Opacity:function(a){return this.createElementNSPlus("Opacity",{value:a})},Size:function(a){return this.createElementNSPlus("Size",{value:a})},Rotation:function(a){return this.createElementNSPlus("Rotation",{value:a})},OnlineResource:function(a){return this.createElementNSPlus("OnlineResource",{attributes:{"xlink:type":"simple","xlink:href":a}})},Format:function(a){return this.createElementNSPlus("Format",{value:a})}}},OpenLayers.Format.Filter.v1_0_0.prototype.writers),CLASS_NAME:"OpenLayers.Format.SLD.v1"});OpenLayers.Format.WFST.v1_0_0=OpenLayers.Class(OpenLayers.Format.Filter.v1_0_0,OpenLayers.Format.WFST.v1,{version:"1.0.0",schemaLocations:{wfs:"http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd"},initialize:function(a){OpenLayers.Format.Filter.v1_0_0.prototype.initialize.apply(this,[a]);OpenLayers.Format.WFST.v1.prototype.initialize.apply(this,[a])},readers:{wfs:OpenLayers.Util.applyDefaults({WFS_TransactionResponse:function(a,b){b.insertIds=[];b.success=false;this.readChildNodes(a,b)},InsertResult:function(b,a){var d={fids:[]};this.readChildNodes(b,d);a.insertIds.push(d.fids[0])},TransactionResult:function(a,b){this.readChildNodes(a,b)},Status:function(a,b){this.readChildNodes(a,b)},SUCCESS:function(a,b){b.success=true}},OpenLayers.Format.WFST.v1.prototype.readers.wfs),gml:OpenLayers.Format.GML.v2.prototype.readers.gml,feature:OpenLayers.Format.GML.v2.prototype.readers.feature,ogc:OpenLayers.Format.Filter.v1_0_0.prototype.readers.ogc},writers:{wfs:OpenLayers.Util.applyDefaults({Query:function(b){b=OpenLayers.Util.extend({featureNS:this.featureNS,featurePrefix:this.featurePrefix,featureType:this.featureType,srsName:this.srsName},b);var f=this.createElementNSPlus("wfs:Query",{attributes:{typeName:(b.featureNS?b.featurePrefix+":":"")+b.featureType}});if(b.featureNS){f.setAttribute("xmlns:"+b.featurePrefix,b.featureNS)}if(b.propertyNames){for(var d=0,a=b.propertyNames.length;d<a;d++){this.writeNode("ogc:PropertyName",{property:b.propertyNames[d]},f)}}if(b.filter){this.setFilterProperty(b.filter);this.writeNode("ogc:Filter",b.filter,f)}return f}},OpenLayers.Format.WFST.v1.prototype.writers.wfs),gml:OpenLayers.Format.GML.v2.prototype.writers.gml,feature:OpenLayers.Format.GML.v2.prototype.writers.feature,ogc:OpenLayers.Format.Filter.v1_0_0.prototype.writers.ogc},CLASS_NAME:"OpenLayers.Format.WFST.v1_0_0"});OpenLayers.Format.WFST.v1_1_0=OpenLayers.Class(OpenLayers.Format.Filter.v1_1_0,OpenLayers.Format.WFST.v1,{version:"1.1.0",schemaLocations:{wfs:"http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"},initialize:function(a){OpenLayers.Format.Filter.v1_1_0.prototype.initialize.apply(this,[a]);OpenLayers.Format.WFST.v1.prototype.initialize.apply(this,[a])},readers:{wfs:OpenLayers.Util.applyDefaults({TransactionResponse:function(a,b){b.insertIds=[];b.success=false;this.readChildNodes(a,b)},TransactionSummary:function(a,b){b.success=true},InsertResults:function(a,b){this.readChildNodes(a,b)},Feature:function(b,a){var d={fids:[]};this.readChildNodes(b,d);a.insertIds.push(d.fids[0])}},OpenLayers.Format.WFST.v1.prototype.readers.wfs),gml:OpenLayers.Format.GML.v3.prototype.readers.gml,feature:OpenLayers.Format.GML.v3.prototype.readers.feature,ogc:OpenLayers.Format.Filter.v1_1_0.prototype.readers.ogc},writers:{wfs:OpenLayers.Util.applyDefaults({Query:function(b){b=OpenLayers.Util.extend({featureNS:this.featureNS,featurePrefix:this.featurePrefix,featureType:this.featureType,srsName:this.srsName},b);var f=this.createElementNSPlus("wfs:Query",{attributes:{typeName:(b.featureNS?b.featurePrefix+":":"")+b.featureType,srsName:b.srsName}});if(b.featureNS){f.setAttribute("xmlns:"+b.featurePrefix,b.featureNS)}if(b.propertyNames){for(var d=0,a=b.propertyNames.length;d<a;d++){this.writeNode("wfs:PropertyName",{property:b.propertyNames[d]},f)}}if(b.filter){this.setFilterProperty(b.filter);this.writeNode("ogc:Filter",b.filter,f)}return f},PropertyName:function(a){return this.createElementNSPlus("wfs:PropertyName",{value:a.property})}},OpenLayers.Format.WFST.v1.prototype.writers.wfs),gml:OpenLayers.Format.GML.v3.prototype.writers.gml,feature:OpenLayers.Format.GML.v3.prototype.writers.feature,ogc:OpenLayers.Format.Filter.v1_1_0.prototype.writers.ogc},CLASS_NAME:"OpenLayers.Format.WFST.v1_1_0"});OpenLayers.Format.SLD.v1_0_0=OpenLayers.Class(OpenLayers.Format.SLD.v1,{VERSION:"1.0.0",schemaLocation:"http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd",initialize:function(a){OpenLayers.Format.SLD.v1.prototype.initialize.apply(this,[a])},CLASS_NAME:"OpenLayers.Format.SLD.v1_0_0"});OpenLayers.Protocol.WFS.v1_0_0=OpenLayers.Class(OpenLayers.Protocol.WFS.v1,{version:"1.0.0",CLASS_NAME:"OpenLayers.Protocol.WFS.v1_0_0"});OpenLayers.Protocol.WFS.v1_1_0=OpenLayers.Class(OpenLayers.Protocol.WFS.v1,{version:"1.1.0",CLASS_NAME:"OpenLayers.Protocol.WFS.v1_1_0"});Proj4js={defaultDatum:"WGS84",transform:function(f,b,a){if(!f.readyToUse){this.reportError("Proj4js initialization for:"+f.srsCode+" not yet complete");return a}if(!b.readyToUse){this.reportError("Proj4js initialization for:"+b.srsCode+" not yet complete");return a}if((f.srsProjNumber=="900913"&&b.datumCode!="WGS84")||(b.srsProjNumber=="900913"&&f.datumCode!="WGS84")){var d=Proj4js.WGS84;this.transform(f,d,a);f=d}if(f.axis!="enu"){this.adjust_axis(f,false,a)}if(f.projName=="longlat"){a.x*=Proj4js.common.D2R;a.y*=Proj4js.common.D2R}else{if(f.to_meter){a.x*=f.to_meter;a.y*=f.to_meter}f.inverse(a)}if(f.from_greenwich){a.x+=f.from_greenwich}a=this.datum_transform(f.datum,b.datum,a);if(b.from_greenwich){a.x-=b.from_greenwich}if(b.projName=="longlat"){a.x*=Proj4js.common.R2D;a.y*=Proj4js.common.R2D}else{b.forward(a);if(b.to_meter){a.x/=b.to_meter;a.y/=b.to_meter}}if(b.axis!="enu"){this.adjust_axis(b,true,a)}return a},datum_transform:function(d,b,a){if(d.compare_datums(b)){return a}if(d.datum_type==Proj4js.common.PJD_NODATUM||b.datum_type==Proj4js.common.PJD_NODATUM){return a}if(d.datum_type==Proj4js.common.PJD_GRIDSHIFT){alert("ERROR: Grid shift transformations are not implemented yet.")}if(b.datum_type==Proj4js.common.PJD_GRIDSHIFT){alert("ERROR: Grid shift transformations are not implemented yet.")}if(d.es!=b.es||d.a!=b.a||d.datum_type==Proj4js.common.PJD_3PARAM||d.datum_type==Proj4js.common.PJD_7PARAM||b.datum_type==Proj4js.common.PJD_3PARAM||b.datum_type==Proj4js.common.PJD_7PARAM){d.geodetic_to_geocentric(a);if(d.datum_type==Proj4js.common.PJD_3PARAM||d.datum_type==Proj4js.common.PJD_7PARAM){d.geocentric_to_wgs84(a)}if(b.datum_type==Proj4js.common.PJD_3PARAM||b.datum_type==Proj4js.common.PJD_7PARAM){b.geocentric_from_wgs84(a)}b.geocentric_to_geodetic(a)}if(b.datum_type==Proj4js.common.PJD_GRIDSHIFT){alert("ERROR: Grid shift transformations are not implemented yet.")}return a},adjust_axis:function(g,j,f){var d=f.x,m=f.y,a=f.z||0;var h,l;for(var b=0;b<3;b++){if(j&&b==2&&f.z===undefined){continue}if(b==0){h=d;l="x"}else{if(b==1){h=m;l="y"}else{h=a;l="z"}}switch(g.axis[b]){case"e":f[l]=h;break;case"w":f[l]=-h;break;case"n":f[l]=h;break;case"s":f[l]=-h;break;case"u":if(f[l]!==undefined){f.z=h}break;case"d":if(f[l]!==undefined){f.z=-h}break;default:alert("ERROR: unknow axis ("+g.axis[b]+") - check definition of "+src.projName);return null}}return f},reportError:function(a){},extend:function(a,f){a=a||{};if(f){for(var d in f){var b=f[d];if(b!==undefined){a[d]=b}}}return a},Class:function(){var b=function(){this.initialize.apply(this,arguments)};var a={};var f;for(var d=0;d<arguments.length;++d){if(typeof arguments[d]=="function"){f=arguments[d].prototype}else{f=arguments[d]}Proj4js.extend(a,f)}b.prototype=a;return b},bind:function(d,b){var a=Array.prototype.slice.apply(arguments,[2]);return function(){var f=a.concat(Array.prototype.slice.apply(arguments,[0]));return d.apply(b,f)}},scriptName:"proj4js.js",defsLookupService:"http://spatialreference.org/ref",libPath:null,getScriptLocation:function(){if(this.libPath){return this.libPath}var g=this.scriptName;var f=g.length;var a=document.getElementsByTagName("script");for(var d=0;d<a.length;d++){var h=a[d].getAttribute("src");if(h){var b=h.lastIndexOf(g);if((b>-1)&&(b+f==h.length)){this.libPath=h.slice(0,-f);break}}}return this.libPath||""},loadScript:function(f,g,d,a){var b=document.createElement("script");b.defer=false;b.type="text/javascript";b.id=f;b.src=f;b.onload=g;b.onerror=d;b.loadCheck=a;if(/MSIE/.test(navigator.userAgent)){b.onreadystatechange=this.checkReadyState}document.getElementsByTagName("head")[0].appendChild(b)},checkReadyState:function(){if(this.readyState=="loaded"){if(!this.loadCheck()){this.onerror()}else{this.onload()}}}};Proj4js.Proj=Proj4js.Class({readyToUse:false,title:null,projName:null,units:null,datum:null,x0:0,y0:0,localCS:false,initialize:function(d){this.srsCodeInput=d;if((d.indexOf("GEOGCS")>=0)||(d.indexOf("GEOCCS")>=0)||(d.indexOf("PROJCS")>=0)||(d.indexOf("LOCAL_CS")>=0)){this.parseWKT(d);this.deriveConstants();this.loadProjCode(this.projName);return}if(d.indexOf("urn:")==0){var a=d.split(":");if((a[1]=="ogc"||a[1]=="x-ogc")&&(a[2]=="def")&&(a[3]=="crs")){d=a[4]+":"+a[a.length-1]}}else{if(d.indexOf("http://")==0){var b=d.split("#");if(b[0].match(/epsg.org/)){d="EPSG:"+b[1]}else{if(b[0].match(/RIG.xml/)){d="IGNF:"+b[1]}}}}this.srsCode=d.toUpperCase();if(this.srsCode.indexOf("EPSG")==0){this.srsCode=this.srsCode;this.srsAuth="epsg";this.srsProjNumber=this.srsCode.substring(5)}else{if(this.srsCode.indexOf("IGNF")==0){this.srsCode=this.srsCode;this.srsAuth="IGNF";this.srsProjNumber=this.srsCode.substring(5)}else{if(this.srsCode.indexOf("CRS")==0){this.srsCode=this.srsCode;this.srsAuth="CRS";this.srsProjNumber=this.srsCode.substring(4)}else{this.srsAuth="";this.srsProjNumber=this.srsCode}}}this.loadProjDefinition()},loadProjDefinition:function(){if(Proj4js.defs[this.srsCode]){this.defsLoaded();return}var a=Proj4js.getScriptLocation()+"defs/"+this.srsAuth.toUpperCase()+this.srsProjNumber+".js";Proj4js.loadScript(a,Proj4js.bind(this.defsLoaded,this),Proj4js.bind(this.loadFromService,this),Proj4js.bind(this.checkDefsLoaded,this))},loadFromService:function(){var a=Proj4js.defsLookupService+"/"+this.srsAuth+"/"+this.srsProjNumber+"/proj4js/";Proj4js.loadScript(a,Proj4js.bind(this.defsLoaded,this),Proj4js.bind(this.defsFailed,this),Proj4js.bind(this.checkDefsLoaded,this))},defsLoaded:function(){this.parseDefs();this.loadProjCode(this.projName)},checkDefsLoaded:function(){if(Proj4js.defs[this.srsCode]){return true}else{return false}},defsFailed:function(){Proj4js.reportError("failed to load projection definition for: "+this.srsCode);Proj4js.defs[this.srsCode]=Proj4js.defs.WGS84;this.defsLoaded()},loadProjCode:function(b){if(Proj4js.Proj[b]){this.initTransforms();return}var a=Proj4js.getScriptLocation()+"projCode/"+b+".js";Proj4js.loadScript(a,Proj4js.bind(this.loadProjCodeSuccess,this,b),Proj4js.bind(this.loadProjCodeFailure,this,b),Proj4js.bind(this.checkCodeLoaded,this,b))},loadProjCodeSuccess:function(a){if(Proj4js.Proj[a].dependsOn){this.loadProjCode(Proj4js.Proj[a].dependsOn)}else{this.initTransforms()}},loadProjCodeFailure:function(a){Proj4js.reportError("failed to find projection file for: "+a)},checkCodeLoaded:function(a){if(Proj4js.Proj[a]){return true}else{return false}},initTransforms:function(){Proj4js.extend(this,Proj4js.Proj[this.projName]);this.init();this.readyToUse=true},wktRE:/^(\w+)\[(.*)\]$/,parseWKT:function(o){var m=o.match(this.wktRE);if(!m){return}var q=m[1];var p=m[2];var l=p.split(",");var u=l.shift();u=u.replace(/^\"/,"");u=u.replace(/\"$/,"");var r=new Array();var b=0;var h="";for(var g=0;g<l.length;++g){var d=l[g];for(var f=0;f<d.length;++f){if(d.charAt(f)=="["){++b}if(d.charAt(f)=="]"){--b}}h+=d;if(b===0){r.push(h);h=""}else{h+=","}}switch(q){case"LOCAL_CS":this.projName="identity";this.localCS=true;this.srsCode=u;break;case"GEOGCS":this.projName="longlat";this.geocsCode=u;if(!this.srsCode){this.srsCode=u}break;case"PROJCS":this.srsCode=u;break;case"GEOCCS":break;case"PROJECTION":this.projName=Proj4js.wktProjections[u];break;case"DATUM":this.datumName=u;break;case"LOCAL_DATUM":this.datumCode="none";break;case"SPHEROID":this.ellps=u;this.a=parseFloat(r.shift());this.rf=parseFloat(r.shift());break;case"PRIMEM":this.from_greenwich=parseFloat(r.shift());break;case"UNIT":this.units=u;this.unitsPerMeter=parseFloat(r.shift());break;case"PARAMETER":var a=u.toLowerCase();var v=parseFloat(r.shift());switch(a){case"false_easting":this.x0=v;break;case"false_northing":this.y0=v;break;case"scale_factor":this.k0=v;break;case"central_meridian":this.long0=v*Proj4js.common.D2R;break;case"latitude_of_origin":this.lat0=v*Proj4js.common.D2R;break;case"more_here":break;default:break}break;case"TOWGS84":this.datum_params=r;break;case"AXIS":var a=u.toLowerCase();var v=r.shift();switch(v){case"EAST":v="e";break;case"WEST":v="w";break;case"NORTH":v="n";break;case"SOUTH":v="s";break;case"UP":v="u";break;case"DOWN":v="d";break;case"OTHER":default:v=" ";break}if(!this.axis){this.axis="enu"}switch(a){case"X":this.axis=v+this.axis.substr(1,2);break;case"Y":this.axis=this.axis.substr(0,1)+v+this.axis.substr(2,1);break;case"Z":this.axis=this.axis.substr(0,2)+v;break;default:break}case"MORE_HERE":break;default:break}for(var g=0;g<r.length;++g){this.parseWKT(r[g])}},parseDefs:function(){this.defData=Proj4js.defs[this.srsCode];var g,b;if(!this.defData){return}var a=this.defData.split("+");for(var h=0;h<a.length;h++){var f=a[h].split("=");g=f[0].toLowerCase();b=f[1];switch(g.replace(/\s/gi,"")){case"":break;case"title":this.title=b;break;case"proj":this.projName=b.replace(/\s/gi,"");break;case"units":this.units=b.replace(/\s/gi,"");break;case"datum":this.datumCode=b.replace(/\s/gi,"");break;case"nadgrids":this.nagrids=b.replace(/\s/gi,"");break;case"ellps":this.ellps=b.replace(/\s/gi,"");break;case"a":this.a=parseFloat(b);break;case"b":this.b=parseFloat(b);break;case"rf":this.rf=parseFloat(b);break;case"lat_0":this.lat0=b*Proj4js.common.D2R;break;case"lat_1":this.lat1=b*Proj4js.common.D2R;break;case"lat_2":this.lat2=b*Proj4js.common.D2R;break;case"lat_ts":this.lat_ts=b*Proj4js.common.D2R;break;case"lon_0":this.long0=b*Proj4js.common.D2R;break;case"alpha":this.alpha=parseFloat(b)*Proj4js.common.D2R;break;case"lonc":this.longc=b*Proj4js.common.D2R;break;case"x_0":this.x0=parseFloat(b);break;case"y_0":this.y0=parseFloat(b);break;case"k_0":this.k0=parseFloat(b);break;case"k":this.k0=parseFloat(b);break;case"r_a":this.R_A=true;break;case"zone":this.zone=parseInt(b);break;case"south":this.utmSouth=true;break;case"towgs84":this.datum_params=b.split(",");break;case"to_meter":this.to_meter=parseFloat(b);break;case"from_greenwich":this.from_greenwich=b*Proj4js.common.D2R;break;case"pm":b=b.replace(/\s/gi,"");this.from_greenwich=Proj4js.PrimeMeridian[b]?Proj4js.PrimeMeridian[b]:parseFloat(b);this.from_greenwich*=Proj4js.common.D2R;break;case"axis":b=b.replace(/\s/gi,"");var d="ewnsud";if(b.length==3&&d.indexOf(b.substr(0,1))!=-1&&d.indexOf(b.substr(1,1))!=-1&&d.indexOf(b.substr(2,1))!=-1){this.axis=b}break;case"no_defs":break;default:}}this.deriveConstants()},deriveConstants:function(){if(this.nagrids=="@null"){this.datumCode="none"}if(this.datumCode&&this.datumCode!="none"){var a=Proj4js.Datum[this.datumCode];if(a){this.datum_params=a.towgs84?a.towgs84.split(","):null;this.ellps=a.ellipse;this.datumName=a.datumName?a.datumName:this.datumCode}}if(!this.a){var b=Proj4js.Ellipsoid[this.ellps]?Proj4js.Ellipsoid[this.ellps]:Proj4js.Ellipsoid.WGS84;Proj4js.extend(this,b)}if(this.rf&&!this.b){this.b=(1-1/this.rf)*this.a}if(Math.abs(this.a-this.b)<Proj4js.common.EPSLN){this.sphere=true;this.b=this.a}this.a2=this.a*this.a;this.b2=this.b*this.b;this.es=(this.a2-this.b2)/this.a2;this.e=Math.sqrt(this.es);if(this.R_A){this.a*=1-this.es*(Proj4js.common.SIXTH+this.es*(Proj4js.common.RA4+this.es*Proj4js.common.RA6));this.a2=this.a*this.a;this.b2=this.b*this.b;this.es=0}this.ep2=(this.a2-this.b2)/this.b2;if(!this.k0){this.k0=1}if(!this.axis){this.axis="enu"}this.datum=new Proj4js.datum(this)}});Proj4js.Proj.longlat={init:function(){},forward:function(a){return a},inverse:function(a){return a}};Proj4js.Proj.identity=Proj4js.Proj.longlat;Proj4js.defs={WGS84:"+title=long/lat:WGS84 +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees","EPSG:4326":"+title=long/lat:WGS84 +proj=longlat +a=6378137.0 +b=6356752.31424518 +ellps=WGS84 +datum=WGS84 +units=degrees","EPSG:4269":"+title=long/lat:NAD83 +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees","EPSG:3785":"+title= Google Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"};Proj4js.defs.GOOGLE=Proj4js.defs["EPSG:3785"];Proj4js.defs["EPSG:900913"]=Proj4js.defs["EPSG:3785"];Proj4js.defs["EPSG:102113"]=Proj4js.defs["EPSG:3785"];Proj4js.common={PI:3.141592653589793,HALF_PI:1.5707963267948966,TWO_PI:6.283185307179586,FORTPI:0.7853981633974483,R2D:57.29577951308232,D2R:0.017453292519943295,SEC_TO_RAD:0.00000484813681109536,EPSLN:1e-10,MAX_ITER:20,COS_67P5:0.3826834323650898,AD_C:1.0026,PJD_UNKNOWN:0,PJD_3PARAM:1,PJD_7PARAM:2,PJD_GRIDSHIFT:3,PJD_WGS84:4,PJD_NODATUM:5,SRS_WGS84_SEMIMAJOR:6378137,SIXTH:0.16666666666666666,RA4:0.04722222222222222,RA6:0.022156084656084655,RV4:0.06944444444444445,RV6:0.04243827160493827,msfnz:function(d,b,f){var a=d*b;return f/(Math.sqrt(1-a*a))},tsfnz:function(g,f,d){var a=g*d;var b=0.5*g;a=Math.pow(((1-a)/(1+a)),b);return(Math.tan(0.5*(this.HALF_PI-f))/a)},phi2z:function(j,h){var g=0.5*j;var a,b;var f=this.HALF_PI-2*Math.atan(h);for(var d=0;d<=15;d++){a=j*Math.sin(f);b=this.HALF_PI-2*Math.atan(h*(Math.pow(((1-a)/(1+a)),g)))-f;f+=b;if(Math.abs(b)<=1e-10){return f}}alert("phi2z has NoConvergence");return(-9999)},qsfnz:function(d,b){var a;if(d>1e-7){a=d*b;return((1-d*d)*(b/(1-a*a)-(0.5/d)*Math.log((1-a)/(1+a))))}else{return(2*b)}},asinz:function(a){if(Math.abs(a)>1){a=(a>1)?1:-1}return Math.asin(a)},e0fn:function(a){return(1-0.25*a*(1+a/16*(3+1.25*a)))},e1fn:function(a){return(0.375*a*(1+0.25*a*(1+0.46875*a)))},e2fn:function(a){return(0.05859375*a*a*(1+0.75*a))},e3fn:function(a){return(a*a*a*(35/3072))},mlfn:function(g,f,d,b,a){return(g*a-f*Math.sin(2*a)+d*Math.sin(4*a)-b*Math.sin(6*a))},srat:function(a,b){return(Math.pow((1-a)/(1+a),b))},sign:function(a){if(a<0){return(-1)}else{return(1)}},adjust_lon:function(a){a=(Math.abs(a)<this.PI)?a:(a-(this.sign(a)*this.TWO_PI));return a},adjust_lat:function(a){a=(Math.abs(a)<this.HALF_PI)?a:(a-(this.sign(a)*this.PI));return a},latiso:function(f,d,b){if(Math.abs(d)>this.HALF_PI){return +Number.NaN}if(d==this.HALF_PI){return Number.POSITIVE_INFINITY}if(d==-1*this.HALF_PI){return -1*Number.POSITIVE_INFINITY}var a=f*b;return Math.log(Math.tan((this.HALF_PI+d)/2))+f*Math.log((1-a)/(1+a))/2},fL:function(b,a){return 2*Math.atan(b*Math.exp(a))-this.HALF_PI},invlatiso:function(g,d){var b=this.fL(1,d);var f=0;var a=0;do{f=b;a=g*Math.sin(f);b=this.fL(Math.exp(g*Math.log((1+a)/(1-a))/2),d)}while(Math.abs(b-f)>1e-12);return b},sinh:function(a){var b=Math.exp(a);b=(b-1/b)/2;return b},cosh:function(a){var b=Math.exp(a);b=(b+1/b)/2;return b},tanh:function(a){var b=Math.exp(a);b=(b-1/b)/(b+1/b);return b},asinh:function(a){var b=(a>=0?1:-1);return b*(Math.log(Math.abs(a)+Math.sqrt(a*a+1)))},acosh:function(a){return 2*Math.log(Math.sqrt((a+1)/2)+Math.sqrt((a-1)/2))},atanh:function(a){return Math.log((a-1)/(a+1))/2},gN:function(b,g,f){var d=g*f;return b/Math.sqrt(1-d*d)}};Proj4js.datum=Proj4js.Class({initialize:function(b){this.datum_type=Proj4js.common.PJD_WGS84;if(b.datumCode&&b.datumCode=="none"){this.datum_type=Proj4js.common.PJD_NODATUM}if(b&&b.datum_params){for(var a=0;a<b.datum_params.length;a++){b.datum_params[a]=parseFloat(b.datum_params[a])}if(b.datum_params[0]!=0||b.datum_params[1]!=0||b.datum_params[2]!=0){this.datum_type=Proj4js.common.PJD_3PARAM}if(b.datum_params.length>3){if(b.datum_params[3]!=0||b.datum_params[4]!=0||b.datum_params[5]!=0||b.datum_params[6]!=0){this.datum_type=Proj4js.common.PJD_7PARAM;b.datum_params[3]*=Proj4js.common.SEC_TO_RAD;b.datum_params[4]*=Proj4js.common.SEC_TO_RAD;b.datum_params[5]*=Proj4js.common.SEC_TO_RAD;b.datum_params[6]=(b.datum_params[6]/1000000)+1}}}if(b){this.a=b.a;this.b=b.b;this.es=b.es;this.ep2=b.ep2;this.datum_params=b.datum_params}},compare_datums:function(a){if(this.datum_type!=a.datum_type){return false}else{if(this.a!=a.a||Math.abs(this.es-a.es)>5e-11){return false}else{if(this.datum_type==Proj4js.common.PJD_3PARAM){return(this.datum_params[0]==a.datum_params[0]&&this.datum_params[1]==a.datum_params[1]&&this.datum_params[2]==a.datum_params[2])}else{if(this.datum_type==Proj4js.common.PJD_7PARAM){return(this.datum_params[0]==a.datum_params[0]&&this.datum_params[1]==a.datum_params[1]&&this.datum_params[2]==a.datum_params[2]&&this.datum_params[3]==a.datum_params[3]&&this.datum_params[4]==a.datum_params[4]&&this.datum_params[5]==a.datum_params[5]&&this.datum_params[6]==a.datum_params[6])}else{if(this.datum_type==Proj4js.common.PJD_GRIDSHIFT){return strcmp(pj_param(this.params,"snadgrids").s,pj_param(a.params,"snadgrids").s)==0}else{return true}}}}}},geodetic_to_geocentric:function(d){var r=d.x;var l=d.y;var f=d.z?d.z:0;var g;var b;var a;var o=0;var q;var m;var j;var h;if(l<-Proj4js.common.HALF_PI&&l>-1.001*Proj4js.common.HALF_PI){l=-Proj4js.common.HALF_PI}else{if(l>Proj4js.common.HALF_PI&&l<1.001*Proj4js.common.HALF_PI){l=Proj4js.common.HALF_PI}else{if((l<-Proj4js.common.HALF_PI)||(l>Proj4js.common.HALF_PI)){Proj4js.reportError("geocent:lat out of range:"+l);return null}}}if(r>Proj4js.common.PI){r-=(2*Proj4js.common.PI)}m=Math.sin(l);h=Math.cos(l);j=m*m;q=this.a/(Math.sqrt(1-this.es*j));g=(q+f)*h*Math.cos(r);b=(q+f)*h*Math.sin(r);a=((q*(1-this.es))+f)*m;d.x=g;d.y=b;d.z=a;return o},geocentric_to_geodetic:function(D){var I=1e-12;var E=(I*I);var h=30;var r;var l;var a;var v;var b;var u;var q;var H;var G;var o;var B;var z;var g;var F;var j=D.x;var f=D.y;var d=D.z?D.z:0;var m;var C;var w;g=false;r=Math.sqrt(j*j+f*f);l=Math.sqrt(j*j+f*f+d*d);if(r/this.a<I){g=true;m=0;if(l/this.a<I){C=Proj4js.common.HALF_PI;w=-this.b;return}}else{m=Math.atan2(f,j)}a=d/l;v=r/l;b=1/Math.sqrt(1-this.es*(2-this.es)*v*v);H=v*(1-this.es)*b;G=a*b;F=0;do{F++;q=this.a/Math.sqrt(1-this.es*G*G);w=r*H+d*G-q*(1-this.es*G*G);u=this.es*q/(q+w);b=1/Math.sqrt(1-u*(2-u)*v*v);o=v*(1-u)*b;B=a*b;z=B*H-o*G;H=o;G=B}while(z*z>E&&F<h);C=Math.atan(B/Math.abs(o));D.x=m;D.y=C;D.z=w;return D},geocentric_to_geodetic_noniter:function(C){var f=C.x;var d=C.y;var a=C.z?C.z:0;var j;var B;var r;var g;var v;var z;var u;var o;var l;var m;var F;var h;var E;var D;var w;var q;var b;f=parseFloat(f);d=parseFloat(d);a=parseFloat(a);b=false;if(f!=0){j=Math.atan2(d,f)}else{if(d>0){j=Proj4js.common.HALF_PI}else{if(d<0){j=-Proj4js.common.HALF_PI}else{b=true;j=0;if(a>0){B=Proj4js.common.HALF_PI}else{if(a<0){B=-Proj4js.common.HALF_PI}else{B=Proj4js.common.HALF_PI;r=-this.b;return}}}}}v=f*f+d*d;g=Math.sqrt(v);z=a*Proj4js.common.AD_C;o=Math.sqrt(z*z+v);m=z/o;h=g/o;F=m*m*m;u=a+this.b*this.ep2*F;q=g-this.a*this.es*h*h*h;l=Math.sqrt(u*u+q*q);E=u/l;D=q/l;w=this.a/Math.sqrt(1-this.es*E*E);if(D>=Proj4js.common.COS_67P5){r=g/D-w}else{if(D<=-Proj4js.common.COS_67P5){r=g/-D-w}else{r=a/E+w*(this.es-1)}}if(b==false){B=Math.atan(E/D)}C.x=j;C.y=B;C.z=r;return C},geocentric_to_wgs84:function(b){if(this.datum_type==Proj4js.common.PJD_3PARAM){b.x+=this.datum_params[0];b.y+=this.datum_params[1];b.z+=this.datum_params[2]}else{if(this.datum_type==Proj4js.common.PJD_7PARAM){var h=this.datum_params[0];var f=this.datum_params[1];var m=this.datum_params[2];var g=this.datum_params[3];var o=this.datum_params[4];var l=this.datum_params[5];var j=this.datum_params[6];var d=j*(b.x-l*b.y+o*b.z)+h;var a=j*(l*b.x+b.y-g*b.z)+f;var q=j*(-o*b.x+g*b.y+b.z)+m;b.x=d;b.y=a;b.z=q}}},geocentric_from_wgs84:function(d){if(this.datum_type==Proj4js.common.PJD_3PARAM){d.x-=this.datum_params[0];d.y-=this.datum_params[1];d.z-=this.datum_params[2]}else{if(this.datum_type==Proj4js.common.PJD_7PARAM){var j=this.datum_params[0];var f=this.datum_params[1];var o=this.datum_params[2];var h=this.datum_params[3];var q=this.datum_params[4];var m=this.datum_params[5];var l=this.datum_params[6];var g=(d.x-j)/l;var b=(d.y-f)/l;var a=(d.z-o)/l;d.x=g+m*b-q*a;d.y=-m*g+b+h*a;d.z=q*g-h*b+a}}}});Proj4js.Point=Proj4js.Class({initialize:function(a,f,d){if(typeof a=="object"){this.x=a[0];this.y=a[1];this.z=a[2]||0}else{if(typeof a=="string"){var b=a.split(",");this.x=parseFloat(b[0]);this.y=parseFloat(b[1]);this.z=parseFloat(b[2])||0}else{this.x=a;this.y=f;this.z=d||0}}},clone:function(){return new Proj4js.Point(this.x,this.y,this.z)},toString:function(){return("x="+this.x+",y="+this.y)},toShortString:function(){return(this.x+", "+this.y)}});Proj4js.PrimeMeridian={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667};Proj4js.Ellipsoid={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},"APL4.":{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS72:{a:6378135,rf:298.26,ellipseName:"WGS 72"},WGS84:{a:6378137,rf:298.257223563,ellipseName:"WGS 84"},sphere:{a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}};Proj4js.Datum={WGS84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},GGRS87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},NAD83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},NAD27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"606.0,23.0,413.0",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"653.0,-212.0,449.0",ellipse:"bessel",datumName:"Hermannskogel"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},OSGB36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"}};Proj4js.WGS84=new Proj4js.Proj("WGS84");Proj4js.Datum.OSB36=Proj4js.Datum.OSGB36;Proj4js.wktProjections={"Lambert Tangential Conformal Conic Projection":"lcc",Mercator:"merc",Transverse_Mercator:"tmerc","Transverse Mercator":"tmerc","Lambert Azimuthal Equal Area":"laea","Universal Transverse Mercator System":"utm"};Proj4js.ProxyHost="";Proj4js.ProxyHostFQDN=null;Proj4js.getFQDNForUrl=function(a){if(a){var b=a.match(/^[a-z]+:\/\/([^\/]+)\/?/i);if(b){return b[1]}return window.location.host}return null};Proj4js.setProxyUrl=function(a){Proj4js.ProxyHost=a;Proj4js.ProxyHostFQDN=this.getFQDNForUrl(a)};Proj4js.Try=function(){var f=null;for(var d=0,a=arguments.length;d<a;d++){var b=arguments[d];try{f=b();break}catch(g){}}return f};Proj4js.loadScript=function(b,f,j,m){var g={loaded:false,onload:f,onfail:j,loadCheck:m,transport:Proj4js.Try(function(){return new XMLHttpRequest()},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")})||null};if(!g.transport){return}if(g.transport.overrideMimeType){g.transport.overrideMimeType("text/xml")}var h="_tick_="+new Date().getTime();b+=(b.indexOf("?")+1?"&":"?")+h;if(Proj4js.ProxyHost){if(b.indexOf(Proj4js.ProxyHost)!=0){if(b.search(/^[a-z]+:\/\//i)!=-1){var l=b.match(/^[a-z]+:\/\/([^\/]*)\/?/i);if(l){l=l[1]}if(Proj4js.ProxyHostFQDN!=l){b=Proj4js.ProxyHost+encodeURIComponent(b)}}}}g.transport.open("GET",b,false);g.transport.onreadystatechange=Proj4js.bind(this.onStateChange,this,g);var d={"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript, text/html, application/xml, text/xml, */*",Proj4js:true};for(var a in d){g.transport.setRequestHeader(a,d[a])}g.transport.send(null);if(g.transport.overrideMimeType){this.onStateChange(g)}};Proj4js.onStateChange=function(request){if(request.transport.readyState>1&&!(request.transport.readyState==4&&request.loaded)){var state=0;try{state=request.transport.status||0}catch(e){state=0}var success=state==0||(state>=200&&state<300);if(request.transport.readyState==4){request.loaded=true;if(success){eval(request.transport.responseText);if(request.loadCheck&&!request.loadCheck()){if(request.onfail){request.onfail()}}else{if(request.onload){request.onload()}}}else{if(request.onfail){request.onfail()}}request.transport.onreadystatechange=function(){}}}};Proj4js.checkReadyState=function(){};Proj4js.Proj.aea={init:function(){if(Math.abs(this.lat1+this.lat2)<Proj4js.common.EPSLN){Proj4js.reportError("aeaInitEqualLatitudes");return}this.temp=this.b/this.a;this.es=1-Math.pow(this.temp,2);this.e3=Math.sqrt(this.es);this.sin_po=Math.sin(this.lat1);this.cos_po=Math.cos(this.lat1);this.t1=this.sin_po;this.con=this.sin_po;this.ms1=Proj4js.common.msfnz(this.e3,this.sin_po,this.cos_po);this.qs1=Proj4js.common.qsfnz(this.e3,this.sin_po,this.cos_po);this.sin_po=Math.sin(this.lat2);this.cos_po=Math.cos(this.lat2);this.t2=this.sin_po;this.ms2=Proj4js.common.msfnz(this.e3,this.sin_po,this.cos_po);this.qs2=Proj4js.common.qsfnz(this.e3,this.sin_po,this.cos_po);this.sin_po=Math.sin(this.lat0);this.cos_po=Math.cos(this.lat0);this.t3=this.sin_po;this.qs0=Proj4js.common.qsfnz(this.e3,this.sin_po,this.cos_po);if(Math.abs(this.lat1-this.lat2)>Proj4js.common.EPSLN){this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1)}else{this.ns0=this.con}this.c=this.ms1*this.ms1+this.ns0*this.qs1;this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0},forward:function(g){var h=g.x;var f=g.y;this.sin_phi=Math.sin(f);this.cos_phi=Math.cos(f);var b=Proj4js.common.qsfnz(this.e3,this.sin_phi,this.cos_phi);var l=this.a*Math.sqrt(this.c-this.ns0*b)/this.ns0;var d=this.ns0*Proj4js.common.adjust_lon(h-this.long0);var a=l*Math.sin(d)+this.x0;var j=this.rh-l*Math.cos(d)+this.y0;g.x=a;g.y=j;return g},inverse:function(g){var j,a,b,d,h,f;g.x-=this.x0;g.y=this.rh-g.y+this.y0;if(this.ns0>=0){j=Math.sqrt(g.x*g.x+g.y*g.y);b=1}else{j=-Math.sqrt(g.x*g.x+g.y*g.y);b=-1}d=0;if(j!=0){d=Math.atan2(b*g.x,b*g.y)}b=j*this.ns0/this.a;a=(this.c-b*b)/this.ns0;if(this.e3>=1e-10){b=1-0.5*(1-this.es)*Math.log((1-this.e3)/(1+this.e3))/this.e3;if(Math.abs(Math.abs(b)-Math.abs(a))>1e-10){f=this.phi1z(this.e3,a)}else{if(a>=0){f=0.5*PI}else{f=-0.5*PI}}}else{f=this.phi1z(e3,a)}h=Proj4js.common.adjust_lon(d/this.ns0+this.long0);g.x=h;g.y=f;return g},phi1z:function(l,a){var b,d,f;var j=Proj4js.common.asinz(0.5*a);if(l<Proj4js.common.EPSLN){return j}var h=l*l;for(var g=1;g<=25;g++){sinphi=Math.sin(j);cosphi=Math.cos(j);b=l*sinphi;d=1-b*b;f=0.5*d*d/cosphi*(a/(1-h)-sinphi/d+0.5/l*Math.log((1-b)/(1+b)));j=j+f;if(Math.abs(f)<=1e-7){return j}}Proj4js.reportError("aea:phi1z:Convergence error");return null}};Proj4js.Proj.aeqd={init:function(){this.sin_p12=Math.sin(this.lat0);this.cos_p12=Math.cos(this.lat0)},forward:function(d){var b=d.x;var m=d.y;var h;var a=Math.sin(d.y);var f=Math.cos(d.y);var q=Proj4js.common.adjust_lon(b-this.long0);var o=Math.cos(q);var j=this.sin_p12*a+this.cos_p12*f*o;if(Math.abs(Math.abs(j)-1)<Proj4js.common.EPSLN){h=1;if(j<0){Proj4js.reportError("aeqd:Fwd:PointError");return}}else{var l=Math.acos(j);h=l/Math.sin(l)}d.x=this.x0+this.a*h*f*Math.sin(q);d.y=this.y0+this.a*h*(this.cos_p12*a-this.sin_p12*f*o);return d},inverse:function(b){b.x-=this.x0;b.y-=this.y0;var j=Math.sqrt(b.x*b.x+b.y*b.y);if(j>(2*Proj4js.common.HALF_PI*this.a)){Proj4js.reportError("aeqdInvDataError");return}var g=j/this.a;var f=Math.sin(g);var m=Math.cos(g);var a=this.long0;var h;if(Math.abs(j)<=Proj4js.common.EPSLN){h=this.lat0}else{h=Proj4js.common.asinz(m*this.sin_p12+(b.y*f*this.cos_p12)/j);var d=Math.abs(this.lat0)-Proj4js.common.HALF_PI;if(Math.abs(d)<=Proj4js.common.EPSLN){if(lat0>=0){a=Proj4js.common.adjust_lon(this.long0+Math.atan2(b.x,-b.y))}else{a=Proj4js.common.adjust_lon(this.long0-Math.atan2(-b.x,b.y))}}else{d=m-this.sin_p12*Math.sin(h);if((Math.abs(d)<Proj4js.common.EPSLN)&&(Math.abs(b.x)<Proj4js.common.EPSLN)){}else{var l=Math.atan2((b.x*f*this.cos_p12),(d*j));a=Proj4js.common.adjust_lon(this.long0+Math.atan2((b.x*f*this.cos_p12),(d*j)))}}}b.x=a;b.y=h;return b}};Proj4js.Proj.cass={init:function(){if(!this.sphere){this.en=this.pj_enfn(this.es);this.m0=this.pj_mlfn(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en)}},C1:0.16666666666666666,C2:0.008333333333333333,C3:0.041666666666666664,C4:0.3333333333333333,C5:0.06666666666666667,forward:function(f){var a,g;var b=f.x;var d=f.y;b=Proj4js.common.adjust_lon(b-this.long0);if(this.sphere){a=Math.asin(Math.cos(d)*Math.sin(b));g=Math.atan2(Math.tan(d),Math.cos(b))-this.phi0}else{this.n=Math.sin(d);this.c=Math.cos(d);g=this.pj_mlfn(d,this.n,this.c,this.en);this.n=1/Math.sqrt(1-this.es*this.n*this.n);this.tn=Math.tan(d);this.t=this.tn*this.tn;this.a1=b*this.c;this.c*=this.es*this.c/(1-this.es);this.a2=this.a1*this.a1;a=this.n*this.a1*(1-this.a2*this.t*(this.C1-(8-this.t+8*this.c)*this.a2*this.C2));g-=this.m0-this.n*this.tn*this.a2*(0.5+(5-this.t+6*this.c)*this.a2*this.C3)}f.x=this.a*a+this.x0;f.y=this.a*g+this.y0;return f},inverse:function(b){b.x-=this.x0;b.y-=this.y0;var a=b.x/this.a;var d=b.y/this.a;if(this.sphere){this.dd=d+this.lat0;phi=Math.asin(Math.sin(this.dd)*Math.cos(a));lam=Math.atan2(Math.tan(a),Math.cos(this.dd))}else{ph1=this.pj_inv_mlfn(this.m0+d,this.es,this.en);this.tn=Math.tan(ph1);this.t=this.tn*this.tn;this.n=Math.sin(ph1);this.r=1/(1-this.es*this.n*this.n);this.n=Math.sqrt(this.r);this.r*=(1-this.es)*this.n;this.dd=a/this.n;this.d2=this.dd*this.dd;phi=ph1-(this.n*this.tn/this.r)*this.d2*(0.5-(1+3*this.t)*this.d2*this.C3);lam=this.dd*(1+this.t*this.d2*(-this.C4+(1+3*this.t)*this.d2*this.C5))/Math.cos(ph1)}b.x=Proj4js.common.adjust_lon(this.long0+lam);b.y=phi;return b},pj_enfn:function(b){en=new Array();en[0]=this.C00-b*(this.C02+b*(this.C04+b*(this.C06+b*this.C08)));en[1]=b*(this.C22-b*(this.C04+b*(this.C06+b*this.C08)));var a=b*b;en[2]=a*(this.C44-b*(this.C46+b*this.C48));a*=b;en[3]=a*(this.C66-b*this.C68);en[4]=a*b*this.C88;return en},pj_mlfn:function(f,a,d,b){d*=a;a*=a;return(b[0]*f-d*(b[1]+a*(b[2]+a*(b[3]+a*b[4]))))},pj_inv_mlfn:function(a,d,b){k=1/(1-d);phi=a;for(i=Proj4js.common.MAX_ITER;i;--i){s=Math.sin(phi);t=1-d*s*s;t=(this.pj_mlfn(phi,s,Math.cos(phi),b)-a)*(t*Math.sqrt(t))*k;phi-=t;if(Math.abs(t)<Proj4js.common.EPSLN){return phi}}Proj4js.reportError("cass:pj_inv_mlfn: Convergence error");return phi},C00:1,C02:0.25,C04:0.046875,C06:0.01953125,C08:0.01068115234375,C22:0.75,C44:0.46875,C46:0.013020833333333334,C48:0.007120768229166667,C66:0.3645833333333333,C68:0.005696614583333333,C88:0.3076171875};Proj4js.Proj.cea={init:function(){},forward:function(d){var f=d.x;var b=d.y;dlon=Proj4js.common.adjust_lon(f-this.long0);var a=this.x0+this.a*dlon*Math.cos(this.lat_ts);var g=this.y0+this.a*Math.sin(b)/Math.cos(this.lat_ts);d.x=a;d.y=g;return d},inverse:function(b){b.x-=this.x0;b.y-=this.y0;var d=Proj4js.common.adjust_lon(this.long0+(b.x/this.a)/Math.cos(this.lat_ts));var a=Math.asin((b.y/this.a)*Math.cos(this.lat_ts));b.x=d;b.y=a;return b}};Proj4js.Proj.eqc={init:function(){if(!this.x0){this.x0=0}if(!this.y0){this.y0=0}if(!this.lat0){this.lat0=0}if(!this.long0){this.long0=0}if(!this.lat_ts){this.lat_ts=0}if(!this.title){this.title="Equidistant Cylindrical (Plate Carre)"}this.rc=Math.cos(this.lat_ts)},forward:function(f){var g=f.x;var d=f.y;var b=Proj4js.common.adjust_lon(g-this.long0);var a=Proj4js.common.adjust_lat(d-this.lat0);f.x=this.x0+(this.a*b*this.rc);f.y=this.y0+(this.a*a);return f},inverse:function(b){var a=b.x;var d=b.y;b.x=Proj4js.common.adjust_lon(this.long0+((a-this.x0)/(this.a*this.rc)));b.y=Proj4js.common.adjust_lat(this.lat0+((d-this.y0)/(this.a)));return b}};Proj4js.Proj.eqdc={init:function(){if(!this.mode){this.mode=0}this.temp=this.b/this.a;this.es=1-Math.pow(this.temp,2);this.e=Math.sqrt(this.es);this.e0=Proj4js.common.e0fn(this.es);this.e1=Proj4js.common.e1fn(this.es);this.e2=Proj4js.common.e2fn(this.es);this.e3=Proj4js.common.e3fn(this.es);this.sinphi=Math.sin(this.lat1);this.cosphi=Math.cos(this.lat1);this.ms1=Proj4js.common.msfnz(this.e,this.sinphi,this.cosphi);this.ml1=Proj4js.common.mlfn(this.e0,this.e1,this.e2,this.e3,this.lat1);if(this.mode!=0){if(Math.abs(this.lat1+this.lat2)<Proj4js.common.EPSLN){Proj4js.reportError("eqdc:Init:EqualLatitudes")}this.sinphi=Math.sin(this.lat2);this.cosphi=Math.cos(this.lat2);this.ms2=Proj4js.common.msfnz(this.e,this.sinphi,this.cosphi);this.ml2=Proj4js.common.mlfn(this.e0,this.e1,this.e2,this.e3,this.lat2);if(Math.abs(this.lat1-this.lat2)>=Proj4js.common.EPSLN){this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)}else{this.ns=this.sinphi}}else{this.ns=this.sinphi}this.g=this.ml1+this.ms1/this.ns;this.ml0=Proj4js.common.mlfn(this.e0,this.e1,this.e2,this.e3,this.lat0);this.rh=this.a*(this.g-this.ml0)},forward:function(f){var g=f.x;var d=f.y;var l=Proj4js.common.mlfn(this.e0,this.e1,this.e2,this.e3,d);var j=this.a*(this.g-l);var b=this.ns*Proj4js.common.adjust_lon(g-this.long0);var a=this.x0+j*Math.sin(b);var h=this.y0+this.rh-j*Math.cos(b);f.x=a;f.y=h;return f},inverse:function(f){f.x-=this.x0;f.y=this.rh-f.y+this.y0;var a,j;if(this.ns>=0){var j=Math.sqrt(f.x*f.x+f.y*f.y);var a=1}else{j=-Math.sqrt(f.x*f.x+f.y*f.y);a=-1}var b=0;if(j!=0){b=Math.atan2(a*f.x,a*f.y)}var h=this.g-j/this.a;var d=this.phi3z(h,this.e0,this.e1,this.e2,this.e3);var g=Proj4js.common.adjust_lon(this.long0+b/this.ns);f.x=g;f.y=d;return f},phi3z:function(l,j,h,g,f){var d;var a;d=l;for(var b=0;b<15;b++){a=(l+h*Math.sin(2*d)-g*Math.sin(4*d)+f*Math.sin(6*d))/j-d;d+=a;if(Math.abs(a)<=1e-10){return d}}Proj4js.reportError("PHI3Z-CONV:Latitude failed to converge after 15 iterations");return null}};Proj4js.Proj.equi={init:function(){if(!this.x0){this.x0=0}if(!this.y0){this.y0=0}if(!this.lat0){this.lat0=0}if(!this.long0){this.long0=0}},forward:function(f){var g=f.x;var d=f.y;var b=Proj4js.common.adjust_lon(g-this.long0);var a=this.x0+this.a*b*Math.cos(this.lat0);var h=this.y0+this.a*d;this.t1=a;this.t2=Math.cos(this.lat0);f.x=a;f.y=h;return f},inverse:function(b){b.x-=this.x0;b.y-=this.y0;var a=b.y/this.a;if(Math.abs(a)>Proj4js.common.HALF_PI){Proj4js.reportError("equi:Inv:DataError")}var d=Proj4js.common.adjust_lon(this.long0+b.x/(this.a*Math.cos(this.lat0)));b.x=d;b.y=a}};Proj4js.Proj.gauss={init:function(){sphi=Math.sin(this.lat0);cphi=Math.cos(this.lat0);cphi*=cphi;this.rc=Math.sqrt(1-this.es)/(1-this.es*sphi*sphi);this.C=Math.sqrt(1+this.es*cphi*cphi/(1-this.es));this.phic0=Math.asin(sphi/this.C);this.ratexp=0.5*this.C*this.e;this.K=Math.tan(0.5*this.phic0+Proj4js.common.FORTPI)/(Math.pow(Math.tan(0.5*this.lat0+Proj4js.common.FORTPI),this.C)*Proj4js.common.srat(this.e*sphi,this.ratexp))},forward:function(b){var d=b.x;var a=b.y;b.y=2*Math.atan(this.K*Math.pow(Math.tan(0.5*a+Proj4js.common.FORTPI),this.C)*Proj4js.common.srat(this.e*Math.sin(a),this.ratexp))-Proj4js.common.HALF_PI;b.x=this.C*d;return b},inverse:function(f){var d=1e-14;var g=f.x/this.C;var b=f.y;num=Math.pow(Math.tan(0.5*b+Proj4js.common.FORTPI)/this.K,1/this.C);for(var a=Proj4js.common.MAX_ITER;a>0;--a){b=2*Math.atan(num*Proj4js.common.srat(this.e*Math.sin(f.y),-0.5*this.e))-Proj4js.common.HALF_PI;if(Math.abs(b-f.y)<d){break}f.y=b}if(!a){Proj4js.reportError("gauss:inverse:convergence failed");return null}f.x=g;f.y=b;return f}};Proj4js.Proj.gnom={init:function(a){this.sin_p14=Math.sin(this.lat0);this.cos_p14=Math.cos(this.lat0);this.infinity_dist=1000*this.a;this.rc=1},forward:function(d){var a,f;var o;var m;var h;var j;var b=d.x;var l=d.y;o=Proj4js.common.adjust_lon(b-this.long0);a=Math.sin(l);f=Math.cos(l);m=Math.cos(o);j=this.sin_p14*a+this.cos_p14*f*m;h=1;if((j>0)||(Math.abs(j)<=Proj4js.common.EPSLN)){x=this.x0+this.a*h*f*Math.sin(o)/j;y=this.y0+this.a*h*(this.cos_p14*a-this.sin_p14*f*m)/j}else{Proj4js.reportError("orthoFwdPointError");x=this.x0+this.infinity_dist*f*Math.sin(o);y=this.y0+this.infinity_dist*(this.cos_p14*a-this.sin_p14*f*m)}d.x=x;d.y=y;return d},inverse:function(g){var a;var j;var b,d;var l;var h,f;g.x=(g.x-this.x0)/this.a;g.y=(g.y-this.y0)/this.a;g.x/=this.k0;g.y/=this.k0;if((a=Math.sqrt(g.x*g.x+g.y*g.y))){l=Math.atan2(a,this.rc);b=Math.sin(l);d=Math.cos(l);f=Proj4js.common.asinz(d*this.sin_p14+(g.y*b*this.cos_p14)/a);h=Math.atan2(g.x*b,a*this.cos_p14*d-g.y*this.sin_p14*b);h=Proj4js.common.adjust_lon(this.long0+h)}else{f=this.phic0;h=0}g.x=h;g.y=f;return g}};Proj4js.Proj.gstmerc={init:function(){var a=this.b/this.a;this.e=Math.sqrt(1-a*a);this.lc=this.long0;this.rs=Math.sqrt(1+this.e*this.e*Math.pow(Math.cos(this.lat0),4)/(1-this.e*this.e));var d=Math.sin(this.lat0);var b=Math.asin(d/this.rs);var f=Math.sin(b);this.cp=Proj4js.common.latiso(0,b,f)-this.rs*Proj4js.common.latiso(this.e,this.lat0,d);this.n2=this.k0*this.a*Math.sqrt(1-this.e*this.e)/(1-this.e*this.e*d*d);this.xs=this.x0;this.ys=this.y0-this.n2*b;if(!this.title){this.title="Gauss Schreiber transverse mercator"}},forward:function(g){var j=g.x;var f=g.y;var a=this.rs*(j-this.lc);var b=this.cp+(this.rs*Proj4js.common.latiso(this.e,f,Math.sin(f)));var h=Math.asin(Math.sin(a)/Proj4js.common.cosh(b));var d=Proj4js.common.latiso(0,h,Math.sin(h));g.x=this.xs+(this.n2*d);g.y=this.ys+(this.n2*Math.atan(Proj4js.common.sinh(b)/Math.cos(a)));return g},inverse:function(f){var b=f.x;var h=f.y;var a=Math.atan(Proj4js.common.sinh((b-this.xs)/this.n2)/Math.cos((h-this.ys)/this.n2));var g=Math.asin(Math.sin((h-this.ys)/this.n2)/Proj4js.common.cosh((b-this.xs)/this.n2));var d=Proj4js.common.latiso(0,g,Math.sin(g));f.x=this.lc+a/this.rs;f.y=Proj4js.common.invlatiso(this.e,(d-this.cp)/this.rs);return f}};Proj4js.Proj.laea={S_POLE:1,N_POLE:2,EQUIT:3,OBLIQ:4,init:function(){var a=Math.abs(this.lat0);if(Math.abs(a-Proj4js.common.HALF_PI)<Proj4js.common.EPSLN){this.mode=this.lat0<0?this.S_POLE:this.N_POLE}else{if(Math.abs(a)<Proj4js.common.EPSLN){this.mode=this.EQUIT}else{this.mode=this.OBLIQ}}if(this.es>0){var b;this.qp=Proj4js.common.qsfnz(this.e,1);this.mmf=0.5/(1-this.es);this.apa=this.authset(this.es);switch(this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(0.5*this.qp);this.dd=1/this.rq;this.xmf=1;this.ymf=0.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(0.5*this.qp);b=Math.sin(this.lat0);this.sinb1=Proj4js.common.qsfnz(this.e,b)/this.qp;this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1);this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*b*b)*this.rq*this.cosb1);this.ymf=(this.xmf=this.rq)/this.dd;this.xmf*=this.dd;break}}else{if(this.mode==this.OBLIQ){this.sinph0=Math.sin(this.lat0);this.cosph0=Math.cos(this.lat0)}}},forward:function(g){var v,r;var w=g.x;var m=g.y;w=Proj4js.common.adjust_lon(w-this.long0);if(this.sphere){var u,j,d;d=Math.sin(m);j=Math.cos(m);u=Math.cos(w);switch(this.mode){case this.OBLIQ:case this.EQUIT:r=(this.mode==this.EQUIT)?1+j*u:1+this.sinph0*d+this.cosph0*j*u;if(r<=Proj4js.common.EPSLN){Proj4js.reportError("laea:fwd:y less than eps");return null}r=Math.sqrt(2/r);v=r*j*Math.sin(w);r*=(this.mode==this.EQUIT)?d:this.cosph0*d-this.sinph0*j*u;break;case this.N_POLE:u=-u;case this.S_POLE:if(Math.abs(m+this.phi0)<Proj4js.common.EPSLN){Proj4js.reportError("laea:fwd:phi < eps");return null}r=Proj4js.common.FORTPI-m*0.5;r=2*((this.mode==this.S_POLE)?Math.cos(r):Math.sin(r));v=r*Math.sin(w);r*=u;break}}else{var u,l,d,f,h=0,a=0,o=0;u=Math.cos(w);l=Math.sin(w);d=Math.sin(m);f=Proj4js.common.qsfnz(this.e,d);if(this.mode==this.OBLIQ||this.mode==this.EQUIT){h=f/this.qp;a=Math.sqrt(1-h*h)}switch(this.mode){case this.OBLIQ:o=1+this.sinb1*h+this.cosb1*a*u;break;case this.EQUIT:o=1+a*u;break;case this.N_POLE:o=Proj4js.common.HALF_PI+m;f=this.qp-f;break;case this.S_POLE:o=m-Proj4js.common.HALF_PI;f=this.qp+f;break}if(Math.abs(o)<Proj4js.common.EPSLN){Proj4js.reportError("laea:fwd:b < eps");return null}switch(this.mode){case this.OBLIQ:case this.EQUIT:o=Math.sqrt(2/o);if(this.mode==this.OBLIQ){r=this.ymf*o*(this.cosb1*h-this.sinb1*a*u)}else{r=(o=Math.sqrt(2/(1+a*u)))*h*this.ymf}v=this.xmf*o*a*l;break;case this.N_POLE:case this.S_POLE:if(f>=0){v=(o=Math.sqrt(f))*l;r=u*((this.mode==this.S_POLE)?o:-o)}else{v=r=0}break}}g.x=this.a*v+this.x0;g.y=this.a*r+this.y0;return g},inverse:function(b){b.x-=this.x0;b.y-=this.y0;var l=b.x/this.a;var h=b.y/this.a;if(this.sphere){var u=0,o,d=0;o=Math.sqrt(l*l+h*h);var g=o*0.5;if(g>1){Proj4js.reportError("laea:Inv:DataError");return null}g=2*Math.asin(g);if(this.mode==this.OBLIQ||this.mode==this.EQUIT){d=Math.sin(g);u=Math.cos(g)}switch(this.mode){case this.EQUIT:g=(Math.abs(o)<=Proj4js.common.EPSLN)?0:Math.asin(h*d/o);l*=d;h=u*o;break;case this.OBLIQ:g=(Math.abs(o)<=Proj4js.common.EPSLN)?this.phi0:Math.asin(u*sinph0+h*d*cosph0/o);l*=d*cosph0;h=(u-Math.sin(g)*sinph0)*o;break;case this.N_POLE:h=-h;g=Proj4js.common.HALF_PI-g;break;case this.S_POLE:g-=Proj4js.common.HALF_PI;break}lam=(h==0&&(this.mode==this.EQUIT||this.mode==this.OBLIQ))?0:Math.atan2(l,h)}else{var m,f,a,j,r=0;switch(this.mode){case this.EQUIT:case this.OBLIQ:l/=this.dd;h*=this.dd;j=Math.sqrt(l*l+h*h);if(j<Proj4js.common.EPSLN){b.x=0;b.y=this.phi0;return b}f=2*Math.asin(0.5*j/this.rq);m=Math.cos(f);l*=(f=Math.sin(f));if(this.mode==this.OBLIQ){r=m*this.sinb1+h*f*this.cosb1/j;a=this.qp*r;h=j*this.cosb1*m-h*this.sinb1*f}else{r=h*f/j;a=this.qp*r;h=j*m}break;case this.N_POLE:h=-h;case this.S_POLE:a=(l*l+h*h);if(!a){b.x=0;b.y=this.phi0;return b}r=1-a/this.qp;if(this.mode==this.S_POLE){r=-r}break}lam=Math.atan2(l,h);g=this.authlat(Math.asin(r),this.apa)}b.x=Proj4js.common.adjust_lon(this.long0+lam);b.y=g;return b},P00:0.3333333333333333,P01:0.17222222222222222,P02:0.10257936507936508,P10:0.06388888888888888,P11:0.0664021164021164,P20:0.016415012942191543,authset:function(b){var a;var d=new Array();d[0]=b*this.P00;a=b*b;d[0]+=a*this.P01;d[1]=a*this.P10;a*=b;d[0]+=a*this.P02;d[1]+=a*this.P11;d[2]=a*this.P20;return d},authlat:function(b,d){var a=b+b;return(b+d[0]*Math.sin(a)+d[1]*Math.sin(a+a)+d[2]*Math.sin(a+a+a))}};Proj4js.Proj.lcc={init:function(){if(!this.lat2){this.lat2=this.lat0}if(!this.k0){this.k0=1}if(Math.abs(this.lat1+this.lat2)<Proj4js.common.EPSLN){Proj4js.reportError("lcc:init: Equal Latitudes");return}var o=this.b/this.a;this.e=Math.sqrt(1-o*o);var j=Math.sin(this.lat1);var g=Math.cos(this.lat1);var m=Proj4js.common.msfnz(this.e,j,g);var b=Proj4js.common.tsfnz(this.e,this.lat1,j);var h=Math.sin(this.lat2);var f=Math.cos(this.lat2);var l=Proj4js.common.msfnz(this.e,h,f);var a=Proj4js.common.tsfnz(this.e,this.lat2,h);var d=Proj4js.common.tsfnz(this.e,this.lat0,Math.sin(this.lat0));if(Math.abs(this.lat1-this.lat2)>Proj4js.common.EPSLN){this.ns=Math.log(m/l)/Math.log(b/a)}else{this.ns=j}this.f0=m/(this.ns*Math.pow(b,this.ns));this.rh=this.a*this.f0*Math.pow(d,this.ns);if(!this.title){this.title="Lambert Conformal Conic"}},forward:function(g){var h=g.x;var f=g.y;if(Math.abs(2*Math.abs(f)-Proj4js.common.PI)<=Proj4js.common.EPSLN){f=Proj4js.common.sign(f)*(Proj4js.common.HALF_PI-2*Proj4js.common.EPSLN)}var a=Math.abs(Math.abs(f)-Proj4js.common.HALF_PI);var d,j;if(a>Proj4js.common.EPSLN){d=Proj4js.common.tsfnz(this.e,f,Math.sin(f));j=this.a*this.f0*Math.pow(d,this.ns)}else{a=f*this.ns;if(a<=0){Proj4js.reportError("lcc:forward: No Projection");return null}j=0}var b=this.ns*Proj4js.common.adjust_lon(h-this.long0);g.x=this.k0*(j*Math.sin(b))+this.x0;g.y=this.k0*(this.rh-j*Math.cos(b))+this.y0;return g},inverse:function(b){var g,d,h;var j,a;var m=(b.x-this.x0)/this.k0;var l=(this.rh-(b.y-this.y0)/this.k0);if(this.ns>0){g=Math.sqrt(m*m+l*l);d=1}else{g=-Math.sqrt(m*m+l*l);d=-1}var f=0;if(g!=0){f=Math.atan2((d*m),(d*l))}if((g!=0)||(this.ns>0)){d=1/this.ns;h=Math.pow((g/(this.a*this.f0)),d);j=Proj4js.common.phi2z(this.e,h);if(j==-9999){return null}}else{j=-Proj4js.common.HALF_PI}a=Proj4js.common.adjust_lon(f/this.ns+this.long0);b.x=a;b.y=j;return b}};Proj4js.Proj.merc={init:function(){if(this.lat_ts){if(this.sphere){this.k0=Math.cos(this.lat_ts)}else{this.k0=Proj4js.common.msfnz(this.es,Math.sin(this.lat_ts),Math.cos(this.lat_ts))}}},forward:function(g){var h=g.x;var f=g.y;if(f*Proj4js.common.R2D>90&&f*Proj4js.common.R2D<-90&&h*Proj4js.common.R2D>180&&h*Proj4js.common.R2D<-180){Proj4js.reportError("merc:forward: llInputOutOfRange: "+h+" : "+f);return null}var a,j;if(Math.abs(Math.abs(f)-Proj4js.common.HALF_PI)<=Proj4js.common.EPSLN){Proj4js.reportError("merc:forward: ll2mAtPoles");return null}else{if(this.sphere){a=this.x0+this.a*this.k0*Proj4js.common.adjust_lon(h-this.long0);j=this.y0+this.a*this.k0*Math.log(Math.tan(Proj4js.common.FORTPI+0.5*f))}else{var d=Math.sin(f);var b=Proj4js.common.tsfnz(this.e,f,d);a=this.x0+this.a*this.k0*Proj4js.common.adjust_lon(h-this.long0);j=this.y0-this.a*this.k0*Math.log(b)}g.x=a;g.y=j;return g}},inverse:function(f){var a=f.x-this.x0;var h=f.y-this.y0;var g,d;if(this.sphere){d=Proj4js.common.HALF_PI-2*Math.atan(Math.exp(-h/this.a*this.k0))}else{var b=Math.exp(-h/(this.a*this.k0));d=Proj4js.common.phi2z(this.e,b);if(d==-9999){Proj4js.reportError("merc:inverse: lat = -9999");return null}}g=Proj4js.common.adjust_lon(this.long0+a/(this.a*this.k0));f.x=g;f.y=d;return f}};Proj4js.Proj.mill={init:function(){},forward:function(f){var g=f.x;var d=f.y;var b=Proj4js.common.adjust_lon(g-this.long0);var a=this.x0+this.a*b;var h=this.y0+this.a*Math.log(Math.tan((Proj4js.common.PI/4)+(d/2.5)))*1.25;f.x=a;f.y=h;return f},inverse:function(b){b.x-=this.x0;b.y-=this.y0;var d=Proj4js.common.adjust_lon(this.long0+b.x/this.a);var a=2.5*(Math.atan(Math.exp(0.8*b.y/this.a))-Proj4js.common.PI/4);b.x=d;b.y=a;return b}};Proj4js.Proj.moll={init:function(){},forward:function(d){var a=d.x;var l=d.y;var h=Proj4js.common.adjust_lon(a-this.long0);var g=l;var f=Proj4js.common.PI*Math.sin(l);for(var j=0;true;j++){var b=-(g+Math.sin(g)-f)/(1+Math.cos(g));g+=b;if(Math.abs(b)<Proj4js.common.EPSLN){break}if(j>=50){Proj4js.reportError("moll:Fwd:IterationError")}}g/=2;if(Proj4js.common.PI/2-Math.abs(l)<Proj4js.common.EPSLN){h=0}var o=0.900316316158*this.a*h*Math.cos(g)+this.x0;var m=1.4142135623731*this.a*Math.sin(g)+this.y0;d.x=o;d.y=m;return d},inverse:function(f){var b;var a;f.x-=this.x0;var a=f.y/(1.4142135623731*this.a);if(Math.abs(a)>0.999999999999){a=0.999999999999}var b=Math.asin(a);var g=Proj4js.common.adjust_lon(this.long0+(f.x/(0.900316316158*this.a*Math.cos(b))));if(g<(-Proj4js.common.PI)){g=-Proj4js.common.PI}if(g>Proj4js.common.PI){g=Proj4js.common.PI}a=(2*b+Math.sin(2*b))/Proj4js.common.PI;if(Math.abs(a)>1){a=1}var d=Math.asin(a);f.x=g;f.y=d;return f}};Proj4js.Proj.nzmg={iterations:1,init:function(){this.A=new Array();this.A[1]=+0.6399175073;this.A[2]=-0.1358797613;this.A[3]=+0.063294409;this.A[4]=-0.02526853;this.A[5]=+0.0117879;this.A[6]=-0.0055161;this.A[7]=+0.0026906;this.A[8]=-0.001333;this.A[9]=+0.00067;this.A[10]=-0.00034;this.B_re=new Array();this.B_im=new Array();this.B_re[1]=+0.7557853228;this.B_im[1]=0;this.B_re[2]=+0.249204646;this.B_im[2]=+0.003371507;this.B_re[3]=-0.001541739;this.B_im[3]=+0.04105856;this.B_re[4]=-0.10162907;this.B_im[4]=+0.01727609;this.B_re[5]=-0.26623489;this.B_im[5]=-0.36249218;this.B_re[6]=-0.6870983;this.B_im[6]=-1.1651967;this.C_re=new Array();this.C_im=new Array();this.C_re[1]=+1.3231270439;this.C_im[1]=0;this.C_re[2]=-0.577245789;this.C_im[2]=-0.007809598;this.C_re[3]=+0.508307513;this.C_im[3]=-0.112208952;this.C_re[4]=-0.15094762;this.C_im[4]=+0.18200602;this.C_re[5]=+1.01418179;this.C_im[5]=+1.64497696;this.C_re[6]=+1.9660549;this.C_im[6]=+2.5127645;this.D=new Array();this.D[1]=+1.5627014243;this.D[2]=+0.5185406398;this.D[3]=-0.03333098;this.D[4]=-0.1052906;this.D[5]=-0.0368594;this.D[6]=+0.007317;this.D[7]=+0.0122;this.D[8]=+0.00394;this.D[9]=-0.0013},forward:function(d){var b=d.x;var v=d.y;var B=v-this.lat0;var m=b-this.long0;var f=B/Proj4js.common.SEC_TO_RAD*0.00001;var a=m;var q=1;var l=0;for(n=1;n<=10;n++){q=q*f;l=l+this.A[n]*q}var o=l;var h=a;var r=1;var j=0;var z;var g;var w=0;var u=0;for(n=1;n<=6;n++){z=r*o-j*h;g=j*o+r*h;r=z;j=g;w=w+this.B_re[n]*r-this.B_im[n]*j;u=u+this.B_im[n]*r+this.B_re[n]*j}x=(u*this.a)+this.x0;y=(w*this.a)+this.y0;d.x=x;d.y=y;return d},inverse:function(C){var w=C.x;var v=C.y;var G=w-this.x0;var F=v-this.y0;var u=F/this.a;var g=G/this.a;var m=1;var M=0;var h;var J;var o=0;var a=0;for(n=1;n<=6;n++){h=m*u-M*g;J=M*u+m*g;m=h;M=J;o=o+this.C_re[n]*m-this.C_im[n]*M;a=a+this.C_im[n]*m+this.C_re[n]*M}for(i=0;i<this.iterations;i++){var z=o;var l=a;var E;var B;var d=u;var I=g;for(n=2;n<=6;n++){E=z*o-l*a;B=l*o+z*a;z=E;l=B;d=d+(n-1)*(this.B_re[n]*z-this.B_im[n]*l);I=I+(n-1)*(this.B_im[n]*z+this.B_re[n]*l)}z=1;l=0;var b=this.B_re[1];var H=this.B_im[1];for(n=2;n<=6;n++){E=z*o-l*a;B=l*o+z*a;z=E;l=B;b=b+n*(this.B_re[n]*z-this.B_im[n]*l);H=H+n*(this.B_im[n]*z+this.B_re[n]*l)}var f=b*b+H*H;o=(d*b+I*H)/f;a=(I*b-d*H)/f}var D=o;var r=a;var K=1;var L=0;for(n=1;n<=9;n++){K=K*D;L=L+this.D[n]*K}var q=this.lat0+(L*Proj4js.common.SEC_TO_RAD*100000);var j=this.long0+r;C.x=j;C.y=q;return C}};Proj4js.Proj.omerc={init:function(){if(!this.mode){this.mode=0}if(!this.lon1){this.lon1=0;this.mode=1}if(!this.lon2){this.lon2=0}if(!this.lat2){this.lat2=0}var a=this.b/this.a;var d=1-Math.pow(a,2);var b=Math.sqrt(d);this.sin_p20=Math.sin(this.lat0);this.cos_p20=Math.cos(this.lat0);this.con=1-this.es*this.sin_p20*this.sin_p20;this.com=Math.sqrt(1-d);this.bl=Math.sqrt(1+this.es*Math.pow(this.cos_p20,4)/(1-d));this.al=this.a*this.bl*this.k0*this.com/this.con;if(Math.abs(this.lat0)<Proj4js.common.EPSLN){this.ts=1;this.d=1;this.el=1}else{this.ts=Proj4js.common.tsfnz(this.e,this.lat0,this.sin_p20);this.con=Math.sqrt(this.con);this.d=this.bl*this.com/(this.cos_p20*this.con);if((this.d*this.d-1)>0){if(this.lat0>=0){this.f=this.d+Math.sqrt(this.d*this.d-1)}else{this.f=this.d-Math.sqrt(this.d*this.d-1)}}else{this.f=this.d}this.el=this.f*Math.pow(this.ts,this.bl)}if(this.mode!=0){this.g=0.5*(this.f-1/this.f);this.gama=Proj4js.common.asinz(Math.sin(this.alpha)/this.d);this.longc=this.longc-Proj4js.common.asinz(this.g*Math.tan(this.gama))/this.bl;this.con=Math.abs(this.lat0);if((this.con>Proj4js.common.EPSLN)&&(Math.abs(this.con-Proj4js.common.HALF_PI)>Proj4js.common.EPSLN)){this.singam=Math.sin(this.gama);this.cosgam=Math.cos(this.gama);this.sinaz=Math.sin(this.alpha);this.cosaz=Math.cos(this.alpha);if(this.lat0>=0){this.u=(this.al/this.bl)*Math.atan(Math.sqrt(this.d*this.d-1)/this.cosaz)}else{this.u=-(this.al/this.bl)*Math.atan(Math.sqrt(this.d*this.d-1)/this.cosaz)}}else{Proj4js.reportError("omerc:Init:DataError")}}else{this.sinphi=Math.sin(this.at1);this.ts1=Proj4js.common.tsfnz(this.e,this.lat1,this.sinphi);this.sinphi=Math.sin(this.lat2);this.ts2=Proj4js.common.tsfnz(this.e,this.lat2,this.sinphi);this.h=Math.pow(this.ts1,this.bl);this.l=Math.pow(this.ts2,this.bl);this.f=this.el/this.h;this.g=0.5*(this.f-1/this.f);this.j=(this.el*this.el-this.l*this.h)/(this.el*this.el+this.l*this.h);this.p=(this.l-this.h)/(this.l+this.h);this.dlon=this.lon1-this.lon2;if(this.dlon<-Proj4js.common.PI){this.lon2=this.lon2-2*Proj4js.common.PI}if(this.dlon>Proj4js.common.PI){this.lon2=this.lon2+2*Proj4js.common.PI}this.dlon=this.lon1-this.lon2;this.longc=0.5*(this.lon1+this.lon2)-Math.atan(this.j*Math.tan(0.5*this.bl*this.dlon)/this.p)/this.bl;this.dlon=Proj4js.common.adjust_lon(this.lon1-this.longc);this.gama=Math.atan(Math.sin(this.bl*this.dlon)/this.g);this.alpha=Proj4js.common.asinz(this.d*Math.sin(this.gama));if(Math.abs(this.lat1-this.lat2)<=Proj4js.common.EPSLN){Proj4js.reportError("omercInitDataError")}else{this.con=Math.abs(this.lat1)}if((this.con<=Proj4js.common.EPSLN)||(Math.abs(this.con-HALF_PI)<=Proj4js.common.EPSLN)){Proj4js.reportError("omercInitDataError")}else{if(Math.abs(Math.abs(this.lat0)-Proj4js.common.HALF_PI)<=Proj4js.common.EPSLN){Proj4js.reportError("omercInitDataError")}}this.singam=Math.sin(this.gam);this.cosgam=Math.cos(this.gam);this.sinaz=Math.sin(this.alpha);this.cosaz=Math.cos(this.alpha);if(this.lat0>=0){this.u=(this.al/this.bl)*Math.atan(Math.sqrt(this.d*this.d-1)/this.cosaz)}else{this.u=-(this.al/this.bl)*Math.atan(Math.sqrt(this.d*this.d-1)/this.cosaz)}}},forward:function(C){var m;var f,J;var I;var H,v,d;var h,D,F;var B,o,G;var w,E;var z;var a;var j;var g=C.x;var l=C.y;f=Math.sin(l);a=Proj4js.common.adjust_lon(g-this.longc);G=Math.sin(this.bl*a);if(Math.abs(Math.abs(l)-Proj4js.common.HALF_PI)>Proj4js.common.EPSLN){j=Proj4js.common.tsfnz(this.e,l,f);B=this.el/(Math.pow(j,this.bl));z=0.5*(B-1/B);v=0.5*(B+1/B);w=(z*this.singam-G*this.cosgam)/v;h=Math.cos(this.bl*a);if(Math.abs(h)<1e-7){o=this.al*this.bl*a}else{o=this.al*Math.atan((z*this.cosgam+G*this.singam)/h)/this.bl;if(h<0){o=o+Proj4js.common.PI*this.al/this.bl}}}else{if(l>=0){w=this.singam}else{w=-this.singam}o=this.al*l/this.bl}if(Math.abs(Math.abs(w)-1)<=Proj4js.common.EPSLN){Proj4js.reportError("omercFwdInfinity")}E=0.5*this.al*Math.log((1-w)/(1+w))/this.bl;o=o-this.u;var u=this.x0+E*this.cosaz+o*this.sinaz;var r=this.y0+o*this.cosaz-E*this.sinaz;C.x=u;C.y=r;return C},inverse:function(w){var J;var l;var g;var f,I;var H;var F,r,d;var h,z,D;var B,m,v,u,j;var E,o,G;var a;var C;w.x-=this.x0;w.y-=this.y0;C=0;B=w.x*this.cosaz-w.y*this.sinaz;m=w.y*this.cosaz+w.x*this.sinaz;m=m+this.u;v=Math.exp(-this.bl*B/this.al);u=0.5*(v-1/v);r=0.5*(v+1/v);E=Math.sin(this.bl*m/this.al);o=(E*this.cosgam+u*this.singam)/r;if(Math.abs(Math.abs(o)-1)<=Proj4js.common.EPSLN){lon=this.longc;if(o>=0){lat=Proj4js.common.HALF_PI}else{lat=-Proj4js.common.HALF_PI}}else{h=1/this.bl;j=Math.pow((this.el/Math.sqrt((1+o)/(1-o))),h);lat=Proj4js.common.phi2z(this.e,j);l=this.longc-Math.atan2((u*this.cosgam-E*this.singam),h)/this.bl;lon=Proj4js.common.adjust_lon(l)}w.x=lon;w.y=lat;return w}};Proj4js.Proj.ortho={init:function(a){this.sin_p14=Math.sin(this.lat0);this.cos_p14=Math.cos(this.lat0)},forward:function(d){var a,f;var r;var q;var h;var j;var b=d.x;var l=d.y;r=Proj4js.common.adjust_lon(b-this.long0);a=Math.sin(l);f=Math.cos(l);q=Math.cos(r);j=this.sin_p14*a+this.cos_p14*f*q;h=1;if((j>0)||(Math.abs(j)<=Proj4js.common.EPSLN)){var o=this.a*h*f*Math.sin(r);var m=this.y0+this.a*h*(this.cos_p14*a-this.sin_p14*f*q)}else{Proj4js.reportError("orthoFwdPointError")}d.x=o;d.y=m;return d},inverse:function(b){var j;var h;var f,m;var l;var d;var a,g;b.x-=this.x0;b.y-=this.y0;j=Math.sqrt(b.x*b.x+b.y*b.y);if(j>this.a+1e-7){Proj4js.reportError("orthoInvDataError")}h=Proj4js.common.asinz(j/this.a);f=Math.sin(h);m=Math.cos(h);a=this.long0;if(Math.abs(j)<=Proj4js.common.EPSLN){g=this.lat0}g=Proj4js.common.asinz(m*this.sin_p14+(b.y*f*this.cos_p14)/j);d=Math.abs(this.lat0)-Proj4js.common.HALF_PI;if(Math.abs(d)<=Proj4js.common.EPSLN){if(this.lat0>=0){a=Proj4js.common.adjust_lon(this.long0+Math.atan2(b.x,-b.y))}else{a=Proj4js.common.adjust_lon(this.long0-Math.atan2(-b.x,b.y))}}d=m-this.sin_p14*Math.sin(g);b.x=a;b.y=g;return b}};function phi4z(f,m,l,j,h,E,D,C,g){var o,B,w,z,u,r,q,p,d,v;g=E;for(v=1;v<=15;v++){o=Math.sin(g);tanphi=Math.tan(g);C=tanphi*Math.sqrt(1-f*o*o);B=Math.sin(2*g);z=m*g-l*B+j*Math.sin(4*g)-h*Math.sin(6*g);u=m-2*l*Math.cos(2*g)+4*j*Math.cos(4*g)-6*h*Math.cos(6*g);r=2*z+C*(z*z+D)-2*E*(C*z+1);q=f*B*(z*z+D-2*E*z)/(2*C);p=2*(E-z)*(C*u-2/B)-2*u;d=r/(q+p);g+=d;if(Math.abs(d)<=1e-10){return(g)}}Proj4js.reportError("phi4z: No convergence");return null}function e4fn(a){var b,d;b=1+a;d=1-a;return(Math.sqrt((Math.pow(b,b))*(Math.pow(d,d))))}Proj4js.Proj.poly={init:function(){var a;if(this.lat0=0){this.lat0=90}this.temp=this.b/this.a;this.es=1-Math.pow(this.temp,2);this.e=Math.sqrt(this.es);this.e0=Proj4js.common.e0fn(this.es);this.e1=Proj4js.common.e1fn(this.es);this.e2=Proj4js.common.e2fn(this.es);this.e3=Proj4js.common.e3fn(this.es);this.ml0=Proj4js.common.mlfn(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(f){var a,h;var l;var o;var g,j;var d;var r,q;var b=f.x;var m=f.y;g=Proj4js.common.adjust_lon(b-this.long0);if(Math.abs(m)<=1e-7){r=this.x0+this.a*g;q=this.y0-this.a*this.ml0}else{a=Math.sin(m);h=Math.cos(m);j=Proj4js.common.mlfn(this.e0,this.e1,this.e2,this.e3,m);d=Proj4js.common.msfnz(this.e,a,h);g=a;r=this.x0+this.a*d*Math.sin(g)/a;q=this.y0+this.a*(j-this.ml0+d*(1-Math.cos(g))/a)}f.x=r;f.y=q;return f},inverse:function(d){var q,j;var h;var r;var m;var f,g;var o;var a,l;d.x-=this.x0;d.y-=this.y0;h=this.ml0+d.y/this.a;o=0;if(Math.abs(h)<=1e-7){a=d.x/this.a+this.long0;l=0}else{r=h*h+(d.x/this.a)*(d.x/this.a);o=phi4z(this.es,this.e0,this.e1,this.e2,this.e3,this.al,r,m,l);if(o!=1){return(o)}a=Proj4js.common.adjust_lon((Proj4js.common.asinz(d.x*m/this.a)/Math.sin(l))+this.long0)}d.x=a;d.y=l;return d}};Proj4js.Proj.sinu={init:function(){this.R=6370997},forward:function(f){var a,h,b;var g=f.x;var d=f.y;b=Proj4js.common.adjust_lon(g-this.long0);a=this.R*b*Math.cos(d)+this.x0;h=this.R*d+this.y0;f.x=a;f.y=h;return f},inverse:function(d){var b,a,f;d.x-=this.x0;d.y-=this.y0;b=d.y/this.R;if(Math.abs(b)>Proj4js.common.HALF_PI){Proj4js.reportError("sinu:Inv:DataError")}a=Math.abs(b)-Proj4js.common.HALF_PI;if(Math.abs(a)>Proj4js.common.EPSLN){a=this.long0+d.x/(this.R*Math.cos(b));f=Proj4js.common.adjust_lon(a)}else{f=this.long0}d.x=f;d.y=b;return d}};Proj4js.Proj.somerc={init:function(){var b=this.lat0;this.lambda0=this.long0;var a=Math.sin(b);var f=this.a;var d=this.rf;var g=1/d;var j=2*g-Math.pow(g,2);var h=this.e=Math.sqrt(j);this.R=this.k0*f*Math.sqrt(1-j)/(1-j*Math.pow(a,2));this.alpha=Math.sqrt(1+j/(1-j)*Math.pow(Math.cos(b),4));this.b0=Math.asin(a/this.alpha);this.K=Math.log(Math.tan(Math.PI/4+this.b0/2))-this.alpha*Math.log(Math.tan(Math.PI/4+b/2))+this.alpha*h/2*Math.log((1+h*a)/(1-h*a))},forward:function(h){var m=Math.log(Math.tan(Math.PI/4-h.y/2));var j=this.e/2*Math.log((1+this.e*Math.sin(h.y))/(1-this.e*Math.sin(h.y)));var f=-this.alpha*(m+j)+this.K;var a=2*(Math.atan(Math.exp(f))-Math.PI/4);var d=this.alpha*(h.x-this.lambda0);var l=Math.atan(Math.sin(d)/(Math.sin(this.b0)*Math.tan(a)+Math.cos(this.b0)*Math.cos(d)));var g=Math.asin(Math.cos(this.b0)*Math.sin(a)-Math.sin(this.b0)*Math.cos(a)*Math.cos(d));h.y=this.R/2*Math.log((1+Math.sin(g))/(1-Math.sin(g)))+this.y0;h.x=this.R*l+this.x0;return h},inverse:function(f){var d=f.x-this.x0;var g=f.y-this.y0;var r=d/this.R;var h=2*(Math.atan(Math.exp(g/this.R))-Math.PI/4);var o=Math.asin(Math.cos(this.b0)*Math.sin(h)+Math.sin(this.b0)*Math.cos(h)*Math.cos(r));var q=Math.atan(Math.sin(r)/(Math.cos(this.b0)*Math.cos(r)-Math.sin(this.b0)*Math.tan(h)));var m=this.lambda0+q/this.alpha;var l=0;var u=o;var a=-1000;var j=0;while(Math.abs(u-a)>1e-7){if(++j>20){Proj4js.reportError("omercFwdInfinity");return}l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+o/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(u))/2));a=u;u=2*Math.atan(Math.exp(l))-Math.PI/2}f.x=m;f.y=u;return f}};Proj4js.Proj.stere={ssfn_:function(a,d,b){d*=b;return(Math.tan(0.5*(Proj4js.common.HALF_PI+a))*Math.pow((1-d)/(1+d),0.5*b))},TOL:1e-8,NITER:8,CONV:1e-10,S_POLE:0,N_POLE:1,OBLIQ:2,EQUIT:3,init:function(){this.phits=this.lat_ts?this.lat_ts:Proj4js.common.HALF_PI;var a=Math.abs(this.lat0);if((Math.abs(a)-Proj4js.common.HALF_PI)<Proj4js.common.EPSLN){this.mode=this.lat0<0?this.S_POLE:this.N_POLE}else{this.mode=a>Proj4js.common.EPSLN?this.OBLIQ:this.EQUIT}this.phits=Math.abs(this.phits);if(this.es){var b;switch(this.mode){case this.N_POLE:case this.S_POLE:if(Math.abs(this.phits-Proj4js.common.HALF_PI)<Proj4js.common.EPSLN){this.akm1=2*this.k0/Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e))}else{a=Math.sin(this.phits);this.akm1=Math.cos(this.phits)/Proj4js.common.tsfnz(this.e,this.phits,a);a*=this.e;this.akm1/=Math.sqrt(1-a*a)}break;case this.EQUIT:this.akm1=2*this.k0;break;case this.OBLIQ:a=Math.sin(this.lat0);b=2*Math.atan(this.ssfn_(this.lat0,a,this.e))-Proj4js.common.HALF_PI;a*=this.e;this.akm1=2*this.k0*Math.cos(this.lat0)/Math.sqrt(1-a*a);this.sinX1=Math.sin(b);this.cosX1=Math.cos(b);break}}else{switch(this.mode){case this.OBLIQ:this.sinph0=Math.sin(this.lat0);this.cosph0=Math.cos(this.lat0);case this.EQUIT:this.akm1=2*this.k0;break;case this.S_POLE:case this.N_POLE:this.akm1=Math.abs(this.phits-Proj4js.common.HALF_PI)>=Proj4js.common.EPSLN?Math.cos(this.phits)/Math.tan(Proj4js.common.FORTPI-0.5*this.phits):2*this.k0;break}}},forward:function(d){var b=d.x;b=Proj4js.common.adjust_lon(b-this.long0);var h=d.y;var m,j;if(this.sphere){var a,f,l,g;a=Math.sin(h);f=Math.cos(h);l=Math.cos(b);g=Math.sin(b);switch(this.mode){case this.EQUIT:j=1+f*l;if(j<=Proj4js.common.EPSLN){F_ERROR}j=this.akm1/j;m=j*f*g;j*=a;break;case this.OBLIQ:j=1+this.sinph0*a+this.cosph0*f*l;if(j<=Proj4js.common.EPSLN){F_ERROR}j=this.akm1/j;m=j*f*g;j*=this.cosph0*a-this.sinph0*f*l;break;case this.N_POLE:l=-l;h=-h;case this.S_POLE:if(Math.abs(h-Proj4js.common.HALF_PI)<this.TOL){F_ERROR}j=this.akm1*Math.tan(Proj4js.common.FORTPI+0.5*h);m=g*j;j*=l;break}}else{l=Math.cos(b);g=Math.sin(b);a=Math.sin(h);if(this.mode==this.OBLIQ||this.mode==this.EQUIT){X=2*Math.atan(this.ssfn_(h,a,this.e));sinX=Math.sin(X-Proj4js.common.HALF_PI);cosX=Math.cos(X)}switch(this.mode){case this.OBLIQ:A=this.akm1/(this.cosX1*(1+this.sinX1*sinX+this.cosX1*cosX*l));j=A*(this.cosX1*sinX-this.sinX1*cosX*l);m=A*cosX;break;case this.EQUIT:A=2*this.akm1/(1+cosX*l);j=A*sinX;m=A*cosX;break;case this.S_POLE:h=-h;l=-l;a=-a;case this.N_POLE:m=this.akm1*Proj4js.common.tsfnz(this.e,h,a);j=-m*l;break}m=m*g}d.x=m*this.a+this.x0;d.y=j*this.a+this.y0;return d},inverse:function(d){var w=(d.x-this.x0)/this.a;var r=(d.y-this.y0)/this.a;var b,q;var j,a,v=0,f=0,u,h=0,m=0;var l;if(this.sphere){var o,z,g,B;z=Math.sqrt(w*w+r*r);o=2*Math.atan(z/this.akm1);g=Math.sin(o);B=Math.cos(o);b=0;switch(this.mode){case this.EQUIT:if(Math.abs(z)<=Proj4js.common.EPSLN){q=0}else{q=Math.asin(r*g/z)}if(B!=0||w!=0){b=Math.atan2(w*g,B*z)}break;case this.OBLIQ:if(Math.abs(z)<=Proj4js.common.EPSLN){q=this.phi0}else{q=Math.asin(B*sinph0+r*g*cosph0/z)}o=B-sinph0*Math.sin(q);if(o!=0||w!=0){b=Math.atan2(w*g*cosph0,o*z)}break;case this.N_POLE:r=-r;case this.S_POLE:if(Math.abs(z)<=Proj4js.common.EPSLN){q=this.phi0}else{q=Math.asin(this.mode==this.S_POLE?-B:B)}b=(w==0&&r==0)?0:Math.atan2(w,r);break}d.x=Proj4js.common.adjust_lon(b+this.long0);d.y=q}else{u=Math.sqrt(w*w+r*r);switch(this.mode){case this.OBLIQ:case this.EQUIT:v=2*Math.atan2(u*this.cosX1,this.akm1);j=Math.cos(v);a=Math.sin(v);if(u==0){f=Math.asin(j*this.sinX1)}else{f=Math.asin(j*this.sinX1+(r*a*this.cosX1/u))}v=Math.tan(0.5*(Proj4js.common.HALF_PI+f));w*=a;r=u*this.cosX1*j-r*this.sinX1*a;m=Proj4js.common.HALF_PI;h=0.5*this.e;break;case this.N_POLE:r=-r;case this.S_POLE:v=-u/this.akm1;f=Proj4js.common.HALF_PI-2*Math.atan(v);m=-Proj4js.common.HALF_PI;h=-0.5*this.e;break}for(l=this.NITER;l--;f=q){a=this.e*Math.sin(f);q=2*Math.atan(v*Math.pow((1+a)/(1-a),h))-m;if(Math.abs(f-q)<this.CONV){if(this.mode==this.S_POLE){q=-q}b=(w==0&&r==0)?0:Math.atan2(w,r);d.x=Proj4js.common.adjust_lon(b+this.long0);d.y=q;return d}}}}};Proj4js.Proj.sterea={dependsOn:"gauss",init:function(){Proj4js.Proj.gauss.init.apply(this);if(!this.rc){Proj4js.reportError("sterea:init:E_ERROR_0");return}this.sinc0=Math.sin(this.phic0);this.cosc0=Math.cos(this.phic0);this.R2=2*this.rc;if(!this.title){this.title="Oblique Stereographic Alternative"}},forward:function(a){a.x=Proj4js.common.adjust_lon(a.x-this.long0);Proj4js.Proj.gauss.forward.apply(this,[a]);sinc=Math.sin(a.y);cosc=Math.cos(a.y);cosl=Math.cos(a.x);k=this.k0*this.R2/(1+this.sinc0*sinc+this.cosc0*cosc*cosl);a.x=k*cosc*Math.sin(a.x);a.y=k*(this.cosc0*sinc-this.sinc0*cosc*cosl);a.x=this.a*a.x+this.x0;a.y=this.a*a.y+this.y0;return a},inverse:function(b){var d,a;b.x=(b.x-this.x0)/this.a;b.y=(b.y-this.y0)/this.a;b.x/=this.k0;b.y/=this.k0;if((rho=Math.sqrt(b.x*b.x+b.y*b.y))){c=2*Math.atan2(rho,this.R2);sinc=Math.sin(c);cosc=Math.cos(c);a=Math.asin(cosc*this.sinc0+b.y*sinc*this.cosc0/rho);d=Math.atan2(b.x*sinc,rho*this.cosc0*cosc-b.y*this.sinc0*sinc)}else{a=this.phic0;d=0}b.x=d;b.y=a;Proj4js.Proj.gauss.inverse.apply(this,[b]);b.x=Proj4js.common.adjust_lon(b.x+this.long0);return b}};Proj4js.Proj.tmerc={init:function(){this.e0=Proj4js.common.e0fn(this.es);this.e1=Proj4js.common.e1fn(this.es);this.e2=Proj4js.common.e2fn(this.es);this.e3=Proj4js.common.e3fn(this.es);this.ml0=this.a*Proj4js.common.mlfn(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(d){var a=d.x;var r=d.y;var h=Proj4js.common.adjust_lon(a-this.long0);var f;var B,w;var z=Math.sin(r);var o=Math.cos(r);if(this.sphere){var v=o*Math.sin(h);if((Math.abs(Math.abs(v)-1))<1e-10){Proj4js.reportError("tmerc:forward: Point projects into infinity");return(93)}else{B=0.5*this.a*this.k0*Math.log((1+v)/(1-v));f=Math.acos(o*Math.cos(h)/Math.sqrt(1-v*v));if(r<0){f=-f}w=this.a*this.k0*(f-this.lat0)}}else{var m=o*h;var l=Math.pow(m,2);var q=this.ep2*Math.pow(o,2);var u=Math.tan(r);var C=Math.pow(u,2);f=1-this.es*Math.pow(z,2);var g=this.a/Math.sqrt(f);var j=this.a*Proj4js.common.mlfn(this.e0,this.e1,this.e2,this.e3,r);B=this.k0*g*m*(1+l/6*(1-C+q+l/20*(5-18*C+Math.pow(C,2)+72*q-58*this.ep2)))+this.x0;w=this.k0*(j-this.ml0+g*u*(l*(0.5+l/24*(5-C+9*q+4*Math.pow(q,2)+l/30*(61-58*C+Math.pow(C,2)+600*q-330*this.ep2)))))+this.y0}d.x=B;d.y=w;return d},inverse:function(E){var m,j;var N;var G;var u=6;var q,l;if(this.sphere){var J=Math.exp(E.x/(this.a*this.k0));var I=0.5*(J-1/J);var L=this.lat0+E.y/(this.a*this.k0);var H=Math.cos(L);m=Math.sqrt((1-H*H)/(1+I*I));q=Proj4js.common.asinz(m);if(L<0){q=-q}if((I==0)&&(H==0)){l=this.long0}else{l=Proj4js.common.adjust_lon(Math.atan2(I,H)+this.long0)}}else{var w=E.x-this.x0;var v=E.y-this.y0;m=(this.ml0+v/this.k0)/this.a;j=m;for(G=0;true;G++){N=((m+this.e1*Math.sin(2*j)-this.e2*Math.sin(4*j)+this.e3*Math.sin(6*j))/this.e0)-j;j+=N;if(Math.abs(N)<=Proj4js.common.EPSLN){break}if(G>=u){Proj4js.reportError("tmerc:inverse: Latitude failed to converge");return(95)}}if(Math.abs(j)<Proj4js.common.HALF_PI){var b=Math.sin(j);var O=Math.cos(j);var z=Math.tan(j);var M=this.ep2*Math.pow(O,2);var o=Math.pow(M,2);var B=Math.pow(z,2);var a=Math.pow(B,2);m=1-this.es*Math.pow(b,2);var F=this.a/Math.sqrt(m);var C=F*(1-this.es)/m;var K=w/(F*this.k0);var D=Math.pow(K,2);q=j-(F*z*D/C)*(0.5-D/24*(5+3*B+10*M-4*o-9*this.ep2-D/30*(61+90*B+298*M+45*a-252*this.ep2-3*o)));l=Proj4js.common.adjust_lon(this.long0+(K*(1-D/6*(1+2*B+M-D/20*(5-2*M+28*B-3*o+8*this.ep2+24*a)))/O))}else{q=Proj4js.common.HALF_PI*Proj4js.common.sign(v);l=this.long0}}E.x=l;E.y=q;return E}};Proj4js.Proj.utm={dependsOn:"tmerc",init:function(){if(!this.zone){Proj4js.reportError("utm:init: zone must be specified for UTM");return}this.lat0=0;this.long0=((6*Math.abs(this.zone))-183)*Proj4js.common.D2R;this.x0=500000;this.y0=this.utmSouth?10000000:0;this.k0=0.9996;Proj4js.Proj.tmerc.init.apply(this);this.forward=Proj4js.Proj.tmerc.forward;this.inverse=Proj4js.Proj.tmerc.inverse}};Proj4js.Proj.vandg={init:function(){this.R=6370997},forward:function(d){var a=d.x;var v=d.y;var C=Proj4js.common.adjust_lon(a-this.long0);var B,w;if(Math.abs(v)<=Proj4js.common.EPSLN){B=this.x0+this.R*C;w=this.y0}var h=Proj4js.common.asinz(2*Math.abs(v/Proj4js.common.PI));if((Math.abs(C)<=Proj4js.common.EPSLN)||(Math.abs(Math.abs(v)-Proj4js.common.HALF_PI)<=Proj4js.common.EPSLN)){B=this.x0;if(v>=0){w=this.y0+Proj4js.common.PI*this.R*Math.tan(0.5*h)}else{w=this.y0+Proj4js.common.PI*this.R*-Math.tan(0.5*h)}}var r=0.5*Math.abs((Proj4js.common.PI/C)-(C/Proj4js.common.PI));var f=r*r;var u=Math.sin(h);var q=Math.cos(h);var o=q/(u+q-1);var l=o*o;var j=o*(2/u-1);var z=j*j;var b=Proj4js.common.PI*this.R*(r*(o-z)+Math.sqrt(f*(o-z)*(o-z)-(z+f)*(l-z)))/(z+f);if(C<0){b=-b}B=this.x0+b;b=Math.abs(b/(Proj4js.common.PI*this.R));if(v>=0){w=this.y0+Proj4js.common.PI*this.R*Math.sqrt(1-b*b-2*r*b)}else{w=this.y0-Proj4js.common.PI*this.R*Math.sqrt(1-b*b-2*r*b)}d.x=B;d.y=w;return d},inverse:function(g){var z;var a,r,w,m,l,j;var o,h;var f;var v;var b;var u;var q;g.x-=this.x0;g.y-=this.y0;b=Proj4js.common.PI*this.R;a=g.x/b;r=g.y/b;w=a*a+r*r;m=-Math.abs(r)*(1+w);l=m-2*r*r+a*a;j=-2*m+1+2*r*r+w*w;q=r*r/j+(2*l*l*l/j/j/j-9*m*l/j/j)/27;f=(m-l*l/3/j)/j;v=2*Math.sqrt(-f/3);b=((3*q)/f)/v;if(Math.abs(b)>1){if(b>=0){b=1}else{b=-1}}u=Math.acos(b)/3;if(g.y>=0){lat=(-v*Math.cos(u+Proj4js.common.PI/3)-l/3/j)*Proj4js.common.PI}else{lat=-(-v*Math.cos(u+Proj4js.common.PI/3)-l/3/j)*Proj4js.common.PI}if(Math.abs(a)<Proj4js.common.EPSLN){lon=this.long0}lon=Proj4js.common.adjust_lon(this.long0+Proj4js.common.PI*(w-1+Math.sqrt(1+2*(a*a-r*r)+w*w))/2/a);g.x=lon;g.y=lat;return g}};Proj4js.defs["CRS:84"]="+title=WGS 84 longitude-latitude +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs ";Proj4js.defs["EPSG:2056"]="+title=CH1903+ / LV95 +proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +x_0=2600000 +y_0=1200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs ";Proj4js.defs["EPSG:2154"]="+title=RGF93 / Lambert-93 +proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ";Proj4js.defs["EPSG:21781"]="+title=CH1903 / LV03 +proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +x_0=600000 +y_0=200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs ";Proj4js.defs["EPSG:2213"]="+title=ETRS89 / TM 30 NE +proj=tmerc +lat_0=0 +lon_0=30 +k=0.9996 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs ";Proj4js.defs["EPSG:25830"]="+title=ETRS89 / UTM zone 30N +proj=utm +zone=30 +ellps=GRS80 +units=m +no_defs ";Proj4js.defs["EPSG:25831"]="+title=ETRS89 / UTM zone 31N +proj=utm +zone=31 +ellps=GRS80 +units=m +no_defs ";Proj4js.defs["EPSG:25832"]="+title=ETRS89 / UTM zone 32N +proj=utm +zone=32 +ellps=GRS80 +units=m +no_defs ";Proj4js.defs["EPSG:27561"]="+title=NTF (Paris) / Lambert Nord France +proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=0 +k_0=0.999877341 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ";Proj4js.defs["EPSG:27562"]="+title=NTF (Paris) / Lambert Centre France +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ";Proj4js.defs["EPSG:27563"]="+title=NTF (Paris) / Lambert Sud France +proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=0 +k_0=0.9998774990000001 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ";Proj4js.defs["EPSG:27564"]="+title=NTF (Paris) / Lambert Corse +proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000001 +lon_0=0 +k_0=0.9999447100000001 +x_0=234.358 +y_0=185861.369 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ";Proj4js.defs["EPSG:27571"]="+title=NTF (Paris) / Lambert zone I +proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=0 +k_0=0.999877341 +x_0=600000 +y_0=1200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ";Proj4js.defs["EPSG:27572"]="+title=NTF (Paris) / Lambert zone II +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ";Proj4js.defs["EPSG:27573"]="+title=NTF (Paris) / Lambert zone III +proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=0 +k_0=0.9998774990000001 +x_0=600000 +y_0=3200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ";Proj4js.defs["EPSG:27574"]="+title=NTF (Paris) / Lambert zone IV +proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000001 +lon_0=0 +k_0=0.9999447100000001 +x_0=234.358 +y_0=4185861.369 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ";Proj4js.defs["EPSG:27581"]="+title=NTF (Paris) / France I (deprecated) +proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=0 +k_0=0.999877341 +x_0=600000 +y_0=1200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ";Proj4js.defs["EPSG:27582"]="+title=NTF (Paris) / France II (deprecated) +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ";Proj4js.defs["EPSG:27583"]="+title=NTF (Paris) / France III (deprecated) +proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=0 +k_0=0.9998774990000001 +x_0=600000 +y_0=3200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ";Proj4js.defs["EPSG:27584"]="+title=NTF (Paris) / France IV (deprecated) +proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000001 +lon_0=0 +k_0=0.9999447100000001 +x_0=234.358 +y_0=4185861.369 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ";Proj4js.defs["EPSG:27591"]="+title=NTF (Paris) / Nord France (deprecated) +proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=0 +k_0=0.999877341 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ";Proj4js.defs["EPSG:27592"]="+title=NTF (Paris) / Centre France (deprecated) +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ";Proj4js.defs["EPSG:27593"]="+title=NTF (Paris) / Sud France (deprecated) +proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=0 +k_0=0.9998774990000001 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ";Proj4js.defs["EPSG:27594"]="+title=NTF (Paris) / Corse (deprecated) +proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000001 +lon_0=0 +k_0=0.9999447100000001 +x_0=234.358 +y_0=185861.369 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ";Proj4js.defs["EPSG:2969"]="+title=Fort Marigot / UTM zone 20N +proj=utm +zone=20 +ellps=intl +towgs84=137,248,-430,0,0,0,0 +units=m +no_defs ";Proj4js.defs["EPSG:2970"]="+title=Guadeloupe 1948 / UTM zone 20N +proj=utm +zone=20 +ellps=intl +units=m +no_defs ";Proj4js.defs["EPSG:2971"]="+title=CSG67 / UTM zone 22N +proj=utm +zone=22 +ellps=intl +towgs84=-186,230,110,0,0,0,0 +units=m +no_defs ";Proj4js.defs["EPSG:2972"]="+title=RGFG95 / UTM zone 22N +proj=utm +zone=22 +ellps=GRS80 +towgs84=2,2,-2,0,0,0,0 +units=m +no_defs ";Proj4js.defs["EPSG:2973"]="+title=Martinique 1938 / UTM zone 20N +proj=utm +zone=20 +ellps=intl +units=m +no_defs ";Proj4js.defs["EPSG:2975"]="+title=RGR92 / UTM zone 40S +proj=utm +zone=40 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ";Proj4js.defs["EPSG:2976"]="+title=Tahiti 52 / UTM zone 6S +proj=utm +zone=6 +south +ellps=intl +towgs84=162,117,154,0,0,0,0 +units=m +no_defs ";Proj4js.defs["EPSG:2977"]="+title=Tahaa 54 / UTM zone 5S +proj=utm +zone=5 +south +ellps=intl +units=m +no_defs ";Proj4js.defs["EPSG:2978"]="+title=IGN72 Nuku Hiva / UTM zone 7S +proj=utm +zone=7 +south +ellps=intl +units=m +no_defs ";Proj4js.defs["EPSG:2980"]="+title=Combani 1950 / UTM zone 38S +proj=utm +zone=38 +south +ellps=intl +towgs84=-382,-59,-262,0,0,0,0 +units=m +no_defs ";Proj4js.defs["EPSG:2981"]="+title=IGN56 Lifou / UTM zone 58S +proj=utm +zone=58 +south +ellps=intl +units=m +no_defs ";Proj4js.defs["EPSG:2982"]="+title=IGN72 Grand Terre / UTM zone 58S (deprecated) +proj=utm +zone=58 +south +ellps=intl +units=m +no_defs ";Proj4js.defs["EPSG:2984"]="+title=RGNC 1991 / Lambert New Caledonia (deprecated) +proj=lcc +lat_1=-20.66666666666667 +lat_2=-22.33333333333333 +lat_0=-21.5 +lon_0=166 +x_0=400000 +y_0=300000 +ellps=intl +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ";Proj4js.defs["EPSG:2987"]="+title=Saint Pierre et Miquelon 1950 / UTM zone 21N +proj=utm +zone=21 +ellps=clrk66 +towgs84=30,430,368,0,0,0,0 +units=m +no_defs ";Proj4js.defs["EPSG:2989"]="+title=RRAF 1991 / UTM zone 20N +proj=utm +zone=20 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ";Proj4js.defs["EPSG:2990"]="+title=Reunion 1947 / TM Reunion (deprecated) +proj=tmerc +lat_0=-21.11666666666667 +lon_0=55.53333333333333 +k=1 +x_0=50000 +y_0=160000 +ellps=intl +units=m +no_defs ";Proj4js.defs["EPSG:2995"]="+title=IGN53 Mare / UTM zone 58S +proj=utm +zone=58 +south +ellps=intl +units=m +no_defs ";Proj4js.defs["EPSG:3034"]="+title=ETRS89 / ETRS-LCC +proj=lcc +lat_1=35 +lat_2=65 +lat_0=52 +lon_0=10 +x_0=4000000 +y_0=2800000 +ellps=GRS80 +units=m +no_defs ";Proj4js.defs["EPSG:3035"]="+title=ETRS89 / ETRS-LAEA +proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +ellps=GRS80 +units=m +no_defs ";Proj4js.defs["EPSG:3042"]="+title=ETRS89 / ETRS-TM30 +proj=utm +zone=30 +ellps=GRS80 +units=m +no_defs ";Proj4js.defs["EPSG:3043"]="+title=ETRS89 / ETRS-TM31 +proj=utm +zone=31 +ellps=GRS80 +units=m +no_defs ";Proj4js.defs["EPSG:3044"]="+title=ETRS89 / ETRS-TM32 +proj=utm +zone=32 +ellps=GRS80 +units=m +no_defs ";Proj4js.defs["EPSG:3060"]="+title=IGN72 Grande Terre / UTM zone 58S +proj=utm +zone=58 +south +ellps=intl +units=m +no_defs ";Proj4js.defs["EPSG:3163"]="+title=RGNC91-93 / Lambert New Caledonia +proj=lcc +lat_1=-20.66666666666667 +lat_2=-22.33333333333333 +lat_0=-21.5 +lon_0=166 +x_0=400000 +y_0=300000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ";Proj4js.defs["EPSG:3164"]="+title=ST87 Ouvea / UTM zone 58S +proj=utm +zone=58 +south +ellps=WGS84 +towgs84=-56.263,16.136,-22.856,0,0,0,0 +units=m +no_defs ";Proj4js.defs["EPSG:3165"]="+title=NEA74 Noumea / Noumea Lambert +proj=lcc +lat_1=-22.24469175 +lat_2=-22.29469175 +lat_0=-22.26969175 +lon_0=166.44242575 +x_0=0.66 +y_0=1.02 +ellps=intl +units=m +no_defs ";Proj4js.defs["EPSG:3166"]="+title=NEA74 Noumea / Noumea Lambert 2 +proj=lcc +lat_1=-22.24472222222222 +lat_2=-22.29472222222222 +lat_0=-22.26972222222222 +lon_0=166.4425 +x_0=8.313000000000001 +y_0=-2.354 +ellps=intl +units=m +no_defs ";Proj4js.defs["EPSG:3169"]="+title=RGNC91-93 / UTM zone 57S +proj=utm +zone=57 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ";Proj4js.defs["EPSG:3170"]="+title=RGNC91-93 / UTM zone 58S +proj=utm +zone=58 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ";Proj4js.defs["EPSG:3171"]="+title=RGNC91-93 / UTM zone 59S +proj=utm +zone=59 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ";Proj4js.defs["EPSG:3172"]="+title=IGN53 Mare / UTM zone 59S +proj=utm +zone=59 +south +ellps=intl +units=m +no_defs ";Proj4js.defs["EPSG:32601"]="+proj=utm +zone=1 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32602"]="+proj=utm +zone=2 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32603"]="+proj=utm +zone=3 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32604"]="+proj=utm +zone=4 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32605"]="+proj=utm +zone=5 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32606"]="+proj=utm +zone=6 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32607"]="+proj=utm +zone=7 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32608"]="+proj=utm +zone=8 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32609"]="+proj=utm +zone=9 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32610"]="+proj=utm +zone=10 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32611"]="+proj=utm +zone=11 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32612"]="+proj=utm +zone=12 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32613"]="+proj=utm +zone=13 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32614"]="+proj=utm +zone=14 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32615"]="+proj=utm +zone=15 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32616"]="+proj=utm +zone=16 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32617"]="+proj=utm +zone=17 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32618"]="+proj=utm +zone=18 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32619"]="+proj=utm +zone=19 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32620"]="+proj=utm +zone=20 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32621"]="+proj=utm +zone=21 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32622"]="+proj=utm +zone=22 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32623"]="+proj=utm +zone=23 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32624"]="+proj=utm +zone=24 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32625"]="+proj=utm +zone=25 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32626"]="+proj=utm +zone=26 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32627"]="+proj=utm +zone=27 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32628"]="+proj=utm +zone=28 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32629"]="+proj=utm +zone=29 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32630"]="+proj=utm +zone=30 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32631"]="+proj=utm +zone=31 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32632"]="+proj=utm +zone=32 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32633"]="+proj=utm +zone=33 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32634"]="+proj=utm +zone=34 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32635"]="+proj=utm +zone=35 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32636"]="+proj=utm +zone=36 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32637"]="+proj=utm +zone=37 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32638"]="+proj=utm +zone=38 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32639"]="+proj=utm +zone=39 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32640"]="+proj=utm +zone=40 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32641"]="+proj=utm +zone=41 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32642"]="+proj=utm +zone=42 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32643"]="+proj=utm +zone=43 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32644"]="+proj=utm +zone=44 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32645"]="+proj=utm +zone=45 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32646"]="+proj=utm +zone=46 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32647"]="+proj=utm +zone=47 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32648"]="+proj=utm +zone=48 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32649"]="+proj=utm +zone=49 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32650"]="+proj=utm +zone=50 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32651"]="+proj=utm +zone=51 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32652"]="+proj=utm +zone=52 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32653"]="+proj=utm +zone=53 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32654"]="+proj=utm +zone=54 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32655"]="+proj=utm +zone=55 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32656"]="+proj=utm +zone=56 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32657"]="+proj=utm +zone=57 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32658"]="+proj=utm +zone=58 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32659"]="+proj=utm +zone=59 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32660"]="+proj=utm +zone=60 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32661"]="+proj=stere +lat_0=90 +lat_ts=90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32662"]="+title=WGS 84 / Plate Carree +proj=eqc +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32701"]="+proj=utm +zone=1 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32702"]="+proj=utm +zone=2 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32703"]="+proj=utm +zone=3 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32704"]="+proj=utm +zone=4 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32705"]="+proj=utm +zone=5 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32706"]="+proj=utm +zone=6 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32707"]="+proj=utm +zone=7 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32708"]="+proj=utm +zone=8 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32709"]="+proj=utm +zone=9 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32710"]="+proj=utm +zone=10 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32711"]="+proj=utm +zone=11 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32712"]="+proj=utm +zone=12 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32713"]="+proj=utm +zone=13 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32714"]="+proj=utm +zone=14 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32715"]="+proj=utm +zone=15 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32716"]="+proj=utm +zone=16 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32717"]="+proj=utm +zone=17 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32718"]="+proj=utm +zone=18 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32719"]="+proj=utm +zone=19 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32720"]="+proj=utm +zone=20 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32721"]="+proj=utm +zone=21 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32722"]="+proj=utm +zone=22 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32723"]="+proj=utm +zone=23 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32724"]="+proj=utm +zone=24 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32725"]="+proj=utm +zone=25 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32726"]="+proj=utm +zone=26 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32727"]="+proj=utm +zone=27 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32728"]="+proj=utm +zone=28 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32729"]="+proj=utm +zone=29 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32730"]="+proj=utm +zone=30 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32731"]="+proj=utm +zone=31 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32732"]="+proj=utm +zone=32 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32733"]="+proj=utm +zone=33 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32734"]="+proj=utm +zone=34 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32735"]="+proj=utm +zone=35 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32736"]="+proj=utm +zone=36 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32737"]="+proj=utm +zone=37 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32738"]="+proj=utm +zone=38 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32739"]="+proj=utm +zone=39 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32740"]="+proj=utm +zone=40 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32741"]="+proj=utm +zone=41 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32742"]="+proj=utm +zone=42 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32743"]="+proj=utm +zone=43 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32744"]="+proj=utm +zone=44 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32745"]="+proj=utm +zone=45 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32746"]="+proj=utm +zone=46 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32747"]="+proj=utm +zone=47 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32748"]="+proj=utm +zone=48 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32749"]="+proj=utm +zone=49 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32750"]="+proj=utm +zone=50 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32751"]="+proj=utm +zone=51 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32752"]="+proj=utm +zone=52 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32753"]="+proj=utm +zone=53 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32754"]="+proj=utm +zone=54 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32755"]="+proj=utm +zone=55 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32756"]="+proj=utm +zone=56 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32757"]="+proj=utm +zone=57 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32758"]="+proj=utm +zone=58 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32759"]="+proj=utm +zone=59 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32760"]="+proj=utm +zone=60 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:32761"]="+proj=stere +lat_0=-90 +lat_ts=-90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:3296"]="+title=RGPF / UTM zone 5S +proj=utm +zone=5 +south +ellps=GRS80 +units=m +no_defs ";Proj4js.defs["EPSG:3297"]="+title=RGPF / UTM zone 6S +proj=utm +zone=6 +south +ellps=GRS80 +units=m +no_defs ";Proj4js.defs["EPSG:3298"]="+title=RGPF / UTM zone 7S +proj=utm +zone=7 +south +ellps=GRS80 +units=m +no_defs ";Proj4js.defs["EPSG:3299"]="+title=RGPF / UTM zone 8S +proj=utm +zone=8 +south +ellps=GRS80 +units=m +no_defs ";Proj4js.defs["EPSG:3302"]="+title=IGN63 Hiva Oa / UTM zone 7S +proj=utm +zone=7 +south +ellps=intl +units=m +no_defs ";Proj4js.defs["EPSG:3303"]="+title=Fatu Iva 72 / UTM zone 7S +proj=utm +zone=7 +south +ellps=intl +towgs84=347.103,1078.12,2623.92,-33.8875,70.6773,-9.3943,186.074 +units=m +no_defs ";Proj4js.defs["EPSG:3304"]="+title=Tahiti 79 / UTM zone 6S +proj=utm +zone=6 +south +ellps=intl +units=m +no_defs ";Proj4js.defs["EPSG:3305"]="+title=Moorea 87 / UTM zone 6S +proj=utm +zone=6 +south +ellps=intl +towgs84=215.525,149.593,176.229,-3.2624,-1.692,-1.1571,10.4773 +units=m +no_defs ";Proj4js.defs["EPSG:3306"]="+title=Maupiti 83 / UTM zone 5S +proj=utm +zone=5 +south +ellps=intl +towgs84=217.037,86.959,23.956,0,0,0,0 +units=m +no_defs ";Proj4js.defs["EPSG:3312"]="+title=CSG67 / UTM zone 21N +proj=utm +zone=21 +ellps=intl +towgs84=-186,230,110,0,0,0,0 +units=m +no_defs ";Proj4js.defs["EPSG:3313"]="+title=RGFG95 / UTM zone 21N +proj=utm +zone=21 +ellps=GRS80 +towgs84=2,2,-2,0,0,0,0 +units=m +no_defs ";Proj4js.defs["EPSG:3336"]="+title=IGN 1962 Kerguelen / UTM zone 42S +proj=utm +zone=42 +south +ellps=intl +towgs84=145,-187,103,0,0,0,0 +units=m +no_defs ";Proj4js.defs["EPSG:3395"]="+title=WGS 84 / World Mercator +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";Proj4js.defs["EPSG:3727"]="+title=Reunion 1947 / TM Reunion +proj=tmerc +lat_0=-21.11666666666667 +lon_0=55.53333333333333 +k=1 +x_0=160000 +y_0=50000 +ellps=intl +units=m +no_defs ";Proj4js.defs["EPSG:4149"]="+title=CH1903 +proj=longlat +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +no_defs ";Proj4js.defs["EPSG:4150"]="+title=CH1903plus +proj=longlat +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +no_defs ";Proj4js.defs["EPSG:4151"]="+title=CHTRF95 +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs ";Proj4js.defs["EPSG:4171"]="+title=RGF93 +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs ";Proj4js.defs["EPSG:4230"]="+title=ED50 +proj=longlat +ellps=intl +no_defs ";Proj4js.defs["EPSG:4235"]="+title=Guyane Francaise +proj=longlat +ellps=intl +no_defs ";Proj4js.defs["EPSG:4258"]="+title=ETRS89 +proj=longlat +ellps=GRS80 +no_defs ";Proj4js.defs["EPSG:4275"]="+title=NTF +proj=longlat +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +no_defs ";Proj4js.defs["EPSG:4322"]="+title=WGS 72 +proj=longlat +ellps=WGS72 +no_defs ";Proj4js.defs["EPSG:4326"]="+title=WGS 84 +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs ";Proj4js.defs["EPSG:4467"]="+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ";Proj4js.defs["EPSG:4471"]="+proj=utm +zone=38 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ";Proj4js.defs["EPSG:4474"]="+proj=utm +zone=38 +south +ellps=intl +towgs84=-382,-59,-262,0,0,0,0 +units=m +no_defs ";Proj4js.defs["EPSG:4559"]="+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ";Proj4js.defs["EPSG:4621"]="+title=Fort Marigot +proj=longlat +ellps=intl +towgs84=137,248,-430,0,0,0,0 +no_defs ";Proj4js.defs["EPSG:4622"]="+title=Guadeloupe 1948 +proj=longlat +ellps=intl +no_defs ";Proj4js.defs["EPSG:4623"]="+title=CSG67 +proj=longlat +ellps=intl +towgs84=-186,230,110,0,0,0,0 +no_defs ";Proj4js.defs["EPSG:4624"]="+title=RGFG95 +proj=longlat +ellps=GRS80 +towgs84=2,2,-2,0,0,0,0 +no_defs ";Proj4js.defs["EPSG:4625"]="+title=Martinique 1938 +proj=longlat +ellps=intl +no_defs ";Proj4js.defs["EPSG:4626"]="+title=Reunion 1947 +proj=longlat +ellps=intl +no_defs ";Proj4js.defs["EPSG:4627"]="+title=RGR92 +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs ";Proj4js.defs["EPSG:4628"]="+title=Tahiti 52 +proj=longlat +ellps=intl +towgs84=162,117,154,0,0,0,0 +no_defs ";Proj4js.defs["EPSG:4629"]="+title=Tahaa 54 +proj=longlat +ellps=intl +no_defs ";Proj4js.defs["EPSG:4630"]="+title=IGN72 Nuku Hiva +proj=longlat +ellps=intl +no_defs ";Proj4js.defs["EPSG:4632"]="+title=Combani 1950 +proj=longlat +ellps=intl +towgs84=-382,-59,-262,0,0,0,0 +no_defs ";Proj4js.defs["EPSG:4633"]="+title=IGN56 Lifou +proj=longlat +ellps=intl +no_defs ";Proj4js.defs["EPSG:4634"]="+title=IGN72 Grand Terre +proj=longlat +ellps=intl +no_defs ";Proj4js.defs["EPSG:4637"]="+title=Perroud 1950 +proj=longlat +ellps=intl +towgs84=325,154,172,0,0,0,0 +no_defs ";Proj4js.defs["EPSG:4638"]="+title=Saint Pierre et Miquelon 1950 +proj=longlat +ellps=clrk66 +towgs84=30,430,368,0,0,0,0 +no_defs ";Proj4js.defs["EPSG:4640"]="+title=RRAF 1991 +proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs ";Proj4js.defs["EPSG:4641"]="+title=IGN53 Mare +proj=longlat +ellps=intl +no_defs ";Proj4js.defs["EPSG:4645"]="+title=RGNC 1991 +proj=longlat +ellps=intl +towgs84=0,0,0,0,0,0,0 +no_defs ";Proj4js.defs["EPSG:4662"]="+title=IGN72 Grande Terre +proj=longlat +ellps=intl +no_defs ";Proj4js.defs["EPSG:4687"]="+proj=longlat +ellps=GRS80 +no_defs ";Proj4js.defs["EPSG:4689"]="+title=IGN63 Hiva Oa +proj=longlat +ellps=intl +no_defs ";Proj4js.defs["EPSG:4690"]="+title=Tahiti 79 +proj=longlat +ellps=intl +no_defs ";Proj4js.defs["EPSG:4691"]="+title=Moorea 87 +proj=longlat +ellps=intl +towgs84=215.525,149.593,176.229,-3.2624,-1.692,-1.1571,10.4773 +no_defs ";Proj4js.defs["EPSG:4692"]="+title=Maupiti 83 +proj=longlat +ellps=intl +towgs84=217.037,86.959,23.956,0,0,0,0 +no_defs ";Proj4js.defs["EPSG:4698"]="+title=IGN 1962 Kerguelen +proj=longlat +ellps=intl +towgs84=145,-187,103,0,0,0,0 +no_defs ";Proj4js.defs["EPSG:4749"]="+title=RGNC91-93 +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs ";Proj4js.defs["EPSG:4750"]="+title=ST87 Ouvea +proj=longlat +ellps=WGS84 +towgs84=-56.263,16.136,-22.856,0,0,0,0 +no_defs ";Proj4js.defs["EPSG:4807"]="+title=NTF (Paris) +proj=longlat +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +no_defs ";Proj4js.defs["IGNF:AMST63"]="+title=Amsterdam 1963 +proj=geocent +towgs84=109.753,-528.133,-362.244,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:AMST63GEO"]="+title=Amsterdam 1963 +proj=longlat +towgs84=109.753,-528.133,-362.244,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:AMST63UTM43S"]="+title=Amsterdam 1963 UTM fuseau 43 Sud +proj=tmerc +towgs84=109.753,-528.133,-362.244,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=75.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs";Proj4js.defs["IGNF:CROZ63"]="+title=Crozet 1963 +proj=geocent +towgs84=0.0000,0.0000,0.0000 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:CROZ63GEO"]="+title=Crozet 1963 +proj=longlat +towgs84=0.0000,0.0000,0.0000 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:CROZ63UTM39S"]="+title=Crozet 1963 +proj=tmerc +towgs84=0.0000,0.0000,0.0000 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=51.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs";Proj4js.defs["IGNF:CSG67"]="+title=Guyane CSG67 +proj=geocent +towgs84=-193.0660,236.9930,105.4470,0.4814,-0.8074,0.1276,1.564900 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:CSG67GEO"]="+title=Guyane CSG67 +proj=longlat +towgs84=-193.0660,236.9930,105.4470,0.4814,-0.8074,0.1276,1.564900 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:CSG67UTM21"]="+title=Guyane CSG67 UTM fuseau 21 +proj=tmerc +towgs84=-193.0660,236.9930,105.4470,0.4814,-0.8074,0.1276,1.564900 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-57.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:CSG67UTM22"]="+title=Guyane CSG67 UTM fuseau 22 +proj=tmerc +towgs84=-193.0660,236.9930,105.4470,0.4814,-0.8074,0.1276,1.564900 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-51.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:ED50"]="+title=ED50 +proj=geocent +towgs84=-84.0000,-97.0000,-117.0000 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:ED50G"]="+title=ED50 +proj=longlat +towgs84=-84.0000,-97.0000,-117.0000 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:ETRS89"]="+title=Systeme de reference terrestre Europeen (1989) +proj=geocent +towgs84=0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs";Proj4js.defs["IGNF:ETRS89GEO"]="+title=ETRS89 geographiques (dms) +proj=longlat +towgs84=0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs";Proj4js.defs["IGNF:ETRS89LAEA"]="+title=ETRS89 Lambert Azimutal Equal Area +proj=laea +towgs84=0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=52.000000000 +lon_0=10.000000000 +x_0=4321000.000 +y_0=3210000.000 +units=m +no_defs";Proj4js.defs["IGNF:ETRS89LCC"]="+title=ETRS89 Lambert Conformal Conic +proj=lcc +towgs84=0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=52.000000000 +lon_0=9.999999995 +lat_1=35.000000000 +lat_2=65.000000000 +x_0=4000000.000 +y_0=2800000.000 +units=m +no_defs";Proj4js.defs["IGNF:GEOPORTALANF"]="+title=Geoportail - Antilles francaises +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=15.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:GEOPORTALASP"]="+title=Geoportail - Amsterdam et Saint-Paul +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-38.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:GEOPORTALCRZ"]="+title=Geoportail - Crozet +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-46.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:GEOPORTALFXX"]="+title=Geoportail - France metropolitaine +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=46.500000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:GEOPORTALGUF"]="+title=Geoportail - Guyane +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=4.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:GEOPORTALKER"]="+title=Geoportail - Kerguelen +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-49.500000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:GEOPORTALMYT"]="+title=Geoportail - Mayotte +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-12.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:GEOPORTALNCL"]="+title=Geoportail - Nouvelle-Caledonie +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-22.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:GEOPORTALPYF"]="+title=Geoportail - Polynesie francaise +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-15.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:GEOPORTALREU"]="+title=Geoportail - Reunion et dependances +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-21.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:GEOPORTALSPA"]="+title=Geoportail - Saint-Paul et Amsterdam +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-38.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:GEOPORTALSPM"]="+title=Geoportail - Saint-Pierre et Miquelon +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=47.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:GEOPORTALWLF"]="+title=Geoportail - Wallis et Futuna +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-14.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:GUAD48"]="+title=Guadeloupe Ste Anne +proj=geocent +towgs84=-472.2900,-5.6300,-304.1200,0.4362,-0.8374,0.2563,1.898400 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:GUAD48GEO"]="+title=Guadeloupe Ste Anne +proj=longlat +towgs84=-472.2900,-5.6300,-304.1200,0.4362,-0.8374,0.2563,1.898400 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:GUAD48UTM20"]="+title=Guadeloupe Ste Anne +proj=tmerc +towgs84=-472.2900,-5.6300,-304.1200,0.4362,-0.8374,0.2563,1.898400 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-63.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:GUADFM49"]="+title=Guadeloupe Fort Marigot +proj=geocent +towgs84=136.5960,248.1480,-429.7890 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:GUADFM49GEO"]="+title=Guadeloupe Fort Marigot +proj=longlat +towgs84=136.5960,248.1480,-429.7890 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:GUADFM49U20"]="+title=Guadeloupe Fort Marigot  +proj=tmerc +towgs84=136.5960,248.1480,-429.7890 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-63.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:IGN63"]="+title=IGN 1963 (Hiva Oa, Tahuata, Mohotani) +proj=geocent +towgs84=410.7210,55.0490,80.7460,-2.5779,-2.3514,-0.6664,17.331100 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:IGN63GEO"]="+title=IGN 1963 (Hiva Oa, Tahuata, Mohotani) +proj=longlat +towgs84=410.7210,55.0490,80.7460,-2.5779,-2.3514,-0.6664,17.331100 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:IGN63UTM7S"]="+title=IGN 1963 - Hiva Oa, Tahuata, Mohotani - UTM fuseau 7 Sud +proj=tmerc +towgs84=410.7210,55.0490,80.7460,-2.5779,-2.3514,-0.6664,17.331100 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-141.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs";Proj4js.defs["IGNF:IGN72"]="+title=IGN 1972 Grande-Terre / Ile des Pins +proj=geocent +towgs84=-11.6400,-348.6000,291.6800 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:IGN72GEO"]="+title=IGN 1972 Grande-Terre / Ile des Pins +proj=longlat +towgs84=-11.6400,-348.6000,291.6800 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:IGN72UTM58S"]="+title=IGN 1972 - UTM fuseau 58 Sud +proj=tmerc +towgs84=-11.6400,-348.6000,291.6800 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=165.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs";Proj4js.defs["IGNF:KERG62CAR"]="+title=Kerguelen - K0 +proj=geocent +towgs84=144.8990,-186.7700,100.9230 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:KERG62GEO"]="+title=Kerguelen - K0 +proj=longlat +towgs84=144.8990,-186.7700,100.9230 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:KERG62UTM42S"]="+title=Kerguelen 1962 +proj=tmerc +towgs84=144.8990,-186.7700,100.9230 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=69.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs";Proj4js.defs["IGNF:LAMB1"]="+title=Lambert I +proj=lcc +nadgrids=ntf_r93.gsb,null +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=49.500000000 +lon_0=0.000000000 +k_0=0.99987734 +lat_1=49.500000000 +x_0=600000.000 +y_0=200000.000 +units=m +no_defs";Proj4js.defs["IGNF:LAMB1C"]="+title=Lambert I Carto +proj=lcc +nadgrids=ntf_r93.gsb,null +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=49.500000000 +lon_0=0.000000000 +k_0=0.99987734 +lat_1=49.500000000 +x_0=600000.000 +y_0=1200000.000 +units=m +no_defs";Proj4js.defs["IGNF:LAMB2"]="+title=Lambert II +proj=lcc +nadgrids=ntf_r93.gsb,null +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=46.800000000 +lon_0=0.000000000 +k_0=0.99987742 +lat_1=46.800000000 +x_0=600000.000 +y_0=200000.000 +units=m +no_defs";Proj4js.defs["IGNF:LAMB2C"]="+title=Lambert II Carto +proj=lcc +nadgrids=ntf_r93.gsb,null +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=46.800000000 +lon_0=0.000000000 +k_0=0.99987742 +lat_1=46.800000000 +x_0=600000.000 +y_0=2200000.000 +units=m +no_defs";Proj4js.defs["IGNF:LAMB3"]="+title=Lambert III +proj=lcc +nadgrids=ntf_r93.gsb,null +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=44.100000000 +lon_0=0.000000000 +k_0=0.99987750 +lat_1=44.100000000 +x_0=600000.000 +y_0=200000.000 +units=m +no_defs";Proj4js.defs["IGNF:LAMB3C"]="+title=Lambert III Carto +proj=lcc +nadgrids=ntf_r93.gsb,null +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=44.100000000 +lon_0=0.000000000 +k_0=0.99987750 +lat_1=44.100000000 +x_0=600000.000 +y_0=3200000.000 +units=m +no_defs";Proj4js.defs["IGNF:LAMB4"]="+title=Lambert IV +proj=lcc +nadgrids=ntf_r93.gsb,null +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=42.165000000 +lon_0=0.000000000 +k_0=0.99994471 +lat_1=42.165000000 +x_0=234.358 +y_0=185861.369 +units=m +no_defs";Proj4js.defs["IGNF:LAMB4C"]="+title=Lambert IV Carto +proj=lcc +nadgrids=ntf_r93.gsb,null +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=42.165000000 +lon_0=0.000000000 +k_0=0.99994471 +lat_1=42.165000000 +x_0=234.358 +y_0=4185861.369 +units=m +no_defs";Proj4js.defs["IGNF:LAMB93"]="+title=Lambert 93 +proj=lcc +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=46.500000000 +lon_0=3.000000000 +lat_1=44.000000000 +lat_2=49.000000000 +x_0=700000.000 +y_0=6600000.000 +units=m +no_defs";Proj4js.defs["IGNF:LAMBE"]="+title=Lambert II etendu +proj=lcc +nadgrids=ntf_r93.gsb,null +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=46.800000000 +lon_0=0.000000000 +k_0=0.99987742 +lat_1=46.800000000 +x_0=600000.000 +y_0=2200000.000 +units=m +no_defs";Proj4js.defs["IGNF:MART38"]="+title=Martinique Fort-Desaix +proj=geocent +towgs84=126.9260,547.9390,130.4090,-2.7867,5.1612,-0.8584,13.822650 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:MART38GEO"]="+title=Martinique Fort-Desaix +proj=longlat +towgs84=126.9260,547.9390,130.4090,-2.7867,5.1612,-0.8584,13.822650 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:MART38UTM20"]="+title=Martinique Fort-Desaix +proj=tmerc +towgs84=126.9260,547.9390,130.4090,-2.7867,5.1612,-0.8584,13.822650 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-63.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:MAYO50"]="+title=Mayotte Combani +proj=geocent +towgs84=-599.9280,-275.5520,-195.6650,-0.0835,-0.4715,0.0602,49.281400 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:MAYO50GEO"]="+title=Mayotte Combani +proj=longlat +towgs84=-599.9280,-275.5520,-195.6650,-0.0835,-0.4715,0.0602,49.281400 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:MAYO50UTM38S"]="+title=Mayotte Combani +proj=tmerc +towgs84=-599.9280,-275.5520,-195.6650,-0.0835,-0.4715,0.0602,49.281400 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=45.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs";Proj4js.defs["IGNF:MILLER"]="+title=Geoportail - Monde +proj=mill +towgs84=0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000000 +a=6378137.0000 +rf=298.2572221010000 +lon_0=0.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:MOOREA87"]="+title=Moorea 1987 +proj=geocent +towgs84=215.9820,149.5930,176.2290,3.2624,1.6920,1.1571,10.477300 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:MOOREA87GEO"]="+title=Moorea 1987 +proj=longlat +towgs84=215.9820,149.5930,176.2290,3.2624,1.6920,1.1571,10.477300 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:MOOREA87U6S"]="+title=Moorea 1987 - UTM fuseau 6 Sud +proj=tmerc +towgs84=215.9820,149.5930,176.2290,3.2624,1.6920,1.1571,10.477300 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-147.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs";Proj4js.defs["IGNF:NTF"]="+title=Nouvelle Triangulation Francaise +proj=geocent +nadgrids=ntf_r93.gsb,null +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +units=m +no_defs";Proj4js.defs["IGNF:NTFG"]="+title=Nouvelle Triangulation Francaise Greenwich degres sexagesimaux +proj=longlat +nadgrids=ntf_r93.gsb,null +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +units=m +no_defs";Proj4js.defs["IGNF:NTFP"]="+title=Nouvelle Triangulation Francaise Paris grades +proj=longlat +nadgrids=ntf_r93.gsb,null +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +units=m +no_defs";Proj4js.defs["IGNF:NUKU72"]="+title=IGN 1972 Nuku Hiva +proj=geocent +towgs84=165.7320,216.7200,180.5050,-0.6434,-0.4512,-0.0791,7.420400 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:NUKU72GEO"]="+title=IGN 1972 Nuku Hiva +proj=longlat +towgs84=165.7320,216.7200,180.5050,-0.6434,-0.4512,-0.0791,7.420400 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:NUKU72U7S"]="+title=IGN 1972 Nuku Hiva - UTM fuseau 7 Sud +proj=tmerc +towgs84=165.7320,216.7200,180.5050,-0.6434,-0.4512,-0.0791,7.420400 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-141.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs";Proj4js.defs["IGNF:REUN47"]="+title=Reunion 1947 +proj=geocent +towgs84=789.5240,-626.4860,-89.9040,0.6006,76.7946,-10.5788,-32.324100 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:REUN47GAUSSL"]="+title=Reunion Gauss Laborde +proj=gstmerc +towgs84=789.5240,-626.4860,-89.9040,0.6006,76.7946,-10.5788,-32.324100 +a=6378388.0000 +rf=297.0000000000000 +lat_0=-21.116666667 +lon_0=55.533333333 +k_0=1.00000000 +x_0=160000.000 +y_0=50000.000 +units=m +no_defs";Proj4js.defs["IGNF:REUN47GEO"]="+title=Reunion 1947 +proj=longlat +towgs84=789.5240,-626.4860,-89.9040,0.6006,76.7946,-10.5788,-32.324100 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:RGF93"]="+title=Reseau geodesique francais 1993 +proj=geocent +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs";Proj4js.defs["IGNF:RGF93CC42"]="+title=Lambert conique conforme Zone 1 +proj=lcc +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=42.000000000 +lon_0=3.000000000 +lat_1=41.200000000 +lat_2=42.800000000 +x_0=1700000.000 +y_0=1200000.000 +units=m +no_defs";Proj4js.defs["IGNF:RGF93CC43"]="+title=Lambert conique conforme Zone 2 +proj=lcc +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=43.000000000 +lon_0=3.000000000 +lat_1=42.200000000 +lat_2=43.800000000 +x_0=1700000.000 +y_0=2200000.000 +units=m +no_defs";Proj4js.defs["IGNF:RGF93CC44"]="+title=Lambert conique conforme Zone 3 +proj=lcc +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=44.000000000 +lon_0=3.000000000 +lat_1=43.200000000 +lat_2=44.800000000 +x_0=1700000.000 +y_0=3200000.000 +units=m +no_defs";Proj4js.defs["IGNF:RGF93CC45"]="+title=Lambert conique conforme Zone 4 +proj=lcc +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=45.000000000 +lon_0=3.000000000 +lat_1=44.200000000 +lat_2=45.800000000 +x_0=1700000.000 +y_0=4200000.000 +units=m +no_defs";Proj4js.defs["IGNF:RGF93CC46"]="+title=Lambert conique conforme Zone 5 +proj=lcc +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=46.000000000 +lon_0=3.000000000 +lat_1=45.200000000 +lat_2=46.800000000 +x_0=1700000.000 +y_0=5200000.000 +units=m +no_defs";Proj4js.defs["IGNF:RGF93CC47"]="+title=Lambert conique conforme Zone 6 +proj=lcc +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=47.000000000 +lon_0=3.000000000 +lat_1=46.200000000 +lat_2=47.800000000 +x_0=1700000.000 +y_0=6200000.000 +units=m +no_defs";Proj4js.defs["IGNF:RGF93CC48"]="+title=Lambert conique conforme Zone 7 +proj=lcc +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=48.000000000 +lon_0=3.000000000 +lat_1=47.200000000 +lat_2=48.800000000 +x_0=1700000.000 +y_0=7200000.000 +units=m +no_defs";Proj4js.defs["IGNF:RGF93CC49"]="+title=Lambert conique conforme Zone 8 +proj=lcc +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=49.000000000 +lon_0=3.000000000 +lat_1=48.200000000 +lat_2=49.800000000 +x_0=1700000.000 +y_0=8200000.000 +units=m +no_defs";Proj4js.defs["IGNF:RGF93CC50"]="+title=Lambert conique conforme Zone 9 +proj=lcc +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=50.000000000 +lon_0=3.000000000 +lat_1=49.200000000 +lat_2=50.800000000 +x_0=1700000.000 +y_0=9200000.000 +units=m +no_defs";Proj4js.defs["IGNF:RGF93G"]="+title=Reseau geodesique francais 1993 +proj=longlat +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs";Proj4js.defs["IGNF:RGFG95"]="+title=Reseau geodesique francais de Guyane 1995 +proj=geocent +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs";Proj4js.defs["IGNF:RGFG95GEO"]="+title=Reseau geodesique francais de Guyane 1995 +proj=longlat +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs";Proj4js.defs["IGNF:RGM04"]="+title=RGM04 (Reseau Geodesique de Mayotte 2004) +proj=geocent +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs";Proj4js.defs["IGNF:RGM04GEO"]="+title=RGM04 (Reseau Geodesique de Mayotte 2004) +proj=longlat +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs";Proj4js.defs["IGNF:RGM04UTM38S"]="+title=UTM fuseau 38 Sud (Reseau Geodesique de Mayotte 2004) +proj=tmerc +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=45.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs";Proj4js.defs["IGNF:RGNC"]="+title=Reseau Geodesique de Nouvelle-Caledonie +proj=geocent +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs";Proj4js.defs["IGNF:RGNCGEO"]="+title=Reseau Geodesique de Nouvelle-Caledonie +proj=longlat +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs";Proj4js.defs["IGNF:RGNCUTM57S"]="+title=Reseau Geodesique de Nouvelle-Caledonie - UTM fuseau 57 Sud +proj=tmerc +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=159.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs";Proj4js.defs["IGNF:RGNCUTM58S"]="+title=Reseau Geodesique de Nouvelle-Caledonie - UTM fuseau 58 Sud +proj=tmerc +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=165.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs";Proj4js.defs["IGNF:RGNCUTM59S"]="+title=Reseau Geodesique de Nouvelle-Caledonie - UTM fuseau 59 Sud +proj=tmerc +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=171.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs";Proj4js.defs["IGNF:RGPF"]="+title=RGPF (Reseau Geodesique de Polynesie Francaise) +proj=geocent +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs";Proj4js.defs["IGNF:RGPFGEO"]="+title=RGPF (Reseau Geodesique de Polynesie Francaise) +proj=longlat +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs";Proj4js.defs["IGNF:RGPFUTM5S"]="+title=RGPF - UTM fuseau 5 Sud +proj=tmerc +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-153.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs";Proj4js.defs["IGNF:RGPFUTM6S"]="+title=RGPF - UTM fuseau 6 Sud +proj=tmerc +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-147.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs";Proj4js.defs["IGNF:RGPFUTM7S"]="+title=RGPF - UTM fuseau 7 Sud +proj=tmerc +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-141.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs";Proj4js.defs["IGNF:RGR92"]="+title=Reseau geodesique Reunion 1992 +proj=geocent +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs";Proj4js.defs["IGNF:RGR92GEO"]="+title=Reseau geodesique de la Reunion 1992 +proj=longlat +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs";Proj4js.defs["IGNF:RGR92UTM40S"]="+title=RGR92 UTM fuseau 40 Sud +proj=tmerc +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=57.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs";Proj4js.defs["IGNF:RGSPM06"]="+title=Reseau Geodesique Saint-Pierre-et-Miquelon (2006) +proj=geocent +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs";Proj4js.defs["IGNF:RGSPM06GEO"]="+title=Saint-Pierre-et-Miquelon (2006) +proj=longlat +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs";Proj4js.defs["IGNF:RGSPM06U21"]="+title=Saint-Pierre-et-Miquelon (2006) UTM Fuseau 21 Nord +proj=tmerc +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-57.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:RGTAAF07"]="+title=Reseau Geodesique des TAAF (2007) +proj=geocent +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs";Proj4js.defs["IGNF:RGTAAF07G"]="+title=Reseau Geodesique des TAAF (2007) (dms) +proj=longlat +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs";Proj4js.defs["IGNF:RRAF91"]="+title=RRAF 1991 (Reseau de Reference des Antilles Francaises) +proj=geocent +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs";Proj4js.defs["IGNF:STEREOSX"]="+title=Stereographique polaire Sud +proj=sterea +towgs84=0.0000,0.0000,0.5000,0.0000,0.0000,0.0140,-0.100000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=-90.000000000 +lon_0=140.000000000 +k=0.96027295 +x_0=300000.000 +y_0=-2299363.482 +units=m +no_defs";Proj4js.defs["IGNF:STPL69"]="+title=Saint-Paul 1969 +proj=geocent +towgs84=225.571,-346.608,-46.567,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:STPL69GEO"]="+title=Saint-Paul 1969 +proj=longlat +towgs84=225.571,-346.608,-46.567,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:STPL69UTM43S"]="+title=Saint-Paul 1969 UTM fuseau 43 Sud +proj=tmerc +towgs84=225.571,-346.608,-46.567,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=75.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs";Proj4js.defs["IGNF:STPM50"]="+title=St Pierre et Miquelon 1950 +proj=geocent +towgs84=-95.5930,573.7630,173.4420,-0.9602,1.2510,-1.3918,42.626500 +a=6378206.4000 +rf=294.9786982000000 +units=m +no_defs";Proj4js.defs["IGNF:STPM50GEO"]="+title=St Pierre et Miquelon 1950  +proj=longlat +towgs84=-95.5930,573.7630,173.4420,-0.9602,1.2510,-1.3918,42.626500 +a=6378206.4000 +rf=294.9786982000000 +units=m +no_defs";Proj4js.defs["IGNF:STPM50UTM21"]="+title=St Pierre et Miquelon 1950 +proj=tmerc +towgs84=-95.5930,573.7630,173.4420,-0.9602,1.2510,-1.3918,42.626500 +a=6378206.4000 +rf=294.9786982000000 +lat_0=0.000000000 +lon_0=-57.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:TAHAA"]="+title=Raiatea - Tahaa 51-54 (Tahaa, Base Terme Est) +proj=geocent +towgs84=72.4380,345.9180,79.4860,-1.6045,-0.8823,-0.5565,1.374600 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:TAHAAGEO"]="+title=Raiatea - Tahaa 51-54 (Tahaa, Base Terme Est) +proj=longlat +towgs84=72.4380,345.9180,79.4860,-1.6045,-0.8823,-0.5565,1.374600 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:TAHAAUTM05S"]="+title=Tahaa 1951 +proj=tmerc +towgs84=72.4380,345.9180,79.4860,-1.6045,-0.8823,-0.5565,1.374600 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-153.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs";Proj4js.defs["IGNF:TAHI51UTM06S"]="+title=Tahiti-Terme Nord UTM fuseau 6 Sud +proj=tmerc +towgs84=162.0000,117.0000,154.0000 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-147.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs";Proj4js.defs["IGNF:TAHI79"]="+title=IGN79 (Tahiti) Iles de la Societe +proj=geocent +towgs84=221.5250,152.9480,176.7680,2.3847,1.3896,0.8770,11.474100 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:TAHI79GEO"]="+title=IGN79 (Tahiti) Iles de la Societe +proj=longlat +towgs84=221.5250,152.9480,176.7680,2.3847,1.3896,0.8770,11.474100 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:TAHI79UTM6S"]="+title=Tahiti 1979 +proj=tmerc +towgs84=221.5250,152.9480,176.7680,2.3847,1.3896,0.8770,11.474100 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-147.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs";Proj4js.defs["IGNF:TERA50"]="+title=Pointe Geologie - Perroud 1950 +proj=geocent +towgs84=324.9120,153.2820,172.0260 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:TERA50G"]="+title=Pointe Geologie - Perroud 1950 +proj=longlat +towgs84=324.9120,153.2820,172.0260 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:TERA50STEREO"]="+title=Terre Adelie 1950 +proj=stere +towgs84=324.9120,153.2820,172.0260 +a=6378388.0000 +rf=297.0000000000000 +lat_0=-90.000000000 +lon_0=140.000000000 +lat_ts=-67 +k=0.96027295 +x_0=300000.000 +y_0=-2299363.482 +units=m +no_defs";Proj4js.defs["IGNF:UTM01SW84"]="+title=World Geodetic System 1984 UTM fuseau 01 Sud +proj=tmerc +towgs84=0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-177.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs";Proj4js.defs["IGNF:UTM20W84GUAD"]="+title=World Geodetic System 1984 UTM fuseau 20 Nord-Guadeloupe +proj=tmerc +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-63.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:UTM20W84MART"]="+title=World Geodetic System 1984 UTM fuseau 20 Nord-Martinique +proj=tmerc +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-63.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:UTM22RGFG95"]="+title=RGFG95 UTM fuseau 22 Nord-Guyane +proj=tmerc +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-51.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:UTM26ETRS89"]="+title=Europe - de 30d a 24d Ouest +proj=tmerc +towgs84=0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-27.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:UTM27ETRS89"]="+title=Europe - de 24d a 18d Ouest +proj=tmerc +towgs84=0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-21.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:UTM28ETRS89"]="+title=Europe - de 18d a 12d Ouest +proj=tmerc +towgs84=0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-15.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:UTM29ETRS89"]="+title=Europe - de 12d a 6d Ouest +proj=tmerc +towgs84=0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-9.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:UTM30ETRS89"]="+title=Europe - de -6d a 0d Ouest +proj=tmerc +towgs84=0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-3.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:UTM31ETRS89"]="+title=Europe - de 0d a 6d Est +proj=tmerc +towgs84=0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=3.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:UTM32ETRS89"]="+title=Europe - de 6d a 12d Est +proj=tmerc +towgs84=0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=9.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:UTM33ETRS89"]="+title=Europe - de 12d a 18d Est +proj=tmerc +towgs84=0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=15.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:UTM34ETRS89"]="+title=Europe - de 18d a 24d Est +proj=tmerc +towgs84=0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=21.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:UTM35ETRS89"]="+title=Europe - de 24d a 30d Est +proj=tmerc +towgs84=0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=27.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:UTM36ETRS89"]="+title=Europe - de 30d a 36d Est +proj=tmerc +towgs84=0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=33.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:UTM37ETRS89"]="+title=Europe - de 36d a 42d Est +proj=tmerc +towgs84=0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=39.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:UTM38ETRS89"]="+title=Europe - de 42d a 48d Est +proj=tmerc +towgs84=0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=45.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:UTM39ETRS89"]="+title=Europe - de 48d a 54d Est +proj=tmerc +towgs84=0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=51.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs";Proj4js.defs["IGNF:UTM39SW84"]="+title=World Geodetic System 1984 UTM fuseau 39 Sud +proj=tmerc +towgs84=0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=51.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs";Proj4js.defs["IGNF:UTM42SW84"]="+title=World Geodetic System 1984 UTM fuseau 42 Sud +proj=tmerc +towgs84=0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=69.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs";Proj4js.defs["IGNF:UTM43SW84"]="+title=World Geodetic System 1984 UTM fuseau 43 Sud +proj=tmerc +towgs84=0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=75.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs";Proj4js.defs["IGNF:WALL78"]="+title=Wallis-Uvea 1978 (MOP78) +proj=geocent +towgs84=253.0000,-133.0000,-127.0000 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:WALL78GEO"]="+title=Wallis - Uvea 1978 (MOP78) +proj=longlat +towgs84=253.0000,-133.0000,-127.0000 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs";Proj4js.defs["IGNF:WALL78UTM1S"]="+title=Wallis-Uvea 1978 (MOP78) UTM 1 SUD +proj=tmerc +towgs84=253.0000,-133.0000,-127.0000 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-177.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs";Proj4js.defs["IGNF:WGS72"]="+title=World Geodetic System 1972 +proj=geocent +towgs84=0.0000,12.0000,6.0000 +a=6378135.0000 +rf=298.2600000000000 +units=m +no_defs";Proj4js.defs["IGNF:WGS72G"]="+title=WGS72 +proj=longlat +towgs84=0.0000,12.0000,6.0000 +a=6378135.0000 +rf=298.2600000000000 +units=m +no_defs";Proj4js.defs["IGNF:WGS84"]="+title=World Geodetic System 1984 +proj=geocent +towgs84=0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs";Proj4js.defs["IGNF:WGS84G"]="+title=World Geodetic System 1984 +proj=longlat +towgs84=0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs";Proj4js.defs["IGNF:WGS84RRAFGEO"]="+title=Reseau de reference des Antilles francaises (1988-1991) +proj=longlat +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs";Proj4js.defs["IGNF:XGEO"]="+title=Systeme CIO-BIH +proj=longlat +towgs84=0.0000,0.0000,0.5000,0.0000,0.0000,0.0140,-0.100000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs";OpenLayers.Element.getElementsByTagName=function(a,d){var b=null;if(!d){d=document}if(typeof(d.getElementsByTagName)!="undefined"){b=d.getElementsByTagName(a);if(a=="*"&&(!b||!b.length)){b=d.all}}else{if(a=="*"){b=d.all}else{if(d.all&&d.all.tags){b=b.all.tags(t)}}}return b||[]};OpenLayers.Element.getElementsByClassName=function(l,b,h){var g=function(q,m,o){var p=o.getElementsByClassName(q);return p||[]};var f=function(u,z,p){var m=[];var o="";for(var r=0,q=u.length;r<q;r++){o+="[contains(concat(' ', @class, ' '), ' "+u[r]+" ')]"}var w=[];try{w=document.evaluate(".//"+z+o,p,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null)}catch(v){return null}for(var r=0,q=w.length;r<q;r++){m[m.length]=w.snapshotItem(r)}return m||[]};var a=function(v,B,p){var m=[];for(var u=0,q=v.length;u<q;u++){var z=new RegExp("\\b"+v[u].replace(/([(){}|*+?.,^$\[\]\\])/g,"\\$1")+"\\b");var w=OpenLayers.Element.getElementsByTagName(B,p);for(var r=0,o=w.length;r<o;r++){if(z.test(w[r].className)){m[m.length]=w[r]}}}return m||[]};if(!h){h=document}if(!b){b="*"}if(!l){return[]}if(h.getElementsByClassName){return g(l,b,h)}var j=null;var d=l.split(" ");if(document.evaluate){j=f(d,b,h)}if(!j){j=a(d,b,h)}return j||[]};OpenLayers.Event.stopObservingElement=function(a){var b=OpenLayers.Util.getElement(a);if(b){var d=b._eventCacheID;if(d){this._removeElementObservers(OpenLayers.Event.observers[d])}}};OpenLayers.Events.prototype.register=function(f,h,g,b){if((g!=null)&&(OpenLayers.Util.indexOf(this.eventTypes,f)!=-1)){if(h==null){h=this.object}var d=this.listeners[f];var a={obj:h,func:g};if(b===undefined){b=d.length}if(b<=0){d.unshift(a)}else{if(b<d.length){d.splice(b,0,a)}else{d.push(a)}}}};OpenLayers.Events.prototype.registerPriority=function(a,d,b){this.register(a,d,b,0)};OpenLayers.Lang.en.W="W";OpenLayers.Lang.en.E="E";OpenLayers.Lang.en.N="N";OpenLayers.Lang.en.S="S";OpenLayers.Lang.en["no.proj.implementation.found"]="No implementation for Projection handling found";OpenLayers.Lang.en["unknown.crs"]="Unknown CRS : ${crs}";OpenLayers.Lang.en.dd="degrees";if(typeof(OpenLayers.Lang.de)=="undefined"){OpenLayers.Lang.de=OpenLayers.Util.applyDefaults({},OpenLayers.Lang.en)}OpenLayers.Lang.de.W="W";OpenLayers.Lang.de.E="O";OpenLayers.Lang.de.N="N";OpenLayers.Lang.de.S="S";OpenLayers.Lang.de["no.proj.implementation.found"]="Keine umsetzung für projektions-handling gefunden";OpenLayers.Lang.de["unknown.crs"]="Unknown CRS : ${crs}";OpenLayers.Lang.de.dd="grad";if(typeof(OpenLayers.Lang.es)=="undefined"){OpenLayers.Lang.es=OpenLayers.Util.applyDefaults({},OpenLayers.Lang.en)}OpenLayers.Lang.es.W="Oe";OpenLayers.Lang.es.E="Or";OpenLayers.Lang.es.N="N";OpenLayers.Lang.es.S="S";OpenLayers.Lang.es["no.proj.implementation.found"]="No aplicación para el manejo de proyección encontrado";OpenLayers.Lang.es["unknown.crs"]="Unknown CRS : ${crs}";OpenLayers.Lang.es.dd="grados";if(typeof(OpenLayers.Lang.fr)=="undefined"){OpenLayers.Lang.fr=OpenLayers.Util.applyDefaults({},OpenLayers.Lang.en)}OpenLayers.Lang.fr.W="O";OpenLayers.Lang.fr.E="E";OpenLayers.Lang.fr.N="N";OpenLayers.Lang.fr.S="S";OpenLayers.Lang.fr["no.proj.implementation.found"]="Aucune implémentation d'un gestionnaire de projections n'a été chargé";OpenLayers.Lang.fr["unknown.crs"]="CRS inconnu : ${crs}";OpenLayers.Lang.fr.dd="degrés";if(typeof(OpenLayers.Lang.it)=="undefined"){OpenLayers.Lang.it=OpenLayers.Util.applyDefaults({},OpenLayers.Lang.en)}OpenLayers.Lang.it.W="O";OpenLayers.Lang.it.E="E";OpenLayers.Lang.it.N="N";OpenLayers.Lang.it.S="S";OpenLayers.Lang.it["no.proj.implementation.found"]="No di attuazione per la gestione di proiezione trovato";OpenLayers.Lang.it["unknown.crs"]="Unknown CRS : ${crs}";OpenLayers.Lang.it.dd="gradi";OpenLayers.Util.extend(OpenLayers.INCHES_PER_UNIT,{deg:OpenLayers.INCHES_PER_UNIT.dd,degre:OpenLayers.INCHES_PER_UNIT.dd,degree:OpenLayers.INCHES_PER_UNIT.dd,rad:OpenLayers.INCHES_PER_UNIT.dd*0.017453292519943295,gon:OpenLayers.INCHES_PER_UNIT.dd*1.1111111111111112,meters:OpenLayers.INCHES_PER_UNIT.m,meter:OpenLayers.INCHES_PER_UNIT.m,metres:OpenLayers.INCHES_PER_UNIT.m,metre:OpenLayers.INCHES_PER_UNIT.m});OpenLayers.Util.getResolutionFromScale=function(f,a){if(a==null||OpenLayers.INCHES_PER_UNIT[a]==undefined){a="degrees"}var d=OpenLayers.Util.normalizeScale(f);var b=1/(d*OpenLayers.INCHES_PER_UNIT[a]*OpenLayers.DOTS_PER_INCH);return b};OpenLayers.Util.getScaleFromResolution=function(b,a){if(a==null||OpenLayers.INCHES_PER_UNIT[a]==undefined){a="degrees"}var d=b*OpenLayers.INCHES_PER_UNIT[a]*OpenLayers.DOTS_PER_INCH;return d};OpenLayers.Util.getParameters=function(b){b=b||window.location.href;var a="";if(OpenLayers.String.contains(b,"?")){var d=b.indexOf("?")+1;var g=OpenLayers.String.contains(b,"#")?b.indexOf("#"):b.length;a=b.substring(d,g)}var u={};var f=a.split(/[&;]/);for(var m=0,o=f.length;m<o;++m){var l=f[m].split("=");if(l[0]){var q=decodeURIComponent(l[0]);var p=l[1]||"";p=p.split(",");for(var h=0,r=p.length;h<r;h++){p[h]=decodeURIComponent(unescape(p[h]))}if(p.length==1){p=p[0]}u[q]=p}}return u};OpenLayers.Util.getFormattedLonLat=function(l,b,g){if(!g){g="dms"}var f=Math.abs(l);var m=Math.floor(f);var a=(f-m)/(1/60);var d=a;a=Math.floor(a);var j=(d-a)/(1/60);j=Math.round(j*10);j/=10;if(m<10){m="0"+m}var h=m+" ";if(g.indexOf("dm")>=0){if(a<10){a="0"+a}h+=a+"'";if(g.indexOf("dms")>=0){if(j<10){j="0"+j}h+=j+'"'}}if(b=="lon"){h+=l<0?OpenLayers.i18n("W"):OpenLayers.i18n("E")}else{h+=l<0?OpenLayers.i18n("S"):OpenLayers.i18n("N")}return h};OpenLayers.Util.rad=function(a){return a*0.017453292519943295};OpenLayers.Util.deg=function(a){return a*57.29577951308232};OpenLayers.Util.gon=function(a){return a*1.1111111111111112};OpenLayers.Util.distVincenty=function(j,h,m){if(m==undefined||!(m instanceof OpenLayers.Projection)){m=OpenLayers.Projection.CRS84}var U=m.getProperty("semi_major")||6378137,T=m.getProperty("semi_minor")||6356752.3142,P=m.getProperty("inverse_flattening")||298.257223563;P=1/P;var u=OpenLayers.Util.rad(h.lon-j.lon);var S=Math.atan((1-P)*Math.tan(OpenLayers.Util.rad(j.lat)));var R=Math.atan((1-P)*Math.tan(OpenLayers.Util.rad(h.lat)));var r=Math.sin(S),o=Math.cos(S);var q=Math.sin(R),l=Math.cos(R);var D=u,v=2*Math.PI;var z=20;while(Math.abs(D-v)>1e-12&&--z>0){var K=Math.sin(D),g=Math.cos(D);var V=Math.sqrt((l*K)*(l*K)+(o*q-r*l*g)*(o*q-r*l*g));if(V==0){return 0}var N=r*q+o*l*g;var J=Math.atan2(V,N);var p=Math.asin(o*l*K/V);var O=Math.cos(p)*Math.cos(p);var w=N-2*r*q/O;var G=P/16*O*(4+P*(4-3*O));v=D;D=u+(1-G)*P*Math.sin(p)*(J+G*V*(w+G*N*(-1+2*w*w)))}if(z==0){return NaN}var F=O*(U*U-T*T)/(T*T);var I=1+F/16384*(4096+F*(-768+F*(320-175*F)));var H=F/1024*(256+F*(-128+F*(74-47*F)));var M=H*V*(w+H/4*(N*(-1+2*w*w)-H/6*w*(-3+4*V*V)*(-3+4*w*w)));var E=T*I*(J-M);var Q=E.toFixed(3)/1000;return Q};OpenLayers.Function.False=function(){return false};OpenLayers.Function.True=function(){return true};OpenLayers.Element.insertAfter=function(a,b){if(!b){return null}if(b.nextSibling){return b.parentNode.insertBefore(a,b.nextSibling)}return b.parentNode.appendChild(a)};OpenLayers.Element.addCss=function(b){var a=document.createElement("style");a.setAttribute("type","text/css");if(a.styleSheet){a.styleSheet.cssText=b}else{a.appendChild(document.createTextNode(b))}try{document.getElementsByTagName("head")[0].appendChild(a);return a}catch(d){return null}};OpenLayers.Projection.WKALIASES={WGS84G:["WGS84","EPSG:4326","CRS:84","IGNF:WGS84G","IGNF:WGS84RRAFGEO","IGNF:RGF93G","IGNF:RGFG95GEO","IGNF:RGM04GEO","IGNF:RGNCGEO","IGNF:RGPFGEO","IGNF:RGR92GEO","IGNF:RGSPM06GEO","EPSG:4171","EPSG:4624","EPSG:4627","EPSG:4640","EPSG:4687","EPSG:4749","EPSG:4258"],LAMB93:["IGNF:LAMB93","EPSG:2154"],LAMBE:["IGNF:LAMBE","EPSG:27572","EPSG:27582"],UTM39SW84:["IGNF:UTM39SW84","EPSG:32739"],UTM20W84GUAD:["IGNF:UTM20W84GUAD","EPSG:2969","EPSG:32620"],UTM22RGFG95:["IGNF:UTM22RGFG95","EPSG:2972","EPSG:32622"],UTM42SW84:["IGNF:UTM42SW84","EPSG:32742"],UTM20W84MART:["IGNF:UTM20W84MART","EPSG:2989","EPSG:32620"],RGM04UTM38S:["IGNF:RGM04UTM38S","EPSG:32738"],RGNCUTM57S:["IGNF:RGNCUTM57S","EPSG:32757"],RGNCUTM58S:["IGNF:RGNCUTM58S","EPSG:32758"],RGNCUTM59S:["IGNF:RGNCUTM59S","EPSG:32759"],RGPFUTM5S:["IGNF:RGPFUTM5S","EPSG:3296","EPSG:32705"],RGPFUTM6S:["IGNF:RGPFUTM6S","EPSG:3297","EPSG:32706"],RGPFUTM7S:["IGNF:RGPFUTM7S","EPSG:3298","EPSG:32707"],RGR92UTM40S:["IGNF:RGR92UTM40S","EPSG:2975","EPSG:32740"],UTM43SW84:["IGNF:UTM43SW84","EPSG:32743"],RGSPM06U21:["IGNF:RGSPM06U21","EPSG:32606"],UTM01SW84:["IGNF:UTM01SW84","EPSG:32701"],GOOGLE:["EPSG:3785","EPSG:3857","EPSG:900913","EPSG:102113"]};OpenLayers.Projection.prototype.domainOfValidity=null;OpenLayers.Projection.prototype.initialize=function(h,d){OpenLayers.Util.extend(this,d);this.projCode=h;this.options=OpenLayers.Util.extend({},d);this.aliases=OpenLayers.Util.extend({},this.options.aliases);if(window.Proj4js){this.proj=null;try{this.proj=new Proj4js.Proj(h)}catch(f){throw OpenLayers.i18n("unknown.crs",{crs:h})}}if(this.proj==null){throw OpenLayers.i18n("no.proj.implementation.found")}if(h=="EPSG:4326"||h=="CRS:84"||h=="IGNF:WGS84G"||h=="WGS84"){this.domainOfValidity=new OpenLayers.Bounds(-180,-90,180,90)}else{if(h=="EPSG:3785"||h=="EPSG:3857"||h=="EPSG:900913"||h=="EPSG:102113"||h=="GOOGLE"){this.domainOfValidity=new OpenLayers.Bounds(-180,-85.05113,180,85.05113)}else{if(this.isUTMZoneProjection()){var b=-180,a=-90,g=180,j=90;if(this.getProjName()=="utm"){g=this.getProperty("zone")*6-180;b=g-6;j=84;a=0;if(this.getProperty("south")===true){j=0;a=-80}}else{if(this.getProjName()=="stere"){if(this.getProperty("standard_parallel_1")>0){a=84}else{j=-80}}}this.domainOfValidity=new OpenLayers.Bounds(b,a,g,j)}}}};OpenLayers.Projection.prototype.getCode=function(){if(window.Proj4js&&(this.proj instanceof Proj4js.Proj)){return this.proj.srsCode}return this.projCode};OpenLayers.Projection.prototype.getUnits=function(){if(window.Proj4js&&(this.proj instanceof Proj4js.Proj)){return this.proj.units}return null},OpenLayers.Projection.prototype.clone=function(){if(this.proj==null){return null}var a=new OpenLayers.Projection(this.projCode,this.options);a.aliases=OpenLayers.Util.extend({},this.aliases);return a};OpenLayers.Projection.prototype.getProjName=function(){if(window.Proj4js&&(this.proj instanceof Proj4js.Proj)){return this.proj.projName}return null};OpenLayers.Projection.prototype.getTitle=function(){var a=OpenLayers.i18n(this.projCode);if(a==this.projCode){a=this.getProperty("title");if(a==null){a=this.projCode}}return a};OpenLayers.Projection.prototype.getDatum=function(){if(window.Proj4js&&(this.proj instanceof Proj4js.Proj)){return this.proj.datum}return null};OpenLayers.Projection.prototype.getProperty=function(a){if(a==undefined){return null}if(window.Proj4js&&(this.proj instanceof Proj4js.Proj)){switch(a){case"projcs":a="projName";break;case"datum":a="datumCode";break;case"spheroid":a="ellps";break;case"nadgrids":a="nagrids";break;case"semi_major":a="a";break;case"semi_minor":a="b";break;case"inverse_flattening":a="rf";break;case"standard_parallel_1":a=(this.getProjName().match(/t?merc|eqc|stere|utm/)?"lat_ts":"lat1");break;case"standard_parallel_2":a="lat2";break;case"latitude_of_center":case"latitude_of_origin":a="lat0";break;case"longitude_of_center":case"central_meridian":a="long0";break;case"false_easting":a="x0";break;case"false_northing":a="y0";break;case"scale_factor":a="k0";break;case"south":a="utmSouth";break;case"towgs84":a="datum_params";break;case"primem":a="from_greenwich";break;default:break}return this.proj[a]}return null};OpenLayers.Projection.prototype.equals=function(b){var a=false;if(this.proj&&b){var d=b instanceof OpenLayers.Projection?b.getCode():b;if(this.getCode()==d){a=true}else{a=this.isAliasOf(b)}}return a};OpenLayers.Projection.prototype.isAliasOf=function(o){if(!this.proj||!o){return false}var d=this.getCode(),b=o instanceof OpenLayers.Projection?o.getCode():o;if(this.aliases[b]===true){return true}if(this.aliases[b]===false){return false}var m=false,j=false;for(var g in OpenLayers.Projection.WKALIASES){if(OpenLayers.Projection.WKALIASES.hasOwnProperty(g)){var p=OpenLayers.Projection.WKALIASES[g];for(var h=0,f=p.length;h<f&&!(m&&j);h++){if(d==p[h]){m=true;continue}if(b==p[h]){j=true;continue}}if(m||j){break}}}this.aliases[b]=(m&&j);return this.aliases[b]};OpenLayers.Projection.prototype.isCompatibleWith=function(d){if(!this.proj||!d){return false}var h;try{h=d instanceof OpenLayers.Projection?d:new OpenLayers.Projection(d)}catch(g){OpenLayers.Console.error(g.message);return false}var b=false;if(this.equals(h)){b=true}else{try{var a=this.getProjName(),f=h.getProjName();if((a=="longlat"||a=="eqc")&&(f=="longlat"||f=="eqc")){b=this.getDatum()&&h.getDatum()&&this.getDatum().compare_datums(h.getDatum());if(b&&this.domainOfValidity&&h.domainOfValidity){b=this.domainOfValidity.intersectsBounds(h.domainOfValidity,true)}}else{}}catch(g){}}if(!(h==d)){h.destroy();h=null}return b};OpenLayers.Projection.prototype.isUTMZoneProjection=function(){if(this.proj==null){return false}if(this.getProjName()=="utm"&&this.getProperty("zone")!=null){return true}if(this.getProjName()=="stere"&&this.getProperty("central_meridian")==0&&this.getProperty("latitude_of_origin")===this.getProperty("standard_parallel_1")&&Math.abs(this.getProperty("latitude_of_origin"))==1.57079632679){return true}return false};OpenLayers.Projection.prototype.destroy=function(){if(this.proj){delete this.proj}if(this.projCode){delete this.projCode}if(this.domainOfValidity){delete this.domainOfValidity}delete this.options;delete this.aliases};OpenLayers.Projection.CRS84=new OpenLayers.Projection("WGS84");OpenLayers.Projection.getUTMZone=function(b){var a=""+(Math.floor(b/6)+31);return a};OpenLayers.Projection.getMGRSZone=function(a,g){var d=["C","D","E","F","G","H","J","K","L","M","N","P","Q","R","S","T","U","V","W"];var b;if(g.lat<-80){if(g.lon<0){b="A"}else{b="B"}return b}if(g.lat>84){if(g.lon<0){b="Y"}else{b="Z"}return b}if(g.lat>72){if(g.lon<0||g.lon>42){b=a+"X"}else{if(g.lon<=9){b="31X"}else{if(g.lon<=21){b="33X"}else{if(g.lon<=33){b="35X"}else{b="37X"}}}}return b}var f=Math.abs(parseInt((g.lat+80)/8,10));b=a+d[f];if(b=="31V"&&g.lon>3){b="32V"}return b};OpenLayers.Projection.transform=function(f,g,b){if(g&&b){if(window.Proj4js&&(g.proj instanceof Proj4js.Proj)&&(b.proj instanceof Proj4js.Proj)){if(!g.equals(b)){if(f instanceof Array){for(var d=0,a=f.length;d<a;d++){f[d]=Proj4js.transform(g.proj,b.proj,f[d]);if(f[d] instanceof OpenLayers.Geometry){f[d].bounds=null}}}else{f=Proj4js.transform(g.proj,b.proj,f);if(f instanceof OpenLayers.Geometry){f.bounds=null}}}}else{if(OpenLayers.Projection.transforms[g.getCode()]&&OpenLayers.Projection.transforms[g.getCode()][b.getCode()]){if(f instanceof Array){for(var d=0,a=f.length;d<a;d++){OpenLayers.Projection.transforms[g.getCode()][b.getCode()](f[d]);if(f[d] instanceof OpenLayers.Geometry){f[d].bounds=null}}}else{OpenLayers.Projection.transforms[g.getCode()][b.getCode()](f);if(f instanceof OpenLayers.Geometry){f.bounds=null}}}}}return f};OpenLayers.Bounds.prototype.transform=function(z,m,E){if(!E){var q=OpenLayers.Projection.transform({x:this.left,y:this.bottom},z,m);var l=OpenLayers.Projection.transform({x:this.right,y:this.top},z,m);this.left=q.x<l.x?q.x:l.x;this.bottom=q.y<l.y?q.y:l.y;this.right=l.x>q.x?l.x:q.x;this.top=l.y>q.y?l.y:q.y;return this}var F=m.getProjName()=="longlat"?0.000028:1;var b,f,G,u;var d=1;for(var C=0;C<7;C++){var r=(this.right-this.left)/(1*d);var o=(this.top-this.bottom)/(1*d);var v;var a,D,h,H;var I=[],g=0;for(var B=0;B<d;B++){I[g++]={x:this.left+B*r,y:this.bottom};I[g++]={x:this.right,y:this.bottom+B*o};I[g++]={x:this.right-B*r,y:this.top};I[g++]={x:this.left,y:this.top-B*o}}I=OpenLayers.Projection.transform(I,z,m);if(a==undefined){a=h=I[0].x;D=H=I[0].y}for(var w=0;w<g;w++){v=I[w];if(v.x<a){a=v.x}if(v.y<D){D=v.y}if(v.x>h){h=v.x}if(v.y>H){H=v.y}}I=null;if(b!=undefined&&Math.abs(a-b)<F&&Math.abs(D-f)<F&&Math.abs(h-G)<F&&Math.abs(H-u)<F){this.left=a;this.bottom=D;this.right=h;this.top=H;return this}b=a;f=D;G=h;u=H;d*=2}this.left=b;this.bottom=f;this.right=G;this.top=u;return this};OpenLayers.LonLat.prototype.equals=function(g,f){var d=false;if(!f){f=0.000001}if(g!=null){var b=(!isNaN(this.lon)&&!isNaN(g.lon))?Math.abs(this.lon-g.lon):1;var a=(!isNaN(this.lat)&&!isNaN(g.lat))?Math.abs(this.lat-g.lat):1;d=((b<=f&&a<=f)||(isNaN(this.lon)&&isNaN(this.lat)&&isNaN(g.lon)&&isNaN(g.lat)))}return d};OpenLayers.Map.prototype.removeLayer=function(d,g){if(g==null){g=true}if(d.isFixed){this.viewPortDiv.removeChild(d.div)}else{if(this.layerContainerDiv.childNodes.length>0){this.layerContainerDiv.removeChild(d.div)}}OpenLayers.Util.removeItem(this.layers,d);d.removeMap(this);d.map=null;if(this.baseLayer==d){this.baseLayer=null;if(g){for(var b=0,a=this.layers.length;b<a;b++){var f=this.layers[b];if(f.isBaseLayer||this.allOverlays){this.setBaseLayer(f);break}}}}this.resetLayersZIndex();this.events.triggerEvent("removelayer",{layer:d})};OpenLayers.Map.prototype.isValidZoomLevel=function(b){var a=(b!=null);a=a&&(b>=0);a=a&&(b<this.getNumZoomLevels());if(this.minZoomLevel!=undefined){a=a&&(b>=this.minZoomLevel)}if(this.maxZoomLevel!=undefined){a=a&&(b<=this.maxZoomLevel)}return a};OpenLayers.Map.prototype.getProjectionObject=OpenLayers.Map.prototype.getProjection=function(){var a=null;if(this.baseLayer!=null){a=this.baseLayer.projection}else{a=this.projection}if(a&&typeof(a)=="string"){a=new OpenLayers.Projection(a)}return a?a:null};OpenLayers.Map.prototype.getDisplayProjection=function(){var a=null;if(this.displayProjection){a=this.displayProjection}else{a=this.getProjection()}return a};OpenLayers.Map.prototype.getMaxExtent=function(b){var a=null;if(b&&b.restricted&&this.restrictedExtent){a=this.restrictedExtent}else{if(this.baseLayer!=null){a=this.baseLayer.maxExtent}}if(!a){this.maxExtent=new OpenLayers.Bounds(-180,-90,180,90);this.maxExtent.transform(OpenLayers.Projection.CRS84,this.getProjection(),true);a=this.maxExtent}return a};OpenLayers.Map.prototype.updateSize=function(){var d=this.getCurrentSize();if(d&&!isNaN(d.h)&&!isNaN(d.w)){this.events.clearMouseCache();var h=this.getSize();if(h==null){this.size=h=d}if(!d.equals(h)){this.size=d;for(var f=0,b=this.layers.length;f<b;f++){this.layers[f].onMapResize()}var a=this.getCenter();if(this.baseLayer!=null&&a!=null){var g=this.getZoom();this.zoom=null;this.setCenter(a,g)}}}};OpenLayers.Layer.prototype.dataURL=null;OpenLayers.Layer.prototype.metadataURL=null;OpenLayers.Layer.prototype.savedStates={};OpenLayers.Layer.prototype.onLoadError=null;OpenLayers.Layer.WMS.Untiled.prototype.RESOLUTION_PROPERTIES=OpenLayers.Layer.WMS.prototype.RESOLUTION_PROPERTIES=OpenLayers.Layer.Vector.RootContainer.prototype.RESOLUTION_PROPERTIES=OpenLayers.Layer.Vector.prototype.RESOLUTION_PROPERTIES=OpenLayers.Layer.HTTPRequest.prototype.RESOLUTION_PROPERTIES=OpenLayers.Layer.Grid.prototype.RESOLUTION_PROPERTIES=OpenLayers.Layer.GML.prototype.RESOLUTION_PROPERTIES=OpenLayers.Layer.prototype.RESOLUTION_PROPERTIES=["projection","units","scales","resolutions","maxScale","minScale","maxResolution","minResolution","minExtent","maxExtent","numZoomLevels","maxZoomLevel"];OpenLayers.Layer.prototype.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}this.savedStates={};if(this.GeoRM){if(!this.events){this.events=new OpenLayers.Events(this,this.div,this.EVENT_TYPES)}this.events.register("loadstart",this,this.updateGeoRM);this.events.register("move",this,this.updateGeoRM);this.events.register("moveend",this,this.updateGeoRM)}};OpenLayers.Layer.prototype.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;this.savedStates=null;if(this.GeoRM){this.events.unregister("moveend",this,this.updateGeoRM);this.events.unregister("move",this,this.updateGeoRM);this.events.unregister("loadstart",this,this.updateGeoRM)}if(this.events){if(this.eventListeners){this.events.un(this.eventListeners)}this.events.destroy()}this.eventListeners=null;this.events=null};OpenLayers.Layer.prototype.clone=function(a){if(a==null){a=new OpenLayers.Layer(this.name,this.options)}OpenLayers.Util.applyDefaults(a,this);a.map=null;a.savedStates={};return a};OpenLayers.Layer.WMS.Untiled.prototype.addOptions=OpenLayers.Layer.WMS.prototype.addOptions=OpenLayers.Layer.Vector.RootContainer.prototype.addOptions=OpenLayers.Layer.Vector.prototype.addOptions=OpenLayers.Layer.HTTPRequest.prototype.addOptions=OpenLayers.Layer.Grid.prototype.addOptions=OpenLayers.Layer.GML.prototype.addOptions=OpenLayers.Layer.prototype.addOptions=function(f){if(this.options==null){this.options={}}OpenLayers.Util.extend(this.options,f);OpenLayers.Util.extend(this,f);var b=this.projection;if(typeof b=="string"){this.projection=new OpenLayers.Projection(b)}if(this.map){var a=false;for(var d in f){if(f.hasOwnProperty(d)&&OpenLayers.Util.indexOf(this.RESOLUTION_PROPERTIES,d)>0){a=true;break}}if(a){this.initResolutions()}}};OpenLayers.Layer.prototype.updateGeoRM=function(){return(this.GeoRM.getToken()!=null||this.isBaseLayer)};OpenLayers.Layer.WMS.Untiled.prototype.getNativeProjection=OpenLayers.Layer.WMS.prototype.getNativeProjection=OpenLayers.Layer.Vector.RootContainer.prototype.getNativeProjection=OpenLayers.Layer.Vector.prototype.getNativeProjection=OpenLayers.Layer.HTTPRequest.prototype.getNativeProjection=OpenLayers.Layer.Grid.prototype.getNativeProjection=OpenLayers.Layer.GML.prototype.getNativeProjection=OpenLayers.Layer.prototype.getNativeProjection=function(){if(this.isBaseLayer){this.projection=this.projection||this.nativeProjection}if(!this.projection&&this.map){this.projection=this.map.getProjection()}if(this.projection&&typeof(this.projection)=="string"){this.projection=new OpenLayers.Projection(this.projection)}return this.projection};OpenLayers.Layer.prototype.changeBaseLayer=function(a){if(!a){return false}if(!(a.baseLayer)){return false}if(!this.map){return false}if(this.isBaseLayer){return true}var d=this.map.getProjection();var b=a.baseLayer.getNativeProjection();if(this.maxExtent){this.maxExtent.transform(b,d,true)}if(this.restrictedExtent){this.restrictedExtent.transform(b,d,true)}return true};OpenLayers.Layer.prototype.getCompatibleProjection=function(d){if(this.aggregate!=undefined){return undefined}var b=this.getNativeProjection();if(b==null){if(this.map==null){return undefined}return null}if(d==null){if(this.map==null){return undefined}d=this.map.baseLayer;if(d==null){return undefined}}if(d.territory&&this.territory&&d.territory!==this.territory){return null}var f=d.getNativeProjection();var a=b.isCompatibleWith(f)?b:null;return a};OpenLayers.Tile.prototype.initialize=function(f,a,g,b,d){this.layer=f;this.position=a.clone();this.bounds=g.clone();this.url=b;this.size=d.clone();this.id=OpenLayers.Util.createUniqueID("Tile_");this.events=new OpenLayers.Events(this,null,this.EVENT_TYPES);if(f.GeoRM){this.events.register("reload",this,this.updateGeoRM);this.events.register("loadstart",this,this.updateGeoRM)}};OpenLayers.Tile.prototype.destroy=function(){if(this.layer.GeoRM){this.events.unregister("reload",this,this.updateGeoRM);this.events.unregister("loadstart",this,this.updateGeoRM)}this.layer=null;this.bounds=null;this.size=null;this.position=null;this.events.destroy();this.events=null};OpenLayers.Tile.prototype.updateGeoRM=function(){return(this.layer.GeoRM.getToken()!=null)};OpenLayers.Layer.Grid.prototype.mergeNewParams=OpenLayers.Layer.HTTPRequest.prototype.mergeNewParams=function(a){this.params=OpenLayers.Util.extend(this.params,a);if(this.GeoRM){OpenLayers.Util.extend(this.params,this.GeoRM.token)}return this.redraw()};OpenLayers.Layer.Grid.prototype.getFullRequestString=OpenLayers.Layer.HTTPRequest.prototype.getFullRequestString=function(h,g){var b=g||this.url;var j=OpenLayers.Util.extend({},this.params);j=OpenLayers.Util.extend(j,h);if(this.GeoRM){OpenLayers.Util.extend(j,this.GeoRM.token)}var a=OpenLayers.Util.getParameterString(j);if(b instanceof Array){b=this.selectUrl(a,b)}var f=OpenLayers.Util.upperCaseObject(OpenLayers.Util.getParameters(b));for(var l in j){if(l.toUpperCase() in f){delete j[l]}}a=OpenLayers.Util.getParameterString(j);var m=b;if(a!=""){var d=b.charAt(b.length-1);if((d=="&")||(d=="?")){m+=a}else{if(b.indexOf("?")==-1){m+="?"+a}else{m+="&"+a}}}return m};OpenLayers.Layer.WMS.prototype.getFullRequestString=function(g,d){var b=this.getNativeProjection();var a="SRS";if(this.params.VERSION.match(/^1\.3\..*/)){a="CRS";if(typeof(this.layerLimit)=="number"){var f=this.params.LAYERS.split(",");if(this.layerLimit<f.length){this.params.LAYERS=f.slice(0,this.layerLimit).join(",");OpenLayers.Console.warn("["+f.slice(this.layerLimit).join(",")+"]")}}}this.params[a]=(b==null)?null:b.getCode();return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,arguments)};OpenLayers.Layer.WMS.prototype.getURL=function(b){var f=b.clone();f=this.adjustBounds(f);f.transform(this.map.getProjection(),this.getNativeProjection(),true);var d=this.getImageSize();var g={BBOX:this.encodeBBOX?f.toBBOX():f.toArray(),WIDTH:d.w,HEIGHT:d.h};var a=this.getFullRequestString(g);return a};OpenLayers.Layer.WMS.prototype.getDataExtent=function(){return this.maxExtent};OpenLayers.Popup.Framed.prototype.destroy=function(){this.imageSrc=null;this.imageSize=null;this.isAlphaImage=null;this.fixedRelativePosition=false;this.positionBlocks=null;if(this.blocks){for(var a=0;a<this.blocks.length;a++){var b=this.blocks[a];if(b.image){b.div.removeChild(b.image)}b.image=null;if(b.div){this.groupDiv.removeChild(b.div)}b.div=null}this.blocks=null}OpenLayers.Popup.Anchored.prototype.destroy.apply(this,arguments)};OpenLayers.Feature.Vector.prototype.destroyPopup=function(){OpenLayers.Feature.prototype.destroyPopup.apply(this,arguments)};OpenLayers.Control.KeyboardDefaults.prototype.defaultKeyPress=function(a){var d=false;switch(a.keyCode){case OpenLayers.Event.KEY_LEFT:this.map.pan(-this.slideFactor,0);d=true;break;case OpenLayers.Event.KEY_RIGHT:this.map.pan(this.slideFactor,0);d=true;break;case OpenLayers.Event.KEY_UP:this.map.pan(0,-this.slideFactor);d=true;break;case OpenLayers.Event.KEY_DOWN:this.map.pan(0,this.slideFactor);d=true;break;case 33:var b=this.map.getSize();this.map.pan(0,-0.75*b.h);d=true;break;case 34:var b=this.map.getSize();this.map.pan(0,0.75*b.h);d=true;break;case 35:var b=this.map.getSize();this.map.pan(0.75*b.w,0);d=true;break;case 36:var b=this.map.getSize();this.map.pan(-0.75*b.w,0);d=true;break;case 43:case 61:case 187:case 107:this.map.zoomIn();d=true;break;case 45:case 54:case 109:case 189:case 95:this.map.zoomOut();d=true;break}if(d===true){OpenLayers.Event.stop(a)}};OpenLayers.Geometry.Point.prototype.transform=function(b,a){OpenLayers.Projection.transform(this,b,a);return this};OpenLayers.Geometry.LineString.prototype.transform=OpenLayers.Geometry.Curve.prototype.transform=OpenLayers.Geometry.MultiPoint.prototype.transform=function(b,a){OpenLayers.Projection.transform(this.components,b,a);if(b&&a){this.bounds=null}return this};OpenLayers.Geometry.LineString.prototype.getGeodesicLength=OpenLayers.Geometry.Curve.prototype.getGeodesicLength=function(b){var g=this;var d=b||OpenLayers.Projection.CRS84;if(b){if(!OpenLayers.Projection.CRS84.equals(b)){g=this.clone().transform(b,OpenLayers.Projection.CRS84);d=OpenLayers.Projection.CRS84}}var h=0;if(g.components&&(g.components.length>1)){var l,j;for(var f=1,a=g.components.length;f<a;f++){l=g.components[f-1];j=g.components[f];h+=OpenLayers.Util.distVincenty({lon:l.x,lat:l.y},{lon:j.x,lat:j.y},d)}}return h*1000};OpenLayers.Geometry.LinearRing.prototype.getGeodesicArea=function(g){var d=this;var j=g||OpenLayers.Projection.CRS84;if(g){if(!OpenLayers.Projection.CRS84.equals(g)){d=this.clone().transform(g,j);j=OpenLayers.Projection.CRS84}}var b=0;var h=d.components&&d.components.length;var l=j.getProperty("semi_major")||6378137;if(h>2){var o,m;for(var f=0;f<h-1;f++){o=d.components[f];m=d.components[f+1];b+=OpenLayers.Util.rad(m.x-o.x)*(2+Math.sin(OpenLayers.Util.rad(o.y))+Math.sin(OpenLayers.Util.rad(m.y)))}b=b*l*l/2}return b};OpenLayers.Renderer.Elements.prototype.setExtent=OpenLayers.Renderer.prototype.setExtent=function(a,b){this.extent=(a?a.clone():new OpenLayers.Bounds(0,0,0,0));if(b){this.resolution=null}};OpenLayers.Renderer.VML.prototype.getResolution=OpenLayers.Renderer.SVG.prototype.getResolution=OpenLayers.Renderer.Elements.prototype.getResolution=OpenLayers.Renderer.Canvas.prototype.getResolution=OpenLayers.Renderer.prototype.getResolution=function(){this.resolution=this.resolution||(this.map?this.map.getResolution():null);return this.resolution};OpenLayers.Renderer.VML.prototype.drawFeature=OpenLayers.Renderer.SVG.prototype.drawFeature=OpenLayers.Renderer.Elements.prototype.drawFeature=OpenLayers.Renderer.prototype.drawFeature=function(d,f){if(f==null){f=d.style}if(d.geometry){var g=d.geometry.getBounds();if(g){if(!g.intersectsBounds(this.extent)){f={display:"none"}}var h=this.drawGeometry(d.geometry,f,d.id);if(f.display!="none"&&f.label&&h!==false){var a=d.geometry.getCentroid();if(f.labelXOffset||f.labelYOffset){xOffset=isNaN(f.labelXOffset)?0:f.labelXOffset;yOffset=isNaN(f.labelYOffset)?0:f.labelYOffset;var b=this.getResolution();a.move(xOffset*b,yOffset*b)}this.drawText(d.id,f,a)}else{this.removeText(d.id)}return h}}};OpenLayers.Renderer.VML.prototype.removeText=OpenLayers.Renderer.SVG.prototype.removeText=OpenLayers.Renderer.Elements.prototype.removeText=function(b){var a=document.getElementById(b+this.LABEL_ID_SUFFIX);if(a){this.textRoot.removeChild(a)}var d=document.getElementById(b+this.LABEL_ID_SUFFIX+"_bg");if(d){this.textRoot.removeChild(d)}};OpenLayers.Renderer.Canvas.prototype.setExtent=function(a){this.extent=(a?a.clone():new OpenLayers.Bounds(0,0,0,0));this.resolution=null;this.redraw()};OpenLayers.Renderer.VML.prototype.createNode=function(a,d){var b=document.createElement(a);if(d){b.id=d}b.unselectable="on";b.onselectstart=OpenLayers.Function.False;return b};OpenLayers.Renderer.VML.prototype.setExtent=function(m,a){OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments);var d=this.getResolution();if(d==null){return false}var b=(m?m.left/d:0)|0;var h=(m?m.top/d-this.size.h:0)|0;if(a){this.offset={x:b,y:h};b=0;h=0}else{b=b-this.offset.x;h=h-this.offset.y}var p=b+" "+h;this.root.coordorigin=p;var l=[this.root,this.vectorRoot,this.textRoot];var j;for(var f=0,g=l.length;f<g;++f){j=l[f];var o=this.size.w+" "+this.size.h;j.coordsize=o}this.root.style.flip="y";return true};OpenLayers.Renderer.VML.prototype.drawText=function(f,a,l){var j=this.nodeFactory(f+this.LABEL_ID_SUFFIX,"olv:rect");var h=this.nodeFactory(f+this.LABEL_ID_SUFFIX+"_textbox","olv:textbox");var d=this.getResolution();j.style.left=((l.x/d-this.offset.x)|0)+"px";j.style.top=((l.y/d-this.offset.y)|0)+"px";j.style.flip="y";h.innerText=a.label;if(a.labelBackgroundColor){h.style.backgroundColor=a.labelBackgroundColor}if(parseFloat((navigator.appVersion.match(/MSIE (\d+\.\d+);/i))[1])>=8){if(a.labelBorderColor||a.labelBorderSize){h.style.border=(a.labelBorderSize||"1px")+" solid "+(a.labelBorderColor||"#000000")}}if(a.fontColor){h.style.color=a.fontColor}if(a.fontOpacity){h.style.filter="alpha(opacity="+(a.fontOpacity*100)+")"}if(a.fontFamily){h.style.fontFamily=a.fontFamily}if(a.fontSize){h.style.fontSize=a.fontSize}if(a.fontWeight){h.style.fontWeight=a.fontWeight}if(a.labelSelect===true){j._featureId=f;h._featureId=f;h._geometry=l;h._geometryClass=l.CLASS_NAME}h.style.whiteSpace="nowrap";h.inset="1px,0px,0px,0px";if(!j.parentNode){j.appendChild(h);this.textRoot.appendChild(j)}var g=a.labelAlign||"cm";var m=h.clientWidth*(OpenLayers.Renderer.VML.LABEL_SHIFT[g[0]||"c"]);var b=h.clientHeight*(OpenLayers.Renderer.VML.LABEL_SHIFT[g[1]||"m"]);j.style.left=parseInt(j.style.left)-m-1+"px";j.style.top=parseInt(j.style.top)+b+"px"};OpenLayers.Renderer.SVG.prototype.drawText=function(g,a,u){var b=this.getResolution();var r=(u.x/b+this.left);var m=(u.y/b-this.top);var q=this.nodeFactory(g+this.LABEL_ID_SUFFIX,"text");var o=this.nodeFactory(g+this.LABEL_ID_SUFFIX+"_tspan","tspan");q.setAttributeNS(null,"x",r);q.setAttributeNS(null,"y",-m);if(a.fontColor){q.setAttributeNS(null,"fill",a.fontColor)}if(a.fontOpacity){q.setAttributeNS(null,"opacity",a.fontOpacity)}if(a.fontFamily){q.setAttributeNS(null,"font-family",a.fontFamily)}if(a.fontSize){q.setAttributeNS(null,"font-size",a.fontSize)}if(a.fontWeight){q.setAttributeNS(null,"font-weight",a.fontWeight)}if(a.labelSelect===true){q.setAttributeNS(null,"pointer-events","visible");q._featureId=g;o._featureId=g;o._geometry=u;o._geometryClass=u.CLASS_NAME}else{q.setAttributeNS(null,"pointer-events","none")}var h=a.labelAlign||"cm";q.setAttributeNS(null,"text-anchor",OpenLayers.Renderer.SVG.LABEL_ALIGN[h[0]]||"middle");if(this.isGecko){q.setAttributeNS(null,"dominant-baseline",OpenLayers.Renderer.SVG.LABEL_ALIGN[h[1]]||"central")}else{o.setAttributeNS(null,"baseline-shift",OpenLayers.Renderer.SVG.LABEL_VSHIFT[h[1]]||"-35%")}o.textContent=a.label;if(!q.parentNode){q.appendChild(o);this.textRoot.appendChild(q)}if(a.labelBackgroundColor||a.labelBorderColor||a.labelBorderSize){var f=this.nodeFactory(g+this.LABEL_ID_SUFFIX+"_bg","rect");if(a.labelBackgroundColor){f.setAttributeNS(null,"fill",a.labelBackgroundColor)}if(a.labelBorderColor||a.labelBorderSize){f.setAttributeNS(null,"stroke",(a.labelBorderColor?a.labelBorderColor:"#000000"));f.setAttributeNS(null,"stroke-width",(a.labelBorderSize?a.labelBorderSize:"0.5"))}var v=q.getBBox();var j=v.width;var d=v.height;var p=2;if(a.labelPadding){var l=a.labelPadding.indexOf("px");if(l==-1){p=a.labelPadding}else{p=parseInt(a.labelPadding.substr(0,l))}}f.setAttributeNS(null,"x",v.x-p);f.setAttributeNS(null,"y",v.y-p);f.setAttributeNS(null,"height",(d+p*2)+"px");f.setAttributeNS(null,"width",(j+p*2)+"px");this.textRoot.insertBefore(f,q)}};OpenLayers.Renderer.SVG.prototype.setExtent=function(b,f){OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments);var a=this.getResolution();var h=(b?-b.left/a:0)|0;var g=(b?b.top/a:0)|0;if(f){this.left=h;this.top=g;var d="0 0 "+this.size.w+" "+this.size.h;this.rendererRoot.setAttributeNS(null,"viewBox",d);this.translate(0,0);return true}else{var j=this.translate(h-this.left,g-this.top);if(!j){this.setExtent(b,true)}return j}};OpenLayers.Layer.GML.prototype.addFeatures=OpenLayers.Layer.Vector.prototype.addFeatures=function(b,m){if(!(b instanceof Array)){b=[b]}var j=!m||!m.silent;if(j){var a={features:b};var h=this.events.triggerEvent("beforefeaturesadded",a);if(h===false){return}b=a.features}for(var d=0,g=b.length;d<g;d++){if(d!=(b.length-1)){this.renderer.locked=true}else{this.renderer.locked=false}var l=b[d];if(!(l instanceof OpenLayers.Feature.Vector)){continue}if(this.geometryType&&!(l.geometry.CLASS_NAME==this.geometryType)){var f=OpenLayers.i18n("componentShouldBe",{geomType:this.geometryType});throw f}l.layer=this;if(!l.style&&this.style){l.style=OpenLayers.Util.extend({},this.style)}if(j){if(this.events.triggerEvent("beforefeatureadded",{feature:l})===false){continue}this.preFeatureInsert(l)}this.features.push(l);this.drawFeature(l);if(j){this.events.triggerEvent("featureadded",{feature:l});this.onFeatureInsert(l)}}if(j){this.events.triggerEvent("featuresadded",{features:b})}};OpenLayers.Layer.GML.prototype.getDataExtent=OpenLayers.Layer.Vector.prototype.getDataExtent=function(){var a=null;if(this.features&&(this.features.length>0)){a=new OpenLayers.Bounds();for(var d=0,b=this.features.length;d<b;d++){if(this.features[d].geometry){a.extend(this.features[d].geometry.getBounds())}}}return a};OpenLayers.Layer.Vector.RootContainer.prototype.setMap=function(a){OpenLayers.Layer.Vector.prototype.setMap.apply(this,arguments);this.collectRoots();a.events.on({changelayer:this.handleChangeLayer,removelayer:this.handleRemoveLayer,scope:this})};OpenLayers.Layer.Vector.RootContainer.prototype.removeMap=function(a){a.events.un({changelayer:this.handleChangeLayer,removelayer:this.handleRemoveLayer,scope:this});this.resetRoots();OpenLayers.Layer.Vector.prototype.removeMap.apply(this,arguments)};OpenLayers.Layer.Vector.RootContainer.prototype.handleRemoveLayer=function(a){var d=a.layer;for(var b=0;b<this.layers.length;b++){if(d==this.layers[b]){this.layers.splice(b,1);this.renderer.eraseFeatures(d.features);return}}};OpenLayers.Format.XML.prototype.write=function(b){var d;if(b.xml!=undefined){d=b.xml}else{var a=new XMLSerializer();if(b.nodeType==1){var f=document.implementation.createDocument("","",null);if(f.importNode){b=f.importNode(b,true)}f.appendChild(b);d=a.serializeToString(f)}else{d=a.serializeToString(b)}}return d};OpenLayers.Format.KML.prototype.setAttributeNS=OpenLayers.Format.OSM.prototype.setAttributeNS=OpenLayers.Format.XML.prototype.setAttributeNS=function(f,d,a,g){if(g==null||g==undefined){g=""}if(f.setAttributeNS){f.setAttributeNS(d,a,g)}else{if(this.xmldom){if(d){var b=f.ownerDocument.createNode(2,a,d);b.nodeValue=g;f.setAttributeNode(b)}else{f.setAttribute(a,g)}}else{throw OpenLayers.i18n("xml.setattributens")}}};OpenLayers.Format.KML.prototype.externalProjection=new OpenLayers.Projection("EPSG:4326");OpenLayers.Format.KML.prototype.extractFolders=false;OpenLayers.Format.KML.prototype.read=function(b){this.features=[];this.styles={};this.fetched={};if(this.extractFolders){this.folders={}}var a={depth:0,styleBaseUrl:this.styleBaseUrl};this.parseData(b,a);return this.extractFolders?this.folders:this.features};OpenLayers.Format.KML.prototype.parseData=function(d,p){if(typeof d=="string"){d=OpenLayers.Format.XML.prototype.read.apply(this,[d])}var j=["Link","NetworkLink","Style","StyleMap","Placemark"];for(var g=0,l=j.length;g<l;++g){var m=j[g];var b=this.getElementsByTagNameNS(d,"*",m);if(b.length==0){continue}switch(m.toLowerCase()){case"link":case"networklink":this.parseLinks(b,p);break;case"style":if(this.extractStyles){this.parseStyles(b,p)}break;case"stylemap":if(this.extractStyles){this.parseStyleMaps(b,p)}break;case"placemark":this.parseFeatures(b,p);break}}if(this.extractFolders){var h=[];for(var o in this.folders){h.push(this.folders[o])}this.folders=h}return this.features};OpenLayers.Format.KML.prototype.parseStyles=function(b,d){for(var g=0,a=b.length;g<a;g++){var h=this.parseStyle(b[g]);if(h){var f=(d.styleBaseUrl||"")+"#"+h.id;this.styles[f]=h}}};OpenLayers.Format.KML.prototype.parseStyle=function(F){var Q={};var O=["LineStyle","PolyStyle","IconStyle","BalloonStyle"];var aa,o,p,C,V;for(var T=0,u=O.length;T<u;++T){aa=O[T];V=this.getElementsByTagNameNS(F,"*",aa)[0];if(!V){continue}switch(aa.toLowerCase()){case"linestyle":var B=this.parseProperty(V,"*","color");if(B){var d=(B.toString()).match(this.regExes.kmlColor);var R=d[1];Q.strokeOpacity=parseInt(R,16)/255;var Z=d[2];var W=d[3];var P=d[4];Q.strokeColor="#"+P+W+Z}var a=this.parseProperty(V,"*","width");if(a){Q.strokeWidth=a}case"polystyle":var B=this.parseProperty(V,"*","color");if(B){var d=(B.toString()).match(this.regExes.kmlColor);var R=d[1];Q.fillOpacity=parseInt(R,16)/255;var Z=d[2];var W=d[3];var P=d[4];Q.fillColor="#"+P+W+Z}var q=this.parseProperty(V,"*","fill");if(q=="0"){Q.fillColor="none"}break;case"iconstyle":var G=parseFloat(this.parseProperty(V,"*","scale")||1);var a=32*G;var f=32*G;var j=this.getElementsByTagNameNS(V,"*","Icon")[0];if(j){var z=this.parseProperty(j,"*","href");if(z){var N=this.parseProperty(j,"*","w");var U=this.parseProperty(j,"*","h");var m="http://maps.google.com/mapfiles/kml";if(OpenLayers.String.startsWith(z,m)&&!N&&!U){N=64;U=64;G=G/2}N=N||U;U=U||N;if(N){a=parseInt(N)*G}if(U){f=parseInt(U)*G}var d=z.match(this.regExes.kmlIconPalette);if(d){var S=d[1];var v=d[2];var M=this.parseProperty(j,"*","x");var L=this.parseProperty(j,"*","y");var I=M?M/32:0;var H=L?(7-L/32):7;var E=H*8+I;z="http://maps.google.com/mapfiles/kml/pal"+S+"/icon"+E+v}Q.graphicOpacity=1;Q.externalGraphic=z}}var K=this.getElementsByTagNameNS(V,"*","hotSpot")[0];if(K){var M=parseFloat(K.getAttribute("x"));var L=parseFloat(K.getAttribute("y"));var D=K.getAttribute("xunits");if(D=="pixels"){Q.graphicXOffset=-M*G}else{if(D=="insetPixels"){Q.graphicXOffset=-a+(M*G)}else{if(D=="fraction"){Q.graphicXOffset=-a*M}}}var l=K.getAttribute("yunits");if(l=="pixels"){Q.graphicYOffset=-f+(L*G)+1}else{if(l=="insetPixels"){Q.graphicYOffset=-(L*G)+1}else{if(l=="fraction"){Q.graphicYOffset=-f*(1-L)+1}}}}Q.graphicWidth=a;Q.graphicHeight=f;break;case"balloonstyle":var Y=this.getElementsByTagNameNS(V,"*","text")[0];if(Y){Y=OpenLayers.Util.getXmlNodeValue(Y)}if(Y){Q.balloonStyle=Y.replace(this.regExes.straightBracket,"${$1}")}break;default:}}if(!Q.strokeColor&&Q.fillColor){Q.strokeColor=Q.fillColor}var J=F.getAttribute("id");if(J&&Q){Q.id=J}return Q};OpenLayers.Format.KML.prototype.parseFeatures=function(b,q){var h=new Array(b.length);for(var j=0,m=b.length;j<m;j++){var f=b[j];var l=f.parentNode;var p=this.parseFeature.apply(this,[f]);if(p){if(this.extractStyles&&p.attributes&&p.attributes.styleUrl){p.style=this.getStyle(p.attributes.styleUrl,q)}if(this.extractStyles){var o=this.getElementsByTagNameNS(f,"*","Style")[0];if(o){var g=this.parseStyle(o);if(g){p.style=OpenLayers.Util.extend(p.style,g)}}}if(l&&l.nodeName.toLowerCase()=="folder"&&this.extractFolders){var d=this.parseAttributes(l);var a=d.name;if(this.folders[a]==undefined){this.folders[a]=d;this.folders[a]["features"]=[]}this.folders[a].features.push(p)}h[j]=p}else{throw"Bad Placemark: "+j}}this.features=this.features.concat(h)};OpenLayers.Format.KML.prototype.parseAttributes=function(f){var g={};var h=f.getElementsByTagName("ExtendedData");if(h.length){g=this.parseExtendedData(h[0])}var b,q,p;var d=f.childNodes;for(var j=0,m=d.length;j<m;++j){b=d[j];if(b.nodeType==1){var a=(b.prefix)?b.nodeName.split(":")[1]:b.nodeName;q=b.childNodes;if(1<=q.length&&q.length<=3){var p;switch(q.length){case 1:p=q[0];break;case 2:if(q[0].nodeType==4){p=q[0];break}p=q[1];break;case 3:default:p=q[1];break}if(p.nodeType==3||p.nodeType==4){var o=OpenLayers.Util.getXmlNodeValue(p);if(o){o=o.replace(this.regExes.trimSpace,"");g[a]=o}continue}}if(a.match(/^Time(Stamp|Span)$/)){var l=this.parseAttributes(b);g[a]=l}}}return g};OpenLayers.Format.KML.prototype.parseExtendedData=function(b){var f={};var l=1;var d=null;var h,m=0;var g,q,j,r,p,a;do{switch(l){case 1:d=b.getElementsByTagName("Data");break;case 2:d=b.getElementsByTagName("SimpleData");break;case 3:var o=this.getAttributeNodeNS(b,"xlink","prefix");if(o==null){d=[]}else{d=this.getElementsByTagNameNS(b,o.nodeValue,"*")}default:d=[];break}m=d.length;if(m==0){l++;continue}for(h=0;h<m;h++){g=d[h];q=l!=3?g.getAttribute("name"):(g.localName||g.nodeName.split(":").pop());j={};r=l==1?g.getElementsByTagName("value"):[g];p="";if(r.length>0){r=r[0].childNodes;switch(r.length){case 0:r=null;break;case 1:r=r[0];break;case 2:if(r[0].nodeType==4){r=r[0];break}r=r[1];break;case 3:default:r=r[1];break}if(r&&(r.nodeType==3||r.nodeType==4)){p=OpenLayers.Util.getXmlNodeValue(r);if(p){p=p.replace(this.regExes.trimSpace,"")}}}j.value=p;a=g.getElementsByTagName("displayName");if(a.length){j.displayName=this.getChildValue(a[0])}f[q]=j}l++}while(l<=3);return f};OpenLayers.Format.OSM.prototype.externalProjection=new OpenLayers.Projection("EPSG:4326");OpenLayers.Format.OSM.prototype.createXML.point=function(a){var g=null;var d=a.geometry?a.geometry:a;if(this.internalProjection&&this.externalProjection){d=d.clone();d.transform(this.internalProjection,this.externalProjection)}var f=false;if(a.osm_id){g=a.osm_id;if(this.created_nodes[g]){f=true}}else{g=-this.osm_id;this.osm_id++}if(f){b=this.created_nodes[g]}else{var b=this.createElementNS(null,"node")}this.created_nodes[g]=b;b.setAttribute("id",g);b.setAttribute("lon",d.x);b.setAttribute("lat",d.y);if(a.attributes){this.serializeTags(a,b)}this.setState(a,b);return f?[]:[b]};OpenLayers.String.sprintf=function(){function j(q,a,m,p){var o=(q.length>=a)?"":Array(1+a-q.length>>>0).join(m);return p?q+o:o+q}function f(p,o,r,a,m){var q=a-p.length;if(q>0){if(r||!m){p=j(p,a," ",r)}else{p=p.slice(0,o.length)+j("",q,"0",true)+p.slice(o.length)}}return p}function l(u,r,q,v,m,a,p){var o=u>>>0;q=q&&o&&{"2":"0b","8":"0","16":"0x"}[r]||"";u=q+j(o.toString(r),a||0,"0",false);return f(u,q,v,m,p)}function b(p,q,m,a,o){if(a!=null){p=p.slice(0,a)}return f(p,"",q,m,o)}var d=arguments,g=0,h=d[g++];return h.replace(OpenLayers.String.sprintf.regex,function(B,F,o,m,H,v,E){if(B=="%%"){return"%"}var p=false,D="",z=false,C=false;for(var u=0;o&&u<o.length;u++){switch(o.charAt(u)){case" ":D=" ";break;case"+":D="+";break;case"-":p=true;break;case"0":z=true;break;case"#":C=true;break}}if(!m){m=0}else{if(m=="*"){m=+d[g++]}else{if(m.charAt(0)=="*"){m=+d[m.slice(1,-1)]}else{m=+m}}}if(m<0){m=-m;p=true}if(!isFinite(m)){throw new Error("sprintf: (minimum-)width must be finite")}if(!v){v="fFeE".indexOf(E)>-1?6:(E=="d")?0:void (0)}else{if(v=="*"){v=+d[g++]}else{if(v.charAt(0)=="*"){v=+d[v.slice(1,-1)]}else{v=+v}}}var G=F?d[F.slice(0,-1)]:d[g++];switch(E){case"s":return b(String(G),p,m,v,z);case"c":return b(String.fromCharCode(+G),p,m,v,z);case"b":return l(G,2,C,p,m,v,z);case"o":return l(G,8,C,p,m,v,z);case"x":return l(G,16,C,p,m,v,z);case"X":return l(G,16,C,p,m,v,z).toUpperCase();case"u":return l(G,10,C,p,m,v,z);case"i":case"d":var r=parseInt(+G);var w=r<0?"-":D;G=w+j(String(Math.abs(r)),v,"0",false);return f(G,w,p,m,z);case"e":case"E":case"f":case"F":case"g":case"G":var r=+G;var w=r<0?"-":D;var a=["toExponential","toFixed","toPrecision"]["efg".indexOf(E.toLowerCase())];var q=["toString","toUpperCase"]["eEfFgG".indexOf(E)%2];G=w+Math.abs(r)[a](v);return f(G,w,p,m,z)[q]();default:return B}})};OpenLayers.String.sprintf.regex=/%%|%(\d+\$)?([-+#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuidfegEG])/g;OpenLayers.Lang.en["olControlDragPan.title"]="Pan";OpenLayers.Lang.en["olControlZoomBox.title"]="Zoom in";OpenLayers.Lang.en["olControlZoomToMaxExtent.title"]="Zoom to max extent";OpenLayers.Lang.en["Document contains no parsing errors"]="Document contains no parsing errors";OpenLayers.Lang.en["Document is empty"]="Document is empty";OpenLayers.Lang.en["Not well-formed or other error"]="Not well-formed or other error";OpenLayers.Lang.en["xml.parse.error"]="XML Parsing Error: ${reason}\nLocation: ${url}\nLine Number ${line}, Column ${linepos}:\n ${srcText}\n";OpenLayers.Lang.en["wmc.version.not.supported"]="Can't find a WMC parser for version ${v}";OpenLayers.Lang.en["xml.setattributens"]="setAttributeNS not implemented";OpenLayers.Lang.en.Graticule="Graticule";if(typeof(OpenLayers.Lang.de)!="undefined"){OpenLayers.Lang.de["olControlDragPan.title"]=OpenLayers.Lang.en["olControlDragPan.title"];OpenLayers.Lang.de["olControlZoomBox.title"]=OpenLayers.Lang.en["olControlZoomBox.title"];OpenLayers.Lang.de["olControlZoomToMaxExtent.title"]=OpenLayers.Lang.en["olControlZoomToMaxExtent.title"];OpenLayers.Lang.de["Document contains no parsing errors"]=OpenLayers.Lang.en["Document contains no parsing errors"];OpenLayers.Lang.de["Document is empty"]=OpenLayers.Lang.en["Document is empty"];OpenLayers.Lang.de["Not well-formed or other error"]=OpenLayers.Lang.en["Not well-formed or other error"];OpenLayers.Lang.de["xml.parse.error"]=OpenLayers.Lang.en["xml.parse.error"];OpenLayers.Lang.de["wmc.version.not.supported"]=OpenLayers.Lang.en["wmc.version.not.supported"];OpenLayers.Lang.de["xml.setattributens"]=OpenLayers.Lang.en["xml.setattributens"];OpenLayers.Lang.de.Graticule="Geografische Koordinaten"}if(typeof(OpenLayers.Lang.es)!="undefined"){OpenLayers.Lang.es["olControlDragPan.title"]=OpenLayers.Lang.en["olControlDragPan.title"];OpenLayers.Lang.es["olControlZoomBox.title"]=OpenLayers.Lang.en["olControlZoomBox.title"];OpenLayers.Lang.es["olControlZoomToMaxExtent.title"]=OpenLayers.Lang.en["olControlZoomToMaxExtent.title"];OpenLayers.Lang.es["Document contains no parsing errors"]=OpenLayers.Lang.en["Document contains no parsing errors"];OpenLayers.Lang.es["Document is empty"]=OpenLayers.Lang.en["Document is empty"];OpenLayers.Lang.es["Not well-formed or other error"]=OpenLayers.Lang.en["Not well-formed or other error"];OpenLayers.Lang.es["xml.parse.error"]=OpenLayers.Lang.en["xml.parse.error"];OpenLayers.Lang.es["wmc.version.not.supported"]=OpenLayers.Lang.en["wmc.version.not.supported"];OpenLayers.Lang.es["xml.setattributens"]=OpenLayers.Lang.en["xml.setattributens"];OpenLayers.Lang.es.Graticule="Coordenadas geográficas"}if(typeof(OpenLayers.Lang.fr)!="undefined"){OpenLayers.Lang.fr["olControlDragPan.title"]="Déplacer le fond de carte";OpenLayers.Lang.fr["olControlZoomBox.title"]="Se rapprocher";OpenLayers.Lang.fr["olControlZoomToMaxExtent.title"]="Voir l'emprise totale";OpenLayers.Lang.fr["Document contains no parsing errors"]="Le document ne contient aucune erreur d'analyse";OpenLayers.Lang.fr["Document is empty"]="Le document est vide";OpenLayers.Lang.fr["Not well-formed or other error"]="Le document n'est pas bien formé ou une autre erreur s'est produite";OpenLayers.Lang.fr["xml.parse.error"]="Erreur d'analyse XML : ${reason}\nLocalisation : ${url}\nNuméro de ligne ${line}, colonne ${linepos} :\n ${srcText}\n";OpenLayers.Lang.fr["wmc.version.not.supported"]="Impossible de trouver un analyseur pour la version ${v} de WMC";OpenLayers.Lang.fr["xml.setattributens"]="setAttributeNS n'est pas implementé";OpenLayers.Lang.fr.Graticule="Repères géographiques"}if(typeof(OpenLayers.Lang.it)!="undefined"){OpenLayers.Lang.it["olControlDragPan.title"]=OpenLayers.Lang.en["olControlDragPan.title"];OpenLayers.Lang.it["olControlZoomBox.title"]=OpenLayers.Lang.en["olControlZoomBox.title"];OpenLayers.Lang.it["olControlZoomToMaxExtent.title"]=OpenLayers.Lang.en["olControlZoomToMaxExtent.title"];OpenLayers.Lang.it["Document contains no parsing errors"]=OpenLayers.Lang.en["Document contains no parsing errors"];OpenLayers.Lang.it["Document is empty"]=OpenLayers.Lang.en["Document is empty"];OpenLayers.Lang.it["Not well-formed or other error"]=OpenLayers.Lang.en["Not well-formed or other error"];OpenLayers.Lang.it["xml.parse.error"]=OpenLayers.Lang.en["xml.parse.error"];OpenLayers.Lang.it["wmc.version.not.supported"]=OpenLayers.Lang.en["wmc.version.not.supported"];OpenLayers.Lang.it["xml.setattributens"]=OpenLayers.Lang.en["xml.setattributens"];OpenLayers.Lang.it.Graticule="Coordinate geografiche"}OpenLayers.Util.DEFAULT_PRECISION=0;OpenLayers.Request.getFQDNForUrl=function(a){if(a){var b=a.match(/^[a-z]+:\/\/([^\/]+)\/?/i);if(b){return b[1]}return window.location.host}return null};OpenLayers.Request.setProxyUrl=function(a){OpenLayers.ProxyHost=a;OpenLayers.ProxyHostFQDN=OpenLayers.Request.getFQDNForUrl(a);Proj4js.setProxyUrl(a)};OpenLayers.Request.proxyfyUrl=function(d,f,a){if(d){if(!OpenLayers.String.startsWith(a,d)){if(a.search(/^[a-z]+:\/\//i)!=-1){var b=a.match(/^[a-z]+:\/\/([^\/]*)\/?/i);if(b){b=b[1]}if(f!=b){a=d+encodeURIComponent(a)}}}}return a};OpenLayers.Request.issue=function(f){var j=OpenLayers.Util.extend(this.DEFAULT_CONFIG,{proxy:OpenLayers.ProxyHost});f=OpenLayers.Util.applyDefaults(f,j);var h=new OpenLayers.Request.XMLHttpRequest();var a=f.url;if(f.params){var g=OpenLayers.Util.getParameterString(f.params);if(g.length>0){var m=(a.indexOf("?")>-1)?"&":"?";a+=m+g}}if(f.proxy){a=OpenLayers.Request.proxyfyUrl(f.proxy,OpenLayers.Request.getFQDNForUrl(f.proxy),a)}h.open(f.method,a,f.async,f.user,f.password);for(var l in f.headers){h.setRequestHeader(l,f.headers[l])}var b=(f.scope)?OpenLayers.Function.bind(f.callback,f.scope):f.callback;var o;if(f.success){o=(f.scope)?OpenLayers.Function.bind(f.success,f.scope):f.success}var d;if(f.failure){d=(f.scope)?OpenLayers.Function.bind(f.failure,f.scope):f.failure}var p=this.events;h.onreadystatechange=function(){if(h.readyState==OpenLayers.Request.XMLHttpRequest.DONE){var q=p.triggerEvent("complete",{request:h,config:f,requestUrl:a});if(q!==false){b(h);if(!h.status||(h.status>=200&&h.status<300)){p.triggerEvent("success",{request:h,config:f,requestUrl:a});if(o){o(h)}}if(h.status&&(h.status<200||h.status>=300)){p.triggerEvent("failure",{request:h,config:f,requestUrl:a});if(d){d(h)}}}}};if(f.async===false){h.send(f.data)}else{window.setTimeout(function(){h.send(f.data)},0)}return h};if(!window.Node||!Node.ELEMENT_NODE){Node={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12}}(function(){var g=window.XMLHttpRequest;var a=!!window.controllers,m=window.document.all&&!window.opera,o=m&&window.navigator.userAgent.match(/MSIE ([\.0-9]+)/)&&RegExp.$1==7;function d(){this._object=g&&!o&&(window.location.protocol!=="file:"||!window.ActiveXObject)?new g:new window.ActiveXObject("Microsoft.XMLHTTP");this._listeners=[]}if(a&&g.wrapped){d.wrapped=g.wrapped}d.UNSENT=0;d.OPENED=1;d.HEADERS_RECEIVED=2;d.LOADING=3;d.DONE=4;d.PARSED_OK="Document contains no parsing errors";d.PARSED_EMPTY="Document is empty";d.PARSED_UNKNOWN_ERROR="Not well-formed or other error";d.prototype.readyState=d.UNSENT;d.prototype.responseText="";d.prototype.responseXML=null;d.prototype.status=0;d.prototype.statusText="";d.prototype.onreadystatechange=null;d.onreadystatechange=null;d.onopen=null;d.onsend=null;d.onabort=null;d.prototype.open=function(u,z,r,B,q){delete this._headers;if(arguments.length<3){r=true}this._async=r;var w=this,v=this.readyState,p;if(m&&r){p=function(){if(v!=d.DONE){f(w);w.abort()}};window.attachEvent("onunload",p)}this._object.onreadystatechange=function(){if(a&&!r){return}w.readyState=w._object.readyState;j(w);if(w._aborted){w.readyState=d.UNSENT;return}if(w.readyState==d.DONE){f(w);if(m&&r){window.detachEvent("onunload",p)}}if(v!=w.readyState){b(w)}v=w.readyState};if(d.onopen){d.onopen.apply(this,arguments)}if(arguments.length>4){this._object.open(u,z,r,B,q)}else{if(arguments.length>3){this._object.open(u,z,r,B)}else{this._object.open(u,z,r)}}if(!r&&a){this.readyState=d.OPENED;b(this)}};d.prototype.send=function(p){if(d.onsend){d.onsend.apply(this,arguments)}if(p&&p.nodeType){p=window.XMLSerializer?new window.XMLSerializer().serializeToString(p):p.xml;if(!this._headers["Content-Type"]){this._object.setRequestHeader("Content-Type","application/xml")}}if(!this._aborted){this._object.send(p)}if(a&&!this._async){this.readyState=d.OPENED;j(this);while(this.readyState<d.DONE){this.readyState++;b(this);if(this._aborted){return}}}};d.prototype.abort=function(){if(d.onabort){d.onabort.apply(this,arguments)}if(this.readyState>d.UNSENT&&this.readyState<d.DONE){this._aborted=true;this._object.abort()}f(this)};d.prototype.getAllResponseHeaders=function(){return this._object.getAllResponseHeaders()};d.prototype.getResponseHeader=function(p){return this._object.getResponseHeader(p)};d.prototype.setRequestHeader=function(p,q){if(!this._headers){this._headers={}}this._headers[p]=q;return this._object.setRequestHeader(p,q)};d.prototype.addEventListener=function(u,r,q){for(var p=0,v;v=this._listeners[p];p++){if(v[0]==u&&v[1]==r&&v[2]==q){return}}this._listeners.push([u,r,q])};d.prototype.removeEventListener=function(u,r,q){for(var p=0,v;v=this._listeners[p];p++){if(v[0]==u&&v[1]==r&&v[2]==q){break}}if(v){this._listeners.splice(p,1)}};d.prototype.dispatchEvent=function(q){var q={type:q.type,target:this,currentTarget:this,eventPhase:2,bubbles:q.bubbles,cancelable:q.cancelable,timeStamp:q.timeStamp,stopPropagation:function(){},preventDefault:function(){},initEvent:function(){}};if(q.type=="readystatechange"&&this.onreadystatechange){(this.onreadystatechange.handleEvent||this.onreadystatechange).apply(this,[q])}for(var p=0,r;r=this._listeners[p];p++){if(r[0]==q.type&&!r[2]){(r[1].handleEvent||r[1]).apply(this,[q])}}};d.prototype.toString=function(){return"[object XMLHttpRequest]"};d.toString=function(){return"[XMLHttpRequest]"};d.getParseErrorText=function(p){if(!p){return this.PARSED_EMPTY}var u=this.PARSED_OK;if(m){if(p.parseError&&p.parseError.errorCode&&p.parseError.errorCode!=0){u=OpenLayers.i18n("xml.parse.error",{reason:p.parseError.reason,url:p.parseError.url,line:p.parseError.line,linepos:p.parseError.linepos,srcText:p.parseError.srcText});for(var r=0;r<p.parseError.linepos;r++){u+="-"}u+="^\n"}else{if(!p.documentElement){return this.PARSED_EMPTY}}}else{if(p.documentElement&&p.documentElement.tagName=="parsererror"){u=p.documentElement.firstChild.data;u+="\n"+p.documentElement.firstChild.nextSibling.firstChild.data}else{if(p.getElementsByTagName("parsererror").length>0){var q=p.getElementsByTagName("parsererror")[0];u=h(q,true)+"\n"}else{if(p.parseError&&p.parseError.errorCode!=0){u=this.PARSED_UNKNOWN_ERROR}else{if(!p.documentElement){return this.PARSED_EMPTY}}}}}return u};function b(p){if(d.onreadystatechange){d.onreadystatechange.apply(p)}p.dispatchEvent({type:"readystatechange",bubbles:false,cancelable:false,timeStamp:new Date+0})}function h(B,r){var w="";var u=B.childNodes;for(var v=0,p=u.length;v<p;v++){var z=u[v];var q=z.nodeType;if(q==Node.TEXT_NODE||q==Node.CDATA_SECTION_NODE){w+=z.data}else{if(r===true&&(q==Node.ELEMENT_NODE||q==Node.DOCUMENT_NODE||q==Node.DOCUMENT_FRAGMENT_NODE)){w+=h(z,true)}}}return w}function l(r){var q=r.responseXML,p=r.responseText;if(m&&p&&q&&!q.documentElement){q=new window.ActiveXObject("Microsoft.XMLDOM");q.async=false;q.validateOnParse=false;q.loadXML(p)}if(q){if((m&&q.parseError&&q.parseError.errorCode!=0)||!q.documentElement||(q.documentElement&&q.documentElement.tagName=="parsererror")){return null}}return q}function j(p){try{p.responseText=p._object.responseText}catch(q){}try{p.responseXML=l(p._object)}catch(q){}try{p.status=p._object.status}catch(q){}try{p.statusText=p._object.statusText}catch(q){}}function f(p){p._object.onreadystatechange=new window.Function}if(!window.Function.prototype.apply){window.Function.prototype.apply=function(p,q){if(!q){q=[]}p.__func=this;p.__func(q[0],q[1],q[2],q[3],q[4]);delete p.__func}}OpenLayers.Request.XMLHttpRequest=d})();OpenLayers.ProxyHostFQDN=null;OpenLayers.Ajax.Request.prototype.initialize=function(b,a){OpenLayers.Ajax.Base.prototype.initialize.apply(this,[a]);b=OpenLayers.Request.proxyfyUrl(b);this.transport=OpenLayers.Ajax.getTransport();this.request(b)};OpenLayers.Handler.Feature.prototype.moveLayerToTop=function(){if(this.map){var a=Math.max(this.map.Z_INDEX_BASE.Feature-1,this.layer.getZIndex())+1;this.layer.setZIndex(a)}};OpenLayers.Handler.Feature.prototype.moveLayerBack=function(){if(this.map){var a=this.layer.getZIndex()-1;if(a>=this.map.Z_INDEX_BASE.Feature){this.layer.setZIndex(a)}else{this.map.setLayerZIndex(this.layer,this.map.getLayerIndex(this.layer))}}};OpenLayers.Handler.Feature.prototype.triggerCallback=function(f,g,b){var d=this.EVENTMAP[f][g];if(d){if(f=="click"&&this.up&&this.down){var a=Math.sqrt(Math.pow(this.up.x-this.down.x,2)+Math.pow(this.up.y-this.down.y,2));if(a<=this.clickTolerance){this.callback(d,b)}this.down=null}else{this.callback(d,b)}}};OpenLayers.Control.ZoomToMaxExtent.prototype.activeOverMapOnly=OpenLayers.Control.ZoomBox.prototype.activeOverMapOnly=OpenLayers.Control.WMSGetFeatureInfo.prototype.activeOverMapOnly=OpenLayers.Control.SelectFeature.prototype.activeOverMapOnly=OpenLayers.Control.Panel.prototype.activeOverMapOnly=OpenLayers.Control.OverviewMap.prototype.activeOverMapOnly=OpenLayers.Control.Navigation.prototype.activeOverMapOnly=OpenLayers.Control.MousePosition.activeOverMapOnly=OpenLayers.Control.ModifyFeature.prototype.activeOverMapOnly=OpenLayers.Control.KeyboardDefaults.prototype.activeOverMapOnly=OpenLayers.Control.DrawFeature.prototype.activeOverMapOnly=OpenLayers.Control.DragFeature.prototype.activeOverMapOnly=OpenLayers.Control.DragPan.prototype.activeOverMapOnly=OpenLayers.Control.prototype.activeOverMapOnly=false;OpenLayers.Control.ZoomToMaxExtent.prototype.destroy=OpenLayers.Control.ZoomBox.prototype.destroy=OpenLayers.Control.WMSGetFeatureInfo.prototype.destroy=OpenLayers.Control.DrawFeature.prototype.destroy=OpenLayers.Control.DragPan.prototype.destroy=OpenLayers.Control.prototype.destroy=function(){if(this.events){if(this.eventListeners){this.events.un(this.eventListeners)}this.events.destroy();this.events=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){if(this.activeOverMapOnly===true){this.map.events.unregister("mapmouseover",this,this.onMouseOver);this.map.events.unregister("mapmouseout",this,this.onMouseOut)}this.map.events.unregister("changelang",this,this.changeLang);this.map.removeControl(this);this.map=null}};OpenLayers.Control.ZoomToMaxExtent.prototype.onMouseOver=OpenLayers.Control.ZoomBox.prototype.onMouseOver=OpenLayers.Control.WMSGetFeatureInfo.prototype.onMouseOver=OpenLayers.Control.SelectFeature.prototype.onMouseOver=OpenLayers.Control.Panel.prototype.onMouseOver=OpenLayers.Control.OverviewMap.prototype.onMouseOver=OpenLayers.Control.Navigation.prototype.onMouseOver=OpenLayers.Control.MousePosition.onMouseOver=OpenLayers.Control.ModifyFeature.prototype.onMouseOver=OpenLayers.Control.KeyboardDefaults.prototype.onMouseOver=OpenLayers.Control.DrawFeature.prototype.onMouseOver=OpenLayers.Control.DragFeature.prototype.onMouseOver=OpenLayers.Control.DragPan.prototype.onMouseOver=OpenLayers.Control.prototype.onMouseOver=function(){this.activate()};OpenLayers.Control.ZoomToMaxExtent.prototype.onMouseOut=OpenLayers.Control.ZoomBox.prototype.onMouseOut=OpenLayers.Control.WMSGetFeatureInfo.prototype.onMouseOut=OpenLayers.Control.SelectFeature.prototype.onMouseOut=OpenLayers.Control.Panel.prototype.onMouseOut=OpenLayers.Control.OverviewMap.prototype.onMouseOut=OpenLayers.Control.Navigation.prototype.onMouseOut=OpenLayers.Control.MousePosition.onMouseOut=OpenLayers.Control.ModifyFeature.prototype.onMouseOut=OpenLayers.Control.KeyboardDefaults.prototype.onMouseOut=OpenLayers.Control.DrawFeature.prototype.onMouseOut=OpenLayers.Control.DragFeature.prototype.onMouseOut=OpenLayers.Control.DragPan.prototype.onMouseOut=OpenLayers.Control.prototype.onMouseOut=function(){this.deactivate()};OpenLayers.Control.ZoomToMaxExtent.prototype.setMap=OpenLayers.Control.ZoomBox.prototype.setMap=OpenLayers.Control.Panel.prototype.setMap=OpenLayers.Control.OverviewMap.prototype.setMap=OpenLayers.Control.Navigation.prototype.setMap=OpenLayers.Control.KeyboardDefaults.prototype.setMap=OpenLayers.Control.DrawFeature.prototype.setMap=OpenLayers.Control.DragPan.prototype.setMap=OpenLayers.Control.prototype.setMap=function(a){this.map=a;this.map.events.register("changelang",this,this.changeLang);if(this.activeOverMapOnly===true){this.map.events.register("mapmouseover",this,this.onMouseOver);this.map.events.register("mapmouseout",this,this.onMouseOut)}if(this.handler){this.handler.setMap(a)}};OpenLayers.Control.ZoomToMaxExtent.prototype.draw=OpenLayers.Control.WMSGetFeatureInfo.prototype.draw=OpenLayers.Control.SelectFeature.prototype.draw=OpenLayers.Control.ModifyFeature.prototype.draw=OpenLayers.Control.DrawFeature.prototype.draw=OpenLayers.Control.DragFeature.prototype.draw=OpenLayers.Control.prototype.draw=function(a){if(this.div==null){this.div=OpenLayers.Util.createDiv(this.id);this.div.className=this.displayClass;if(!this.allowSelection){this.div.className+=" olControlNoSelect";this.div.setAttribute("unselectable","on",0);this.div.onselectstart=OpenLayers.Function.False}if(this.title!=""){if(this.div&&!this.panel_div){this.div.title=OpenLayers.i18n(this.title)}else{if(this.panel_div){this.panel_div.title=OpenLayers.i18n(this.title)}}}}if(a!=null){this.position=a.clone()}this.moveTo(this.position);return this.div};OpenLayers.Control.ZoomToMaxExtent.prototype.changeLang=OpenLayers.Control.ZoomBox.prototype.changeLang=OpenLayers.Control.WMSGetFeatureInfo.prototype.changeLang=OpenLayers.Control.SelectFeature.prototype.changeLang=OpenLayers.Control.OverviewMap.prototype.changeLang=OpenLayers.Control.Navigation.prototype.changeLang=OpenLayers.Control.ModifyFeature.prototype.changeLang=OpenLayers.Control.KeyboardDefaults.prototype.changeLang=OpenLayers.Control.DrawFeature.prototype.changeLang=OpenLayers.Control.DragPan.prototype.changeLang=OpenLayers.Control.DragFeature.prototype.changeLang=OpenLayers.Control.prototype.changeLang=function(a){if(this.title!=""&&this.div){this.div.title=OpenLayers.i18n(this.title)}};OpenLayers.Control.KeyboardDefaults.prototype.draw=function(){this.handler=new OpenLayers.Handler.Keyboard(this,{keydown:this.defaultKeyPress});if(this.activeOverMapOnly!==true){this.activate()}};OpenLayers.Map.prototype.EVENT_TYPES=["preaddlayer","addlayer","removelayer","changelayer","movestart","move","moveend","zoomend","popupopen","popupclose","addmarker","removemarker","clearmarkers","mouseover","mouseout","mousemove","dragstart","drag","dragend","changebaselayer","mapmouseover","mapmouseout","changelang","changedisplayprojection","controlactivated","beforemove"];OpenLayers.Map.prototype.isMouseOver=false;OpenLayers.Map.prototype.onMouseOver=function(a){if(this.outMapEventsTimer){window.clearTimeout(this.outMapEventsTimer);this.outMapEventsTimer=null}if(this.isMouseOver){return}this.isMouseOver=true;this.events.triggerEvent("mapmouseover")};OpenLayers.Map.prototype.onMouseOut=function(a){if(!this.outMapEventsTimer){this.outMapEventsTimer=window.setTimeout(OpenLayers.Function.bind(function(){this.outMapEventsTimer=null;if(!this.isMouseOver){return}this.isMouseOver=false;this.events.triggerEvent("mapmouseout")},this),100)}};OpenLayers.Map.prototype.initialize=function(l,f){if(arguments.length===1&&typeof l==="object"){f=l;l=f&&f.div}this.tileSize=new OpenLayers.Size(OpenLayers.Map.TILE_WIDTH,OpenLayers.Map.TILE_HEIGHT);this.maxExtent=new OpenLayers.Bounds(-180,-90,180,90);this.paddingForPopups=new OpenLayers.Bounds(15,15,15,15);this.theme=OpenLayers._getScriptLocation()+"theme/default/style.css";OpenLayers.Util.extend(this,f);this.id=OpenLayers.Util.createUniqueID("OpenLayers.Map_");this.div=OpenLayers.Util.getElement(l);if(!this.div){this.div=document.createElement("div");this.div.style.height="1px";this.div.style.width="1px"}OpenLayers.Element.addClass(this.div,"olMap");var j=this.div.id+"_OpenLayers_ViewPort";this.viewPortDiv=OpenLayers.Util.createDiv(j,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);j=this.div.id+"_OpenLayers_Container";this.layerContainerDiv=OpenLayers.Util.createDiv(j);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();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 h=true;var d=document.getElementsByTagName("link");for(var g=0,a=d.length;g<a;++g){if(OpenLayers.Util.isEquivalentUrl(d.item(g).href,this.theme)){h=false;break}}if(h){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 g=0,a=this.controls.length;g<a;g++){this.addControlToMap(this.controls[g])}this.popups=[];this.unloadDestroy=OpenLayers.Function.bind(this.destroy,this);if(this.mapmouseEventsEnable===true){this.events.register("mouseover",this,this.onMouseOver);this.events.register("mouseout",this,this.onMouseOut)}OpenLayers.Event.observe(window,"unload",this.unloadDestroy)};OpenLayers.Map.prototype.destroy=function(){if(!this.unloadDestroy){return false}if(this.mapmouseEventsEnable===true){this.events.unregister("mouseover",this,this.onMouseOver);this.events.unregister("mouseout",this,this.onMouseOut)}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){if(this.div.childNodes.length>0){this.div.removeChild(this.viewPortDiv)}}this.viewPortDiv=null;this.events.destroy();this.events=null};OpenLayers.Map.prototype.moveTo=function(l,b,f){var r={zoom:b,lonlat:l,options:f};if(this.events.triggerEvent("beforemove",r)===false){return}b=r.zoom;l=r.lonlat;var B=l?l.clone():null;if(!f){f={}}var u=f.dragging;var m=f.forceZoomChange;var d=f.noEvent;if(this.panTween&&f.caller=="setCenter"){this.panTween.stop()}if(!this.center&&!this.isValidLonLat(B)){if(this.size){var g=new OpenLayers.Pixel(this.size.w/2,this.size.h/2);B=this.getLonLatFromViewPortPx(g)}else{B=this.getMaxExtent().getCenterLonLat()}}if(this.restrictedExtent!=null){if(B==null){B=this.getCenter()}if(b==null){b=this.getZoom()}var v=this.getResolutionForZoom(b);var q=this.calculateBounds(B,v);if(q!=null&&!this.restrictedExtent.containsBounds(q)){var D=this.restrictedExtent.getCenterLonLat();if(q.getWidth()>this.restrictedExtent.getWidth()){B=new OpenLayers.LonLat(D.lon,B.lat)}else{if(q.left<this.restrictedExtent.left){B=B.add(this.restrictedExtent.left-q.left,0)}else{if(q.right>this.restrictedExtent.right){B=B.add(this.restrictedExtent.right-q.right,0)}}}if(q.getHeight()>this.restrictedExtent.getHeight()){B=new OpenLayers.LonLat(B.lon,D.lat)}else{if(q.bottom<this.restrictedExtent.bottom){B=B.add(0,this.restrictedExtent.bottom-q.bottom)}else{if(q.top>this.restrictedExtent.top){B=B.add(0,this.restrictedExtent.top-q.top)}}}}}var o=m||((this.isValidZoomLevel(b))&&(b!=this.getZoom()));var p=(this.getProjection()?this.getProjection().getProjName()=="longlat"?0.000028:1:undefined);var j=!(B&&this.isValidLonLat(B)&&B.equals(this.center,p));if(o||j||!u){if(!this.dragging&&!d){this.events.triggerEvent("movestart")}if(j&&B!=null){if((!o)&&(this.center)){this.centerLayerContainer(B)}this.center=B.clone()}if((o)||(this.layerContainerOrigin==null)){this.layerContainerOrigin=this.center?this.center.clone():null;this.layerContainerDiv.style.left="0px";this.layerContainerDiv.style.top="0px"}if(o){this.zoom=b;this.resolution=this.getResolutionForZoom(b);this.viewRequestID++}var h=this.getExtent();if(h&&this.baseLayer.visibility){this.baseLayer.moveTo(h,o,u);if(u){this.baseLayer.events.triggerEvent("move")}else{this.baseLayer.events.triggerEvent("moveend",{zoomChanged:o})}}h=this.baseLayer.getExtent();for(var w=0,z=this.layers.length;w<z;w++){var C=this.layers[w];if(C&&C!==this.baseLayer&&!C.isBaseLayer){var a=C.calculateInRange();if(C.inRange!=a){C.inRange=a;if(!a){C.display(false)}this.events.triggerEvent("changelayer",{layer:C,property:"visibility"})}if(a&&C.visibility){C.moveTo(h,o,u);if(u){C.events.triggerEvent("move")}else{C.events.triggerEvent("moveend",{zoomChanged:o})}}}}if(o){for(var w=0,z=this.popups.length;w<z;w++){this.popups[w].updatePosition()}}this.events.triggerEvent("move");if(o){this.events.triggerEvent("zoomend")}}if(!u&&!d){this.events.triggerEvent("moveend")}this.dragging=!!u};OpenLayers.Map.prototype.setBaseLayer=function(f,g,l){var j=null;var h=null;var m=null;if(this.baseLayer){j=this.baseLayer;h=this.getProjection();m=this.baseLayer.getExtent()}if(f!=this.baseLayer){if(OpenLayers.Util.indexOf(this.layers,f)!=-1){if(f.events.triggerEvent("loadstart")===false){return}if(this.baseLayer!=null&&!this.allOverlays){this.baseLayer.setVisibility(false)}this.baseLayer=f;this.viewRequestID++;if(!this.allOverlays){this.baseLayer.visibility=true}this.events.triggerEvent("changebaselayer",{layer:f,baseLayer:j});f.events.triggerEvent("loadend");var a=this.getCenter();if(a!=null||g!=null){var b=(g)?g.clone():(m)?m.getCenterLonLat():a;b.transform(h,this.getProjection());var d=(typeof(l)=="number")?l:(m)?this.getZoomForExtent(m,true):this.getZoomForResolution(this.resolution,true);this.setCenter(b,d,false,true)}}}};OpenLayers.Map.prototype.addControlToMap=function(b,a){b.outsideViewport=b.outsideViewport||(b.div!=null);if(this.displayProjection&&!b.displayProjection){b.displayProjection=this.displayProjection}b.setMap(this);var d=b.draw(a);if(d){if(!d.style.zIndex){d.style.zIndex=this.Z_INDEX_BASE.Control+this.controls.length}if(!b.outsideViewport){this.viewPortDiv.appendChild(d)}}};OpenLayers.Map.prototype.getApproxScaleDenominator=function(j){var h=0;if(this.baseLayer!=null){j=(j!=undefined?j:this.getZoom());var b=this.baseLayer.getResolutionForZoom(j);var a=this.baseLayer.getNativeProjection().getUnits();h=Math.round(OpenLayers.Util.getScaleFromResolution(b,a)||0);if(h>0){var l=Math.floor(Math.log(h)/Math.log(10));var g=Math.exp(l*Math.log(10));var f=h/g;h=Math.round(Math.round(f)*g)}}return h};OpenLayers.Layer.WMS.Untiled.prototype.setMap=OpenLayers.Layer.WMS.prototype.setMap=OpenLayers.Layer.Grid.prototype.setMap=OpenLayers.Layer.HTTPRequest.prototype.setMap=OpenLayers.Layer.prototype.setMap=function(h){if(this.map==null){this.map=h;this.projection=this.getNativeProjection();if(this.projection){this.units=this.projection.getUnits()||this.units||this.map.units}if(this.maxExtent){if(this.isBaseLayer){}else{this.maxExtent.transform(this.projection,this.map.getProjection(),true)}}else{var j=null;for(var f=0,b=h.layers.length;f<b;f++){var d=h.layers[f];if(!d.isBaseLayer){continue}if(this.projection.equals(d.getNativeProjection())){j=d;break}if(this.projection.isCompatibleWith(d.getNativeProjection())){j=d;continue}}if(j&&j.maxExtent){this.maxExtent=j.maxExtent.clone().transform(j.getNativeProjection(),this.map.getProjection(),true)}else{this.maxExtent=(new OpenLayers.Bounds(-180,-90,180,90)).transform(OpenLayers.Projection.CRS84,this.map.getProjection(),true)}}if(this.restrictedExtent){this.restrictedExtent.transform(this.projection,this.map.getProjection(),true)}if(this.originators){for(var f=0,b=this.originators.length;f<b;f++){var g=this.originators[f];if(g.extent){g.extent.transform(this.projection,this.map.getProjection(),true)}}}this.initResolutions();if(!this.isBaseLayer){this.inRange=this.calculateInRange();var a=((this.visibility)&&(this.inRange));this.div.style.display=a?"":"none"}this.setTileSize()}};OpenLayers.Layer.WMS.Untiled.prototype.calculateInRange=OpenLayers.Layer.WMS.prototype.calculateInRange=OpenLayers.Layer.Vector.RootContainer.prototype.calculateInRange=OpenLayers.Layer.Vector.prototype.calculateInRange=OpenLayers.Layer.HTTPRequest.prototype.calculateInRange=OpenLayers.Layer.GML.prototype.calculateInRange=OpenLayers.Layer.Grid.prototype.calculateInRange=OpenLayers.Layer.prototype.calculateInRange=function(){var f=false;if(this.alwaysInRange){f=true}else{if(this.map){var b=this.map.getResolution();f=((b>=this.minResolution)&&(b<=this.maxResolution));if(f&&!this.isBaseLayer&&this.maxExtent){var d=this.map.calculateBounds();if(d){var a=this.restrictedExtent||this.maxExtent;f=d.intersectsBounds(a)}}}}return f};OpenLayers.Layer.WMS.Untiled.prototype.initResolutions=OpenLayers.Layer.WMS.prototype.initResolutions=OpenLayers.Layer.Vector.RootContainer.prototype.initResolutions=OpenLayers.Layer.Vector.prototype.initResolutions=OpenLayers.Layer.HTTPRequest.prototype.initResolutions=OpenLayers.Layer.GML.prototype.initResolutions=OpenLayers.Layer.Grid.prototype.initResolutions=OpenLayers.Layer.prototype.initResolutions=function(){var b=["projection","units"];var g=false;var f={};for(var h=0,l=this.RESOLUTION_PROPERTIES.length;h<l;h++){var r=this.RESOLUTION_PROPERTIES[h];if(this.options[r]&&OpenLayers.Util.indexOf(b,r)==-1){g=true}f[r]=this.options[r]||this.map[r]}if(this.alwaysInRange==null){this.alwaysInRange=!g}if((this.options.minScale!=null||this.options.maxScale!=null)&&this.options.scales==null){f.scales=null}if((this.options.minResolution!=null||this.options.maxResolution!=null)&&this.options.resolutions==null){f.resolutions=null}if((!f.numZoomLevels)&&(f.maxZoomLevel)){f.numZoomLevels=f.maxZoomLevel+1}if((f.scales!=null)||(f.resolutions!=null)){if(f.scales!=null){f.resolutions=[];for(var h=0,l=f.scales.length;h<l;h++){var d=f.scales[h];f.resolutions[h]=OpenLayers.Util.getResolutionFromScale(d,f.units)}}f.numZoomLevels=f.resolutions.length}else{if(f.minScale){f.maxResolution=OpenLayers.Util.getResolutionFromScale(f.minScale,f.units)}else{if(f.maxResolution=="auto"){var q=this.map.getSize();var p=f.maxExtent.getWidth()/q.w;var j=f.maxExtent.getHeight()/q.h;f.maxResolution=Math.max(p,j)}}if(f.maxScale!=null){f.minResolution=OpenLayers.Util.getResolutionFromScale(f.maxScale,f.units)}else{if((f.minResolution=="auto")&&(f.minExtent!=null)){var q=this.map.getSize();var p=f.minExtent.getWidth()/q.w;var j=f.minExtent.getHeight()/q.h;f.minResolution=Math.max(p,j)}}if(f.minResolution!=null&&this.options.numZoomLevels==undefined){var o=f.maxResolution/f.minResolution;f.numZoomLevels=Math.floor(Math.log(o)/Math.log(2))+1}f.resolutions=new Array(f.numZoomLevels);var a=2;if(typeof f.minResolution=="number"&&f.numZoomLevels>1){a=Math.pow((f.maxResolution/f.minResolution),(1/(f.numZoomLevels-1)))}for(var h=0;h<f.numZoomLevels;h++){var m=f.maxResolution/Math.pow(a,h);f.resolutions[h]=m}}f.resolutions.sort(function(v,u){return(u-v)});this.minZoomLevel=typeof(this.options.minZoomLevel)=="number"?this.options.minZoomLevel:this.map.minZoomLevel||0;this.maxZoomLevel=this.options.maxZoomLevel||this.map.maxZoomLevel||f.resolutions.length-1;if(this.minZoomLevel<0){this.minZoomLevel=0}if(this.maxZoomLevel>f.resolutions.length){this.maxZoomLevel=f.resolutions.length-1}this.resolutions=f.resolutions;this.maxResolution=f.resolutions[this.minZoomLevel];this.minResolution=f.resolutions[this.maxZoomLevel];this.scales=[];for(var h=0,l=f.resolutions.length;h<l;h++){this.scales[h]=OpenLayers.Util.getScaleFromResolution(f.resolutions[h],f.units)}this.minScale=this.scales[this.minZoomLevel];this.maxScale=this.scales[this.maxZoomLevel];this.numZoomLevels=f.numZoomLevels};OpenLayers.Layer.WMS.Untiled.prototype.setOpacity=OpenLayers.Layer.WMS.prototype.setOpacity=OpenLayers.Layer.Vector.RootContainer.prototype.setOpacity=OpenLayers.Layer.Vector.prototype.setOpacity=OpenLayers.Layer.HTTPRequest.prototype.setOpacity=OpenLayers.Layer.Grid.prototype.setOpacity=OpenLayers.Layer.GML.prototype.setOpacity=OpenLayers.Layer.prototype.setOpacity=function(b){if(b!=this.opacity){this.opacity=b;for(var f=0,a=this.div.childNodes.length;f<a;++f){var d=this.div.childNodes[f].firstChild;if(d){OpenLayers.Util.modifyDOMElement(d,null,null,null,null,null,null,b)}}if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"opacity"})}}};OpenLayers.Popup.prototype.destroy=function(){this.id=null;this.lonlat=null;this.contentSize=null;this.size=null;this.contentHTML=null;this.backgroundColor=null;this.opacity=null;this.border=null;this.events.destroy();this.events=null;if(this.contentDiv){this.groupDiv.removeChild(this.contentDiv);this.contentDiv=null}this.contentDivPadding=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){if(!this.disableFirefoxOverflowHack&&OpenLayers.Util.getBrowserName()=="firefox"){this.map.events.unregister("movestart",this,this.onMoveStartPopup);this.map.events.unregister("moveend",this,this.onMoveEndPopup)}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};OpenLayers.Popup.FramedCloud.prototype.draw=OpenLayers.Popup.Framed.prototype.draw=OpenLayers.Popup.Anchored.prototype.draw=OpenLayers.Popup.prototype.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,this.onMoveStartPopup);this.map.events.register("moveend",this,this.onMoveEndPopup)}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};OpenLayers.Popup.FramedCloud.prototype.onMoveStartPopup=OpenLayers.Popup.Framed.prototype.onMoveStartPopup=OpenLayers.Popup.AnchoredBubble.prototype.onMoveStartPopup=OpenLayers.Popup.Anchored.prototype.onMoveStartPopup=OpenLayers.Popup.prototype.onMoveStartPopup=function(){if(!this.contentDiv){return}var a=document.defaultView.getComputedStyle(this.contentDiv,null);var b=a.getPropertyValue("overflow");if(b!="hidden"){this.contentDiv._oldOverflow=b;this.contentDiv.style.overflow="hidden"}};OpenLayers.Popup.FramedCloud.prototype.onMoveEndPopup=OpenLayers.Popup.Framed.prototype.onMoveEndPopup=OpenLayers.Popup.AnchoredBubble.prototype.onMoveEndPopup=OpenLayers.Popup.Anchored.prototype.onMoveEndPopup=OpenLayers.Popup.prototype.onMoveEndPopup=function(){if(!this.contentDiv){return}var a=this.contentDiv._oldOverflow;if(a){this.contentDiv.style.overflow=a;this.contentDiv._oldOverflow=null}};OpenLayers.Popup.FramedCloud.prototype.addCloseBox=OpenLayers.Popup.Framed.prototype.addCloseBox=OpenLayers.Popup.AnchoredBubble.prototype.addCloseBox=OpenLayers.Popup.Anchored.prototype.addCloseBox=OpenLayers.Popup.prototype.addCloseBox=function(d){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=d||function(f){this.hide();OpenLayers.Event.stop(f);if(!this.disableFirefoxOverflowHack&&OpenLayers.Util.getBrowserName()=="firefox"){if(this.map&&this.map.events){this.map.events.unregister("movestart",this,this.onMoveStartPopup);this.map.events.unregister("moveend",this,this.onMoveEndPopup)}}};OpenLayers.Event.observe(this.closeDiv,"click",OpenLayers.Function.bindAsEventListener(a,this))};OpenLayers.Tile.Image.prototype.destroy=function(){if(this.imgDiv!=null){if(this.layerAlphaHack){OpenLayers.Event.stopObservingElement(this.imgDiv.childNodes[0])}OpenLayers.Event.stopObservingElement(this.imgDiv);if(this.imgDiv.parentNode==this.frame){this.frame.removeChild(this.imgDiv);this.imgDiv.map=null}this.imgDiv.urls=null;this.imgDiv.src=OpenLayers.Util.getImagesLocation()+"blank.gif"}this.imgDiv=null;if((this.frame!=null)&&(this.frame.parentNode==this.layer.div)){this.layer.div.removeChild(this.frame)}this.frame=null;if(this.backBufferTile){this.backBufferTile.destroy();this.backBufferTile=null}this.layer.events.unregister("loadend",this,this.resetBackBuffer);OpenLayers.Tile.prototype.destroy.apply(this,arguments)};OpenLayers.Tile.Image.prototype.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){if(this.events.triggerEvent("reload")===false){return}}else{this.isLoading=true;if(this.events.triggerEvent("loadstart")===false){return}}return this.renderTile()};OpenLayers.Tile.Image.prototype.initImgDiv=function(){var f=this.layer.imageOffset;var b=this.layer.getImageSize();if(this.layerAlphaHack){this.imgDiv=OpenLayers.Util.createAlphaImageDiv(null,f,b,null,"relative",null,null,null,true)}else{this.imgDiv=OpenLayers.Util.createImage(null,f,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;this.imgDiv.layer=this.layer;var d=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(d,this))}else{OpenLayers.Event.observe(this.imgDiv,"load",OpenLayers.Function.bind(d,this))}var a=function(){if(this.imgDiv._attempts>OpenLayers.IMAGE_RELOAD_ATTEMPTS){d.call(this)}};OpenLayers.Event.observe(this.imgDiv,"error",OpenLayers.Function.bind(a,this))};OpenLayers.Layer.Grid.prototype.changeBaseLayer=OpenLayers.Layer.HTTPRequest.prototype.changeBaseLayer=function(a){if(OpenLayers.Layer.prototype.changeBaseLayer.apply(this,arguments)===false){return false}if(!this.isBaseLayer){var b={displayInLayerSwitcher:this.displayInLayerSwitcher};var d=this.getCompatibleProjection(a.layer);if(d!=null){b.projection=d.clone();if(this.aggregate==undefined){b.displayInLayerSwitcher=true}}else{if(this.aggregate==undefined){b.displayInLayerSwitcher=false}}this.addOptions(b);this.redraw()}return true};OpenLayers.Layer.Grid.prototype.getCompatibleProjection=OpenLayers.Layer.HTTPRequest.prototype.getCompatibleProjection=OpenLayers.Layer.prototype.getCompatibleProjection;OpenLayers.Layer.Grid.prototype.addTileMonitoringHooks=function(a){a.onLoadStart=function(){if(this.numLoadingTiles==0){if(this.events.triggerEvent("loadstart")===false){return}}this.numLoadingTiles++};a.events.register("loadstart",this,a.onLoadStart);a.onLoadEnd=function(){this.numLoadingTiles--;this.events.triggerEvent("tileloaded");if(this.numLoadingTiles==0){this.events.triggerEvent("loadend")}};a.events.register("loadend",this,a.onLoadEnd);a.events.register("unload",this,a.onLoadEnd)};OpenLayers.Layer.WMS.Untiled.prototype.changeBaseLayer=OpenLayers.Layer.WMS.prototype.changeBaseLayer=function(a){if(OpenLayers.Layer.prototype.changeBaseLayer.apply(this,arguments)===false){return false}if(!this.isBaseLayer){var d=this.getCompatibleProjection(a.layer);if(d!=null){var b={projection:d.clone(),displayInLayerSwitcher:this.displayInLayerSwitcher};if(this.aggregate==undefined){b.displayInLayerSwitcher=true}this.addOptions(b);if(this.savedStates[a.layer.id]){this.setVisibility(!!this.savedStates[a.layer.id].visibility)}return true}this.displayInLayerSwitcher=false;if(!this.savedStates[a.baseLayer.id]){this.savedStates[a.baseLayer.id]={}}this.savedStates[a.baseLayer.id].visibility=this.getVisibility();this.setVisibility(false)}return true};OpenLayers.Layer.WMS.Untiled.prototype.getCompatibleProjection=OpenLayers.Layer.WMS.prototype.getCompatibleProjection=function(g){var f=OpenLayers.Layer.prototype.getCompatibleProjection.apply(this,arguments);if(f!=null){return f}g=g||this.map.baseLayer;var h=g.getNativeProjection();if(this.srs!==undefined&&this.srs instanceof Array){for(var d=0,a=this.srs.length;d<a;d++){var b=this.srs[d];if(!(b instanceof OpenLayers.Projection)){f=new OpenLayers.Projection(b)}else{f=b}if(f.isCompatibleWith(h)){return f}f=null}}return null};OpenLayers.Control.Navigation.prototype.draw=function(){if(this.handleRightClicks){this.map.viewPortDiv.oncontextmenu=OpenLayers.Function.False}var a={dblclick:this.defaultDblClick,dblrightclick:this.defaultDblRightClick};var b={"double":true,stopDouble:true};this.handlers.click=new OpenLayers.Handler.Click(this,a,b);this.dragPan=new OpenLayers.Control.DragPan(OpenLayers.Util.extend({map:this.map},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()};OpenLayers.Control.Navigation.prototype.deactivate=function(){if(this.zoomBox){this.zoomBox.deactivate()}if(this.dragPan){this.dragPan.deactivate()}if(this.handlers){if(this.handlers.click){this.handlers.click.deactivate()}if(this.handlers.wheel){this.handlers.wheel.deactivate()}}return OpenLayers.Control.prototype.deactivate.apply(this,arguments)};OpenLayers.Control.OverviewMap.prototype.destroy=function(){if(!this.mapDiv){return}this.handlers.click.destroy();if(this.mapDiv.childNodes.length>0){this.mapDiv.removeChild(this.extentRectangle)}this.extentRectangle=null;this.rectEvents.destroy();this.rectEvents=null;this.ovmap.destroy();this.ovmap=null;if(this.element.childNodes.length>0){this.element.removeChild(this.mapDiv)}this.mapDiv=null;if(this.div.childNodes.length>0){this.div.removeChild(this.element)}this.element=null;if(this.maximizeDiv){OpenLayers.Event.stopObservingElement(this.maximizeDiv);if(this.div.childNodes.length>0){this.div.removeChild(this.maximizeDiv)}this.maximizeDiv=null}if(this.minimizeDiv){OpenLayers.Event.stopObservingElement(this.minimizeDiv);if(this.div.childNodes.length>0){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)};OpenLayers.Control.OverviewMap.prototype.showToggle=function(a){if(!this.outsideViewport){this.maximizeDiv.style.display=a?"":"none";this.minimizeDiv.style.display=a?"none":""}};OpenLayers.Control.Panel.prototype.addPanelDiv=function(b){var a=document.createElement("div");b.panel_div=a;if(b.title!=""){b.panel_div.title=OpenLayers.i18n(b.title)}OpenLayers.Event.observe(b.panel_div,"click",OpenLayers.Function.bind(this.onClick,this,b));OpenLayers.Event.observe(b.panel_div,"mousedown",OpenLayers.Function.bindAsEventListener(OpenLayers.Event.stop))};OpenLayers.Control.Panel.prototype.activateControl=function(d){if(!this.active){return false}if(d.type==OpenLayers.Control.TYPE_BUTTON){d.trigger();this.redraw();return}if(d.type==OpenLayers.Control.TYPE_TOGGLE){if(d.active){d.deactivate()}else{if(this.map){this.map.events.triggerEvent("controlactivated",{control:d})}d.activate()}this.redraw();return}for(var b=0,a=this.controls.length;b<a;b++){if(this.controls[b]!=d){if(this.controls[b].type!=OpenLayers.Control.TYPE_TOGGLE){this.controls[b].deactivate()}}}if(this.map){this.map.events.triggerEvent("controlactivated",{control:d})}d.activate()};OpenLayers.Control.Panel.prototype.addControls=function(b){if(!(b instanceof Array)){b=[b]}this.controls=this.controls.concat(b);for(var d=0,a=b.length;d<a;d++){this.addPanelDiv(b[d])}if(this.map){for(var d=0,a=b.length;d<a;d++){this.map.addControl(b[d]);b[d].deactivate();b[d].events.on({activate:this.redraw,deactivate:this.redraw,scope:this})}this.redraw()}};OpenLayers.Control.Panel.prototype.changeLang=function(b){for(var d=0,a=this.controls.length;d<a;d++){if(this.controls[d].title!=""){if(this.controls[d].panel_div){this.controls[d].panel_div.title=OpenLayers.i18n(this.controls[d].title)}if(this.controls[d].div){this.controls[d].div.title=OpenLayers.i18n(this.controls[d].title)}if(this.div&&this.div.childNodes&&this.div.childNodes[d]){this.div.childNodes[d].title=OpenLayers.i18n(this.controls[d].title)}}}};OpenLayers.Control.WMSGetFeatureInfo.prototype.layerQueryable=function(a){if(!a.getVisibility()){return false}if(!a.calculateInRange()){return false}if(a.queryable===false){return false}return true};OpenLayers.Control.WMSGetFeatureInfo.prototype.findLayers=function(){var h=[];var g=this.layers||this.map.layers;var f,b;for(var d=0,a=g.length;d<a;++d){f=g[d];if(f instanceof OpenLayers.Layer.WMS&&(!this.queryVisible||this.layerQueryable(f))){b=f.url instanceof Array?f.url[0]:f.url;if(!this.url){this.url=b}if(this.urlMatches(b)){h.push(f)}}}return h};OpenLayers.Control.WMSGetFeatureInfo.prototype.request=function(a,p){var g=this.findLayers();if(g.length==0){OpenLayers.Element.removeClass(this.map.viewPortDiv,"olCursorWait");return}p=p||{};var l=[];var m=[];var f=p.crs||g[0].params.CRS||g[0].params.SRS||g[0].projection||this.map.getProjection();if(typeof(f)=="string"){f=new OpenLayers.Projection(f)}for(var h=0,j=g.length;h<j;h++){l=l.concat(g[h].params.LAYERS);if(g[h].params.STYLES){m=m.concat(g[h].params.STYLES)}else{if(g[h].params.LAYERS instanceof Array){m=m.concat(new Array(g[h].params.LAYERS.length))}else{m=m.concat(g[h].params.LAYERS.replace(/[^,]/g,""))}}}var d=OpenLayers.Util.extend({service:"WMS",version:g[0].params.VERSION,request:"GetFeatureInfo",layers:l,query_layers:l,styles:m,bbox:this.map.getExtent().transform(this.map.getProjection(),f).toBBOX(),feature_count:this.maxFeatures,height:this.map.getSize().h,width:this.map.getSize().w,format:g[0].params.FORMAT,info_format:this.infoFormat},(parseFloat(g[0].params.VERSION)>=1.3)?{crs:f,i:a.x,j:a.y}:{srs:f,x:a.x,y:a.y});var o={url:this.url,params:OpenLayers.Util.applyDefaults(d,this.vendorParams),callback:function(q){this.handleResponse(a,q)},scope:this};var b=OpenLayers.Request.GET(o);if(p.hover===true){this.hoverRequest=b.priv}};OpenLayers.Control.WMSGetFeatureInfo.prototype.handleResponse=function(f,b){var d=b.responseXML;if(!d||!d.documentElement){d=b.responseText}var a;if(d&&this.infoFormat=="application/vnd.ogc.gml"){a=this.format.read(d)}this.events.triggerEvent("getfeatureinfo",{text:b.responseText,features:a,request:b,xy:f});OpenLayers.Element.removeClass(this.map.viewPortDiv,"olCursorWait")};OpenLayers.Layer.GML.prototype.labelOffset=OpenLayers.Layer.Vector.prototype.labelOffset=null;OpenLayers.Layer.GML.prototype.changeBaseLayer=OpenLayers.Layer.Vector.prototype.changeBaseLayer=function(b){if(OpenLayers.Layer.prototype.changeBaseLayer.apply(this,arguments)===false){return false}if(!this.isBaseLayer){var d=this.getVisibility();if(d){this.setVisibility(false)}if(!this.options){this.options={}}if(!this.formatOptions){this.formatOptions={}}if(!this.options.formatOptions){this.options.formatOptions={}}var j=this.map.getProjection();var h=b.baseLayer?b.baseLayer.getNativeProjection():null;this.options.formatOptions.internalProjection=j.clone();this.formatOptions.internalProjection=j.clone();this.addOptions({projection:j.clone()});for(var g=0,a=this.features.length;g<a;g++){var f=this.features[g];f.geometry.transform(h,j);if(f.popup&&f.popup.lonlat){f.popup.hide();f.popup.lonlat.transform(h,j)}}if(d){this.setVisibility(true)}}return true};OpenLayers.Layer.GML.prototype.getCompatibleProjection=OpenLayers.Layer.Vector.prototype.getCompatibleProjection=function(b){if(this.aggregate!=undefined){return undefined}var a=this.getNativeProjection();if(a==null){if(this.map==null){return undefined}return null}return a};OpenLayers.Layer.Vector.RootContainer.prototype.changeBaseLayer=function(a){if(OpenLayers.Layer.prototype.changeBaseLayer.apply(this,arguments)===false){return false}return true};OpenLayers.Layer.Vector.RootContainer.prototype.getCompatibleProjection=function(b){var a=this.getNativeProjection();if(a==null){if(this.map==null){return undefined}return null}return a};OpenLayers.Strategy.BBOX.prototype.destroy=function(){this.deactivate();if(this.srs){this.srs.destroy();this.srs=null}this.layer=null;this.options=null};OpenLayers.Strategy.BBOX.prototype.calculateBounds=function(b){if(!b){b=this.getMapBounds().transform(this.layer.getNativeProjection(),this.layer.map.getProjection())}var a=b.getCenterLonLat();var f=b.getWidth()*this.ratio;var d=b.getHeight()*this.ratio;this.bounds=new OpenLayers.Bounds(a.lon-(f/2),a.lat-(d/2),a.lon+(f/2),a.lat+(d/2));if(!this.srs&&this.layer.protocol.srsName&&!this.layer.map.getProjection().equals(this.layer.protocol.srsName)){this.srs=new OpenLayers.Projection(this.layer.protocol.srsName)}if(this.srs){this.bounds.transform(this.layer.map.getProjection(),this.srs)}};OpenLayers.Strategy.BBOX.prototype.createFilter=function(){var a=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.BBOX,value:this.bounds,projection:(this.srs||this.layer.map.getProjection()).getCode()});if(this.layer.filter){a=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.AND,filters:[this.layer.filter,a]})}return a};OpenLayers.Strategy.BBOX.prototype.triggerRead=function(){if(this.response){this.layer.events.triggerEvent("loadend")}this.layer.protocol.abort(this.response);if(this.layer.events.triggerEvent("loadstart")===false){return}this.response=this.layer.protocol.read({filter:this.createFilter(),callback:this.merge,scope:this})};OpenLayers.Strategy.Fixed.prototype.load=function(a){if(this.layer.events.triggerEvent("loadstart")===false){return}this.layer.protocol.read(OpenLayers.Util.applyDefaults({callback:this.merge,scope:this},a));this.layer.events.un({visibilitychanged:this.load,scope:this})};OpenLayers.Strategy.Refresh=OpenLayers.Class(OpenLayers.Strategy,{forceRefresh:false,refreshTime:0,timer:null,initialize:function(a){OpenLayers.Strategy.prototype.initialize.apply(this,[a])},activate:function(){var a=OpenLayers.Strategy.prototype.activate.call(this);if(a){if(this.layer.visibility==true){this.start()}this.layer.events.on({visibilitychanged:this.reset,scope:this})}return a},deactivate:function(){var a=OpenLayers.Strategy.prototype.deactivate.call(this);if(a){this.stop()}return a},reset:function(){if(this.layer.visibility==true){this.start()}else{this.stop()}},start:function(){if(this.refreshTime&&typeof this.refreshTime==="number"&&this.refreshTime>0){this.timer=window.setInterval(OpenLayers.Function.bind(this.refresh,this),this.refreshTime)}},refresh:function(){if(this.layer&&this.layer.refresh){this.layer.refresh({force:this.forceRefresh})}},stop:function(){if(this.timer&&typeof this.timer!=null){window.clearInterval(this.timer);this.timer=null}},CLASS_NAME:"OpenLayers.Strategy.Refresh"});OpenLayers.Layer.GML.prototype.loadGML=function(){if(!this.loaded){if(this.events.triggerEvent("loadstart")===false){return}OpenLayers.Request.GET({url:this.url,success:this.requestSuccess,failure:this.requestFailure,scope:this});this.loaded=true}};OpenLayers.Layer.GML.prototype.requestSuccess=function(g){var h=g.responseXML;if(!h||!h.documentElement){h=OpenLayers.parseXMLString(g.responseText)}var a=OpenLayers.Request.XMLHttpRequest.getParseErrorText(h);if(a!=OpenLayers.Request.XMLHttpRequest.PARSED_OK){alert(OpenLayers.i18n(a));this.events.triggerEvent("loadend");return}var b={};OpenLayers.Util.extend(b,this.formatOptions);if(this.map&&this.getNativeProjection()&&!this.getNativeProjection().equals(this.map.getProjection())){b.externalProjection=this.getNativeProjection();b.internalProjection=this.map.getProjection()}var d=this.format?new this.format(b):new OpenLayers.Format.GML(b);this.addFeatures(d.read(h));var f=this.getDataExtent();if(f&&!(f.getWidth()==0||f.getHeight()==0)){this.maxExtent=f}this.events.triggerEvent("loadend")};OpenLayers.Style.prototype.clone=function(){var b=OpenLayers.Util.extend({},this);if(this.rules){b.rules=[];for(var d=0,a=this.rules.length;d<a;++d){b.rules.push(this.rules[d].clone())}}b.context=this.context&&OpenLayers.Util.extend({},this.context);var f=OpenLayers.Util.extend({},this.defaultStyle);return new OpenLayers.Style(f,b)};OpenLayers.StyleMap.prototype.clone=function(){var d={};for(var b in this.styles){d[b]=this.styles[b].clone()}var a={};a.extendDefault=this.extendDefault;return new OpenLayers.StyleMap(d,a)};OpenLayers.Rule.prototype.clone=function(){var b=OpenLayers.Util.extend({},this);if(this.symbolizers){var a=this.symbolizers.length;b.symbolizers=new Array(a);for(var f=0;f<a;++f){b.symbolizers[f]=this.symbolizers[f].clone()}}else{b.symbolizer={};var h,g;for(var d in this.symbolizer){h=this.symbolizer[d];g=typeof h;if(g==="object"){b.symbolizer[d]=OpenLayers.Util.extend({},h)}else{if(g==="string"){b.symbolizer[d]=h}}}}b.filter=this.filter&&this.filter.clone();b.context=this.context&&OpenLayers.Util.extend({},this.context);return new OpenLayers.Rule(b)};OpenLayers.Format.XML.prototype.read=function(f){var b=f.indexOf("<");if(b>0){f=f.substring(b)}var d=OpenLayers.Util.Try(OpenLayers.Function.bind((function(){var g;if(window.ActiveXObject&&!this.xmldom){g=new ActiveXObject("Microsoft.XMLDOM")}else{g=this.xmldom}g.loadXML(f);return g}),this),function(){return new DOMParser().parseFromString(f,"text/xml")},function(){var g=new XMLHttpRequest();g.open("GET","data:text/xml;charset=utf-8,"+encodeURIComponent(f),false);if(g.overrideMimeType){g.overrideMimeType("text/xml")}g.send(null);return g.responseXML});var a=OpenLayers.Request.XMLHttpRequest.getParseErrorText(d);if(a!=OpenLayers.Request.XMLHttpRequest.PARSED_OK&&a!=OpenLayers.Request.XMLHttpRequest.PARSED_EMPTY){alert(OpenLayers.i18n(a))}if(this.keepData){this.data=d}return d};OpenLayers.Format.GML.prototype.read=function(h){if(typeof h=="string"){h=OpenLayers.Format.XML.prototype.read.apply(this,[h])}var b=h.nodeType==9?h.documentElement:h;var j=this.getElementsByTagNameNS(b,this.gmlns,this.featureName);var g=[];for(var f=0,a=j.length;f<a;f++){var d=this.parseFeature(j[f]);if(d){g.push(d)}}return g};OpenLayers.Format.GML.prototype.createFeatureXML=function(o){var l=o.geometry;var g=this.buildGeometryNode(l);if(this.externalProjection){g.setAttribute("srsName",this.externalProjection.toString())}var m=this.createElementNS(this.featureNS,this.featurePrefix+":"+this.geometryName);m.appendChild(g);var a=this.createElementNS(this.gmlns,"gml:"+this.featureName);var p=this.createElementNS(this.featureNS,this.featurePrefix+":"+this.layerName);var d=o.fid||o.id;p.setAttribute("fid",d);p.appendChild(m);for(var j in o.attributes){var h=this.createTextNode(o.attributes[j]);var f=j.substring(j.lastIndexOf(":")+1);var b=this.createElementNS(this.featureNS,this.featurePrefix+":"+f);b.appendChild(h);p.appendChild(b)}a.appendChild(p);return a};OpenLayers.Format.GML.prototype.buildCoordinatesNode=function(j){var b=this.createElementNS(this.gmlns,"gml:coordinates");b.setAttribute("decimal",".");b.setAttribute("cs",",");b.setAttribute("ts"," ");var h=[];if(j instanceof OpenLayers.Bounds){h.push(j.left+","+j.bottom);h.push(j.right+","+j.top)}else{var f=(j.components)?j.components:[j];if(this.xy){for(var d=0,a=f.length;d<a;d++){h.push(f[d].x+","+f[d].y)}}else{for(var d=0,a=f.length;d<a;d++){h.push(f[d].y+","+f[d].x)}}}var g=this.createTextNode(h.join(" "));b.appendChild(g);return b};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_Fees=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_Fees=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_Fees=function(a,d){var b=this.getChildValue(d);if(b&&b.toLowerCase()!="none"){a.fees=b}};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_AccessConstraints=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_AccessConstraints=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_AccessConstraints=function(a,b){var d=this.getChildValue(b);if(d&&d.toLowerCase()!="none"){a.accessConstraints=d}};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_ContactInformation=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_ContactInformation=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_ContactInformation=function(b,d){var a={};this.runChildNodes(a,d);b.contactInformation=a};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_ContactPersonPrimary=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_ContactPersonPrimary=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_ContactPersonPrimary=function(b,d){var a={};this.runChildNodes(a,d);b.personPrimary=a};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_ContactPerson=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_ContactPerson=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_ContactPerson=function(b,d){var a=this.getChildValue(d);if(a){b.person=a}};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_ContactOrganization=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_ContactOrganization=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_ContactOrganization=function(b,d){var a=this.getChildValue(d);if(a){b.organization=a}};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_ContactPosition=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_ContactPosition=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_ContactPosition=function(b,d){var a=this.getChildValue(d);if(a){b.position=a}};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_ContactAddress=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_ContactAddress=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_ContactAddress=function(a,b){var d={};this.runChildNodes(d,b);a.contactAddress=d};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_AddressType=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_AddressType=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_AddressType=function(d,b){var a=this.getChildValue(b);if(a){d.type=a}};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_Address=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_Address=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_Address=function(d,b){var a=this.getChildValue(b);if(a){d.address=a}};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_City=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_City=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_City=function(d,a){var b=this.getChildValue(a);if(b){d.city=b}};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_StateOrProvince=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_StateOrProvince=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_StateOrProvince=function(d,a){var b=this.getChildValue(a);if(b){d.stateOrProvince=b}};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_PostCode=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_PostCode=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_PostCode=function(d,b){var a=this.getChildValue(b);if(a){d.postcode=a}};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_Country=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_Country=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_Country=function(d,a){var b=this.getChildValue(a);if(b){d.country=b}};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_ContactVoiceTelephone=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_ContactVoiceTelephone=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_ContactVoiceTelephone=function(a,d){var b=this.getChildValue(d);if(b){a.phone=b}};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_ContactFacsimileTelephone=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_ContactFacsimileTelephone=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_ContactFacsimileTelephone=function(a,d){var b=this.getChildValue(d);if(b){a.fax=b}};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_ContactElectronicMailAddress=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_ContactElectronicMailAddress=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_ContactElectronicMailAddress=function(a,d){var b=this.getChildValue(d);if(b){a.email=b}};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_GetCapabilities=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_GetCapabilities=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_GetCapabilities=function(b,a){var d={formats:[]};this.runChildNodes(d,a);b.getcapabilities=d};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_GetFeatureInfo=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_GetFeatureInfo=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_GetFeatureInfo=function(b,a){var d={formats:[]};this.runChildNodes(d,a);b.getfeatureinfo=d};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_DescribeLayer=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_DescribeLayer=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_DescribeLayer=function(d,b){var a={formats:[]};this.runChildNodes(a,b);d.describelayer=a};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_GetLegendGraphic=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_GetLegendGraphic=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_GetLegendGraphic=function(d,b){var a={formats:[]};this.runChildNodes(a,b);d.getlegendgraphic=a};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_GetStyles=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_GetStyles=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_GetStyles=function(d,b){var a={formats:[]};this.runChildNodes(a,b);d.getstyles=a};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_PutStyles=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_PutStyles=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_PutStyles=function(d,b){var a={formats:[]};this.runChildNodes(a,b);d.putstyles=a};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_Format=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_Format=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_Format=function(b,a){if(b.formats){b.formats.push(this.getChildValue(a))}};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_Exception=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_Exception=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_Exception=function(a,d){var b={formats:[]};this.runChildNodes(b,d);a.exception=b};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_UserDefinedSymbolization=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_UserDefinedSymbolization=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_UserDefinedSymbolization=function(a,b){var d={supportSLD:parseInt(b.getAttribute("SupportSLD"))==1,userLayer:parseInt(b.getAttribute("UserLayer"))==1,userStyle:parseInt(b.getAttribute("UserStyle"))==1,remoteWFS:parseInt(b.getAttribute("RemoteWFS"))==1};a.userSymbols=d};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_Layer=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_Layer=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_Layer=function(f,r,w){var z={formats:f.request.getmap.formats||[],styles:[],srs:{},bbox:{},dimensions:{},metadataURLs:[],dataURLs:[],featureListURLs:[],authorityURLs:{},identifiers:{},keywords:[]};if(w){z.styles=z.styles.concat(w.styles);var j=["queryable","cascaded","fixedWidth","fixedHeight","opaque","noSubsets","llbbox","minScale","maxScale","attribution"];var o=["srs","bbox","dimensions","authorityURLs"];for(var v=0;v<j.length;v++){if(j[v] in w){z[j[v]]=w[j[v]]}}for(var v=0;v<o.length;v++){z[o[v]]=OpenLayers.Util.extend(z[o[v]],w[o[v]])}}var u=["cascaded","fixedWidth","fixedHeight"];var m=["queryable","opaque","noSubsets"];for(var v=0;v<u.length;v++){var q=u[v];var l=r.getAttributeNode(q);if(l&&l.specified){z[q]=parseInt(l.value)}else{if(!(q in z)){z[q]=0}}}for(var v=0;v<m.length;v++){var q=m[v];var l=r.getAttributeNode(q);if(l&&l.specified){var p=l.value;z[q]=(p==="1"||p==="true")}else{if(!(q in z)){z[q]=false}}}var g=r.childNodes;var d,a,b;for(var v=0;v<g.length;++v){d=g[v];a=d.nodeName;b=this["read_cap_"+d.nodeName];if(b){if(a=="Layer"){b.apply(this,[f,d,z])}else{b.apply(this,[z,d])}}}var B=[];for(var C in z.srs){B.push(C)}z.srs=B;if(z.name){var h=z.name.indexOf(":");if(h>0){z.prefix=z.name.substring(0,h)}f.layers.push(z)}};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_Attribution=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_Attribution=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_Attribution=function(d,b){var a={};this.runChildNodes(a,b);d.attribution=a};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_LogoURL=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_LogoURL=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_LogoURL=function(b,a){b.logo={width:a.getAttribute("width"),height:a.getAttribute("height")};this.runChildNodes(b.logo,a)};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_MetadataURL=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_MetadataURL=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_MetadataURL=function(a,b){var d={formats:[]};this.runChildNodes(d,b);d.type=b.getAttribute("type");a.metadataURLs.push(d)};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_KeywordList=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_KeywordList=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_KeywordList=function(a,b){var d=a;this.runChildNodes(d,b)};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_Keyword=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_Keyword=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_Keyword=function(b,a){if(b.keywords){b.keywords.push(this.getChildValue(a))}};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_DataURL=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_DataURL=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_DataURL=function(a,b){var d={};this.runChildNodes(d,b);a.dataURLs.push(d)};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_FeatureListURL=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_FeatureListURL=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_FeatureListURL=function(b,d){var a={};this.runChildNodes(a,d);b.featureListURLs.push(a)};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_AuthorityURL=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_AuthorityURL=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_AuthorityURL=function(b,d){var a=d.getAttribute("name");if(!(a in b.authorityURLs)){var f={};this.runChildNodes(f,d);b.authorityURLs[a]=f.href}else{return}};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_Identifier=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_Identifier=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_Identifier=function(a,b){var d=b.getAttribute("authority");if(d in a.authorityURLs){a.identifiers[d]=this.getChildValue(b)}else{return}};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_BoundingBox=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_BoundingBox=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_BoundingBox=function(b,d){var f={};f.srs=d.getAttribute("SRS");if(!f.srs){f.srs=d.getAttribute("CRS")}f.bbox=[parseFloat(d.getAttribute("minx")),parseFloat(d.getAttribute("miny")),parseFloat(d.getAttribute("maxx")),parseFloat(d.getAttribute("maxy"))];var a={x:parseFloat(d.getAttribute("resx")),y:parseFloat(d.getAttribute("resy"))};if(!(isNaN(a.x)&&isNaN(a.y))){f.res=a}b.bbox[f.srs]=f};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_Dimension=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_Dimension=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_Dimension=function(b,d){var a=d.getAttribute("name").toLowerCase();if(a in b.dimensions){return}var f={name:a,units:d.getAttribute("units"),unitsymbol:d.getAttribute("unitSymbol"),"default":d.getAttribute("default"),multipleValues:d.getAttribute("multipleValues")=="true"?true:false,nearestValue:d.getAttribute("nearestValue")=="true"?true:false,current:d.getAttribute("current")=="true"?true:false};b.dimensions[f.name]=f};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_Extent=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_Extent=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_Extent=function(d,g){var b=g.getAttribute("name").toLowerCase();if(b in d.dimensions){var f=d.dimensions[b];f.nearestVal=g.getAttribute("nearestValue")==="1";f.multipleVal=g.getAttribute("multipleValues")==="1";f.current=g.getAttribute("current")==="1";f["default"]=g.getAttribute("default")||"";var a=this.getChildValue(g);f.values=a.split(",")}else{return}};OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.read_cap_SRS=OpenLayers.Format.WMSCapabilities.v1_1.prototype.read_cap_SRS=function(g,h){var f=this.getChildValue(h);var b=f.split(/ +/);for(var d=0,a=b.length;d<a;d++){g.srs[b[d]]=1}};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_SRS=function(g,h){var f=this.getChildValue(h);if(f.indexOf(" ")){var b=f.split(/ +/);for(var d=0,a=b.length;d<a;d++){g.srs[b[d]]=1}}else{g.srs[f]=1}};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_VendorSpecificCapabilities=function(a,b){a.vendorSpecificCaps={};this.runChildNodes(a.vendorSpecificCaps,b)};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_TileSet=function(g,d){var f={srs:{},bbox:{},formats:[],layers:[],styles:[]};this.runChildNodes(f,d);var b=[];for(var a in f.srs){b.push(a)}f.srs=b;if(!g.tilesets){g.tilesets=[]}g.tilesets.push(f)};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_Resolutions=function(h,g){var f=this.getChildValue(g);var b=f.split(/ +/);var a=b.length;if(a>0){for(var d=0;d<a;d++){b[d]=parseFloat(b[d])}b.sort(function(l,j){return j-l});h.resolutions=b}};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_Width=function(b,a){b.width=parseInt(this.getChildValue(a))};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_Height=function(b,a){b.height=parseInt(this.getChildValue(a))};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_Layers=function(b,a){if(b.layers){b.layers.push(this.getChildValue(a))}};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.read_cap_Styles=function(b,a){if(b.styles){b.styles.push(this.getChildValue(a))}};OpenLayers.Format.WMSCapabilities.v1_3_0=OpenLayers.Class(OpenLayers.Format.WMSCapabilities.v1_1,{VERSION:"1.3.0",initialize:function(a){OpenLayers.Format.WMSCapabilities.prototype.initialize.apply(this,[a])},read_cap_LayerLimit:function(b,a){b.layerLimit=parseInt(this.getChildValue(a))},read_cap_MaxWidth:function(b,a){b.maxWidth=parseInt(this.getChildValue(a))},read_cap_MaxHeight:function(b,a){b.maxHeight=parseInt(this.getChildValue(a))},read_cap_UserDefinedSymbolization:function(a,b){},read_cap_DescribeLayer:function(b,a){},read_cap_GetLegendGraphic:function(b,a){},read_cap_GetStyles:function(b,a){},read_cap_PutStyles:function(b,a){},read_cap_CRS:function(b,a){this.read_cap_SRS(b,a)},read_cap_LatLonBoundingBox:function(a,b){},read_cap_EX_GeographicBoundingBox:function(g,h){var f=h.childNodes;var b=-180,a=-90,l=180,j=90;for(var d=0;d<f.length;++d){childNode=f[d];if(childNode.nodeType==1){if(childNode.nodeName=="westBoundLongitude"){b=this.getChildValue(childNode)}if(childNode.nodeName=="southBoundLatitude"){a=this.getChildValue(childNode)}if(childNode.nodeName=="eastBoundLongitude"){l=this.getChildValue(childNode)}if(childNode.nodeName=="northBoundLatitude"){j=this.getChildValue(childNode)}}}g.llbbox=[b,a,l,j]},read_cap_Extent:function(a,b){},read_cap_ScaleHint:function(a,b){},read_cap_MinScaleDenominator:function(a,b){a.maxScale=parseFloat(this.getChildValue(b))},read_cap_MaxScaleDenominator:function(a,b){a.minScale=parseFloat(this.getChildValue(b))},CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1_3_0"});OpenLayers.Control.Click=OpenLayers.Class(OpenLayers.Control,{defaultHandlerOptions:{single:true,"double":false,pixelTolerance:0,stopSingle:false,stopDouble:false},initialize:function(a){this.handlerOptions=OpenLayers.Util.extend({},this.defaultHandlerOptions);OpenLayers.Control.prototype.initialize.apply(this,arguments);this.handler=new OpenLayers.Handler.Click(this,{click:this.onClick,dblclick:this.onDblclick},this.handlerOptions)},onClick:function(a){},onDblclick:function(a){},CLASS_NAME:"OpenLayers.Control.Click"});OpenLayers.Control.Graticule=OpenLayers.Class(OpenLayers.Control,{intervals:[45,30,20,10,5,2,1,0.5,0.2,0.1,0.05,0.01,0.005,0.002,0.001],displayInLayerSwitcher:true,visible:true,numPoints:50,targetSize:200,layerName:"Graticule",labelled:true,labelFormat:"dm",lineSymbolizer:{strokeColor:"#333",strokeWidth:1,strokeOpacity:0.5},labelSymbolizer:{stroke:false,fill:false,label:"${label}",labelAlign:"${labelAlign}",labelXOffset:"${xOffset}",labelYOffset:"${yOffset}"},gratLayer:null,initialize:function(a){OpenLayers.Control.prototype.initialize.apply(this,[a])},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.gratLayer){var a=new OpenLayers.Style({},{rules:[new OpenLayers.Rule({symbolizer:{Point:this.labelSymbolizer,Line:this.lineSymbolizer}})]});this.gratLayer=new OpenLayers.Layer.Vector(this.layerName,{styleMap:new OpenLayers.StyleMap({"default":a}),visibility:this.visible,displayInLayerSwitcher:this.displayInLayerSwitcher});this.map.addLayer(this.gratLayer)}this.map.events.register("moveend",this,this.update);this.update();return this.div},update:function(){var v=this.map.getExtent();if(!v){return}var h=v.toGeometry();this.gratLayer.destroyFeatures();var w=OpenLayers.Projection.CRS84;var U=this.map.getProjection();var a=this.map.getResolution();switch(U.getProjName()){case"longlat":case"eqc":this.numPoints=1;break;default:break}var J=this.map.getCenter();var E=new OpenLayers.Pixel(J.lon,J.lat);OpenLayers.Projection.transform(E,U,w);var H=this.targetSize*a;H*=H;var V;for(var P=0,M=this.intervals.length;P<M;++P){V=this.intervals[P];var G=V/2;var R=E.offset(new OpenLayers.Pixel(-G,-G));var Q=E.offset(new OpenLayers.Pixel(G,G));OpenLayers.Projection.transform(R,w,U);OpenLayers.Projection.transform(Q,w,U);var r=(R.x-Q.x)*(R.x-Q.x)+(R.y-Q.y)*(R.y-Q.y);if(r<=H){break}}E.x=Math.floor(E.x/V)*V;E.y=Math.floor(E.y/V)*V;var z=0;var m=[E.clone()];var F=E.clone();var q;do{F=F.offset(new OpenLayers.Pixel(0,V));q=OpenLayers.Projection.transform(F.clone(),w,U);m.unshift(F)}while(v.containsPixel(q)&&++z<1000);F=E.clone();do{F=F.offset(new OpenLayers.Pixel(0,-V));q=OpenLayers.Projection.transform(F.clone(),w,U);m.push(F)}while(v.containsPixel(q)&&++z<1000);z=0;var f=[E.clone()];F=E.clone();do{F=F.offset(new OpenLayers.Pixel(-V,0));q=OpenLayers.Projection.transform(F.clone(),w,U);f.unshift(F)}while(v.containsPixel(q)&&++z<1000);F=E.clone();do{F=F.offset(new OpenLayers.Pixel(V,0));q=OpenLayers.Projection.transform(F.clone(),w,U);f.push(F)}while(v.containsPixel(q)&&++z<1000);var D=[];for(var P=0;P<f.length;++P){var g=f[P].x;var S=[];var K=null;var N=Math.min(m[0].y,90);var L=Math.max(m[m.length-1].y,-90);var b=(N-L)/this.numPoints;var C=L;for(var O=0;O<=this.numPoints;++O){var d=new OpenLayers.Geometry.Point(g,C);d.transform(w,U);S.push(d);C+=b;if(d.y>=v.bottom&&!K){K=d}}if(this.labelled){var p=new OpenLayers.Geometry.Point(K.x,v.bottom);var u={value:g,label:this.labelled?OpenLayers.Util.getFormattedLonLat(g,"lon",this.labelFormat):"",labelAlign:"cb",xOffset:0,yOffset:2};this.gratLayer.addFeatures(new OpenLayers.Feature.Vector(p,u))}var o=new OpenLayers.Geometry.LineString(S);D.push(new OpenLayers.Feature.Vector(o))}for(var O=0;O<m.length;++O){C=m[O].y;if(C<-90||C>90){continue}var S=[];var I=f[0].x;var B=f[f.length-1].x;var T=(B-I)/this.numPoints;var g=I;var K=null;for(var P=0;P<=this.numPoints;++P){var d=new OpenLayers.Geometry.Point(g,C);d.transform(w,U);S.push(d);g+=T;if(d.x<v.right){K=d}}if(this.labelled){var p=new OpenLayers.Geometry.Point(v.right,K.y);var u={value:C,label:this.labelled?OpenLayers.Util.getFormattedLonLat(C,"lat",this.labelFormat):"",labelAlign:"rb",xOffset:-2,yOffset:2};this.gratLayer.addFeatures(new OpenLayers.Feature.Vector(p,u))}var o=new OpenLayers.Geometry.LineString(S);D.push(new OpenLayers.Feature.Vector(o))}this.gratLayer.addFeatures(D)},changeLang:function(a){this.update()},CLASS_NAME:"OpenLayers.Control.Graticule"});OpenLayers.Tile.WFS.prototype.draw=function(){if(OpenLayers.Tile.prototype.draw.apply(this,arguments)){if(this.isLoading){if(this.events.triggerEvent("reload")===false){return}}else{this.isLoading=true;if(this.events.triggerEvent("loadstart")===false){return}}this.loadFeaturesForRegion(this.requestSuccess)}};OpenLayers.Handler.Drag.prototype.mousedown=function(b){var a=true;this.dragging=false;if(this.checkModifiers(b)&&OpenLayers.Event.isLeftClick(b)){this.started=true;this.start=b.xy;this.last=b.xy;OpenLayers.Element.addClass(this.map.viewPortDiv,"olDragDown");this.down(b);this.callback("down",[b.xy]);OpenLayers.Event.stop(b);if(!this.oldOnselectstart){this.oldOnselectstart=(document.onselectstart)?document.onselectstart:OpenLayers.Function.True;document.onselectstart=OpenLayers.Function.False}a=!this.stopDown}else{this.started=false;this.start=null;this.last=null}return a};OpenLayers.Handler.Drag.prototype.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=OpenLayers.Function.False}this.last=this.evt.xy}return true};OpenLayers.Handler.Path.prototype.activate=OpenLayers.Handler.Point.prototype.activate=function(){if(!OpenLayers.Handler.prototype.activate.apply(this,arguments)){return false}var a=OpenLayers.Util.extend({displayInLayerSwitcher:false,calculateInRange:OpenLayers.Function.True},this.layerOptions);this.layer=new OpenLayers.Layer.Vector(this.CLASS_NAME,a);this.map.addLayer(this.layer);return true};OpenLayers.Handler.RegularPolygon.prototype.activate=function(){var a=false;if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){var b={displayInLayerSwitcher:false,calculateInRange:OpenLayers.Function.True};this.layer=new OpenLayers.Layer.Vector(this.CLASS_NAME,b);this.map.addLayer(this.layer);a=true}return a};OpenLayers.Control.ZoomPanel.prototype.activeOverMapOnly=OpenLayers.Control.ZoomOut.prototype.activeOverMapOnly=OpenLayers.Control.ZoomIn.prototype.activeOverMapOnly=OpenLayers.Control.Split.prototype.activeOverMapOnly=OpenLayers.Control.Snapping.prototype.activeOverMapOnly=OpenLayers.Control.ScaleLine.prototype.activeOverMapOnly=OpenLayers.Control.Scale.prototype.activeOverMapOnly=OpenLayers.Control.Permalink.prototype.activeOverMapOnly=OpenLayers.Control.PanZoom.prototype.activeOverMapOnly=OpenLayers.Control.PanZoomBar.prototype.activeOverMapOnly=OpenLayers.Control.PanPanel.prototype.activeOverMapOnly=OpenLayers.Control.Pan.prototype.activeOverMapOnly=OpenLayers.Control.NavToolbar.prototype.activeOverMapOnly=OpenLayers.Control.NavigationHistory.prototype.activeOverMapOnly=OpenLayers.Control.MouseToolbar.prototype.activeOverMapOnly=OpenLayers.Control.MousePosition.prototype.activeOverMapOnly=OpenLayers.Control.MouseDefaults.prototype.activeOverMapOnly=OpenLayers.Control.Measure.prototype.activeOverMapOnly=OpenLayers.Control.LayerSwitcher.prototype.activeOverMapOnly=OpenLayers.Control.GetFeature.prototype.activeOverMapOnly=OpenLayers.Control.EditingToolbar.prototype.activeOverMapOnly=OpenLayers.Control.Button.prototype.activeOverMapOnly=OpenLayers.Control.Attribution.prototype.activeOverMapOnly=OpenLayers.Control.ArgParser.prototype.activeOverMapOnly=false;OpenLayers.Control.ZoomPanel.prototype.destroy=OpenLayers.Control.ZoomOut.prototype.destroy=OpenLayers.Control.ZoomIn.prototype.destroy=OpenLayers.Control.Scale.prototype.destroy=OpenLayers.Control.ScaleLine.prototype.destroy=OpenLayers.Control.PanPanel.prototype.destroy=OpenLayers.Control.Pan.prototype.destroy=OpenLayers.Control.NavToolbar.prototype.destroy=OpenLayers.Control.Measure.prototype.destroy=OpenLayers.Control.GetFeature.prototype.destroy=OpenLayers.Control.EditingToolbar.prototype.destroy=OpenLayers.Control.Button.prototype.destroy=OpenLayers.Control.ArgParser.prototype.destroy=OpenLayers.Control.prototype.destroy;OpenLayers.Control.ZoomPanel.prototype.onMouseOver=OpenLayers.Control.ZoomOut.prototype.onMouseOver=OpenLayers.Control.ZoomIn.prototype.onMouseOver=OpenLayers.Control.Split.prototype.onMouseOver=OpenLayers.Control.Snapping.prototype.onMouseOver=OpenLayers.Control.ScaleLine.prototype.onMouseOver=OpenLayers.Control.Scale.prototype.onMouseOver=OpenLayers.Control.Permalink.prototype.onMouseOver=OpenLayers.Control.PanZoom.prototype.onMouseOver=OpenLayers.Control.PanZoomBar.prototype.onMouseOver=OpenLayers.Control.PanPanel.prototype.onMouseOver=OpenLayers.Control.Pan.prototype.onMouseOver=OpenLayers.Control.NavToolbar.prototype.onMouseOver=OpenLayers.Control.NavigationHistory.prototype.onMouseOver=OpenLayers.Control.MouseToolbar.prototype.onMouseOver=OpenLayers.Control.MousePosition.prototype.onMouseOver=OpenLayers.Control.MouseDefaults.prototype.onMouseOver=OpenLayers.Control.Measure.prototype.onMouseOver=OpenLayers.Control.LayerSwitcher.prototype.onMouseOver=OpenLayers.Control.GetFeature.prototype.onMouseOver=OpenLayers.Control.EditingToolbar.prototype.onMouseOver=OpenLayers.Control.Button.prototype.onMouseOver=OpenLayers.Control.Attribution.prototype.onMouseOver=OpenLayers.Control.ArgParser.prototype.onMouseOver=OpenLayers.Control.prototype.onMouseOver;OpenLayers.Control.ZoomPanel.prototype.onMouseOut=OpenLayers.Control.ZoomOut.prototype.onMouseOut=OpenLayers.Control.ZoomIn.prototype.onMouseOut=OpenLayers.Control.Split.prototype.onMouseOut=OpenLayers.Control.Snapping.prototype.onMouseOut=OpenLayers.Control.ScaleLine.prototype.onMouseOut=OpenLayers.Control.Scale.prototype.onMouseOut=OpenLayers.Control.Permalink.prototype.onMouseOut=OpenLayers.Control.PanZoom.prototype.onMouseOut=OpenLayers.Control.PanZoomBar.prototype.onMouseOut=OpenLayers.Control.PanPanel.prototype.onMouseOut=OpenLayers.Control.Pan.prototype.onMouseOut=OpenLayers.Control.NavToolbar.prototype.onMouseOut=OpenLayers.Control.NavigationHistory.prototype.onMouseOut=OpenLayers.Control.MouseToolbar.prototype.onMouseOut=OpenLayers.Control.MousePosition.prototype.onMouseOut=OpenLayers.Control.MouseDefaults.prototype.onMouseOut=OpenLayers.Control.Measure.prototype.onMouseOut=OpenLayers.Control.LayerSwitcher.prototype.onMouseOut=OpenLayers.Control.GetFeature.prototype.onMouseOut=OpenLayers.Control.EditingToolbar.prototype.onMouseOut=OpenLayers.Control.Button.prototype.onMouseOut=OpenLayers.Control.Attribution.prototype.onMouseOut=OpenLayers.Control.ArgParser.prototype.onMouseOut=OpenLayers.Control.prototype.onMouseOut;OpenLayers.Control.ZoomPanel.prototype.setMap=OpenLayers.Control.ZoomOut.prototype.setMap=OpenLayers.Control.ZoomIn.prototype.setMap=OpenLayers.Control.Split.prototype.setMap=OpenLayers.Control.Snapping.prototype.setMap=OpenLayers.Control.ScaleLine.prototype.setMap=OpenLayers.Control.Scale.prototype.setMap=OpenLayers.Control.PanZoom.prototype.setMap=OpenLayers.Control.PanPanel.prototype.setMap=OpenLayers.Control.Pan.prototype.setMap=OpenLayers.Control.NavToolbar.prototype.setMap=OpenLayers.Control.MouseToolbar.prototype.setMap=OpenLayers.Control.MouseDefaults.prototype.setMap=OpenLayers.Control.Measure.prototype.setMap=OpenLayers.Control.EditingToolbar.prototype.setMap=OpenLayers.Control.DrawFeature.prototype.setMap=OpenLayers.Control.Button.prototype.setMap=OpenLayers.Control.Attribution.prototype.setMap=OpenLayers.Control.prototype.setMap;OpenLayers.Control.ZoomPanel.prototype.draw=OpenLayers.Control.ZoomOut.prototype.draw=OpenLayers.Control.ZoomIn.prototype.draw=OpenLayers.Control.Split.prototype.draw=OpenLayers.Control.Snapping.prototype.draw=OpenLayers.Control.PanPanel.prototype.draw=OpenLayers.Control.Pan.prototype.draw=OpenLayers.Control.Measure.prototype.draw=OpenLayers.Control.GetFeature.prototype.draw=OpenLayers.Control.Button.prototype.draw=OpenLayers.Control.ArgParser.prototype.draw=OpenLayers.Control.prototype.draw;OpenLayers.Control.ZoomPanel.prototype.changeLang=OpenLayers.Control.ZoomOut.prototype.changeLang=OpenLayers.Control.ZoomIn.prototype.changeLang=OpenLayers.Control.Split.prototype.changeLang=OpenLayers.Control.Snapping.prototype.changeLang=OpenLayers.Control.ScaleLine.prototype.changeLang=OpenLayers.Control.Scale.prototype.changeLang=OpenLayers.Control.Permalink.prototype.changeLang=OpenLayers.Control.PanZoom.prototype.changeLang=OpenLayers.Control.PanZoomBar.prototype.changeLang=OpenLayers.Control.PanPanel.prototype.changeLang=OpenLayers.Control.Pan.prototype.changeLang=OpenLayers.Control.NavToolbar.prototype.changeLang=OpenLayers.Control.NavigationHistory.prototype.changeLang=OpenLayers.Control.MouseToolbar.prototype.changeLang=OpenLayers.Control.MousePosition.prototype.changeLang=OpenLayers.Control.MouseDefaults.prototype.changeLang=OpenLayers.Control.Measure.prototype.changeLang=OpenLayers.Control.LayerSwitcher.prototype.changeLang=OpenLayers.Control.GetFeature.prototype.changeLang=OpenLayers.Control.EditingToolbar.prototype.changeLang=OpenLayers.Control.Button.prototype.changeLang=OpenLayers.Control.Attribution.prototype.changeLang=OpenLayers.Control.ArgParser.prototype.changeLang=OpenLayers.Control.prototype.changeLang;OpenLayers.Control.MouseDefaults.defaultMouseDown=function(a){if(!OpenLayers.Event.isLeftClick(a)){return}this.mouseDragStart=a.xy.clone();this.performedDrag=false;if(a.shiftKey){this.map.div.style.cursor="crosshair";this.zoomBox=OpenLayers.Util.createDiv("zoomBox",this.mouseDragStart,null,null,"absolute","2px solid red");this.zoomBox.style.backgroundColor="white";this.zoomBox.style.filter="alpha(opacity=50)";this.zoomBox.style.opacity="0.50";this.zoomBox.style.fontSize="1px";this.zoomBox.style.zIndex=this.map.Z_INDEX_BASE.Popup-1;this.map.viewPortDiv.appendChild(this.zoomBox)}document.onselectstart=OpenLayers.Function.False;OpenLayers.Event.stop(a)};OpenLayers.Control.MouseToolbar.prototype.defaultMouseDown=function(a){if(!OpenLayers.Event.isLeftClick(a)){return}this.mouseDragStart=a.xy.clone();this.performedDrag=false;this.startViaKeyboard=false;if(a.shiftKey&&this.mode!="zoombox"){this.switchModeTo("zoombox");this.startViaKeyboard=true}else{if(a.altKey&&this.mode!="measure"){this.switchModeTo("measure")}else{if(!this.mode){this.switchModeTo("pan")}}}switch(this.mode){case"zoombox":this.map.div.style.cursor="crosshair";this.zoomBox=OpenLayers.Util.createDiv("zoomBox",this.mouseDragStart,null,null,"absolute","2px solid red");this.zoomBox.style.backgroundColor="white";this.zoomBox.style.filter="alpha(opacity=50)";this.zoomBox.style.opacity="0.50";this.zoomBox.style.fontSize="1px";this.zoomBox.style.zIndex=this.map.Z_INDEX_BASE.Popup-1;this.map.viewPortDiv.appendChild(this.zoomBox);this.performedDrag=true;break;case"measure":var d="";if(this.measureStart){var b=this.map.getLonLatFromViewPortPx(this.mouseDragStart);d=OpenLayers.Util.distVincenty(this.measureStart,b);d=Math.round(d*100)/100;d=d+"km";this.measureStartBox=this.measureBox}this.measureStart=this.map.getLonLatFromViewPortPx(this.mouseDragStart);this.measureBox=OpenLayers.Util.createDiv(null,this.mouseDragStart.add(-2-parseInt(this.map.layerContainerDiv.style.left),-2-parseInt(this.map.layerContainerDiv.style.top)),null,null,"absolute");this.measureBox.style.width="4px";this.measureBox.style.height="4px";this.measureBox.style.fontSize="1px";this.measureBox.style.backgroundColor="red";this.measureBox.style.zIndex=this.map.Z_INDEX_BASE.Popup-1;this.map.layerContainerDiv.appendChild(this.measureBox);if(d){this.measureBoxDistance=OpenLayers.Util.createDiv(null,this.mouseDragStart.add(-2-parseInt(this.map.layerContainerDiv.style.left),2-parseInt(this.map.layerContainerDiv.style.top)),null,null,"absolute");this.measureBoxDistance.innerHTML=d;this.measureBoxDistance.style.zIndex=this.map.Z_INDEX_BASE.Popup-1;this.map.layerContainerDiv.appendChild(this.measureBoxDistance);this.measureDivs.push(this.measureBoxDistance)}this.measureBox.style.zIndex=this.map.Z_INDEX_BASE.Popup-1;this.map.layerContainerDiv.appendChild(this.measureBox);this.measureDivs.push(this.measureBox);break;default:this.map.div.style.cursor="move";break}document.onselectstart=OpenLayers.Function.False;OpenLayers.Event.stop(a)};OpenLayers.Control.PanZoom.prototype._removeButton=function(a){OpenLayers.Event.stopObservingElement(a);a.map=null;a.getSlideFactor=null;this.div.removeChild(a);OpenLayers.Util.removeItem(this.buttons,a)};OpenLayers.Control.Measure.prototype.cancel=function(){if(this.delayedTrigger){window.clearTimeout(this.delayedTrigger);this.delayedTrigger=null}this._nextMeasureIsDelayed=false;this.handler.cancel()};OpenLayers.Control.Measure.prototype.measurePartial=function(a,b){if(!this.delayedTrigger){this.measure(b,"measurepartial");this._delayNextMeasure();return}if(this._nextMeasureIsDelayed){this._nextMeasureIsDelayed=false;window.clearTimeout(this.delayedTrigger);this.delayedTrigger=window.setTimeout(OpenLayers.Function.bind(function(){this.measure(b,"measurepartial");this._delayNextMeasure()},this),this.partialDelay)}};OpenLayers.Control.Measure.prototype._delayNextMeasure=function(){this.delayedTrigger=window.setTimeout(OpenLayers.Function.bind(function(){this._nextMeasureIsDelayed=false;if(this.delayedTrigger){window.clearTimeout(this.delayedTrigger);this.delayedTrigger=null}},this),this.partialDelay);this._nextMeasureIsDelayed=true};OpenLayers.Control.Measure.prototype.measure=function(b,a){this._nextMeasureIsDelayed=false;if(this.delayedTrigger){window.clearTimeout(this.delayedTrigger);this.delayedTrigger=null}this.events.triggerEvent(a,this.getMeasure(b))};OpenLayers.Control.Measure.prototype.getMeasure=function(d){var b,a;if(d instanceof OpenLayers.Geometry.LineString){b=this.getBestLength(d);a=1}else{b=this.getBestArea(d);a=2}return{measure:b[0],units:b[1],order:a,geometry:d}};OpenLayers.Popup.FramedCloud.prototype.draw=OpenLayers.Popup.Framed.prototype.draw=OpenLayers.Popup.prototype.draw;OpenLayers.Popup.FramedCloud.prototype.onMoveStartPopup=OpenLayers.Popup.Framed.prototype.onMoveStartPopup=OpenLayers.Popup.prototype.onMoveStartPopup;OpenLayers.Popup.FramedCloud.prototype.onMoveEndPopup=OpenLayers.Popup.Framed.prototype.onMoveEndPopup=OpenLayers.Popup.prototype.onMoveEndPopup;OpenLayers.Popup.FramedCloud.prototype.addCloseBox=OpenLayers.Popup.Framed.prototype.addCloseBox=OpenLayers.Popup.prototype.addCloseBox;OpenLayers.Layer.Yahoo.prototype.RESOLUTION_PROPERTIES=OpenLayers.Layer.XYZ.prototype.RESOLUTION_PROPERTIES=OpenLayers.Layer.WorldWind.prototype.RESOLUTION_PROPERTIES=OpenLayers.Layer.WFS.prototype.RESOLUTION_PROPERTIES=OpenLayers.Layer.VirtualEarth.prototype.RESOLUTION_PROPERTIES=OpenLayers.Layer.TMS.prototype.RESOLUTION_PROPERTIES=OpenLayers.Layer.TileCache.prototype.RESOLUTION_PROPERTIES=OpenLayers.Layer.Text.prototype.RESOLUTION_PROPERTIES=OpenLayers.Layer.PointTrack.prototype.RESOLUTION_PROPERTIES=OpenLayers.Layer.MultiMap.prototype.RESOLUTION_PROPERTIES=OpenLayers.Layer.Markers.prototype.RESOLUTION_PROPERTIES=OpenLayers.Layer.MapServer.Untiled.prototype.RESOLUTION_PROPERTIES=OpenLayers.Layer.MapServer.prototype.RESOLUTION_PROPERTIES=OpenLayers.Layer.MapGuide.prototype.RESOLUTION_PROPERTIES=OpenLayers.Layer.KaMap.prototype.RESOLUTION_PROPERTIES=OpenLayers.Layer.KaMapCache.prototype.RESOLUTION_PROPERTIES=OpenLayers.Layer.Image.prototype.RESOLUTION_PROPERTIES=OpenLayers.Layer.Google.prototype.RESOLUTION_PROPERTIES=OpenLayers.Layer.GeoRSS.prototype.RESOLUTION_PROPERTIES=OpenLayers.Layer.EventPane.prototype.RESOLUTION_PROPERTIES=OpenLayers.Layer.Boxes.prototype.RESOLUTION_PROPERTIES=OpenLayers.Layer.ArcIMS.prototype.RESOLUTION_PROPERTIES=OpenLayers.Layer.ArcGIS93Rest.prototype.RESOLUTION_PROPERTIES=OpenLayers.Layer.prototype.RESOLUTION_PROPERTIES;OpenLayers.Layer.Yahoo.prototype.addOptions=OpenLayers.Layer.XYZ.prototype.addOptions=OpenLayers.Layer.WorldWind.prototype.addOptions=OpenLayers.Layer.WFS.prototype.addOptions=OpenLayers.Layer.VirtualEarth.prototype.addOptions=OpenLayers.Layer.TMS.prototype.addOptions=OpenLayers.Layer.TileCache.prototype.addOptions=OpenLayers.Layer.Text.prototype.addOptions=OpenLayers.Layer.PointTrack.prototype.addOptions=OpenLayers.Layer.MultiMap.prototype.addOptions=OpenLayers.Layer.Markers.prototype.addOptions=OpenLayers.Layer.MapServer.Untiled.prototype.addOptions=OpenLayers.Layer.MapServer.prototype.addOptions=OpenLayers.Layer.MapGuide.prototype.addOptions=OpenLayers.Layer.KaMap.prototype.addOptions=OpenLayers.Layer.KaMapCache.prototype.addOptions=OpenLayers.Layer.Image.prototype.addOptions=OpenLayers.Layer.Google.prototype.addOptions=OpenLayers.Layer.GeoRSS.prototype.addOptions=OpenLayers.Layer.EventPane.prototype.addOptions=OpenLayers.Layer.Boxes.prototype.addOptions=OpenLayers.Layer.ArcIMS.prototype.addOptions=OpenLayers.Layer.ArcGIS93Rest.prototype.addOptions=OpenLayers.Layer.prototype.addOptions;OpenLayers.Layer.Yahoo.prototype.getNativeProjection=OpenLayers.Layer.XYZ.prototype.getNativeProjection=OpenLayers.Layer.WorldWind.prototype.getNativeProjection=OpenLayers.Layer.WFS.prototype.getNativeProjection=OpenLayers.Layer.VirtualEarth.prototype.getNativeProjection=OpenLayers.Layer.TMS.prototype.getNativeProjection=OpenLayers.Layer.TileCache.prototype.getNativeProjection=OpenLayers.Layer.Text.prototype.getNativeProjection=OpenLayers.Layer.PointTrack.prototype.getNativeProjection=OpenLayers.Layer.MultiMap.prototype.getNativeProjection=OpenLayers.Layer.Markers.prototype.getNativeProjection=OpenLayers.Layer.MapServer.Untiled.prototype.getNativeProjection=OpenLayers.Layer.MapServer.prototype.getNativeProjection=OpenLayers.Layer.MapGuide.prototype.getNativeProjection=OpenLayers.Layer.KaMap.prototype.getNativeProjection=OpenLayers.Layer.KaMapCache.prototype.getNativeProjection=OpenLayers.Layer.Image.prototype.getNativeProjection=OpenLayers.Layer.Google.prototype.getNativeProjection=OpenLayers.Layer.GeoRSS.prototype.getNativeProjection=OpenLayers.Layer.EventPane.prototype.getNativeProjection=OpenLayers.Layer.Boxes.prototype.getNativeProjection=OpenLayers.Layer.ArcIMS.prototype.getNativeProjection=OpenLayers.Layer.ArcGIS93Rest.prototype.getNativeProjection=OpenLayers.Layer.prototype.getNativeProjection;OpenLayers.Layer.WorldWind.prototype.setMap=OpenLayers.Layer.VirtualEarth.prototype.setMap=OpenLayers.Layer.TileCache.prototype.setMap=OpenLayers.Layer.Text.prototype.setMap=OpenLayers.Layer.MultiMap.prototype.setMap=OpenLayers.Layer.Markers.prototype.setMap=OpenLayers.Layer.MapServer.Untiled.prototype.setMap=OpenLayers.Layer.MapServer.prototype.setMap=OpenLayers.Layer.MapGuide.prototype.setMap=OpenLayers.Layer.KaMap.prototype.setMap=OpenLayers.Layer.KaMapCache.prototype.setMap=OpenLayers.Layer.GeoRSS.prototype.setMap=OpenLayers.Layer.Boxes.prototype.setMap=OpenLayers.Layer.ArcIMS.prototype.setMap=OpenLayers.Layer.ArcGIS93Rest.prototype.setMap=OpenLayers.Layer.prototype.setMap;OpenLayers.Layer.Yahoo.prototype.calculateInRange=OpenLayers.Layer.XYZ.prototype.calculateInRange=OpenLayers.Layer.WorldWind.prototype.calculateInRange=OpenLayers.Layer.WFS.prototype.calculateInRange=OpenLayers.Layer.VirtualEarth.prototype.calculateInRange=OpenLayers.Layer.TMS.prototype.calculateInRange=OpenLayers.Layer.TileCache.prototype.calculateInRange=OpenLayers.Layer.Text.prototype.calculateInRange=OpenLayers.Layer.PointTrack.prototype.calculateInRange=OpenLayers.Layer.MultiMap.prototype.calculateInRange=OpenLayers.Layer.Markers.prototype.calculateInRange=OpenLayers.Layer.MapServer.Untiled.prototype.calculateInRange=OpenLayers.Layer.MapServer.prototype.calculateInRange=OpenLayers.Layer.MapGuide.prototype.calculateInRange=OpenLayers.Layer.KaMap.prototype.calculateInRange=OpenLayers.Layer.KaMapCache.prototype.calculateInRange=OpenLayers.Layer.Image.prototype.calculateInRange=OpenLayers.Layer.Google.prototype.calculateInRange=OpenLayers.Layer.GeoRSS.prototype.calculateInRange=OpenLayers.Layer.EventPane.prototype.calculateInRange=OpenLayers.Layer.Boxes.prototype.calculateInRange=OpenLayers.Layer.ArcIMS.prototype.calculateInRange=OpenLayers.Layer.ArcGIS93Rest.prototype.calculateInRange=OpenLayers.Layer.prototype.calculateInRange;OpenLayers.Layer.Yahoo.prototype.initResolutions=OpenLayers.Layer.XYZ.prototype.initResolutions=OpenLayers.Layer.WorldWind.prototype.initResolutions=OpenLayers.Layer.WFS.prototype.initResolutions=OpenLayers.Layer.VirtualEarth.prototype.initResolutions=OpenLayers.Layer.TMS.prototype.initResolutions=OpenLayers.Layer.TileCache.prototype.initResolutions=OpenLayers.Layer.Text.prototype.initResolutions=OpenLayers.Layer.PointTrack.prototype.initResolutions=OpenLayers.Layer.MultiMap.prototype.initResolutions=OpenLayers.Layer.Markers.prototype.initResolutions=OpenLayers.Layer.MapServer.Untiled.prototype.initResolutions=OpenLayers.Layer.MapServer.prototype.initResolutions=OpenLayers.Layer.MapGuide.prototype.initResolutions=OpenLayers.Layer.KaMap.prototype.initResolutions=OpenLayers.Layer.KaMapCache.prototype.initResolutions=OpenLayers.Layer.Image.prototype.initResolutions=OpenLayers.Layer.Google.prototype.initResolutions=OpenLayers.Layer.GeoRSS.prototype.initResolutions=OpenLayers.Layer.EventPane.prototype.initResolutions=OpenLayers.Layer.Boxes.prototype.initResolutions=OpenLayers.Layer.ArcIMS.prototype.initResolutions=OpenLayers.Layer.ArcGIS93Rest.prototype.initResolutions=OpenLayers.Layer.prototype.initResolutions;OpenLayers.Layer.Yahoo.prototype.setOpacity=OpenLayers.Layer.XYZ.prototype.setOpacity=OpenLayers.Layer.WorldWind.prototype.setOpacity=OpenLayers.Layer.WFS.prototype.setOpacity=OpenLayers.Layer.VirtualEarth.prototype.setOpacity=OpenLayers.Layer.TMS.prototype.setOpacity=OpenLayers.Layer.TileCache.prototype.setOpacity=OpenLayers.Layer.Text.prototype.setOpacity=OpenLayers.Layer.PointTrack.prototype.setOpacity=OpenLayers.Layer.MultiMap.prototype.setOpacity=OpenLayers.Layer.MapServer.Untiled.prototype.setOpacity=OpenLayers.Layer.MapServer.prototype.setOpacity=OpenLayers.Layer.MapGuide.prototype.setOpacity=OpenLayers.Layer.KaMap.prototype.setOpacity=OpenLayers.Layer.KaMapCache.prototype.setOpacity=OpenLayers.Layer.Image.prototype.setOpacity=OpenLayers.Layer.Google.prototype.setOpacity=OpenLayers.Layer.GeoRSS.prototype.setOpacity=OpenLayers.Layer.EventPane.prototype.setOpacity=OpenLayers.Layer.Boxes.prototype.setOpacity=OpenLayers.Layer.ArcIMS.prototype.setOpacity=OpenLayers.Layer.ArcGIS93Rest.prototype.setOpacity=OpenLayers.Layer.prototype.setOpacity;OpenLayers.Layer.Yahoo.prototype.changeBaseLayer=OpenLayers.Layer.XYZ.prototype.changeBaseLayer=OpenLayers.Layer.WorldWind.prototype.changeBaseLayer=OpenLayers.Layer.VirtualEarth.prototype.changeBaseLayer=OpenLayers.Layer.TMS.prototype.changeBaseLayer=OpenLayers.Layer.TileCache.prototype.changeBaseLayer=OpenLayers.Layer.MultiMap.prototype.changeBaseLayer=OpenLayers.Layer.MapServer.Untiled.prototype.changeBaseLayer=OpenLayers.Layer.MapServer.prototype.changeBaseLayer=OpenLayers.Layer.MapGuide.prototype.changeBaseLayer=OpenLayers.Layer.KaMap.prototype.changeBaseLayer=OpenLayers.Layer.KaMapCache.prototype.changeBaseLayer=OpenLayers.Layer.Image.prototype.changeBaseLayer=OpenLayers.Layer.Google.prototype.changeBaseLayer=OpenLayers.Layer.EventPane.prototype.changeBaseLayer=OpenLayers.Layer.ArcIMS.prototype.changeBaseLayer=OpenLayers.Layer.ArcGIS93Rest.prototype.changeBaseLayer=function(a){if(OpenLayers.Layer.prototype.changeBaseLayer.apply(this,arguments)===false){return false}if(!this.isBaseLayer){var b={displayInLayerSwitcher:this.displayInLayerSwitcher};var d=this.getCompatibleProjection(a.layer);if(d!=null){b.projection=d.clone();if(this.aggregate==undefined){b.displayInLayerSwitcher=true}}else{if(this.aggregate==undefined){b.displayInLayerSwitcher=false}}this.addOptions(b);this.redraw()}return true};OpenLayers.Layer.Yahoo.prototype.getCompatibleProjection=OpenLayers.Layer.XYZ.prototype.getCompatibleProjection=OpenLayers.Layer.WorldWind.prototype.getCompatibleProjection=OpenLayers.Layer.VirtualEarth.prototype.getCompatibleProjection=OpenLayers.Layer.TMS.prototype.getCompatibleProjection=OpenLayers.Layer.TileCache.prototype.getCompatibleProjection=OpenLayers.Layer.MultiMap.prototype.getCompatibleProjection=OpenLayers.Layer.MapServer.Untiled.prototype.getCompatibleProjection=OpenLayers.Layer.MapServer.prototype.getCompatibleProjection=OpenLayers.Layer.MapGuide.prototype.getCompatibleProjection=OpenLayers.Layer.KaMap.prototype.getCompatibleProjection=OpenLayers.Layer.KaMapCache.prototype.getCompatibleProjection=OpenLayers.Layer.Image.prototype.getCompatibleProjection=OpenLayers.Layer.Google.prototype.getCompatibleProjection=OpenLayers.Layer.EventPane.prototype.getCompatibleProjection=OpenLayers.Layer.ArcIMS.prototype.getCompatibleProjection=OpenLayers.Layer.ArcGIS93Rest.prototype.getCompatibleProjection=OpenLayers.Layer.prototype.getCompatibleProjection;OpenLayers.Layer.Image.prototype.addTileMonitoringHooks=function(a){a.onLoadStart=function(){if(this.events.triggerEvent("loadstart")===false){return}};a.events.register("loadstart",this,a.onLoadStart);a.onLoadEnd=function(){this.events.triggerEvent("loadend")};a.events.register("loadend",this,a.onLoadEnd);a.events.register("unload",this,a.onLoadEnd)};OpenLayers.Layer.VirtualEarth.prototype.loadMapObject=function(){var a=OpenLayers.Util.createDiv(this.name);var d=this.map.getSize();a.style.width=d.w+"px";a.style.height=d.h+"px";this.div.appendChild(a);try{this.mapObject=new VEMap(this.name)}catch(b){}if(this.mapObject!=null){try{this.mapObject.LoadMap(null,null,this.type,true);this.mapObject.AttachEvent("onmousedown",OpenLayers.Function.True)}catch(b){}this.mapObject.HideDashboard()}if(!this.mapObject||!this.mapObject.vemapcontrol||!this.mapObject.vemapcontrol.PanMap||(typeof this.mapObject.vemapcontrol.PanMap!="function")){this.dragPanMapObject=null}};OpenLayers.Layer.WorldWind.prototype.mergeNewParams=OpenLayers.Layer.TMS.prototype.mergeNewParams=OpenLayers.Layer.TileCache.prototype.mergeNewParams=OpenLayers.Layer.MapServer.prototype.mergeNewParams=OpenLayers.Layer.MapGuide.prototype.mergeNewParams=OpenLayers.Layer.KaMap.prototype.mergeNewParams=OpenLayers.Layer.HTTPRequest.prototype.mergeNewParams;OpenLayers.Layer.XYZ.prototype.getFullRequestString=OpenLayers.Layer.WorldWind.prototype.getFullRequestString=OpenLayers.Layer.TMS.prototype.getFullRequestString=OpenLayers.Layer.TileCache.prototype.getFullRequestString=OpenLayers.Layer.KaMapCache.prototype.getFullRequestString=OpenLayers.Layer.KaMap.prototype.getFullRequestString=OpenLayers.Layer.ArcIMS.prototype.getFullRequestString=OpenLayers.Layer.ArcGIS93Rest.prototype.getFullRequestString=OpenLayers.Layer.HTTPRequest.prototype.getFullRequestString;OpenLayers.Layer.MapServer.Untiled.prototype.getURL=OpenLayers.Layer.MapServer.prototype.getURL=function(d){d=this.adjustBounds(d);var b=[d.left,d.bottom,d.right,d.top];var g=d.clone();g.transform(this.map.getProjection(),this.getNativeProjection());b[0]=g.left;b[1]=g.bottom;b[2]=g.right;b[3]=g.top;var f=this.getImageSize();var a=this.getFullRequestString({mapext:b,imgext:b,map_size:[f.w,f.h],imgx:f.w/2,imgy:f.h/2,imgxy:[f.w,f.h]});return a};OpenLayers.Layer.Markers.prototype.setOpacity=function(b){if(b!=this.opacity){this.opacity=b;for(var d=0,a=this.markers.length;d<a;d++){this.markers[d].setOpacity(this.opacity)}if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"opacity"})}}};OpenLayers.Layer.Text.prototype.changeBaseLayer=OpenLayers.Layer.GeoRSS.prototype.changeBaseLayer=OpenLayers.Layer.Boxes.prototype.changeBaseLayer=OpenLayers.Layer.Markers.prototype.changeBaseLayer=function(d){if(OpenLayers.Layer.prototype.changeBaseLayer.apply(this,arguments)===false){return false}if(!this.isBaseLayer){var h=d.baseLayer?d.baseLayer.getNativeProjection():null;var j=this.map.getProjection();this.addOptions({projection:j.clone()});var f=this.getVisibility();if(f){this.setVisibility(false)}for(var g=0,b=this.markers.length;g<b;g++){var a=this.markers[g];a.lonlat.transform(h,j)}if(f){this.setVisibility(true)}}return true};OpenLayers.Layer.Text.prototype.loadText=function(){if(!this.loaded){if(this.location!=null){var a=function(b){this.events.triggerEvent("loadend")};if(this.events.triggerEvent("loadstart")===false){return}OpenLayers.Request.GET({url:this.location,success:this.parseData,failure:a,scope:this});this.loaded=true}}};OpenLayers.Layer.GeoRSS.prototype.loadRSS=function(){if(!this.loaded){if(this.events.triggerEvent("loadstart")===false){return}OpenLayers.Request.GET({url:this.location,success:this.parseData,scope:this});this.loaded=true}};OpenLayers.Control.EditingToolbar.prototype.addPanelDiv=OpenLayers.Control.NavToolbar.prototype.addPanelDiv=OpenLayers.Control.PanPanel.prototype.addPanelDiv=OpenLayers.Control.ZoomPanel.prototype.addPanelDiv=OpenLayers.Control.Panel.prototype.addPanelDiv;OpenLayers.Control.NavToolbar.prototype.activateControl=OpenLayers.Control.Panel.prototype.activateControl;OpenLayers.Control.EditingToolbar.prototype.addControls=OpenLayers.Control.NavToolbar.prototype.addControls=OpenLayers.Control.PanPanel.prototype.addControls=OpenLayers.Control.ZoomPanel.prototype.addControls=OpenLayers.Control.Panel.prototype.addControls;OpenLayers.Control.PanPanel.prototype.changeLang=OpenLayers.Control.ZoomPanel.prototype.changeLang=OpenLayers.Control.NavToolbar.prototype.changeLang=OpenLayers.Control.Panel.prototype.changeLang;OpenLayers.Format.GeoRSS.prototype.setAttributeNS=OpenLayers.Format.SLD.v1_0_0.prototype.setAttributeNS=OpenLayers.Format.SLD.v1.prototype.setAttributeNS=OpenLayers.Format.SLD.prototype.setAttributeNS=OpenLayers.Format.GML.v3.prototype.setAttributeNS=OpenLayers.Format.GML.v2.prototype.setAttributeNS=OpenLayers.Format.GML.Base.prototype.setAttributeNS=OpenLayers.Format.GPX.prototype.setAttributeNS=OpenLayers.Format.Filter.v1_0_0.prototype.setAttributeNS=OpenLayers.Format.Filter.v1.prototype.setAttributeNS=OpenLayers.Format.Filter.prototype.setAttributeNS=OpenLayers.Format.WMC.v1_1_0.prototype.setAttributeNS=OpenLayers.Format.WMC.v1_0_0.prototype.setAttributeNS=OpenLayers.Format.WMC.v1.prototype.setAttributeNS=OpenLayers.Format.WMC.prototype.setAttributeNS=OpenLayers.Format.XML.prototype.setAttributeNS;OpenLayers.Format.GML.Base.prototype.readers.feature._typeName=function(d,f){var a={components:[],attributes:{}};this.readChildNodes(d,a);if(a.name){a.attributes.name=a.name}var b=new OpenLayers.Feature.Vector(a.components[0],a.attributes);if(!this.singleFeatureType){b.type=d.nodeName.split(":").pop();b.namespace=d.namespaceURI}var g=d.getAttribute("fid")||this.getAttributeNS(d,this.namespaces.gml,"id");if(g){b.fid=g}if(this.internalProjection&&this.externalProjection&&b.geometry){b.geometry.transform(this.externalProjection,this.internalProjection)}if(a.bounds){b.geometry.bounds=a.bounds;if(this.internalProjection&&this.externalProjection){b.geometry.bounds.transform(this.externalProjection,this.internalProjection)}}f.features.push(b)};OpenLayers.Format.GeoRSS.prototype.externalProjection=new OpenLayers.Projection("EPSG:4326");OpenLayers.Format.GPX.prototype.externalProjection=new OpenLayers.Projection("EPSG:4326");OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.namespaces=OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.namespaces=OpenLayers.Format.WFSCapabilities.v1.prototype.namespaces={ows:"http://www.opengis.net/ows",wms:"http://www.opengis.net/wms",wfs:"http://www.opengis.net/wfs",gml:"http://www.opengis.net/gml",ogc:"http://www.opengis.net/ogc",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.defaultPrefix=OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.defaultPrefix=OpenLayers.Format.WFSCapabilities.v1.prototype.defaultPrefix="wfs";OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.getNamespacePrefix=OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.getNamespacePrefix=OpenLayers.Format.WFSCapabilities.v1.prototype.getNamespacePrefix=function(b){if(b==null){return this.defaultPrefix}else{var a=false;var d=null;for(d in this.namespaces){if(this.namespaces[d]==b){a=true;break}}if(!a){d=null}return d}};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.runChildNodes=OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.runChildNodes=OpenLayers.Format.WFSCapabilities.v1.prototype.runChildNodes=function(g,f){var b=f.childNodes;var a,d,j,m;for(var h=0,l=b.length;h<l;++h){a=b[h];if(a.nodeType==1){j=this.getNamespacePrefix(a.namespaceURI);if(j==this.defaultPrefix){j=""}if(j.length>0){j+="_"}m=a.nodeName.split(":").pop();d=this["read_cap_"+j+m];if(d){d.apply(this,[g,a])}else{OpenLayers.Console.log("no read_cap_"+j+m);d=this["read_cap_"+m];if(d){d.apply(this,[g,a])}}}}};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ServiceException=OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.read_cap_ServiceException=OpenLayers.Format.WFSCapabilities.v1.prototype.read_cap_ServiceException=function(b,a){if(b.exceptions===undefined){b.exceptions=[]}b.exceptions.push(this.getChildNode(a))};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_FeatureTypeList=OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.read_cap_FeatureTypeList=OpenLayers.Format.WFSCapabilities.v1.prototype.read_cap_FeatureTypeList=function(d,b){var a={operations:{},featureTypes:[]};this.runChildNodes(a,b);d.featureTypeList=a};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_FeatureType=OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.read_cap_FeatureType=OpenLayers.Format.WFSCapabilities.v1.prototype.read_cap_FeatureType=function(a,d){var b={keywords:[],formats:[],bbox:[],metadataURLs:[],operations:{},supportedSRSs:[]};this.runChildNodes(b,d);for(var f in a.operations){if(!b.operations.hasOwnProperty()){b.operations[f]=1}}a.featureTypes.push(b)};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_Fees=OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.read_cap_Fees=OpenLayers.Format.WFSCapabilities.v1.prototype.read_cap_Fees=function(d,b){var a=this.getChildValue(b);if(a&&a.toLowerCase()!="none"){d.fees=a}};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_AccessConstraints=OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.read_cap_AccessConstraints=OpenLayers.Format.WFSCapabilities.v1.prototype.read_cap_AccessConstraints=function(b,a){var d=this.getChildValue(a);if(d&&d.toLowerCase()!="none"){b.accessConstraints.push(d)}};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_HTTP=OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.read_cap_HTTP=OpenLayers.Format.WFSCapabilities.v1.prototype.read_cap_HTTP=function(b,a){this.runChildNodes(b,a)};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_Operations=OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.read_cap_Operations=OpenLayers.Format.WFSCapabilities.v1.prototype.read_cap_Operations=function(g,f){var d=f.childNodes;var b;for(var a=0;a<d.length;a++){b=d[a];if(b.nodeType==1){g.operations[b.nodeName]=1}}};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_MetadataURL=OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.read_cap_MetadataURL=OpenLayers.Format.WFSCapabilities.v1.prototype.read_cap_MetadataURL=function(d,a){var g={};g.type=a.getAttribute("type");var b=a.getAttribute("format");switch(b){case"XML":b="text/xml";break;case"SGML":b="text/sgml";break;case"TXT":b="text/plain";break;default:break}g.format=b;g.href=this.getChildValue(a);d.metadataURLs.push(g)};OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.read_cap_Service=function(b,d){var a={accessConstraints:[],keywords:[]};this.runChildNodes(a,d);b.service=a};OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.read_cap_OnlineResource=function(d,b){var a=this.getChildValue(b);if(a&&a.toLowerCase()!="none"){d.onlineResource=a}};OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.read_cap_Keywords=function(j,h){var b=this.getChildValue(h);var f=[];if(b&&b.toLowerCase()!="none"){var b=b.replace(/\n/g,",").split(",");for(var g=0,a=b.length;g<a;g++){var d=OpenLayers.String.trim(b[g]);if(d){f.push(d)}}}if(f.length>0){j.keywords.push({keyword:f})}};OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.read_cap_Capability=function(a,d){var b={operations:{}};this.runChildNodes(b,d);a.capability=b};OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.read_cap_Request=function(b,a){this.runChildNodes(b,a)};OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.read_cap_GetCapabilities=function(d,b){var a={};this.runChildNodes(a,b);d.operations.GetCapabilities=a};OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.read_cap_DescribeFeatureType=function(d,a){var b={};this.runChildNodes(b,a);d.operations.DescribeFeaturetype=b};OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.read_cap_Transaction=function(d,b){var a={};this.runChildNodes(a,b);d.operations.Transaction=a};OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.read_cap_GetFeature=function(d,b){var a={formats:[]};this.runChildNodes(a,b);d.operations.GetFeature=a};OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.read_cap_GetFeatureWithLock=function(d,b){var a={formats:[]};this.runChildNodes(a,b);d.operations.getFeatureWithLock=getFeatureWithLock};OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.read_cap_LockFeature=function(d,a){var b={};this.runChildNodes(b,a);d.operations.LockFeature=b};OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.read_cap_ResultFormat=function(g,f){var d=f.childNodes;var b;for(var a=0;a<d.length;a++){b=d[a];if(b.nodeType==1){g.formats.push(b.nodeName)}}};OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.read_cap_DCPType=function(b,a){this.runChildNodes(b,a)};OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.read_cap_Get=function(d,b){var a={href:b.getAttribute("onlineResource")};d.get=a};OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.read_cap_Post=function(d,b){var a={href:b.getAttribute("onlineResource")};d.post=a};OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.read_cap_SRS=function(b,a){b.srs=this.getChildValue(a);b.supportedSRSs.push(b.srs)};OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.read_cap_LatLongBoundingBox=function(b,a){var d=[parseFloat(a.getAttribute("minx")),parseFloat(a.getAttribute("miny")),parseFloat(a.getAttribute("maxx")),parseFloat(a.getAttribute("maxy"))];b.bbox.push(d)};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_ServiceIdentification=function(d,b){var a={accessConstraints:[],keywords:[]};this.runChildNodes(a,b);d.service=a};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_Title=function(b,a){OpenLayers.Format.WFSCapabilities.v1.prototype.read_cap_Title.apply(this,arguments)};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_Abstract=function(b,a){OpenLayers.Format.WFSCapabilities.v1.prototype.read_cap_Abstract.apply(this,arguments)};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_Keywords=function(d,b){var a={keyword:[]};this.runChildNodes(a,b);d.keywords.push(a)};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_Keyword=function(d,b){var a=this.getChildValue(b);d.keyword.push(a)};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_ServiceType=function(d,a){var b={};b[this.getChildValue(a)]=a.getAttribute("codeSpace");d.serviceType=b};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_ServiceTypeVersion=function(b,a){b.serviceTypeVersion=this.getChildValue(a)};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_ServiceProvider=function(b,a){var d={};this.runChildNodes(d,a);b.serviceProvider=d};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_ProviderName=function(b,a){b.providerName=this.getChildValue(a)};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_ProviderSite=function(d,b){var a=b.getAttributeNS("xlink","href");if(a&&a.toLowerCase()!="none"){d.providerSite=a}};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_ServiceContact=function(d,b){var a={};this.runChildNodes(a,b);d.serviceContact=a};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_IndividualName=function(b,a){b.individualName=this.getChildValue(a)};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_PositionName=function(b,a){b.positionName=this.getChildValue(a)};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_ContactInfo=function(d,b){var a={};this.runChildNodes(a,b);d.contactInfo=a};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_Role=function(b,a){var d={};d[this.getChildValue(a)]=a.getAttribute("codeSpace");b.role=d};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_Phone=function(d,b){var a={voices:[],facsimiles:[]};this.runChildNodes(a,b);d.phone=a};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_Address=function(d,b){var a={deliveryPoints:[],electronicMailAddresses:[]};this.runChildNodes(a,b);d.address=a};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_OnlineResource=function(d,b){var a=this.getAttributeNS(b,"http://www.w3.org/1999/xlink","href");d.onlineResource=a};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_HoursOfService=function(b,a){b.hoursOfService=this.getChildValue(a)};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_ContactInstructions=function(b,a){b.contactInstructions=this.getChildValue(a)};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_Voice=function(d,a){var b=this.getChildValue(a);if(b){d.voices.push(b)}};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_Facsimile=function(d,b){var a=this.getChildValue(b);if(a){d.facsimiles.push(a)}};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_DeliveryPoint=function(d,a){var b=this.getChildValue(a);if(b){d.deliveryPoints.push(b)}};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_City=function(b,a){b.city=this.getChildValue(a)};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_AdministrativeArea=function(b,a){b.administrativeArea=this.getChildValue(a)};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_PostalCode=function(b,a){b.postalCode=this.getChildValue(a)};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_Country=function(b,a){b.country=this.getChildValue(a)};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_ElectronicMailAddress=function(d,b){var a=this.getChildValue(b);if(a){d.electronicMailAddresses.push(a)}};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_OperationsMetadata=function(d,b){var a={operations:{},parameters:[],constraints:[]};this.runChildNodes(a,b);d.capability=a};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_Operation=function(f,d){var a={};var b=d.getAttribute("name");a[b]={parameters:[],constraints:[],metadata:[]};this.runChildNodes(a[b],d);f.operations[b]=a[b]};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_Parameter=function(b,a){b.parameters.push(this.readDomainType(a))};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.readDomainType=function(b){var a={values:[],metadata:[],name:b.getAttribute("name")};this.runChildNodes(a,b);return a};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_DCP=function(b,a){this.runChildNodes(b,a)};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_Get=function(d,b){var a={href:this.readRequestMethod(b),constraints:[]};this.runChildNodes(d,b);d.get=a};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_Post=function(d,b){var a={href:this.readRequestMethod(b),constraints:[]};this.runChildNodes(d,b);d.post=a};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.readRequestMethod=function(b){var a=this.getAttributeNS(b,"http://www.w3.org/1999/xlink","href");if(a.indexOf("?")<0){a+="?"}else{if(a.lastIndexOf("?",a.length-1)!=a.length-1&&a.lastIndexOf("&",a.length-1)!=a.length-1){a+="&"}}return a};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_Constraint=function(b,a){b.constraints.push(this.readDomainType(a))};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_Value=function(d,a){var b=this.getChildValue(a);if(b){d.values.push(b)}};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_Metadata=function(d,b){var a=this.getAttributeNS(b,"http://www.w3.org/1999/xlink","href");d.metadata.push(a)};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ServesGMLObjectTypeList=function(b,a){b.serversGMLObjectTypeList=[];this.runChildNodes(b.serversGMLObjectTypeList,a)};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_SupportsGMLObjectTypeList=function(b,a){b.supportsGMLObjectTypeList=[];this.runChildNodes(b.supportsGMLObjectTypeList,a)};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_GMLObjectType=function(b,a){var d={formats:[]};this.runChildNodes(d,a);b.push(d)};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_OutputFormats=function(b,a){this.runChildNodes(b,a)};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_Format=function(d,a){var b=this.getChildValue(a);if(b){d.formats.push(b)}};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_DefaultSRS=function(d,b){var a=this.getChildValue(b);if(a){d.srs=a;d.supportedSRSs.push(a)}};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_OtherSRS=function(b,a){b.supportedSRSs.push(this.getChildValue(a))};OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read_cap_ows_WGS84BoundingBox=function(d,f){var b=f.childNodes;var r,q,o,m;for(var j=0,h=b.length;j<h;j++){var a=b[j];var g=a.nodeName.split(":").pop();if(a.nodeType==1){if(g=="LowerCorner"){var p=this.getChildValue(a).split(" ");r=p[0];q=p[1]}else{if(g=="UpperCorner"){var p=this.getChildValue(a).split(" ");o=p[0];m=p[1]}}}}d.bbox.push([r,q,o,m])};OpenLayers.Format.WFST.v1_1_0.prototype.getSrsName=OpenLayers.Format.WFST.v1_0_0.prototype.getSrsName=OpenLayers.Format.WFST.v1.prototype.getSrsName=function(d,b){var a=b&&b.srsName;if(!a){if(this.externalProjection){a=this.externalProjection.getCode()}else{if(d&&d.layer){a=d.layer.projection.getCode()}else{a=this.srsName}}}return a};OpenLayers.Format.GeoJSON.prototype.createCRSObject=function(b){var f;if(this.internalProjection&&this.externalProjection){f=this.externalProjection.toString()}else{f=b.layer.getNativeProjection().toString()}var g=f.substring(f.indexOf(":")+1);var d="";var a={};if(f.match(/^urn:/i)){g=f;d="OGC"}else{if(f.match(/epsg:/i)){g=parseInt(g);if(g==4326){g="urn:ogc:def:crs:OGC:1.3:CRS84";d="OGC"}else{d="EPSG"}}else{if(f.match(/crs:/i)){g="urn:ogc:def:crs:OGC:1.3:"+g;d="OGC"}else{if(f.match(/ignf:/i)){g="urn:ogc:def:crs:IGNF:1.1:"+g;d="OGC"}else{if(f.match(/http:\/\/www\.epsg\.org\/#/)){g=parseInt(f.substring(f.indexOf("#")+1));if(g==4326){g="urn:ogc:def:crs:OGC:1.3:CRS84";d="OGC"}else{d="EPSG"}}else{if(f.match(/\/RIG.xml#/)){g="urn:ogc:def:crs:IGNF:1.1:"+f.substring(f.indexOf("#")+1);d="OGC"}}}}}}switch(d){case"OGC":a={type:"OGC",properties:{urn:g}};break;case"EPSG":a={type:"EPSG",properties:{code:g}};break}return a};OpenLayers.Format.WMC.prototype.read=function(g,d){if(typeof g=="string"){g=OpenLayers.Format.XML.prototype.read.apply(this,[g])}var b=g.documentElement;var a=this.version;if(!a){a=b.getAttribute("version");if(!a){a=this.defaultVersion}}if(!this.parser||this.parser.VERSION!=a){var j=OpenLayers.Format.WMC["v"+a.replace(/\./g,"_")];if(!j){throw OpenLayers.i18n("wmc.version.not.supported",{v:a})}this.parser=new j(this.options)}var f=this.parser.read(g,d);var h;if(d.map){this.context=f;if(d.map instanceof OpenLayers.Map){h=this.mergeContextToMap(f,d.map)}else{h=this.contextToMap(f,d.map)}}else{h=f}return h};OpenLayers.Format.WMC.prototype.write=function(g,b){if(g instanceof OpenLayers.Map){g=this.mapToContext(g)}var a=(b&&b.version)||this.version||this.defaultVersion;if(!this.parser||this.parser.VERSION!=a){var f=OpenLayers.Format.WMC["v"+a.replace(/\./g,"_")];if(!f){throw OpenLayers.i18n("wmc.version.not.supported",{v:a})}this.parser=new f(this.options)}var d=this.parser.write(g,b);return d};OpenLayers.Format.WMC.v1_1_0.prototype.getLayerFromInfo=OpenLayers.Format.WMC.v1_0_0.prototype.getLayerFromInfo=OpenLayers.Format.WMC.v1.prototype.getLayerFromInfo=function(h){var b=h.options;if(this.layerOptions){OpenLayers.Util.applyDefaults(b,this.layerOptions)}b.legends=[];var f;for(var g=0,a=h.styles.length;g<a;g++){f=h.styles[g];b.legends.push(f)}var d=new h.classLayer(h.title,h.href,h.params,b);return d};OpenLayers.Format.WMC.v1_1_0.prototype.read_wmc_Server=OpenLayers.Format.WMC.v1_0_0.prototype.read_wmc_Server=OpenLayers.Format.WMC.v1.prototype.read_wmc_Server=function(b,a){var d=a.getAttribute("service");if(this.serviceMap&&this.servicesMap[d]){b.classLayer=this.servicesMap[d]}else{b.classLayer=OpenLayers.Layer.WMS}b.params.version=a.getAttribute("version");this.runChildNodes(b,a)};OpenLayers.Format.WMC.v1_1_0.prototype.read_wmc_dataURL=OpenLayers.Format.WMC.v1_0_0.prototype.read_wmc_dataURL=OpenLayers.Format.WMC.v1.prototype.read_wmc_dataURL=function(d,b){var f={};var a=b.getElementsByTagName("OnlineResource");if(a.length>0){this.read_wmc_OnlineResource(f,a[0])}d.options.dataURL=f.href};OpenLayers.Format.WMC.v1_1_0.prototype.read_ol_minZoomLevel=OpenLayers.Format.WMC.v1_0_0.prototype.read_ol_minZoomLevel=OpenLayers.Format.WMC.v1.prototype.read_ol_minZoomLevel=function(d,a){var b=this.getChildValue(a);b=parseInt(b);if(!isNaN(b)){d.minZoomLevel=b}};OpenLayers.Format.WMC.v1_1_0.prototype.read_ol_maxZoomLevel=OpenLayers.Format.WMC.v1_0_0.prototype.read_ol_maxZoomLevel=OpenLayers.Format.WMC.v1.prototype.read_ol_maxZoomLevel=function(d,a){var b=this.getChildValue(a);b=parseInt(b);if(!isNaN(b)){d.maxZoomLevel=b}};OpenLayers.Format.WMC.v1_1_0.prototype.read_ol_resolutions=OpenLayers.Format.WMC.v1_0_0.prototype.read_ol_resolutions=OpenLayers.Format.WMC.v1.prototype.read_ol_resolutions=function(g,f){var b=this.getChildValue(f).split(",");for(var d=0,a=b.length;d<a;d++){b[d]=parseFloat(b[d])}g.options.resolutions=b};OpenLayers.Format.WMC.v1_1_0.prototype.read_wmc_SRS=OpenLayers.Format.WMC.v1_0_0.prototype.read_wmc_SRS=OpenLayers.Format.WMC.v1.prototype.read_wmc_SRS=function(d,b){var a=this.getChildValue(b);if(a){d.options.projection=new OpenLayers.Projection(a)}};OpenLayers.Format.WMC.v1_1_0.prototype.read_ol_nativeResolutions=OpenLayers.Format.WMC.v1_0_0.prototype.read_ol_nativeResolutions=OpenLayers.Format.WMC.v1.prototype.read_ol_nativeResolutions=function(g,f){var b=this.getChildValue(f).split(",");for(var d=0,a=b.length;d<a;d++){b[d]=parseFloat(b[d])}g.options.nativeResolutions=b};OpenLayers.Format.WMC.v1_1_0.prototype.read_wmc_nativeProjection=OpenLayers.Format.WMC.v1_0_0.prototype.read_wmc_nativeProjection=OpenLayers.Format.WMC.v1.prototype.read_wmc_nativeProjection=function(d,b){var a=this.getChildValue(b);if(a){d.options.nativeProjection=new OpenLayers.Projection(a)}};OpenLayers.Format.WMC.v1_1_0.prototype.write_wmc_LayerList=OpenLayers.Format.WMC.v1_0_0.prototype.write_wmc_LayerList=OpenLayers.Format.WMC.v1.prototype.write_wmc_LayerList=function(f){var g=this.createElementDefaultNS("LayerList");var d;for(var b=0,a=f.layers.length;b<a;++b){d=f.layers[b];g.appendChild(this.write_wmc_Layer(d))}return g};OpenLayers.Format.WMC.v1_0_0.prototype.write_wmc_Layer=OpenLayers.Format.WMC.v1.prototype.write_wmc_Layer=function(a){var b=this.createElementDefaultNS("Layer",null,{queryable:a.queryable?"1":"0",hidden:a.visibility?"0":"1"});b.appendChild(this.write_wmc_Server(a));if(a.params&&a.params.LAYERS){b.appendChild(this.createElementDefaultNS("Name",a.params.LAYERS))}else{b.appendChild(this.createElementDefaultNS("Name",a.id))}b.appendChild(this.createElementDefaultNS("Title",a.name));if(a.projection){b.appendChild(this.write_wmc_SRS(a))}if(a.dataURL){b.appendChild(this.write_wmc_dataURL(a))}if(a.metadataURL){b.appendChild(this.write_wmc_MetadataURL(a))}if(a.params&&a.params.FORMAT){b.appendChild(this.write_wmc_FormatList(a))}if(a.params){b.appendChild(this.write_wmc_StyleList(a))}b.appendChild(this.write_wmc_LayerExtension(a));return b};OpenLayers.Format.WMC.v1_1_0.prototype.write_wmc_SRS=OpenLayers.Format.WMC.v1_0_0.prototype.write_wmc_SRS=OpenLayers.Format.WMC.v1.prototype.write_wmc_SRS=function(a){var b=this.createElementDefaultNS("SRS",""+a.projection);return b};OpenLayers.Format.WMC.v1_1_0.prototype.write_wmc_LayerExtension=OpenLayers.Format.WMC.v1_0_0.prototype.write_wmc_LayerExtension=OpenLayers.Format.WMC.v1.prototype.write_wmc_LayerExtension=function(j){var g=this.createElementDefaultNS("Extension");if(j.resolutions){var a=this.createElementNS(this.namespaces.ol,"ol:resolutions");a.appendChild(this.createTextNode(j.resolutions.join(",")));g.appendChild(a)}var b=j.maxExtent;var o=this.createElementNS(this.namespaces.ol,"ol:maxExtent");this.setAttributes(o,{minx:b.left.toPrecision(10),miny:b.bottom.toPrecision(10),maxx:b.right.toPrecision(10),maxy:b.top.toPrecision(10)});g.appendChild(o);if(j.nativeResolutions){var a=this.createElementNS(this.namespaces.ol,"ol:nativeResolutions");a.appendChild(this.createTextNode(j.nativeResolutions.join(",")));g.appendChild(a)}if(j.nativeProjection){var d=this.createElementNS(this.namespaces.ol,"ol:nativeProjection");d.appendChild(this.createTextNode(""+j.nativeProjection));g.appendChild(d)}if(j.params&&j.params.TRANSPARENT){var q=this.createElementNS(this.namespaces.ol,"ol:transparent");q.appendChild(this.createTextNode(j.params.TRANSPARENT));g.appendChild(q)}var m=["numZoomLevels","units","isBaseLayer","opacity","displayInLayerSwitcher","singleTile","minZoomLevel","maxZoomLevel",];var f;for(var h=0,l=m.length;h<l;++h){f=this.createOLPropertyNode(j,m[h]);if(f){g.appendChild(f)}}return g};OpenLayers.Format.WMC.v1_1_0.prototype.write_wmc_Server=OpenLayers.Format.WMC.v1_0_0.prototype.write_wmc_Server=OpenLayers.Format.WMC.v1.prototype.write_wmc_Server=function(a){var b=this.createElementDefaultNS("Server");var f={service:"OGC:WMS",version:a.params&&a.params.VERSION?a.params.VERSION:"0.0.0"};if(this.servicesMap){for(var d in this.servicesMap){if(this.servicesMap.hasOwnProperty(d)){if(this.servicesMap[d].prototype.CLASS_NAME==a.CLASS_NAME){f.service=d;f.version=a.params&&a.params.VERSION?a.params.VERSION:"0.0.0";break}}}}this.setAttributes(b,f);b.appendChild(this.write_wmc_OnlineResource(a.url));return b};OpenLayers.Format.WMC.v1_1_0.prototype.write_wmc_dataURL=OpenLayers.Format.WMC.v1_0_0.prototype.write_wmc_dataURL=OpenLayers.Format.WMC.v1.prototype.write_wmc_dataURL=function(a){var b=this.createElementDefaultNS("dataURL");b.appendChild(this.write_wmc_OnlineResource(a.dataURL));return b};OpenLayers.Layer.PointTrack.prototype.changeBaseLayer=OpenLayers.Layer.Vector.prototype.changeBaseLayer;OpenLayers.Layer.PointTrack.prototype.getCompatibleProjection=OpenLayers.Layer.Vector.prototype.getCompatibleProjection;OpenLayers.Protocol.WFS.v1_1_0.prototype.read=OpenLayers.Protocol.WFS.v1_0_0.prototype.read=OpenLayers.Protocol.WFS.v1.prototype.read=function(d){OpenLayers.Protocol.prototype.read.apply(this,arguments);d=OpenLayers.Util.extend({},d);OpenLayers.Util.applyDefaults(d,this.options||{});var j=d.featureType;if(!(d.featureType&&(d.featureType instanceof Array))){var j=[d.featureType]}var g=OpenLayers.Util.extend(d,{});for(var f=0,a=j.length;f<a;f++){g.featureType=j[f];var b=new OpenLayers.Protocol.Response({requestType:"read"});var h=OpenLayers.Format.XML.prototype.write.apply(this.format,[this.format.writeNode("wfs:GetFeature",g)]);b.priv=OpenLayers.Request.POST({url:g.url,callback:this.createCallback(this.handleRead,b,g),params:g.params,headers:g.headers,data:h})}return b};OpenLayers.Layer.PointTrack.prototype.labelOffset=OpenLayers.Layer.WFS.prototype.labelOffset=null;OpenLayers.Layer.WFS.prototype.moveTo=function(a,b,u){if(this.vectorMode){OpenLayers.Layer.Vector.prototype.moveTo.apply(this,arguments)}else{OpenLayers.Layer.Markers.prototype.moveTo.apply(this,arguments)}if(u){return}if(b){if(this.vectorMode){this.renderer.clear()}}if(this.options.minZoomLevel){OpenLayers.Console.warn(OpenLayers.i18n("minZoomLevelError"));if(this.map.getZoom()<this.options.minZoomLevel){return}}if(a==null){a=this.map.getExtent()}var r=(this.tile==null);var j=(!r&&!this.tile.bounds.containsBounds(a));if(b||r||(!u&&j)){var d=a.getCenterLonLat();var q=a.getWidth()*this.ratio;var l=a.getHeight()*this.ratio;var o=new OpenLayers.Bounds(d.lon-(q/2),d.lat-(l/2),d.lon+(q/2),d.lat+(l/2));var v=this.map.getSize();v.w=v.w*this.ratio;v.h=v.h*this.ratio;var m=new OpenLayers.LonLat(o.left,o.top);var p=this.map.getLayerPxFromLonLat(m);var f=this.getFullRequestString();var h=null;var g=this.params.filter||this.params.FILTER;if(g){h={FILTER:g}}else{h={BBOX:this.encodeBBOX?o.toBBOX():o.toArray()}}var w=o.clone();w.transform(this.map.getProjection(),this.getNativeProjection());if(!g){h.BBOX=this.encodeBBOX?w.toBBOX():w.toArray()}f+="&"+OpenLayers.Util.getParameterString(h);if(!this.tile){this.tile=new OpenLayers.Tile.WFS(this,p,o,f,v);this.addTileMonitoringHooks(this.tile);this.tile.draw()}else{if(this.vectorMode){this.destroyFeatures();this.renderer.clear()}else{this.clearMarkers()}this.removeTileMonitoringHooks(this.tile);this.tile.destroy();this.tile=null;this.tile=new OpenLayers.Tile.WFS(this,p,o,f,v);this.addTileMonitoringHooks(this.tile);this.tile.draw()}}};OpenLayers.Layer.WFS.prototype.addTileMonitoringHooks=function(a){a.onLoadStart=function(){if(this==this.layer.tile){if(this.layer.events.triggerEvent("loadstart")===false){return}}};a.events.register("loadstart",a,a.onLoadStart);a.onLoadEnd=function(){if(this==this.layer.tile){this.layer.events.triggerEvent("tileloaded");this.layer.events.triggerEvent("loadend")}};a.events.register("loadend",a,a.onLoadEnd);a.events.register("unload",a,a.onLoadEnd)};OpenLayers.Layer.WFS.prototype.getFullRequestString=function(d,b){var a=this.getNativeProjection();this.params.SRS=(a==null)?null:a.getCode();return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,arguments)};OpenLayers.Layer.WFS.prototype.commit=function(){if(!this.writer){var a={};if(this.map&&this.getNativeProjection()&&!this.getNativeProjection().equals(this.map.getProjection())){a.externalProjection=this.getNativeProjection();a.internalProjection=this.map.getProjection()}this.writer=new OpenLayers.Format.WFS(a,this)}var b=this.writer.write(this.features);OpenLayers.Request.POST({url:this.url,data:b,success:this.commitSuccess,failure:this.commitFailure,scope:this})};OpenLayers.Layer.PointTrack.prototype.addFeatures=OpenLayers.Layer.WFS.prototype.addFeatures=OpenLayers.Layer.Vector.prototype.addFeatures;OpenLayers.Layer.PointTrack.prototype.getDataExtent=OpenLayers.Layer.WFS.prototype.getDataExtent=OpenLayers.Layer.Vector.prototype.getDataExtent;OpenLayers.Layer.WFS.prototype.changeBaseLayer=function(o){if(OpenLayers.Layer.prototype.changeBaseLayer.apply(this,arguments)===false){return false}if(!this.isBaseLayer){var a=this.getCompatibleProjection(o.layer);if(a!=null){this.addOptions({projection:a.clone()})}var q=o.baseLayer?o.baseLayer.getNativeProjection():null;var h=this.map.getProjection();var j=this.getVisibility();if(j){this.setVisibility(false)}if(this.vectorMode){if(!this.formatOptions){this.formatOptions={}}if(!this.formatObject){this.formatObject={}}if(!this.options.formatOptions){this.options.formatOptions={}}this.options.formatOptions.internalProjection=h.clone();this.formatOptions.internalProjection=h.clone();this.formatObject.internalProjection=h.clone();for(var f=0,d=this.features.length;f<d;f++){var r=this.features[f];r.geometry.transform(q,h);if(r.popup&&r.popup.lonlat){r.popup.hide();r.popup.lonlat.transform(q,h)}}}else{for(var f=0,g=this.markers.length;f<g;f++){var b=this.markers[f];b.lonlat.transform(q,h)}}if(j){this.setVisibility(true)}}return true};OpenLayers.Layer.WFS.prototype.getCompatibleProjection=function(g){var f=OpenLayers.Layer.prototype.getCompatibleProjection.apply(this,arguments);if(f!=null){return f}g=g||this.map.baseLayer;var h=g.getNativeProjection();if(this.srs!==undefined&&this.srs instanceof Array){for(var d=0,a=this.srs.length;d<a;d++){var b=this.srs[d];if(!(b instanceof OpenLayers.Projection)){f=new OpenLayers.Projection(b)}else{f=b}if(f.isCompatibleWith(h)){return f}f=null}}return null};OpenLayers.Control.GetFeature.prototype.polygon=false;OpenLayers.Control.GetFeature.prototype.filterType=OpenLayers.Filter.Spatial.BBOX;OpenLayers.Control.GetFeature.prototype.EVENT_TYPES=["featureselected","featuresselected","featureunselected","clickout","beforefeatureselected","beforefeaturesselected","hoverfeature","outfeature"];OpenLayers.Control.GetFeature.prototype.initialize=function(a){this.EVENT_TYPES=OpenLayers.Control.GetFeature.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);a.handlerOptions=a.handlerOptions||{};OpenLayers.Control.prototype.initialize.apply(this,[a]);this.features={};this.handlers={};if(this.click){this.handlers.click=new OpenLayers.Handler.Click(this,{click:this.selectSingle},this.handlerOptions.click||{})}if(this.box){this.handlers.box=new OpenLayers.Handler.Box(this,{done:this.selectBox},OpenLayers.Util.extend(this.handlerOptions.box,{boxDivClassName:"olHandlerBoxSelectFeature"}))}if(this.polygon){this.handlers.polygon=new OpenLayers.Handler.Polygon(this,{done:this.selectPolygon},OpenLayers.Util.extend(this.handlerOptions.polygon,{}))}if(this.hover){this.handlers.hover=new OpenLayers.Handler.Hover(this,{move:this.cancelHover,pause:this.selectHover},OpenLayers.Util.extend(this.handlerOptions.hover,{delay:250}))}};OpenLayers.Control.GetFeature.prototype.destroy=function(){if(this.srs){this.srs.destroy();this.srs=null}OpenLayers.Control.prototype.destroy.apply(this,arguments)};OpenLayers.Control.GetFeature.prototype.selectSingle=function(a){var b=this.pixelToBounds(a.xy);this.setModifiers(a);this.request(b,{single:true})};OpenLayers.Control.GetFeature.prototype.selectBox=function(a){var d;if(a instanceof OpenLayers.Bounds){var f=this.map.getLonLatFromPixel(new OpenLayers.Pixel(a.left,a.bottom));var b=this.map.getLonLatFromPixel(new OpenLayers.Pixel(a.right,a.top));d=new OpenLayers.Bounds(f.lon,f.lat,b.lon,b.lat)}else{if(this.click){return}d=this.pixelToBounds(a)}if(this.srs){d=d.transform(this.map.getProjection(),this.srs)}this.setModifiers(this.handlers.box.dragHandler.evt);this.request(d)};OpenLayers.Control.GetFeature.prototype.selectPolygon=function(a){if(a instanceof OpenLayers.Geometry.Polygon){this.setModifiers(this.handlers.polygon.evt);this.request(a)}};OpenLayers.Control.GetFeature.prototype.cancelHover=function(){if(this.hoverResponse){OpenLayers.Element.removeClass(this.map.viewPortDiv,"olCursorWait");this.protocol.abort(this.hoverResponse);this.hoverResponse=null}};OpenLayers.Control.GetFeature.prototype.request=function(f,b){OpenLayers.Element.addClass(this.map.viewPortDiv,"olCursorWait");b=b||{};var d=new OpenLayers.Filter.Spatial({type:this.filterType,value:f,projection:(this.srs||this.map.getProjection()).getCode()});if(this.filterType===OpenLayers.Filter.Spatial.WITHIN){d=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.AND,filters:[new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.BBOX,value:(this.srs?f.clone().transform(this.map.getProjection(),this.srs):f).getBounds(),projection:(this.srs||this.map.getProjection()).getCode()}),d]})}var a=this.protocol.read({maxFeatures:b.single==true?this.maxFeatures:undefined,filter:d,callback:function(g){if(g.success()){if(g.features.length){if(b.single==true){var h=(f instanceof OpenLayers.Bounds?f:f.getBounds()).getCenterLonLat();this.selectBestFeature(g.features,h,b)}else{this.select(g.features)}}else{if(b.hover){this.hoverSelect()}else{this.events.triggerEvent("clickout");if(this.clickout){this.unselectAll()}}}}OpenLayers.Element.removeClass(this.map.viewPortDiv,"olCursorWait")},scope:this});if(b.hover==true){this.hoverResponse=a}};OpenLayers.Control.GetFeature.prototype.select=function(g){if(!this.modifiers.multiple&&!this.modifiers.toggle){this.unselectAll()}if(!(g instanceof Array)){g=[g]}var b=this.events.triggerEvent("beforefeaturesselected",{features:g});if(b!==false){var h=[];var f;for(var d=0,a=g.length;d<a;++d){f=g[d];if(this.features[f.fid||f.id]){if(this.modifiers.toggle){this.unselect(this.features[f.fid||f.id])}}else{b=this.events.triggerEvent("beforefeatureselected",{feature:f});if(b!==false){this.features[f.fid||f.id]=f;h.push(f);this.events.triggerEvent("featureselected",{feature:f})}}}this.events.triggerEvent("featuresselected",{features:h})}};OpenLayers.Control.GetFeature.prototype.setMap=function(b){for(var a in this.handlers){this.handlers[a].setMap(b)}OpenLayers.Control.prototype.setMap.apply(this,arguments);if(!this.srs&&this.protocol.srsName&&!this.map.getProjection().equals(this.protocol.srsName)){this.srs=new OpenLayers.Projection(this.protocol.srsName)}};var Geoportal={singleFile:true};(function(){var b=(typeof(Geoportal)=="object"&&Geoportal.singleFile);window.Geoportal={_scriptName:(!b)?"lib/Geoportal.js":"GeoportalExtended.js",_scriptLocation:null,_getScriptLocation:function(){if(Geoportal._scriptLocation){return Geoportal._scriptLocation}var q=Geoportal._scriptName;var p=q.length;var j=document.documentElement.getElementsByTagName("script");for(var m=0;m<j.length;m++){var r=j[m].getAttribute("src");if(r){var l=r.lastIndexOf(q);var o=r.lastIndexOf("?");if(o<0){o=r.length}if((l>-1)&&(l+p==o)){Geoportal._scriptLocation=r.slice(0,-p);break}}}return Geoportal._scriptLocation||""}};if(!b){var g=["../../openlayers/lib/OpenLayers/SingleFile.js","../../openlayers/lib/OpenLayers.js","../../openlayers/lib/OpenLayers/BaseTypes.js","../../openlayers/lib/OpenLayers/BaseTypes/Class.js","../../openlayers/lib/OpenLayers/Util.js","../../openlayers/lib/Rico/Corner.js","../../openlayers/lib/Gears/gears_init.js","../../openlayers/lib/OpenLayers/BaseTypes/Element.js","../../openlayers/lib/OpenLayers/BaseTypes/Size.js","../../openlayers/lib/OpenLayers/Console.js","../../openlayers/lib/OpenLayers/Icon.js","../../openlayers/lib/OpenLayers/Popup.js","../../openlayers/lib/OpenLayers/Protocol.js","../../openlayers/lib/OpenLayers/Renderer.js","../../openlayers/lib/OpenLayers/Strategy.js","../../openlayers/lib/Rico/Color.js","../../openlayers/lib/OpenLayers/BaseTypes/Bounds.js","../../openlayers/lib/OpenLayers/BaseTypes/LonLat.js","../../openlayers/lib/OpenLayers/BaseTypes/Pixel.js","../../openlayers/lib/OpenLayers/Control.js","../../openlayers/lib/OpenLayers/Lang.js","../../openlayers/lib/OpenLayers/Popup/Anchored.js","../../openlayers/lib/OpenLayers/Protocol/SQL.js","../../openlayers/lib/OpenLayers/Protocol/WFS.js","../../openlayers/lib/OpenLayers/Renderer/Canvas.js","../../openlayers/lib/OpenLayers/Renderer/Elements.js","../../openlayers/lib/OpenLayers/Strategy/Cluster.js","../../openlayers/lib/OpenLayers/Strategy/Fixed.js","../../openlayers/lib/OpenLayers/Strategy/Paging.js","../../openlayers/lib/OpenLayers/Strategy/Save.js","../../openlayers/lib/OpenLayers/Tween.js","../../openlayers/lib/OpenLayers/Control/ArgParser.js","../../openlayers/lib/OpenLayers/Control/Attribution.js","../../openlayers/lib/OpenLayers/Control/Button.js","../../openlayers/lib/OpenLayers/Control/LayerSwitcher.js","../../openlayers/lib/OpenLayers/Control/MouseDefaults.js","../../openlayers/lib/OpenLayers/Control/MousePosition.js","../../openlayers/lib/OpenLayers/Control/Pan.js","../../openlayers/lib/OpenLayers/Control/PanZoom.js","../../openlayers/lib/OpenLayers/Control/Panel.js","../../openlayers/lib/OpenLayers/Control/Scale.js","../../openlayers/lib/OpenLayers/Control/ScaleLine.js","../../openlayers/lib/OpenLayers/Control/ZoomIn.js","../../openlayers/lib/OpenLayers/Control/ZoomOut.js","../../openlayers/lib/OpenLayers/Control/ZoomToMaxExtent.js","../../openlayers/lib/OpenLayers/Events.js","../../openlayers/lib/OpenLayers/Format.js","../../openlayers/lib/OpenLayers/Lang/en.js","../../openlayers/lib/OpenLayers/Lang/es.js","../../openlayers/lib/OpenLayers/Lang/fr.js","../../openlayers/lib/OpenLayers/Lang/it.js","../../openlayers/lib/OpenLayers/Popup/AnchoredBubble.js","../../openlayers/lib/OpenLayers/Popup/Framed.js","../../openlayers/lib/OpenLayers/Projection.js","../../openlayers/lib/OpenLayers/Protocol/WFS/v1.js","../../openlayers/lib/OpenLayers/Renderer/SVG.js","../../openlayers/lib/OpenLayers/Renderer/VML.js","../../openlayers/lib/OpenLayers/Tile.js","../../openlayers/lib/OpenLayers/Control/MouseToolbar.js","../../openlayers/lib/OpenLayers/Control/NavigationHistory.js","../../openlayers/lib/OpenLayers/Control/PanPanel.js","../../openlayers/lib/OpenLayers/Control/PanZoomBar.js","../../openlayers/lib/OpenLayers/Control/Permalink.js","../../openlayers/lib/OpenLayers/Control/ZoomPanel.js","../../openlayers/lib/OpenLayers/Format/JSON.js","../../openlayers/lib/OpenLayers/Format/WFST.js","../../openlayers/lib/OpenLayers/Format/WMSCapabilities.js","../../openlayers/lib/OpenLayers/Format/XML.js","../../openlayers/lib/OpenLayers/Handler.js","../../openlayers/lib/OpenLayers/Lang/de.js","../../openlayers/lib/OpenLayers/Map.js","../../openlayers/lib/OpenLayers/Marker.js","../../openlayers/lib/OpenLayers/Popup/FramedCloud.js","../../openlayers/lib/OpenLayers/Request.js","../../openlayers/lib/OpenLayers/Tile/Image.js","../../openlayers/lib/OpenLayers/Control/OverviewMap.js","../../openlayers/lib/OpenLayers/Feature.js","../../openlayers/lib/OpenLayers/Format/WFSCapabilities.js","../../openlayers/lib/OpenLayers/Format/WFSDescribeFeatureType.js","../../openlayers/lib/OpenLayers/Format/WFST/v1.js","../../openlayers/lib/OpenLayers/Format/WMC.js","../../openlayers/lib/OpenLayers/Format/WMSCapabilities/v1_1.js","../../openlayers/lib/OpenLayers/Format/WMSDescribeLayer.js","../../openlayers/lib/OpenLayers/Format/WMSGetFeatureInfo.js","../../openlayers/lib/OpenLayers/Handler/Click.js","../../openlayers/lib/OpenLayers/Handler/Drag.js","../../openlayers/lib/OpenLayers/Handler/Feature.js","../../openlayers/lib/OpenLayers/Handler/Hover.js","../../openlayers/lib/OpenLayers/Handler/Keyboard.js","../../openlayers/lib/OpenLayers/Handler/MouseWheel.js","../../openlayers/lib/OpenLayers/Layer.js","../../openlayers/lib/OpenLayers/Marker/Box.js","../../openlayers/lib/OpenLayers/Request/XMLHttpRequest.js","../../openlayers/lib/OpenLayers/Ajax.js","../../openlayers/lib/OpenLayers/Control/DragFeature.js","../../openlayers/lib/OpenLayers/Control/DragPan.js","../../openlayers/lib/OpenLayers/Control/KeyboardDefaults.js","../../openlayers/lib/OpenLayers/Control/WMSGetFeatureInfo.js","../../openlayers/lib/OpenLayers/Feature/Vector.js","../../openlayers/lib/OpenLayers/Feature/WFS.js","../../openlayers/lib/OpenLayers/Format/WFSCapabilities/v1.js","../../openlayers/lib/OpenLayers/Format/WMC/v1.js","../../openlayers/lib/OpenLayers/Format/WMSCapabilities/v1_1_0.js","../../openlayers/lib/OpenLayers/Format/WMSCapabilities/v1_1_1.js","../../openlayers/lib/OpenLayers/Format/WMSDescribeLayer/v1_1.js","../../openlayers/lib/OpenLayers/Handler/Box.js","../../openlayers/lib/OpenLayers/Handler/RegularPolygon.js","../../openlayers/lib/OpenLayers/Layer/EventPane.js","../../openlayers/lib/OpenLayers/Layer/FixedZoomLevels.js","../../openlayers/lib/OpenLayers/Layer/HTTPRequest.js","../../openlayers/lib/OpenLayers/Layer/Image.js","../../openlayers/lib/OpenLayers/Layer/Markers.js","../../openlayers/lib/OpenLayers/Layer/SphericalMercator.js","../../openlayers/lib/OpenLayers/Tile/WFS.js","../../openlayers/lib/OpenLayers/Control/DrawFeature.js","../../openlayers/lib/OpenLayers/Control/Measure.js","../../openlayers/lib/OpenLayers/Control/ZoomBox.js","../../openlayers/lib/OpenLayers/Format/WFSCapabilities/v1_0_0.js","../../openlayers/lib/OpenLayers/Format/WFSCapabilities/v1_1_0.js","../../openlayers/lib/OpenLayers/Format/WKT.js","../../openlayers/lib/OpenLayers/Format/WMC/v1_0_0.js","../../openlayers/lib/OpenLayers/Format/WMC/v1_1_0.js","../../openlayers/lib/OpenLayers/Layer/Boxes.js","../../openlayers/lib/OpenLayers/Layer/GeoRSS.js","../../openlayers/lib/OpenLayers/Layer/Google.js","../../openlayers/lib/OpenLayers/Layer/Grid.js","../../openlayers/lib/OpenLayers/Layer/MultiMap.js","../../openlayers/lib/OpenLayers/Layer/Text.js","../../openlayers/lib/OpenLayers/Layer/VirtualEarth.js","../../openlayers/lib/OpenLayers/Layer/Yahoo.js","../../openlayers/lib/OpenLayers/Protocol/HTTP.js","../../openlayers/lib/OpenLayers/Style.js","../../openlayers/lib/OpenLayers/Control/Navigation.js","../../openlayers/lib/OpenLayers/Filter.js","../../openlayers/lib/OpenLayers/Geometry.js","../../openlayers/lib/OpenLayers/Layer/ArcGIS93Rest.js","../../openlayers/lib/OpenLayers/Layer/KaMap.js","../../openlayers/lib/OpenLayers/Layer/MapGuide.js","../../openlayers/lib/OpenLayers/Layer/MapServer.js","../../openlayers/lib/OpenLayers/Layer/TMS.js","../../openlayers/lib/OpenLayers/Layer/TileCache.js","../../openlayers/lib/OpenLayers/Layer/WMS.js","../../openlayers/lib/OpenLayers/Layer/WorldWind.js","../../openlayers/lib/OpenLayers/Layer/XYZ.js","../../openlayers/lib/OpenLayers/Protocol/SQL/Gears.js","../../openlayers/lib/OpenLayers/Rule.js","../../openlayers/lib/OpenLayers/StyleMap.js","../../openlayers/lib/OpenLayers/Control/NavToolbar.js","../../openlayers/lib/OpenLayers/Filter/Comparison.js","../../openlayers/lib/OpenLayers/Filter/FeatureId.js","../../openlayers/lib/OpenLayers/Filter/Logical.js","../../openlayers/lib/OpenLayers/Filter/Spatial.js","../../openlayers/lib/OpenLayers/Geometry/Collection.js","../../openlayers/lib/OpenLayers/Geometry/Point.js","../../openlayers/lib/OpenLayers/Geometry/Rectangle.js","../../openlayers/lib/OpenLayers/Geometry/Surface.js","../../openlayers/lib/OpenLayers/Layer/KaMapCache.js","../../openlayers/lib/OpenLayers/Layer/MapServer/Untiled.js","../../openlayers/lib/OpenLayers/Layer/Vector.js","../../openlayers/lib/OpenLayers/Layer/WMS/Untiled.js","../../openlayers/lib/OpenLayers/Control/GetFeature.js","../../openlayers/lib/OpenLayers/Control/Snapping.js","../../openlayers/lib/OpenLayers/Format/Filter.js","../../openlayers/lib/OpenLayers/Format/SLD.js","../../openlayers/lib/OpenLayers/Format/Text.js","../../openlayers/lib/OpenLayers/Geometry/MultiPoint.js","../../openlayers/lib/OpenLayers/Handler/Point.js","../../openlayers/lib/OpenLayers/Layer/GML.js","../../openlayers/lib/OpenLayers/Layer/PointTrack.js","../../openlayers/lib/OpenLayers/Layer/Vector/RootContainer.js","../../openlayers/lib/OpenLayers/Layer/WFS.js","../../openlayers/lib/OpenLayers/Strategy/BBOX.js","../../openlayers/lib/OpenLayers/Control/SelectFeature.js","../../openlayers/lib/OpenLayers/Format/Filter/v1.js","../../openlayers/lib/OpenLayers/Geometry/Curve.js","../../openlayers/lib/OpenLayers/Control/ModifyFeature.js","../../openlayers/lib/OpenLayers/Geometry/LineString.js","../../openlayers/lib/OpenLayers/Format/GPX.js","../../openlayers/lib/OpenLayers/Geometry/LinearRing.js","../../openlayers/lib/OpenLayers/Geometry/MultiLineString.js","../../openlayers/lib/OpenLayers/Handler/Path.js","../../openlayers/lib/OpenLayers/Control/Split.js","../../openlayers/lib/OpenLayers/Geometry/Polygon.js","../../openlayers/lib/OpenLayers/Format/GeoRSS.js","../../openlayers/lib/OpenLayers/Format/KML.js","../../openlayers/lib/OpenLayers/Format/OSM.js","../../openlayers/lib/OpenLayers/Geometry/MultiPolygon.js","../../openlayers/lib/OpenLayers/Handler/Polygon.js","../../openlayers/lib/OpenLayers/Control/EditingToolbar.js","../../openlayers/lib/OpenLayers/Format/ArcXML.js","../../openlayers/lib/OpenLayers/Format/GML.js","../../openlayers/lib/OpenLayers/Format/GeoJSON.js","../../openlayers/lib/OpenLayers/Format/ArcXML/Features.js","../../openlayers/lib/OpenLayers/Format/GML/Base.js","../../openlayers/lib/OpenLayers/Format/WFS.js","../../openlayers/lib/OpenLayers/Layer/ArcIMS.js","../../openlayers/lib/OpenLayers/Format/GML/v2.js","../../openlayers/lib/OpenLayers/Format/GML/v3.js","../../openlayers/lib/OpenLayers/Format/Filter/v1_0_0.js","../../openlayers/lib/OpenLayers/Format/Filter/v1_1_0.js","../../openlayers/lib/OpenLayers/Format/SLD/v1.js","../../openlayers/lib/OpenLayers/Format/WFST/v1_0_0.js","../../openlayers/lib/OpenLayers/Format/WFST/v1_1_0.js","../../openlayers/lib/OpenLayers/Format/SLD/v1_0_0.js","../../openlayers/lib/OpenLayers/Protocol/WFS/v1_0_0.js","../../openlayers/lib/OpenLayers/Protocol/WFS/v1_1_0.js","../../proj4js/lib/proj4js.js","../../proj4js/lib/OverloadedProj4js.js","OpenLayers/OverloadedOpenLayersMinimum.js","OpenLayers/OverloadedOpenLayersStandard.js","OpenLayers/OverloadedOpenLayersExtended.js","Geoportal/Lang.js","Geoportal/Lang/en.js","Geoportal/Lang/fr.js","Geoportal/Lang/de.js","Geoportal/Lang/es.js","Geoportal/Lang/it.js","Geoportal/Control.js","Geoportal/Format.js","Geoportal/Handler.js","Geoportal/Layer.js","Geoportal/Layer/Aggregate.js","Geoportal/OLS.js","Geoportal/Popup.js","Geoportal/Tile.js","Geoportal/Util.js","Geoportal/Control/Copyright.js","Geoportal/Control/DeleteFeature.js","Geoportal/Control/Floating.js","Geoportal/Control/GraphicScale.js","Geoportal/Control/Loading.js","Geoportal/Control/Logo.js","Geoportal/Control/Panel.js","Geoportal/Control/PermanentLogo.js","Geoportal/Control/Projections.js","Geoportal/Control/RemoveLayer.js","Geoportal/Control/SliderBase.js","Geoportal/Control/TermsOfService.js","Geoportal/Control/ToolBox.js","Geoportal/Control/ZoomToLayerMaxExtent.js","Geoportal/Format/GPX.js","Geoportal/Format/GPX/v1.js","Geoportal/Format/Geoconcept.js","Geoportal/Format/XLS.js","Geoportal/GeoRMHandler.js","Geoportal/Handler/Path.js","Geoportal/Layer/Grid.js","Geoportal/Layer/WFS.js","Geoportal/Layer/WMS.js","Geoportal/Layer/WMSC.js","Geoportal/OLS/AbstractBody.js","Geoportal/OLS/AbstractHeader.js","Geoportal/OLS/AbstractLocation.js","Geoportal/OLS/AbstractRequestParameters.js","Geoportal/OLS/AbstractResponseParameters.js","Geoportal/OLS/AbstractStreetLocator.js","Geoportal/OLS/Error.js","Geoportal/OLS/GeocodeMatchCode.js","Geoportal/OLS/LUS.js","Geoportal/OLS/Place.js","Geoportal/OLS/PostalCode.js","Geoportal/OLS/Street.js","Geoportal/OLS/UOM.js","Geoportal/OLS/XLS.js","Geoportal/Popup/Anchored.js","Geoportal/Tile/Image.js","Geoportal/Control/EditingToolbar.js","Geoportal/Control/Form.js","Geoportal/Control/LayerOpacitySlider.js","Geoportal/Control/NavToolbar.js","Geoportal/Control/PanelToggle.js","Geoportal/Control/ZoomSlider.js","Geoportal/Format/GPX/v1_0.js","Geoportal/Handler/LengthRestrictedPath.js","Geoportal/Layer/GXT.js","Geoportal/OLS/AbstractAddress.js","Geoportal/OLS/AbstractPosition.js","Geoportal/OLS/Building.js","Geoportal/OLS/ErrorList.js","Geoportal/OLS/LUS/ReverseGeocodePreference.js","Geoportal/OLS/StreetAddress.js","Geoportal/OLS/UOM/AbstractMeasure.js","Geoportal/OLS/UOM/TimeStamp.js","Geoportal/Control/AddImageLayer.js","Geoportal/Control/AddVectorLayer.js","Geoportal/Control/LayerOpacity.js","Geoportal/Control/Measure.js","Geoportal/Control/MousePosition.js","Geoportal/Control/ZoomBar.js","Geoportal/OLS/Address.js","Geoportal/OLS/Request.js","Geoportal/OLS/RequestHeader.js","Geoportal/OLS/Response.js","Geoportal/OLS/ResponseHeader.js","Geoportal/OLS/UOM/Angle.js","Geoportal/OLS/UOM/Distance.js","Geoportal/OLS/UOM/Speed.js","Geoportal/OLS/UOM/Time.js","Geoportal/Control/BasicLayerToolbar.js","Geoportal/Control/Information.js","Geoportal/Control/LayerToolbar.js","Geoportal/Control/Measure/Azimuth.js","Geoportal/Format/XLS/v1_1.js","Geoportal/OLS/HorizontalAcc.js","Geoportal/OLS/LUS/GeocodeRequest.js","Geoportal/OLS/LUS/GeocodedAddress.js","Geoportal/OLS/LUS/SearchCentreDistance.js","Geoportal/OLS/UOM/Distance/Altitude.js","Geoportal/OLS/VerticalAcc.js","Geoportal/Control/LayerSwitcher.js","Geoportal/Control/MeasureToolbar.js","Geoportal/Format/XLS/v1_0.js","Geoportal/OLS/LUS/GeocodeResponseList.js","Geoportal/OLS/LUS/ReverseGeocodedLocation.js","Geoportal/OLS/QualityOfPosition.js","Geoportal/OLS/LUS/GeocodeResponse.js","Geoportal/OLS/LUS/ReverseGeocodeResponse.js","Geoportal/OLS/Position.js","Geoportal/OLS/LUS/ReverseGeocodeRequest.js","Geoportal/Format/XLS/v1_1/LocationUtilityService.js","Geoportal/Format/XLS/v1_0/LocationUtilityService.js","Geoportal/Layer/OpenLS.js","Geoportal/Layer/OpenLS/Core.js","Geoportal/Layer/OpenLS/Core/LocationUtilityService.js","Geoportal/Control/LocationUtilityService.js","Geoportal/Control/LocationUtilityService/GeoNames.js","Geoportal/Control/LocationUtilityService/Geocode.js","Geoportal/Control/LocationUtilityService/ReverseGeocode.js","Geoportal/Control/SearchToolbar.js","Geoportal/Catalogue.js","Geoportal/Map.js","Geoportal/Viewer.js","Geoportal/Viewer/Default.js","Geoportal/Viewer/Standard.js"];var h=new Array(g.length);var f=Geoportal._getScriptLocation()+"lib/";for(var d=0,a=g.length;d<a;d++){h[d]="<script type='text/javascript' src='"+f+g[d]+"' charset='UTF-8'><\/script>"}document.write(h.join(""))}})();Geoportal.VERSION_NUMBER="1.0 ; publicationDate=2011-06-14";Geoportal.Lang={add:function(b){for(var a in b){if(b.hasOwnProperty(a)){for(var d in b[a]){if(b[a].hasOwnProperty(d)){var f=Geoportal.Lang[d];if(!f){f={}}f[a]=b[a][d]}}}}},translate:function(b,a){var f=Geoportal.Lang[OpenLayers.Lang.getCode()];var d=f[b];if(!d){d=OpenLayers.Lang.translate(b)}if(a){d=OpenLayers.String.format(d,a)}return d}};Geoportal.i18n=Geoportal.Lang.translate;OpenLayers.i18n=Geoportal.Lang.translate;Geoportal.Lang.en={ATF:"French Southern Territories",FXX:"France mainland",GLP:"Guadeloupe",GUF:"French Guiana",MTQ:"Martinique",MYT:"Mayotte",NCL:"New Caledonia",PYF:"French Polynesia",REU:"Réunion",SPM:"Saint Pierre and Miquelon",WLF:"Wallis and Futuna",ANF:"French Antilles",ASP:"Saint Paul and Amsterdam",CRZ:"Crozet",EUE:"Europe",KER:"Kerguelen",SBA:"Saint Barthélémy",SMA:"Saint Martin",WLD:"The world","GEOGRAPHICALGRIDSYSTEMS.MAPS":"IGN Maps","GEOGRAPHICALGRIDSYSTEMS.MAPS.description":"Maps are extracted from IGN's SCAN databases : World, Europe, SCAN 1 000®, SCAN 500®, SCAN Régional®, SCAN 200®, SCAN Départemental®, SCAN 100®, SCAN 50®, SCAN 25®.","ORTHOIMAGERY.ORTHOPHOTOS":"Orthoimagery","ORTHOIMAGERY.ORTHOPHOTOS.description":"Aerial photographies combine the geometrical precision of maps with richness of photographies, between 15 and 50 cm resolution, and satelite images, between 10 and 20 m resolution.","ELEVATION.SLOPES":"Slops - Elevation","ELEVATION.SLOPES.description":"Digital terrain models were derived from BD ALTI ® data that describes the  French territory with contour lines. The equidistance of the contour lines can range from 5 to 40m. Original data has been acquired from IGN maps at 1: 25 000, at 1: 50 000 and from aerial photographs at 1: 20 000, 1: 30 000 and 1: 60 000 by stereophotogrammetry.","ELEVATION.LEVEL0":"Sea level 0 - Elevation","ELEVATION.LEVEL0.description":"The sea 0 level is part of LITTO3D®, a joint production from SHOM and IGN.","CADASTRALPARCELS.PARCELS":"Cadastral parcels","CADASTRALPARCELS.PARCELS.description":"The digital cadastral information is georeferenced and seamless throughout the French territory. It was carried out from the assembly of the digital cadastral scanned sheets.","HYDROGRAPHY.HYDROGRAPHY":"Hydrography","HYDROGRAPHY.HYDROGRAPHY.description":"Hydrography network is derived from the assembly of datasets from BD TOPO®, BD CARTHAGE®, EuroRegionalMap and EuroGlobalMap databases.","TRANSPORTNETWORKS.ROADS":"Road transport networks - Transport networks","TRANSPORTNETWORKS.ROADS.description":"The roads network is derived from the assembly of datasets from BD TOPO®, BD CARTO®, EuroRegionalMap and EuroGlobalMap databases.","TRANSPORTNETWORKS.RAILWAYS":"Rail transport networks - Transport networks","TRANSPORTNETWORKS.RAILWAYS.description":"The railways network is derived from the assembly of datasets from BD TOPO®, BD CARTO®, EuroRegionalMap and EuroGlobalMap databases.","TRANSPORTNETWORKS.RUNWAYS":"Air transport networks - Transport networks","TRANSPORTNETWORKS.RUNWAYS.description":"Airport runways are derived from the assembly of datasets from BD TOPO® and BD CARTO®.","BUILDINGS.BUILDINGS":"Buildings","BUILDINGS.BUILDINGS.description":"Buildings and urban areas are derived from the assembly of datasets from BD TOPO®, BD CARTO®, EuroRegionalMap and EuroGlobalMap databases.","UTILITYANDGOVERNMENTALSERVICES.ALL":"Utility and governmental services","UTILITYANDGOVERNMENTALSERVICES.ALL.description":"Energy networks are derived from the assembly of datasets from BD TOPO® and BD CARTO®.","ADMINISTRATIVEUNITS.BOUNDARIES":"Administrative units","ADMINISTRATIVEUNITS.BOUNDARIES.description":"French administrative units are derived from the assembly of datasets from BD TOPO®, BD CARTO®, EuroRegionalMap and EuroBoundaryMap databases.","LANDCOVER.CORINELANDCOVER":"Land cover","LANDCOVER.CORINELANDCOVER.description":"CORINE 2006","GEOGRAPHICALGRIDSYSTEMS.COASTALMAPS":"Coastal maps","GEOGRAPHICALGRIDSYSTEMS.COASTALMAPS.description":"Coastal maps","GEOGRAPHICALGRIDSYSTEMS.1900TYPEMAPS":"Type 1900 topographical maps","GEOGRAPHICALGRIDSYSTEMS.1900TYPEMAPS.description":"Maps at 1: 50 000 (after the first edition of the IGN Map Library)","GEOGRAPHICALGRIDSYSTEMS.CASSINI":"Cassini's maps","GEOGRAPHICALGRIDSYSTEMS.CASSINI.description":"Cassini's maps","ORTHOIMAGERY.ORTHOPHOTOS.COAST2000":"Coastal ortho-imagery (2000)","ORTHOIMAGERY.ORTHOPHOTOS.COAST2000.description":"Ortho-photography of the coast of the North Sea, English Channel and Atlantic.","LANDUSE.AGRICULTURE2007":"Agricultural parcels (2007)","LANDUSE.AGRICULTURE2007.description":"This layer displays the islets anonymized Registry Parcel Graph (RPG) and their main crop group reported in 2007 by farmers to benefit from CAP subsidies.","LANDUSE.AGRICULTURE2008":"Agricultural parcels (2008)","LANDUSE.AGRICULTURE2008.description":"This layer displays the islets anonymized Registry Parcel Graph (RPG) and their main crop group reported in 2008 by farmers to benefit from CAP subsidies.","LANDUSE.AGRICULTURE2009":"Agricultural parcels (2009)","LANDUSE.AGRICULTURE2009.description":"This layer displays the islets anonymized Registry Parcel Graph (RPG) and their main crop group reported in 2009 by farmers to benefit from CAP subsidies.","ORTHOIMAGERY.ORTHOPHOTOS.GENEVE":"Geneva State","ORTHOIMAGERY.ORTHOPHOTOS.GENEVE.description":"Ortho-photography, 10 cm resolution (2010).","ORTHOIMAGERY.ORTHOPHOTOS2000-2005":"Orthoimagery (2000-2005)","ORTHOIMAGERY.ORTHOPHOTOS2000-2005.description":"1st national coverage (2000-2005) of ortho-imagery with 50 cm resolution.","GEOGRAPHICALGRIDSYSTEMS.FRANCERASTER":"FranceRaster®","GEOGRAPHICALGRIDSYSTEMS.FRANCERASTER.description":"FranceRaster® is a serie of georeferenced images covering France mainland and overseas territories. It is produced with the vector database of the IGN best suited to each scale with a uniform symbology. According to the scales, FranceRaster ®, allows viewing the themes roads and rail, frame, hydrography, vegetation, addresses, direction of travel, names ...","NATURALRISKZONES.1910FLOODEDWATERSHEDS":"Seine (PHEC)","NATURALRISKZONES.1910FLOODEDWATERSHEDS.description":"This map layer represents the known highest water (PHEC) on the river basin of the Seine, ie geographical areas flooded by the biggest known flood and documented on each river.","NATURALRISKZONES.1910FLOODEDCELLARS":"Flooded cellars (1910)","NATURALRISKZONES.1910FLOODEDCELLARS.description":"Map of flooded cellars during the Seine's flood of 1910. This map is based on testimonies.","GEOGRAPHICALGRIDSYSTEMS.ETATMAJOR40":"État-Major Maps (1:40 000)","GEOGRAPHICALGRIDSYSTEMS.ETATMAJOR40.description":"This layer is formed by the assembly of the 978 original drawings of the map of Etat Major established in the nineteenth century. These hand-written and colored surveys, at the 1: 40 000, were established between 1825 and 1866.","LANDCOVER.FORESTINVENTORY.V1":"Forest inventory (v1)","LANDCOVER.FORESTINVENTORY.V1.description":"Forest inventory (1987-2004)","LANDCOVER.FORESTINVENTORY.V2":"Forest inventory (v2)","LANDCOVER.FORESTINVENTORY.V2.description":"Forest inventory (2005+)","GEOGRAPHICALGRIDSYSTEMS.ADMINISTRATIVEUNITS":"Map of administrative divisions","GEOGRAPHICALGRIDSYSTEMS.ADMINISTRATIVEUNITS.description":"Map of administrative divisions","GEOGRAPHICALNAMES.NAMES":"Geographical names","GEOGRAPHICALNAMES.NAMES.description":"Geographical names","div.not.found":"${id} not found in the document : check you have '${id}' set.","proxy.not.set":"Missing proxy setting : may cause problems when getting contract configuration.","cookies.not.enabled":"Cookies are disabled. Please, enable them.","geoRM.getConfig":"Impossible to get information for key '${key}' - check your connection","geoRM.getToken":"Impossible to get the token for key '${key}' - check your connection","geoRM.failed":"Failed to get a valid token for key '${key}'","geoRM.forbidden":"API key is missing or ${layer} not supported by the application API's contract.","GPX.version":"Unhandled GPX version ${gpxVersion}","XLS.version":"Unhandled XLS version ${xlsVersion} for OpenLS Core service ${coreService}","Not.conformal.XLS":"Location Service XML is missing : ${part}","olControlMeasurePath.title":"Distance measurement","olControlMeasurePolygon.title":"Surface measurement","waiting.measurement":"Waiting for digitizing ...","length.measurement":"Length","area.measurement":"Area","gpControlLayerSwitcher.label":"Layers","gpLayer.metadataURL":"More information about this layer ...","gpLayer.dataURL":"Access to download page","gpControlPanelToggle.closed":"Show toolbar","gpControlPanelToggle.opened":"Hide toolbar","gpControlRemoveLayer.title":"Remove layer","gpControlLayerOpacity.title":"Opacity slider","gpControlZoomToLayerMaxExtent.title":"Zoom to layer's extent","gpControlMousePosition.longitude":"Longitude","gpControlMousePosition.latitude":"Latitude","gpControlMousePosition.easting":"Easting","gpControlMousePosition.northing":"Northing","gpControlMousePosition.north":"N","gpControlMousePosition.south":"S","gpControlMousePosition.east":"E","gpControlMousePosition.west":"W","gpControlMousePosition.sexa":"sexagecimal degrees","gpControlMousePosition.deg":"decimal degrees","gpControlMousePosition.gon":"decimal grades","gpControlMousePosition.rad":"decimal radians","gpControlMousePosition.km":"kilometers","gpControlMousePosition.m":"meters","gpControlMousePosition.cm":"centimeters","gpControlMousePosition.utmZone":"Zone","gpControlToolBox.label":"Toolbox","gpControlZoomBar.world":"World","gpControlZoomBar.state":"State","gpControlZoomBar.country":"Country","gpControlZoomBar.town":"Town","gpControlZoomBar.street":"Street","gpControlZoomBar.house":"House","gpControlEditingToolbar.drawpoint":"Draw point","gpControlEditingToolbar.drawline":"Draw line","gpControlEditingToolbar.drawpolygon":"Draw polygon","gpControlEditingToolbar.dragfeature":"Drag feature","gpControlEditingToolbar.modifyfeature":"Modify feature","gpControlEditingToolbar.deletefeature":"Delete feature","gpControlEditingToolbar.selectfeature":"Select feature","gpControlEditingToolbar.navigation":"Navigate","gpControlAddImageLayer.title":"Add image layer ...","gpControlAddImageLayer.layerUrl":"URL : ","gpControlAddImageLayer.layerUrl.help":"base address of the service","gpControlAddImageLayer.layerType":"Type : ","gpControlAddImageLayer.layerType.help":"pick up a value in the select","gpControlAddImageLayer.layerType.WMS":"Web Map Service","gpControlAddImageLayer.layerType.WMSC":"OSGeO WMS-C","gpControlAddImageLayer.button.add":"Add Layer","gpControlAddImageLayer.button.cancel":"Cancel","wms.caps.no.compatible.srs":"No compatible layer found","ogc.caps.unknown.service":"${serviceType} is not a ${expectedType}","gpControlAddVectorLayer.title":"Add vector layer ...","gpControlAddVectorLayer.layerName.help":"ex : my layer","gpControlAddVectorLayer.layerType":"Type : ","gpControlAddVectorLayer.layerType.help":"pick up a value in the select","gpControlAddVectorLayer.layerType.Point":"point","gpControlAddVectorLayer.layerType.LineString":"linestring","gpControlAddVectorLayer.layerType.Polygon":"polygon","gpControlAddVectorLayer.layerType.KML":"KML resource","gpControlAddVectorLayer.layerType.GPX":"GPX resource","gpControlAddVectorLayer.layerType.OSM":"OSM resource","gpControlAddVectorLayer.layerType.GeoRSS":"GeoRSS resource","gpControlAddVectorLayer.layerType.WFS":"WFS resource","gpControlAddVectorLayer.layerUrl":"URL : ","gpControlAddVectorLayer.layerUrl.help":"either local or remote","gpControlAddVectorLayer.layerFreeHand":"freehand ? ","gpControlAddVectorLayer.layerFreeHand.help":"allow free hand drawing","gpControlAddVectorLayer.button.add":"Add Layer","gpControlAddVectorLayer.button.cancel":"Cancel","gpControlAddVectorLayer.layerName":"Name : ","wfs.caps.no.feature.found":"No features found","wfs.caps.unsupported.version":"Unsupported WFS version ${version}","gpControlLocationUtilityService.geonames.title":"Search a location","gpControlLocationUtilityService.geocode.title":"Search an address","gpControlLocationUtilityService.reverse.geocode.title":"Search addresses around a location","gpControlLocationUtilityServiceGeoNames.title":"Search a location :","gpControlLocationUtilityServiceGeoNames.name":"Location : ","gpControlLocationUtilityServiceGeoNames.name.help":"ex : Saint-Mandé","gpControlLocationUtilityServiceGeoNames.button.cancel":"Cancel","gpControlLocationUtilityServiceGeoNames.button.search":"Search","gpControlLocationUtilityServiceGeocode.title":"Search a place :","gpControlLocationUtilityServiceGeocode.address":"Street : ","gpControlLocationUtilityServiceGeocode.address.help":"ex : 2, avenue Pasteur","gpControlLocationUtilityServiceGeocode.municipality":"Municipality : ","gpControlLocationUtilityServiceGeocode.municipality.help":"ex : Saint-Mandé","gpControlLocationUtilityServiceGeocode.postalcode":"Postal code : ","gpControlLocationUtilityServiceGeocode.postalcode.help":"ex : 94165","gpControlLocationUtilityServiceGeocode.name":"Place: ","gpControlLocationUtilityServiceGeocode.name.help":"e.g.: Saint-Mandé or 94165","gpControlLocationUtilityServiceGeocode.button.cancel":"Cancel","gpControlLocationUtilityServiceGeocode.button.search":"Search","gpControlLocationUtilityServiceReverseGeocode.title":"Search places around :","gpControlLocationUtilityServiceReverseGeocode.longitude":"Longitude : ","gpControlLocationUtilityServiceReverseGeocode.longitude.help":"ex : dd.mmss in geographic coordinates","gpControlLocationUtilityServiceReverseGeocode.latitude":"Latitude : ","gpControlLocationUtilityServiceReverseGeocode.latitude.help":"ex : dd.mmss in geographic coordinates","gpControlLocationUtilityServiceReverseGeocode.button.cancel":"Cancel","gpControlLocationUtilityServiceReverseGeocode.button.search":"Search","azimuth.measurement":"Azimuth","gpControlMeasureAzimuth.title":"Azimuth measurement","gpControlMeasureAzimuth.azimuth":"Azimuth","gpControlMeasureAzimuth.azimuth.help":"an angular measurement in a spherical coordinate system","gpControlMeasureAzimuth.distance":"Distance","gpControlMeasureAzimuth.distance.help":"Length","OpenLayers.Control.WMSGetFeatureInfo.title":"Objects identification","lus.not.match":"No match found","geocoded.address.popup.title":"Address","geocoded.address.popup.postalCode":"Postal code","geocoded.address.popup.places":"Places",CountrySubdivision:"Country subdivision",CountrySecondarySubdivision:"Country secondary subdivision",Municipality:"Municipality",MunicipalitySubdivision:"Municipality subdivision",TOS:"Terms of service","utm.zone":"UTM","*":""};Geoportal.Lang.fr={ATF:"Terres australes françaises",FXX:"France métropolitaine",GLP:"Guadeloupe",GUF:"Guyane française",MTQ:"Martinique",MYT:"Mayotte",NCL:"Nouvelle-Calédonie",PYF:"Polynésie française",REU:"Île de la Réunion",SPM:"Saint-Pierre et Miquelon",WLF:"Wallis et Futuna",ANF:"Antilles françaises",ASP:"Saint Paul et Amsterdam",CRZ:"Crozet",EUE:"Europe",KER:"Kerguelen",SBA:"Saint Barthélémy",SMA:"Saint Martin",WLD:"Le Monde","GEOGRAPHICALGRIDSYSTEMS.MAPS":"Cartes IGN","GEOGRAPHICALGRIDSYSTEMS.MAPS.description":"Les cartes sont issues des bases de données SCAN de l'IGN : Monde, Europe Politique, SCAN 1 000®, SCAN 500®, SCAN Régional®, SCAN 200®, SCAN Départemental®, SCAN 100®, SCAN 50®, SCAN 25®.","ORTHOIMAGERY.ORTHOPHOTOS":"Ortho-imagerie","ORTHOIMAGERY.ORTHOPHOTOS.description":"Les photographies aériennes allient la précision géométrique de la carte à la richesse de la photographie, résolution entre 50 et 15 cm ou de l'images satellites, résolution entre 10 m et 20m.","ELEVATION.SLOPES":"Teintes hypso. - Altitude","ELEVATION.SLOPES.description":"Les modèles numériques de terrain sont issus de données BD ALTI® que décrit le territoire français par des courbes de niveau. L’équidistance des courbes peut aller de 5 à 40m. Les données initiales ont été saisies sur des cartes IGN au 1 : 25 000, au 1 : 50 000 et à partir d’une restitution issue de prises de vue aériennes au 1 : 20 000, 1 : 30 000 et 1 : 60 000.","ELEVATION.LEVEL0":"Trait de côte - Altitude","ELEVATION.LEVEL0.description":"Le 0 des mers est issu de LITTO3D®, une production réalisée en commun entre le SHOM et l'IGN.","CADASTRALPARCELS.PARCELS":"Parcelles cadastrales","CADASTRALPARCELS.PARCELS.description":"L'information cadastrale numérique est géoréférencée et continue sur l'ensemble du territoire français. Elle a été réalisée à partir de l'assemblage du plan cadastral dématérialisé.","HYDROGRAPHY.HYDROGRAPHY":"Hydrographie","HYDROGRAPHY.HYDROGRAPHY.description":"L'hydrographie terrestre est issue de l'assemblage de données BD TOPO®, BD CARTHAGE®, EuroRegionalMap et EuroGlobalMap.","TRANSPORTNETWORKS.ROADS":"Réseaux routiers - Réseaux de transport","TRANSPORTNETWORKS.ROADS.description":"Le réseau routier est issu de l'assemblage de données BD TOPO®, BD CARTO®, EuroRegionalMap et EuroGlobalMap.","TRANSPORTNETWORKS.RAILWAYS":"Réseaux ferroviaires - Réseaux de transport","TRANSPORTNETWORKS.RAILWAYS.description":"Le réseau ferroviaire est issu de l'assemblage de données BD TOPO®, BD CARTO®, EuroRegionalMap et EuroGlobalMap.","TRANSPORTNETWORKS.RUNWAYS":"Réseaux aériens - Réseaux de transport","TRANSPORTNETWORKS.RUNWAYS.description":"Les pistes des aéroports et aérodromes sont issus de l'assemblage de données BD TOPO® et BD CARTO®.","BUILDINGS.BUILDINGS":"Bâtiments","BUILDINGS.BUILDINGS.description":"Les bâtiments et zones construites sont issus de l'assemblage de données BD TOPO®, BD CARTO®, EuroRegionalMap et EuroGlobalMap.","UTILITYANDGOVERNMENTALSERVICES.ALL":"Services d'utilité publique et services publics","UTILITYANDGOVERNMENTALSERVICES.ALL.description":"Les divers réseaux de transports d'énergie sont issus de l'assemblage de données BD TOPO® et BD CARTO®.","ADMINISTRATIVEUNITS.BOUNDARIES":"Unités administratives","ADMINISTRATIVEUNITS.BOUNDARIES.description":"Les unités administratives de la France sont issus de l'assemblage de données BD TOPO®, BD CARTO®, EuroRegionalMap et EuroBoundaryMap.","LANDCOVER.CORINELANDCOVER":"Occupation des terres","LANDCOVER.CORINELANDCOVER.description":"CORINE 2006","GEOGRAPHICALGRIDSYSTEMS.COASTALMAPS":"Cartes du littoral","GEOGRAPHICALGRIDSYSTEMS.COASTALMAPS.description":"Cartes du littoral","GEOGRAPHICALGRIDSYSTEMS.1900TYPEMAPS":"Cartes topographiques type 1900","GEOGRAPHICALGRIDSYSTEMS.1900TYPEMAPS.description":"Cartes au 1 : 50 000 (1ère édition issue de la Cartothèque de l'IGN)","GEOGRAPHICALGRIDSYSTEMS.CASSINI":"Cartes de Cassini","GEOGRAPHICALGRIDSYSTEMS.CASSINI.description":"Cartes de Cassini","ORTHOIMAGERY.ORTHOPHOTOS.COAST2000":"Ortho-imagerie du littoral (2000)","ORTHOIMAGERY.ORTHOPHOTOS.COAST2000.description":"Ortho-photographie des côtes de la Mer du nord, de la Manche et de l'Atlantique.","LANDUSE.AGRICULTURE2007":"Îlots de culture (2007)","LANDUSE.AGRICULTURE2007.description":"Cette couche affiche les îlots anonymisés du Registre Parcellaire Graphique (RPG) et leur groupe de cultures principal déclarés en 2007 par les exploitants agricoles pour bénéficier des aides PAC.","LANDUSE.AGRICULTURE2008":"Îlots de culture (2008)","LANDUSE.AGRICULTURE2008.description":"Cette couche affiche les îlots anonymisés du Registre Parcellaire Graphique (RPG) et leur groupe de cultures principal déclarés en 2008 par les exploitants agricoles pour bénéficier des aides PAC.","LANDUSE.AGRICULTURE2009":"Îlots de culture (2009)","LANDUSE.AGRICULTURE2009.description":"Cette couche affiche les îlots anonymisés du Registre Parcellaire Graphique (RPG) et leur groupe de cultures principal déclarés en 2009 par les exploitants agricoles pour bénéficier des aides PAC.","ORTHOIMAGERY.ORTHOPHOTOS.GENEVE":"Canton de Genève","ORTHOIMAGERY.ORTHOPHOTOS.GENEVE.description":"Ortho-photographie, 10 cm de résolution (2010).","ORTHOIMAGERY.ORTHOPHOTOS2000-2005":"Ortho-photographie (2000-2005)","ORTHOIMAGERY.ORTHOPHOTOS2000-2005.description":"Première couverture France entière d'ortho-photographies à 50 cm de résolution.","GEOGRAPHICALGRIDSYSTEMS.FRANCERASTER":"FranceRaster®","GEOGRAPHICALGRIDSYSTEMS.FRANCERASTER.description":"FranceRaster® est une série d´images géoréférencées couvrant la France Métropolitaine et les DOM. De cartographie homogène, elle est produite avec les bases de données vecteur de l´IGN les plus adaptées à chaque échelle.  Selon les échelles, FranceRaster®; permet la visualisation des thèmes réseau routier et ferré, bâti, hydrographie, végétation, adresses, sens de circulation, toponymie...","NATURALRISKZONES.1910FLOODEDWATERSHEDS":"Seine (PHEC)","NATURALRISKZONES.1910FLOODEDWATERSHEDS.description":"Cette couche de la carte représente le plus haut des eaux connues (PHEC) sur le bassin de la Seine, c'est à dire des zones géographiques inondées par les plus grandes crues connues et documentées sur chaque rivière.","NATURALRISKZONES.1910FLOODEDCELLARS":"Caves inondées (1910)","NATURALRISKZONES.1910FLOODEDCELLARS.description":"Carte des caves inondées lors des crues de la Seine de 1910. Cette carte est basée sur des témoignages.","GEOGRAPHICALGRIDSYSTEMS.ETATMAJOR40":"Cartes État-Major (1/40 000)","GEOGRAPHICALGRIDSYSTEMS.ETATMAJOR40.description":"Cette couche est formée par l'assemblage des 978 dessins originaux de la carte d'État-Major créé au XIXe siècle. Ces enquêtes écrites à la main et colorées, au 1: 40 000, ont été établies entre 1825 et 1866.","LANDCOVER.FORESTINVENTORY.V1":"Inventaire forestier (v1)","LANDCOVER.FORESTINVENTORY.V1.description":"Inventaire forestier (1987-2004)","LANDCOVER.FORESTINVENTORY.V2":"Inventaire forestier (v2)","LANDCOVER.FORESTINVENTORY.V2.description":"Inventaire forestier (2005+)","GEOGRAPHICALGRIDSYSTEMS.ADMINISTRATIVEUNITS":"Divisions administratives","GEOGRAPHICALGRIDSYSTEMS.ADMINISTRATIVEUNITS.description":"Carte des divisions administratives","GEOGRAPHICALNAMES.NAMES":"Désignations géographiques","GEOGRAPHICALNAMES.NAMES.description":"Toponymes","div.not.found":"${id} non trouvé dans le document : vérifier que '${id}' existe bien.","proxy.not.set":"Pas de configuration du proxy : l'obtention des informations sur le contrat pourrait échouer.","cookies.not.enabled":"Les cookies sont désactivés. Activer les s'il vous plaît.","geoRM.getConfig":"Impossible d'obtenir les informations relatives à la clef '${key}' - Vérifier votre connexion.","geoRM.getToken":"Impossible d'obtenir le jeton associé à la clef '${key}' - Vérifier votre connexion.","geoRM.failed":"Impossible d'obtenir un jeton valide pour la clef '${key}'","geoRM.forbidden":"Clé API manquante ou ${layer} pas pris en charge par le contrat de l'application API.","GPX.version":"Version ${gpxVersion} GPX non supportée","XLS.version":"Version ${xlsVersion} XLS non supportée pour le service ${coreService}","Not.conformal.XLS":"${part} est manquant dans l'XML","olControlMeasurePath.title":"Mesure de distance","olControlMeasurePolygon.title":"Mesure de surface","waiting.measurement":"En attente de saisie ...","length.measurement":"Longueur","area.measurement":"Surface","gpControlLayerSwitcher.label":"Couches","gpLayer.metadataURL":"Plus d'information sur cette couche ...","gpLayer.dataURL":"Accès au service de téléchargement","gpControlPanelToggle.closed":"Afficher la barre d'outils","gpControlPanelToggle.opened":"Masquer la barre d'outils","gpControlRemoveLayer.title":"Retirer la couche","gpControlLayerOpacity.title":"Règle de transparence","gpControlZoomToLayerMaxExtent.title":"Zoomer sur l'emprise de la couche","gpControlMousePosition.longitude":"Longitude","gpControlMousePosition.latitude":"Latitude","gpControlMousePosition.easting":"Abscisse","gpControlMousePosition.northing":"Ordonnée","gpControlMousePosition.north":"N","gpControlMousePosition.south":"S","gpControlMousePosition.east":"E","gpControlMousePosition.west":"O","gpControlMousePosition.sexa":"degrés sexagésimaux","gpControlMousePosition.deg":"degrés décimaux","gpControlMousePosition.gon":"grades","gpControlMousePosition.rad":"radians","gpControlMousePosition.km":"kilomètres","gpControlMousePosition.m":"mètres","gpControlMousePosition.cm":"centimètres","gpControlMousePosition.utmZone":"Zone","gpControlToolBox.label":"Outils","gpControlZoomBar.world":"Monde","gpControlZoomBar.state":"Pays","gpControlZoomBar.country":"Dépt.","gpControlZoomBar.town":"Ville","gpControlZoomBar.street":"Rue","gpControlZoomBar.house":"Maison","gpControlEditingToolbar.drawpoint":"Dessiner un point","gpControlEditingToolbar.drawline":"Dessiner une ligne","gpControlEditingToolbar.drawpolygon":"Dessiner un polygone","gpControlEditingToolbar.dragfeature":"Déplacer un objet","gpControlEditingToolbar.modifyfeature":"Modifier un objet","gpControlEditingToolbar.deletefeature":"Détruire un objet","gpControlEditingToolbar.selectfeature":"Sélectionner un objet","gpControlEditingToolbar.navigation":"Naviguer","gpControlAddImageLayer.title":"Ajouter une couche image ...","gpControlAddImageLayer.layerUrl":"URL : ","gpControlAddImageLayer.layerUrl.help":"adresse de base du service","gpControlAddImageLayer.layerType":"Type : ","gpControlAddImageLayer.layerType.help":"choisissez une valeur dans la liste","gpControlAddImageLayer.layerType.WMS":"Web Map Service","gpControlAddImageLayer.layerType.WMSC":"OSGeO WMS-C","gpControlAddImageLayer.button.add":"Ajouter","gpControlAddImageLayer.button.cancel":"Annuler","wms.caps.no.compatible.srs":"Pas de couche compatible trouvée","ogc.caps.unknown.service":"${serviceType} ne semble pas être un ${expectedType}","gpControlAddVectorLayer.title":"Ajouter une couche vectorielle ...","gpControlAddVectorLayer.layerName":"Nom : ","gpControlAddVectorLayer.layerName.help":"ex : ma couche","gpControlAddVectorLayer.layerType":"Type : ","gpControlAddVectorLayer.layerType.help":"choisissez une valeur dans la liste","gpControlAddVectorLayer.layerType.Point":"ponctuelle","gpControlAddVectorLayer.layerType.LineString":"linéaire","gpControlAddVectorLayer.layerType.Polygon":"surfacique","gpControlAddVectorLayer.layerType.KML":"ressource KML","gpControlAddVectorLayer.layerType.GPX":"ressource GPX","gpControlAddVectorLayer.layerType.OSM":"ressource OSM","gpControlAddVectorLayer.layerType.GeoRSS":"ressource GeoRSS","gpControlAddVectorLayer.layerType.WFS":"ressource WFS","gpControlAddVectorLayer.layerUrl":"URL : ","gpControlAddVectorLayer.layerUrl.help":"local ou à distance","gpControlAddVectorLayer.layerFreeHand":"Dessin à main levée ? ","gpControlAddVectorLayer.layerFreeHand.help":"permet le dessin à main levée","gpControlAddVectorLayer.button.add":"Ajouter","gpControlAddVectorLayer.button.cancel":"Annuler","wfs.caps.no.feature.found":"Aucun objet trouvé","wfs.caps.unsupported.version":"Version ${version} de WFS non supportée","gpControlLocationUtilityService.geonames.title":"Rechercher un lieu","gpControlLocationUtilityService.geocode.title":"Rechercher une adresse","gpControlLocationUtilityService.reverse.geocode.title":"Rechercher les adresses autour d'un point","gpControlLocationUtilityServiceGeoNames.title":"Rechercher un lieu :","gpControlLocationUtilityServiceGeoNames.name":"Lieu : ","gpControlLocationUtilityServiceGeoNames.name.help":"ex : Saint-Mandé","gpControlLocationUtilityServiceGeoNames.button.cancel":"Annuler","gpControlLocationUtilityServiceGeoNames.button.search":"Rechercher","gpControlLocationUtilityServiceGeocode.title":"Chercher une adresse :","gpControlLocationUtilityServiceGeocode.address":"Rue : ","gpControlLocationUtilityServiceGeocode.address.help":"ex : 2, avenue Pasteur","gpControlLocationUtilityServiceGeocode.municipality":"Ville : ","gpControlLocationUtilityServiceGeocode.municipality.help":"ex : Saint-Mandé","gpControlLocationUtilityServiceGeocode.postalcode":"Code postal : ","gpControlLocationUtilityServiceGeocode.postalcode.help":"ex : 94165","gpControlLocationUtilityServiceGeocode.name":"Lieu : ","gpControlLocationUtilityServiceGeocode.name.help":"ex : Saint-Mandé ou 94165","gpControlLocationUtilityServiceGeocode.button.cancel":"Annuler","gpControlLocationUtilityServiceGeocode.button.search":"Rechercher","gpControlLocationUtilityServiceReverseGeocode.title":"Chercher des lieux à proximité :","gpControlLocationUtilityServiceReverseGeocode.longitude":"Longitude : ","gpControlLocationUtilityServiceReverseGeocode.longitude.help":"ex : dd.mmss en coordonnées géographiques","gpControlLocationUtilityServiceReverseGeocode.latitude":"Latitude : ","gpControlLocationUtilityServiceReverseGeocode.latitude.help":"ex : dd.mmss en coordonnées géographiques","gpControlLocationUtilityServiceReverseGeocode.button.cancel":"Annuler","gpControlLocationUtilityServiceReverseGeocode.button.search":"Rechercher","azimuth.measurement":"Azimuth","gpControlMeasureAzimuth.title":"Mesure d'azimuth","gpControlMeasureAzimuth.azimuth":"Azimuth","gpControlMeasureAzimuth.azimuth.help":"angle horizontal entre la direction d'un objet et le nord géographique","gpControlMeasureAzimuth.distance":"Distance","gpControlMeasureAzimuth.distance.help":"Longueur","OpenLayers.Control.WMSGetFeatureInfo.title":"Identifier les objets","lus.not.match":"Pas de correspondance trouvée","geocoded.address.popup.title":"Adresse","geocoded.address.popup.postalCode":"Code postal","geocoded.address.popup.places":"Lieux",CountrySubdivision:"Département",CountrySecondarySubdivision:"Commune",Municipality:"Ville",MunicipalitySubdivision:"Quartier",TOS:"Conditions générales d'utilisation","utm.zone":"UTM","*":""};Geoportal.Lang.de={ATF:"Französisch Südliche Territorien",FXX:"Frankreich Festland",GLP:"Guadeloupe",GUF:"Französisch-Guayana",MTQ:"Martinique",MYT:"Mayotte",NCL:"Neukaledonien",PYF:"Französisch-Polynesien",REU:"Réunion",SPM:"Saint Pierre und Miquelon",WLF:"Wallis und Futuna",ANF:"Französisch Antillen",ASP:"Saint Paul und Amsterdam",CRZ:"Crozet",EUE:"Europa",KER:"Kerguelen",SBA:"Saint Barthélémy",SMA:"Saint Martin",WLD:"Die Welt","GEOGRAPHICALGRIDSYSTEMS.MAPS":"IGN Karten","GEOGRAPHICALGRIDSYSTEMS.MAPS.description":"Die karten stammen aus den SCAN-datenbanken des IGN: Welt, Politisches Europa, SCAN 1000®, SCAN 500®, SCAN Régional®, SCAN 200®, SCAN Départemental®, SCAN 100®, SCAN 50®, SCAN 25®.","ORTHOIMAGERY.ORTHOPHOTOS":"Orthofotografie","ORTHOIMAGERY.ORTHOPHOTOS.description":"Die Luftaufnahmen verbinden die präzision der geometrie mit der detailreichhaltigkeit der photographie, auflösung zwischen 50 und 15 cm, oder der satellitenbilder, auflösung zwischen 10 m und 20 m.","ELEVATION.SLOPES":"Hypsometrische farben - Höhe","ELEVATION.SLOPES.description":"Die digitalen geländemodelle stammen aus den BD ALTI® daten, die das französische staatsgebiet mit seinen höhenlinien darstellt. Die abstandsgleichheit der linien reicht von 5 bis 40 m. Die ausgangsdaten wurden auf IGN-Karten im Maßstab von 1 : 25.000,  1 : 50.000 und, ausgehend von einer wiedergabe der luftaufnahmen, im Maßstab von 1 : 20.000, 1 : 30.000 und 1 : 60.000 erfaßt.","ELEVATION.LEVEL0":"Küstenlinie - Höhe","ELEVATION.LEVEL0.description":"Die 0 des Meeres stammt aus LITTO3D®, eine gemeinsame produktion des SHOM und des IGN.","CADASTRALPARCELS.PARCELS":"Katasterparzellen (Flurstücke/Grundstücke)","CADASTRALPARCELS.PARCELS.description":"Die digitale katasterinformation ist für das gesamte französische staatsgebiet durchgehend und georeferenziert. Sie wurde ausgehend von der zusammenstellung des entmaterialisierten katasterplans hergestellt.","HYDROGRAPHY.HYDROGRAPHY":"Gewässernetz","HYDROGRAPHY.HYDROGRAPHY.description":"Die hydrographie der erde wurde ausgehend von der zusammenstellung der daten des BD TOPO®, BD CARTHAGE®, EuroRegionalMal und EuroGlobalMap erstellt.","TRANSPORTNETWORKS.ROADS":"Straßennetz - Verkehrsnetze","TRANSPORTNETWORKS.ROADS.description":"Das straßennetz wurde ausgehend von der zusammenstellung der daten des BD TOPO®, BD CARTO®, EuroRegionalMap und EuroGlobalMap erstellt.","TRANSPORTNETWORKS.RAILWAYS":"Schienennetz - Verkehrsnetze","TRANSPORTNETWORKS.RAILWAYS.description":"Das schienennetz wurde ausgehend von der zusammenstellung der daten des BD TOPO®, BD CARTO®, EuroRegionalMap und EuroGlobalMap erstellt.","TRANSPORTNETWORKS.RUNWAYS":"Luftverkehrnetz - Verkehrsnetze","TRANSPORTNETWORKS.RUNWAYS.description":"Die flughäfen und flugplätze wurden ausgehend von der zusammenstellung der daten des BD TOPO® und BD CARTO® erfaßt.","BUILDINGS.BUILDINGS":"Gebäude","BUILDINGS.BUILDINGS.description":"Die gebäude und bebaute gebiete wurden ausgehend von der zusammenfügung der daten des BD TOPO®, BD CARTO®, EuroRegionalMap und EuroGlobalMap erfaßt.","UTILITYANDGOVERNMENTALSERVICES.ALL":"Versorgungswirtschaft und staatliche Dienste","UTILITYANDGOVERNMENTALSERVICES.ALL.description":"Die verschiedenen energietransportnetze wurden ausgehend von der zusammenstellung der daten des BD TOPO® und BD CARTO® erfaßt.","ADMINISTRATIVEUNITS.BOUNDARIES":"Verwaltungseinheiten","ADMINISTRATIVEUNITS.BOUNDARIES.description":"Die verwaltungseinheiten frankreichs wurden ausgehend von der zusammenstellung der daten des BD TOPO®, BD CARTO®, EuroRegionalMap und EuroBoundaryMap erfaßt.","LANDCOVER.CORINELANDCOVER":"Bodenbedeckung","LANDCOVER.CORINELANDCOVER.description":"CORINE 2006","GEOGRAPHICALGRIDSYSTEMS.COASTALMAPS":"Coastal Karten","GEOGRAPHICALGRIDSYSTEMS.COASTALMAPS.description":"Coastal Karten","GEOGRAPHICALGRIDSYSTEMS.1900TYPEMAPS":"topographischen Typ 1900 Karten","GEOGRAPHICALGRIDSYSTEMS.1900TYPEMAPS.description":"Karten bei 1: 50 000 (nach der ersten Ausgabe der IGN Karte Library)","GEOGRAPHICALGRIDSYSTEMS.CASSINI":"Cassini-Karten","GEOGRAPHICALGRIDSYSTEMS.CASSINI.description":"Cassini-Karten","ORTHOIMAGERY.ORTHOPHOTOS.COAST2000":"Ortho-Fotografie der Küste (2000)","ORTHOIMAGERY.ORTHOPHOTOS.COAST2000.description":"Ortho-Fotografie von der Küste der Nordsee, Ärmelkanal und Atlantik","LANDUSE.AGRICULTURE2007":"Landwirtschaftlicher Parzellen (2007)","LANDUSE.AGRICULTURE2007.description":"Diese Schicht zeigt das Inselchen anonymisierter Registrierung Parcel Graph (RPG) und ihre Haupternte Gruppe berichtet im Jahr 2007 durch die Landwirte aus GAP-Subventionen profitieren.","LANDUSE.AGRICULTURE2008":"Landwirtschaftlicher Parzellen (2008)","LANDUSE.AGRICULTURE2008.description":"Diese Schicht zeigt das Inselchen anonymisierter Registrierung Parcel Graph (RPG) und ihre Haupternte Gruppe berichtet im Jahr 2008 durch die Landwirte aus GAP-Subventionen profitieren.","LANDUSE.AGRICULTURE2009":"Landwirtschaftlicher Parzellen (2009)","LANDUSE.AGRICULTURE2009.description":"Diese Schicht zeigt das Inselchen anonymisierter Registrierung Parcel Graph (RPG) und ihre Haupternte Gruppe berichtet im Jahr 2009 durch die Landwirte aus GAP-Subventionen profitieren.","ORTHOIMAGERY.ORTHOPHOTOS.GENEVE":"Genfer Staatsrat","ORTHOIMAGERY.ORTHOPHOTOS.GENEVE.description":"Ortho-Fotografie, 10 cm Auflösung (2010).","ORTHOIMAGERY.ORTHOPHOTOS2000-2005":"Orthofotografie (2000-2005)","ORTHOIMAGERY.ORTHOPHOTOS2000-2005.description":"1. National Berichterstattung (2000-2005) von Ortho-Bilder mit 50 cm Auflösung.","GEOGRAPHICALGRIDSYSTEMS.FRANCERASTER":"FranceRaster®","GEOGRAPHICALGRIDSYSTEMS.FRANCERASTER.description":"FranceRaster® ist eine Serie von georeferenzierten Bildern für Frankreich Festland und Übersee-Territorien. Es ist mit dem Vektor-Datenbank der IGN am besten jede Skala mit einer einheitlichen Symbolik geeignet hergestellt. Nach den Maßstäben, FranceRaster ®, ermöglicht die Anzeige der Themen Straßen-und Schienenverkehr, Rahmen, Gewässerkunde, Vegetation, Adressen, Fahrtrichtung, Namen ...","NATURALRISKZONES.1910FLOODEDWATERSHEDS":"Seine (PHEC)","NATURALRISKZONES.1910FLOODEDWATERSHEDS.description":"Diese Karte Schicht stellt die bekannten höchsten Wasserstand (PHEC) auf das Einzugsgebiet der Seine, dh Gebiete mit den größten bekannten Hochwasser überflutet und dokumentiert auf jedem Fluss.","NATURALRISKZONES.1910FLOODEDCELLARS":"Überflutete Keller (1910)","NATURALRISKZONES.1910FLOODEDCELLARS.description":"Karte von überschwemmten Kellern während der Seine Flut von 1910.  Diese Karte basiert auf Zeugenaussagen basieren.","GEOGRAPHICALGRIDSYSTEMS.ETATMAJOR40":"État-Major-Karte (1:40 000)","GEOGRAPHICALGRIDSYSTEMS.ETATMAJOR40.description":"Diese Schicht wird durch die Montage von dem 978 Original-Zeichnungen von der Karte von état-major gebildet gegründet im neunzehnten Jahrhundert.  Diese handschriftliche und farbige Erhebungen, bei der 1: 40 000 wurden zwischen 1825 und 1866 errichtet.","LANDCOVER.FORESTINVENTORY.V1":"Waldinventur (v1)","LANDCOVER.FORESTINVENTORY.V1.description":"Waldinventur (1987-2004)","LANDCOVER.FORESTINVENTORY.V2":"Waldinventur (v2)","LANDCOVER.FORESTINVENTORY.V2.description":"Waldinventur (2005+)","GEOGRAPHICALGRIDSYSTEMS.ADMINISTRATIVEUNITS":"Karte von Verwaltungsabteilungen","GEOGRAPHICALGRIDSYSTEMS.ADMINISTRATIVEUNITS.description":"Karte von Verwaltungsabteilungen","GEOGRAPHICALNAMES.NAMES":"Geographische Namen","GEOGRAPHICALNAMES.NAMES.description":"Geographische Namen","div.not.found":"${id} konnte nicht in dem dokument gefunden werden: Prüfen sie, ob ${id} auch wirklich existiert.","proxy.not.set":"Keine Proxy-konfiguration: Informationen zu dem vertrag könnten möglicherweise nicht abgerufen werden.","cookies.not.enabled":"Cookies sind deaktiviert. Bitte aktivieren.","geoRM.getConfig":"Die informationen zum schlüßel '${key}' können nicht abgerufen werden - überprüfen sie ihre verbindung.","geoRM.getToken":"Die datei zum schlüßel '${key}' kann nicht abgerufen werden - überprüfen sie ihre verbindung.","geoRM.failed":"Kein gültiges zeichen erhalten zum schlüßel '${key}'","geoRM.forbidden":"API-Schlüssel fehlt oder ${layer} nicht durch die Anwendung von API Vertrag unterstützt.","GPX.version":"Version ${gpxVersion} GPX nicht gestützt.","XLS.version":"Version ${xlsVersion} XLS wird vom service ${coreService} nicht gestützt.","Not.conformal.XLS":"${part} fehlt im XML","olControlMeasurePath.title":"Entfernungsmeßung","olControlMeasurePolygon.title":"Flüchenmeßung","waiting.measurement":"In erwartung der eingabe ...","length.measurement":"Länge","area.measurement":"Fläche","gpControlLayerSwitcher.label":"Schichten","gpLayer.metadataURL":"Mehr informationen zu dieser schicht...","gpLayer.dataURL":"Zugang zum download-service","gpControlPanelToggle.closed":"Die tool-leiste anzeigen","gpControlPanelToggle.opened":"Die tool-leiste ausblenden","gpControlRemoveLayer.title":"Die schicht entfernen","gpControlLayerOpacity.title":"Die transparenz einstellen","gpControlZoomToLayerMaxExtent.title":"Auf die bodenfläche der schicht zoomen","gpControlMousePosition.longitude":"Längengrad","gpControlMousePosition.latitude":"Breitengrad","gpControlMousePosition.easting":"Absziße","gpControlMousePosition.northing":"Ordinate","gpControlMousePosition.north":"N","gpControlMousePosition.south":"S","gpControlMousePosition.east":"O","gpControlMousePosition.west":"W","gpControlMousePosition.sexa":"sexagecimal grades","gpControlMousePosition.deg":"dezimale grades","gpControlMousePosition.gon":"grad","gpControlMousePosition.rad":"radians","gpControlMousePosition.km":"kilometers","gpControlMousePosition.m":"meters","gpControlMousePosition.cm":"zentimeters","gpControlMousePosition.utmZone":"Zone","gpControlToolBox.label":"Tools","gpControlZoomBar.world":"Welt","gpControlZoomBar.state":"Staat","gpControlZoomBar.country":"Land","gpControlZoomBar.town":"Stadt","gpControlZoomBar.street":"Straße","gpControlZoomBar.house":"Haus","gpControlEditingToolbar.drawpoint":"Einen punkt platzieren","gpControlEditingToolbar.drawline":"Eine linie zeichnen","gpControlEditingToolbar.drawpolygon":"Ein polygon zeichnen","gpControlEditingToolbar.dragfeature":"Ein objekt verschieben","gpControlEditingToolbar.modifyfeature":"Ein objekt verändern","gpControlEditingToolbar.deletefeature":"Ein objekt vernichten","gpControlEditingToolbar.selectfeature":"Ein objekt auswählen","gpControlEditingToolbar.navigation":"Navigieren","gpControlAddImageLayer.title":"Eine bild-schicht hinzufügen","gpControlAddImageLayer.layerUrl":"URL : ","gpControlAddImageLayer.layerUrl.help":"basis-adresse des dienstes","gpControlAddImageLayer.layerType":"Typ : ","gpControlAddImageLayer.layerType.help":"Wählen sie einen wert der liste","gpControlAddImageLayer.layerType.WMS":"Web Map Service","gpControlAddImageLayer.layerType.WMSC":"OSGeO WMS-C","gpControlAddImageLayer.button.add":"Hinzufügen","gpControlAddImageLayer.button.cancel":"Abbrechen","wms.caps.no.compatible.srs":"Nicht kompatibel schicht gefunden","ogc.caps.unknown.service":"${serviceType} ist kein ${expectedType}","gpControlAddVectorLayer.title":"Eine vektorielle schicht hinzufügen","gpControlAddVectorLayer.layerName":"Name : ","gpControlAddVectorLayer.layerName.help":"z.B.: meine schicht","gpControlAddVectorLayer.layerType":"Typ : ","gpControlAddVectorLayer.layerType.help":"Wählen sie einen wert der liste","gpControlAddVectorLayer.layerType.Point":"punktuell","gpControlAddVectorLayer.layerType.LineString":"linear","gpControlAddVectorLayer.layerType.Polygon":"flächenbezogen","gpControlAddVectorLayer.layerType.KML":"KML resource","gpControlAddVectorLayer.layerType.GPX":"GPX resource","gpControlAddVectorLayer.layerType.OSM":"OSM resource","gpControlAddVectorLayer.layerType.GeoRSS":"GeoRSS resource","gpControlAddVectorLayer.layerType.WFS":"WFS resource","gpControlAddVectorLayer.layerUrl":"URL : ","gpControlAddVectorLayer.layerUrl.help":"vor ort oder aus entfernung","gpControlAddVectorLayer.layerFreeHand":"freihandzeichnen ? ","gpControlAddVectorLayer.layerFreeHand.help":"ermöglicht das freihandzeichnen","gpControlAddVectorLayer.button.add":"Hinzufügen","gpControlAddVectorLayer.button.cancel":"Abbrechen","wfs.caps.no.feature.found":"Keine objekte gefunden","wfs.caps.unsupported.version":"WFS version ${version} nicht unterstützt","gpControlLocationUtilityService.geonames.title":"Einen ort suchen","gpControlLocationUtilityService.geocode.title":"Eine adreße suchen","gpControlLocationUtilityService.reverse.geocode.title":"Die Adreßen um einen punkt herum suchen","gpControlLocationUtilityServiceGeoNames.title":"Einen ort suchen :","gpControlLocationUtilityServiceGeoNames.name":"Ort : ","gpControlLocationUtilityServiceGeoNames.name.help":"z.B. : Saint-Mandé","gpControlLocationUtilityServiceGeoNames.button.cancel":"Abbrechen","gpControlLocationUtilityServiceGeoNames.button.search":"Suchen","gpControlLocationUtilityServiceGeocode.title":"Eine Adreße suchen :","gpControlLocationUtilityServiceGeocode.address":"Straße : ","gpControlLocationUtilityServiceGeocode.address.help":"ex : 2, avenue Pasteur","gpControlLocationUtilityServiceGeocode.municipality":"Stadt : ","gpControlLocationUtilityServiceGeocode.municipality.help":"z.B. : Saint-Mandé","gpControlLocationUtilityServiceGeocode.postalcode":"Postleitzahl:","gpControlLocationUtilityServiceGeocode.postalcode.help":"z.B. : 94165","gpControlLocationUtilityServiceGeocode.name":"Ort:","gpControlLocationUtilityServiceGeocode.name.help":"z.B.: Saint-Mandé oder 94165","gpControlLocationUtilityServiceGeocode.button.cancel":"Abbrechen","gpControlLocationUtilityServiceGeocode.button.search":"Suchen","gpControlLocationUtilityServiceReverseGeocode.title":"Orte in der nähe suchen:","gpControlLocationUtilityServiceReverseGeocode.longitude":"Längengrad : ","gpControlLocationUtilityServiceReverseGeocode.longitude.help":"z.B. : dd.mmss in in geographischen koordinaten","gpControlLocationUtilityServiceReverseGeocode.latitude":"Breitengrad : ","gpControlLocationUtilityServiceReverseGeocode.latitude.help":"z.B. : dd.mmss in geographischen koordinaten","gpControlLocationUtilityServiceReverseGeocode.button.cancel":"Abbrechen","gpControlLocationUtilityServiceReverseGeocode.button.search":"Suchen","lus.not.match":"Es konnte keine übereinstimmung gefunden werden","azimuth.measurement":"Azimuth","gpControlMeasureAzimuth.title":"Azimuth messung","gpControlMeasureAzimuth.azimuth":"Azimuth","gpControlMeasureAzimuth.azimuth.help":"im Uhrzeigersinn gemessenen Winkel zwischen geografisch-Nord (Nordpol) und einer beliebigen Richtung auf der Erdoberfläche","gpControlMeasureAzimuth.distance":"Länge","gpControlMeasureAzimuth.distance.help":"Länge","OpenLayers.Control.WMSGetFeatureInfo.title":"Identifikation von Objekten","geocoded.address.popup.title":"Adreße","geocoded.address.popup.postalCode":"Postleitzahl","geocoded.address.popup.places":"Orte",CountrySubdivision:"Departement",CountrySecondarySubdivision:"Gemeinde",Municipality:"Stadt",MunicipalitySubdivision:"Stadtteil",TOS:"Allgemeine geschäftsbedingungen","utm.zone":"UTM","*":""};Geoportal.Lang.es={ATF:"Tierras australes francés",FXX:"Francia continental",GLP:"Guadalupe",GUF:"Francés de Guayana",MTQ:"Martinica",MYT:"Mayotte",NCL:"Nueva Caledonia",PYF:"Polinesia francés",REU:"La Reunión",SPM:"San Pedro y Miquelón",WLF:"Wallis y Futuna",ANF:"Francés Antillas",ASP:"Saint Paul y Amsterdam",CRZ:"Crozet",EUE:"Europa",KER:"Kerguelen",SBA:"Saint Barthélémy",SMA:"Saint Martin",WLD:"El mundo","GEOGRAPHICALGRIDSYSTEMS.MAPS":"IGN Mapas","GEOGRAPHICALGRIDSYSTEMS.MAPS.description":"Los mapas se derivan de las bases de datos SCAN del IGN: Mundo, Europa politica databases : World, Europe, SCAN 1 000®, SCAN 500®, SCAN Régional®, SCAN 200®, SCAN Départemental®, SCAN 100®, SCAN 50®, SCAN 25®.","ORTHOIMAGERY.ORTHOPHOTOS":"Ortoimágenes","ORTHOIMAGERY.ORTHOPHOTOS.description":"Las fotografias aéreas combinan la precisión geométrica del mapa y la riqueza de la fotografia, una resolución entre 50 cm y 15 cm o, con imágenes de satélite, una resolución entre 10 m y 20 m.","ELEVATION.SLOPES":"Tintas hipsométricas - Elevaciones","ELEVATION.SLOPES.description":"Los modelos digitales del terreno se elaboran con información de la base de datos BD ALTI®, que describe el territorio francés mediante curvas de nivel. La equidistancia de las curvas varia de 5 m a 40 m. Los datos iniciales se han tomado de mapas del IGN a escalas 1:25 000, 1:50 000 y a partir de una restitución elaborada mediante tomas de vistas aéreas a escalas 1:20 000, 1:30 000 y 1:60 000.","ELEVATION.LEVEL0":"Linea de costa - Elevaciones","ELEVATION.LEVEL0.description":"La cota 0 (cero) de los mares se obtiene de LITTO3D®, una producción realizada en común entre el SHOM y el IGN.","CADASTRALPARCELS.PARCELS":"Parcelas catastrales","CADASTRALPARCELS.PARCELS.description":"La información catastral digital está georreferenciada y es continua sobre el conjunto del territorio francés. Se ha elaborado a partir del montaje del plan catastral desmaterializado.","HYDROGRAPHY.HYDROGRAPHY":"Hidrografia","HYDROGRAPHY.HYDROGRAPHY.description":"La hidrografia terrestre se obtiene de la combinación de datos de las bases de datos BD TOPO® y BD CARTHAGE® y del EuroRegionalMap y el EuroGlobalMap.","TRANSPORTNETWORKS.ROADS":"Red de Carreteras - Redes de transporte","TRANSPORTNETWORKS.ROADS.description":"La red de carreteras se obtiene de la combinación de datos de las bases de datos BD TOPO® y BD CARTO® y del EuroRegionalMap y el EuroGlobalMap.","TRANSPORTNETWORKS.RAILWAYS":"Red ferroviaria - Redes de transporte","TRANSPORTNETWORKS.RAILWAYS.description":"La red ferroviaria se obtiene de la combinación de datos de las bases de datos BD TOPO® y CARTO® y del EuroRegionalMap y el EuroGlobalMap.","TRANSPORTNETWORKS.RUNWAYS":"Red de aire - Redes de transporte","TRANSPORTNETWORKS.RUNWAYS.description":"Las pistas de los aeropuertos y aeródromos se obtienen de la combinación de datos de las bases de datos BD TOPO® y BD CARTO®.","BUILDINGS.BUILDINGS":"Edificios","BUILDINGS.BUILDINGS.description":"Los edificios y las zonas construidas se obtienen de la combinación de datos de las bases de datos BD TOPO® y BD CARTO® y del EuroRegionalMap y el EuroGlobalMap.","UTILITYANDGOVERNMENTALSERVICES.ALL":"Servicios de utilidad pública y estatales","UTILITYANDGOVERNMENTALSERVICES.ALL.description":"Las diversas redes de transporte de energia se obtienen de la combinación de datos de las bases de datos BD TOPO® y BD CARTO®.","ADMINISTRATIVEUNITS.BOUNDARIES":"Unidades administrativas","ADMINISTRATIVEUNITS.BOUNDARIES.description":"Las unidades administrativas de Francia se obtienen de la combinación de datos de las bases de datos BD TOPO® y BD CARTO® y del EuroRegionalMap y el EuroBoundaryMap.","LANDCOVER.CORINELANDCOVER":"Cubierta terrestre","LANDCOVER.CORINELANDCOVER.description":"CORINE 2006","GEOGRAPHICALGRIDSYSTEMS.COASTALMAPS":"Costeras mapas","GEOGRAPHICALGRIDSYSTEMS.COASTALMAPS.description":"Costeras mapas","GEOGRAPHICALGRIDSYSTEMS.1900TYPEMAPS":"mapas topográficos del tipo 1900","GEOGRAPHICALGRIDSYSTEMS.1900TYPEMAPS.description":"Mapas a escala 1: 50 000 (después de la primera edición de la Biblioteca Mapa IGN)","GEOGRAPHICALGRIDSYSTEMS.CASSINI":"Cassini mapas","GEOGRAPHICALGRIDSYSTEMS.CASSINI.description":"Cassini mapas","ORTHOIMAGERY.ORTHOPHOTOS.COAST2000":"orto-fotografías de la costa (2000)","ORTHOIMAGERY.ORTHOPHOTOS.COAST2000.description":"Orto-fotografía de la costa del Mar del Norte, el Canal Inglés y el Atlántico.","LANDUSE.AGRICULTURE2007":"Las parcelas agrícolas (2007)","LANDUSE.AGRICULTURE2007.description":"Esta capa muestra los islotes anónimos registro de paquetes gráfico (RPG) y su grupo de cultivos principales reportados en 2007 por los agricultores para beneficiarse de ayudas de la PAC.","LANDUSE.AGRICULTURE2008":"Las parcelas agrícolas (2008)","LANDUSE.AGRICULTURE2008.description":"Esta capa muestra los islotes anónimos registro de paquetes gráfico (RPG) y su grupo de cultivos principales reportados en 2008 por los agricultores para beneficiarse de ayudas de la PAC.","LANDUSE.AGRICULTURE2009":"Las parcelas agrícolas (2009)","LANDUSE.AGRICULTURE2009.description":"Esta capa muestra los islotes anónimos registro de paquetes gráfico (RPG) y su grupo de cultivos principales reportados en 2009 por los agricultores para beneficiarse de ayudas de la PAC.","ORTHOIMAGERY.ORTHOPHOTOS.GENEVE":"Del Estado de Ginebra","ORTHOIMAGERY.ORTHOPHOTOS.GENEVE.description":"Orto-fotografías, 10 cm de resolución (2010).","ORTHOIMAGERY.ORTHOPHOTOS2000-2005":"Orto-fotografías (2000-2005)","ORTHOIMAGERY.ORTHOPHOTOS2000-2005.description":"Primera cobertura nacional (2000-2005) de orto-imágenes con una resolución de 50 cm.","GEOGRAPHICALGRIDSYSTEMS.FRANCERASTER":"FranceRaster®","GEOGRAPHICALGRIDSYSTEMS.FRANCERASTER.description":"FranceRaster® es una serie de imágenes georreferenciadas que abarcan el territorio continental de Francia y el extranjero. Se produce con la base de datos vectorial del IGN que mejor se adapte a cada escala con una simbología uniforme. De acuerdo con las escalas, FranceRaster ®, permite la visualización de las carreteras y el ferrocarril temas, el marco, hidrografía, vegetación, electrónico, dirección de viaje, nombres ...","NATURALRISKZONES.1910FLOODEDWATERSHEDS":"Seine (PHEC)","NATURALRISKZONES.1910FLOODEDWATERSHEDS.description":"Esta capa de mapa representa el agua más alta conocida (PHEC) en la cuenca del Sena, es decir, áreas geográficas inundados por la inundación más grande conocido y documentado en cada río.","NATURALRISKZONES.1910FLOODEDCELLARS":"Inundados sótanos (1910)","NATURALRISKZONES.1910FLOODEDCELLARS.description":"Mapa de sótanos inundados durante la inundación del Sena y de 1910.  Este mapa se basa en testimonios.","GEOGRAPHICALGRIDSYSTEMS.ETATMAJOR40":"Mapas de État-Major (1:40 000)","GEOGRAPHICALGRIDSYSTEMS.ETATMAJOR40.description":"Esta capa se forma por la asamblea de los 978 dibujos originales del mapa de Estado Mayor de la establecida en el siglo XIX. Estas encuestas escritas a mano y coloreado, a la 1: 40 000, se establecieron entre 1825 y 1866.","LANDCOVER.FORESTINVENTORY.V1":"Inventario forestal (v1)","LANDCOVER.FORESTINVENTORY.V1.description":"Inventario forestal (1987-2004)","LANDCOVER.FORESTINVENTORY.V2":"Inventario forestal (v2)","LANDCOVER.FORESTINVENTORY.V2.description":"Inventario forestal (2005+)","GEOGRAPHICALGRIDSYSTEMS.ADMINISTRATIVEUNITS":"Mapa de las divisiones administrativas","GEOGRAPHICALGRIDSYSTEMS.ADMINISTRATIVEUNITS.description":"Mapa de las divisiones administrativas","GEOGRAPHICALNAMES.NAMES":"Los nombres geográficos","GEOGRAPHICALNAMES.NAMES.description":"Los nombres geográficos","div.not.found":"${id} no se encontró en el documento: verifique si '${id}' existe.","proxy.not.set":"No se ha configurado un proxy: la obtención de información sobre el contrato podria fallar.","cookies.not.enabled":"Las cookies son discapacitados. Por favor, les permiten.","geoRM.getConfig":"No es posible obtener información relativa a la clave '${key}' - Verifique su conexión.","geoRM.getToken":"No es posible obtener la ficha asociada a la clave '${key}' - Verifique su conexión.","geoRM.failed":"No pudo obtener una muestra válida relativa a la clave '${key}'","geoRM.forbidden":"Clave de la API no se encuentra o no ${layer} con el apoyo de contrato de la aplicación de la API.","GPX.version":"La versión ${gpxVersion} de GPX no es compatible","XLS.version":"La versión ${xlsVersion} de XLS no es compatible con el servicio ${coreService}","Not.conformal.XLS":"${part} falta en el XML","olControlMeasurePath.title":"Medida de distancia","olControlMeasurePolygon.title":"Medida de superficie","waiting.measurement":"A la espera de la selección...","length.measurement":"Longitud","area.measurement":"Superficie","gpControlLayerSwitcher.label":"Capas","gpLayer.metadataURL":"Más información sobre esta capa...","gpLayer.dataURL":"Acceso al servicio de descargas","gpControlPanelToggle.closed":"Mostrar la barra de herramientas","gpControlPanelToggle.opened":"Ocultar la barra de herramientas","gpControlRemoveLayer.title":"Quitar la capa","gpControlLayerOpacity.title":"Regla de transparencia","gpControlZoomToLayerMaxExtent.title":"Ampliar el área de la capa","gpControlMousePosition.longitude":"Longitud","gpControlMousePosition.latitude":"Latitud","gpControlMousePosition.easting":"Abscisa","gpControlMousePosition.northing":"Ordenada","gpControlMousePosition.north":"N","gpControlMousePosition.south":"S","gpControlMousePosition.east":"Or","gpControlMousePosition.west":"Oe","gpControlMousePosition.sexa":"grados sexagesimales","gpControlMousePosition.deg":"grados decimales","gpControlMousePosition.gon":"grados","gpControlMousePosition.rad":"radianes","gpControlMousePosition.km":"kilómetros","gpControlMousePosition.m":"metros","gpControlMousePosition.cm":"centimetros","gpControlMousePosition.utmZone":"Zona","gpControlToolBox.label":"Herra.","gpControlZoomBar.world":"Mundo","gpControlZoomBar.state":"Pais","gpControlZoomBar.country":"Provin.","gpControlZoomBar.town":"Ciudad","gpControlZoomBar.street":"Calle","gpControlZoomBar.house":"Casa","gpControlEditingToolbar.drawpoint":"Situar un punto","gpControlEditingToolbar.drawline":"Dibujar una linea","gpControlEditingToolbar.drawpolygon":"Dibujar un poligono","gpControlEditingToolbar.dragfeature":"Desplazar un objeto","gpControlEditingToolbar.modifyfeature":"Modificar un objeto","gpControlEditingToolbar.deletefeature":"Destruir un objeto","gpControlEditingToolbar.selectfeature":"Seleccionar un objeto","gpControlEditingToolbar.navigation":"Navegar","gpControlAddImageLayer.title":"Añadir una capa de imagen...","gpControlAddImageLayer.layerUrl":"URL : ","gpControlAddImageLayer.layerUrl.help":"Dirección base del servicio","gpControlAddImageLayer.layerType":"Tipo : ","gpControlAddImageLayer.layerType.help":"elija un valor de la lista","gpControlAddImageLayer.layerType.WMS":"Web Map Service","gpControlAddImageLayer.layerType.WMSC":"OSGeO WMS-C","gpControlAddImageLayer.button.add":"Añadir","gpControlAddImageLayer.button.cancel":"Cancelar","wms.caps.no.compatible.srs":"No compatible encontrado capa","ogc.caps.unknown.service":"${serviceType} no es un ${expectedType}","gpControlAddVectorLayer.title":"Añadir una capa vectorial...","gpControlAddVectorLayer.layerName":"Nombre : ","gpControlAddVectorLayer.layerName.help":"ejemplo : mi capa","gpControlAddVectorLayer.layerType":"Tipo : ","gpControlAddVectorLayer.layerType.help":"elija un valor de la lista","gpControlAddVectorLayer.layerType.Point":"puntual","gpControlAddVectorLayer.layerType.LineString":"lineal","gpControlAddVectorLayer.layerType.Polygon":"superficial","gpControlAddVectorLayer.layerType.KML":"recurso KML","gpControlAddVectorLayer.layerType.GPX":"recurso GPX","gpControlAddVectorLayer.layerType.OSM":"recurso OSM","gpControlAddVectorLayer.layerType.GeoRSS":"recurso GeoRSS","gpControlAddVectorLayer.layerType.WFS":"recurso WFS","gpControlAddVectorLayer.layerUrl":"URL : ","gpControlAddVectorLayer.layerUrl.help":"local o a distancia","gpControlAddVectorLayer.layerFreeHand":"Dibujo a mano alzada ? ","gpControlAddVectorLayer.layerFreeHand.help":"permite el dibujo a mano alzada","gpControlAddVectorLayer.button.add":"Añadir","gpControlAddVectorLayer.button.cancel":"Cancelar","wfs.caps.no.feature.found":"No objetos encontrados","wfs.caps.unsupported.version":"WFS versión ${version} no es compatible","gpControlLocationUtilityService.geonames.title":"Buscar un lugar","gpControlLocationUtilityService.geocode.title":"Buscar una dirección","gpControlLocationUtilityService.reverse.geocode.title":"Buscar las direcciones en torno a un punto","gpControlLocationUtilityServiceGeoNames.title":"Buscar un lugar:","gpControlLocationUtilityServiceGeoNames.name":"Lugar: ","gpControlLocationUtilityServiceGeoNames.name.help":"ejemplo: Saint-Mandé","gpControlLocationUtilityServiceGeoNames.button.cancel":"Cancelar","gpControlLocationUtilityServiceGeoNames.button.search":"Buscar","gpControlLocationUtilityServiceGeocode.title":"Buscar una dirección:","gpControlLocationUtilityServiceGeocode.address":"Calle: ","gpControlLocationUtilityServiceGeocode.address.help":"ejemplo: 2, avenue Pasteur","gpControlLocationUtilityServiceGeocode.municipality":"Localidad:","gpControlLocationUtilityServiceGeocode.municipality.help":"ejemplo: Saint-Mandé","gpControlLocationUtilityServiceGeocode.postalcode":"Código postal: ","gpControlLocationUtilityServiceGeocode.postalcode.help":"ejemplo: 94165","gpControlLocationUtilityServiceGeocode.name":"Lugar:","gpControlLocationUtilityServiceGeocode.name.help":"ejemplo: Saint-Mandé o 94165","gpControlLocationUtilityServiceGeocode.button.cancel":"Cancelar","gpControlLocationUtilityServiceGeocode.button.search":"Buscar","gpControlLocationUtilityServiceReverseGeocode.longitude":"Longitud: ","gpControlLocationUtilityServiceReverseGeocode.longitude.help":"ejemplo: dd.mmss en coordenadas geográficas","gpControlLocationUtilityServiceReverseGeocode.latitude":"Latitud: ","gpControlLocationUtilityServiceReverseGeocode.latitude.help":"ejemplo: dd.mmss en coordenadas geográficas","gpControlLocationUtilityServiceReverseGeocode.title":"Buscar lugares próximos:","gpControlLocationUtilityServiceReverseGeocode.button.cancel":"Cancelar","gpControlLocationUtilityServiceReverseGeocode.button.search":"Buscar","azimuth.measurement":"Acimut","gpControlMeasureAzimuth.title":"Medición de acimut","gpControlMeasureAzimuth.azimuth":"Acimut","gpControlMeasureAzimuth.azimuth.help":"el ángulo de una dirección contado en el sentido de las agujas del reloj a partir del norte geográfico","gpControlMeasureAzimuth.distance":"Longitud","gpControlMeasureAzimuth.distance.help":"Longitud","OpenLayers.Control.WMSGetFeatureInfo.title":"La identificación de los objetos","lus.not.match":"No se ha encontrado ninguna correspondencia","geocoded.address.popup.title":"Dirección","geocoded.address.popup.postalCode":"Código postal","geocoded.address.popup.places":"Lugares",CountrySubdivision:"Departamento",CountrySecondarySubdivision:"Municipio",Municipality:"Localidad",MunicipalitySubdivision:"Barrio",TOS:"Condiciones del servicio","utm.zone":"UTM","*":""};Geoportal.Lang.it={ATF:"Territori Francesi del Sud",FXX:"Francia continentale",GLP:"Guadalupa",GUF:"Guiana francese",MTQ:"Martinica",MYT:"Mayotte",NCL:"Nuova Caledonia",PYF:"Polinesia Francese",REU:"Riunione",SPM:"Saint Pierre e Miquelon",WLF:"Wallis e Futuna",ANF:"Antille francesi",ASP:"San Paolo e Amsterdam",CRZ:"Crozet",EUE:"Europa",KER:"Kerguelen",SBA:"Saint Barthélémy",SMA:"Saint Martin",WLD:"Il mondo","GEOGRAPHICALGRIDSYSTEMS.MAPS":"IGN Mappe","GEOGRAPHICALGRIDSYSTEMS.MAPS.description":"Le carte sono ricavate dalla banca dati SCAN dell'IGN : Mondo, Europa Politica, SCAN 1 000®, SCAN 500®, SCAN Régional®, SCAN 200®, SCAN Départemental®, SCAN 100®, SCAN 50®, SCAN 25®.","ORTHOIMAGERY.ORTHOPHOTOS":"Orto immagini","ORTHOIMAGERY.ORTHOPHOTOS.description":"Le fotografie aeree sposano la precisione geometrica della carta alla richezza di una foto con una risoluzione compresa tra 50 e 15 cm o di immagini satellitarie con una risoluzione compresa tra 10 e 20 m.","ELEVATION.SLOPES":"Colori ipsometrici - Elevazione","ELEVATION.SLOPES.description":"I modelli numerici del terreno sono ricavati da dati della banca dati BD ALTI® che descrive il territorio francese con delle curve di livello. L'equidistanza delle curve pueden andare da 5 a 40 m. I dati iniziali sono stati impostati su delle carte IGN alla scala di 1:25 000 o 1:50 000, a partire da una restituzione ricavata da riprese aeree alla scala di 1:20 000, 1:30 000 o 1:60 000.","ELEVATION.LEVEL0":"Tratto costiero - Elevazione","ELEVATION.LEVEL0.description":"Lo 0 dei mari è ricavato dal datbase LITTO3D®, prodotto realizzato in comune dallo SHOM e dall'IGN.","CADASTRALPARCELS.PARCELS":"Parcelle catastali","CADASTRALPARCELS.PARCELS.description":"Le informazioni catastali numeriche comportano i riferimenti geografici, continuano sull'insieme del territorio francese e sono state ricavate a partire da un assemblaggio dei piani catastali smaterializzati.","HYDROGRAPHY.HYDROGRAPHY":"Idrografia","HYDROGRAPHY.HYDROGRAPHY.description":"L'idrografia terrestre è ricavata a partire da un assemblaggio dei dati dei database BD TOPO®, BD CARTHAGE®, EuroRegionalMap e EuroGlobalMap.","TRANSPORTNETWORKS.ROADS":"Rete stradale - Reti di trasporto","TRANSPORTNETWORKS.ROADS.description":"La rete stradale è ricavata a partire da un assemblaggio dei dati dei database BD TOPO®, BD CARTO®, EuroRegionalMap e EuroGlobalMap.","TRANSPORTNETWORKS.RAILWAYS":"Rete ferroviaria - Reti di trasporto","TRANSPORTNETWORKS.RAILWAYS.description":"La rete ferroviaria è ricavata a partire da un assemblaggio dei dati dei database BD TOPO®, BD CARTO®, EuroRegionalMap e EuroGlobalMap.","TRANSPORTNETWORKS.RUNWAYS":"Aria di rete - Reti di trasporto","TRANSPORTNETWORKS.RUNWAYS.description":"Le piste degli aeroporti e aerodromi sono ricavate a partire da un assemblaggio dei dati dei database BD TOPO® e BD CARTO®","BUILDINGS.BUILDINGS":"Edifici","BUILDINGS.BUILDINGS.description":"Gli edifici e le zone costruite sono ricavati a partire da un assemblaggio dei dati dei database BD TOPO®, BD CARTO®, EuroRegionalMap e EuroGlobalMap.","UTILITYANDGOVERNMENTALSERVICES.ALL":"Servizi di pubblica utilità e servizi amministrativi","UTILITYANDGOVERNMENTALSERVICES.ALL.description":"Le diverse reti di trasporto dell'energia sono ricavate a partire da un assemblaggio dei dati dei database BD TOPO® e BD CARTO®.","ADMINISTRATIVEUNITS.BOUNDARIES":"Unità amministrative","ADMINISTRATIVEUNITS.BOUNDARIES.description":"Le unitè amministrative della Francia sono ricavate a partire da un assemblaggio dei dati dei database BD TOPO®, BD CARTO®, EuroRegionalMap e EuroBoundaryMap.","LANDCOVER.CORINELANDCOVER":"Copertura del suolo","LANDCOVER.CORINELANDCOVER.description":"CORINE 2006","GEOGRAPHICALGRIDSYSTEMS.COASTALMAPS":"Coastal mappe","GEOGRAPHICALGRIDSYSTEMS.COASTALMAPS.description":"Coastal mappe","GEOGRAPHICALGRIDSYSTEMS.1900TYPEMAPS":"Topografiche del tipo 1900 mappe","GEOGRAPHICALGRIDSYSTEMS.1900TYPEMAPS.description":"Mappe a 1: 50 000 (prima edizione dopo la Biblioteca Mappa di IGN).","GEOGRAPHICALGRIDSYSTEMS.CASSINI":"Cassini mappe","GEOGRAPHICALGRIDSYSTEMS.CASSINI.description":"Cassini mappe","ORTHOIMAGERY.ORTHOPHOTOS.COAST2000":"Ortofoto della costa (2000)","ORTHOIMAGERY.ORTHOPHOTOS.COAST2000.description":"Ortho-fotografia della costa del Mare del Nord, Canale della Manica e dell'Atlantico.","LANDUSE.AGRICULTURE2007":"parcelle agricole (2007)","LANDUSE.AGRICULTURE2007.description":"Questo strato mostra gli isolotti anonimi Registro Parcel grafico (RPG) e il loro gruppo di colture principali segnalato nel 2007 da parte degli agricoltori di beneficiare di sovvenzioni PAC.","LANDUSE.AGRICULTURE2008":"parcelle agricole (2008)","LANDUSE.AGRICULTURE2008.description":"Questo strato mostra gli isolotti anonimi Registro Parcel grafico (RPG) e il loro gruppo di colture principali segnalato nel 2008 da parte degli agricoltori di beneficiare di sovvenzioni PAC.","LANDUSE.AGRICULTURE2009":"parcelle agricole (2009)","LANDUSE.AGRICULTURE2009.description":"Questo strato mostra gli isolotti anonimi Registro Parcel grafico (RPG) e il loro gruppo di colture principali segnalato nel 2009 da parte degli agricoltori di beneficiare di sovvenzioni PAC.","ORTHOIMAGERY.ORTHOPHOTOS.GENEVE":"Stato di Ginevra","ORTHOIMAGERY.ORTHOPHOTOS.GENEVE.description":"Orto-fotografías, 10 cm de resolución (2010).","ORTHOIMAGERY.ORTHOPHOTOS2000-2005":"Orto-fotografías (2000-2005)","ORTHOIMAGERY.ORTHOPHOTOS2000-2005.description":"Prima copertura nazionale (2000-2005) di orto-immagini con risoluzione di 50 centimetri.","GEOGRAPHICALGRIDSYSTEMS.FRANCERASTER":"FranceRaster®","GEOGRAPHICALGRIDSYSTEMS.FRANCERASTER.description":"FranceRaster® è una serie di immagini georeferenziate che copre la Francia continentale e territori d'oltremare. E 'prodotto con il database vettoriale del IGN più adatta a ogni scala con una simbologia uniforme.  Secondo le scale, FranceRaster ®, consente di visualizzare le strade tematiche e la ferrovia, telaio, idrografia, vegetazione, indirizzi, direzione di marcia, nomi ...","NATURALRISKZONES.1910FLOODEDWATERSHEDS":"Seine (PHEC)","NATURALRISKZONES.1910FLOODEDWATERSHEDS.description":"Questo strato mappa rappresenta l'acqua più alto noto (PHEC) sul bacino della Senna, ovvero zone geografiche allagati a causa della più grande alluvione noti e documentati su ogni fiume.","NATURALRISKZONES.1910FLOODEDCELLARS":"Cantine, seminterrati (1910)","NATURALRISKZONES.1910FLOODEDCELLARS.description":"Mappa di cantine allagate durante inondazione della Senna del 1910. Questa mappa è basata su testimonianze.","GEOGRAPHICALGRIDSYSTEMS.ETATMAJOR40":"État-Major mappe (1:40 000)","GEOGRAPHICALGRIDSYSTEMS.ETATMAJOR40.description":"Questo strato è costituito dall'assemblea dei 978 disegni originali della mappa di stato maggiore stabilita nel diciannovesimo secolo. Queste indagini scritta a mano e colorati, a 1: 40 000, sono stati istituiti tra il 1825 e il 1866.","LANDCOVER.FORESTINVENTORY.V1":"Inventario Forestale (v1)","LANDCOVER.FORESTINVENTORY.V1.description":"Inventario Forestale (1987-2004)","LANDCOVER.FORESTINVENTORY.V2":"Inventario Forestale (v2)","LANDCOVER.FORESTINVENTORY.V2.description":"Inventario Forestale (2005+)","GEOGRAPHICALGRIDSYSTEMS.ADMINISTRATIVEUNITS":"Mappa delle divisioni amministrative","GEOGRAPHICALGRIDSYSTEMS.ADMINISTRATIVEUNITS.description":"Mappa delle divisioni amministrative","GEOGRAPHICALNAMES.NAMES":"Geografica nomi","GEOGRAPHICALNAMES.NAMES.description":"Geografica nomi","div.not.found":"${id} non trovato nel documento : verificare l'esistenza reale di '${id}'.","proxy.not.set":"Nessuna configurazione per il proxy : è possibile che l'ottenimento delle informazioni richieste sul contratto fallisca.","cookies.not.enabled":"Cookie sono disabilitati. Per favore, consentire loro.","geoRM.getConfig":"Impossibile di ottenere le informazioni relative alla chiave '${key}' - Verificare la propria connessione.","geoRM.getToken":"Impossibile di ottenere il gettone associato alla chiave '${key}' - Verificare la propria connessione.","geoRM.failed":"Impossibile di ottenere uno token valido relative alla chiave '${key}'","geoRM.forbidden":"API key è mancante o non supportato dal ${layer} contratto l'applicazione dell'API.","GPX.version":"Versione ${gpxVersion} GPX non supportata","XLS.version":"Versione ${xlsVersion} XLS non supportata per il servizio ${coreService}","Not.conformal.XLS":"${part} non è presente nello XML","olControlMeasurePath.title":"Misura di distanza","olControlMeasurePolygon.title":"Misura di superficie","waiting.measurement":"In attesa di input...","length.measurement":"Lunghezza","area.measurement":"Surfacie","gpControlLayerSwitcher.label":"Strati","gpLayer.metadataURL":"Maggiori informazioni su questo strato...","gpLayer.dataURL":"Accesso al servizio di download","gpControlPanelToggle.closed":"Visualizzare la barra degli attrezzi","gpControlPanelToggle.opened":"Mascherare la barra degli attrezzi","gpControlRemoveLayer.title":"Ritirare lo strato","gpControlLayerOpacity.title":"Regola di trasparenza","gpControlZoomToLayerMaxExtent.title":"Zoom sul campo di applicazione dello strato","gpControlMousePosition.longitude":"Longitudine","gpControlMousePosition.latitude":"Latitudine","gpControlMousePosition.easting":"Ascissa","gpControlMousePosition.northing":"Ordinata","gpControlMousePosition.north":"N","gpControlMousePosition.south":"S","gpControlMousePosition.east":"E","gpControlMousePosition.west":"O","gpControlMousePosition.sexa":"gradi sessagesimali","gpControlMousePosition.deg":"gradi decimali","gpControlMousePosition.gon":"gradi","gpControlMousePosition.rad":"radianti","gpControlMousePosition.km":"chilometri","gpControlMousePosition.m":"metri","gpControlMousePosition.cm":"centimetri","gpControlMousePosition.utmZone":"Zona","gpControlToolBox.label":"Attrezzi","gpControlZoomBar.world":"Mondo","gpControlZoomBar.state":"Stato","gpControlZoomBar.country":"Paese","gpControlZoomBar.town":"Città","gpControlZoomBar.street":"Via","gpControlZoomBar.house":"Casa","gpControlEditingToolbar.drawpoint":"Inserire un punto","gpControlEditingToolbar.drawline":"Disegnare una linea","gpControlEditingToolbar.drawpolygon":"Disegnare un poligono","gpControlEditingToolbar.dragfeature":"Spostare un oggetto","gpControlEditingToolbar.modifyfeature":"Modificare un oggetto","gpControlEditingToolbar.deletefeature":"Distruggere un oggetto","gpControlEditingToolbar.selectfeature":"Selezionare un oggetto","gpControlEditingToolbar.navigation":"Navigare","gpControlAddImageLayer.title":"Aggiungere uno strato immagine...","gpControlAddImageLayer.layerUrl":"URL : ","gpControlAddImageLayer.layerUrl.help":"indirizzo di base del servizio","gpControlAddImageLayer.layerType":"Tipo :","gpControlAddImageLayer.layerType.help":"Scegliere un valore nella lista","gpControlAddImageLayer.layerType.WMS":"Web Map Service","gpControlAddImageLayer.layerType.WMSC":"OSGeO WMS-C","gpControlAddImageLayer.button.add":"Aggiungere","gpControlAddImageLayer.button.cancel":"Cancel","wms.caps.no.compatible.srs":"Non compatibile strato trovato","ogc.caps.unknown.service":"${serviceType} non è un ${expectedType}","gpControlAddVectorLayer.title":"Annullare","gpControlAddVectorLayer.layerName":"Nome :","gpControlAddVectorLayer.layerName.help":"Ad esempio : il mio strato","gpControlAddVectorLayer.layerType":"Tipo :","gpControlAddVectorLayer.layerType.help":"Scegliere un valore nella lista","gpControlAddVectorLayer.layerType.Point":"puntuale","gpControlAddVectorLayer.layerType.LineString":"lineare","gpControlAddVectorLayer.layerType.Polygon":"superficiale","gpControlAddVectorLayer.layerType.KML":"risorsa KML","gpControlAddVectorLayer.layerType.GPX":"risorsa GPX","gpControlAddVectorLayer.layerType.OSM":"risorsa OSM","gpControlAddVectorLayer.layerType.GeoRSS":"risorsa GeoRSS","gpControlAddVectorLayer.layerType.WFS":"risorsa WFS","gpControlAddVectorLayer.layerUrl":"URL : ","gpControlAddVectorLayer.layerUrl.help":"locale o a distanza","gpControlAddVectorLayer.layerFreeHand":"a mano libera ? ","gpControlAddVectorLayer.layerFreeHand.help":"permette il disegno a mano libera","gpControlAddVectorLayer.button.add":"Aggiungere","gpControlAddVectorLayer.button.cancel":"Annullare","wfs.caps.no.feature.found":"Nessun oggetto trovato","wfs.caps.unsupported.version":"WFS versione ${version} non supportata","gpControlLocationUtilityService.geonames.title":"Ricercare una località","gpControlLocationUtilityService.geocode.title":"Ricercare un indirizzo","gpControlLocationUtilityService.reverse.geocode.title":"Ricercare gli indirizzi intorno a un punto","gpControlLocationUtilityServiceGeoNames.title":"Ricercare una località :","gpControlLocationUtilityServiceGeoNames.name":"Località :","gpControlLocationUtilityServiceGeoNames.name.help":"Ad esempio : Saint-Mandé","gpControlLocationUtilityServiceGeoNames.button.cancel":"Annullare","gpControlLocationUtilityServiceGeoNames.button.search":"Ricercare","gpControlLocationUtilityServiceGeocode.title":"Ricercare un indirizzo","gpControlLocationUtilityServiceGeocode.address":"Via :","gpControlLocationUtilityServiceGeocode.address.help":"Ad esempio : 2, avenue Pasteur","gpControlLocationUtilityServiceGeocode.municipality":"Città :","gpControlLocationUtilityServiceGeocode.municipality.help":"Ad esempio : Saint-Mandé","gpControlLocationUtilityServiceGeocode.postalcode":"Codice di avviamento postale : ","gpControlLocationUtilityServiceGeocode.postalcode.help":"Ad esempio : 94165","gpControlLocationUtilityServiceGeocode.name":"Località :","gpControlLocationUtilityServiceGeocode.name.help":"Ad esempio : Saint-Mandé ou 94165","gpControlLocationUtilityServiceGeocode.button.cancel":"Annullare","gpControlLocationUtilityServiceGeocode.button.search":"Ricercare","gpControlLocationUtilityServiceReverse.title":"Ricercare dei luoghi nelle vicinanze","gpControlLocationUtilityServiceReverse.longitude":"Longitudine :","gpControlLocationUtilityServiceReverse.longitude.help":"Ad esempio : dd.mmss in coordinate geografiche","gpControlLocationUtilityServiceReverse.latitude":"Latitudine","gpControlLocationUtilityServiceReverse.latitude.help":"Ad esempio : dd.mmss in coordinate geografiche","gpControlLocationUtilityServiceReverse.button.cancel":"Annullare","gpControlLocationUtilityServiceReverse.button.search":"Ricercare","azimuth.measurement":"Azimuth","gpControlMeasureAzimuth.title":"Misura di azimuth","gpControlMeasureAzimuth.azimuth":"Azimuth","gpControlMeasureAzimuth.azimuth.help":"indica un angolo tra un punto e un piano di riferimento","gpControlMeasureAzimuth.distance":"Lunghezza","gpControlMeasureAzimuth.distance.help":"Lunghezza","OpenLayers.Control.WMSGetFeatureInfo.title":"Identificare gli oggetti","lus.not.match":"Non trovata nessuna corrispondenza","geocoded.address.popup.title":"Indirizzo","geocoded.address.popup.postalCode":"Codice di avviamento postale :","geocoded.address.popup.places":"Località",CountrySubdivision:"Provincia",CountrySecondarySubdivision:"Comune",Municipality:"Città",MunicipalitySubdivision:"Quartiere",TOS:"Termini di servizio","utm.zone":"UTM","*":""};Geoportal.Control=OpenLayers.Class(OpenLayers.Control,{initialize:function(a){this.displayClass=this.CLASS_NAME.replace("Geoportal.","gp").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+"_")}},changeLang:function(a){},setSelectable:function(b){if(!this.allowSelection){var a=(b===false?"on":"off");var d=(b===false?OpenLayers.Function.False:OpenLayers.Function.True);OpenLayers.Element.removeClass(this.div,"olControlNoSelect");if(b===false){OpenLayers.Element.addClass(this.div,"olControlNoSelect")}this.div.setAttribute("unselectable",a,0);this.div.onselectstart=d}},CLASS_NAME:"Geoportal.Control"});Geoportal.Control.selectFeature=function(a){if(a){if(!a.popup){a.createPopup()}if(a.layer&&a.layer.map&&a.popup){a.layer.map.addPopup(a.popup)}}};Geoportal.Control.renderFeatureAttributes=function(d){if(!d){return["",""]}var f='<table border="1" cellspacing="0" cellpadding="0">';var b="";for(var a in d.attributes){if(d.attributes.hasOwnProperty(a)){if(a.toLowerCase()=="name"){if(d.attributes[a]&&typeof(d.attributes[a])=="object"){b=d.attributes[a].value}else{b=d.attributes[a]}b=b||""}f+='<tr><td class="gpAttName">'+a+'</td><td class="gpAttValue">'+(d.attributes[a]&&typeof(d.attributes[a])=="object"?d.attributes[a].value:d.attributes[a])||"</td></tr>"}}f+="</table>";return[b,f]};Geoportal.Control.hoverFeature=function(b){if(b){if(!b.popup){var a=Geoportal.Control.renderFeatureAttributes(b);b.popup=new OpenLayers.Popup.FramedCloud("chicken",b.geometry.getBounds().getCenterLonLat(),null,'<div class="gpPopupHead">'+a[0]+'</div><div class="gpPopupBody">'+a[1]+"</div>",null,false);Geoportal.Popup.completePopup(b.popup,{maxSize:new OpenLayers.Size(300,300),overflow:"auto"})}if(b.layer&&b.layer.map&&b.popup){b.layer.map.addPopup(b.popup,true)}}};Geoportal.Control.unselectFeature=function(a){if(a){if(a.popup){a.popup.destroy();a.popup=null}}};Geoportal.Format=OpenLayers.Class(OpenLayers.Format,{CLASS_NAME:"Geoportal.Format"});Geoportal.Handler=OpenLayers.Class(OpenLayers.Handler,{CLASS_NAME:"Geoportal.Handler"});Geoportal.Layer=OpenLayers.Class(OpenLayers.Layer,{CLASS_NAME:"Geoportal.Layer"});Geoportal.Layer.onPreAddLayer=function(a){if(a==null){return}if(a.layer==null){return}if(a.layer.isBaseLayer){return}if(a.layer.getCompatibleProjection(this)!==null){if(!a.layer.savedStates[this.id]){a.layer.savedStates[this.id]={}}a.layer.savedStates[this.id].visibility=!!a.layer.visibility;if(a.layer.opacity!=undefined){a.layer.savedStates[this.id].opacity=a.layer.opacity}}};Geoportal.Layer.Aggregate=OpenLayers.Class(Geoportal.Layer,{layers:null,initialize:function(b,d,a){Geoportal.Layer.prototype.initialize.apply(this,[b,a]);this.layers=[];this.addLayers(d)},destroy:function(d){if(this.map){this.map.events.unregister("removelayer",this,this.remove)}if(this.layers){for(var b=0,a=this.layers.length;b<a;b++){this.layers[b].aggregate=null}this.layers=null}Geoportal.Layer.prototype.destroy.apply(this,arguments)},remove:function(b){if(b.layer!=this){return}if(this.layers){var f;for(var d=0,a=this.layers.length;d<a;d++){f=this.layers[d];f.map.removeLayer(this.layers[d],false)}}},clone:function(){var a=Geoportal.Layer.prototype.clone.apply(this,arguments);a.addLayers(this.layers)},setMap:function(g){if(this.map!=null){return}if(!this.layers){return}var d;for(var b=0,a=this.layers.length;b<a;b++){d=this.layers[b];if(d.map==null){g.addLayer(d)}}var f=this.maxExtent==null;Geoportal.Layer.prototype.setMap.apply(this,arguments);if(f){this.maxExtent=null;for(var b=0,a=this.layers.length;b<a;b++){d=this.layers[b];if(b==0){this.maxExtent=d.maxExtent.clone()}else{this.maxExtent.extend(d)}}}this.setZIndex(this.getZIndex());this.map.events.register("removelayer",this,this.remove)},removeMap:function(f){if(this.map==null){return}if(this.layers){var d;for(var b=0,a=this.layers.length;b<a;b++){d=this.layers[b];if(d.map!=null){d.map.removeLayer(d)}}}},setVisibility:function(b){if(b!=this.visibility){this.visibility=b;Geoportal.Layer.prototype.display.apply(this,arguments);if(this.layers&&this.map!=null){var g,f;for(var d=0,a=this.layers.length;d<a;d++){g=this.layers[d];if(g.isBaseLayer){continue}if(g.territory!==undefined&&this.map.baseLayer.territory!==undefined){if(g.territory==this.map.baseLayer.territory){if(b){g.setVisibility(g.calculateInRange())}else{g.setVisibility(false)}}continue}f=g.getNativeProjection();if(!f){continue}if(!(f.equals(this.map.baseLayer.nativeProjection)||(f.getProjName()=="longlat"&&f.isCompatibleWith(this.map.baseLayer.getNativeProjection())))){continue}if(this.map.baseLayer.maxExtent.intersectsBounds(g.restrictedExtent||g.maxExtent)){if(b){g.setVisibility(g.calculateInRange())}else{g.setVisibility(false)}}}}if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"visibility"})}this.events.triggerEvent("visibilitychanged")}},display:function(f){var g=this.calculateInRange();if(f!=(this.div.style.display!="none")){this.div.style.display=(f&&g)?"block":"none";if(this.layers){var d;for(var b=0,a=this.layers.length;b<a;b++){d=this.layers[b];d.display(f)}}}},initResolutions:function(){if(this.layers){var g;var d=typeof(this.options.minZoomLevel)=="number";var b=typeof(this.options.maxZoomLevel)=="number";for(var f=0,a=this.layers.length;f<a;f++){g=this.layers[f];if(f==0){if(!d&&typeof(g.minZoomLevel)=="number"){this.options.minZoomLevel=g.minZoomLevel}if(!b&&typeof(g.maxZoomLevel)=="number"){this.options.maxZoomLevel=g.maxZoomLevel}}else{if(!d&&typeof(g.minZoomLevel)=="number"){this.options.minZoomLevel=Math.min(this.options.minZoomLevel,g.minZoomLevel)}if(!b&&typeof(g.maxZoomLevel)=="number"){this.options.maxZoomLevel=Math.max(this.options.maxZoomLevel,g.maxZoomLevel)}}}}Geoportal.Layer.prototype.initResolutions.apply(this,arguments)},getDataExtent:function(){var f=null;if(this.layers){var d;for(var b=0,a=this.layers.length;b<a;b++){d=this.layers[b];if(b==0){f=d.getDataExtent()}else{f.extend(d.getDataExtent())}}}return f},setOpacity:function(b){if(b!=this.opacity){Geoportal.Layer.prototype.setOpacity.apply(this,arguments);if(this.layers){var f;for(var d=0,a=this.layers.length;d<a;d++){f=this.layers[d];f.setOpacity(b)}}}},setZIndex:function(f){this.div.style.zIndex=f;if(this.layers){var d;for(var b=0,a=this.layers.length;b<a;b++){d=this.layers[b];if(d.div){d.setZIndex(f-b-1)}}}},addLayer:function(f){var b;for(var d=0,a=this.layers.length;d<a;d++){b=this.layers[d];if(b==f){var g=OpenLayers.i18n("layerAlreadyAdded",{layerName:f.name});OpenLayers.Console.warn(g);return}}f.displayInLayerSwitcher=false;f.visibility=this.visibility;f.aggregate=this;this.layers.push(f);if(this.map){if(f.map==null){this.map.addLayer(f)}this.initResolutions();this.setZIndex(this.getZIndex())}},addLayers:function(d){if(!d){return}if(!(d instanceof Array)){this.addLayer(d);return}for(var b=0,a=d.length;b<a;b++){this.addLayer(d[b])}},CLASS_NAME:"Geoportal.Layer.Aggregate"});Geoportal.OLS=OpenLayers.Class({id:null,initialize:function(a){OpenLayers.Util.extend(this,a);if(this.id==null){this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")}},destroy:function(){this.id=null},CLASS_NAME:"Geoportal.OLS"});Geoportal.Popup=OpenLayers.Class(OpenLayers.Popup,{feature:null,initialize:function(b,g,l,f,a,h,m){if(b==null){b=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")}this.id=b;this.lonlat=g;this.contentSize=(l!=null?l:new OpenLayers.Size(OpenLayers.Popup.WIDTH,OpenLayers.Popup.HEIGHT));if(f!=null){this.contentHTML=f}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="gpPopup";var d=this.id+"_GroupDiv";this.groupDiv=OpenLayers.Util.createDiv(d,null,null,null,"relative",null,"hidden");var j=this.div.id+"_contentDiv";this.contentDiv=OpenLayers.Util.createDiv(j,null,this.contentSize.clone(),null,"relative",null,"hidden");this.contentDiv.className="gpPopupContent";this.groupDiv.appendChild(this.contentDiv);this.div.appendChild(this.groupDiv);this.autoSize=true;this.feature=m;if(a){this.addCloseBox(h)}this.registerEvents();if(this.feature){this.feature.layer.events.register("visibilitychanged",this,this.onVisibilityChanged)}},destroy:function(){this.feature=null;OpenLayers.Popup.prototype.destroy.apply(this,arguments)},onVisibilityChanged:function(){if(this.feature){if(!this.feature.layer.getVisibility()){this.hide();OpenLayers.Util.removeItem(this.feature.layer.selectedFeatures,this.feature);this.feature.layer.events.triggerEvent("featureunselected",{feature:this.feature})}}},addCloseBox:function(d){this.closeDiv=OpenLayers.Util.createDiv(this.id+"_close",null,new OpenLayers.Size(17,17));this.closeDiv.className="gpPopupCloseBox";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=d||function(f){OpenLayers.Event.stop(f);this.hide();if(!this.disableFirefoxOverflowHack&&OpenLayers.Util.getBrowserName()=="firefox"){if(this.map&&this.map.events){this.map.events.unregister("movestart",this,this.onMoveStartPopup);this.map.events.unregister("moveend",this,this.onMoveEndPopup)}}if(this.feature){OpenLayers.Util.removeItem(this.feature.layer.selectedFeatures,this.feature);this.feature.layer.events.triggerEvent("featureunselected",{feature:this.feature})}};OpenLayers.Event.observe(this.closeDiv,"click",OpenLayers.Function.bindAsEventListener(a,this))},CLASS_NAME:"Geoportal.Popup"});Geoportal.Popup.setCursorForFeature=function(d,h,g){if(d){h=h||"pointer";if(d.style){d.style.cursor=h}else{if(d.layer){if(d.layer.style){d.layer.style.cursor=h}else{if(!d.layer.styleMap){d.layer.styleMap=new OpenLayers.StyleMap()}if(!g){g=[];for(var f in d.layer.styleMap.styles){g.push(f)}}for(var b=0,a=g.length;b<a;b++){var f=d.layer.styleMap.styles[g[b]];if(f){d.layer.styleMap.styles[g[b]]=f.clone();d.layer.styleMap.styles[g[b]].defaultStyle.cursor=h}}}}else{d.style=OpenLayers.Util.applyDefaults({cursor:h},OpenLayers.Feature.Vector.style["default"])}}}};Geoportal.Popup.setPointerCursorForFeature=function(a){Geoportal.Popup.setCursorForFeature(a,"pointer",["default"])};Geoportal.Popup.completePopup=function(a,b){if(!b){return a}if(b.backgroundColor){a.setBackgroundColor(b.backgroundColor)}if(b.opacity){a.setOpacity(b.opacity)}if(b.border){a.setBorder(b.border)}if(b.className&&a.div){a.div.className=b.className}a.autoSize=b.autoSize!=undefined?b.autoSize:true;if(b.maxSize){a.maxSize=b.maxSize}if(b.minSize){a.minSize=b.minSize}if(b.overflow){a.contentDiv.style.overflow=b.overflow}return a};Geoportal.Popup.onPopupClose=function(o){OpenLayers.Event.stop(o);this.hide();if(!this.disableFirefoxOverflowHack&&OpenLayers.Util.getBrowserName()=="firefox"){if(this.map&&this.map.events){this.map.events.unregister("movestart",this,this.onMoveStartPopup);this.map.events.unregister("moveend",this,this.onMoveEndPopup)}}if(this.feature){var h=this.feature;var a=this.feature.layer.map.getControlsByClass(/.Control.SelectFeature$/);for(var d=0,p=a.length;d<p;d++){var l=a[d];if(!l.active){continue}var g=l.layers||[l.layer];for(var b=0,m=g.length;b<m;b++){if(g[b]==h.layer){l.unselect(h)}}}}};Geoportal.Popup.defaultIcon=function(){var a=Geoportal.Util.getImagesLocation()+"xy-target.gif";var b=new OpenLayers.Size(26,26);var d=function(f){return new OpenLayers.Pixel(-(f.w/2),-(f.h/2))};return new OpenLayers.Icon(a,b,null,d)};Geoportal.Tile=OpenLayers.Class(OpenLayers.Tile,{CLASS_NAME:"Geoportal.Tile"});Geoportal.Util={getImagesLocation:function(){return Geoportal._getScriptLocation()+"theme/geoportal/img/"},convertToPixels:function(f,a,g){if(!f){return undefined}if(a==undefined){a=false}if(/px$/.test(f)){return parseInt(f)}var d=document.createElement("div");d.style.display="";d.style.visibility="hidden";d.style.position="absolute";d.style.lineHeight="0";if(!g){g=document.body}if(/%$/.test(f)){g=g.parentNode||g;d.style[a?"width":"height"]=f}else{d.style.borderStyle="solid";if(a){d.style.borderBottomHeight="0";d.style.borderTopHeight=f}else{d.style.borderBottomWidth="0";d.style.borderTopWidth=f}}g.appendChild(d);var b=a?d.offsetWidth:d.offsetHeight;g.removeChild(d);return b},getComputedStyle:function(h,j,b){var a;if(h.currentStyle){a=h.currentStyle[OpenLayers.String.camelize(j)]}else{if(document.defaultView.getComputedStyle){var g=document.defaultView.getComputedStyle(h,null);a=g.getPropertyValue(j)}else{a=null}}var f=/(em|ex|pt|%)$/;var d=/(width)/i;a=b?a?f.test(a)?this.convertToPixels(a,d.test(a),h.parentNode):parseInt(a)||0:0:a;return a},loadJS:function(a,d,o,m){d=d||a;var f=OpenLayers.Util.getElement(d);if(f!=null){return[f,false]}var b=document.getElementsByTagName("script"),g,p;var j,h;for(j=0,h=b.length;j<h;++j){if(OpenLayers.Util.isEquivalentUrl(b.item(j).src,a)){b.item(j).setAttribute("id",d);return[b.item(j),false]}}b=document.getElementsByTagName("head");var q=b.length>0?b[0]:document.body;var r=OpenLayers.Util.getElement(o||"");f=document.createElement("script");f.setAttribute("type","text/javascript");f.setAttribute("src",a);f.setAttribute("charset","UTF-8");f.setAttribute("id",d);if(m!=undefined){f.onload=function(){if(f.readyState&&f.readyState!="loaded"&&f.readyState!="complete"){return}f.onreadystatechange=f.onload=null;m()};if(navigator.appName!="Opera"){f.onreadystatechange=f.onload}}if(r!=null){var r=OpenLayers.Util.getElement(o);OpenLayers.Element.insertAfter(f,r)}else{b=q.childNodes;p=null;for(j=b.length-1;j>=0;j--){g=b[j];if(g.nodeType!=1){continue}switch(g.tagName.toLowerCase()){case"script":if(g.getAttribute("type").toLowerCase()=="text/javascript"){p=g}break;default:break}if(p!=null){break}}if(p==null){q.appendChild(f)}else{OpenLayers.Element.insertAfter(f,p)}}return[f,true]},loadCSS:function(a,d,j){d=d||a;var m=OpenLayers.Util.getElement(d);if(m!=null){return[m,false]}var b=document.getElementsByTagName("link"),f,o;var h,g;for(h=0,g=b.length;h<g;++h){if(OpenLayers.Util.isEquivalentUrl(b.item(h).href,a)){b.item(h).setAttribute("id",d);return[b.item(h),false]}}b=document.getElementsByTagName("head");var p=b.length>0?b[0]:document.body;m=document.createElement("link");m.setAttribute("rel","stylesheet");m.setAttribute("type","text/css");m.setAttribute("href",a);m.setAttribute("id",d);if(j==""){p.appendChild(m);return[m,true]}var q=j!=null?OpenLayers.Util.getElement(j):null;if(q!=null){OpenLayers.Element.insertAfter(m,q);return[m,true]}b=p.childNodes;o=null;for(h=0,g=b.length;h<g;h++){f=b[h];if(f.nodeType!=1){continue}switch(f.tagName.toLowerCase()){case"link":if(f.getAttribute("rel").toLowerCase()=="stylesheet"||f.getAttribute("type").toLowerCase()=="text/css"){o=f}break;case"style":o=f;break;default:break}if(o!=null){break}}if(o==null){p.appendChild(m)}else{o.parentNode.insertBefore(m,o)}return[m,true]},cleanContent:function(b){var a=b.replace(/[\r\n]?/gi,"");a=a.replace(/<[\/]?html[^>]*>/gi,"");a=a.replace(/<head[^>]*>.*<\/head>/gi,"");a=a.replace(/<[\/]?body[^>]*>/gi,"");a=a.replace(/<script[^>]*>.*<\/script>/gi,"");return a},getMaxDimensions:function(){var a=0,b=0;if(document.innerHeight>b){a=document.innerWidth;b=document.innerHeight}if(document.documentElement&&document.documentElement.clientHeight>b){a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}if(document.body&&document.body.clientHeight>b){a=document.body.clientWidth;b=document.body.clientHeight}return new OpenLayers.Size(a,b)},dmsToDeg:function(o){if(!o){return Number.NaN}var l=o.match(/(^\s?-)|(\s?[SW]\s?$)/)!=null?-1:1;o=o.replace(/(^\s?-)|(\s?[NSEW]\s?)$/,"");o=o.replace(/\s/g,"");var g=o.match(/(\d{1,3})[.,°d]?(\d{0,2})[']?(\d{0,2})[.,]?(\d{0,})(?:["]|[']{2})?/);if(g==null){return Number.NaN}var h=(g[1]?g[1]:"0.0")*1;var a=(g[2]?g[2]:"0.0")*1;var b=(g[3]?g[3]:"0.0")*1;var f=(g[4]?("0."+g[4]):"0.0")*1;var j=(h+(a/60)+(b/3600)+(f/3600))*l;return j},degToDMS:function(g,d,a,u){var p=Math.abs(g);var h=Math.round(p+0.5)-1;var m=60*(p-h);var l=Math.round(m+0.5)-1;m=60*(m-l);var r=Math.round(m+0.5)-1;if(a===undefined||a<0){a=1}var j=Math.pow(10,a);var q=j*(m-r);q=Math.round(q+0.5)-1;if(q>=j){r=r+1;q=0}if(r==60){l=l+1;r=0}if(l==60){h=h+1;l=0}var f="";if(d&&!u&&(d instanceof Array)&&d.length==2){f=" "+(g>0?d[0]:d[1])}else{if(g<0){h=-1*h}}var o="%4d° %02d' %02d",b='.%0*d"';if(u){o=u;b="%0*d"}var v=OpenLayers.String.sprintf(o,h,l,r)+(a>0?OpenLayers.String.sprintf(b,a,q):(u?'"':""))+f;return v}};OpenLayers.Util.onImageLoadError=function(){if(this.src.match(/^http:\/\/[abc]\.[a-z]+\.openstreetmap\.org\//)){this.src="http://openstreetmap.org/openlayers/img/404.png"}else{if(this.src.match(/^http:\/\/[def]\.tah\.openstreetmap\.org\//)){}else{this._attempts=(this._attempts)?(this._attempts+1):1;if(this._attempts<=OpenLayers.IMAGE_RELOAD_ATTEMPTS){var f=this.urls;if(f&&f instanceof Array&&f.length>1){var g=this.src.toString();var d,a;for(a=0;d=f[a];a++){if(g.indexOf(d)!=-1){break}}var h=Math.floor(f.length*Math.random());var b=f[h];a=0;while(b==d&&a++<4){h=Math.floor(f.length*Math.random());b=f[h]}this.src=g.replace(d,b)}else{var g=this.src.toString().replace(/&?_tick_=\d+/,"");g+=(g.indexOf("?")+1>0?"&":"?")+"_tick_="+new Date().getTime();this.src=g}}else{if(this.layer.onLoadError){this.src=this.layer.onLoadError()}else{if(this.src.match(/^http:\/\/[a-z0-9-]+\.ign\.fr\//)){if(this.src.match(/TRANSPARENT=true/i)){this.src=OpenLayers.Util.getImagesLocation()+"blank.gif"}else{this.src=Geoportal.Util.getImagesLocation()+"nodata.jpg"}}else{this.style.backgroundColor=OpenLayers.Util.onImageLoadErrorColor}}}this.style.display=""}}};Geoportal.Cookies={_get:function(g){var h=document.cookie.split(";");var m={name:g,value:null,path:"",domain:"",ttl:0,secure:false};for(var f=0,a=h.length;f<a;f++){var d=h[f].split("=");var j=d[0];var b=d[1];if(OpenLayers.String.trim(j)===g){m.value=decodeURIComponent(b);break}}return(m.value===null?null:m)},get:function(b,a){var d=Geoportal.Cookies._get(OpenLayers.String.trim(b));return(d?d.value:a)},expireDateToHours:function(f){var b=new Date(f);if(isNaN(b)){return -1}var d=new Date();var a=(b.getTime()-d.getTime())/(60*60*1000);return a},set:function(l,f,b,m,d,a){if(l==null){return}var j=OpenLayers.String.trim(typeof(l)=="object"?l.name:l);var g=Geoportal.Cookies._get(j)||{name:"",value:null,ttl:0,path:"",domain:"",secure:false};var h;if(typeof(l)=="string"){h={name:j,value:typeof(f)==="undefined"?g.value||"":f,ttl:typeof(b)==="undefined"?g.ttl||"":b,path:g.path||m||"",domain:g.domain||d||"",secure:g.secure||a||false}}else{h={name:j,value:typeof(l.value)==="undefined"?g.value||"":l.value,ttl:typeof(l.ttl)==="undefined"?g.ttl||"":l.ttl,path:g.path||l.path||"",domain:g.domain||l.domain||"",secure:g.secure||l.secure||false}}document.cookie=Geoportal.Cookies.toString(h)},remove:function(a){Geoportal.Cookies.set(a,"",-1)},toString:function(f,b){var a=[];a.push(f.name+"="+encodeURIComponent(""+f.value));if(f.path){a.push("path="+f.path)}if(b===true){a.push("domain="+(!f.domain?location.hostname:f.domain))}if(f.ttl&&!isNaN(f.ttl)){if(f.ttl<1){a.push("expires=Thu, 01-Jan-1970 00:00:01 GMT")}else{a.push("max-age="+f.ttl*60*60)}}if(f.secure){a.push("secure")}var d=a.join("; ");return d},cookiesEnabled:function(){var a={name:"cookieEnabled",value:"1"};Geoportal.Cookies.set(a.name,a.value);var d=Geoportal.Cookies.get(a.name);var b=!(d===undefined||d!=a.value);Geoportal.Cookies.remove(a.name);return b}};Geoportal.Control.Copyright=OpenLayers.Class(Geoportal.Control,{copyright:null,initialize:function(a){Geoportal.Control.prototype.initialize.apply(this,arguments);if(!this.copyright){this.copyright="&copy; IGN"}},redraw:function(){if(this.div){this.div.innerHTML=OpenLayers.i18n(this.copyright)}},draw:function(a){Geoportal.Control.prototype.draw.apply(this,arguments);this.redraw();return this.div},changeLang:function(a){this.redraw()},CLASS_NAME:"Geoportal.Control.Copyright"});Geoportal.Control.DeleteFeature=OpenLayers.Class(Geoportal.Control,{EVENT_TYPES:["beforefeaturesdeleted","featuresdeleted","beforefeaturedeleted","featuredeleted"],deleteCodes:null,onDelete:function(){},onUndelete:function(){},geometryTypes:null,layer:null,callbacks:null,handlers:null,deletedFeatures:null,initialize:function(b,a){this.EVENT_TYPES=Geoportal.Control.DeleteFeature.prototype.EVENT_TYPES.concat(Geoportal.Control.prototype.EVENT_TYPES);Geoportal.Control.prototype.initialize.apply(this,[a]);this.layer=b;this.deleteCodes=[46,68];var d={click:this.clickFeature};this.callbacks=OpenLayers.Util.extend(d,this.callbacks);var f={keydown:this.handleKeypress};this.handlers={feature:new OpenLayers.Handler.Feature(this,b,this.callbacks,{geometryTypes:this.geometryTypes}),keyboard:new OpenLayers.Handler.Keyboard(this,f)};this.deletedFeatures=[]},destroy:function(){this.deletedFeatures=null;Geoportal.Control.prototype.destroy.apply(this,arguments)},activate:function(){if(!this.active){this.handlers.feature.activate()}return Geoportal.Control.prototype.activate.apply(this,arguments)},deactivate:function(){if(this.active){this.handlers.feature.deactivate()}return Geoportal.Control.prototype.deactivate.apply(this,arguments)},clickFeature:function(a){this.deleteFeature(a)},handleKeypress:function(b){if(!b){return}if(this.layer.selectedFeatures.length>0&&OpenLayers.Util.indexOf(this.deleteCodes,b.keyCode)!=-1){if(this.events.triggerEvent("beforefeaturesdeleted",{features:this.layer.selectedFeatures})===false){return}for(var f=0,a=this.layer.selectedFeatures.length;f<a;f++){var d=this.layer.selectedFeatures.unshift();this.deleteFeature(d)}if(this.events.triggerEvent("featuresdeleted",{features:features})==false){return}features=null}},deleteFeature:function(a){if(this.events.triggerEvent("beforefeaturedeleted",{feature:a})===false){return}if(a.popup){a.popup.hide()}this.deletedFeatures.push(a);this.layer.destroyFeatures([a]);if(this.events.triggerEvent("featuredeleted",{feature:a})===false){return}this.onDelete(a)},setMap:function(a){this.handlers.feature.setMap(a);this.handlers.keyboard.setMap(a);Geoportal.Control.prototype.setMap.apply(this,arguments)},CLASS_NAME:"Geoportal.Control.DeleteFeature"});Geoportal.Control.Floating=OpenLayers.Class(Geoportal.Control,{contentControler:null,headDiv:null,headTitle:null,headDivEvents:null,closeDiv:null,bodyDiv:null,bodyDivEvents:null,movingForm:true,size:null,onMaximize:function(a){},onMinimize:function(a){},onClose:function(a){},initialize:function(b,a){Geoportal.Control.prototype.initialize.apply(this,[a]);this.contentControler=b},destroy:function(){this._clearAll();Geoportal.Control.prototype.destroy.apply(this,arguments)},_clearAll:function(){if(this.closeDiv){OpenLayers.Event.stopObservingElement(this.closeDiv);this.closeDiv=null}if(this.headDivEvents){this.headDivEvents.un({click:this.ignoreEvent,dblclick:this.clickOnLabel});if(this.movingForm){this.headDivEvents.un({mousedown:this.dragStart,mousemove:this.drag,mouseup:this.dragStop})}this.headDivEvents=null}if(this.headDiv){this.headDiv.innerHTML="";this.headDiv=null}if(this.bodyDivEvents){this.bodyDivEvents.un({click:this.passthroughEvent,dblclick:this.passthroughEvent});if(this.movingForm){this.bodyDivEvents.un({mousedown:this.passthroughEvent,mousemove:this.passthroughEvent,mouseup:this.passthroughEvent})}this.bodyDivEvents=null}if(this.bodyDiv){this.bodyDiv.innerHTML="";this.bodyDiv=null}if(this.size){this.size=null}if(this.div){OpenLayers.Event.stopObservingElement(this.div);this.div.parentNode.removeChild(this.div);this.div.innerHTML="";this.div=null}this.contentControler=null},draw:function(a){Geoportal.Control.prototype.draw.apply(this,arguments);this._loadContents();if(this.bodyDiv&&this.bodyDiv.style.display=="block"){this.maximizeControl()}return this.div},clickOnLabel:function(b){if(this.bodyDiv!=null){var a=this.bodyDiv.style.display=="block";this.showControls(a);this.ignoreEvent(b)}},dblClick:function(a){this.ignoreEvent(a)},maximizeControl:function(a){this.ignoreEvent(a);this.showControls(false);this.onMaximize(a)},minimizeControl:function(a){this.ignoreEvent(a);this.showControls(true);this.onMinimize(a)},showControls:function(a){this.bodyDiv.style.display=a?"none":"block"},closeControl:function(a){this.ignoreEvent(a);if(this.contentControler){this.onClose.apply(this.contentControler,[a])}},dragStart:function(a){if(!OpenLayers.Event.isLeftClick(a)){return}this.mouseDragStart={x:a.xy.x,y:a.xy.y};this.headDiv.style.cursor="move";this.zIndex=this.div.style.zIndex;this.div.style.zIndex=9998;OpenLayers.Event.stop(a)},drag:function(f){if(this.mouseDragStart){var d=this.mouseDragStart.x-f.xy.x;var a=this.mouseDragStart.y-f.xy.y;var h=this.div.offsetLeft-d;var g=this.div.offsetTop-a;if((h>0)&&(g>0)&&(h+this.div.clientWidth<this.div.parentNode.clientWidth)&&(g+this.div.clientHeight<this.div.parentNode.clientHeight)){var b=this.div.style;if(this.position){this.position.x=h;this.position.y=g}b.left=h+"px";b.top=g+"px";this.mouseDragStart.x=f.xy.x;this.mouseDragStart.y=f.xy.y}OpenLayers.Event.stop(f)}},dragStop:function(a){if(!OpenLayers.Event.isLeftClick(a)){return}if(this.mouseDragStart){this.mouseDragStart=null;this.headDiv.style.cursor="pointer";this.div.style.zIndex=this.zIndex;this.zIndex=-1;OpenLayers.Event.stop(a)}},ignoreEvent:function(a){OpenLayers.Event.stop(a)},passthroughEvent:function(a){OpenLayers.Event.stop(a,true)},_loadContents:function(){this.div.className=this.displayClass;this.headDiv=document.createElement("div");this.headDiv.className=this.displayClass+"Head";var f=document.createElement("span");f.id="spanTitle"+this.id;f.className=this.displayClass+"Head";f.appendChild(document.createTextNode(OpenLayers.i18n(this.headTitle?this.headTitle:"???")));this.headDiv.appendChild(f);var j=Geoportal.Util.getImagesLocation();var h=new OpenLayers.Size(11,11);var d=document.createElement("div");d.className=this.displayClass+"HeadBtns";if(this.contentControler){this.closeDiv=OpenLayers.Util.createDiv(this.id+"_CloseDiv");OpenLayers.Element.addClass(this.closeDiv,this.displayClass+"HeadBtnsClose");OpenLayers.Event.observe(this.closeDiv,"click",OpenLayers.Function.bindAsEventListener(this.closeControl,this));OpenLayers.Event.observe(this.closeDiv,"dblclick",OpenLayers.Function.bindAsEventListener(this.dblClick,this));d.appendChild(this.closeDiv)}if(!this.size){this.headDiv.appendChild(d)}this.headDiv.appendChild(d);var a=this.size?new OpenLayers.Size(this.size.w,0):null;var g=OpenLayers.Util.getRenderedDimensions(this.headDiv.innerHTML,a,{displayClass:this.headDiv.className});if(this.size){a=null;this.headDiv.style.height=g.h+"px";g.w=this.size.w}this.headDiv.style.width=g.w+"px";if(!this.position){var b=this.map.div.clientWidth||this.map.div.offsetWidth||800;this.div.style.left=(((b-g.w)*100)/(2*b))+"%"}g=null;if(this.size){this.div.style.width=this.size.w+"px";this.div.style.height=this.size.h+"px"}this.headDivEvents=new OpenLayers.Events(this,this.headDiv,null,true,{includeXY:true});this.headDivEvents.on({click:this.ignoreEvent,dblclick:this.clickOnLabel});if(this.movingForm){this.headDivEvents.on({mousedown:this.dragStart,mousemove:this.drag,mouseup:this.dragStop})}this.bodyDiv=document.createElement("div");this.bodyDiv.id=this.id+"_Child";this.bodyDiv.className=this.displayClass+"Body";if(this.size){this.bodyDiv.style.width=this.size.w+"px";this.bodyDiv.style.height=(this.size.h-parseInt(this.headDiv.style.height))+"px";this.bodyDiv.style.overflow="auto";this.bodyDiv.style.margin="0px"}this.bodyDivEvents=new OpenLayers.Events(this,this.bodyDiv,null,true);this.bodyDivEvents.on({click:this.passthroughEvent,dblclick:this.passthroughEvent});if(this.movingForm){this.bodyDivEvents.on({mousedown:this.passthroughEvent,mousemove:this.passthroughEvent,mouseup:this.passthroughEvent})}this.div.appendChild(this.headDiv);this.div.appendChild(this.bodyDiv);OpenLayers.Event.observe(this.div,"dblclick",OpenLayers.Function.bindAsEventListener(this.ignoreEvent,this));OpenLayers.Event.observe(this.div,"mousedown",OpenLayers.Function.bindAsEventListener(this.ignoreEvent,this));OpenLayers.Event.observe(this.div,"mouseup",OpenLayers.Function.bindAsEventListener(this.ignoreEvent,this))},addContent:function(d){if(this.bodyDiv&&d){if(!this.size){var b=OpenLayers.Util.getRenderedDimensions(d.innerHTML,null,{displayClass:this.bodyDiv.className,containerElement:this.bodyDiv});if(b.w>this.div.parentNode.clientWidth){b.w=0.75*this.div.parentNode.clientWidth}var a=parseInt(this.headDiv.style.width);if(isNaN(a)||b.w>a){this.headDiv.style.width=(b.w+4)+"px";this.bodyDiv.style.width=b.w+"px"}else{this.bodyDiv.style.width=(parseInt(this.headDiv.style.width)-4)+"px"}if(!this.position){this.div.style.left=(((this.div.parentNode.clientWidth-parseInt(this.headDiv.style.width))*100)/(2*this.div.parentNode.clientWidth))+"%";this.div.style.top=(((this.div.parentNode.clientHeight-b.h)*100)/(8*this.div.parentNode.clientHeight))+"%"}b=null}this.bodyDiv.appendChild(d)}},changeLang:function(a){if(this.title){this.div.title=OpenLayers.i18n(this.title)}if(this.headTitle){var b=OpenLayers.Util.getElement("spanTitle"+this.id);if(b){b.innerHTML=OpenLayers.i18n(this.headTitle)}}},CLASS_NAME:"Geoportal.Control.Floating"});Geoportal.Control.GraphicScale=OpenLayers.Class(Geoportal.Control,{METRICSUIMETER:[1000,1,0.01,0.001],METRICSUISYMBOL:["km","m","cm","mm"],barAreaWidth:150,currentUnitInfo:null,currentIiSymbol:null,currentWidth:null,currentDistance:null,currentDivisionCount:null,listBlocks:null,initialize:function(){Geoportal.Control.prototype.initialize.apply(this,arguments);this.listBlocks=[]},destroy:function(){if(this.map){this.map.events.unregister("zoomend",this,this.redraw);this.map.events.unregister("changebaselayer",this,this.redraw)}if(this.listBlocks){for(var b=0,a=this.listBlocks.length;b<a;b++){if(this.listBlocks[b]){if(this.listBlocks[b].parentNode){this.listBlocks[b].parentNode.removeChild(this.listBlocks[b])}this.listBlocks[b]=null}}this.listBlocks=null}if(this.divLegend&&this.divLegend.parendNode){this.divLegend.parendNode.removeChild(this.divLegend);this.divLegend=null}if(this.divText1){if(this.divText1.parentNode){this.divText1.parentNode.removeChild(this.divText1)}this.divText1=null}if(this.divText2){if(this.divText2.parentNode){this.divText2.parentNode.removeChild(this.divText2)}this.divText2=null}Geoportal.Control.prototype.destroy.apply(this,arguments)},setMap:function(a){Geoportal.Control.prototype.setMap.apply(this,arguments);this.map.events.register("zoomend",this,this.redraw);this.map.events.register("changebaselayer",this,this.redraw)},draw:function(a){Geoportal.Control.prototype.draw.apply(this,arguments);this.divText2=document.createElement("div");this.divText2.className=this.displayClass+"Text2";this.div.appendChild(this.divText2);this.divText1=document.createElement("div");this.divText1.className=this.displayClass+"Text1";this.divText1.innerHTML="0";this.div.appendChild(this.divText1);this.divLegend=document.createElement("div");this.divLegend.className=this.displayClass+"Legend";this.div.appendChild(this.divLegend);return this.div},redraw:function(){this.computeBarMetrics();this.drawBar()},computeBarMetrics:function(){var m=false;var D=this.map.getResolution();if(this.map.getProjection()&&this.map.getProjection().getProjName()=="longlat"){var w=this.map.getCenter();if(!w){w=this.map.getMaxExtent().getCenterLonLat()}var B=this.map.getProjection().getProperty("semi_major");var v=this.map.getProjection().getProperty("semi_minor");if(!(B&&v)){D*=111319.49079327357*Math.cos(w.lat*0.017453292519943295)}else{var q=Math.cos(w.lat*0.017453292519943295);var l=q*q;var h=Math.sin(w.lat*0.017453292519943295);var o=h*h;var C=B*B;var u=B*B*B*B;var f=v*v;var d=v*v*v*v;D*=0.017453292519943295*q*Math.sqrt((u*l+d*o)/(C*l+f*o))}}for(var p=0;p<this.METRICSUIMETER.length&&!m;p++){var r=100000;var g=this.METRICSUIMETER[p];while((Math.round(r)>0)&&!m){var j=Math.round((r*g)/D);if(j<this.barAreaWidth){m=true;this.currentUnitInfo=this.METRICSUIMETER[p];this.currentUiSymbol=this.METRICSUISYMBOL[p];this.currentWidth=j;this.currentDistance=r}else{r/=10}}}var z=1;while(z<5){if((this.currentWidth*(z+1))<this.barAreaWidth){z++}else{break}}this.currentDivisionCount=z;this.currentWidth*=z;this.currentDistance*=z;this.divText2.innerHTML=this.currentDistance+" "+this.currentUiSymbol;this.divText2.style.left=this.currentWidth+"px"},drawBar:function(){var a;this.divLegend.style.width=this.currentWidth+"px";this.div.style.width=(this.currentWidth)+"px";if(this.currentDivisionCount==1){this.currentDivisionCount=5}for(a=0;a<this.currentDivisionCount;a++){if(!this.listBlocks[a]){var b=document.createElement("div");if((a%2)===0){b.className=this.displayClass+"FullBlock"}else{b.className=this.displayClass+"EmptyBlock"}this.divLegend.appendChild(b);this.listBlocks[a]=b}else{this.listBlocks[a].style.display="block"}this.listBlocks[a].style.width=this.currentWidth/this.currentDivisionCount+"px"}for(a=this.currentDivisionCount;a<5;a++){if(this.listBlocks[a]){this.listBlocks[a].style.display="none"}}},CLASS_NAME:"Geoportal.Control.GraphicScale"});Geoportal.Control.Loading=OpenLayers.Class(Geoportal.Control,{counter:0,maximized:false,visible:true,layers:null,initialize:function(b,a){Geoportal.Control.prototype.initialize.apply(this,[a]);if(b&&typeof(b)=="object"){b=[b]}this.layers=b},destroy:function(){var f,b,d,g;if(this.layers){g=this.layers;this.layers=null}else{if(this.map){this.map.events.unregister("preaddlayer",this,this.addLayer);if(this.map.layers){g=this.map.layers}}}if(g){for(f=0,b=g.length;f<b;f++){d=g[f];if(d instanceof Geoportal.Layer.Aggregate){if(d.layers){for(var f=0,a=d.layers.length;f<a;f++){d.layers[f].events.unregister("loadstart",this,this.increaseCounter);d.layers[f].events.unregister("loadend",this,this.decreaseCounter)}}}else{d.events.unregister("loadstart",this,this.increaseCounter);d.events.unregister("loadend",this,this.decreaseCounter)}}}Geoportal.Control.prototype.destroy.apply(this,arguments)},setVisible:function(a){this.visible=a;if(a){OpenLayers.Element.show(this.div)}else{OpenLayers.Element.hide(this.div)}},getVisible:function(){return this.visible},hide:function(){this.setVisible(false)},show:function(){this.setVisible(true)},toggle:function(){this.setVisible(!this.getVisible())},addLayer:function(b){if(b.layer){if(b.layer instanceof Geoportal.Layer.Aggregate){if(b.layer.layers){for(var d=0,a=b.layer.layers.length;d<a;d++){b.layer.layers[d].events.register("loadstart",this,this.increaseCounter);b.layer.layers[d].events.register("loadend",this,this.decreaseCounter)}}}else{b.layer.events.register("loadstart",this,this.increaseCounter);b.layer.events.register("loadend",this,this.decreaseCounter)}}},setMap:function(h){Geoportal.Control.prototype.setMap.apply(this,arguments);if(!this.layers){this.map.events.register("preaddlayer",this,this.addLayer)}var g=this.layers||this.map.layers;for(var f=0,a=g.length;f<a;f++){var d=g[f];if(d instanceof Geoportal.Layer.Aggregate){if(d.layers){for(var b=0,m=d.layers.length;b<m;b++){d.layers[b].events.register("loadstart",this,this.increaseCounter);d.layers[b].events.register("loadend",this,this.decreaseCounter)}}}else{d.events.register("loadstart",this,this.increaseCounter);d.events.register("loadend",this,this.decreaseCounter)}}},increaseCounter:function(){this.counter++;if(this.counter>0){if(!this.maximized&&this.visible){this.maximizeControl()}}},decreaseCounter:function(){if(this.counter>0){this.counter--}if(this.counter==0){if(this.maximized&&this.visible){this.minimizeControl()}}},draw:function(){Geoportal.Control.prototype.draw.apply(this,arguments);return this.div},minimizeControl:function(a){if(a!=null){OpenLayers.Event.stop(a)}this.div.style.display="none";this.maximized=false},maximizeControl:function(a){if(a!=null){OpenLayers.Event.stop(a)}this.div.style.display="block";if(!this.layers){var f=this.map.getSize();var b=f.w;var d=f.h;this.div.style.left=b/2-this.div.offsetWidth/2+"px";this.div.style.top=d/2-this.div.offsetHeight/2+"px"}this.maximized=true},CLASS_NAME:"Geoportal.Control.Loading"});OpenLayers.Control.LoadingPanel=OpenLayers.Class(Geoportal.Control.Loading,{initialize:function(a){Geoportal.Control.Loading.prototype.initialize.apply(this,[null,a]);this.displayClass="olControlLoadingPanel"},CLASS_NAME:"OpenLayers.Control.LoadingPanel"});Geoportal.Control.Logo=OpenLayers.Class(Geoportal.Control,{logoPrefix:"http://www.geoportail.fr/legendes/logo_",logoSuffix:".gif",logoSize:null,_listeLogos:null,initialize:function(a){Geoportal.Control.prototype.initialize.apply(this,arguments);if(!this.logoSize){this.logoSize=new OpenLayers.Size(Geoportal.Control.Logo.WHSizes.normal,Geoportal.Control.Logo.WHSizes.normal)}if(typeof(this.logoSize)=="number"){this.logoSize=new OpenLayers.Size(this.logoSize,this.logoSize)}this._listeLogos=[]},destroy:function(){var b=this.div.childNodes;for(var a=0;a<b.length;a++){this.div.removeChild(b[a])}this._listeLogos=null;this.map.events.unregister("addlayer",this,this.redraw);this.map.events.unregister("changelayer",this,this.redraw);this.map.events.unregister("removelayer",this,this.redraw);this.map.events.unregister("zoomend",this,this.redraw);this.map.events.unregister("move",this,this.redraw);this.map.events.unregister("changebaselayer",this,this.changeBaseLayer);Geoportal.Control.prototype.destroy.apply(this,arguments)},draw:function(a){Geoportal.Control.prototype.draw.apply(this,arguments);return this.div},redraw:function(){var d;var h=this.div.childNodes;for(d=0;d<h.length;d++){h[d].style.display="none"}var m=this.map.layers;var g=this.map.getZoom();var l;for(d=0;d<m.length;d++){if(!m[d].getVisibility()||!m[d].inRange){continue}if(m[d].originators!=null){var a;for(var b=0;b<m[d].originators.length;b++){a=true;var l=m[d].originators[b];if(l.minZoomLevel&&(l.minZoomLevel>g)){a=false}if(a&&l.maxZoomLevel&&(l.maxZoomLevel<g)){a=false}if(a&&l.extent){var f=this.map.calculateBounds();if(f){a=f.intersectsBounds(l.extent)}}if(a){this._ajoutLogo(l.logo,l.url,l.pictureUrl)}}}}},_ajoutLogo:function(g,b,f){if(this._listeLogos[g]==null){var a=document.createElement("div");this.div.appendChild(a);this._listeLogos[g]=a;var h=OpenLayers.Util.createImage(null,null,new OpenLayers.Size(this.logoSize.w,this.logoSize.h),f?f:this.logoPrefix+g+this.logoSuffix,null,null,null,false);if(b!=null){var d=document.createElement("a");if(b.match(/^javascript:/)){d.setAttribute("href","#");d.setAttribute("onclick",b)}else{d.setAttribute("href",b);d.setAttribute("target","_blank")}d.appendChild(h);a.appendChild(d)}else{a.appendChild(h)}}else{this._listeLogos[g].style.display=""}},setMap:function(){Geoportal.Control.prototype.setMap.apply(this,arguments);this.map.events.register("addlayer",this,this.redraw);this.map.events.register("changelayer",this,this.redraw);this.map.events.register("removelayer",this,this.redraw);this.map.events.register("zoomend",this,this.redraw);this.map.events.register("move",this,this.redraw);this.map.events.register("changebaselayer",this,this.changeBaseLayer)},changeLogoSize:function(p){var m=null;if(typeof(p)=="number"){m=new OpenLayers.Size(p,p)}else{m=p.clone()}this.logoSize=m;var f=this.map.layers;for(var g=0,o=f.length;g<o;g++){var l=f[g];if(l.originators!=null){for(var b=0,h=l.originators.length;b<h;b++){var a=l.originators[b];if(this._listeLogos[a.logo]!=null){var d=this._listeLogos[a.logo].firstChild;if(d){if(d.firstChild){d=d.firstChild}if(d){d.style.width=this.logoSize.w+"px";d.style.height=this.logoSize.h+"px"}}}}}}m=null},changeBaseLayer:function(p){if(!p){return}if(!(p.layer)){return}if(!(p.baseLayer)){return}var m=p.baseLayer.getNativeProjection();var o=p.layer.getNativeProjection();var g=this.map.layers;var a;for(var h=0,b=g.length;h<b;h++){if(g[h].originators!=null){for(var d=0,f=g[h].originators.length;d<f;d++){var a=g[h].originators[d];if(a.extent){a.extent.transform(m,o,true)}}}}},CLASS_NAME:"Geoportal.Control.Logo"});Geoportal.Control.Logo.WHSizes={normal:50,mini:30};Geoportal.Control.Panel=OpenLayers.Class(OpenLayers.Control.Panel,{initialize:function(a){Geoportal.Control.prototype.initialize.apply(this,[a]);this.controls=[]},destroy:function(){for(var a=this.controls.length-1;a>=0;a--){if(this.controls[a].events){this.controls[a].events.un({activate:this.redraw,deactivate:this.redraw,scope:this})}if(this.controls[a].panel_div){OpenLayers.Event.stopObservingElement(this.controls[a].panel_div)}this.controls[a].panel_div=null;this.controls[a]=null}this.controls=[];Geoportal.Control.prototype.destroy.apply(this,arguments)},activate:function(){if(OpenLayers.Control.prototype.activate.apply(this,arguments)){if(this.map){this.map.events.on({controlactivated:this.onActivateControl,scope:this})}if(this.defaultControl!=undefined){for(var b=0,a=this.controls.length;b<a;b++){if(this.controls[b]==this.defaultControl){this.controls[b].activate()}}}this.redraw();return true}else{return false}},deactivate:function(){if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)){for(var b=0,a=this.controls.length;b<a;b++){this.controls[b].deactivate()}if(this.map){this.events.un({controlactivated:this.onActivateControl,scope:this})}return true}else{return false}},redraw:function(){if(this.active){OpenLayers.Control.Panel.prototype.redraw.apply(this,arguments);this.div.style.display="block"}},onActivateControl:function(b){for(var d=0,a=this.controls.length;d<a;d++){var f=this.controls[d];if(f==b.control){continue}if(f.type==OpenLayers.Control.TYPE_BUTTON){continue}if(f.type==OpenLayers.Control.TYPE_TOGGLE&&(f instanceof Geoportal.Control.PanelToggle)){continue}f.deactivate()}return true},CLASS_NAME:"Geoportal.Control.Panel"});Geoportal.Control.PermanentLogo=OpenLayers.Class(Geoportal.Control,{permaLogo:null,permaURL:null,initialize:function(a){Geoportal.Control.prototype.initialize.apply(this,arguments);if(!this.permaLogo){this.permaLogo=Geoportal.Util.getImagesLocation()+"logo_gp.gif"}if(!this.permaURL){this.permaURL="http://www.geoportail.fr/"}},destroy:function(){this.map.events.unregister("changebaselayer",this,this.changeBaseLayer);this.map.events.unregister("preaddlayer",this,this.onGeoportalLayer);this.map.events.unregister("changelayer",this,this.changeBaseLayer);Geoportal.Control.prototype.destroy.apply(this,arguments)},draw:function(b){Geoportal.Control.prototype.draw.apply(this,arguments);var d=OpenLayers.Util.createImage(null,null,null,this.permaLogo,null,null,null,false);if(this.permaURL!=null){var a=document.createElement("a");a.setAttribute("href",this.permaURL);a.setAttribute("target","_blank");a.appendChild(d);this.div.appendChild(a)}else{this.div.appendChild(d)}if(this.hasGeoportalLayers()){this.div.style.display="block"}else{this.div.style.display="none"}return this.div},onGeoportalLayer:function(a){if(!(this.div.style.display=="none")){return}if(!a){return}if(!a.layer){return}var b=a.layer;if(!b.visibility){return}if(b.GeoRM&&(b.GeoRM instanceof Geoportal.GeoRMHandler.Updater)){this.div.style.display="block"}},hasGeoportalLayers:function(){if(!this.map){return false}for(var d=0,a=this.map.layers.length;d<a;d++){var b=this.map.layers[d];if(!b.visibility){continue}if(b.GeoRM&&(b.GeoRM instanceof Geoportal.GeoRMHandler.Updater)){return true}}return(this.map.layers.length==0)},setMap:function(){Geoportal.Control.prototype.setMap.apply(this,arguments);this.map.events.register("preaddlayer",this,this.onGeoportalLayer);this.map.events.register("changebaselayer",this,this.changeBaseLayer);this.map.events.register("changelayer",this,this.changeBaseLayer)},changeBaseLayer:function(a){if(!a){return}if(a.type=="changelayer"&&a.property!="visibility"){return}if(this.hasGeoportalLayers()){this.div.style.display="block"}else{this.div.style.display="none"}},CLASS_NAME:"Geoportal.Control.PermanentLogo"});Geoportal.Control.Projections=OpenLayers.Class(Geoportal.Control,{displayProjections:null,selectProjs:null,destroy:function(){if(this.map){this.map.events.unregister("changebaselayer",this,this.changeDisplayProjections);if(this.displayProjection.isUTMZoneProjection()){this.map.events.unregister("mousemove",this,this.updateDisplayProjections);this.map.events.unregister("moveend",this,this.updateDisplayProjections)}}if(this.selectProjs){OpenLayers.Event.stopObservingElement(this.selectProjs);this.selectProjs=null}this.displayProjections=null;Geoportal.Control.prototype.destroy.apply(this,arguments)},setMap:function(a){Geoportal.Control.prototype.setMap.apply(this,arguments);this.map.events.register("changebaselayer",this,this.changeDisplayProjections)},changeDisplayProjections:function(b){if(!b){return}if(this.map&&this.map.baseLayer){if(this.map.baseLayer.allowedDisplayProjections){this.displayProjections=this.map.baseLayer.allowedDisplayProjections.slice(0)}else{if(this.map.baseLayer.displayProjection){this.displayProjections=[this.map.baseLayer.displayProjection]}else{this.displayProjections=[this.map.getProjection()]}}for(var d=0,a=this.displayProjections.length;d<a;d++){var f=this.displayProjections[d];if(typeof(f)=="string"){this.displayProjections[d]=new OpenLayers.Projection(f)}}this.redraw()}},updateDisplayProjections:function(a){if(this.displayProjection.isUTMZoneProjection()){this.updateMGRS(a);return}return},updateMGRS:function(a){var b=null;if(a==null||a.xy==undefined){b=this.map.getCenter();if(!b){b=new OpenLayers.LonLat(0,0)}}else{b=this.map.getLonLatFromPixel(a.xy)}if(!b){return}b.transform(this.map.getProjection(),OpenLayers.Projection.CRS84);if(!this.displayProjection.domainOfValidity.containsLonLat(b)){var d=this.lookupUTMZone(b);if(d!=null){this.displayProjection=d;this.map.displayProjection=d;this.map.events.triggerEvent("changedisplayprojection",{displayProjection:d})}}},redraw:function(){if(this.div!=null){this.div.innerHTML=""}this.draw()},draw:function(p){Geoportal.Control.prototype.draw.apply(this,arguments);var j=document.createElement("form");j.id="__fslpj__"+this.id;j.name=j.id;j.action="javascript:void(null)";this.selectProjs=document.createElement("select");this.selectProjs.id="__slpj__"+this.id;this.selectProjs.name=this.selectProjs.id;this.selectProjs.className="gpSelectProjections";j.appendChild(this.selectProjs);var g=-1;for(var h=0,b=this.displayProjections.length;h<b;h++){var d=this.displayProjections[h];var l=OpenLayers.String.trim(d.getTitle());var m=h;if(d.isUTMZoneProjection()){if(g!=-1){continue}g=h;m=Geoportal.Control.Projections.MGRS_UTM;l=OpenLayers.i18n("utm.zone")}var a=document.createElement("option");a.value=m;a.appendChild(document.createTextNode(l));this.selectProjs.appendChild(a)}this.selectProjs.hasFocus=false;this.selectProjs.kbControl=this.map.getControlsByClass(OpenLayers.Control.KeyboardDefaults.prototype.CLASS_NAME)[0];if(this.selectProjs.kbControl){OpenLayers.Event.observe(this.selectProjs,"click",OpenLayers.Function.bind(this.onProjectionClick,this,this.selectProjs))}OpenLayers.Event.observe(this.selectProjs,"change",OpenLayers.Function.bind(this.onProjectionChange,this,this.selectProjs));this.div.appendChild(j);return this.div},onProjectionClick:function(b,a){if(a||window.event){OpenLayers.Event.stop(a?a:window.event)}if(b.kbControl){if(b.kbControl.events==null){b.kbControl=null}else{if(b.kbControl.active){b.kbControl.deactivate()}}}b.hasFocus=true;b.focus()},onProjectionChange:function(j,b){if(b||window.event){OpenLayers.Event.stop(b?b:window.event)}if(j.options[j.selectedIndex].value!=Geoportal.Control.Projections.MGRS_UTM){if(this.displayProjection.isUTMZoneProjection()){this.map.events.unregister("mousemove",this,this.updateDisplayProjections);this.map.events.unregister("moveend",this,this.updateDisplayProjections)}this.displayProjection=this.displayProjections[j.options[j.selectedIndex].value]}else{var h=this.lookupUTMZone(this.map.getCenter().transform(this.map.getProjection(),OpenLayers.Projection.CRS84));if(h!=null){if(!this.displayProjection.isUTMZoneProjection()){this.map.events.register("mousemove",this,this.updateDisplayProjections);this.map.events.register("moveend",this,this.updateDisplayProjections)}this.displayProjection=h}else{var g=OpenLayers.String.trim(this.displayProjection.getTitle());for(var d=0,a=j.options.length;d<a;d++){var f=j.options[d];if(OpenLayers.String.trim(f.text)==g){j.selectedIndex=d;break}}}}this.map.displayProjection=this.displayProjection;this.map.events.triggerEvent("changedisplayprojection",{displayProjection:this.displayProjection});if(j.kbControl){if(j.kbControl.events==null){j.kbControl=null}else{if(!j.kbControl.active){j.kbControl.activate()}}}j.hasFocus=false;j.blur()},setDisplayProjection:function(f){if(!this.selectProjs){return}if(typeof(f)=="string"){f=new OpenLayers.Projection(f);if(f==null){return}}var h=null,g=-1,l=null,d=f.getCode(),b=f.isUTMZoneProjection();for(var a=0,j=this.displayProjections.length;a<j;a++){l=this.displayProjections[a];if(d==l.getCode()){g=a;break}}if(g==-1){return}if(b){g=Geoportal.Control.Projections.MGRS_UTM}else{g=""+g}for(var a=0,j=this.selectProjs.options.length;a<j;a++){h=this.selectProjs.options[a];if(h.value==g){if(this.selectProjs.selectedIndex==a){return}this.selectProjs.selectedIndex=a;this.onProjectionChange(this.selectProjs);return}}},lookupUTMZone:function(h){var g=Number.NaN,j=null,l=Number.NaN,b=null,o=null,m=new OpenLayers.Geometry.Point(h.lon,h.lat);for(var f=0,a=this.displayProjections.length;f<a;f++){b=this.displayProjections[f];if(!b.isUTMZoneProjection()){continue}if(b.domainOfValidity.containsLonLat(h)){return b}o=b.domainOfValidity.toGeometry();l=m.distanceTo(o);if(isNaN(g)||l<g){g=l;j=b}o=null}return j},changeLang:function(b){if(this.selectProjs){for(var d=0,a=this.selectProjs.options.length;d<a;d++){var f=this.selectProjs.options[d];if(f.value!=Geoportal.Control.Projections.MGRS_UTM){f.innerHTML=this.displayProjections[f.value].getTitle()}}}},updateSize:function(){if(this.div.parentNode){var d=Geoportal.Util.getComputedStyle(this.div.parentNode,"width",true);if(!d){return}var a=Geoportal.Util.getComputedStyle(this.selectProjs,"width",true);if(!a){return}var b=Math.abs(d-a)/(2*d)+0.01;this.div.style.left=(100*b).toFixed(0)+"%";this.redraw()}},CLASS_NAME:"Geoportal.Control.Projections"});Geoportal.Control.Projections.MGRS_UTM="__MGRS_UTM__";Geoportal.Control.RemoveLayer=OpenLayers.Class(Geoportal.Control,{type:OpenLayers.Control.TYPE_BUTTON,layer:null,removable:false,initialize:function(b,a){Geoportal.Control.prototype.initialize.apply(this,[a]);this.layer=b;this.removable=this.layer.view&&this.layer.view.drop;if(!this.removable){this.displayClass="gpControlRemoveLayerNone";if(this.div){this.div.title="";if(this.panel_div){this.panel_div.title=this.div.title}}}},trigger:function(){if(this.removable&&this.layer&&this.layer.map){if(this.layer.features){this.layer.destroyFeatures(this.layer.features.slice())}this.layer.map.removeLayer(this.layer)}},changeLang:function(a){if(this.removable){this.div.title=OpenLayers.i18n(this.displayClass+".title");if(this.panel_div){this.panel_div.title=this.div.title}}},CLASS_NAME:"Geoportal.Control.RemoveLayer"});Geoportal.Control.SliderBase=OpenLayers.Class(Geoportal.Control,{axis:"vertical",isVertical:true,levelBarImgWidth:0,levelBarImgHeight:0,levelBarImg:null,levelBarIntervalLength:0,levelBarDiv:null,levelBarDivEvents:null,sliderImgWidth:0,sliderImgHeight:0,sliderImg:null,slider:null,sliderEvents:null,sliderTopLeft:"top",initialLevel:Number.NaN,getLevel:function(){return -1},getMaxAbsoluteLevels:function(){return null},getMinSelectableLevel:function(){return 0},getMaxSelectableLevel:function(){return -1},onDraw:function(a){},onSliderMove:function(a){},downEventStart:null,initialize:function(){Geoportal.Control.prototype.initialize.apply(this,arguments);if(this.axis=="horizontal"){this.sliderTopLeft="left"}this.isVertical=this.axis=="vertical"},destroy:function(){if(this.div){if(this.slider){if(this.slider.parentNode){this.slider.parentNode.removeChild(this.slider)}this.slider=null}if(this.levelBarDiv){if(this.levelBarDiv.parentNode){this.levelBarDiv.parentNode.removeChild(this.levelBarDiv)}this.levelBarDiv=null}this.div=null}if(this.sliderEvents){this.sliderEvents.destroy();this.sliderEvents=null}if(this.levelBarDivEvents){this.levelBarDivEvents.destroy();this.levelBarDivEvents=null}Geoportal.Control.prototype.destroy.apply(this,arguments)},setMap:function(a){Geoportal.Control.prototype.setMap.apply(this,arguments);if(!this.isVertical){if(this.getMaxAbsoluteLevels()>1){this.levelBarIntervalLength=this.levelBarImgWidth/(this.getMaxAbsoluteLevels()-1)}else{this.levelBarIntervalLength=this.levelBarImgWidth}}else{if(this.getMaxAbsoluteLevels()>1){this.levelBarIntervalLength=this.levelBarImgHeight/(this.getMaxAbsoluteLevels()-1)}else{this.levelBarIntervalLength=this.levelBarImgHeight}}},redraw:function(){if(this.div!=null){this.div.innerHTML=""}this.draw(this.position)},draw:function(d){Geoportal.Control.prototype.draw.apply(this,arguments);var b=null;if(!d){b=new OpenLayers.Pixel(0,0)}else{b=d.clone()}var g=new OpenLayers.Size();if(this.isVertical){g.w=this.levelBarImgWidth;g.h=this.levelBarIntervalLength*(this.getMaxAbsoluteLevels()-1)}else{g.w=this.levelBarIntervalLength*(this.getMaxAbsoluteLevels()-1);g.h=this.levelBarImgHeight}var f=OpenLayers.Util.createUniqueID("SliderBase");this.levelBarDiv=OpenLayers.Util.createDiv(f,b,g,this.levelBarImg,"relative",null,null,null);this.levelBarDiv.style.backgroundRepeat="no-repeat";this.levelBarDiv.appendChild(document.createTextNode(" "));this.levelBarDivEvents=new OpenLayers.Events(this,this.levelBarDiv,null,true,{includeXY:true});this.levelBarDivEvents.on({mousedown:this.singleClick,mousemove:this.passEventToSlider,dblclick:this.doubleClick,click:this.doubleClick});this.div.appendChild(this.levelBarDiv);g.w=this.sliderImgWidth;g.h=this.sliderImgHeight;var h;if(isNaN(this.initialLevel)){h=this.getLevel()}else{h=this.initialLevel;this.initialLevel=Number.NaN}if(this.isVertical){b=b.add(-Math.round(b.x/2),this.levelToPos(h))}else{b=b.add(this.levelToPos(h),-Math.round(b.y/2))}var a=OpenLayers.Util.createUniqueID("SliderBaseHandle");this.slider=OpenLayers.Util.createAlphaImageDiv(a,b,g,this.sliderImg,"absolute");this.slider.className="gpControlSliderBaseHandle";if(this.isVertical){this.slider.style.position="relative"}this.sliderEvents=new OpenLayers.Events(this,this.slider,null,true,{includeXY:true});this.sliderEvents.on({mousedown:this.sliderDown,mousemove:this.sliderDrag,mouseup:this.sliderUp,dblclick:this.doubleClick,click:this.doubleClick});this.div.appendChild(this.slider);this.onDraw(h);return this.div},passEventToSlider:function(a){this.sliderEvents.handleBrowserEvent(a)},doubleClick:function(a){OpenLayers.Event.stop(a);return false},singleClick:function(a){},sliderDown: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.downEventStart=a.xy.clone();this.slider.className="gpControlSliderBaseHandleDown";OpenLayers.Event.stop(a)},sliderDrag:function(a){},sliderUp:function(a){},moveSlider:function(){var b=this.getLevel();var a=this.levelToPos(b);this.updateSlider(a);this.onSliderMove(b)},levelToPos:function(b){var a=0;if(this.isVertical){a=(b-this.getMaxAbsoluteLevels()+1)*this.levelBarIntervalLength;a-=this.sliderImgHeight/2}else{a=(b)*this.levelBarIntervalLength;a-=this.sliderImgWidth/2}return a},posToLevel:function(a){var b=0;if(this.isVertical){b=a+this.sliderImgHeight/2;b=Math.floor((b/this.levelBarIntervalLength)+this.getMaxAbsoluteLevels()-1)}else{b=a+this.sliderImgWidth/2;b=Math.floor((b/this.levelBarIntervalLength))}b=this.adjustLevel(b);return b},adjustLevel:function(b){var a=Math.min(Math.max(b,this.getMinSelectableLevel()),this.getMaxSelectableLevel());return a},updateSlider:function(a){if(this.slider){this.slider.style[this.sliderTopLeft]=a+"px"}},CLASS_NAME:"Geoportal.Control.SliderBase"});Geoportal.Control.TermsOfService=OpenLayers.Class(Geoportal.Control,{tosLabel:null,tosURL:null,draw:function(a){Geoportal.Control.prototype.draw.apply(this,arguments);this.updateTermsOfService();return this.div},updateTermsOfService:function(){if(this.div.childNodes.length>0){this.div.removeChild(this.div.childNodes[0])}if(this.tosLabel==null){this.tosLabel="TOS"}if(this.tosURL==null){this.tosURL="http://www.ign.fr/partage/api/cgu/licAPI_CGUF.pdf"}var a=OpenLayers.i18n(this.tosLabel);var b=document.createElement("a");b.setAttribute("href",this.tosURL);b.setAttribute("alt",a);b.setAttribute("title",a);b.setAttribute("target","_blank");b.appendChild(document.createTextNode(a));this.div.appendChild(b)},changeLang:function(a){this.updateTermsOfService()},CLASS_NAME:"Geoportal.Control.TermsOfService"});Geoportal.Control.ToolBox=OpenLayers.Class(Geoportal.Control,{containDiv:null,labelDivID:null,tbxContent:null,usersContent:null,ovmContent:null,initialize:function(a){Geoportal.Control.prototype.initialize.apply(this,[a])},destroy:function(){OpenLayers.Event.stopObservingElement(this.div);Geoportal.Control.prototype.destroy.apply(this,arguments)},loadContents:function(){OpenLayers.Event.observe(this.div,"dblclick",OpenLayers.Function.bindAsEventListener(OpenLayers.Event.stop));OpenLayers.Event.observe(this.div,"click",OpenLayers.Function.bindAsEventListener(OpenLayers.Event.stop));OpenLayers.Event.observe(this.div,"mousedown",OpenLayers.Function.bindAsEventListener(this.mouseDown,this));OpenLayers.Event.observe(this.div,"mouseup",OpenLayers.Function.bindAsEventListener(this.mouseUp,this));var d=this.createInnerDiv(OpenLayers.Util.createUniqueID("toolbox"),"gpToolBoxClass",this.div);var b;if(!this.outsideViewport){this.labelDivID=OpenLayers.Util.createUniqueID("nameOfBox");b=this.createInnerDiv(this.labelDivID,"gpControlLabelClass",d,OpenLayers.i18n(this.displayClass+".label"));OpenLayers.Event.observe(b,"click",OpenLayers.Function.bindAsEventListener(this.clickOnLabel,this));OpenLayers.Event.observe(b,"dblclick",OpenLayers.Function.bindAsEventListener(this.clickOnLabel,this))}b=this.createInnerDiv(OpenLayers.Util.createUniqueID("contenuTools"),"gpToolBoxContentContainer",d);this.tbxContent=this.createInnerDiv(null,"gpToolBoxContent",b);var a=this.createInnerDiv(this.id+"_navbar","gpControlNavToolbar",this.tbxContent);a=this.createInnerDiv(this.id+"_measure","gpControlMeasureToolbar",this.tbxContent);a.style.display="none";a=this.createInnerDiv(this.id+"_search","gpControlSearchToolbar",this.tbxContent);a.style.display="none";a=this.createInnerDiv(this.id+"_addlyr","gpControlLayerToolbar",this.tbxContent);a.style.display="none";a=this.createInnerDiv(this.id+"_zoombar","gpZoomBarClass",this.tbxContent);a=this.createInnerDiv(this.id+"_meares","gpControlMeasureToolbarResult",this.tbxContent);a.style.display="none";this.usersContent=this.createInnerDiv(this.id+"_userctrls","gpToolBoxUsersControlsContainer",this.tbxContent);this.ovmContent=this.createInnerDiv(this.id+"_ovmap","olControlOverviewMap",b);if(!this.outsideViewport){this.containDiv=this.div.firstChild.childNodes[1]}},createControlAnchor:function(f,b){var a=null;if(this.usersContent){a=this.createInnerDiv(f,b,this.tbxContent);this.usersContent.appendChild(a)}return a},createInnerDiv:function(h,g,b,a){var f=document.createElement("div");if(h){f.id=h}if(g==null){g=""}f.className=g+" olControlNoSelect";if(a){f.innerHTML=a}b.appendChild(f);return f},redraw:function(){return this.div},draw:function(a){Geoportal.Control.prototype.draw.apply(this,arguments);this.loadContents();if(!this.outsideViewport){this.minimizeControl()}return this.div},clickOnLabel:function(b){if(this.containDiv!=null){var a=this.containDiv.style.display=="block";this.showControls(a);this.ignoreEvent(b)}},ignoreEvent:function(a){if(a!=null){OpenLayers.Event.stop(a)}},maximizeControl:function(a){this.showControls(false);this.ignoreEvent(a)},minimizeControl:function(a){this.showControls(true);this.ignoreEvent(a)},showControls:function(a){this.containDiv.style.display=a?"none":"block"},mouseDown:function(a){this.isMouseDown=true;OpenLayers.Event.stop(a)},mouseUp:function(a){if(this.isMouseDown){this.isMouseDown=false;OpenLayers.Event.stop(a)}},changeLang:function(a){var b=OpenLayers.Util.getElement(this.labelDivID);if(b){b.innerHTML="<center>"+OpenLayers.i18n(this.displayClass+".label")+"</center>"}},CLASS_NAME:"Geoportal.Control.ToolBox"});Geoportal.Control.ZoomToLayerMaxExtent=OpenLayers.Class(Geoportal.Control,{type:OpenLayers.Control.TYPE_BUTTON,visible:true,layer:null,zoomable:false,initialize:function(b,a){Geoportal.Control.prototype.initialize.apply(this,[a]);this.layer=b;this.zoomable=this.layer.view&&this.layer.view.zoomToExtent;if(!this.zoomable){this.displayClass="gpControlZoomToLayerMaxExtentNone";if(this.div){this.div.title="";if(this.panel_div){this.panel_div.title=""}}}},trigger:function(){if(this.zoomable&&this.layer&&this.layer.map){var a=this.layer.getDataExtent();if(a){if(a.getWidth()==0||a.getHeight()==0){this.layer.map.zoomTo(this.layer.minZoomLevel)}else{this.layer.map.zoomToExtent(a,true)}}}},changeLang:function(a){if(this.zoomable){this.div.title=OpenLayers.i18n(this.displayClass+".title");if(this.panel_div){this.panel_div.title=this.div.title}}},CLASS_NAME:"Geoportal.Control.ZoomToLayerMaxExtent"});Geoportal.Format.GPX=OpenLayers.Class(Geoportal.Format,OpenLayers.Format.XML,{defaultVersion:"1.0",version:null,parser:null,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},read:function(d){if(typeof d=="string"){d=OpenLayers.Format.XML.prototype.read.apply(this,[d])}if(!d){return null}var b=d.nodeType==9?d.documentElement:d;var a=this.version||this.defaultVersion;if(!this.parser||this.parser.VERSION!=a){var f=Geoportal.Format.GPX["v"+a.replace(/\./g,"_")];if(!f){throw OpenLayers.i18n("GPX.version",{gpxVersion:a})}this.parser=new f(this.options)}return this.parser.read(b)},write:function(d,b){var a=(b&&b.version)||this.version||this.defaultVersion;if(!this.parser||this.parser.VERSION!=a){var f=Geoportal.Format.GPX["v"+a.replace(/\./g,"_")];if(!f){throw OpenLayers.i18n("GPX.version",{gpxVersion:a})}this.parser=new f(this.options)}return this.parser.write(d,b)},CLASS_NAME:"Geoportal.Format.GPX"});Geoportal.Format.GPX.v1=OpenLayers.Class(Geoportal.Format,OpenLayers.Format.XML,{creator:null,extractWaypoints:true,extractTracks:true,extractRoutes:true,extractAttributes:true,handleHeight:false,gpxns:null,regExes:{trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)},initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a]);if(!this.externalProjection){this.externalProjection="EPSG:4326"}if(typeof(this.externalProjection)=="string"){this.externalProjection=new OpenLayers.Projection(this.externalProjection,{domainOfVaditity:new OpenLayers.Bounds(-180,-90,180,90)})}this.gpxns=this.namespaces[this.defaultPrefix]},read:function(b){var a={};return this.parseData(b,a)},parseData:function(g,o){var b=[];this.version=g.getAttribute("version");this.creator=g.getAttribute("creator");var j=["trk","rte","wpt"];for(var h=0,f=j.length;h<f;++h){var m=j[h];var a=this.getElementsByTagNameNS(g,"*",m);if(a.length==0){continue}var d=[];switch(m.toLowerCase()){case"trk":if(this.extractTracks){d=this.parseTracks(a,o)}break;case"rte":if(this.extractRoutes){d=this.parseRoutes(a,o)}break;case"wpt":if(this.extractWaypoints){d=this.parseWayPoints(a,o)}break;default:break}if(d.length>0){b=b.concat(d)}}return b},parseTracks:function(a,u){var f=[];for(var p=0,g=a.length;p<g;p++){var b=a[p];var o={};if(this.extractAttributes){o=this.parseAttributes(b.childNodes,"trk")}var d=this.getElementsByTagNameNS(b,b.namespaceURI,"trkseg");for(var m=0,h=d.length;m<h;m++){var q=this.extractSegment(d[m],"trkpt");var r=new OpenLayers.Feature.Vector(q,o,this.style);if(r){f.push(r)}else{}}}return f},parseRoutes:function(a,o){var d=[];for(var h=0,f=a.length;h<f;h++){var b=a[h];var g={};if(this.extractAttributes){g=this.parseAttributes(b.childNodes,"rte")}var j=this.extractSegment(b,"rtept");var m=new OpenLayers.Feature.Vector(j,g,this.style);if(m){d.push(m)}else{}}return d},parseWayPoints:function(a,o){var b=[];for(var h=0,f=a.length;h<f;h++){var d=a[h];var g={};if(this.extractAttributes){g=this.parseAttributes(d.childNodes,"wpt")}var j=new OpenLayers.Geometry.Point(d.getAttribute("lon"),d.getAttribute("lat"));j.transform(this.externalProjection,this.internalProjection);var m=new OpenLayers.Feature.Vector(j,g,this.style);if(m){b.push(m)}else{}}return b},extractSegment:function(h,j){var g=this.getElementsByTagNameNS(h,h.namespaceURI,j);var b=[];for(var f=0,d=g.length;f<d;f++){var a=new OpenLayers.Geometry.Point(g[f].getAttribute("lon"),g[f].getAttribute("lat"));b.push(a)}var m=new OpenLayers.Geometry.LineString(b);m.transform(this.externalProjection,this.internalProjection);return m},parseAttributes:function(d,o){var h={};h.typeName=o;for(var g=0,l=d.length;g<l;g++){var m=d[g];if(m.nodeType==1){var b=m.nodeName;if(m.childNodes.length>0){for(var f=0,a=m.childNodes.length;f<a;f++){if((m.childNodes[f].nodeType==3&&a==1)||m.childNodes[f].nodeType==4){var p=m.childNodes[f].nodeValue.replace(this.regExes.trimSpace,"");h[b]=p;break}}}}}return h},write:function(f,b){if(!(f instanceof Array)){f=[f]}var h=this.createElementNS(this.gpxns,"gpx");if(!this.version){this.version=this.VERSION}h.setAttribute("version",this.version);if(!this.creator){this.creator=this.CLASS_NAME}h.setAttribute("creator",this.creator);for(var d=0,a=f.length;d<a;++d){var g=this.createFeatureXML(f[d]);if(g){h.appendChild(g)}}return OpenLayers.Format.XML.prototype.write.apply(this,[h])},createFeatureXML:function(a){this.featureToSerialize=a;if(!this.featureToSerialize.attributes.name){this.featureToSerialize.attributes.name=this.featureToSerialize.fid}var b=this.buildGeometryNode(a.geometry);this.featureToSerialize=null;return b},buildGeometryNode:function(f){f=f.clone();f.transform(this.internalProjection,this.externalProjection);var d=f.CLASS_NAME;var b=d.substring(d.lastIndexOf(".")+1);var a=this.buildGeometry[b.toLowerCase()];return a.apply(this,[f])},filterAttribute:function(a,b,d){return d.attributes[b]},buildGeometry:{point:function(h){var a=this.featureToSerialize.attributes.typeName||this.featureToSerialize.layer.options.typename;if(a==undefined){a="wpt"}var g=this.createElementNS(this.gpxns,a);this.buildCoordinatesAttributes(g,h);for(var f in this.featureToSerialize.attributes){if(f=="typeName"){continue}var d=this.filterAttribute(a,f,this.featureToSerialize);if(d!=null){var b=this.createElementNS(this.gpxns,f);b.appendChild(this.createTextNode(d));g.appendChild(b)}}return g},multipoint:function(a){return this.buildGeometry.point.apply(this,[a.components[0]])},linestring:function(q){var u=this.featureToSerialize.attributes.typeName||this.featureToSerialize.layer.options.typename;if(u==undefined){u="trk"}var d=this.createElementNS(this.gpxns,u);for(var r in this.featureToSerialize.attributes){if(r=="typeName"){continue}var j=this.filterAttribute(this.featureToSerialize.attributes[r]);if(j!=null){var o=this.createElementNS(this.gpxns,r);o.appendChild(this.createTextNode(j));d.appendChild(o)}}var m=d;var b="pt";switch(u){case"trk":var a=this.createElementNS(this.gpxns,"trkseg");d.appendChild(a);m=a;b="trkpt";break;case"rte":b="rtept";break;default:break}for(var h=0,f=q.components.length;h<f;h++){var p=q.components[h];var g=this.createElementNS(this.gpxns,b);this.buildCoordinatesAttributes(g,p);m.appendChild(g)}return d},multilinestring:function(a){return this.buildGeometry.linestring.apply(this,[a.components[0]])},linearring:function(a){return null},polygon:function(a){return this.buildGeometry.linestring.apply(this,[a.components[0]])},multipolygon:function(a){return this.buildGeometry.polygon.apply(this,[a.components[0]])}},buildCoordinatesAttributes:function(f,g){var d=g.components?g.components:[g];for(var b=0,a=d.length;b<a;b++){f.setAttribute("lat",OpenLayers.String.sprintf("%.6f",d[b].y));f.setAttribute("lon",OpenLayers.String.sprintf("%.6f",d[b].x))}},CLASS_NAME:"Geoportal.Format.GPX.v1"});Geoportal.Format.Geoconcept=OpenLayers.Class(Geoportal.Format,{SUPPORTED_CRSS:[{Type:1,TimeZone:null,projCode:["EPSG:27572","EPSG:27582","IGNF:LAMBE"]},{Type:2,TimeZone:null,projCode:["EPSG:27561","IGNF:LAMB1"]},{Type:3,TimeZone:null,projCode:["EPSG:27562","IGNF:LAMB2"]},{Type:4,TimeZone:null,projCode:["EPSG:27563","IGNF:LAMB3"]},{Type:5,TimeZone:null,projCode:["EPSG:27564","IGNF:LAMB4"]},{Type:13,TimeZone:null,projCode:["EPSG:3785","EPSG:900913"]},{Type:15,TimeZone:1,projCode:["EPSG:2988","IGNF:WALL78UTM1S"]},{Type:15,TimeZone:5,projCode:["EPSG:2977","IGNF:TAHAAUTM05S"]},{Type:15,TimeZone:6,projCode:["EPSG:3305","IGNF:MOOREA87U6S"]},{Type:15,TimeZone:6,projCode:["EPSG:3304","IGNF:TAHI79UTM6S"]},{Type:15,TimeZone:7,projCode:["EPSG:2978","EPSG:3302","IGNF:NUKU72U7S","IGNF:IGN63UTM7S"]},{Type:15,TimeZone:38,projCode:["EPSG:2980","IGNF:MAYO50UTM38S"]},{Type:15,TimeZone:39,projCode:["EPSG:32739","IGNF:UTM39SW84"]},{Type:15,TimeZone:42,projCode:["EPSG:32742","IGNF:UTM42SW84"]},{Type:15,TimeZone:43,projCode:["EPSG:32743","IGNF:UTM43SW84"]},{Type:15,TimeZone:58,projCode:["EPSG:32758","IGNF:IGN72UTM58S"]},{Type:17,TimeZone:20,projCode:["EPSG:2973","EPSG:2970","EPSG:2969","IGNF:MART38UTM20","IGNF:GUAD48UTM20","IGNF:GUADFM49U20"]},{Type:17,TimeZone:21,projCode:["EPSG:2987","IGNF:STPM50UTM21"]},{Type:17,TimeZone:22,projCode:["EPSG:2971","IGNF:CSG67UTM22"]},{Type:101,TimeZone:null,projCode:["EPSG:4326","CRS:84","IGNF:WGS84G"]},{Type:102,TimeZone:null,projCode:["IGNF:ED50G"]},{Type:105,TimeZone:null,projCode:["IGNF:NTFP"]},{Type:107,TimeZone:null,projCode:["IGNF:WGS72G"]},{Type:222,TimeZone:null,projCode:["IGNF:MILLER"]},{Type:501,TimeZone:null,projCode:["EPSG:32620","IGNF:RRAFGUADU20"]},{Type:502,TimeZone:null,projCode:["EPSG:32620","IGNF:RRAFMARTU20"]},{Type:503,TimeZone:null,projCode:["EPSG:32740","IGNF:RGM04UTM38S"]},{Type:504,TimeZone:null,projCode:["EPSG:2975","IGNF:RGR92UTM40S"]},{Type:505,TimeZone:null,projCode:["EPSG:2972","IGNF:UTM22RGFG95"]},{Type:506,TimeZone:null,projCode:["EPSG:32701","IGNF:UTM01SWG84"]},{Type:507,TimeZone:null,projCode:["EPSG:32621","IGNF:RGSPM06U21"]},{Type:508,TimeZone:null,projCode:["EPSG:3296","IGNF:RGPFUTM5S"]},{Type:509,TimeZone:null,projCode:["EPSG:3297","IGNF:RGPFUTM6S"]},{Type:510,TimeZone:null,projCode:["EPSG:3298","IGNF:RGPFUTM7S"]},{Type:511,TimeZone:null,projCode:["IGNF:CROZ63UTM39S"]},{Type:513,TimeZone:null,projCode:["IGNF:RGNCUTM57S"]},{Type:514,TimeZone:null,projCode:["IGNF:RGNCUTM58S"]},{Type:515,TimeZone:null,projCode:["IGNF:RGNCUTM59S"]},{Type:516,TimeZone:null,projCode:["IGNF:KERG62UTM42S"]},{Type:520,TimeZone:null,projCode:["IGNF:REUN47GAUSSL"]},{Type:1002,TimeZone:null,projCode:["EPSG:27571","IGNF:LAMB1C"]},{Type:1003,TimeZone:null,projCode:["EPSG:27572","IGNF:LAMB2C"]},{Type:1004,TimeZone:null,projCode:["EPSG:27573","IGNF:LAMB3C"]},{Type:1005,TimeZone:null,projCode:["EPSG:27574","IGNF:LAMB4C"]},{Type:1006,TimeZone:null,projCode:["EPSG:2154","IGNF:LAMB93"]},{Type:1007,TimeZone:null,projCode:["IGNF:RGNCLAM"]},{Type:2501,TimeZone:null,projCode:["IGNF:RGF93CC42"]},{Type:2502,TimeZone:null,projCode:["IGNF:RGF93CC43"]},{Type:2503,TimeZone:null,projCode:["IGNF:RGF93CC44"]},{Type:2504,TimeZone:null,projCode:["IGNF:RGF93CC45"]},{Type:2505,TimeZone:null,projCode:["IGNF:RGF93CC46"]},{Type:2506,TimeZone:null,projCode:["IGNF:RGF93CC47"]},{Type:2507,TimeZone:null,projCode:["IGNF:RGF93CC48"]},{Type:2508,TimeZone:null,projCode:["IGNF:RGF93CC49"]},{Type:2509,TimeZone:null,projCode:["IGNF:RGF93CC50"]},{Type:2012,TimeZone:null,projCode:["IGNF:GEOPORTALFXX"]},{Type:2016,TimeZone:null,projCode:["IGNF:GEOPORTALANF"]},{Type:2017,TimeZone:null,projCode:["IGNF:GEOPORTALGUF"]},{Type:2018,TimeZone:null,projCode:["IGNF:GEOPORTALREU"]},{Type:2019,TimeZone:null,projCode:["IGNF:GEOPORTALMYT"]},{Type:2020,TimeZone:null,projCode:["IGNF:GEOPORTALSPM"]},{Type:2021,TimeZone:null,projCode:["IGNF:GEOPORTALNCL"]},{Type:2022,TimeZone:null,projCode:["IGNF:GEOPORTALWLF"]},{Type:2023,TimeZone:null,projCode:["IGNF:GEOPORTALPYF"]},{Type:2040,TimeZone:null,projCode:["IGNF:GEOPORTALCRZ"]},{Type:2042,TimeZone:null,projCode:["IGNF:GEOPORTALKER"]},{Type:5030,TimeZone:null,projCode:["IGNF:RGM04GEO"]},{Type:5031,TimeZone:null,projCode:["IGNF:RGFG95GEO"]}],separator:"\t",typename:null,subTypename:null,format:2,unit:"m",charset:"ANSI",dimensions:2,extractAttributes:true,maxFeatures:0,read:function(f){var b=[];var q=f.split("\n");var g,d,a,p,h;for(g=0,d=q.length;g<d;g++){var o=q[g];if(o.charAt(0)=="/"){p=q[g].indexOf(" ");if(p<0){a=o.substring(p).replace("\r","")}else{a=o.substring(0,p);h=o.substring(p).replace("\r","")}switch(a){case"//$DELIMITER":break;case"//$SYSCOORD":var j=parseInt(h.substring(h.indexOf(":")+1,h.indexOf("}")));j=this.findCRS(j,"Type");if(j!=-1){this.externalProjection=new OpenLayers.Projection(this.SUPPORTED_CRSS[j].projCode[0])}break;case"//$FORMAT":if(parseInt(h.substring(h.indexOf(":")+1).replace(/ /g,""))==1){this.format=1}break;case"//$UNIT":this.unit=h.substring(h.indexOf(":")+1).replace(/ /g,"");switch(h){case"Distance":this.unit=this.unit||"m";break;case"Angle":this.unit=this.unit||"d";break;default:this.unit="m";break}break;case"//$QUOTED-TEXT":this.quoted=!(h.replace(/"/g,"")=="no");break;case"//$CHARSET":this.charset=h.replace(/ /g,"");break;case"//$3DOBJECT":this.dimensions=3;break;case"//$FIELD":break;default:break}continue}var m=this.readFeature(o);if(m){b.push(m);if(this.maxFeatures>0&&this.maxFeatures==b.length){break}}else{}}return b},readFeature:function(g){var l=g.split(this.separator);if(l.length<7){return null}var f=this.parseAttributes(l);var o=parseInt(l[4])+5;var r;var u,q,m=null;u=parseFloat(l[o++]);q=parseFloat(l[o++]);if(this.dimensions==3){m=parseFloat(g[o++])}if(l.length<o+1){r=new OpenLayers.Geometry.Point(u,q);if(this.dimensions==3){r.z=m}r.transform(this.externalProjection,this.internalProjection);return new OpenLayers.Feature.Vector(r,f)}var b=true;var h=parseInt(l[o+2]);if(h*this.dimensions==l.length-o-3){o+=3}else{h=parseInt(g[o++]);b=false}var v=[];var a=new OpenLayers.Geometry.Point(u,q);if(this.dimensions==3){a.z=m}v.push(a);v=this.readComponent(l,v,o,h);if(b){r=new OpenLayers.Geometry.LineString(v)}else{var j=[];var d=new OpenLayers.Geometry.LinearRing(v);j.push(d);r=new OpenLayers.Geometry.Polygon(j)}r.transform(this.externalProjection,this.internalProjection);return new OpenLayers.Feature.Vector(r,f)},readComponent:function(f,h,j,a){var b=j+this.dimensions*a;if(b>data.length){return h}for(var d=j;d<b;d+=dim){var g=new OpenLayers.Geometry.Point(parseFloat(data[d]),parseFloat(data[d+1]));if(this.dimensions==3){g.z=parseFloat(data[d+2])}h.push(g)}return h},parseAttributes:function(b){var f={id:b[0],type:b[1],stype:b[2],name:b[3]};var a=parseInt(b[4]);var d=Math.min(b.length,a);if(this.extractAttributes){for(var g=0;g<d;g++){if(attributs.length<g){f[attributs[g]]=b[5+g]}else{f["att"+g]=b[5+g]}}}return f},write:function(f){if(!(f instanceof Array)){f=[f]}var g='//$DELIMITER "tab"\n//$QUOTED-TEXT "no"\n//$CHARSET ANSI\n//$FORMAT 2\n//$UNIT ';var a=this.externalProjection;if(a&&a instanceof OpenLayers.Projection){if(a.getProjName()=="longlat"){g+="Angle:deg\n"}else{g+="Distance:m\n"}g+=this.writeCRS(a)}for(var d=0,b=f.length;d<b;d++){g+=this.writeFeature(f[d])}return g},writeCRS:function(a){var b=this.findCRS(a.projCode);var d="//$SYSCOORD {Type: ";if(b==-1){d+="-1"}else{d+=this.SUPPORTED_CRSS[b].Type;if(this.SUPPORTED_CRSS[b].TimeZone){d+=", TimeZone: "+this.SUPPORTED_CRSS[b].TimeZone}}d+="}\n";return d},writeFeature:function(a){var b="";b+="-1"+this.separator;b+=this.typename?this.typename:a.layer?a.layer.name||a.layer.CLASS_NAME:a.CLASS_NAME;b+=this.separator;b+=this.subTypename||a.geometry.CLASS_NAME.substring(a.geometry.CLASS_NAME.lastIndexOf(".")+1)+this.separator;b+=a.attributes&&a.attributes.name?a.attributes.name:a.layer&&a.layer.name?a.layer.name:a.CLASS_NAME;b+=this.separator;b+=this.writeAttributes(a.fid||a.id||"",a.attributes);b+=this.writeGeometry(a.geometry);return b+"\n"},writeAttributes:function(g,a){var f="";var d=1;if(a){for(var b in a){d++}}f+=d+this.separator;f+=g+this.separator;if(a){for(var b in a){if(a.hasOwnProperty(b)){f+=a[b]?a[b].replace(/[\r\n]/g,"\\n"):"";f+=this.separator}}}return f},writeGeometry:function(f){f=f.clone();f.transform(this.internalProjection,this.externalProjection);var d=f.CLASS_NAME;var b=d.substring(d.lastIndexOf(".")+1);var a=this.buildGeometry[b.toLowerCase()];return a.apply(this,[f])},buildGeometry:{point:function(a){return this.buildCoordinates(a)},multipoint:function(a){return null},linestring:function(a){return this.buildCoordinates(a)},linearring:function(a){return this.buildCoordinates(a,true)},multilinestring:function(a){return null},polygon:function(g){var f="";var d=g.components;for(var b=0,a=d.length;b<a;++b){if(b>0){f+=this.separator}f=this.buildCoordinates(d[b],true);if(b==0){f+=this.separator+(a-1)+this.separator}}return f},multipolygon:function(j){var h="";for(var d=0,b=j.components.length;d<b;d++){if(d>0){h+=this.separator}var g=j.componentTypes[d];var f=g.substring(g.lastIndexOf(".")+1);var a=this.buildGeometry[f.toLowerCase()];h+=a.apply(this,[j.components[d]]);if(d==0){h+=this.separator+(b-1)+this.separator}}return h}},buildCoordinates:function(h,g){var f;var d=h.components;if(d){var a=d.length;if(g){a--}f=d[0].x+this.separator+d[0].y+this.separator;if(!g){f+=d[a-1].x+this.separator+d[a-1].y+this.separator}f+=(a-1);for(var b=1;b<a;b++){f+=this.separator+d[b].x+this.separator+d[b].y}}else{f=h.x+this.separator+h.y}return f},findCRS:function(m,g){var h=-1;for(var f=0,a=this.SUPPORTED_CRSS.length;f<a&&h==-1;f++){var l=this.SUPPORTED_CRSS[f];switch(g){case"Type":if(l.Type==m){h=f}break;case"projCode":default:for(var b=0,d=l.projCode.length;b<d;b++){if(m==l.projCode[b]){h=f;break}}break}}return h},CLASS_NAME:"Geoportal.Format.Geoconcept"});Geoportal.Format.XLS=OpenLayers.Class(Geoportal.Format,OpenLayers.Format.XML,{defaultVersion:"1.1",defaultCoreService:"LocationUtilityService",version:null,coreService:null,parser:null,read:function(g){if(typeof g=="string"){g=OpenLayers.Format.XML.prototype.read.apply(this,[g])}if(g){var b=g.nodeType==9?g.documentElement:g;var a=this.version||this.defaultVersion;var d=this.coreService||this.defaultCoreService;if(!this.parser||this.parser.VERSION!=a||this.parser.CORESERVICE!=d){var f=Geoportal.Format.XLS["v"+a.replace(/\./g,"_")];var j=f?f[d]:null;if(!j){throw OpenLayers.i18n("XLS.version",{xlsVersion:a,coreService:d})}this.parser=new j(this.options)}var h=this.parser.read(b);return h}return null},write:function(f,b){var a=(b&&b.version)||this.version||this.defaultVersion;var d=(b&&b.coreService)||this.coreService||this.defaultCoreService;if(!this.parser||this.parser.VERSION!=a||this.parser.CORESERVICE!=d){var g=Geoportal.Format.XLS["v"+a.replace(/\./g,"_")][d];if(!g){throw OpenLayers.i18n("XLS.version",{xlsVersion:a,coreService:d})}this.parser=new g(this.options)}return this.parser.write(f)},CLASS_NAME:"Geoportal.Format.XLS"});Geoportal.GeoRMHandler={};Geoportal.GeoRMHandler.Updater=OpenLayers.Class({GeoRMKey:null,ServerUrl:"http://jeton-api.ign.fr/",ttl:600000,token:null,maps:[],QueryUrl:null,lastUpdate:0,status:0,script:null,reload:false,DOMhead:null,EVENT_TYPES:["tokenupdatestart","tokenupdateend","tokenloaded"],events:null,onTokenLoaded:function(a){a.setCenter(a.getCenter(),a.getZoom(),false,true)},initialize:function(f,b,a,d){OpenLayers.Util.extend(this,d);this.DOMhead=(document.getElementsByTagName("head").length?document.getElementsByTagName("head")[0]:document.body);this.GeoRMKey=f;this.lastUpdate=0;if(b){this.ServerUrl=b}if(this.ServerUrl.charAt(this.ServerUrl.length-1)!="/"){this.ServerUrl+="/"}if(a){this.ttl=1000*a}this.QueryUrl=this.ServerUrl+"getToken?key="+this.GeoRMKey+"&output=json&callback=Geoportal.GeoRMHandler.U"+this.GeoRMKey+".callback&";this.events=new OpenLayers.Events(this,null,this.EVENT_TYPES);if(this.eventListeners instanceof Object){this.eventListeners=[]}this.addOptions(d);OpenLayers.Event.observe(window,"unload",this.destroy)},addOptions:function(a){if(a){if(a.eventListeners&&a.eventListeners instanceof Object){if(!this.eventListeners){this.eventListeners=[]}this.eventListeners.push(a.eventListeners);this.events.on(a.eventListeners)}}},addMap:function(d){for(var b=0,a=this.maps.length;b<a;b++){if(this.maps[b]===d){return}}this.maps.push(d)},destroy:function(){OpenLayers.Event.stopObserving(window,"unload",this.destroy);if(this.eventListeners){for(var b=0,a=this.eventListeners.length;b<a;b++){this.events.un(this.eventListeners[b])}this.eventListeners=null}if(this.events){this.events.destroy();this.events=null}if(this.GeoRMKey){this.GeoRMKey=null}if(this.ServerUrl){this.ServerUrl="http://jeton-api.ign.fr/"}if(this.token){this.token=null}if(this.maps){this.maps=[]}if(this.QueryUrl){this.QueryUrl=null}if(this.script){this.script=null}if(this.DOMhead){this.DOMhead=null}},getToken:function(){var a=(new Date()).getTime();var b=(!this.token)||(this.lastUpdate+this.ttl<a);if(this.lastUpdate+this.ttl/2<a){if(this.status==0){this.lastUpdate=a;this.updateToken()}}if(b&&this.status>=0){this.token=null;this.reload=true;return null}return this.token},updateToken:function(){if(this.events.triggerEvent("updatetokenstart")===false){return}if(this.script){this.DOMhead.removeChild(this.script);this.script=null}this.status++;if(this.status>=10){this.status=0;if(this.events.triggerEvent("updatetokenstop")!==false){OpenLayers.Console.error(OpenLayers.i18n("geoRM.failed",{key:this.GeoRMKey}))}return}this.script=document.createElement("script");this.script.setAttribute("type","text/javascript");var b=this.QueryUrl;for(var d in this.token){b+=d+"="+this.token[d]+"&"}if(this.transport=="referrer"){if(Geoportal.Cookies.cookiesEnabled()){if(Geoportal.Cookies.get(Geoportal.GeoRMHandler.GEORM_REFERRER_COOKIENAME)===undefined){b+="cookie=referrer,"+encodeURIComponent(document.location.href)+"&"}}else{OpenLayers.Console.warn(OpenLayers.i18n("cookies.not.enabled"))}}this.script.setAttribute("src",b);this.DOMhead.appendChild(this.script);if(this.timeout){window.clearTimeout(this.timeout)}var a=this.status*this.ttl/10;this.timeout=window.setTimeout("Geoportal.GeoRMHandler.U"+this.GeoRMKey+".updateToken()",a)},callback:function(d){if(this.events.triggerEvent("updatetokenend")===false){return}if(d==null){OpenLayers.Console.error(OpenLayers.i18n("geoRM.getToken",{key:this.GeoRMKey}))}else{if(this.status>0){this.token=d;if(this.timeout){window.clearTimeout(this.timeout);this.timeout=null}this.status=-1;if(this.reload){for(var b=0,a=this.maps.length;b<a;b++){if(this.events.triggerEvent("tokenloaded")!==false){this.onTokenLoaded(this.maps[b])}}this.reload=false}this.status=0}}},CLASS_NAME:"Geoportal.GeoRMHandler.Updater"});Geoportal.GeoRMHandler.addKey=function(f,b,a,g,d){if(!Geoportal.GeoRMHandler["U"+f]){Geoportal.GeoRMHandler["U"+f]=new Geoportal.GeoRMHandler.Updater(f,b,a,d);Geoportal.GeoRMHandler["U"+f].getToken()}else{Geoportal.GeoRMHandler["U"+f].addOptions(d)}Geoportal.GeoRMHandler["U"+f].addMap(g);return Geoportal.GeoRMHandler["U"+f]};Geoportal.GeoRMHandler.GEORM_REFERRER_COOKIENAME="__rfrrric__";Geoportal.Handler.Path=OpenLayers.Class(Geoportal.Handler,OpenLayers.Handler.Path,{initialize:function(d,b,a){OpenLayers.Handler.Path.prototype.initialize.apply(this,arguments)},CLASS_NAME:"Geoportal.Handler.Path"});Geoportal.Layer.Grid=OpenLayers.Class(OpenLayers.Layer.Grid,{gridOrigin:null,nativeTileSize:null,nativeResolutions:null,resample:false,initialize:function(d,b,f,a){OpenLayers.Layer.Grid.prototype.initialize.apply(this,arguments);if(!this.gridOrigin){this.gridOrigin=new OpenLayers.LonLat(0,0)}if(!this.nativeTileSize){this.nativeTileSize=new OpenLayers.Size(OpenLayers.Map.TILE_WIDTH,OpenLayers.Map.TILE_HEIGHT)}this.tileSize=new OpenLayers.Size(OpenLayers.Map.TILE_WIDTH)},setMap:function(a){OpenLayers.Layer.Grid.prototype.setMap.apply(this,arguments);this.gridOrigin.transform(this.getNativeProjection(),this.map.getProjection())},destroy:function(){if(this.gridOrigin){this.gridOrigin=null}if(this.nativeTileSize){this.nativeTileSize=null}if(this.nativeResolutions){this.nativeResolutions=null}this.resample=false;OpenLayers.Layer.Grid.prototype.destroy.apply(this,arguments)},clone:function(a){if(a==null){a=new Geoportal.Layer.Grid(this.name,this.url,this.params,this.options)}a=OpenLayers.Layer.HTTPRequest.prototype.clone.apply(this,[a]);if(this.tileSize!=null){a.tileSize=this.tileSize.clone()}if(this.gridOrigin!=null){a.gridOrigin=this.gridOrigin.clone()}if(this.nativeTileSize!=null){a.nativeTileSize=this.nativeTileSize.clone()}if(this.nativeResolutions!=null){a.nativeResolutions=this.nativeResolutions.slice(0)}a.grid=[];return a},moveTo:function(f,a,g){OpenLayers.Layer.HTTPRequest.prototype.moveTo.apply(this,arguments);f=f||this.map.getExtent();if(f!=null){var d=!this.grid.length||a;if(this.resample){d=true}var b=this.getTilesBounds();if(this.singleTile){if(d||(!g&&!b.containsBounds(f))){this.initSingleTile(f)}}else{if(d||!b.containsBounds(f,true)){this.initGriddedTiles(f)}else{this.moveGriddedTiles(f)}}}},calculateGridLayout:function(a,v,g){var p=g*this.tileSize.w;var d=g*this.tileSize.h;var m=a.left-this.gridOrigin.lon;var q=Math.floor(m/p)-this.buffer;var o=m/p-q;var h=-o*this.tileSize.w;var r=this.gridOrigin.lon+q*p;var b=a.top-(this.gridOrigin.lat+d);var l=Math.ceil(b/d)+this.buffer;var u=l-b/d;var f=-u*this.tileSize.h;var j=this.gridOrigin.lat+l*d;return{tilelon:p,tilelat:d,tileoffsetlon:r,tileoffsetlat:j,tileoffsetx:h,tileoffsety:f}},initGriddedTiles:function(J){var o=new OpenLayers.LonLat(1,1);o.transform(this.getNativeProjection(),this.map.getProjection());var Q=this.map.getResolution();var b=Q;if(this.nativeResolutions){var u=0;for(var R=Math.max(0,this.minZoomLevel),B=Math.min(this.nativeResolutions.length,this.maxZoomLevel+1);R<B;R++){var N=this.nativeResolutions[R]*o.lon/Q;if(N>1){N=1/N}if(N>u){u=N;b=this.nativeResolutions[R]}}}this.resample=(b/Q*o.lat!=1||b/Q*o.lon!=1);this.tileSize.h=this.nativeTileSize.h*b/Q*o.lat;this.tileSize.w=this.nativeTileSize.w*b/Q*o.lon;var f=this.map.getSize();var g=Math.ceil(f.h/this.tileSize.h)+Math.max(1,2*this.buffer);var F=Math.ceil(f.w/this.tileSize.w)+Math.max(1,2*this.buffer);var d=this.maxExtent;var I=this.calculateGridLayout(J,d,Q);var P=I.tileoffsetx;var O=I.tileoffsety;if(!this.resample){P=Math.round(P);O=Math.round(O)}var S=I.tileoffsetlon;var D=I.tileoffsetlat;var E=I.tilelon;var a=I.tilelat;var C=P;var H=S;var q=0;var w=parseInt(this.map.layerContainerDiv.style.left,10);var G=parseInt(this.map.layerContainerDiv.style.top,10);do{var v=this.grid[q++];if(!v){v=[];this.grid.push(v)}S=H;P=C;var T=0;do{var K=new OpenLayers.Bounds(S,D,S+E,D+a);var M=P;M-=w;var L=O;L-=G;var r=Math.round(M);var p=Math.round(L);var l=new OpenLayers.Pixel(r,p);var h=v[T++];var m=Math.round(M+this.tileSize.w)-r;var z=Math.round(L+this.tileSize.h)-p;var j=new OpenLayers.Size(m,z);if(!h){h=this.addTile(K,l,j);this.addTileMonitoringHooks(h);v.push(h)}else{h.moveTo(K,l,false);h.setSize(j)}S+=E;P+=this.tileSize.w}while((S<=J.right+E*this.buffer)||T<F);D-=a;O+=this.tileSize.h}while((D>=J.bottom-a*this.buffer)||q<g);this.removeExcessTiles(q,T);this.spiralTileLoad()},CLASS_NAME:"Geoportal.Layer.Grid"});Geoportal.Layer.WFS=OpenLayers.Class(OpenLayers.Layer.WFS,{CLASS_NAME:"Geoportal.Layer.WFS"});Geoportal.Layer.WMS=OpenLayers.Class(OpenLayers.Layer.WMS,{CLASS_NAME:"Geoportal.Layer.WMS"});Geoportal.Layer.WMSC=OpenLayers.Class(Geoportal.Layer.Grid,{DEFAULT_PARAMS:{service:"WMS",version:"1.1.1",request:"GetMap",styles:"",exceptions:"application/vnd.ogc.se_inimage",format:"image/jpeg"},isBaseLayer:false,initialize:function(f,d,g,b){var a=[];g=OpenLayers.Util.upperCaseObject(g);a.push(f,d,g,b);Geoportal.Layer.Grid.prototype.initialize.apply(this,a);OpenLayers.Util.applyDefaults(this.params,OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS));if(this.params.TRANSPARENT&&this.params.TRANSPARENT.toString().toLowerCase()=="true"){if((b==null)||(!b.isBaseLayer)){this.isBaseLayer=false}if(this.params.FORMAT=="image/jpeg"){this.params.FORMAT=OpenLayers.Util.alphaHack()?"image/gif":"image/png"}}},destroy:function(){Geoportal.Layer.Grid.prototype.destroy.apply(this,arguments)},clone:function(a){if(a==null){a=new Geoportal.Layer.WMSC(this.name,this.url,this.params,this.options)}a=Geoportal.Layer.Grid.prototype.clone.apply(this,[a]);return a},initResolutions:function(){Geoportal.Layer.Grid.prototype.initResolutions.apply(this,arguments);if(this.nativeResolutions){var a=Math.max(0,this.minZoomLevel),b=Math.min(this.nativeResolutions.length,this.maxZoomLevel+1);if(a>b){OpenLayers.Console.error("resolutions inconsistency - check "+this.name+" (deactived)");this.minZoomLevel=this.map.baseLayer.maxZoomLevel+1;this.maxZoomLevel=this.minZoomLevel;this.visibility=false}}},getURL:function(a){if(this.gutter){a=this.adjustBoundsByGutter(a)}var b=a.clone();b.transform(this.map.getProjection(),this.getNativeProjection());var d={BBOX:b.toBBOX(),WIDTH:this.nativeTileSize.w,HEIGHT:this.nativeTileSize.h,TILED:true};return decodeURIComponent(this.getFullRequestString(d))},mergeNewParams:function(d){var b=OpenLayers.Util.upperCaseObject(d);var a=[b];Geoportal.Layer.Grid.prototype.mergeNewParams.apply(this,a)},getFullRequestString:function(b){var a=this.getNativeProjection()||this.map.getProjection();this.params.SRS=(a=="none")?null:a;return Geoportal.Layer.Grid.prototype.getFullRequestString.apply(this,arguments)},addTile:function(f,a,d){var b=this.getURL(f);return new Geoportal.Tile.Image(this,a,f,b,d)},getDataExtent:function(){return this.maxExtent},changeBaseLayer:function(a){if(OpenLayers.Layer.prototype.changeBaseLayer.apply(this,arguments)===false){return false}if(!this.isBaseLayer){if(this.getCompatibleProjection(a.layer)!=null){if(this.aggregate==undefined){this.displayInLayerSwitcher=true}if(typeof(this.savedStates[a.layer.id])=="object"){if(this.savedStates[a.layer.id].opacity!=undefined){this.opacity=undefined;this.setOpacity(this.savedStates[a.layer.id].opacity)}this.setVisibility(this.savedStates[a.layer.id].visibility)}else{this.setVisibility(this.getVisibility()&&this.calculateInRange())}return true}if(this.getCompatibleProjection(a.baseLayer)!=null){if(!this.savedStates[a.baseLayer.id]){this.savedStates[a.baseLayer.id]={}}this.savedStates[a.baseLayer.id].visibility=this.getVisibility();this.savedStates[a.baseLayer.id].opacity=this.opacity}if(this.aggregate==undefined){this.displayInLayerSwitcher=false}this.setVisibility(false)}return true},getCompatibleProjection:function(d){var b=OpenLayers.Layer.prototype.getCompatibleProjection.apply(this,arguments);if(b==null){return b}d=d||this.map.baseLayer;var f=d.getNativeProjection();var a=this.restrictedExtent||this.maxExtent;if(!a){return b}a=a.clone().transform(b,f);if(d.maxExtent.containsBounds(a,true,true)||a.containsBounds(d.maxExtent,true,true)){return b}return null},CLASS_NAME:"Geoportal.Layer.WMSC"});Geoportal.OLS.AbstractBody=OpenLayers.Class(Geoportal.OLS,{CLASS_NAME:"Geoportal.OLS.AbstractBody"});Geoportal.OLS.AbstractHeader=OpenLayers.Class(Geoportal.OLS,{CLASS_NAME:"Geoportal.OLS.AbstractHeader"});Geoportal.OLS.AbstractLocation=OpenLayers.Class(Geoportal.OLS,{CLASS_NAME:"Geoportal.OLS.AbstractLocation"});Geoportal.OLS.AbstractRequestParameters=OpenLayers.Class(Geoportal.OLS,{CLASS_NAME:"Geoportal.OLS.AbstractRequestParameters"});Geoportal.OLS.AbstractResponseParameters=OpenLayers.Class(Geoportal.OLS,{CLASS_NAME:"Geoportal.OLS.AbstractResponseParameters"});Geoportal.OLS.AbstractStreetLocator=OpenLayers.Class(Geoportal.OLS,{CLASS_NAME:"Geoportal.OLS.AbstractStreetLocator"});Geoportal.OLS.Error=OpenLayers.Class(Geoportal.OLS,{errorCode:null,severity:null,locationID:null,locationPath:null,message:null,initialize:function(a){this.errorCode=null;this.severity="Warning";this.locationID=null;this.locationPath=null;this.message=null;Geoportal.OLS.prototype.initialize.apply(this,arguments)},destroy:function(){this.errorCode=null;this.severity=null;this.locationID=null;this.locationPath=null;this.message=null;Geoportal.OLS.prototype.destroy.apply(this,arguments)},CLASS_NAME:"Geoportal.OLS.Error"});Geoportal.OLS.GeocodeMatchCode=OpenLayers.Class(Geoportal.OLS,{accuracy:null,matchType:null,initialize:function(a){this.accuracy=null;this.matchType=null;Geoportal.OLS.prototype.initialize.apply(this,arguments)},destroy:function(){this.accuracy=null;this.matchType=null;Geoportal.OLS.prototype.destroy.apply(this,arguments)},clone:function(){var a=new Geoportal.OLS.GeocodeMatchCode({accuracy:this.accuracy,matchType:this.matchType});return a},CLASS_NAME:"Geoportal.OLS.GeocodeMatchCode"});Geoportal.OLS.LUS=OpenLayers.Class(Geoportal.OLS,{CLASS_NAME:"Geoportal.OLS.LUS"});Geoportal.OLS.Place=OpenLayers.Class(Geoportal.OLS,{classification:null,name:null,initialize:function(a){this.classification=null;this.name=null;Geoportal.OLS.prototype.initialize.apply(this,arguments)},destroy:function(){this.classification=null;this.name=null;Geoportal.OLS.prototype.destroy.apply(this,arguments)},clone:function(){var a=new Geoportal.OLS.Place();a.classification=this.classification;a.name=this.name;return a},CLASS_NAME:"Geoportal.OLS.Place"});Geoportal.OLS.PostalCode=OpenLayers.Class(Geoportal.OLS,{name:null,initialize:function(a){this.name=null;Geoportal.OLS.prototype.initialize.apply(this,arguments)},destroy:function(){this.name=null;Geoportal.OLS.prototype.destroy.apply(this,arguments)},clone:function(){var a=new Geoportal.OLS.PostalCode();a.name=this.name;return a},CLASS_NAME:"Geoportal.OLS.PostalCode"});Geoportal.OLS.Street=OpenLayers.Class(Geoportal.OLS,{directionalPrefix:null,typePrefix:null,officialName:null,typeSuffix:null,directionalSuffix:null,muniOctant:null,name:null,initialize:function(a){this.directionalPrefix=null;this.typePrefix=null;this.officialName=null;this.typeSuffix=null;this.directionalSuffix=null;this.muniOctant=null;this.name=null;Geoportal.OLS.prototype.initialize.apply(this,arguments)},destroy:function(){this.directionalPrefix=null;this.typePrefix=null;this.officialName=null;this.typeSuffix=null;this.directionalSuffix=null;this.muniOctant=null;this.name=null;Geoportal.OLS.prototype.destroy.apply(this,arguments)},clone:function(){var a=new Geoportal.OLS.Street();a.directionalPrefix=this.directionalPrefix;a.typePrefix=this.typePrefix;a.officialName=this.officialName;a.typeSuffix=this.typeSuffix;a.directionalSuffix=this.directionalSuffix;a.muniOctant=this.muniOctant;a.name=this.name;return a},CLASS_NAME:"Geoportal.OLS.Street"});Geoportal.OLS.UOM=OpenLayers.Class(Geoportal.OLS,{CLASS_NAME:"Geoportal.OLS.UOM"});Geoportal.OLS.XLS=OpenLayers.Class(Geoportal.OLS,{version:"1.1",lang:null,_header:null,_body:null,initialize:function(a){this.version="1.1";this.lang=null;this._header=null;this._body=[];Geoportal.OLS.prototype.initialize.apply(this,arguments)},destroy:function(){this.version=null;this.lang=null;if(this._header){this._header.destroy();this._header=null}if(this._body){for(var b=0,a=this._body.length;b<a;b++){this._body[b].destroy();this._body[b]=null}this._body=null}Geoportal.OLS.prototype.destroy.apply(this,arguments)},addBody:function(a){if(!this._body){this._body=[]}if(a){this._body.push(a)}},getNbBodies:function(){return this._body?this._body.length:0},getBodies:function(){return this._body?this._body:null},getErrors:function(){var f=[];if(this._header&&this._header.errorList&&this._header.errorList.getNbErrors()>0){f=f.concat(this._header.errorList.getErrors())}for(var g=0,d=this.getNbBodies();g<d;g++){var a=this.getBodies()[g];if(a.errorList&&a.errorList.getNbErrors()>0){f=f.concat(a.errorList.getErrors())}}if(f.length==0){f=null}return f},CLASS_NAME:"Geoportal.OLS.XLS"});Geoportal.Popup.Anchored=OpenLayers.Class(Geoportal.Popup,{BORDER:2,anchor:null,relativePosition:null,border:"",initialize:function(d,h,p,f,g,a,m,j,l,o){var b=[d,h,p,f,a,l,o];Geoportal.Popup.prototype.initialize.apply(this,b);this.anchor=(g!=null?g:{size:new OpenLayers.Size(0,0),offset:new OpenLayers.Pixel(0,0)});this.border=this.BORDER;this.setBorder(this.border+"px solid #000000");this.backgroundColor=m||this.backgroundColor;this.opacity=j||this.opacity;this.panMapIfOutOfView=o&&o.layer&&o.layer.options&&o.layer.options.panMapIfOutOfView||false},destroy:function(){this.anchor=null;this.relativePosition=null;Geoportal.Popup.prototype.destroy.apply(this,arguments)},show:function(){this.updatePosition();Geoportal.Popup.prototype.show.apply(this,arguments);if(this.panMapIfOutOfView){this.panIntoView()}},moveTo:function(b){var a=this.relativePosition;this.relativePosition=this.calculateRelativePosition(b);var d=this.calculateNewPx(b);Geoportal.Popup.prototype.moveTo.apply(this,[d]);if(this.relativePosition!=a){this.updateRelativePosition()}},setSize:function(b){Geoportal.Popup.prototype.setSize.apply(this,arguments);if((this.lonlat)&&(this.map)){var a=this.map.getLayerPxFromLonLat(this.lonlat);this.moveTo(a)}},calculateRelativePosition:function(a){return"tr"},updateRelativePosition:function(){},panIntoView:function(){if(this.map){var g=0;var d=0;var h=this.map.getCenter();var m=this.map.getLayerPxFromLonLat(h);var f=this.map.getSize().w;var a=this.map.getSize().h;var l=this.map.getLayerPxFromLonLat(this.lonlat);var b=this.div.style.width;b=parseInt(b.replace("px",""));var j=this.div.style.height;j=parseInt(j.replace("px",""));if(f<b||a<j){this.panIntoView();return}g=l.x-m.x+(b/2);d=l.y-m.y-(j/2);if(Math.abs(g)>50||Math.abs(d)>50){this.map.pan(g,d)}}},calculateNewPx:function(b){var g=b.offset(this.anchor.offset);var a=this.size||this.contentSize;var f=(this.relativePosition&&this.relativePosition.charAt(0)=="t");g.y+=(f)?-a.h:this.anchor.size.h;var d=(this.relativePosition&&this.relativePosition.charAt(1)=="l");g.x+=(d)?-a.w:this.anchor.size.w;return g},CLASS_NAME:"Geoportal.Popup.Anchored"});Geoportal.Popup.Anchored._creat4KML=function(){var a;var f=OpenLayers.Util.extend({},this.layer.formatOptions);OpenLayers.Util.applyDefaults(f,{size:null,closeBox:true,onPopupClose:Geoportal.Popup.onPopupClose,backgroundColor:"#ffffff",opacity:0.75});var j;if(this.style){j=this.style.balloonStyle;if(j!=null){var g=/\$\{([a-zA-Z0-9_\-\.]*)\}/;while(j.match(g)){var h=RegExp.$1;h=(this.attributes[h]?(this.attributes[h].value?this.attributes[h].value:this.attributes[h]):"");j=j.replace(g,h)}}else{j=(this.attributes.name?this.attributes.name+"<br/>":"")+(this.attributes.description?this.attributes.description:"");j=Geoportal.Util.cleanContent(j)}a=new Geoportal.Popup.Anchored("chicken",this.geometry.getBounds().getCenterLonLat(),f.size,this.style.textColor?"<div class='gpPopupBody gpKML' style='"+this.style.textColor+";'>"+j+"</div>":"<div class='gpPopupBody gpKML'>"+j+"</div>",null,f.closeBox,this.style.bgColor,this.style.bgColorOpacity,f.onPopupClose,this)}else{var d="";if(typeof(this.attributes.name)=="object"){d=this.attributes.name.value||""}else{d=this.attributes.name||""}if(typeof(this.attributes.description)=="object"){j=this.attributes.description.value||""}else{j=this.attributes.description||""}j=Geoportal.Util.cleanContent(j);var b=Geoportal.Control.renderFeatureAttributes(this);d=d||b[0];if(j!=""){j+="<br/>"}j+=b[1];a=new Geoportal.Popup.Anchored("chicken",this.geometry.getBounds().getCenterLonLat(),f.size,"<div class='gpPopupHead gpKML'>"+d+"</div><div class='gpPopupBody gpKML'>"+j+"</div>",null,f.closeBox,f.backgroundColor,f.opacity,f.onPopupClose,this)}a=Geoportal.Popup.completePopup(a,this.layer.formatOptions);this.popup=a;return this.popup};Geoportal.Popup.Anchored.createPopUpForKMLFeature=function(a){a.createPopup=OpenLayers.Function.bind(Geoportal.Popup.Anchored._creat4KML,a)};Geoportal.Popup.Anchored._creat4GPX=function(){var b=OpenLayers.Util.extend({},this.layer.formatOptions);OpenLayers.Util.applyDefaults(b,{size:this.layer.map.getSize(),closeBox:true,onPopupClose:Geoportal.Popup.onPopupClose,backgroundColor:"#ffffff",opacity:0.75});var d=(this.attributes.desc?this.attributes.desc+"<br/>":"");d+=(this.attributes.cmt?this.attributes.cmt+"<br/>":"");d+=(this.attributes.ele?this.attributes.ele:"");d=Geoportal.Util.cleanContent(d);var a=new Geoportal.Popup.Anchored("chicken",this.geometry.getBounds().getCenterLonLat(),this.layer.map.getSize(),"<div class='gpPopupHead gpGPX'>"+(this.attributes.name?this.attributes.name:"")+"</div><div class='gpPopupBody gpGPX'>"+d+"</div>",null,b.closeBox,b.backgroundColor,b.opacity,b.onPopupClose,this);a=Geoportal.Popup.completePopup(a,this.layer.formatOptions);this.popup=a;return this.popup};Geoportal.Popup.Anchored.createPopUpForGPXFeature=function(a){a.createPopup=OpenLayers.Function.bind(Geoportal.Popup.Anchored._creat4GPX,a)};Geoportal.Popup.Anchored._creat4GML=function(){var d=OpenLayers.Util.extend({},this.layer.formatOptions);OpenLayers.Util.applyDefaults(d,{size:this.layer.map.getSize(),closeBox:true,onPopupClose:Geoportal.Popup.onPopupClose,backgroundColor:"#ffffff",opacity:0.75});var b=Geoportal.Control.renderFeatureAttributes(this);var a=new Geoportal.Popup.Anchored("chicken",this.geometry.getBounds().getCenterLonLat(),d.size,"<div class='gpPopupHead gpGML'>"+b[0]+"</div><div class='gpPopupBody gpGML'>"+b[1]+"</div>",null,d.closeBox,d.backgroundColor,d.opacity,d.onPopupClose,this);a=Geoportal.Popup.completePopup(a,this.layer.formatOptions);this.popup=a;return this.popup};Geoportal.Popup.Anchored.createPopUpForGMLFeature=function(a){a.createPopup=OpenLayers.Function.bind(Geoportal.Popup.Anchored._creat4GML,a)};Geoportal.Popup.Anchored._creat4GeoRSS=function(){var b=OpenLayers.Util.extend({},this.layer.formatOptions);OpenLayers.Util.applyDefaults(b,{size:this.layer.map.getSize(),closeBox:true,onPopupClose:Geoportal.Popup.onPopupClose,backgroundColor:"#ffffff",opacity:0.75});var a=new Geoportal.Popup.Anchored("chicken",this.geometry.getBounds().getCenterLonLat(),b.size,"<div class='gpPopupHead gpGeoRSS'>"+(this.attributes.link?"<a class='gpLink' href='"+this.attributes.link+"' target='_blank'>":"")+(this.attributes.title||"?")+(this.attributes.link?"</a>":"")+"</div><div class='gpPopupBody gpGeoRSS'>"+(this.attributes.description||"")+"</div>",null,b.closeBox,b.backgroundColor,b.opacity,b.onPopupClose,this);a=Geoportal.Popup.completePopup(a,this.layer.formatOptions);this.popup=a;return this.popup};Geoportal.Popup.Anchored.createPopUpForGeoRSSFeature=function(a){a.createPopup=OpenLayers.Function.bind(Geoportal.Popup.Anchored._creat4GeoRSS,a)};Geoportal.Tile.Image=OpenLayers.Class(OpenLayers.Tile.Image,{setSize:function(a){if(this.frame!=null){OpenLayers.Util.modifyDOMElement(this.frame,null,null,a);this.size=a;if(this.imgDiv!=null){OpenLayers.Util.modifyDOMElement(this.imgDiv,null,null,a)}}},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.size||this.layer.imageSize;this.backBufferTile.imageOffset=this.layer.imageOffset;this.backBufferTile.resolution=this.layer.getResolution();this.backBufferTile.renderTile()}}},positionImage:function(){if(this.layer==null){return}OpenLayers.Util.modifyDOMElement(this.frame,null,this.position,this.size);var a=this.size||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}},initImgDiv:function(){var f=this.layer.imageOffset;var b=this.size||this.layer.getImageSize();if(this.layerAlphaHack){this.imgDiv=OpenLayers.Util.createAlphaImageDiv(null,f,b,null,"relative",null,null,null,true)}else{this.imgDiv=OpenLayers.Util.createImage(null,f,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;this.imgDiv.layer=this.layer;var d=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(d,this))}else{OpenLayers.Event.observe(this.imgDiv,"load",OpenLayers.Function.bind(d,this))}var a=function(){if(this.imgDiv._attempts>OpenLayers.IMAGE_RELOAD_ATTEMPTS){d.call(this)}};OpenLayers.Event.observe(this.imgDiv,"error",OpenLayers.Function.bind(a,this))},CLASS_NAME:"Geoportal.Tile.Image"});Geoportal.Control.EditingToolbar=OpenLayers.Class(Geoportal.Control.Panel,{DEFAULT_OPTIONS:{"OpenLayers.Handler.Point":{title:"",displayClass:"olControlDrawFeaturePoint",featureAdded:function(a){a.state=OpenLayers.State.INSERT}},"OpenLayers.Handler.Path":{title:"",displayClass:"olControlDrawFeaturePath",featureAdded:function(a){a.state=OpenLayers.State.INSERT}},"OpenLayers.Handler.Polygon":{title:"",displayClass:"olControlDrawFeaturePolygon",featureAdded:function(a){a.state=OpenLayers.State.INSERT}},"OpenLayers.Handler.RegularPolygon":{title:"",displayClass:"olControlDrawFeatureRegularPolygon",featureAdded:function(a){a.state=OpenLayers.State.INSERT}},"OpenLayers.Control.DragFeature":{title:""},"OpenLayers.Control.ModifyFeature":{title:""},"Geoportal.Control.DeleteFeature":{title:""},"OpenLayers.Control.SelectFeature":{title:""}},layer:null,geometryType:"OpenLayers.Geometry.Point",initialize:function(f,h,b){Geoportal.Control.Panel.prototype.initialize.apply(this,[b]);this.DEFAULT_OPTIONS["OpenLayers.Handler.Point"].title=this.displayClass+".drawpoint";this.DEFAULT_OPTIONS["OpenLayers.Handler.Path"].title=this.displayClass+".drawline";this.DEFAULT_OPTIONS["OpenLayers.Handler.Polygon"].title=this.displayClass+".drawpolygon";this.DEFAULT_OPTIONS["OpenLayers.Handler.RegularPolygon"].title=this.displayClass+".drawpolygon";this.DEFAULT_OPTIONS["OpenLayers.Control.DragFeature"].title=this.displayClass+".dragfeature";this.DEFAULT_OPTIONS["OpenLayers.Control.ModifyFeature"].title=this.displayClass+".modifyfeature";this.DEFAULT_OPTIONS["Geoportal.Control.DeleteFeature"].title=this.displayClass+".deletefeature";this.DEFAULT_OPTIONS["OpenLayers.Control.SelectFeature"].title=this.displayClass+".selectfeature";this.layer=f;var g=null;if(h=="OpenLayers.Geometry.Point"){g=OpenLayers.Handler.Point}else{if(h=="OpenLayers.Geometry.LineString"){g=OpenLayers.Handler.Path}else{if(h=="OpenLayers.Geometry.Polygon"){if(this.regularPolygon){g=OpenLayers.Handler.RegularPolygon}else{g=OpenLayers.Handler.Polygon}}else{h=null}}}this.geometryType=h;if(!b){b={}}if(g){this.addControls(new OpenLayers.Control.DrawFeature(this.layer,g,OpenLayers.Util.extend(OpenLayers.Util.applyDefaults({},this.DEFAULT_OPTIONS[g.prototype.CLASS_NAME]),b.drawFeatureOptions)))}this.addControls(new OpenLayers.Control.DragFeature(this.layer,OpenLayers.Util.extend(OpenLayers.Util.applyDefaults({},this.DEFAULT_OPTIONS["OpenLayers.Control.DragFeature"]),b.dragFeatureOptions)));if(this.geometryType&&this.geometryType!="OpenLayers.Geometry.Point"){this.addControls(new OpenLayers.Control.ModifyFeature(this.layer,OpenLayers.Util.extend(OpenLayers.Util.applyDefaults({},this.DEFAULT_OPTIONS["OpenLayers.Control.ModifyFeature"]),b.modifyFeatureOptions)))}this.addControls(new Geoportal.Control.DeleteFeature(this.layer,OpenLayers.Util.extend(OpenLayers.Util.applyDefaults({},this.DEFAULT_OPTIONS["Geoportal.Control.DeleteFeature"]),b.deleteFeatureOptions)));this.addControls(new OpenLayers.Control.SelectFeature(this.layer,OpenLayers.Util.extend(OpenLayers.Util.applyDefaults({},this.DEFAULT_OPTIONS["OpenLayers.Control.SelectFeature"]),b.selectFeatureOptions)));for(var d=0,a=this.controls.length;d<a;d++){if(this.controls[d].events){this.controls[d].events.register("activate",this.controls[d],this.onActivate);if(this.layer.map){this.layer.map.events.register("changelayer",this.controls[d],this.onChangeLayer)}this.layer.events.register("visibilitychanged",this.controls[d],this.onVisibilityChange)}}},destroy:function(){for(var b=0,a=this.controls.length;b<a;b++){if(this.controls[b].events){this.layer.events.unregister("visibilitychanged",this.controls[b],this.onVisibilityChange);if(this.layer.map){this.layer.map.events.unregister("changelayer",this.controls[b],this.onChangeLayer)}this.controls[b].events.unregister("activate",this.controls[b],this.onActivate)}}Geoportal.Control.Panel.prototype.destroy.apply(this,arguments)},draw:function(a){Geoportal.Control.Panel.prototype.draw.apply(this,arguments);if(this.panelVisibility){this.activateControl(this.getControlsByClass("Geoportal.Control.PanelToggle")[0])}else{this.activateControl(this.controls[0])}return this.div},onActivate:function(a){if(!this.active){return}if(!a){return}if(this.layer&&!this.layer.getVisibility()){if(!this.layer.calculateInRange()){this.deactivate();return}this.layer.setVisibility(true)}},onChangeLayer:function(b){if(!this.active){return}if(!b){return}if(b.layer!=this.layer){return}if(!b.property){return}if(b.property!="visibility"){return}if(!this.layer.getVisibility()){this.deactivate();var a=this.layer.map.getControlsByClass("OpenLayers.Control.Navigation");if(a&&a.length>0){var d=a[0];d.activate()}}},onVisibilityChange:function(a){if(!this.active){return}if(!a){return}if(a.object!=this.layer){return}},CLASS_NAME:"Geoportal.Control.EditingToolbar"});Geoportal.Control.Form=OpenLayers.Class(Geoportal.Control,{formControl:null,labels:null,buttons:null,htmlElements:null,initialize:function(a){Geoportal.Control.prototype.initialize.apply(this,arguments)},destroy:function(){this.formControl=null;Geoportal.Control.prototype.destroy.apply(this,arguments)},setMap:function(a){Geoportal.Control.prototype.setMap.apply(this,arguments)},activate:function(){if(!Geoportal.Control.prototype.activate.apply(this,arguments)){return false}this.formControl=new Geoportal.Control.Floating(this,{id:OpenLayers.Util.createUniqueID("_gcf_")+this.id,headTitle:this.displayClass+".title",onClose:this.closeForm});this.labels={};this.buttons={};this.htmlElements={};return true},deactivate:function(){if(this.formControl){if(this.htmlElements){for(var a in this.htmlElements){OpenLayers.Event.stopObservingElement(this.htmlElements[a])}}this.htmlElements=null;this.buttons=null;this.labels=null;this.formControl.deactivate();this.formControl.destroy();this.formControl=null}if(!Geoportal.Control.prototype.deactivate.apply(this,arguments)){return false}return true},closeForm:function(){this.deactivate();var b=this.map.getControlsByClass(OpenLayers.Control.KeyboardDefaults.prototype.CLASS_NAME)[0];if(b&&b.activeOverMapOnlySavedState){b.activeOverMapOnly=true;b.onMouseOver=OpenLayers.Control.KeyboardDefaults.prototype.onMouseOver;b.onMouseOut=OpenLayers.Control.KeyboardDefaults.prototype.onMouseOut;if(!b.active){b.activate()}}var a=this.map.getControlsByClass(/.*\.Control\.NavToolbar/)[0];if(a&&!a.controls[1].active){a.activateControl(a.controls[0])}},buildInputTextField:function(f,d){var h,g;if(typeof(d.type)=="undefined"||d.hidden===true){d.type="text"}if(!d.hidden){h=document.createElement("label");h.id="lbl"+d.id+this.id;h.setAttribute("for",d.id+this.id);h.appendChild(document.createTextNode(OpenLayers.i18n(this.displayClass+"."+d.id)));if(d.mandatory===true){h.style.fontWeight="bold"}this.labels[this.displayClass+"."+d.id]=h;f.appendChild(h)}if(d.type==="text"){g=document.createElement("input")}else{g=document.createElement("textarea")}g.id=d.id+this.id;if(d.name){g.name=d.name}else{g.name=g.id}if(d.type==="text"){if(!d.hidden){g.type="text"}else{g.type="hidden"}}if(d.value==undefined){d.value=""}g.value=d.value;if(d.size==undefined){d.size=80}if(d.type==="text"){if(d.size!=-1){g.size=d.size}if(d.length==undefined){d.length=128}if(d.length!=-1){g.maxLength=d.length}}else{if(typeof(d.rows)=="undefined"){d.rows=5}if(typeof(d.cols)=="undefined"){d.cols=25}g.rows=d.rows;g.cols=d.cols}if(d.css){g.className=d.css}g.disabled=d.disabled?true:false;g.hasFocus=false;if(!d.hidden){g.kbControl=this.map.getControlsByClass(OpenLayers.Control.KeyboardDefaults.prototype.CLASS_NAME)[0];if(d.callbacks&&d.callbacks.length>0){for(var b=0,a=d.callbacks.length;b<a;b++){OpenLayers.Event.observe(g,d.callbacks[b].evt,OpenLayers.Function.bind(d.callbacks[b].func,this,g));this.htmlElements[d.callbacks[b].evt+d.id+this.id]=g}}h.appendChild(g);f.appendChild(document.createElement("br"));h=document.createElement("span");h.id="help"+d.id+this.id;h.className="gpFormSmall";h.appendChild(document.createTextNode(OpenLayers.i18n(this.displayClass+"."+d.id+".help")));this.labels[this.displayClass+"."+d.id+".help"]=h;f.appendChild(h);f.appendChild(document.createElement("br"))}else{f.appendChild(g)}return g},buildSelectField:function(f,d){var h,g;h=document.createElement("label");h.id="lbl"+d.id+this.id;h.setAttribute("for",d.id+this.id);h.appendChild(document.createTextNode(OpenLayers.i18n(this.displayClass+"."+d.id)));if(d.mandatory===true){h.style.fontWeight="bold"}this.labels[this.displayClass+"."+d.id]=h;f.appendChild(h);g=document.createElement("select");g.id=d.id+this.id;if(d.name){g.name=d.name}else{g.name=g.id}g.size=d.length?d.length:1;if(d.options&&d.options.length>0){for(var b=0,a=d.options.length;b<a;b++){var j=document.createElement("option");j.value=d.options[b].value;j.selected=d.options[b].selected===true?true:false;j.disabled=d.options[b].disabled===true?true:false;if(d.options[b].css){j.className=d.options[b].css}j.appendChild(document.createTextNode(OpenLayers.i18n(d.options[b].text)));this.labels[d.options[b].text]=j;g.appendChild(j)}}if(d.multiple){g.multiple="multiple"}if(d.css){g.className=d.css}g.hasFocus=false;g.kbControl=this.map.getControlsByClass(OpenLayers.Control.KeyboardDefaults.prototype.CLASS_NAME)[0];if(d.callbacks&&d.callbacks.length>0){for(var b=0,a=d.callbacks.length;b<a;b++){OpenLayers.Event.observe(g,d.callbacks[b].evt,OpenLayers.Function.bind(d.callbacks[b].func,this,g));this.htmlElements[d.callbacks[b].evt+d.id+this.id]=g}}h.appendChild(g);f.appendChild(document.createElement("br"));h=document.createElement("span");h.id="help"+d.id+this.id;h.className="gpFormSmall";h.appendChild(document.createTextNode(OpenLayers.i18n(this.displayClass+"."+d.id+".help")));this.labels[this.displayClass+"."+d.id+".help"]=h;f.appendChild(h);f.appendChild(document.createElement("br"));return g},buildCheckboxField:function(f,d){var h,g;h=document.createElement("label");h.id="lbl"+d.id+this.id;h.setAttribute("for",d.id+this.id);h.appendChild(document.createTextNode(OpenLayers.i18n(this.displayClass+"."+d.id)));this.labels[this.displayClass+"."+d.id]=h;f.appendChild(h);g=document.createElement("input");g.id=d.id+this.id;if(d.name){g.name=d.name}else{g.name=g.id}g.value=g.id;g.type="checkbox";g.disabled=d.disabled?true:false;g.checked=d.checked?true:false;g.defaultChecked=d.defaultChecked?true:false;g.style.autocomplete="off";if(d.css){g.className=d.css}if(d.callbacks&&d.callbacks.length>0){for(var b=0,a=d.callbacks.length;b<a;b++){OpenLayers.Event.observe(g,d.callbacks[b].evt,OpenLayers.Function.bind(d.callbacks[b].func,this,g));this.htmlElements[d.callbacks[b].evt+d.id+this.id]=g}}h.appendChild(g);f.appendChild(document.createElement("br"));h=document.createElement("span");h.id="help"+d.id+this.id;h.className="gpFormSmall";h.appendChild(document.createTextNode(OpenLayers.i18n(this.displayClass+"."+d.id+".help")));this.labels[this.displayClass+"."+d.id+".help"]=h;f.appendChild(h);f.appendChild(document.createElement("br"));return g},buildButton:function(f,a,d,b){var g;g=document.createElement("input");g.className=this.displayClass+"Button";g.type="button";g.id=a+this.id;g.name=g.id;g.value=OpenLayers.i18n(this.displayClass+".button."+a);if(d){OpenLayers.Event.observe(g,"click",OpenLayers.Function.bind(d,this,g));this.htmlElements["click"+a+this.id]=g}this.buttons[this.displayClass+".button."+a]=g;f.appendChild(g);if(d&&b){OpenLayers.Event.observe(f,"keypress",OpenLayers.Function.bind(function(h){if(h.keyCode==b||(b==13&&h.keyCode==10)){return d.apply(this,[g,h])}return true},this))}return g},buildImageButton:function(f,b,a,d){var g;g=document.createElement("input");g.className=this.displayClass+"ImageButton";g.type="image";g.id=b+this.id;g.name=g.id;g.src=a;g.title=OpenLayers.i18n(this.displayClass+".imageButton."+b);g.alt=g.title;if(d){OpenLayers.Event.observe(g,"click",OpenLayers.Function.bind(d,this,g));this.htmlElements["click"+b+this.id]=g}this.buttons[this.displayClass+".imageButton."+b]=g;f.appendChild(g);return g},buildResultsField:function(a){var b=document.createElement("div");b.className=this.displayClass+"Results";b.id="results"+this.id;b.style.display="none";b.innerHTML="";a.appendChild(b)},changeLang:function(b){if(this.title){this.div.title=OpenLayers.i18n(this.title)}if(this.formControl){if(this.labels){for(var a in this.labels){if(this.labels[a]){this.labels[a].childNodes[0].innerHTML=OpenLayers.i18n(a)}}}if(this.buttons){for(var a in this.buttons){if(this.buttons[a]){if(this.buttons[a].type=="image"){this.buttons[a].alt=this.buttons[a].title=OpenLayers.i18n(a)}else{this.buttons[a].value=OpenLayers.i18n(a)}}}}}},CLASS_NAME:"Geoportal.Control.Form"});Geoportal.Control.Form.focusOn=function(a){if(a.kbControl){if(a.kbControl.events==null){a.kbControl=null}else{if(a.kbControl.activeOverMapOnly){a.kbControl.activeOverMapOnlySavedState=true;a.kbControl.activeOverMapOnly=false;a.kbControl.onMouseOver=a.kbControl.onMouseOut=function(){};if(a.kbControl.active){a.kbControl.deactivate()}}}}a.hasFocus=true;a.focus()};Geoportal.Control.Form.focusOff=function(a){if(a.kbControl){if(a.kbControl.events==null){a.kbControl=null}else{if(a.kbControl.activeOverMapOnlySavedState){a.kbControl.activeOverMapOnly=true;a.kbControl.onMouseOver=OpenLayers.Control.KeyboardDefaults.prototype.onMouseOver;a.kbControl.onMouseOut=OpenLayers.Control.KeyboardDefaults.prototype.onMouseOut;if(!a.kbControl.active){a.kbControl.activate()}}}}a.hasFocus=false;a.blur()};Geoportal.Control.LayerOpacitySlider=OpenLayers.Class(Geoportal.Control.SliderBase,{axis:"horizontal",layer:null,getLevel:function(){return Math.round(this.layer.opacity*100)},getMaxAbsoluteLevels:function(){return 101},getMaxSelectableLevel:function(){return 100},setOpacity:function(a){if(a==0){a=0.001}else{a=a/100}this.layer.setOpacity(a)},initialize:function(b,a){Geoportal.Control.SliderBase.prototype.initialize.apply(this,[a]);this.layer=b;if(this.layer&&typeof(this.layer.opacity)==="number"){this.initialLevel=Math.round(this.layer.opacity*100);if(this.initialLevel<0){this.initialLevel=0}if(this.initialLevel>100){this.initialLevel=100}}},singleClick:function(a){if(!OpenLayers.Event.isLeftClick(a)){return}var b=a.xy.x/this.levelBarIntervalLength;b=this.adjustLevel(b);this.setOpacity(b);this.moveSlider();OpenLayers.Event.stop(a)},sliderDrag:function(a){if(this.mouseDragStart!=null){var b=(this.mouseDragStart.x-a.xy.x)/this.levelBarIntervalLength;this.mouseDragStart=a.xy.clone();b=this.adjustLevel(this.getLevel()-b);this.setOpacity(b);this.updateSlider(this.levelToPos(b));this.onSliderMove(b);OpenLayers.Event.stop(a)}},sliderUp:function(a){if(!OpenLayers.Event.isLeftClick(a)){return}if(this.mouseDragStart){a.element.className="gpControlSliderBaseHandle";this.map.events.un({mouseup:this.passEventToSlider,mousemove:this.passEventToSlider,scope:this});var b=(this.mouseDragStart.x-a.xy.x)/this.levelBarIntervalLength;b=this.adjustLevel(this.getLevel()-b);this.setOpacity(b);this.moveSlider();this.mouseDragStart=null;OpenLayers.Event.stop(a)}},CLASS_NAME:"Geoportal.Control.LayerOpacitySlider"});Geoportal.Control.NavToolbar=OpenLayers.Class(Geoportal.Control.Panel,{initialize:function(a){Geoportal.Control.Panel.prototype.initialize.apply(this,[a]);this.addControls([new OpenLayers.Control.Navigation({title:"olControlDragPan.title"}),new OpenLayers.Control.ZoomBox({title:"olControlZoomBox.title"})])},draw:function(){Geoportal.Control.Panel.prototype.draw.apply(this,arguments);this.activateControl(this.controls[0]);return this.div},CLASS_NAME:"Geoportal.Control.NavToolbar"});Geoportal.Control.PanelToggle=OpenLayers.Class(Geoportal.Control,{type:OpenLayers.Control.TYPE_TOGGLE,panel:null,panelVisibility:false,initialize:function(a,b){Geoportal.Control.prototype.initialize.apply(this,[b]);this.panel=a;this.panel.panelVisibility=this.panelVisibility;this.panel.redraw=function(){if(this.active){for(var g=0,d=this.controls.length;g<d;g++){var h=this.controls[g];var j=(h instanceof Geoportal.Control.PanelToggle);if(!h.panel_div){h.panel_div=this.div.removeChild(this.div.childNodes[0])}var f=h.panel_div;if(h.active===true){f.className=this.controls[g].displayClass+"ItemActive"}else{f.className=this.controls[g].displayClass+"ItemInactive"}if(f.parentNode){f=f.parentNode.removeChild(f)}if(j){if(this.panelVisibility){f.title=OpenLayers.i18n(h.displayClass+".opened")}else{f.title=OpenLayers.i18n(h.displayClass+".closed")}}this.div.appendChild(f);if(!j&&this.map){if(this.panelVisibility){f.style.display="block"}else{f.style.display="none"}}h.panel_div=null}}};this.panel.activateControl=function(g){if(!this.active){return false}if(g.type==OpenLayers.Control.TYPE_BUTTON){g.trigger();this.redraw();return}if(g.type==OpenLayers.Control.TYPE_TOGGLE){if(g.active){g.deactivate()}else{if(!(g instanceof Geoportal.Control.PanelToggle)&&this.map){this.map.events.triggerEvent("controlactivated",{control:g})}g.activate()}this.redraw();return}for(var f=0,d=this.controls.length;f<d;f++){if(this.controls[f]!=g){if(this.controls[f].type!=OpenLayers.Control.TYPE_TOGGLE){this.controls[f].deactivate()}}}if(this.map){this.map.events.triggerEvent("controlactivated",{control:g})}g.activate()}},draw:function(a){Geoportal.Control.prototype.draw.apply(this,arguments);this.redraw();return this.div},redraw:function(){if(this.panelVisibility){this.panel_div.className=this.displayClass+"ItemActive";this.div.title=OpenLayers.i18n(this.displayClass+".opened");this.panel_div.title=this.div.title}else{this.panel_div.className=this.displayClass+"ItemInactive";this.div.title=OpenLayers.i18n(this.displayClass+".closed");this.panel_div.title=this.div.title}},activate:function(){if(this.active){return false}if(this.handler){this.handler.activate()}this.active=true;this.panelVisibility=this.panel.panelVisibility=true;this.events.triggerEvent("activate");return true},deactivate:function(){if(!this.active){return false}if(this.handler){this.handler.deactivate()}this.active=false;this.panelVisibility=this.panel.panelVisibility=false;this.events.triggerEvent("deactivate");return true},changeLang:function(a){if(this.panelVisibility){this.div.title=OpenLayers.i18n(this.displayClass+".opened")}else{this.div.title=OpenLayers.i18n(this.displayClass+".closed")}},CLASS_NAME:"Geoportal.Control.PanelToggle"});Geoportal.Control.ZoomSlider=OpenLayers.Class(Geoportal.Control.SliderBase,{minpos:0,maxpos:0,getLevel:function(){var a=this.map.getZoom();return a},getMaxAbsoluteLevels:function(){return this.map.getNumZoomLevels()},initialize:function(){Geoportal.Control.SliderBase.prototype.initialize.apply(this,arguments)},destroy:function(){if(this.map){this.map.events.un({zoomend:this.moveSlider,changebaselayer:this.changeBaseLayer,scope:this})}Geoportal.Control.SliderBase.prototype.destroy.apply(this,arguments)},setMap:function(a){Geoportal.Control.SliderBase.prototype.setMap.apply(this,arguments);this.map.events.register("changebaselayer",this,this.changeBaseLayer)},changeBaseLayer:function(a){if(!this.isVertical){if(this.getMaxAbsoluteLevels()>1){this.levelBarIntervalLength=this.levelBarImgWidth/(this.getMaxAbsoluteLevels()-1)}else{this.levelBarIntervalLength=this.levelBarImgWidth}}else{if(this.getMaxAbsoluteLevels()>1){this.levelBarIntervalLength=this.levelBarImgHeight/(this.getMaxAbsoluteLevels()-1)}else{this.levelBarIntervalLength=this.levelBarImgHeight}}this.redraw()},draw:function(a){Geoportal.Control.SliderBase.prototype.draw.apply(this,arguments);var b=parseInt(this.levelBarDiv.style.height);this.minpos=b+this.levelToPos(this.getMinSelectableLevel())+this.sliderImgHeight;this.maxpos=b+this.levelToPos(this.getMaxSelectableLevel())+3*this.sliderImgHeight/2;this.map.events.register("zoomend",this,this.moveSlider);return this.div},singleClick:function(a){if(!OpenLayers.Event.isLeftClick(a)){return}var b=a.xy.y/this.levelBarIntervalLength;if(!this.map.fractionalZoom){b=Math.floor(b)}b=this.adjustLevel(b);this.map.zoomTo(b);this.moveSlider();OpenLayers.Event.stop(a)},sliderDrag:function(b){if(this.mouseDragStart!=null){var a=this.mouseDragStart.y-b.xy.y;var f=OpenLayers.Util.pagePosition(this.levelBarDiv);var d=b.clientY-f[1];if((this.minpos<=d)&&(d<this.maxpos)){var g=parseInt(this.slider.style.top);this.updateSlider(g-a);this.mouseDragStart=b.xy.clone()}OpenLayers.Event.stop(b)}},sliderUp:function(d){if(!OpenLayers.Event.isLeftClick(d)){return}if(this.downEventStart){d.element.className="gpControlSliderBaseHandle";this.map.events.un({mouseup:this.passEventToSlider,mousemove:this.passEventToSlider,scope:this});var b=this.mouseDragStart.y-d.xy.y;var f=parseInt(this.slider.style.top);var a=f-b;var g=this.posToLevel(a);if(!this.map.fractionalZoom){g=Math.floor(g)}g=this.adjustLevel(g);this.map.zoomTo(g);this.moveSlider();this.mouseDragStart=null;this.downEventStart=null;OpenLayers.Event.stop(d)}},CLASS_NAME:"Geoportal.Control.ZoomSlider"});Geoportal.Format.GPX.v1_0=OpenLayers.Class(Geoportal.Format.GPX.v1,{VERSION:"1.0",namespaces:{gpx:"http://www.topografix.com/GPX/1/0",xsi:"http://www.w3.org/2001/XMLSchema-instance"},defaultPrefix:"gpx",schemaLocation:"http://www.topografix.com/GPX/1/0/gpx.xsd",CLASS_NAME:"Geoportal.Format.GPX.v1_0"});Geoportal.Handler.LengthRestrictedPath=OpenLayers.Class(Geoportal.Handler.Path,{maxPoints:2,initialize:function(d,b,a){Geoportal.Handler.Path.prototype.initialize.apply(this,arguments);this.freehand=false;this.freehandToggle=null},addPoint:function(a){if(this.line.geometry.components.length<this.maxPoints){Geoportal.Handler.Path.prototype.addPoint.apply(this,arguments)}},dblclick:function(a){this.removePoint();this.finalize();return false},CLASS_NAME:"Geoportal.Handler.LengthRestrictedPath"});Geoportal.Layer.GXT=OpenLayers.Class(OpenLayers.Layer.Vector,{loaded:false,formatOptions:null,initialize:function(f,d,b){var a=[];a.push(f,b);OpenLayers.Layer.Vector.prototype.initialize.apply(this,a);this.url=d},setVisibility:function(a,b){OpenLayers.Layer.Vector.prototype.setVisibility.apply(this,arguments);if(this.visibility&&!this.loaded){this.loadGXT()}},moveTo:function(d,a,b){OpenLayers.Layer.Vector.prototype.moveTo.apply(this,arguments);if(this.visibility&&!this.loaded){this.loadGXT()}},loadGXT:function(){if(!this.loaded){if(this.events.triggerEvent("loadstart")===false){return}OpenLayers.Request.GET({url:this.url,success:this.requestSuccess,failure:this.requestFailure,scope:this});this.loaded=true}},setUrl:function(a){this.url=a;this.destroyFeatures();this.loaded=false;this.loadGXT()},requestSuccess:function(b){var f=b.responseText;var a={};OpenLayers.Util.extend(a,this.formatOptions);if(this.map){a.internalProjection=this.map.getProjection()}var d=new Geoportal.Format.Geoconcept(a);this.addFeatures(d.read(f));this.events.triggerEvent("loadend")},requestFailure:function(a){OpenLayers.Console.userError(OpenLayers.i18n("errorLoadingGXT",{url:this.url}));this.events.triggerEvent("loadend")},CLASS_NAME:"Geoportal.Layer.GXT"});Geoportal.OLS.AbstractAddress=OpenLayers.Class(Geoportal.OLS.AbstractLocation,{addressee:null,countryCode:"__",initialize:function(a,b){this.addressee=null;Geoportal.OLS.AbstractLocation.prototype.initialize.apply(this,[OpenLayers.Util.extend(b,{countryCode:a})])},destroy:function(){this.addressee=null;this.countryCode=null;Geoportal.OLS.AbstractLocation.prototype.destroy.apply(this,arguments)},clone:function(){var a=new Geoportal.OLS.AbstractAddress(this.countryCode);a.addressee=this.addressee;return a},CLASS_NAME:"Geoportal.OLS.AbstractAddress"});Geoportal.OLS.AbstractPosition=OpenLayers.Class(Geoportal.OLS.AbstractLocation,{CLASS_NAME:"Geoportal.OLS.AbstractPosition"});Geoportal.OLS.Building=OpenLayers.Class(Geoportal.OLS.AbstractStreetLocator,{num:null,subdivision:null,name:null,initialize:function(a){this.num=null;this.subdivision=null;this.name=null;Geoportal.OLS.AbstractStreetLocator.prototype.initialize.apply(this,arguments)},destroy:function(){this.num=null;this.subdivision=null;this.name=null;Geoportal.OLS.AbstractStreetLocator.prototype.destroy.apply(this,arguments)},clone:function(){var a=new Geoportal.OLS.Building();a.num=this.num;a.subdivision=this.subdivision;a.name=this.name;return a},CLASS_NAME:"Geoportal.OLS.Building"});Geoportal.OLS.ErrorList=OpenLayers.Class(Geoportal.OLS,{highestSeverity:"Warning",errors:null,initialize:function(a){this.highestSeverity="Warning";this.errors=[];Geoportal.OLS.prototype.initialize.apply(this,arguments)},destroy:function(){this.highestSeverity=null;if(this.errors){for(var b=0,a=this.errors.length;b<a;b++){this.errors[b].destroy();this.errors[b]=null}this.errors=null}Geoportal.OLS.prototype.destroy.apply(this,arguments)},addError:function(a){if(!this.errors){this.errors=[]}if(a){this.errors.push(a)}},getNbErrors:function(){return this.errors?this.errors.length:0},getErrors:function(){return this.errors?this.errors:null},CLASS_NAME:"Geoportal.OLS.ErrorList"});Geoportal.OLS.LUS.ReverseGeocodePreference=OpenLayers.Class(Geoportal.OLS.LUS,{value:null,initialize:function(b,a){this.value=b;Geoportal.OLS.LUS.prototype.initialize.apply(this,[a])},destroy:function(){this.value=null;Geoportal.OLS.LUS.prototype.destroy.apply(this,arguments)},CLASS_NAME:"Geoportal.OLS.LUS.ReverseGeocodePreference"});Geoportal.OLS.StreetAddress=OpenLayers.Class(Geoportal.OLS,{_streetLocation:null,streets:null,initialize:function(a){this._streetLocation=null;this.streets=[];Geoportal.OLS.prototype.initialize.apply(this,arguments)},destroy:function(){if(this._streetLocation){this._streetLocation.destroy();this._streetLocation=null}if(this.streets){for(var b=0,a=this.streets.length;b<a;b++){this.streets[b].destroy();this.streets[b]=null}this.streets=null}Geoportal.OLS.prototype.destroy.apply(this,arguments)},clone:function(){var d=new Geoportal.OLS.StreetAddress();if(this._streetLocation){d._streetLocation=this._streetLocation.clone()}if(this.streets){for(var b=0,a=this.streets.length;b<a;b++){d.streets.push(this.streets[b].clone())}}return d},setStreetLocation:function(a){if(this._streetLocation){this._streetLocation.destroy();this._streetLocation=null}this._streetLocation=a},addStreet:function(a){if(!this.streets){this.streets=[]}if(a){this.streets.push(a)}},getNbStreets:function(){return this.streets?this.streets.length:0},getStreets:function(){return this.streets?this.streets:null},CLASS_NAME:"Geoportal.OLS.StreetAddress"});Geoportal.OLS.UOM.AbstractMeasure=OpenLayers.Class(Geoportal.OLS.UOM,{value:null,accuracy:null,initialize:function(a){this.value=null;this.accuracy=null;Geoportal.OLS.UOM.prototype.initialize.apply(this,arguments)},destroy:function(){this.value=null;this.accuracy=null;Geoportal.OLS.UOM.prototype.destroy.apply(this,arguments)},CLASS_NAME:"Geoportal.OLS.UOM.AbstractMeasure"});Geoportal.OLS.UOM.TimeStamp=OpenLayers.Class(Geoportal.OLS.UOM,{begin:null,duration:null,initialize:function(b,a){this.begin=b;this.duration=null;Geoportal.OLS.UOM.prototype.initialize.apply(this,[a])},destroy:function(){this.begin=null;this.duration=null;Geoportal.OLS.UOM.prototype.destroy.apply(this,arguments)},CLASS_NAME:"Geoportal.OLS.UOM.TimeStamp"});Geoportal.Control.AddImageLayer=OpenLayers.Class(Geoportal.Control.Form,{SUPPORTED_CLASSES:["OpenLayers.Layer.WMS","Geoportal.Layer.WMSC"],asynchronousCapabilities:true,type:OpenLayers.Control.TYPE_TOGGLE,maxCrsLen:Number.NaN,request:null,initialize:function(a){Geoportal.Control.Form.prototype.initialize.apply(this,arguments);if(!this.supportedClasses){this.supportedClasses=[];for(var b=this.SUPPORTED_CLASSES.length-1;b>=0;b--){this.supportedClasses.unshift(this.SUPPORTED_CLASSES[b])}}if(!this.layerImageOptions){this.layerImageOptions={}}if(isNaN(this.maxCrsLen)){this.maxCrsLen=Geoportal.Control.AddImageLayer.TRY_CRS_BBOX_WHEN}},destroy:function(){this.abortRequest();Geoportal.Control.Form.prototype.destroy.apply(this,arguments)},activate:function(){if(!Geoportal.Control.Form.prototype.activate.apply(this,arguments)){return false}var a=document.createElement("form");a.id="__addilayer__"+this.id;a.name=a.id;a.action="javascript:void(null)";this.addilayer(a);this.map.addControl(this.formControl);this.formControl.activate();this.formControl.addContent(a);return true},deactivate:function(){return Geoportal.Control.Form.prototype.deactivate.apply(this,arguments)},addilayer:function(f){this.buildInputTextField(f,{id:"layerUrl",mandatory:true,size:40,length:512,disabled:false,callbacks:[{evt:"click",func:this.onClick}]});var d=[];for(var b=0,a=this.supportedClasses.length;b<a;b++){var g={value:this.supportedClasses[b],selected:(b==0),text:this.displayClass+".layerType."+this.supportedClasses[b].split(".").pop()};d.push(g)}this.buildSelectField(f,{id:"layerType",mandatory:true,options:d,callbacks:[{evt:"click",func:this.onClick},{evt:"change",func:this.onChange}]});this.buildButton(f,"cancel",this.closeForm);this.buildButton(f,"add",this.onClick,13);this.wImg=this.buildImageButton(f,"wait",Geoportal.Util.getImagesLocation()+"loading.gif");this.wImg.style.display="none";this.buildResultsField(f)},closeForm:function(){this.abortRequest();Geoportal.Control.Form.prototype.closeForm.apply(this,arguments)},onClick:function(d,a){if(a||window.event){OpenLayers.Event.stop(a?a:window.event)}if(d.id.match(/^layer(Url|Type)/)&&OpenLayers.String.contains(d.id,this.id)){if(!d.hasFocus){var j=OpenLayers.Util.getElement("layerUrl"+this.id);if(j&&d.id!=j.id&&j.hasFocus){Geoportal.Control.Form.focusOff(j)}j=OpenLayers.Util.getElement("layerType"+this.id);if(j&&d.id!=j.id&&j.hasFocus){Geoportal.Control.Form.focusOff(j)}Geoportal.Control.Form.focusOn(d)}return false}if(d.id.match(/^add/)){d=OpenLayers.Util.getElement("layerType"+this.id);var f=OpenLayers.String.trim(d.options[d.selectedIndex].value);if(f==""){return false}d.options[0].selected=true;var g=f.match(/.*\.Layer\.(WMS|WMSC)$/);if(g){var b=OpenLayers.Util.getElement("layerUrl"+this.id);if(!b){return false}b=OpenLayers.String.trim(b.value);if(b.length==0){return false}this.wImg.style.display="";this.request=OpenLayers.Request.GET({async:this.asynchronousCapabilities,url:b,params:{SERVICE:"WMS",REQUEST:"GetCapabilities"},success:this.successedInLoadingUrl,failure:this.failedOnLoadingUrl,scope:{cntrl:this,serviceType:g[1]}})}else{OpenLayers.Console.error("type "+f+" not supported");this.closeForm()}}return false},onChange:function(b,a){},successedInLoadingUrl:function(f){if(!f){this.request=null;this.cntrl.wImg.style.display="none";return}var L=f.responseXML;if(!L&&f.responseText){L=OpenLayers.parseXMLString(f.responseText);var H=OpenLayers.Request.XMLHttpRequest.getParseErrorText(L);if(H!=OpenLayers.Request.XMLHttpRequest.PARSED_OK){this.cntrl.wImg.style.display="none";OpenLayers.Console.userError(OpenLayers.i18n(H));return}}var u=new OpenLayers.Format.WMSCapabilities();var a=null;try{a=u.read(L)}catch(J){this.cntrl.wImg.style.display="none";OpenLayers.Console.userError(J);return}if(a.exceptions){var h="";for(var E=0,D=a.exceptions.length;E<D;E++){h+=a.exceptions[E]+"\n"}this.cntrl.wImg.style.display="none";OpenLayers.Console.userError(h);return}if(!(a.capability&&a.capability.request&&a.capability.request.getmap)){this.request=null;this.cntrl.wImg.style.display="none";OpenLayers.Console.userError(f.responseText);return}this.request=null;var G=OpenLayers.Util.getElement("results"+this.cntrl.id);G.innerHTML="";var C=0;var w=this.cntrl.map.getMaxExtent();a.capability.layers.sort(function(p,l){return l.title<p.title});for(var E=0,F=a.capability.layers.length;E<F;E++){var q=a.capability.layers[E];var g=null;if(q.llbbox&&q.llbbox.length>0){g=OpenLayers.Bounds.fromArray(q.llbbox);g.transform(OpenLayers.Projection.CRS84,this.cntrl.map.getProjection())}if(!g&&q.bbox){for(var d in q.bbox){var B=new OpenLayers.Projection(d);if(this.cntrl.map.getProjection().isCompatibleWith(B)){g=OpenLayers.Bounds.fromArray(q.bbox[d].bbox);g.transform(B,this.cntrl.map.getProjection());break}}}if(!g){continue}if(g){if(!w.containsBounds(g,true,true)&&!g.containsBounds(w,true,true)){continue}}var m={};var o=0;if(0<this.cntrl.maxCrsLen&&this.cntrl.maxCrsLen<q.srs.length){if(q.bbox){for(var d in q.bbox){var B=new OpenLayers.Projection(d);if(this.cntrl.map.getProjection().isCompatibleWith(B)){m[d]=j;o++;C++}}}}if(o==0){for(var j=0,I=q.srs.length;j<I;j++){var d=q.srs[j];if(this.cntrl.map.getProjection().isCompatibleWith(d)){m[d]=j;o++;C++}}}if(o>0){var d=null;if(this.cntrl.map.getProjection().projCode in m){d=this.cntrl.map.getProjection().projCode}if(!d&&Geoportal.Catalogue.TERRITORIES&&this.cntrl.map.baseLayer.territory){var K=Geoportal.Catalogue.TERRITORIES[this.cntrl.map.baseLayer.territory].displayCRS;for(var j=0,I=K.length;j<I;j++){if(K[j] in m){d=K[j];break}}}if(!d){for(d in m){break}}var z=document.createElement("div");z.className="gpWMSCapsLayersResult";if((C%2)==1){z.className+="Alternate"}var v=document.createElement("span");v.innerHTML=q.title;v.style.cursor="pointer";var b={cntrl:this.cntrl,serviceType:this.serviceType,caps:a,layerIndex:E,crs:d};OpenLayers.Event.observe(v,"click",OpenLayers.Function.bindAsEventListener(this.cntrl.onLayerNameClick,b));z.appendChild(v);G.appendChild(z)}}if(C==0){var z=document.createElement("div");z.className="gpWMSCapsLayersResult";var v=document.createElement("span");v.innerHTML=OpenLayers.i18n("wms.caps.no.compatible.srs");z.appendChild(v);G.appendChild(z)}this.cntrl.wImg.style.display="none";G.style.display=""},onLayerNameClick:function(G){if(G||window.event){OpenLayers.Event.stop(G?G:window.event)}this.cntrl.wImg.style.display="";var D=this.caps.capability.layers[this.layerIndex];if(this.caps.capability.vendorSpecificCaps&&this.caps.capability.vendorSpecificCaps.tilesets){this.serviceType="WMSC"}var q=this.cntrl.map.catalogue.getLayerParameters(this.cntrl.map.baseLayer.territory,D.name+":"+this.serviceType);if(q){this.cntrl.map.viewer.addGeoportalLayer(q.resourceId,{visibility:true,view:{drop:true,zoomToExtent:true}});if(this.cntrl.map.getZoom()<q.options.minZoomLevel){this.cntrl.map.zoomTo(q.options.minZoomLevel)}else{if(q.options.maxZoomLevel<this.cntrl.map.getZoom()){this.cntrl.map.zoomTo(q.options.maxZoomLevel)}}this.cntrl.closeForm();return}var a=this.crs;var R={VERSION:this.caps.version,LAYERS:D.name};var F={"application/vnd.ogc.se_inimage":false,"application/vnd.ogc.se_blank":false,"application/vnd.ogc.se_xml":false};for(var z=0,r=this.caps.capability.exception.formats.length;z<r;z++){F[this.caps.capability.exception.formats[z]]=true}R.exceptions=F["application/vnd.ogc.se_inimage"]?"application/vnd.ogc.se_inimage":F["application/vnd.ogc.se_blank"]?"application/vnd.ogc.se_blank":"application/vnd.ogc.se_xml";F={"image/jpeg":false,"image/png":false,"image/gif":false};for(var z=0,r=D.formats.length;z<r;z++){F[D.formats[z]]=true}R.format=F["image/png"]?"image/png":F["image/gif"]?"image/gif":"image/jpeg";if(D.opaque==false&&R.format!="image/jpeg"){R.transparent=true}if(D.styles&&D.styles.length>0){R.styles=D.styles[0].name}var u=null;var I=new OpenLayers.Projection(a);if(D.bbox[a]){u=OpenLayers.Bounds.fromArray(D.bbox[a].bbox)}else{if(D.llbbox&&D.llbbox.length>0){u=OpenLayers.Bounds.fromArray(D.llbbox);if(I.getProjName()!="longlat"||!OpenLayers.Projection.CRS84.isCompatibleWith(I)){u.transform(OpenLayers.Projection.CRS84,I)}}}var f={projection:a,units:I.getUnits(),singleTile:true,maxExtent:u,visibility:true};switch(this.serviceType){case"WMS":if(D.minScale){f.minZoomLevel=this.cntrl.map.getZoomForResolution(OpenLayers.Util.getResolutionFromScale(D.minScale,this.cntrl.map.getProjection().getUnits()));if(!this.cntrl.map.isValidZoomLevel(f.minZoomLevel)){f.minZoomLevel=undefined}}if(f.minZoomLevel==undefined){f.minZoomLevel=this.cntrl.map.baseLayer.minZoomLevel}if(D.maxScale){f.maxZoomLevel=this.cntrl.map.getZoomForResolution(OpenLayers.Util.getResolutionFromScale(D.maxScale,this.cntrl.map.getProjection().getUnits()));if(!this.cntrl.map.isValidZoomLevel(f.maxZoomLevel)){f.maxZoomLevel=undefined}}if(f.maxZoomLevel==undefined){f.maxZoomLevel=this.cntrl.map.baseLayer.maxZoomLevel}break;case"WMSC":var N=this.caps.capability.vendorSpecificCaps.tilesets;for(var h=0,m=N.length;h<m;h++){var H=N[h];if(H.srs[0]!=a){continue}var B=!(H.layers&&H.layers.length>0)?true:false;if(!B){for(var C=0,d=H.layers.length;C<d;C++){if(D.name==H.layers[C]){B=true;break}}}if(!B){continue}if(H.width!=OpenLayers.Map.TILE_WIDTH||H.height!=OpenLayers.Map.TILE_HEIGHT){f.nativeTileSize=new OpenLayers.Size(H.width,H.height)}f.minZoomLevel=this.cntrl.map.baseLayer.minZoomLevel;f.maxZoomLevel=this.cntrl.map.baseLayer.maxZoomLevel;f.nativeResolutions=H.resolutions.slice(0);var o=H.resolutions.slice(0);if(!I.equals(this.cntrl.map.getProjection())){for(var Q=0,M=o.length;Q<M;Q++){var J=new OpenLayers.LonLat(o[Q],0);J.transform(I,this.cntrl.map.getProjection());o[Q]=parseFloat(J.lon.toFixed(0))}}var P=this.cntrl.map.resolutions[f.minZoomLevel],K=this.cntrl.map.resolutions[f.maxZoomLevel];if(o[o.length-1]>P||o[0]<K){f.minZoomLevel=this.cntrl.map.baseLayer.maxZoomLevel+1;f.maxZoomLevel=this.cntrl.map.baseLayer.maxZoomLevel+1}else{if(o[0]>=P){}else{do{f.minZoomLevel++;P=this.cntrl.map.resolutions[f.minZoomLevel]}while(o[0]<P&&f.minZoomLevel<f.maxZoomLevel)}if(o[o.length-1]<=K){}else{do{f.maxZoomLevel--;K=this.cntrl.map.resolutions[f.maxZoomLevel]}while(o[o.length-1]>K&&f.maxZoomLevel>f.minZoomLevel)}}for(var Q=0,M=f.minZoomLevel-1;Q<M;Q++){f.nativeResolutions.unshift(0)}for(var Q=f.maxZoomLevel+1,M=Geoportal.Catalogue.RESOLUTIONS.length-1;Q<M;Q++){f.nativeResolutions.push(0)}break}f.singleTile=false;break;default:break}f.description="";if(D["abstract"]){f.description+=D["abstract"]}if(D.attribution){if(D.attribution.title){if(f.description.length>0){f.description+="<br/>"}f.description+=D.attribution.title}if(D.attribution.href&&!D.attribution.logo){if(f.description.length>0){f.description+="<br/>"}f.description+='<a href="'+D.attribution.href+'" target="_blank">'+D.title+"</a>"}}f.originators=[{logo:"logo"+D.name}];if(D.attribution&&D.attribution.logo&&D.attribution.logo.href){f.originators[0].pictureUrl=D.attribution.logo.href}else{f.originators[0].pictureUrl=Geoportal.Util.getImagesLocation()+"logo_unknownAuthority.gif"}if(D.attribution&&D.attribution.href){f.originators[0].url=D.attribution.href}else{if(D.AuthorityURL&&D.AuthorityURL[0]&&D.AuthorityURL[0].href){f.originators[0].url=D.AuthorityURL[0].href}else{f.originators[0].url="javascript:void(0)"}}if(D.metadataURLs&&D.metadataURLs.length>0){f.metadataURL=D.metadataURLs[0].href}if(D.dataURLs&&D.dataURLs.length>0){f.dataURL=D.dataURLs[0].href}if(D.styles&&D.styles.length>0){f.legends=[];for(var Q=0,M=D.styles.length,O=0;Q<M;Q++){var g=D.styles[Q];if(g.legend&&g.legend.href){f.legends[O]={style:g.name,title:g.title,href:g.legend.href,width:g.legend.width,height:g.legend.height};++O}}if(f.legends.length==0){f.legends=null}}if(this.serviceType=="WMS"&&this.caps.capability.request.getfeatureinfo){var v=this.caps.capability.request.getfeatureinfo;var E=["text/html","application/vnd.ogc.gml","text/plain"],L,b;for(L=0,b=E.length;L<b;L++){if(OpenLayers.Util.indexOf(v.formats,E[L])!=-1){break}}if(L!=b){f.afterAdd=function(){var l=this.map.getControlsBy("id","basic_"+this.id)[0];if(!l){return}var j=new OpenLayers.Control.WMSGetFeatureInfo({url:v.href,layers:[this],title:"OpenLayers.Control.WMSGetFeatureInfo.title",type:OpenLayers.Control.TYPE_BUTTON,queryVisible:true,infoFormat:E[L],maxFeatures:1,eventListeners:{getfeatureinfo:function(U){var p="";if(typeof(U.features)!="undefined"){for(var W=0,S=U.features.length;W<S;W++){var V=Geoportal.Control.renderFeatureAttributes(U.features[W]);p+='<div class="gpPopupHead">'+V[0]+'</div><div class="gpPopupBody">'+V[1]+"</div>"}}else{if(U.text){p=U.object.infoFormat=="text/plain"?'<div class="gpPopupBody">'+U.text.replace(/[\r\n]/g,"<br/>").replace(/ /g,"&nbsp;")+"</div>":U.text}}if(p){this.map.addPopup(new OpenLayers.Popup.FramedCloud("chicken",this.map.getLonLatFromPixel(U.xy),null,Geoportal.Util.cleanContent(p),null,true))}}},trigger:function(){if(this.active){this.deactivate()}else{this.activate()}}});l.addControls([j])}}}this.cntrl.wImg.style.display="none";var w=this.cntrl.map.addLayer(this.serviceType==="WMSC"?"WMS-C":this.serviceType,D.title,this.caps.capability.request.getmap.href,R,OpenLayers.Util.extend(f,this.cntrl.layerImageOptions));this.cntrl.closeForm()},failedOnLoadingUrl:function(a){this.cntrl.closeForm();OpenLayers.Console.userError(a.statusText)},abortRequest:function(){if(this.request){this.request.abort();this.request=null}},CLASS_NAME:"Geoportal.Control.AddImageLayer"});Geoportal.Control.AddImageLayer.TRY_CRS_BBOX_WHEN=50;Geoportal.Control.AddVectorLayer=OpenLayers.Class(Geoportal.Control.Form,{SUPPORTED_CLASSES:["OpenLayers.Geometry.Point","OpenLayers.Geometry.LineString","OpenLayers.Geometry.Polygon"],type:OpenLayers.Control.TYPE_TOGGLE,supportedClasses:null,asynchronousCapabilities:true,initialize:function(a){Geoportal.Control.Form.prototype.initialize.apply(this,arguments);if(!this.supportedClasses){this.supportedClasses=[];for(var b=this.SUPPORTED_CLASSES.length-1;b>=0;b--){this.supportedClasses.unshift(this.SUPPORTED_CLASSES[b])}}if(!this.layerVectorOptions){this.layerVectorOptions={}}},activate:function(){if(!Geoportal.Control.Form.prototype.activate.apply(this,arguments)){return false}var a=document.createElement("form");a.id="__addvlayer__"+this.id;a.name=a.id;a.action="javascript:void(null)";this.addvlayer(a);this.map.addControl(this.formControl);this.formControl.activate();this.formControl.addContent(a);return true},deactivate:function(){return Geoportal.Control.Form.prototype.deactivate.apply(this,arguments)},addvlayer:function(b){this.buildInputTextField(b,{id:"layerName",mandatory:true,size:20,length:20,callbacks:[{evt:"click",func:this.onClick}],value:"____________________"});var a=[];var l=false,j=false;var h=false,m=false;for(var f=0,g=this.supportedClasses.length;f<g;f++){var d={value:this.supportedClasses[f],selected:(f==0),text:this.displayClass+".layerType."+this.supportedClasses[f].split(".").pop()};if(this.supportedClasses[f].match(/^OpenLayers\.Geometry\.(LineString|Polygon)$/)){l=true;if(f==0){j=true}}if(this.supportedClasses[f].match(/^(.*\.Format\.(KML|GPX|OSM)|OpenLayers\.Layer\.(WFS|GeoRSS))$/)){h=true;if(f==0){m=true}}a.push(d)}this.buildSelectField(b,{id:"layerType",mandatory:true,options:a,callbacks:[{evt:"click",func:this.onClick},{evt:"change",func:this.onChange}]});if(l){this.buildCheckboxField(b,{id:"layerFreeHand",disabled:!j})}if(h){this.buildInputTextField(b,{id:"layerUrl",size:40,length:512,disabled:!m,callbacks:[{evt:"click",func:this.onClick}]})}this.buildButton(b,"cancel",this.closeForm);this.buildButton(b,"add",this.onClick,13);this.wImg=this.buildImageButton(b,"wait",Geoportal.Util.getImagesLocation()+"loading.gif");this.wImg.style.display="none";this.buildResultsField(b)},onClick:function(b,u){if(u||window.event){OpenLayers.Event.stop(u?u:window.event)}if(b.id.match(/^layer(Name|Type|Url)/)&&OpenLayers.String.contains(b.id,this.id)){if(!b.hasFocus){var E=OpenLayers.Util.getElement("layerName"+this.id);if(E&&b.id!=E.id&&E.hasFocus){Geoportal.Control.Form.focusOff(E)}E=OpenLayers.Util.getElement("layerType"+this.id);if(E&&b.id!=E.id&&E.hasFocus){Geoportal.Control.Form.focusOff(E)}E=OpenLayers.Util.getElement("layerUrl"+this.id);if(E&&b.id!=E.id&&E.hasFocus){Geoportal.Control.Form.focusOff(E)}Geoportal.Control.Form.focusOn(b)}return false}if(b.id.match(/^add/)){b=OpenLayers.Util.getElement("layerType"+this.id);var D=OpenLayers.String.trim(b.options[b.selectedIndex].value);if(D==""){return false}b.options[0].selected=true;var B=D.match(/^OpenLayers\.Geometry\.(Point|LineString|Polygon)$/)!=null;var z=D.match(/.*\.Format\.(KML|GPX|OSM)$/);var q=z!=null;var F=q?z[1]:"";z=D.match(/.*\.Layer\.(WFS|GeoRSS)$/);var d=z!=null;var j=d?z[1]:"";if(!B&&!q&&!d){return false}b=OpenLayers.Util.getElement("layerName"+this.id);var G=OpenLayers.String.trim(b.value);if(G==""&&(!d||j=="GeoRSS")){return false}b.value="";var a=false;b=OpenLayers.Util.getElement("layerFreeHand"+this.id);if(b!=null){a=b.checked;if(D.match(/Point$/)){a=false}b.checked=false}var r=null;if(B){this.wImg.style.display="";r=new OpenLayers.Layer.Vector(G,OpenLayers.Util.extend({projection:this.map.getProjection().clone(),styleMap:this.styleMapTemplates?this.styleMapTemplates[D].clone():undefined,view:{drop:true,zoomToExtent:true}},this.layerVectorOptions[D]));this.map.addLayer(r);var w=OpenLayers.Util.applyDefaults({},{id:"edit_"+r.id,div:OpenLayers.Util.getElement("edit_"+r.id),drawFeatureOptions:OpenLayers.Util.extend({handlerOptions:{style:"default",layerOptions:{styleMap:this.styleMapTemplates?this.styleMapTemplates[D]:undefined},freehand:a}},this.drawFeatureOptions[D]),dragFeatureOptions:OpenLayers.Util.extend({},this.dragFeatureOptions[D]),modifyFeatureOptions:OpenLayers.Util.extend({},this.modifyFeatureOptions[D]),deleteFeatureOptions:OpenLayers.Util.extend({},this.deleteFeatureOptions[D]),selectFeatureOptions:OpenLayers.Util.extend({multiple:false,clickout:true,toggle:true,hover:false,box:false},this.selectFeatureOptions[D])});w=OpenLayers.Util.extend(w,this.editingToolbarOptions[D]);var v=new Geoportal.Control.EditingToolbar(r,D,w);this.map.addControl(v);r.setVisibility(false)}else{if(q||(d&&j=="GeoRSS")){var l=OpenLayers.Util.getElement("layerUrl"+this.id);if(!l){return false}l=OpenLayers.String.trim(l.value);if(l.length==0){return false}this.wImg.style.display="";var f=OpenLayers.Util.extend({visibility:true,styleMap:this.styleMapTemplates?this.styleMapTemplates[D]:undefined},this.layerVectorOptions[D]);if(!f.eventListeners){f.eventListeners={}}var C=f.eventListeners.loadend;f.eventListeners.loadend=function(){if(typeof(C)=="function"){C()}var h=this.getDataExtent();if(h){if(h.getWidth()==0||h.getHeight()==0){}else{this.map.zoomToExtent(h)}}};r=this.map.addLayer(F||j,G,l,f,{})}else{if(d){var l=OpenLayers.Util.getElement("layerUrl"+this.id);if(!l){return false}l=OpenLayers.String.trim(l.value);if(l.length==0){return false}this.wImg.style.display="";var g=OpenLayers.Request.GET({async:this.asynchronousCapabilities,url:l,params:{SERVICE:"WFS",REQUEST:"GetCapabilities"},success:this.successedInLoadingUrl,failure:this.failedOnLoadingUrl,scope:{cntrl:this,serviceType:"WFS",name:G}});return false}else{OpenLayers.Console.error("type "+D+" not supported")}}}}this.wImg.style.display="none";this.closeForm();return false},onChange:function(d,a){var b=d.id;b=b.replace(/^layerType/,"layerName");var f=OpenLayers.Util.getElement(b);if(f){if(d.options[d.selectedIndex].value.match(/^OpenLayers.Layer.WFS$/)){f.disabled=true}else{f.disabled=false}}b=b.replace(/^layerName/,"layerFreeHand");f=OpenLayers.Util.getElement(b);if(f){if(d.options[d.selectedIndex].value=="OpenLayers.Geometry.LineString"||d.options[d.selectedIndex].value=="OpenLayers.Geometry.Polygon"){f.disabled=false}else{f.disabled=true;f.checked=false}}b=b.replace(/^layerFreeHand/,"layerUrl");f=OpenLayers.Util.getElement(b);if(f){if(d.options[d.selectedIndex].value.match(/^(.*\.Format\.(KML|GPX|OSM)|OpenLayers\.Layer\.(WFS|GeoRSS))$/)){f.disabled=false}else{f.value="";f.disabled=true}}},successedInLoadingUrl:function(d){if(!d){this.cntrl.wImg.style.display="none";return}var H=d.responseXML;if(!H&&d.responseText){H=OpenLayers.parseXMLString(d.responseText);var E=OpenLayers.Request.XMLHttpRequest.getParseErrorText(H);if(E!=OpenLayers.Request.XMLHttpRequest.PARSED_OK){this.cntrl.wImg.style.display="none";OpenLayers.Console.userError(OpenLayers.i18n(E));return}}var m=new OpenLayers.Format.WFSCapabilities();var a=null;try{a=m.read(H)}catch(G){this.cntrl.wImg.style.display="none";OpenLayers.Console.userError(G);return}if(a.exceptions){var h="";for(var z=0,v=a.exceptions.length;z<v;z++){h+=a.exceptions[z]+"\n"}this.cntrl.wImg.style.display="none";OpenLayers.Console.userError(h);return}if(!(a.capability&&a.capability.operations&&a.capability.operations.GetFeature)){this.cntrl.wImg.style.display="none";OpenLayers.Console.userError(d.responseText);return}var D=OpenLayers.Util.getElement("results"+this.cntrl.id);D.innerHTML="";var F=0;var p=this.cntrl.map.getMaxExtent();switch(a.version){case"1.0.0":case"1.1.0":a.featureTypeList.featureTypes.sort(function(j,f){return f.title<j.title});for(var z=0,B=a.featureTypeList.featureTypes.length;z<B;z++){var C=a.featureTypeList.featureTypes[z];if(C.bbox.length>0){var g=new OpenLayers.Bounds();for(var w=0,u=C.bbox.length;w<u;w++){g.extend(OpenLayers.Bounds.fromArray(C.bbox[w]))}g.transform(OpenLayers.Projection.CRS84,this.cntrl.map.getProjection());if(!p.containsBounds(g,true,true)&&!g.containsBounds(p,true,true)){continue}}var q=document.createElement("div");q.className="gpWFSCapsFeatureTypesResult";if((F%2)==1){q.className+="Alternate"}var o=document.createElement("span");o.innerHTML=C.title;o.style.cursor="pointer";var b={cntrl:this.cntrl,serviceType:this.serviceType,name:this.name,caps:a,featureTypeIndex:F};OpenLayers.Event.observe(o,"click",OpenLayers.Function.bindAsEventListener(this.cntrl.onFeatureTypeNameClick,b));q.appendChild(o);D.appendChild(q);F++}break;default:break}if(F==0){var q=document.createElement("div");q.className="gpWFSCapsFeatureTypesResult";var o=document.createElement("span");switch(a.version){case"1.0.0":case"1.1.0":o.innerHTML=OpenLayers.i18n("wfs.caps.no.feature.found");break;default:o.innerHTML=OpenLayers.i18n("wfs.caps.unsupported.version",{version:a.version});break}q.appendChild(o);D.appendChild(q)}this.cntrl.wImg.style.display="none";D.style.display=""},onFeatureTypeNameClick:function(r){if(r||window.event){OpenLayers.Event.stop(r?r:window.event)}this.cntrl.wImg.style.display="";var l=this.caps.featureTypeList.featureTypes[this.featureTypeIndex];var d={VERSION:this.caps.version,TYPENAME:l.name};var q=null;if(l.bbox.length>0){q=new OpenLayers.Bounds();for(var g=0,h=l.bbox.length;g<h;g++){q.extend(OpenLayers.Bounds.fromArray(l.bbox[g]))}var b=new OpenLayers.Projection(l.srs);q.transform(OpenLayers.Projection.CRS84,b)}var u={projection:l.srs,maxExtent:q,visibility:true};var o="OpenLayers.Layer.WFS";switch(this.serviceType){case"WFS":break;default:break}if(l["abstract"]){u.description=l["abstract"]}u.originators=[{logo:"logo"+l.name,pictureUrl:Geoportal.Util.getImagesLocation()+"logo_unknownAuthority.gif",url:(l.href?l.href:"javascript:void(0)")}];if(l.metadataURLs&&l.metadataURLs.length>0){u.metadataURL=l.metadataURLs[0].href}this.cntrl.wImg.style.display="none";var a=null;switch(this.caps.version){case"1.0.0":case"1.1.0":a=this.caps.capability.operations.GetFeature.post.href;break;default:break}var m=this.cntrl.map.addLayer(this.serviceType,l.title||this.name,a,d,OpenLayers.Util.extend(u,this.cntrl.layerVectorOptions[o]));this.cntrl.closeForm()},failedOnLoadingUrl:function(a){this.cntrl.closeForm();OpenLayers.Console.userError(a.statusText)},CLASS_NAME:"Geoportal.Control.AddVectorLayer"});Geoportal.Control.LayerOpacity=OpenLayers.Class(Geoportal.Control,{layer:null,opacitable:false,slider:null,initialize:function(b,a){Geoportal.Control.prototype.initialize.apply(this,[a]);this.layer=b;this.opacitable=typeof(this.layer.opacity)=="number";if(!this.opacitable){if(this.div){this.div.title="";if(this.panel_div){this.panel_div.title=""}}}},destroy:function(){this.deactivate();if(this.slider){this.slider.destroy()}this.slider=null;this.layer=null;Geoportal.Control.prototype.destroy.apply(this,arguments)},activate:function(){this.slider.activate();return Geoportal.Control.prototype.activate.apply(this,arguments)},deactivate:function(){if(this.slider){this.slider.deactivate()}return OpenLayers.Control.prototype.deactivate.apply(this,arguments)},draw:function(a){Geoportal.Control.prototype.draw.apply(this,arguments);this.redraw();this.activate();return this.div},redraw:function(){if(this.opacitable){this.panel_div.innerHTML="";var a=document.createElement("div");a.id="trackSlider_"+this.layer.id;a.className="gpControlLayerOpacityTrackSliderClass";this.panel_div.appendChild(a);var d=document.createElement("div");d.id="Opacity_"+this.layer.id;d.className="gpControlLayerOpacityOpacityClass";d.appendChild(document.createTextNode(""+Math.round(this.layer.opacity*100)+"%"));this.panel_div.appendChild(d);var b=Geoportal.Util.getImagesLocation();this.slider=new Geoportal.Control.LayerOpacitySlider(this.layer,{id:a.id,div:a,levelBarImgWidth:50,levelBarImgHeight:5,levelBarImg:b+"bg_handle.gif",sliderImgWidth:7,sliderImgHeight:11,sliderImg:b+"cursor.gif",_opacityDiv:d,onDraw:function(f){if(this._opacityDiv.firstChild){this._opacityDiv.firstChild.nodeValue=f+"%"}},onSliderMove:function(f){if(this._opacityDiv.firstChild){this._opacityDiv.firstChild.nodeValue=f+"%"}}});this.map.addControl(this.slider,new OpenLayers.Pixel(0,3))}return this.div},refreshOpacity:function(){if(this.opacitable&&this.slider){this.slider.moveSlider()}},changeLang:function(a){if(this.opacitable){this.div.title=OpenLayers.i18n(this.displayClass+".title");if(this.panel_div){this.panel_div.title=this.div.title}}},CLASS_NAME:"Geoportal.Control.LayerOpacity"});Geoportal.Control.Measure=OpenLayers.Class(OpenLayers.Control.Measure,Geoportal.Control.Form,{initialize:function(b,a){this.EVENT_TYPES=OpenLayers.Control.Measure.prototype.EVENT_TYPES.concat(Geoportal.Control.prototype.EVENT_TYPES);Geoportal.Control.Form.prototype.initialize.apply(this,[a]);this.callbacks=OpenLayers.Util.extend({done:this.measureComplete,point:this.measurePartial},this.callbacks);this.handlerOptions=OpenLayers.Util.extend({persist:this.persist},this.handlerOptions);this.handler=new b(this,this.callbacks,this.handlerOptions);this.needsForm=(this.targetElement==null)},activate:function(){if(!Geoportal.Control.Form.prototype.activate.apply(this,arguments)){return false}if(this.needsForm===true){var a=document.createElement("form");a.id="__addopanel__"+this.id;a.name=a.id;a.action="javascript:void(null)";this.addOutputPanel(a);this.map.addControl(this.formControl);this.formControl.activate();this.formControl.addContent(a)}return true},deactivate:function(){if(this.needsForm===true){this.targetElement=null}return Geoportal.Control.Form.prototype.deactivate.apply(this,arguments)},addOutputPanel:function(a){},CLASS_NAME:"Geoportal.Control.Measure"});Geoportal.Control.MousePosition=OpenLayers.Class(Geoportal.Control,{prefix:"",separator:", ",suffix:"",numDigits:0,displayProjection:null,pssKey:null,selectUnits:null,currentUnit:Number.NaN,lonInput:null,latInput:null,zoneInput:null,pss:null,displaySystemUnits:{longlat:["sexa","deg","gon","rad"],utm:["km","m","cm"],proj:["km","m","cm"]},initialize:function(b){Geoportal.Control.prototype.initialize.apply(this,arguments);this.pss={};for(var a in Geoportal.Control.MousePosition.PSS){if(Geoportal.Control.MousePosition.PSS.hasOwnProperty(a)){this.pss[a]={};for(var d in Geoportal.Control.MousePosition.PSS[a]){if(Geoportal.Control.MousePosition.PSS[a].hasOwnProperty(d)){if(typeof(Geoportal.Control.MousePosition.PSS[a][d])=="string"){this.pss[a][d]=OpenLayers.String.format(Geoportal.Control.MousePosition.PSS[a][d],{id:this.id,lon:"${lon}",lat:"${lat}",zone:"${zone}"})}else{this.pss[a][d]=Geoportal.Control.MousePosition.PSS[a][d]}}}}}this.pss.longlat.abscissa=this.displayClass+".longitude";this.pss.longlat.ordinate=this.displayClass+".latitude";this.pss.utm.abscissa=this.displayClass+".easting";this.pss.utm.ordinate=this.displayClass+".northing";this.pss.utm.zone=this.displayClass+".utmZone";this.pss.proj.abscissa=this.displayClass+".easting";this.pss.proj.ordinate=this.displayClass+".northing";this.setPssKey()},destroy:function(){if(this.map){this.map.events.unregister("mousemove",this,this.redraw);this.map.events.unregister("moveend",this,this.redraw);this.map.events.unregister("changebaselayer",this,this.changeBaseLayer);this.map.events.unregister("changedisplayprojection",this,this.changeDisplayProjection)}if(this.selectUnits!=null){OpenLayers.Event.stopObservingElement(this.selectUnits);this.selectUnits=null}this.lonInput=null;this.latInput=null;this.zoneInput=null;this.pss=null;Geoportal.Control.prototype.destroy.apply(this,arguments)},draw:function(a){Geoportal.Control.prototype.draw.apply(this,arguments);this.div.className=this.displayClass;this.redraw();return this.div},redraw:function(a){var b=null;if(a==null||a.xy==undefined){b=this.map.getCenter();if(!b){b=new OpenLayers.LonLat(0,0)}}else{b=this.map.getLonLatFromPixel(a.xy)}if(!b){return}b.transform(this.map.getProjection(),this.displayProjection);this.formatOutput(b)},formatOutput:function(b){if(this.displayProjection&&!this.pssKey){this.setPssKey()}var f;switch(this.pssKey){case"longlat":if(this.units[this.currentUnit]=="sexa"){f=this.displayDMS(b)}else{f=this.displayDEC(b)}break;case"utm":f=this.displayMRGS(b);break;default:f=this.displayEN(b);break}if(typeof(f)=="string"){while(this.div.childNodes.length>0){this.div.removeChild(this.div.firstChild)}var a=document.createElement("div");a.style.border="0px";a.style.padding="0px";a.style.margin="0px";a.innerHTML=f;this.div.appendChild(a);var d=this.map.getControlsByClass(OpenLayers.Control.KeyboardDefaults.prototype.CLASS_NAME)[0];this.selectUnits=OpenLayers.Util.getElement("__sdsu__"+this.id);if(this.selectUnits!=null){this.selectUnits.hasFocus=false;this.selectUnits.kbControl=d;OpenLayers.Event.observe(this.selectUnits,"click",OpenLayers.Function.bind(this.onClick,this,this.selectUnits));OpenLayers.Event.observe(this.selectUnits,"change",OpenLayers.Function.bind(this.onChangeUnit,this,this.selectUnits))}var g=this.map.getControlsByClass(Geoportal.Control.Information.prototype.CLASS_NAME)[0];this.lonInput=OpenLayers.Util.getElement("__lon__"+this.id);if(this.lonInput!=null){this.lonInput.hasFocus=false;this.lonInput.kbControl=d;this.lonInput.ciControl=g;OpenLayers.Event.observe(this.lonInput,"click",OpenLayers.Function.bind(this.onClick,this,this.lonInput));OpenLayers.Event.observe(this.lonInput,"focus",OpenLayers.Function.bind(this.onClick,this,this.lonInput));OpenLayers.Event.observe(this.lonInput,"change",OpenLayers.Function.bind(this.onChangeLonLat,this,this.lonInput));OpenLayers.Event.observe(this.lonInput,"blur",OpenLayers.Function.bind(this.onChangeLonLat,this,this.lonInput))}this.latInput=OpenLayers.Util.getElement("__lat__"+this.id);if(this.latInput!=null){this.latInput.hasFocus=false;this.latInput.kbControl=d;this.latInput.ciControl=g;OpenLayers.Event.observe(this.latInput,"click",OpenLayers.Function.bind(this.onClick,this,this.latInput));OpenLayers.Event.observe(this.latInput,"focus",OpenLayers.Function.bind(this.onClick,this,this.latInput));OpenLayers.Event.observe(this.latInput,"change",OpenLayers.Function.bind(this.onChangeLonLat,this,this.latInput));OpenLayers.Event.observe(this.latInput,"blur",OpenLayers.Function.bind(this.onChangeLonLat,this,this.latInput))}this.zoneInput=OpenLayers.Util.getElement("__zone__"+this.id)}else{if(this.lonInput!=null){this.lonInput.value=f.lon}if(this.latInput!=null){this.latInput.value=f.lat}if(this.zoneInput!=null){this.zoneInput.value=f.zone}if(this.units[this.currentUnit]=="sexa"){if(this.lonInput!=null){this.lonInput.size=16}if(this.latInput!=null){this.latInput.size=16}}else{if(this.lonInput!=null){this.lonInput.size=11}if(this.latInput!=null){this.latInput.size=11}}}},setPssKey:function(){if(!this.displayProjection){this.pssKey=null;return}switch(this.displayProjection.getProjName()){case"longlat":case"utm":this.pssKey=this.displayProjection.getProjName();break;default:this.pssKey="proj";break}this.setPSS()},setPSS:function(){var b=this.pss[this.pssKey];var f=OpenLayers.i18n(b.abscissa);var d=OpenLayers.i18n(b.ordinate);var a=OpenLayers.i18n(b.zone!==undefined?b.zone:"");this.prefix=b.prefix.replace(/@abscissa@/g,f).replace(/@ordinate@/g,d).replace(/@zone@/g,a);this.separator=b.separator.replace(/@abscissa@/g,f).replace(/@ordinate@/g,d).replace(/@zone@/g,a);this.suffix=b.suffix.replace(/@abscissa@/g,f).replace(/@ordinate@/g,d).replace(/@zone@/g,a);this.units=this.displaySystemUnits[this.pssKey].slice(0);this.currentUnit=(isNaN(this.currentUnit)?b.defaultUnit:this.currentUnit);if(this.selectUnits!=null){OpenLayers.Event.stopObservingElement(this.selectUnits);this.selectUnits=null}this.lonInput=null;this.latInput=null;this.zoneInput=null;if(this.div){while(this.div.childNodes.length>0){this.div.removeChild(this.div.firstChild)}}},displayDMS:function(b){var l=OpenLayers.i18n(this.displayClass+".north");var d=OpenLayers.i18n(this.displayClass+".south");var g=OpenLayers.i18n(this.displayClass+".east");var a=OpenLayers.i18n(this.displayClass+".west");var j=Geoportal.Util.degToDMS(b.lon,[g,a]);var h=Geoportal.Util.degToDMS(b.lat,[l,d]);if(this.selectUnits==null){var f=this.prefix+this.separator+this.getSuffix();f=OpenLayers.String.format(f,{lon:j.replace(/"/g,"&quot;").replace(/ /g,"&nbsp;"),lat:h.replace(/"/g,"&quot;").replace(/ /g,"&nbsp;")});return f}return{lon:j,lat:h}},displayDEC:function(b){var g=1,a=11,l=6;if(this.units[this.currentUnit]=="gon"){g=1.1111111111111112}else{if(this.units[this.currentUnit]=="rad"){g=0.017453292519943295;l=8}}var j=OpenLayers.String.sprintf("%*.*f",a,l,b.lon*g);var h=OpenLayers.String.sprintf("%*.*f",a,l,b.lat*g);if(this.selectUnits==null){var f=this.prefix+this.separator+this.getSuffix();f=OpenLayers.String.format(f,{lon:j.replace(/ /g,"&nbsp;"),lat:h.replace(/ /g,"&nbsp;")});return f}return{lon:j,lat:h}},displayEN:function(a){var d=1;if(this.units[this.currentUnit]=="km"){d=0.001}else{if(this.units[this.currentUnit]=="cm"){d=100}}var g=OpenLayers.String.sprintf("%*.*f",10,this.numDigits,a.lon*d);var f=OpenLayers.String.sprintf("%*.*f",10,this.numDigits,a.lat*d);if(this.selectUnits==null){var b=this.prefix+this.separator+this.getSuffix();b=OpenLayers.String.format(b,{lon:g.replace(/ /g,"&nbsp;"),lat:f.replace(/ /g,"&nbsp;")});return b}return{lon:g,lat:f}},displayMRGS:function(b){var f=1;if(this.units[this.currentUnit]=="km"){f=0.001}else{if(this.units[this.currentUnit]=="cm"){f=100}}var h=OpenLayers.String.sprintf("%*.*f",10,this.numDigits,b.lon*f);var g=OpenLayers.String.sprintf("%*.*f",10,this.numDigits,b.lat*f);var a=OpenLayers.Projection.getMGRSZone(this.displayProjection.getProperty("zone"),b.clone().transform(this.map.getProjection(),OpenLayers.Projection.CRS84));if(this.selectUnits==null){var d=this.prefix+this.separator+this.getSuffix();d=OpenLayers.String.format(d,{lon:h.replace(/ /g,"&nbsp;"),lat:g.replace(/ /g,"&nbsp;"),zone:a});return d}return{lon:h,lat:g,zone:a}},changeLang:function(a){this.setPSS();this.redraw()},changeBaseLayer:function(a){if(a){this.displayProjection=a.layer.displayProjection?a.layer.displayProjection.clone():a.layer.getNativeProjection().clone();this.pssKey=null;this.redraw()}},changeDisplayProjection:function(a){if(a){if(!(this.displayProjection.getProjName()==a.displayProjection.getProjName()||(this.displayProjection.isUTMZoneProjection()&&a.displayProjection.isUTMZoneProjection()))){this.currentUnit=Number.NaN}this.displayProjection=a.displayProjection;this.pssKey=null;this.redraw();this.keepSelectedUnit=undefined}},onClick:function(f,a){if(a||window.event){OpenLayers.Event.stop(a?a:window.event)}if(f.hasFocus){return}Geoportal.Control.Form.focusOn(f);if(f==this.lonInput||f==this.latInput){if(f.ciControl){f.ciControl.setSelectable()}var d=Geoportal.Util.getComputedStyle(f,"color")||"#000000";var b=Geoportal.Util.getComputedStyle(f,"background-color")||"#FFFFFF";f.style.color=b;f.style.backgroundColor=d}},onChangeUnit:function(b,a){if(a||window.event){OpenLayers.Event.stop(a?a:window.event)}if(!b.hasFocus){return}this.currentUnit=b.selectedIndex;Geoportal.Control.Form.focusOff(b);this.redraw()},onChangeLonLat:function(h,p){if(p||window.event){OpenLayers.Event.stop(p?p:window.event)}if(!h.hasFocus){return}Geoportal.Control.Form.focusOff(h);if(h.ciControl){h.ciControl.setSelectable(false)}var j=Geoportal.Util.getComputedStyle(h,"color")||"#FFFFFF";var g=Geoportal.Util.getComputedStyle(h,"background-color")||"#000000";h.style.color=g;h.style.backgroundColor=j;var m=this.lonInput.value,d=this.latInput.value;if(this.units[this.currentUnit]!="sexa"){m=parseFloat(m);d=parseFloat(d)}else{m=Geoportal.Util.dmsToDeg(m);d=Geoportal.Util.dmsToDeg(d)}if(!isNaN(m)&&!isNaN(d)){var b=1;switch(this.units[this.currentUnit]){case"gon":b=1.1111111111111112;break;case"rad":b=0.017453292519943295;break;case"km":b=0.001;break;case"cm":b=100;break;default:break}m/=b;d/=b;var l=new OpenLayers.LonLat(m,d);l.transform(this.displayProjection,this.map.getProjection());var f=(this.map.getProjection()?this.map.getProjection().getProjName()=="longlat"?0.000028:1:undefined);if(!this.map.getCenter().equals(l,f)){this.map.setCenter(l)}}},getSuffix:function(){var d='<select id="__sdsu__${id}" name="__sdsu__${id}" size="1" class="gpSelectUnits">';d=OpenLayers.String.format(d,{id:this.id});for(var b=0,a=this.units.length;b<a;b++){d+='<option value="'+b+'"'+(b==this.currentUnit?' selected="selected"':"")+">"+OpenLayers.i18n(this.displayClass+"."+this.units[b])+"</option>"}d+="</select>";return d+this.suffix},setMap:function(){Geoportal.Control.prototype.setMap.apply(this,arguments);this.map.events.register("mousemove",this,this.redraw);this.map.events.register("moveend",this,this.redraw);this.map.events.register("changebaselayer",this,this.changeBaseLayer);this.map.events.register("changedisplayprojection",this,this.changeDisplayProjection)},updateSize:function(){if(this.div.parentNode){var d=Geoportal.Util.getComputedStyle(this.div.parentNode,"width",true);if(!d){return}var b=1;var a=Geoportal.Util.getComputedStyle(this.div,"width",true);if(!a){return}while((d<a)&&b>0.1){b-=0.1;this.div.style.fontSize=b.toFixed(1)+"em";a=Geoportal.Util.getComputedStyle(this.div,"width",true)}if(b<0.1){this.div.style.fontSize="0.5em";this.div.style.left="5%"}else{this.div.style.left=(100*(d-a)/(2*d)).toFixed(0)+"%"}}},CLASS_NAME:"Geoportal.Control.MousePosition"});Geoportal.Control.MousePosition.PSS={longlat:{abscissa:"",ordinate:"",prefix:'<form id="__lamp__${id}" name="__lamp__${id}" action="javascript:void(null)"><b>@abscissa@ :</b> <input id="__lon__${id}" class="gpLong" type="text" value="${lon}" size="11"/>',separator:'&nbsp;&nbsp;<b>@ordinate@ :</b> <input id="__lat__${id}" class="gpLat" type="text" value="${lat}" size="11"/>',suffix:"</form>",defaultUnit:1},utm:{abscissa:"",ordinate:"",prefix:'<form id="__lamp__${id}" name="__lamp__${id}" action="javascript:void(null)"><b>@zone@ :</b> <input id="__zone__${id}" class="gpZone" type="text" value="${zone}" size="3"/>&nbsp;&nbsp;<b>@abscissa@ :</b> <input id="__lon__${id}" class="gpLong" type="text" value="${lon}" size="11"/>',separator:'&nbsp;&nbsp;<b>@ordinate@ :</b> <input id="__lat__${id}" class="gpLat" type="text" value="${lat}" size="11"/>',suffix:"</form>",defaultUnit:1},proj:{abscissa:"",ordinate:"",prefix:'<form id="__lamp__${id}" name="__lamp__${id}" action="javascript:void(null)"><b>@abscissa@ :</b> <input id="__lon__${id}" class="gpLong" type="text" value="${lon}" size="11"/>',separator:'&nbsp;&nbsp;<b>@ordinate@ :</b> <input id="__lat__${id}" class="gpLat" type="text" value="${lat}" size="11"/>',suffix:"</form>",defaultUnit:1}};Geoportal.Control.ZoomBar=OpenLayers.Class(Geoportal.Control,{slider:null,nameScaleDivID:null,initialize:function(){Geoportal.Control.prototype.initialize.apply(this,arguments)},destroy:function(){if(this.slider){if(this.map){this.map.removeControl(this.slider)}this.slider.destroy();this.slider=null}Geoportal.Control.prototype.destroy.apply(this,arguments)},redraw:function(){if(this.div!=null){if(this.slider){this.slider.destroy();this.slider=null}this.div.innerHTML=""}this.draw(this.position)},draw:function(a){Geoportal.Control.prototype.draw.apply(this,arguments);this._addZoomBar();return this.div},_addZoomBar:function(){this.nameScaleDivID=OpenLayers.Util.createUniqueID("nameScale");var d=document.createElement("div");d.id=this.nameScaleDivID;d.className="nameScale";this.div.appendChild(d);var b=document.createElement("div");b.innerHTML=OpenLayers.i18n(this.displayClass+".world");d.appendChild(b);b=document.createElement("div");b.innerHTML=OpenLayers.i18n(this.displayClass+".state");d.appendChild(b);b=document.createElement("div");b.innerHTML=OpenLayers.i18n(this.displayClass+".country");d.appendChild(b);b=document.createElement("div");b.innerHTML=OpenLayers.i18n(this.displayClass+".town");d.appendChild(b);b=document.createElement("div");b.innerHTML=OpenLayers.i18n(this.displayClass+".street");d.appendChild(b);b=document.createElement("div");b.innerHTML=OpenLayers.i18n(this.displayClass+".house");d.appendChild(b);var a="Geoportal_Control_ZoomSlider"+this.map.id;d=document.createElement("div");d.id=a;if(d.style.styleFloat==undefined){d.style.cssFloat="left"}else{d.style.styleFloat="left"}this.div.appendChild(d);var f=Geoportal.Util.getImagesLocation();this.slider=new Geoportal.Control.ZoomSlider({div:OpenLayers.Util.getElement(a),levelBarImgWidth:10,levelBarImgHeight:130,levelBarImg:f+"bg_zoomVertical.gif",sliderImgWidth:15,sliderImgHeight:7,sliderImg:f+"zoom_curseur.gif",getMaxAbsoluteLevels:function(){return Geoportal.Control.ZoomBar.ZOOMRANGE},getMinSelectableLevel:function(){if(this.map.baseLayer!=null){if(this.map.baseLayer.minZoomLevel!=undefined){return this.map.baseLayer.minZoomLevel}}return 0},getMaxSelectableLevel:function(){if(this.map.baseLayer!=null){if(this.map.baseLayer.maxZoomLevel!=undefined&&this.map.baseLayer.maxZoomLevel!=this.map.baseLayer.minZoomLevel){return this.map.baseLayer.maxZoomLevel}}var g=this.map.getNumZoomLevels();if(g==null){g=Geoportal.Control.ZoomBar.ZOOMRANGE}return g-1}});this.map.addControl(this.slider,new OpenLayers.Pixel(10,0))},changeLang:function(a){var b=OpenLayers.Util.getElement(this.nameScaleDivID);b.childNodes[0].innerHTML=OpenLayers.i18n(this.displayClass+".world");b.childNodes[1].innerHTML=OpenLayers.i18n(this.displayClass+".state");b.childNodes[2].innerHTML=OpenLayers.i18n(this.displayClass+".country");b.childNodes[3].innerHTML=OpenLayers.i18n(this.displayClass+".town");b.childNodes[4].innerHTML=OpenLayers.i18n(this.displayClass+".street");b.childNodes[5].innerHTML=OpenLayers.i18n(this.displayClass+".house")},CLASS_NAME:"Geoportal.Control.ZoomBar"});Geoportal.Control.ZoomBar.ZOOMRANGE=21;Geoportal.OLS.Address=OpenLayers.Class(Geoportal.OLS.AbstractAddress,{name:null,postalCode:null,streetAddress:null,places:null,initialize:function(a,b){this.name=null;this.postalCode=null;this.streetAddress=null;this.places=[];Geoportal.OLS.AbstractAddress.prototype.initialize.apply(this,arguments)},destroy:function(){this.name=null;if(this.postalCode){this.postalCode.destroy();this.postalCode=null}if(this.streetAddress){this.streetAddress.destroy();this.streetAddress=null}if(this.places){for(var b=0,a=this.places.length;b<a;b++){this.places[b].destroy();this.places[b]=null}this.places=null}Geoportal.OLS.AbstractAddress.prototype.destroy.apply(this,arguments)},clone:function(){var d=new Geoportal.OLS.Address(this.countryCode);d.addressee=this.addressee;d.name=this.name;if(this.postalCode){d.postalCode=this.postalCode.clone()}if(this.streetAddress){d.streetAddress=this.streetAddress.clone()}if(this.places){for(var b=0,a=this.places.length;b<a;b++){d.places.push(this.places[b].clone())}}return d},addPlace:function(a){if(!this.places){this.places=[]}if(a){this.places.push(a)}},getNbPlaces:function(){return this.places?this.places.length:0},getPlaces:function(){return this.places?this.places:null},toString:function(){var l="";if(!this.streetAddress){l+=this.name||""}else{var a=this.streetAddress._streetLocation;if(a){if(a instanceof Geoportal.OLS.Building){if(a.num){l+=a.num}if(a.subdivision){l+=a.subdivision}l+=", "}}for(var f=0,d=this.streetAddress.getNbStreets();f<d;f++){var m=this.streetAddress.getStreets()[f];if(m.name!=null){l+=m.name}else{l+=(m.typePrefix||"")+" "+(m.officialName||"")+" "+(m.typeSuffix||"")}l+=", "}}var g=this.getNbPlaces();if(g>0){for(var h=0;h<g;h++){var b=this.getPlaces()[h];if(b.classification||b.name){if(b.classification){l+=" "+OpenLayers.i18n(b.classification)}if(b.name){l+=" ["+b.name+"]"}l+=", "}}}if(this.postalCode&&this.postalCode.name){l+=" ["+this.postalCode.name+"]"}l=l.replace(/^(\s*,)+/,"").replace(/(\s*,)+$/,"");return l},toHTMLString:function(){var g="";if(!this.streetAddress){g+="<b>"+(this.name||"")+"</b>"}else{var a=this.streetAddress._streetLocation;if(this.streetAddress._streetLocation){if(a instanceof Geoportal.OLS.Building){if(a.num){g+=a.num}if(a.subdivision){g+=a.subdivision}g+=",&nbsp;"}}for(var f=0,d=this.streetAddress.getNbStreets();f<d;f++){var h=this.streetAddress.getStreets()[f];if(h.name){g+="<b>"+(h.name||"")+"</b>"}else{g+="<b>"+(h.typePrefix||"")+" "+(h.officialName||"")+" "+(h.typeSuffix||"")+"</b>"}g+="<br/>"}}var d=this.getNbPlaces();if(d>0){for(var f=0;f<d;f++){var b=this.getPlaces()[f];if(b.classification||b.name){if(b.classification){g+=" "+OpenLayers.i18n(b.classification)}if(b.name){g+=" ["+b.name+"]"}g+="<br/>"}}}if(this.postalCode&&this.postalCode.name){g+=OpenLayers.i18n("geocoded.address.popup.postalCode")+"&nbsp;: "+this.postalCode.name}return g},CLASS_NAME:"Geoportal.OLS.Address"});Geoportal.OLS.Request=OpenLayers.Class(Geoportal.OLS.AbstractBody,{methodName:null,version:null,requestID:null,maximumResponses:null,_requestParameters:null,initialize:function(b,a,f,d){this.methodName=b;this.version=a;this.requestID=f;this.maximumResponses=null;this._requestParameters=null;Geoportal.OLS.prototype.initialize.apply(this,[d])},destroy:function(){this.methodName=null;this.version=null;this.requestID=null;this.maximumResponses=null;if(this._requestParameters){this._requestParameters.destroy();this._requestParameters=null}Geoportal.OLS.prototype.destroy.apply(this,arguments)},getRequestParameters:function(){return this._requestParameters?this._requestParameters:null},setRequestParameters:function(a){this._requestParameters=a},CLASS_NAME:"Geoportal.OLS.Request"});Geoportal.OLS.RequestHeader=OpenLayers.Class(Geoportal.OLS.AbstractHeader,{clientName:null,clientPassword:null,sessionID:null,srsName:null,MSID:null,initialize:function(a){this.clientName=null;this.clientPassword=null;this.sessionID=null;this.srsName=null;this.MSID=null;Geoportal.OLS.AbstractHeader.prototype.initialize.apply(this,arguments)},destroy:function(){this.clientName=null;this.clientPassword=null;this.sessionID=null;this.srsName=null;this.MSID=null;Geoportal.OLS.AbstractHeader.prototype.destroy.apply(this,arguments)},CLASS_NAME:"Geoportal.OLS.RequestHeader"});Geoportal.OLS.Response=OpenLayers.Class(Geoportal.OLS.AbstractBody,{version:null,requestID:null,numberOfResponses:null,errorList:null,_responseParameters:null,initialize:function(a,b){this.version=a;this.requestID=null;this.numberOfResponses=null;this.errorList=null;this._responseParameters=null;Geoportal.OLS.prototype.initialize.apply(this,arguments)},destroy:function(){this.version=null;this.requestID=null;this.numberOfResponses=1;if(this.errorList){this.errorList.destroy();this.errorList=null}if(this._responseParameters){this._responseParameters.destroy();this._responseParameters=null}Geoportal.OLS.prototype.destroy.apply(this,arguments)},getResponseParameters:function(){return this._responseParameters?this._responseParameters:null},setResponseParameters:function(a){this._responseParameters=a},CLASS_NAME:"Geoportal.OLS.Response"});Geoportal.OLS.ResponseHeader=OpenLayers.Class(Geoportal.OLS.AbstractHeader,{sessionID:null,errorList:null,initialize:function(a){this.sessionID=null;this.errorList=null;Geoportal.OLS.AbstractHeader.prototype.initialize.apply(this,arguments)},destroy:function(){this.sessionID=null;if(this.errorList){this.errorList.destroy();this.errorList=null}Geoportal.OLS.AbstractHeader.prototype.destroy.apply(this,arguments)},CLASS_NAME:"Geoportal.OLS.ResponseHeader"});Geoportal.OLS.UOM.Angle=OpenLayers.Class(Geoportal.OLS.UOM.AbstractMeasure,{uom:"DecimalDegrees",initialize:function(b,a){this.value=b;Geoportal.OLS.UOM.AbstractMeasure.prototype.initialize.apply(this,[a]);this.uom="DecimalDegrees"},destroy:function(){this.uom="DecimalDegrees";Geoportal.OLS.UOM.AbstractMeasure.prototype.destroy.apply(this,arguments)},CLASS_NAME:"Geoportal.OLS.UOM.Angle"});Geoportal.OLS.UOM.Distance=OpenLayers.Class(Geoportal.OLS.UOM.AbstractMeasure,{uom:"M",initialize:function(b,a){this.value=b;this.uom="M";Geoportal.OLS.UOM.AbstractMeasure.prototype.initialize.apply(this,[a])},destroy:function(){this.uom=null;Geoportal.OLS.UOM.AbstractMeasure.prototype.destroy.apply(this,arguments)},CLASS_NAME:"Geoportal.OLS.UOM.Distance"});Geoportal.OLS.UOM.Speed=OpenLayers.Class(Geoportal.OLS.UOM.AbstractMeasure,{uom:"KPH",initialize:function(b,a){this.value=b;this.uom="KPH";Geoportal.OLS.UOM.AbstractMeasure.prototype.initialize.apply(this,[a])},destroy:function(){this.uom=null;Geoportal.OLS.UOM.AbstractMeasure.prototype.destroy.apply(this,arguments)},CLASS_NAME:"Geoportal.OLS.UOM.Speed"});Geoportal.OLS.UOM.Time=OpenLayers.Class(Geoportal.OLS.UOM.TimeStamp,{utcOffset:null,initialize:function(b,a){this.begin=b;this.utcOffset=null;Geoportal.OLS.UOM.TimeStamp.prototype.initialize.apply(this,[a])},destroy:function(){this.utcOffset=null;Geoportal.OLS.UOM.TimeStamp.prototype.destroy.apply(this,arguments)},CLASS_NAME:"Geoportal.OLS.UOM.Time"});Geoportal.Control.BasicLayerToolbar=OpenLayers.Class(Geoportal.Control.Panel,{layer:null,panelToggleCntrlId:null,removeLayerCntrlId:null,opacitySliderCntrlId:null,zoomToLayerMaxExtentCntrlId:null,initialize:function(b,a){Geoportal.Control.Panel.prototype.initialize.apply(this,[a]);this.layer=b;var d=null;if(!a){a={}}if(!a.panelToggleOptions){a.panelToggleOptions={}}this.panelToggleCntrlId=a.panelToggleOptions.id||(a.panelToggleOptions.div?a.panelToggleOptions.div.id:null)||"panelToggle_"+this.layer.id;this.addControls(new Geoportal.Control.PanelToggle(this,OpenLayers.Util.extend({id:this.panelToggleCntrlId},a.panelToggleOptions)));if(!a.removeLayerOptions){a.removeLayerOptions={}}this.removeLayerCntrlId=a.removeLayerOptions.id||(a.removeLayerOptions.div?a.removeLayerOptions.div.id:null)||"layerDrop_"+this.layer.id;this.addControls(new Geoportal.Control.RemoveLayer(this.layer,OpenLayers.Util.extend({id:this.removeLayerCntrlId,title:"gpControlRemoveLayer.title"},a.removeLayerOptions)));if(!a.layerOpacityOptions){a.layerOpacityOptions={}}if(typeof(this.layer.opacity)==="number"){this.opacitySliderCntrlId=a.layerOpacityOptions.id||(a.layerOpacityOptions.div?a.layerOpacityOptions.div.id:null)||"layerOpacity_"+this.layer.id;this.addControls(new Geoportal.Control.LayerOpacity(this.layer,OpenLayers.Util.extend({id:this.opacitySliderCntrlId,title:"gpControlLayerOpacity.title"},a.layerOpacityOptions)))}if(!a.zoomToLayerMaxExtentOptions){a.zoomToLayerMaxExtentOptions={}}this.zoomToLayerMaxExtentCntrlId=a.zoomToLayerMaxExtentOptions.id||(a.zoomToLayerMaxExtentOptions.div?a.zoomToLayerMaxExtentOptions.div.id:null)||"layerZoom_"+this.layer.id;this.addControls(new Geoportal.Control.ZoomToLayerMaxExtent(this.layer,OpenLayers.Util.extend({id:this.zoomToLayerMaxExtentCntrlId,title:"gpControlZoomToLayerMaxExtent.title"},a.zoomToLayerMaxExtentOptions)))},draw:function(a){Geoportal.Control.Panel.prototype.draw.apply(this,arguments);if(this.panelVisibility){this.activateControl(this.getControlsByClass("Geoportal.Control.PanelToggle")[0])}return this.div},onClick:function(b,a){if(a||window.event){OpenLayers.Event.stop(a?a:window.event)}if(!(b instanceof Geoportal.Control.LayerOpacity)){this.activateControl(b)}},CLASS_NAME:"Geoportal.Control.BasicLayerToolbar"});Geoportal.Control.Information=OpenLayers.Class(Geoportal.Control,{controls:null,initialize:function(a){Geoportal.Control.prototype.initialize.apply(this,arguments);this.controls=[];if(!this.displayProjections){this.displayProjections=[OpenLayers.Projection.CRS84.clone()]}},destroy:function(){this.displayProjections=null;if(this.controls){for(var b=0,a=this.controls.length;b<a;b++){this.controls[b].deactivate();this.controls[b].destroy()}this.controls=null}Geoportal.Control.prototype.destroy.apply(this,arguments)},redraw:function(){if(this.div){for(var b=0,a=this.controls.length;b<a;b++){this.controls[b].redraw()}}},draw:function(a){Geoportal.Control.prototype.draw.apply(this,arguments);this.loadContents();return this.div},loadContents:function(){var b=document.createElement("div");b.id="gs_"+this.id;b.className="gpControlGraphicScale olControlNoSelect";this.div.appendChild(b);var a=new Geoportal.Control.GraphicScale({id:b.id,div:b});this.controls.push(a);this.map.addControl(a);b=document.createElement("div");b.id="pj_"+this.id;b.className="gpControlProjections olControlNoSelect";this.div.appendChild(b);a=new Geoportal.Control.Projections({id:b.id,div:b,displayProjections:this.displayProjections});this.controls.push(a);this.map.addControl(a);b=document.createElement("div");b.id="mp_"+this.id;b.className="gpControlMousePosition olControlNoSelect";this.div.appendChild(b);a=new Geoportal.Control.MousePosition({id:b.id,div:b});this.controls.push(a);this.map.addControl(a);b=document.createElement("div");b.id="cp_"+this.id;b.className="gpControlCopyright olControlNoSelect";this.div.appendChild(b);a=new Geoportal.Control.Copyright({id:b.id,div:b,copyright:this.options?this.options.copyright:undefined});this.controls.push(a);this.map.addControl(a)},updateSize:function(){if(this.controls){for(var b=0,a=this.controls.length;b<a;b++){var d=this.controls[b];if(d.updateSize){d.updateSize()}}}},CLASS_NAME:"Geoportal.Control.Information"});Geoportal.Control.LayerToolbar=OpenLayers.Class(Geoportal.Control.Panel,{addVectorLayerCntrlId:null,addImageLayerCntrlId:null,initialize:function(a){Geoportal.Control.Panel.prototype.initialize.apply(this,[a]);var b=null;if(!a){a={}}if(!a.addVectorLayerOptions&&!a.addImageLayerOptions){a.addVectorLayerOptions={};a.addImageLayerOptions={}}if(a.addVectorLayerOptions){this.addVectorLayerCntrlId=a.addVectorLayerOptions.id||(a.addVectorLayerOptions.div?a.addVectorLayerOptions.div.id:null)||"addvector_"+this.id;this.addControls(new Geoportal.Control.AddVectorLayer(OpenLayers.Util.extend({id:this.addVectorLayerCntrlId,title:"gpControlAddVectorLayer.title"},OpenLayers.Util.applyDefaults(a.addVectorLayerOptions,{editingToolbarOptions:{}}))))}if(a.addImageLayerOptions){this.addImageLayerCntrlId=a.addImageLayerOptions.id||(a.addImageLayerOptions.div?a.addImageLayerOptions.div.id:null)||"addimage_"+this.id;this.addControls(new Geoportal.Control.AddImageLayer(OpenLayers.Util.extend({id:this.addImageLayerCntrlId,title:"gpControlAddImageLayer.title"},a.addImageLayerOptions)))}},CLASS_NAME:"Geoportal.Control.LayerToolbar"});Geoportal.Control.Measure.Azimuth=OpenLayers.Class(Geoportal.Control.Measure,{unit:null,accuracies:{dd:2,rad:4,gon:2,mi:3,ft:2,"in":1,km:3,m:0},initialize:function(b,a){Geoportal.Control.Measure.prototype.initialize.apply(this,arguments);this.displaySystem="geographic";this.geodesic=true;if(!this.unit){this.unit=this.displaySystemUnits[this.displaySystem][0]}},destroy:function(){this.targetElement=null;this.distanceElement=null;Geoportal.Control.Measure.prototype.destroy.apply(this,arguments)},addOutputPanel:function(a){this.distanceElement=this.buildInputTextField(a,{id:"distance",mandatory:false,disabled:true,size:20,length:20,css:"gpControlMeasureAzimuthAzimuthInput",value:""});this.targetElement=this.buildInputTextField(a,{id:"azimuth",mandatory:false,disabled:true,size:20,length:20,css:"gpControlMeasureAzimuthAzimuthInput",value:""})},getMeasure:function(h){var d=[0,this.unit],g=[0,"m"],a=-1;if(h.components.length==2){d=this.getBestAzimuth(h);var b=this.displaySystem;var j=this.map.getProjection();if(j&&j.getProjName()=="longlat"){this.displaySystem="geographic"}else{var f=this.displaySystemUnits.metric;if(f){this.displaySystem="metric"}}g=this.getBestLength(h);this.displaySystem=b;a=3}return{measure:d[0],units:d[1],order:a,distance:g[0],distanceUnits:g[1],geometry:h}},getBestAzimuth:function(b){var a=this.getAzimuth(b,this.unit);return[a,this.unit]},getAzimuth:function(f,b){var g=f.components[0].clone().transform(this.map.getProjection(),OpenLayers.Projection.CRS84);g.x=OpenLayers.Util.rad(g.x);g.y=OpenLayers.Util.rad(g.y);var d=f.components[1].clone().transform(this.map.getProjection(),OpenLayers.Projection.CRS84);d.x=OpenLayers.Util.rad(d.x);d.y=OpenLayers.Util.rad(d.y);var a=Math.atan2(Math.sin(d.x-g.x)*Math.cos(d.y),Math.cos(g.y)*Math.sin(d.y)-Math.sin(g.y)*Math.cos(d.y)*Math.cos(d.x-g.x));if(a<0){a+=6.283185307179586}switch(b){case"rad":break;case"gon":a=OpenLayers.Util.gon(a);break;case"dms":a=Geoportal.Util.degToDMS(a,null,1,"%d.%02d%02d");break;default:a=OpenLayers.Util.deg(a);break}return a},handleMeasurements:function(d){if(!d){return}var h=(this.distanceElement&&this.distanceElement.style.display!="none"?this.distanceElement:null);var f=(this.targetElement&&this.targetElement.style.display!="none"?this.targetElement:null);var g=(!(0<=d.order&&d.order<(this.measurementLabels||Geoportal.Control.MeasureToolbar.LABELS).length)||d.measure===0?"wait":(h&&f?"targetElement":"default"));var a=(g=="wait"?0:d.order);var b=[{order:1,measure:d.distance,unit:d.distanceUnits,key:g,label:(this.measurementLabels||Geoportal.Control.MeasureToolbar.LABELS)[1],targetFormat:(this.targetFormat||Geoportal.Control.MeasureToolbar.TARGETFORMAT)[g],targetElement:h,accuracy:(this.accuracies||Geoportal.Control.MeasureToolbar.ACCURACIES)[d.distanceUnits]||"",dimension:""},{order:a,measure:d.measure,unit:d.units,key:g,label:(this.measurementLabels||Geoportal.Control.MeasureToolbar.LABELS)[a],targetFormat:(this.targetFormat||Geoportal.Control.MeasureToolbar.TARGETFORMAT)[g],targetElement:f,accuracy:(this.accuracies||Geoportal.Control.MeasureToolbar.ACCURACIES)[d.units]||"",dimension:""}];return b},CLASS_NAME:"Geoportal.Control.Measure.Azimuth"});Geoportal.Format.XLS.v1_1=OpenLayers.Class(OpenLayers.Format.XML,{VERSION:"1.1",namespaces:{xls:"http://www.opengis.net/xls",sch:"http://www.ascc.net/xml/schematron",gml:"http://www.opengis.net/gml",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},defaultPrefix:"xls",schemaLocation:"http://schemas.opengis.net/ols/1.1.0/XLS.xsd",lang:null,gmlParser:null,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a]);if(!this.externalProjection){this.externalProjection="EPSG:4326"}if(typeof(this.externalProjection)=="string"){this.externalProjection=new OpenLayers.Projection(this.externalProjection,{domainOfVaditity:new OpenLayers.Bounds(-180,-90,180,90)})}this.gmlParser=new OpenLayers.Format.GML({externalProjection:this.externalProjection.clone(),extractAttributes:false,xy:false});this.gmlParser.buildGeometry.point=function(h){var d=this.createElementNS(this.gmlns,"gml:Point");var g=this.createElementNS(this.gmlns,"gml:pos");var b;if(this.xy){b=h.x+" "+h.y}else{b=h.y+" "+h.x}var f=this.createTextNode(b);g.appendChild(f);d.appendChild(g);return d}},read:function(b){var d=new Geoportal.OLS.XLS({version:this.version||this.VERSION});var a=this.readers.xls.XLS.apply(this,[b,d]);if(!a){d.destroy();d=null}return d},readers:{xls:{XLS:function(f,g){g.version=f.getAttribute("version")||this.VERSION;g.lang=f.getAttribute("lang");this.readChildNodes(f,g);if(!g._header){OpenLayers.Console.error(OpenLayers.i18n("Not.conformal.XLS",{part:"Header"}));return null}if(g._header.errorList&&g._header.errorList.getNbErrors()>0){this.reportError(g._header.errorList);return null}if(!g._body){OpenLayers.Console.error(OpenLayers.i18n("Not.conformal.XLS",{part:"Body"}));return null}var b=g.getNbBodies();if(b>0){var a=g.getBodies();for(var d=0;d<b;d++){if(a[d].errorList&&a[d].errorList.getNbErrors()>0){this.reportError(a[d].errorList)}}}return g},ResponseHeader:function(b,d){var a=new Geoportal.OLS.ResponseHeader();a.sessionID=b.getAttribute("sessionID");d._header=a;this.readChildNodes(b,a)},ErrorList:function(b,d){var a=new Geoportal.OLS.ErrorList();a.highestSeverity=b.getAttribute("highestSeverity");d.errorList=a;this.readChildNodes(b,a)},Error:function(d,b){var a=new Geoportal.OLS.Error();a.errorCode=d.getAttribute("errorCode");a.severity=d.getAttribute("severity");a.locationID=d.getAttribute("locationID");a.locationPath=d.getAttribute("locationPath");a.message=d.getAttribute("message");b.addError(a)},Response:function(a,b){var d=new Geoportal.OLS.Response();d.version=a.getAttribute("version")||this.VERSION;d.requestID=a.getAttribute("requestID");d.numberOfResponses=parseInt(a.getAttribute("numberOfResponses"));if(isNaN(d.numberOfResponses)){d.numberOfResponses=null}b.addBody(d);this.readChildNodes(a,d)},Address:function(b,d){var a=new Geoportal.OLS.Address();a.countryCode=b.getAttribute("countryCode");a.addressee=b.getAttribute("addressee");this.readChildNodes(b,a);if(d.addAddress){d.addAddress(a)}else{d.address=a}},GeocodeMatchCode:function(d,b){var a=new Geoportal.OLS.GeocodeMatchCode();a.accuracy=parseFloat(d.getAttribute("accuracy"));if(isNaN(a.accuracy)){a.accuracy=null}a.matchType=d.getAttribute("matchType");b.geocodeMatchCode=a},freeFormAddress:function(b,a){a.name=b.childNodes.length>0?b.childNodes[0].nodeValue:""},StreetAddress:function(d,b){var a=new Geoportal.OLS.StreetAddress();b.streetAddress=a;this.readChildNodes(d,a)},Place:function(d,b){var a=new Geoportal.OLS.Place();a.classification=d.getAttribute("type");a.name=d.childNodes.length>0?d.childNodes[0].nodeValue:"";b.addPlace(a)},PostalCode:function(f,a){var d=f.childNodes.length>0?f.childNodes[0].nodeValue:"";var b=new Geoportal.OLS.PostalCode({name:d});a.postalCode=b},Building:function(d,a){var b=new Geoportal.OLS.Building();b.num=d.getAttribute("number");b.subdivision=d.getAttribute("subdivision");b.name=d.getAttribute("buildingName");a.setStreetLocation(b)},Street:function(b,a){var d=new Geoportal.OLS.Street();d.directionalPrefix=b.getAttribute("directionalPrefix");d.typePrefix=b.getAttribute("typePrefix");d.officialName=b.getAttribute("officialName");d.typeSuffix=b.getAttribute("typeSuffix");d.directionalSuffix=b.getAttribute("directionalSuffix");d.muniOctant=b.getAttribute("muniOctant");d.name=b.childNodes.length>0?b.childNodes[0].nodeValue:"";a.addStreet(d)},RequestHeader:function(b,d){var a=new Geoportal.OLS.RequestHeader();a.clientName=b.getAttribute("clientName");a.clientPassword=b.getAttribute("clientPassword");a.sessionID=b.getAttribute("sessionID");a.srsName=b.getAttribute("srsName");a.MSID=b.getAttribute("MSID");d._header=a},Request:function(b,d){var a=new Geoportal.OLS.Request();a.methodName=b.getAttribute("methodName");a.version=b.getAttribute("version")||this.VERSION;a.requestID=b.getAttribute("requestID");a.maximumResponses=parseInt(b.getAttribute("maximumResponses"));if(isNaN(a.maximumResponses)){a.maximumResponses=null}d.addBody(a);this.readChildNodes(b,a)},Position:function(a,b){var d=new Geoportal.OLS.Position();b.position=d;this.readChildNodes(a,d)},Ellipse:function(a,b){},CircularArc:function(a,b){},QoP:function(a,d){var b=new Geoportal.OLS.QualityOfPosition();b.responseReq=a.getAttribute("responseReq");b.responseTimer=a.getAttribute("responseTimer");d.qop=b;this.readChildNodes(a,b)},Time:function(b,d){var a=new Geoportal.OLS.UOM.Time();a.begin=b.getAttribute("begin");a.duration=b.getAttribute("duration");a.utcOffset=parseInt(b.getAttribute("utcOffset"));if(isNaN(a.utcOffset)){a.utcOffset=null}d.time=a},Speed:function(a,d){var b=new Geoportal.OLS.UOM.Speed();b.value=parseFloat(a.getAttribute("value"));if(isNaN(b.value)){b.value=0}b.accuracy=parseFloat(a.getAttribute("accuracy"));if(isNaN(b.accuracy)){b.accuracy=null}b.uom=a.getAttribute("uom");d.speed=b},Direction:function(a,d){var b=new Geoportal.OLS.UOM.Angle();b.value=parseFloat(a.getAttribute("value"));if(isNaN(b.value)){b.value=0}b.accuracy=parseFloat(a.getAttribute("accuracy"));if(isNaN(b.accuracy)){b.accuracy=null}b.uom=a.getAttribute("uom");d.direction=b},HorizontalAcc:function(b,d){var a=new Geoportal.OLS.HorizontalAcc();d.hAccuracy=a;this.readChildNodes(b,a)},VerticalAcc:function(b,d){var a=new Geoportal.OLS.VerticalAcc();d.vAccuracy=a;this.readChildNodes(b,a)},Distance:function(a,b){var f=new Geoportal.OLS.UOM.Distance();f.value=parseFloat(a.getAttribute("value"));if(isNaN(f.value)){f.value=0}f.accuracy=parseFloat(a.getAttribute("accuracy"));if(isNaN(f.accuracy)){f.accuracy=null}f.uom=a.getAttribute("uom");if(b.setAccuracy){b.setAccuracy(f)}else{b.distance=f}},Angle:function(d,f){var b=new Geoportal.OLS.UOM.Angle();b.value=parseFloat(d.getAttribute("value"));if(isNaN(b.value)){b.value=0}b.accuracy=parseFloat(d.getAttribute("accuracy"));if(isNaN(b.accuracy)){b.accuracy=null}b.uom=d.getAttribute("uom");if(f.setAccuracy){f.setAccuracy(b)}else{f.angle=b}}},gml:{Point:function(b,d){var a=this.gmlParser.parseGeometry.point.apply(this.gmlParser,[b]);if(a){a.transform(this.externalProjection,this.internalProjection);d.lonlat=a}},CircleByCenterPoint:function(a,b){},Polygon:function(a,b){},MultiPolygon:function(a,b){}}},write:function(a){var b=a.CLASS_NAME.split(".").pop();return this.writers.xls[b].apply(this,[a])},writers:{xls:{XLS:function(d){var g={attributes:{}};if(d.version){OpenLayers.Util.extend(g.attributes,{version:d.version})}if(d.lang){OpenLayers.Util.extend(g.attributes,{lang:d.lang})}var f=this.createElementNSPlus("xls:XLS",g);this.writeNode(f,"",d._header);for(var b=0,a=d.getNbBodies();b<a;b++){this.writeNode(f,"",d.getBodies()[b])}return f},ResponseHeader:function(a){var b=this.createElementNSPlus("xls:ResponseHeader");if(a.sessionID){b.setAttribute("sessionID",a.sessionID)}if(a.errorList){this.writeNode(b,"ErrorList",a.errorList)}return b},ErrorList:function(d){var f=this.createElementNSPlus("xls:ErrorList");if(d.highestSeverity!=null){f.setAttribute("highestSeverity",d.highestSeverity)}for(var b=0,a=d.getNbErrors();b<a;b++){this.writeNode(f,"",d.getErrors()[b])}return f},Error:function(b){var d={attributes:{}};if(b.errorCode!=null){OpenLayers.Util.extend(d.attributes,{errorCode:b.errorCode})}if(b.severity!=null){OpenLayers.Util.extend(d.attributes,{severity:b.severity})}if(b.locationID!=null){OpenLayers.Util.extend(d.attributes,{locationID:b.locationID})}if(b.locationPath!=null){OpenLayers.Util.extend(d.attributes,{locationPath:b.locationPath})}if(b.message!=null){OpenLayers.Util.extend(d.attributes,{message:b.message})}var a=this.createElementNSPlus("xls:Error",d);return a},Response:function(b){var a=this.createElementNSPlus("xls:Response",{attributes:{version:b.version,requestID:b.requestID}});if(typeof(b.numberOfResponses)=="number"&&!isNaN(b.numberOfResponses)){a.setAttribute("numberOfResponses",b.numberOfResponses)}if(b.errorList){this.writeNode(a,"ErrorList",b.errorList)}if(b.getResponseParameters()){this.writeNode(a,"",b.getResponseParameters())}return a},Address:function(d){var g=this.createElementNSPlus("xls:Address");g.setAttribute("countryCode",d.countryCode);if(d.addressee!=null){g.setAttribute("addressee",d.addressee)}if(d.name!=null){this.writeNode(g,"xls:freeFormAddress",d)}else{if(d.streetAddress){this.writeNode(g,"xls:StreetAddress",d.streetAddress)}for(var f=0,b=d.getNbPlaces();f<b;f++){this.writeNode(g,"xls:Place",d.getPlaces()[f])}if(d.postalCode){this.writeNode(g,"xls:PostalCode",d.postalCode)}}return g},GeocodeMatchCode:function(a){var b=this.createElementNSPlus("xls:GeocodeMatchCode");if(typeof(a.accuracy)=="number"&&!isNaN(a.accuracy)){b.setAttribute("accuracy",a.accuracy)}if(a.matchType!=null){b.setAttribute("matchCode",a.matchType)}return b},freeFormAddress:function(b){var d=this.createElementNSPlus("xls:freeFormAddress",{value:b.name});return d},StreetAddress:function(b){var f=this.createElementNSPlus("xls:StreetAddress");if(b._streetLocation){this.writeNode(f,"",b._streetLocation)}for(var d=0,a=b.getNbStreets();d<a;d++){this.writeNode(f,"xls:Street",b.getStreets()[d])}return f},Place:function(b){var a=this.createElementNSPlus("xls:Place",{attributes:{type:b.classification},value:b.name});return a},PostalCode:function(a){var b=this.createElementNSPlus("xls:PostalCode",{value:a.name});return b},Building:function(a){var f={attributes:{}};if(a.num!=null){OpenLayers.Util.extend(f.attributes,{number:a.num})}if(a.subdivision!=null){OpenLayers.Util.extend(f.attributes,{subdivision:a.subdivision})}if(a.name!=null){OpenLayers.Util.extend(f.attributes,{buildingName:a.name})}var d=this.createElementNSPlus("xls:Building",f);return d},Street:function(a){var d={attributes:{}};if(a.directionalPrefix!=null){OpenLayers.Util.extend(d.attributes,{directionalPrefix:a.directionalPrefix})}if(a.typePrefix!=null){OpenLayers.Util.extend(d.attributes,{typePrefix:a.typePrefix})}if(a.officialName!=null){OpenLayers.Util.extend(d.attributes,{officialName:a.officialName})}if(a.typeSuffix!=null){OpenLayers.Util.extend(d.attributes,{typeSuffix:a.typeSuffix})}if(a.directionalSuffix!=null){OpenLayers.Util.extend(d.attributes,{directionalSuffix:a.directionalSuffix})}if(a.muniOctant!=null){OpenLayers.Util.extend(d.attributes,{muniOctant:a.muniOctant})}if(a.name!=null){d.value=a.name}var b=this.createElementNSPlus("xls:Street",d);return b},RequestHeader:function(a){var d={attributes:{}};if(a.clientName!=null){OpenLayers.Util.extend(d.attributes,{clientName:a.clientName})}if(a.clientPassword!=null){OpenLayers.Util.extend(d.attributes,{clientPassword:a.clientPassword})}if(a.sessionID!=null){OpenLayers.Util.extend(d.attributes,{sessionID:a.sessionID})}if(a.srsName!=null){OpenLayers.Util.extend(d.attributes,{srsName:a.srsName})}if(a.MSID!=null){OpenLayers.Util.extend(d.attributes,{MSID:a.MSID})}var b=this.createElementNSPlus("xls:RequestHeader",d);return b},Request:function(a){var b=this.createElementNSPlus("xls:Request",{attributes:{methodName:a.methodName,version:a.version,requestID:a.requestID}});if(typeof(a.maximumResponses)=="number"&&!isNaN(a.maximumResponses)){b.setAttribute("maximumResponses",a.maximumResponses)}if(a.getRequestParameters()){this.writeNode(b,"",a.getRequestParameters())}return b},Position:function(b){var a=this.createElementNSPlus("xls:Position");if(b.levelOfConf!=null){a.setAttribute("levelOfConf",b.levelOfConf)}this.writeNode(a,"gml:Point",b.lonlat);if(b.qop){this.writeNode(a,"xls:QoP",b.qop)}if(b.time){this.writeNode(a,"xls:Time",b.time)}if(b.speed){this.writeNode(a,"xls:Speed",b.speed)}if(b.direction){this.writeNode(a,"xls:Direction",b.direction)}return a},Ellipse:function(a){return this.createCommentNode("xls:Ellipse : not yet supported")},CircularArc:function(a){return this.createCommentNode("xls:CircularArc : not yet supported")},QoP:function(b){var a=this.createElementNSPlus("xls:QoP");if(b.responseReq!=null){a.setAttribute("responseReq",b.responseReq)}if(b.responseTimer!=null){a.setAttribute("responseTimer",b.responseTimer)}this.writeNode(a,"xls:HorizontalAcc",b.hAccuracy);this.writeNode(a,"xls:VerticalAcc",b.vAccuracy);return a},Time:function(a){var b=this.createElementNSPlus("xls:Time",{attributes:{begin:a.begin}});if(a.duration!=null){b.setAttribute("duration",a.duration)}if(typeof(a.utcOffset)=="number"&&!isNaN(a.utcOffset)){b.setAttribute("utcOffset",a.utcOffset)}return b},Speed:function(b){var a=this.createElementNSPlus("xls:Speed",{attributes:{value:b.value}});if(b.accuracy){a.setAttribute("accuracy",b.accuracy)}if(b.uom){a.setAttribute("uom",b.uom)}return a},Direction:function(b){var a=this.createElementNSPlus("xls:Direction",{attributes:{value:b.value}});if(b.accuracy){a.setAttribute("accuracy",b.accuracy)}if(b.uom){a.setAttribute("uom",b.uom)}return a},HorizontalAcc:function(a){var b=this.createElementNSPlus("xls:HorizontalAcc");this.writeNode(b,"",a._doa);return b},VerticalAcc:function(b){var a=this.createElementNSPlus("xls:VerticalAcc");this.writeNode(a,"xls:Distance",b.distance);return a},Distance:function(b){var a=this.createElementNSPlus("xls:Distance",{attributes:{value:b.value}});if(b.accuracy){a.setAttribute("accuracy",b.accuracy)}if(b.uom){a.setAttribute("uom",b.uom)}return a},Angle:function(b){var d=this.createElementNSPlus("xls:Angle",{attributes:{value:b.value}});if(b.accuracy){d.setAttribute("accuracy",b.accuracy)}if(b.uom){d.setAttribute("uom",b.uom)}return d}},gml:{Point:function(b){var a=this.gmlParser.buildGeometryNode.apply(this.gmlParser,[b]);return a},CircleByCenterPoint:function(a){return this.createCommentNode("gml:CircleByCenterPoint : not yet supported")},Polygon:function(a){return this.createCommentNode("gml:Polygon : not yet supported")},MultiPolygon:function(a){return this.createCommentNode("gml:MultiPolygon : not yet supported")}}},getNamespacePrefix:function(b){var d=null;if(b==null){d=this.namespaces[this.defaultPrefix]}else{var a=false;for(d in this.namespaces){if(this.namespaces[d]==b){a=true;break}}if(!a){d=null}}return d},readChildNodes:function(d,g){var b=d.childNodes;var a,o,j,h,m;for(var f=0,l=b.length;f<l;++f){a=b[f];if(a.nodeType==1){h=this.getNamespacePrefix(a.namespaceURI);m=a.nodeName.split(":").pop();o=this.readers[h];if(o){j=o[m];if(j){j.apply(this,[a,g])}}}}},reportError:function(g){var h=g.getErrors();for(var b=0,a=h.length;b<a;b++){var d=h[b];var f="XLS ("+(g.highestSeverity!=null?g.highestSeverity:"Warning")+") : ["+d.errorCode+(d.locationID?","+d.locationID:"")+(d.locationPath?","+d.locationPath:"")+(d.message?","+d.message:"")+"]";if(d.severity&&d.severity!="Warning"){OpenLayers.Console.error(f)}else{OpenLayers.Console.warn(f)}}},getNodeName:function(a){return a.CLASS_NAME.split(".").pop()},writeNode:function(g,a,f){var h,l;if(!a){a=this.getNodeName(f)}var j=a.indexOf(":");if(j>0){h=a.substring(0,j);l=a.substring(j+1)}else{h=this.getNamespacePrefix(g.namespaceURI);l=a}var m=this.writers[h];if(m){var d=m[l];if(d){var b=d.apply(this,[f]);g.appendChild(b);return b}}return null},createElementNSPlus:function(b,a){a=a||{};var g=b.indexOf(":");var f=a.uri||this.namespaces[a.prefix];if(!f){f=this.namespaces[b.substring(0,g)]}if(!f){f=this.namespaces[this.defaultPrefix]}var d=this.createElementNS(f,b);if(a.attributes){this.setAttributes(d,a.attributes)}if(a.value){d.appendChild(this.createTextNode(a.value))}return d},setAttributes:function(f,h){var g,j,b,d;for(var a in h){g=h[a].toString();d=this.namespaces[a.substring(0,a.indexOf(":"))]||null;this.setAttributeNS(f,d,a,g)}},CLASS_NAME:"Geoportal.Format.XLS.v1_1"});Geoportal.OLS.HorizontalAcc=OpenLayers.Class({_doa:null,initialize:function(a){this._doa=null;Geoportal.OLS.prototype.initialize.apply(this,arguments)},destroy:function(){if(this._doa){this._doa.destroy();this._doa=null}Geoportal.OLS.prototype.destroy.apply(this,arguments)},setAccuracy:function(a){if(this._doa){this._doa.destroy();this._doa=null}this._doa=a},CLASS_NAME:"Geoportal.OLS.HorizontalAcc"});Geoportal.OLS.LUS.GeocodeRequest=OpenLayers.Class(Geoportal.OLS.LUS,Geoportal.OLS.AbstractRequestParameters,{addresses:null,initialize:function(a){this.addresses=[];Geoportal.OLS.AbstractRequestParameters.prototype.initialize.apply(this,arguments)},destroy:function(){if(this.addresses){for(var b=0,a=this.addresses.length;b<a;b++){this.addresses[b].destroy();this.addresses[b]=null}this.addresses=null}Geoportal.OLS.AbstractRequestParameters.prototype.destroy.apply(this,arguments)},addAddress:function(a){if(!this.addresses){this.addresses=[]}if(a){this.addresses.push(a)}},getNbAddresses:function(){return this.addresses?this.addresses.length:0},getAddresses:function(){return this.addresses?this.addresses:null},CLASS_NAME:"Geoportal.OLS.LUS.GeocodeRequest"});Geoportal.OLS.LUS.GeocodedAddress=OpenLayers.Class(Geoportal.OLS.LUS,{address:null,lonlat:null,geocodeMatchCode:null,initialize:function(b,a,d){this.address=b;this.lonlat=a;this.geocodeMatchCode=null;Geoportal.OLS.LUS.prototype.initialize.apply(this,[d])},destroy:function(){if(this.address){this.address.destroy();this.address=null}if(this.geocodeMatchCode){this.geocodeMatchCode.destroy();this.geocodeMatchCode=null}this.lonlat=null;Geoportal.OLS.LUS.prototype.destroy.apply(this,arguments)},CLASS_NAME:"Geoportal.OLS.LUS.GeocodedAddress"});Geoportal.OLS.LUS.SearchCentreDistance=OpenLayers.Class(Geoportal.OLS.LUS,Geoportal.OLS.UOM.Distance,{initialize:function(b,a){Geoportal.OLS.UOM.Distance.prototype.initialize.apply(this,arguments)},destroy:function(){Geoportal.OLS.UOM.Distance.prototype.destroy.apply(this,arguments)},clone:function(){var a=new Geoportal.OLS.LUS.SearchCentreDistance({value:this.value,accuracy:this.accuracy,uom:this.uom});return a},CLASS_NAME:"Geoportal.OLS.LUS.SearchCentreDistance"});Geoportal.OLS.UOM.Distance.Altitude=OpenLayers.Class(Geoportal.OLS.UOM.Distance,{initialize:function(b,a){Geoportal.OLS.UOM.Distance.prototype.initialize.apply(this,arguments)},destroy:function(){Geoportal.OLS.UOM.Distance.prototype.destroy.apply(this,arguments)},CLASS_NAME:"Geoportal.OLS.UOM.Distance.Altitude"});Geoportal.OLS.VerticalAcc=OpenLayers.Class({distance:null,initialize:function(a){this.distance=null;Geoportal.OLS.prototype.initialize.apply(this,arguments)},destroy:function(){if(this.distance){this.distance.destroy();this.distance=null}Geoportal.OLS.prototype.destroy.apply(this,arguments)},CLASS_NAME:"Geoportal.OLS.VerticalAcc"});Geoportal.Control.LayerSwitcher=OpenLayers.Class(Geoportal.Control,{layerStates:null,layersDiv:null,dataLbl:null,dataLayersDiv:null,dataLayers:null,entityBuffer:null,preventControls:null,initialize:function(a){Geoportal.Control.prototype.initialize.apply(this,arguments);this.cntrlKeys=OpenLayers.Util.extend({},Geoportal.Control.LayerSwitcher.CNTRLKEYS);this.layerStates=[]},destroy:function(){OpenLayers.Event.stopObservingElement(this.div);if(this.map){for(var d=0,b=this.layerStates.length;d<b;d++){for(var a in this.cntrlKeys){var f=this.map.getControl(a+"_"+this.layerStates[d].id);if(f){f.deactivate();f.destroy()}}}}this.cntrKeys=null;this.layerStates=null;this.preventControls=null;if(this.dataLbl){OpenLayers.Event.stopObservingElement(this.dataLbl)}this.clearLayersArray("data");if(this.map){this.map.events.un({addlayer:this.redraw,changelayer:this.redraw,changebaselayer:this.redraw,removelayer:this.removeLayer,scope:this})}Geoportal.Control.prototype.destroy.apply(this,arguments)},setMap:function(a){Geoportal.Control.prototype.setMap.apply(this,arguments);this.map.events.on({addlayer:this.redraw,changelayer:this.redraw,changebaselayer:this.redraw,removelayer:this.removeLayer,scope:this})},draw:function(a){Geoportal.Control.prototype.draw.apply(this,arguments);this.loadContents();if(!this.outsideViewport){this.minimizeControl()}this.redraw();return this.div},clearLayersArray:function(f){var g=this[f+"Layers"];if(g){for(var d=0,a=g.length;d<a;d++){var b=g[d];OpenLayers.Event.stopObservingElement(b.inputElem);OpenLayers.Event.stopObservingElement(b.labelSpan);OpenLayers.Event.stopObservingElement(OpenLayers.Util.getElement("buttonUp_"+b.id));OpenLayers.Event.stopObservingElement(OpenLayers.Util.getElement("buttonDown_"+b.id))}}this[f+"LayersDiv"].innerHTML="";this[f+"Layers"]=[]},checkRedraw:function(b){var h=b&&b.forceDraw===true||false;if(!h){if(!this.layerStates.length||(this.map.layers.length!=this.layerStates.length)){h=true}else{for(var f=0,a=this.layerStates.length;f<a;f++){var g=this.layerStates[f];var d=this.map.layers[f];if((g.displayInLayerSwitcher!=d.displayInLayerSwitcher)||(g.name!=d.name)||(g.inRange!=d.inRange)||(g.id!=d.id)||(g.visibility!=d.visibility)||(g.opacity!=d.opacity)){h=true;break}}}}return h},redraw:function(){if(!Geoportal.Control.LayerSwitcher.prototype.checkRedraw.apply(this,arguments)){return this.div}var M,L,K=this.map.layers.length;var S;this.layerStates=[];for(M=0;M<K;M++){S=this.map.layers[M];if(!S.preventControls){S.preventControls={}}OpenLayers.Util.extend(S.preventControls,this.preventControls);this.layerStates[M]={displayInLayerSwitcher:S.displayInLayerSwitcher,name:S.name,visibility:S.visibility,opacity:S.opacity,inRange:S.inRange,id:S.id};for(var F in this.cntrlKeys){var g=this.map.getControl(F+"_"+this.layerStates[M].id);if(g){var E=g.div;if(E.parentNode!=null){E.parentNode.removeChild(E)}}}}this.clearLayersArray("data");var p=false;var C=this.map.layers.slice();var D=this.dataLayersDiv;var m=false,d=false;for(M=K-1;M>=0;M--){S=C[M];var o=S.isBaseLayer;var u=this.layerStates[M];if(S.displayInLayerSwitcher&&!o){p=true;var J=document.createElement("div");J.id=this.id+"_"+S.id;J.className="gpLayerDivClass";if((this.dataLayers.length%2)==1){J.className+="Alternate"}D.appendChild(J);var B=document.createElement("div");B.className="gpLayerNameGroupDivClass";J.appendChild(B);var z=S.getVisibility();var r=document.createElement("input");r.id="input_"+S.id;r.name=S.name;r.type="checkbox";r.value=S.name;r.checked=z;r.defaultChecked=z;r.className="gpLayerVisibilityClass";r.style.autocomplete="off";if(!S.inRange){r.disabled=true}OpenLayers.Event.observe(r,"mouseup",OpenLayers.Function.bindAsEventListener(this.onInputClick,({inputElem:r,layer:S,layerSwitcher:this})));B.appendChild(r);var G=document.createElement("span");G.id="label_"+S.id;var P=OpenLayers.i18n(S.name);var I=document.createElement("textarea");I.innerHTML=P.replace(/</g,"&lt;").replace(/>/g,"&gt;");P=I.value;I=null;if(P.length>=Geoportal.Control.LayerSwitcher.LAYER_LABEL_MAXLENGTH){P=P.substring(0,Geoportal.Control.LayerSwitcher.LAYER_LABEL_REPLACEMENT_INDEX)+Geoportal.Control.LayerSwitcher.LAYER_LABEL_SUFFIX_REPLACEMENT}G.innerHTML=P;G.className="gpLayerSpanClass";G.title=OpenLayers.i18n(S.name);if(!S.inRange){G.className+="NotInRange"}if(S.description||S.dataURL||S.metadataURL||S.legends){G.style.cursor="help";OpenLayers.Event.observe(G,"click",OpenLayers.Function.bindAsEventListener(this.onLabelClick,({inputElem:r,layer:S,layerSwitcher:this})))}B.appendChild(G);var O=document.createElement("div");O.id="buttonsChangeOrder"+S.id;O.className="gpButtonsChangeOrderClass";B.appendChild(O);var f=document.createElement("div");f.id="buttonUp_"+S.id;f.className="gpButtonUp";if(!m){var v=true;for(L=M+1;L<K-1;L++){if(!C[L].isBaseLayer&&C[L].displayInLayerSwitcher){v=false;break}}if(v){f.className+="Deactive";m=true}}OpenLayers.Event.observe(f,"click",OpenLayers.Function.bindAsEventListener(this.onButtonUpClick,({layerSwitcher:this,layerRank:M})));O.appendChild(f);var R=document.createElement("div");R.id="buttonDown_"+S.id;R.className="gpButtonDown";if(!d){var v=true;for(L=M-1;L>=0;L--){if(!C[L].isBaseLayer&&C[L].displayInLayerSwitcher){v=false;break}}if(v){R.className+="Deactive";d=true}}OpenLayers.Event.observe(R,"click",OpenLayers.Function.bindAsEventListener(this.onButtonDownClick,({layerSwitcher:this,layerRank:M})));O.appendChild(R);var b="loading_"+S.id;var h=this.map.getControl(b);if(h){B.appendChild(h.div)}else{var Q=document.createElement("div");Q.id=b;Q.className="gpControlLoading olControlNoSelect";h=new Geoportal.Control.Loading(S,{id:Q.id,div:Q});B.appendChild(Q);this.map.addControl(h)}if(S.preventControls["Geoportal.Control.BasicLayerToolbar"]!==true&&((S.view&&(S.view.drop||S.view.zoomToExtent))||(S.opacity!=undefined))){b="basic_"+S.id;var q=this.map.getControl(b);if(q){J.appendChild(q.div);for(var w=0,T=q.controls.length;w<T;w++){if(q.controls[w] instanceof Geoportal.Control.LayerOpacity){q.controls[w].refreshOpacity();break}}}else{var N=document.createElement("div");N.id=b;N.className="gpControlBasicLayerToolbar olControlNoSelect";var q=new Geoportal.Control.BasicLayerToolbar(S,{id:N.id,div:N});J.appendChild(N);this.map.addControl(q)}}if(S.preventControls["Geoportal.Control.EditingToolbar"]!==true){b="edit_"+S.id;var a=this.map.getControl(b);if(a){J.appendChild(a.div);if(a.div.childNodes.length>0){a.div.style.display=""}else{a.div.style.display="none"}}else{var H=document.createElement("div");H.id=b;H.className="gpControlEditingToolbar olControlNoSelect";H.style.display="none";J.appendChild(H)}}this.dataLayers.push({layer:S,inputElem:r,labelSpan:G})}}if(!this.outsideViewport){this.dataLbl.style.display=p?"":"none"}return this.div},onInputClick:function(a){if(a!=null){OpenLayers.Event.stop(a)}if(!this.inputElem.disabled){this.inputElem.checked=!this.inputElem.checked;this.layerSwitcher.updateMap()}},onLabelClick:function(j){var r=null;if(j!=null){r=OpenLayers.Events.prototype.getMousePosition.apply({includeXY:true,element:this.layerSwitcher.map.div,clearMouseCache:function(){OpenLayers.Events.prototype.clearMouseCache.apply(this)}},[j]);OpenLayers.Event.stop(j);if(r.x<0){r.x=0}if(r.y<0){r.y=0}}if(OpenLayers.Util.getElement("_mtdpopup_"+this.layer.id)){return}var b=document.createElement("div");if(this.layer.description){var l=document.createElement("div");l.id="abstract_"+this.layer.id;l.className="gpLayerAbstractDivClass";l.innerHTML=OpenLayers.i18n(this.layer.description);b.appendChild(l)}if(this.layer.legends){var h=document.createElement("div");h.id="legends_"+this.layer.id;h.className="gpLayerLegendsDivClass";var q=this.layer.legends[0];var g=document.createElement("img");g.id="legend_"+q.style+"_"+this.layer.id;g.src=q.href.replace(/&amp;/g,"&");if(q.width&&q.height){g.width=q.width;g.height=q.height}if(q.title){g.alt=q.title;g.title=q.title}g.vspace=g.hspace=0;h.appendChild(g);b.appendChild(h)}if(this.layer.dataURL||this.layer.metadataURL){var m="width=750,height=350,menubar=no,status=no,scrollbars=yes,resizable=yes";var a=document.createElement("div");a.id="dataUrls_"+this.layer.id;a.className="gpLayerUrlsDivClass";if(this.layer.dataURL){var d=document.createElement("a");d.id="dataURL_"+this.layer.id;d.className="gpLayerDataURLClass";d.title=OpenLayers.i18n("gpLayer.dataURL");d.alt=d.title;d.appendChild(document.createTextNode(d.title));OpenLayers.Event.observe(d,"click",OpenLayers.Function.bindAsEventListener(function(u){window.open(this.url,"data",m)},{url:this.layer.dataURL}));a.appendChild(d)}if(this.layer.metadataURL){var p=document.createElement("a");p.id="metadataURL_"+this.layer.id;p.className="gpLayerMetadataURLClass";p.title=OpenLayers.i18n("gpLayer.metadataURL");p.alt=p.title;p.appendChild(document.createTextNode(p.title));OpenLayers.Event.observe(p,"click",OpenLayers.Function.bindAsEventListener(function(u){window.open(this.url,"metadata",m)},{url:this.layer.metadataURL}));a.appendChild(p)}b.appendChild(a)}var f=new OpenLayers.Size(Geoportal.Util.getComputedStyle(this.layerSwitcher.map.div,"width",true),Geoportal.Util.getComputedStyle(this.layerSwitcher.map.div,"height",true));f.w/=2;f.h/=4;var o=new Geoportal.Control.Floating(this,{id:"_mtdpopup_"+this.layer.id,headTitle:this.layer.name,size:f});o.onClose=OpenLayers.Function.bind(function(){this.destroy()},o);o.changeLang=OpenLayers.Function.bind(function(u){Geoportal.Control.Floating.prototype.changeLang.apply(this.cntrl,arguments);var v=OpenLayers.Util.getElement("abstract_"+this.layer.id);if(v){v.innerHTML=OpenLayers.i18n(this.layer.description)}v=OpenLayers.Util.getElement("metadataURL_"+this.layer.id);if(v){v.title=OpenLayers.i18n("gpLayer.metadataURL");v.alt=v.title;v.innerHTML="";v.appendChild(document.createTextNode(v.title))}v=OpenLayers.Util.getElement("dataURL_"+this.layer.id);if(v){v.title=OpenLayers.i18n("gpLayer.dataURL");v.alt=v.title;v.innerHTML="";v.appendChild(document.createTextNode(v.title))}},{cntrl:o,layer:this.layer});this.layerSwitcher.map.addControl(o,r);r=null;o.addContent(b)},onButtonUpClick:function(h){var d,l;var f=null;var g=false;var a=this.layerSwitcher.map.layers;l=a.length;var b=a[this.layerRank];for(var d=this.layerRank+1;d<l;d++){if(a[d].isBaseLayer||!a[d].displayInLayerSwitcher){continue}g=true;f=a[d];var j=f.getZIndex();f.setZIndex(b.getZIndex());b.setZIndex(j);break}if(g){a[this.layerRank]=f;a[d]=b;this.layerSwitcher.redraw()}if(h!=null){OpenLayers.Event.stop(h)}},onButtonDownClick:function(h){var d;var f=null;var g=false;var a=this.layerSwitcher.map.layers;var b=a[this.layerRank];for(d=this.layerRank-1;d>=1;d--){if(a[d].isBaseLayer||!a[d].displayInLayerSwitcher){continue}g=true;f=a[d];var j=f.getZIndex();f.setZIndex(b.getZIndex());b.setZIndex(j);break}if(g){a[this.layerRank]=f;a[d]=b;this.layerSwitcher.redraw()}if(h!=null){OpenLayers.Event.stop(h)}},onLayerClick:function(a){this.updateMap()},updateMap:function(){for(var b=0,a=this.dataLayers.length;b<a;b++){var d=this.dataLayers[b];if(d.inputElem){d.layer.setVisibility(d.inputElem.checked)}}},maximizeControl:function(a){this.showControls(false);if(a!=null){OpenLayers.Event.stop(a)}},minimizeControl:function(a){this.showControls(true);if(a!=null){OpenLayers.Event.stop(a)}},showControls:function(a){this.dataLayersDiv.style.display=a?"none":"block"},loadContents:function(){if(!this.div.className){this.div.className=""}this.div.className+=" gpMainDivClass";OpenLayers.Event.observe(this.div,"dblclick",OpenLayers.Function.bindAsEventListener(this.ignoreEvent,this));OpenLayers.Event.observe(this.div,"click",OpenLayers.Function.bindAsEventListener(this.ignoreEvent,this));OpenLayers.Event.observe(this.div,"mousedown",OpenLayers.Function.bindAsEventListener(this.mouseDown,this));OpenLayers.Event.observe(this.div,"mouseup",OpenLayers.Function.bindAsEventListener(this.mouseUp,this));this.layersDiv=document.createElement("div");this.layersDiv.id=this.id+"_layersDiv";this.layersDiv.className="gpLayersClass";if(!this.outsideViewport){this.dataLbl=document.createElement("div");this.dataLbl.id=this.id+"_layer_title";this.dataLbl.innerHTML=OpenLayers.i18n(this.displayClass+".label");this.dataLbl.className="gpControlLabelClass";OpenLayers.Event.observe(this.dataLbl,"click",OpenLayers.Function.bindAsEventListener(this.clickOnLabel,this));OpenLayers.Event.observe(this.dataLbl,"dblclick",OpenLayers.Function.bindAsEventListener(this.clickOnLabel,this));this.layersDiv.appendChild(this.dataLbl)}var a=document.createElement("form");a.id="__lrswtchr__"+this.id;a.name=a.id;a.action="javascript:void(null)";a.style.margin="0px";a.style.padding="0px";a.style.border="0px";this.dataLayersDiv=document.createElement("div");this.dataLayersDiv.id=this.id+"_layers_container";this.dataLayersDiv.className="gpGroupDivClass";this.layersDiv.appendChild(a);a.appendChild(this.dataLayersDiv);if(this.outsideViewport){this.dataLayersDiv.style.display="block"}this.div.appendChild(this.layersDiv)},clickOnLabel:function(a){var b=this.dataLayersDiv.style.display=="block";this.showControls(b);this.ignoreEvent(a)},ignoreEvent:function(a){if(a!=null){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)}},removeLayer:function(b){if(b.layer){for(var d=this.layerStates.length-1;d>=0;d--){if(this.layerStates[d].id==b.layer.id){for(var a in this.cntrlKeys){var f=this.map.getControl(a+"_"+b.layer.id);if(f){f.deactivate();f.destroy()}}break}}}this.redraw()},changeLang:function(a){if(this.dataLbl){this.dataLbl.innerHTML=OpenLayers.i18n(this.displayClass+".label")}this.redraw({forceDraw:true})},CLASS_NAME:"Geoportal.Control.LayerSwitcher"});Geoportal.Control.LayerSwitcher.CNTRLKEYS={loading:"",basic:"",edit:""};Geoportal.Control.LayerSwitcher.LAYER_LABEL_MAXLENGTH=18;Geoportal.Control.LayerSwitcher.LAYER_LABEL_REPLACEMENT_INDEX=14;Geoportal.Control.LayerSwitcher.LAYER_LABEL_SUFFIX_REPLACEMENT="...";Geoportal.Control.MeasureToolbar=OpenLayers.Class(Geoportal.Control.Panel,{targetElement:null,initialize:function(a){if(!a){a={}}Geoportal.Control.Panel.prototype.initialize.apply(this,[a]);var b=a.style||(new OpenLayers.Style(null,Geoportal.Control.MeasureToolbar.DEFAULTSTYLE)).clone();if(!a){a={}}this.lastMeasurement=null;this.addControls([new OpenLayers.Control.Measure(OpenLayers.Handler.Path,OpenLayers.Util.extend({handlerOptions:{style:"default",layerOptions:{styleMap:new OpenLayers.StyleMap({"default":b})},persist:true},type:OpenLayers.Control.TYPE_TOGGLE,title:"olControlMeasurePath.title",displayClass:"olControlMeasurePath",targetElement:this.targetElement},a.pathOptions)),new OpenLayers.Control.Measure(OpenLayers.Handler.Polygon,OpenLayers.Util.extend({handlerOptions:{style:"default",layerOptions:{styleMap:new OpenLayers.StyleMap({"default":b})},persist:true},type:OpenLayers.Control.TYPE_TOGGLE,title:"olControlMeasurePolygon.title",displayClass:"olControlMeasurePolygon",targetElement:this.targetElement},a.polygonOptions)),new Geoportal.Control.Measure.Azimuth(Geoportal.Handler.LengthRestrictedPath,OpenLayers.Util.extend({handlerOptions:{style:"default",layerOptions:{styleMap:new OpenLayers.StyleMap({"default":b})},persist:true},type:OpenLayers.Control.TYPE_TOGGLE,title:"gpControlMeasureAzimuth.title",displayClass:"gpControlMeasureAzimuth"},a.azimuthOptions))])},destroy:function(){this.lastMeasurement=null;Geoportal.Control.Panel.prototype.destroy.apply(this,arguments)},activate:function(){if(Geoportal.Control.Panel.prototype.activate.apply(this,arguments)){for(var b=0,a=this.controls.length;b<a;b++){var d=this.controls[b];if(d.events){d.events.on({measure:OpenLayers.Function.bind(this.handleMeasurements,this),measurepartial:OpenLayers.Function.bind(this.handleMeasurements,this)});d.events.register("activate",d,this.onActivate);d.events.register("deactivate",d,this.onDeactivate)}}return true}else{return false}},deactivate:function(){if(Geoportal.Control.Panel.prototype.deactivate.apply(this,arguments)){for(var b=0,a=this.controls.length;b<a;b++){var d=this.controls[b];if(d.events){d.events.un({measure:OpenLayers.Function.bind(this.handleMeasurements,this),measurepartial:OpenLayers.Function.bind(this.handleMeasurements,this)});d.events.unregister("activate",d,this.onActivate);d.events.unregister("deactivate",d,this.onDeactivate)}}return true}else{return false}},onActivate:function(a){if(!this.active){return}if(!a){return}if(this.map){var d=this.map.getProjection();if(this instanceof Geoportal.Control.Measure.Azimuth||d&&d.getProjName()=="longlat"){this.displaySystem="geographic"}else{var b=this.displaySystemUnits.metric;if(b){this.displaySystem="metric"}}}if(this.targetElement){this.targetElement.style.display="block";this.targetElement.innerHTML=OpenLayers.i18n("waiting.measurement")}},onDeactivate:function(a){if(this.active){return}if(!a){return}if(this.targetElement){this.targetElement.style.display="none"}},draw:function(){return Geoportal.Control.Panel.prototype.draw.apply(this,arguments)},handleMeasurements:function(b){if(!b){return}if(typeof(b.object.handleMeasurements)=="function"){this.lastMeasurement=b.object.handleMeasurements(b)}else{var d=(b.object.targetElement&&b.object.targetElement.style.display!="none"?b.object.targetElement:(this.targetElement&&this.targetElement.style.display!="none"?this.targetElement:null));var f=(!(0<=b.order&&b.order<(b.object.measurementLabels||Geoportal.Control.MeasureToolbar.LABELS).length)||b.measure===0?"wait":(d?"targetElement":"default"));var a=(f=="wait"?0:b.order);this.lastMeasurement={order:a,measure:b.measure,unit:b.units,key:f,label:(b.object.measurementLabels||Geoportal.Control.MeasureToolbar.LABELS)[a],targetFormat:(b.object.targetFormat||Geoportal.Control.MeasureToolbar.TARGETFORMAT)[f],targetElement:d,accuracy:(b.object.accuracies||Geoportal.Control.MeasureToolbar.ACCURACIES)[b.units]||"",dimension:(a==2?(d?"<sup>2</sup>":"^2"):"")}}this.printResult(this.lastMeasurement)},printResult:function(a){if(!a){a=[{order:0,measure:0,unit:"",key:"wait",label:Geoportal.Control.MeasureToolbar.LABELS[0],targetFormat:Geoportal.Control.MeasureToolbar.TARGETFORMAT.wait,targetElement:this.targetElement,accuracy:0,dimension:""}]}if(!(a instanceof Array)){a=[a]}for(var d=0,b=a.length;d<b;d++){var g=(a[d].key==="wait"?OpenLayers.i18n("waiting.measurement"):OpenLayers.i18n(a[d].label));var f=(a[d].key==="wait"?"":OpenLayers.String.sprintf(a[d].targetFormat.measure,a[d].accuracy,a[d].measure,OpenLayers.i18n(a[d].unit),a[d].dimension));if(a[d].targetElement){if(a[d].targetElement.type=="text"){a[d].targetElement.value=f||g}else{a[d].targetElement.innerHTML=OpenLayers.String.sprintf(a[d].targetFormat.result,g,f)}}else{OpenLayers.Console.info(OpenLayers.String.sprintf(a[d].targetFormat.result,g,f))}}},changeLang:function(a){if(this.title){this.div.title=OpenLayers.i18n(this.title)}this.printResult(this.lastMeasurement);Geoportal.Control.Panel.prototype.changeLang.apply(this,arguments)},CLASS_NAME:"Geoportal.Control.MeasureToolbar"});Geoportal.Control.MeasureToolbar.LABELS=["waiting.measurement","length.measurement","area.measurement","azimuth.measurement"];Geoportal.Control.MeasureToolbar.ACCURACIES={dd:6,rad:8,gon:6,mi:3,ft:2,"in":1,km:3,m:0};Geoportal.Control.MeasureToolbar.TARGETFORMAT={targetElement:{measure:"%.*f %s%s",result:"%s :<br/>%s"},wait:{measure:"",result:"%s"},"default":{measure:"%.*f %s%s",result:"%s : %s"}};Geoportal.Control.MeasureToolbar.DEFAULTSTYLE=new OpenLayers.Style(null,{rules:[new OpenLayers.Rule({symbolizer:{Point:{fillColor:"#99CCFF",fillOpacity:1,strokeColor:"#99CCFF",strokeWidth:2,strokeOpacity:1,pointRadius:6,graphicName:"cross",cursor:"crosshair"},Line:{fillColor:"#99CCFF",strokeColor:"#99CCFF",strokeWidth:2,strokeOpacity:1,strokeDashstyle:"dot"},Polygon:{fillColor:"#99CCFF",fillOpacity:0.25,strokeColor:"#99CCFF",strokeWidth:2,strokeOpacity:1,strokeDashstyle:"dot"}}})]});Geoportal.Format.XLS.v1_0=OpenLayers.Class(Geoportal.Format.XLS.v1_1,{VERSION:"1.0",initialize:function(a){Geoportal.Format.XLS.v1_1.prototype.initialize.apply(this,[a])},CLASS_NAME:"Geoportal.Format.XLS.v1_0"});Geoportal.OLS.LUS.GeocodeResponseList=OpenLayers.Class(Geoportal.OLS.LUS,{numberOfGeocodedAddresses:null,geocodedAddresses:null,initialize:function(a){this.numberOfGeocodedAddresses=0;this.geocodedAddresses=[];Geoportal.OLS.LUS.prototype.initialize.apply(this,arguments)},destroy:function(){this.numberOfGeocodedAddresses=null;if(this.geocodedAddresses){for(var b=0,a=this.geocodedAddresses.length;b<a;b++){this.geocodedAddresses[b].destroy();this.geocodedAddresses[b]=null}this.geocodedAddresses=null}Geoportal.OLS.LUS.prototype.destroy.apply(this,arguments)},addGeocodedAddress:function(a){if(!this.geocodedAddresses){this.geocodedAddresses=[]}if(a){this.geocodedAddresses.push(a)}},getNbGeocodedAddresses:function(){return this.geocodedAddresses?this.geocodedAddresses.length:0},getGeocodedAddresses:function(){return this.geocodedAddresses?this.geocodedAddresses:null},CLASS_NAME:"Geoportal.OLS.LUS.GeocodeResponseList"});Geoportal.OLS.LUS.ReverseGeocodedLocation=OpenLayers.Class(Geoportal.OLS.LUS,{address:null,measure:null,lonlat:null,initialize:function(b,a,d){this.address=b;this.measure=null;this.lonlat=a;Geoportal.OLS.LUS.prototype.initialize.apply(this,[d])},destroy:function(){if(this.address){this.address.destroy();this.address=null}if(this.measure){this.measure.destroy();this.measure=null}this.lonlat=null;Geoportal.OLS.LUS.prototype.destroy.apply(this,arguments)},CLASS_NAME:"Geoportal.OLS.LUS.ReverseGeocodedLocation"});Geoportal.OLS.QualityOfPosition=OpenLayers.Class({responseReq:null,responseTimer:null,hAccuracy:null,vAccuracy:null,initialize:function(a){this.responseReq=null;this.responseTimer=null;this.hAccuracy=null;this.vAccuracy=null;Geoportal.OLS.prototype.initialize.apply(this,arguments)},destroy:function(){this.responseReq=null;this.responseTimer=null;if(this.hAccuracy){this.hAccuracy.destroy();this.hAccuracy=null}if(this.vAccuracy){this.vAccuracy.destroy();this.vAccuracy=null}Geoportal.OLS.prototype.destroy.apply(this,arguments)},CLASS_NAME:"Geoportal.OLS.QualityOfPosition"});Geoportal.OLS.LUS.GeocodeResponse=OpenLayers.Class(Geoportal.OLS.LUS,Geoportal.OLS.AbstractResponseParameters,{geocodeResponses:null,initialize:function(a){this.geocodeResponses=[];Geoportal.OLS.AbstractResponseParameters.prototype.initialize.apply(this,arguments)},destroy:function(){if(this.geocodeResponses){for(var b=0,a=this.geocodeResponses.length;b<a;b++){this.geocodeResponses[b].destroy();this.geocodeResponses[b]=null}this.geocodeResponses=null}Geoportal.OLS.AbstractResponseParameters.prototype.destroy.apply(this,arguments)},addGeocodeResponseList:function(a){if(!this.geocodeResponses){this.geocodeResponses=[]}if(a){this.geocodeResponses.push(a)}},getNbGeocodeResponseList:function(){return this.geocodeResponses?this.geocodeResponses.length:0},getGeocodeResponseList:function(){return this.geocodeResponses?this.geocodeResponses:null},CLASS_NAME:"Geoportal.OLS.LUS.GeocodeResponse"});Geoportal.OLS.LUS.ReverseGeocodeResponse=OpenLayers.Class(Geoportal.OLS.LUS,Geoportal.OLS.AbstractResponseParameters,{reverseGeocodedLocations:null,initialize:function(a){this.reverseGeocodedLocations=[];Geoportal.OLS.AbstractResponseParameters.prototype.initialize.apply(this,arguments)},destroy:function(){if(this.reverseGeocodedLocations){for(var b=0,a=this.reverseGeocodedLocations.length;b<a;b++){this.reverseGeocodedLocations[b].destroy();this.reverseGeocodedLocations[b]=null}this.reverseGeocodedLocations=null}Geoportal.OLS.AbstractResponseParameters.prototype.destroy.apply(this,arguments)},addReverseGeocodedLocations:function(a){if(!this.reverseGeocodedLocations){this.reverseGeocodedLocations=[]}if(a){this.reverseGeocodedLocations.push(a)}},getNbReverseGeocodedLocations:function(){return this.reverseGeocodedLocations?this.reverseGeocodedLocations.length:0},getReverseGeocodedLocations:function(){return this.reverseGeocodedLocations?this.reverseGeocodedLocations:null},CLASS_NAME:"Geoportal.OLS.LUS.ReverseGeocodeResponse"});Geoportal.OLS.Position=OpenLayers.Class(Geoportal.OLS.AbstractPosition,{levelOfConf:null,lonlat:null,_aoi:null,qop:null,time:null,speed:null,direction:null,initialize:function(a,b){this.levelOfConf=null;this.lonlat=a;this._aoi=null;this.qop=null;this.time=null;this.speed=null;this.direction=null;Geoportal.OLS.AbstractPosition.prototype.initialize.apply(this,[b])},destroy:function(){this.levelOfConf=null;this.lonlat=null;this._aoi=null;if(this.qop){this.qop.destroy();this.qop=null}if(this.time){this.time.destroy();this.time=null}if(this.speed){this.speed.destroy();this.speed=null}if(this.direction){this.direction.destroy();this.direction=null}Geoportal.OLS.AbstractPosition.prototype.destroy.apply(this,arguments)},toString:function(){var a="";a+=this.lonlat.toString();return a},CLASS_NAME:"Geoportal.OLS.Position"});Geoportal.OLS.LUS.ReverseGeocodeRequest=OpenLayers.Class(Geoportal.OLS.LUS,Geoportal.OLS.AbstractRequestParameters,{position:null,preferences:null,initialize:function(a,b){this.position=a;this.preferences=[];Geoportal.OLS.AbstractRequestParameters.prototype.initialize.apply(this,[b])},destroy:function(){if(this.position){this.position.destroy();this.position=null}if(this.preferences){for(var b=0,a=this.preferences.length;b<a;b++){this.preferences[b].destroy();this.preferences[b]=null}this.preferences=null}Geoportal.OLS.AbstractRequestParameters.prototype.destroy.apply(this,arguments)},addPreference:function(a){if(!this.preferences){this.preferences=[]}if(a){this.preferences.push(a)}},getNbPreferences:function(){return this.preferences?this.preferences.length:0},getPreferences:function(){return this.preferences?this.preferences:null},CLASS_NAME:"Geoportal.OLS.LUS.ReverseGeocodeRequest"});Geoportal.Format.XLS.v1_1.LocationUtilityService=OpenLayers.Class(Geoportal.Format.XLS.v1_1,{CORESERVICE:"LocationUtilityService",schemaLocation:"http://schemas.opengis.net/ols/1.1.0/LocationUtilityService.xsd",initialize:function(a){Geoportal.Format.XLS.v1_1.prototype.initialize.apply(this,[a]);this._addReaders();this._addWriters()},_addReaders:function(){this.readers.xls=OpenLayers.Util.applyDefaults(this.readers.xls,{GeocodeResponse:function(b,d){var a=new Geoportal.OLS.LUS.GeocodeResponse();d.setResponseParameters(a);this.readChildNodes(b,a)},ReverseGeocodeResponse:function(a,d){var b=new Geoportal.OLS.LUS.ReverseGeocodeResponse();d.setResponseParameters(b);this.readChildNodes(a,b)},GeocodeResponseList:function(d,b){var a=new Geoportal.OLS.LUS.GeocodeResponseList();a.numberOfGeocodedAddresses=parseInt(d.getAttribute("numberOfGeocodedAddresses"));if(isNaN(a.numberOfGeocodedAddresses)){a.numberOfGeocodedAddresses=0}if(isNaN(a.numberOfGeocodedAddresses)){a.numberOfGeocodedAddresses=1}b.addGeocodeResponseList(a);this.readChildNodes(d,a)},ReverseGeocodedLocation:function(a,d){var b=new Geoportal.OLS.LUS.ReverseGeocodedLocation();d.addReverseGeocodedLocations(b);this.readChildNodes(a,b)},GeocodedAddress:function(b,d){var a=new Geoportal.OLS.LUS.GeocodedAddress();d.addGeocodedAddress(a);this.readChildNodes(b,a)},SearchCentreDistance:function(b,d){var a=parseFloat(b.getAttribute("value"));if(isNaN(a)){a=0}var f=new Geoportal.OLS.LUS.SearchCentreDistance(a);f.accuracy=parseFloat(b.getAttribute("accuracy"));if(isNaN(f.accuracy)){f.accuracy=null}f.uom=b.getAttribute("uom");d.measure=f},GeocodeRequest:function(d,a){var b=new Geoportal.OLS.LUS.GeocodeRequest();a.setRequestParameters(b);this.readChildNodes(d,b)},ReverseGeocodeRequest:function(b,a){var d=new Geoportal.OLS.LUS.ReverseGeocodeRequest();a.setRequestParameters(d);this.readChildNodes(b,d)},ReverseGeocodePreference:function(b,d){var a=new Geoportal.OLS.LUS.ReverseGeocodePreference();a.value=b.childNodes.length>0?b.childNodes[0].nodeValue||"StreetAddress":"StreetAddress";d.addPreference(a)}})},_addWriters:function(){this.writers.xls=OpenLayers.Util.applyDefaults(this.writers.xls,{GeocodeResponse:function(b){var f=this.createElementNSPlus("xls:GeocodeResponse");for(var d=0,a=b.getNbGeocodeResponseList();d<a;d++){this.writeNode(f,"xls:GeocodeResponseList",b.getGeocodeResponseList()[d])}return f},ReverseGeocodeResponse:function(f){var d=this.createElementNSPlus("xls:ReverseGeocodeResponse");for(var b=0,a=f.getNbReverseGeocodedLocations();b<a;b++){this.writeNode(d,"xls:ReverseGeocodedLocation",f.getReverseGeocodedLocations()[b])}return d},GeocodeResponseList:function(d){var f=this.createElementNSPlus("xls:GeocodeResponseList",{attributes:{numberOfGeocodedAddresses:d.getNbGeocodedAddresses()}});for(var b=0,a=d.getNbGeocodedAddresses();b<a;b++){this.writeNode(f,"xls:GeocodedAddress",d.getGeocodedAddresses()[b])}return f},ReverseGeocodedLocation:function(a){var b=this.createElementNSPlus("xls:ReverseGeocodedLocation");this.writeNode(b,"gml:Point",a.lonlat);if(a.address){this.writeNode(b,"xls:Address",a.address)}if(a.searchCentreDistance){this.writeNode(b,"xls:SearchCentreDistance",a.searchCentreDistance)}return b},GeocodedAddress:function(b){var a=this.createElementNSPlus("xls:GeocodedAddress");this.writeNode(a,"gml:Point",b.lonlat);if(b.address){this.writeNode(a,"xls:Address",b.address)}if(b.geocodeMatchCode){this.writeNode(a,"xls:GeocodeMatchCode",b.geocodeMatchCode)}return a},SearchCentreDistance:function(a){var d={attributes:{value:a.value}};if(typeof(a.accuracy)=="number"&&!isNan(a.accuracy)){OpenLayers.Util.extend(d.attributes,{accuracy:a.accuracy})}if(a.uom!=null){OpenLayers.Util.extend(d.attributes,{uom:a.uom})}var b=this.createElementNSPlus("xls:SearchCentreDistance");return b},GeocodeRequest:function(b){var f=this.createElementNSPlus("xls:GeocodeRequest");for(var d=0,a=b.getNbAddresses();d<a;d++){this.writeNode(f,"xls:Address",b.getAddresses()[d])}return f},ReverseGeocodeRequest:function(f){var d=this.createElementNSPlus("xls:ReverseGeocodeRequest");if(f.position){this.writeNode(d,"xls:Position",f.position)}var a=f.getNbPreferences();if(a>0){for(var b=0;b<a;b++){this.writeNode(d,"xls:ReverseGeocodePreference",f.getPreferences()[b])}}return d},ReverseGeocodePreference:function(a){var b=this.createElementNSPlus("xls:ReverseGeocodePreference",{value:a.value});return b}})},CLASS_NAME:"Geoportal.Format.XLS.v1_1.LocationUtilityService"});Geoportal.Format.XLS.v1_0.LocationUtilityService=OpenLayers.Class(Geoportal.Format.XLS.v1_1.LocationUtilityService,{initialize:function(a){Geoportal.Format.XLS.v1_0.prototype.initialize.apply(this,[a]);this._addReaders();this._addWriters()},CLASS_NAME:"Geoportal.Format.XLS.v1_0.LocationUtilityService"});Geoportal.Layer.OpenLS=OpenLayers.Class(OpenLayers.Layer.Vector,{displayInLayerSwitcher:false,postOptions:null,version:"1.1",format:null,formatOptions:null,ols:null,initialize:function(b,a){OpenLayers.Layer.Vector.prototype.initialize.apply(this,[b,a]);this.postOptions=OpenLayers.Util.applyDefaults(this.postOptions,{url:"http://localhost/",async:true,headers:{"Content-Type":"text/xml; charset:UTF-8"},callback:function(){},success:this.success,failure:this.failure,scope:this});this.formatOptions=OpenLayers.Util.applyDefaults(this.formatOptions,{version:this.version,externalProjection:new OpenLayers.Projection("EPSG:4326",{domainOfValidity:new OpenLayers.Bounds(-180,-90,180,90)})});this.version=this.formatOptions.version},destroy:function(){if(this.format){if(typeof(this.format)=="object"){this.format.destroy()}this.format=null}this.formatOptions=null;this.postOptions=null;if(this.ols){this.ols.destroy();this.ols=null}OpenLayers.Layer.Vector.prototype.destroy.apply(this,arguments)},setMap:function(a){OpenLayers.Layer.Vector.prototype.setMap.apply(this,arguments);if(a&&a.getProjection()){if(!this.formatOptions.internalProjection){this.formatOptions.internalProjection=a.getProjection().clone()}}if(!this.format){this.format=Geoportal.Format.XLS}if(typeof(this.format)=="function"){this.format=new this.format(this.formatOptions)}},success:function(b){if(this.ols){this.ols.destroy();this.ols=null}if(!b){return}var d=b.responseXML;if(!d||!d.documentElement){d=b.responseText}this.ols=this.format.read(d);if(!this.ols){return}var a=this.ols?this.ols.getErrors():null;if(a){this.ols.destroy();this.ols=null;return}if(this.ols.getNbBodies()<=0){this.ols.destroy();this.ols=null;return}},failure:function(a){if(this.ols){this.ols.destroy();this.ols=null}},CLASS_NAME:"Geoportal.Layer.OpenLS"});Geoportal.Layer.OpenLS.Core=OpenLayers.Class(Geoportal.Layer.OpenLS,{clientName:null,clientPassword:null,MSID:null,maximumResponses:50,initialize:function(b,a){Geoportal.Layer.OpenLS.prototype.initialize.apply(this,[b,a])},destroy:function(){this.clientName=null;this.clientPassword=null;this.MSID=null;Geoportal.Layer.OpenLS.prototype.destroy.apply(this,arguments)},CLASS_NAME:"Geoportal.Layer.OpenLS.Core"});Geoportal.Layer.OpenLS.Core.LocationUtilityService=OpenLayers.Class(Geoportal.Layer.OpenLS.Core,{queriedAddresses:null,initialize:function(d,b){Geoportal.Layer.OpenLS.Core.prototype.initialize.apply(this,[d,b]);this.formatOptions.coreService="LocationUtilityService";this.queriedAddresses=[];this.reportError=false;if(!this.style||!b||!(b.style||b.styleMap)){var a=Geoportal.Util.getImagesLocation()+"xy-target.gif";this.styleMap.styles["default"].defaultStyle=OpenLayers.Util.applyDefaults({externalGraphic:a,graphicOpacity:1,pointRadius:8},this.styleMap.styles["default"].defaultStyle);this.styleMap.styles.select.defaultStyle=OpenLayers.Util.applyDefaults({externalGraphic:a,graphicOpacity:1,pointRadius:15},this.styleMap.styles.select.defaultStyle);this.styleMap.styles.temporary.defaultStyle=OpenLayers.Util.applyDefaults({externalGraphic:a,graphicOpacity:1,pointRadius:8},this.styleMap.styles.temporary.defaultStyle)}if(!b||!b.onFeatureInsert){this.onFeatureInsert=this.createPopupForAddress}this.selectCntrl=new OpenLayers.Control.SelectFeature(this,{onSelect:Geoportal.Control.selectFeature,onUnselect:Geoportal.Control.unselectFeature,hover:true})},destroy:function(){this.cleanQueries();this.selectCntrl=null;Geoportal.Layer.OpenLS.Core.prototype.destroy.apply(this,arguments)},setMap:function(f){if(f){Geoportal.Layer.OpenLS.prototype.setMap.apply(this,arguments);if(this.selectCntrl){f.addControl(this.selectCntrl)}if(f.apiKey&&f.catalogue){var b;for(var d=0,a=f.apiKey.length;d<a;d++){b=f.apiKey[d];if(f.catalogue[b].layers[this.name]){this.GeoRM=this.options.GeoRM=Geoportal.GeoRMHandler.addKey(b,f.catalogue[b].tokenServer.url,f.catalogue[b].tokenServer.ttl,f,{transport:f.catalogue[b].transport,eventListeners:{tokenloaded:this.onTokenLoaded,scope:this}});break}}}}},onTokenLoaded:function(a){if(this.wait!=null&&typeof(this.wait)=="object"){this.wait.clbk.apply(this,this.wait.args);this.wait=null}return true},GEOCODE:function(f,r){if(!(f instanceof Array)){f=[f]}if(this.GeoRM){if(!this.GeoRM.getToken(this,arguments)){var m=[];for(var g=0,b=f.length;g<b;g++){m.push(f[g].clone())}this.wait={clbk:Geoportal.Layer.OpenLS.Core.LocationUtilityService.prototype.GEOCODE,args:[m,OpenLayers.Util.extend({},r)]};return}}var d=new Geoportal.OLS.LUS.GeocodeRequest();if(!this.queriedAddresses){this.queriedAddresses=[]}for(var g=0,p=f.length;g<p;g++){this.queriedAddresses[g]={hash:f[g].toString(),features:null};d.addAddress(f[g].clone())}var o=new Geoportal.OLS.XLS({version:this.format.version,_header:new Geoportal.OLS.RequestHeader({sessionID:""})});o.addBody(new Geoportal.OLS.Request("GeocodeRequest",this.format.version,"",{maximumResponses:this.maximumResponses,_requestParameters:d}));var a=this.format.write(o);var j=OpenLayers.Format.XML.prototype.write.apply(this.format,[a]);a=null;o.destroy();o=null;d=null;var q=OpenLayers.Util.applyDefaults(r,this.postOptions);if(this.GeoRM){q.url=this.map.catalogue[this.GeoRM.GeoRMKey].layers[this.name].url;q.params=this.GeoRM.token}if(q.onSuccess&&q.scopeOn){this.options.onSuccess=q.onSuccess;this.options.scopeOn=q.scopeOn;q.success=function(l){this.postOptions.scope.GcSuccess.apply(this.postOptions.scope,[l]);if(this.options.scopeOn&&this.options.onSuccess){this.options.onSuccess.apply(this.options.scopeOn,[l])}}}else{q.success=function(l){this.postOptions.scope.GcSuccess.apply(this.postOptions.scope,[l])}}if(q.onFailure&&q.scopeOn){this.options.onFailure=q.onFailure;this.options.scopeOn=q.scopeOn;q.failure=function(l){this.postOptions.scope.LUSFailure.apply(this.postOptions.scope,[l]);if(this.options.scopeOn&&this.options.onFailure){this.options.onFailure.apply(this.options.scopeOn,[l])}}}else{q.failure=function(l){this.postOptions.scope.LUSFailure.apply(this.postOptions.scope,[l])}}var h=OpenLayers.Request.POST(OpenLayers.Util.applyDefaults({data:j},q));j=null;q=null},REVERSE_GEOCODE:function(p,q){if(this.GeoRM){if(!this.GeoRM.getToken(this,arguments)){var j=[];for(var f=0,b=adr.length;f<b;f++){j.push(adr[f].clone())}this.wait={clbk:Geoportal.Layer.OpenLS.Core.LocationUtilityService.prototype.GEOCODE,args:[j,OpenLayers.Util.extend({},q)]};return}}var d=new Geoportal.OLS.LUS.ReverseGeocodeRequest(p);d.addPreference(new Geoportal.OLS.LUS.ReverseGeocodePreference("StreetAddress"));if(!this.queriedAddresses){this.queriedAddresses=[]}this.queriedAddresses[0]={hash:p.toString(),features:null};var m=new Geoportal.OLS.XLS({version:this.format.version,_header:new Geoportal.OLS.RequestHeader({sessionID:""})});m.addBody(new Geoportal.OLS.Request("ReverseGeocodeRequest",this.format.version,"",{maximumResponses:this.maximumResponses,_requestParameters:d}));var a=this.format.write(m);var h=OpenLayers.Format.XML.prototype.write.apply(this.format,[a]);a=null;m.destroy();m=null;d=null;var o=OpenLayers.Util.applyDefaults(q,this.postOptions);if(this.GeoRM){o.url=this.map.catalogue[this.GeoRM.GeoRMKey].layers[this.name].url;o.params=this.GeoRM.token}if(o.onSuccess&&o.scopeOn){this.options.onSuccess=o.onSuccess;this.options.scopeOn=o.scopeOn;o.success=function(l){this.postOptions.scope.RvGcSuccess.apply(this.postOptions.scope,[l]);if(this.options.scopeOn&&this.options.onSuccess){this.options.onSuccess.apply(this.options.scopeOn,[l])}}}else{o.success=function(l){this.postOptions.scope.RvGcSuccess.apply(this.postOptions.scope,[l])}}if(o.onFailure&&o.scopeOn){this.options.onFailure=o.onSuccess;this.options.scopeOn=o.scopeOn;o.failure=function(l){this.postOptions.scope.LUSFailure.apply(this.postOptions.scope,[l]);if(this.options.scopeOn&&this.options.onFailure){this.options.onFailure.apply(this.options.scopeOn,[l])}}}else{o.failure=function(l){this.postOptions.scope.LUSFailure.apply(this.postOptions.scope,[l])}}var g=OpenLayers.Request.POST(OpenLayers.Util.applyDefaults({data:h},o));h=null;o=null},GcSuccess:function(f){Geoportal.Layer.OpenLS.prototype.success.apply(this,arguments);if(!this.ols){this.queriedAddresses=null;return}var m=this.ols.getBodies()[0];if(!m){this.queriedAddresses=null}else{var l=m.getResponseParameters();if(!l||l.getNbGeocodeResponseList()<=0){this.queriedAddresses=null}else{for(var h=0,d=l.getNbGeocodeResponseList();h<d;h++){var a=l.getGeocodeResponseList()[h];if(!a||a.getNbGeocodedAddresses()<=0){this.queriedAddresses=null}else{for(var g=0,o=a.getNbGeocodedAddresses();g<o;g++){var p=a.getGeocodedAddresses()[g];if(!p||!p.address||!(p.address.name||p.address.streetAddress)){continue}var q=new OpenLayers.Feature.Vector(p.lonlat,{address:p.address.clone(),geocodeMatchCode:p.geocodeMatchCode.clone()},null);if(!this.queriedAddresses[h].features){this.queriedAddresses[h].features=[]}this.queriedAddresses[h].features.push(q)}}}}}this.ols.destroy();this.ols=null},RvGcSuccess:function(l){Geoportal.Layer.OpenLS.prototype.success.apply(this,arguments);if(!this.ols){this.queriedAddresses=null;return}var a=this.ols.getBodies()[0];if(!a){this.queriedAddresses=null}else{var j=a.getResponseParameters();if(!j||j.getNbReverseGeocodedLocations()<=0){this.queriedAddresses=null}else{for(var h=0,g=j.getNbReverseGeocodedLocations();h<g;h++){var f=j.getReverseGeocodedLocations()[h];if(!f||!f.lonlat||!f.address){continue}var d=new OpenLayers.Feature.Vector(f.lonlat,{address:f.address.clone(),measure:(f.measure?f.measure.clone():null)},null);if(!this.queriedAddresses[0].features){this.queriedAddresses[0].features=[]}this.queriedAddresses[0].features.push(d)}}}this.ols.destroy();this.ols=null},LUSFailure:function(a){OpenLayers.Console.warn(a.status+" : "+a.statusText);this.queriedAddresses=null},createPopupForAddress:function(b){var a=function(){var f='<div class="gpPopupBody">';var g=b.attributes.address;f+=g.toHTMLString();f+="</div>";var d=new Geoportal.Popup.Anchored("chicken",this.geometry.getBounds().getCenterLonLat(),new OpenLayers.Size(80,40),f,null,false,"#ffffff",0.75,null,b);this.popup=d};b.createPopup=OpenLayers.Function.bind(a,b)},cleanQueries:function(){if(this.queriedAddresses){for(var b=0,a=this.queriedAddresses.length;b<a;b++){var d=this.queriedAddresses[b];if(d.features){d.features=null}this.queriedAddresses[b]=null}this.queriedAddresses=null}},CLASS_NAME:"Geoportal.Layer.OpenLS.Core.LocationUtilityService"});Geoportal.Control.LocationUtilityService=OpenLayers.Class(Geoportal.Control.Form,{type:OpenLayers.Control.TYPE_TOGGLE,layer:null,matchTypes:null,drawLocation:true,onSelectAddress:function(a){},initialize:function(b,a){Geoportal.Control.Form.prototype.initialize.apply(this,[a]);this.layer=b},destroy:function(){if(this.map){if(this.layer&&this.layer.map){this.map.removeLayer(this.layer)}this.map=null}if(this.layer){this.layer.destroy();this.layer=null}Geoportal.Control.Form.prototype.destroy.apply(this,arguments)},activate:function(){if(!Geoportal.Control.Form.prototype.activate.apply(this,arguments)){return false}this.layer.selectCntrl.deactivate();this.layer.destroyFeatures();var a=document.createElement("form");a.id="__searchlus__"+this.id;a.name=a.id;a.action="javascript:void(null)";this.loadContent(a);this.map.addControl(this.formControl);this.formControl.activate();this.formControl.addContent(a);if(!this.layer.map){this.map.addLayer(this.layer)}return true},deactivate:function(){this.layer.cleanQueries();return Geoportal.Control.Form.prototype.deactivate.apply(this,arguments)},loadContent:function(a){this.buildButton(a,"cancel",this.closeForm);this.buildButton(a,"search",this.onSearchClick,13);this.wImg=this.buildImageButton(a,"wait",Geoportal.Util.getImagesLocation()+"loading.gif");if(this.wImg){this.wImg.style.display="none"}this.buildResultsField(a)},onSearchClick:function(b,a){if(a||window.event){OpenLayers.Event.stop(a?a:window.event)}var d=OpenLayers.Util.getElement("results"+this.id);d.innerHTML="";d.style.display="none";return false},LUSSuccess:function(b){if(!this.layer.queriedAddresses){this.LUSFailure(b);return false}if(this.wImg){this.wImg.style.display="none"}var a=this.layer.queriedAddresses[0].features;if(!a){return false}var d=OpenLayers.Util.getElement("results"+this.id);d.innerHTML="";d.style.display="";return true},LUSFailure:function(d){if(this.wImg){this.wImg.style.display="none"}var f=OpenLayers.Util.getElement("results"+this.id);f.innerHTML="";var b=document.createElement("div");b.className="gpLUSResult";var a=document.createElement("span");a.innerHTML=OpenLayers.i18n("lus.not.match");b.appendChild(a);f.appendChild(b);f.style.display=""},onResultClick:function(a){if(a||window.event){OpenLayers.Event.stop(a?a:window.event)}if(this.cntrl.map){var b=new OpenLayers.LonLat(this.feature.geometry.x,this.feature.geometry.y);this.cntrl.map.setCenter(b,this.zoom,false,false);b=null;if(this.cntrl.drawLocation){this.cntrl.layer.destroyFeatures();this.cntrl.layer.addFeatures([this.feature.clone()]);this.cntrl.layer.selectCntrl.activate()}}if(!a.ctrlKey){this.cntrl.closeForm()}this.cntrl.onSelectAddress(this.feature)},CLASS_NAME:"Geoportal.Control.LocationUtilityService"});Geoportal.Control.LocationUtilityService.GeoNames=OpenLayers.Class(Geoportal.Control.LocationUtilityService,{setZoom:function(a){return Math.round(this.map.numZoomLevels/2)},initialize:function(b,a){Geoportal.Control.LocationUtilityService.prototype.initialize.apply(this,arguments);this.drawLocation=false},loadContent:function(a){var b=this.buildInputTextField(a,{id:"name",mandatory:true,size:80,length:80,callbacks:[{evt:"click",func:this.onSearchClick}]});Geoportal.Control.LocationUtilityService.prototype.loadContent.apply(this,arguments);Geoportal.Control.Form.focusOn(b)},onSearchClick:function(g,d){Geoportal.Control.LocationUtilityService.prototype.onSearchClick.apply(this,arguments);if(g.id.match(/^name/)&&OpenLayers.String.contains(g.id,this.id)){if(!g.hasFocus){Geoportal.Control.Form.focusOn(g)}return false}if(g.id.match(/^search/)){var b=new Geoportal.OLS.Address("FR");var f=OpenLayers.String.trim(OpenLayers.Util.getElement("name"+this.id).value);if(f==""){return false}b.name=f;if(this.wImg){this.wImg.style.display=""}this.layer.GEOCODE([b],{onSuccess:this.LUSSuccess,onFailure:this.LUSFailure,scopeOn:this});b.destroy();b=null;return false}this.closeForm();return false},LUSSuccess:function(l){if(Geoportal.Control.LocationUtilityService.prototype.LUSSuccess.apply(this,arguments)===false){return false}var d=this.layer.queriedAddresses[0].features;var q=OpenLayers.Util.getElement("results"+this.id);q.style.display="none";for(var o=0,g=d.length;o<g;o++){var p=d[o];var a=document.createElement("div");a.className="gpLUSResult";if((o%2)==1){a.className+="Alternate"}if(p.attributes.geocodeMatchCode){var h=document.createElement("div");h.className="gpGeocodeMatchCode";if(p.attributes.geocodeMatchCode.accuracy<=1){h.className+="Accuracy075to100"}else{if(p.attributes.geocodeMatchCode.accuracy<=0.75){h.className+="Accuracy050to075"}else{if(p.attributes.geocodeMatchCode<=0.5){h.className+="Accuracy025to050"}else{if(p.attributes.geocodeMatchCode<=0.25){h.className+="Accuracy000to025"}}}}var m=document.createElement("img");m.className="gpGeocodeMatchCodeMatchType";m.style.alt="";m.src=Geoportal.Util.getImagesLocation()+"OLSnone.gif";h.appendChild(m);a.appendChild(h)}var w=document.createElement("span");w.style.cursor="pointer";var b={cntrl:this,feature:p};var v=p.attributes.address;var j=v.getNbPlaces()>0?(v.getPlaces()[0]).name||"":"?";var u=v.postalCode?v.postalCode.name||"":"?";w.innerHTML=j+" ["+u+"]";b.zoom=this.setZoom(p);OpenLayers.Event.observe(w,"click",OpenLayers.Function.bindAsEventListener(this.onResultClick,b));a.appendChild(w);q.appendChild(a)}q.style.display=""},CLASS_NAME:"Geoportal.Control.LocationUtilityService.GeoNames"});Geoportal.Control.LocationUtilityService.GeoNames.setZoomForBDNyme=function(d){var b=d.attributes.address;var g=b?b.postalCode?b.postalCode.name||"":"?":"?";var h=16;switch(g){case"Capitale d'état":h=10;break;case"Préfecture de région":h=11;break;case"Préfecture":h=12;break;case"Musée":case"Enceinte militaire":case"Parc de loisirs":case"Parc des expositions":case"Parc zoologique":case"Village de vacances":case"Bois":case"Parc":case"Enseignement supérieur":case"Science":case"Centrale électrique":case"Haras national":case"Zone industrielle":case"Etablissement thermal":case"Espace public":case"Habitation troglodytique":case"Marais salants":case"Golf":case"Hippodrome":case"Stade":case"Aérodrome militaire":case"Aérodrome non militaire":case"Aéroport international":case"Aéroport quelconque":case"Gare routière":case"Gare voyageurs uniquement":case"Gare voyageurs et fret":case"Gare fret uniquement":case"Téléphérique":case"Voie ferrée":case"Sous-préfecture":h=13;break;case"Canton":h=14;break;case"Commune":case"Lieu-dit non habité":h=15;break;default:break}return h};Geoportal.Control.LocationUtilityService.Geocode=OpenLayers.Class(Geoportal.Control.LocationUtilityService,{setZoom:function(a){return this.map.getNumZoomLevels()-5},initialize:function(b,a){Geoportal.Control.LocationUtilityService.prototype.initialize.apply(this,arguments)},loadContent:function(a){var b=this.buildInputTextField(a,{id:"address",mandatory:false,size:80,length:80,callbacks:[{evt:"click",func:this.onSearchClick}]});this.buildInputTextField(a,{id:"municipality",mandatory:true,size:50,length:50,callbacks:[{evt:"click",func:this.onSearchClick}]});this.buildInputTextField(a,{id:"postalcode",size:20,length:20,disabled:false,callbacks:[{evt:"click",func:this.onSearchClick}]});Geoportal.Control.LocationUtilityService.prototype.loadContent.apply(this,arguments);Geoportal.Control.Form.focusOn(b)},onSearchClick:function(h,f){Geoportal.Control.LocationUtilityService.prototype.onSearchClick.apply(this,arguments);if(h.id.match(/^(address|municipality|postalcode)/)&&OpenLayers.String.contains(h.id,this.id)){if(!h.hasFocus){e=OpenLayers.Util.getElement("address"+this.id);if(e&&h.id!=e.id&&e.hasFocus){Geoportal.Control.Form.focusOff(e)}e=OpenLayers.Util.getElement("municipality"+this.id);if(e&&h.id!=e.id&&e.hasFocus){Geoportal.Control.Form.focusOff(e)}e=OpenLayers.Util.getElement("postalcode"+this.id);if(e&&h.id!=e.id&&e.hasFocus){Geoportal.Control.Form.focusOff(e)}Geoportal.Control.Form.focusOn(h)}return false}if(h.id.match(/^search/)){var d=new Geoportal.OLS.Address("FR");var g=OpenLayers.String.trim(OpenLayers.Util.getElement("address"+this.id).value);if(g==""){return false}var j=new Geoportal.OLS.Street();j.name=g;g=OpenLayers.String.trim(OpenLayers.Util.getElement("municipality"+this.id).value);if(g==""){return false}var b=new Geoportal.OLS.StreetAddress();b.addStreet(j);d.streetAddress=b;var l=new Geoportal.OLS.Place({classification:"Municipality",name:g});d.addPlace(l);g=OpenLayers.String.trim(OpenLayers.Util.getElement("postalcode"+this.id).value);d.postalCode=new Geoportal.OLS.PostalCode({name:g});if(this.wImg){this.wImg.style.display=""}this.layer.GEOCODE([d],{onSuccess:this.LUSSuccess,onFailure:this.LUSFailure,scopeOn:this});d.destroy();d=null;return false}this.closeForm();return false},LUSSuccess:function(m){if(Geoportal.Control.LocationUtilityService.prototype.LUSSuccess.apply(this,arguments)===false){return false}var d=this.layer.queriedAddresses[0].features;var v=OpenLayers.Util.getElement("results"+this.id);v.style.display="none";for(var p=0,g=d.length;p<g;p++){var u=d[p];var a=document.createElement("div");a.className="gpLUSResult";if((p%2)==1){a.className+="Alternate"}if(u.attributes.geocodeMatchCode){var h=document.createElement("div");h.className="gpGeocodeMatchCode";if(u.attributes.geocodeMatchCode<=0.25){h.className+="Accuracy000to025"}else{if(u.attributes.geocodeMatchCode<=0.5){h.className+="Accuracy025to050"}else{if(u.attributes.geocodeMatchCode.accuracy<=0.75){h.className+="Accuracy050to075"}else{if(u.attributes.geocodeMatchCode.accuracy<=1){h.className+="Accuracy075to100"}}}}var o=document.createElement("img");o.className="gpGeocodeMatchCodeMatchType";o.style.alt="";o.src=Geoportal.Util.getImagesLocation()+"OLSnone.gif";if(u.attributes.geocodeMatchCode.matchType){o.style.alt=u.attributes.geocodeMatchCode.matchType;if(this.matchTypes){for(var l=0,q=this.matchTypes.length;l<q;l++){if(!this.matchTypes[l].re||u.attributes.geocodeMatchCode.matchType.match(this.matchTypes[l].re)){o.src=this.matchTypes[l].src;break}}}}h.appendChild(o);a.appendChild(h)}var z=document.createElement("span");z.style.cursor="pointer";var b={cntrl:this,feature:u};var w=u.attributes.address;z.innerHTML=w.toString();b.zoom=this.setZoom(u);OpenLayers.Event.observe(z,"click",OpenLayers.Function.bindAsEventListener(this.onResultClick,b));a.appendChild(z);v.appendChild(a)}v.style.display="";return true},CLASS_NAME:"Geoportal.Control.LocationUtilityService.Geocode"});Geoportal.Control.LocationUtilityService.ReverseGeocode=OpenLayers.Class(Geoportal.Control.LocationUtilityService,{rvgcvl:null,accuracy:1000000,initialize:function(b,a){Geoportal.Control.LocationUtilityService.prototype.initialize.apply(this,arguments)},activate:function(){Geoportal.Control.LocationUtilityService.prototype.activate.apply(this,arguments);if(this.rvgcvl){var f=OpenLayers.Util.getElement("longitude"+this.id);var b=OpenLayers.Util.getElement("latitude"+this.id);OpenLayers.Event.observe(f,"change",OpenLayers.Function.bind(this.updateLocation,this,f,b));OpenLayers.Event.observe(b,"change",OpenLayers.Function.bind(this.updateLocation,this,f,b));var d=new OpenLayers.Geometry.Point(this.map.getCenter().lon,this.map.getCenter().lat);var a=new OpenLayers.Feature.Vector(d);this.rvgcvl.addFeatures([a]);this.rvgcvl.slctCntrl.activate()}return true},deactivate:function(){if(this.rvgcvl){var a=this.rvgcvl.slctCntrl;a.deactivate();this.map.removeControl(a);this.rvgcvl.slctCntrl=null;a=this.rvgcvl.dragCntrl;a.deactivate();this.map.removeControl(a);this.rvgcvl.dragCntrl=null;this.rvgcvl.destroyFeatures();this.map.removeLayer(this.rvgcvl);this.rvgcvl=null}return Geoportal.Control.LocationUtilityService.prototype.deactivate.apply(this,arguments)},loadContent:function(f){var g=new OpenLayers.Geometry.Point(this.map.getCenter().lon,this.map.getCenter().lat);g.transform(this.map.getProjection(),OpenLayers.Projection.CRS84);this.buildInputTextField(f,{id:"longitude",mandatory:true,size:12,length:12,callbacks:[{evt:"click",func:this.onSearchClick}],value:g.x});this.buildInputTextField(f,{id:"latitude",mandatory:true,size:12,length:12,callbacks:[{evt:"click",func:this.onSearchClick}],value:g.y});var b=Geoportal.Util.getImagesLocation()+"xy-target.gif";this.rvgcvl=new OpenLayers.Layer.Vector("__rvgc_LL__",{projection:this.map.getProjection(),styleMap:new OpenLayers.StyleMap({"default":new OpenLayers.Style(OpenLayers.Util.applyDefaults({externalGraphic:b,graphicOpacity:1,pointRadius:8},OpenLayers.Feature.Vector.style["default"])),select:new OpenLayers.Style(OpenLayers.Util.applyDefaults({externalGraphic:b,graphicOpacity:1,pointRadius:15},OpenLayers.Feature.Vector.style.select)),temporary:new OpenLayers.Style(OpenLayers.Util.applyDefaults({externalGraphic:b,graphicOpacity:1,pointRadius:8},OpenLayers.Feature.Vector.style.temporary))}),eventListeners:{beforefeaturesadded:function(){this.destroyFeatures();return true},featureadded:function(h){h.feature.state=OpenLayers.State.INSERT;return true}},displayInLayerSwitcher:false});this.map.addLayer(this.rvgcvl);var a=new OpenLayers.Control.SelectFeature(this.rvgcvl,{multiple:false,hover:true,onSelect:function(h){this.layer.dragCntrl.activate()},onUnselect:function(h){this.layer.dragCntrl.deactivate()}});this.rvgcvl.slctCntrl=a;this.map.addControl(a);var d=new OpenLayers.Control.DragFeature(this.rvgcvl,{onDrag:OpenLayers.Function.bind(this.updateLLForm,this),onComplete:OpenLayers.Function.bind(this.updateLLForm,this)});this.rvgcvl.dragCntrl=d;this.map.addControl(d);Geoportal.Control.LocationUtilityService.prototype.loadContent.apply(this,arguments)},onSearchClick:function(b,a){Geoportal.Control.LocationUtilityService.prototype.onSearchClick.apply(this,arguments);if(b.id.match(/^(longitude|latitude)/)&&OpenLayers.String.contains(b.id,this.id)){if(!b.hasFocus){e=OpenLayers.Util.getElement("longitude"+this.id);if(e&&b.id!=e.id&&e.hasFocus){Geoportal.Control.Form.focusOff(e)}e=OpenLayers.Util.getElement("longitude"+this.id);if(e&&b.id!=e.id&&e.hasFocus){Geoportal.Control.Form.focusOff(e)}Geoportal.Control.Form.focusOn(b)}return false}if(b.id.match(/^search/)){var l=OpenLayers.Util.getElement("longitude"+this.id);var d=OpenLayers.Util.getElement("latitude"+this.id);if(!l||!d){return false}var j=parseFloat(l.value);var h=parseFloat(d.value);if(isNaN(j)||isNaN(h)){return false}var g=new OpenLayers.Geometry.Point(j,h);g.transform(this.map.getDisplayProjection(),OpenLayers.Projection.CRS84);var f=new Geoportal.OLS.Position(g);if(this.wImg){this.wImg.style.display=""}this.layer.REVERSE_GEOCODE(f,{onSuccess:this.LUSSuccess,onFailure:this.LUSFailure,scopeOn:this});g=null;f.destroy();f=null;return false}this.closeForm();return false},updateLLForm:function(b,a){if(!b||!b.geometry||!b.geometry.x){return}var f=new OpenLayers.Geometry.Point(b.geometry.x,b.geometry.y);f.transform(this.map.getProjection(),OpenLayers.Projection.CRS84);var g=OpenLayers.Util.getElement("longitude"+this.id);g.value=Math.round(f.x*this.accuracy)/this.accuracy;var d=OpenLayers.Util.getElement("latitude"+this.id);d.value=Math.round(f.y*this.accuracy)/this.accuracy},updateLocation:function(j,d,a){if(a||window.event){OpenLayers.Event.stop(a?a:window.event)}var b=this.rvgcvl.features[0];if(!b||!j||!d){return true}var h=parseFloat(j.value);var f=parseFloat(d.value);if(!isNaN(h)&&!isNaN(f)){this.rvgcvl.destroyFeatures();var g=new OpenLayers.Geometry.Point(h,f);g.transform(OpenLayers.Projection.CRS84,this.map.getProjection());b=new OpenLayers.Feature.Vector(g);this.rvgcvl.addFeatures([b]);this.map.setCenter(new OpenLayers.LonLat(g.x,g.y),this.map.getZoom())}return true},CLASS_NAME:"Geoportal.Control.LocationUtilityService.ReverseGeocode"});Geoportal.Control.SearchToolbar=OpenLayers.Class(Geoportal.Control.Panel,{geonamesCntrlId:null,geocodeCntrlId:null,reverseGeocodeCntrlId:null,initialize:function(b){b=b||{};Geoportal.Control.Panel.prototype.initialize.apply(this,[b]);var j=null;if(b.geonamesOptions){if(b.geonamesOptions.control){j=b.geonamesOptions.control;this.geonamesCntrlId=j.id}else{b.geonamesOptions.layerOptions=b.geonamesOptions.layerOptions||{};var l=OpenLayers.Util.extend({},b.geonamesOptions.layerOptions);var h=new Geoportal.Layer.OpenLS.Core.LocationUtilityService(l.name||OpenLayers.Util.createUniqueID("LUS.Geonames"),l);this.geonamesCntrlId=b.geonamesOptions.id||(b.geonamesOptions.div?b.geonamesOptions.div.id:null)||"gn_"+this.id;j=new Geoportal.Control.LocationUtilityService.GeoNames(h,OpenLayers.Util.extend({id:this.geonamesCntrlId,title:"gpControlLocationUtilityService.geonames.title"},b.geonamesOptions))}this.addControls([j])}if(b.geocodeOptions){if(b.geocodeOptions.control){j=b.geocodeOptions.control;this.geocodeCntrlId=j.id}else{b.geocodeOptions.layerOptions=b.geocodeOptions.layerOptions||{};var a=OpenLayers.Util.extend({},b.geocodeOptions.layerOptions);var f=new Geoportal.Layer.OpenLS.Core.LocationUtilityService(a.name||OpenLayers.Util.createUniqueID("LUS.Geocode"),a);this.geocodeCntrlId=b.geocodeOptions.id||(b.geocodeOptions.div?b.geocodeOptions.div.id:null)||"gc_"+this.id;j=new Geoportal.Control.LocationUtilityService.Geocode(f,OpenLayers.Util.extend({id:this.geocodeCntrlId,title:"gpControlLocationUtilityService.geocode.title"},b.geocodeOptions))}this.addControls([j])}if(b.reverseGeocodeOptions){if(b.reverseGeocodeOptions.control){j=b.reverseGeocodeOptions.control;this.reverseGeocodeCntrlId=j.id}else{b.reverseGeocodeOptions.layerOptions=b.reverseGeocodeOptions.layerOptions||{};var d=OpenLayers.Util.extend({},b.reverseGeocodeOptions.layerOptions);var g=new Geoportal.Layer.OpenLS.Core.LocationUtilityService(d.name||OpenLayers.Util.createUniqueID("LUS.ReverseGeocode"),d);this.reverseGeocodeCntrlId=b.reverseGeocodeOptions.id||(b.reverseGeocodeOptions.div?b.reverseGeocodeOptions.div.id:null)||"rvgc_"+this.id;j=new Geoportal.Control.LocationUtilityService.ReverseGeocode(g,OpenLayers.Util.extend({id:this.reverseGeocodeCntrlId,title:"gpControlLocationUtilityService.reverse.geocode.title"},b.reverseGeocodeOptions))}this.addControls([j])}},CLASS_NAME:"Geoportal.Control.SearchToolbar"});Geoportal.Catalogue=OpenLayers.Class({map:null,urlServices:{},initialize:function(b,r){if(b){this.map=b}if(r.apiKey){var m={"SEAREGIONS.LEVEL0:WMSC":"ELEVATION.LEVEL0:WMSC","ELEVATION.SLOPS":"ELEVATION.SLOPES"};if(!(r.apiKey instanceof Array)){r.apiKey=[r.apiKey]}var f;for(var h=0,d=r.apiKey.length;h<d&&r.apiKey[h]!=null;h++){f=r.apiKey[h];if(r[f]!=null){this[f]={tokenServer:r[f].tokenServer,geoRMKey:f,tokenTimeOut:r[f].tokenTimeOut,transport:r[f].transport||"json",bounds:r[f].bounds?OpenLayers.Bounds.fromArray(r[f].bounds):new OpenLayers.Bounds(-180,-90,180,90),layers:r[f].resources,allowedGeoportalLayers:r[f].allowedGeoportalLayers};for(var q in m){var o=this[f].layers[q];if(o){var a=OpenLayers.Util.extend(o,{name:m[q]});this[f].layers[a.name]=a;delete this[f].layers[q];for(var g=0,p=this[f].allowedGeoportalLayers.length;g<p;g++){if(this[f].allowedGeoportalLayers[g]===q){this[f].allowedGeoportalLayers[g]=a.name;break}}}}}else{this[f]={tokenServer:"http://localhost/",geoRMKey:f,tokenTimeOut:60000,layers:{},allowedGeoportalLayers:[]}}}this.apiKey=r.apiKey.slice(0)}},destroy:function(){if(this.map){this.map=null}if(this.apiKey){var b;for(var d=0,a=this.apiKey.length;d<a;d++){b=this.apiKey[d];if(this[b]){this[b]=null}}this.apiKey=null}},_orderLayersStack:function(b){var j=[];var o;var g,d=b.length;var p=new RegExp(/^([^:]+)(:(.+))?$/);for(g=0;g<d;g++){var f=b[g].match(p);if(f==null){continue}var l=f[1];if(l==null){continue}var a=f[3]||"WMSC";var h=0;switch(l){case"ORTHOIMAGERY.ORTHOPHOTOS":h=999;break;case"ORTHOIMAGERY.ORTHOPHOTOS2000-2005":h=998.99;break;case"ORTHOIMAGERY.ORTHOPHOTOS.GENEVE":h=998.9;break;case"GEOGRAPHICALGRIDSYSTEMS.MAPS":h=998;break;case"GEOGRAPHICALGRIDSYSTEMS.COASTALMAPS":h=997.9;break;case"GEOGRAPHICALGRIDSYSTEMS.FRANCERASTER":h=997.89;break;case"GEOGRAPHICALGRIDSYSTEMS.ETATMAJOR40":h=997.2;break;case"GEOGRAPHICALGRIDSYSTEMS.1900TYPEMAPS":h=997.19;break;case"GEOGRAPHICALGRIDSYSTEMS.CASSINI":h=997.1;break;case"GEOGRAPHICALGRIDSYSTEMS.ADMINISTRATIVEUNITS":h=997.09;break;case"ORTHOIMAGERY.ORTHOPHOTOS.COAST2000":h=997;break;case"LANDUSE.AGRICULTURE2009":h=996.2009;break;case"LANDUSE.AGRICULTURE2008":h=996.2008;break;case"LANDUSE.AGRICULTURE2007":h=996.2007;break;case"LANDCOVER.FORESTINVENTORY.V2":h=996.2005;break;case"LANDCOVER.FORESTINVENTORY.V1":h=996.1987;break;case"LANDCOVER.CORINELANDCOVER":h=996;break;case"ELEVATION.SLOPS":l=l.replace("SLOPS","SLOPES");case"ELEVATION.SLOPES":h=989;break;case"CADASTRALPARCELS.PARCELS":h=979;break;case"NATURALRISKZONES.1910FLOODEDWATERSHEDS":h=969.2;break;case"NATURALRISKZONES.1910FLOODEDCELLARS":h=969.1;break;case"HYDROGRAPHY.HYDROGRAPHY":h=969;break;case"TRANSPORTNETWORKS.ROADS":h=899;break;case"TRANSPORTNETWORKS.RAILWAYS":h=898;break;case"TRANSPORTNETWORKS.RUNWAYS":h=897;break;case"BUILDINGS.BUILDINGS":h=799;break;case"UTILITYANDGOVERNMENTALSERVICES.ALL":h=699;break;case"ADMINISTRATIVEUNITS.BOUNDARIES":h=599;break;case"SEAREGIONS.LEVEL0":l=l.replace("SEAREGIONS","ELEVATION");case"ELEVATION.LEVEL0":h=499;break;case"GEOGRAPHICALNAMES.NAMES":h=498.9;break;default:break}o={layerId:l+":"+a,weight:h};j.unshift(o)}j.sort(function(r,q){return q.weight-r.weight});d=j.length;var m=[];for(g=0;g<d;g++){o=j.shift();m[g]=o.layerId}return m},getTerritory:function(f){if(f==undefined){if(this.map){f=this.map.territory||"FXX"}else{f="FXX"}}if(Geoportal.Catalogue.TERRITORIES[f]==undefined){if(this.map){f=this.map.territory||"FXX"}else{f="FXX"}}for(var b=0,a=Geoportal.Catalogue.TERRITORIES[f].defaultCRS.length;b<a;b++){var d=Geoportal.Catalogue.TERRITORIES[f].defaultCRS[b];if(typeof(d)=="string"){Geoportal.Catalogue.TERRITORIES[f].defaultCRS[b]=new OpenLayers.Projection(d,{domainOfValidity:OpenLayers.Bounds.fromArray(Geoportal.Catalogue.TERRITORIES[f].geobbox)})}}if(typeof(Geoportal.Catalogue.TERRITORIES[f].geoCRS[0])=="string"){Geoportal.Catalogue.TERRITORIES[f].geoCRS[0]=new OpenLayers.Projection(Geoportal.Catalogue.TERRITORIES[f].geoCRS[0],{domainOfValidity:OpenLayers.Bounds.fromArray(Geoportal.Catalogue.TERRITORIES[f].geobbox)})}return f},findTerritory:function(f){for(var d in Geoportal.Catalogue.TERRITORIES){if(Geoportal.Catalogue.TERRITORIES.hasOwnProperty(d)){var a=Geoportal.Catalogue.TERRITORIES[d];if(d=="WLD"){continue}if(!a.geobbox){continue}var g=OpenLayers.Bounds.fromArray(a.geobbox);var b=g.containsLonLat(f);g=null;if(b){return d}}}return"WLD"},getNativeProjection:function(b,a){if(!a){a=Geoportal.Catalogue.TERRITORIES[b].defaultCRS[0]}if(typeof(a)=="string"){a=new OpenLayers.Projection(a,{domainOfValidity:OpenLayers.Bounds.fromArray(Geoportal.Catalogue.TERRITORIES[b].geobbox)})}return a},getDisplayProjections:function(g,b,f){if(g==undefined){if(this.map){g=this.map.territory||"FXX"}else{g="FXX"}}var j=[];if(!b){if(!f){j.push(Geoportal.Catalogue.TERRITORIES[g].displayCRS[0])}else{j=Geoportal.Catalogue.TERRITORIES[g].displayCRS.slice(0)}}else{j.push(b)}for(var d=0,a=j.length;d<a;d++){var h=j[d];if(typeof(h)=="string"){h=new OpenLayers.Projection(h,{domainOfValidity:OpenLayers.Bounds.fromArray(Geoportal.Catalogue.TERRITORIES[g].geobbox)});j[d]=h}}return j},getResolutions:function(g,d){var b=null;var f,a;if(d.getProjName()!="longlat"){b=[];for(f=0,a=Geoportal.Catalogue.RESOLUTIONS.length;f<a;f++){b[f]=Geoportal.Catalogue.RESOLUTIONS[f]}return b}if(d.getProjName()=="longlat"){b=[];for(f=0,a=Geoportal.Catalogue.RESOLUTIONS.length;f<a;f++){var h=new OpenLayers.LonLat(Geoportal.Catalogue.RESOLUTIONS[f],0);h.transform(Geoportal.Catalogue.TERRITORIES[g].defaultCRS[0],d);b[f]=h.lon}return b}return b},getCenter:function(d,b){var a=new OpenLayers.LonLat(Geoportal.Catalogue.TERRITORIES[d].geocenter[0],Geoportal.Catalogue.TERRITORIES[d].geocenter[1]);if(b&&typeof(b)!="string"){a.transform(Geoportal.Catalogue.TERRITORIES[d].geoCRS[0],b)}return a},getExtent:function(g,d){var h=null;if(!g){if(this.apiKey){var b;for(var f=0,a=this.apiKey.length;f<a;f++){b=this.apiKey[f];if(this[b]&&this[b].bounds){if(!h){h=this[b].bounds.clone()}else{h.extend(this[b].bounds.clone())}}}}if(h==null){h=new OpenLayers.Bounds(-180,-90,180,90)}}else{h=OpenLayers.Bounds.fromArray(Geoportal.Catalogue.TERRITORIES[g].geobbox)}if(d&&typeof(d)!="string"){h.transform(g?Geoportal.Catalogue.TERRITORIES[g].geoCRS[0]:OpenLayers.Projection.CRS84,d,true)}return h},getDefaultMinZoom:function(d,a){if(!a){a=this.getNativeProjection(d)}var f=Geoportal.Catalogue.RESOLUTIONS.length-1;for(var b in Geoportal.Catalogue.TERRITORIES[d].baseLayers){if(Geoportal.Catalogue.TERRITORIES[d].baseLayers.hasOwnProperty(b)){if(a.isCompatibleWith(b)){if(Geoportal.Catalogue.TERRITORIES[d].baseLayers[b].minZoomLevel<f){f=Geoportal.Catalogue.TERRITORIES[d].baseLayers[b].minZoomLevel}break}}}return f==Geoportal.Catalogue.RESOLUTIONS.length-1?0:f},getDefaultMaxZoom:function(f,b){if(!b){b=this.getNativeProjection(f)}var a=0;for(var d in Geoportal.Catalogue.TERRITORIES[f].baseLayers){if(Geoportal.Catalogue.TERRITORIES[f].baseLayers.hasOwnProperty(d)){if(b.isCompatibleWith(d)){if(Geoportal.Catalogue.TERRITORIES[f].baseLayers[d].maxZoomLevel>a){a=Geoportal.Catalogue.TERRITORIES[f].baseLayers[d].maxZoomLevel}break}}}return a==0?Geoportal.Catalogue.RESOLUTIONS.length-1:a},getDefaultZoom:function(d,a){if(!a){a=this.getNativeProjection(d)}for(var b in Geoportal.Catalogue.TERRITORIES[d].baseLayers){if(Geoportal.Catalogue.TERRITORIES[d].baseLayers.hasOwnProperty(b)){if(a.isCompatibleWith(b)){return Geoportal.Catalogue.TERRITORIES[d].baseLayers[b].defaultZoomLevel}}}return 5},_getOriginator:function(b,a,f){var d={logo:b,url:"#"};switch(b){case"asp":d.url="http://www.asp-public.fr/";break;case"BNF":d.url="http://www.bnf.fr/";break;case"cartosphere":d.url="http://www.esrifrance.fr/FranceRaster.asp";break;case"cnes":d.url="http://www.cnes.fr";break;case"cnrs":d.url="http://www.cnrs.fr";break;case"DIRENHAUTENORMANDIE":d.url="http://www.haute-normandie.ecologie.gouv.fr/";break;case"DIRENIDF":d.url="http://www.ile-de-france.ecologie.gouv.fr/";break;case"div":d.url="http://www.ville.gouv.fr/";d.attribution+="CNV";break;case"EHESS":d.url="http://www.ehess.fr/ldh/Themes/Theme_Cassini.htm";break;case"eurogeographics":d.url="http://www.eurogeographics.org/";break;case"eea":d.url="http://www.stats.environnement.developpement-durable.gouv.fr/";break;case"ifn":d.url="http://www.ifn.fr/spip/sommaire.php3";break;case"ird":d.url="http://www.cayenne.ird.fr/";break;case"maaprat":d.url="http://agriculture.gouv.fr/";break;case"meeddm":d.url="http://www.developpement-durable.gouv.fr/";break;case"planetobserver":d.url="http://www.planetobserver.com";break;case"partenaires-bdortho":d.url="http://www.ign.fr/institut/72/partenaires/partenaires-institutionnels-de-l-ign.htm";d.extent=new OpenLayers.Bounds(5.80542659759521,45.6817817687988,7.04488706588745,46.4081611633301);break;case"SEINEENPARTAGE":d.url="http://www.seineenpartage.fr/";d.attribution+="SEINEENPARTAGE";break;case"seasguyane":d.url="http://www.seas-guyane.org/";break;case"shom":d.url="http://www.shom.fr";break;case"sitg":d.url="http://etat.geneve.ch/sitg/accueil.html";d.attribution+="SITG";break;case"spotimage":d.url="http://www.spotimage.fr";break;default:d.logo="ign";d.url="http://www.ign.fr";break}if(a&&f){d.minZoomLevel=a;d.maxZoomLevel=f}return d},getLayerGeoRMKey:function(g,b){if(this.apiKey){var d;for(var f=0,a=this.apiKey.length;f<a;f++){d=this.apiKey[f];if(this[d]&&this[d].bounds&&this[d].bounds.intersectsBounds(this.getExtent(g),true)){for(var h in this[d].layers){if(h==b||h.match("^"+b+":")){return d}}}}}return null},getLayerParameters:function(a,p){var m={};var r=p.match("^([^:]+)(:(.+))?$");if(r==null){return null}var f=r[1],C=r[3];if(!f){return null}if(!C){C="WMSC"}if(f=="SEAREGIONS.LEVEL0"){f="ELEVATION.LEVEL0"}if(f=="ELEVATION.SLOPS"){f="ELEVATION.SLOPES"}var B=[];if(this.apiKey){var v;for(var w=0,u=this.apiKey.length;w<u;w++){v=this.apiKey[w];if(this[v]){for(var o in this[v].layers){if(o==p||o.match("^"+f+":")){B.push(OpenLayers.Util.extend({},this[v].layers[o]))}}}}}if(B.length==0){return null}var j=null;for(w=0,u=B.length;w<u;w++){if(C==B[w].type){j=B[w];break}}if(j==null){return null}m.resourceId=j.name+":"+j.type;m.url=j.url;m.params={layers:null,exceptions:"text/xml"};m.options={isBaseLayer:false,description:j.name+".description",visibility:false,opacity:1,view:{drop:false,zoomToExtent:false}};var q=Geoportal.Catalogue.TERRITORIES[a].defaultCRS.slice(0);switch(j.type){case"WMS":m.classLayer=Geoportal.Layer.WMS;m.params=OpenLayers.Util.extend(m.params,{format:"image/png",transparent:true});m.options=OpenLayers.Util.extend(m.options,{buffer:0,singleTile:true});q=q.slice(1);break;case"WFS":m.classLayer=Geoportal.Layer.WFS;m.options=OpenLayers.Util.extend(m.options,{});q=q.slice(1);break;case"OPENLS":m=null;return null;default:m.classLayer=Geoportal.Layer.WMSC;m.options=OpenLayers.Util.extend(m.options,{buffer:0,gridOrigin:new OpenLayers.LonLat(0,0),nativeTileSize:new OpenLayers.Size(256,256),singleTile:false});break}if(q.length==0){m=null;return null}switch(j.name){case"ORTHOIMAGERY.ORTHOPHOTOS":case"GEOGRAPHICALGRIDSYSTEMS.MAPS":m.options.visibility=true;break;default:break}switch(j.name){case"ORTHOIMAGERY.ORTHOPHOTOS":case"ORTHOIMAGERY.ORTHOPHOTOS2000-2005":case"GEOGRAPHICALGRIDSYSTEMS.MAPS":case"GEOGRAPHICALGRIDSYSTEMS.COASTALMAPS":case"GEOGRAPHICALGRIDSYSTEMS.FRANCERASTER":case"GEOGRAPHICALGRIDSYSTEMS.CASSINI":case"GEOGRAPHICALGRIDSYSTEMS.ETATMAJOR40":case"GEOGRAPHICALGRIDSYSTEMS.ADMINISTRATIVEUNITS":case"ELEVATION.SLOPES":if(j.type=="WMSC"){m.params.format="image/jpeg"}break;default:if(j.type=="WMSC"){m.params.format="image/png";m.params.transparent=true}break}var b={};b.originators=[];var g="http://www.geocatalogue.fr/Detail.do?fileIdentifier=";switch(j.name){case"GEOGRAPHICALGRIDSYSTEMS.COASTALMAPS":case"GEOGRAPHICALGRIDSYSTEMS.FRANCERASTER":case"GEOGRAPHICALGRIDSYSTEMS.1900TYPEMAPS":case"GEOGRAPHICALGRIDSYSTEMS.CASSINI":case"GEOGRAPHICALGRIDSYSTEMS.MAPS":case"ELEVATION.SLOPES":case"LANDUSE.AGRICULTURE2007":case"LANDUSE.AGRICULTURE2008":case"LANDUSE.AGRICULTURE2009":case"LANDCOVER.FORESTINVENTORY.V1":case"LANDCOVER.FORESTINVENTORY.V2":case"LANDCOVER.CORINELANDCOVER":b.opacity=0.3;break;case"NATURALRISKZONES.1910FLOODEDWATERSHEDS":case"NATURALRISKZONES.1910FLOODEDCELLARS":case"HYDROGRAPHY.HYDROGRAPHY":case"TRANSPORTNETWORKS.ROADS":case"TRANSPORTNETWORKS.RUNWAYS":case"BUILDINGS.BUILDINGS":case"GEOGRAPHICALGRIDSYSTEMS.ADMINISTRATIVEUNITS":b.opacity=0.5;break;case"ORTHOIMAGERY.ORTHOPHOTOS2000-2005":b.opacity=0.7;break;default:break}b.originators.push(this._getOriginator("ign"));switch(a){case"ATF":switch(j.name){case"GEOGRAPHICALGRIDSYSTEMS.MAPS":b.opacity=1;b.minZoomLevel=5;b.maxZoomLevel=13;b.maxExtent=new OpenLayers.Bounds(137.643312,-66.753143,147.850442,-61.861314);b.metadataURL=g+"GL_CARTE_ATF.xml";break;default:m=null;break}break;case"CHE":m=null;break;case"CRZ":switch(j.name){case"ORTHOIMAGERY.ORTHOPHOTOS":if(j.type=="WMSC"){b.minZoomLevel=5;b.maxZoomLevel=12;b.originators=[];b.originators.push(this._getOriginator("planetobserver",5,12));b.maxExtent=new OpenLayers.Bounds(49.154744,-47.097592,53.392222,-45.331433)}break;case"GEOGRAPHICALGRIDSYSTEMS.MAPS":b.opacity=1;b.minZoomLevel=5;b.maxZoomLevel=13;b.maxExtent=new OpenLayers.Bounds(49.154744,-47.097592,53.392222,-45.331433);break;default:m=null;break}break;case"EUE":case"FXX":default:switch(j.name){case"ORTHOIMAGERY.ORTHOPHOTOS":b.minZoomLevel=5;b.maxZoomLevel=18;if(j.type=="WMSC"){b.originators=[];b.originators.push(this._getOriginator("planetobserver",5,11));b.originators.push(this._getOriginator("ign",12,18));b.originators.push(this._getOriginator("partenaires-bdortho",12,18));b.maxExtent=new OpenLayers.Bounds(-41.052325,23.548796,82.104649,84.775666)}b.metadataURL=g+"GL_PHOTO_FXX.xml";break;case"ORTHOIMAGERY.ORTHOPHOTOS2000-2005":b.minZoomLevel=9;b.maxZoomLevel=17;if(j.type=="WMSC"){b.maxExtent=new OpenLayers.Bounds(-6.842054,40.032954,10.263081,51.807352)}break;case"ORTHOIMAGERY.ORTHOPHOTOS.GENEVE":b.minZoomLevel=12;b.maxZoomLevel=18;if(j.type=="WMSC"){b.originators=[];b.originators.push(this._getOriginator("sitg",12,18));b.maxExtent=new OpenLayers.Bounds(5.940156,46.118968,6.312204,46.383872)}b.metadataURL="http://etat.geneve.ch/geoportail/metadataws/Publish/4137.html";break;case"ORTHOIMAGERY.ORTHOPHOTOS.COAST2000":b.minZoomLevel=12;b.maxZoomLevel=17;b.originators=[];b.originators.push(this._getOriginator("meeddm",12,17));b.maxExtent=new OpenLayers.Bounds(-5.51,42.92,2.72,49.67);b.metadataURL=g+"d26cf450-3b3a-11dc-9fe0-0015601080cc";break;case"GEOGRAPHICALGRIDSYSTEMS.MAPS":b.minZoomLevel=5;b.maxZoomLevel=17;b.maxExtent=new OpenLayers.Bounds(-20.526162,32.968315,27.368216,61.22687);b.metadataURL=g+"GL_CARTE_FXX.xml";break;case"GEOGRAPHICALGRIDSYSTEMS.COASTALMAPS":b.minZoomLevel=12;b.maxZoomLevel=15;if(j.type=="WMSC"){b.originators.push(this._getOriginator("shom",12,15));b.maxExtent=new OpenLayers.Bounds(-5.345355,41.0632133,9.9423598,51.476197)}break;case"GEOGRAPHICALGRIDSYSTEMS.FRANCERASTER":b.minZoomLevel=7;b.maxZoomLevel=17;if(j.type=="WMSC"){b.originators.push(this._getOriginator("cartosphere",7,17))}break;case"GEOGRAPHICALGRIDSYSTEMS.ETATMAJOR40":b.minZoomLevel=5;b.maxZoomLevel=13;break;case"GEOGRAPHICALGRIDSYSTEMS.1900TYPEMAPS":b.minZoomLevel=11;b.maxZoomLevel=14;b.maxExtent=new OpenLayers.Bounds(1.710514,48.569392,2.886492,49.158112);break;case"GEOGRAPHICALGRIDSYSTEMS.CASSINI":b.minZoomLevel=11;b.maxZoomLevel=14;if(j.type=="WMSC"){b.originators=[];b.originators.push(this._getOriginator("EHESS",11,14));b.originators.push(this._getOriginator("cnrs",11,14));b.originators.push(this._getOriginator("BNF",11,14));b.maxExtent=new OpenLayers.Bounds(-5.559169,41.799113,8.124939,50.924272)}break;case"GEOGRAPHICALGRIDSYSTEMS.ADMINISTRATIVEUNITS":b.minZoomLevel=5;b.maxZoomLevel=13;break;case"ELEVATION.SLOPES":b.minZoomLevel=5;b.maxZoomLevel=12;b.maxExtent=new OpenLayers.Bounds(-6.842054,37.678074,13.684108,51.807352);b.metadataURL=g+"GL_ALTI_FXX.xml";b.dataURL="http://professionnels.ign.fr/ficheProduitCMS.do?idDoc=5323461";break;case"LANDUSE.AGRICULTURE2007":case"LANDUSE.AGRICULTURE2008":case"LANDUSE.AGRICULTURE2009":b.minZoomLevel=5;b.maxZoomLevel=15;if(j.type=="WMSC"){b.originators=[];b.originators.push(this._getOriginator("maaprat",5,15));b.originators.push(this._getOriginator("asp",5,15));b.maxExtent=new OpenLayers.Bounds(-6.842054,37.678074,13.684108,51.807352)}b.metadataURL=g+(j.name.match("2007$")?"0656092-c31f-4f44-b7ef-afb9b61df06f":j.name.match("2008")?"54863a7b-feac-4301-8c11-f0af5bbd4052":"79bce0b5-a7a9-4fbe-a565-58888e592d24");b.dataURL="http://www.asp-public.fr/?q=node/856";break;case"LANDCOVER.FORESTINVENTORY.V1":b.minZoomLevel=5;b.maxZoomLevel=15;b.maxExtent=new OpenLayers.Bounds(-6.842054,40.032954,10.263081,51.807352);b.metadataURL=g+"b323be92-b828-46ed-ac8f-0480576dbf89";b.originators=[];b.originators.push(this._getOriginator("ifn"),5,15);break;case"LANDCOVER.FORESTINVENTORY.V2":b.minZoomLevel=5;b.maxZoomLevel=10;b.maxExtent=new OpenLayers.Bounds(-6.842054,40.032954,10.263081,51.807352);b.metadataURL=g+"cc10fbf0-3762-43d5-a5d7-7a5c26c5fde0";b.originators=[];b.originators.push(this._getOriginator("ifn"),5,10);break;case"LANDCOVER.CORINELANDCOVER":b.minZoomLevel=5;b.maxZoomLevel=12;b.maxExtent=new OpenLayers.Bounds(-6.842054,40.032954,10.263081,51.807352);b.metadataURL=g+"d15c51d0-d037-11dd-94bd-001438ebb238";b.originators=[];b.originators.push(this._getOriginator("meeddm"),5,12);b.originators.push(this._getOriginator("eea"),5,12);break;case"CADASTRALPARCELS.PARCELS":b.minZoomLevel=7;b.maxZoomLevel=18;b.maxExtent=new OpenLayers.Bounds(-5.184994,41.320778,9.568185,51.108247);b.metadataURL=g+"GL_PARCEL_FXX.xml";break;case"NATURALRISKZONES.1910FLOODEDWATERSHEDS":b.minZoomLevel=6;b.maxZoomLevel=15;b.maxExtent=new OpenLayers.Bounds(-1.7105135,47.0975924,6.8420541,50.6299118);b.originators=[];b.originators.push(this._getOriginator("DIRENIDF"));b.originators.push(this._getOriginator("DIRENHAUTENORMANDIE"));b.originators.push(this._getOriginator("SEINEENPARTAGE"));break;case"NATURALRISKZONES.1910FLOODEDCELLARS":b.minZoomLevel=9;b.maxZoomLevel=15;b.maxExtent=new OpenLayers.Bounds(-1.7105135,47.0975924,6.8420541,50.6299118);b.originators=[];b.originators.push(this._getOriginator("DIRENIDF"));b.originators.push(this._getOriginator("DIRENHAUTENORMANDIE"));b.originators.push(this._getOriginator("SEINEENPARTAGE"));break;case"HYDROGRAPHY.HYDROGRAPHY":b.minZoomLevel=5;b.maxZoomLevel=17;b.maxExtent=new OpenLayers.Bounds(-5.559169,41.210393,9.835453,51.218632);b.metadataURL=g+"GL_HYDRO_FXX.xml";break;case"TRANSPORTNETWORKS.ROADS":b.minZoomLevel=5;b.maxZoomLevel=17;if(j.type=="WMSC"){b.originators=[];b.originators.push(this._getOriginator("eurogeographics",5,7));b.originators.push(this._getOriginator("ign",8,17));b.maxExtent=new OpenLayers.Bounds(-34.21027,42.387833,34.21027,80.065907)}b.metadataURL=g+"GL_ROUTE_FXX.xml";break;case"TRANSPORTNETWORKS.RAILWAYS":b.minZoomLevel=5;b.maxZoomLevel=17;b.maxExtent=new OpenLayers.Bounds(-6.842054,40.032954,13.684108,51.807352);b.metadataURL=g+"GL_RESFER_FXX.xml";break;case"TRANSPORTNETWORKS.RUNWAYS":b.minZoomLevel=11;b.maxZoomLevel=17;b.maxExtent=new OpenLayers.Bounds(-5.131541,41.357573,9.621639,51.071452);b.metadataURL=g+"GL_AERIEN_FXX.xml";break;case"BUILDINGS.BUILDINGS":b.minZoomLevel=5;b.maxZoomLevel=17;b.maxExtent=new OpenLayers.Bounds(-5.986797,41.210393,10.263081,51.218632);b.metadataURL=g+"GL_BATI_FXX.xml";break;case"UTILITYANDGOVERNMENTALSERVICES.ALL":b.minZoomLevel=5;b.maxZoomLevel=17;b.maxExtent=new OpenLayers.Bounds(-6.842054,40.032954,10.263081,51.807352);b.metadataURL=g+"GL_SRVPUB_FXX.xml";break;case"ADMINISTRATIVEUNITS.BOUNDARIES":b.minZoomLevel=5;b.maxZoomLevel=17;b.maxExtent=new OpenLayers.Bounds(-6.842054,40.032954,10.263081,51.807352);b.metadataURL=g+"GL_ADMIN_FXX.xml";break;case"ELEVATION.LEVEL0":b.minZoomLevel=7;b.maxZoomLevel=16;b.maxExtent=new OpenLayers.Bounds(-6.842054,40.032954,10.263081,51.807352);b.metadataURL=g+"GL_LITO_FXX.xml";break;case"GEOGRAPHICALNAMES.NAMES":b.minZoomLevel=7;b.maxZoomLevel=17;b.metadataURL=g+"IGNF_BDNYMEr_2-0.xml";break;default:m=null;break}break;case"ANF":case"GLP":case"MTQ":case"SBA":case"SMA":switch(j.name){case"ORTHOIMAGERY.ORTHOPHOTOS":b.minZoomLevel=5;b.maxZoomLevel=17;if(j.type=="WMSC"){b.originators=[];b.originators.push(this._getOriginator("planetobserver",5,8));b.originators.push(this._getOriginator("ign",9,17));switch(a){case"GLP":case"SBA":case"SMA":b.maxExtent=new OpenLayers.Bounds(-63.38672,14.129278,-58.510819,18.839037);break;case"MTQ":b.maxExtent=new OpenLayers.Bounds(-61.558257,14.129278,-60.644026,15.012358);break;default:b.maxExtent=new OpenLayers.Bounds(-63.38672,14.129278,-58.510819,18.839037);break}}if(a!="ANF"){b.metadataURL=g+"GL_PHOTO_"+a+".xml"}break;case"GEOGRAPHICALGRIDSYSTEMS.MAPS":b.minZoomLevel=5;b.maxZoomLevel=17;switch(a){case"GLP":case"SBA":case"SMA":b.maxExtent=new OpenLayers.Bounds(-63.38672,14.129278,-58.510819,18.839037);break;case"MTQ":b.maxExtent=new OpenLayers.Bounds(-61.558257,14.129278,-60.644026,15.012358);break;default:b.maxExtent=new OpenLayers.Bounds(-63.38672,14.129278,-58.510819,18.839037);break}if(a!="ANF"){b.metadataURL=g+"GL_CARTE_"+a+".xml"}break;case"GEOGRAPHICALGRIDSYSTEMS.COASTALMAPS":b.minZoomLevel=12;b.maxZoomLevel=15;if(j.type=="WMSC"){b.originators.push(this._getOriginator("shom",12,15));switch(a){case"GLP":case"SBA":case"SMA":b.maxExtent=new OpenLayers.Bounds(-61.901094,16.265703,-58.835195,16.668132);break;case"MTQ":b.maxExtent=new OpenLayers.Bounds(-61.367792,14.780077,-58.577631,15.012358);break;default:b.maxExtent=new OpenLayers.Bounds(-61.901094,14.780077,-58.577631,16.668132);break}}break;case"GEOGRAPHICALGRIDSYSTEMS.FRANCERASTER":b.minZoomLevel=10;b.maxZoomLevel=17;if(j.type=="WMSC"){b.originators.push(this._getOriginator("cartosphere",10,17))}break;case"GEOGRAPHICALGRIDSYSTEMS.ADMINISTRATIVEUNITS":b.minZoomLevel=7;b.maxZoomLevel=10;break;case"ELEVATION.SLOPES":b.minZoomLevel=5;b.maxZoomLevel=12;switch(a){case"GLP":case"SBA":case"SMA":b.maxExtent=new OpenLayers.Bounds(-63.38672,15.306718,-60.948769,18.250317);break;case"MTQ":b.maxExtent=new OpenLayers.Bounds(-61.558257,14.129278,-60.339282,15.306718);break;default:b.maxExtent=new OpenLayers.Bounds(-63.38672,14.129278,-60.339282,18.250317);break}if(a!="ANF"){b.metadataURL=g+"GL_ALTI_"+a+".xml"}break;case"LANDUSE.AGRICULTURE2007":case"LANDUSE.AGRICULTURE2008":case"LANDUSE.AGRICULTURE2009":b.minZoomLevel=5;b.maxZoomLevel=15;if(j.type=="WMSC"){b.originators=[];b.originators.push(this._getOriginator("maaprat",5,15));b.originators.push(this._getOriginator("asp",5,15));switch(a){case"GLP":case"SBA":case"SMA":b.maxExtent=new OpenLayers.Bounds(-63.38672,15.306718,-60.948769,18.250317);break;case"MTQ":b.maxExtent=new OpenLayers.Bounds(-61.558257,14.129278,-60.339282,15.306718);break;default:b.maxExtent=new OpenLayers.Bounds(-63.38672,14.129278,-60.339282,18.250317);break}}b.metadataURL=g+(j.name.match("2007$")?"0656092-c31f-4f44-b7ef-afb9b61df06f":j.name.match("2008")?"54863a7b-feac-4301-8c11-f0af5bbd4052":"79bce0b5-a7a9-4fbe-a565-58888e592d24");b.dataURL="http://www.asp-public.fr/?q=node/856";break;case"CADASTRALPARCELS.PARCELS":b.minZoomLevel=12;b.maxZoomLevel=18;switch(a){case"GLP":case"SBA":case"SMA":b.maxExtent=new OpenLayers.Bounds(-63.272441,15.711462,-60.83449,18.287112);break;case"MTQ":b.maxExtent=new OpenLayers.Bounds(-61.253513,14.239663,-60.605933,15.012358);break;default:b.maxExtent=new OpenLayers.Bounds(-63.272441,14.239663,-60.605933,18.287112);break}if(a!="ANF"){b.metadataURL=g+"GL_PARCEL_"+a+".xml"}break;case"HYDROGRAPHY.HYDROGRAPHY":b.minZoomLevel=5;b.maxZoomLevel=17;switch(a){case"GLP":case"SBA":case"SMA":b.maxExtent=new OpenLayers.Bounds(-63.158162,15.821847,-60.948769,18.176727);break;case"MTQ":b.maxExtent=new OpenLayers.Bounds(-61.253513,14.350048,-60.796397,14.938768);break;default:b.maxExtent=new OpenLayers.Bounds(-63.158162,14.350048,-60.796397,18.176727);break}if(a!="ANF"){b.metadataURL=g+"GL_HYDRO_"+a+".xml"}break;case"TRANSPORTNETWORKS.ROADS":b.minZoomLevel=5;b.maxZoomLevel=17;switch(a){case"GLP":case"SBA":case"SMA":b.maxExtent=new OpenLayers.Bounds(-63.158162,15.821847,-60.948769,18.176727);break;case"MTQ":b.maxExtent=new OpenLayers.Bounds(-61.253513,14.350048,-60.796397,14.938768);break;default:b.maxExtent=new OpenLayers.Bounds(-63.158162,14.350048,-60.796397,18.176727);break}if(a!="ANF"){b.metadataURL=g+"GL_ROUTE_"+a+".xml"}break;case"TRANSPORTNETWORKS.RUNWAYS":b.minZoomLevel=5;b.maxZoomLevel=17;switch(a){case"GLP":case"SBA":case"SMA":b.maxExtent=new OpenLayers.Bounds(-63.158162,15.821847,-61.024955,18.103137);break;case"MTQ":b.maxExtent=new OpenLayers.Bounds(-61.177327,14.570818,-60.948769,14.717998);break;default:b.maxExtent=new OpenLayers.Bounds(-63.158162,14.570818,-60.948769,18.103137);break}if(a!="ANF"){b.metadataURL=g+"GL_AERIEN_"+a+".xml"}break;case"BUILDINGS.BUILDINGS":b.minZoomLevel=5;b.maxZoomLevel=17;switch(a){case"GLP":case"SBA":case"SMA":b.maxExtent=new OpenLayers.Bounds(-63.158162,15.821847,-60.948769,18.176727);break;case"MTQ":b.maxExtent=new OpenLayers.Bounds(-61.253513,14.350048,-60.796397,14.938768);break;default:b.maxExtent=new OpenLayers.Bounds(-63.158162,14.350048,-60.796397,18.176727);break}if(a!="ANF"){b.metadataURL=g+"GL_BATI_"+a+".xml"}break;case"ADMINISTRATIVEUNITS.BOUNDARIES":b.minZoomLevel=5;b.maxZoomLevel=17;switch(a){case"GLP":case"SBA":case"SMA":b.maxExtent=new OpenLayers.Bounds(-63.158162,15.821847,-60.948769,18.176727);break;case"MTQ":b.maxExtent=new OpenLayers.Bounds(-61.253513,14.350048,-60.796397,14.938768);break;default:b.maxExtent=new OpenLayers.Bounds(-63.158162,14.350048,-60.796397,18.176727);break}if(a!="ANF"){b.metadataURL=g+"GL_ADMIN_"+a+".xml"}break;case"UTILITYANDGOVERNMENTALSERVICES.ALL":b.minZoomLevel=5;b.maxZoomLevel=17;switch(a){case"GLP":case"SBA":case"SMA":b.maxExtent=new OpenLayers.Bounds(-63.158162,15.821847,-60.948769,18.176727);break;case"MTQ":b.maxExtent=new OpenLayers.Bounds(-61.253513,14.350048,-60.796397,14.938768);break;default:b.maxExtent=new OpenLayers.Bounds(-63.158162,14.350048,-60.796397,18.176727);break}if(a!="ANF"){b.metadataURL=g+"GL_SRVPUB_"+a+".xml"}break;case"ELEVATION.LEVEL0":b.minZoomLevel=7;b.maxZoomLevel=16;switch(a){case"GLP":case"SBA":case"SMA":b.maxExtent=new OpenLayers.Bounds(-63.158162,15.821847,-60.948769,18.176727);break;case"MTQ":b.maxExtent=new OpenLayers.Bounds(-61.253513,14.350048,-60.796397,14.938768);break;default:b.maxExtent=new OpenLayers.Bounds(-63.158162,14.350048,-60.796397,18.176727);break}break;case"GEOGRAPHICALNAMES.NAMES":b.minZoomLevel=7;b.maxZoomLevel=17;b.metadataURL=g+"IGNF_BDNYMEr_2-0.xml";break;default:m=null;break}break;case"GUF":switch(j.name){case"ORTHOIMAGERY.ORTHOPHOTOS":b.minZoomLevel=5;b.maxZoomLevel=17;if(j.type=="WMSC"){b.originators=[];b.originators.push(this._getOriginator("planetobserver",5,8));b.originators.push(this._getOriginator("ign",9,17));b.maxExtent=new OpenLayers.Bounds(-66.09764,-4.709759,-42.49134,14.129278)}b.metadataURL=g+"GL_PHOTO_GUF.xml";break;case"GEOGRAPHICALGRIDSYSTEMS.MAPS":b.minZoomLevel=5;b.maxZoomLevel=17;b.maxExtent=new OpenLayers.Bounds(-54.763718,1.610769,-51.150381,6.13809);b.metadataURL=g+"GL_CARTE_GUF.xml";break;case"GEOGRAPHICALGRIDSYSTEMS.ADMINISTRATIVEUNITS":b.minZoomLevel=7;b.maxZoomLevel=10;break;case"ELEVATION.SLOPES":b.minZoomLevel=5;b.maxZoomLevel=12;b.maxExtent=new OpenLayers.Bounds(-54.29449,3.532319,-51.343702,5.887199);b.metadataURL=g+"GL_ALTI_GUF.xml";break;case"LANDUSE.AGRICULTURE2007":case"LANDUSE.AGRICULTURE2008":case"LANDUSE.AGRICULTURE2009":b.minZoomLevel=5;b.maxZoomLevel=15;if(j.type=="WMSC"){b.originators=[];b.originators.push(this._getOriginator("maaprat",5,15));b.originators.push(this._getOriginator("asp",5,15));b.maxExtent=new OpenLayers.Bounds(-54.29449,3.532319,-51.343702,5.887199)}b.metadataURL=g+(j.name.match("2007$")?"0656092-c31f-4f44-b7ef-afb9b61df06f":j.name.match("2008")?"54863a7b-feac-4301-8c11-f0af5bbd4052":"79bce0b5-a7a9-4fbe-a565-58888e592d24");b.dataURL="http://www.asp-public.fr/?q=node/856";break;case"HYDROGRAPHY.HYDROGRAPHY":b.minZoomLevel=5;b.maxZoomLevel=17;b.maxExtent=new OpenLayers.Bounds(-54.515799,3.458729,-51.565011,5.813609);b.metadataURL=g+"GL_HYDRO_GUF.xml";break;case"TRANSPORTNETWORKS.ROADS":b.minZoomLevel=5;b.maxZoomLevel=15;b.maxExtent=new OpenLayers.Bounds(-54.36826,3.826679,-51.786321,5.813609);b.metadataURL=g+"GL_ROUTE_GUF.xml";break;case"TRANSPORTNETWORKS.RUNWAYS":b.minZoomLevel=5;b.maxZoomLevel=17;b.maxExtent=new OpenLayers.Bounds(-52.376478,4.783349,-52.302708,4.856939);b.metadataURL=g+"GL_AERIEN_GUF.xml";break;case"BUILDINGS.BUILDINGS":b.minZoomLevel=5;b.maxZoomLevel=17;b.maxExtent=new OpenLayers.Bounds(-54.36826,3.826679,-51.786321,5.813609);b.metadataURL=g+"GL_BATI_GUF.xml";break;case"UTILITYANDGOVERNMENTALSERVICES.ALL":b.minZoomLevel=5;b.maxZoomLevel=17;b.maxExtent=new OpenLayers.Bounds(-56.646306,4.724861,-51.9435,9.416222);b.metadataURL=g+"GL_SRVPUB_GUF.xml";break;case"ADMINISTRATIVEUNITS.BOUNDARIES":b.minZoomLevel=5;b.maxZoomLevel=17;b.maxExtent=new OpenLayers.Bounds(-54.663338,2.111463,-51.565011,5.813609);b.metadataURL=g+"GL_ADMIN_GUF.xml";break;case"ELEVATION.LEVEL0":b.minZoomLevel=7;b.maxZoomLevel=16;b.maxExtent=new OpenLayers.Bounds(-54.663338,2.111463,-51.565011,5.813609);break;case"GEOGRAPHICALNAMES.NAMES":b.minZoomLevel=7;b.maxZoomLevel=17;b.metadataURL=g+"IGNF_BDNYMEr_2-0.xml";break;default:m=null;break}break;case"KER":switch(j.name){case"ORTHOIMAGERY.ORTHOPHOTOS":if(j.type=="WMSC"){b.minZoomLevel=5;b.maxZoomLevel=12;b.originators=[];b.originators.push(this._getOriginator("planetobserver",5,12));b.maxExtent=new OpenLayers.Bounds(67.986951,-50.629912,71.612922,-48.275032)}break;case"GEOGRAPHICALGRIDSYSTEMS.MAPS":b.opacity=1;b.minZoomLevel=5;b.maxZoomLevel=13;b.maxExtent=new OpenLayers.Bounds(67.986951,-50.629912,71.612922,-48.275032);b.metadataURL=g+"GL_CARTE_KER.xml";break;default:m=null;break}break;case"MYT":switch(j.name){case"ORTHOIMAGERY.ORTHOPHOTOS":b.minZoomLevel=5;b.maxZoomLevel=17;if(j.type=="WMSC"){b.originators=[];b.originators.push(this._getOriginator("planetobserver",5,8));b.originators.push(this._getOriginator("ign",9,17));b.maxExtent=new OpenLayers.Bounds(44.839483,-13.246198,45.441355,-12.363118)}b.metadataURL=g+"GL_PHOTO_MYT.xml";break;case"GEOGRAPHICALGRIDSYSTEMS.MAPS":b.minZoomLevel=5;b.maxZoomLevel=15;b.maxExtent=new OpenLayers.Bounds(44.839483,-13.246198,45.441355,-12.363118);b.metadataURL=g+"GL_CARTE_MYT.xml";break;case"ELEVATION.SLOPES":b.minZoomLevel=5;b.maxZoomLevel=12;b.maxExtent=new OpenLayers.Bounds(44.538547,-13.540558,45.742292,-12.363118);b.metadataURL=g+"GL_ALTI_MYT.xml";break;case"HYDROGRAPHY.HYDROGRAPHY":b.minZoomLevel=14;b.maxZoomLevel=17;b.maxExtent=new OpenLayers.Bounds(44.989951,-13.025428,45.366121,-12.657478);b.metadataURL=g+"GL_HYDRO_MYT.xml";break;case"TRANSPORTNETWORKS.ROADS":b.minZoomLevel=14;b.maxZoomLevel=17;b.maxExtent=new OpenLayers.Bounds(45.036973,-12.997832,45.300292,-12.666677);b.metadataURL=g+"GL_ROUTE_MYT.xml";break;case"TRANSPORTNETWORKS.RUNWAYS":b.minZoomLevel=14;b.maxZoomLevel=17;b.maxExtent=new OpenLayers.Bounds(45.272079,-12.823055,45.290887,-12.795459);b.metadataURL=g+"GL_AERIEN_MYT.xml";break;case"BUILDINGS.BUILDINGS":b.minZoomLevel=14;b.maxZoomLevel=17;b.maxExtent=new OpenLayers.Bounds(45.018164,-12.997832,45.300292,-12.63908);b.metadataURL=g+"GL_BATI_MYT.xml";break;case"ADMINISTRATIVEUNITS.BOUNDARIES":b.minZoomLevel=14;b.maxZoomLevel=17;b.maxExtent=new OpenLayers.Bounds(45.018164,-13.00703,45.300292,-12.629882);b.metadataURL=g+"GL_ADMIN_MYT.xml";break;case"ELEVATION.LEVEL0":b.minZoomLevel=7;b.maxZoomLevel=16;b.maxExtent=new OpenLayers.Bounds(45.018164,-13.00703,45.300292,-12.629882);break;default:m=null;break}break;case"NCL":switch(j.name){case"ORTHOIMAGERY.ORTHOPHOTOS":if(j.type=="WMSC"){b.minZoomLevel=5;b.maxZoomLevel=12;b.originators=[];b.originators.push(this._getOriginator("planetobserver",5,12));b.metadataURL=g+"GL_PHOTO_NCL.xml";b.maxExtent=new OpenLayers.Bounds(157.468808,-28.258555,172.707725,-14.129278)}break;case"GEOGRAPHICALGRIDSYSTEMS.MAPS":b.minZoomLevel=5;b.maxZoomLevel=13;b.maxExtent=new OpenLayers.Bounds(162.548447,-23.548796,168.897996,-18.839037);b.metadataURL=g+"GL_CARTE_NCL.xml";break;case"ELEVATION.SLOPES":b.minZoomLevel=5;b.maxZoomLevel=12;b.maxExtent=new OpenLayers.Bounds(162.548447,-22.960076,167.628086,-19.427757);b.metadataURL=g+"GL_ALTI_NCL.xml";break;default:m=null;break}break;case"PYF":switch(j.name){case"ORTHOIMAGERY.ORTHOPHOTOS":if(j.type=="WMSC"){b.minZoomLevel=5;b.maxZoomLevel=12;b.originators=[];b.originators.push(this._getOriginator("planetobserver",5,12));b.metadataURL=g+"GL_PHOTO_PYF.xml";b.maxExtent=new OpenLayers.Bounds(-160.904751,-28.258555,-107.269834,14.129278)}break;case"GEOGRAPHICALGRIDSYSTEMS.MAPS":b.minZoomLevel=5;b.maxZoomLevel=13;b.maxExtent=new OpenLayers.Bounds(-152.371924,-18.839037,-148.714997,-15.306718);b.metadataURL=g+"GL_CARTE_PYF.xml";break;default:m=null;break}break;case"REU":switch(j.name){case"ORTHOIMAGERY.ORTHOPHOTOS":if(j.type=="WMSC"){b.minZoomLevel=5;b.maxZoomLevel=17;b.originators=[];b.originators.push(this._getOriginator("planetobserver",5,8));b.originators.push(this._getOriginator("ign",9,17));b.maxExtent=new OpenLayers.Bounds(35.313845,-28.258555,60.53802,-14.129278);b.metadataURL=g+"GL_PHOTO_REU.xml"}break;case"GEOGRAPHICALGRIDSYSTEMS.MAPS":b.minZoomLevel=5;b.maxZoomLevel=17;b.maxExtent=new OpenLayers.Bounds(54.862581,-21.488277,56.12379,20.605197);b.metadataURL=g+"GL_CARTE_REU.xml";break;case"GEOGRAPHICALGRIDSYSTEMS.FRANCERASTER":b.minZoomLevel=10;b.maxZoomLevel=17;if(j.type=="WMSC"){b.originators.push(this._getOriginator("cartosphere",10,17))}break;case"GEOGRAPHICALGRIDSYSTEMS.ADMINISTRATIVEUNITS":b.minZoomLevel=7;b.maxZoomLevel=10;break;case"ELEVATION.SLOPES":b.minZoomLevel=5;b.maxZoomLevel=12;b.maxExtent=new OpenLayers.Bounds(54.862581,-21.782636,56.12379,-20.605197);b.metadataURL=g+"GL_ALTI_REU.xml";break;case"LANDUSE.AGRICULTURE2007":case"LANDUSE.AGRICULTURE2008":case"LANDUSE.AGRICULTURE2009":b.minZoomLevel=5;b.maxZoomLevel=15;if(j.type=="WMSC"){b.originators=[];b.originators.push(this._getOriginator("maaprat",5,15));b.originators.push(this._getOriginator("asp",5,15));b.maxExtent=new OpenLayers.Bounds(54.862581,-21.782636,56.12379,-20.605197)}b.metadataURL=g+(j.name.match("2007$")?"0656092-c31f-4f44-b7ef-afb9b61df06f":j.name.match("2008")?"54863a7b-feac-4301-8c11-f0af5bbd4052":"79bce0b5-a7a9-4fbe-a565-58888e592d24");b.dataURL="http://www.asp-public.fr/?q=node/856";break;case"CADASTRALPARCELS.PARCELS":b.minZoomLevel=12;b.maxZoomLevel=18;b.metadataURL=g+"GL_PARCEL_REU.xml";b.maxExtent=new OpenLayers.Bounds(55.177883,-21.414687,55.8479,-20.862762);break;case"HYDROGRAPHY.HYDROGRAPHY":b.minZoomLevel=5;b.maxZoomLevel=17;b.maxExtent=new OpenLayers.Bounds(55.177883,-21.414687,55.887313,-20.825967);b.metadataURL=g+"GL_HYDRO_REU.xml";break;case"TRANSPORTNETWORKS.ROADS":b.minZoomLevel=5;b.maxZoomLevel=17;b.maxExtent=new OpenLayers.Bounds(55.177883,-21.414687,55.887313,-20.899557);b.metadataURL=g+"GL_ROUTE_REU.xml";break;case"TRANSPORTNETWORKS.RUNWAYS":b.minZoomLevel=5;b.maxZoomLevel=17;b.maxExtent=new OpenLayers.Bounds(55.177883,-21.341097,55.572011,-20.825967);b.metadataURL=g+"GL_AERIEN_REU.xml";break;case"BUILDINGS.BUILDINGS":b.minZoomLevel=5;b.maxZoomLevel=17;b.maxExtent=new OpenLayers.Bounds(55.177883,-21.414687,55.887313,-20.825967);b.metadataURL=g+"GL_BATI_REU.xml";break;case"ADMINISTRATIVEUNITS.BOUNDARIES":b.minZoomLevel=5;b.maxZoomLevel=17;b.maxExtent=new OpenLayers.Bounds(55.177883,-21.414687,55.887313,-20.825967);b.metadataURL=g+"GL_ADMIN_REU.xml";break;case"UTILITYANDGOVERNMENTALSERVICES.ALL":b.minZoomLevel=5;b.maxZoomLevel=17;b.maxExtent=new OpenLayers.Bounds(55.256709,-21.414687,55.808487,-20.825967);b.metadataURL=g+"GL_SRVPUB_REU.xml";break;case"ELEVATION.LEVEL0":b.minZoomLevel=7;b.maxZoomLevel=16;b.maxExtent=new OpenLayers.Bounds(55.177883,-21.414687,55.887313,-20.825967);break;case"GEOGRAPHICALNAMES.NAMES":b.minZoomLevel=7;b.maxZoomLevel=17;b.metadataURL=g+"IGNF_BDNYMEr_2-0.xml";break;default:m=null;break}break;case"ASP":switch(j.name){case"GEOGRAPHICALGRIDSYSTEMS.MAPS":b.opacity=1;b.minZoomLevel=5;b.maxZoomLevel=15;b.maxExtent=new OpenLayers.Bounds(77.486775,-38.752073,77.602118,-37.788746);b.metadataURL=g+"GL_CARTE_ASP.xml";break;default:m=null;break}break;case"SPM":switch(j.name){case"ORTHOIMAGERY.ORTHOPHOTOS":b.minZoomLevel=5;b.maxZoomLevel=17;if(j.type=="WMSC"){b.originators=[];b.originators.push(this._getOriginator("planetobserver",5,8));b.originators.push(this._getOriginator("ign",9,17));b.maxExtent=new OpenLayers.Bounds(-62.152397,42.387833,-48.340754,56.517111)}b.metadataURL=g+"GL_PHOTO_SPM.xml";break;case"GEOGRAPHICALGRIDSYSTEMS.MAPS":b.minZoomLevel=5;b.maxZoomLevel=17;b.maxExtent=new OpenLayers.Bounds(-56.541417,46.508872,-56.109803,47.391952);b.metadataURL=g+"GL_CARTE_SPM.xml";break;case"ELEVATION.SLOPES":b.minZoomLevel=5;b.maxZoomLevel=12;b.maxExtent=new OpenLayers.Bounds(-56.973031,46.508872,-56.109803,47.686312);b.metadataURL=g+"GL_ALTI_SPM.xml";break;case"ELEVATION.LEVEL0":b.minZoomLevel=7;b.maxZoomLevel=16;b.maxExtent=new OpenLayers.Bounds(-56.973031,46.508872,-56.109803,47.686312);break;default:m=null;break}break;case"WLD":switch(j.name){case"ORTHOIMAGERY.ORTHOPHOTOS":b.minZoomLevel=0;b.maxZoomLevel=4;if(j.type=="WMSC"){b.originators=[];b.originators.push(this._getOriginator("planetobserver"));b.maxExtent=new OpenLayers.Bounds(-179.999961,-72.782842,179.999961,72.782842)}break;case"GEOGRAPHICALGRIDSYSTEMS.MAPS":b.minZoomLevel=0;b.maxZoomLevel=4;b.maxExtent=new OpenLayers.Bounds(-179.999961,-72.782842,179.999961,72.782842);break;default:m=null;break}break;case"WLF":switch(j.name){case"ORTHOIMAGERY.ORTHOPHOTOS":b.minZoomLevel=5;b.maxZoomLevel=17;if(j.type=="WMSC"){b.originators=[];b.originators.push(this._getOriginator("planetobserver",5,8));b.originators.push(this._getOriginator("ign",9,17));b.maxExtent=new OpenLayers.Bounds(-179.595856,-18.839037,-174.741914,-9.419518)}b.metadataURL=g+"GL_PHOTO_WLF.xml";break;case"GEOGRAPHICALGRIDSYSTEMS.MAPS":b.minZoomLevel=5;b.maxZoomLevel=15;b.maxExtent=new OpenLayers.Bounds(-179.595856,-18.839037,-174.741914,-9.419518);b.metadataURL=g+"GL_CARTE_WLF.xml";break;case"ELEVATION.SLOPES":b.minZoomLevel=5;b.maxZoomLevel=12;b.maxExtent=new OpenLayers.Bounds(-178.382371,-14.717998,-175.9554,-12.951838);b.metadataURL=g+"GL_ALTI_WLF.xml";break;default:m=null;break}break}if(m){b.name=j.name;b.projection=null;for(var w=0,z=q.length;w<z;w++){if(typeof(q[w])=="string"){q[w]=new OpenLayers.Projection(q[w],{domainOfValidity:OpenLayers.Bounds.fromArray(Geoportal.Catalogue.TERRITORIES[a].geobbox)})}else{q[w]=new OpenLayers.Projection(q[w].getCode(),{domainOfValidity:OpenLayers.Bounds.fromArray(Geoportal.Catalogue.TERRITORIES[a].geobbox)})}if(q[w].equals(this.map.getProjection())){b.projection=new OpenLayers.Projection(q[w].getCode(),{domainOfValidity:OpenLayers.Bounds.fromArray(Geoportal.Catalogue.TERRITORIES[a].geobbox)})}}if(j.type=="WMS"){b.srs={};for(var w=0,z=q.length;w<z;w++){var d=q[w].clone();b.srs[d]=true}}if(!b.projection){b.projection=new OpenLayers.Projection(q[0].getCode(),{domainOfValidity:OpenLayers.Bounds.fromArray(Geoportal.Catalogue.TERRITORIES[a].geobbox)})}m.params.layers=j.name;if((m.classLayer==Geoportal.Layer.WMSC)&&!b.projection.equals(this.map.getProjection())){b.nativeResolutions=Geoportal.Catalogue.RESOLUTIONS.slice(0)}if(b.maxExtent==undefined){b.maxExtent=this.getExtent(a)}b.maxExtent.transform(Geoportal.Catalogue.TERRITORIES[a].geoCRS[0],b.projection,true);if(b.originators){for(var w=0,u=b.originators.length;w<u;w++){var h=b.originators[w];if(h.extent){h.extent.transform(Geoportal.Catalogue.TERRITORIES[a].geoCRS[0],b.projection,true)}}}OpenLayers.Util.extend(m.options,b)}return m},CLASS_NAME:"Geoportal.Catalogue"});Geoportal.Catalogue.RESOLUTIONS=[39135.75,19567.875,9783.9375,4891.96875,2445.984375,2048,1024,512,256,128,64,32,16,8,4,2,1,0.5,0.25,0.125,0.0625];Geoportal.Catalogue.TERRITORIES={ATF:{geobbox:[132.56,-68.62,144.54,-64.03],geocenter:[140.001389,-66.66278],defaultCRS:["IGNF:TERA50STEREO"],geoCRS:["IGNF:WGS84G"],displayCRS:["IGNF:WGS84G","CRS:84","EPSG:4326","IGNF:TERA50STEREO"],baseLayers:{"IGNF:TERA50STEREO":{minZoomLevel:5,maxZoomLevel:13,defaultZoomLevel:10}}},CHE:{},CRZ:{geobbox:[47,-48,55,-44],geocenter:[51.866667,-46.433333],defaultCRS:["IGNF:GEOPORTALCRZ","IGNF:UTM39SW84"],geoCRS:["IGNF:WGS84G"],displayCRS:["IGNF:WGS84G","CRS:84","EPSG:4326","IGNF:UTM39SW84","EPSG:32739"],baseLayers:{"IGNF:GEOPORTALCRZ":{minZoomLevel:5,maxZoomLevel:13,defaultZoomLevel:11},"IGNF:UTM39SW84":{minZoomLevel:5,maxZoomLevel:13,defaultZoomLevel:11}}},FXX:{geobbox:[-31.17,27.33,69.03,80.83],geocenter:[2.345274398,48.860832558],defaultCRS:["IGNF:GEOPORTALFXX","IGNF:LAMB93"],geoCRS:["IGNF:RGF93G"],displayCRS:["IGNF:RGF93G","EPSG:4171","EPSG:4258","CRS:84","EPSG:4326","EPSG:3034","EPSG:3035","IGNF:LAMB93","EPSG:2154","IGNF:ETRS89GEO","IGNF:ETRS89LCC","IGNF:ETRS89LAEA"],baseLayers:{"IGNF:GEOPORTALFXX":{minZoomLevel:5,maxZoomLevel:18,defaultZoomLevel:5},"IGNF:LAMB93":{minZoomLevel:5,maxZoomLevel:18,defaultZoomLevel:5}}},GLP:{geobbox:[-63.2,15.75,-60,17.5],geocenter:[-61.732777778,15.996111111],defaultCRS:["IGNF:GEOPORTALANF","IGNF:UTM20W84GUAD"],geoCRS:["IGNF:WGS84RRAFGEO"],displayCRS:["IGNF:WGS84RRAFGEO","CRS:84","EPSG:4326","IGNF:UTM20W84GUAD","EPSG:2969","EPSG:32620"],baseLayers:{"IGNF:GEOPORTALANF":{minZoomLevel:5,maxZoomLevel:18,defaultZoomLevel:13},"IGNF:UTM20W84GUAD":{minZoomLevel:5,maxZoomLevel:18,defaultZoomLevel:13}}},GUF:{geobbox:[-62.1,-4.3,-46,11.5],geocenter:[-52.305277778,4.932222222],defaultCRS:["IGNF:GEOPORTALGUF","IGNF:UTM22RGFG95"],geoCRS:["IGNF:RGFG95GEO"],displayCRS:["IGNF:RGFG95GEO","CRS:84","EPSG:4326","IGNF:UTM22RGFG95","EPSG:2972","EPSG:32622"],baseLayers:{"IGNF:GEOPORTALGUF":{minZoomLevel:5,maxZoomLevel:18,defaultZoomLevel:10},"IGNF:UTM22RGFG95":{minZoomLevel:5,maxZoomLevel:18,defaultZoomLevel:10}}},KER:{geobbox:[62,-53,76,-45],geocenter:[70.215278,-49.354167],defaultCRS:["IGNF:GEOPORTALKER","IGNF:UTM42SW84"],geoCRS:["IGNF:WGS84G"],displayCRS:["IGNF:WGS84G","CRS:84","EPSG:4326","IGNF:UTM42SW84","EPSG:32742"],baseLayers:{"IGNF:GEOPORTALKER":{minZoomLevel:5,maxZoomLevel:13,defaultZoomLevel:11},"IGNF:UTM42SW84":{minZoomLevel:5,maxZoomLevel:13,defaultZoomLevel:11}}},MTQ:{geobbox:[-64,11.7,-59,15.7],geocenter:[-61.075,14.6],defaultCRS:["IGNF:GEOPORTALANF","IGNF:UTM20W84MART"],geoCRS:["IGNF:WGS84RRAFGEO"],displayCRS:["IGNF:WGS84RRAFGEO","CRS:84","EPSG:4326","IGNF:UTM20W84MART","EPSG:2989","EPSG:32620"],baseLayers:{"IGNF:GEOPORTALANF":{minZoomLevel:5,maxZoomLevel:18,defaultZoomLevel:13},"IGNF:UTM20W84MART":{minZoomLevel:5,maxZoomLevel:18,defaultZoomLevel:13}}},MYT:{geobbox:[40,-17.5,56,3],geocenter:[45.228333333,-12.781666667],defaultCRS:["IGNF:GEOPORTALMYT","IGNF:RGM04UTM38S"],geoCRS:["IGNF:RGM04GEO"],displayCRS:["IGNF:RGM04GEO","CRS:84","EPSG:4326","IGNF:RGM04UTM38S","EPSG:32738"],baseLayers:{"IGNF:GEOPORTALMYT":{minZoomLevel:5,maxZoomLevel:18,defaultZoomLevel:14},"IGNF:RGM04UTM38S":{minZoomLevel:5,maxZoomLevel:18,defaultZoomLevel:14}}},NCL:{geobbox:[160,-24.3,170,-17.1],geocenter:[166.433333,-22.283333],defaultCRS:["IGNF:GEOPORTALNCL","IGNF:RGNCUTM57S","IGNF:RGNCUTM58S","IGNF:RGNCUTM59S"],geoCRS:["IGNF:RGNCGEO"],displayCRS:["IGNF:RGNCGEO","CRS:84","EPSG:4326","IGNF:RGNCUTM57S","EPSG:32757","IGNF:RGNCUTM58S","EPSG:32758","IGNF:RGNCUTM59S","EPSG:32759"],baseLayers:{"IGNF:GEOPORTALNCL":{minZoomLevel:5,maxZoomLevel:13,defaultZoomLevel:9},"IGNF:RGNCUTM57S":{minZoomLevel:5,maxZoomLevel:13,defaultZoomLevel:9},"IGNF:RGNCUTM58S":{minZoomLevel:5,maxZoomLevel:13,defaultZoomLevel:9},"IGNF:RGNCUTM59S":{minZoomLevel:5,maxZoomLevel:13,defaultZoomLevel:9}}},PYF:{geobbox:[-160,-28.2,-108,11],geocenter:[-149.569444,-17.536111],defaultCRS:["IGNF:GEOPORTALPYF","IGNF:RGPFUTM5S","IGNF:RGPFUTM6S","IGNF:RGPFUTM7S"],geoCRS:["IGNF:RGPFGEO"],displayCRS:["IGNF:RGPFGEO","CRS:84","EPSG:4326","IGNF:RGPFUTM5S","EPSG:3296","EPSG:32705","IGNF:RGPFUTM6S","EPSG:3297","EPSG:32706","IGNF:RGPFUTM7S","EPSG:3298","EPSG:32707"],baseLayers:{"IGNF:GEOPORTALPYF":{minZoomLevel:5,maxZoomLevel:11,defaultZoomLevel:11},"IGNF:RGPFUTM5S":{minZoomLevel:5,maxZoomLevel:11,defaultZoomLevel:11},"IGNF:RGPFUTM6S":{minZoomLevel:5,maxZoomLevel:11,defaultZoomLevel:11},"IGNF:RGPFUTM7S":{minZoomLevel:5,maxZoomLevel:11,defaultZoomLevel:11}}},REU:{geobbox:[37.5,-26.2,60,-17.75],geocenter:[55.466666667,-20.875],defaultCRS:["IGNF:GEOPORTALREU","IGNF:RGR92UTM40S"],geoCRS:["IGNF:RGR92GEO"],displayCRS:["IGNF:RGR92GEO","CRS:84","EPSG:4326","IGNF:RGR92UTM40S","EPSG:2975","EPSG:32740"],baseLayers:{"IGNF:GEOPORTALREU":{minZoomLevel:5,maxZoomLevel:18,defaultZoomLevel:13},"IGNF:RGR92UTM40S":{minZoomLevel:5,maxZoomLevel:18,defaultZoomLevel:13}}},ASP:{geobbox:[76,-40,79,-36],geocenter:[77.571944,-37.796389],defaultCRS:["IGNF:GEOPORTALASP","IGNF:UTM43SW84"],geoCRS:["IGNF:WGS84G"],displayCRS:["IGNF:WGS84G","CRS:84","EPSG:4326","IGNF:UTM43SW84","EPSG:32743"],baseLayers:{"IGNF:GEOPORTALASP":{minZoomLevel:5,maxZoomLevel:15,defaultZoomLevel:13},"IGNF:UTM43SW84":{minZoomLevel:5,maxZoomLevel:15,defaultZoomLevel:13}}},SPM:{geobbox:[-60,43.5,-50,52],geocenter:[-56.173611,46.780556],defaultCRS:["IGNF:GEOPORTALSPM","IGNF:RGSPM06U21"],geoCRS:["IGNF:RGSPM06GEO"],displayCRS:["IGNF:RGSPM06GEO","CRS:84","EPSG:4326","IGNF:RGSPM06U21","EPSG:32606"],baseLayers:{"IGNF:GEOPORTALSPM":{minZoomLevel:5,maxZoomLevel:18,defaultZoomLevel:14},"IGNF:RGSPM06U21":{minZoomLevel:5,maxZoomLevel:18,defaultZoomLevel:14}}},WLD:{geobbox:[-180,-90,180,90],geocenter:[2.345274398,48.860832558],defaultCRS:["IGNF:MILLER"],geoCRS:[OpenLayers.Projection.CRS84],displayCRS:[OpenLayers.Projection.CRS84],baseLayers:{"IGNF:MILLER":{minZoomLevel:0,maxZoomLevel:4,defaultZoomLevel:4}}},WLF:{geobbox:[-178.5,-14.6,-175.8,-12.8],geocenter:[-176.173611,-13.283333],defaultCRS:["IGNF:GEOPORTALWLF","IGNF:UTM01SW84"],geoCRS:["IGNF:WGS84G"],displayCRS:["IGNF:WGS84G","CRS:84","EPSG:4326","IGNF:UTM01SW84","EPSG:32701"],baseLayers:{"IGNF:GEOPORTALWLF":{minZoomLevel:5,maxZoomLevel:17,defaultZoomLevel:14},"IGNF:UTM01SW84":{minZoomLevel:5,maxZoomLevel:17,defaultZoomLevel:14}}}};Geoportal.Catalogue.TERRITORIES.EUE=OpenLayers.Util.extend({},Geoportal.Catalogue.TERRITORIES.FXX);Geoportal.Catalogue.TERRITORIES.SBA=OpenLayers.Util.extend({},Geoportal.Catalogue.TERRITORIES.GLP);Geoportal.Catalogue.TERRITORIES.SBA.geobbox=[-63,17.75,-62.7,17.99];Geoportal.Catalogue.TERRITORIES.SBA.geocenter=[-62.85,17.895833];Geoportal.Catalogue.TERRITORIES.SMA=OpenLayers.Util.extend({},Geoportal.Catalogue.TERRITORIES.GLP);Geoportal.Catalogue.TERRITORIES.SMA.geobbox=[-63.19,18,-62.9,18.18];Geoportal.Catalogue.TERRITORIES.SMA.geocenter=[-63.088888,18.069722];Geoportal.Catalogue.TERRITORIES.ANF=OpenLayers.Util.extend({},Geoportal.Catalogue.TERRITORIES.GLP);Geoportal.Catalogue.TERRITORIES.ANF.geobbox=[-64,11.7,-59,18.18];Geoportal.Map=OpenLayers.Class(OpenLayers.Map,{catalogue:null,beforeOnBeforeMove:function(a){},afterOnBeforeMove:function(a){},initialize:function(m,g){OpenLayers.Map.prototype.initialize.apply(this,arguments);this.setCursor(this.cursor||"crosshair");if(this.proxy){this.setProxyUrl(this.proxy)}this.events.register("beforemove",this,this.onBeforeMove);this.events.register("changebaselayer",this,this.changeBaseLayer);this.events.register("changedisplayprojection",this,this.changeDisplayProjection);this.events.register("changelayer",this,this.updateZoomLevels);if(this.catalogue){this.catalogue.map=this}if(this.catalogue&&this.apiKey){var f;this.allowedGeoportalLayers=[];for(var h=0,b=this.apiKey.length;h<b;h++){f=this.apiKey[h];if(this.catalogue[f]&&this.catalogue[f].allowedGeoportalLayers){for(var a=0,j=this.catalogue[f].allowedGeoportalLayers.length;a<j;a++){this.allowedGeoportalLayers.push(this.catalogue[f].allowedGeoportalLayers[a])}}}}var d=this.getControlsByClass("Geoportal.Control.PermanentLogo");if(d==null||d.length==0){this.addControl(new Geoportal.Control.PermanentLogo())}d=this.getControlsByClass("Geoportal.Control.TermsOfService");if(d==null||d.length==0){this.addControl(new Geoportal.Control.TermsOfService())}},render:function(a){this.viewer.render(a)},destroy:function(){this.displayProjection=null;if(this.catalogue){if(this.apiKey){var b;for(var d=0,a=this.apiKey.length;d<a;d++){b=this.apiKey[d];if(this.catalogue[b]){this.catalogue[b].bounds=null;for(var f in this.catalogue[b].layers){if(this.catalogue[b].layers.hasOwnProperty(f)){this.catalogue[b].layers[f]=null}}this.catalogue[b].layers=null;this.catalogue[b]=null}}}this.catalogue.destroy();this.catalogue=null;this.allowedGeoportalLayers=null}this.events.unregister("changelayer",this,this.updateZoomLevels);this.events.unregister("changedisplayprojection",this,this.changeDisplayProjection);this.events.unregister("changebaselayer",this,this.changeBaseLayer);this.events.unregister("beforemove",this,this.onBeforeMove);OpenLayers.Map.prototype.destroy.apply(this,arguments)},onBeforeMove:function(q){this.beforeOnBeforeMove(q);var b=q.forceZoomChange||((this.isValidZoomLevel(q.zoom))&&(q.zoom!=this.getZoom()));var j=(this.getProjection()?this.getProjection().getProjName()=="longlat"?0.000028:1:undefined);var f=!(q.lonlat&&this.isValidLonLat(q.lonlat)&&q.lonlat.equals(this.center,j));if((b||f)&&this.baseLayer){var d=q.zoom-(this.center==null?this.baseLayer.minZoomLevel:this.getZoom());var o=q.lonlat?q.lonlat.clone():this.center;if(!o&&this.size){var a=new OpenLayers.Pixel(this.size.w/2,this.size.h/2);o=this.getLonLatFromViewPortPx(a)}if(!o){o=this.getMaxExtent().getCenterLonLat()}var p=((d<0&&typeof(this.baseLayer.minZoomLevel)=="number"&&q.zoom<this.baseLayer.minZoomLevel)||(d>0&&typeof(this.baseLayer.maxZoomLevel)=="number"&&q.zoom>this.baseLayer.maxZoomLevel));var u=(o&&!this.baseLayer.maxExtent.containsLonLat(o,false));if(p||u){for(var h=0,l=this.getNumLayers();h<l;h++){var g=this.layers[h];if(!g.isBaseLayer||g==this.baseLayer){continue}if((p&&(((d<0&&typeof(g.minZoomLevel)=="number"&&g.minZoomLevel<=q.zoom)||(d>0&&typeof(g.maxZoomLevel)=="number"&&q.zoom<=g.maxZoomLevel))))||u){var r=g.projection;var m=o.clone();var v=g.maxExtent;if(!v){if(r.domainOfValidity){v=r.domainOfValidity.clone();v.transform(OpenLayers.Projection.CRS84,r)}}if(v){m.transform(this.getProjection(),r);if(v.containsLonLat(m,false)){if((u||q.lonlat)&&!p){if(typeof(g.maxZoomLevel)=="number"&&q.zoom>g.maxZoomLevel){q.zoom=g.maxZoomLevel}else{if(typeof(g.minZoomLevel)=="number"&&q.zoom<g.minZoomLevel){q.zoom=g.minZoomLevel}}}this.setBaseLayer(g,o,q.zoom);return false}}m=null}}}if(b){if(q.zoom<this.baseLayer.minZoomLevel){q.zoom=this.baseLayer.minZoomLevel}if(q.zoom>this.baseLayer.maxZoomLevel){q.zoom=this.baseLayer.maxZoomLevel}}if(f){if(u){q.lonlat=this.center?this.center.clone():null}}}this.afterOnBeforeMove(q);return true},changeBaseLayer:function(a){if(!a){return}if(!a.layer){return}a.layer.visibility=!(a.layer instanceof Geoportal.Layer);this.units=a.layer.units;this.resolutions=a.layer.resolutions;a.layer.map.projection=a.layer.getNativeProjection().getCode();a.layer.map.displayProjection=a.layer.displayProjection?a.layer.displayProjection.clone():a.layer.getNativeProjection().clone()},changeDisplayProjection:function(a){if(a){this.displayProjection=a.displayProjection}},setLocale:function(a){OpenLayers.Lang.setCode(a);this.events.triggerEvent("changelang",{lang:a})},isMapReady:function(){return true},zoomToLonLatExtent:function(g,f){var b=g.getCenterLonLat();b=b.transform(OpenLayers.Projection.CRS84,this.getProjection());var h=g.clone().transform(OpenLayers.Projection.CRS84,this.getProjection(),true);if(this.baseLayer.wrapDateLine){var a=this.getMaxExtent();h=h.clone();while(h.right<h.left){h.right+=a.getWidth()}b=h.getCenterLonLat().wrapDateLine(a)}var d=this.getZoomForExtent(h,f)||0;this.setCenter(b,d)},setCenter:function(a,b,d,f){if(typeof(b)=="number"){if(typeof(this.minZoomLevel)=="number"&&b<this.minZoomLevel){b=this.minZoomLevel}if(typeof(this.maxZoomLevel)=="number"&&b>this.maxZoomLevel){b=this.maxZoomLevel}}else{b=this.getZoom()}OpenLayers.Map.prototype.setCenter.apply(this,[a,b,d,f])},setLonLatCenter:function(g,f,a,d,h){var b=new OpenLayers.LonLat(g,f);if(b){this.setCenter(b,a,d,h)}},setCenterAtLonLat:function(g,f,a,d,h){if(typeof(g)=="string"){g=Geoportal.Util.dmsToDeg(g)}if(typeof(f)=="string"){f=Geoportal.Util.dmsToDeg(f)}var b=new OpenLayers.LonLat(g,f);if(b){b.transform(OpenLayers.Projection.CRS84,this.getProjection());this.setCenter(b,a,d,h)}},setCursor:function(a){this.div.style.cursor=a},setProxyUrl:function(a){OpenLayers.Request.setProxyUrl(a)},getPopupDefaults:function(b){var d=false;if(b=="WFS"){d=true}var a={multipleKey:null,toggleKey:null,multiple:false,clickout:true,toggle:!d,hover:d,highlightOnly:false,box:false,onBeforeSelect:function(){},onSelect:(d?Geoportal.Control.hoverFeature:Geoportal.Control.selectFeature),onUnselect:Geoportal.Control.unselectFeature,scope:null,geometryTypes:null,callbacks:null,selectStyle:null,renderIntent:"select"};return a},addLayer:function(f,E,g,B,d){var D=null;var C=null;if(E&&!(typeof(E)=="string")){for(var r in E){if(E.hasOwnProperty(r)){var a={};a[r]=E[r];Geoportal.Lang.add(a);C=r;break}}}else{C=E}if(!C){C="#"+(this.getNumLayers()+1)}d=d||{};B=B||{};var b={isBaseLayer:false,visibility:false,view:{drop:true,zoomToExtent:true}};var F=false;switch(f){case"WMS":b=OpenLayers.Util.extend(b,{opacity:0.5,buffer:0,singleTile:false});D=new OpenLayers.Layer.WMS(C,g,B,OpenLayers.Util.extend(b,d));break;case"MapServer":b=OpenLayers.Util.extend(b,{opacity:0.5,singleTile:false});D=new OpenLayers.Layer.MapServer(C,g,B,OpenLayers.Util.extend(b,d));break;case"WMS-C":b=OpenLayers.Util.extend(b,{opacity:0.5,buffer:0,singleTile:false,gridOrigin:new OpenLayers.LonLat(0,0),nativeTileSize:new OpenLayers.Size(256,256)});D=new Geoportal.Layer.WMSC(C,g,B,OpenLayers.Util.extend(b,d));break;case"WFS":b=OpenLayers.Util.extend(b,{extractAttributes:true,styleMap:new OpenLayers.StyleMap({strokeColor:"black",strokeWidth:2,strokeOpacity:0.5,fillOpacity:0.2,fillColor:"black"})});if(d.preventDefaultBehavior!==true){b.preFeatureInsert=Geoportal.Popup.setPointerCursorForFeature;B=OpenLayers.Util.applyDefaults(B,{maxFeatures:50});F=true}D=new Geoportal.Layer.WFS(C,g,B,OpenLayers.Util.extend(b,d));break;case"KML":case"GPX":case"OSM":case"GeoRSS":case"GML":var h=OpenLayers.Layer.GML;b=OpenLayers.Util.extend(b,{projection:this.getProjection(),panMapIfOutOfView:true,format:OpenLayers.Format.GML,formatOptions:{internalProjection:this.getProjection()}});if(d.preventDefaultBehavior!==true){b.preFeatureInsert=Geoportal.Popup.setPointerCursorForFeature;b.onFeatureInsert=Geoportal.Popup.Anchored.createPopUpForGMLFeature;F=true}switch(f){case"KML":b.format=OpenLayers.Format.KML;if(d.preventDefaultBehavior!==true){b.onFeatureInsert=Geoportal.Popup.Anchored.createPopUpForKMLFeature;b.formatOptions.extractStyles=true}break;case"GPX":b.format=Geoportal.Format.GPX;if(d.preventDefaultBehavior!==true){b.onFeatureInsert=Geoportal.Popup.Anchored.createPopUpForGPXFeature}break;case"OSM":b.format=OpenLayers.Format.OSM;b.originators=[{logo:"osm",pictureUrl:"http://wiki.openstreetmap.org/Wiki.png",url:"http://wiki.openstreetmap.org/wiki/Main_Page"}];if(d.preventDefaultBehavior!==true){b.onFeatureInsert=Geoportal.Popup.Anchored.createPopUpForGMLFeature}break;case"GeoRSS":b.format=OpenLayers.Format.GeoRSS;if(d.preventDefaultBehavior!==true){b.formatOptions.size=new OpenLayers.Size(250,150);b.formatOptions.autoSize=false;b.formatOptions.overflow="auto";b.styleMap=new OpenLayers.StyleMap(new OpenLayers.Style(OpenLayers.Util.applyDefaults({graphic:true,externalGraphic:OpenLayers.Util.getImagesLocation()+"marker-blue.png",graphicOpacity:0.8,graphicWidth:21,graphicHeight:25,graphicXOffset:-10.5,graphicYOffset:-25},OpenLayers.Feature.Vector.style["default"])));b.onFeatureInsert=Geoportal.Popup.Anchored.createPopUpForGeoRSSFeature}break;default:break}if(d.preventDefaultBehavior!==true&&h!==OpenLayers.Layer.GML){B.eventListeners=B.eventListeners||{};var j=B.eventListeners.loadend||undefined;B.eventListeners.loadend=function(){var o=this.getDataExtent();if(o){this.maxExtent=o;this.setVisibility(this.visibility&&this.calculateInRange())}if(j&&typeof(j)=="function"){j.apply(this,arguments)}}}OpenLayers.Util.extend(b.options,d.formatOptions);D=new h(C,g,OpenLayers.Util.extend(b,B));break;default:if(typeof(f)=="object"&&f instanceof OpenLayers.Layer){D=f;if(E&&!(typeof(E)=="string")){D.name=C}if(d.visibility!==undefined){D.visibility=d.visibility}if(d.preventDefaultBehavior!==true){F=(typeof(OpenLayers.Layer.Vector)!="undefined"&&(D instanceof OpenLayers.Layer.Vector)&&(d.hasOwnProperty("onSelect")||d.hasOwnProperty("onUnselect")||d.hasOwnProperty("onBeforeSelect")||d.attachDefaultPopup===true))||(typeof(OpenLayers.Layer.Markers)!="undefined"&&(D instanceof OpenLayers.Layer.Markers))}break}return null}var w=!(D instanceof OpenLayers.Layer.Vector)&&(typeof(D.minZoomLevel)=="number"&&typeof(D.maxZoomLevel)=="number");if(!D.isBaseLayer&&w){for(var u=0,v=this.layers.length;u<v;u++){var l=this.layers[u];if(!l.isBaseLayer){continue}if(D.territory){if(l.territory==D.territory){this.adjustZoomLevels(l,D);break}continue}if(D.getCompatibleProjection(l)){if(D.maxExtent!=null){var z=D.maxExtent.clone();z.transform(D.getNativeProjection(),l.getNativeProjection());if(!(z.containsBounds(l.maxExtent,true,true)||l.maxExtent.containsBounds(z,true,true))){continue}}this.adjustZoomLevels(l,D);continue}}}if(!D.isBaseLayer&&D.getCompatibleProjection(this.baseLayer)===null){if(!(typeof(OpenLayers.Layer.WFS)!="undefined"&&(D instanceof OpenLayers.Layer.WFS))){D.displayInLayerSwitcher=false}}OpenLayers.Map.prototype.addLayer.apply(this,[D]);if(F){var m=this.getPopupDefaults(f);for(var q in m){if(d.hasOwnProperty(q)){m[q]=d[q]}}var p=new OpenLayers.Control.SelectFeature(D,m);this.addControl(p);if(D.visibility){p.activate()}this.events.on({changelayer:Geoportal.Map.onVisibilityChange,scope:p})}if(D.isBaseLayer){this.events.register("preaddlayer",D,Geoportal.Layer.onPreAddLayer)}else{if(typeof(OpenLayers.Layer.Vector.RootContainer)=="undefined"||!(D instanceof (OpenLayers.Layer.Vector.RootContainer))){this.events.register("changebaselayer",D,D.changeBaseLayer,1)}}return D},removeLayer:function(a,b){if(a.isBaseLayer){this.events.unregister("preaddlayer",a,Geoportal.Layer.onPreAddLayer)}else{if(typeof(OpenLayers.Layer.Vector.RootContainer)=="undefined"||!(a instanceof (OpenLayers.Layer.Vector.RootContainer))){this.events.unregister("changebaselayer",a,a.changeBaseLayer)}}OpenLayers.Map.prototype.removeLayer.apply(this,arguments)},adjustZoomLevels:function(a,b){if(!a){return}var d=b.minZoomLevel,f=b.maxZoomLevel;if(d!=undefined&&(a.minZoomLevel==undefined||d<a.minZoomLevel)){a.minZoomLevel=d;if(a.resolutions){a.maxResolution=a.resolutions[d]}if(a.scales){a.minScale=a.scales[d]}}if(f!=undefined&&(a.maxZoomLevel==undefined||f>a.maxZoomLevel)){a.maxZoomLevel=f;if(a.resolutions){a.minResolution=a.resolutions[f]}if(a.scales){a.maxScale=a.scales[f]}}},updateZoomLevels:function(m){if(m.property!="visibility"){return}if(m.layer.isBaseLayer){return}if(m.layer.getCompatibleProjection(this.baseLayer)==null){return}if(m.layer instanceof OpenLayers.Layer.Vector){return}if(typeof(m.layer.minZoomLevel)!="number"){return}var d=m.layer.minZoomLevel;if(typeof(m.layer.maxZoomLevel)!="number"){return}var g=m.layer.maxZoomLevel;if(typeof(this.baseLayer.minZoomLevel)!="number"){return}var a=this.baseLayer.minZoomLevel;if(typeof(this.baseLayer.maxZoomLevel)!="number"){return}var f=this.baseLayer.maxZoomLevel;if(m.layer.getVisibility()){if(d>=a&&g<=f){return}if(d<a){a=d}if(g>f){f=g}}else{if(d!=a&&g!=f){return}a=Number.MAX_VALUE,f=Number.MIN_VALUE;for(var h=0,l=this.layers.length;h<l;h++){var j=this.layers[h];if(j.isBaseLayer){continue}if(j instanceof OpenLayers.Layer.Vector){continue}if(j.getCompatibleProjection(this.baseLayer)==null){continue}if(!j.getVisibility()){continue}if(typeof(j.minZoomLevel)!="number"){continue}if(j.minZoomLevel<a){a=j.minZoomLevel}if(typeof(j.maxZoomLevel)!="number"){continue}if(j.maxZoomLevel>f){f=j.maxZoomLevel}}if(a==Number.MAX_VALUE){a=this.baseLayer.minZoomLevel}if(f==Number.MIN_VALUE){f=this.baseLayer.maxZoomLevel}}var b=-1;if(this.baseLayer.name=="_WLD_world_"){if(!(4<=a&&a<=0)){a=this.baseLayer.minZoomLevel}if(!(4<=f&&f<=0)){f=this.baseLayer.maxZoomLevel}}else{if(this.baseLayer.name.match(/_..._territory_/)){if(!(5<=a&&a<=20)){a=this.baseLayer.minZoomLevel}if(!(5<=f&&f<=20)){f=this.baseLayer.maxZoomLevel}}}if(a>this.baseLayer.minZoomLevel&&this.getZoom()<a){b=a}if(f<this.baseLayer.maxZoomLevel&&this.getZoom()>f){b=f}if(this.baseLayer.minZoomLevel!=a){this.baseLayer.minZoomLevel=a;this.baseLayer.minResolution=this.baseLayer.resolutions[a];this.baseLayer.minScale=this.baseLayer.scales[a]}if(this.baseLayer.maxZoomLevel!=f){this.baseLayer.maxZoomLevel=f;this.baseLayer.maxResolution=this.baseLayer.resolutions[f];this.baseLayer.maxScale=this.baseLayer.scales[f]}if(b!=-1){this.moveTo(null,b)}},CLASS_NAME:"Geoportal.Map"});Geoportal.Map.onVisibilityChange=function(f){if(f.property&&f.property=="visibility"){var g=false,b=false;if(this.layers){for(var d=0,a=this.layers.length;d<a;d++){b=b||(this.layers[d].visibility&&this.layers[d].inRange);if(this.layers[d]==f.layer){g=true}}}else{g=this.layer==f.layer;b=this.layer.visibility&&this.layer.inRange}if(g){if(b){this.activate()}else{this.deactivate()}}}};Geoportal.Viewer=OpenLayers.Class({territory:"FXX",territories:null,map:null,projection:null,allowedDisplayProjections:null,displayProjection:null,nameInstance:"geoportalViewer",div:null,viewerSpecifics:["territory","projection","displayProjection","nameInstance"],variables:{},viewerOptions:{},loadTheme:function(){},loadLayout:function(a){return null},loadControls:function(a){},completeLayout:function(a){},browser:null,unloadDestroy:null,initialize:function(j,b){if(!j){j="geoportalViewerDiv"}this.div=OpenLayers.Util.getElement(j);if(!this.div){this.div=document.createElement("div");this.div.style.height="1px";this.div.style.width="1px"}var d=navigator.userAgent.toLowerCase();this.browser={version:(d.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(d)&&!/chrome/.test(d),opera:/opera/.test(d),msie:/msie/.test(d)&&!/opera/.test(d),mozilla:/mozilla/.test(d)&&!/(compatible|webkit)/.test(d),chrome:/chrome/.test(d)};b=b||{};this._setOptions(b);var a=this.loadLayout(b.layoutOptions);if(!a){OpenLayers.Console.error(OpenLayers.i18n("div.not.found",{id:this.div.id+"_OlMap"}))}var h="__OpenLayersCss__";var g=Geoportal.Util.loadCSS(OpenLayers._getScriptLocation()+"theme/default/style.css",h,"");var f="";if(g[1]){if(OpenLayers.Util.alphaHack()){f="__IE6OpenLayersCss__";Geoportal.Util.loadCSS(OpenLayers._getScriptLocation()+"theme/default/ie6-style.css",f,"")}f="__GoogleOpenLayersCss__";Geoportal.Util.loadCSS(OpenLayers._getScriptLocation()+"theme/default/google.css",f,"");f="__FramedCloudOpenLayersCss__";Geoportal.Util.loadCSS(OpenLayers._getScriptLocation()+"theme/default/framedCloud.css",f,"")}this.map=new Geoportal.Map(a,this.viewerOptions);this.loadTheme();if(this.browser.msie===true){OpenLayers.Element.addCss(".gpControlSliderBaseHandle{cursor:url("+Geoportal._getScriptLocation()+"theme/geoportal/img/roam.cur),pointer;}");OpenLayers.Element.addCss(".gpControlSliderBaseHandleDown{cursor:url("+Geoportal._getScriptLocation()+"theme/geoportal/img/roaming.cur),pointer;}")}if(b.theme){this.theme=b.theme;Geoportal.Util.loadCSS(b.theme,null,"")}if(b.useDefaultBaseLayers!==false){this._addTerritoriesBaselayers()}if(!this.allowedDisplayProjections){this.allowedDisplayProjections=this.viewerOptions.catalogue.getDisplayProjections(this.territory,null,true)}if(!this.displayProjection){this.displayProjection=this.allowedDisplayProjections[0].clone();this.getMap().displayProjection=this.displayProjection}if(b.controls==null||b.controls.length==0){this.loadControls(b.controlsOptions)}this.completeLayout(b.layoutOptions);this.unloadDestroy=OpenLayers.Function.bind(this.destroy,this);OpenLayers.Event.observe(window,"unload",this.unloadDestroy,false);OpenLayers.Event.stopObserving(window,"unload",OpenLayers.Event.unloadCache,false);OpenLayers.Event.observe(window,"unload",OpenLayers.Event.unloadCache,false)},destroy:function(){this.unloadDestroy=null;this.allowedDisplayProjections=null;this.projection=null;this.displayProjection=null;this.browser=null;if(this.div){this.div.innerHTML="";this.div=null}this.variables=null;this.viewerOptions=null;this.timeout=null},render:function(a){},_setOptions:function(u){if(Geoportal._scriptName.match(/^lib\/Geoportal(Min|Standard)?\.js$/)){OpenLayers._scriptName="lib/OpenLayers.js"}else{OpenLayers._scriptName="GeoportalExtended.js"}var a=OpenLayers.Lang.getCode();if(u.proxy){Proj4js.setProxyUrl(u.proxy)}if(u.territory!=undefined){if(u.territory instanceof Array){if(u.territory.length>0){this.territories=u.territory.slice();u.territory=this.territories[0]}else{this.territories=[];u.territory=undefined}}else{this.territories=[];this.territories.push(u.territory)}}else{this.territories=[]}for(var f=0,h=this.viewerSpecifics.length;f<h;f++){var b=this.viewerSpecifics[f];if(u[b]!=undefined){this[b]=u[b]}}var r=this._initMap(u);if(this.territories.length==0){this.territories.push(this.territory)}var l=u.resolutions;if(!l){l=r.getResolutions(this.territory,this.projection)}var q=u.maxExtent;if(!q){q=r.getExtent(null,this.projection)}var d=u.minZoomLevel;var g=u.maxZoomLevel;var p=u.zoom;if(p==undefined){if(u.resolutions){if(d&&g){p=d+g}else{p=10}p=(p-(p%2))/2;p=p>=0?Math.floor(p):Math.ceil(p)}else{if(l){p=r.getDefaultZoom(this.territory,this.projection)}else{p=0}}}this.viewerOptions={catalogue:r,defaultCenter:u.center||r.getCenter(this.territory,this.projection),defaultZoom:p,controls:(u.controls===null?null:(u.controls||[])),theme:null,cursor:u.cursor||"crosshair",mapmouseEventsEnable:(u.mapmouseEventsEnable===false?false:true),tileSize:new OpenLayers.Size(256,256),projection:this.projection.getCode(),displayProjection:this.displayProjection,maxExtent:q};if(typeof(d)!="undefined"){this.viewerOptions.restrictedMinZoomLevel=d}if(typeof(g)!="undefined"){this.viewerOptions.restrictedMaxZoomLevel=g}var m=null;if(u.resolutions||!l){m=["scales","resolutions","maxResolution","minResolution","maxScale","minScale","minExtent","maxExtent","numZoomLevels","maxZoomLevel"]}else{m=[]}m.push("events");m.push("restrictedExtent");m.push("fallThrough");m.push("eventListeners");m.push("proxy");m.push("apiKey");for(var b=0;b<m.length;b++){var j=m[b];if(u[j]!==undefined){this.viewerOptions[j]=u[j]}}this.viewerOptions.isMapReady=this.isMapReady;this.viewerOptions.viewer=this;this.timeout={}},_initMap:function(b){var f=new Geoportal.Catalogue(null,b);this.territory=f.getTerritory(this.territory);this.projection=f.getNativeProjection(this.territory,this.projection);if(this.displayProjection){if(!(this.displayProjection instanceof Array)){this.displayProjection=[this.displayProjection]}this.allowedDisplayProjections=this.displayProjection;for(var d=0,a=this.allowedDisplayProjections.length;d<a;d++){var g=this.allowedDisplayProjections[d];if(typeof(g)=="string"){this.allowedDisplayProjections[d]=new OpenLayers.Projection(g,{domainOfValidity:OpenLayers.Bounds.fromArray(Geoportal.Catalogue.TERRITORIES[this.territory].geobbox)})}}this.displayProjection=this.allowedDisplayProjections[0].clone()}return f},_addTerritoriesBaselayers:function(){var v=this.viewerOptions.catalogue;var B=v.getExtent();var r=this.projection.equals(v.getNativeProjection(this.territory));var g=this.projection.equals(Geoportal.Catalogue.TERRITORIES[this.territory].geoCRS[0]);var d=this.projection.getProjName()=="longlat";var D=[];var b=typeof(this.viewerOptions.restrictedMinZoomLevel)!="undefined";var f=typeof(this.viewerOptions.restrictedMaxZoomLevel)!="undefined";var p;for(var h=0,j=this.territories.length;h<j;h++){p=this.territories[h];if(p=="WLD"){this.territories[h]="!"+p;continue}if(!Geoportal.Catalogue.TERRITORIES.hasOwnProperty(p)||Geoportal.Catalogue.TERRITORIES[p].geobbox==undefined){continue}if(p!=v.getTerritory(p)){continue}var a=OpenLayers.Bounds.fromArray(Geoportal.Catalogue.TERRITORIES[p].geobbox);if(B.containsBounds(a,true,true)||a.containsBounds(B,true,true)){var u=(p==this.territory?this.projection:(r&&!d?Geoportal.Catalogue.TERRITORIES[p].defaultCRS[0]:(g&&d?Geoportal.Catalogue.TERRITORIES[p].geoCRS[0]:null)));if(!u){a=null;continue}var m=v.getNativeProjection(p,((r&&!d)||(g&&d)?null:this.projection));a.transform(Geoportal.Catalogue.TERRITORIES[p].geoCRS[0],u,true);var l=v.getDefaultMinZoom(p,m);var C=v.getDefaultMaxZoom(p,m);if(b===true){if(this.viewerOptions.restrictedMinZoomLevel>C){continue}if(this.viewerOptions.restrictedMinZoomLevel>=l){l=this.viewerOptions.restrictedMinZoomLevel}}if(f===true){if(this.viewerOptions.restrictedMaxZoomLevel<l){continue}if(this.viewerOptions.restrictedMaxZoomLevel<=C){C=this.viewerOptions.restrictedMaxZoomLevel}}var q={isBaseLayer:true,displayInLayerSwitcher:false,projection:u,units:u.getUnits(),nativeProjection:m,resolutions:v.getResolutions(p,u),minZoomLevel:l,maxZoomLevel:C,maxExtent:a,territory:p,displayProjection:this.displayProjection||v.getDisplayProjections(p)[0],allowedDisplayProjections:this.allowedDisplayProjections||v.getDisplayProjections(p,null,true)};if(!m.equals(u)){q.nativeResolutions=v.getResolutions(p,m)}var E=new Geoportal.Layer("_"+p+"_territory_",q);if(p==this.territory){D.unshift(E)}else{D.push(E)}m=null;u=null}else{this.territories[h]="!"+this.territories[h]}a=null}B=null;var z=D.length;if(z>0){for(var w=0;w<z;w++){var E=D.shift();this.getMap().addLayer(E);if(b!==true){E.minZoomLevel=undefined}if(f!==true){E.maxZoomLevel=undefined}}}D=null;if(r||g){this._addWorldBaseLayer(v)}},_addWorldBaseLayer:function(p){var m=p.getTerritory("WLD");var b=p.getNativeProjection(m);var h=p.getResolutions(m,b);var d=p.getDefaultMinZoom(m,b);var f=p.getDefaultMaxZoom(m,b);var j=typeof(this.viewerOptions.restrictedMinZoomLevel)!="undefined";var g=typeof(this.viewerOptions.restrictedMaxZoomLevel)!="undefined";if(j===true){if(this.viewerOptions.restrictedMinZoomLevel>f){return}if(this.viewerOptions.restrictedMinZoomLevel>=d){d=this.viewerOptions.restrictedMinZoomLevel}}if(g===true){if(this.viewerOptions.restrictedMaxZoomLevel<d){return}if(this.viewerOptions.restrictedMaxZoomLevel<=f){f=this.viewerOptions.restrictedMaxZoomLevel}}var a={isBaseLayer:true,displayInLayerSwitcher:false,projection:b,units:b.getUnits(),nativeProjection:b,resolutions:h,minZoomLevel:d,maxZoomLevel:f,maxExtent:p.getExtent(m,b),territory:m,displayProjection:this.displayProjection||p.getDisplayProjections(m)[0],allowedDisplayProjections:this.allowedDisplayProjections||p.getDisplayProjections(m,null,true)};var l=new Geoportal.Layer("_WLD_world_",a);this.getMap().addLayer(l);if(j!==true){l.minZoomLevel=undefined}if(g!==true){l.maxZoomLevel=undefined}this.territories.push("WLD")},addSphericalMercatorBaseLayer:function(a){a=a||{};var b=new OpenLayers.Projection("EPSG:3785");var f={isBaseLayer:true,displayInLayerSwitcher:false,projection:b,units:b.getUnits(),nativeProjection:b,maxResolution:156543.0339,numZoomLevels:18,maxExtent:new OpenLayers.Bounds(-20037508.34,-20037509.92,20037508.34,20037509.92),territory:"WSM"};OpenLayers.Util.extend(f,a);var d=new OpenLayers.Layer("_WSM_world_",f);this.getMap().addLayer(d);return smBaselayer},addPlateCarreBaseLayer:function(f){f=f||{};var a=new OpenLayers.Projection("EPSG:4326");var b={isBaseLayer:true,displayInLayerSwitcher:false,projection:a,units:a.getUnits(),nativeProjection:a,maxResolution:1.40625,numZoomLevels:21,maxExtent:new OpenLayers.Bounds(-180,-90,180,90),territory:"WPC"};OpenLayers.Util.extend(b,f);var d=new OpenLayers.Layer("_WPC_world_",b);viewer.getMap().addLayer(d);return d},isMapReady:function(){return true},getTerritory:function(){return this.territory},getMap:function(){return this.map},addGeoportalLayer:function(d,m){var a=this.getMap();m=m||{};var l;for(var g=0,f=this.territories.length;g<f;g++){l=this.territories[g];if(!Geoportal.Catalogue.TERRITORIES.hasOwnProperty(l)){continue}if(a.getLayersBy("territory",l).length==0){continue}var j=a.catalogue.getLayerParameters(l,d);if(!j){continue}var h=null;if(typeof(m.minZoomLevel)!=="undefined"){if(m.minZoomLevel<j.options.minZoomLevel||m.minZoomLevel>j.options.maxZoomLevel){m.minZoomLevel=j.options.minZoomLevel}}if(typeof(m.maxZoomLevel)!=="undefined"){if(m.maxZoomLevel<j.options.minZoomLevel||m.maxZoomLevel>j.options.maxZoomLevel){m.maxZoomLevel=j.options.maxZoomLevel}}j.options=OpenLayers.Util.extend(j.options,m);if(typeof(this.viewerOptions.restrictedMinZoomLevel)!="undefined"){if(j.options.minZoomLevel<this.viewerOptions.restrictedMinZoomLevel){j.options.minZoomLevel=this.viewerOptions.restrictedMinZoomLevel}}if(typeof(this.viewerOptions.restrictedMaxZoomLevel)!="undefined"){if(j.options.maxZoomLevel>this.viewerOptions.restrictedMaxZoomLevel){j.options.maxZoomLevel=this.viewerOptions.restrictedMaxZoomLevel}}j.options.territory=l;var b=a.catalogue.getLayerGeoRMKey(l,j.resourceId);if(b!=null){j.options.GeoRM=Geoportal.GeoRMHandler.addKey(b,a.catalogue[b].tokenServer.url,a.catalogue[b].tokenServer.ttl,a,{transport:a.catalogue[b].transport})}if(!j.options.GeoRM){OpenLayers.Console.warn(OpenLayers.i18n("geoRM.forbidden",{layer:j.options.name}));return}h=new j.classLayer(j.options.name,j.url,j.params,j.options);if(h){if(!a.addLayer(h)){continue}a.events.register("changelayer",h,function(w){if(!w){return}if(!(w.property=="visibility"||w.property=="opacity")){return}if(w.layer===this){return}if(w.layer.getCompatibleProjection()==null){return}if(w.layer.name!=this.name){return}var p=w.layer[w.property];if(this.getCompatibleProjection()==null&&p!=this[w.property]){if(w.property=="visibility"){this.visibility=p;this.display(p);this.redraw()}else{this.setOpacity(p)}var u=this.map.getLayersBy("isBaseLayer",true);for(var r=0,o=u.length;r<o;r++){var q=u[r];if(q===this.map.baseLayer){continue}if(this.getCompatibleProjection(q)!=null){if(!this.savedStates[q.id]){this.savedStates[q.id]={}}this.savedStates[q.id][w.property]=p}}u=null}})}}},addGeoportalLayers:function(){var j=arguments.length>=1?arguments[0]:null;var b=arguments.length==2?arguments[1]:{};if(!j){j=this.getMap().allowedGeoportalLayers;if(!j||j.length==0){return}}var h=this.getMap().catalogue._orderLayersStack(j);var g={};if(b.global!==undefined){OpenLayers.Util.extend(g,b.global)}for(var d=0,a=h.length;d<a;d++){var f=b[h[d]]!==undefined?OpenLayers.Util.applyDefaults(b[h[d]],g):g;this.addGeoportalLayer(h[d],f)}},setSize:function(b,a){},addVariable:function(a,b){if(!a){return}if(this.variables[a]==undefined){this.variables[a]=b}},removeVariable:function(a){if(!a){return null}var b=this.variables[a];this.variables[a]=null;return b},getVariable:function(a){if(!a){return null}return this.variables[a]},CLASS_NAME:"Geoportal.Viewer"});Geoportal.Viewer.Default=OpenLayers.Class(Geoportal.Viewer,{mode:"normal",mapDiv:null,viewerSpecifics:["mode","territory","projection","displayProjection","nameInstance"],initialize:function(b,a){Geoportal.Viewer.prototype.initialize.apply(this,arguments)},render:function(l){var h=this.div;var f=h.offsetWidth,j=h.offsetHeight;this.div=OpenLayers.Util.getElement(l);this.div.style.overflow="hidden";var d=this.div.offsetWidth||f,g=this.div.offsetHeight||j;this.mapTbl.parentNode.removeChild(this.mapTbl);this.div.appendChild(this.mapTbl);this.ready={w:-1,h:-1,b:0};var a=(this.infoCntrl?(this.infoCntrl.div.style.display=="none"?false:true):false);this.setInformationPanelVisibility(true);if(!a){this.setInformationPanelVisibility(false)}},destroy:function(){if(!this.unloadDestroy){return}OpenLayers.Event.stopObserving(window,"unload",this.unloadDestroy);this.unloadDestroy=null;this.infoCntrl=null;this.lyrSwCntrl=null;this.toolBoxCntrl=null;this.logoCntrl=null;if(this.map){this.map=null}if(this.timeout){if(this.timeout[true]){window.clearTimeout(this.timeout[true]);this.timeout[true]=null}if(this.timeout[false]){window.clearTimeout(this.timeout[false]);this.timeout[false]=null}}Geoportal.Viewer.prototype.destroy.apply(this,arguments)},loadTheme:function(){Geoportal.Util.loadCSS(Geoportal._getScriptLocation()+"theme/geoportal/style.css","__GeoportalCss__","")},loadLayout:function(d){this.div.style.overflow="hidden";this.mapTbl=document.createElement("table");this.mapTbl.id=this.div.id+"_GpMap";this.mapTbl.cellSpacing=this.mapTbl.cellPadding="0";this.mapTbl.className="gpMainMap";var a=document.createElement("tbody");var f=document.createElement("tr");var g=document.createElement("td");g.id=this.div.id+"MapCell";g.className="gpMainMapCell";this.mapCell=g;this.mapDiv=document.createElement("div");this.mapDiv.id=this.div.id+"_OlMap";this.mapDiv.className="olMap gpMap";g.appendChild(this.mapDiv);f.appendChild(g);a.appendChild(f);this.mapTbl.appendChild(a);if(this.mode!="mini"){f=document.createElement("tr");f.vAlign="bottom";g=document.createElement("td");g.id=this.div.id+"InfoCell";g.className="gpInfoCell";this.mapInfoDiv=document.createElement("div");this.mapInfoDiv.id=this.div.id+"_Info";this.mapInfoDiv.className="gpControlInformation olControlNoSelect";g.appendChild(this.mapInfoDiv);this.infoCell=g;f.appendChild(g);a.appendChild(f)}else{this.infoCell=null;this.mapInfoDiv=null}this.div.appendChild(this.mapTbl);this.ready={w:-1,h:-1,b:0};this.mapDiv.style.width="1px";this.mapDiv.style.height="1px";return this.mapDiv},loadControls:function(a){a=a||{};var b=new OpenLayers.Control.KeyboardDefaults({activeOverMapOnly:a.activeOverMapOnly===false?false:true});this.getMap().addControl(b);b=new Geoportal.Control.Logo({logoSize:Geoportal.Control.Logo.WHSizes[this.mode],destroy:function(){if(this.map.viewer){this.map.viewer.logoCntrl=null}Geoportal.Control.Logo.prototype.destroy.apply(this,arguments)}});this.getMap().addControl(b);this.logoCntrl=b;b=new Geoportal.Control.ToolBox({destroy:function(){if(this.map.viewer){this.map.viewer.toolBoxCntrl=null}Geoportal.Control.ToolBox.prototype.destroy.apply(this,arguments)}});this.getMap().addControl(b);this.toolBoxCntrl=b;var d=(this.getMap().controls[this.getMap().controls.length-1]).id;b=new Geoportal.Control.NavToolbar({div:OpenLayers.Util.getElement(d+"_navbar")});this.getMap().addControl(b,new OpenLayers.Pixel(0,2));if(this.mode!="mini"){b=new Geoportal.Control.ZoomBar({div:OpenLayers.Util.getElement(d+"_zoombar")});this.getMap().addControl(b,new OpenLayers.Pixel(0,0));b=new Geoportal.Control.LayerSwitcher({destroy:function(){if(this.map.viewer){this.map.viewer.lyrSwCntrl=null}Geoportal.Control.LayerSwitcher.prototype.destroy.apply(this,arguments)}});this.getMap().addControl(b,new OpenLayers.Pixel(0,0));this.lyrSwCntrl=b;b=new Geoportal.Control.Information({div:this.mapInfoDiv,displayProjections:this.allowedDisplayProjections,destroy:function(){if(this.map.viewer){this.map.viewer.infoCntrl=null}Geoportal.Control.Information.prototype.destroy.apply(this,arguments)}});this.getMap().addControl(b);this.infoCntrl=b}},completeLayout:function(a){switch(this.mode){case"mini":this.setToolsPanelVisibility(false);this.setLayersPanelVisibility(false);this.setInformationPanelVisibility(false);break;default:this.openLayersPanel(true);this.openToolsPanel(true);this.setInformationPanelVisibility(true);break}},setSize:function(f,a){var b=this.div.offsetWidth-f;this.div.style.width=f+"px";var d=this.div.offsetHeight-a;this.div.style.height=a+"px";this.getMap().updateSize();if(this.infoCntrl){this.infoCntrl.updateSize()}if(this.logoCntrl){this.logoCntrl.changeLogoSize(Geoportal.Control.Logo.WHSizes[this.mode])}if(b!=0||d!=0){this.render(this.div)}},setToolsPanelVisibility:function(a){if(this.mode=="mini"){a=false}if(this.toolBoxCntrl){this.toolBoxCntrl.div.style.display=a?this.toolBoxCntrl.div.style.display="":this.toolBoxCntrl.div.style.display="none"}},setLayersPanelVisibility:function(a){if(this.mode=="mini"){a=false}if(this.lyrSwCntrl){this.lyrSwCntrl.div.style.display=a?this.lyrSwCntrl.div.style.display="":this.lyrSwCntrl.div.style.display="none"}},openToolsPanel:function(a){if(this.mode=="mini"){a=false}if(this.toolBoxCntrl){this.toolBoxCntrl.showControls(!a)}},openLayersPanel:function(a){if(this.mode=="mini"){a=false}if(this.lyrSwCntrl){this.lyrSwCntrl.showControls(!a)}},setInformationPanelVisibility:function(a){if(this.mode=="mini"){a=false}if(this.timeout[a]){window.clearTimeout(this.timeout[a]);this.timeout[a]=null}var l=false;if(!a&&this.timeout[!a]){l=true}else{var f=this.div.offsetHeight;var o=this.ready.h==-1;if(o){if(/\d(%|em|pt)/.test(this.div.style.height)){f=Geoportal.Util.convertToPixels(this.div.style.height,false,this.div.parentNode)||f}else{f=parseInt(this.div.style.height)||f}var g=this.mapCell.offsetHeight-this.mapCell.clientHeight;var m=this.mapCell.offsetWidth-this.mapCell.clientWidth;var j=f-(this.infoCntrl?this.mapInfoDiv.offsetHeight:0)-g;var d=this.div.offsetWidth-m;this.ready.h=j;this.ready.w=d;this.ready.b=g;l=!this.isMapReady();this.mapTbl.style.height=f+"px"}if(a){this.mapCell.style.height=this.ready.h+"px";if(this.infoCntrl){this.infoCntrl.div.style.display=""}}else{this.mapCell.style.height=(f-this.ready.b)+"px";if(this.infoCntrl){this.infoCntrl.div.style.display="none"}}if(this.infoCntrl){this.infoCell.style.height=this.mapInfoDiv.offsetHeight+"px"}this.mapCell.style.width=this.ready.w+"px";this.mapDiv.style.height=this.mapCell.style.height;this.mapDiv.style.width=this.mapCell.style.width;if(o){l=l||!this.isMapReady()}}if(l){if(a||(!a&&!this.timeout[!a])){this.ready.h=-1}this.timeout[a]=window.setTimeout(OpenLayers.Function.bind(function(h){this.setInformationPanelVisibility(h)},this,a),500)}else{this.setSize(this.div.offsetWidth,this.div.offsetHeight)}},isMapReady:function(){var a=(this.mapTbl!=null&&this.mapCell!=null&&(this.infoCntrl?this.infoCell!=null:true)&&(this.infoCntrl?this.mapInfoDiv!=null:true)&&this.div!=null&&!(this.mapCell.clientHeight==1)&&(this.infoCntrl?this.mapCell.clientHeight>this.infoCell.clientHeight:true)&&(this.infoCntrl?this.mapInfoDiv.offsetHeight==this.infoCell.offsetHeight:true)&&this.div.offsetWidth==this.div.scrollWidth&&this.div.offsetWidth==this.mapTbl.offsetWidth&&this.div.offsetWidth==this.mapTbl.scrollWidth&&this.div.offsetHeight==this.div.scrollHeight&&this.div.offsetHeight==this.mapTbl.offsetHeight&&this.div.offsetHeight==this.mapTbl.scrollHeight);return a},CLASS_NAME:"Geoportal.Viewer.Default"});Geoportal.Viewer.Standard=OpenLayers.Class(Geoportal.Viewer,{mapDiv:null,initialize:function(b,a){Geoportal.Viewer.prototype.initialize.apply(this,arguments)},render:function(l){var h=this.div;var f=h.offsetWidth,j=h.offsetHeight;this.div=OpenLayers.Util.getElement(l);this.div.style.overflow="hidden";var d=this.div.offsetWidth||f,g=this.div.offsetHeight||j;this.mapTbl.parentNode.removeChild(this.mapTbl);this.div.appendChild(this.mapTbl);this.ready={w:-1,h:-1,b:0};var a=(this.infoCntrl?(this.infoCntrl.div.style.display=="none"?false:true):false);this.setInformationPanelVisibility(true);if(!a){this.setInformationPanelVisibility(false)}},destroy:function(){if(!this.unloadDestroy){return}OpenLayers.Event.stopObserving(window,"unload",this.unloadDestroy);this.unloadDestroy=null;this.sep2Div=null;this.toolboxDiv=null;this.infoTgDiv=null;this.rT=null;this.toolsDiv=null;this.mapInfoDiv=null;this.lT=null;this.layersDiv=null;this.fullScDiv=null;this.catalgDiv=null;this.sep1Div=null;this.infoCntrl=null;if(this.map){this.map=null}if(this.mapDiv){this.mapDiv=null}if(this.timeout){if(this.timeout[true]){window.clearTimeout(this.timeout[true]);this.timeout[true]=null}if(this.timeout[false]){window.clearTimeout(this.timeout[false]);this.timeout[false]=null}}Geoportal.Viewer.prototype.destroy.apply(this,arguments)},loadTheme:function(){Geoportal.Util.loadCSS(Geoportal._getScriptLocation()+"theme/geoportal/style.css","__GeoportalCss__","");Geoportal.Util.loadCSS(Geoportal._getScriptLocation()+"theme/geoportal/standard.css","__StandardCss__","")},loadLayout:function(o){var d=navigator.userAgent.toLowerCase();this.div.style.overflow="hidden";this.mapTbl=document.createElement("table");this.mapTbl.id=this.div.id+"_GpMap";this.mapTbl.cellSpacing=this.mapTbl.cellPadding="0";this.mapTbl.className="gpMainMap";var m=document.createElement("tbody");var a=document.createElement("tr");var j=document.createElement("td");j.colSpan="3";j.className="gpViewerUpperSeparator";this.fullScDiv=document.createElement("div");this.fullScDiv.id=this.div.id+"_fullScreenToggle";this.fullScDiv.className="gpHorizontalUpperToggle";j.appendChild(this.fullScDiv);a.appendChild(j);m.appendChild(a);this.mapTbl.appendChild(m);this.catalgDiv=document.createElement("div");this.catalgDiv.id=this.div.id+"_Catalg";this.catalgDiv.className="gpLeftColumn";this.layersDiv=document.createElement("div");this.layersDiv.id=this.div.id+"_Layers";this.layersDiv.className="gpLeftColumnLayers";this.catalgDiv.appendChild(this.layersDiv);this.lT=document.createElement("div");this.lT.id=this.div.id+"_LayersToggle";this.lT.className="gpVerticalLeftToggle";this.catalgDiv.appendChild(this.lT);a=document.createElement("tr");j=document.createElement("td");j.vAlign="top";j.className="gpLeftColumnCell";this.leftCell=j;j.appendChild(this.catalgDiv);a.appendChild(j);var h=document.createElement("table");h.id=this.div.id+"_GpMap2";h.cellSpacing=h.cellPadding="0";h.className="gpMainMap";var l=document.createElement("tbody");var f=document.createElement("tr");var g=document.createElement("td");g.id=this.div.id+"MapCell";g.className="gpMainMapCell";this.mapCell=g;this.mapDiv=document.createElement("div");this.mapDiv.id=this.div.id+"_OlMap";this.mapDiv.className="olMap gpMap";g.appendChild(this.mapDiv);f.appendChild(g);l.appendChild(f);h.appendChild(l);this.mapInfoDiv=document.createElement("div");this.mapInfoDiv.id=this.div.id+"_Info";this.mapInfoDiv.className="gpControlInformation olControlNoSelect";f=document.createElement("tr");f.vAlign="bottom";g=document.createElement("td");g.id=this.div.id+"InfoCell";g.className="gpInfoCell";this.infoCell=g;g.appendChild(this.mapInfoDiv);f.appendChild(g);l.appendChild(f);j=document.createElement("td");j.className="gpCentralColumnCell";j.appendChild(h);a.appendChild(j);this.toolsDiv=document.createElement("div");this.toolsDiv.id=this.div.id+"_Tools";this.toolsDiv.className="gpRightColumn";this.rT=document.createElement("div");this.rT.id=this.div.id+"_ToolsToggle";this.rT.className="gpVerticalRightToggle";this.toolsDiv.appendChild(this.rT);this.toolboxDiv=document.createElement("div");this.toolboxDiv.id=this.div.id+"_ToolBx";this.toolboxDiv.className="gpRightColumnTools";this.toolsDiv.appendChild(this.toolboxDiv);j=document.createElement("td");j.appendChild(this.toolsDiv);j.vAlign="top";j.className="gpRightColumnCell";this.rightCell=j;a.appendChild(j);m.appendChild(a);a=document.createElement("tr");j=document.createElement("td");j.colSpan="3";j.className="gpViewerLowerSeparator";this.infoTgDiv=document.createElement("div");this.infoTgDiv.id=this.div.id+"_infoToggle";this.infoTgDiv.className="gpHorizontalLowerToggle";j.appendChild(this.infoTgDiv);a.appendChild(j);m.appendChild(a);this.div.appendChild(this.mapTbl);OpenLayers.Event.observe(this.lT,"click",OpenLayers.Function.bindAsEventListener(this.onVHandleClick,{handle:this.lT,target:this.layersDiv,viewer:this}));OpenLayers.Event.observe(this.rT,"click",OpenLayers.Function.bindAsEventListener(this.onVHandleClick,{handle:this.rT,target:this.toolboxDiv,viewer:this}));this.ready={w:-1,h:-1,b:0};return this.mapDiv},onVHandleClick:function(d){var b=this.toOpen;if(b===undefined){b=this.target.style.display=="none"?true:false}if((b==true&&this.target.style.display=="none")||(b==false&&this.target.style.display!="none")){var a=Geoportal.Util.getComputedStyle(this.handle,"width",false);this.handle.className=this.handle.className=="gpVerticalLeftToggle"?"gpVerticalRightToggle":"gpVerticalLeftToggle";this.target.style.display=b?"":"none";if(b){this.target.parentNode.style.width=this.target.parentNode.savedWidth}else{this.target.parentNode.savedWidth=Geoportal.Util.getComputedStyle(this.target.parentNode,"width",false);this.target.parentNode.style.width=a}var f=this.viewer.mapCell.offsetWidth-this.viewer.mapCell.clientWidth;a=this.viewer.div.offsetWidth-this.viewer.mapTbl.rows[1].cells[0].offsetWidth-this.viewer.mapTbl.rows[1].cells[2].offsetWidth-f;this.viewer.ready.w=a;this.viewer.mapCell.style.width=this.viewer.ready.w+"px";this.viewer.mapDiv.style.width=this.viewer.mapCell.style.width;this.viewer.getMap().updateSize()}if(d!=null){OpenLayers.Event.stop(d)}},loadControls:function(a){a=a||{};var b=new OpenLayers.Control.KeyboardDefaults({activeOverMapOnly:a.activeOverMapOnly===false?false:true});this.getMap().addControl(b);b=new Geoportal.Control.Logo({logoSize:Geoportal.Control.Logo.WHSizes.normal});this.getMap().addControl(b);b=new Geoportal.Control.LayerSwitcher({outsideViewport:true});this.getMap().addControl(b);this.layersDiv.appendChild(b.div);b=new Geoportal.Control.ToolBox({outsideViewport:true});this.getMap().addControl(b);this.toolboxDiv.appendChild(b.div);var d=(this.getMap().controls[this.getMap().controls.length-1]).id;b=new Geoportal.Control.NavToolbar({div:OpenLayers.Util.getElement(d+"_navbar")});this.getMap().addControl(b,new OpenLayers.Pixel(0,2));b=new Geoportal.Control.ZoomBar({div:OpenLayers.Util.getElement(d+"_zoombar")});this.getMap().addControl(b,new OpenLayers.Pixel(0,0));b=new Geoportal.Control.Information({div:this.mapInfoDiv,displayProjections:this.allowedDisplayProjections,destroy:function(){if(this.map.viewer){this.map.viewer.infoCntrl=null}Geoportal.Control.Information.prototype.destroy.apply(this,arguments)}});this.getMap().addControl(b);this.infoCntrl=b},completeLayout:function(a){this.setInformationPanelVisibility(true)},setSize:function(f,a){var b=this.div.offsetWidth-f;this.div.style.width=f+"px";var d=this.div.offsetHeight-a;this.div.style.height=a+"px";this.getMap().updateSize();if(this.infoCntrl){this.infoCntrl.updateSize()}if(b!=0||d!=0){this.render(this.div)}},openLayersPanel:function(a){if(this.lT){Geoportal.Viewer.Standard.prototype.onVHandleClick.apply({handle:this.lT,toOpen:a,target:this.layersDiv,viewer:this})}},openToolsPanel:function(a){if(this.rT){Geoportal.Viewer.Standard.prototype.onVHandleClick.apply({handle:this.rT,toOpen:a,target:this.toolboxDiv,viewer:this})}},setLayersPanelVisibility:function(a){this.openLayersPanel(a)},setToolsPanelVisibility:function(a){this.openToolsPanel(a)},setInformationPanelVisibility:function(a){if(this.timeout[a]){window.clearTimeout(this.timeout[a]);this.timeout[a]=null}var l=false;if(!a&&this.timeout[!a]){l=true}else{var f=this.div.offsetHeight;var o=this.ready.h==-1;if(o){if(/\d(%|em|pt)/.test(this.div.style.height)){f=Geoportal.Util.convertToPixels(this.div.style.height,false,this.div.parentNode)||f}else{f=parseInt(this.div.style.height)||f}var g=this.mapCell.offsetHeight-this.mapCell.clientHeight;var m=this.mapCell.offsetWidth-this.mapCell.clientWidth;var j=-this.mapTbl.rows[0].offsetHeight+f-this.mapInfoDiv.offsetHeight-this.mapTbl.rows[2].offsetHeight-g;var d=this.div.offsetWidth-this.mapTbl.rows[1].cells[0].offsetWidth-this.mapTbl.rows[1].cells[2].offsetWidth-m;this.ready.h=j;this.ready.w=d;this.ready.b=g;l=!this.isMapReady();this.mapTbl.style.height=f+"px";this.mapTbl.rows[1].cells[0].style.height=this.mapTbl.rows[1].cells[1].style.height=this.mapTbl.rows[1].cells[2].style.height=(-this.mapTbl.rows[0].offsetHeight+f-this.mapTbl.rows[2].offsetHeight-this.ready.b)+"px";this.toolsDiv.style.height=this.catalgDiv.style.height=this.mapCell.parentNode.parentNode.parentNode.style.height=(-this.mapTbl.rows[0].offsetHeight+f-this.mapTbl.rows[2].offsetHeight)+"px"}if(a){this.mapCell.style.height=this.ready.h+"px";if(this.infoCntrl){this.infoCntrl.div.style.display=""}}else{this.mapCell.style.height=(-this.mapTbl.rows[0].offsetHeight+f-this.mapTbl.rows[2].offsetHeight-this.ready.b)+"px";if(this.infoCntrl){this.infoCntrl.div.style.display="none"}}this.infoCell.style.height=this.mapInfoDiv.offsetHeight+"px";this.mapCell.style.width=this.ready.w+"px";this.mapDiv.style.height=this.mapCell.style.height;this.mapDiv.style.width=this.mapCell.style.width;if(o){l=l||!this.isMapReady()}}if(l){if(a){this.ready.h=-1}this.timeout[a]=window.setTimeout(OpenLayers.Function.bind(function(h){this.setInformationPanelVisibility(h)},this,a),500)}else{this.setSize(this.div.offsetWidth,this.div.offsetHeight)}},isMapReady:function(){var a=(this.mapTbl!=null&&this.mapCell!=null&&this.infoCell!=null&&this.mapInfoDiv!=null&&this.div!=null&&!(this.mapCell.clientHeight==1)&&this.mapCell.clientHeight>this.infoCell.clientHeight&&this.mapInfoDiv.offsetHeight==this.infoCell.offsetHeight&&this.div.offsetWidth==this.div.scrollWidth&&this.div.offsetWidth==this.mapTbl.offsetWidth&&this.div.offsetWidth==this.mapTbl.scrollWidth&&this.div.offsetHeight==this.div.scrollHeight&&this.div.offsetHeight==this.mapTbl.offsetHeight&&this.div.offsetHeight==this.mapTbl.scrollHeight);return a},CLASS_NAME:"Geoportal.Viewer.Standard"});
