/*
  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};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(g){var e=g.split("-");var b=e[0];for(var d=1,a=e.length;d<a;d++){var f=e[d];b+=f.charAt(0).toUpperCase()+f.substring(1)}return b},format:function(e,d,a){if(!d){d=window}var b=function(m,f){var j;var h=f.split(/\.+/);for(var g=0;g<h.length;g++){if(g==0){j=d}j=j[h[g]]}if(typeof j=="function"){j=a?j.apply(null,a):j()}if(typeof j=="undefined"){return"undefined"}else{return j}};return e.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,h,m){a=(typeof a!="undefined")?a:0;h=(typeof h!="undefined")?h: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 e=b[0];if(h){var f=/(-?[0-9]+)([0-9]{3})/;while(f.test(e)){e=e.replace(f,"$1"+h+"$2")}}var g;if(a==0){g=e}else{var j=b.length>1?b[1]:"0";if(a!=null){j=j+new Array(a-j.length+1).join("0")}g=e+m+j}return g}};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 e=a.concat(Array.prototype.slice.apply(arguments,[0]));return d.apply(b,e)}},bindAsEventListener:function(b,a){return function(d){return b.call(a,d||window.event)}},False:function(){return false},True:function(){return true}};if(!Function.prototype.bind){Function.prototype.bind=function(){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.Function.bind"}));Array.prototype.unshift.apply(arguments,[this]);return OpenLayers.Function.bind.apply(null,arguments)}}if(!Function.prototype.bindAsEventListener){Function.prototype.bindAsEventListener=function(a){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.Function.bindAsEventListener"}));return OpenLayers.Function.bindAsEventListener(this,a)}}OpenLayers.Array={filter:function(h,g,b){var e=[];if(Array.prototype.filter){e=h.filter(g,b)}else{var a=h.length;if(typeof g!="function"){throw new TypeError()}for(var d=0;d<a;d++){if(d in h){var f=h[d];if(g.call(b,f,d,h)){e.push(f)}}}}return e}};OpenLayers.Date={toISOString:(function(){if("toISOString" in Date.prototype){return function(b){return b.toISOString()}}else{function a(d,b){var e=d+"";while(e.length<b){e="0"+e}return e}return function(b){var d;if(isNaN(b.getTime())){d="Invalid Date"}else{d=b.getUTCFullYear()+"-"+a(b.getUTCMonth()+1,2)+"-"+a(b.getUTCDate(),2)+"T"+a(b.getUTCHours(),2)+":"+a(b.getUTCMinutes(),2)+":"+a(b.getUTCSeconds(),2)+"."+a(b.getUTCMilliseconds(),3)+"Z"}return d}}})(),parse:function(o){var b;var w=Date.parse(o);if(!isNaN(w)){b=new Date(w)}else{var j=o.match(/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{1,2}):(\d{2}):(\d{2}(?:\.\d+)?)(Z|(?:[+-]\d{1,2}(?::(\d{2}))?)))?$/);var b;if(j&&(j[1]||j[7])){var p=parseInt(j[1],10)||0;var m=(parseInt(j[2],10)-1)||0;var r=parseInt(j[3],10)||1;b=new Date(Date.UTC(p,m,r));var q=j[7];if(q){var u=parseInt(j[4],10);var e=parseInt(j[5],10);var a=parseFloat(j[6]);var v=a|0;var d=Math.round(1000*(a-v));b.setUTCHours(u,e,v,d);if(q!=="Z"){var h=parseInt(q,10);var g=parseInt(j[8])||0;var f=-1000*(60*(h*60)+g*60);b=new Date(b.getTime()+f)}}}else{b=new Date("invalid")}}return b}};OpenLayers.Class=function(){var f=function(){if(arguments&&arguments[0]!=OpenLayers.Class.isPrototype){this.initialize.apply(this,arguments)}};var d={};var h,b,e;for(var g=0,a=arguments.length;g<a;++g){e=arguments[g];if(typeof e=="function"){if(g==0&&a>1){b=e.prototype.initialize;e.prototype.initialize=function(){};d=new e();if(b===undefined){delete e.prototype.initialize}else{e.prototype.initialize=b}}h=e.prototype}else{h=e}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 e=arguments[0];var f=new e(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(f,arguments[d])}return f};OpenLayers.Util={};OpenLayers.Util.getElement=function(){var e=[];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}e.push(b)}return e};OpenLayers.Util.isElement=function(a){return !!(a&&a.nodeType===1)};if(typeof window.$==="undefined"){window.$=OpenLayers.Util.getElement}OpenLayers.Util.extend=function(a,f){a=a||{};if(f){for(var e in f){var d=f[e];if(d!==undefined){a[e]=d}}var b=typeof window.Event=="function"&&f instanceof window.Event;if(!b&&f.hasOwnProperty&&f.hasOwnProperty("toString")){a.toString=f.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(e,d){if(typeof e.indexOf=="function"){return e.indexOf(d)}else{for(var b=0,a=e.length;b<a;b++){if(e[b]==d){return b}}return -1}};OpenLayers.Util.modifyDOMElement=function(f,j,e,g,a,d,h,b){if(j){f.id=j}if(e){f.style.left=e.x+"px";f.style.top=e.y+"px"}if(g){f.style.width=g.w+"px";f.style.height=g.h+"px"}if(a){f.style.position=a}if(d){f.style.border=d}if(h){f.style.overflow=h}if(parseFloat(b)>=0&&parseFloat(b)<1){f.style.filter="alpha(opacity="+(b*100)+")";f.style.opacity=b}else{if(parseFloat(b)==1){f.style.filter="";f.style.opacity=""}}};OpenLayers.Util.createDiv=function(a,m,j,g,f,d,b,h){var e=document.createElement("div");if(g){e.style.backgroundImage="url("+g+")"}if(!a){a=OpenLayers.Util.createUniqueID("OpenLayersDiv")}if(!f){f="absolute"}OpenLayers.Util.modifyDOMElement(e,a,m,j,f,d,b,h);return e};OpenLayers.Util.createImage=function(a,j,h,f,e,d,g,m){var b=document.createElement("img");if(!a){a=OpenLayers.Util.createUniqueID("OpenLayersDiv")}if(!e){e="relative"}OpenLayers.Util.modifyDOMElement(b,a,j,h,e,d,null,g);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(f){b.src=f}return b};OpenLayers.Util.setOpacity=function(b,a){OpenLayers.Util.modifyDOMElement(b,null,null,null,null,null,null,a)};OpenLayers.Util.onImageLoad=function(){if(!this.viewRequestID||(this.map&&this.viewRequestID==this.map.viewRequestID)){this.style.display=""}OpenLayers.Element.removeClass(this,"olImageLoadError")};OpenLayers.IMAGE_RELOAD_ATTEMPTS=0;OpenLayers.Util.onImageLoadError=function(){this._attempts=(this._attempts)?(this._attempts+1):1;if(this._attempts<=OpenLayers.IMAGE_RELOAD_ATTEMPTS){var e=this.urls;if(e&&e instanceof Array&&e.length>1){var f=this.src.toString();var d,a;for(a=0;d=e[a];a++){if(f.indexOf(d)!=-1){break}}var g=Math.floor(e.length*Math.random());var b=e[g];a=0;while(b==d&&a++<4){g=Math.floor(e.length*Math.random());b=e[g]}this.src=f.replace(d,b)}else{this.src=this.src}}else{OpenLayers.Element.addClass(this,"olImageLoadError")}this.style.display=""};OpenLayers.Util.alphaHackNeeded=null;OpenLayers.Util.alphaHack=function(){if(OpenLayers.Util.alphaHackNeeded==null){var 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,h,g,d,e,j){OpenLayers.Util.modifyDOMElement(a,b,o,m,g,null,null,j);var f=a.childNodes[0];if(h){f.src=h}OpenLayers.Util.modifyDOMElement(f,a.id+"_innerImage",null,m,"relative",d);if(OpenLayers.Util.alphaHack()){if(a.style.display!="none"){a.style.display="inline-block"}if(e==null){e="scale"}a.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+f.src+"', sizingMethod='"+e+"')";if(parseFloat(a.style.opacity)>=0&&parseFloat(a.style.opacity)<1){a.style.filter+=" alpha(opacity="+a.style.opacity*100+")"}f.style.filter="alpha(opacity=0)"}};OpenLayers.Util.createAlphaImageDiv=function(b,o,m,h,g,d,e,j,p){var a=OpenLayers.Util.createDiv();var f=OpenLayers.Util.createImage(null,null,null,null,null,null,null,false);a.appendChild(f);if(p){f.style.display="none";OpenLayers.Event.observe(f,"load",OpenLayers.Function.bind(OpenLayers.Util.onImageLoad,a));OpenLayers.Event.observe(f,"error",OpenLayers.Function.bind(OpenLayers.Util.onImageLoadError,a))}OpenLayers.Util.modifyAlphaImageDiv(a,b,o,m,h,g,d,e,j);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(e,d){e=e||{};var b=typeof window.Event=="function"&&d instanceof window.Event;for(var a in d){if(e[a]===undefined||(!b&&d.hasOwnProperty&&d.hasOwnProperty(a)&&!e.hasOwnProperty(a))){e[a]=d[a]}}if(!b&&d&&d.hasOwnProperty&&d.hasOwnProperty("toString")&&!e.hasOwnProperty("toString")){e.toString=d.toString}return e};OpenLayers.Util.getParameterString=function(d){var b=[];for(var j in d){var h=d[j];if((h!=null)&&(typeof h!="function")){var e;if(typeof h=="object"&&h.constructor==Array){var f=[];var m;for(var a=0,g=h.length;a<g;a++){m=h[a];f.push(encodeURIComponent((m===null||m===undefined)?"":m))}e=f.join(",")}else{e=encodeURIComponent(h)}b.push(encodeURIComponent(j)+"="+e)}}return b.join("&")};OpenLayers.Util.urlAppend=function(a,b){var e=a;if(b){var d=(a+" ").split(/[?&]/);e+=(d.pop()===" "?b:d.length?"&"+b:"?"+b)}return e};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,f){var b=[];for(var e=0,a=d.length;e<a;e++){if(d[e].nodeName==f){b.push(d[e])}}return b};OpenLayers.Util.getTagText=function(d,e,b){var a=OpenLayers.Util.getNodes(d,e);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.deg=function(a){return a*180/Math.PI};OpenLayers.Util.VincentyConstants={a:6378137,b:6356752.3142,f:1/298.257223563};OpenLayers.Util.distVincenty=function(h,g){var p=OpenLayers.Util.VincentyConstants;var U=p.a,T=p.b,P=p.f;var u=OpenLayers.Util.rad(g.lon-h.lon);var S=Math.atan((1-P)*Math.tan(OpenLayers.Util.rad(h.lat)));var R=Math.atan((1-P)*Math.tan(OpenLayers.Util.rad(g.lat)));var r=Math.sin(S),m=Math.cos(S);var q=Math.sin(R),j=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),e=Math.cos(D);var V=Math.sqrt((j*K)*(j*K)+(m*q-r*j*e)*(m*q-r*j*e));if(V==0){return 0}var N=r*q+m*j*e;var J=Math.atan2(V,N);var o=Math.asin(m*j*K/V);var O=Math.cos(o)*Math.cos(o);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(o)*(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.Util.destinationVincenty=function(q,Y,N){var w=OpenLayers.Util;var m=w.VincentyConstants;var Z=m.a,W=m.b,S=m.f;var V=q.lon;var h=q.lat;var D=N;var M=w.rad(Y);var P=Math.sin(M);var j=Math.cos(M);var O=(1-S)*Math.tan(w.rad(h));var d=1/Math.sqrt((1+O*O)),o=O*d;var z=Math.atan2(O,j);var J=d*P;var R=1-J*J;var F=R*(Z*Z-W*W)/(W*W);var I=1+F/16384*(4096+F*(-768+F*(320-175*F)));var G=F/1024*(256+F*(-128+F*(74-47*F)));var H=D/(W*I),T=2*Math.PI;while(Math.abs(H-T)>1e-12){var r=Math.cos(2*z+H);var aa=Math.sin(H);var Q=Math.cos(H);var K=G*aa*(r+G/4*(Q*(-1+2*r*r)-G/6*r*(-3+4*aa*aa)*(-3+4*r*r)));T=H;H=D/(W*I)+K}var U=o*aa-d*Q*j;var e=Math.atan2(o*Q+d*aa*j,(1-S)*Math.sqrt(J*J+U*U));var v=Math.atan2(aa*P,d*Q-o*aa*j);var E=S/16*R*(4+S*(4-3*R));var p=v-(1-E)*S*J*(H+E*aa*(r+E*Q*(-1+2*r*r)));var g=Math.atan2(J,-U);return new OpenLayers.LonLat(V+w.deg(p),w.deg(e))};OpenLayers.Util.getParameters=function(b){b=b||window.location.href;var a="";if(OpenLayers.String.contains(b,"?")){var d=b.indexOf("?")+1;var f=OpenLayers.String.contains(b,"#")?b.indexOf("#"):b.length;a=b.substring(d,f)}var p={};var e=a.split(/[&;]/);for(var h=0,j=e.length;h<j;++h){var g=e[h].split("=");if(g[0]){var o=decodeURIComponent(g[0]);var m=g[1]||"";m=decodeURIComponent(m.replace(/\+/g," ")).split(",");if(m.length==1){m=m[0]}p[o]=m}}return p};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(e,a){var b;if(e){if(a==null){a="degrees"}var d=OpenLayers.Util.normalizeScale(e);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(g,f,d){d=d||{};OpenLayers.Util.applyDefaults(d,{ignoreCase:true,ignorePort80:true,ignoreHash:true});var b=OpenLayers.Util.createUrlObject(g,d);var a=OpenLayers.Util.createUrlObject(f,d);for(var e in b){if(e!=="args"){if(b[e]!=a[e]){return false}}}for(var e in b.args){if(b.args[e]!=a.args[e]){return false}delete a.args[e]}for(var e in a.args){return false}return true};OpenLayers.Util.createUrlObject=function(d,p){p=p||{};if(!(/^\w+:\/\//).test(d)){var h=window.location;var f=h.port?":"+h.port:"";var j=h.protocol+"//"+h.host.split(":").shift()+f;if(d.indexOf("/")===0){d=j+d}else{var g=h.pathname.split("/");g.pop();d=j+g.join("/")+"/"+d}}if(p.ignoreCase){d=d.toLowerCase()}var m=document.createElement("a");m.href=d;var e={};e.host=m.host.split(":").shift();e.protocol=m.protocol;if(p.ignorePort80){e.port=(m.port=="80"||m.port=="0")?"":m.port}else{e.port=(m.port==""||m.port=="0")?"80":m.port}e.hash=(p.ignoreHash||m.hash==="#")?"":m.hash;var b=m.search;if(!b){var o=d.indexOf("?");b=(o!=-1)?d.substr(o):""}e.args=OpenLayers.Util.getParameters(b);e.pathname=(m.pathname.charAt(0)=="/")?m.pathname:"/"+m.pathname;return e};OpenLayers.Util.removeTail=function(b){var d=null;var a=b.indexOf("?");var e=b.indexOf("#");if(a==-1){d=(e!=-1)?b.substr(0,e):b}else{d=(e!=-1)?b.substr(0,Math.min(a,e)):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,r,u){var o,f;var a=document.createElement("div");a.style.visibility="hidden";var q=(u&&u.containerElement)?u.containerElement:document.body;if(r){if(r.w){o=r.w;a.style.width=o+"px"}else{if(r.h){f=r.h;a.style.height=f+"px"}}}if(u&&u.displayClass){a.className=u.displayClass}var g=document.createElement("div");g.innerHTML=b;g.style.overflow="visible";if(g.childNodes){for(var e=0,d=g.childNodes.length;e<d;e++){if(!g.childNodes[e].style){continue}g.childNodes[e].style.overflow="visible"}}a.appendChild(g);q.appendChild(a);var p=false;var m=a.parentNode;while(m&&m.tagName.toLowerCase()!="body"){var j=OpenLayers.Element.getStyle(m,"position");if(j=="absolute"){p=true;break}else{if(j&&j!="static"){break}}m=m.parentNode}if(!p){a.style.position="absolute"}if(!o){o=parseInt(g.scrollWidth);a.style.width=o+"px"}if(!f){f=parseInt(g.scrollHeight)}a.removeChild(g);q.removeChild(a);return new OpenLayers.Size(o,f)};OpenLayers.Util.getScrollbarWidth=function(){var d=OpenLayers.Util._scrollbarWidth;if(d==null){var f=null;var e=null;var a=0;var b=0;f=document.createElement("div");f.style.position="absolute";f.style.top="-1000px";f.style.left="-1000px";f.style.width="100px";f.style.height="50px";f.style.overflow="hidden";e=document.createElement("div");e.style.width="100%";e.style.height="200px";f.appendChild(e);document.body.appendChild(f);a=e.offsetWidth;f.style.overflow="scroll";b=e.offsetWidth;document.body.removeChild(document.body.lastChild);OpenLayers.Util._scrollbarWidth=(a-b);d=OpenLayers.Util._scrollbarWidth}return d};OpenLayers.Util.getFormattedLonLat=function(j,b,f){if(!f){f="dms"}var e=Math.abs(j);var m=Math.floor(e);var a=(e-m)/(1/60);var d=a;a=Math.floor(a);var h=(d-a)/(1/60);h=Math.round(h*10);h/=10;if(m<10){m="0"+m}var g=m+"\u00B0";if(f.indexOf("dm")>=0){if(a<10){a="0"+a}g+=a+"'";if(f.indexOf("dms")>=0){if(h<10){h="0"+h}g+=h+'"'}}if(b=="lon"){g+=j<0?OpenLayers.i18n("W"):OpenLayers.i18n("E")}else{g+=j<0?OpenLayers.i18n("S"):OpenLayers.i18n("N")}return g};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 e=0;e<a.length;e++){a[e].style.backgroundColor=b}},changeOpacity:function(d,g){var e=g;var a="alpha(opacity="+g*100+")";d.style.opacity=e;d.style.filter=a;var b=d.parentNode.getElementsByTagName("span");for(var f=0;f<b.length;f++){b[f].style.opacity=e;b[f].style.filter=a}},reRound:function(e,d){var b=e.parentNode.childNodes[0];var a=e.parentNode.childNodes[2];e.parentNode.removeChild(b);e.parentNode.removeChild(a);this.round(e.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(e,f){var b="1px solid "+this._borderColor(f);var a="border-left: "+b;var g="border-right: "+b;var d="style='"+a+";"+g+"'";e.innerHTML="<div "+d+">"+e.innerHTML+"</div>"},_roundTopCorners:function(d,a,f){var e=this._createCorner(f);for(var b=0;b<this.options.numSlices;b++){e.appendChild(this._createCornerSlice(a,f,b,"top"))}d.style.paddingTop=0;d.insertBefore(e,d.firstChild)},_roundBottomCorners:function(d,a,f){var e=this._createCorner(f);for(var b=(this.options.numSlices-1);b>=0;b--){e.appendChild(this._createCornerSlice(a,f,b,"bottom"))}d.style.paddingBottom=0;d.appendChild(e)},_createCorner:function(b){var a=document.createElement("div");a.style.backgroundColor=(this._isTransparent()?"transparent":b);return a},_createCornerSlice:function(d,e,h,a){var f=document.createElement("span");var b=f.style;b.backgroundColor=d;b.display="block";b.height="1px";b.overflow="hidden";b.fontSize="1px";var g=this._borderColor(d,e);if(this.options.border&&h==0){b.borderTopStyle="solid";b.borderTopWidth="1px";b.borderLeftWidth="0px";b.borderRightWidth="0px";b.borderBottomWidth="0px";b.height="0px";b.borderColor=g}else{if(g){b.borderColor=g;b.borderStyle="solid";b.borderWidth="0px 1px"}}if(!this.options.compact&&(h==(this.options.numSlices-1))){b.height="2px"}this._setMargin(f,h,a);this._setBorder(f,h,a);return f},_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(e,f,b){var d=this._marginSize(f);var a=b=="top"?this._whichSideTop():this._whichSideBottom();if(a=="left"){e.style.marginLeft=d+"px";e.style.marginRight="0px"}else{if(a=="right"){e.style.marginRight=d+"px";e.style.marginLeft="0px"}else{e.style.marginLeft=d+"px";e.style.marginRight=d+"px"}}},_setBorder:function(e,f,b){var d=this._borderSize(f);var a=b=="top"?this._whichSideTop():this._whichSideBottom();if(a=="left"){e.style.borderLeftWidth=d+"px";e.style.borderRightWidth="0px"}else{if(a=="right"){e.style.borderRightWidth=d+"px";e.style.borderLeftWidth="0px"}else{e.style.borderLeftWidth=d+"px";e.style.borderRightWidth=d+"px"}}if(this.options.border!=false){e.style.borderLeftWidth=d+"px";e.style.borderRightWidth=d+"px"}},_marginSize:function(f){if(this._isTransparent()){return 0}var e=[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[f]}else{if(this.options.compact){return d[f]}else{if(this.options.blend){return a[f]}else{return e[f]}}}},_borderSize:function(f){var e=[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[f]}else{if(this.options.blend){return b[f]}else{if(this.options.border){return d[f]}else{if(this._isTransparent()){return e[f]}}}}}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 e=OpenLayers.Element.visible(b)?"hide":"show";OpenLayers.Element[e](b)}},hide:function(){for(var d=0,a=arguments.length;d<a;d++){var b=OpenLayers.Util.getElement(arguments[d]);if(b){b.style.display="none"}}},show:function(){for(var d=0,a=arguments.length;d<a;d++){var b=OpenLayers.Util.getElement(arguments[d]);if(b){b.style.display=""}}},remove:function(a){a=OpenLayers.Util.getElement(a);a.parentNode.removeChild(a)},getHeight:function(a){a=OpenLayers.Util.getElement(a);return a.offsetHeight},getDimensions:function(d){d=OpenLayers.Util.getElement(d);if(OpenLayers.Element.getStyle(d,"display")!="none"){return{width:d.offsetWidth,height:d.offsetHeight}}var b=d.style;var g=b.visibility;var e=b.position;var a=b.display;b.visibility="hidden";b.position="absolute";b.display="";var h=d.clientWidth;var f=d.clientHeight;b.display=a;b.position=e;b.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,e){d=OpenLayers.Util.getElement(d);var f=null;if(d&&d.style){f=d.style[OpenLayers.String.camelize(e)];if(!f){if(document.defaultView&&document.defaultView.getComputedStyle){var b=document.defaultView.getComputedStyle(d,null);f=b?b.getPropertyValue(e):null}else{if(d.currentStyle){f=d.currentStyle[OpenLayers.String.camelize(e)]}}}var a=["left","top","right","bottom"];if(window.opera&&(OpenLayers.Util.indexOf(a,e)!=-1)&&(OpenLayers.Element.getStyle(d,"position")=="static")){f="auto"}}return f=="auto"?null:f}};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,e,d){this.url=a;this.size=(b)?b:new OpenLayers.Size(20,20);this.offset=e?e:new OpenLayers.Pixel(-(this.size.w/2),-(this.size.h/2));this.calculateOffset=d;var f=OpenLayers.Util.createUniqueID("OL_Icon_");this.imageDiv=OpenLayers.Util.createAlphaImageDiv(f)},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(h,d,g,b,f,e){if(h==null){h=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")}this.id=h;this.lonlat=d;this.contentSize=(g!=null)?g: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 h=this.div.id+"_contentDiv";this.contentDiv=OpenLayers.Util.createDiv(h,null,this.contentSize.clone(),null,"relative");this.contentDiv.className=this.contentDisplayClass;this.groupDiv.appendChild(this.contentDiv);this.div.appendChild(this.groupDiv);if(f){this.addCloseBox(e)}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 f=b.top+b.bottom;this.fixPadding();a+=this.padding.left+this.padding.right;f+=this.padding.top+this.padding.bottom;if(this.closeDiv){var e=parseInt(this.closeDiv.style.width);a+=e+b.right}this.size.w+=a;this.size.h+=f;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 f="<div class='"+this.contentDisplayClass+"'>"+this.contentDiv.innerHTML+"</div>";var j=(this.map)?this.map.layerContainerDiv:document.body;var m=OpenLayers.Util.getRenderedDimensions(f,null,{displayClass:this.displayClass,containerElement:j});var h=this.getSafeContentSize(m);var g=null;if(h.equals(m)){g=m}else{var b=new OpenLayers.Size();b.w=(h.w<m.w)?h.w:null;b.h=(h.h<m.h)?h.h:null;if(b.w&&b.h){g=h}else{var e=OpenLayers.Util.getRenderedDimensions(f,b,{displayClass:this.contentDisplayClass,containerElement:j});var d=OpenLayers.Element.getStyle(this.contentDiv,"overflow");if((d!="hidden")&&(e.equals(h))){var a=OpenLayers.Util.getScrollbarWidth();if(b.w){e.h+=a}else{e.w+=a}}g=this.getSafeContentSize(e)}}this.setSize(g)},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 g=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 f=0,a=b.length;f<a;f++){var d=b[f];if(d.width==0||d.height==0){var e={popup:this,img:d};d._onImgLoad=OpenLayers.Function.bind(g,e);OpenLayers.Event.observe(d,"load",d._onImgLoad)}}},getSafeContentSize:function(p){var e=p.clone();var m=this.getContentDivPadding();var o=m.left+m.right;var h=m.top+m.bottom;this.fixPadding();o+=this.padding.left+this.padding.right;h+=this.padding.top+this.padding.bottom;if(this.closeDiv){var d=parseInt(this.closeDiv.style.width);o+=d+m.right}if(this.minSize){e.w=Math.max(e.w,(this.minSize.w-o));e.h=Math.max(e.h,(this.minSize.h-h))}if(this.maxSize){e.w=Math.min(e.w,(this.maxSize.w-o));e.h=Math.min(e.h,(this.maxSize.h-h))}if(this.map&&this.map.size){var g=0,f=0;if(this.keepInMap&&!this.panMapIfOutOfView){var j=this.map.getPixelFromLonLat(this.lonlat);switch(this.relativePosition){case"tr":g=j.x;f=this.map.size.h-j.y;break;case"tl":g=this.map.size.w-j.x;f=this.map.size.h-j.y;break;case"bl":g=this.map.size.w-j.x;f=j.y;break;case"br":g=j.x;f=j.y;break;default:g=j.x;f=this.map.size.h-j.y;break}}var a=this.map.size.h-this.map.paddingForPopups.top-this.map.paddingForPopups.bottom-h-f;var b=this.map.size.w-this.map.paddingForPopups.left-this.map.paddingForPopups.right-o-g;e.w=Math.min(e.w,b);e.h=Math.min(e.h,a)}return e},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 f=this.map.getSize();var e=this.map.getViewPortPxFromLayerPx(new OpenLayers.Pixel(parseInt(this.div.style.left),parseInt(this.div.style.top)));var d=e.clone();if(e.x<this.map.paddingForPopups.left){d.x=this.map.paddingForPopups.left}else{if((e.x+this.size.w)>(f.w-this.map.paddingForPopups.right)){d.x=f.w-this.map.paddingForPopups.right-this.size.w}}if(e.y<this.map.paddingForPopups.top){d.y=this.map.paddingForPopups.top}else{if((e.y+this.size.h)>(f.h-this.map.paddingForPopups.bottom)){d.y=f.h-this.map.paddingForPopups.bottom-this.size.h}}var b=e.x-d.x;var a=e.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,defaultFilter:null,initialize:function(a){a=a||{};OpenLayers.Util.extend(this,a);this.options=a},mergeWithDefaultFilter:function(b){var a;if(b&&this.defaultFilter){a=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.AND,filters:[this.defaultFilter,b]})}else{a=b||this.defaultFilter||undefined}return a},destroy:function(){this.options=null;this.format=null},read:function(a){a=a||{};a.filter=this.mergeWithDefaultFilter(a.filter)},create:function(){},update:function(){},"delete":function(){},commit:function(){},abort:function(a){},createCallback:function(d,a,b){return OpenLayers.Function.bind(function(){d.apply(this,[a,b])},this)},CLASS_NAME:"OpenLayers.Protocol"});OpenLayers.Protocol.Response=OpenLayers.Class({code:null,requestType:null,last:true,features:null,reqFeatures:null,priv:null,initialize:function(a){OpenLayers.Util.extend(this,a)},success:function(){return this.code>0},CLASS_NAME:"OpenLayers.Protocol.Response"});OpenLayers.Protocol.Response.SUCCESS=1;OpenLayers.Protocol.Response.FAILURE=0;OpenLayers.Renderer=OpenLayers.Class({container:null,root:null,extent:null,locked:false,size:null,resolution:null,map:null,initialize:function(a,b){this.container=OpenLayers.Util.getElement(a)},destroy:function(){this.container=null;this.extent=null;this.size=null;this.resolution=null;this.map=null},supported:function(){return false},setExtent:function(a,b){this.extent=a.clone();if(b){this.resolution=null}},setSize:function(a){this.size=a.clone();this.resolution=null},getResolution:function(){this.resolution=this.resolution||this.map.getResolution();return this.resolution},drawFeature:function(d,e){if(e==null){e=d.style}if(d.geometry){var f=d.geometry.getBounds();if(f){if(!f.intersectsBounds(this.extent)){e={display:"none"}}var g=this.drawGeometry(d.geometry,e,d.id);if(e.display!="none"&&e.label&&g!==false){var a=d.geometry.getCentroid();if(e.labelXOffset||e.labelYOffset){xOffset=isNaN(e.labelXOffset)?0:e.labelXOffset;yOffset=isNaN(e.labelYOffset)?0:e.labelYOffset;var b=this.getResolution();a.move(xOffset*b,yOffset*b)}this.drawText(d.id,e,a)}else{this.removeText(d.id)}return g}}},drawGeometry:function(d,a,b){},drawText:function(d,b,a){},removeText:function(a){},clear:function(){},getFeatureIdFromEvent:function(a){},eraseFeatures:function(e){if(!(e instanceof Array)){e=[e]}for(var d=0,a=e.length;d<a;++d){var b=e[d];this.eraseGeometry(b.geometry,b.id);this.removeText(b.id)}},eraseGeometry:function(b,a){},moveRoot:function(a){},getRenderLayerId:function(){return this.container.id},applyDefaultSymbolizer:function(b){var a=OpenLayers.Util.extend({},OpenLayers.Renderer.defaultSymbolizer);if(b.stroke===false){delete a.strokeWidth;delete a.strokeColor}if(b.fill===false){delete a.fillColor}OpenLayers.Util.extend(a,b);return a},CLASS_NAME:"OpenLayers.Renderer"});OpenLayers.Renderer.defaultSymbolizer={fillColor:"#000000",strokeColor:"#000000",strokeWidth:2,fillOpacity:1,strokeOpacity:1,pointRadius:0};OpenLayers.Strategy=OpenLayers.Class({layer:null,options:null,active:null,autoActivate:true,autoDestroy:true,initialize:function(a){OpenLayers.Util.extend(this,a);this.options=a;this.active=false},destroy:function(){this.deactivate();this.layer=null;this.options=null},setLayer:function(a){this.layer=a},activate:function(){if(!this.active){this.active=true;return true}return false},deactivate:function(){if(this.active){this.active=false;return true}return false},CLASS_NAME:"OpenLayers.Strategy"});OpenLayers.Symbolizer=OpenLayers.Class({zIndex:0,initialize:function(a){OpenLayers.Util.extend(this,a)},clone:function(){var Type=eval(this.CLASS_NAME);return new Type(OpenLayers.Util.extend({},this))},CLASS_NAME:"OpenLayers.Symbolizer"});OpenLayers.Rico.Color=OpenLayers.Class({initialize:function(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(e){if(e.length==4){var b=e;var e="#";for(var d=1;d<4;d++){e+=(b.charAt(d)+b.charAt(d))}}if(e.indexOf("#")==0){e=e.substring(1)}var g=e.substring(0,2);var f=e.substring(2,4);var a=e.substring(4,6);return new OpenLayers.Rico.Color(parseInt(g,16),parseInt(f,16),parseInt(a,16))};OpenLayers.Rico.Color.createColorFromBackground=function(e){var b=RicoUtil.getElementsComputedStyle(OpenLayers.Util.getElement(e),"backgroundColor","background-color");if(b=="transparent"&&e.parentNode){return OpenLayers.Rico.Color.createColorFromBackground(e.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,g,r){var d=0;var e=0;var u=0;if(g==0){d=parseInt(r*255+0.5);e=d;u=d}else{var j=(m-Math.floor(m))*6;var o=j-Math.floor(j);var b=r*(1-g);var a=r*(1-g*o);var v=r*(1-(g*(1-o)));switch(parseInt(j)){case 0:d=(r*255+0.5);e=(v*255+0.5);u=(b*255+0.5);break;case 1:d=(a*255+0.5);e=(r*255+0.5);u=(b*255+0.5);break;case 2:d=(b*255+0.5);e=(r*255+0.5);u=(v*255+0.5);break;case 3:d=(b*255+0.5);e=(a*255+0.5);u=(r*255+0.5);break;case 4:d=(v*255+0.5);e=(b*255+0.5);u=(r*255+0.5);break;case 5:d=(r*255+0.5);e=(b*255+0.5);u=(a*255+0.5);break}}return{r:parseInt(d),g:parseInt(e),b:parseInt(u)}};OpenLayers.Rico.Color.RGBtoHSB=function(a,h,q){var j;var f;var p;var u=(a>h)?a:h;if(q>u){u=q}var m=(a<h)?a:h;if(q<m){m=q}p=u/255;if(u!=0){f=(u-m)/u}else{f=0}if(f==0){j=0}else{var d=(u-a)/(u-m);var o=(u-h)/(u-m);var e=(u-q)/(u-m);if(a==u){j=e-o}else{if(h==u){j=2+d-e}else{j=4+o-d}}j=j/6;if(j<0){j=j+1}}return{h:j,s:f,b:p}};OpenLayers.Bounds=OpenLayers.Class({left:null,bottom:null,right:null,top:null,centerLonLat:null,initialize:function(e,a,b,d){if(e!=null){this.left=OpenLayers.Util.toFloat(e)}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(a){if(a===true){return[this.bottom,this.left,this.top,this.right]}else{return[this.left,this.bottom,this.right,this.top]}},toBBOX:function(b,f){if(b==null){b=6}var h=Math.pow(10,b);var g=Math.round(this.left*h)/h;var e=Math.round(this.bottom*h)/h;var d=Math.round(this.right*h)/h;var a=Math.round(this.top*h)/h;if(f===true){return e+","+g+","+a+","+d}else{return g+","+e+","+d+","+a}},toGeometry:function(){return new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing([new OpenLayers.Geometry.Point(this.left,this.bottom),new OpenLayers.Geometry.Point(this.right,this.bottom),new OpenLayers.Geometry.Point(this.right,this.top),new OpenLayers.Geometry.Point(this.left,this.top)])])},getWidth:function(){return(this.right-this.left)},getHeight:function(){return(this.top-this.bottom)},getSize:function(){return new OpenLayers.Size(this.getWidth(),this.getHeight())},getCenterPixel:function(){return new OpenLayers.Pixel((this.left+this.right)/2,(this.bottom+this.top)/2)},getCenterLonLat:function(){if(!this.centerLonLat){this.centerLonLat=new OpenLayers.LonLat((this.left+this.right)/2,(this.bottom+this.top)/2)}return this.centerLonLat},scale:function(f,d){if(d==null){d=this.getCenterLonLat()}var a,j;if(d.CLASS_NAME=="OpenLayers.LonLat"){a=d.lon;j=d.lat}else{a=d.x;j=d.y}var h=(this.left-a)*f+a;var b=(this.bottom-j)*f+j;var e=(this.right-a)*f+a;var g=(this.top-j)*f+j;return new OpenLayers.Bounds(h,b,e,g)},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,e,a){if(a==null){a=true}if(b==null||e==null){return false}b=OpenLayers.Util.toFloat(b);e=OpenLayers.Util.toFloat(e);var d=false;if(a){d=((b>=this.left)&&(b<=this.right)&&(e>=this.bottom)&&(e<=this.top))}else{d=((b>this.left)&&(b<this.right)&&(e>this.bottom)&&(e<this.top))}return d},intersectsBounds:function(f,b){if(b==null){b=true}var e=false;var j=(this.left==f.right||this.right==f.left||this.top==f.bottom||this.bottom==f.top);if(b||!j){var h=(((f.bottom>=this.bottom)&&(f.bottom<=this.top))||((this.bottom>=f.bottom)&&(this.bottom<=f.top)));var g=(((f.top>=this.bottom)&&(f.top<=this.top))||((this.top>f.bottom)&&(this.top<f.top)));var d=(((f.left>=this.left)&&(f.left<=this.right))||((this.left>=f.left)&&(this.left<=f.right)));var a=(((f.right>=this.left)&&(f.right<=this.right))||((this.right>=f.left)&&(this.right<=f.right)));e=((h||g)&&(d||a))}return e},containsBounds:function(h,b,a){if(b==null){b=false}if(a==null){a=true}var d=this.contains(h.left,h.bottom,a);var e=this.contains(h.right,h.bottom,a);var g=this.contains(h.left,h.top,a);var f=this.contains(h.right,h.top,a);return(b)?(d||e||g||f):(d&&e&&g&&f)},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(e,b){this.centerLonLat=null;var f=OpenLayers.Projection.transform({x:this.left,y:this.bottom},e,b);var a=OpenLayers.Projection.transform({x:this.right,y:this.bottom},e,b);var d=OpenLayers.Projection.transform({x:this.left,y:this.top},e,b);var g=OpenLayers.Projection.transform({x:this.right,y:this.top},e,b);this.left=Math.min(f.x,d.x);this.bottom=Math.min(f.y,a.y);this.right=Math.max(a.x,g.x);this.top=Math.max(d.y,g.y);return this},wrapDateLine:function(a,d){d=d||{};var e=d.leftTolerance||0;var b=d.rightTolerance||0;var f=this.clone();if(a){while(f.left<a.left&&(f.right-b)<=a.left){f=f.add(a.getWidth(),0)}while((f.left+e)>=a.right&&f.right>a.right){f=f.add(-a.getWidth(),0)}}return f},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+OpenLayers.Util.toFloat(d),this.lat+OpenLayers.Util.toFloat(a))},equals:function(b){var a=false;if(b!=null){a=((this.lon==b.lon&&this.lat==b.lat)||(isNaN(this.lon)&&isNaN(this.lat)&&isNaN(b.lon)&&isNaN(b.lat)))}return a},transform:function(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(a[0],a[1])};OpenLayers.Pixel=OpenLayers.Class({x:0,y:0,initialize:function(a,b){this.x=parseFloat(a);this.y=parseFloat(b)},toString:function(){return("x="+this.x+",y="+this.y)},clone:function(){return new OpenLayers.Pixel(this.x,this.y)},equals:function(a){var b=false;if(a!=null){b=((this.x==a.x&&this.y==a.y)||(isNaN(this.x)&&isNaN(this.y)&&isNaN(a.x)&&isNaN(a.y)))}return b},add:function(a,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:"",autoActivate:false,active:null,handler:null,eventListeners:null,events:null,EVENT_TYPES:["activate","deactivate"],initialize:function(a){this.displayClass=this.CLASS_NAME.replace("OpenLayers.","ol").replace(/\./g,"");OpenLayers.Util.extend(this,a);this.events=new OpenLayers.Events(this,null,this.EVENT_TYPES);if(this.eventListeners instanceof Object){this.events.on(this.eventListeners)}if(this.id==null){this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")}},destroy:function(){if(this.events){if(this.eventListeners){this.events.un(this.eventListeners)}this.events.destroy();this.events=null}this.eventListeners=null;if(this.handler){this.handler.destroy();this.handler=null}if(this.handlers){for(var a in this.handlers){if(this.handlers.hasOwnProperty(a)&&typeof this.handlers[a].destroy=="function"){this.handlers[a].destroy()}}this.handlers=null}if(this.map){this.map.removeControl(this);this.map=null}},setMap:function(a){this.map=a;if(this.handler){this.handler.setMap(a)}},draw:function(a){if(this.div==null){this.div=OpenLayers.Util.createDiv(this.id);this.div.className=this.displayClass;if(!this.allowSelection){this.div.className+=" olControlNoSelect";this.div.setAttribute("unselectable","on",0);this.div.onselectstart=OpenLayers.Function.False}if(this.title!=""){this.div.title=this.title}}if(a!=null){this.position=a.clone()}this.moveTo(this.position);return this.div},moveTo:function(a){if((a!=null)&&(this.div!=null)){this.div.style.left=a.x+"px";this.div.style.top=a.y+"px"}},activate:function(){if(this.active){return false}if(this.handler){this.handler.activate()}this.active=true;if(this.map){OpenLayers.Element.addClass(this.map.viewPortDiv,this.displayClass.replace(/ /g,"")+"Active")}this.events.triggerEvent("activate");return true},deactivate:function(){if(this.active){if(this.handler){this.handler.deactivate()}this.active=false;if(this.map){OpenLayers.Element.removeClass(this.map.viewPortDiv,this.displayClass.replace(/ /g,"")+"Active")}this.events.triggerEvent("deactivate");return true}return false},CLASS_NAME:"OpenLayers.Control"});OpenLayers.Control.TYPE_BUTTON=1;OpenLayers.Control.TYPE_TOGGLE=2;OpenLayers.Control.TYPE_TOOL=3;OpenLayers.Lang={code:null,defaultCode:"en",getCode:function(){if(!OpenLayers.Lang.code){OpenLayers.Lang.setCode()}return OpenLayers.Lang.code},setCode:function(b){var e;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"){e=d[0]}if(d[1]){var a=d[0]+"-"+d[1].toUpperCase();if(typeof OpenLayers.Lang[a]=="object"){e=a}}if(!e){OpenLayers.Console.warn("Failed to find OpenLayers.Lang."+d.join("-")+" dictionary, falling back to default language");e=OpenLayers.Lang.defaultCode}OpenLayers.Lang.code=e},translate:function(b,a){var e=OpenLayers.Lang[OpenLayers.Lang.getCode()];var d=e[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(j,e,h,d,b,g,f){var a=[j,e,h,d,g,f];OpenLayers.Popup.prototype.initialize.apply(this,a);this.anchor=(b!=null)?b:{size:new OpenLayers.Size(0,0),offset:new OpenLayers.Pixel(0,0)}},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 e=this.calculateNewPx(d);var a=new Array(e);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 e=this.map.getLonLatFromLayerPx(b);var d=this.map.getExtent();var a=d.determineQuadrant(e);return OpenLayers.Bounds.oppositeQuadrant(a)},updateRelativePosition:function(){},calculateNewPx:function(b){var f=b.offset(this.anchor.offset);var a=this.size||this.contentSize;var e=(this.relativePosition.charAt(0)=="t");f.y+=(e)?-(a.h+this.anchor.size.h):this.anchor.size.h;var d=(this.relativePosition.charAt(1)=="l");f.x+=(d)?-(a.w+this.anchor.size.w):this.anchor.size.w;return f},CLASS_NAME:"OpenLayers.Popup.Anchored"});OpenLayers.Protocol.SOS=function(b){b=OpenLayers.Util.applyDefaults(b,OpenLayers.Protocol.SOS.DEFAULTS);var a=OpenLayers.Protocol.SOS["v"+b.version.replace(/\./g,"_")];if(!a){throw"Unsupported SOS version: "+b.version}return new a(b)};OpenLayers.Protocol.SOS.DEFAULTS={version:"1.0.0"};OpenLayers.Protocol.SQL=OpenLayers.Class(OpenLayers.Protocol,{databaseName:"ol",tableName:"ol_vector_features",postReadFiltering:true,initialize:function(a){OpenLayers.Protocol.prototype.initialize.apply(this,[a])},destroy:function(){OpenLayers.Protocol.prototype.destroy.apply(this)},supported:function(){return false},evaluateFilter:function(a,b){return b&&this.postReadFiltering?b.evaluate(a):true},CLASS_NAME:"OpenLayers.Protocol.SQL"});OpenLayers.Protocol.WFS=function(b){b=OpenLayers.Util.applyDefaults(b,OpenLayers.Protocol.WFS.DEFAULTS);var a=OpenLayers.Protocol.WFS["v"+b.version.replace(/\./g,"_")];if(!a){throw"Unsupported WFS version: "+b.version}return new a(b)};OpenLayers.Protocol.WFS.fromWMSLayer=function(e,d){var a,f;var h=e.params.LAYERS;var g=(h instanceof Array?h[0]:h).split(":");if(g.length>1){f=g[0]}a=g.pop();var b={url:e.url,featureType:a,featurePrefix:f,srsName:e.projection&&e.projection.getCode()||e.map&&e.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,initialize:function(a){OpenLayers.Renderer.prototype.initialize.apply(this,arguments);this.root=document.createElement("canvas");this.container.appendChild(this.root);this.canvas=this.root.getContext("2d");this.features={}},eraseGeometry:function(b,a){this.eraseFeatures(this.features[a][0])},supported:function(){var a=document.createElement("canvas");return !!a.getContext},setExtent:function(a){this.extent=a.clone();this.resolution=null;this.redraw()},setSize:function(a){this.size=a.clone();this.root.style.width=a.w+"px";this.root.style.height=a.h+"px";this.root.width=a.w;this.root.height=a.h;this.resolution=null},drawFeature:function(a,b){b=b||a.style;b=this.applyDefaultSymbolizer(b);this.features[a.id]=[a,b];this.redraw()},drawGeometry:function(e,d){var b=e.CLASS_NAME;if((b=="OpenLayers.Geometry.Collection")||(b=="OpenLayers.Geometry.MultiPoint")||(b=="OpenLayers.Geometry.MultiLineString")||(b=="OpenLayers.Geometry.MultiPolygon")){for(var a=0;a<e.components.length;a++){this.drawGeometry(e.components[a],d)}return}switch(e.CLASS_NAME){case"OpenLayers.Geometry.Point":this.drawPoint(e,d);break;case"OpenLayers.Geometry.LineString":this.drawLineString(e,d);break;case"OpenLayers.Geometry.LinearRing":this.drawLinearRing(e,d);break;case"OpenLayers.Geometry.Polygon":this.drawPolygon(e,d);break;default:break}},drawExternalGraphic:function(h,g){var b=new Image();if(g.graphicTitle){b.title=g.graphicTitle}var f=g.graphicWidth||g.graphicHeight;var a=g.graphicHeight||g.graphicWidth;f=f?f:g.pointRadius*2;a=a?a:g.pointRadius*2;var e=(g.graphicXOffset!=undefined)?g.graphicXOffset:-(0.5*f);var j=(g.graphicYOffset!=undefined)?g.graphicYOffset:-(0.5*a);var d={img:b,x:(h[0]+e),y:(h[1]+j),width:f,height:a,opacity:g.graphicOpacity||g.fillOpacity,canvas:this.canvas};b.onload=OpenLayers.Function.bind(function(){this.canvas.globalAlpha=this.opacity;this.canvas.drawImage(this.img,this.x,this.y,this.width,this.height)},d);b.src=g.externalGraphic},setCanvasStyle:function(b,a){if(b=="fill"){this.canvas.globalAlpha=a.fillOpacity;this.canvas.fillStyle=a.fillColor}else{if(b=="stroke"){this.canvas.globalAlpha=a.strokeOpacity;this.canvas.strokeStyle=a.strokeColor;this.canvas.lineWidth=a.strokeWidth}else{this.canvas.globalAlpha=0;this.canvas.lineWidth=1}}},drawPoint:function(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],a.pointRadius,0,Math.PI*2,true);this.canvas.fill()}if(a.stroke!==false){this.setCanvasStyle("stroke",a);this.canvas.beginPath();this.canvas.arc(b[0],b[1],a.pointRadius,0,Math.PI*2,true);this.canvas.stroke();this.setCanvasStyle("reset")}}}},drawLineString:function(e,b){if(b.stroke!==false){this.setCanvasStyle("stroke",b);this.canvas.beginPath();var f=this.getLocalXY(e.components[0]);this.canvas.moveTo(f[0],f[1]);for(var a=1;a<e.components.length;a++){var d=this.getLocalXY(e.components[a]);this.canvas.lineTo(d[0],d[1])}this.canvas.stroke()}this.setCanvasStyle("reset")},drawLinearRing:function(e,b){if(b.fill!==false){this.setCanvasStyle("fill",b);this.canvas.beginPath();var f=this.getLocalXY(e.components[0]);this.canvas.moveTo(f[0],f[1]);for(var a=1;a<e.components.length-1;a++){var d=this.getLocalXY(e.components[a]);this.canvas.lineTo(d[0],d[1])}this.canvas.fill()}if(b.stroke!==false){this.setCanvasStyle("stroke",b);this.canvas.beginPath();var f=this.getLocalXY(e.components[0]);this.canvas.moveTo(f[0],f[1]);for(var a=1;a<e.components.length;a++){var d=this.getLocalXY(e.components[a]);this.canvas.lineTo(d[0],d[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,e){e=OpenLayers.Util.extend({fontColor:"#000000",labelAlign:"cm"},e);var f=this.getLocalXY(b);this.setCanvasStyle("reset");this.canvas.fillStyle=e.fontColor;this.canvas.globalAlpha=e.fontOpacity||1;var g=e.fontWeight+" "+e.fontSize+" "+e.fontFamily;if(this.canvas.fillText){var d=OpenLayers.Renderer.Canvas.LABEL_ALIGN[e.labelAlign[0]]||"center";this.canvas.font=g;this.canvas.textAlign=d;this.canvas.fillText(e.label,f[0],f[1])}else{if(this.canvas.mozDrawText){this.canvas.mozTextStyle=g;var a=this.canvas.mozMeasureText(e.label);switch(e.labelAlign[0]){case"l":break;case"r":f[0]-=a;break;case"c":default:f[0]-=a/2}this.canvas.translate(f[0],f[1]);this.canvas.mozDrawText(e.label);this.canvas.translate(-1*f[0],-1*f[1])}}this.setCanvasStyle("reset")},getLocalXY:function(b){var d=this.getResolution();var e=this.extent;var a=(b.x/d+(-e.left/d));var f=((e.top/d)-b.y/d);return[a,f]},clear:function(){this.canvas.clearRect(0,0,this.root.width,this.root.height);this.features={}},getFeatureIdFromEvent:function(a){var g=this.map.getLonLatFromPixel(a.xy);var b=this.getResolution();var f=new OpenLayers.Bounds(g.lon-b*5,g.lat-b*5,g.lon+b*5,g.lat+b*5);var d=f.toGeometry();for(var e in this.features){if(!this.features.hasOwnProperty(e)){continue}if(this.features[e][0].geometry.intersects(d)){return e}}return null},eraseFeatures:function(b){if(!(b instanceof Array)){b=[b]}for(var a=0;a<b.length;++a){delete this.features[b[a].id]}this.redraw()},redraw:function(){if(!this.locked){this.canvas.clearRect(0,0,this.root.width,this.root.height);var g=[];var d,e;for(var h in this.features){if(!this.features.hasOwnProperty(h)){continue}d=this.features[h][0];e=this.features[h][1];if(!d.geometry){continue}this.drawGeometry(d.geometry,e);if(e.label){g.push([d,e])}}var f;for(var b=0,a=g.length;b<a;++b){f=g[b];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 g=d.id;this.determineZIndex(d);var e=-1;var f=this.order.length;var a;while(f-e>1){a=parseInt((e+f)/2);var b=this.compare(this,d,OpenLayers.Util.getElement(this.order[a]));if(b>0){e=a}else{f=a}}this.order.splice(f,0,g);this.indices[g]=this.getZIndex(d);return this.getNextElement(f)},remove:function(b){var e=b.id;var a=OpenLayers.Util.indexOf(this.order,e);if(a>=0){this.order.splice(a,1);delete this.indices[e];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(f,e,b){var a=f.getZIndex(e);var g=0;if(b){var d=f.getZIndex(b);g=a-d}return g},Z_ORDER_DRAWING_ORDER:function(d,b,a){var e=OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER(d,b,a);if(a&&e==0){e=1}return e},Z_ORDER_Y_ORDER:function(e,d,b){var f=OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER(e,d,b);if(b&&f===0){var a=b._boundsBottom-d._boundsBottom;f=(a===0)?1:a}return f}};OpenLayers.Renderer.Elements=OpenLayers.Class(OpenLayers.Renderer,{rendererRoot:null,root:null,vectorRoot:null,textRoot:null,xmlns:null,indexer:null,BACKGROUND_ID_SUFFIX:"_background",LABEL_ID_SUFFIX:"_label",initialize:function(a,b){OpenLayers.Renderer.prototype.initialize.apply(this,arguments);this.rendererRoot=this.createRenderRoot();this.root=this.createRoot("_root");this.vectorRoot=this.createRoot("_vroot");this.textRoot=this.createRoot("_troot");this.root.appendChild(this.vectorRoot);this.root.appendChild(this.textRoot);this.rendererRoot.appendChild(this.root);this.container.appendChild(this.rendererRoot);if(b&&(b.zIndexing||b.yOrdering)){this.indexer=new OpenLayers.ElementsIndexer(b.yOrdering)}},destroy:function(){this.clear();this.rendererRoot=null;this.root=null;this.xmlns=null;OpenLayers.Renderer.prototype.destroy.apply(this,arguments)},clear:function(){var b;var a=this.vectorRoot;if(a){while(b=a.firstChild){a.removeChild(b)}}a=this.textRoot;if(a){while(b=a.firstChild){a.removeChild(b)}}if(this.indexer){this.indexer.clear()}},getNodeType:function(b,a){},drawGeometry:function(h,e,g){var d=h.CLASS_NAME;var j=true;if((d=="OpenLayers.Geometry.Collection")||(d=="OpenLayers.Geometry.MultiPoint")||(d=="OpenLayers.Geometry.MultiLineString")||(d=="OpenLayers.Geometry.MultiPolygon")){for(var b=0,a=h.components.length;b<a;b++){j=this.drawGeometry(h.components[b],e,g)&&j}return j}j=false;if(e.display!="none"){if(e.backgroundGraphic){this.redrawBackgroundNode(h.id,h,e,g)}j=this.redrawNode(h.id,h,e,g)}if(j==false){var f=document.getElementById(h.id);if(f){if(f._style.backgroundGraphic){f.parentNode.removeChild(document.getElementById(h.id+this.BACKGROUND_ID_SUFFIX))}f.parentNode.removeChild(f)}}return j},redrawNode:function(h,g,b,f){b=this.applyDefaultSymbolizer(b);var d=this.nodeFactory(h,this.getNodeType(g,b));d._featureId=f;d._boundsBottom=g.getBounds().bottom;d._geometryClass=g.CLASS_NAME;d._style=b;var a=this.drawGeometryNode(d,g,b);if(a===false){return false}d=a.node;if(this.indexer){var e=this.indexer.insert(d);if(e){this.vectorRoot.insertBefore(d,e)}else{this.vectorRoot.appendChild(d)}}else{if(d.parentNode!==this.vectorRoot){this.vectorRoot.appendChild(d)}}this.postDraw(d);return a.complete},redrawBackgroundNode:function(f,e,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(f+this.BACKGROUND_ID_SUFFIX,e,a,null)},drawGeometryNode:function(d,f,b){b=b||d._style;var a={isFilled:b.fill===undefined?true:b.fill,isStroked:b.stroke===undefined?!!b.strokeWidth:b.stroke};var e;switch(f.CLASS_NAME){case"OpenLayers.Geometry.Point":if(b.graphic===false){a.isFilled=false;a.isStroked=false}e=this.drawPoint(d,f);break;case"OpenLayers.Geometry.LineString":a.isFilled=false;e=this.drawLineString(d,f);break;case"OpenLayers.Geometry.LinearRing":e=this.drawLinearRing(d,f);break;case"OpenLayers.Geometry.Polygon":e=this.drawPolygon(d,f);break;case"OpenLayers.Geometry.Surface":e=this.drawSurface(d,f);break;case"OpenLayers.Geometry.Rectangle":e=this.drawRectangle(d,f);break;default:break}d._options=a;if(e!=false){return{node:this.setStyle(d,b,a,f),complete:e}}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 e=a.target;var b=e&&e.correspondingUseElement;var d=b?b:(e||a.srcElement);var f=d._featureId;return f},eraseGeometry:function(h,g){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 e=0,a=h.components.length;e<a;e++){this.eraseGeometry(h.components[e],g)}}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 f=OpenLayers.Util.getElement(b);if(f&&f.parentNode){f.parentNode.removeChild(f)}}}}},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 f=0;f<this.features.length;++f){q=this.features[f];if(q.geometry){b=false;for(var e=m.length-1;e>=0;--e){o=m[e];if(this.shouldCluster(o,q)){this.addToCluster(o,q);b=true;break}}if(!b){m.push(this.createCluster(this.features[f]))}}}this.layer.removeAllFeatures();if(m.length>0){if(this.threshold>1){var h=m.slice();m=[];var p;for(var f=0,g=h.length;f<g;++f){p=h[f];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 f=a.geometry.getBounds().getCenterLonLat();var d=b.geometry.getBounds().getCenterLonLat();var e=(Math.sqrt(Math.pow((f.lon-d.lon),2)+Math.pow((f.lat-d.lat),2))/this.resolution);return(e<=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,filter:this.layer.filter,scope:this},a));this.layer.events.un({visibilitychanged:this.load,scope:this})},merge:function(h){this.layer.destroyFeatures();var f=h.features;if(f&&f.length>0){var g=this.layer.projection;var e=this.layer.map.getProjectionObject();if(!e.equals(g)){var d;for(var b=0,a=f.length;b<a;++b){d=f[b].geometry;if(d){d.transform(g,e)}}}this.layer.addFeatures(f)}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(f,d){var e=false;if(this.features){if(f>=0&&f<this.features.length){var a=Math.floor(f/this.length);if(a!=this.num){this.paging=true;var b=this.features.slice(f,f+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;e=true}}}return e},CLASS_NAME:"OpenLayers.Strategy.Paging"});OpenLayers.Strategy.Refresh=OpenLayers.Class(OpenLayers.Strategy,{force:false,interval:0,timer:null,initialize:function(a){OpenLayers.Strategy.prototype.initialize.apply(this,[a])},activate:function(){var a=OpenLayers.Strategy.prototype.activate.call(this);if(a){if(this.layer.visibility===true){this.start()}this.layer.events.on({visibilitychanged:this.reset,scope:this})}return a},deactivate:function(){var a=OpenLayers.Strategy.prototype.deactivate.call(this);if(a){this.stop()}return a},reset:function(){if(this.layer.visibility===true){this.start()}else{this.stop()}},start:function(){if(this.interval&&typeof this.interval==="number"&&this.interval>0){this.timer=window.setInterval(OpenLayers.Function.bind(this.refresh,this),this.interval)}},refresh:function(){if(this.layer&&this.layer.refresh&&typeof this.layer.refresh=="function"){this.layer.refresh({force:this.force})}},stop:function(){if(this.timer!==null){window.clearInterval(this.timer);this.timer=null}},CLASS_NAME:"OpenLayers.Strategy.Refresh"});OpenLayers.Strategy.Save=OpenLayers.Class(OpenLayers.Strategy,{EVENT_TYPES:["start","success","fail"],events:null,auto:false,timer:null,initialize:function(a){OpenLayers.Strategy.prototype.initialize.apply(this,[a]);this.events=new OpenLayers.Events(this,null,this.EVENT_TYPES)},activate:function(){var a=OpenLayers.Strategy.prototype.activate.call(this);if(a){if(this.auto){if(typeof this.auto==="number"){this.timer=window.setInterval(OpenLayers.Function.bind(this.save,this),this.auto*1000)}else{this.layer.events.on({featureadded:this.triggerSave,afterfeaturemodified:this.triggerSave,scope:this})}}}return a},deactivate:function(){var a=OpenLayers.Strategy.prototype.deactivate.call(this);if(a){if(this.auto){if(typeof this.auto==="number"){window.clearInterval(this.timer)}else{this.layer.events.un({featureadded:this.triggerSave,afterfeaturemodified:this.triggerSave,scope:this})}}}return a},triggerSave:function(b){var a=b.feature;if(a.state===OpenLayers.State.INSERT||a.state===OpenLayers.State.UPDATE||a.state===OpenLayers.State.DELETE){this.save([b.feature])}},save:function(e){if(!e){e=this.layer.features}this.events.triggerEvent("start",{features:e});var g=this.layer.projection;var d=this.layer.map.getProjectionObject();if(!d.equals(g)){var a=e.length;var f=new Array(a);var j,h;for(var b=0;b<a;++b){j=e[b];h=j.clone();h.fid=j.fid;h.state=j.state;if(j.url){h.url=j.url}h._original=j;h.geometry.transform(d,g);f[b]=h}e=f}this.layer.protocol.commit(e,{callback:this.onCommit,scope:this})},onCommit:function(e){var o={response:e};if(e.success()){var b=e.reqFeatures;var a,p;var d=[];var m=e.insertIds||[];var f=0;for(var g=0,h=b.length;g<h;++g){p=b[g];p=p._original||p;a=p.state;if(a){if(a==OpenLayers.State.DELETE){d.push(p)}else{if(a==OpenLayers.State.INSERT){p.fid=m[f];++f}}p.state=null}}if(d.length>0){this.layer.destroyFeatures(d)}this.events.triggerEvent("success",o)}else{this.events.triggerEvent("fail",o)}},CLASS_NAME:"OpenLayers.Strategy.Save"});OpenLayers.Symbolizer.Line=OpenLayers.Class(OpenLayers.Symbolizer,{strokeColor:null,strokeOpacity:null,strokeWidth:null,strokeLinecap:null,strokeDashstyle:null,initialize:function(a){OpenLayers.Symbolizer.prototype.initialize.apply(this,arguments)},CLASS_NAME:"OpenLayers.Symbolizer.Line"});OpenLayers.Symbolizer.Point=OpenLayers.Class(OpenLayers.Symbolizer,{strokeColor:null,strokeOpacity:null,strokeWidth:null,strokeLinecap:null,strokeDashstyle:null,fillColor:null,fillOpacity:null,pointRadius:null,externalGraphic:null,graphicWidth:null,graphicHeight:null,graphicOpacity:null,graphicXOffset:null,graphicYOffset:null,rotation:null,graphicName:null,initialize:function(a){OpenLayers.Symbolizer.prototype.initialize.apply(this,arguments)},CLASS_NAME:"OpenLayers.Symbolizer.Point"});OpenLayers.Symbolizer.Polygon=OpenLayers.Class(OpenLayers.Symbolizer,{strokeColor:null,strokeOpacity:null,strokeWidth:null,strokeLinecap:null,strokeDashstyle:null,fillColor:null,fillOpacity:null,initialize:function(a){OpenLayers.Symbolizer.prototype.initialize.apply(this,arguments)},CLASS_NAME:"OpenLayers.Symbolizer.Polygon"});OpenLayers.Symbolizer.Raster=OpenLayers.Class(OpenLayers.Symbolizer,{initialize:function(a){OpenLayers.Symbolizer.prototype.initialize.apply(this,arguments)},CLASS_NAME:"OpenLayers.Symbolizer.Raster"});OpenLayers.Symbolizer.Text=OpenLayers.Class(OpenLayers.Symbolizer,{label:null,fontFamily:null,fontSize:null,fontWeight:null,fontStyle:null,initialize:function(a){OpenLayers.Symbolizer.prototype.initialize.apply(this,arguments)},CLASS_NAME:"OpenLayers.Symbolizer.Text"});OpenLayers.Tween=OpenLayers.Class({INTERVAL:10,easing:null,begin:null,finish:null,duration:null,callbacks:null,time:null,interval:null,playing:false,initialize:function(a){this.easing=(a)?a:OpenLayers.Easing.Expo.easeOut},start:function(d,b,e,a){this.playing=true;this.begin=d;this.finish=b;this.duration=e;this.callbacks=a.callbacks;this.time=0;if(this.interval){window.clearInterval(this.interval);this.interval=null}if(this.callbacks&&this.callbacks.start){this.callbacks.start.call(this,this.begin)}this.interval=window.setInterval(OpenLayers.Function.bind(this.play,this),this.INTERVAL)},stop:function(){if(!this.playing){return}if(this.callbacks&&this.callbacks.done){this.callbacks.done.call(this,this.finish)}window.clearInterval(this.interval);this.interval=null;this.playing=false},play:function(){var g={};for(var d in this.begin){var a=this.begin[d];var e=this.finish[d];if(a==null||e==null||isNaN(a)||isNaN(e)){OpenLayers.Console.error("invalid value for Tween")}var h=e-a;g[d]=this.easing.apply(this,[this.time,a,h,this.duration])}this.time++;if(this.callbacks&&this.callbacks.eachStep){this.callbacks.eachStep.call(this,g)}if(this.time>this.duration){this.stop()}},CLASS_NAME:"OpenLayers.Tween"});OpenLayers.Easing={CLASS_NAME:"OpenLayers.Easing"};OpenLayers.Easing.Linear={easeIn:function(e,a,g,f){return g*e/f+a},easeOut:function(e,a,g,f){return g*e/f+a},easeInOut:function(e,a,g,f){return g*e/f+a},CLASS_NAME:"OpenLayers.Easing.Linear"};OpenLayers.Easing.Expo={easeIn:function(e,a,g,f){return(e==0)?a:g*Math.pow(2,10*(e/f-1))+a},easeOut:function(e,a,g,f){return(e==f)?a+g:g*(-Math.pow(2,-10*e/f)+1)+a},easeInOut:function(e,a,g,f){if(e==0){return a}if(e==f){return a+g}if((e/=f/2)<1){return g/2*Math.pow(2,10*(e-1))+a}return g/2*(-Math.pow(2,-10*--e)+2)+a},CLASS_NAME:"OpenLayers.Easing.Expo"};OpenLayers.Easing.Quad={easeIn:function(e,a,g,f){return g*(e/=f)*e+a},easeOut:function(e,a,g,f){return -g*(e/=f)*(e-2)+a},easeInOut:function(e,a,g,f){if((e/=f/2)<1){return g/2*e*e+a}return -g/2*((--e)*(e-2)-1)+a},CLASS_NAME:"OpenLayers.Easing.Quad"};OpenLayers.Control.ArgParser=OpenLayers.Class(OpenLayers.Control,{center:null,zoom:null,layers:null,displayProjection:null,initialize:function(a){OpenLayers.Control.prototype.initialize.apply(this,arguments)},setMap:function(f){OpenLayers.Control.prototype.setMap.apply(this,arguments);for(var d=0,a=this.map.controls.length;d<a;d++){var e=this.map.controls[d];if((e!=this)&&(e.CLASS_NAME=="OpenLayers.Control.ArgParser")){if(e.displayProjection!=this.displayProjection){this.displayProjection=e.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 e=this.layers.charAt(d);if(e=="B"){this.map.setBaseLayer(b)}else{if((e=="T")||(e=="F")){b.setVisibility(e=="T")}}}}},CLASS_NAME:"OpenLayers.Control.ArgParser"});OpenLayers.Control.Attribution=OpenLayers.Class(OpenLayers.Control,{separator:", ",initialize:function(a){OpenLayers.Control.prototype.initialize.apply(this,arguments)},destroy:function(){this.map.events.un({removelayer:this.updateAttribution,addlayer:this.updateAttribution,changelayer:this.updateAttribution,changebaselayer:this.updateAttribution,scope:this});OpenLayers.Control.prototype.destroy.apply(this,arguments)},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);this.map.events.on({changebaselayer:this.updateAttribution,changelayer:this.updateAttribution,addlayer:this.updateAttribution,removelayer:this.updateAttribution,scope:this});this.updateAttribution();return this.div},updateAttribution:function(){var e=[];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()){if(OpenLayers.Util.indexOf(e,b.attribution)===-1){e.push(b.attribution)}}}this.div.innerHTML=e.join(this.separator)}},CLASS_NAME:"OpenLayers.Control.Attribution"});OpenLayers.Control.Button=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_BUTTON,trigger:function(){},CLASS_NAME:"OpenLayers.Control.Button"});OpenLayers.Control.Graticule=OpenLayers.Class(OpenLayers.Control,{autoActivate:true,intervals:[45,30,20,10,5,2,1,0.5,0.2,0.1,0.05,0.01,0.005,0.002,0.001],displayInLayerSwitcher:true,visible:true,numPoints:50,targetSize:200,layerName:null,labelled:true,labelFormat:"dm",lineSymbolizer:{strokeColor:"#333",strokeWidth:1,strokeOpacity:0.5},labelSymbolizer:{},gratLayer:null,initialize:function(a){a=a||{};a.layerName=a.layerName||OpenLayers.i18n("graticule");OpenLayers.Control.prototype.initialize.apply(this,[a]);this.labelSymbolizer.stroke=false;this.labelSymbolizer.fill=false;this.labelSymbolizer.label="${label}";this.labelSymbolizer.labelAlign="${labelAlign}";this.labelSymbolizer.labelXOffset="${xOffset}";this.labelSymbolizer.labelYOffset="${yOffset}"},destroy:function(){this.deactivate();OpenLayers.Control.prototype.destroy.apply(this,arguments);if(this.gratLayer){this.gratLayer.destroy();this.gratLayer=null}},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.gratLayer){var a=new OpenLayers.Style({},{rules:[new OpenLayers.Rule({symbolizer:{Point:this.labelSymbolizer,Line:this.lineSymbolizer}})]});this.gratLayer=new OpenLayers.Layer.Vector(this.layerName,{styleMap:new OpenLayers.StyleMap({"default":a}),visibility:this.visible,displayInLayerSwitcher:this.displayInLayerSwitcher})}return this.div},activate:function(){if(OpenLayers.Control.prototype.activate.apply(this,arguments)){this.map.addLayer(this.gratLayer);this.map.events.register("moveend",this,this.update);this.update();return true}else{return false}},deactivate:function(){if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)){this.map.events.unregister("moveend",this,this.update);this.map.removeLayer(this.gratLayer);return true}else{return false}},update:function(){var o=this.map.getExtent();if(!o){return}this.gratLayer.destroyFeatures();var p=new OpenLayers.Projection("EPSG:4326");var P=this.map.getProjectionObject();var h=this.map.getResolution();if(P.proj&&P.proj.projName=="longlat"){this.numPoints=1}var S=this.map.getCenter();var L=new OpenLayers.Pixel(S.lon,S.lat);OpenLayers.Projection.transform(L,P,p);var G=this.targetSize*h;G*=G;var v;for(var K=0;K<this.intervals.length;++K){v=this.intervals[K];var Q=v/2;var e=L.offset(new OpenLayers.Pixel(-Q,-Q));var b=L.offset(new OpenLayers.Pixel(Q,Q));OpenLayers.Projection.transform(e,p,P);OpenLayers.Projection.transform(b,p,P);var f=(e.x-b.x)*(e.x-b.x)+(e.y-b.y)*(e.y-b.y);if(f<=G){break}}L.x=Math.floor(L.x/v)*v;L.y=Math.floor(L.y/v)*v;var J=0;var w=[L.clone()];var u=L.clone();var H;do{u=u.offset(new OpenLayers.Pixel(0,v));H=OpenLayers.Projection.transform(u.clone(),p,P);w.unshift(u)}while(o.containsPixel(H)&&++J<1000);u=L.clone();do{u=u.offset(new OpenLayers.Pixel(0,-v));H=OpenLayers.Projection.transform(u.clone(),p,P);w.push(u)}while(o.containsPixel(H)&&++J<1000);J=0;var E=[L.clone()];u=L.clone();do{u=u.offset(new OpenLayers.Pixel(-v,0));H=OpenLayers.Projection.transform(u.clone(),p,P);E.unshift(u)}while(o.containsPixel(H)&&++J<1000);u=L.clone();do{u=u.offset(new OpenLayers.Pixel(v,0));H=OpenLayers.Projection.transform(u.clone(),p,P);E.push(u)}while(o.containsPixel(H)&&++J<1000);var a=[];for(var K=0;K<E.length;++K){var g=E[K].x;var D=[];var R=null;var M=Math.min(w[0].y,90);var r=Math.max(w[w.length-1].y,-90);var d=(M-r)/this.numPoints;var m=r;for(var I=0;I<=this.numPoints;++I){var N=new OpenLayers.Geometry.Point(g,m);N.transform(p,P);D.push(N);m+=d;if(N.y>=o.bottom&&!R){R=N}}if(this.labelled){var B=new OpenLayers.Geometry.Point(R.x,o.bottom);var O={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(B,O))}var C=new OpenLayers.Geometry.LineString(D);a.push(new OpenLayers.Feature.Vector(C))}for(var I=0;I<w.length;++I){m=w[I].y;if(m<-90||m>90){continue}var D=[];var F=E[0].x;var z=E[E.length-1].x;var q=(z-F)/this.numPoints;var g=F;var R=null;for(var K=0;K<=this.numPoints;++K){var N=new OpenLayers.Geometry.Point(g,m);N.transform(p,P);D.push(N);g+=q;if(N.x<o.right){R=N}}if(this.labelled){var B=new OpenLayers.Geometry.Point(o.right,R.y);var O={value:m,label:this.labelled?OpenLayers.Util.getFormattedLonLat(m,"lat",this.labelFormat):"",labelAlign:"rb",xOffset:-2,yOffset:2};this.gratLayer.addFeatures(new OpenLayers.Feature.Vector(B,O))}var C=new OpenLayers.Geometry.LineString(D);a.push(new OpenLayers.Feature.Vector(C))}this.gratLayer.addFeatures(a)},CLASS_NAME:"OpenLayers.Control.Graticule"});OpenLayers.Control.LayerSwitcher=OpenLayers.Class(OpenLayers.Control,{roundedCorner:true,roundedCornerColor:"darkblue",layerStates:null,layersDiv:null,baseLayersDiv:null,baseLayers:null,dataLbl:null,dataLayersDiv:null,dataLayers:null,minimizeDiv:null,maximizeDiv:null,ascending:true,initialize:function(a){OpenLayers.Control.prototype.initialize.apply(this,arguments);this.layerStates=[]},destroy:function(){OpenLayers.Event.stopObservingElement(this.div);OpenLayers.Event.stopObservingElement(this.minimizeDiv);OpenLayers.Event.stopObservingElement(this.maximizeDiv);this.clearLayersArray("base");this.clearLayersArray("data");this.map.events.un({addlayer:this.redraw,changelayer:this.redraw,removelayer:this.redraw,changebaselayer:this.redraw,scope:this});OpenLayers.Control.prototype.destroy.apply(this,arguments)},setMap:function(a){OpenLayers.Control.prototype.setMap.apply(this,arguments);this.map.events.on({addlayer:this.redraw,changelayer:this.redraw,removelayer:this.redraw,changebaselayer:this.redraw,scope:this})},draw:function(){OpenLayers.Control.prototype.draw.apply(this);this.loadContents();if(!this.outsideViewport){this.minimizeControl()}this.redraw();return this.div},clearLayersArray:function(e){var f=this[e+"Layers"];if(f){for(var d=0,a=f.length;d<a;d++){var b=f[d];OpenLayers.Event.stopObservingElement(b.inputElem);OpenLayers.Event.stopObservingElement(b.labelSpan)}}this[e+"LayersDiv"].innerHTML="";this[e+"Layers"]=[]},checkRedraw:function(){var f=false;if(!this.layerStates.length||(this.map.layers.length!=this.layerStates.length)){f=true}else{for(var d=0,a=this.layerStates.length;d<a;d++){var e=this.layerStates[d];var b=this.map.layers[d];if((e.name!=b.name)||(e.inRange!=b.inRange)||(e.id!=b.id)||(e.visibility!=b.visibility)){f=true;break}}}return f},redraw:function(){if(!this.checkRedraw()){return this.div}this.clearLayersArray("base");this.clearLayersArray("data");var e=false;var q=false;var j=this.map.layers.length;this.layerStates=new Array(j);for(var g=0;g<j;g++){var h=this.map.layers[g];this.layerStates[g]={name:h.name,visibility:h.visibility,inRange:h.inRange,id:h.id}}var f=this.map.layers.slice();if(!this.ascending){f.reverse()}for(var g=0,j=f.length;g<j;g++){var h=f[g];var m=h.isBaseLayer;if(h.displayInLayerSwitcher){if(m){q=true}else{e=true}var p=(m)?(h==this.map.baseLayer):h.getVisibility();var o=document.createElement("input");o.id=this.id+"_input_"+h.name;o.name=(m)?this.id+"_baseLayers":h.name;o.type=(m)?"radio":"checkbox";o.value=h.name;o.checked=p;o.defaultChecked=p;if(!m&&!h.inRange){o.disabled=true}var a={inputElem:o,layer:h,layerSwitcher:this};OpenLayers.Event.observe(o,"mouseup",OpenLayers.Function.bindAsEventListener(this.onInputClick,a));var b=document.createElement("span");OpenLayers.Element.addClass(b,"labelSpan");if(!m&&!h.inRange){b.style.color="gray"}b.innerHTML=h.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:h,inputElem:o,labelSpan:b});var d=(m)?this.baseLayersDiv:this.dataLayersDiv;d.appendChild(o);d.appendChild(b);d.appendChild(u)}}this.dataLbl.style.display=(e)?"":"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="";this.div.style.height="";this.showControls(false);if(a!=null){OpenLayers.Event.stop(a)}},minimizeControl:function(a){this.div.style.width="0px";this.div.style.height="0px";this.showControls(true);if(a!=null){OpenLayers.Event.stop(a)}},showControls:function(a){this.maximizeDiv.style.display=a?"":"none";this.minimizeDiv.style.display=a?"none":"";this.layersDiv.style.display=a?"none":""},loadContents:function(){OpenLayers.Event.observe(this.div,"mouseup",OpenLayers.Function.bindAsEventListener(this.mouseUp,this));OpenLayers.Event.observe(this.div,"click",this.ignoreEvent);OpenLayers.Event.observe(this.div,"mousedown",OpenLayers.Function.bindAsEventListener(this.mouseDown,this));OpenLayers.Event.observe(this.div,"dblclick",this.ignoreEvent);this.layersDiv=document.createElement("div");this.layersDiv.id=this.id+"_layersDiv";OpenLayers.Element.addClass(this.layersDiv,"layersDiv");this.baseLbl=document.createElement("div");this.baseLbl.innerHTML=OpenLayers.i18n("baseLayer");OpenLayers.Element.addClass(this.baseLbl,"baseLbl");this.baseLayersDiv=document.createElement("div");OpenLayers.Element.addClass(this.baseLayersDiv,"baseLayersDiv");this.dataLbl=document.createElement("div");this.dataLbl.innerHTML=OpenLayers.i18n("overlays");OpenLayers.Element.addClass(this.dataLbl,"dataLbl");this.dataLayersDiv=document.createElement("div");OpenLayers.Element.addClass(this.dataLayersDiv,"dataLayersDiv");if(this.ascending){this.layersDiv.appendChild(this.baseLbl);this.layersDiv.appendChild(this.baseLayersDiv);this.layersDiv.appendChild(this.dataLbl);this.layersDiv.appendChild(this.dataLayersDiv)}else{this.layersDiv.appendChild(this.dataLbl);this.layersDiv.appendChild(this.dataLayersDiv);this.layersDiv.appendChild(this.baseLbl);this.layersDiv.appendChild(this.baseLayersDiv)}this.div.appendChild(this.layersDiv);if(this.roundedCorner){OpenLayers.Rico.Corner.round(this.div,{corners:"tl bl",bgColor:"transparent",color:this.roundedCornerColor,blend:false});OpenLayers.Rico.Corner.changeOpacity(this.layersDiv,0.75)}var 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");OpenLayers.Element.addClass(this.maximizeDiv,"maximizeDiv");this.maximizeDiv.style.display="none";OpenLayers.Event.observe(this.maximizeDiv,"click",OpenLayers.Function.bindAsEventListener(this.maximizeControl,this));this.div.appendChild(this.maximizeDiv);var a=d+"layer-switcher-minimize.png";var b=new OpenLayers.Size(18,18);this.minimizeDiv=OpenLayers.Util.createAlphaImageDiv("OpenLayers_Control_MinimizeDiv",null,b,a,"absolute");OpenLayers.Element.addClass(this.minimizeDiv,"minimizeDiv");this.minimizeDiv.style.display="none";OpenLayers.Event.observe(this.minimizeDiv,"click",OpenLayers.Function.bindAsEventListener(this.minimizeControl,this));this.div.appendChild(this.minimizeDiv)},ignoreEvent:function(a){OpenLayers.Event.stop(a)},mouseDown:function(a){this.isMouseDown=true;this.ignoreEvent(a)},mouseUp:function(a){if(this.isMouseDown){this.isMouseDown=false;this.ignoreEvent(a)}},CLASS_NAME:"OpenLayers.Control.LayerSwitcher"});OpenLayers.Control.MousePosition=OpenLayers.Class(OpenLayers.Control,{autoActivate:true,element:null,prefix:"",separator:", ",suffix:"",numDigits:5,granularity:10,emptyString:null,lastXy:null,displayProjection:null,initialize:function(a){OpenLayers.Control.prototype.initialize.apply(this,arguments)},destroy:function(){this.deactivate();OpenLayers.Control.prototype.destroy.apply(this,arguments)},activate:function(){if(OpenLayers.Control.prototype.activate.apply(this,arguments)){this.map.events.register("mousemove",this,this.redraw);this.map.events.register("mouseout",this,this.reset);this.redraw();return true}else{return false}},deactivate:function(){if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)){this.map.events.unregister("mousemove",this,this.redraw);this.map.events.unregister("mouseout",this,this.reset);this.element.innerHTML="";return true}else{return false}},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.element){this.div.left="";this.div.top="";this.element=this.div}return this.div},redraw:function(a){var d;if(a==null){this.reset();return}else{if(this.lastXy==null||Math.abs(a.xy.x-this.lastXy.x)>this.granularity||Math.abs(a.xy.y-this.lastXy.y)>this.granularity){this.lastXy=a.xy;return}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}},reset:function(a){if(this.emptyString!=null){this.element.innerHTML=this.emptyString}},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},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,e,m,h){var g=OpenLayers.Util.getImagesLocation()+e;var b=OpenLayers.Util.createAlphaImageDiv(this.id+"_"+a,m,h,g,"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 f=function(){return d}}else{var j=this.slideRatio;var f=function(o){return this.map.getSize()[o]*j}}b.getSlideFactor=f;this.buttons.push(b);return b},_removeButton:function(a){OpenLayers.Event.stopObservingElement(a);a.map=null;a.getSlideFactor=null;this.div.removeChild(a);OpenLayers.Util.removeItem(this.buttons,a)},removeButtons:function(){for(var a=this.buttons.length-1;a>=0;--a){this._removeButton(this.buttons[a])}},doubleClick:function(a){OpenLayers.Event.stop(a);return false},buttonDown:function(a){if(!OpenLayers.Event.isLeftClick(a)){return}switch(this.action){case"panup":this.map.pan(0,-this.getSlideFactor("h"));break;case"pandown":this.map.pan(0,this.getSlideFactor("h"));break;case"panleft":this.map.pan(-this.getSlideFactor("w"),0);break;case"panright":this.map.pan(this.getSlideFactor("w"),0);break;case"zoomin":this.map.zoomIn();break;case"zoomout":this.map.zoomOut();break;case"zoomworld":this.map.zoomToMaxExtent();break}OpenLayers.Event.stop(a)},CLASS_NAME:"OpenLayers.Control.PanZoom"});OpenLayers.Control.PanZoom.X=4;OpenLayers.Control.PanZoom.Y=4;OpenLayers.Control.Panel=OpenLayers.Class(OpenLayers.Control,{controls:null,autoActivate:true,defaultControl:null,saveState:false,activeState:null,initialize:function(a){OpenLayers.Control.prototype.initialize.apply(this,[a]);this.controls=[];this.activeState={}},destroy:function(){OpenLayers.Control.prototype.destroy.apply(this,arguments);for(var a=this.controls.length-1;a>=0;a--){if(this.controls[a].events){this.controls[a].events.un({activate:this.redraw,deactivate:this.redraw,scope:this})}OpenLayers.Event.stopObservingElement(this.controls[a].panel_div);this.controls[a].panel_div=null}this.activeState=null},activate:function(){if(OpenLayers.Control.prototype.activate.apply(this,arguments)){var d;for(var b=0,a=this.controls.length;b<a;b++){d=this.controls[b];if(d===this.defaultControl||(this.saveState&&this.activeState[d.id])){d.activate()}}if(this.saveState===true){this.defaultControl=null}this.redraw();return true}else{return false}},deactivate:function(){if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)){var d;for(var b=0,a=this.controls.length;b<a;b++){d=this.controls[b];this.activeState[d.id]=d.deactivate()}return true}else{return false}},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);this.addControlsToMap(this.controls);return this.div},redraw:function(){if(this.div.children.length>0){for(var b=this.div.children.length,e=b-1;e>=0;e--){this.div.removeChild(this.div.children[e])}}this.div.innerHTML="";if(this.active){for(var e=0,a=this.controls.length;e<a;e++){var d=this.controls[e].panel_div;if(this.controls[e].active){d.className=this.controls[e].displayClass+"ItemActive"}else{d.className=this.controls[e].displayClass+"ItemInactive"}this.div.appendChild(d)}}},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}var e;for(var b=0,a=this.controls.length;b<a;b++){e=this.controls[b];if(e!=d&&(e.type===OpenLayers.Control.TYPE_TOOL||e.type==null)){e.deactivate()}}d.activate()},addControls:function(b){if(!(b instanceof Array)){b=[b]}this.controls=this.controls.concat(b);for(var e=0,a=b.length;e<a;e++){var d=document.createElement("div");b[e].panel_div=d;if(b[e].title!=""){b[e].panel_div.title=b[e].title}OpenLayers.Event.observe(b[e].panel_div,"click",OpenLayers.Function.bind(this.onClick,this,b[e]));OpenLayers.Event.observe(b[e].panel_div,"dblclick",OpenLayers.Function.bind(this.onDoubleClick,this,b[e]));OpenLayers.Event.observe(b[e].panel_div,"mousedown",OpenLayers.Function.bindAsEventListener(OpenLayers.Event.stop))}if(this.map){this.addControlsToMap(b);this.redraw()}},addControlsToMap:function(b){var e;for(var d=0,a=b.length;d<a;d++){e=b[d];if(e.autoActivate===true){e.autoActivate=false;this.map.addControl(e);e.autoActivate=true}else{this.map.addControl(e);e.deactivate()}e.events.on({activate:this.redraw,deactivate:this.redraw,scope:this})}},onClick:function(b,a){OpenLayers.Event.stop(a?a:window.event);this.activateControl(b)},onDoubleClick:function(b,a){OpenLayers.Event.stop(a?a:window.event)},getControlsBy:function(d,a){var e=(typeof a.test=="function");var b=OpenLayers.Array.filter(this.controls,function(f){return f[d]==a||(e&&a.test(f[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,geodesic:false,initialize:function(b,a){OpenLayers.Control.prototype.initialize.apply(this,[a]);this.element=OpenLayers.Util.getElement(b)},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.element){this.element=document.createElement("div");this.div.appendChild(this.element)}this.map.events.register("moveend",this,this.updateScale);this.updateScale();return this.div},updateScale:function(){var d;if(this.geodesic===true){var a=this.map.getUnits();if(!a){return}var b=OpenLayers.INCHES_PER_UNIT;d=(this.map.getGeodesicPixelSize().w||0.000001)*b.km*OpenLayers.DOTS_PER_INCH}else{d=this.map.getScale()}if(!d){return}if(d>=9500&&d<=950000){d=Math.round(d/1000)+"K"}else{if(d>=950000){d=Math.round(d/1000000)+"M"}else{d=Math.round(d)}}this.element.innerHTML=OpenLayers.i18n("scale",{scaleDenom:d})},CLASS_NAME:"OpenLayers.Control.Scale"});OpenLayers.Control.ScaleLine=OpenLayers.Class(OpenLayers.Control,{maxWidth:100,topOutUnits:"km",topInUnits:"m",bottomOutUnits:"mi",bottomInUnits:"ft",eTop:null,eBottom:null,geodesic:false,initialize:function(a){OpenLayers.Control.prototype.initialize.apply(this,[a])},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.eTop){this.eTop=document.createElement("div");this.eTop.className=this.displayClass+"Top";var a=this.topInUnits.length;this.div.appendChild(this.eTop);if((this.topOutUnits=="")||(this.topInUnits=="")){this.eTop.style.visibility="hidden"}else{this.eTop.style.visibility="visible"}this.eBottom=document.createElement("div");this.eBottom.className=this.displayClass+"Bottom";this.div.appendChild(this.eBottom);if((this.bottomOutUnits=="")||(this.bottomInUnits=="")){this.eBottom.style.visibility="hidden"}else{this.eBottom.style.visibility="visible"}}this.map.events.register("moveend",this,this.update);this.update();return this.div},getBarLen:function(b){var e=parseInt(Math.log(b)/Math.log(10));var a=Math.pow(10,e);var d=parseInt(b/a);var f;if(d>5){f=5}else{if(d>2){f=2}else{f=1}}return f*a},update:function(){var o=this.map.getResolution();if(!o){return}var v=this.map.getUnits();var f=OpenLayers.INCHES_PER_UNIT;var q=this.maxWidth*o*f[v];var u=1;if(this.geodesic===true){var b=(this.map.getGeodesicPixelSize().w||0.000001)*this.maxWidth;var g=q/f.km;u=b/g;q*=u}var a;var e;if(q>100000){a=this.topOutUnits;e=this.bottomOutUnits}else{a=this.topInUnits;e=this.bottomInUnits}var j=q/f[a];var p=q/f[e];var m=this.getBarLen(j);var h=this.getBarLen(p);j=m/f[v]*f[a];p=h/f[v]*f[e];var d=j/o/u;var r=p/o/u;if(this.eBottom.style.visibility=="visible"){this.eBottom.style.width=Math.round(r)+"px";this.eBottom.innerHTML=h+" "+e}if(this.eTop.style.visibility=="visible"){this.eTop.style.width=Math.round(d)+"px";this.eTop.innerHTML=m+" "+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,e,d,a){var f=OpenLayers.Util.getElement(b);a=a||false;if(e=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||f.attachEvent)){e="keydown"}if(!this.observers){this.observers={}}if(!f._eventCacheID){var g="eventCacheID_";if(f.id){g=f.id+"_"+g}f._eventCacheID=OpenLayers.Util.createUniqueID(g)}var h=f._eventCacheID;if(!this.observers[h]){this.observers[h]=[]}this.observers[h].push({element:f,name:e,observer:d,useCapture:a});if(f.addEventListener){f.addEventListener(e,d,a)}else{if(f.attachEvent){f.attachEvent("on"+e,d)}}},stopObservingElement:function(a){var b=OpenLayers.Util.getElement(a);var d=b._eventCacheID;this._removeElementObservers(OpenLayers.Event.observers[d])},_removeElementObservers:function(f){if(f){for(var b=f.length-1;b>=0;b--){var d=f[b];var a=new Array(d.element,d.name,d.observer,d.useCapture);var e=OpenLayers.Event.stopObserving.apply(this,a)}}},stopObserving:function(j,a,h,b){b=b||false;var g=OpenLayers.Util.getElement(j);var e=g._eventCacheID;if(a=="keypress"){if(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||g.detachEvent){a="keydown"}}var o=false;var d=OpenLayers.Event.observers[e];if(d){var f=0;while(!o&&f<d.length){var m=d[f];if((m.name==a)&&(m.observer==h)&&(m.useCapture==b)){d.splice(f,1);if(d.length==0){delete OpenLayers.Event.observers[e]}o=true;break}f++}}if(o){if(g.removeEventListener){g.removeEventListener(a,h,b)}else{if(g&&g.detachEvent){g.detachEvent("on"+a,h)}}}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,f,h,g,b){OpenLayers.Util.extend(this,b);this.object=d;this.fallThrough=g;this.listeners={};this.eventHandler=OpenLayers.Function.bindAsEventListener(this.handleBrowserEvent,this);this.clearMouseListener=OpenLayers.Function.bind(this.clearMouseCache,this);this.eventTypes=[];if(h!=null){for(var e=0,a=h.length;e<a;e++){this.addEventType(h[e])}}if(f!=null){this.attachToElement(f)}},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(e){if(this.element){OpenLayers.Event.stopObservingElement(this.element)}this.element=e;for(var d=0,a=this.BROWSER_EVENTS.length;d<a;d++){var b=this.BROWSER_EVENTS[d];this.addEventType(b);OpenLayers.Event.observe(e,b,this.eventHandler)}OpenLayers.Event.observe(e,"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,e,d){if((d!=null)&&(OpenLayers.Util.indexOf(this.eventTypes,b)!=-1)){if(e==null){e=this.object}var a=this.listeners[b];a.push({obj:e,func:d})}},registerPriority:function(b,e,d){if(d!=null){if(e==null){e=this.object}var a=this.listeners[b];if(a!=null){a.unshift({obj:e,func:d})}}},un:function(a){for(var b in a){if(b!="scope"){this.unregister(b,a.scope,a[b])}}},unregister:function(e,g,f){if(g==null){g=this.object}var d=this.listeners[e];if(d!=null){for(var b=0,a=d.length;b<a;b++){if(d[b].obj==g&&d[b].func==f){d.splice(b,1);break}}}},remove:function(a){if(this.listeners[a]!=null){this.listeners[a]=[]}},triggerEvent:function(f,b){var e=this.listeners[f];if(!e||e.length==0){return}if(b==null){b={}}b.object=this.object;b.element=this.element;if(!b.type){b.type=f}var e=e.slice(),g;for(var d=0,a=e.length;d<a;d++){var h=e[d];g=h.func.apply(h.obj,[b]);if((g!=undefined)&&(g==false)){break}}if(!this.fallThrough){OpenLayers.Event.stop(b,true)}return g},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.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 muss vom Typ ${geomType} sein",getFeatureError:"getFeatureFromEvent wurde vom einem Layer ohne Renderer aufgerufen. Dies bedeutet normalerweise, dass ein Layer entfernt wurde, aber nicht Handler, die auf ihn verweisen.",minZoomLevelError:"Die \x3ccode\x3eminZoomLevel\x3c/code\x3e-Eigenschaft ist nur für die Verwendung mit \x3ccode\x3eFixedZoomLevels\x3c/code\x3e-untergeordneten Layers vorgesehen. Das dieser \x3ctt\x3ewfs\x3c/tt\x3e-Layer die \x3ccode\x3eminZoomLevel\x3c/code\x3e-Eigenschaft überprüft ist ein Relikt der Vergangenheit. Wir können diese Überprüfung nicht entfernen, ohne das OL basierende Applikationen nicht mehr funktionieren. Daher markieren wir es als veraltet - die \x3ccode\x3eminZoomLevel\x3c/code\x3e-Überprüfung wird in Version 3.0 entfernt werden. Bitte verwenden Sie stattdessen die Min-/Max-Lösung, wie sie unter http://trac.openlayers.org/wiki/SettingZoomLevels beschrieben ist.",commitSuccess:"WFS-Transaktion: Erfolgreich ${response}",commitFailed:"WFS-Transaktion: Fehlgeschlagen ${response}",googleWarning:"Der Google-Layer konnte nicht korrekt geladen werden.\x3cbr\x3e\x3cbr\x3eUm diese Meldung nicht mehr zu erhalten, wählen Sie einen anderen Hintergrundlayer aus dem LayerSwitcher in der rechten oberen Ecke.\x3cbr\x3e\x3cbr\x3eSehr 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.\x3cbr\x3e\x3cbr\x3eEntwickler: Besuche \x3ca href='http://trac.openlayers.org/wiki/Google' target='_blank'\x3edas Wiki\x3c/a\x3e für Hilfe zum korrekten Einbinden des Google-Layers",getLayerWarning:"Der ${layerType}-Layer konnte nicht korrekt geladen werden.\x3cbr\x3e\x3cbr\x3eUm diese Meldung nicht mehr zu erhalten, wählen Sie einen anderen Hintergrundlayer aus dem LayerSwitcher in der rechten oberen Ecke.\x3cbr\x3e\x3cbr\x3eSehr wahrscheinlich tritt dieser Fehler auf, weil das Skript der '${layerLib}'-Bibliothek nicht eingebunden wurde.\x3cbr\x3e\x3cbr\x3eEntwickler: Besuche \x3ca href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'\x3edas Wiki\x3c/a\x3e für Hilfe zum korrekten Einbinden von Layern",scale:"Maßstab = 1 : ${scaleDenom}",W:"W",E:"O",N:"N",S:"S",layerAlreadyAdded:"Sie versuchen den Layer „${layerName}“ zur Karte hinzuzufügen, er wurde aber bereits hinzugefügt",reprojectDeprecated:"Sie verwenden die „Reproject“-Option des Layers ${layerName}. Diese Option ist veraltet: Sie wurde entwickelt um die Anzeige von Daten auf kommerziellen Basiskarten zu unterstützen, aber diese Funktion sollte jetzt durch Unterstützung der „Spherical Mercator“ erreicht werden. Weitere Informationen sind unter http://trac.openlayers.org/wiki/SphericalMercator verfügbar.",methodDeprecated:"Die Methode ist veraltet und wird in 3.0 entfernt. Bitte verwende stattdessen ${newMethod}.",boundsAddError:"Beide Werte (x und y) müssen der add-Funktion übergeben werden.",lonlatAddError:"Beide Werte (lon und lat) müssen der add-Funktion übergeben werden.",pixelAddError:"Beide Werte (x und y) müssen der add-Funktion übergeben werden.",unsupportedGeometryType:"Nicht unterstützter Geometrie-Typ: ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition fehlgeschlagen: Element mit Id ${elemId} möglicherweise falsch platziert.",filterEvaluateNotImplemented:"„evaluate“ ist für diesen Filter-Typ nicht implementiert."});OpenLayers.Lang.en={unhandledRequest:"Unhandled request return ${statusText}",permalink:"Permalink",overlays:"Overlays",baseLayer:"Base Layer",sameProjection:"The overview map only works when it is in the same projection as the main map",readNotImplemented:"Read not implemented.",writeNotImplemented:"Write not implemented.",noFID:"Can't update a feature for which there is no FID.",errorLoadingGML:"Error in loading GML file ${url}",browserNotSupported:"Your browser does not support vector rendering. Currently supported renderers are:\n${renderers}",componentShouldBe:"addFeatures : component should be an ${geomType}",getFeatureError:"getFeatureFromEvent called on layer with no renderer. This usually means you destroyed a layer, but not some handler which is associated with it.",minZoomLevelError:"The minZoomLevel property is only intended for use with the FixedZoomLevels-descendent layers. That this wfs layer checks for minZoomLevel is a relic of thepast. We cannot, however, remove it without possibly breaking OL based applications that may depend on it. Therefore we are deprecating it -- the minZoomLevel check below will be removed at 3.0. Please instead use min/max resolution setting as described here: http://trac.openlayers.org/wiki/SettingZoomLevels",commitSuccess:"WFS Transaction: SUCCESS ${response}",commitFailed:"WFS Transaction: FAILED ${response}",googleWarning:"The Google Layer was unable to load correctly.<br><br>To get rid of this message, select a new BaseLayer in the layer switcher in the upper-right corner.<br><br>Most likely, this is because the Google Maps library script was either not included, or does not contain the correct API key for your site.<br><br>Developers: For help getting this working correctly, <a href='http://trac.openlayers.org/wiki/Google' target='_blank'>click here</a>",getLayerWarning:"The ${layerType} Layer was unable to load correctly.<br><br>To get rid of this message, select a new BaseLayer in the layer switcher in the upper-right corner.<br><br>Most likely, this is because the ${layerLib} library script was not correctly included.<br><br>Developers: For help getting this working correctly, <a href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'>click here</a>",scale:"Scale = 1 : ${scaleDenom}",W:"W",E:"E",N:"N",S:"S",graticule:"Graticule",layerAlreadyAdded:"You tried to add the layer: ${layerName} to the map, but it has already been added",reprojectDeprecated:"You are using the 'reproject' option on the ${layerName} layer. This option is deprecated: its use was designed to support displaying data over commercial basemaps, but that functionality should now be achieved by using Spherical Mercator support. More information is available from http://trac.openlayers.org/wiki/SphericalMercator.",methodDeprecated:"This method has been deprecated and will be removed in 3.0. Please use ${newMethod} instead.",boundsAddError:"You must pass both x and y values to the add function.",lonlatAddError:"You must pass both lon and lat values to the add function.",pixelAddError:"You must pass both x and y values to the add function.",unsupportedGeometryType:"Unsupported geometry type: ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition failed: element with id ${elemId} may be misplaced.",filterEvaluateNotImplemented:"evaluate is not implemented for this filter type.",end:""};OpenLayers.Lang.es={unhandledRequest:"Respuesta a petición no gestionada ${statusText}",permalink:"Enlace permanente",overlays:"Capas superpuestas",baseLayer:"Capa Base",sameProjection:"El mapa de vista general 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 se ha llamado desde 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 es 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}",W:"O",E:"E",N:"N",S:"S",graticule:"Retícula",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 es obsoleta: su uso fue diseñado para soportar la visualización de datos sobre mapas base comerciales, pero ahora esa funcionalidad debería conseguirse 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 es 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=OpenLayers.Util.applyDefaults({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.\x3cbr\x3e\x3cbr\x3ePour supprimer ce message, choisissez une nouvelle BaseLayer dans le sélecteur de couche en haut à droite.\x3cbr\x3e\x3cbr\x3eCela 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.\x3cbr\x3e\x3cbr\x3eDéveloppeurs : pour savoir comment corriger ceci, \x3ca href='http://trac.openlayers.org/wiki/Google' target='_blank'\x3ecliquez ici\x3c/a\x3e",getLayerWarning:"La couche ${layerType} n'est pas en mesure de se charger correctement.\x3cbr\x3e\x3cbr\x3ePour supprimer ce message, choisissez une nouvelle BaseLayer dans le sélecteur de couche en haut à droite.\x3cbr\x3e\x3cbr\x3eCela est possiblement causé par la non-inclusion de la librairie ${layerLib}.\x3cbr\x3e\x3cbr\x3eDéveloppeurs : pour savoir comment corriger ceci, \x3ca href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'\x3ecliquez ici\x3c/a\x3e",scale:"Echelle ~ 1 : ${scaleDenom}",W:"O",E:"E",N:"N",S:"S",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é.",filterEvaluateNotImplemented:"évaluer n'a pas encore été implémenté pour ce type de filtre."});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(h,d,g,b,a,f,e){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(h,d,g,b,a,f,e){OpenLayers.Popup.Anchored.prototype.initialize.apply(this,arguments);if(this.fixedRelativePosition){this.updateRelativePosition();this.calculateRelativePosition=function(j){return this.relativePosition}}this.contentDiv.style.position="absolute";this.contentDiv.style.zIndex=1;if(f){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 g=null;for(var f in this.positionBlocks){g=f;break}var a=this.positionBlocks[g];for(var e=0;e<a.blocks.length;e++){var j={};this.blocks.push(j);var b=this.id+"_FrameDecorationDiv_"+e;j.div=OpenLayers.Util.createDiv(b,null,null,null,"absolute",null,"hidden",null);var d=this.id+"_FrameDecorationImg_"+e;var h=(this.isAlphaImage)?OpenLayers.Util.createAlphaImageDiv:OpenLayers.Util.createImage;j.image=h(d,null,this.imageSize,this.imageSrc,"absolute",null,null,null);j.div.appendChild(j.image);this.groupDiv.appendChild(j.div)}},updateBlocks:function(){if(!this.blocks){this.createBlocks()}if(this.size&&this.relativePosition){var m=this.positionBlocks[this.relativePosition];for(var g=0;g<m.blocks.length;g++){var d=m.blocks[g];var f=this.blocks[g];var e=d.anchor.left;var o=d.anchor.bottom;var a=d.anchor.right;var q=d.anchor.top;var p=(isNaN(d.size.w))?this.size.w-(a+e):d.size.w;var j=(isNaN(d.size.h))?this.size.h-(o+q):d.size.h;f.div.style.width=(p<0?0:p)+"px";f.div.style.height=(j<0?0:j)+"px";f.div.style.left=(e!=null)?e+"px":"";f.div.style.bottom=(o!=null)?o+"px":"";f.div.style.right=(a!=null)?a+"px":"";f.div.style.top=(q!=null)?q+"px":"";f.image.style.left=d.position.x+"px";f.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,readFormat:null,initialize:function(b){OpenLayers.Protocol.prototype.initialize.apply(this,[b]);if(!b.format){this.format=OpenLayers.Format.WFST(OpenLayers.Util.extend({version:this.version,featureType:this.featureType,featureNS:this.featureNS,featurePrefix:this.featurePrefix,geometryName:this.geometryName,srsName:this.srsName,schema:this.schema},this.formatOptions))}if(!this.featureNS&&this.featurePrefix){var a=this.format.readNode;this.format.readNode=function(d,e){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)},read:function(b){OpenLayers.Protocol.prototype.read.apply(this,arguments);b=OpenLayers.Util.extend({},b);OpenLayers.Util.applyDefaults(b,this.options||{});var a=new OpenLayers.Protocol.Response({requestType:"read"});var 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.readFormat!==null)?this.readFormat.read(b):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 e=d.responseXML;if(!e||!e.documentElement){e=d.responseText}var f=this.format.read(e)||{};a.insertIds=f.insertIds||[];a.code=(f.success)?OpenLayers.Protocol.Response.SUCCESS:OpenLayers.Protocol.Response.FAILURE;b.callback.call(b.scope,a)}},filterDelete:function(f,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 e=this.format.createElementNSPlus("wfs:Delete",{attributes:{typeName:(d.featureNS?this.featurePrefix+":":"")+d.featureType}});if(d.featureNS){e.setAttribute("xmlns:"+this.featurePrefix,d.featureNS)}var h=this.format.writeNode("ogc:Filter",f);e.appendChild(h);a.appendChild(e);var g=OpenLayers.Format.XML.prototype.write.apply(this.format,[a]);return OpenLayers.Request.POST({url:this.url,callback:d.callback||function(){},data:g})},abort:function(a){if(a){a.priv.abort()}},CLASS_NAME:"OpenLayers.Protocol.WFS.v1"});OpenLayers.Renderer.SVG=OpenLayers.Class(OpenLayers.Renderer.Elements,{xmlns:"http://www.w3.org/2000/svg",xlinkns:"http://www.w3.org/1999/xlink",MAX_PIXEL:15000,translationParameters:null,symbolMetrics:null,isGecko:null,supportUse:null,initialize:function(a){if(!this.supported()){return}OpenLayers.Renderer.Elements.prototype.initialize.apply(this,arguments);this.translationParameters={x:0,y:0};this.supportUse=(navigator.userAgent.toLowerCase().indexOf("applewebkit/5")==-1);this.isGecko=(navigator.userAgent.toLowerCase().indexOf("gecko/")!=-1);this.symbolMetrics={}},destroy:function(){OpenLayers.Renderer.Elements.prototype.destroy.apply(this,arguments)},supported:function(){var a="http://www.w3.org/TR/SVG11/feature#";return(document.implementation&&(document.implementation.hasFeature("org.w3c.svg","1.0")||document.implementation.hasFeature(a+"SVG","1.1")||document.implementation.hasFeature(a+"BasicStructure","1.1")))},inValidRange:function(a,f,b){var e=a+(b?0:this.translationParameters.x);var d=f+(b?0:this.translationParameters.y);return(e>=-this.MAX_PIXEL&&e<=this.MAX_PIXEL&&d>=-this.MAX_PIXEL&&d<=this.MAX_PIXEL)},setExtent:function(b,e){OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments);var a=this.getResolution();var g=-b.left/a;var f=b.top/a;if(e){this.left=g;this.top=f;var d="0 0 "+this.size.w+" "+this.size.h;this.rendererRoot.setAttributeNS(null,"viewBox",d);this.translate(0,0);return true}else{var h=this.translate(g-this.left,f-this.top);if(!h){this.setExtent(b,true)}return h}},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=this.supportUse===false?"svg":"use"}else{a="circle"}}break;case"OpenLayers.Geometry.Rectangle":a="rect";break;case"OpenLayers.Geometry.LineString":a="polyline";break;case"OpenLayers.Geometry.LinearRing":a="polygon";break;case"OpenLayers.Geometry.Polygon":case"OpenLayers.Geometry.Curve":case"OpenLayers.Geometry.Surface":a="path";break;default:break}return a},setStyle:function(w,C,b){C=C||w._style;b=b||w._options;var o=parseFloat(w.getAttributeNS(null,"r"));var m=1;var e;if(w._geometryClass=="OpenLayers.Geometry.Point"&&o){w.style.visibility="";if(C.graphic===false){w.style.visibility="hidden"}else{if(C.externalGraphic){e=this.getPosition(w);if(C.graphicTitle){w.setAttributeNS(null,"title",C.graphicTitle)}if(C.graphicWidth&&C.graphicHeight){w.setAttributeNS(null,"preserveAspectRatio","none")}var v=C.graphicWidth||C.graphicHeight;var q=C.graphicHeight||C.graphicWidth;v=v?v:C.pointRadius*2;q=q?q:C.pointRadius*2;var D=(C.graphicXOffset!=undefined)?C.graphicXOffset:-(0.5*v);var g=(C.graphicYOffset!=undefined)?C.graphicYOffset:-(0.5*q);var a=C.graphicOpacity||C.fillOpacity;w.setAttributeNS(null,"x",(e.x+D).toFixed());w.setAttributeNS(null,"y",(e.y+g).toFixed());w.setAttributeNS(null,"width",v);w.setAttributeNS(null,"height",q);w.setAttributeNS(this.xlinkns,"href",C.externalGraphic);w.setAttributeNS(null,"style","opacity: "+a)}else{if(this.isComplexSymbol(C.graphicName)){var d=C.pointRadius*3;var p=d*2;var u=this.importSymbol(C.graphicName);e=this.getPosition(w);m=this.symbolMetrics[u][0]*3/p;var h=w.parentNode;var j=w.nextSibling;if(h){h.removeChild(w)}if(this.supportUse===false){var f=document.getElementById(u);w.firstChild&&w.removeChild(w.firstChild);w.appendChild(f.firstChild.cloneNode(true));w.setAttributeNS(null,"viewBox",f.getAttributeNS(null,"viewBox"))}else{w.setAttributeNS(this.xlinkns,"href","#"+u)}w.setAttributeNS(null,"width",p);w.setAttributeNS(null,"height",p);w.setAttributeNS(null,"x",e.x-d);w.setAttributeNS(null,"y",e.y-d);if(j){h.insertBefore(w,j)}else{if(h){h.appendChild(w)}}}else{w.setAttributeNS(null,"r",C.pointRadius)}}}var B=C.rotation;if((B!==undefined||w._rotation!==undefined)&&e){w._rotation=B;B|=0;if(w.nodeName!=="svg"){w.setAttributeNS(null,"transform","rotate("+B+" "+e.x+" "+e.y+")")}else{var z=this.symbolMetrics[u];w.firstChild.setAttributeNS(null,"transform","rotate("+C.rotation+" "+z[1]+" "+z[2]+")")}}}if(b.isFilled){w.setAttributeNS(null,"fill",C.fillColor);w.setAttributeNS(null,"fill-opacity",C.fillOpacity)}else{w.setAttributeNS(null,"fill","none")}if(b.isStroked){w.setAttributeNS(null,"stroke",C.strokeColor);w.setAttributeNS(null,"stroke-opacity",C.strokeOpacity);w.setAttributeNS(null,"stroke-width",C.strokeWidth*m);w.setAttributeNS(null,"stroke-linecap",C.strokeLinecap||"round");w.setAttributeNS(null,"stroke-linejoin","round");C.strokeDashstyle&&w.setAttributeNS(null,"stroke-dasharray",this.dashStyle(C,m))}else{w.setAttributeNS(null,"stroke","none")}if(C.pointerEvents){w.setAttributeNS(null,"pointer-events",C.pointerEvents)}if(C.cursor!=null){w.setAttributeNS(null,"cursor",C.cursor)}return w},dashStyle:function(d,b){var a=d.strokeWidth*b;var e=d.strokeDashstyle;switch(e){case"solid":return"none";case"dot":return[1,4*a].join();case"dash":return[4*a,4*a].join();case"dashdot":return[4*a,4*a,1,4*a].join();case"longdash":return[8*a,4*a].join();case"longdashdot":return[8*a,4*a,1,4*a].join();default:return OpenLayers.String.trim(e).replace(/\s+/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(e,f,b){var d=this.getResolution();var a=(f.x/d+this.left);var g=(this.top-f.y/d);if(this.inValidRange(a,g)){e.setAttributeNS(null,"cx",a);e.setAttributeNS(null,"cy",g);e.setAttributeNS(null,"r",b);return e}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 h="";var o=true;var a=true;var e,p;for(var f=0,g=m.components.length;f<g;f++){h+=" M";e=this.getComponentsString(m.components[f].components," ");p=e.path;if(p){h+=" "+p;a=e.complete&&a}else{o=false}}h+=" z";if(o){b.setAttributeNS(null,"d",h);b.setAttributeNS(null,"fill-rule","evenodd");return a?b:null}else{return false}},drawRectangle:function(d,e){var b=this.getResolution();var a=(e.x/b+this.left);var f=(this.top-e.y/b);if(this.inValidRange(a,f)){d.setAttributeNS(null,"x",a);d.setAttributeNS(null,"y",f);d.setAttributeNS(null,"width",e.width/b);d.setAttributeNS(null,"height",e.height/b);return d}else{return false}},drawSurface:function(g,j){var h=null;var b=true;for(var f=0,a=j.components.length;f<a;f++){if((f%3)==0&&(f/3)==0){var e=this.getShortString(j.components[f]);if(!e){b=false}h="M "+e}else{if((f%3)==1){var e=this.getShortString(j.components[f]);if(!e){b=false}h+=" C "+e}else{var e=this.getShortString(j.components[f]);if(!e){b=false}h+=" "+e}}}h+=" Z";if(b){g.setAttributeNS(null,"d",h);return g}else{return false}},drawText:function(d,a,m){var b=this.getResolution();var j=(m.x/b+this.left);var f=(m.y/b-this.top);var h=this.nodeFactory(d+this.LABEL_ID_SUFFIX,"text");var g=this.nodeFactory(d+this.LABEL_ID_SUFFIX+"_tspan","tspan");h.setAttributeNS(null,"x",j);h.setAttributeNS(null,"y",-f);if(a.fontColor){h.setAttributeNS(null,"fill",a.fontColor)}if(a.fontOpacity){h.setAttributeNS(null,"opacity",a.fontOpacity)}if(a.fontFamily){h.setAttributeNS(null,"font-family",a.fontFamily)}if(a.fontSize){h.setAttributeNS(null,"font-size",a.fontSize)}if(a.fontWeight){h.setAttributeNS(null,"font-weight",a.fontWeight)}if(a.labelSelect===true){h.setAttributeNS(null,"pointer-events","visible");h._featureId=d;g._featureId=d;g._geometry=m;g._geometryClass=m.CLASS_NAME}else{h.setAttributeNS(null,"pointer-events","none")}var e=a.labelAlign||"cm";h.setAttributeNS(null,"text-anchor",OpenLayers.Renderer.SVG.LABEL_ALIGN[e[0]]||"middle");if(this.isGecko){h.setAttributeNS(null,"dominant-baseline",OpenLayers.Renderer.SVG.LABEL_ALIGN[e[1]]||"central")}else{g.setAttributeNS(null,"baseline-shift",OpenLayers.Renderer.SVG.LABEL_VSHIFT[e[1]]||"-35%")}g.textContent=a.label;if(!h.parentNode){h.appendChild(g);this.textRoot.appendChild(h)}},getComponentsString:function(e,d){var g=[];var a=true;var f=e.length;var m=[];var h,j;for(var b=0;b<f;b++){j=e[b];g.push(j);h=this.getShortString(j);if(h){m.push(h)}else{if(b>0){if(this.getShortString(e[b-1])){m.push(this.clipLine(e[b],e[b-1]))}}if(b<f-1){if(this.getShortString(e[b+1])){m.push(this.clipLine(e[b],e[b+1]))}}a=false}}return{path:m.join(d||","),complete:a}},clipLine:function(f,j){if(j.equals(f)){return""}var g=this.getResolution();var b=this.MAX_PIXEL-this.translationParameters.x;var a=this.MAX_PIXEL-this.translationParameters.y;var e=j.x/g+this.left;var o=this.top-j.y/g;var d=f.x/g+this.left;var m=this.top-f.y/g;var h;if(d<-b||d>b){h=(m-o)/(d-e);d=d<0?-b:b;m=o+(d-e)*h}if(m<-a||m>a){h=(d-e)/(m-o);m=m<0?-a:a;d=e+(m-o)*h}return d+","+m},getShortString:function(b){var d=this.getResolution();var a=(b.x/d+this.left);var e=(this.top-b.y/d);if(this.inValidRange(a,e)){return a+","+e}else{return false}},getPosition:function(a){return({x:parseFloat(a.getAttributeNS(null,"cx")),y:parseFloat(a.getAttributeNS(null,"cy"))})},importSymbol:function(f){if(!this.defs){this.defs=this.createDefs()}var b=this.container.id+"-"+f;if(document.getElementById(b)!=null){return b}var e=OpenLayers.Renderer.symbol[f];if(!e){throw new Error(f+" is not a valid symbol name")}var h=this.nodeFactory(b,"symbol");var d=this.nodeFactory(null,"polygon");h.appendChild(d);var q=new OpenLayers.Bounds(Number.MAX_VALUE,Number.MAX_VALUE,0,0);var o=[];var m,j;for(var g=0;g<e.length;g=g+2){m=e[g];j=e[g+1];q.left=Math.min(q.left,m);q.bottom=Math.min(q.bottom,j);q.right=Math.max(q.right,m);q.top=Math.max(q.top,j);o.push(m,",",j)}d.setAttributeNS(null,"points",o.join(" "));var a=q.getWidth();var p=q.getHeight();var r=[q.left-a,q.bottom-p,a*3,p*3];h.setAttributeNS(null,"viewBox",r.join(" "));this.symbolMetrics[b]=[Math.max(a,p),q.getCenterLonLat().lon,q.getCenterLonLat().lat];this.defs.appendChild(h);return h.id},getFeatureIdFromEvent:function(a){var d=OpenLayers.Renderer.Elements.prototype.getFeatureIdFromEvent.apply(this,arguments);if(this.supportUse===false&&!d){var b=a.target;d=b.parentNode&&b!=this.rendererRoot&&b.parentNode._featureId}return d},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 f=document.createStyleSheet();var d=["shape","rect","oval","fill","stroke","imagedata","group","textbox"];for(var e=0,a=d.length;e<a;e++){f.addRule("olv\\:"+d[e],"behavior: url(#default#VML); position: absolute; display: inline-block;")}}OpenLayers.Renderer.Elements.prototype.initialize.apply(this,arguments)},destroy:function(){OpenLayers.Renderer.Elements.prototype.destroy.apply(this,arguments)},supported:function(){return !!(document.namespaces)},setExtent:function(m,a){OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments);var d=this.getResolution();var b=(m.left/d)|0;var g=(m.top/d-this.size.h)|0;if(a||!this.offset){this.offset={x:b,y:g};b=0;g=0}else{b=b-this.offset.x;g=g-this.offset.y}var p=b+" "+g;this.root.coordorigin=p;var j=[this.root,this.vectorRoot,this.textRoot];var h;for(var e=0,f=j.length;e<f;++e){h=j[e];var o=this.size.w+" "+this.size.h;h.coordsize=o}this.root.style.flip="y";return true},setSize:function(g){OpenLayers.Renderer.prototype.setSize.apply(this,arguments);var e=[this.rendererRoot,this.root,this.vectorRoot,this.textRoot];var d=this.size.w+"px";var j=this.size.h+"px";var b;for(var f=0,a=e.length;f<a;++f){b=e[f];b.style.width=d;b.style.height=j}},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,z,p){b=b||f._style;z=z||f._options;var d=b.fillColor;if(f._geometryClass==="OpenLayers.Geometry.Point"){if(b.externalGraphic){if(b.graphicTitle){f.title=b.graphicTitle}var e=b.graphicWidth||b.graphicHeight;var q=b.graphicHeight||b.graphicWidth;e=e?e:b.pointRadius*2;q=q?q:b.pointRadius*2;var h=this.getResolution();var m=(b.graphicXOffset!=undefined)?b.graphicXOffset:-(0.5*e);var g=(b.graphicYOffset!=undefined)?b.graphicYOffset:-(0.5*q);f.style.left=(((p.x/h-this.offset.x)+m)|0)+"px";f.style.top=(((p.y/h-this.offset.y)-(g+q))|0)+"px";f.style.width=e+"px";f.style.height=q+"px";f.style.flip="y";d="none";z.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 w=a.size;f.coordsize=w+","+w;this.drawCircle(f,p,b.pointRadius);f.style.flip="y"}else{this.drawCircle(f,p,b.pointRadius)}}}if(z.isFilled){f.fillcolor=d}else{f.filled="false"}var o=f.getElementsByTagName("fill");var v=(o.length==0)?null:o[0];if(!z.isFilled){if(v){f.removeChild(v)}}else{if(!v){v=this.createNode("olv:fill",f.id+"_fill")}v.opacity=b.fillOpacity;if(f._geometryClass==="OpenLayers.Geometry.Point"&&b.externalGraphic){if(b.graphicOpacity){v.opacity=b.graphicOpacity}v.src=b.externalGraphic;v.type="frame";if(!(b.graphicWidth&&b.graphicHeight)){v.aspect="atmost"}}if(v.parentNode!=f){f.appendChild(v)}}var u=b.rotation;if((u!==undefined||f._rotation!==undefined)){f._rotation=u;if(b.externalGraphic){this.graphicRotate(f,m,g,b);v.opacity=0}else{if(f._geometryClass==="OpenLayers.Geometry.Point"){f.style.rotation=u||0}}}var j=f.getElementsByTagName("stroke");var r=(j.length==0)?null:j[0];if(!z.isStroked){f.stroked=false;if(r){r.on=false}}else{if(!r){r=this.createNode("olv:stroke",f.id+"_stroke");f.appendChild(r)}r.on=true;r.color=b.strokeColor;r.weight=b.strokeWidth+"px";r.opacity=b.strokeOpacity;r.endcap=b.strokeLinecap=="butt"?"flat":(b.strokeLinecap||"round");if(b.strokeDashstyle){r.dashstyle=this.dashStyle(b)}}if(b.cursor!="inherit"&&b.cursor!=null){f.style.cursor=b.cursor}return f},graphicRotate:function(u,B,f,z){var z=z||u._style;var v=z.rotation||0;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,f,z)}},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 g=v*Math.PI/180;var j=Math.sin(g);var e=Math.cos(g);var h="progid:DXImageTransform.Microsoft.Matrix(M11="+e+",M12="+(-j)+",M21="+j+",M22="+e+",SizingMethod='auto expand')\n";var b=z.graphicOpacity||z.fillOpacity;if(b&&b!=1){h+="progid:DXImageTransform.Microsoft.BasicImage(opacity="+b+")\n"}u.style.filter=h;var w=new OpenLayers.Geometry.Point(-B,-f);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){a.style.visibility="visible";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,f){var e=f.getBounds();if(e){var a=this.getResolution();var d=new OpenLayers.Bounds((e.left/a-this.offset.x)|0,(e.bottom/a-this.offset.y)|0,(e.right/a-this.offset.x)|0,(e.top/a-this.offset.y)|0);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=OpenLayers.Function.False;return b},nodeTypeCompare:function(d,b){var e=b;var a=e.indexOf(":");if(a!=-1){e=e.substr(a+1)}var f=d.nodeName;a=f.indexOf(":");if(a!=-1){f=f.substr(a+1)}return(e==f)},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(e,f,a){if(!isNaN(f.x)&&!isNaN(f.y)){var b=this.getResolution();e.style.left=(((f.x/b-this.offset.x)|0)-a)+"px";e.style.top=(((f.y/b-this.offset.y)|0)-a)+"px";var d=a*2;e.style.width=d+"px";e.style.height=d+"px";return e}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,h){this.setNodeDimension(b,o);var d=this.getResolution();var a=o.components.length;var f=new Array(a);var j,p,m;for(var g=0;g<a;g++){j=o.components[g];p=(j.x/d-this.offset.x)|0;m=(j.y/d-this.offset.y)|0;f[g]=" "+p+","+m+" l "}var e=(h)?" x e":" e";b.path="m"+f.join("")+e;return b},drawPolygon:function(b,p){this.setNodeDimension(b,p);var d=this.getResolution();var r=[];var g,f,e,m,a,h,q,o;for(e=0,m=p.components.length;e<m;e++){g=p.components[e];r.push("m");for(f=0,a=g.components.length;f<a;f++){h=g.components[f];q=(h.x/d-this.offset.x)|0;o=(h.y/d-this.offset.y)|0;r.push(" "+q+","+o);if(f==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)|0)+"px";b.style.top=((d.y/a-this.offset.y)|0)+"px";b.style.width=((d.width/a)|0)+"px";b.style.height=((d.height/a)|0)+"px";return b},drawText:function(e,a,j){var h=this.nodeFactory(e+this.LABEL_ID_SUFFIX,"olv:rect");var g=this.nodeFactory(e+this.LABEL_ID_SUFFIX+"_textbox","olv:textbox");var d=this.getResolution();h.style.left=((j.x/d-this.offset.x)|0)+"px";h.style.top=((j.y/d-this.offset.y)|0)+"px";h.style.flip="y";g.innerText=a.label;if(a.fontColor){g.style.color=a.fontColor}if(a.fontOpacity){g.style.filter="alpha(opacity="+(a.fontOpacity*100)+")"}if(a.fontFamily){g.style.fontFamily=a.fontFamily}if(a.fontSize){g.style.fontSize=a.fontSize}if(a.fontWeight){g.style.fontWeight=a.fontWeight}if(a.labelSelect===true){h._featureId=e;g._featureId=e;g._geometry=j;g._geometryClass=j.CLASS_NAME}g.style.whiteSpace="nowrap";g.inset="1px,0px,0px,0px";if(!h.parentNode){h.appendChild(g);this.textRoot.appendChild(h)}var f=a.labelAlign||"cm";if(f.length==1){f+="m"}var m=g.clientWidth*(OpenLayers.Renderer.VML.LABEL_SHIFT[f.substr(0,1)]);var b=g.clientHeight*(OpenLayers.Renderer.VML.LABEL_SHIFT[f.substr(1,1)]);h.style.left=parseInt(h.style.left)-m-1+"px";h.style.top=parseInt(h.style.top)+b+"px"},drawSurface:function(a,h){this.setNodeDimension(a,h);var b=this.getResolution();var m=[];var e,j,g;for(var d=0,f=h.components.length;d<f;d++){e=h.components[d];j=(e.x/b-this.offset.x)|0;g=(e.y/b-this.offset.y)|0;if((d%3)==0&&(d/3)==0){m.push("m")}else{if((d%3)==1){m.push(" c")}}m.push(" "+j+","+g)}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(e){var b=this.container.id+"-"+e;var a=this.symbolCache[b];if(a){return a}var d=OpenLayers.Renderer.symbol[e];if(!d){throw new Error(e+" is not a valid symbol name")}var o=new OpenLayers.Bounds(Number.MAX_VALUE,Number.MAX_VALUE,0,0);var f=["m"];for(var g=0;g<d.length;g=g+2){var j=d[g];var h=d[g+1];o.left=Math.min(o.left,j);o.bottom=Math.min(o.bottom,h);o.right=Math.max(o.right,j);o.top=Math.max(o.top,h);f.push(j);f.push(h);if(g==0){f.push("l")}}f.push("x e");var p=f.join(" ");var m=(o.getWidth()-o.getHeight())/2;if(m>0){o.bottom=o.bottom-m;o.top=o.top+m}else{o.left=o.left+m;o.right=o.right-m}a={path:p,size:o.getWidth(),left:o.left,bottom:o.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(e,a,f,b,d){this.layer=e;this.position=a.clone();this.bounds=f.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 g=OpenLayers.i18n("reprojectDeprecated",{layerName:this.layer.name});OpenLayers.Console.warn(g);var e=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(e.lon>b.lon){if(e.lon<0){e.lon=-180-(e.lon+180)}else{b.lon=180+b.lon+180}}var f=new OpenLayers.Bounds(e.lon,b.lat,b.lon,e.lat);return f},showTile:function(){if(this.shouldDraw){this.show()}},show:function(){},hide:function(){},CLASS_NAME:"OpenLayers.Tile"});OpenLayers.Control.NavigationHistory=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOGGLE,previous:null,previousOptions:null,next:null,nextOptions:null,limit:50,autoActivate:true,clearOnDeactivate:false,registry:null,nextStack:null,previousStack:null,listeners:null,restoring:false,initialize:function(a){OpenLayers.Control.prototype.initialize.apply(this,[a]);this.registry=OpenLayers.Util.extend({moveend:this.getState},this.registry);var b={trigger:OpenLayers.Function.bind(this.previousTrigger,this),displayClass:this.displayClass+" "+this.displayClass+"Previous"};OpenLayers.Util.extend(b,this.previousOptions);this.previous=new OpenLayers.Control.Button(b);var 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);this.clear()},onPreviousChange:function(b,a){if(b&&!this.previous.active){this.previous.activate()}else{if(!b&&this.previous.active){this.previous.deactivate()}}},onNextChange:function(b,a){if(b&&!this.next.active){this.next.activate()}else{if(!b&&this.next.active){this.next.deactivate()}}},destroy:function(){OpenLayers.Control.prototype.destroy.apply(this);this.previous.destroy();this.next.destroy();this.deactivate();for(var a in this){this[a]=null}},setMap:function(a){this.map=a;this.next.setMap(a);this.previous.setMap(a)},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);this.next.draw();this.previous.draw()},previousTrigger:function(){var b=this.previousStack.shift();var a=this.previousStack.shift();if(a!=undefined){this.nextStack.unshift(b);this.previousStack.unshift(a);this.restoring=true;this.restore(a);this.restoring=false;this.onNextChange(this.nextStack[0],this.nextStack.length);this.onPreviousChange(this.previousStack[1],this.previousStack.length-1)}else{this.previousStack.unshift(b)}return a},nextTrigger:function(){var a=this.nextStack.shift();if(a!=undefined){this.previousStack.unshift(a);this.restoring=true;this.restore(a);this.restoring=false;this.onNextChange(this.nextStack[0],this.nextStack.length);this.onPreviousChange(this.previousStack[1],this.previousStack.length-1)}return a},clear:function(){this.previousStack=[];this.previous.deactivate();this.nextStack=[];this.next.deactivate()},getState:function(){return{center:this.map.getCenter(),resolution:this.map.getResolution(),projection:this.map.getProjectionObject(),units:this.map.getProjectionObject().getUnits()||this.map.units||this.map.baseLayer.units}},restore:function(f){var a,e;if(this.map.getProjectionObject()==f.projection){e=this.map.getZoomForResolution(f.resolution);a=f.center}else{a=f.center.clone();a.transform(f.projection,this.map.getProjectionObject());var g=f.units;var b=this.map.getProjectionObject().getUnits()||this.map.units||this.map.baseLayer.units;var d=g&&b?OpenLayers.INCHES_PER_UNIT[g]/OpenLayers.INCHES_PER_UNIT[b]:1;e=this.map.getZoomForResolution(d*f.resolution)}this.map.setCenter(a,e)},setListeners:function(){this.listeners={};for(var a in this.registry){this.listeners[a]=OpenLayers.Function.bind(function(){if(!this.restoring){var b=this.registry[a].apply(this,arguments);this.previousStack.unshift(b);if(this.previousStack.length>1){this.onPreviousChange(this.previousStack[1],this.previousStack.length-1)}if(this.previousStack.length>(this.limit+1)){this.previousStack.pop()}if(this.nextStack.length>0){this.nextStack=[];this.onNextChange(null,0)}}return true},this)}},activate:function(){var a=false;if(this.map){if(OpenLayers.Control.prototype.activate.apply(this)){if(this.listeners==null){this.setListeners()}for(var b in this.listeners){this.map.events.register(b,this,this.listeners[b])}a=true;if(this.previousStack.length==0){this.initStack()}}}return a},initStack:function(){if(this.map.getCenter()){this.listeners.moveend()}},deactivate:function(){var b=false;if(this.map){if(OpenLayers.Control.prototype.deactivate.apply(this)){for(var a in this.listeners){this.map.events.unregister(a,this,this.listeners[a])}if(this.clearOnDeactivate){this.clear()}b=true}}return b},CLASS_NAME:"OpenLayers.Control.NavigationHistory"});OpenLayers.Control.PanPanel=OpenLayers.Class(OpenLayers.Control.Panel,{slideFactor:50,initialize:function(a){OpenLayers.Control.Panel.prototype.initialize.apply(this,[a]);this.addControls([new OpenLayers.Control.Pan(OpenLayers.Control.Pan.NORTH,{slideFactor:this.slideFactor}),new OpenLayers.Control.Pan(OpenLayers.Control.Pan.SOUTH,{slideFactor:this.slideFactor}),new OpenLayers.Control.Pan(OpenLayers.Control.Pan.EAST,{slideFactor:this.slideFactor}),new OpenLayers.Control.Pan(OpenLayers.Control.Pan.WEST,{slideFactor:this.slideFactor})])},CLASS_NAME:"OpenLayers.Control.PanPanel"});OpenLayers.Control.PanZoomBar=OpenLayers.Class(OpenLayers.Control.PanZoom,{zoomStopWidth:18,zoomStopHeight:11,slider:null,sliderEvents:null,zoombarDiv:null,divEvents:null,zoomWorldIcon:false,forceFixedZoomLevel:false,mouseDragStart:null,zoomStart:null,initialize:function(){OpenLayers.Control.PanZoom.prototype.initialize.apply(this,arguments)},destroy:function(){this._removeZoomBar();this.map.events.un({changebaselayer:this.redraw,scope:this});OpenLayers.Control.PanZoom.prototype.destroy.apply(this,arguments);delete this.mouseDragStart;delete this.zoomStart},setMap:function(a){OpenLayers.Control.PanZoom.prototype.setMap.apply(this,arguments);this.map.events.register("changebaselayer",this,this.redraw)},redraw:function(){if(this.div!=null){this.removeButtons();this._removeZoomBar()}this.draw()},draw:function(b){OpenLayers.Control.prototype.draw.apply(this,arguments);b=this.position.clone();this.buttons=[];var e=new OpenLayers.Size(18,18);var a=new OpenLayers.Pixel(b.x+e.w/2,b.y);var d=e.w;if(this.zoomWorldIcon){a=new OpenLayers.Pixel(b.x+e.w,b.y)}this._addButton("panup","north-mini.png",a,e);b.y=a.y+e.h;this._addButton("panleft","west-mini.png",b,e);if(this.zoomWorldIcon){this._addButton("zoomworld","zoom-world-mini.png",b.add(e.w,0),e);d*=2}this._addButton("panright","east-mini.png",b.add(d,0),e);this._addButton("pandown","south-mini.png",a.add(0,e.h*2),e);this._addButton("zoomin","zoom-plus-mini.png",a.add(0,e.h*3+5),e);a=this._addZoomBar(a.add(0,e.h*4+5));this._addButton("zoomout","zoom-minus-mini.png",a,e);return this.div},_addZoomBar:function(a){var f=OpenLayers.Util.getImagesLocation();var h=this.id+"_"+this.map.id;var b=this.map.getNumZoomLevels()-1-this.map.getZoom();var d=OpenLayers.Util.createAlphaImageDiv(h,a.add(-1,b*this.zoomStopHeight),new OpenLayers.Size(20,9),f+"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 e=new OpenLayers.Size();e.h=this.zoomStopHeight*this.map.getNumZoomLevels();e.w=this.zoomStopWidth;var g=null;if(OpenLayers.Util.alphaHack()){var h=this.id+"_"+this.map.id;g=OpenLayers.Util.createAlphaImageDiv(h,a,new OpenLayers.Size(e.w,this.zoomStopHeight),f+"zoombar.png","absolute",null,"crop");g.style.height=e.h+"px"}else{g=OpenLayers.Util.createDiv("OpenLayers_Control_PanZoomBar_Zoombar"+this.map.id,a,e,f+"zoombar.png")}this.zoombarDiv=g;this.divEvents=new OpenLayers.Events(this,g,null,true,{includeXY:true});this.divEvents.on({mousedown:this.divClick,mousemove:this.passEventToSlider,dblclick:this.doubleClick,click:this.doubleClick});this.div.appendChild(g);this.startTop=parseInt(g.style.top);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 f=a.xy.y;var e=OpenLayers.Util.pagePosition(a.object)[1];var d=(f-e)/this.zoomStopHeight;if(this.forceFixedZoomLevel||!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 e=OpenLayers.Util.pagePosition(this.zoombarDiv);if((b.clientY-e[1])>0&&(b.clientY-e[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.mouseDragStart){this.div.style.cursor="";this.map.events.un({mouseup:this.passEventToSlider,mousemove:this.passEventToSlider,scope:this});var a=this.zoomStart.y-b.xy.y;var d=this.map.zoom;if(!this.forceFixedZoomLevel&&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.mouseDragStart=null;this.zoomStart=null;OpenLayers.Event.stop(b)}},moveZoomBar:function(){var a=((this.map.getNumZoomLevels()-1)-this.map.getZoom())*this.zoomStopHeight+this.startTop+1;this.slider.style.top=a+"px"},CLASS_NAME:"OpenLayers.Control.PanZoomBar"});OpenLayers.Control.Permalink=OpenLayers.Class(OpenLayers.Control,{argParserClass:OpenLayers.Control.ArgParser,element:null,base:"",displayProjection:null,initialize:function(b,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(e){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,f){a=a||this.map.getCenter();var e=OpenLayers.Util.getParameters(this.base);if(a){e.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}e.lat=Math.round(m*100000)/100000;e.lon=Math.round(b*100000)/100000;f=f||this.map.layers;e.layers="";for(var g=0,j=f.length;g<j;g++){var h=f[g];if(h.isBaseLayer){e.layers+=(h==this.map.baseLayer)?"B":"0"}else{e.layers+=(h.getVisibility())?"T":"F"}}}return e},CLASS_NAME:"OpenLayers.Control.Permalink"});OpenLayers.Control.ZoomPanel=OpenLayers.Class(OpenLayers.Control.Panel,{initialize:function(a){OpenLayers.Control.Panel.prototype.initialize.apply(this,[a]);this.addControls([new OpenLayers.Control.ZoomIn(),new OpenLayers.Control.ZoomToMaxExtent(),new OpenLayers.Control.ZoomOut()])},CLASS_NAME:"OpenLayers.Control.ZoomPanel"});OpenLayers.Format.CSWGetDomain=function(b){b=OpenLayers.Util.applyDefaults(b,OpenLayers.Format.CSWGetDomain.DEFAULTS);var a=OpenLayers.Format.CSWGetDomain["v"+b.version.replace(/\./g,"_")];if(!a){throw"Unsupported CSWGetDomain version: "+b.version}return new a(b)};OpenLayers.Format.CSWGetDomain.DEFAULTS={version:"2.0.2"};OpenLayers.Format.CSWGetRecords=function(b){b=OpenLayers.Util.applyDefaults(b,OpenLayers.Format.CSWGetRecords.DEFAULTS);var a=OpenLayers.Format.CSWGetRecords["v"+b.version.replace(/\./g,"_")];if(!a){throw"Unsupported CSWGetRecords version: "+b.version}return new a(b)};OpenLayers.Format.CSWGetRecords.DEFAULTS={version:"2.0.2"};OpenLayers.Format.JSON=OpenLayers.Class(OpenLayers.Format,{indent:"    ",space:" ",newline:"\n",level:0,pretty:false,initialize:function(a){OpenLayers.Format.prototype.initialize.apply(this,[a])},read:function(json,filter){try{if(/^[\],:{}\s]*$/.test(json.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){var object=eval("("+json+")");if(typeof filter==="function"){function walk(k,v){if(v&&typeof v==="object"){for(var i in v){if(v.hasOwnProperty(i)){v[i]=walk(i,v[i])}}}return filter(k,v)}object=walk("",object)}if(this.keepData){this.data=object}return object}}catch(e){}return null},write:function(f,d){this.pretty=!!d;var a=null;var b=typeof f;if(this.serialize[b]){try{a=this.serialize[b].apply(this,[f])}catch(e){OpenLayers.Console.error("Trouble serializing: "+e)}}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 g=["{"];this.level+=1;var e,b,f;var a=false;for(e in d){if(d.hasOwnProperty(e)){b=OpenLayers.Format.JSON.prototype.write.apply(this,[e,this.pretty]);f=OpenLayers.Format.JSON.prototype.write.apply(this,[d[e],this.pretty]);if(b!=null&&f!=null){if(a){g.push(",")}g.push(this.writeNewline(),this.writeIndent(),b,":",this.writeSpace(),f);a=true}}}this.level-=1;g.push(this.writeNewline(),this.writeIndent(),"}");return g.join("")},array:function(f){var d;var e=["["];this.level+=1;for(var b=0,a=f.length;b<a;++b){d=OpenLayers.Format.JSON.prototype.write.apply(this,[f[b],this.pretty]);if(d!=null){if(b>0){e.push(",")}e.push(this.writeNewline(),this.writeIndent(),d)}}this.level-=1;e.push(this.writeNewline(),this.writeIndent(),"]");return e.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(e,d){var f=a[d];if(f){return f}f=d.charCodeAt();return"\\u00"+Math.floor(f/16).toString(16)+(f%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.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 e;if(window.ActiveXObject&&!this.xmldom){e=new ActiveXObject("Microsoft.XMLDOM")}else{e=this.xmldom}e.loadXML(d);return e}),this),function(){return new DOMParser().parseFromString(d,"text/xml")},function(){var e=new XMLHttpRequest();e.open("GET","data:text/xml;charset=utf-8,"+encodeURIComponent(d),false);if(e.overrideMimeType){e.overrideMimeType("text/xml")}e.send(null);return e.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 e=document.implementation.createDocument("","",null);if(e.importNode){b=e.importNode(b,true)}e.appendChild(b);d=a.serializeToString(e)}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(typeof b!=="string"){b=String(b)}if(this.xmldom){a=this.xmldom.createTextNode(b)}else{a=document.createTextNode(b)}return a},getElementsByTagNameNS:function(f,e,d){var a=[];if(f.getElementsByTagNameNS){a=f.getElementsByTagNameNS(e,d)}else{var b=f.getElementsByTagName("*");var m,g;for(var h=0,j=b.length;h<j;++h){m=b[h];g=(m.prefix)?(m.prefix+":"+d):d;if((d=="*")||(g==m.nodeName)){if((e=="*")||(e==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 f=d.attributes;var j,e;for(var g=0,h=f.length;g<h;++g){j=f[g];if(j.namespaceURI==b){e=(j.prefix)?(j.prefix+":"+a):a;if(e==j.nodeName){m=j;break}}}}return m},getAttributeNS:function(f,e,a){var b="";if(f.getAttributeNS){b=f.getAttributeNS(e,a)||""}else{var d=this.getAttributeNodeNS(f,e,a);if(d){b=d.nodeValue}}return b},getChildValue:function(a,d){var b=d||"";if(a){for(var e=a.firstChild;e;e=e.nextSibling){switch(e.nodeType){case 3:case 4:b+=e.nodeValue}}}return b},concatChildValues:function(b,e){var d="";var f=b.firstChild;var a;while(f){a=f.nodeValue;if(a){d+=a}f=f.nextSibling}if(d==""&&e!=undefined){d=e}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 f=false,b=false;var a=OpenLayers.Format.XML.CONTENT_TYPE.EMPTY;for(var e=d.firstChild;e;e=e.nextSibling){switch(e.nodeType){case 1:b=true;break;case 8:break;default:f=true}if(b&&f){break}}if(b&&f){a=OpenLayers.Format.XML.CONTENT_TYPE.MIXED}else{if(b){return OpenLayers.Format.XML.CONTENT_TYPE.COMPLEX}else{if(f){return OpenLayers.Format.XML.CONTENT_TYPE.SIMPLE}}}return a},hasAttributeNS:function(d,b,a){var e=false;if(d.hasAttributeNS){e=d.hasAttributeNS(b,a)}else{e=!!this.getAttributeNodeNS(d,b,a)}return e},setAttributeNS:function(e,d,a,f){if(e.setAttributeNS){e.setAttributeNS(d,a,f)}else{if(this.xmldom){if(d){var b=e.ownerDocument.createNode(2,a,d);b.nodeValue=f;e.setAttributeNode(b)}else{e.setAttribute(a,f)}}else{throw"setAttributeNS not implemented"}}},createElementNSPlus:function(b,a){a=a||{};var e=a.uri||this.namespaces[a.prefix];if(!e){var g=b.indexOf(":");e=this.namespaces[b.substring(0,g)]}if(!e){e=this.namespaces[this.defaultPrefix]}var d=this.createElementNS(e,b);if(a.attributes){this.setAttributes(d,a.attributes)}var f=a.value;if(f!=null){d.appendChild(this.createTextNode(f))}return d},setAttributes:function(d,f){var e,b;for(var a in f){if(f[a]!=null&&f[a].toString){e=f[a].toString();b=this.namespaces[a.substring(0,a.indexOf(":"))]||null;this.setAttributeNS(d,b,a,e)}}},readNode:function(d,f){if(!f){f={}}var e=this.readers[d.namespaceURI?this.namespaceAlias[d.namespaceURI]:this.defaultPrefix];if(e){var b=d.localName||d.nodeName.split(":").pop();var a=e[b]||e["*"];if(a){a.apply(this,[d,f])}}return f},readChildNodes:function(e,f){if(!f){f={}}var d=e.childNodes;var g;for(var b=0,a=d.length;b<a;++b){g=d[b];if(g.nodeType==1){this.readNode(g,f)}}return f},writeNode:function(a,g,e){var f,d;var b=a.indexOf(":");if(b>0){f=a.substring(0,b);d=a.substring(b+1)}else{if(e){f=this.namespaceAlias[e.namespaceURI]}else{f=this.defaultPrefix}d=a}var h=this.writers[f][d].apply(this,[g]);if(e){e.appendChild(h)}return h},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(e,a,d){outer:for(var b=e;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(f,g){var e=null;if(f){if(f.lookupNamespaceURI){e=f.lookupNamespaceURI(g)}else{outer:switch(f.nodeType){case 1:if(f.namespaceURI!==null&&f.prefix===g){e=f.namespaceURI;break outer}var b=f.attributes.length;if(b){var a;for(var d=0;d<b;++d){a=f.attributes[d];if(a.prefix==="xmlns"&&a.name==="xmlns:"+g){e=a.value||null;break outer}else{if(a.name==="xmlns"&&g===null){e=a.value||null;break outer}}}}e=this.lookupNamespaceURI(f.parentNode,g);break outer;case 2:e=this.lookupNamespaceURI(f.ownerElement,g);break outer;case 9:e=this.lookupNamespaceURI(f.documentElement,g);break outer;case 6:case 12:case 10:case 11:break outer;default:e=this.lookupNamespaceURI(f.parentNode,g);break outer}}}return e},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(e,b,a){OpenLayers.Util.extend(this,a);this.control=e;this.callbacks=b;var d=this.map||e.map;if(d){this.setMap(d)}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.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(j,e){if(arguments.length===1&&typeof j==="object"){e=j;j=e&&e.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,e);this.layers=[];this.id=OpenLayers.Util.createUniqueID("OpenLayers.Map_");this.div=OpenLayers.Util.getElement(j);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 h=this.id+"_OpenLayers_ViewPort";this.viewPortDiv=OpenLayers.Util.createDiv(h,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);h=this.id+"_OpenLayers_Container";this.layerContainerDiv=OpenLayers.Util.createDiv(h);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 g=true;var d=document.getElementsByTagName("link");for(var f=0,a=d.length;f<a;++f){if(OpenLayers.Util.isEquivalentUrl(d.item(f).href,this.theme)){g=false;break}}if(g){var b=document.createElement("link");b.setAttribute("rel","stylesheet");b.setAttribute("type","text/css");b.setAttribute("href",this.theme);document.getElementsByTagName("head")[0].appendChild(b)}}if(this.controls==null){if(OpenLayers.Control!=null){this.controls=[new OpenLayers.Control.Navigation(),new OpenLayers.Control.PanZoom(),new OpenLayers.Control.ArgParser(),new OpenLayers.Control.Attribution()]}else{this.controls=[]}}for(var f=0,a=this.controls.length;f<a;f++){this.addControlToMap(this.controls[f])}this.popups=[];this.unloadDestroy=OpenLayers.Function.bind(this.destroy,this);OpenLayers.Event.observe(window,"unload",this.unloadDestroy);if(e&&e.layers){this.addLayers(e.layers);if(e.center){this.setCenter(e.center,e.zoom)}}},render:function(a){this.div=OpenLayers.Util.getElement(a);OpenLayers.Element.addClass(this.div,"olMap");this.events.attachToElement(this.div);this.viewPortDiv.parentNode.removeChild(this.viewPortDiv);this.div.appendChild(this.viewPortDiv);this.updateSize()},unloadDestroy:null,updateSizeDestroy:null,destroy:function(){if(!this.unloadDestroy){return false}if(this.panTween){this.panTween.stop();this.panTween=null}OpenLayers.Event.stopObserving(window,"unload",this.unloadDestroy);this.unloadDestroy=null;if(this.updateSizeDestroy){OpenLayers.Event.stopObserving(window,"resize",this.updateSizeDestroy)}else{this.events.unregister("resize",this,this.updateSize)}this.paddingForPopups=null;if(this.controls!=null){for(var a=this.controls.length-1;a>=0;--a){this.controls[a].destroy()}this.controls=null}if(this.layers!=null){for(var a=this.layers.length-1;a>=0;--a){this.layers[a].destroy(false)}this.layers=null}if(this.viewPortDiv){this.div.removeChild(this.viewPortDiv)}this.viewPortDiv=null;if(this.eventListeners){this.events.un(this.eventListeners);this.eventListeners=null}this.events.destroy();this.events=null},setOptions:function(a){OpenLayers.Util.extend(this,a)},getTileSize:function(){return this.tileSize},getBy:function(f,d,a){var e=(typeof a.test=="function");var b=OpenLayers.Array.filter(this[f],function(g){return g[d]==a||(e&&a.test(g[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(f){var b=null;for(var e=0,a=this.layers.length;e<a;e++){var d=this.layers[e];if(d.id==f){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 e=OpenLayers.i18n("layerAlreadyAdded",{layerName:d.name});OpenLayers.Console.warn(e);return false}}if(this.allOverlays){d.isBaseLayer=false}if(this.events.triggerEvent("preaddlayer",{layer:d})===false){return}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,f){if(f==null){f=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(f){for(var b=0,a=this.layers.length;b<a;b++){var e=this.layers[b];if(e.isBaseLayer||this.allOverlays){this.setBaseLayer(e);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(e,b){var f=this.getLayerIndex(e);if(b<0){b=0}else{if(b>this.layers.length){b=this.layers.length}}if(f!=b){this.layers.splice(f,1);this.layers.splice(b,0,e);for(var d=0,a=this.layers.length;d<a;d++){this.setLayerZIndex(this.layers[d],d)}this.events.triggerEvent("changelayer",{layer:e,property:"order"});if(this.allOverlays){if(b===0){this.setBaseLayer(e)}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(d){if(d!=this.baseLayer){if(OpenLayers.Util.indexOf(this.layers,d)!=-1){var a=this.getCenter();var e=OpenLayers.Util.getResolutionFromScale(this.getScale(),d.units);if(this.baseLayer!=null&&!this.allOverlays){this.baseLayer.setVisibility(false)}this.baseLayer=d;this.viewRequestID++;if(!this.allOverlays||this.baseLayer.visibility){this.baseLayer.setVisibility(true)}if(a!=null){var b=this.getZoomForResolution(e||this.resolution,true);this.setCenter(a,b,false,true)}this.events.triggerEvent("changebaselayer",{layer:this.baseLayer})}}},addControl:function(b,a){this.controls.push(b);this.addControlToMap(b,a)},addControls:function(b,h){var f=(arguments.length===1)?[]:h;for(var e=0,a=b.length;e<a;e++){var g=b[e];var d=(f[e])?f[e]:null;this.addControl(g,d)}},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)}}if(b.autoActivate){b.activate()}},getControl:function(f){var b=null;for(var d=0,a=this.controls.length;d<a;d++){var e=this.controls[d];if(e.id==f){b=e;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,e){if(e){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(){var d=this.getCurrentSize();if(d&&!isNaN(d.h)&&!isNaN(d.w)){this.events.clearMouseCache();var g=this.getSize();if(g==null){this.size=g=d}if(!d.equals(g)){this.size=d;for(var e=0,b=this.layers.length;e<b;e++){this.layers[e].onMapResize()}var a=this.getCenter();if(this.baseLayer!=null&&a!=null){var f=this.getZoom();this.zoom=null;this.setCenter(a,f)}}}},getCurrentSize:function(){var a=new OpenLayers.Size(this.div.clientWidth,this.div.clientHeight);if(a.w==0&&a.h==0||isNaN(a.w)&&isNaN(a.h)){a.w=this.div.offsetWidth;a.h=this.div.offsetHeight}if(a.w==0&&a.h==0||isNaN(a.w)&&isNaN(a.h)){a.w=parseInt(this.div.style.width);a.h=parseInt(this.div.style.height)}return a},calculateBounds:function(a,b){var f=null;if(a==null){a=this.getCenter()}if(b==null){b=this.getResolution()}if((a!=null)&&(b!=null)){var e=this.getSize();var g=e.w*b;var d=e.h*b;f=new OpenLayers.Bounds(a.lon-g/2,a.lat-d/2,a.lon+g/2,a.lat+d/2)}return f},getCenter:function(){var a=null;if(this.center){a=this.center.clone()}return a},getZoom:function(){return this.zoom},pan:function(e,d,f){f=OpenLayers.Util.applyDefaults(f,{animate:true,dragging:false});var g=this.getViewPortPxFromLonLat(this.getCenter());var b=g.add(e,d);if(!f.dragging||!b.equals(g)){var a=this.getLonLatFromViewPortPx(b);if(f.animate){this.panTo(a)}else{this.setCenter(a,null,f.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 e={lon:a.lon,lat:a.lat};var d={lon:b.lon,lat:b.lat};this.panTween.start(e,d,this.panDuration,{callbacks:{start:OpenLayers.Function.bind(function(f){this.events.triggerEvent("movestart")},this),eachStep:OpenLayers.Function.bind(function(f){f=new OpenLayers.LonLat(f.lon,f.lat);this.moveTo(f,this.zoom,{dragging:true,noEvent:true})},this),done:OpenLayers.Function.bind(function(f){f=new OpenLayers.LonLat(f.lon,f.lat);this.moveTo(f,this.zoom,{noEvent:true});this.events.triggerEvent("moveend")},this)}})}else{this.setCenter(b)}},setCenter:function(d,a,b,e){this.moveTo(d,a,{dragging:b,forceZoomChange:e,caller:"setCenter"})},moveTo:function(h,r,w){if(!w){w={}}if(r!=null){r=parseFloat(r);if(!this.fractionalZoom){r=Math.round(r)}}var q=w.dragging;var d=w.forceZoomChange;var j=w.noEvent;if(this.panTween&&w.caller=="setCenter"){this.panTween.stop()}if(!this.center&&!this.isValidLonLat(h)){h=this.maxExtent.getCenterLonLat()}if(this.restrictedExtent!=null){if(h==null){h=this.getCenter()}if(r==null){r=this.getZoom()}var e=this.getResolutionForZoom(r);var u=this.calculateBounds(h,e);if(!this.restrictedExtent.containsBounds(u)){var v=this.restrictedExtent.getCenterLonLat();if(u.getWidth()>this.restrictedExtent.getWidth()){h=new OpenLayers.LonLat(v.lon,h.lat)}else{if(u.left<this.restrictedExtent.left){h=h.add(this.restrictedExtent.left-u.left,0)}else{if(u.right>this.restrictedExtent.right){h=h.add(this.restrictedExtent.right-u.right,0)}}}if(u.getHeight()>this.restrictedExtent.getHeight()){h=new OpenLayers.LonLat(h.lon,v.lat)}else{if(u.bottom<this.restrictedExtent.bottom){h=h.add(0,this.restrictedExtent.bottom-u.bottom)}else{if(u.top>this.restrictedExtent.top){h=h.add(0,this.restrictedExtent.top-u.top)}}}}}var b=d||((this.isValidZoomLevel(r))&&(r!=this.getZoom()));var f=(this.isValidLonLat(h))&&(!h.equals(this.center));if(b||f||!q){if(!this.dragging&&!j){this.events.triggerEvent("movestart")}if(f){if((!b)&&(this.center)){this.centerLayerContainer(h)}this.center=h.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 g=0,o=this.layers.length;g<o;g++){var m=this.layers[g];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 g=0,o=this.popups.length;g<o;g++){this.popups[g].updatePosition()}}this.events.triggerEvent("move");if(b){this.events.triggerEvent("zoomend")}}if(!q&&!j){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()}else{if(this.allOverlays===true&&this.layers.length>0){a=this.layers[0].getResolution()}}return a},getUnits:function(){var a=null;if(this.baseLayer!=null){a=this.baseLayer.units}return a},getScale:function(){var 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(e,d){var b=e.getCenterLonLat();if(this.baseLayer.wrapDateLine){var a=this.getMaxExtent();e=e.clone();while(e.right<e.left){e.right+=a.getWidth()}b=e.getCenterLonLat().wrapDateLine(a)}this.setCenter(b,this.getZoomForExtent(e,d))},zoomToMaxExtent:function(d){var b=(d)?d.restricted:true;var a=this.getMaxExtent({restricted:b});this.zoomToExtent(a)},zoomToScale:function(j,h){var e=OpenLayers.Util.getResolutionFromScale(j,this.baseLayer.units);var d=this.getSize();var g=d.w*e;var b=d.h*e;var a=this.getCenter();var f=new OpenLayers.Bounds(a.lon-g/2,a.lat-b/2,a.lon+g/2,a.lat+b/2);this.zoomToExtent(f,h)},getLonLatFromViewPortPx:function(a){var b=null;if(this.baseLayer!=null){b=this.baseLayer.getLonLatFromViewPortPx(a)}return b},getViewPortPxFromLonLat:function(b){var a=null;if(this.baseLayer!=null){a=this.baseLayer.getViewPortPxFromLonLat(b)}return a},getLonLatFromPixel:function(a){return this.getLonLatFromViewPortPx(a)},getPixelFromLonLat:function(b){var a=this.getViewPortPxFromLonLat(b);a.x=Math.round(a.x);a.y=Math.round(a.y);return a},getGeodesicPixelSize:function(h){var e=h?this.getLonLatFromPixel(h):(this.getCenter()||new OpenLayers.LonLat(0,0));var f=this.getResolution();var d=e.add(-f/2,0);var m=e.add(f/2,0);var b=e.add(0,-f/2);var g=e.add(0,f/2);var j=new OpenLayers.Projection("EPSG:4326");var a=this.getProjectionObject()||j;if(!a.equals(j)){d.transform(a,j);m.transform(a,j);b.transform(a,j);g.transform(a,j)}return new OpenLayers.Size(OpenLayers.Util.distVincenty(d,m),OpenLayers.Util.distVincenty(b,g))},getViewPortPxFromLayerPx:function(e){var d=null;if(e!=null){var b=parseInt(this.layerContainerDiv.style.left);var a=parseInt(this.layerContainerDiv.style.top);d=e.add(b,a)}return d},getLayerPxFromViewPortPx:function(d){var e=null;if(d!=null){var b=-parseInt(this.layerContainerDiv.style.left);var a=-parseInt(this.layerContainerDiv.style.top);e=d.add(b,a);if(isNaN(e.x)||isNaN(e.y)){e=null}}return e},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(e){return new OpenLayers.Pixel(-(e.w/2),-e.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(1276,736),isAlphaImage:false,fixedRelativePosition:false,positionBlocks:{tl:{offset:new OpenLayers.Pixel(44,0),padding:new OpenLayers.Bounds(8,40,8,9),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,51,22,0),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,"auto"),anchor:new OpenLayers.Bounds(null,50,0,0),position:new OpenLayers.Pixel(-1238,0)},{size:new OpenLayers.Size("auto",19),anchor:new OpenLayers.Bounds(0,32,22,null),position:new OpenLayers.Pixel(0,-631)},{size:new OpenLayers.Size(22,18),anchor:new OpenLayers.Bounds(null,32,0,null),position:new OpenLayers.Pixel(-1238,-632)},{size:new OpenLayers.Size(81,35),anchor:new OpenLayers.Bounds(null,0,0,null),position:new OpenLayers.Pixel(0,-688)}]},tr:{offset:new OpenLayers.Pixel(-45,0),padding:new OpenLayers.Bounds(8,40,8,9),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,51,22,0),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,"auto"),anchor:new OpenLayers.Bounds(null,50,0,0),position:new OpenLayers.Pixel(-1238,0)},{size:new OpenLayers.Size("auto",19),anchor:new OpenLayers.Bounds(0,32,22,null),position:new OpenLayers.Pixel(0,-631)},{size:new OpenLayers.Size(22,19),anchor:new OpenLayers.Bounds(null,32,0,null),position:new OpenLayers.Pixel(-1238,-631)},{size:new OpenLayers.Size(81,35),anchor:new OpenLayers.Bounds(0,0,null,null),position:new OpenLayers.Pixel(-215,-687)}]},bl:{offset:new OpenLayers.Pixel(45,0),padding:new OpenLayers.Bounds(8,9,8,40),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,21,22,32),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,"auto"),anchor:new OpenLayers.Bounds(null,21,0,32),position:new OpenLayers.Pixel(-1238,0)},{size:new OpenLayers.Size("auto",21),anchor:new OpenLayers.Bounds(0,0,22,null),position:new OpenLayers.Pixel(0,-629)},{size:new OpenLayers.Size(22,21),anchor:new OpenLayers.Bounds(null,0,0,null),position:new OpenLayers.Pixel(-1238,-629)},{size:new OpenLayers.Size(81,33),anchor:new OpenLayers.Bounds(null,null,0,0),position:new OpenLayers.Pixel(-101,-674)}]},br:{offset:new OpenLayers.Pixel(-44,0),padding:new OpenLayers.Bounds(8,9,8,40),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,21,22,32),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,"auto"),anchor:new OpenLayers.Bounds(null,21,0,32),position:new OpenLayers.Pixel(-1238,0)},{size:new OpenLayers.Size("auto",21),anchor:new OpenLayers.Bounds(0,0,22,null),position:new OpenLayers.Pixel(0,-629)},{size:new OpenLayers.Size(22,21),anchor:new OpenLayers.Bounds(null,0,0,null),position:new OpenLayers.Pixel(-1238,-629)},{size:new OpenLayers.Size(81,33),anchor:new OpenLayers.Bounds(0,null,null,0),position:new OpenLayers.Pixel(-311,-674)}]}},minSize:new OpenLayers.Size(105,10),maxSize:new OpenLayers.Size(1200,660),initialize:function(h,d,g,b,a,f,e){this.imageSrc=OpenLayers.Util.getImagesLocation()+"cloud-popup-relative.png";OpenLayers.Popup.Framed.prototype.initialize.apply(this,arguments);this.contentDiv.className=this.contentDisplayClass},destroy:function(){OpenLayers.Popup.Framed.prototype.destroy.apply(this,arguments)},CLASS_NAME:"OpenLayers.Popup.FramedCloud"});OpenLayers.Request={DEFAULT_CONFIG:{method:"GET",url:window.location.href,async:true,user:undefined,password:undefined,params:null,proxy:OpenLayers.ProxyHost,headers:{},data:null,callback:function(){},success:null,failure:null,scope:null},events:new OpenLayers.Events(this,null,["complete","success","failure"]),issue:function(b){var f=OpenLayers.Util.extend(this.DEFAULT_CONFIG,{proxy:OpenLayers.ProxyHost});b=OpenLayers.Util.applyDefaults(b,f);var e=new OpenLayers.Request.XMLHttpRequest();var a=b.url;if(b.params){var d=OpenLayers.Util.getParameterString(b.params);if(d.length>0){var h=(a.indexOf("?")>-1)?"&":"?";a+=h+d}}if(b.proxy&&(a.indexOf("http")==0)){if(typeof b.proxy=="function"){a=b.proxy(a)}else{a=b.proxy+encodeURIComponent(a)}}e.open(b.method,a,b.async,b.user,b.password);for(var g in b.headers){e.setRequestHeader(g,b.headers[g])}var m=this.events;var j=this;e.onreadystatechange=function(){if(e.readyState==OpenLayers.Request.XMLHttpRequest.DONE){var o=m.triggerEvent("complete",{request:e,config:b,requestUrl:a});if(o!==false){j.runCallbacks({request:e,config:b,requestUrl:a})}}};if(b.async===false){e.send(b.data)}else{window.setTimeout(function(){if(e._aborted!==true){e.send(b.data)}},0)}return e},runCallbacks:function(e){var f=e.request;var d=e.config;var a=(d.scope)?OpenLayers.Function.bind(d.callback,d.scope):d.callback;var g;if(d.success){g=(d.scope)?OpenLayers.Function.bind(d.success,d.scope):d.success}var b;if(d.failure){b=(d.scope)?OpenLayers.Function.bind(d.failure,d.scope):d.failure}a(f);if(!f.status||(f.status>=200&&f.status<300)){this.events.triggerEvent("success",e);if(g){g(f)}}if(f.status&&(f.status<200||f.status>=300)){this.events.triggerEvent("failure",e);if(b){b(f)}}},GET:function(a){a=OpenLayers.Util.extend(a,{method:"GET"});return OpenLayers.Request.issue(a)},POST:function(a){a=OpenLayers.Util.extend(a,{method:"POST"});a.headers=a.headers?a.headers:{};if(!("CONTENT-TYPE" in OpenLayers.Util.upperCaseObject(a.headers))){a.headers["Content-Type"]="application/xml"}return OpenLayers.Request.issue(a)},PUT:function(a){a=OpenLayers.Util.extend(a,{method:"PUT"});a.headers=a.headers?a.headers:{};if(!("CONTENT-TYPE" in OpenLayers.Util.upperCaseObject(a.headers))){a.headers["Content-Type"]="application/xml"}return OpenLayers.Request.issue(a)},DELETE:function(a){a=OpenLayers.Util.extend(a,{method:"DELETE"});return OpenLayers.Request.issue(a)},HEAD:function(a){a=OpenLayers.Util.extend(a,{method:"HEAD"});return OpenLayers.Request.issue(a)},OPTIONS:function(a){a=OpenLayers.Util.extend(a,{method:"OPTIONS"});return OpenLayers.Request.issue(a)}};OpenLayers.Tile.Image=OpenLayers.Class(OpenLayers.Tile,{url:null,imgDiv:null,frame:null,layerAlphaHack:null,isBackBuffer:false,lastRatio:1,isFirstDraw:true,backBufferTile:null,initialize:function(e,a,f,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])}OpenLayers.Event.stopObservingElement(this.imgDiv);if(this.imgDiv.parentNode==this.frame){this.frame.removeChild(this.imgDiv);this.imgDiv.map=null}this.imgDiv.urls=null;this.imgDiv.src=OpenLayers.Util.getImagesLocation()+"blank.gif"}this.imgDiv=null;if((this.frame!=null)&&(this.frame.parentNode==this.layer.div)){this.layer.div.removeChild(this.frame)}this.frame=null;if(this.backBufferTile){this.backBufferTile.destroy();this.backBufferTile=null}this.layer.events.unregister("loadend",this,this.resetBackBuffer);OpenLayers.Tile.prototype.destroy.apply(this,arguments)},clone:function(a){if(a==null){a=new OpenLayers.Tile.Image(this.layer,this.position,this.bounds,this.url,this.size)}a=OpenLayers.Tile.prototype.clone.apply(this,[a]);a.imgDiv=null;return a},draw:function(){if(this.layer!=this.layer.map.baseLayer&&this.layer.reproject){this.bounds=this.getBoundsFromBaseLayer(this.position)}var a=OpenLayers.Tile.prototype.draw.apply(this,arguments);if((OpenLayers.Util.indexOf(this.layer.SUPPORTED_TRANSITIONS,this.layer.transitionEffect)!=-1)||this.layer.singleTile){if(a){if(!this.backBufferTile){this.backBufferTile=this.clone();this.backBufferTile.hide();this.backBufferTile.isBackBuffer=true;this.events.register("loadend",this,this.resetBackBuffer);this.layer.events.register("loadend",this,this.resetBackBuffer)}this.startTransition()}else{if(this.backBufferTile){this.backBufferTile.clear()}}}else{if(a&&this.isFirstDraw){this.events.register("loadend",this,this.showTile);this.isFirstDraw=false}}if(!a){return false}if(this.isLoading){this.events.triggerEvent("reload")}else{this.isLoading=true;this.events.triggerEvent("loadstart")}return this.renderTile()},resetBackBuffer:function(){this.showTile();if(this.backBufferTile&&(this.isFirstDraw||!this.layer.numLoadingTiles)){this.isFirstDraw=false;var a=this.layer.maxExtent;var b=(a&&this.bounds.intersectsBounds(a,false));if(b){this.backBufferTile.position=this.position;this.backBufferTile.bounds=this.bounds;this.backBufferTile.size=this.size;this.backBufferTile.imageSize=this.layer.getImageSize(this.bounds)||this.size;this.backBufferTile.imageOffset=this.layer.imageOffset;this.backBufferTile.resolution=this.layer.getResolution();this.backBufferTile.renderTile()}this.backBufferTile.hide()}},renderTile:function(){if(this.imgDiv==null){this.initImgDiv()}this.imgDiv.viewRequestID=this.layer.map.viewRequestID;if(this.layer.async){this.layer.getURLasync(this.bounds,this,"url",this.positionImage)}else{if(this.layer.url instanceof Array){this.imgDiv.urls=this.layer.url.slice()}this.url=this.layer.getURL(this.bounds);this.positionImage()}return true},positionImage:function(){if(this.layer===null){return}OpenLayers.Util.modifyDOMElement(this.frame,null,this.position,this.size);var a=this.layer.getImageSize(this.bounds);if(this.layerAlphaHack){OpenLayers.Util.modifyAlphaImageDiv(this.imgDiv,null,null,a,this.url)}else{OpenLayers.Util.modifyDOMElement(this.imgDiv,null,null,a);this.imgDiv.src=this.url}},clear:function(){if(this.imgDiv){this.hide();if(OpenLayers.Tile.Image.useBlankTile){this.imgDiv.src=OpenLayers.Util.getImagesLocation()+"blank.gif"}}},initImgDiv:function(){var e=this.layer.imageOffset;var b=this.layer.getImageSize(this.bounds);if(this.layerAlphaHack){this.imgDiv=OpenLayers.Util.createAlphaImageDiv(null,e,b,null,"relative",null,null,null,true)}else{this.imgDiv=OpenLayers.Util.createImage(null,e,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 e=1;if(this.backBufferTile.resolution){e=this.backBufferTile.resolution/this.layer.getResolution()}if(e!=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*e,this.backBufferTile.size.h*e);var a=this.layer.map.getLayerPxFromLonLat(d);OpenLayers.Util.modifyDOMElement(this.backBufferTile.frame,null,a,b);var f=this.backBufferTile.imageSize;f=new OpenLayers.Size(f.w*e,f.h*e);var g=this.backBufferTile.imageOffset;if(g){g=new OpenLayers.Pixel(g.x*e,g.y*e)}OpenLayers.Util.modifyDOMElement(this.backBufferTile.imgDiv,null,g,f);this.backBufferTile.show()}}else{if(this.layer.singleTile){this.backBufferTile.show()}else{this.backBufferTile.hide()}}this.lastRatio=e},show:function(){this.frame.style.display="";if(OpenLayers.Util.indexOf(this.layer.SUPPORTED_TRANSITIONS,this.layer.transitionEffect)!=-1){if(navigator.userAgent.toLowerCase().indexOf("gecko")!=-1){this.frame.scrollLeft=this.frame.scrollLeft}}},hide:function(){this.frame.style.display="none"},CLASS_NAME:"OpenLayers.Tile.Image"});OpenLayers.Tile.Image.useBlankTile=(OpenLayers.Util.getBrowserName()=="safari"||OpenLayers.Util.getBrowserName()=="opera");OpenLayers.Control.OverviewMap=OpenLayers.Class(OpenLayers.Control,{element:null,ovmap:null,size:new OpenLayers.Size(180,90),layers:null,minRectSize:15,minRectDisplayClass:"RectReplacement",minRatio:8,maxRatio:32,mapOptions:null,autoPan:false,handlers:null,resolutionFactor:1,maximized:false,initialize:function(a){this.layers=[];this.handlers={};OpenLayers.Control.prototype.initialize.apply(this,[a])},destroy:function(){if(!this.mapDiv){return}if(this.handlers.click){this.handlers.click.destroy()}if(this.handlers.drag){this.handlers.drag.destroy()}this.mapDiv.removeChild(this.extentRectangle);this.extentRectangle=null;if(this.rectEvents){this.rectEvents.destroy();this.rectEvents=null}if(this.ovmap){this.ovmap.destroy();this.ovmap=null}this.element.removeChild(this.mapDiv);this.mapDiv=null;this.div.removeChild(this.element);this.element=null;if(this.maximizeDiv){OpenLayers.Event.stopObservingElement(this.maximizeDiv);this.div.removeChild(this.maximizeDiv);this.maximizeDiv=null}if(this.minimizeDiv){OpenLayers.Event.stopObservingElement(this.minimizeDiv);this.div.removeChild(this.minimizeDiv);this.minimizeDiv=null}this.map.events.un({moveend:this.update,changebaselayer:this.baseLayerDraw,scope:this});OpenLayers.Control.prototype.destroy.apply(this,arguments)},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!(this.layers.length>0)){if(this.map.baseLayer){var e=this.map.baseLayer.clone();this.layers=[e]}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 f=OpenLayers.Util.getImagesLocation();var b=f+"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=f+"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 g=["dblclick","mousedown"];for(var d=0,a=g.length;d<a;d++){OpenLayers.Event.observe(this.maximizeDiv,g[d],OpenLayers.Event.stop);OpenLayers.Event.observe(this.minimizeDiv,g[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);if(this.maximized){this.maximizeControl()}return this.div},baseLayerDraw:function(){this.draw();this.map.events.unregister("changebaselayer",this,this.baseLayerDraw)},rectDrag:function(m){var e=this.handlers.drag.last.x-m.x;var b=this.handlers.drag.last.y-m.y;if(e!=0||b!=0){var h=this.rectPxBounds.top;var a=this.rectPxBounds.left;var f=Math.abs(this.rectPxBounds.getHeight());var d=this.rectPxBounds.getWidth();var g=Math.max(0,(h-b));g=Math.min(g,this.ovmap.size.h-this.hComp-f);var j=Math.max(0,(a-e));j=Math.min(j,this.ovmap.size.w-this.wComp-d);this.setRectPxBounds(new OpenLayers.Bounds(j,g+f,j+d,g))}},mapDivClick:function(m){var b=this.rectPxBounds.getCenterPixel();var f=m.xy.x-b.x;var e=m.xy.y-b.y;var h=this.rectPxBounds.top;var d=this.rectPxBounds.left;var o=Math.abs(this.rectPxBounds.getHeight());var a=this.rectPxBounds.getWidth();var g=Math.max(0,(h+e));g=Math.min(g,this.ovmap.size.h-o);var j=Math.max(0,(d+f));j=Math.min(j,this.ovmap.size.w-a);this.setRectPxBounds(new OpenLayers.Bounds(j,g+o,j+a,g));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 e=this.ovmap.getResolution()/this.map.getResolution();return((e>this.minRatio)&&(e<=this.maxRatio)&&(this.ovmap.getExtent().containsBounds(d)))},updateOverview:function(){var d=this.map.getResolution();var b=this.ovmap.getResolution();var e=b/d;if(e>this.maxRatio){b=this.minRatio*d}else{if(e<=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(e){var h=Math.max(e.top,0);var f=Math.max(e.left,0);var b=Math.min(e.top+Math.abs(e.getHeight()),this.ovmap.size.h-this.hComp);var j=Math.min(e.left+e.getWidth(),this.ovmap.size.w-this.wComp);var d=Math.max(j-f,0);var m=Math.max(b-h,0);if(d<this.minRectSize||m<this.minRectSize){this.extentRectangle.className=this.displayClass+this.minRectDisplayClass;var g=f+(d/2)-(this.minRectSize/2);var a=h+(m/2)-(this.minRectSize/2);this.extentRectangle.style.top=Math.round(a)+"px";this.extentRectangle.style.left=Math.round(g)+"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(h)+"px";this.extentRectangle.style.left=Math.round(f)+"px";this.extentRectangle.style.height=Math.round(m)+"px";this.extentRectangle.style.width=Math.round(d)+"px"}this.rectPxBounds=new OpenLayers.Bounds(Math.round(f),Math.round(b),Math.round(j),Math.round(h))},getRectBoundsFromMapBounds:function(e){var a=new OpenLayers.LonLat(e.left,e.bottom);var g=new OpenLayers.LonLat(e.right,e.top);var d=this.getOverviewPxFromLonLat(a);var b=this.getOverviewPxFromLonLat(g);var f=null;if(d&&b){f=new OpenLayers.Bounds(d.x,d.y,b.x,b.y)}return f},getMapBoundsFromRectBounds:function(e){var d=new OpenLayers.Pixel(e.left,e.bottom);var b=new OpenLayers.Pixel(e.right,e.top);var a=this.getLonLatFromOverviewPx(d);var f=this.getLonLatFromOverviewPx(b);return new OpenLayers.Bounds(a.lon,a.lat,f.lon,f.lat)},getLonLatFromOverviewPx:function(g){var d=this.ovmap.size;var b=this.ovmap.getResolution();var a=this.ovmap.getExtent().getCenterLonLat();var f=g.x-(d.w/2);var e=g.y-(d.h/2);return new OpenLayers.LonLat(a.lon+f*b,a.lat-e*b)},getOverviewPxFromLonLat:function(e){var b=this.ovmap.getResolution();var d=this.ovmap.getExtent();var a=null;if(d){a=new OpenLayers.Pixel(Math.round(1/b*(e.lon-d.left)),Math.round(1/b*(d.top-e.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)}}if(this.layer!=null&&this.marker!=null){this.layer.removeMarker(this.marker)}this.layer=null;this.id=null;this.lonlat=null;this.data=null;if(this.marker!=null){this.destroyMarker(this.marker);this.marker=null}if(this.popup!=null){this.destroyPopup(this.popup);this.popup=null}},onScreen:function(){var b=false;if((this.layer!=null)&&(this.layer.map!=null)){var a=this.layer.map.getExtent();b=a.containsLonLat(this.lonlat)}return b},createMarker:function(){if(this.lonlat!=null){this.marker=new OpenLayers.Marker(this.lonlat,this.data.icon)}return this.marker},destroyMarker:function(){this.marker.destroy()},createPopup:function(b){if(this.lonlat!=null){var 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.CSWGetDomain.v2_0_2=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance",csw:"http://www.opengis.net/cat/csw/2.0.2"},defaultPrefix:"csw",version:"2.0.2",schemaLocation:"http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd",PropertyName:null,ParameterName:null,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},read:function(a){if(typeof a=="string"){a=OpenLayers.Format.XML.prototype.read.apply(this,[a])}if(a&&a.nodeType==9){a=a.documentElement}var b={};this.readNode(a,b);return b},readers:{csw:{GetDomainResponse:function(a,b){this.readChildNodes(a,b)},DomainValues:function(e,f){if(!(f.DomainValues instanceof Array)){f.DomainValues=[]}var b=e.attributes;var g={};for(var d=0,a=b.length;d<a;++d){g[b[d].name]=b[d].nodeValue}this.readChildNodes(e,g);f.DomainValues.push(g)},PropertyName:function(a,b){b.PropertyName=this.getChildValue(a)},ParameterName:function(a,b){b.ParameterName=this.getChildValue(a)},ListOfValues:function(a,b){if(!(b.ListOfValues instanceof Array)){b.ListOfValues=[]}this.readChildNodes(a,b.ListOfValues)},Value:function(e,g){var b=e.attributes;var f={};for(var d=0,a=b.length;d<a;++d){f[b[d].name]=b[d].nodeValue}f.value=this.getChildValue(e);g.push({Value:f})},ConceptualScheme:function(a,b){b.ConceptualScheme={};this.readChildNodes(a,b.ConceptualScheme)},Name:function(a,b){b.Name=this.getChildValue(a)},Document:function(a,b){b.Document=this.getChildValue(a)},Authority:function(a,b){b.Authority=this.getChildValue(a)},RangeOfValues:function(a,b){b.RangeOfValues={};this.readChildNodes(a,b.RangeOfValues)},MinValue:function(e,g){var b=e.attributes;var f={};for(var d=0,a=b.length;d<a;++d){f[b[d].name]=b[d].nodeValue}f.value=this.getChildValue(e);g.MinValue=f},MaxValue:function(e,g){var b=e.attributes;var f={};for(var d=0,a=b.length;d<a;++d){f[b[d].name]=b[d].nodeValue}f.value=this.getChildValue(e);g.MaxValue=f}}},write:function(a){var b=this.writeNode("csw:GetDomain",a);return OpenLayers.Format.XML.prototype.write.apply(this,[b])},writers:{csw:{GetDomain:function(a){var b=this.createElementNSPlus("csw:GetDomain",{attributes:{service:"CSW",version:this.version}});if(a.PropertyName||this.PropertyName){this.writeNode("csw:PropertyName",a.PropertyName||this.PropertyName,b)}else{if(a.ParameterName||this.ParameterName){this.writeNode("csw:ParameterName",a.ParameterName||this.ParameterName,b)}}this.readChildNodes(b,a);return b},PropertyName:function(b){var a=this.createElementNSPlus("csw:PropertyName",{value:b});return a},ParameterName:function(b){var a=this.createElementNSPlus("csw:ParameterName",{value:b});return a}}},CLASS_NAME:"OpenLayers.Format.CSWGetDomain.v2_0_2"});OpenLayers.Format.Context=OpenLayers.Class({version:null,layerOptions:null,layerParams:null,parser:null,initialize:function(a){OpenLayers.Util.extend(this,a);this.options=a},read:function(g,e){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")}var j=this.getParser(a);var f=j.read(g,e);var h;if(e&&e.map){this.context=f;if(e.map instanceof OpenLayers.Map){h=this.mergeContextToMap(f,e.map)}else{var d=e.map;if(OpenLayers.Util.isElement(d)||typeof d=="string"){d={div:d}}h=this.contextToMap(f,d)}}else{h=f}return h},getLayerFromContext:function(h){var d,g;var m={queryable:h.queryable,visibility:h.visibility,maxExtent:h.maxExtent,metadata:OpenLayers.Util.applyDefaults(h.metadata,{styles:h.styles}),numZoomLevels:h.numZoomLevels,units:h.units,isBaseLayer:h.isBaseLayer,opacity:h.opacity,displayInLayerSwitcher:h.displayInLayerSwitcher,singleTile:h.singleTile,tileSize:(h.tileSize)?new OpenLayers.Size(h.tileSize.width,h.tileSize.height):undefined,minScale:h.minScale||h.maxScaleDenominator,maxScale:h.maxScale||h.minScaleDenominator};if(this.layerOptions){OpenLayers.Util.applyDefaults(m,this.layerOptions)}var b={layers:h.name,transparent:h.transparent,version:h.version};if(h.formats&&h.formats.length>0){b.format=h.formats[0].value;for(d=0,g=h.formats.length;d<g;d++){var j=h.formats[d];if(j.current==true){b.format=j.value;break}}}if(h.styles&&h.styles.length>0){for(d=0,g=h.styles.length;d<g;d++){var a=h.styles[d];if(a.current==true){if(a.href){b.sld=a.href}else{if(a.body){b.sld_body=a.body}else{b.styles=a.name}}break}}}if(this.layerParams){OpenLayers.Util.applyDefaults(b,this.layerParams)}var e=null;var f=h.service;if(f==OpenLayers.Format.Context.serviceTypes.WFS){m.strategies=[new OpenLayers.Strategy.BBOX()];m.protocol=new OpenLayers.Protocol.WFS({url:h.url,featurePrefix:h.name.split(":")[0],featureType:h.name.split(":").pop()});e=new OpenLayers.Layer.Vector(h.title||h.name,m)}else{if(f==OpenLayers.Format.Context.serviceTypes.KML){m.strategies=[new OpenLayers.Strategy.Fixed()];m.protocol=new OpenLayers.Protocol.HTTP({url:h.url,format:new OpenLayers.Format.KML()});e=new OpenLayers.Layer.Vector(h.title||h.name,m)}else{if(f==OpenLayers.Format.Context.serviceTypes.GML){m.strategies=[new OpenLayers.Strategy.Fixed()];m.protocol=new OpenLayers.Protocol.HTTP({url:h.url,format:new OpenLayers.Format.GML()});e=new OpenLayers.Layer.Vector(h.title||h.name,m)}else{if(h.features){e=new OpenLayers.Layer.Vector(h.title||h.name,m);e.addFeatures(h.features)}else{if(h.categoryLayer!==true){e=new OpenLayers.Layer.WMS(h.title||h.name,h.url,b,m)}}}}}return e},getLayersFromContext:function(e){var f=[];for(var d=0,a=e.length;d<a;d++){var b=this.getLayerFromContext(e[d]);if(b!==null){f.push(b)}}return f},contextToMap:function(b,a){a=OpenLayers.Util.applyDefaults({maxExtent:b.maxExtent,projection:b.projection},a);var d=new OpenLayers.Map(a);d.addLayers(this.getLayersFromContext(b.layersContext));d.setCenter(b.bounds.getCenterLonLat(),d.getZoomForExtent(b.bounds,true));return d},mergeContextToMap:function(a,b){b.addLayers(this.getLayersFromContext(a.layersContext));return b},write:function(e,b){e=this.toContext(e);var a=b&&b.version;var f=this.getParser(a);var d=f.write(e,b);return d},CLASS_NAME:"OpenLayers.Format.Context"});OpenLayers.Format.Context.serviceTypes={WMS:"urn:ogc:serviceType:WMS",WFS:"urn:ogc:serviceType:WFS",WCS:"urn:ogc:serviceType:WCS",GML:"urn:ogc:serviceType:GML",SLD:"urn:ogc:serviceType:SLD",FES:"urn:ogc:serviceType:FES",KML:"urn:ogc:serviceType:KML"};if(!OpenLayers.Format.OWSCommon){OpenLayers.Format.OWSCommon={}}OpenLayers.Format.OWSCommon.v1=OpenLayers.Class(OpenLayers.Format.XML,{regExes:{trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)},readers:{ows:{ServiceIdentification:function(a,b){b.serviceIdentification={};this.readChildNodes(a,b.serviceIdentification)},Title:function(a,b){b.title=this.getChildValue(a)},Abstract:function(a,b){b["abstract"]=this.getChildValue(a)},Keywords:function(a,b){b.keywords={};this.readChildNodes(a,b.keywords)},Keyword:function(b,a){a[this.getChildValue(b)]=true},ServiceType:function(a,b){b.serviceType={codeSpace:a.getAttribute("codeSpace"),value:this.getChildValue(a)}},ServiceTypeVersion:function(a,b){b.serviceTypeVersion=this.getChildValue(a)},Fees:function(a,b){b.fees=this.getChildValue(a)},AccessConstraints:function(a,b){b.accessConstraints=this.getChildValue(a)},ServiceProvider:function(a,b){b.serviceProvider={};this.readChildNodes(a,b.serviceProvider)},ProviderName:function(a,b){b.providerName=this.getChildValue(a)},ProviderSite:function(a,b){b.providerSite=this.getAttributeNS(a,this.namespaces.xlink,"href")},ServiceContact:function(a,b){b.serviceContact={};this.readChildNodes(a,b.serviceContact)},IndividualName:function(b,a){a.individualName=this.getChildValue(b)},PositionName:function(b,a){a.positionName=this.getChildValue(b)},ContactInfo:function(b,a){a.contactInfo={};this.readChildNodes(b,a.contactInfo)},Phone:function(b,a){a.phone={};this.readChildNodes(b,a.phone)},Voice:function(b,a){a.voice=this.getChildValue(b)},Address:function(b,a){a.address={};this.readChildNodes(b,a.address)},DeliveryPoint:function(b,a){a.deliveryPoint=this.getChildValue(b)},City:function(b,a){a.city=this.getChildValue(b)},AdministrativeArea:function(b,a){a.administrativeArea=this.getChildValue(b)},PostalCode:function(b,a){a.postalCode=this.getChildValue(b)},Country:function(b,a){a.country=this.getChildValue(b)},ElectronicMailAddress:function(b,a){a.electronicMailAddress=this.getChildValue(b)},Role:function(b,a){a.role=this.getChildValue(b)},OperationsMetadata:function(a,b){b.operationsMetadata={};this.readChildNodes(a,b.operationsMetadata)},Operation:function(d,b){var a=d.getAttribute("name");b[a]={};this.readChildNodes(d,b[a])},DCP:function(b,a){a.dcp={};this.readChildNodes(b,a.dcp)},HTTP:function(b,a){a.http={};this.readChildNodes(b,a.http)},Get:function(b,a){a.get=this.getAttributeNS(b,this.namespaces.xlink,"href")},Post:function(b,a){a.post=this.getAttributeNS(b,this.namespaces.xlink,"href")},Parameter:function(d,a){if(!a.parameters){a.parameters={}}var b=d.getAttribute("name");a.parameters[b]={};this.readChildNodes(d,a.parameters[b])},Value:function(a,b){b[this.getChildValue(a)]=true},OutputFormat:function(a,b){b.formats.push({value:this.getChildValue(a)});this.readChildNodes(a,b)},WGS84BoundingBox:function(b,d){var a={};a.crs=b.getAttribute("crs");if(d.BoundingBox){d.BoundingBox.push(a)}else{d.projection=a.crs;a=d}this.readChildNodes(b,a)},BoundingBox:function(a,b){this.readers.ows["WGS84BoundingBox"].apply(this,[a,b])},LowerCorner:function(b,d){var e=this.getChildValue(b).replace(this.regExes.trimSpace,"");e=e.replace(this.regExes.trimComma,",");var a=e.split(this.regExes.splitSpace);d.left=a[0];d.bottom=a[1]},UpperCorner:function(b,d){var e=this.getChildValue(b).replace(this.regExes.trimSpace,"");e=e.replace(this.regExes.trimComma,",");var a=e.split(this.regExes.splitSpace);d.right=a[0];d.top=a[1];d.bounds=new OpenLayers.Bounds(d.left,d.bottom,d.right,d.top);delete d.left;delete d.bottom;delete d.right;delete d.top}}},writers:{ows:{BoundingBox:function(a){var b=this.createElementNSPlus("ows:BoundingBox",{attributes:{crs:a.projection}});this.writeNode("ows:LowerCorner",a,b);this.writeNode("ows:UpperCorner",a,b);return b},LowerCorner:function(a){var b=this.createElementNSPlus("ows:LowerCorner",{value:a.bounds.left+" "+a.bounds.bottom});return b},UpperCorner:function(a){var b=this.createElementNSPlus("ows:UpperCorner",{value:a.bounds.right+" "+a.bounds.top});return b},Title:function(b){var a=this.createElementNSPlus("ows:Title",{value:b});return a},OutputFormat:function(b){var a=this.createElementNSPlus("ows:OutputFormat",{value:b});return a}}},CLASS_NAME:"OpenLayers.Format.OWSCommon.v1"});OpenLayers.Format.SOSCapabilities=OpenLayers.Class(OpenLayers.Format.XML,{defaultVersion:"1.0.0",version:null,parser:null,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a]);this.options=a},read:function(f){if(typeof f=="string"){f=OpenLayers.Format.XML.prototype.read.apply(this,[f])}var d=f.documentElement;var b=this.version||d.getAttribute("version")||this.defaultVersion;if(!this.parser||this.parser.version!==b){var e=OpenLayers.Format.SOSCapabilities["v"+b.replace(/\./g,"_")];if(!e){throw"Can't find a SOS capabilities parser for version "+b}var g=new e(this.options)}var a=g.read(f);a.version=b;return a},CLASS_NAME:"OpenLayers.Format.SOSCapabilities"});OpenLayers.Format.WFSCapabilities=OpenLayers.Class(OpenLayers.Format.XML,{defaultVersion:"1.1.0",version:null,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a]);this.options=a},read:function(f){if(typeof f=="string"){f=OpenLayers.Format.XML.prototype.read.apply(this,[f])}var d=f.documentElement;var b=this.version;if(!b){b=d.getAttribute("version");if(!b){b=this.defaultVersion}}var e=OpenLayers.Format.WFSCapabilities["v"+b.replace(/\./g,"_")];if(!e){throw"Can't find a WFS capabilities parser for version "+b}var g=new e(this.options);var a=g.read(f);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(e,m){var f=[];var b={};var g={complexTypes:f,customTypes:b};this.readChildNodes(e,g);var h=e.attributes;var p,a;for(var j=0,o=h.length;j<o;++j){p=h[j];a=p.name;if(a.indexOf("xmlns")==0){this.setNamespace(a.split(":")[1]||"",p.value)}else{m[a]=p.value}}m.featureTypes=f;m.targetPrefix=this.namespaceAlias[m.targetNamespace];var q,d;for(var j=0,o=f.length;j<o;++j){q=f[j];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 e={};var b=a.attributes;var h;for(var f=0,g=b.length;f<g;++f){h=b[f];e[h.name]=h.value}var j=e.type;if(!j){j={};this.readChildNodes(a,j);e.restriction=j;e.type=j.base}var o=j.base||j;e.localType=o.split(":").pop();d.elements.push(e)}if(d.complexTypes){var j=a.getAttribute("type");var m=j.split(":").pop();d.customTypes[m]={name:a.getAttribute("name"),type:j}}},simpleType:function(a,b){this.readChildNodes(a,b)},restriction:function(a,b){b.base=a.getAttribute("base");this.readRestriction(a,b)}}},readRestriction:function(e,g){var d=e.childNodes;var j,h,f;for(var b=0,a=d.length;b<a;++b){j=d[b];if(j.nodeType==1){h=j.nodeName.split(":").pop();f=j.getAttribute("value");if(!g[h]){g[h]=f}else{if(typeof g[h]=="string"){g[h]=[g[h]]}g[h].push(f)}}}},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(b,a){a=a||{};OpenLayers.Util.applyDefaults(a,{output:"features"});if(typeof b=="string"){b=OpenLayers.Format.XML.prototype.read.apply(this,[b])}if(b&&b.nodeType==9){b=b.documentElement}var d={};if(b){this.readNode(b,d)}if(d.features&&a.output==="features"){d=d.features}return d},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(b){var e=this.createElementNSPlus("wfs:GetFeature",{attributes:{service:"WFS",version:this.version,outputFormat:b&&b.outputFormat,maxFeatures:b&&b.maxFeatures,"xsi:schemaLocation":this.schemaLocationAttr(b)}});if(typeof this.featureType=="string"){this.writeNode("Query",b,e)}else{for(var d=0,a=this.featureType.length;d<a;d++){b.featureType=this.featureType[d];this.writeNode("Query",b,e)}}return e},Transaction:function(f){var g=this.createElementNSPlus("wfs:Transaction",{attributes:{service:"WFS",version:this.version}});if(f){var b,e;for(var d=0,a=f.length;d<a;++d){e=f[d];b=this.stateName[e.state];if(b){this.writeNode(b,e,g)}}}return g},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)}if(this.geometryName!==null){this.writeNode("Property",{name:this.geometryName,value:b},d)}for(var a in b.attributes){if(b.attributes[a]!==undefined){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);if(b.value!==null){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 g=OpenLayers.Util.extend({},this.schemaLocations);if(a.schema){g[a.featurePrefix]=a.schema}var f=[];var d;for(var b in g){d=this.namespaces[b];if(d){f.push(d+" "+g[b])}}var e=f.join(" ")||undefined;return e},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.WMSCapabilities=OpenLayers.Class(OpenLayers.Format.XML,{defaultVersion:"1.1.1",version:null,parser:null,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a]);this.options=a},read:function(f){if(typeof f=="string"){f=OpenLayers.Format.XML.prototype.read.apply(this,[f])}var d=f.documentElement;var b=this.version||d.getAttribute("version")||this.defaultVersion;if(!this.parser||this.parser.version!==b){var e=OpenLayers.Format.WMSCapabilities["v"+b.replace(/\./g,"_")];if(!e){throw"Can't find a WMS capabilities parser for version "+b}this.parser=new e(this.options)}var a=this.parser.read(f);a.version=b;return a},CLASS_NAME:"OpenLayers.Format.WMSCapabilities"});OpenLayers.Format.WMSDescribeLayer=OpenLayers.Class(OpenLayers.Format.XML,{defaultVersion:"1.1.1",version:null,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a]);this.options=a},read:function(f){if(typeof f=="string"){f=OpenLayers.Format.XML.prototype.read.apply(this,[f])}var d=f.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 e=OpenLayers.Format.WMSDescribeLayer["v"+b.replace(/\./g,"_")];if(!e){throw"Can't find a WMS DescribeLayer parser for version "+b}var g=new e(this.options);var a=g.read(f);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(f){var a;if(typeof f=="string"){f=OpenLayers.Format.XML.prototype.read.apply(this,[f])}var b=f.documentElement;if(b){var d=this;var e=this["read_"+b.nodeName];if(e){a=e.call(this,b)}else{a=new OpenLayers.Format.GML((this.options?this.options:{})).read(f)}}else{a=f}return a},read_msGMLOutput:function(m){var f=[];var b=this.getSiblingNodesByTagCriteria(m,this.layerIdentifier);if(b){for(var o=0,r=b.length;o<r;++o){var d=b[o];var p=d.nodeName;if(d.prefix){p=p.split(":")[1]}var p=p.replace(this.layerIdentifier,"");var q=this.getSiblingNodesByTagCriteria(d,this.featureIdentifier);if(q){for(var h=0;h<q.length;h++){var a=q[h];var e=this.parseGeometry(a);var g=this.parseAttributes(a);var u=new OpenLayers.Feature.Vector(e.geometry,g,null);u.bounds=e.bounds;u.type=p;f.push(u)}}}}return f},read_FeatureInfoResponse:function(g){var d=[];var m=this.getElementsByTagNameNS(g,"*","FIELDS");for(var h=0,o=m.length;h<o;h++){var a=m[h];var p=null;var f={};for(var e=0,q=a.attributes.length;e<q;e++){var b=a.attributes[e];f[b.nodeName]=b.nodeValue}d.push(new OpenLayers.Feature.Vector(p,f,null))}return d},getSiblingNodesByTagCriteria:function(g,m){var a=[];var d,f,e,h,b;if(g&&g.hasChildNodes()){d=g.childNodes;e=d.length;for(var j=0;j<e;j++){b=d[j];while(b&&b.nodeType!=1){b=b.nextSibling;j++}f=(b?b.nodeName:"");if(f.length>0&&f.indexOf(m)>-1){a.push(b)}else{h=this.getSiblingNodesByTagCriteria(b,m);if(h.length>0){(a.length==0)?a=h:a.push(h)}}}}return a},parseAttributes:function(f){var g={};if(f.nodeType==1){var d=f.childNodes;var e=d.length;for(var h=0;h<e;++h){var b=d[h];if(b.nodeType==1){var o=b.childNodes;if(o.length==1){var m=o[0];if(m.nodeType==3||m.nodeType==4){var a=(b.prefix)?b.nodeName.split(":")[1]:b.nodeName;var j=m.nodeValue.replace(this.regExes.trimSpace,"");g[a]=j}}}}}return g},parseGeometry:function(d){if(!this.gmlFormat){this.gmlFormat=new OpenLayers.Format.GML()}var a=this.gmlFormat.parseFeature(d);var e,b=null;if(a){e=a.geometry&&a.geometry.clone();b=a.bounds&&a.bounds.clone();a.destroy()}return{geometry:e,bounds:b}},CLASS_NAME:"OpenLayers.Format.WMSGetFeatureInfo"});OpenLayers.Format.WMTSCapabilities=OpenLayers.Class(OpenLayers.Format.XML,{defaultVersion:"1.0.0",version:null,parser:null,yx:{"urn:ogc:def:crs:EPSG::4326":true},initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a]);this.options=a},read:function(e){if(typeof e=="string"){e=OpenLayers.Format.XML.prototype.read.apply(this,[e])}var b=e.documentElement;var a=this.version||b.getAttribute("version")||this.defaultVersion;if(!this.parser||this.parser.version!==a){var d=OpenLayers.Format.WMTSCapabilities["v"+a.replace(/\./g,"_")];if(!d){throw new Error("Can't find a WMTS capabilities parser for version "+a)}this.parser=new d(this.options)}return this.parser.read(e)},createLayer:function(f,g){var o;var p={layer:true,matrixSet:true};for(var d in p){if(!(d in g)){throw new Error("Missing property '"+d+"' in layer configuration.")}}var h=f.contents;var e=h.tileMatrixSets[g.matrixSet];var m=h.layers;var b;for(var j=0,q=h.layers.length;j<q;++j){if(h.layers[j].identifier===g.layer){b=h.layers[j];break}}if(b&&e){var a;for(var j=0,q=b.styles.length;j<q;++j){a=b.styles[j];if(a.isDefault){break}}o=new OpenLayers.Layer.WMTS(OpenLayers.Util.applyDefaults(g,{url:f.operationsMetadata.GetTile.dcp.http.get,name:b.title,style:a,matrixIds:e.matrixIds}))}return o},CLASS_NAME:"OpenLayers.Format.WMTSCapabilities"});OpenLayers.Handler.Click=OpenLayers.Class(OpenLayers.Handler,{delay:300,single:true,"double":false,pixelTolerance:0,stopSingle:false,stopDouble:false,timerId:null,down:null,rightclickTimerId:null,initialize:function(d,b,a){OpenLayers.Handler.prototype.initialize.apply(this,arguments);if(this.pixelTolerance!=null){this.mousedown=function(e){this.down=e.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,documentDrag:false,documentEvents: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:OpenLayers.Function.True}document.onselectstart=OpenLayers.Function.False;a=!this.stopDown}else{this.started=false;this.start=null;this.last=null}return a},mousemove:function(a){if(this.started&&!this.timeoutId&&(a.xy.x!=this.last.x||a.xy.y!=this.last.y)){if(this.documentDrag===true&&this.documentEvents){if(a.element===document){this.adjustXY(a);this.setEvent(a)}else{this.destroyDocumentEvents()}}if(this.interval>0){this.timeoutId=setTimeout(OpenLayers.Function.bind(this.removeTimeout,this),this.interval)}this.dragging=true;this.move(a);this.callback("move",[a.xy]);if(!this.oldOnselectstart){this.oldOnselectstart=document.onselectstart;document.onselectstart=OpenLayers.Function.False}this.last=this.evt.xy}return true},removeTimeout:function(){this.timeoutId=null},mouseup:function(b){if(this.started){if(this.documentDrag===true&&this.documentEvents){this.adjustXY(b);this.destroyDocumentEvents()}var a=(this.start!=this.last);this.started=false;this.dragging=false;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown");this.up(b);this.callback("up",[b.xy]);if(a){this.callback("done",[b.xy])}document.onselectstart=this.oldOnselectstart}return true},mouseout:function(b){if(this.started&&OpenLayers.Util.mouseLeft(b,this.map.div)){if(this.documentDrag===true){this.documentEvents=new OpenLayers.Events(this,document,null,null,{includeXY:true});this.documentEvents.on({mousemove:this.mousemove,mouseup:this.mouseup});OpenLayers.Element.addClass(document.body,"olDragDown")}else{var a=(this.start!=this.last);this.started=false;this.dragging=false;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown");this.out(b);this.callback("out",[]);if(a){this.callback("done",[b.xy])}if(document.onselectstart){document.onselectstart=this.oldOnselectstart}}}return true},click:function(a){return(this.start==this.last)},activate:function(){var a=false;if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.dragging=false;a=true}return a},deactivate:function(){var a=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.started=false;this.dragging=false;this.start=null;this.last=null;a=true;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown")}return a},adjustXY:function(a){var b=OpenLayers.Util.pagePosition(this.map.div);a.xy.x-=b[0];a.xy.y-=b[1]},destroyDocumentEvents:function(){OpenLayers.Element.removeClass(document.body,"olDragDown");this.documentEvents.destroy();this.documentEvents=null},CLASS_NAME:"OpenLayers.Handler.Drag"});OpenLayers.Handler.Feature=OpenLayers.Class(OpenLayers.Handler,{EVENTMAP:{click:{"in":"click",out:"clickout"},mousemove:{"in":"over",out:"out"},dblclick:{"in":"dblclick",out:null},mousedown:{"in":null,out:null},mouseup:{"in":null,out:null}},feature:null,lastFeature:null,down:null,up:null,clickTolerance:4,geometryTypes:null,stopClick:true,stopDown:true,stopUp:false,initialize:function(e,b,d,a){OpenLayers.Handler.prototype.initialize.apply(this,[e,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 g=false;var f=!!(this.feature);var e=(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(f&&b){if(this.lastFeature){this.triggerCallback(d,"out",[this.lastFeature])}this.triggerCallback(d,"in",[this.feature])}else{if(!f||e){this.triggerCallback(d,"in",[this.feature])}}this.lastFeature=this.feature;g=true}else{if(this.lastFeature&&(f&&b||e)){this.triggerCallback(d,"out",[this.lastFeature])}this.feature=null}}else{if(this.lastFeature&&(f||e)){this.triggerCallback(d,"out",[this.lastFeature])}}return g},triggerCallback:function(e,f,b){var d=this.EVENTMAP[e][f];if(d){if(e=="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,interval:0,delta:0,cumulative:true,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(o){if(!this.map||!this.checkModifiers(o)){return}var h=false;var q=false;var g=false;var b=OpenLayers.Event.element(o);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(!q){for(var j=0,m=this.map.layers.length;j<m;j++){if(b==this.map.layers[j].div||b==this.map.layers[j].pane){q=true;break}}}g=(b==this.map.div);b=b.parentNode}if(!h&&g){if(q){var p=0;if(!o){o=window.event}if(o.wheelDelta){p=o.wheelDelta/120;if(window.opera&&window.opera.version()<9.2){p=-p}}else{if(o.detail){p=-o.detail/3}}this.delta=this.delta+p;if(this.interval){window.clearTimeout(this._timeoutId);this._timeoutId=window.setTimeout(OpenLayers.Function.bind(function(){this.wheelZoom(o)},this),this.interval)}else{this.wheelZoom(o)}}OpenLayers.Event.stop(o)}},wheelZoom:function(a){var b=this.delta;this.delta=0;if(b){if(this.mousePosition){a.xy=this.mousePosition}if(!a.xy){a.xy=this.map.getPixelFromLonLat(this.map.getCenter())}if(b<0){this.callback("down",[a,this.cumulative?b:-1])}else{this.callback("up",[a,this.cumulative?b:1])}}},mousemove:function(a){this.mousePosition=a.xy},activate:function(a){if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){var b=this.wheelListener;OpenLayers.Event.observe(window,"DOMMouseScroll",b);OpenLayers.Event.observe(window,"mousewheel",b);OpenLayers.Event.observe(document,"mousewheel",b);return true}else{return false}},deactivate:function(a){if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){var b=this.wheelListener;OpenLayers.Event.stopObserving(window,"DOMMouseScroll",b);OpenLayers.Event.stopObserving(window,"mousewheel",b);OpenLayers.Event.stopObserving(document,"mousewheel",b);return true}else{return false}},CLASS_NAME:"OpenLayers.Handler.MouseWheel"});OpenLayers.Layer=OpenLayers.Class({id:null,name:null,div:null,opacity:null,alwaysInRange:null,EVENT_TYPES:["loadstart","loadend","loadcancel","visibilitychanged","move","moveend"],RESOLUTION_PROPERTIES:["scales","resolutions","maxScale","minScale","maxResolution","minResolution","numZoomLevels","maxZoomLevel"],events:null,map:null,isBaseLayer:false,alpha:false,displayInLayerSwitcher:true,visibility:true,attribution:null,inRange:false,imageSize:null,imageOffset:null,options:null,eventListeners:null,gutter:0,projection:null,units:null,scales:null,resolutions:null,maxExtent:null,minExtent:null,maxResolution:null,minResolution:null,numZoomLevels:null,minScale:null,maxScale:null,displayOutsideMaxExtent:false,wrapDateLine:false,transitionEffect:null,SUPPORTED_TRANSITIONS:["resize"],metadata:{},initialize:function(b,a){this.addOptions(a);this.name=b;if(this.id==null){this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");this.div=OpenLayers.Util.createDiv(this.id);this.div.style.width="100%";this.div.style.height="100%";this.div.dir="ltr";this.events=new OpenLayers.Events(this,this.div,this.EVENT_TYPES);if(this.eventListeners instanceof Object){this.events.on(this.eventListeners)}}if(this.wrapDateLine){this.displayOutsideMaxExtent=true}},destroy:function(a){if(a==null){a=true}if(this.map!=null){this.map.removeLayer(this,a)}this.projection=null;this.map=null;this.name=null;this.div=null;this.options=null;if(this.events){if(this.eventListeners){this.events.un(this.eventListeners)}this.events.destroy()}this.eventListeners=null;this.events=null},clone:function(a){if(a==null){a=new OpenLayers.Layer(this.name,this.getOptions())}OpenLayers.Util.applyDefaults(a,this);a.map=null;return a},getOptions:function(){var a={};for(var b in this.options){a[b]=this[b]}return a},setName:function(a){if(a!=this.name){this.name=a;if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"name"})}}},addOptions:function(d){if(this.options==null){this.options={}}OpenLayers.Util.extend(this.options,d);OpenLayers.Util.extend(this,d);if(typeof this.projection=="string"){this.projection=new OpenLayers.Projection(this.projection)}if(this.projection&&this.projection.getUnits()){this.units=this.projection.getUnits()}if(this.map){var a=this.RESOLUTION_PROPERTIES.concat(["projection","units","minExtent","maxExtent"]);for(var b in d){if(d.hasOwnProperty(b)&&OpenLayers.Util.indexOf(a,b)>=0){this.initResolutions();break}}}},onMapResize:function(){},redraw:function(){var b=false;if(this.map){this.inRange=this.calculateInRange();var 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 e=this.visibility;if(!this.isBaseLayer){e=e&&this.inRange}this.display(e)},setMap:function(b){if(this.map==null){this.map=b;this.maxExtent=this.maxExtent||this.map.maxExtent;this.minExtent=this.minExtent||this.map.minExtent;this.projection=this.projection||this.map.projection;if(typeof this.projection=="string"){this.projection=new OpenLayers.Projection(this.projection)}this.units=this.projection.getUnits()||this.units||this.map.units;this.initResolutions();if(!this.isBaseLayer){this.inRange=this.calculateInRange();var a=((this.visibility)&&(this.inRange));this.div.style.display=a?"":"none"}this.setTileSize()}},afterAdd:function(){},removeMap:function(a){},getImageSize:function(a){return(this.imageSize||this.tileSize)},setTileSize:function(a){var b=(a)?a:((this.tileSize)?this.tileSize:this.map.getTileSize());this.tileSize=b;if(this.gutter){this.imageOffset=new OpenLayers.Pixel(-this.gutter,-this.gutter);this.imageSize=new OpenLayers.Size(b.w+(2*this.gutter),b.h+(2*this.gutter))}},getVisibility:function(){return this.visibility},setVisibility:function(a){if(a!=this.visibility){this.visibility=a;this.display(a);this.redraw();if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"visibility"})}this.events.triggerEvent("visibilitychanged")}},display:function(a){if(a!=(this.div.style.display!="none")){this.div.style.display=(a&&this.calculateInRange())?"block":"none"}},calculateInRange:function(){var b=false;if(this.alwaysInRange){b=true}else{if(this.map){var a=this.map.getResolution();b=((a>=this.minResolution)&&(a<=this.maxResolution))}}return b},setIsBaseLayer:function(a){if(a!=this.isBaseLayer){this.isBaseLayer=a;if(this.map!=null){this.map.events.triggerEvent("changebaselayer",{layer:this})}}},initResolutions:function(){var f,a;var g={},e=true;for(f=0,a=this.RESOLUTION_PROPERTIES.length;f<a;f++){var j=this.RESOLUTION_PROPERTIES[f];g[j]=this.options[j];if(e&&this.options[j]){e=false}}if(this.alwaysInRange==null){this.alwaysInRange=e}if(g.resolutions==null){g.resolutions=this.resolutionsFromScales(g.scales)}if(g.resolutions==null){g.resolutions=this.calculateResolutions(g)}if(g.resolutions==null){for(f=0,a=this.RESOLUTION_PROPERTIES.length;f<a;f++){var j=this.RESOLUTION_PROPERTIES[f];g[j]=this.options[j]!=null?this.options[j]:this.map[j]}if(g.resolutions==null){g.resolutions=this.resolutionsFromScales(g.scales)}if(g.resolutions==null){g.resolutions=this.calculateResolutions(g)}}var d;if(this.options.maxResolution&&this.options.maxResolution!=="auto"){d=this.options.maxResolution}if(this.options.minScale){d=OpenLayers.Util.getResolutionFromScale(this.options.minScale,this.units)}var b;if(this.options.minResolution&&this.options.minResolution!=="auto"){b=this.options.minResolution}if(this.options.maxScale){b=OpenLayers.Util.getResolutionFromScale(this.options.maxScale,this.units)}if(g.resolutions){g.resolutions.sort(function(o,m){return(m-o)});if(!d){d=g.resolutions[0]}if(!b){var h=g.resolutions.length-1;b=g.resolutions[h]}}this.resolutions=g.resolutions;if(this.resolutions){a=this.resolutions.length;this.scales=new Array(a);for(f=0;f<a;f++){this.scales[f]=OpenLayers.Util.getScaleFromResolution(this.resolutions[f],this.units)}this.numZoomLevels=a}this.minResolution=b;if(b){this.maxScale=OpenLayers.Util.getScaleFromResolution(b,this.units)}this.maxResolution=d;if(d){this.minScale=OpenLayers.Util.getScaleFromResolution(d,this.units)}},resolutionsFromScales:function(e){if(e==null){return}var b,d,a;a=e.length;b=new Array(a);for(d=0;d<a;d++){b[d]=OpenLayers.Util.getResolutionFromScale(e[d],this.units)}return b},calculateResolutions:function(o){var q=o.maxResolution;if(o.minScale!=null){q=OpenLayers.Util.getResolutionFromScale(o.minScale,this.units)}else{if(q=="auto"&&this.maxExtent!=null){var p=this.map.getSize();var m=this.maxExtent.getWidth()/p.w;var h=this.maxExtent.getHeight()/p.h;q=Math.max(m,h)}}var g=o.minResolution;if(o.maxScale!=null){g=OpenLayers.Util.getResolutionFromScale(o.maxScale,this.units)}else{if(o.minResolution=="auto"&&this.minExtent!=null){var p=this.map.getSize();var m=this.minExtent.getWidth()/p.w;var h=this.minExtent.getHeight()/p.h;g=Math.max(m,h)}}var a=o.maxZoomLevel;var b=o.numZoomLevels;if(typeof g==="number"&&typeof q==="number"&&b===undefined){var j=q/g;b=Math.floor(Math.log(j)/Math.log(2))+1}else{if(b===undefined&&a!=null){b=a+1}}if(typeof b!=="number"||b<=0||(typeof q!=="number"&&typeof g!=="number")){return}var e=new Array(b);var d=2;if(typeof g=="number"&&typeof q=="number"){d=Math.pow((q/g),(1/(b-1)))}var f;if(typeof q==="number"){for(f=0;f<b;f++){e[f]=q/Math.pow(d,f)}}else{for(f=0;f<b;f++){e[b-1-f]=g*Math.pow(d,f)}}return e},getResolution:function(){var a=this.map.getZoom();return this.getResolutionForZoom(a)},getExtent:function(){return this.map.calculateBounds()},getZoomForExtent:function(b,d){var e=this.map.getSize();var a=Math.max(b.getWidth()/e.w,b.getHeight()/e.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 e=Math.ceil(d);b=this.resolutions[a]-((d-a)*(this.resolutions[a]-this.resolutions[e]))}else{b=this.resolutions[Math.round(d)]}return b},getZoomForResolution:function(f,a){var r;if(this.map.fractionalZoom){var o=0;var d=this.resolutions.length-1;var e=this.resolutions[o];var b=this.resolutions[d];var m;for(var g=0,h=this.resolutions.length;g<h;++g){m=this.resolutions[g];if(m>=f){e=m;o=g}if(m<=f){b=m;d=g;break}}var j=e-b;if(j>0){r=o+((e-f)/j)}else{r=o}}else{var p;var q=Number.POSITIVE_INFINITY;for(var g=0,h=this.resolutions.length;g<h;g++){if(a){p=Math.abs(this.resolutions[g]-f);if(p>q){break}q=p}else{if(this.resolutions[g]<f){break}}}r=Math.max(0,g-1)}return r},getLonLatFromViewPortPx:function(b){var f=null;if(b!=null){var e=this.map.getSize();var a=this.map.getCenter();if(a){var d=this.map.getResolution();var h=b.x-(e.w/2);var g=b.y-(e.h/2);f=new OpenLayers.LonLat(a.lon+h*d,a.lat-g*d);if(this.wrapDateLine){f=f.wrapDateLine(this.maxExtent)}}}return f},getViewPortPxFromLonLat:function(e){var b=null;if(e!=null){var a=this.map.getResolution();var d=this.map.getExtent();b=new OpenLayers.Pixel((1/a*(e.lon-d.left)),(1/a*(d.top-e.lat)))}return b},setOpacity:function(b){if(b!=this.opacity){this.opacity=b;for(var e=0,a=this.div.childNodes.length;e<a;++e){var d=this.div.childNodes[e].firstChild;OpenLayers.Util.modifyDOMElement(d,null,null,null,null,null,null,b)}if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"opacity"})}}},getZIndex:function(){return this.div.style.zIndex},setZIndex:function(a){this.div.style.zIndex=a},adjustBounds:function(b){if(this.gutter){var a=this.gutter*this.map.getResolution();b=new OpenLayers.Bounds(b.left-a,b.bottom-a,b.right+a,b.top+a)}if(this.wrapDateLine){var 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 a=!!window.controllers,j=window.document.all&&!window.opera,m=j&&window.navigator.userAgent.match(/MSIE ([\.0-9]+)/)&&RegExp.$1==7;function d(){this._object=f&&!m?new f:new window.ActiveXObject("Microsoft.XMLHTTP");this._listeners=[]}if(a&&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(r,w,q,z,p){delete this._headers;if(arguments.length<3){q=true}this._async=q;var v=this,u=this.readyState,o;if(j&&q){o=function(){if(u!=d.DONE){e(v);v.abort()}};window.attachEvent("onunload",o)}if(d.onopen){d.onopen.apply(this,arguments)}if(arguments.length>4){this._object.open(r,w,q,z,p)}else{if(arguments.length>3){this._object.open(r,w,q,z)}else{this._object.open(r,w,q)}}if(!a&&!j){this.readyState=d.OPENED;b(this)}this._object.onreadystatechange=function(){if(a&&!q){return}v.readyState=v._object.readyState;g(v);if(v._aborted){v.readyState=d.UNSENT;return}if(v.readyState==d.DONE){e(v);if(j&&q){window.detachEvent("onunload",o)}}if(u!=v.readyState){b(v)}u=v.readyState}};d.prototype.send=function(o){if(d.onsend){d.onsend.apply(this,arguments)}if(o&&o.nodeType){o=window.XMLSerializer?new window.XMLSerializer().serializeToString(o):o.xml;if(!this._headers["Content-Type"]){this._object.setRequestHeader("Content-Type","application/xml")}}this._object.send(o);if(a&&!this._async){this.readyState=d.OPENED;g(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._aborted=true}this._object.abort();e(this)};d.prototype.getAllResponseHeaders=function(){return this._object.getAllResponseHeaders()};d.prototype.getResponseHeader=function(o){return this._object.getResponseHeader(o)};d.prototype.setRequestHeader=function(o,p){if(!this._headers){this._headers={}}this._headers[o]=p;return this._object.setRequestHeader(o,p)};d.prototype.addEventListener=function(r,q,p){for(var o=0,u;u=this._listeners[o];o++){if(u[0]==r&&u[1]==q&&u[2]==p){return}}this._listeners.push([r,q,p])};d.prototype.removeEventListener=function(r,q,p){for(var o=0,u;u=this._listeners[o];o++){if(u[0]==r&&u[1]==q&&u[2]==p){break}}if(u){this._listeners.splice(o,1)}};d.prototype.dispatchEvent=function(p){var q={type:p.type,target:this,currentTarget:this,eventPhase:2,bubbles:p.bubbles,cancelable:p.cancelable,timeStamp:p.timeStamp,stopPropagation:function(){},preventDefault:function(){},initEvent:function(){}};if(q.type=="readystatechange"&&this.onreadystatechange){(this.onreadystatechange.handleEvent||this.onreadystatechange).apply(this,[q])}for(var o=0,r;r=this._listeners[o];o++){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]"};function b(o){if(d.onreadystatechange){d.onreadystatechange.apply(o)}o.dispatchEvent({type:"readystatechange",bubbles:false,cancelable:false,timeStamp:new Date+0})}function h(q){var p=q.responseXML,o=q.responseText;if(j&&o&&p&&!p.documentElement&&q.getResponseHeader("Content-Type").match(/[^\/]+\/[^\+]+\+xml/)){p=new window.ActiveXObject("Microsoft.XMLDOM");p.async=false;p.validateOnParse=false;p.loadXML(o)}if(p){if((j&&p.parseError!=0)||!p.documentElement||(p.documentElement&&p.documentElement.tagName=="parsererror")){return null}}return p}function g(o){try{o.responseText=o._object.responseText}catch(p){}try{o.responseXML=h(o._object)}catch(p){}try{o.status=o._object.status}catch(p){}try{o.statusText=o._object.statusText}catch(p){}}function e(o){o._object.onreadystatechange=new window.Function}if(!window.Function.prototype.apply){window.Function.prototype.apply=function(o,p){if(!p){p=[]}o.__func=this;o.__func(p[0],p[1],p[2],p[3],p[4]);delete o.__func}}OpenLayers.Request.XMLHttpRequest=d})();OpenLayers.Tile.Image.IFrame=OpenLayers.Class(OpenLayers.Tile.Image,{initialize:function(e,a,f,b,d){OpenLayers.Tile.Image.prototype.initialize.apply(this,arguments);this.layerAlphaHack=false},destroy:function(){if(this.imgDiv!=null){OpenLayers.Event.stopObservingElement(this.imgDiv.firstChild)}OpenLayers.Tile.Image.prototype.destroy.apply(this,arguments)},clear:function(){if(this.imgDiv){var a=this.imgDiv.firstChild;OpenLayers.Event.stopObservingElement(a);this.imgDiv.removeChild(a)}},clone:function(a){if(a==null){a=new OpenLayers.Tile.Image.IFrame(this.layer,this.position,this.bounds,this.url,this.size)}a=OpenLayers.Tile.Image.prototype.clone.apply(this,[a]);return a},renderTile:function(){if(OpenLayers.Tile.Image.prototype.renderTile.apply(this,arguments)){var a=this.createRequestForm();this.imgDiv.appendChild(a);a.submit();this.imgDiv.removeChild(a)}},initImgDiv:function(){this.imgDiv=this.createImgDiv();OpenLayers.Util.modifyDOMElement(this.imgDiv,this.id,null,this.layer.getImageSize(),"relative");this.imgDiv.className="olTileImage";this.frame.appendChild(this.imgDiv);this.layer.div.appendChild(this.frame);if(this.layer.opacity!=null){OpenLayers.Util.modifyDOMElement(this.imgDiv,null,null,null,null,null,null,this.layer.opacity)}this.imgDiv.map=this.layer.map},createImgDiv:function(){var b=document.createElement("div");if(OpenLayers.Util.getBrowserName()=="msie"){b.style.backgroundColor="#FFFFFF";b.style.filter="chroma(color=#FFFFFF)"}OpenLayers.Util.modifyDOMElement(b,null,new OpenLayers.Pixel(0,0),this.layer.getImageSize(),"absolute");var a=document.createElement("div");a.appendChild(b);return a},createIFrame:function(){var d=this.id+"_iFrame";var a;if(OpenLayers.Util.getBrowserName()=="msie"){a=document.createElement('<iframe name="'+d+'">');a.style.backgroundColor="#FFFFFF";a.style.filter="chroma(color=#FFFFFF)"}else{a=document.createElement("iframe");a.style.backgroundColor="transparent";a.name=d}a.id=d;a.scrolling="no";a.marginWidth="0px";a.marginHeight="0px";a.frameBorder="0";OpenLayers.Util.modifyDOMElement(a,d,new OpenLayers.Pixel(0,0),this.layer.getImageSize(),"absolute");var b=function(){this.show();if(this.isLoading){this.isLoading=false;this.events.triggerEvent("loadend")}};OpenLayers.Event.observe(a,"load",OpenLayers.Function.bind(b,this));return a},createRequestForm:function(){var b=document.createElement("form");b.method="POST";var g=this.layer.params._OLSALT;g=(g?g+"_":"")+this.bounds.toBBOX();b.action=OpenLayers.Util.urlAppend(this.layer.url,g);this.imgDiv.insertBefore(this.createIFrame(),this.imgDiv.firstChild);b.target=this.id+"_iFrame";var d=this.layer.getImageSize();var f=OpenLayers.Util.extend({BBOX:this.encodeBBOX?this.bounds.toBBOX():this.bounds.toArray(),WIDTH:d.w,HEIGHT:d.h},this.layer.params);for(var a in f){var e=document.createElement("input");e.type="hidden";e.name=a;e.value=f[a];b.appendChild(e)}return b},CLASS_NAME:"OpenLayers.Tile.Image.IFrame"});OpenLayers.ProxyHost="";OpenLayers.nullHandler=function(a){OpenLayers.Console.userError(OpenLayers.i18n("unhandledRequest",{statusText:a.statusText}))};OpenLayers.loadURL=function(e,h,b,f,d){if(typeof h=="string"){h=OpenLayers.Util.getParameters(h)}var g=(f)?f:OpenLayers.nullHandler;var a=(d)?d:OpenLayers.nullHandler;return OpenLayers.Request.GET({url:e,params:h,success:g,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 e=new ActiveXObject("Microsoft.XMLDOM");e.loadXML(d);return e},function(){return new DOMParser().parseFromString(d,"text/xml")},function(){var e=new XMLHttpRequest();e.open("GET","data:text/xml;charset=utf-8,"+encodeURIComponent(d),false);if(e.overrideMimeType){e.overrideMimeType("text/xml")}e.send(null);return e.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 f={"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript, text/html, application/xml, text/xml, */*",OpenLayers:true};if(this.method=="post"){f["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){f.Connection="close"}}if(typeof this.options.requestHeaders=="object"){var d=this.options.requestHeaders;if(typeof d.push=="function"){for(var b=0,e=d.length;b<e;b+=2){f[d[b]]=d[b+1]}}else{for(var b in d){f[b]=d[b]}}}for(var a in f){this.transport.setRequestHeader(a,f[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 e=this.options.onException;if(e){e(this,d);OpenLayers.Ajax.Responders.dispatch("onException",this,d)}else{var f=false;var a=OpenLayers.Ajax.Responders.responders;for(var b=0;b<a.length;b++){if(a[b].onException){f=true;break}}if(f){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 e=this.transport=d.transport,a=this.readyState=e.readyState;if((a>2&&!(!!(window.attachEvent&&!window.opera)))||a==4){this.status=this.getStatus();this.statusText=this.getStatusText();this.responseText=e.responseText==null?"":String(e.responseText)}if(a==4){var b=e.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,f){var e=null;if(b.getElementsByTagNameNS){e=b.getElementsByTagNameNS(a,f)}else{e=b.getElementsByTagName(d+":"+f)}return e};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){},documentDrag:false,layer:null,feature:null,dragCallbacks:{},featureCallbacks:{},lastPixel:null,initialize:function(b,a){OpenLayers.Control.prototype.initialize.apply(this,[a]);this.layer=b;this.handlers={drag:new OpenLayers.Handler.Drag(this,OpenLayers.Util.extend({down:this.downFeature,move:this.moveFeature,up:this.upFeature,out:this.cancel,done:this.doneDragging},this.dragCallbacks),{documentDrag:this.documentDrag}),feature:new OpenLayers.Handler.Feature(this,this.layer,OpenLayers.Util.extend({over:this.overFeature,out:this.outFeature},this.featureCallbacks),{geometryTypes:this.geometryTypes})}},destroy:function(){this.layer=null;OpenLayers.Control.prototype.destroy.apply(this,[])},activate:function(){return(this.handlers.feature.activate()&&OpenLayers.Control.prototype.activate.apply(this,arguments))},deactivate:function(){this.handlers.drag.deactivate();this.handlers.feature.deactivate();this.feature=null;this.dragging=false;this.lastPixel=null;OpenLayers.Element.removeClass(this.map.viewPortDiv,this.displayClass+"Over");return OpenLayers.Control.prototype.deactivate.apply(this,arguments)},overFeature:function(a){if(!this.handlers.drag.dragging){this.feature=a;this.handlers.drag.activate();this.over=true;OpenLayers.Element.addClass(this.map.viewPortDiv,this.displayClass+"Over")}else{if(this.feature.id==a.id){this.over=true}else{this.over=false}}},downFeature:function(a){this.lastPixel=a;this.onStart(this.feature,a)},moveFeature:function(a){var b=this.map.getResolution();this.feature.geometry.move(b*(a.x-this.lastPixel.x),b*(this.lastPixel.y-a.y));this.layer.drawFeature(this.feature);this.lastPixel=a;this.onDrag(this.feature,a)},upFeature:function(a){if(!this.over){this.handlers.drag.deactivate()}},doneDragging:function(a){this.onComplete(this.feature,a)},outFeature:function(a){if(!this.handlers.drag.dragging){this.over=false;this.handlers.drag.deactivate();OpenLayers.Element.removeClass(this.map.viewPortDiv,this.displayClass+"Over");this.feature=null}else{if(this.feature.id==a.id){this.over=false}}},cancel:function(){this.handlers.drag.deactivate();this.over=false},setMap:function(a){this.handlers.drag.setMap(a);this.handlers.feature.setMap(a);OpenLayers.Control.prototype.setMap.apply(this,arguments)},CLASS_NAME:"OpenLayers.Control.DragFeature"});OpenLayers.Control.DragPan=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOOL,panned:false,interval:25,documentDrag:false,draw:function(){this.handler=new OpenLayers.Handler.Drag(this,{move:this.panMap,done:this.panMapDone},{interval:this.interval,documentDrag:this.documentDrag})},panMap:function(a){this.panned=true;this.map.pan(this.handler.last.x-a.x,this.handler.last.y-a.y,{dragging:this.handler.dragging,animate:false})},panMapDone:function(a){if(this.panned){this.panMap(a);this.panned=false}},CLASS_NAME:"OpenLayers.Control.DragPan"});OpenLayers.Control.KeyboardDefaults=OpenLayers.Class(OpenLayers.Control,{autoActivate:true,slideFactor:75,initialize:function(){OpenLayers.Control.prototype.initialize.apply(this,arguments)},destroy:function(){if(this.handler){this.handler.destroy()}this.handler=null;OpenLayers.Control.prototype.destroy.apply(this,arguments)},draw:function(){this.handler=new OpenLayers.Handler.Keyboard(this,{keydown:this.defaultKeyPress})},defaultKeyPress:function(a){switch(a.keyCode){case OpenLayers.Event.KEY_LEFT:this.map.pan(-this.slideFactor,0);break;case OpenLayers.Event.KEY_RIGHT:this.map.pan(this.slideFactor,0);break;case OpenLayers.Event.KEY_UP:this.map.pan(0,-this.slideFactor);break;case OpenLayers.Event.KEY_DOWN:this.map.pan(0,this.slideFactor);break;case 33:var b=this.map.getSize();this.map.pan(0,-0.75*b.h);break;case 34:var b=this.map.getSize();this.map.pan(0,0.75*b.h);break;case 35:var b=this.map.getSize();this.map.pan(0.75*b.w,0);break;case 36:var b=this.map.getSize();this.map.pan(-0.75*b.w,0);break;case 43:case 61:case 187:case 107:this.map.zoomIn();break;case 45:case 109:case 189:case 95:this.map.zoomOut();break}},CLASS_NAME:"OpenLayers.Control.KeyboardDefaults"});OpenLayers.Control.WMSGetFeatureInfo=OpenLayers.Class(OpenLayers.Control,{hover:false,drillDown:false,maxFeatures:10,clickCallback:"click",layers:null,queryVisible:false,url:null,layerUrls:null,infoFormat:"text/html",vendorParams:{},format:null,formatOptions:null,handlerOptions:null,handler:null,hoverRequest:null,EVENT_TYPES:["beforegetfeatureinfo","nogetfeatureinfo","getfeatureinfo"],initialize:function(a){this.EVENT_TYPES=OpenLayers.Control.WMSGetFeatureInfo.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);a=a||{};a.handlerOptions=a.handlerOptions||{};OpenLayers.Control.prototype.initialize.apply(this,[a]);if(!this.format){this.format=new OpenLayers.Format.WMSGetFeatureInfo(a.formatOptions)}if(this.drillDown===true){this.hover=false}if(this.hover){this.handler=new OpenLayers.Handler.Hover(this,{move:this.cancelHover,pause:this.getInfoForHover},OpenLayers.Util.extend(this.handlerOptions.hover||{},{delay:250}))}else{var b={};b[this.clickCallback]=this.getInfoForClick;this.handler=new OpenLayers.Handler.Click(this,b,this.handlerOptions.click||{})}},activate:function(){if(!this.active){this.handler.activate()}return OpenLayers.Control.prototype.activate.apply(this,arguments)},deactivate:function(){return OpenLayers.Control.prototype.deactivate.apply(this,arguments)},getInfoForClick:function(a){this.events.triggerEvent("beforegetfeatureinfo",{xy:a.xy});OpenLayers.Element.addClass(this.map.viewPortDiv,"olCursorWait");this.request(a.xy,{})},getInfoForHover:function(a){this.events.triggerEvent("beforegetfeatureinfo",{xy:a.xy});this.request(a.xy,{hover:true})},cancelHover:function(){if(this.hoverRequest){this.hoverRequest.abort();this.hoverRequest=null}},findLayers:function(){var f=this.layers||this.map.layers;var g=[];var e,b;for(var d=0,a=f.length;d<a;++d){e=f[d];if(e instanceof OpenLayers.Layer.WMS&&(!this.queryVisible||e.getVisibility())){b=e.url instanceof Array?e.url[0]:e.url;if(this.drillDown===false&&!this.url){this.url=b}if(this.drillDown===true||this.urlMatches(b)){g.push(e)}}}return g},urlMatches:function(b){var e=OpenLayers.Util.isEquivalentUrl(this.url,b);if(!e&&this.layerUrls){for(var d=0,a=this.layerUrls.length;d<a;++d){if(OpenLayers.Util.isEquivalentUrl(this.layerUrls[d],b)){e=true;break}}}return e},buildWMSOptions:function(a,e,b,j){var h=[],m=[];for(var f=0,g=e.length;f<g;f++){h=h.concat(e[f].params.LAYERS);m=m.concat(this.getStyleNames(e[f]))}var d=OpenLayers.Util.extend({service:"WMS",version:e[0].params.VERSION,request:"GetFeatureInfo",layers:h,query_layers:h,styles:m,bbox:this.map.getExtent().toBBOX(null,e[0].reverseAxisOrder()),feature_count:this.maxFeatures,height:this.map.getSize().h,width:this.map.getSize().w,format:j,info_format:this.infoFormat},(parseFloat(e[0].params.VERSION)>=1.3)?{crs:this.map.getProjection(),i:b.x,j:b.y}:{srs:this.map.getProjection(),x:b.x,y:b.y});OpenLayers.Util.applyDefaults(d,this.vendorParams);return{url:a,params:OpenLayers.Util.upperCaseObject(d),callback:function(o){this.handleResponse(b,o)},scope:this}},getStyleNames:function(b){var a;if(b.params.STYLES){a=b.params.STYLES}else{if(b.params.LAYERS instanceof Array){a=new Array(b.params.LAYERS.length)}else{a=b.params.LAYERS.replace(/[^,]/g,"")}}return a},request:function(b,q){var e=this.findLayers();if(e.length==0){this.events.triggerEvent("nogetfeatureinfo");OpenLayers.Element.removeClass(this.map.viewPortDiv,"olCursorWait");return}q=q||{};if(this.drillDown===false){var o=this.buildWMSOptions(this.url,e,b,e[0].params.FORMAT);var d=OpenLayers.Request.GET(o);if(q.hover===true){this.hoverRequest=d}}else{this._requestCount=0;this._numRequests=0;this.features=[];var m={},a;for(var f=0,j=e.length;f<j;f++){var g=e[f];var h,p=false;a=g.url instanceof Array?g.url[0]:g.url;if(a in m){m[a].push(g)}else{this._numRequests++;m[a]=[g]}}var e;for(var a in m){e=m[a];var o=this.buildWMSOptions(a,e,b,e[0].params.FORMAT);OpenLayers.Request.GET(o)}}},triggerGetFeatureInfo:function(b,d,a){this.events.triggerEvent("getfeatureinfo",{text:b.responseText,features:a,request:b,xy:d});OpenLayers.Element.removeClass(this.map.viewPortDiv,"olCursorWait")},handleResponse:function(e,b){var d=b.responseXML;if(!d||!d.documentElement){d=b.responseText}var a=this.format.read(d);if(this.drillDown===false){this.triggerGetFeatureInfo(b,e,a)}else{this._requestCount++;this._features=(this._features||[]).concat(a);if(this._requestCount===this._numRequests){this.triggerGetFeatureInfo(b,e,this._features.concat());delete this._features;delete this._requestCount;delete this._numRequests}}},CLASS_NAME:"OpenLayers.Control.WMSGetFeatureInfo"});OpenLayers.Control.WMTSGetFeatureInfo=OpenLayers.Class(OpenLayers.Control,{hover:false,requestEncoding:"KVP",drillDown:false,maxFeatures:10,clickCallback:"click",layers:null,queryVisible:true,infoFormat:"text/html",vendorParams:{},format:null,formatOptions:null,handlerOptions:null,handler:null,hoverRequest:null,EVENT_TYPES:["beforegetfeatureinfo","getfeatureinfo","exception"],pending:0,initialize:function(a){this.EVENT_TYPES=OpenLayers.Control.WMTSGetFeatureInfo.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);a=a||{};a.handlerOptions=a.handlerOptions||{};OpenLayers.Control.prototype.initialize.apply(this,[a]);if(!this.format){this.format=new OpenLayers.Format.WMSGetFeatureInfo(a.formatOptions)}if(this.drillDown===true){this.hover=false}if(this.hover){this.handler=new OpenLayers.Handler.Hover(this,{move:this.cancelHover,pause:this.getInfoForHover},OpenLayers.Util.extend(this.handlerOptions.hover||{},{delay:250}))}else{var b={};b[this.clickCallback]=this.getInfoForClick;this.handler=new OpenLayers.Handler.Click(this,b,this.handlerOptions.click||{})}},activate:function(){if(!this.active){this.handler.activate()}return OpenLayers.Control.prototype.activate.apply(this,arguments)},deactivate:function(){return OpenLayers.Control.prototype.deactivate.apply(this,arguments)},getInfoForClick:function(a){this.request(a.xy,{})},getInfoForHover:function(a){this.request(a.xy,{hover:true})},cancelHover:function(){if(this.hoverRequest){--this.pending;if(this.pending<=0){OpenLayers.Element.removeClass(this.map.viewPortDiv,"olCursorWait");this.pending=0}this.hoverRequest.abort();this.hoverRequest=null}},findLayers:function(){var d=this.layers||this.map.layers;var e=[];var b;for(var a=d.length-1;a>=0;--a){b=d[a];if(b instanceof OpenLayers.Layer.WMTS&&b.requestEncoding===this.requestEncoding&&(!this.queryVisible||b.getVisibility())){e.push(b);if(!this.drillDown||this.hover){break}}}return e},buildRequestOptions:function(b,d){var g=this.map.getLonLatFromPixel(d);var f=b.getURL(new OpenLayers.Bounds(g.lon,g.lat,g.lon,g.lat));var e=OpenLayers.Util.getParameters(f);var a=b.getTileInfo(g);OpenLayers.Util.extend(e,{service:"WMTS",version:b.version,request:"GetFeatureInfo",infoFormat:this.infoFormat,i:a.i,j:a.j});OpenLayers.Util.applyDefaults(e,this.vendorParams);return{url:b.url instanceof Array?b.url[0]:b.url,params:OpenLayers.Util.upperCaseObject(e),callback:function(h){this.handleResponse(d,h,b)},scope:this}},request:function(j,m){m=m||{};var d=this.findLayers();if(d.length>0){var h,f;for(var e=0,g=d.length;e<g;e++){f=d[e];h=this.events.triggerEvent("beforegetfeatureinfo",{xy:j,layer:f});if(h!==false){++this.pending;var a=this.buildRequestOptions(f,j);var b=OpenLayers.Request.GET(a);if(m.hover===true){this.hoverRequest=b}}}if(this.pending>0){OpenLayers.Element.addClass(this.map.viewPortDiv,"olCursorWait")}}},handleResponse:function(h,f,b){--this.pending;if(this.pending<=0){OpenLayers.Element.removeClass(this.map.viewPortDiv,"olCursorWait");this.pending=0}if(f.status&&(f.status<200||f.status>=300)){this.events.triggerEvent("exception",{xy:h,request:f,layer:b})}else{var g=f.responseXML;if(!g||!g.documentElement){g=f.responseText}var e,d;try{e=this.format.read(g)}catch(a){d=true;this.events.triggerEvent("exception",{xy:h,request:f,error:a,layer:b})}if(!d){this.events.triggerEvent("getfeatureinfo",{text:f.responseText,features:e,request:f,xy:h,layer:b})}}},setMap:function(a){this.handler.setMap(a);OpenLayers.Control.prototype.setMap.apply(this,arguments)},CLASS_NAME:"OpenLayers.Control.WMTSGetFeatureInfo"});OpenLayers.State={UNKNOWN:"Unknown",INSERT:"Insert",UPDATE:"Update",DELETE:"Delete"};OpenLayers.Feature.Vector=OpenLayers.Class(OpenLayers.Feature,{fid:null,geometry:null,attributes:null,bounds:null,state:null,style:null,url:null,renderIntent:"default",initialize:function(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(e){var d=false;if(this.layer&&this.layer.map){var a=this.layer.map.getExtent();if(e){var b=this.geometry.getBounds();d=a.intersectsBounds(b)}else{var f=a.toGeometry();d=f.intersects(this.geometry)}}return d},getVisibility:function(){return !(this.style&&this.style.display=="none"||!this.layer||this.layer&&this.layer.styleMap&&this.layer.styleMap.createSymbolizer(this,this.renderIntent).display=="none"||this.layer&&!this.layer.getVisibility())},createMarker:function(){return null},destroyMarker:function(){},createPopup:function(){return null},atPoint:function(b,e,d){var a=false;if(this.geometry){a=this.geometry.atPoint(b,e,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 e=this.layer.getViewPortPxFromLonLat(this.geometry.getBounds().getCenterLonLat());var d=this.layer.map.getResolution();this.geometry.move(d*(b.x-e.x),d*(e.y-b.y));this.layer.drawFeature(this);return e},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 e=this.processXMLNode(b);a=new Array(d,e.lonlat,e);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 e=OpenLayers.Util.getXmlNodeValue(OpenLayers.Ajax.getElementsByTagNameNS(a[0],"http://www.opengis.net/gml","gml","coordinates")[0]);var d=e.split(",");return{lonlat:new OpenLayers.LonLat(parseFloat(d[0]),parseFloat(d[1])),id:null}},CLASS_NAME:"OpenLayers.Feature.WFS"});OpenLayers.Format.OWSCommon.v1_0_0=OpenLayers.Class(OpenLayers.Format.OWSCommon.v1,{namespaces:{ows:"http://www.opengis.net/ows/1.0",xlink:"http://www.w3.org/1999/xlink"},readers:{ows:OpenLayers.Format.OWSCommon.v1.prototype.readers.ows},writers:{ows:OpenLayers.Format.OWSCommon.v1.prototype.writers.ows},CLASS_NAME:"OpenLayers.Format.OWSCommon.v1_1_0"});OpenLayers.Format.OWSCommon.v1_1_0=OpenLayers.Class(OpenLayers.Format.OWSCommon.v1,{namespaces:{ows:"http://www.opengis.net/ows/1.1",xlink:"http://www.w3.org/1999/xlink"},readers:{ows:OpenLayers.Util.applyDefaults({AllowedValues:function(a,b){b.allowedValues={};this.readChildNodes(a,b.allowedValues)},AnyValue:function(a,b){b.anyValue=true},Range:function(a,b){b.range={};this.readChildNodes(a,b.range)},MinimumValue:function(b,a){a.minValue=this.getChildValue(b)},MaximumValue:function(b,a){a.maxValue=this.getChildValue(b)},Identifier:function(a,b){b.identifier=this.getChildValue(a)},SupportedCRS:function(a,b){b.supportedCRS=this.getChildValue(a)}},OpenLayers.Format.OWSCommon.v1.prototype.readers.ows)},CLASS_NAME:"OpenLayers.Format.OWSCommon.v1_1_0"});OpenLayers.Format.OWSContext=OpenLayers.Class(OpenLayers.Format.Context,{defaultVersion:"0.3.1",getParser:function(a){var b=a||this.version||this.defaultVersion;if(b==="0.3.0"){b=this.defaultVersion}if(!this.parser||this.parser.VERSION!=b){var d=OpenLayers.Format.OWSContext["v"+b.replace(/\./g,"_")];if(!d){throw"Can't find a OWSContext parser for version "+b}this.parser=new d(this.options)}return this.parser},toContext:function(b){var a={};if(b.CLASS_NAME=="OpenLayers.Map"){a.bounds=b.getExtent();a.maxExtent=b.maxExtent;a.projection=b.projection;a.size=b.getSize();a.layers=b.layers}return a},CLASS_NAME:"OpenLayers.Format.OWSContext"});OpenLayers.Format.WFSCapabilities.v1=OpenLayers.Class(OpenLayers.Format.WFSCapabilities,{initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a]);this.options=a},read:function(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(g,f){var d=f.childNodes;var b,e;for(var a=0;a<d.length;++a){b=d[a];if(b.nodeType==1){e=this["read_cap_"+b.nodeName];if(e){e.apply(this,[g,b])}}}},read_cap_FeatureTypeList:function(d,b){var a={featureTypes:[]};this.runChildNodes(a,b);d.featureTypeList=a},read_cap_FeatureType:function(a,e,b){var d={};this.runChildNodes(d,e);a.featureTypes.push(d)},read_cap_Name:function(e,b){var a=this.getChildValue(b);if(a){var d=a.split(":");e.name=d.pop();if(d.length>0){e.featureNS=this.lookupNamespaceURI(b,d[0])}}},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=OpenLayers.Class(OpenLayers.Format.Context,{defaultVersion:"1.1.0",getParser:function(a){var b=a||this.version||this.defaultVersion;if(!this.parser||this.parser.VERSION!=b){var d=OpenLayers.Format.WMC["v"+b.replace(/\./g,"_")];if(!d){throw"Can't find a WMC parser for version "+b}this.parser=new d(this.options)}return this.parser},layerToContext:function(a){var d=this.getParser();var b={queryable:a.queryable,visibility:a.visibility,name:a.params.LAYERS,title:a.name,metadataURL:a.metadataURL,version:a.params.VERSION,url:a.url,maxExtent:a.maxExtent,transparent:a.params.TRANSPARENT,numZoomLevels:a.numZoomLevels,units:a.units,isBaseLayer:a.isBaseLayer,opacity:a.opacity,displayInLayerSwitcher:a.displayInLayerSwitcher,singleTile:a.singleTile,tileSize:(a.singleTile||!a.tileSize)?undefined:{width:a.tileSize.w,height:a.tileSize.h},minScale:(a.options.resolutions||a.options.scales||a.options.maxResolution||a.options.minScale)?a.minScale:undefined,maxScale:(a.options.resolutions||a.options.scales||a.options.minResolution||a.options.maxScale)?a.maxScale:undefined,formats:[{value:a.params.FORMAT,current:true}],styles:[{href:a.params.SLD,body:a.params.SLD_BODY,name:a.params.STYLES||d.defaultStyleName,title:d.defaultStyleTitle,current:true}]};return b},toContext:function(g){var e={};var f=g.layers;if(g.CLASS_NAME=="OpenLayers.Map"){e.bounds=g.getExtent();e.maxExtent=g.maxExtent;e.projection=g.projection;e.size=g.getSize()}else{OpenLayers.Util.applyDefaults(e,g);if(e.layers!=undefined){delete (e.layers)}}if(e.layersContext==undefined){e.layersContext=[]}if(f!=undefined&&f instanceof Array){for(var d=0,a=f.length;d<a;d++){var b=f[d];if(b instanceof OpenLayers.Layer.WMS){e.layersContext.push(this.layerToContext(b))}}}return e},CLASS_NAME:"OpenLayers.Format.WMC"});OpenLayers.Format.WMSCapabilities.v1=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{wms:"http://www.opengis.net/wms",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},defaultPrefix:"wms",initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},read:function(b){if(typeof b=="string"){b=OpenLayers.Format.XML.prototype.read.apply(this,[b])}if(b&&b.nodeType==9){b=b.documentElement}var a={};this.readNode(b,a);this.postProcessLayers(a);return a},postProcessLayers:function(b){if(b.capability){b.capability.layers=[];var f=b.capability.nestedLayers;for(var e=0,a=f.length;e<a;++e){var d=f[e];this.processLayer(b.capability,d)}}},processLayer:function(a,o,d){if(o.formats===undefined){o.formats=a.request.getmap.formats}if(d){o.styles=o.styles.concat(d.styles);var g=["queryable","cascaded","fixedWidth","fixedHeight","opaque","noSubsets","llbbox","minScale","maxScale","attribution"];var r=["srs","bbox","dimensions","authorityURLs"];var q;for(var f=0;f<g.length;f++){q=g[f];if(q in d){if(o[q]==null){o[q]=d[q]}if(o[q]==null){var m=["cascaded","fixedWidth","fixedHeight"];var b=["queryable","opaque","noSubsets"];if(OpenLayers.Util.indexOf(m,q)!=-1){o[q]=0}if(OpenLayers.Util.indexOf(b,q)!=-1){o[q]=false}}}}for(var f=0;f<r.length;f++){q=r[f];o[q]=OpenLayers.Util.extend(o[q],d[q])}}for(var h=0,p=o.nestedLayers.length;h<p;h++){var e=o.nestedLayers[h];this.processLayer(a,e,o)}if(o.name){a.layers.push(o)}},readers:{wms:{Service:function(a,b){b.service={};this.readChildNodes(a,b.service)},Name:function(a,b){b.name=this.getChildValue(a)},Title:function(a,b){b.title=this.getChildValue(a)},Abstract:function(a,b){b["abstract"]=this.getChildValue(a)},BoundingBox:function(b,d){var e={};e.bbox=[parseFloat(b.getAttribute("minx")),parseFloat(b.getAttribute("miny")),parseFloat(b.getAttribute("maxx")),parseFloat(b.getAttribute("maxy"))];var a={x:parseFloat(b.getAttribute("resx")),y:parseFloat(b.getAttribute("resy"))};if(!(isNaN(a.x)&&isNaN(a.y))){e.res=a}return e},OnlineResource:function(a,b){b.href=this.getAttributeNS(a,this.namespaces.xlink,"href")},ContactInformation:function(a,b){b.contactInformation={};this.readChildNodes(a,b.contactInformation)},ContactPersonPrimary:function(a,b){b.personPrimary={};this.readChildNodes(a,b.personPrimary)},ContactPerson:function(a,b){b.person=this.getChildValue(a)},ContactOrganization:function(a,b){b.organization=this.getChildValue(a)},ContactPosition:function(a,b){b.position=this.getChildValue(a)},ContactAddress:function(a,b){b.contactAddress={};this.readChildNodes(a,b.contactAddress)},AddressType:function(a,b){b.type=this.getChildValue(a)},Address:function(a,b){b.address=this.getChildValue(a)},City:function(a,b){b.city=this.getChildValue(a)},StateOrProvince:function(a,b){b.stateOrProvince=this.getChildValue(a)},PostCode:function(a,b){b.postcode=this.getChildValue(a)},Country:function(a,b){b.country=this.getChildValue(a)},ContactVoiceTelephone:function(a,b){b.phone=this.getChildValue(a)},ContactFacsimileTelephone:function(a,b){b.fax=this.getChildValue(a)},ContactElectronicMailAddress:function(a,b){b.email=this.getChildValue(a)},Fees:function(b,d){var a=this.getChildValue(b);if(a&&a.toLowerCase()!="none"){d.fees=a}},AccessConstraints:function(a,b){var d=this.getChildValue(a);if(d&&d.toLowerCase()!="none"){b.accessConstraints=d}},Capability:function(a,b){b.capability={nestedLayers:[]};this.readChildNodes(a,b.capability)},Request:function(a,b){b.request={};this.readChildNodes(a,b.request)},GetCapabilities:function(a,b){b.getcapabilities={formats:[]};this.readChildNodes(a,b.getcapabilities)},Format:function(a,b){if(b.formats instanceof Array){b.formats.push(this.getChildValue(a))}else{b.format=this.getChildValue(a)}},DCPType:function(a,b){this.readChildNodes(a,b)},HTTP:function(a,b){this.readChildNodes(a,b)},Get:function(a,b){this.readChildNodes(a,b)},Post:function(a,b){this.readChildNodes(a,b)},GetMap:function(a,b){b.getmap={formats:[]};this.readChildNodes(a,b.getmap)},GetFeatureInfo:function(a,b){b.getfeatureinfo={formats:[]};this.readChildNodes(a,b.getfeatureinfo)},Exception:function(a,b){b.exception={formats:[]};this.readChildNodes(a,b.exception)},Layer:function(b,f){var p=b.getAttributeNode("queryable");var d=(p&&p.specified)?b.getAttribute("queryable"):null;p=b.getAttributeNode("cascaded");var m=(p&&p.specified)?b.getAttribute("cascaded"):null;p=b.getAttributeNode("opaque");var g=(p&&p.specified)?b.getAttribute("opaque"):null;var o=b.getAttribute("noSubsets");var a=b.getAttribute("fixedWidth");var j=b.getAttribute("fixedHeight");var h={nestedLayers:[],styles:[],srs:{},metadataURLs:[],bbox:{},dimensions:{},authorityURLs:{},identifiers:{},keywords:[],queryable:(d&&d!=="")?(d==="1"||d==="true"):null,cascaded:(m!==null)?parseInt(m):null,opaque:g?(g==="1"||g==="true"):null,noSubsets:(o!==null)?(o==="1"||o==="true"):null,fixedWidth:(a!=null)?parseInt(a):null,fixedHeight:(j!=null)?parseInt(j):null};f.nestedLayers.push(h);this.readChildNodes(b,h);if(h.name){var e=h.name.split(":");if(e.length>0){h.prefix=e[0]}}},Attribution:function(a,b){b.attribution={};this.readChildNodes(a,b.attribution)},LogoURL:function(a,b){b.logo={width:a.getAttribute("width"),height:a.getAttribute("height")};this.readChildNodes(a,b.logo)},Style:function(b,d){var a={};d.styles.push(a);this.readChildNodes(b,a)},LegendURL:function(b,d){var a={width:b.getAttribute("width"),height:b.getAttribute("height")};d.legend=a;this.readChildNodes(b,a)},MetadataURL:function(a,b){var d={type:a.getAttribute("type")};b.metadataURLs.push(d);this.readChildNodes(a,d)},DataURL:function(a,b){b.dataURL={};this.readChildNodes(a,b.dataURL)},FeatureListURL:function(a,b){b.featureListURL={};this.readChildNodes(a,b.featureListURL)},AuthorityURL:function(b,e){var a=b.getAttribute("name");var d={};this.readChildNodes(b,d);e.authorityURLs[a]=d.href},Identifier:function(a,d){var b=a.getAttribute("authority");d.identifiers[b]=this.getChildValue(a)},KeywordList:function(a,b){this.readChildNodes(a,b)},SRS:function(a,b){b.srs[this.getChildValue(a)]=true}}},CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1"});OpenLayers.Format.WMSDescribeLayer.v1_1=OpenLayers.Class(OpenLayers.Format.WMSDescribeLayer,{initialize:function(a){OpenLayers.Format.WMSDescribeLayer.prototype.initialize.apply(this,[a])},read:function(e){if(typeof e=="string"){e=OpenLayers.Format.XML.prototype.read.apply(this,[e])}var m=e.documentElement;var b=m.childNodes;var g=[];var a,q;for(var f=0;f<b.length;++f){a=b[f];q=a.nodeName;if(q=="LayerDescription"){var h=a.getAttribute("name");var p="";var d="";var o="";if(a.getAttribute("owsType")){p=a.getAttribute("owsType");d=a.getAttribute("owsURL")}else{if(a.getAttribute("wfs")!=""){p="WFS";d=a.getAttribute("wfs")}else{if(a.getAttribute("wcs")!=""){p="WCS";d=a.getAttribute("wcs")}}}var j=a.getElementsByTagName("Query");if(j.length>0){o=j[0].getAttribute("typeName");if(!o){o=j[0].getAttribute("typename")}}g.push({layerName:h,owsType:p,owsURL:d,typeName:o})}}return g},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})},destroy:function(){if(this.dragHandler){this.dragHandler.destroy();this.dragHandler=null}OpenLayers.Handler.prototype.destroy.apply(this,arguments)},setMap:function(a){OpenLayers.Handler.prototype.setMap.apply(this,arguments);if(this.dragHandler){this.dragHandler.setMap(a)}},startBox:function(a){this.zoomBox=OpenLayers.Util.createDiv("zoomBox",this.dragHandler.start);this.zoomBox.className=this.boxDivClassName;this.zoomBox.style.zIndex=this.map.Z_INDEX_BASE.Popup-1;this.map.viewPortDiv.appendChild(this.zoomBox);OpenLayers.Element.addClass(this.map.viewPortDiv,"olDrawBox")},moveBox:function(g){var e=this.dragHandler.start.x;var b=this.dragHandler.start.y;var d=Math.abs(e-g.x);var a=Math.abs(b-g.y);this.zoomBox.style.width=Math.max(1,d)+"px";this.zoomBox.style.height=Math.max(1,a)+"px";this.zoomBox.style.left=g.x<e?g.x+"px":e+"px";this.zoomBox.style.top=g.y<b?g.y+"px":b+"px";var f=this.getBoxCharacteristics();if(f.newBoxModel){if(g.x>e){this.zoomBox.style.width=Math.max(1,d-f.xOffset)+"px"}if(g.y>b){this.zoomBox.style.height=Math.max(1,a-f.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 h=this.dragHandler.start;var g=Math.min(h.y,b.y);var d=Math.max(h.y,b.y);var f=Math.min(h.x,b.x);var e=Math.max(h.x,b.x);a=new OpenLayers.Bounds(f,d,e,g)}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",layerOptions:null,persist:false,irregular:false,angle:null,fixedRadius:false,feature:null,layer:null,origin: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,[d,b,a]);this.options=(a)?a:{}},setOptions:function(a){OpenLayers.Util.extend(this.options,a);OpenLayers.Util.extend(this,a)},activate:function(){var a=false;if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){var b=OpenLayers.Util.extend({displayInLayerSwitcher:false,calculateInRange:OpenLayers.Function.True},this.layerOptions);this.layer=new OpenLayers.Layer.Vector(this.CLASS_NAME,b);this.map.addLayer(this.layer);a=true}return a},deactivate:function(){var a=false;if(OpenLayers.Handler.Drag.prototype.deactivate.apply(this,arguments)){if(this.dragging){this.cancel()}if(this.layer.map!=null){this.layer.destroy(false);if(this.feature){this.feature.destroy()}}this.layer=null;this.feature=null;a=true}return a},down:function(a){this.fixedRadius=!!(this.radius);var b=this.map.getLonLatFromPixel(a.xy);this.origin=new OpenLayers.Geometry.Point(b.lon,b.lat);if(!this.fixedRadius||this.irregular){this.radius=this.map.getResolution()}if(this.persist){this.clear()}this.feature=new OpenLayers.Feature.Vector();this.createGeometry();this.callback("create",[this.origin,this.feature]);this.layer.addFeatures([this.feature],{silent:true});this.layer.drawFeature(this.feature,this.style)},move:function(d){var g=this.map.getLonLatFromPixel(d.xy);var a=new OpenLayers.Geometry.Point(g.lon,g.lat);if(this.irregular){var h=Math.sqrt(2)*Math.abs(a.y-this.origin.y)/2;this.radius=Math.max(this.map.getResolution()/2,h)}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 e=a.x-this.origin.x;var b=a.y-this.origin.y;var f;if(b==0){f=e/(this.radius*Math.sqrt(2))}else{f=e/b}this.feature.geometry.resize(1,this.origin,f);this.feature.geometry.move(e/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 e,a;var b=this.feature.geometry.components[0];if(b.components.length!=(this.sides+1)){this.createGeometry();b=this.feature.geometry.components[0]}for(var d=0;d<this.sides;++d){a=b.components[d];e=this.angle+(d*2*Math.PI/this.sides);a.x=this.origin.x+(this.radius*Math.cos(e));a.y=this.origin.y+(this.radius*Math.sin(e));a.clearBounds()}},calculateAngle:function(a,b){var e=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(e/d)*d}else{this.angle=e}},cancel:function(){this.callback("cancel",null);this.finalize()},finalize:function(){this.origin=null;this.radius=this.options.radius},clear:function(){if(this.layer){this.layer.renderer.clear();this.layer.destroyFeatures()}},callback:function(b,a){if(this.callbacks[b]){this.callbacks[b].apply(this.control,[this.feature.geometry.clone()])}if(!this.persist&&(b=="done"||b=="cancel")){this.clear()}},CLASS_NAME:"OpenLayers.Handler.RegularPolygon"});OpenLayers.Layer.EventPane=OpenLayers.Class(OpenLayers.Layer,{smoothDragPan:true,isBaseLayer:true,isFixed:true,pane:null,mapObject:null,initialize:function(b,a){OpenLayers.Layer.prototype.initialize.apply(this,arguments);if(this.pane==null){this.pane=OpenLayers.Util.createDiv(this.div.id+"_EventPane")}},destroy:function(){this.mapObject=null;this.pane=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments)},setMap:function(a){OpenLayers.Layer.prototype.setMap.apply(this,arguments);this.pane.style.zIndex=parseInt(this.div.style.zIndex)+1;this.pane.style.display=this.div.style.display;this.pane.style.width="100%";this.pane.style.height="100%";if(OpenLayers.Util.getBrowserName()=="msie"){this.pane.style.background="url("+OpenLayers.Util.getImagesLocation()+"blank.gif)"}if(this.isFixed){this.map.viewPortDiv.appendChild(this.pane)}else{this.map.layerContainerDiv.appendChild(this.pane)}this.loadMapObject();if(this.mapObject==null){this.loadWarningMessage()}},removeMap:function(a){if(this.pane&&this.pane.parentNode){this.pane.parentNode.removeChild(this.pane)}OpenLayers.Layer.prototype.removeMap.apply(this,arguments)},loadWarningMessage:function(){this.div.style.backgroundColor="darkblue";var h=this.map.getSize();var a=Math.min(h.w,300);var f=Math.min(h.h,200);var b=new OpenLayers.Size(a,f);var e=new OpenLayers.Pixel(h.w/2,h.h/2);var d=e.add(-b.w/2,-b.h/2);var g=OpenLayers.Util.createDiv(this.name+"_warning",d,b,null,null,null,"auto");g.style.padding="7px";g.style.backgroundColor="yellow";g.innerHTML=this.getWarningHTML();this.div.appendChild(g)},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,e,o){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);if(this.mapObject!=null){var f=this.map.getCenter();var h=this.map.getZoom();if(f!=null){var g=this.getMapObjectCenter();var b=this.getOLLonLatFromMapObjectLonLat(g);var j=this.getMapObjectZoom();var r=this.getOLZoomFromMapObjectZoom(j);if(!(f.equals(b))||!(h==r)){if(o&&this.dragPanMapObject&&this.smoothDragPan){var m=this.map.getViewPortPxFromLonLat(b);var p=this.map.getViewPortPxFromLonLat(f);this.dragPanMapObject(p.x-m.x,m.y-p.y)}else{var a=this.getMapObjectLonLatFromOLLonLat(f);var q=this.getMapObjectZoomFromOLZoom(h);this.setMapObjectCenter(a,q,o)}}}}},getLonLatFromViewPortPx:function(a){var b=null;if((this.mapObject!=null)&&(this.getMapObjectCenter()!=null)){var e=this.getMapObjectPixelFromOLPixel(a);var d=this.getMapObjectLonLatFromMapObjectPixel(e);b=this.getOLLonLatFromMapObjectLonLat(d)}return b},getViewPortPxFromLonLat:function(b){var a=null;if((this.mapObject!=null)&&(this.getMapObjectCenter()!=null)){var e=this.getMapObjectLonLatFromOLLonLat(b);var d=this.getMapObjectPixelFromMapObjectLonLat(e);a=this.getOLPixelFromMapObjectPixel(d)}return a},getOLLonLatFromMapObjectLonLat:function(e){var a=null;if(e!=null){var d=this.getLongitudeFromMapObjectLonLat(e);var b=this.getLatitudeFromMapObjectLonLat(e);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(e){var b=null;if(e!=null){var a=this.getXFromMapObjectPixel(e);var d=this.getYFromMapObjectPixel(e);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 g=d[b];this[g]=(this.options[g]!=null)?this.options[g]:this.map[g]}if((this.minZoomLevel==null)||(this.minZoomLevel<this.MIN_ZOOM_LEVEL)){this.minZoomLevel=this.MIN_ZOOM_LEVEL}var h;var f=this.MAX_ZOOM_LEVEL-this.minZoomLevel+1;if(((this.options.numZoomLevels==null)&&(this.options.maxZoomLevel!=null))||((this.numZoomLevels==null)&&(this.maxZoomLevel!=null))){h=this.maxZoomLevel-this.minZoomLevel+1}else{h=this.numZoomLevels}if(h!=null){this.numZoomLevels=Math.min(h,f)}else{this.numZoomLevels=f}this.maxZoomLevel=this.minZoomLevel+this.numZoomLevels-1;if(this.RESOLUTIONS!=null){var e=0;this.resolutions=[];for(var b=this.minZoomLevel;b<=this.maxZoomLevel;b++){this.resolutions[e++]=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 f=new OpenLayers.Pixel(0,0);var g=this.getLonLatFromViewPortPx(f);var a=new OpenLayers.Pixel(b.w,b.h);var e=this.getLonLatFromViewPortPx(a);if((g!=null)&&(e!=null)){d=new OpenLayers.Bounds(g.lon,e.lat,e.lon,g.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(e,d,f,b){var a=arguments;a=[e,b];OpenLayers.Layer.prototype.initialize.apply(this,a);this.url=d;this.params=OpenLayers.Util.extend({},f)},destroy:function(){this.url=null;this.params=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments)},clone:function(a){if(a==null){a=new OpenLayers.Layer.HTTPRequest(this.name,this.url,this.params,this.getOptions())}a=OpenLayers.Layer.prototype.clone.apply(this,[a]);return a},setUrl:function(a){this.url=a},mergeNewParams:function(b){this.params=OpenLayers.Util.extend(this.params,b);var a=this.redraw();if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"params"})}return a},redraw:function(a){if(a){return this.mergeNewParams({_olSalt:Math.random()})}else{return OpenLayers.Layer.prototype.redraw.apply(this,[])}},selectUrl:function(f,e){var d=1;for(var b=0,a=f.length;b<a;b++){d*=f.charCodeAt(b)*this.URL_HASH_FACTOR;d-=Math.floor(d)}return e[Math.floor(d*e.length)]},getFullRequestString:function(h,e){var b=e||this.url;var g=OpenLayers.Util.extend({},this.params);g=OpenLayers.Util.extend(g,h);var f=OpenLayers.Util.getParameterString(g);if(b instanceof Array){b=this.selectUrl(f,b)}var a=OpenLayers.Util.upperCaseObject(OpenLayers.Util.getParameters(b));for(var d in g){if(d.toUpperCase() in a){delete g[d]}}f=OpenLayers.Util.getParameterString(g);return OpenLayers.Util.urlAppend(b,f)},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,f,e,a){this.url=b;this.extent=f;this.maxExtent=f;this.size=e;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.getOptions())}a=OpenLayers.Layer.prototype.clone.apply(this,[a]);return a},setMap:function(a){if(this.options.maxResolution==null){this.options.maxResolution=this.aspectRatio*this.extent.getWidth()/this.size.w}OpenLayers.Layer.prototype.setMap.apply(this,arguments)},moveTo:function(f,a,g){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);var b=(this.tile==null);if(a||b){this.setTileSize();var e=new OpenLayers.LonLat(this.extent.left,this.extent.top);var d=this.map.getLayerPxFromLonLat(e);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(e,b,f){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 e=0,a=this.markers.length;e<a;e++){var d=this.markers[e];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},getLonLatFromViewPortPx:function(a){return OpenLayers.Layer.prototype.getLonLatFromViewPortPx.apply(this,arguments)},getViewPortPxFromLonLat:function(a){return OpenLayers.Layer.prototype.getViewPortPxFromLonLat.apply(this,arguments)},initMercatorParameters:function(){this.RESOLUTIONS=[];var a=156543.0339;for(var b=0;b<=this.MAX_ZOOM_LEVEL;++b){this.RESOLUTIONS[b]=a/Math.pow(2,b)}this.units="m";this.projection=this.projection||"EPSG:900913"},forwardMercator:function(d,b){var a=d*20037508.34/180;var e=Math.log(Math.tan((90+b)*Math.PI/360))/(Math.PI/180);e=e*20037508.34/180;return new OpenLayers.LonLat(a,e)},inverseMercator:function(a,e){var d=(a/20037508.34)*180;var b=(e/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(e,a,f,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 e=b.responseXML;if(!e||!e.documentElement){e=b.responseText}if(this.layer.vectorMode){this.layer.addFeatures(this.layer.formatObject.read(e))}else{var a=new OpenLayers.Format.XML();if(typeof e=="string"){e=a.read(e)}var d=a.getElementsByTagNameNS(e,"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"],multi:false,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(g,f){this.layer.events.triggerEvent("sketchmodified",{vertex:g,feature:f})},create:function(g,f){this.layer.events.triggerEvent("sketchstarted",{vertex:g,feature:f})}},this.callbacks);this.layer=b;this.handlerOptions=this.handlerOptions||{};if(!("multi" in this.handlerOptions)){this.handlerOptions.multi=this.multi}var e=this.layer.styleMap&&this.layer.styleMap.styles.temporary;if(e){this.handlerOptions.layerOptions=OpenLayers.Util.applyDefaults(this.handlerOptions.layerOptions,{styleMap:new OpenLayers.StyleMap({"default":e})})}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){if(b.getLength()>0){b=b.clone();this.delayedTrigger=window.setTimeout(OpenLayers.Function.bind(function(){this.measure(b,"measurepartial")},this),this.partialDelay)}},measure:function(e,b){var d,a;if(e.CLASS_NAME.indexOf("LineString")>-1){d=this.getBestLength(e);a=1}else{d=this.getBestArea(e);a=2}this.events.triggerEvent(b,{measure:d[0],units:d[1],order:a,geometry:e})},getBestArea:function(g){var b=this.displaySystemUnits[this.displaySystem];var f,e;for(var d=0,a=b.length;d<a;++d){f=b[d];e=this.getArea(g,f);if(e>1){break}}return[e,f]},getArea:function(g,a){var b,d;if(this.geodesic){b=g.getGeodesicArea(this.map.getProjectionObject());d="m"}else{b=g.getArea();d=this.map.getUnits()}var f=OpenLayers.INCHES_PER_UNIT[a];if(f){var e=OpenLayers.INCHES_PER_UNIT[d];b*=Math.pow((e/f),2)}return b},getBestLength:function(g){var b=this.displaySystemUnits[this.displaySystem];var f,e;for(var d=0,a=b.length;d<a;++d){f=b[d];e=this.getLength(g,f);if(e>1){break}}return[e,f]},getLength:function(g,a){var b,d;if(this.geodesic){b=g.getGeodesicLength(this.map.getProjectionObject());d="m"}else{b=g.getLength();d=this.map.getUnits()}var f=OpenLayers.INCHES_PER_UNIT[a];if(f){var e=OpenLayers.INCHES_PER_UNIT[d];b*=(e/f)}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(j){if(j instanceof OpenLayers.Bounds){var b;if(!this.out){var m=this.map.getLonLatFromPixel(new OpenLayers.Pixel(j.left,j.bottom));var r=this.map.getLonLatFromPixel(new OpenLayers.Pixel(j.right,j.top));b=new OpenLayers.Bounds(m.lon,m.lat,r.lon,r.lat)}else{var h=Math.abs(j.right-j.left);var o=Math.abs(j.top-j.bottom);var f=Math.min((this.map.size.h/o),(this.map.size.w/h));var u=this.map.getExtent();var a=this.map.getLonLatFromPixel(j.getCenterPixel());var d=a.lon-(u.getWidth()/2)*f;var g=a.lon+(u.getWidth()/2)*f;var q=a.lat-(u.getHeight()/2)*f;var e=a.lat+(u.getHeight()/2)*f;b=new OpenLayers.Bounds(d,q,g,e)}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(j),this.map.getZoom()+1)}else{this.map.setCenter(this.map.getLonLatFromPixel(j),this.map.getZoom()-1)}}},CLASS_NAME:"OpenLayers.Control.ZoomBox"});OpenLayers.Format.WFSCapabilities.v1_0_0=OpenLayers.Class(OpenLayers.Format.WFSCapabilities.v1,{initialize:function(a){OpenLayers.Format.WFSCapabilities.v1.prototype.initialize.apply(this,[a])},read_cap_Service:function(b,d){var a={};this.runChildNodes(a,d);b.service=a},read_cap_Fees:function(a,d){var b=this.getChildValue(d);if(b&&b.toLowerCase()!="none"){a.fees=b}},read_cap_AccessConstraints:function(a,b){var d=this.getChildValue(b);if(d&&d.toLowerCase()!="none"){a.accessConstraints=d}},read_cap_OnlineResource:function(a,d){var b=this.getChildValue(d);if(b&&b.toLowerCase()!="none"){a.onlineResource=b}},read_cap_Keywords:function(a,d){var b=this.getChildValue(d);if(b&&b.toLowerCase()!="none"){a.keywords=b.split(", ")}},read_cap_Capability:function(a,d){var b={};this.runChildNodes(b,d);a.capability=b},read_cap_Request:function(d,b){var a={};this.runChildNodes(a,b);d.request=a},read_cap_GetFeature:function(b,a){var d={href:{},formats:[]};this.runChildNodes(d,a);b.getfeature=d},read_cap_ResultFormat:function(f,e){var d=e.childNodes;var b;for(var a=0;a<d.length;a++){b=d[a];if(b.nodeType==1){f.formats.push(b.nodeName)}}},read_cap_DCPType:function(b,a){this.runChildNodes(b,a)},read_cap_HTTP:function(b,a){this.runChildNodes(b.href,a)},read_cap_Get:function(b,a){b.get=a.getAttribute("onlineResource")},read_cap_Post:function(b,a){b.post=a.getAttribute("onlineResource")},CLASS_NAME:"OpenLayers.Format.WFSCapabilities.v1_0_0"});OpenLayers.Format.WFSCapabilities.v1_1_0=OpenLayers.Class(OpenLayers.Format.WFSCapabilities.v1,{initialize:function(a){OpenLayers.Format.WFSCapabilities.v1.prototype.initialize.apply(this,[a])},CLASS_NAME:"OpenLayers.Format.WFSCapabilities.v1_1_0"});OpenLayers.Format.WKT=OpenLayers.Class(OpenLayers.Format,{initialize:function(a){this.regExes={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/};OpenLayers.Format.prototype.initialize.apply(this,[a])},read:function(g){var f,e,j;var h=this.regExes.typeStr.exec(g);if(h){e=h[1].toLowerCase();j=h[2];if(this.parse[e]){f=this.parse[e].apply(this,[j])}if(this.internalProjection&&this.externalProjection){if(f&&f.CLASS_NAME=="OpenLayers.Feature.Vector"){f.geometry.transform(this.externalProjection,this.internalProjection)}else{if(f&&e!="geometrycollection"&&typeof f=="object"){for(var d=0,a=f.length;d<a;d++){var b=f[d];b.geometry.transform(this.externalProjection,this.internalProjection)}}}}}return f},write:function(a){var g,m,j,e,b;if(a.constructor==Array){g=a;b=true}else{g=[a];b=false}var d=[];if(b){d.push("GEOMETRYCOLLECTION(")}for(var f=0,h=g.length;f<h;++f){if(b&&f>0){d.push(",")}m=g[f].geometry;j=m.CLASS_NAME.split(".")[2].toLowerCase();if(!this.extract[j]){return null}if(this.internalProjection&&this.externalProjection){m=m.clone();m.transform(this.internalProjection,this.externalProjection)}e=this.extract[j].apply(this,[m]);d.push(j.toUpperCase()+"("+e+")")}if(b){d.push(")")}return d.join("")},extract:{point:function(a){return a.x+" "+a.y},multipoint:function(d){var e=[];for(var b=0,a=d.components.length;b<a;++b){e.push("("+this.extract.point.apply(this,[d.components[b]])+")")}return e.join(",")},linestring:function(b){var e=[];for(var d=0,a=b.components.length;d<a;++d){e.push(this.extract.point.apply(this,[b.components[d]]))}return e.join(",")},multilinestring:function(d){var e=[];for(var b=0,a=d.components.length;b<a;++b){e.push("("+this.extract.linestring.apply(this,[d.components[b]])+")")}return e.join(",")},polygon:function(d){var e=[];for(var b=0,a=d.components.length;b<a;++b){e.push("("+this.extract.linestring.apply(this,[d.components[b]])+")")}return e.join(",")},multipolygon:function(e){var d=[];for(var b=0,a=e.components.length;b<a;++b){d.push("("+this.extract.polygon.apply(this,[e.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 b;var e=OpenLayers.String.trim(g).split(this.regExes.parenComma);var f=[];for(var d=0,a=e.length;d<a;++d){b=e[d].replace(this.regExes.trimParens,"$1");f.push(this.parse.point.apply(this,[b]).geometry)}return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiPoint(f))},linestring:function(f){var d=OpenLayers.String.trim(f).split(",");var e=[];for(var b=0,a=d.length;b<a;++b){e.push(this.parse.point.apply(this,[d[b]]).geometry)}return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString(e))},multilinestring:function(g){var d;var b=OpenLayers.String.trim(g).split(this.regExes.parenComma);var f=[];for(var e=0,a=b.length;e<a;++e){d=b[e].replace(this.regExes.trimParens,"$1");f.push(this.parse.linestring.apply(this,[d]).geometry)}return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiLineString(f))},polygon:function(j){var d,b,g;var h=OpenLayers.String.trim(j).split(this.regExes.parenComma);var f=[];for(var e=0,a=h.length;e<a;++e){d=h[e].replace(this.regExes.trimParens,"$1");b=this.parse.linestring.apply(this,[d]).geometry;g=new OpenLayers.Geometry.LinearRing(b.components);f.push(g)}return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon(f))},multipolygon:function(g){var e;var b=OpenLayers.String.trim(g).split(this.regExes.doubleParenComma);var f=[];for(var d=0,a=b.length;d<a;++d){e=b[d].replace(this.regExes.trimParens,"$1");f.push(this.parse.polygon.apply(this,[e]).geometry)}return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiPolygon(f))},geometrycollection:function(f){f=f.replace(/,\s*([A-Za-z])/g,"|$1");var e=OpenLayers.String.trim(f).split("|");var d=[];for(var b=0,a=e.length;b<a;++b){d.push(OpenLayers.Format.WKT.prototype.read.apply(this,[e[b]]))}return d}},CLASS_NAME:"OpenLayers.Format.WKT"});OpenLayers.Format.WMC.v1=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{ol:"http://openlayers.org/context",wmc:"http://www.opengis.net/context",sld:"http://www.opengis.net/sld",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},schemaLocation:"",getNamespacePrefix:function(a){var b=null;if(a==null){b=this.namespaces[this.defaultPrefix]}else{for(b in this.namespaces){if(this.namespaces[b]==a){break}}}return b},defaultPrefix:"wmc",rootPrefix:null,defaultStyleName:"",defaultStyleTitle:"Default",initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},read:function(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(f,e){var b=e.childNodes;var a,d,h,m;for(var g=0,j=b.length;g<j;++g){a=b[g];if(a.nodeType==1){h=this.getNamespacePrefix(a.namespaceURI);m=a.nodeName.split(":").pop();d=this["read_"+h+"_"+m];if(d){d.apply(this,[f,a])}}}},read_wmc_General:function(a,b){this.runChildNodes(a,b)},read_wmc_BoundingBox:function(a,b){a.projection=b.getAttribute("SRS");a.bounds=new OpenLayers.Bounds(parseFloat(b.getAttribute("minx")),parseFloat(b.getAttribute("miny")),parseFloat(b.getAttribute("maxx")),parseFloat(b.getAttribute("maxy")))},read_wmc_LayerList:function(a,b){a.layersContext=[];this.runChildNodes(a,b)},read_wmc_Layer:function(a,b){var d={visibility:(b.getAttribute("hidden")!="1"),queryable:(b.getAttribute("queryable")=="1"),formats:[],styles:[]};this.runChildNodes(d,b);a.layersContext.push(d)},read_wmc_Extension:function(b,a){this.runChildNodes(b,a)},read_ol_units:function(b,a){b.units=this.getChildValue(a)},read_ol_maxExtent:function(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.transparent=this.getChildValue(a)},read_ol_numZoomLevels:function(b,a){b.numZoomLevels=parseInt(this.getChildValue(a))},read_ol_opacity:function(b,a){b.opacity=parseFloat(this.getChildValue(a))},read_ol_singleTile:function(b,a){b.singleTile=(this.getChildValue(a)=="true")},read_ol_tileSize:function(b,a){var d={width:a.getAttribute("width"),height:a.getAttribute("height")};b.tileSize=d},read_ol_isBaseLayer:function(b,a){b.isBaseLayer=(this.getChildValue(a)=="true")},read_ol_displayInLayerSwitcher:function(b,a){b.displayInLayerSwitcher=(this.getChildValue(a)=="true")},read_wmc_Server:function(d,b){d.version=b.getAttribute("version");var e={};var a=b.getElementsByTagName("OnlineResource");if(a.length>0){this.read_wmc_OnlineResource(e,a[0])}d.url=e.href},read_wmc_FormatList:function(b,a){this.runChildNodes(b,a)},read_wmc_Format:function(b,a){var d={value:this.getChildValue(a)};if(a.getAttribute("current")=="1"){d.current=true}b.formats.push(d)},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"){a.current=true}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 e={};var a=b.getElementsByTagName("OnlineResource");if(a.length>0){this.read_wmc_OnlineResource(e,a[0])}d.metadataURL=e.href},read_wmc_Abstract:function(d,b){var a=this.getChildValue(b);if(a){d["abstract"]=a}},read_wmc_LegendURL:function(d,e){var b={width:e.getAttribute("width"),height:e.getAttribute("height")};var a=e.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 e=this.createElementNS(this.namespaces[this.defaultPrefix],d);if(b){e.appendChild(this.createTextNode(b))}if(a){this.setAttributes(e,a)}return e},setAttributes:function(b,e){var d;for(var a in e){d=e[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(18),miny:b.bottom.toPrecision(18),maxx:b.right.toPrecision(18),maxy:b.top.toPrecision(18),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 e=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(18),miny:d.bottom.toPrecision(18),maxx:d.right.toPrecision(18),maxy:d.top.toPrecision(18)});e.appendChild(a)}return e},write_wmc_LayerList:function(d){var e=this.createElementDefaultNS("LayerList");for(var b=0,a=d.layersContext.length;b<a;++b){e.appendChild(this.write_wmc_Layer(d.layersContext[b]))}return e},write_wmc_Layer:function(a){var b=this.createElementDefaultNS("Layer",null,{queryable:a.queryable?"1":"0",hidden:a.visibility?"0":"1"});b.appendChild(this.write_wmc_Server(a));b.appendChild(this.createElementDefaultNS("Name",a.name));b.appendChild(this.createElementDefaultNS("Title",a.title));if(a.metadataURL){b.appendChild(this.write_wmc_MetadataURL(a.metadataURL))}return b},write_wmc_LayerExtension:function(b){var e=this.createElementDefaultNS("Extension");var a=b.maxExtent;var j=this.createElementNS(this.namespaces.ol,"ol:maxExtent");this.setAttributes(j,{minx:a.left.toPrecision(18),miny:a.bottom.toPrecision(18),maxx:a.right.toPrecision(18),maxy:a.top.toPrecision(18)});e.appendChild(j);if(b.tileSize&&!b.singleTile){var m=this.createElementNS(this.namespaces.ol,"ol:tileSize");this.setAttributes(m,b.tileSize);e.appendChild(m)}var h=["transparent","numZoomLevels","units","isBaseLayer","opacity","displayInLayerSwitcher","singleTile"];var d;for(var f=0,g=h.length;f<g;++f){d=this.createOLPropertyNode(b,h[f]);if(d){e.appendChild(d)}}return e},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.version});b.appendChild(this.write_wmc_OnlineResource(a.url));return b},write_wmc_MetadataURL:function(b){var a=this.createElementDefaultNS("MetadataURL");a.appendChild(this.write_wmc_OnlineResource(b));return a},write_wmc_FormatList:function(d){var e=this.createElementDefaultNS("FormatList");for(var b=0,a=d.formats.length;b<a;b++){var f=d.formats[b];e.appendChild(this.createElementDefaultNS("Format",f.value,(f.current&&f.current==true)?{current:"1"}:null))}return e},write_wmc_StyleList:function(f){var d=this.createElementDefaultNS("StyleList");var o=f.styles;if(o&&o instanceof Array){var a;for(var e=0,g=o.length;e<g;e++){var p=o[e];var b=this.createElementDefaultNS("Style",null,(p.current&&p.current==true)?{current:"1"}:null);if(p.href){a=this.createElementDefaultNS("SLD");var h=this.write_wmc_OnlineResource(p.href);a.appendChild(h);a.appendChild(this.createElementDefaultNS("Name",p.name));if(p.title){a.appendChild(this.createElementDefaultNS("Title",p.title))}b.appendChild(a)}else{if(p.body){a=this.createElementDefaultNS("SLD");var j=OpenLayers.Format.XML.prototype.read.apply(this,[p.body]);var m=j.documentElement;if(a.ownerDocument&&a.ownerDocument.importNode){m=a.ownerDocument.importNode(m,true)}a.appendChild(m);a.appendChild(this.createElementDefaultNS("Name",p.name));if(p.title){a.appendChild(this.createElementDefaultNS("Title",p.title))}b.appendChild(a)}else{b.appendChild(this.createElementDefaultNS("Name",p.name));b.appendChild(this.createElementDefaultNS("Title",p.title));if(p["abstract"]){b.appendChild(this.createElementDefaultNS("Abstract",p["abstract"]))}}}d.appendChild(b)}}return d},write_wmc_OnlineResource:function(a){var b=this.createElementDefaultNS("OnlineResource");this.setAttributeNS(b,this.namespaces.xlink,"xlink:type","simple");this.setAttributeNS(b,this.namespaces.xlink,"xlink:href",a);return b},CLASS_NAME:"OpenLayers.Format.WMC.v1"});OpenLayers.Format.WMSCapabilities.v1_1=OpenLayers.Class(OpenLayers.Format.WMSCapabilities.v1,{readers:{wms:OpenLayers.Util.applyDefaults({WMT_MS_Capabilities:function(a,b){this.readChildNodes(a,b)},Keyword:function(a,b){if(b.keywords){b.keywords.push(this.getChildValue(a))}},DescribeLayer:function(a,b){b.describelayer={formats:[]};this.readChildNodes(a,b.describelayer)},GetLegendGraphic:function(a,b){b.getlegendgraphic={formats:[]};this.readChildNodes(a,b.getlegendgraphic)},GetStyles:function(a,b){b.getstyles={formats:[]};this.readChildNodes(a,b.getstyles)},PutStyles:function(a,b){b.putstyles={formats:[]};this.readChildNodes(a,b.putstyles)},UserDefinedSymbolization:function(a,b){var d={supportSLD:parseInt(a.getAttribute("SupportSLD"))==1,userLayer:parseInt(a.getAttribute("UserLayer"))==1,userStyle:parseInt(a.getAttribute("UserStyle"))==1,remoteWFS:parseInt(a.getAttribute("RemoteWFS"))==1};b.userSymbols=d},LatLonBoundingBox:function(a,b){b.llbbox=[parseFloat(a.getAttribute("minx")),parseFloat(a.getAttribute("miny")),parseFloat(a.getAttribute("maxx")),parseFloat(a.getAttribute("maxy"))]},BoundingBox:function(a,b){var d=OpenLayers.Format.WMSCapabilities.v1.prototype.readers.wms.BoundingBox.apply(this,[a,b]);d.srs=a.getAttribute("SRS");b.bbox[d.srs]=d},ScaleHint:function(f,g){var e=f.getAttribute("min");var a=f.getAttribute("max");var d=Math.pow(2,0.5);var b=OpenLayers.INCHES_PER_UNIT.m;g.maxScale=parseFloat(((e/d)*b*OpenLayers.DOTS_PER_INCH).toPrecision(13));g.minScale=parseFloat(((a/d)*b*OpenLayers.DOTS_PER_INCH).toPrecision(13))},Dimension:function(b,e){var a=b.getAttribute("name").toLowerCase();var d={name:a,units:b.getAttribute("units"),unitsymbol:b.getAttribute("unitSymbol")};e.dimensions[d.name]=d},Extent:function(e,f){var b=e.getAttribute("name").toLowerCase();if(b in f.dimensions){var d=f.dimensions[b];d.nearestVal=e.getAttribute("nearestValue")==="1";d.multipleVal=e.getAttribute("multipleValues")==="1";d.current=e.getAttribute("current")==="1";d["default"]=e.getAttribute("default")||"";var a=this.getChildValue(e);d.values=a.split(",")}}},OpenLayers.Format.WMSCapabilities.v1.prototype.readers.wms)},CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1_1"});OpenLayers.Format.WMSCapabilities.v1_3=OpenLayers.Class(OpenLayers.Format.WMSCapabilities.v1,{readers:{wms:OpenLayers.Util.applyDefaults({WMS_Capabilities:function(a,b){this.readChildNodes(a,b)},LayerLimit:function(a,b){b.layerLimit=parseInt(this.getChildValue(a))},MaxWidth:function(a,b){b.maxWidth=parseInt(this.getChildValue(a))},MaxHeight:function(a,b){b.maxHeight=parseInt(this.getChildValue(a))},BoundingBox:function(a,b){var d=OpenLayers.Format.WMSCapabilities.v1.prototype.readers.wms.BoundingBox.apply(this,[a,b]);d.srs=a.getAttribute("CRS");b.bbox[d.srs]=d},CRS:function(a,b){this.readers.wms.SRS.apply(this,[a,b])},EX_GeographicBoundingBox:function(a,b){b.llbbox=[];this.readChildNodes(a,b.llbbox)},westBoundLongitude:function(a,b){b[0]=this.getChildValue(a)},eastBoundLongitude:function(a,b){b[2]=this.getChildValue(a)},southBoundLatitude:function(a,b){b[1]=this.getChildValue(a)},northBoundLatitude:function(a,b){b[3]=this.getChildValue(a)},MinScaleDenominator:function(a,b){b.maxScale=parseFloat(this.getChildValue(a)).toPrecision(16)},MaxScaleDenominator:function(a,b){b.minScale=parseFloat(this.getChildValue(a)).toPrecision(16)},Dimension:function(b,e){var a=b.getAttribute("name").toLowerCase();var d={name:a,units:b.getAttribute("units"),unitsymbol:b.getAttribute("unitSymbol"),nearestVal:b.getAttribute("nearestValue")==="1",multipleVal:b.getAttribute("multipleValues")==="1","default":b.getAttribute("default")||"",current:b.getAttribute("current")==="1",values:this.getChildValue(b).split(",")};e.dimensions[d.name]=d},Keyword:function(b,d){var a={value:this.getChildValue(b),vocabulary:b.getAttribute("vocabulary")};if(d.keywords){d.keywords.push(a)}}},OpenLayers.Format.WMSCapabilities.v1.prototype.readers.wms),sld:{UserDefinedSymbolization:function(a,b){this.readers.wms.UserDefinedSymbolization.apply(this,[a,b]);b.userSymbols.inlineFeature=parseInt(a.getAttribute("InlineFeature"))==1;b.userSymbols.remoteWCS=parseInt(a.getAttribute("RemoteWCS"))==1},DescribeLayer:function(a,b){this.readers.wms.DescribeLayer.apply(this,[a,b])},GetLegendGraphic:function(a,b){this.readers.wms.GetLegendGraphic.apply(this,[a,b])}}},CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1_3"});OpenLayers.Format.WMTSCapabilities.v1_0_0=OpenLayers.Class(OpenLayers.Format.OWSCommon.v1_1_0,{version:"1.0.0",namespaces:{ows:"http://www.opengis.net/ows/1.1",wmts:"http://www.opengis.net/wmts/1.0",xlink:"http://www.w3.org/1999/xlink"},yx:null,defaultPrefix:"wmts",initialize:function(b){OpenLayers.Format.XML.prototype.initialize.apply(this,[b]);this.options=b;var a=OpenLayers.Util.extend({},OpenLayers.Format.WMTSCapabilities.prototype.yx);this.yx=OpenLayers.Util.extend(a,this.yx)},read:function(b){if(typeof b=="string"){b=OpenLayers.Format.XML.prototype.read.apply(this,[b])}if(b&&b.nodeType==9){b=b.documentElement}var a={};this.readNode(b,a);a.version=this.version;return a},readers:{wmts:{Capabilities:function(a,b){this.readChildNodes(a,b)},Contents:function(a,b){b.contents={};b.contents.layers=[];b.contents.tileMatrixSets={};this.readChildNodes(a,b.contents)},Layer:function(b,d){var a={styles:[],formats:[],tileMatrixSetLinks:[]};a.layers=[];this.readChildNodes(b,a);d.layers.push(a)},Style:function(b,d){var a={};a.isDefault=(b.getAttribute("isDefault")==="true");this.readChildNodes(b,a);d.styles.push(a)},Format:function(a,b){b.formats.push(this.getChildValue(a))},TileMatrixSetLink:function(b,d){var a={};this.readChildNodes(b,a);d.tileMatrixSetLinks.push(a)},TileMatrixSet:function(b,d){if(d.layers){var a={matrixIds:[]};this.readChildNodes(b,a);d.tileMatrixSets[a.identifier]=a}else{d.tileMatrixSet=this.getChildValue(b)}},TileMatrix:function(b,d){var a={supportedCRS:d.supportedCRS};this.readChildNodes(b,a);d.matrixIds.push(a)},ScaleDenominator:function(a,b){b.scaleDenominator=parseFloat(this.getChildValue(a))},TopLeftCorner:function(e,g){var d=this.getChildValue(e);var f=d.split(" ");var a;if(g.supportedCRS){var b=g.supportedCRS.replace(/urn:ogc:def:crs:(\w+):.+:(\w+)$/,"urn:ogc:def:crs:$1::$2");a=!!this.yx[b]}if(a){g.topLeftCorner=new OpenLayers.LonLat(f[1],f[0])}else{g.topLeftCorner=new OpenLayers.LonLat(f[0],f[1])}},TileWidth:function(a,b){b.tileWidth=parseInt(this.getChildValue(a))},TileHeight:function(a,b){b.tileHeight=parseInt(this.getChildValue(a))},MatrixWidth:function(a,b){b.matrixWidth=parseInt(this.getChildValue(a))},MatrixHeight:function(a,b){b.matrixHeight=parseInt(this.getChildValue(a))},WSDL:function(a,b){b.wsdl={};b.wsdl.href=a.getAttribute("xlink:href")},ServiceMetadataURL:function(a,b){b.serviceMetadataUrl={};b.serviceMetadataUrl.href=a.getAttribute("xlink:href")}},ows:OpenLayers.Format.OWSCommon.v1_1_0.prototype.readers.ows},CLASS_NAME:"OpenLayers.Format.WMTSCapabilities.v1_0_0"});OpenLayers.Layer.Boxes=OpenLayers.Class(OpenLayers.Layer.Markers,{initialize:function(b,a){OpenLayers.Layer.Markers.prototype.initialize.apply(this,arguments)},drawMarker:function(a){var e=a.bounds;var g=this.map.getLayerPxFromLonLat(new OpenLayers.LonLat(e.left,e.top));var d=this.map.getLayerPxFromLonLat(new OpenLayers.LonLat(e.right,e.bottom));if(d==null||g==null){a.display(false)}else{var f=new OpenLayers.Size(Math.max(1,d.x-g.x),Math.max(1,d.y-g.y));var b=a.draw(g,f);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(o){var u=o.responseXML;if(!u||!u.documentElement){u=OpenLayers.Format.XML.prototype.read(o.responseText)}if(this.useFeedTitle){var a=null;try{a=u.getElementsByTagNameNS("*","title")[0].firstChild.nodeValue}catch(m){a=u.getElementsByTagName("title")[0].firstChild.nodeValue}if(a){this.setName(a)}}var B={};OpenLayers.Util.extend(B,this.formatOptions);if(this.map&&!this.projection.equals(this.map.getProjectionObject())){B.externalProjection=this.projection;B.internalProjection=this.map.getProjectionObject()}var v=new OpenLayers.Format.GeoRSS(B);var b=v.read(u);for(var h=0,j=b.length;h<j;h++){var g={};var z=b[h];if(!z.geometry){continue}var q=z.attributes.title?z.attributes.title:"Untitled";var w=z.attributes.description?z.attributes.description:"No description.";var p=z.attributes.link?z.attributes.link:"";var r=z.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(q||w){g.title=q;g.description=w;var d='<div class="olLayerGeoRSSClose">[x]</div>';d+='<div class="olLayerGeoRSSTitle">';if(p){d+='<a class="link" href="'+p+'" target="_blank">'}d+=q;if(p){d+="</a>"}d+="</div>";d+='<div style="" class="olLayerGeoRSSDescription">';d+=w;d+="</div>";g.popupContentHTML=d}var z=new OpenLayers.Feature(this,r,g);this.features.push(z);var f=z.createMarker();f.events.register("click",z,this.markerClick);this.addMarker(f)}this.events.triggerEvent("loadend")},markerClick:function(d){var f=(this==this.layer.selectedFeature);this.layer.selectedFeature=(!f)?this:null;for(var e=0,a=this.layer.map.popups.length;e<a;e++){this.layer.map.removePopup(this.layer.map.popups[e])}if(!f){var b=this.createPopup();OpenLayers.Event.observe(b.div,"click",OpenLayers.Function.bind(function(){for(var h=0,g=this.layer.map.popups.length;h<g;h++){this.layer.map.removePopup(this.layer.map.popups[h])}},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:21,RESOLUTIONS:[1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125,0.00002145767211914062,0.00001072883605957031,0.00000536441802978515,0.00000268220901489257,0.000001341104507446289,6.705522537231445e-7],type:null,wrapDateLine:true,sphericalMercator:false,version:null,initialize:function(d,b){b=b||{};if(!b.version){b.version=typeof GMap2==="function"?"2":"3"}var a=OpenLayers.Layer.Google["v"+b.version.replace(/\./g,"_")];if(a){OpenLayers.Util.applyDefaults(b,a)}else{throw"Unsupported Google Maps API version: "+b.version}OpenLayers.Util.applyDefaults(b,a.DEFAULTS);if(b.maxExtent){b.maxExtent=b.maxExtent.clone()}OpenLayers.Layer.EventPane.prototype.initialize.apply(this,[d,b]);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,[d,b]);if(this.sphericalMercator){OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator);this.initMercatorParameters()}},clone:function(){return new OpenLayers.Layer.Google(this.name,this.getOptions())},setVisibility:function(b){var a=this.opacity==null?1:this.opacity;OpenLayers.Layer.EventPane.prototype.setVisibility.apply(this,arguments);this.setOpacity(a)},display:function(a){if(!this._dragging){this.setGMapVisibility(a)}OpenLayers.Layer.EventPane.prototype.display.apply(this,arguments)},moveTo:function(b,a,d){this._dragging=d;OpenLayers.Layer.EventPane.prototype.moveTo.apply(this,arguments);delete this._dragging},setOpacity:function(b){if(b!==this.opacity){if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"opacity"})}this.opacity=b}if(this.getVisibility()){var a=this.getMapContainer();OpenLayers.Util.modifyDOMElement(a,null,null,null,null,null,null,b)}},destroy:function(){if(this.map){this.setGMapVisibility(false);var a=OpenLayers.Layer.Google.cache[this.map.id];if(a&&a.count<=1){this.removeGMapElements()}}OpenLayers.Layer.EventPane.prototype.destroy.apply(this,arguments)},removeGMapElements:function(){var e=OpenLayers.Layer.Google.cache[this.map.id];if(e){var b=this.mapObject&&this.getMapContainer();if(b&&b.parentNode){b.parentNode.removeChild(b)}var d=e.termsOfUse;if(d&&d.parentNode){d.parentNode.removeChild(d)}var a=e.poweredBy;if(a&&a.parentNode){a.parentNode.removeChild(a)}}},removeMap:function(b){if(this.visibility&&this.mapObject){this.setGMapVisibility(false)}var a=OpenLayers.Layer.Google.cache[b.id];if(a){if(a.count<=1){this.removeGMapElements();delete OpenLayers.Layer.Google.cache[b.id]}else{--a.count}}delete this.termsOfUse;delete this.poweredBy;delete this.mapObject;delete this.dragObject;OpenLayers.Layer.EventPane.prototype.removeMap.apply(this,arguments)},getOLBoundsFromMapObjectBounds:function(b){var d=null;if(b!=null){var a=b.getSouthWest();var e=b.getNorthEast();if(this.sphericalMercator){a=this.forwardMercator(a.lng(),a.lat());e=this.forwardMercator(e.lng(),e.lat())}else{a=new OpenLayers.LonLat(a.lng(),a.lat());e=new OpenLayers.LonLat(e.lng(),e.lat())}d=new OpenLayers.Bounds(a.lon,a.lat,e.lon,e.lat)}return d},getWarningHTML:function(){return OpenLayers.i18n("googleWarning")},getMapObjectCenter:function(){return this.mapObject.getCenter()},getMapObjectZoom:function(){return this.mapObject.getZoom()},getLongitudeFromMapObjectLonLat:function(a){return this.sphericalMercator?this.forwardMercator(a.lng(),a.lat()).lon:a.lng()},getLatitudeFromMapObjectLonLat:function(b){var a=this.sphericalMercator?this.forwardMercator(b.lng(),b.lat()).lat:b.lat();return a},getXFromMapObjectPixel:function(a){return a.x},getYFromMapObjectPixel:function(a){return a.y},CLASS_NAME:"OpenLayers.Layer.Google"});OpenLayers.Layer.Google.cache={};OpenLayers.Layer.Google.v2={termsOfUse:null,poweredBy:null,dragObject:null,loadMapObject:function(){if(!this.type){this.type=G_NORMAL_MAP}var h,f,a;var d=OpenLayers.Layer.Google.cache[this.map.id];if(d){h=d.mapObject;f=d.termsOfUse;a=d.poweredBy;++d.count}else{var b=this.map.viewPortDiv;var j=document.createElement("div");j.id=this.map.id+"_GMap2Container";j.style.position="absolute";j.style.width="100%";j.style.height="100%";b.appendChild(j);try{h=new GMap2(j);f=j.lastChild;b.appendChild(f);f.style.zIndex="1100";f.style.right="";f.style.bottom="";f.className="olLayerGoogleCopyright";a=j.lastChild;b.appendChild(a);a.style.zIndex="1100";a.style.right="";a.style.bottom="";a.className="olLayerGooglePoweredBy gmnoprint"}catch(g){throw (g)}OpenLayers.Layer.Google.cache[this.map.id]={mapObject:h,termsOfUse:f,poweredBy:a,count:1}}this.mapObject=h;this.termsOfUse=f;this.poweredBy=a;if(OpenLayers.Util.indexOf(this.mapObject.getMapTypes(),this.type)===-1){this.mapObject.addMapType(this.type)}if(typeof h.getDragObject=="function"){this.dragObject=h.getDragObject()}else{this.dragPanMapObject=null}if(this.isBaseLayer===false){this.setGMapVisibility(this.div.style.display!=="none")}},onMapResize:function(){if(this.visibility&&this.mapObject.isLoaded()){this.mapObject.checkResize()}else{if(!this._resized){var a=this;var b=GEvent.addListener(this.mapObject,"load",function(){GEvent.removeListener(b);delete a._resized;a.mapObject.checkResize();a.moveTo(a.map.getCenter(),a.map.getZoom())})}this._resized=true}},setGMapVisibility:function(d){var b=OpenLayers.Layer.Google.cache[this.map.id];if(b){var a=this.mapObject.getContainer();if(d===true){this.mapObject.setMapType(this.type);a.style.display="";this.termsOfUse.style.left="";this.termsOfUse.style.display="";this.poweredBy.style.display="";b.displayed=this.id}else{if(b.displayed===this.id){delete b.displayed}if(!b.displayed){a.style.display="none";this.termsOfUse.style.display="none";this.termsOfUse.style.left="-9999px";this.poweredBy.style.display="none"}}}},getMapContainer:function(){return this.mapObject.getContainer()},getMapObjectBoundsFromOLBounds:function(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 e=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(e.lat,e.lon))}return b},setMapObjectCenter:function(a,b){this.mapObject.setCenter(a,b)},dragPanMapObject:function(b,a){this.dragObject.moveBy(new GSize(-b,a))},getMapObjectLonLatFromMapObjectPixel:function(a){return this.mapObject.fromContainerPixelToLatLng(a)},getMapObjectPixelFromMapObjectLonLat:function(a){return this.mapObject.fromLatLngToContainerPixel(a)},getMapObjectZoomFromMapObjectBounds:function(a){return this.mapObject.getBoundsZoomLevel(a)},getMapObjectLonLatFromLonLat:function(e,b){var d;if(this.sphericalMercator){var a=this.inverseMercator(e,b);d=new GLatLng(a.lat,a.lon)}else{d=new GLatLng(b,e)}return d},getMapObjectPixelFromXY:function(a,b){return new GPoint(a,b)}};OpenLayers.Layer.Grid=OpenLayers.Class(OpenLayers.Layer.HTTPRequest,{tileSize:null,grid:null,singleTile:false,ratio:1.5,buffer:2,numLoadingTiles:0,initialize:function(d,b,e,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 g=0,b=this.grid.length;g<b;g++){var f=this.grid[g];for(var d=0,a=f.length;d<a;d++){var e=f[d];this.removeTileMonitoringHooks(e);e.destroy()}}this.grid=[]}},clone:function(a){if(a==null){a=new OpenLayers.Layer.Grid(this.name,this.url,this.params,this.getOptions())}a=OpenLayers.Layer.HTTPRequest.prototype.clone.apply(this,[a]);if(this.tileSize!=null){a.tileSize=this.tileSize.clone()}a.grid=[];return a},moveTo:function(e,a,f){OpenLayers.Layer.HTTPRequest.prototype.moveTo.apply(this,arguments);e=e||this.map.getExtent();if(e!=null){var d=!this.grid.length||a;var b=this.getTilesBounds();if(this.singleTile){if(d||(!f&&!b.containsBounds(e))){this.initSingleTile(e)}}else{if(d||!b.containsBounds(e,true)){this.initGriddedTiles(e)}else{this.moveGriddedTiles(e)}}}},setTileSize:function(a){if(this.singleTile){a=this.map.getSize();a.h=parseInt(a.h*this.ratio);a.w=parseInt(a.w*this.ratio)}OpenLayers.Layer.HTTPRequest.prototype.setTileSize.apply(this,[a])},getGridBounds:function(){var a="The getGridBounds() function is deprecated. It will be removed in 3.0. Please use getTilesBounds() instead.";OpenLayers.Console.warn(a);return this.getTilesBounds()},getTilesBounds:function(){var f=null;if(this.grid.length){var a=this.grid.length-1;var e=this.grid[a][0];var b=this.grid[0].length-1;var d=this.grid[0][b];f=new OpenLayers.Bounds(e.bounds.left,e.bounds.bottom,d.bounds.right,d.bounds.top)}return f},initSingleTile:function(g){var a=g.getCenterLonLat();var j=g.getWidth()*this.ratio;var b=g.getHeight()*this.ratio;var h=new OpenLayers.Bounds(a.lon-(j/2),a.lat-(b/2),a.lon+(j/2),a.lat+(b/2));var e=new OpenLayers.LonLat(h.left,h.top);var d=this.map.getLayerPxFromLonLat(e);if(!this.grid.length){this.grid[0]=[]}var f=this.grid[0][0];if(!f){f=this.addTile(h,d);this.addTileMonitoringHooks(f);f.draw();this.grid[0][0]=f}else{f.moveTo(h,d)}this.removeExcessTiles(1,1)},calculateGridLayout:function(a,v,f){var p=f*this.tileSize.w;var d=f*this.tileSize.h;var m=a.left-v.left;var q=Math.floor(m/p)-this.buffer;var o=m/p-q;var g=-o*this.tileSize.w;var r=v.left+q*p;var b=a.top-(v.bottom+d);var j=Math.ceil(b/d)+this.buffer;var u=j-b/d;var e=-u*this.tileSize.h;var h=v.bottom+j*d;return{tilelon:p,tilelat:d,tileoffsetlon:r,tileoffsetlat:h,tileoffsetx:g,tileoffsety:e}},initGriddedTiles:function(m){var h=this.map.getSize();var F=Math.ceil(h.h/this.tileSize.h)+Math.max(1,2*this.buffer);var H=Math.ceil(h.w/this.tileSize.w)+Math.max(1,2*this.buffer);var v=this.getMaxExtent();var B=this.map.getResolution();var z=this.calculateGridLayout(m,v,B);var g=Math.round(z.tileoffsetx);var d=Math.round(z.tileoffsety);var p=z.tileoffsetlon;var u=z.tileoffsetlat;var f=z.tilelon;var o=z.tilelat;this.origin=new OpenLayers.Pixel(g,d);var E=g;var G=p;var D=0;var a=parseInt(this.map.layerContainerDiv.style.left);var C=parseInt(this.map.layerContainerDiv.style.top);do{var j=this.grid[D++];if(!j){j=[];this.grid.push(j)}p=G;g=E;var e=0;do{var b=new OpenLayers.Bounds(p,u,p+f,u+o);var r=g;r-=a;var q=d;q-=C;var w=new OpenLayers.Pixel(r,q);var I=j[e++];if(!I){I=this.addTile(b,w);this.addTileMonitoringHooks(I);j.push(I)}else{I.moveTo(b,w,false)}p+=f;g+=this.tileSize.w}while((p<=m.right+f*this.buffer)||e<H);u-=o;d+=this.tileSize.h}while((u>=m.bottom-o*this.buffer)||D<F);this.removeExcessTiles(D,e);this.spiralTileLoad()},getMaxExtent:function(){return this.maxExtent},spiralTileLoad:function(){var b=[];var j=["right","down","left","up"];var h=0;var a=-1;var o=OpenLayers.Util.indexOf(j,"right");var p=0;while(p<j.length){var m=h;var d=a;switch(j[o]){case"right":d++;break;case"down":m++;break;case"left":d--;break;case"up":m--;break}var g=null;if((m<this.grid.length)&&(m>=0)&&(d<this.grid[0].length)&&(d>=0)){g=this.grid[m][d]}if((g!=null)&&(!g.queued)){b.unshift(g);g.queued=true;p=0;h=m;a=d}else{o=(o+1)%4;p++}}for(var e=0,f=b.length;e<f;e++){var g=b[e];g.draw();g.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 e=this.map.getViewPortPxFromLayerPx(a);if(e.x>-this.tileSize.w*(b-1)){this.shiftColumn(true)}else{if(e.x<-this.tileSize.w*b){this.shiftColumn(false)}else{if(e.y>-this.tileSize.h*(b-1)){this.shiftRow(true)}else{if(e.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 g=b[d];var f=this.map.getResolution();var j=(r)?-this.tileSize.h:this.tileSize.h;var h=f*-j;var q=(r)?b.pop():b.shift();for(var m=0,p=g.length;m<p;m++){var e=g[m];var a=e.bounds.clone();var o=e.position.clone();a.bottom=a.bottom+h;a.top=a.top+h;o.y=o.y+j;q[m].moveTo(a,o)}if(r){b.unshift(q)}else{b.push(q)}},shiftColumn:function(q){var e=(q)?-this.tileSize.w:this.tileSize.w;var d=this.map.getResolution();var o=d*e;for(var f=0,h=this.grid.length;f<h;f++){var p=this.grid[f];var m=(q)?0:(p.length-1);var b=p[m];var a=b.bounds.clone();var g=b.position.clone();a.left=a.left+o;a.right=a.right+o;g.x=g.x+e;var j=q?this.grid[f].pop():this.grid[f].shift();j.moveTo(a,g);if(q){p.unshift(j)}else{p.push(j)}}},removeExcessTiles:function(f,d){while(this.grid.length>f){var g=this.grid.pop();for(var b=0,a=g.length;b<a;b++){var e=g[b];this.removeTileMonitoringHooks(e);e.destroy()}}while(this.grid[0].length>d){for(var b=0,a=this.grid.length;b<a;b++){var g=this.grid[b];var e=g.pop();this.removeTileMonitoringHooks(e);e.destroy()}}},onMapResize:function(){if(this.singleTile){this.clearGrid();this.setTileSize()}},getTileBounds:function(e){var d=this.maxExtent;var g=this.getResolution();var f=g*this.tileSize.w;var b=g*this.tileSize.h;var j=this.getLonLatFromViewPortPx(e);var a=d.left+(f*Math.floor((j.lon-d.left)/f));var h=d.bottom+(b*Math.floor((j.lat-d.bottom)/b));return new OpenLayers.Bounds(a,h,a+f,h+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(e,d){var a;if(this.sphericalMercator){var b=this.inverseMercator(e,d);a=new MMLatLon(b.lat,b.lon)}else{a=new MMLatLon(d,e)}return a},getXFromMapObjectPixel:function(a){return a.x},getYFromMapObjectPixel:function(a){return a.y},getMapObjectPixelFromXY:function(a,b){return new MMPoint(a,b)},CLASS_NAME:"OpenLayers.Layer.MultiMap"});OpenLayers.Layer.VirtualEarth=OpenLayers.Class(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:1,MAX_ZOOM_LEVEL:19,RESOLUTIONS:[1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125,0.00002145767211914062,0.00001072883605957031,0.00000536441802978515],type:null,wrapDateLine:true,sphericalMercator:false,animationEnabled:true,initialize:function(b,a){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);if(this.sphericalMercator){OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator);this.initMercatorParameters()}},loadMapObject:function(){var a=OpenLayers.Util.createDiv(this.name);var 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(typeof this.mapObject.SetAnimationEnabled=="function"){this.mapObject.SetAnimationEnabled(this.animationEnabled)}}if(!this.mapObject||!this.mapObject.vemapcontrol||!this.mapObject.vemapcontrol.PanMap||(typeof this.mapObject.vemapcontrol.PanMap!="function")){this.dragPanMapObject=null}},onMapResize:function(){this.mapObject.Resize(this.map.size.w,this.map.size.h)},getWarningHTML:function(){return OpenLayers.i18n("getLayerWarning",{layerType:"VE",layerLib:"VirtualEarth"})},setMapObjectCenter:function(a,b){this.mapObject.SetCenterAndZoom(a,b)},getMapObjectCenter:function(){return this.mapObject.GetCenter()},dragPanMapObject:function(b,a){this.mapObject.vemapcontrol.PanMap(b,-a)},getMapObjectZoom:function(){return this.mapObject.GetZoomLevel()},getMapObjectLonLatFromMapObjectPixel:function(a){return(typeof VEPixel!="undefined")?this.mapObject.PixelToLatLong(a):this.mapObject.PixelToLatLong(a.x,a.y)},getMapObjectPixelFromMapObjectLonLat:function(a){return this.mapObject.LatLongToPixel(a)},getLongitudeFromMapObjectLonLat:function(a){return this.sphericalMercator?this.forwardMercator(a.Longitude,a.Latitude).lon:a.Longitude},getLatitudeFromMapObjectLonLat:function(a){return this.sphericalMercator?this.forwardMercator(a.Longitude,a.Latitude).lat:a.Latitude},getMapObjectLonLatFromLonLat:function(e,b){var d;if(this.sphericalMercator){var a=this.inverseMercator(e,b);d=new VELatLong(a.lat,a.lon)}else{d=new VELatLong(b,e)}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,wrapDateLine:true,sphericalMercator:false,initialize:function(b,a){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);if(this.sphericalMercator){OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator);this.initMercatorParameters()}},loadMapObject:function(){try{var a=this.getMapObjectSizeFromOLSize(this.map.getSize());this.mapObject=new YMap(this.div,this.type,a);this.mapObject.disableKeyControls();this.mapObject.disableDragMap();if(!this.mapObject.moveByXY||(typeof this.mapObject.moveByXY!="function")){this.dragPanMapObject=null}}catch(b){}},onMapResize:function(){try{var a=this.getMapObjectSizeFromOLSize(this.map.getSize());this.mapObject.resizeTo(a)}catch(b){}},setMap:function(a){OpenLayers.Layer.EventPane.prototype.setMap.apply(this,arguments);this.map.events.register("moveend",this,this.fixYahooEventPane)},fixYahooEventPane:function(){var a=OpenLayers.Util.getElement("ygddfdiv");if(a!=null){if(a.parentNode!=null){a.parentNode.removeChild(a)}this.map.events.unregister("moveend",this,this.fixYahooEventPane)}},getWarningHTML:function(){return OpenLayers.i18n("getLayerWarning",{layerType:"Yahoo",layerLib:"Yahoo"})},getOLZoomFromMapObjectZoom:function(a){var b=null;if(a!=null){b=OpenLayers.Layer.FixedZoomLevels.prototype.getOLZoomFromMapObjectZoom.apply(this,[a]);b=18-b}return b},getMapObjectZoomFromOLZoom:function(a){var b=null;if(a!=null){b=OpenLayers.Layer.FixedZoomLevels.prototype.getMapObjectZoomFromOLZoom.apply(this,[a]);b=18-b}return b},setMapObjectCenter:function(a,b){this.mapObject.drawZoomAndCenter(a,b)},getMapObjectCenter:function(){return this.mapObject.getCenterLatLon()},dragPanMapObject:function(b,a){this.mapObject.moveByXY({x:-b,y:a})},getMapObjectZoom:function(){return this.mapObject.getZoomLevel()},getMapObjectLonLatFromMapObjectPixel:function(a){return this.mapObject.convertXYLatLon(a)},getMapObjectPixelFromMapObjectLonLat:function(a){return this.mapObject.convertLatLonXY(a)},getLongitudeFromMapObjectLonLat:function(a){return this.sphericalMercator?this.forwardMercator(a.Lon,a.Lat).lon:a.Lon},getLatitudeFromMapObjectLonLat:function(a){return this.sphericalMercator?this.forwardMercator(a.Lon,a.Lat).lat:a.Lat},getMapObjectLonLatFromLonLat:function(e,d){var a;if(this.sphericalMercator){var b=this.inverseMercator(e,d);a=new YGeoPoint(b.lat,b.lon)}else{a=new YGeoPoint(d,e)}return a},getXFromMapObjectPixel:function(a){return a.x},getYFromMapObjectPixel:function(a){return a.y},getMapObjectPixelFromXY:function(a,b){return new YCoordPoint(a,b)},getMapObjectSizeFromOLSize:function(a){return new YSize(a.w,a.h)},CLASS_NAME:"OpenLayers.Layer.Yahoo"});OpenLayers.Style=OpenLayers.Class({id:null,name:null,title:null,description:null,layerName:null,isDefault:false,rules:null,context:null,defaultStyle:null,defaultsPerSymbolizer:false,propertyStyles:null,initialize:function(b,a){OpenLayers.Util.extend(this,a);this.rules=[];if(a&&a.rules){this.addRules(a.rules)}this.setDefaultStyle(b||OpenLayers.Feature.Vector.style["default"]);this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")},destroy:function(){for(var b=0,a=this.rules.length;b<a;b++){this.rules[b].destroy();this.rules[b]=null}this.rules=null;this.defaultStyle=null},createSymbolizer:function(o){var a=this.defaultsPerSymbolizer?{}:this.createLiterals(OpenLayers.Util.extend({},this.defaultStyle),o);var m=this.rules;var j,b;var d=[];var g=false;for(var e=0,f=m.length;e<f;e++){j=m[e];var h=j.evaluate(o);if(h){if(j instanceof OpenLayers.Rule&&j.elseFilter){d.push(j)}else{g=true;this.applySymbolizer(j,a,o)}}}if(g==false&&d.length>0){g=true;for(var e=0,f=d.length;e<f;e++){this.applySymbolizer(d[e],a,o)}}if(m.length>0&&g==false){a.display="none"}return a},applySymbolizer:function(g,e,b){var a=b.geometry?this.getSymbolizerPrefix(b.geometry):OpenLayers.Style.SYMBOLIZER_PREFIXES[0];var d=g.symbolizer[a]||g.symbolizer;if(this.defaultsPerSymbolizer===true){var f=this.defaultStyle;OpenLayers.Util.applyDefaults(d,{pointRadius:f.pointRadius});if(d.stroke===true||d.graphic===true){OpenLayers.Util.applyDefaults(d,{strokeWidth:f.strokeWidth,strokeColor:f.strokeColor,strokeOpacity:f.strokeOpacity,strokeDashstyle:f.strokeDashstyle,strokeLinecap:f.strokeLinecap})}if(d.fill===true||d.graphic===true){OpenLayers.Util.applyDefaults(d,{fillColor:f.fillColor,fillOpacity:f.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(e,d),b)},createLiterals:function(e,d){var b=OpenLayers.Util.extend({},d.attributes||d.data);OpenLayers.Util.extend(b,this.context);for(var a in this.propertyStyles){e[a]=OpenLayers.Style.createLiteral(e[a],b,d,a)}return e},findPropertyStyles:function(){var e={};var g=this.defaultStyle;this.addPropertyStyles(e,g);var j=this.rules;var f,h;for(var d=0,a=j.length;d<a;d++){f=j[d].symbolizer;for(var b in f){h=f[b];if(typeof h=="object"){this.addPropertyStyles(e,h)}else{this.addPropertyStyles(e,f);break}}}return e},addPropertyStyles:function(b,d){var e;for(var a in d){e=d[a];if(typeof e=="string"&&e.match(/\$\{\w+\}/)){b[a]=true}}return b},addRules:function(a){Array.prototype.push.apply(this.rules,a);this.propertyStyles=this.findPropertyStyles()},setDefaultStyle:function(a){this.defaultStyle=a;this.propertyStyles=this.findPropertyStyles()},getSymbolizerPrefix:function(e){var d=OpenLayers.Style.SYMBOLIZER_PREFIXES;for(var b=0,a=d.length;b<a;b++){if(e.CLASS_NAME.indexOf(d[b])!=-1){return d[b]}}},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 e=OpenLayers.Util.extend({},this.defaultStyle);return new OpenLayers.Style(e,b)},CLASS_NAME:"OpenLayers.Style"});OpenLayers.Style.createLiteral=function(e,b,a,d){if(typeof e=="string"&&e.indexOf("${")!=-1){e=OpenLayers.String.format(e,b,[a,d]);e=(isNaN(e)||!e)?e:parseFloat(e)}return e};OpenLayers.Style.SYMBOLIZER_PREFIXES=["Point","Line","Polygon","Text","Raster"];OpenLayers.Control.Navigation=OpenLayers.Class(OpenLayers.Control,{dragPan:null,dragPanOptions:null,documentDrag:false,zoomBox:null,zoomBoxEnabled:true,zoomWheelEnabled:true,mouseWheelOptions:null,handleRightClicks:false,zoomBoxKeyMask:OpenLayers.Handler.MOD_SHIFT,autoActivate:true,initialize:function(a){this.handlers={};OpenLayers.Control.prototype.initialize.apply(this,arguments)},destroy:function(){this.deactivate();if(this.dragPan){this.dragPan.destroy()}this.dragPan=null;if(this.zoomBox){this.zoomBox.destroy()}this.zoomBox=null;OpenLayers.Control.prototype.destroy.apply(this,arguments)},activate:function(){this.dragPan.activate();if(this.zoomWheelEnabled){this.handlers.wheel.activate()}this.handlers.click.activate();if(this.zoomBoxEnabled){this.zoomBox.activate()}return OpenLayers.Control.prototype.activate.apply(this,arguments)},deactivate:function(){this.zoomBox.deactivate();this.dragPan.deactivate();this.handlers.click.deactivate();this.handlers.wheel.deactivate();return OpenLayers.Control.prototype.deactivate.apply(this,arguments)},draw:function(){if(this.handleRightClicks){this.map.viewPortDiv.oncontextmenu=OpenLayers.Function.False}var a={dblclick:this.defaultDblClick,dblrightclick:this.defaultDblRightClick};var b={"double":true,stopDouble:true};this.handlers.click=new OpenLayers.Handler.Click(this,a,b);this.dragPan=new OpenLayers.Control.DragPan(OpenLayers.Util.extend({map:this.map,documentDrag:this.documentDrag},this.dragPanOptions));this.zoomBox=new OpenLayers.Control.ZoomBox({map:this.map,keyMask:this.zoomBoxKeyMask});this.dragPan.draw();this.zoomBox.draw();this.handlers.wheel=new OpenLayers.Handler.MouseWheel(this,{up:this.wheelUp,down:this.wheelDown},this.mouseWheelOptions)},defaultDblClick:function(b){var a=this.map.getLonLatFromViewPortPx(b.xy);this.map.setCenter(a,this.map.zoom+1)},defaultDblRightClick:function(b){var a=this.map.getLonLatFromViewPortPx(b.xy);this.map.setCenter(a,this.map.zoom-1)},wheelChange:function(m,d){var j=this.map.getZoom();var g=this.map.getZoom()+Math.round(d);g=Math.max(g,0);g=Math.min(g,this.map.getNumZoomLevels());if(g===j){return}var o=this.map.getSize();var f=o.w/2-m.xy.x;var e=m.xy.y-o.h/2;var h=this.map.baseLayer.getResolutionForZoom(g);var a=this.map.getLonLatFromPixel(m.xy);var b=new OpenLayers.LonLat(a.lon+f*h,a.lat+e*h);this.map.setCenter(b,g)},wheelUp:function(a,b){this.wheelChange(a,b||1)},wheelDown:function(a,b){this.wheelChange(a,b||-1)},disableZoomBox:function(){this.zoomBoxEnabled=false;this.zoomBox.deactivate()},enableZoomBox:function(){this.zoomBoxEnabled=true;if(this.active){this.zoomBox.activate()}},disableZoomWheel:function(){this.zoomWheelEnabled=false;this.handlers.wheel.deactivate()},enableZoomWheel:function(){this.zoomWheelEnabled=true;if(this.active){this.handlers.wheel.activate()}},CLASS_NAME:"OpenLayers.Control.Navigation"});OpenLayers.Filter=OpenLayers.Class({initialize:function(a){OpenLayers.Util.extend(this,a)},destroy:function(){},evaluate:function(a){return true},clone:function(){return null},CLASS_NAME:"OpenLayers.Filter"});OpenLayers.Format.WMC.v1_0_0=OpenLayers.Class(OpenLayers.Format.WMC.v1,{VERSION:"1.0.0",schemaLocation:"http://www.opengis.net/context http://schemas.opengis.net/context/1.0.0/context.xsd",initialize:function(a){OpenLayers.Format.WMC.v1.prototype.initialize.apply(this,[a])},write_wmc_Layer:function(a){var b=OpenLayers.Format.WMC.v1.prototype.write_wmc_Layer.apply(this,[a]);b.appendChild(this.write_wmc_FormatList(a));b.appendChild(this.write_wmc_StyleList(a));b.appendChild(this.write_wmc_LayerExtension(a))},CLASS_NAME:"OpenLayers.Format.WMC.v1_0_0"});OpenLayers.Format.WMC.v1_1_0=OpenLayers.Class(OpenLayers.Format.WMC.v1,{VERSION:"1.1.0",schemaLocation:"http://www.opengis.net/context http://schemas.opengis.net/context/1.1.0/context.xsd",initialize:function(a){OpenLayers.Format.WMC.v1.prototype.initialize.apply(this,[a])},read_sld_MinScaleDenominator:function(d,b){var a=parseFloat(this.getChildValue(b));if(a>0){d.maxScale=a}},read_sld_MaxScaleDenominator:function(b,a){b.minScale=parseFloat(this.getChildValue(a))},write_wmc_Layer:function(b){var d=OpenLayers.Format.WMC.v1.prototype.write_wmc_Layer.apply(this,[b]);if(b.maxScale){var e=this.createElementNS(this.namespaces.sld,"sld:MinScaleDenominator");e.appendChild(this.createTextNode(b.maxScale.toPrecision(16)));d.appendChild(e)}if(b.minScale){var a=this.createElementNS(this.namespaces.sld,"sld:MaxScaleDenominator");a.appendChild(this.createTextNode(b.minScale.toPrecision(16)));d.appendChild(a)}d.appendChild(this.write_wmc_FormatList(b));d.appendChild(this.write_wmc_StyleList(b));d.appendChild(this.write_wmc_LayerExtension(b));return d},CLASS_NAME:"OpenLayers.Format.WMC.v1_1_0"});OpenLayers.Format.WMSCapabilities.v1_1_0=OpenLayers.Class(OpenLayers.Format.WMSCapabilities.v1_1,{version:"1.1.0",initialize:function(a){OpenLayers.Format.WMSCapabilities.v1_1.prototype.initialize.apply(this,[a])},readers:{wms:OpenLayers.Util.applyDefaults({SRS:function(f,g){var e=this.getChildValue(f);var b=e.split(/ +/);for(var d=0,a=b.length;d<a;d++){g.srs[b[d]]=true}}},OpenLayers.Format.WMSCapabilities.v1_1.prototype.readers.wms)},CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1_1_0"});OpenLayers.Format.WMSCapabilities.v1_1_1=OpenLayers.Class(OpenLayers.Format.WMSCapabilities.v1_1,{version:"1.1.1",initialize:function(a){OpenLayers.Format.WMSCapabilities.v1_1.prototype.initialize.apply(this,[a])},readers:{wms:OpenLayers.Util.applyDefaults({SRS:function(a,b){b.srs[this.getChildValue(a)]=true}},OpenLayers.Format.WMSCapabilities.v1_1.prototype.readers.wms)},CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1_1_1"});OpenLayers.Format.WMSCapabilities.v1_3_0=OpenLayers.Class(OpenLayers.Format.WMSCapabilities.v1_3,{version:"1.3.0",CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1_3_0"});OpenLayers.Geometry=OpenLayers.Class({id:null,parent:null,bounds:null,initialize:function(){this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")},destroy:function(){this.id=null;this.bounds=null},clone:function(){return new OpenLayers.Geometry()},setBounds:function(a){if(a){this.bounds=a.clone()}},clearBounds:function(){this.bounds=null;if(this.parent){this.parent.clearBounds()}},extendBounds:function(b){var a=this.getBounds();if(!a){this.setBounds(b)}else{this.bounds.extend(b)}},getBounds:function(){if(this.bounds==null){this.calculateBounds()}return this.bounds},calculateBounds:function(){},distanceTo:function(b,a){},getVertices:function(a){},atPoint:function(f,j,g){var d=false;var e=this.getBounds();if((e!=null)&&(f!=null)){var b=(j!=null)?j:0;var a=(g!=null)?g:0;var h=new OpenLayers.Bounds(this.bounds.left-b,this.bounds.bottom-a,this.bounds.right+b,this.bounds.top+a);d=h.containsLonLat(f)}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(g){var h=arguments.callee.format;if(!h){h=new OpenLayers.Format.WKT();arguments.callee.format=h}var e;var b=h.read(g);if(b instanceof OpenLayers.Feature.Vector){e=b.geometry}else{if(b instanceof Array){var a=b.length;var f=new Array(a);for(var d=0;d<a;++d){f[d]=b[d].geometry}e=new OpenLayers.Geometry.Collection(f)}}return e};OpenLayers.Geometry.segmentsIntersect=function(a,O,b){var B=b&&b.point;var G=b&&b.tolerance;var g=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 f=(q*M)-(C*I);var e=(v*M)-(F*I);if(K==0){if(f==0&&e==0){g=true}}else{var L=f/K;var J=e/K;if(L>=0&&L<=1&&J>=0&&J<=1){if(!B){g=true}else{var m=a.x1+(L*v);var h=a.y1+(L*F);g=new OpenLayers.Geometry.Point(m,h)}}}if(G){var z;if(g){if(B){var u=[a,O];var H,m,h;outer:for(var E=0;E<2;++E){H=u[E];for(var D=1;D<3;++D){m=H["x"+D];h=H["y"+D];z=Math.sqrt(Math.pow(m-g.x,2)+Math.pow(h-g.y,2));if(z<G){g.x=m;g.y=h;break outer}}}}}else{var u=[a,O];var w,N,m,h,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){g=new OpenLayers.Geometry.Point(r.x,r.y)}else{g=true}break outer}}}}}return g};OpenLayers.Geometry.distanceToSegment=function(p,e){var d=p.x;var o=p.y;var b=e.x1;var m=e.y1;var a=e.x2;var g=e.y2;var r=a-b;var q=g-m;var j=((r*(d-b))+(q*(o-m)))/(Math.pow(r,2)+Math.pow(q,2));var h,f;if(j<=0){h=b;f=m}else{if(j>=1){h=a;f=g}else{h=b+j*r;f=m+j*q}}return{distance:Math.sqrt(Math.pow(h-d,2)+Math.pow(f-o,2)),x:h,y:f}};OpenLayers.Layer.ArcGIS93Rest=OpenLayers.Class(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{format:"png"},isBaseLayer:true,initialize:function(e,d,f,b){var a=[];f=OpenLayers.Util.upperCaseObject(f);a.push(e,d,f,b);OpenLayers.Layer.Grid.prototype.initialize.apply(this,a);OpenLayers.Util.applyDefaults(this.params,OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS));if(this.params.TRANSPARENT&&this.params.TRANSPARENT.toString().toLowerCase()=="true"){if((b==null)||(!b.isBaseLayer)){this.isBaseLayer=false}if(this.params.FORMAT=="jpg"){this.params.FORMAT=OpenLayers.Util.alphaHack()?"gif":"png"}}},destroy:function(){OpenLayers.Layer.Grid.prototype.destroy.apply(this,arguments)},clone:function(a){if(a==null){a=new OpenLayers.Layer.ArcGIS93Rest(this.name,this.url,this.params,this.getOptions())}a=OpenLayers.Layer.Grid.prototype.clone.apply(this,[a]);return a},getURL:function(f){f=this.adjustBounds(f);var e=this.projection.getCode().split(":");var d=e[e.length-1];var h=this.getImageSize();var j={BBOX:f.toBBOX(),SIZE:h.w+","+h.h,F:"image",BBOXSR:d,IMAGESR:d};if(this.layerDefs){var g=[];var a;for(a in this.layerDefs){if(this.layerDefs.hasOwnProperty(a)){if(this.layerDefs[a]){g.push(a);g.push(":");g.push(this.layerDefs[a]);g.push(";")}}}if(g.length>0){j.LAYERDEFS=g.join("")}}var b=this.getFullRequestString(j);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.Google.v3={DEFAULTS:{maxExtent:new OpenLayers.Bounds(-128*156543.0339,-128*156543.0339,128*156543.0339,128*156543.0339),sphericalMercator:true,maxResolution:156543.0339,units:"m",projection:"EPSG:900913"},loadMapObject:function(){if(!this.type){this.type=google.maps.MapTypeId.ROADMAP}var e;var d=OpenLayers.Layer.Google.cache[this.map.id];if(d){e=d.mapObject;++d.count}else{var b=this.map.viewPortDiv;var f=document.createElement("div");f.id=this.map.id+"_GMapContainer";f.style.position="absolute";f.style.width="100%";f.style.height="100%";b.appendChild(f);var a=this.map.getCenter();e=new google.maps.Map(f,{center:a?new google.maps.LatLng(a.lat,a.lon):new google.maps.LatLng(0,0),zoom:this.map.getZoom()||0,mapTypeId:this.type,disableDefaultUI:true,keyboardShortcuts:false,draggable:false,disableDoubleClickZoom:true,scrollwheel:false});d={mapObject:e,count:1};OpenLayers.Layer.Google.cache[this.map.id]=d;this.repositionListener=google.maps.event.addListenerOnce(e,"center_changed",OpenLayers.Function.bind(this.repositionMapElements,this))}this.mapObject=e;this.setGMapVisibility(this.visibility)},repositionMapElements:function(){google.maps.event.trigger(this.mapObject,"resize");var f=this.mapObject.getDiv().firstChild;if(!f||f.childNodes.length<3){this.repositionTimer=window.setTimeout(OpenLayers.Function.bind(this.repositionMapElements,this),250);return false}var e=OpenLayers.Layer.Google.cache[this.map.id];var b=this.map.viewPortDiv;var d=f.lastChild;b.appendChild(d);d.style.zIndex="1100";d.style.bottom="";d.className="olLayerGoogleCopyright olLayerGoogleV3";d.style.display="";e.termsOfUse=d;var a=f.lastChild;b.appendChild(a);a.style.zIndex="1100";a.style.bottom="";a.className="olLayerGooglePoweredBy olLayerGoogleV3 gmnoprint";a.style.display="";e.poweredBy=a;this.setGMapVisibility(this.visibility)},onMapResize:function(){if(this.visibility){google.maps.event.trigger(this.mapObject,"resize")}else{if(!this._resized){var a=this;google.maps.event.addListenerOnce(this.mapObject,"tilesloaded",function(){delete a._resized;google.maps.event.trigger(a.mapObject,"resize");a.moveTo(a.map.getCenter(),a.map.getZoom())})}this._resized=true}},setGMapVisibility:function(h){var b=OpenLayers.Layer.Google.cache[this.map.id];if(b){var f=this.type;var g=this.map.layers;var e;for(var d=g.length-1;d>=0;--d){e=g[d];if(e instanceof OpenLayers.Layer.Google&&e.visibility===true&&e.inRange===true){f=e.type;h=true;break}}var a=this.mapObject.getDiv();if(h===true){this.mapObject.setMapTypeId(f);a.style.left="";if(b.termsOfUse&&b.termsOfUse.style){b.termsOfUse.style.left="";b.termsOfUse.style.display="";b.poweredBy.style.display=""}b.displayed=this.id}else{delete b.displayed;a.style.left="-9999px";if(b.termsOfUse&&b.termsOfUse.style){b.termsOfUse.style.display="none";b.termsOfUse.style.left="-9999px";b.poweredBy.style.display="none"}}}},getMapContainer:function(){return this.mapObject.getDiv()},getMapObjectBoundsFromOLBounds:function(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 e=this.sphericalMercator?this.inverseMercator(d.top,d.right):new OpenLayers.LonLat(d.top,d.right);b=new google.maps.LatLngBounds(new google.maps.LatLng(a.lat,a.lon),new google.maps.LatLng(e.lat,e.lon))}return b},getMapObjectLonLatFromMapObjectPixel:function(j){var b=this.map.getSize();var g=this.getLongitudeFromMapObjectLonLat(this.mapObject.center);var e=this.getLatitudeFromMapObjectLonLat(this.mapObject.center);var a=this.map.getResolution();var h=j.x-(b.w/2);var f=j.y-(b.h/2);var d=new OpenLayers.LonLat(g+h*a,e-f*a);if(this.wrapDateLine){d=d.wrapDateLine(this.maxExtent)}return this.getMapObjectLonLatFromLonLat(d.lon,d.lat)},getMapObjectPixelFromMapObjectLonLat:function(g){var f=this.getLongitudeFromMapObjectLonLat(g);var e=this.getLatitudeFromMapObjectLonLat(g);var b=this.map.getResolution();var d=this.map.getExtent();var a=new OpenLayers.Pixel((1/b*(f-d.left)),(1/b*(d.top-e)));return this.getMapObjectPixelFromXY(a.x,a.y)},setMapObjectCenter:function(a,b){this.mapObject.setOptions({center:a,zoom:b})},getMapObjectZoomFromMapObjectBounds:function(a){return this.mapObject.getBoundsZoomLevel(a)},getMapObjectLonLatFromLonLat:function(e,b){var d;if(this.sphericalMercator){var a=this.inverseMercator(e,b);d=new google.maps.LatLng(a.lat,a.lon)}else{d=new google.maps.LatLng(b,e)}return d},getMapObjectPixelFromXY:function(a,b){return new google.maps.Point(a,b)},destroy:function(){if(this.repositionListener){google.maps.event.removeListener(this.repositionListener)}if(this.repositionTimer){window.clearTimeout(this.repositionTimer)}OpenLayers.Layer.Google.prototype.destroy.apply(this,arguments)}};OpenLayers.Layer.KaMap=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:true,units:null,resolution:OpenLayers.DOTS_PER_INCH,DEFAULT_PARAMS:{i:"jpeg",map:""},initialize:function(e,d,f,b){var a=[];a.push(e,d,f,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 e=this.map.getResolution();var f=Math.round((this.map.getScale()*10000))/10000;var b=Math.round(d.left/e);var a=-Math.round(d.top/e);return this.getFullRequestString({t:a,l:b,s:f})},addTile:function(d,a){var b=this.getURL(d);return new OpenLayers.Tile.Image(this,a,d,b,this.tileSize)},calculateGridLayout:function(a,v,f){var p=f*this.tileSize.w;var d=f*this.tileSize.h;var m=a.left;var q=Math.floor(m/p)-this.buffer;var o=m/p-q;var g=-o*this.tileSize.w;var r=q*p;var b=a.top;var j=Math.ceil(b/d)+this.buffer;var u=j-b/d;var e=-(u+1)*this.tileSize.h;var h=j*d;return{tilelon:p,tilelat:d,tileoffsetlon:r,tileoffsetlat:h,tileoffsetx:g,tileoffsety:e}},clone:function(a){if(a==null){a=new OpenLayers.Layer.KaMap(this.name,this.url,this.params,this.getOptions())}a=OpenLayers.Layer.Grid.prototype.clone.apply(this,[a]);if(this.tileSize!=null){a.tileSize=this.tileSize.clone()}a.grid=[];return a},getTileBounds:function(d){var f=this.getResolution();var e=f*this.tileSize.w;var b=f*this.tileSize.h;var h=this.getLonLatFromViewPortPx(d);var a=e*Math.floor(h.lon/e);var g=b*Math.floor(h.lat/b);return new OpenLayers.Bounds(a,g,a+e,g+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,e,a){OpenLayers.Layer.Grid.prototype.initialize.apply(this,arguments);if(a==null||a.isBaseLayer==null){this.isBaseLayer=((this.transparent!="true")&&(this.transparent!=true))}if(a&&a.useOverlay!=null){this.useOverlay=a.useOverlay}if(this.singleTile){if(this.useOverlay){OpenLayers.Util.applyDefaults(this.params,this.OVERLAY_PARAMS);if(!this.useAsyncOverlay){this.params.version="1.0.0"}}else{OpenLayers.Util.applyDefaults(this.params,this.SINGLE_TILE_PARAMS)}}else{if(this.useHttpTile){OpenLayers.Util.applyDefaults(this.params,this.FOLDER_PARAMS)}else{OpenLayers.Util.applyDefaults(this.params,this.TILE_PARAMS)}this.setTileSize(this.defaultSize)}},clone:function(a){if(a==null){a=new OpenLayers.Layer.MapGuide(this.name,this.url,this.params,this.getOptions())}a=OpenLayers.Layer.Grid.prototype.clone.apply(this,[a]);return a},addTile:function(b,a){return new OpenLayers.Tile.Image(this,a,b,null,this.tileSize)},getURL:function(a){var e;var b=a.getCenterLonLat();var j=this.map.getSize();if(this.singleTile){var f={setdisplaydpi:OpenLayers.DOTS_PER_INCH,setdisplayheight:j.h*this.ratio,setdisplaywidth:j.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,f);m.operation="GETVISIBLEMAPEXTENT";m.version="1.0.0";m.session=this.params.session;m.mapName=this.params.mapName;m.format="text/xml";e=this.getFullRequestString(m);OpenLayers.Request.GET({url:e,async:false})}e=this.getFullRequestString(f)}else{var h=this.map.getResolution();var g=Math.floor((a.left-this.maxExtent.left)/h);g=Math.round(g/this.tileSize.w);var d=Math.floor((this.maxExtent.top-a.top)/h);d=Math.round(d/this.tileSize.h);if(this.useHttpTile){e=this.getImageFilePath({tilecol:g,tilerow:d,scaleindex:this.resolutions.length-this.map.zoom-1})}else{e=this.getFullRequestString({tilecol:g,tilerow:d,scaleindex:this.resolutions.length-this.map.zoom-1})}}return e},getFullRequestString:function(g,f){var b=(f==null)?this.url:f;if(typeof b=="object"){b=b[Math.floor(Math.random()*b.length)]}var m=b;var h=OpenLayers.Util.extend({},this.params);h=OpenLayers.Util.extend(h,g);var e=OpenLayers.Util.upperCaseObject(OpenLayers.Util.getParameters(b));for(var j in h){if(j.toUpperCase() in e){delete h[j]}}var a=OpenLayers.Util.getParameterString(h);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(h,f){var d=(f==null)?this.url:f;if(typeof d=="object"){d=d[Math.floor(Math.random()*d.length)]}var b=d;var e="";var g="";if(h.tilerow<0){e="-"}if(h.tilerow==0){e+="0"}else{e+=Math.floor(Math.abs(h.tilerow/this.params.tileRowsPerFolder))*this.params.tileRowsPerFolder}if(h.tilecol<0){g="-"}if(h.tilecol==0){g+="0"}else{g+=Math.floor(Math.abs(h.tilecol/this.params.tileColumnsPerFolder))*this.params.tileColumnsPerFolder}var a="/S"+Math.floor(h.scaleindex)+"/"+this.params.basemaplayergroupname+"/R"+e+"/C"+g+"/"+(h.tilerow%this.params.tileRowsPerFolder)+"_"+(h.tilecol%this.params.tileColumnsPerFolder)+"."+this.params.format;if(this.params.querystring){a+="?"+this.params.querystring}b+=a;return b},calculateGridLayout:function(a,v,f){var p=f*this.tileSize.w;var d=f*this.tileSize.h;var m=a.left-v.left;var q=Math.floor(m/p)-this.buffer;var o=m/p-q;var g=-o*this.tileSize.w;var r=v.left+q*p;var b=v.top-a.top+d;var j=Math.floor(b/d)-this.buffer;var u=j-b/d;var e=u*this.tileSize.h;var h=v.top-d*j;return{tilelon:p,tilelat:d,tileoffsetlon:r,tileoffsetlat:h,tileoffsetx:g,tileoffsety:e}},CLASS_NAME:"OpenLayers.Layer.MapGuide"});OpenLayers.Layer.MapServer=OpenLayers.Class(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{mode:"map",map_imagetype:"png"},initialize:function(e,d,f,b){var a=[];a.push(e,d,f,b);OpenLayers.Layer.Grid.prototype.initialize.apply(this,a);this.params=OpenLayers.Util.applyDefaults(this.params,this.DEFAULT_PARAMS);if(b==null||b.isBaseLayer==null){this.isBaseLayer=((this.params.transparent!="true")&&(this.params.transparent!=true))}},clone:function(a){if(a==null){a=new OpenLayers.Layer.MapServer(this.name,this.url,this.params,this.getOptions())}a=OpenLayers.Layer.Grid.prototype.clone.apply(this,[a]);return a},addTile:function(b,a){return new OpenLayers.Tile.Image(this,a,b,null,this.tileSize)},getURL:function(d){d=this.adjustBounds(d);var b=[d.left,d.bottom,d.right,d.top];var e=this.getImageSize();var a=this.getFullRequestString({mapext:b,imgext:b,map_size:[e.w,e.h],imgx:e.w/2,imgy:e.h/2,imgxy:[e.w,e.h]});return a},getFullRequestString:function(g,f){var b=(f==null)?this.url:f;var h=OpenLayers.Util.extend({},this.params);h=OpenLayers.Util.extend(h,g);var a=OpenLayers.Util.getParameterString(h);if(b instanceof Array){b=this.selectUrl(a,b)}var e=OpenLayers.Util.upperCaseObject(OpenLayers.Util.getParameters(b));for(var j in h){if(j.toUpperCase() in e){delete h[j]}}a=OpenLayers.Util.getParameterString(h);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,zoomOffset:0,initialize:function(e,d,b){var a=[];a.push(e,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.getOptions())}a=OpenLayers.Layer.Grid.prototype.clone.apply(this,[a]);return a},getURL:function(e){e=this.adjustBounds(e);var d=this.map.getResolution();var a=Math.round((e.left-this.tileOrigin.lon)/(d*this.tileSize.w));var h=Math.round((e.bottom-this.tileOrigin.lat)/(d*this.tileSize.h));var g=this.serverResolutions!=null?OpenLayers.Util.indexOf(this.serverResolutions,d):this.map.getZoom()+this.zoomOffset;var f=this.serviceVersion+"/"+this.layername+"/"+g+"/"+a+"/"+h+"."+this.type;var b=this.url;if(b instanceof Array){b=this.selectUrl(f,b)}return b+f},addTile:function(b,a){return new OpenLayers.Tile.Image(this,a,b,null,this.tileSize)},setMap:function(a){OpenLayers.Layer.Grid.prototype.setMap.apply(this,arguments);if(!this.tileOrigin){this.tileOrigin=new OpenLayers.LonLat(this.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,e,a){this.layername=e;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.getOptions())}a=OpenLayers.Layer.Grid.prototype.clone.apply(this,[a]);return a},getURL:function(b){var g=this.map.getResolution();var h=this.maxExtent;var p=this.tileSize;var a=Math.round((b.left-h.left)/(g*p.w));var o=Math.round((b.bottom-h.bottom)/(g*p.h));var j=this.serverResolutions!=null?OpenLayers.Util.indexOf(this.serverResolutions,g):this.map.getZoom();function f(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 e=[this.layername,f(j,2),f(parseInt(a/1000000),3),f((parseInt(a/1000)%1000),3),f((parseInt(a)%1000),3),f(parseInt(o/1000000),3),f((parseInt(o/1000)%1000),3),f((parseInt(o)%1000),3)+"."+this.extension];var m=e.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,yx:{"EPSG:4326":true},initialize:function(e,d,f,b){var a=[];f=OpenLayers.Util.upperCaseObject(f);if(parseFloat(f.VERSION)>=1.3&&!f.EXCEPTIONS){f.EXCEPTIONS="INIMAGE"}a.push(e,d,f,b);OpenLayers.Layer.Grid.prototype.initialize.apply(this,a);OpenLayers.Util.applyDefaults(this.params,OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS));if(!this.noMagic&&this.params.TRANSPARENT&&this.params.TRANSPARENT.toString().toLowerCase()=="true"){if((b==null)||(!b.isBaseLayer)){this.isBaseLayer=false}if(this.params.FORMAT=="image/jpeg"){this.params.FORMAT=OpenLayers.Util.alphaHack()?"image/gif":"image/png"}}},destroy:function(){OpenLayers.Layer.Grid.prototype.destroy.apply(this,arguments)},clone:function(a){if(a==null){a=new OpenLayers.Layer.WMS(this.name,this.url,this.params,this.getOptions())}a=OpenLayers.Layer.Grid.prototype.clone.apply(this,[a]);return a},reverseAxisOrder:function(){return(parseFloat(this.params.VERSION)>=1.3&&!!this.yx[this.map.getProjectionObject().getCode()])},getURL:function(d){d=this.adjustBounds(d);var e=this.getImageSize();var f={};var b=this.reverseAxisOrder();f.BBOX=this.encodeBBOX?d.toBBOX(null,b):d.toArray(b);f.WIDTH=e.w;f.HEIGHT=e.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(e,b){var a=this.map.getProjection();var d=(a=="none")?null:a;if(parseFloat(this.params.VERSION)>=1.3){this.params.CRS=d}else{this.params.SRS=d}return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,arguments)},CLASS_NAME:"OpenLayers.Layer.WMS"});OpenLayers.Layer.WMTS=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:true,version:"1.0.0",requestEncoding:"KVP",url:null,layer:null,matrixSet:null,style:null,format:"image/jpeg",tileOrigin:null,tileFullExtent:null,formatSuffix:null,matrixIds:null,dimensions:null,params:null,zoomOffset:0,formatSuffixMap:{"image/png":"png","image/png8":"png","image/png24":"png","image/png32":"png",png:"png","image/jpeg":"jpg","image/jpg":"jpg",jpeg:"jpg",jpg:"jpg"},matrix:null,initialize:function(d){var g={url:true,layer:true,style:true,matrixSet:true};for(var h in g){if(!(h in d)){throw new Error("Missing property '"+h+"' in layer configuration.")}}d.params=OpenLayers.Util.upperCaseObject(d.params);var b=[d.name,d.url,d.params,d];OpenLayers.Layer.Grid.prototype.initialize.apply(this,b);if(!this.formatSuffix){this.formatSuffix=this.formatSuffixMap[this.format]||this.format.split("/").pop()}if(this.matrixIds){var a=this.matrixIds.length;if(a&&typeof this.matrixIds[0]==="string"){var f=this.matrixIds;this.matrixIds=new Array(a);for(var e=0;e<a;++e){this.matrixIds[e]={identifier:f[e]}}}}},setMap:function(){OpenLayers.Layer.Grid.prototype.setMap.apply(this,arguments);this.updateMatrixProperties()},updateMatrixProperties:function(){this.matrix=this.getMatrix();if(this.matrix){if(this.matrix.topLeftCorner){this.tileOrigin=this.matrix.topLeftCorner}if(this.matrix.tileWidth&&this.matrix.tileHeight){this.tileSize=new OpenLayers.Size(this.matrix.tileWidth,this.matrix.tileHeight)}if(!this.tileOrigin){this.tileOrigin=new OpenLayers.LonLat(this.maxExtent.left,this.maxExtent.top)}if(!this.tileFullExtent){this.tileFullExtent=this.maxExtent}}},moveTo:function(b,a,d){if(a||!this.matrix){this.updateMatrixProperties()}return OpenLayers.Layer.Grid.prototype.moveTo.apply(this,arguments)},clone:function(a){if(a==null){a=new OpenLayers.Layer.WMTS(this.options)}a=OpenLayers.Layer.Grid.prototype.clone.apply(this,[a]);return a},getMatrix:function(){var b;if(!this.matrixIds||this.matrixIds.length===0){b={identifier:this.map.getZoom()+this.zoomOffset}}else{if("scaleDenominator" in this.matrixIds[0]){var a=OpenLayers.METERS_PER_INCH*OpenLayers.INCHES_PER_UNIT[this.units]*this.map.getResolution()/0.00028;var f=Number.POSITIVE_INFINITY;var g;for(var d=0,e=this.matrixIds.length;d<e;++d){g=Math.abs(1-(this.matrixIds[d].scaleDenominator/a));if(g<f){f=g;b=this.matrixIds[d]}}}else{b=this.matrixIds[this.map.getZoom()+this.zoomOffset]}}return b},getTileInfo:function(g){var b=this.map.getResolution();var e=(g.lon-this.tileOrigin.lon)/(b*this.tileSize.w);var d=(this.tileOrigin.lat-g.lat)/(b*this.tileSize.h);var a=Math.floor(e);var f=Math.floor(d);return{col:a,row:f,i:Math.floor((e-a)*this.tileSize.w),j:Math.floor((d-f)*this.tileSize.h)}},getURL:function(e){e=this.adjustBounds(e);var b="";if(!this.tileFullExtent||this.tileFullExtent.intersectsBounds(e)){var a=e.getCenterLonLat();var g=this.getTileInfo(a);var j=this.matrix.identifier;if(this.requestEncoding.toUpperCase()==="REST"){var f=this.version+"/"+this.layer+"/"+this.style+"/";if(this.dimensions){for(var d=0;d<this.dimensions.length;d++){if(this.params[this.dimensions[d]]){f=f+this.params[this.dimensions[d]]+"/"}}}f=f+this.matrixSet+"/"+this.matrix.identifier+"/"+g.row+"/"+g.col+"."+this.formatSuffix;if(this.url instanceof Array){b=this.selectUrl(f,this.url)}else{b=this.url}if(!b.match(/\/$/)){b=b+"/"}b=b+f}else{if(this.requestEncoding.toUpperCase()==="KVP"){var h={SERVICE:"WMTS",REQUEST:"GetTile",VERSION:this.version,LAYER:this.layer,STYLE:this.style,TILEMATRIXSET:this.matrixSet,TILEMATRIX:this.matrix.identifier,TILEROW:g.row,TILECOL:g.col,FORMAT:this.format};b=OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,[h])}}}return b},mergeNewParams:function(a){if(this.requestEncoding.toUpperCase()==="KVP"){return OpenLayers.Layer.Grid.prototype.mergeNewParams.apply(this,[OpenLayers.Util.upperCaseObject(a)])}},addTile:function(b,a){return new OpenLayers.Tile.Image(this,a,b,null,this.tileSize)},CLASS_NAME:"OpenLayers.Layer.WMTS"});OpenLayers.Layer.WorldWind=OpenLayers.Class(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{},isBaseLayer:true,lzd:null,zoomLevels:null,initialize:function(e,d,f,h,g,b){this.lzd=f;this.zoomLevels=h;var a=[];a.push(e,d,g,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(f){f=this.adjustBounds(f);var e=this.getZoom();var b=this.map.getMaxExtent();var d=this.lzd/Math.pow(2,this.getZoom());var a=Math.floor((f.left-b.left)/d);var g=Math.floor((f.bottom-b.bottom)/d);if(this.map.getResolution()<=(this.lzd/512)&&this.getZoom()<=this.zoomLevels){return this.getFullRequestString({L:e,X:a,Y:g})}else{return OpenLayers.Util.getImagesLocation()+"blank.gif"}},CLASS_NAME:"OpenLayers.Layer.WorldWind"});OpenLayers.Layer.XYZ=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:true,sphericalMercator:false,zoomOffset:0,initialize:function(e,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;e=e||this.name;var a=[e,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.getOptions())}a=OpenLayers.Layer.Grid.prototype.clone.apply(this,[a]);return a},getURL:function(f){var d=this.map.getResolution();var a=Math.round((f.left-this.maxExtent.left)/(d*this.tileSize.w));var j=Math.round((this.maxExtent.top-f.top)/(d*this.tileSize.h));var h=this.map.getZoom()+this.zoomOffset;var b=this.url;var e=""+a+j+h;if(b instanceof Array){b=this.selectUrl(e,b)}var g=OpenLayers.String.format(b,{x:a,y:j,z:h});return 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.maxExtent.left,this.maxExtent.bottom)}},CLASS_NAME:"OpenLayers.Layer.XYZ"});OpenLayers.Layer.OSM=OpenLayers.Class(OpenLayers.Layer.XYZ,{name:"OpenStreetMap",attribution:"Data CC-By-SA by <a href='http://openstreetmap.org/'>OpenStreetMap</a>",sphericalMercator:true,url:"http://tile.openstreetmap.org/${z}/${x}/${y}.png",clone:function(a){if(a==null){a=new OpenLayers.Layer.OSM(this.name,this.url,this.getOptions())}a=OpenLayers.Layer.XYZ.prototype.clone.apply(this,[a]);return a},CLASS_NAME:"OpenLayers.Layer.OSM"});OpenLayers.Layer.Zoomify=OpenLayers.Class(OpenLayers.Layer.Grid,{url:null,size:null,isBaseLayer:true,standardTileSize:256,numberOfTiers:0,tileCountUpToTier:new Array(),tierSizeInTiles:new Array(),tierImageSize:new Array(),initialize:function(e,d,f,b){this.initializeZoomify(f);var a=[];a.push(e,d,f,{},b);OpenLayers.Layer.Grid.prototype.initialize.apply(this,a)},initializeZoomify:function(d){var e=d.clone();var a=new OpenLayers.Size(Math.ceil(e.w/this.standardTileSize),Math.ceil(e.h/this.standardTileSize));this.tierSizeInTiles.push(a);this.tierImageSize.push(e);while(e.w>this.standardTileSize||e.h>this.standardTileSize){e=new OpenLayers.Size(Math.floor(e.w/2),Math.floor(e.h/2));a=new OpenLayers.Size(Math.ceil(e.w/this.standardTileSize),Math.ceil(e.h/this.standardTileSize));this.tierSizeInTiles.push(a);this.tierImageSize.push(e)}this.tierSizeInTiles.reverse();this.tierImageSize.reverse();this.numberOfTiers=this.tierSizeInTiles.length;this.tileCountUpToTier[0]=0;for(var b=1;b<this.numberOfTiers;b++){this.tileCountUpToTier.push(this.tierSizeInTiles[b-1].w*this.tierSizeInTiles[b-1].h+this.tileCountUpToTier[b-1])}},destroy:function(){OpenLayers.Layer.Grid.prototype.destroy.apply(this,arguments);this.tileCountUpToTier.length=0;this.tierSizeInTiles.length=0;this.tierImageSize.length=0},clone:function(a){if(a==null){a=new OpenLayers.Layer.Zoomify(this.name,this.url,this.size,this.options)}a=OpenLayers.Layer.Grid.prototype.clone.apply(this,[a]);return a},getURL:function(e){e=this.adjustBounds(e);var d=this.map.getResolution();var a=Math.round((e.left-this.tileOrigin.lon)/(d*this.tileSize.w));var j=Math.round((this.tileOrigin.lat-e.top)/(d*this.tileSize.h));var h=this.map.getZoom();var g=a+j*this.tierSizeInTiles[h].w+this.tileCountUpToTier[h];var f="TileGroup"+Math.floor((g)/256)+"/"+h+"-"+a+"-"+j+".jpg";var b=this.url;if(b instanceof Array){b=this.selectUrl(f,b)}return b+f},getImageSize:function(){if(arguments.length>0){bounds=this.adjustBounds(arguments[0]);var d=this.map.getResolution();var a=Math.round((bounds.left-this.tileOrigin.lon)/(d*this.tileSize.w));var g=Math.round((this.tileOrigin.lat-bounds.top)/(d*this.tileSize.h));var f=this.map.getZoom();var b=this.standardTileSize;var e=this.standardTileSize;if(a==this.tierSizeInTiles[f].w-1){var b=this.tierImageSize[f].w%this.standardTileSize}if(g==this.tierSizeInTiles[f].h-1){var e=this.tierImageSize[f].h%this.standardTileSize}return(new OpenLayers.Size(b,e))}else{return this.tileSize}},addTile:function(b,a){return new OpenLayers.Tile.Image(this,a,b,null,this.tileSize)},setMap:function(a){OpenLayers.Layer.Grid.prototype.setMap.apply(this,arguments);this.tileOrigin=new OpenLayers.LonLat(this.map.maxExtent.left,this.map.maxExtent.top)},calculateGridLayout:function(a,v,f){var p=f*this.tileSize.w;var d=f*this.tileSize.h;var m=a.left-v.left;var q=Math.floor(m/p)-this.buffer;var o=m/p-q;var g=-o*this.tileSize.w;var r=v.left+q*p;var b=v.top-a.top+d;var j=Math.floor(b/d)-this.buffer;var u=j-b/d;var e=u*this.tileSize.h;var h=v.top-d*j;return{tilelon:p,tilelat:d,tileoffsetlon:r,tileoffsetlat:h,tileoffsetx:g,tileoffsety:e}},CLASS_NAME:"OpenLayers.Layer.Zoomify"});OpenLayers.Protocol.SQL.Gears=OpenLayers.Class(OpenLayers.Protocol.SQL,{FID_PREFIX:"__gears_fid__",NULL_GEOMETRY:"__gears_null_geometry__",NULL_FEATURE_STATE:"__gears_null_feature_state__",jsonParser:null,wktParser:null,fidRegExp:null,saveFeatureState:true,typeOfFid:"string",db:null,initialize:function(a){if(!this.supported()){return}OpenLayers.Protocol.SQL.prototype.initialize.apply(this,[a]);this.jsonParser=new OpenLayers.Format.JSON();this.wktParser=new OpenLayers.Format.WKT();this.fidRegExp=new RegExp("^"+this.FID_PREFIX);this.initializeDatabase()},initializeDatabase:function(){this.db=google.gears.factory.create("beta.database");this.db.open(this.databaseName);this.db.execute("CREATE TABLE IF NOT EXISTS "+this.tableName+" (fid TEXT UNIQUE, geometry TEXT, properties TEXT,  state TEXT)")},destroy:function(){this.db.close();this.db=null;this.jsonParser=null;this.wktParser=null;OpenLayers.Protocol.SQL.prototype.destroy.apply(this)},supported:function(){return !!(window.google&&google.gears)},read:function(b){OpenLayers.Protocol.prototype.read.apply(this,arguments);b=OpenLayers.Util.applyDefaults(b,this.options);var d,e=[];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}e.push(d)}a.next()}a.close();var f=new OpenLayers.Protocol.Response({code:OpenLayers.Protocol.Response.SUCCESS,requestType:"read",features:e});if(b&&b.callback){b.callback.call(b.scope,f)}return f},unfreezeFeature:function(e){var a;var b=e.fieldByName("geometry");if(b==this.NULL_GEOMETRY){a=new OpenLayers.Feature.Vector()}else{a=this.wktParser.read(b)}a.attributes=this.jsonParser.read(e.fieldByName("properties"));a.fid=this.extractFidFromField(e.fieldByName("fid"));var d=e.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(f){if(!(f instanceof Array)){f=[f]}var d,a=f.length,b;var e=new Array(a);for(d=0;d<a;d++){b=f[d];var g=this.freezeFeature(b);this.db.execute("REPLACE INTO "+this.tableName+" (fid, geometry, properties, state) VALUES (?, ?, ?, ?)",g);var h=b.clone();h.fid=this.extractFidFromField(g[0]);e[d]=h}return new OpenLayers.Protocol.Response({code:OpenLayers.Protocol.Response.SUCCESS,features:e,reqFeatures:f})},freezeFeature:function(b){b.fid=b.fid!=null?""+b.fid:OpenLayers.Util.createUniqueID(this.FID_PREFIX);var e=b.geometry!=null?b.geometry.toString():this.NULL_GEOMETRY;var a=this.jsonParser.write(b.attributes);var d=this.getFeatureStateForFreeze(b);return[b.fid,e,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(g,d){if(!(g instanceof Array)){g=[g]}d=OpenLayers.Util.applyDefaults(d,this.options);var f,a,e;for(f=0,a=g.length;f<a;f++){e=g[f];if(this.saveFeatureState&&!this.createdOffline(e)){var b=e.clone();b.fid=e.fid;if(b.geometry){b.geometry.destroy();b.geometry=null}b.state=e.state;this.createOrUpdate(b)}else{this.db.execute("DELETE FROM "+this.tableName+" WHERE fid = ?",[e.fid])}}var h=new OpenLayers.Protocol.Response({code:OpenLayers.Protocol.Response.SUCCESS,requestType:"delete",reqFeatures:g});if(d&&d.callback){d.callback.call(d.scope,h)}return h},createdOffline:function(a){return(typeof a.fid=="string"&&!!(a.fid.match(this.fidRegExp)))},commit:function(d,q){var b,f=[],h=0,j=0;function o(r){if(++j<h){r.last=false}this.callUserCallback(q,r)}var p,m=[],a=[],e=[];for(var g=d.length-1;g>=0;g--){p=d[g];switch(p.state){case OpenLayers.State.INSERT:m.push(p);break;case OpenLayers.State.UPDATE:a.push(p);break;case OpenLayers.State.DELETE:e.push(p);break}}if(m.length>0){h++;b=OpenLayers.Util.applyDefaults({callback:o,scope:this},q.create);f.push(this.create(m,b))}if(a.length>0){h++;b=OpenLayers.Util.applyDefaults({callback:o,scope:this},q.update);f.push(this.update(a,b))}if(e.length>0){h++;b=OpenLayers.Util.applyDefaults({callback:o,scope:this},q["delete"]);f.push(this["delete"](e,b))}return f},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:null,title:null,description:null,context:null,filter:null,elseFilter:false,symbolizer:null,symbolizers:null,minScaleDenominator:null,maxScaleDenominator:null,initialize:function(a){this.symbolizer={};OpenLayers.Util.extend(this,a);if(this.symbolizers){delete this.symbolizer}this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")},destroy:function(){for(var a in this.symbolizer){this.symbolizer[a]=null}this.symbolizer=null;delete this.symbolizers},evaluate:function(d){var b=this.getContext(d);var a=true;if(this.minScaleDenominator||this.maxScaleDenominator){var e=d.layer.map.getScale()}if(this.minScaleDenominator){a=e>=OpenLayers.Style.createLiteral(this.minScaleDenominator,b)}if(a&&this.maxScaleDenominator){a=e<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 b=OpenLayers.Util.extend({},this);if(this.symbolizers){var a=this.symbolizers.length;b.symbolizers=new Array(a);for(var e=0;e<a;++e){b.symbolizers[e]=this.symbolizers[e].clone()}}else{b.symbolizer={};var g,f;for(var d in this.symbolizer){g=this.symbolizer[d];f=typeof g;if(f==="object"){b.symbolizer[d]=OpenLayers.Util.extend({},g)}else{if(f==="string"){b.symbolizer[d]=g}}}}b.filter=this.filter&&this.filter.clone();b.context=this.context&&OpenLayers.Util.extend({},this.context);return new OpenLayers.Rule(b)},CLASS_NAME:"OpenLayers.Rule"});OpenLayers.StyleMap=OpenLayers.Class({styles:null,extendDefault:true,initialize:function(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,e,g,a){var f=[];for(var d in g){f.push(new OpenLayers.Rule({symbolizer:g[d],context:a,filter:new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.EQUAL_TO,property:e,value:d})}))}this.styles[b].addRules(f)},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){if(d instanceof OpenLayers.Feature.Vector){d=d.attributes}var a=false;var b=d[this.property];switch(this.type){case OpenLayers.Filter.Comparison.EQUAL_TO:var f=this.value;if(!this.matchCase&&typeof b=="string"&&typeof f=="string"){a=(b.toUpperCase()==f.toUpperCase())}else{a=(b==f)}break;case OpenLayers.Filter.Comparison.NOT_EQUAL_TO:var f=this.value;if(!this.matchCase&&typeof b=="string"&&typeof f=="string"){a=(b.toUpperCase()!=f.toUpperCase())}else{a=(b!=f)}break;case OpenLayers.Filter.Comparison.LESS_THAN:a=b<this.value;break;case OpenLayers.Filter.Comparison.GREATER_THAN:a=b>this.value;break;case OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO:a=b<=this.value;break;case OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO:a=b>=this.value;break;case OpenLayers.Filter.Comparison.BETWEEN:a=(b>=this.lowerBoundary)&&(b<=this.upperBoundary);break;case OpenLayers.Filter.Comparison.LIKE:var e=new RegExp(this.value,"gi");a=e.test(b);break}return a},value2regex:function(e,b,a){if(e=="."){var d="'.' is an unsupported wildCard character for OpenLayers.Filter.Comparison";OpenLayers.Console.error(d);return null}e=e?e:"*";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("\\"+e,"g"),".*");this.value=this.value.replace(new RegExp("\\\\.\\*","g"),"\\"+e);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 e=d.fid||d.id;if(e==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;OpenLayers.Geometry.prototype.destroy.apply(this,arguments)},clone:function(){var geometry=eval("new "+this.CLASS_NAME+"()");for(var i=0,len=this.components.length;i<len;i++){geometry.addComponent(this.components[i].clone())}OpenLayers.Util.applyDefaults(geometry,this);return geometry},getComponentsString:function(){var b=[];for(var 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 e=false;if(b){if(this.componentTypes==null||(OpenLayers.Util.indexOf(this.componentTypes,b.CLASS_NAME)>-1)){if(a!=null&&(a<this.components.length)){var f=this.components.slice(0,a);var d=this.components.slice(a,this.components.length);f.push(b);this.components=f.concat(d)}else{this.components.push(b)}b.parent=this;this.clearBounds();e=true}}return e},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 e=0;for(var d=0,a=this.components.length;d<a;d++){e+=this.components[d].getGeodesicArea(b)}return e},getCentroid:function(h){if(!h){return this.components.length&&this.components[0].getCentroid()}var p=this.components.length;if(!p){return false}var b=[];var d=[];var e=0;var j=Number.MAX_VALUE;var q;for(var o=0;o<p;++o){q=this.components[o];var f=q.getArea();var g=q.getCentroid(true);if(isNaN(f)||isNaN(g.x)||isNaN(g.y)){continue}b.push(f);e+=f;j=(f<j&&f>0)?f:j;d.push(g)}p=b.length;if(e===0){for(var o=0;o<p;++o){b[o]=1}e=b.length}else{for(var o=0;o<p;++o){b[o]/=j}e/=j}var m=0,a=0,g,f;for(var o=0;o<p;++o){g=d[o];f=b[o];m+=g.x*f;a+=g.y*f}return new OpenLayers.Geometry.Point(m/e,a/e)},getGeodesicLength:function(b){var e=0;for(var d=0,a=this.components.length;d<a;d++){e+=this.components[d].getGeodesicLength(b)}return e},move:function(b,e){for(var d=0,a=this.components.length;d<a;d++){this.components[d].move(b,e)}},rotate:function(e,b){for(var d=0,a=this.components.length;d<a;++d){this.components[d].rotate(e,b)}},resize:function(e,a,d){for(var b=0;b<this.components.length;++b){this.components[b].resize(e,a,d)}return this},distanceTo:function(j,m){var d=!(m&&m.edge===false);var a=d&&m&&m.details;var o,e,b;var f=Number.POSITIVE_INFINITY;for(var g=0,h=this.components.length;g<h;++g){o=this.components[g].distanceTo(j,m);b=a?o.distance:o;if(b<f){f=b;e=o;if(f==0){break}}}return e},equals:function(e){var b=true;if(!e||!e.CLASS_NAME||(this.CLASS_NAME!=e.CLASS_NAME)){b=false}else{if(!(e.components instanceof Array)||(e.components.length!=this.components.length)){b=false}else{for(var d=0,a=this.components.length;d<a;++d){if(!this.components[d].equals(e.components[d])){b=false;break}}}}return b},transform:function(f,d){if(f&&d){for(var e=0,a=this.components.length;e<a;e++){var b=this.components[e];b.transform(f,d)}this.bounds=null}return this},intersects:function(e){var b=false;for(var d=0,a=this.components.length;d<a;++d){b=e.intersects(this.components[d]);if(b){break}}return b},getVertices:function(b){var d=[];for(var e=0,a=this.components.length;e<a;++e){Array.prototype.push.apply(d,this.components[e].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(g,o){var e=!(o&&o.edge===false);var a=e&&o&&o.details;var b,f,j,d,h,m;if(g instanceof OpenLayers.Geometry.Point){f=this.x;j=this.y;d=g.x;h=g.y;b=Math.sqrt(Math.pow(f-d,2)+Math.pow(j-h,2));m=!a?b:{x0:f,y0:j,x1:d,y1:h,distance:b}}else{m=g.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(e,b){e*=Math.PI/180;var a=this.distanceTo(b);var d=e+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,e,d,a){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);this.x=b;this.y=e;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,e,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 g=this.map.getResolution();var f=Math.round((this.map.getScale()*10000))/10000;var e=Math.round(a.left/g);var d=-Math.round(a.top/g);var m=Math.floor(e/this.tileSize.w/this.params.metaTileSize.w)*this.tileSize.w*this.params.metaTileSize.w;var j=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 h=[b,"/",this.params.map,"/",f,"/",this.params.g.replace(/\s/g,"_"),"/def/t",j,"/l",m,"/t",d,"l",e,".",this.extension];return h.join("")},CLASS_NAME:"OpenLayers.Layer.KaMapCache"});OpenLayers.Layer.MapServer.Untiled=OpenLayers.Class(OpenLayers.Layer.MapServer,{singleTile:true,initialize:function(d,b,f,a){OpenLayers.Layer.MapServer.prototype.initialize.apply(this,arguments);var e="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(e)},clone:function(a){if(a==null){a=new OpenLayers.Layer.MapServer.Untiled(this.name,this.url,this.params,this.getOptions())}a=OpenLayers.Layer.MapServer.prototype.clone.apply(this,[a]);return a},CLASS_NAME:"OpenLayers.Layer.MapServer.Untiled"});OpenLayers.Layer.Vector=OpenLayers.Class(OpenLayers.Layer,{EVENT_TYPES:["beforefeatureadded","beforefeaturesadded","featureadded","featuresadded","beforefeatureremoved","beforefeaturesremoved","featureremoved","featuresremoved","beforefeatureselected","featureselected","featureunselected","beforefeaturemodified","featuremodified","afterfeaturemodified","vertexmodified","sketchstarted","sketchmodified","sketchcomplete","refresh"],isBaseLayer:false,isFixed:false,isVector:true,features:null,filter:null,selectedFeatures:null,unrenderedFeatures:null,reportError:true,style:null,styleMap:null,strategies:null,protocol:null,renderers:["SVG","VML","Canvas"],renderer:null,rendererOptions:null,geometryType:null,drawn:false,initialize:function(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 e=0,a=this.strategies.length;e<a;e++){this.strategies[e].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)},clone:function(f){if(f==null){f=new OpenLayers.Layer.Vector(this.name,this.getOptions())}f=OpenLayers.Layer.prototype.clone.apply(this,[f]);var d=this.features;var a=d.length;var e=new Array(a);for(var b=0;b<a;++b){e[b]=d[b].clone()}f.features=e;return f},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=this.renderers[d];var e=(typeof b=="function")?b:OpenLayers.Renderer[b];if(e&&e.prototype.supported()){this.renderer=new e(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){this.drawn=false;if(this.strategies){var e,b,a;for(b=0,a=this.strategies.length;b<a;b++){e=this.strategies[b];if(e.autoActivate){e.deactivate()}}}},onMapResize:function(){OpenLayers.Layer.prototype.onMapResize.apply(this,arguments);this.renderer.setSize(this.map.getSize())},moveTo:function(h,b,j){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);var f=true;if(!j){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 g=this.map.getExtent();f=this.renderer.setExtent(g,b);this.renderer.root.style.visibility="visible";if(navigator.userAgent.toLowerCase().indexOf("gecko")!=-1){this.div.scrollLeft=this.div.scrollLeft}if(!b&&f){for(var e in this.unrenderedFeatures){var d=this.unrenderedFeatures[e];this.drawFeature(d)}}}if(!this.drawn||b||!f){this.drawn=true;var d;for(var e=0,a=this.features.length;e<a;e++){this.renderer.locked=(e!==(a-1));d=this.features[e];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,o){if(!(b instanceof Array)){b=[b]}var j=!o||!o.silent;if(j){var a={features:b};var h=this.events.triggerEvent("beforefeaturesadded",a);if(h===false){return}b=a.features}var e=[];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 m=b[d];if(this.geometryType&&!(m.geometry instanceof this.geometryType)){var f=OpenLayers.i18n("componentShouldBe",{geomType:this.geometryType.prototype.CLASS_NAME});throw f}m.layer=this;if(!m.style&&this.style){m.style=OpenLayers.Util.extend({},this.style)}if(j){if(this.events.triggerEvent("beforefeatureadded",{feature:m})===false){continue}this.preFeatureInsert(m)}e.push(m);this.features.push(m);this.drawFeature(m);if(j){this.events.triggerEvent("featureadded",{feature:m});this.onFeatureInsert(m)}}if(j){this.events.triggerEvent("featuresadded",{features:e})}},removeFeatures:function(f,a){if(!f||f.length===0){return}if(f===this.features){return this.removeAllFeatures(a)}if(!(f instanceof Array)){f=[f]}if(f===this.selectedFeatures){f=f.slice()}var e=!a||!a.silent;if(e){this.events.triggerEvent("beforefeaturesremoved",{features:f})}for(var d=f.length-1;d>=0;d--){if(d!=0&&f[d-1].geometry){this.renderer.locked=true}else{this.renderer.locked=false}var b=f[d];delete this.unrenderedFeatures[b.id];if(e){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(e){this.events.triggerEvent("featureremoved",{feature:b})}}if(e){this.events.triggerEvent("featuresremoved",{features:f})}},removeAllFeatures:function(a){var e=!a||!a.silent;var f=this.features;if(e){this.events.triggerEvent("beforefeaturesremoved",{features:f})}var d;for(var b=f.length-1;b>=0;b--){d=f[b];if(e){this.events.triggerEvent("beforefeatureremoved",{feature:d})}d.layer=null;if(e){this.events.triggerEvent("featureremoved",{feature:d})}}this.renderer.clear();this.features=[];this.unrenderedFeatures={};this.selectedFeatures=[];if(e){this.events.triggerEvent("featuresremoved",{features:f})}},destroyFeatures:function(e,a){var d=(e==undefined);if(d){e=this.features}if(e){this.removeFeatures(e,a);for(var b=e.length-1;b>=0;b--){e[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)},getFeatureBy:function(f,e){var d=null;for(var b=0,a=this.features.length;b<a;++b){if(this.features[b][f]==e){d=this.features[b];break}}return d},getFeatureById:function(a){return this.getFeatureBy("id",a)},getFeatureByFid:function(a){return this.getFeatureBy("fid",a)},onFeatureInsert:function(a){},preFeatureInsert:function(a){},getDataExtent:function(){var b=null;var e=this.features;if(e&&(e.length>0)){b=new OpenLayers.Bounds();var f=null;for(var d=0,a=e.length;d<a;d++){f=e[d].geometry;if(f){b.extend(f.getBounds())}}}return b},CLASS_NAME:"OpenLayers.Layer.Vector"});OpenLayers.Layer.WMS.Post=OpenLayers.Class(OpenLayers.Layer.WMS,{tileClass:null,unsupportedBrowsers:["mozilla","firefox","opera"],SUPPORTED_TRANSITIONS:[],initialize:function(e,d,f,b){var a=[];a.push(e,d,f,b);OpenLayers.Layer.WMS.prototype.initialize.apply(this,a);this.tileClass=OpenLayers.Util.indexOf(this.unsupportedBrowsers,OpenLayers.Util.getBrowserName())!=-1?OpenLayers.Tile.Image:OpenLayers.Tile.Image.IFrame},addTile:function(b,a){return new this.tileClass(this,a,b,null,this.tileSize)},CLASS_NAME:"OpenLayers.Layer.WMS.Post"});OpenLayers.Layer.WMS.Untiled=OpenLayers.Class(OpenLayers.Layer.WMS,{singleTile:true,initialize:function(d,b,f,a){OpenLayers.Layer.WMS.prototype.initialize.apply(this,arguments);var e="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(e)},clone:function(a){if(a==null){a=new OpenLayers.Layer.WMS.Untiled(this.name,this.url,this.params,this.getOptions())}a=OpenLayers.Layer.WMS.prototype.clone.apply(this,[a]);return a},CLASS_NAME:"OpenLayers.Layer.WMS.Untiled"});OpenLayers.Strategy.Filter=OpenLayers.Class(OpenLayers.Strategy,{filter:null,cache:null,caching:false,initialize:function(a){OpenLayers.Strategy.prototype.initialize.apply(this,[a]);if(!this.filter||!(this.filter instanceof OpenLayers.Filter)){throw new Error("Filter strategy must be constructed with a filter")}},activate:function(){var a=OpenLayers.Strategy.prototype.activate.apply(this,arguments);if(a){this.cache=[];this.layer.events.on({beforefeaturesadded:this.handleAdd,beforefeaturesremoved:this.handleRemove,scope:this})}return a},deactivate:function(){this.cache=null;if(this.layer&&this.layer.events){this.layer.events.un({beforefeaturesadded:this.handleAdd,beforefeaturesremoved:this.handleRemove,scope:this})}return OpenLayers.Strategy.prototype.deactivate.apply(this,arguments)},handleAdd:function(f){if(!this.caching){var e=f.features;f.features=[];var b;for(var a=0,d=e.length;a<d;++a){b=e[a];if(this.filter.evaluate(b)){f.features.push(b)}else{this.cache.push(b)}}}},handleRemove:function(a){if(!this.caching){this.cache=[]}},setFilter:function(a){this.filter=a;var d=this.cache;this.cache=[];this.handleAdd({features:this.layer.features});if(this.cache.length>0){this.caching=true;this.layer.removeFeatures(this.cache.slice(),{silent:true});this.caching=false}if(d.length>0){var b={features:d};this.handleAdd(b);this.caching=true;this.layer.addFeatures(b.features,{silent:true});this.caching=false}},CLASS_NAME:"OpenLayers.Strategy.Filter"});OpenLayers.Style2=OpenLayers.Class({id:null,name:null,title:null,description:null,layerName:null,isDefault:false,rules:null,initialize:function(a){OpenLayers.Util.extend(this,a);this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")},destroy:function(){for(var b=0,a=this.rules.length;b<a;b++){this.rules[b].destroy()}delete this.rules},clone:function(){var b=OpenLayers.Util.extend({},this);if(this.rules){b.rules=[];for(var d=0,a=this.rules.length;d<a;++d){b.rules.push(this.rules[d].clone())}}return new OpenLayers.Style2(b)},CLASS_NAME:"OpenLayers.Style2"});OpenLayers.Control.GetFeature=OpenLayers.Class(OpenLayers.Control,{protocol:null,multipleKey:null,toggleKey:null,modifiers:null,multiple:false,click:true,single:true,clickout:true,toggle:false,clickTolerance:5,hover:false,box:false,maxFeatures:10,features:null,hoverFeature:null,handlerOptions:null,handlers:null,hoverResponse:null,filterType:OpenLayers.Filter.Spatial.BBOX,EVENT_TYPES:["featureselected","featuresselected","featureunselected","clickout","beforefeatureselected","beforefeaturesselected","hoverfeature","outfeature"],initialize:function(a){this.EVENT_TYPES=OpenLayers.Control.GetFeature.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);a.handlerOptions=a.handlerOptions||{};OpenLayers.Control.prototype.initialize.apply(this,[a]);this.features={};this.handlers={};if(this.click){this.handlers.click=new OpenLayers.Handler.Click(this,{click:this.selectClick},this.handlerOptions.click||{})}if(this.box){this.handlers.box=new OpenLayers.Handler.Box(this,{done:this.selectBox},OpenLayers.Util.extend(this.handlerOptions.box,{boxDivClassName:"olHandlerBoxSelectFeature"}))}if(this.hover){this.handlers.hover=new OpenLayers.Handler.Hover(this,{move:this.cancelHover,pause:this.selectHover},OpenLayers.Util.extend(this.handlerOptions.hover,{delay:250}))}},activate:function(){if(!this.active){for(var a in this.handlers){this.handlers[a].activate()}}return OpenLayers.Control.prototype.activate.apply(this,arguments)},deactivate:function(){if(this.active){for(var a in this.handlers){this.handlers[a].deactivate()}}return OpenLayers.Control.prototype.deactivate.apply(this,arguments)},selectClick:function(a){var b=this.pixelToBounds(a.xy);this.setModifiers(a);this.request(b,{single:this.single})},selectBox:function(a){var d;if(a instanceof OpenLayers.Bounds){var e=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(e.lon,e.lat,b.lon,b.lat)}else{if(this.click){return}d=this.pixelToBounds(a)}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;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olCursorWait")}},request:function(e,b){b=b||{};var d=new OpenLayers.Filter.Spatial({type:this.filterType,value:e});OpenLayers.Element.addClass(this.map.viewPortDiv,"olCursorWait");var a=this.protocol.read({maxFeatures:b.single==true?this.maxFeatures:undefined,filter:d,callback:function(f){if(f.success()){if(f.features.length){if(b.single==true){this.selectBestFeature(f.features,e.getCenterLonLat(),b)}else{this.select(f.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 h=new OpenLayers.Geometry.Point(a.lon,a.lat);var j,e,f;var g=Number.MAX_VALUE;for(var d=0;d<b.length;++d){j=b[d];if(j.geometry){f=h.distanceTo(j.geometry,{edge:false});if(f<g){g=f;e=j;if(g==0){break}}}}if(m.hover==true){this.hoverSelect(e)}else{this.select(e||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 b=this.events.triggerEvent("beforefeaturesselected",{features:f});if(b!==false){var g=[];var e;for(var d=0,a=f.length;d<a;++d){e=f[d];if(this.features[e.fid||e.id]){if(this.modifiers.toggle){this.unselect(this.features[e.fid||e.id])}}else{b=this.events.triggerEvent("beforefeatureselected",{feature:e});if(b!==false){this.features[e.fid||e.id]=e;g.push(e);this.events.triggerEvent("featureselected",{feature:e})}}}this.events.triggerEvent("featuresselected",{features:g})}},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 f=b.add(-this.clickTolerance/2,this.clickTolerance/2);var a=b.add(this.clickTolerance/2,-this.clickTolerance/2);var d=this.map.getLonLatFromPixel(f);var e=this.map.getLonLatFromPixel(a);return new OpenLayers.Bounds(d.lon,d.lat,e.lon,e.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 e;for(var d=0,a=b.length;d<a;++d){e=b[d];if(e instanceof OpenLayers.Layer.Vector){this.addTargetLayer(e)}else{this.addTarget(e)}}}},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(j,e){var a={rank:Number.POSITIVE_INFINITY,dist:Number.POSITIVE_INFINITY,x:null,y:null};var d=false;var m,g;for(var b=0,f=this.targets.length;b<f;++b){g=this.targets[b];m=this.testTarget(g,e);if(m){if(this.greedy){a=m;a.target=g;d=true;break}else{if((m.rank<a.rank)||(m.rank===a.rank&&m.dist<a.dist)){a=m;a.target=g;d=true}}}}if(d){var h=this.events.triggerEvent("beforesnap",{point:j,x:a.x,y:a.y,distance:a.dist,layer:a.target.layer,snapType:this.precedence[a.rank]});if(h!==false){j.x=a.x;j.y=a.y;this.point=j;this.events.triggerEvent("snap",{point:j,snapType:this.precedence[a.rank],layer:a.target.layer,distance:a.dist})}else{d=false}}if(this.point&&!d){j.x=e.x;j.y=e.y;this.point=null;this.events.triggerEvent("unsnap",{point:j})}},testTarget:function(G,g){var E={node:this.getGeoTolerance(G.nodeTolerance),vertex:this.getGeoTolerance(G.vertexTolerance),edge:this.getGeoTolerance(G.edgeTolerance)};var h=Math.max(E.node,E.vertex,E.edge);var m={rank:Number.POSITIVE_INFINITY,dist:Number.POSITIVE_INFINITY};var f=false;var d=G.layer.features;var b,a,e,F,r,u,q;var p=this.precedence.length;var o=new OpenLayers.LonLat(g.x,g.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,h,h)){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(g,{details:true});u=r.distance;if(u<=E[a]&&u<m.dist){m={rank:B,dist:u,x:r.x0,y:r.y0};f=true;break}}else{e=b.geometry.getVertices(a==="node");q=false;for(var z=0,w=e.length;z<w;++z){F=e[z];u=F.distanceTo(g);if(u<=E[a]&&(B<m.rank||(B===m.rank&&u<m.dist))){m={rank:B,dist:u,x:F.x,y:F.y};f=true;q=true}}if(q){break}}}}}}}return f?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 e=OpenLayers.Format.Filter["v"+a.replace(/\./g,"_")];if(!e){throw"Can't find a Filter parser for version "+a}this.parser=new e(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 e=OpenLayers.Format.Filter["v"+a.replace(/\./g,"_")];if(!e){throw"Can't find a Filter parser for version "+a}this.parser=new e(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(e,d){var b=(d&&d.version)||this.version||this.defaultVersion;if(!this.parser||this.parser.VERSION!=b){var f=OpenLayers.Format.SLD["v"+b.replace(/\./g,"_")];if(!f){throw"Can't find a SLD parser for version "+b}this.parser=new f(this.options)}var a=this.parser.write(e);return OpenLayers.Format.XML.prototype.write.apply(this,[a])},read:function(f,d){if(typeof f=="string"){f=OpenLayers.Format.XML.prototype.read.apply(this,[f])}var b=f.documentElement;var a=this.version;if(!a){a=b.getAttribute("version");if(!a){a=this.defaultVersion}}if(!this.parser||this.parser.VERSION!=a){var g=OpenLayers.Format.SLD["v"+a.replace(/\./g,"_")];if(!g){throw"Can't find a SLD parser for version "+a}this.parser=new g(this.options)}var e=this.parser.read(f,d);return e},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 h=[];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 e=new OpenLayers.Geometry.Point(0,0);var j={};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(",");e.y=parseFloat(v[0]);e.x=parseFloat(v[1]);p=true}else{if(b[m]=="lat"){e.y=parseFloat(q[m]);p=true}else{if(b[m]=="lon"){e.x=parseFloat(q[m]);p=true}else{if(b[m]=="title"){j.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 g=q[m].split(",");w.graphicXOffset=parseFloat(g[0]);w.graphicYOffset=parseFloat(g[1])}else{if(b[m]=="description"){j.description=q[m]}else{if(b[m]=="overflow"){j.overflow=q[m]}else{j[b[m]]=q[m]}}}}}}}}}}}if(p){if(this.internalProjection&&this.externalProjection){e.transform(this.externalProjection,this.internalProjection)}var f=new OpenLayers.Feature.Vector(e,j,w);h.push(f)}}}}return h},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:OpenLayers.Function.True},this.layerOptions);this.layer=new OpenLayers.Layer.Vector(this.CLASS_NAME,a);this.map.addLayer(this.layer);return true},createFeature:function(a){var b=this.map.getLonLatFromPixel(a);this.point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(b.lon,b.lat));this.callback("create",[this.point.geometry,this.point]);this.point.geometry.clearBounds();this.layer.addFeatures([this.point],{silent:true})},deactivate:function(){if(!OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){return false}if(this.drawing){this.cancel()}this.destroyFeature();if(this.layer.map!=null){this.layer.destroy(false)}this.layer=null;return true},destroyFeature:function(){if(this.layer){this.layer.destroyFeatures()}this.point=null},finalize:function(b){var a=b?"cancel":"done";this.drawing=false;this.mouseDown=false;this.lastDown=null;this.lastUp=null;this.callback(a,[this.geometryClone()]);if(b||!this.persist){this.destroyFeature()}},cancel:function(){this.finalize(true)},click:function(a){OpenLayers.Event.stop(a);return false},dblclick:function(a){OpenLayers.Event.stop(a);return false},modifyFeature:function(a){var b=this.map.getLonLatFromPixel(a);this.point.geometry.x=b.lon;this.point.geometry.y=b.lat;this.callback("modify",[this.point.geometry,this.point]);this.point.geometry.clearBounds();this.drawFeature()},drawFeature:function(){this.layer.drawFeature(this.point,this.style)},getGeometry:function(){var a=this.point&&this.point.geometry;if(a&&this.multi){a=new OpenLayers.Geometry.MultiPoint([a])}return a},geometryClone:function(){var a=this.getGeometry();return a&&a.clone()},mousedown:function(a){if(!this.checkModifiers(a)){return true}if(this.lastDown&&this.lastDown.equals(a.xy)){return true}this.drawing=true;if(this.lastDown==null){if(this.persist){this.destroyFeature()}this.createFeature(a.xy)}else{this.modifyFeature(a.xy)}this.lastDown=a.xy;return false},mousemove:function(a){if(this.drawing){this.modifyFeature(a.xy)}return true},mouseup:function(a){if(this.drawing){this.finalize();return false}else{return true}},CLASS_NAME:"OpenLayers.Handler.Point"});OpenLayers.Layer.GML=OpenLayers.Class(OpenLayers.Layer.Vector,{loaded:false,format:null,formatOptions:null,initialize:function(e,d,b){var a=[];a.push(e,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 e=d.responseXML;if(!e||!e.documentElement){e=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(e));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(g){if(g.length<2){OpenLayers.Console.error("At least two point features have to be added to createa line from");return}var o=new Array(g.length-1);var h,a,j;for(var d=0,f=g.length;d<f;d++){h=g[d];j=h.geometry;if(!j){var e=h.lonlat;j=new OpenLayers.Geometry.Point(e.lon,e.lat)}else{if(j.CLASS_NAME!="OpenLayers.Geometry.Point"){OpenLayers.Console.error("Only features with point geometries are supported.");return}}if(d>0){var b=(this.dataFrom!=null)?(g[d+this.dataFrom].data||g[d+this.dataFrom].attributes):null;var m=new OpenLayers.Geometry.LineString([a,j]);o[d-1]=new OpenLayers.Feature.Vector(m,b)}a=j}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 e=this.layers;var d;for(var b=0;b<e.length;b++){d=e[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(e,d,f,b){if(b==undefined){b={}}if(b.featureClass||!OpenLayers.Layer.Vector||!OpenLayers.Feature.Vector){this.vectorMode=false}f=OpenLayers.Util.upperCaseObject(f);OpenLayers.Util.extend(b,{reportError:false});var a=[];a.push(e,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(f,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 h=(!r&&!this.tile.bounds.containsBounds(a));if(b||r||(!u&&h)){var d=a.getCenterLonLat();var q=a.getWidth()*this.ratio;var j=a.getHeight()*this.ratio;var o=new OpenLayers.Bounds(d.lon-(q/2),d.lat-(j/2),d.lon+(q/2),d.lat+(j/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 e=this.getFullRequestString();var g=null;var f=this.params.filter||this.params.FILTER;if(f){g={FILTER:f}}else{g={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(!f){g.BBOX=this.encodeBBOX?w.toBBOX():w.toArray()}}e+="&"+OpenLayers.Util.getParameterString(g);if(!this.tile){this.tile=new OpenLayers.Tile.WFS(this,p,o,e,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,e,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.getOptions())}if(this.vectorMode){a=OpenLayers.Layer.Vector.prototype.clone.apply(this,[a])}else{a=OpenLayers.Layer.Markers.prototype.clone.apply(this,[a])}return a},getFullRequestString:function(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.Protocol.HTTP=OpenLayers.Class(OpenLayers.Protocol,{url:null,headers:null,params:null,callback:null,scope:null,readWithPOST:false,wildcarded:false,initialize:function(a){a=a||{};this.params={};this.headers={};OpenLayers.Protocol.prototype.initialize.apply(this,arguments)},destroy:function(){this.params=null;this.headers=null;OpenLayers.Protocol.prototype.destroy.apply(this)},read:function(a){OpenLayers.Protocol.prototype.read.apply(this,arguments);a=OpenLayers.Util.applyDefaults(a,this.options);a.params=OpenLayers.Util.applyDefaults(a.params,this.options.params);if(a.filter){a.params=this.filterToParams(a.filter,a.params)}var b=(a.readWithPOST!==undefined)?a.readWithPOST:this.readWithPOST;var d=new OpenLayers.Protocol.Response({requestType:"read"});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)},filterToParams:function(e,h){h=h||{};var d=e.CLASS_NAME;var f=d.substring(d.lastIndexOf(".")+1);switch(f){case"Spatial":switch(e.type){case OpenLayers.Filter.Spatial.BBOX:h.bbox=e.value.toArray();break;case OpenLayers.Filter.Spatial.DWITHIN:h.tolerance=e.distance;case OpenLayers.Filter.Spatial.WITHIN:h.lon=e.value.x;h.lat=e.value.y;break;default:OpenLayers.Console.warn("Unknown spatial filter type "+e.type)}break;case"Comparison":var j=OpenLayers.Protocol.HTTP.COMP_TYPE_TO_OP_STR[e.type];if(j!==undefined){var g=e.value;if(e.type==OpenLayers.Filter.Comparison.LIKE){g=this.regex2value(g);if(this.wildcarded){g="%"+g+"%"}}h[e.property+"__"+j]=g;h.queryable=h.queryable||[];h.queryable.push(e.property)}else{OpenLayers.Console.warn("Unknown comparison filter type "+e.type)}break;case"Logical":if(e.type===OpenLayers.Filter.Logical.AND){for(var b=0,a=e.filters.length;b<a;b++){h=this.filterToParams(e.filters[b],h)}}else{OpenLayers.Console.warn("Unsupported logical filter type "+e.type)}break;default:OpenLayers.Console.warn("Unknown filter type "+f)}return h},regex2value:function(a){a=a.replace(/%/g,"\\%");a=a.replace(/\\\\\.(\*)?/g,function(d,b){return b?d:"\\\\_"});a=a.replace(/\\\\\.\*/g,"\\\\%");a=a.replace(/(\\)?\.(\*)?/g,function(d,b,e){return b||e?d:"_"});a=a.replace(/(\\)?\.\*/g,function(d,b){return b?d:"%"});a=a.replace(/\\\./g,".");a=a.replace(/(\\)?\\\*/g,function(d,b){return b?d:"*"});return 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){b=b||{};var a=b.url||d.url||this.options.url+"/"+d.fid;b=OpenLayers.Util.applyDefaults(b,this.options);var e=new OpenLayers.Protocol.Response({reqFeatures:d,requestType:"update"});e.priv=OpenLayers.Request.PUT({url:a,callback:this.createCallback(this.handleUpdate,e,b),headers:b.headers,data:this.format.write(d)});return e},handleUpdate:function(b,a){this.handleResponse(b,a)},"delete":function(d,b){b=b||{};var a=b.url||d.url||this.options.url+"/"+d.fid;b=OpenLayers.Util.applyDefaults(b,this.options);var e=new OpenLayers.Protocol.Response({reqFeatures:d,requestType:"delete"});e.priv=OpenLayers.Request.DELETE({url:a,callback:this.createCallback(this.handleDelete,e,b),headers:b.headers});return e},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 e=[],q=0;var o={};o[OpenLayers.State.INSERT]=[];o[OpenLayers.State.UPDATE]=[];o[OpenLayers.State.DELETE]=[];var v,p,d=[];for(var f=0,m=b.length;f<m;++f){v=b[f];p=o[v.state];if(p){p.push(v);d.push(v)}}var h=(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 j(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>=h){if(w.callback){a.code=u?OpenLayers.Protocol.Response.SUCCESS:OpenLayers.Protocol.Response.FAILURE;w.callback.apply(w.scope,[a])}}}var g=o[OpenLayers.State.INSERT];if(g.length>0){e.push(this.create(g,OpenLayers.Util.applyDefaults({callback:j,scope:this},w.create)))}g=o[OpenLayers.State.UPDATE];for(var f=g.length-1;f>=0;--f){e.push(this.update(g[f],OpenLayers.Util.applyDefaults({callback:r,scope:this},w.update)))}g=o[OpenLayers.State.DELETE];for(var f=g.length-1;f>=0;--f){e.push(this["delete"](g[f],OpenLayers.Util.applyDefaults({callback:r,scope:this},w["delete"])))}return e},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"});(function(){var a=OpenLayers.Protocol.HTTP.COMP_TYPE_TO_OP_STR={};a[OpenLayers.Filter.Comparison.EQUAL_TO]="eq";a[OpenLayers.Filter.Comparison.NOT_EQUAL_TO]="ne";a[OpenLayers.Filter.Comparison.LESS_THAN]="lt";a[OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO]="lte";a[OpenLayers.Filter.Comparison.GREATER_THAN]="gt";a[OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO]="gte";a[OpenLayers.Filter.Comparison.LIKE]="ilike"})();OpenLayers.Strategy.BBOX=OpenLayers.Class(OpenLayers.Strategy,{bounds:null,resolution:null,ratio:2,resFactor:null,response:null,initialize:function(a){OpenLayers.Strategy.prototype.initialize.apply(this,[a])},activate:function(){var a=OpenLayers.Strategy.prototype.activate.call(this);if(a){this.layer.events.on({moveend:this.update,scope:this});this.layer.events.on({refresh:this.update,scope:this})}return a},deactivate:function(){var a=OpenLayers.Strategy.prototype.deactivate.call(this);if(a){this.layer.events.un({moveend:this.update,scope:this});this.layer.events.un({refresh:this.update,scope:this})}return a},update:function(b){var a=this.getMapBounds();if((b&&b.force)||this.invalidBounds(a)){this.calculateBounds(a);this.resolution=this.layer.map.getResolution();this.triggerRead()}},getMapBounds:function(){var a=this.layer.map.getExtent();if(!this.layer.projection.equals(this.layer.map.getProjectionObject())){a=a.clone().transform(this.layer.map.getProjectionObject(),this.layer.projection)}return a},invalidBounds:function(a){if(!a){a=this.getMapBounds()}var 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 e=b.getWidth()*this.ratio;var d=b.getHeight()*this.ratio;this.bounds=new OpenLayers.Bounds(a.lon-(e/2),a.lat-(d/2),a.lon+(e/2),a.lat+(d/2))},triggerRead:function(){if(this.response){this.layer.protocol.abort(this.response);this.layer.events.triggerEvent("loadend")}this.layer.events.triggerEvent("loadstart");this.response=this.layer.protocol.read({filter:this.createFilter(),callback:this.merge,scope:this})},createFilter:function(){var a=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.BBOX,value:this.bounds,projection:this.layer.projection});if(this.layer.filter){a=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.AND,filters:[this.layer.filter,a]})}return a},merge:function(h){this.layer.destroyFeatures();var f=h.features;if(f&&f.length>0){var g=this.layer.projection;var e=this.layer.map.getProjectionObject();if(!e.equals(g)){var d;for(var b=0,a=f.length;b<a;++b){d=f[b].geometry;if(d){d.transform(g,e)}}}this.layer.addFeatures(f)}this.response=null;this.layer.events.triggerEvent("loadend")},CLASS_NAME:"OpenLayers.Strategy.BBOX"});OpenLayers.Control.SelectFeature=OpenLayers.Class(OpenLayers.Control,{EVENT_TYPES:["beforefeaturehighlighted","featurehighlighted","featureunhighlighted"],multipleKey:null,toggleKey:null,multiple:false,clickout:true,toggle:false,hover:false,highlightOnly:false,box:false,onBeforeSelect:function(){},onSelect:function(){},onUnselect:function(){},scope:null,geometryTypes:null,layer:null,layers:null,callbacks:null,selectStyle:null,renderIntent:"select",handlers:null,initialize:function(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}this.initLayer(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"})}},initLayer:function(a){if(a instanceof Array){this.layers=a;this.layer=new OpenLayers.Layer.Vector.RootContainer(this.id+"_container",{layers:a})}else{this.layer=a}},destroy:function(){if(this.active&&this.layers){this.map.removeLayer(this.layer)}OpenLayers.Control.prototype.destroy.apply(this,arguments);if(this.layers){this.layer.destroy()}},activate:function(){if(!this.active){if(this.layers){this.map.addLayer(this.layer)}this.handlers.feature.activate();if(this.box&&this.handlers.box){this.handlers.box.activate()}}return OpenLayers.Control.prototype.activate.apply(this,arguments)},deactivate:function(){if(this.active){this.handlers.feature.deactivate();if(this.handlers.box){this.handlers.box.deactivate()}if(this.layers){this.map.removeLayer(this.layer)}}return OpenLayers.Control.prototype.deactivate.apply(this,arguments)},unselectAll:function(b){var g=this.layers||[this.layer];var f,e;for(var a=0;a<g.length;++a){f=g[a];for(var d=f.selectedFeatures.length-1;d>=0;--d){e=f.selectedFeatures[d];if(!b||b.except!=e){this.unselect(e)}}}},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 e=this.selectStyle||this.renderIntent;b.drawFeature(d,e);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);if(!this.handlers.feature.lastFeature){this.handlers.feature.lastFeature=b.selectedFeatures[0]}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(f){if(f instanceof OpenLayers.Bounds){var j=this.map.getLonLatFromPixel(new OpenLayers.Pixel(f.left,f.bottom));var o=this.map.getLonLatFromPixel(new OpenLayers.Pixel(f.right,f.top));var a=new OpenLayers.Bounds(j.lon,j.lat,o.lon,o.lat);if(!this.multipleSelect()){this.unselectAll()}var m=this.multiple;this.multiple=true;var e=this.layers||[this.layer];var g;for(var b=0;b<e.length;++b){g=e[b];for(var d=0,h=g.features.length;d<h;++d){var p=g.features[d];if(!p.getVisibility()){continue}if(this.geometryTypes==null||OpenLayers.Util.indexOf(this.geometryTypes,p.geometry.CLASS_NAME)>-1){if(a.toGeometry().intersects(p.geometry)){if(OpenLayers.Util.indexOf(g.selectedFeatures,p)==-1){this.select(p)}}}}}this.multiple=m}},setMap:function(a){this.handlers.feature.setMap(a);if(this.box){this.handlers.box.setMap(a)}OpenLayers.Control.prototype.setMap.apply(this,arguments)},setLayer:function(b){var a=this.active;this.unselectAll();this.deactivate();if(this.layers){this.layer.destroy();this.layers=null}this.initLayer(b);this.handlers.feature.layer=this.layer;if(a){this.activate()}},CLASS_NAME:"OpenLayers.Control.SelectFeature"});OpenLayers.Format.Filter.v1=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{ogc:"http://www.opengis.net/ogc",gml:"http://www.opengis.net/gml",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},defaultPrefix:"ogc",schemaLocation:null,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},read:function(a){var b={};this.readers.ogc.Filter.apply(this,[a,b]);return b.filter},readers:{ogc:{Filter:function(b,a){var 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)},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,e,b){var a=new OpenLayers.Filter.Spatial({type:b});this.readChildNodes(d,a);a.value=a.components[0];delete a.components;e.filters.push(a)},readOgcExpression:function(a){var d={};this.readChildNodes(a,d);var b=d.value;if(b===undefined){b=this.getChildValue(a)}return b},write:function(a){return this.writers.ogc.Filter.apply(this,[a])},writers:{ogc:{Filter:function(d){var e=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],e)}}else{this.writeNode(this.getFilterType(d),d,e)}return e},FeatureId:function(a){return this.createElementNSPlus("ogc:FeatureId",{attributes:{fid:a}})},And:function(d){var e=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,e)}return e},Or:function(d){var e=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,e)}return e},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},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 f=this;if(b){var d=new OpenLayers.Projection("EPSG:4326");if(!d.equals(b)){f=this.clone().transform(b,d)}}var g=0;if(f.components&&(f.components.length>1)){var j,h;for(var e=1,a=f.components.length;e<a;e++){j=f.components[e-1];h=f.components[e];g+=OpenLayers.Util.distVincenty({lon:j.x,lat:j.y},{lon:h.x,lat:h.y})}}return g*1000},CLASS_NAME:"OpenLayers.Geometry.Curve"});OpenLayers.Layer.Text=OpenLayers.Class(OpenLayers.Layer.Markers,{location:null,features:null,formatOptions:null,selectedFeature:null,initialize:function(b,a){OpenLayers.Layer.Markers.prototype.initialize.apply(this,arguments);this.features=new Array()},destroy:function(){OpenLayers.Layer.Markers.prototype.destroy.apply(this,arguments);this.clearFeatures();this.features=null},loadText:function(){if(!this.loaded){if(this.location!=null){var a=function(b){this.events.triggerEvent("loadend")};this.events.triggerEvent("loadstart");OpenLayers.Request.GET({url:this.location,success:this.parseData,failure:a,scope:this});this.loaded=true}}},moveTo:function(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 h=0,j=d.length;h<j;h++){var g={};var r=d[h];var p;var m,e;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){e=new OpenLayers.Pixel(r.style.graphicXOffset,r.style.graphicYOffset)}if(r.style.externalGraphic!=null){g.icon=new OpenLayers.Icon(r.style.externalGraphic,m,e)}else{g.icon=OpenLayers.Marker.defaultIcon();if(m!=null){g.icon.setSize(m)}}if((r.attributes.title!=null)&&(r.attributes.description!=null)){g.popupContentHTML="<h2>"+r.attributes.title+"</h2><p>"+r.attributes.description+"</p>"}g.overflow=r.attributes.overflow||"auto";var a=new OpenLayers.Feature(this,p,g);this.features.push(a);var f=a.createMarker();if((r.attributes.title!=null)&&(r.attributes.description!=null)){f.events.register("click",a,this.markerClick)}this.addMarker(f)}this.events.triggerEvent("loadend")},markerClick:function(b){var e=(this==this.layer.selectedFeature);this.layer.selectedFeature=(!e)?this:null;for(var d=0,a=this.layer.map.popups.length;d<a;d++){this.layer.map.removePopup(this.layer.map.popups[d])}if(!e){this.layer.map.addPopup(this.createPopup())}OpenLayers.Event.stop(b)},clearFeatures:function(){if(this.features!=null){while(this.features.length>0){var a=this.features[0];OpenLayers.Util.removeItem(this.features,a);a.destroy()}}},CLASS_NAME:"OpenLayers.Layer.Text"});OpenLayers.Control.ModifyFeature=OpenLayers.Class(OpenLayers.Control,{geometryTypes:null,clickout:true,toggle:true,standalone:false,layer:null,feature:null,vertices:null,virtualVertices:null,selectControl:null,dragControl:null,handlers:null,deleteCodes:null,virtualStyle:null,mode:null,modified:false,radiusHandle:null,dragHandle:null,onModificationStart:function(){},onModification:function(){},onModificationEnd:function(){},initialize:function(e,d){this.layer=e;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 g=this;var a={geometryTypes:this.geometryTypes,clickout:this.clickout,toggle:this.toggle,onBeforeSelect:this.beforeSelectFeature,onSelect:this.selectFeature,onUnselect:this.unselectFeature,scope:this};if(this.standalone===false){this.selectControl=new OpenLayers.Control.SelectFeature(e,a)}var b={geometryTypes:["OpenLayers.Geometry.Point"],snappingOptions:this.snappingOptions,onStart:function(j,h){g.dragStart.apply(g,[j,h])},onDrag:function(j,h){g.dragVertex.apply(g,[j,h])},onComplete:function(h){g.dragComplete.apply(g,[h])},featureCallbacks:{over:function(h){if(g.standalone!==true||h._sketch||g.feature===h){g.dragControl.overFeature.apply(g.dragControl,[h])}}}};this.dragControl=new OpenLayers.Control.DragFeature(e,b);var f={keydown:this.handleKeypress};this.handlers={keyboard:new OpenLayers.Handler.Keyboard(this,f)}},destroy:function(){this.layer=null;this.standalone||this.selectControl.destroy();this.dragControl.destroy();OpenLayers.Control.prototype.destroy.apply(this,[])},activate:function(){return((this.standalone||this.selectControl.activate())&&this.handlers.keyboard.activate()&&OpenLayers.Control.prototype.activate.apply(this,arguments))},deactivate:function(){var d=false;if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)){this.layer.removeFeatures(this.vertices,{silent:true});this.layer.removeFeatures(this.virtualVertices,{silent:true});this.vertices=[];this.dragControl.deactivate();var a=this.feature;var b=a&&a.geometry&&a.layer;if(this.standalone===false){if(b){this.selectControl.unselect.apply(this.selectControl,[a])}this.selectControl.deactivate()}else{if(b){this.unselectFeature(a)}}this.handlers.keyboard.deactivate();d=true}return d},beforeSelectFeature:function(a){return this.layer.events.triggerEvent("beforefeaturemodified",{feature:a})},selectFeature:function(a){this.feature=a;this.modified=false;this.resetVertices();this.dragControl.activate();this.onModificationStart(this.feature)},unselectFeature:function(a){this.layer.removeFeatures(this.vertices,{silent:true});this.vertices=[];this.layer.destroyFeatures(this.virtualVertices,{silent:true});this.virtualVertices=[];if(this.dragHandle){this.layer.destroyFeatures([this.dragHandle],{silent:true});delete this.dragHandle}if(this.radiusHandle){this.layer.destroyFeatures([this.radiusHandle],{silent:true});delete this.radiusHandle}this.feature=null;this.dragControl.deactivate();this.onModificationEnd(a);this.layer.events.triggerEvent("afterfeaturemodified",{feature:a,modified:this.modified});this.modified=false},dragStart:function(b,a){if(b!=this.feature&&!b.geometry.parent&&b!=this.dragHandle&&b!=this.radiusHandle){if(this.standalone===false&&this.feature){this.selectControl.clickFeature.apply(this.selectControl,[this.feature])}if(this.geometryTypes==null||OpenLayers.Util.indexOf(this.geometryTypes,b.geometry.CLASS_NAME)!=-1){this.standalone||this.selectControl.clickFeature.apply(this.selectControl,[b]);this.dragControl.overFeature.apply(this.dragControl,[b]);this.dragControl.lastPixel=a;this.dragControl.handlers.drag.started=true;this.dragControl.handlers.drag.start=a;this.dragControl.handlers.drag.last=a}}},dragVertex:function(b,a){this.modified=true;if(this.feature.geometry.CLASS_NAME=="OpenLayers.Geometry.Point"){if(this.feature!=b){this.feature=b}this.layer.events.triggerEvent("vertexmodified",{vertex:b.geometry,feature:this.feature,pixel:a})}else{if(b._index){b.geometry.parent.addComponent(b.geometry,b._index);delete b._index;OpenLayers.Util.removeItem(this.virtualVertices,b);this.vertices.push(b)}else{if(b==this.dragHandle){this.layer.removeFeatures(this.vertices,{silent:true});this.vertices=[];if(this.radiusHandle){this.layer.destroyFeatures([this.radiusHandle],{silent:true});this.radiusHandle=null}}else{if(b!==this.radiusHandle){this.layer.events.triggerEvent("vertexmodified",{vertex:b.geometry,feature:this.feature,pixel:a})}}}if(this.virtualVertices.length>0){this.layer.destroyFeatures(this.virtualVertices,{silent:true});this.virtualVertices=[]}this.layer.drawFeature(this.feature,this.standalone?undefined:this.selectControl.renderIntent)}this.layer.drawFeature(b)},dragComplete:function(a){this.resetVertices();this.setFeatureState();this.onModification(this.feature);this.layer.events.triggerEvent("featuremodified",{feature:this.feature})},setFeatureState:function(){if(this.feature.state!=OpenLayers.State.INSERT&&this.feature.state!=OpenLayers.State.DELETE){this.feature.state=OpenLayers.State.UPDATE}},resetVertices:function(){if(this.dragControl.feature){this.dragControl.outFeature(this.dragControl.feature)}if(this.vertices.length>0){this.layer.removeFeatures(this.vertices,{silent:true});this.vertices=[]}if(this.virtualVertices.length>0){this.layer.removeFeatures(this.virtualVertices,{silent:true});this.virtualVertices=[]}if(this.dragHandle){this.layer.destroyFeatures([this.dragHandle],{silent:true});this.dragHandle=null}if(this.radiusHandle){this.layer.destroyFeatures([this.radiusHandle],{silent:true});this.radiusHandle=null}if(this.feature&&this.feature.geometry.CLASS_NAME!="OpenLayers.Geometry.Point"){if((this.mode&OpenLayers.Control.ModifyFeature.DRAG)){this.collectDragHandle()}if((this.mode&(OpenLayers.Control.ModifyFeature.ROTATE|OpenLayers.Control.ModifyFeature.RESIZE))){this.collectRadiusHandle()}if(this.mode&OpenLayers.Control.ModifyFeature.RESHAPE){if(!(this.mode&OpenLayers.Control.ModifyFeature.RESIZE)){this.collectVertices()}}}},handleKeypress:function(a){var b=a.keyCode;if(this.feature&&OpenLayers.Util.indexOf(this.deleteCodes,b)!=-1){var 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.standalone?undefined:this.selectControl.renderIntent);this.resetVertices();this.setFeatureState();this.onModification(this.feature);this.layer.events.triggerEvent("featuremodified",{feature:this.feature})}}},collectVertices:function(){this.vertices=[];this.virtualVertices=[];var a=this;function b(j){var e,f,m,g;if(j.CLASS_NAME=="OpenLayers.Geometry.Point"){f=new OpenLayers.Feature.Vector(j);f._sketch=true;a.vertices.push(f)}else{var d=j.components.length;if(j.CLASS_NAME=="OpenLayers.Geometry.LinearRing"){d-=1}for(e=0;e<d;++e){m=j.components[e];if(m.CLASS_NAME=="OpenLayers.Geometry.Point"){f=new OpenLayers.Feature.Vector(m);f._sketch=true;a.vertices.push(f)}else{b(m)}}if(j.CLASS_NAME!="OpenLayers.Geometry.MultiPoint"){for(e=0,g=j.components.length;e<g-1;++e){var q=j.components[e];var r=j.components[e+1];if(q.CLASS_NAME=="OpenLayers.Geometry.Point"&&r.CLASS_NAME=="OpenLayers.Geometry.Point"){var o=(q.x+r.x)/2;var h=(q.y+r.y)/2;var p=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(o,h),null,a.virtualStyle);p.geometry.parent=j;p._index=e+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 e=this.feature.geometry;var a=e.getBounds().getCenterLonLat();var d=new OpenLayers.Geometry.Point(a.lon,a.lat);var b=new OpenLayers.Feature.Vector(d);d.move=function(f,g){OpenLayers.Geometry.Point.prototype.move.call(this,f,g);e.move(f,g)};b._sketch=true;this.dragHandle=b;this.layer.addFeatures([this.dragHandle],{silent:true})},collectRadiusHandle:function(){var j=this.feature.geometry;var a=j.getBounds();var b=a.getCenterLonLat();var m=new OpenLayers.Geometry.Point(b.lon,b.lat);var h=new OpenLayers.Geometry.Point(a.right,a.bottom);var g=new OpenLayers.Feature.Vector(h);var d=(this.mode&OpenLayers.Control.ModifyFeature.RESIZE);var f=(this.mode&OpenLayers.Control.ModifyFeature.RESHAPE);var e=(this.mode&OpenLayers.Control.ModifyFeature.ROTATE);h.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(e){var p=Math.atan2(z,F);var o=Math.atan2(w,E);var u=o-p;u*=180/Math.PI;j.rotate(u,m)}if(d){var r,B;if(f){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}j.resize(r,m,B)}};g._sketch=true;this.radiusHandle=g;this.layer.addFeatures([this.radiusHandle],{silent:true})},setMap:function(a){this.standalone||this.selectControl.setMap(a);this.dragControl.setMap(a);OpenLayers.Control.prototype.setMap.apply(this,arguments)},CLASS_NAME:"OpenLayers.Control.ModifyFeature"});OpenLayers.Control.ModifyFeature.RESHAPE=1;OpenLayers.Control.ModifyFeature.RESIZE=2;OpenLayers.Control.ModifyFeature.ROTATE=4;OpenLayers.Control.ModifyFeature.DRAG=8;OpenLayers.Geometry.LineString=OpenLayers.Class(OpenLayers.Geometry.Curve,{initialize:function(a){OpenLayers.Geometry.Curve.prototype.initialize.apply(this,arguments)},removeComponent:function(a){if(this.components&&(this.components.length>2)){OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments)}},intersects:function(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,h,f,a,z,w,e,b;outer:for(var m=0,o=v.length;m<o;++m){B=v[m];h=B.x1;f=B.x2;a=B.y1;z=B.y2;inner:for(var g=0,u=r.length;g<u;++g){w=r[g];if(w.x1>f){break}if(w.x2<h){continue}e=w.y1;b=w.y2;if(Math.min(e,b)>Math.max(a,z)){continue}if(Math.max(e,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),f,e;for(var d=0;d<a;++d){f=this.components[d];e=this.components[d+1];if(f.x<e.x){b[d]={x1:f.x,y1:f.y,x2:e.x,y2:e.y}}else{b[d]={x1:e.x,y1:e.y,x2:f.x,y2:f.y}}}function g(j,h){return j.x1-h.x1}return b.sort(g)},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 j=false;var f,e,p;var m,w,D;var g={point:true,tolerance:u};var h=null;for(var q=0,o=C.length-2;q<=o;++q){f=C[q];r.push(f.clone());e=C[q+1];D={x1:f.x,y1:f.y,x2:e.x,y2:e.y};p=OpenLayers.Geometry.segmentsIntersect(z,D,g);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(f)||p.equals(e)){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(f)){continue}}if(p.equals(e)){continue}j=true;if(!p.equals(f)){r.push(p)}a.push(new OpenLayers.Geometry.LineString(r));r=[p.clone()]}}}if(j){r.push(e.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;h={lines:a,points:E.sort(function(G,F){return(v*G.x-v*F.x)||(B*G.y-B*F.y)})}}return h},split:function(F,b){var q=null;var e=b&&b.mutual;var o,f,p,d;if(F instanceof OpenLayers.Geometry.LineString){var E=this.getVertices();var h,g,D,m,a,u;var z=[];p=[];for(var B=0,r=E.length-2;B<=r;++B){h=E[B];g=E[B+1];D={x1:h.x,y1:h.y,x2:g.x,y2:g.y};d=d||[F];if(e){z.push(h.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(e){for(var v=0,C=m.points.length;v<C;++v){u=m.points[v];if(!u.equals(h)){z.push(u);p.push(new OpenLayers.Geometry.LineString(z));if(u.equals(g)){z=[]}else{z=[u.clone()]}}}}}}}if(e&&p.length>0&&z.length>0){z.push(g.clone());p.push(new OpenLayers.Geometry.LineString(z))}}else{q=F.splitWith(this,b)}if(d&&d.length>1){f=true}else{d=[]}if(p&&p.length>1){o=true}else{p=[]}if(f||o){if(e){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,h){var o=!(h&&h.edge===false);var I=o&&h&&h.details;var w,f={};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;f=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){f={distance:f.distance,x0:f.x,y0:f.y,x1:v,y1:u}}else{f=f.distance}}else{if(m instanceof OpenLayers.Geometry.LineString){var e=this.getSortedSegments();var d=m.getSortedSegments();var b,a,r,H,g;var q=d.length;var p={point:true};outer:for(var E=0,F=e.length;E<F;++E){b=e[E];H=b.x1;g=b.y1;for(var D=0;D<q;++D){a=d[D];r=OpenLayers.Geometry.segmentsIntersect(b,a,p);if(r){C=0;f={distance:0,x0:r.x,y0:r.y,x1:r.x,y1:r.y};break outer}else{w=OpenLayers.Geometry.distanceToSegment({x:H,y:g},a);if(w.distance<C){C=w.distance;f={distance:C,x0:H,y0:g,x1:w.x,y1:w.y}}}}}if(!I){f=f.distance}if(C!==0){if(b){w=m.distanceTo(new OpenLayers.Geometry.Point(b.x2,b.y2),h);var B=I?w.distance:w;if(B<C){if(I){f={distance:C,x0:w.x1,y0:w.y1,x1:w.x0,y1:w.y0}}else{f=B}}}}}else{f=m.distanceTo(this,h);if(I){f={distance:f.distance,x0:f.x1,y0:f.y1,x1:f.x0,y1:f.y0}}}}return f},CLASS_NAME:"OpenLayers.Geometry.LineString"});OpenLayers.Control.TransformFeature=OpenLayers.Class(OpenLayers.Control,{EVENT_TYPES:["beforesetfeature","setfeature","beforetransform","transform","transformcomplete"],geometryTypes:null,layer:null,preserveAspectRatio:false,rotate:true,feature:null,renderIntent:"temporary",rotationHandleSymbolizer:null,box:null,center:null,scale:1,ratio:1,rotation:0,handles:null,rotationHandles:null,dragControl:null,initialize:function(b,a){this.EVENT_TYPES=OpenLayers.Control.TransformFeature.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);OpenLayers.Control.prototype.initialize.apply(this,[a]);this.layer=b;if(!this.rotationHandleSymbolizer){this.rotationHandleSymbolizer={stroke:false,pointRadius:10,fillOpacity:0,cursor:"pointer"}}this.createBox();this.createControl()},activate:function(){var a=false;if(OpenLayers.Control.prototype.activate.apply(this,arguments)){this.dragControl.activate();this.layer.addFeatures([this.box]);this.rotate&&this.layer.addFeatures(this.rotationHandles);this.layer.addFeatures(this.handles);a=true}return a},deactivate:function(){var a=false;if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)){this.layer.removeFeatures(this.handles);this.rotate&&this.layer.removeFeatures(this.rotationHandles);this.layer.removeFeatures([this.box]);this.dragControl.deactivate();a=true}return a},setMap:function(a){this.dragControl.setMap(a);OpenLayers.Control.prototype.setMap.apply(this,arguments)},setFeature:function(o,d){d=OpenLayers.Util.applyDefaults(d,{rotation:0,scale:1,ratio:1});var m={feature:o};var f=this.rotation;var a=this.center;OpenLayers.Util.extend(this,d);if(this.events.triggerEvent("beforesetfeature",m)===false){return}this.feature=o;this.activate();this._setfeature=true;var b=this.feature.geometry.getBounds();this.box.move(b.getCenterLonLat());this.box.geometry.rotate(-f,a);this._angle=0;var g;if(this.rotation){var h=o.geometry.clone();h.rotate(-this.rotation,this.center);var e=new OpenLayers.Feature.Vector(h.getBounds().toGeometry());e.geometry.rotate(this.rotation,this.center);this.box.geometry.rotate(this.rotation,this.center);this.box.move(e.geometry.getBounds().getCenterLonLat());var j=e.geometry.components[0].components[0];g=j.getBounds().getCenterLonLat()}else{g=new OpenLayers.LonLat(b.left,b.bottom)}this.handles[0].move(g);delete this._setfeature;this.events.triggerEvent("setfeature",m)},createBox:function(){var f=this;this.center=new OpenLayers.Geometry.Point(0,0);var g=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString([new OpenLayers.Geometry.Point(-1,-1),new OpenLayers.Geometry.Point(0,-1),new OpenLayers.Geometry.Point(1,-1),new OpenLayers.Geometry.Point(1,0),new OpenLayers.Geometry.Point(1,1),new OpenLayers.Geometry.Point(0,1),new OpenLayers.Geometry.Point(-1,1),new OpenLayers.Geometry.Point(-1,0),new OpenLayers.Geometry.Point(-1,-1)]),null,typeof this.renderIntent=="string"?null:this.renderIntent);g.geometry.move=function(u,v){f._moving=true;OpenLayers.Geometry.LineString.prototype.move.apply(this,arguments);f.center.move(u,v);delete f._moving};var a=function(u,v){OpenLayers.Geometry.Point.prototype.move.apply(this,arguments);this._rotationHandle&&this._rotationHandle.geometry.move(u,v);this._handle.geometry.move(u,v)};var r=function(w,u,v){OpenLayers.Geometry.Point.prototype.resize.apply(this,arguments);this._rotationHandle&&this._rotationHandle.geometry.resize(w,u,v);this._handle.geometry.resize(w,u,v)};var p=function(v,u){OpenLayers.Geometry.Point.prototype.rotate.apply(this,arguments);this._rotationHandle&&this._rotationHandle.geometry.rotate(v,u);this._handle.geometry.rotate(v,u)};var j=function(I,G){var N=this.x,K=this.y;OpenLayers.Geometry.Point.prototype.move.call(this,I,G);if(f._moving){return}var L=f.dragControl.handlers.drag.evt;var u=!f._setfeature&&f.preserveAspectRatio;var B=!u&&!(L&&L.shiftKey);var H=new OpenLayers.Geometry.Point(N,K);var E=f.center;this.rotate(-f.rotation,E);H.rotate(-f.rotation,E);var J=this.x-E.x;var C=this.y-E.y;var M=J-(this.x-H.x);var D=C-(this.y-H.y);this.x=N;this.y=K;var w,F=1;if(B){w=Math.abs(D)<0.00001?1:C/D;F=(Math.abs(M)<0.00001?1:(J/M))/w}else{var z=Math.sqrt((M*M)+(D*D));var v=Math.sqrt((J*J)+(C*C));w=v/z}f._moving=true;f.box.geometry.rotate(-f.rotation,E);delete f._moving;f.box.geometry.resize(w,E,F);f.box.geometry.rotate(f.rotation,E);f.transformFeature({scale:w,ratio:F})};var d=function(F,D){var L=this.x,I=this.y;OpenLayers.Geometry.Point.prototype.move.call(this,F,D);if(f._moving){return}var J=f.dragControl.handlers.drag.evt;var E=(J&&J.shiftKey)?45:1;var C=f.center;var H=this.x-C.x;var z=this.y-C.y;var K=H-F;var B=z-D;this.x=L;this.y=I;var v=Math.atan2(B,K);var u=Math.atan2(z,H);var w=u-v;w*=180/Math.PI;f._angle=(f._angle+w)%360;var G=f.rotation%E;if(Math.abs(f._angle)>=E||G!==0){w=Math.round(f._angle/E)*E-G;f._angle=0;f.box.geometry.rotate(w,C);f.transformFeature({rotation:w})}};var q=new Array(8);var m=new Array(4);var o,h,b;for(var e=0;e<8;++e){o=g.geometry.components[e];h=new OpenLayers.Feature.Vector(o.clone(),null,typeof this.renderIntent=="string"?null:this.renderIntent);if(e%2==0){b=new OpenLayers.Feature.Vector(o.clone(),null,typeof this.rotationHandleSymbolizer=="string"?null:this.rotationHandleSymbolizer);b.geometry.move=d;o._rotationHandle=b;m[e/2]=b}o.move=a;o.resize=r;o.rotate=p;h.geometry.move=j;o._handle=h;q[e]=h}this.box=g;this.rotationHandles=m;this.handles=q},createControl:function(){var a=this;this.dragControl=new OpenLayers.Control.DragFeature(this.layer,{documentDrag:true,moveFeature:function(b){if(this.feature===a.feature){this.feature=a.box}OpenLayers.Control.DragFeature.prototype.moveFeature.apply(this,arguments)},onDrag:function(d,b){if(d===a.box){a.transformFeature({center:a.center});a.drawHandles()}},onStart:function(f,d){var b=!a.geometryTypes||OpenLayers.Util.indexOf(a.geometryTypes,f.geometry.CLASS_NAME)!==-1;var e=OpenLayers.Util.indexOf(a.handles,f);e+=OpenLayers.Util.indexOf(a.rotationHandles,f);if(f!==a.feature&&f!==a.box&&e==-2&&b){a.setFeature(f)}},onComplete:function(d,b){a.events.triggerEvent("transformcomplete",{feature:a.feature})}})},drawHandles:function(){var b=this.layer;for(var a=0;a<8;++a){if(this.rotate&&a%2===0){b.drawFeature(this.rotationHandles[a/2],this.rotationHandleSymbolizer)}b.drawFeature(this.handles[a],this.renderIntent)}},transformFeature:function(f){if(!this._setfeature){this.scale*=(f.scale||1);this.ratio*=(f.ratio||1);var b=this.rotation;this.rotation=(this.rotation+(f.rotation||0))%360;if(this.events.triggerEvent("beforetransform",f)!==false){var e=this.feature;var d=e.geometry;var a=this.center;d.rotate(-b,a);if(f.scale||f.ratio){d.resize(f.scale,a,f.ratio)}else{if(f.center){e.move(f.center.getBounds().getCenterLonLat())}}d.rotate(this.rotation,a);this.layer.drawFeature(e);e.toState(OpenLayers.State.UPDATE);this.events.triggerEvent("transform",f)}}this.layer.drawFeature(this.box,this.renderIntent);this.drawHandles()},destroy:function(){var b;for(var a=0;a<8;++a){b=this.box.geometry.components[a];b._handle.destroy();b._handle=null;b._rotationHandle&&b._rotationHandle.destroy();b._rotationHandle=null}this.box.destroy();this.box=null;this.layer=null;this.dragControl.destroy();OpenLayers.Control.prototype.destroy.apply(this,arguments)},CLASS_NAME:"OpenLayers.Control.TransformFeature"});OpenLayers.Format.GPX=OpenLayers.Class(OpenLayers.Format.XML,{extractWaypoints:true,extractTracks:true,extractRoutes:true,extractAttributes:true,initialize:function(a){this.externalProjection=new OpenLayers.Projection("EPSG:4326");OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},read:function(E){if(typeof E=="string"){E=OpenLayers.Format.XML.prototype.read.apply(this,[E])}var d=[];if(this.extractTracks){var z=E.getElementsByTagName("trk");for(var w=0,B=z.length;w<B;w++){var p={};if(this.extractAttributes){p=this.parseAttributes(z[w])}var m=this.getElementsByTagNameNS(z[w],z[w].namespaceURI,"trkseg");for(var v=0,h=m.length;v<h;v++){var o=this.extractSegment(m[v],"trkpt");d.push(new OpenLayers.Feature.Vector(o,p))}}}if(this.extractRoutes){var a=E.getElementsByTagName("rte");for(var u=0,r=a.length;u<r;u++){var p={};if(this.extractAttributes){p=this.parseAttributes(a[u])}var D=this.extractSegment(a[u],"rtept");d.push(new OpenLayers.Feature.Vector(D,p))}}if(this.extractWaypoints){var b=E.getElementsByTagName("wpt");for(var q=0,B=b.length;q<B;q++){var p={};if(this.extractAttributes){p=this.parseAttributes(b[q])}var f=new OpenLayers.Geometry.Point(b[q].getAttribute("lon"),b[q].getAttribute("lat"));d.push(new OpenLayers.Feature.Vector(f,p))}}if(this.internalProjection&&this.externalProjection){for(var C=0,e=d.length;C<e;C++){d[C].geometry.transform(this.externalProjection,this.internalProjection)}}return d},extractSegment:function(f,g){var e=this.getElementsByTagNameNS(f,f.namespaceURI,g);var b=[];for(var d=0,a=e.length;d<a;d++){b.push(new OpenLayers.Geometry.Point(e[d].getAttribute("lon"),e[d].getAttribute("lat")))}return new OpenLayers.Geometry.LineString(b)},parseAttributes:function(b){var a={};var e=b.firstChild;while(e){if(e.nodeType==1){var d=e.firstChild;if(d.nodeType==3||d.nodeType==4){name=(e.prefix)?e.nodeName.split(":")[1]:e.nodeName;if(name!="trkseg"&&name!="rtept"){a[name]=d.nodeValue}}}e=e.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 e=this.components.pop();if(b!=null||!a.equals(e)){d=OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,arguments)}var f=this.components[0];OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,[f]);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,e){for(var d=0,a=this.components.length;d<a-1;d++){this.components[d].move(b,e)}},rotate:function(e,b){for(var d=0,a=this.components.length;d<a-1;++d){this.components[d].rotate(e,b)}},resize:function(f,b,e){for(var d=0,a=this.components.length;d<a-1;++d){this.components[d].resize(f,b,e)}return this},transform:function(f,d){if(f&&d){for(var e=0,a=this.components.length;e<a-1;e++){var b=this.components[e];b.transform(f,d)}this.bounds=null}return this},getCentroid:function(){if(this.components&&(this.components.length>2)){var h=0;var g=0;for(var e=0;e<this.components.length-1;e++){var d=this.components[e];var m=this.components[e+1];h+=(d.x+m.x)*(d.x*m.y-m.x*d.y);g+=(d.y+m.y)*(d.x*m.y-m.x*d.y)}var f=-1*this.getArea();var a=h/(6*f);var j=g/(6*f);return new OpenLayers.Geometry.Point(a,j)}else{return null}},getArea:function(){var g=0;if(this.components&&(this.components.length>2)){var f=0;for(var e=0,d=this.components.length;e<d-1;e++){var a=this.components[e];var h=this.components[e+1];f+=(a.x+h.x)*(h.y-a.y)}g=-f/2}return g},getGeodesicArea:function(b){var e=this;if(b){var d=new OpenLayers.Projection("EPSG:4326");if(!d.equals(b)){e=this.clone().transform(b,d)}}var g=0;var a=e.components&&e.components.length;if(a>2){var j,h;for(var f=0;f<a-1;f++){j=e.components[f];h=e.components[f+1];g+=OpenLayers.Util.rad(h.x-j.x)*(2+Math.sin(OpenLayers.Util.rad(j.y))+Math.sin(OpenLayers.Util.rad(h.y)))}g=g*6378137*6378137/2}return g},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 h,g,w,e,u,b,f,d;var j=0;for(var r=0;r<a;++r){h=this.components[r];w=B(h.x,p);e=B(h.y,p);g=this.components[r+1];u=B(g.x,p);b=B(g.y,p);if(e==b){if(m==e){if(w<=u&&(o>=w&&o<=u)||w>=u&&(o<=w&&o>=u)){j=-1;break}}continue}f=B(z(m,w,e,u,b),p);if(f==o){if(e<b&&(m>=e&&m<=b)||e>b&&(m<=e&&m>=b)){j=-1;break}}if(f<=o){continue}if(w!=u&&(f<Math.min(w,u)||f>Math.max(w,u))){continue}if(e<b&&(m>=e&&m<b)||e>b&&(m<e&&m>=b)){++j}}var v=(j==-1)?1:!!(j&1);return v},intersects:function(e){var b=false;if(e.CLASS_NAME=="OpenLayers.Geometry.Point"){b=this.containsPoint(e)}else{if(e.CLASS_NAME=="OpenLayers.Geometry.LineString"){b=e.intersects(this)}else{if(e.CLASS_NAME=="OpenLayers.Geometry.LinearRing"){b=OpenLayers.Geometry.LineString.prototype.intersects.apply(this,[e])}else{for(var d=0,a=e.components.length;d<a;++d){b=e.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 h=null;var w=z&&z.mutual;var r,a,v,p,b;var f=[];var u=[q];for(var g=0,m=this.components.length;g<m;++g){a=this.components[g];p=false;for(var e=0;e<u.length;++e){r=a.split(u[e],z);if(r){if(w){v=r[0];for(var d=0,o=v.length;d<o;++d){if(d===0&&f.length){f[f.length-1].addComponent(v[d])}else{f.push(new OpenLayers.Geometry.MultiLineString([v[d]]))}}p=true;r=r[1]}if(r.length){r.unshift(e,1);Array.prototype.splice.apply(u,r);break}}}if(!p){if(f.length){f[f.length-1].addComponent(a.clone())}else{f=[new OpenLayers.Geometry.MultiLineString(a.clone())]}}}if(f&&f.length>1){p=true}else{f=[]}if(u&&u.length>1){b=true}else{u=[]}if(p||b){if(w){h=[f,u]}else{h=u}}return h},splitWith:function(q,z){var h=null;var w=z&&z.mutual;var r,d,v,p,a,f,u;if(q instanceof OpenLayers.Geometry.LineString){u=[];f=[q];for(var g=0,m=this.components.length;g<m;++g){a=false;d=this.components[g];for(var e=0;e<f.length;++e){r=f[e].split(d,z);if(r){if(w){v=r[0];if(v.length){v.unshift(e,1);Array.prototype.splice.apply(f,v);e+=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{h=q.split(this)}if(f&&f.length>1){p=true}else{f=[]}if(u&&u.length>1){a=true}else{u=[]}if(p||a){if(w){h=[f,u]}else{h=u}}return h},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,e){for(var b=0,a=d.length;b<a;++b){if(d[b].geometry===e){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){var m=false;var g=false;if(!this.sourceFilter||this.sourceFilter.evaluate(d.attributes)){var h=this.layer&&this.layer.features||[];var G,u,a;var p=[],F=[];var e=(this.layer===this.source)&&this.mutual;var b={edge:this.edge,tolerance:this.tolerance,mutual:e};var o=[d.geometry];var r,f;var w,v;for(var D=0,E=h.length;D<E;++D){r=h[D];if(this.isEligible(r)){f=[r.geometry];for(var C=0;C<o.length;++C){w=o[C];for(var z=0;z<f.length;++z){G=f[z];if(w.getBounds().intersectsBounds(G.getBounds())){u=w.split(G,b);if(u){a=this.events.triggerEvent("beforesplit",{source:d,target:r});if(a!==false){if(e){v=u[0];if(v.length>1){v.unshift(C,1);Array.prototype.splice.apply(o,v);C+=v.length-3}u=u[1]}if(u.length>1){u.unshift(z,1);Array.prototype.splice.apply(f,u);z+=u.length-3}}}}}}if(f&&f.length>1){this.geomsToFeatures(r,f);this.events.triggerEvent("split",{original:r,features:f});Array.prototype.push.apply(p,f);F.push(r);g=true}}}if(o&&o.length>1){this.geomsToFeatures(d,o);this.events.triggerEvent("split",{original:d,features:o});Array.prototype.push.apply(p,o);F.push(d);m=true}if(m||g){if(this.deferDelete){var q,B=[];for(var D=0,E=F.length;D<E;++D){q=F[D];if(q.state===OpenLayers.State.INSERT){B.push(q)}else{q.state=OpenLayers.State.DELETE;this.layer.drawFeature(q)}}this.layer.destroyFeatures(B,{silent:true});for(var D=0,E=p.length;D<E;++D){p[D].state=OpenLayers.State.INSERT}}else{this.layer.destroyFeatures(F,{silent:true})}this.layer.addFeatures(p,{silent:true});this.events.triggerEvent("aftersplit",{source:d,features:p})}}return m},geomsToFeatures:function(d,e){var g=d.clone();delete g.geometry;var f;for(var b=0,a=e.length;b<a;++b){f=g.clone();f.geometry=e[b];f.state=OpenLayers.State.INSERT;e[b]=f}},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 e=0;if(this.components&&(this.components.length>0)){e+=Math.abs(this.components[0].getGeodesicArea(b));for(var d=1,a=this.components.length;d<a;d++){e-=Math.abs(this.components[d].getGeodesicArea(b))}}return e},containsPoint:function(a){var f=this.components.length;var d=false;if(f>0){d=this.components[0].containsPoint(a);if(d!==1){if(d&&f>1){var e;for(var b=1;b<f;++b){e=this.components[b].containsPoint(a);if(e){if(e===1){d=1}else{d=false}break}}}}}return d},intersects:function(f){var b=false;var e,a;if(f.CLASS_NAME=="OpenLayers.Geometry.Point"){b=this.containsPoint(f)}else{if(f.CLASS_NAME=="OpenLayers.Geometry.LineString"||f.CLASS_NAME=="OpenLayers.Geometry.LinearRing"){for(e=0,a=this.components.length;e<a;++e){b=f.intersects(this.components[e]);if(b){break}}if(!b){for(e=0,a=f.components.length;e<a;++e){b=this.containsPoint(f.components[e]);if(b){break}}}}else{for(e=0,a=f.components.length;e<a;++e){b=this.intersects(f.components[e]);if(b){break}}}}if(!b&&f.CLASS_NAME=="OpenLayers.Geometry.Polygon"){var d=this.components[0];for(e=0,a=d.components.length;e<a;++e){b=f.containsPoint(d.components[e]);if(b){break}}}return b},distanceTo:function(e,b){var d=!(b&&b.edge===false);var a;if(!d&&this.intersects(e)){a=0}else{a=OpenLayers.Geometry.Collection.prototype.distanceTo.apply(this,[e,b])}return a},CLASS_NAME:"OpenLayers.Geometry.Polygon"});OpenLayers.Geometry.Polygon.createRegularPolygon=function(m,g,b,p){var d=Math.PI*((1/b)-(1/2));if(p){d+=(p/180)*Math.PI}var a,j,h;var o=[];for(var f=0;f<b;++f){a=d+(f*2*Math.PI/b);j=m.x+(g*Math.cos(a));h=m.y+(g*Math.sin(a));o.push(new OpenLayers.Geometry.Point(j,h))}var e=new OpenLayers.Geometry.LinearRing(o);return new OpenLayers.Geometry.Polygon([e])};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 h=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 e=this.getElementsByTagNameNS(r,this.georssns,"box");if(q.length>0||(h.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(h[0].firstChild.nodeValue),parseFloat(a[0].firstChild.nodeValue)]}var j=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 f=[];var q;for(var b=0,g=m.length;b<g;b+=2){q=new OpenLayers.Geometry.Point(parseFloat(m[b+1]),parseFloat(m[b]));f.push(q)}j=new OpenLayers.Geometry.LineString(f)}else{if(o.length>0){var m=OpenLayers.String.trim(this.concatChildValues(o[0])).split(/\s+/);var f=[];var q;for(var b=0,g=m.length;b<g;b+=2){q=new OpenLayers.Geometry.Point(parseFloat(m[b+1]),parseFloat(m[b]));f.push(q)}j=new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing(f)])}else{if(d.length>0){if(!this.gmlParser){this.gmlParser=new OpenLayers.Format.GML({xy:this.xy})}var u=this.gmlParser.parseFeature(d[0]);j=u.geometry}else{if(e.length>0){var m=OpenLayers.String.trim(e[0].firstChild.nodeValue).split(/\s+/);var f=[];var q;if(m.length>3){q=new OpenLayers.Geometry.Point(parseFloat(m[1]),parseFloat(m[0]));f.push(q);q=new OpenLayers.Geometry.Point(parseFloat(m[1]),parseFloat(m[2]));f.push(q);q=new OpenLayers.Geometry.Point(parseFloat(m[3]),parseFloat(m[2]));f.push(q);q=new OpenLayers.Geometry.Point(parseFloat(m[3]),parseFloat(m[0]));f.push(q);q=new OpenLayers.Geometry.Point(parseFloat(m[1]),parseFloat(m[0]));f.push(q)}j=new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing(f)])}}}}}if(j&&this.internalProjection&&this.externalProjection){j.transform(this.externalProjection,this.internalProjection)}return j},createFeatureFromItem:function(m){var f=this.createGeometryFromItem(m);var h=this.getChildValue(m,"*","title",this.featureTitle);var j=this.getChildValue(m,"*","description",this.getChildValue(m,"*","content",this.getChildValue(m,"*","summary",this.featureDescription)));var g=this.getChildValue(m,"*","link");if(!g){try{g=this.getElementsByTagNameNS(m,"*","link")[0].getAttribute("href")}catch(d){g=null}}var a=this.getChildValue(m,"*","id",null);var b={title:h,description:j,link:g};var o=new OpenLayers.Feature.Vector(f,b);o.fid=a;return o},getChildValue:function(e,b,d,g){var f;var a=this.getElementsByTagNameNS(e,b,d);if(a&&a[0]&&a[0].firstChild&&a[0].firstChild.nodeValue){f=a[0].firstChild.nodeValue}else{f=(g==undefined)?"":g}return f},read:function(f){if(typeof f=="string"){f=OpenLayers.Format.XML.prototype.read.apply(this,[f])}var a=null;a=this.getElementsByTagNameNS(f,"*","item");if(a.length==0){a=this.getElementsByTagNameNS(f,"*","entry")}var d=a.length;var e=new Array(d);for(var b=0;b<d;b++){e[b]=this.createFeatureFromItem(a[b])}return e},write:function(d){var e;if(d instanceof Array){e=this.createElementNS(this.rssns,"rss");for(var b=0,a=d.length;b<a;b++){e.appendChild(this.createFeatureXML(d[b]))}}else{e=this.createFeatureXML(d)}return OpenLayers.Format.XML.prototype.write.apply(this,[e])},createFeatureXML:function(o){var g=this.buildGeometryNode(o.geometry);var a=this.createElementNS(this.rssns,"item");var e=this.createElementNS(this.rssns,"title");e.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(e);a.appendChild(b);if(o.attributes.link){var j=this.createElementNS(this.rssns,"link");j.appendChild(this.createTextNode(o.attributes.link));a.appendChild(j)}for(var m in o.attributes){if(m=="link"||m=="title"||m=="description"){continue}var h=this.createTextNode(o.attributes[m]);var f=m;if(m.search(":")!=-1){f=m.split(":")[1]}var d=this.createElementNS(this.featureNS,"feature:"+f);d.appendChild(h);a.appendChild(d)}a.appendChild(g);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(g){var d=null;if(g.components){d=g.components}var f;if(d){var b=d.length;var e=new Array(b);for(var a=0;a<b;a++){e[a]=d[a].y+" "+d[a].x}f=e.join(" ")}else{f=g.y+" "+g.x}return this.createTextNode(f)},CLASS_NAME:"OpenLayers.Format.GeoRSS"});OpenLayers.Format.KML=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{kml:"http://www.opengis.net/kml/2.2",gx:"http://www.google.com/kml/ext/2.2"},kmlns:"http://earth.google.com/kml/2.0",placemarksDesc:"No description available",foldersName:"OpenLayers export",foldersDesc:"Exported on "+new Date(),extractAttributes:true,extractStyles:false,extractTracks:false,trackAttributes:null,internalns:null,features:null,styles:null,styleBaseUrl:"",fetched:null,maxDepth:0,initialize:function(a){this.regExes={trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g),kmlColor:(/(\w{2})(\w{2})(\w{2})(\w{2})/),kmlIconPalette:(/root:\/\/icons\/palette-(\d+)(\.\w+)/),straightBracket:(/\$\[(.*?)\]/g)};this.externalProjection=new OpenLayers.Projection("EPSG:4326");OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},read:function(b){this.features=[];this.styles={};this.fetched={};var a={depth:0,styleBaseUrl:this.styleBaseUrl};return this.parseData(b,a)},parseData:function(h,d){if(typeof h=="string"){h=OpenLayers.Format.XML.prototype.read.apply(this,[h])}var f=["Link","NetworkLink","Style","StyleMap","Placemark"];for(var e=0,a=f.length;e<a;++e){var g=f[e];var b=this.getElementsByTagNameNS(h,"*",g);if(b.length==0){continue}switch(g.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,e){if(e.depth>=this.maxDepth){return false}var h=OpenLayers.Util.extend({},e);h.depth++;for(var f=0,a=d.length;f<a;f++){var b=this.parseProperty(d[f],"*","href");if(b&&!this.fetched[b]){this.fetched[b]=true;var g=this.fetchLink(b);if(g){this.parseData(g,h)}}}},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){var e=(d.styleBaseUrl||"")+"#"+g.id;this.styles[e]=g}}},parseKmlColor:function(b){var a=null;if(b){var d=b.match(this.regExes.kmlColor);if(d){a={color:"#"+d[4]+d[3]+d[2],opacity:parseInt(d[1],16)/255}}}return a},parseStyle:function(G){var O={};var z=["LineStyle","PolyStyle","IconStyle","BalloonStyle","LabelStyle"];var f,R,j,e;for(var L=0,N=z.length;L<N;++L){f=z[L];styleTypeNode=this.getElementsByTagNameNS(G,"*",f)[0];if(!styleTypeNode){continue}switch(f.toLowerCase()){case"linestyle":var d=this.parseProperty(styleTypeNode,"*","color");var I=this.parseKmlColor(d);if(I){O.strokeColor=I.color;O.strokeOpacity=I.opacity}var F=this.parseProperty(styleTypeNode,"*","width");if(F){O.strokeWidth=F}break;case"polystyle":var d=this.parseProperty(styleTypeNode,"*","color");var I=this.parseKmlColor(d);if(I){O.fillOpacity=I.opacity;O.fillColor=I.color}var J=this.parseProperty(styleTypeNode,"*","fill");if(J=="0"){O.fillColor="none"}var m=this.parseProperty(styleTypeNode,"*","outline");if(m=="0"){O.strokeWidth="0"}break;case"iconstyle":var T=parseFloat(this.parseProperty(styleTypeNode,"*","scale")||1);var F=32*T;var D=32*T;var S=this.getElementsByTagNameNS(styleTypeNode,"*","Icon")[0];if(S){var K=this.parseProperty(S,"*","href");if(K){var v=this.parseProperty(S,"*","w");var M=this.parseProperty(S,"*","h");var g="http://maps.google.com/mapfiles/kml";if(OpenLayers.String.startsWith(K,g)&&!v&&!M){v=64;M=64;T=T/2}v=v||M;M=M||v;if(v){F=parseInt(v)*T}if(M){D=parseInt(M)*T}var b=K.match(this.regExes.kmlIconPalette);if(b){var P=b[1];var C=b[2];var u=this.parseProperty(S,"*","x");var r=this.parseProperty(S,"*","y");var q=u?u/32:0;var p=r?(7-r/32):7;var o=p*8+q;K="http://maps.google.com/mapfiles/kml/pal"+P+"/icon"+o+C}O.graphicOpacity=1;O.externalGraphic=K}}var B=this.getElementsByTagNameNS(styleTypeNode,"*","hotSpot")[0];if(B){var u=parseFloat(B.getAttribute("x"));var r=parseFloat(B.getAttribute("y"));var H=B.getAttribute("xunits");if(H=="pixels"){O.graphicXOffset=-u*T}else{if(H=="insetPixels"){O.graphicXOffset=-F+(u*T)}else{if(H=="fraction"){O.graphicXOffset=-F*u}}}var Q=B.getAttribute("yunits");if(Q=="pixels"){O.graphicYOffset=-D+(r*T)+1}else{if(Q=="insetPixels"){O.graphicYOffset=-(r*T)+1}else{if(Q=="fraction"){O.graphicYOffset=-D*(1-r)+1}}}}O.graphicWidth=F;O.graphicHeight=D;break;case"balloonstyle":var a=OpenLayers.Util.getXmlNodeValue(styleTypeNode);if(a){O.balloonStyle=a.replace(this.regExes.straightBracket,"${$1}")}break;case"labelstyle":var d=this.parseProperty(styleTypeNode,"*","color");var I=this.parseKmlColor(d);if(I){O.fontColor=I.color;O.fontOpacity=I.opacity}break;default:}}if(!O.strokeColor&&O.fillColor){O.strokeColor=O.fillColor}var E=G.getAttribute("id");if(E&&O){O.id=E}return O},parseStyleMaps:function(a,r){for(var h=0,m=a.length;h<m;h++){var e=a[h];var d=this.getElementsByTagNameNS(e,"*","Pair");var b=e.getAttribute("id");for(var g=0,q=d.length;g<q;g++){var f=d[g];var p=this.parseProperty(f,"*","key");var o=this.parseProperty(f,"*","styleUrl");if(o&&p=="normal"){this.styles[(r.styleBaseUrl||"")+"#"+b]=this.styles[(r.styleBaseUrl||"")+o]}if(o&&p=="highlight"){}}}},parseFeatures:function(b,q){var g=[];for(var h=0,j=b.length;h<j;h++){var d=b[h];var p=this.parseFeature.apply(this,[d]);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(d,"*","Style")[0];if(o){var f=this.parseStyle(o);if(f){p.style=OpenLayers.Util.extend(p.style,f)}}}if(this.extractTracks){var m=this.getElementsByTagNameNS(d,this.namespaces.gx,"Track");if(m&&m.length>0){var e=m[0];var a={features:[],feature:p};this.readNode(e,a);if(a.features.length>0){g.push.apply(g,a.features)}}}else{g.push(p)}}else{throw"Bad Placemark: "+h}}this.features=this.features.concat(g)},readers:{kml:{when:function(b,a){a.whens.push(OpenLayers.Date.parse(this.getChildValue(b)))},_trackPointAttribute:function(d,a){var b=d.nodeName.split(":").pop();a.attributes[b].push(this.getChildValue(d))}},gx:{Track:function(d,b){var f={whens:[],points:[],angles:[]};if(this.trackAttributes){var a;f.attributes={};for(var g=0,q=this.trackAttributes.length;g<q;++g){a=this.trackAttributes[g];f.attributes[a]=[];if(!(a in this.readers.kml)){this.readers.kml[a]=this.readers.kml._trackPointAttribute}}}this.readChildNodes(d,f);if(f.whens.length!==f.points.length){throw new Error("gx:Track with unequal number of when ("+f.whens.length+") and gx:coord ("+f.points.length+") elements.")}var o=f.angles.length>0;if(o&&f.whens.length!==f.angles.length){throw new Error("gx:Track with unequal number of when ("+f.whens.length+") and gx:angles ("+f.angles.length+") elements.")}var r,p,m;for(var g=0,q=f.whens.length;g<q;++g){r=b.feature.clone();r.fid=b.feature.fid||b.feature.id;p=f.points[g];r.geometry=p;if("z" in p){r.attributes.altitude=p.z}if(this.internalProjection&&this.externalProjection){r.geometry.transform(this.externalProjection,this.internalProjection)}if(this.trackAttributes){for(var e=0,h=this.trackAttributes.length;e<h;++e){r.attributes[a]=f.attributes[this.trackAttributes[e]][g]}}r.attributes.when=f.whens[g];r.attributes.trackId=b.feature.id;if(o){m=f.angles[g];r.attributes.heading=parseFloat(m[0]);r.attributes.tilt=parseFloat(m[1]);r.attributes.roll=parseFloat(m[2])}b.features.push(r)}},coord:function(d,b){var f=this.getChildValue(d);var e=f.replace(this.regExes.trimSpace,"").split(/\s+/);var a=new OpenLayers.Geometry.Point(e[0],e[1]);if(e.length>2){a.z=parseFloat(e[2])}b.points.push(a)},angles:function(b,a){var e=this.getChildValue(b);var d=e.replace(this.regExes.trimSpace,"").split(/\s+/);a.angles.push(d)}}},parseFeature:function(b){var d=["MultiGeometry","Polygon","LineString","Point"];var m,f,o,a;for(var h=0,j=d.length;h<j;++h){m=d[h];this.internalns=b.namespaceURI?b.namespaceURI:this.kmlns;f=this.getElementsByTagNameNS(b,this.internalns,m);if(f.length>0){var a=this.parseGeometry[m.toLowerCase()];if(a){o=a.apply(this,[f[0]]);if(this.internalProjection&&this.externalProjection){o.transform(this.externalProjection,this.internalProjection)}}else{OpenLayers.Console.error(OpenLayers.i18n("unsupportedGeometryType",{geomType:m}))}break}}var g;if(this.extractAttributes){g=this.parseAttributes(b)}var p=new OpenLayers.Feature.Vector(o,g);var e=b.getAttribute("id")||b.getAttribute("name");if(e!=null){p.fid=e}return p},getStyle:function(b,a){var d=OpenLayers.Util.removeTail(b);var g=OpenLayers.Util.extend({},a);g.depth++;g.styleBaseUrl=d;if(!this.styles[b]&&!OpenLayers.String.startsWith(b,"#")&&g.depth<=this.maxDepth&&!this.fetched[d]){var f=this.fetchLink(d);if(f){this.parseData(f,g)}}var e=OpenLayers.Util.extend({},this.styles[b]);return e},parseGeometry:{point:function(e){var d=this.getElementsByTagNameNS(e,this.internalns,"coordinates");var f=[];if(d.length>0){var b=d[0].firstChild.nodeValue;b=b.replace(this.regExes.removeSpace,"");f=b.split(",")}var a=null;if(f.length>1){if(f.length==2){f[2]=null}a=new OpenLayers.Geometry.Point(f[0],f[1],f[2])}else{throw"Bad coordinate string: "+b}return a},linestring:function(d,f){var e=this.getElementsByTagNameNS(d,this.internalns,"coordinates");var p=null;if(e.length>0){var b=this.getChildValue(e[0]);b=b.replace(this.regExes.trimSpace,"");b=b.replace(this.regExes.trimComma,",");var a=b.split(this.regExes.splitSpace);var j=a.length;var o=new Array(j);var m,h;for(var g=0;g<j;++g){m=a[g].split(",");h=m.length;if(h>1){if(m.length==2){m[2]=null}o[g]=new OpenLayers.Geometry.Point(m[0],m[1],m[2])}else{throw"Bad LineString point coordinates: "+a[g]}}if(j){if(f){p=new OpenLayers.Geometry.LinearRing(o)}else{p=new OpenLayers.Geometry.LineString(o)}}else{throw"Bad LineString coordinates: "+b}}return p},polygon:function(g){var d=this.getElementsByTagNameNS(g,this.internalns,"LinearRing");var h=d.length;var f=new Array(h);if(h>0){var b;for(var e=0,a=d.length;e<a;++e){b=this.parseGeometry.linestring.apply(this,[d[e],true]);if(b){f[e]=b}else{throw"Bad LinearRing geometry: "+e}}}return new OpenLayers.Geometry.Polygon(f)},multigeometry:function(f){var j,h;var g=[];var d=f.childNodes;for(var b=0,a=d.length;b<a;++b){j=d[b];if(j.nodeType==1){var e=(j.prefix)?j.nodeName.split(":")[1]:j.nodeName;var h=this.parseGeometry[e.toLowerCase()];if(h){g.push(h.apply(this,[j]))}}}return new OpenLayers.Geometry.Collection(g)}},parseAttributes:function(e){var g={};var j=e.getElementsByTagName("ExtendedData");if(j.length){g=this.parseExtendedData(j[0])}var b,r,q;var d=e.childNodes;for(var m=0,o=d.length;m<o;++m){b=d[m];if(b.nodeType==1){r=b.childNodes;if(r.length>=1&&r.length<=3){var q;switch(r.length){case 1:q=r[0];break;case 2:var h=r[0];var f=r[1];q=(h.nodeType==3||h.nodeType==4)?h:f;break;case 3:default:q=r[1];break}if(q.nodeType==3||q.nodeType==4){var a=(b.prefix)?b.nodeName.split(":")[1]:b.nodeName;var p=OpenLayers.Util.getXmlNodeValue(q);if(p){p=p.replace(this.regExes.trimSpace,"");g[a]=p}}}}}return g},parseExtendedData:function(b){var e={};var g,j,f,o;var d=b.getElementsByTagName("Data");for(g=0,j=d.length;g<j;g++){f=d[g];o=f.getAttribute("name");var h={};var p=f.getElementsByTagName("value");if(p.length){h.value=this.getChildValue(p[0])}var a=f.getElementsByTagName("displayName");if(a.length){h.displayName=this.getChildValue(a[0])}e[o]=h}var m=b.getElementsByTagName("SimpleData");for(g=0,j=m.length;g<j;g++){var h={};f=m[g];o=f.getAttribute("name");h.value=this.getChildValue(f);h.displayName=o;e[o]=h}return e},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(e){if(!(e instanceof Array)){e=[e]}var b=this.createElementNS(this.kmlns,"kml");var f=this.createFolderXML();for(var d=0,a=e.length;d<a;++d){f.appendChild(this.createPlacemarkXML(e[d]))}b.appendChild(f);return OpenLayers.Format.XML.prototype.write.apply(this,[b])},createFolderXML:function(){var d=this.createElementNS(this.kmlns,"Folder");if(this.foldersName){var f=this.createElementNS(this.kmlns,"name");var e=this.createTextNode(this.foldersName);f.appendChild(e);d.appendChild(f)}if(this.foldersDesc){var a=this.createElementNS(this.kmlns,"description");var b=this.createTextNode(this.foldersDesc);a.appendChild(b);d.appendChild(a)}return d},createPlacemarkXML:function(f){var h=this.createElementNS(this.kmlns,"name");var d=f.style&&f.style.label?f.style.label:f.attributes.name||f.id;h.appendChild(this.createTextNode(d));var e=this.createElementNS(this.kmlns,"description");var g=f.attributes.description||this.placemarksDesc;e.appendChild(this.createTextNode(g));var b=this.createElementNS(this.kmlns,"Placemark");if(f.fid!=null){b.setAttribute("id",f.fid)}b.appendChild(h);b.appendChild(e);var a=this.buildGeometryNode(f.geometry);b.appendChild(a);return b},buildGeometryNode:function(f){if(this.internalProjection&&this.externalProjection){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()];var e=null;if(a){e=a.apply(this,[f])}return e},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(j){var b=this.createElementNS(this.kmlns,"Polygon");var h=j.components;var f,g,e;for(var d=0,a=h.length;d<a;++d){e=(d==0)?"outerBoundaryIs":"innerBoundaryIs";f=this.createElementNS(this.kmlns,e);g=this.buildGeometry.linearring.apply(this,[h[d]]);f.appendChild(g);b.appendChild(f)}return b},multipolygon:function(a){return this.buildGeometry.collection.apply(this,[a])},collection:function(e){var b=this.createElementNS(this.kmlns,"MultiGeometry");var f;for(var d=0,a=e.components.length;d<a;++d){f=this.buildGeometryNode.apply(this,[e.components[d]]);if(f){b.appendChild(f)}}return b}},buildCoordinatesNode:function(f){var a=this.createElementNS(this.kmlns,"coordinates");var m;var j=f.components;if(j){var h;var g=j.length;var d=new Array(g);for(var e=0;e<g;++e){h=j[e];d[e]=h.x+","+h.y}m=d.join(" ")}else{m=f.x+","+f.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 e={interestingTagsExclude:["source","source_ref","source:ref","history","attribution","created_by"],areaTags:["area","building","leisure","tourism","ruins","historic","landuse","military","natural","sport"]};e=OpenLayers.Util.extend(e,a);var f={};for(var b=0;b<e.interestingTagsExclude.length;b++){f[e.interestingTagsExclude[b]]=true}e.interestingTagsExclude=f;var d={};for(var b=0;b<e.areaTags.length;b++){d[e.areaTags[b]]=true}e.areaTags=d;this.externalProjection=new OpenLayers.Projection("EPSG:4326");OpenLayers.Format.XML.prototype.initialize.apply(this,[e])},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 h=new Array(u.length);for(var g=0;g<u.length;g++){var p=new Array(u[g].nodes.length);var a=this.isWayArea(u[g])?1:0;for(var f=0;f<u[g].nodes.length;f++){var d=b[u[g].nodes[f]];var q=new OpenLayers.Geometry.Point(d.lon,d.lat);q.osm_id=parseInt(u[g].nodes[f]);p[f]=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[g].tags);m.osm_id=parseInt(u[g].id);m.fid="way."+m.osm_id;h[g]=m}for(var e in b){var d=b[e];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(e);m.fid="node."+m.osm_id;h.push(m)}d.node=null}return h},getNodes:function(f){var e=f.getElementsByTagName("node");var a={};for(var b=0;b<e.length;b++){var d=e[b];var g=d.getAttribute("id");a[g]={lat:d.getAttribute("lat"),lon:d.getAttribute("lon"),node:d}}return a},getWays:function(h){var g=h.getElementsByTagName("way");var m=[];for(var e=0;e<g.length;e++){var b=g[e];var d={id:b.getAttribute("id")};d.tags=this.getTags(b);var f=b.getElementsByTagName("nd");d.nodes=new Array(f.length);for(var a=0;a<f.length;a++){d.nodes[a]=f[a].getAttribute("ref")}m.push(d)}return m},getTags:function(f,h){var a=f.getElementsByTagName("tag");var d={};var g=false;for(var b=0;b<a.length;b++){var e=a[b].getAttribute("k");d[e]=a[b].getAttribute("v");if(h){if(!this.interestingTagsExclude[e]){g=true}}}return h?[d,g]:d},isWayArea:function(b){var a=false;var e=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]){e=true;break}}}return a&&(this.checkTags?e:true)},write:function(e){if(!(e instanceof Array)){e=[e]}this.osm_id=1;this.created_nodes={};var f=this.createElementNS(null,"osm");f.setAttribute("version","0.5");f.setAttribute("generator","OpenLayers "+OpenLayers.VERSION_NUMBER);for(var d=e.length-1;d>=0;d--){var a=this.createFeatureNodes(e[d]);for(var b=0;b<a.length;b++){f.appendChild(a[b])}}return OpenLayers.Format.XML.prototype.write.apply(this,[f])},createFeatureNodes:function(d){var b=[];var f=d.geometry.CLASS_NAME;var e=f.substring(f.lastIndexOf(".")+1);e=e.toLowerCase();var a=this.createXML[e];if(a){b=a.apply(this,[d])}return b},createXML:{point:function(a){var f=null;var d=a.geometry?a.geometry:a;var e=false;if(a.osm_id){f=a.osm_id;if(this.created_nodes[f]){e=true}}else{f=-this.osm_id;this.osm_id++}if(e){b=this.created_nodes[f]}else{var b=this.createElementNS(null,"node")}this.created_nodes[f]=b;b.setAttribute("id",f);b.setAttribute("lon",d.x);b.setAttribute("lat",d.y);if(a.attributes){this.serializeTags(a,b)}this.setState(a,b);return e?[]:[b]},linestring:function(e){var a=[];var j=e.geometry;if(e.osm_id){id=e.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<j.components.length;d++){var g=this.createXML.point.apply(this,[j.components[d]]);if(g.length){g=g[0];var f=g.getAttribute("id");a.push(g)}else{f=j.components[d].osm_id;g=this.created_nodes[f]}this.setState(e,g);var h=this.createElementNS(null,"nd");h.setAttribute("ref",f);b.appendChild(h)}this.serializeTags(e,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,e){for(var b in d.attributes){var a=this.createElementNS(null,"tag");a.setAttribute("k",b);a.setAttribute("v",d.attributes[b]);e.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.Control.SLDSelect=OpenLayers.Class(OpenLayers.Control,{EVENT_TYPES:["selected"],clearOnDeactivate:false,layers:null,callbacks:null,selectionSymbolizer:{Polygon:{fillColor:"#FF0000",stroke:false},Line:{strokeColor:"#FF0000",strokeWidth:2},Point:{graphicName:"square",fillColor:"#FF0000",pointRadius:5}},layerOptions:null,handlerOptions:null,sketchStyle:null,wfsCache:{},layerCache:{},initialize:function(b,a){this.EVENT_TYPES=OpenLayers.Control.SLDSelect.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);OpenLayers.Control.prototype.initialize.apply(this,[a]);this.callbacks=OpenLayers.Util.extend({done:this.select,click:this.select},this.callbacks);this.handlerOptions=this.handlerOptions||{};this.layerOptions=OpenLayers.Util.applyDefaults(this.layerOptions,{displayInLayerSwitcher:false});if(this.sketchStyle){this.handlerOptions.layerOptions=OpenLayers.Util.applyDefaults(this.handlerOptions.layerOptions,{styleMap:new OpenLayers.StyleMap({"default":this.sketchStyle})})}this.handler=new b(this,this.callbacks,this.handlerOptions)},destroy:function(){for(var a in this.layerCache){delete this.layerCache[a]}for(var a in this.wfsCache){delete this.wfsCache[a]}OpenLayers.Control.prototype.destroy.apply(this,arguments)},coupleLayerVisiblity:function(a){this.setVisibility(a.object.getVisibility())},createSelectionLayer:function(b){var a;if(!this.layerCache[b.id]){a=new OpenLayers.Layer.WMS.Post(b.name,b.url,b.params,OpenLayers.Util.applyDefaults(this.layerOptions,b.getOptions()));this.layerCache[b.id]=a;if(this.layerOptions.displayInLayerSwitcher===false){b.events.on({visibilitychanged:this.coupleLayerVisiblity,scope:a})}this.map.addLayer(a)}else{a=this.layerCache[b.id]}return a},createSLD:function(g,e,h){var a={version:"1.0.0",namedLayers:{}};var m=[g.params.LAYERS].join(",").split(",");for(var f=0,j=m.length;f<j;f++){var b=m[f];a.namedLayers[b]={name:b,userStyles:[]};var p=this.selectionSymbolizer;var o=h[f];if(o.type.indexOf("Polygon")>=0){p={Polygon:this.selectionSymbolizer.Polygon}}else{if(o.type.indexOf("LineString")>=0){p={Line:this.selectionSymbolizer.Line}}else{if(o.type.indexOf("Point")>=0){p={Point:this.selectionSymbolizer.Point}}}}var d=e[f];a.namedLayers[b].userStyles.push({name:"default",rules:[new OpenLayers.Rule({symbolizer:p,filter:d,maxScaleDenominator:g.options.minScale})]})}return new OpenLayers.Format.SLD().write(a)},parseDescribeLayer:function(d){var h=new OpenLayers.Format.WMSDescribeLayer();var j=d.responseXML;if(!j||!j.documentElement){j=d.responseText}var b=h.read(j);var g=[];var a=null;for(var e=0,f=b.length;e<f;e++){if(b[e].owsType=="WFS"){g.push(b[e].typeName);a=b[e].owsURL}}var m={url:a,params:{SERVICE:"WFS",TYPENAME:g.toString(),REQUEST:"DescribeFeatureType",VERSION:"1.0.0"},callback:function(p){var r=new OpenLayers.Format.WFSDescribeFeatureType();var q=p.responseXML;if(!q||!q.documentElement){q=p.responseText}var o=r.read(q);this.control.wfsCache[this.layer.id]=o;this.control._queue&&this.control.applySelection()},scope:this};OpenLayers.Request.GET(m)},getGeometryAttributes:function(e){var q=[];var a=this.wfsCache[e.id];for(var d=0,f=a.featureTypes.length;d<f;d++){var m=a.featureTypes[d];var g=m.properties;for(var b=0,p=g.length;b<p;b++){var o=g[b];var h=o.type;if((h.indexOf("LineString")>=0)||(h.indexOf("GeometryAssociationType")>=0)||(h.indexOf("GeometryPropertyType")>=0)||(h.indexOf("Point")>=0)||(h.indexOf("Polygon")>=0)){q.push(o)}}}return q},activate:function(){var b=OpenLayers.Control.prototype.activate.call(this);if(b){for(var f=0,a=this.layers.length;f<a;f++){var e=this.layers[f];if(e&&!this.wfsCache[e.id]){var d={url:e.url,params:{SERVICE:"WMS",VERSION:e.params.VERSION,LAYERS:e.params.LAYERS,REQUEST:"DescribeLayer"},callback:this.parseDescribeLayer,scope:{layer:e,control:this}};OpenLayers.Request.GET(d)}}}return b},deactivate:function(){var g=OpenLayers.Control.prototype.deactivate.call(this);if(g){for(var f=0,a=this.layers.length;f<a;f++){var e=this.layers[f];if(e&&this.clearOnDeactivate===true){var d=this.layerCache;var b=d[e.id];if(b){e.events.un({visibilitychanged:this.coupleLayerVisiblity,scope:b});b.destroy();delete d[e.id]}}}}return g},setLayers:function(a){if(this.active){this.deactivate();this.layers=a;this.activate()}else{this.layers=a}},createFilter:function(a,d){var b=null;if(this.handler instanceof OpenLayers.Handler.RegularPolygon){if(this.handler.irregular===true){b=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.BBOX,property:a.name,value:d.getBounds()})}else{b=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.INTERSECTS,property:a.name,value:d})}}else{if(this.handler instanceof OpenLayers.Handler.Polygon){b=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.INTERSECTS,property:a.name,value:d})}else{if(this.handler instanceof OpenLayers.Handler.Path){if(a.type.indexOf("Point")>=0){b=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.DWITHIN,property:a.name,distance:this.map.getExtent().getWidth()*0.01,distanceUnits:this.map.getUnits(),value:d})}else{b=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.INTERSECTS,property:a.name,value:d})}}else{if(this.handler instanceof OpenLayers.Handler.Click){if(a.type.indexOf("Polygon")>=0){b=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.INTERSECTS,property:a.name,value:d})}else{b=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.DWITHIN,property:a.name,distance:this.map.getExtent().getWidth()*0.01,distanceUnits:this.map.getUnits(),value:d})}}}}}return b},select:function(a){this._queue=function(){for(var h=0,p=this.layers.length;h<p;h++){var m=this.layers[h];var o=this.getGeometryAttributes(m);var e=[];for(var g=0,r=o.length;g<r;g++){var u=o[g];if(u!==null){if(!(a instanceof OpenLayers.Geometry)){var q=this.map.getLonLatFromPixel(a.xy);a=new OpenLayers.Geometry.Point(q.lon,q.lat)}var d=this.createFilter(u,a);if(d!==null){e.push(d)}}}var f=this.createSelectionLayer(m);var b=this.createSLD(m,e,o);this.events.triggerEvent("selected",{layer:m,filters:e});f.mergeNewParams({SLD_BODY:b});delete this._queue}};this.applySelection()},applySelection:function(){var d=true;for(var b=0,a=this.layers.length;b<a;b++){if(!this.wfsCache[this.layers[b].id]){d=false;break}}d&&this._queue.call(this)},CLASS_NAME:"OpenLayers.Control.SLDSelect"});OpenLayers.Format.ArcXML=OpenLayers.Class(OpenLayers.Format.XML,{fontStyleKeys:["antialiasing","blockout","font","fontcolor","fontsize","fontstyle","glowing","interval","outline","printmode","shadow","transparency"],request:null,response:null,initialize:function(a){this.request=new OpenLayers.Format.ArcXML.Request();this.response=new OpenLayers.Format.ArcXML.Response();if(a){if(a.requesttype=="feature"){this.request.get_image=null;var 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(e,d){for(var b=0,a=d.length;b<a;b++){e.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(g){if(typeof g=="string"){g=OpenLayers.Format.XML.prototype.read.apply(this,[g])}var a=null;if(g&&g.documentElement){if(g.documentElement.nodeName=="ARCXML"){a=g.documentElement}else{a=g.documentElement.getElementsByTagName("ARCXML")[0]}}if(!a||a.firstChild.nodeName==="parsererror"){var d,f;try{d=g.firstChild.nodeValue;f=g.firstChild.childNodes[1].firstChild.nodeValue}catch(e){}throw {message:"Error parsing the ArcXML request",error:d,source:f}}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 j=this.createElementNS("","REQUEST");if(d.get_image!=null){var p=this.createElementNS("","GET_IMAGE");j.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 h=this.createElementNS("","LAYERLIST");o.appendChild(h);for(var w=0;w<b.layerlist.length;w++){var u=this.createElementNS("","LAYERDEF");h.appendChild(u);u.setAttribute("id",b.layerlist[w].id);u.setAttribute("visible",b.layerlist[w].visible);if(typeof b.layerlist[w].query=="object"){var g=b.layerlist[w].query;if(g.where.length<0){continue}var H=null;if(typeof g.spatialfilter=="boolean"&&g.spatialfilter){H=this.createElementNS("","SPATIALQUERY")}else{H=this.createElementNS("","QUERY")}H.setAttribute("where",g.where);if(typeof g.accuracy=="number"&&g.accuracy>0){H.setAttribute("accuracy",g.accuracy)}if(typeof g.featurelimit=="number"&&g.featurelimit<2000){H.setAttribute("featurelimit",g.featurelimit)}if(typeof g.subfields=="string"&&g.subfields!="#ALL#"){H.setAttribute("subfields",g.subfields)}if(typeof g.joinexpression=="string"&&g.joinexpression.length>0){H.setAttribute("joinexpression",g.joinexpression)}if(typeof g.jointables=="string"&&g.jointables.length>0){H.setAttribute("jointables",g.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");j.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 f=this.createElementNS("","FEATURECOORDSYS");if(B.featurecoordsys.id==0){f.setAttribute("string",B.featurecoordsys.string)}else{f.setAttribute("id",B.featurecoordsys.id)}D.appendChild(f)}if(B.filtercoordsys!=null){var e=this.createElementNS("","FILTERCOORDSYS");if(B.filtercoordsys.id===0){e.setAttribute("string",B.filtercoordsys.string)}else{e.setAttribute("id",B.filtercoordsys.id)}D.appendChild(e)}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(j);return OpenLayers.Format.XML.prototype.write.apply(this,[z])},addGroupRenderer:function(b,a){var f=this.createElementNS("","GROUPRENDERER");b.appendChild(f);for(var d=0;d<a.length;d++){var e=a[d];this.addRenderer(f,e)}},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(j,h){j.setAttribute("lookupfield",h.lookupfield);j.setAttribute("labelfield",h.labelfield);if(typeof h.exacts=="object"){for(var a=0,o=h.exacts.length;a<o;a++){var f=h.exacts[a];var e=this.createElementNS("","EXACT");if(typeof f.value=="string"){e.setAttribute("value",f.value)}if(typeof f.label=="string"){e.setAttribute("label",f.label)}if(typeof f.method=="string"){e.setAttribute("method",f.method)}j.appendChild(e);if(typeof f.symbol=="object"){var b=null;if(f.symbol.type=="text"){b=this.createElementNS("","TEXTSYMBOL")}if(b!=null){var p=this.fontStyleKeys;for(var d=0,g=p.length;d<g;d++){var m=p[d];if(f.symbol[m]){b.setAttribute(m,f.symbol[m])}}e.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 h=m.ranges[a];var f=this.createElementNS("","RANGE");f.setAttribute("lower",h.lower);f.setAttribute("upper",h.upper);o.appendChild(f);if(typeof h.symbol=="object"){var e=null;if(h.symbol.type=="simplepolygon"){e=this.createElementNS("","SIMPLEPOLYGONSYMBOL")}if(e!=null){if(typeof h.symbol.boundarycolor=="string"){e.setAttribute("boundarycolor",h.symbol.boundarycolor)}if(typeof h.symbol.fillcolor=="string"){e.setAttribute("fillcolor",h.symbol.fillcolor)}if(typeof h.symbol.filltransparency=="number"){e.setAttribute("filltransparency",h.symbol.filltransparency)}f.appendChild(e)}}}}else{if(typeof m.exacts=="object"){for(var d=0,p=m.exacts.length;d<p;d++){var j=m.exacts[d];var g=this.createElementNS("","EXACT");if(typeof j.value=="string"){g.setAttribute("value",j.value)}if(typeof j.label=="string"){g.setAttribute("label",j.label)}if(typeof j.method=="string"){g.setAttribute("method",j.method)}o.appendChild(g);if(typeof j.symbol=="object"){var e=null;if(j.symbol.type=="simplemarker"){e=this.createElementNS("","SIMPLEMARKERSYMBOL")}if(e!=null){if(typeof j.symbol.antialiasing=="string"){e.setAttribute("antialiasing",j.symbol.antialiasing)}if(typeof j.symbol.color=="string"){e.setAttribute("color",j.symbol.color)}if(typeof j.symbol.outline=="string"){e.setAttribute("outline",j.symbol.outline)}if(typeof j.symbol.overlap=="string"){e.setAttribute("overlap",j.symbol.overlap)}if(typeof j.symbol.shadow=="string"){e.setAttribute("shadow",j.symbol.shadow)}if(typeof j.symbol.transparency=="number"){e.setAttribute("transparency",j.symbol.transparency)}if(typeof j.symbol.usecentroid=="string"){e.setAttribute("usecentroid",j.symbol.usecentroid)}if(typeof j.symbol.width=="number"){e.setAttribute("width",j.symbol.width)}g.appendChild(e)}}}}}},addSimpleLabelRenderer:function(g,j){g.setAttribute("field",j.field);var f=["featureweight","howmanylabels","labelbufferratio","labelpriorities","labelweight","linelabelposition","rotationalangles"];for(var e=0,a=f.length;e<a;e++){var d=f[e];if(j[d]){g.setAttribute(d,j[d])}}if(j.symbol.type=="text"){var h=j.symbol;var b=this.createElementNS("","TEXTSYMBOL");g.appendChild(b);var f=this.fontStyleKeys;for(var e=0,a=f.length;e<a;e++){var d=f[e];if(h[d]){b.setAttribute(d,j[d])}}}},writePolygonGeometry:function(h){if(!(h instanceof OpenLayers.Geometry.Polygon)){throw {message:"Cannot write polygon geometry to ArcXML with an "+h.CLASS_NAME+" object.",geometry:h}}var b=this.createElementNS("","POLYGON");for(var f=0,d=h.components.length;f<d;f++){var a=h.components[f];var m=this.createElementNS("","RING");for(var e=0,o=a.components.length;e<o;e++){var j=a.components[e];var g=this.createElementNS("","POINT");g.setAttribute("x",j.x);g.setAttribute("y",j.y);m.appendChild(g)}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 e=m[0].getElementsByTagName("ENVELOPE");a.features.envelope=this.parseAttributes(e[0],typeof(0));var H=m[0].getElementsByTagName("FEATURE");for(var r=0;r<H.length;r++){var j=new OpenLayers.Feature.Vector();var C=H[r].getElementsByTagName("FIELD");for(var g=0;g<C.length;g++){var h=C[g].getAttribute("name");var p=C[g].getAttribute("value");j.attributes[h]=p}var D=H[r].getElementsByTagName("POLYGON");if(D.length>0){var o=D[0].getElementsByTagName("RING");var f=[];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;f.push(new OpenLayers.Geometry.Polygon(I));I=null}o=null;if(f.length==1){j.geometry=f[0]}else{j.geometry=new OpenLayers.Geometry.MultiPolygon(f)}}a.features.feature.push(j)}}}else{a.error="Unidentified response type."}}}return a},parseAttributes:function(e,d){var b={};for(var a=0;a<e.attributes.length;a++){if(d=="number"){b[e.attributes[a].nodeName]=parseFloat(e.attributes[a].nodeValue)}else{b[e.attributes[a].nodeName]=e.attributes[a].nodeValue}}return b},parsePointGeometry:function(e){var b=[];var f=e.getElementsByTagName("COORDS");if(f.length>0){var g=this.getChildValue(f[0]);g=g.split(/;/);for(var j=0;j<g.length;j++){var h=g[j].split(/ /);b.push(new OpenLayers.Geometry.Point(parseFloat(h[0]),parseFloat(h[1])))}f=null}else{var a=e.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(e){if(typeof e=="string"){e=OpenLayers.Format.XML.prototype.read.apply(this,[e])}var f=this.getElementsByTagNameNS(e.documentElement,this.gmlns,this.featureName);var d=[];for(var b=0;b<f.length;b++){var a=this.parseFeature(f[b]);if(a){d.push(a)}}return d},parseFeature:function(e){var f=["MultiPolygon","Polygon","MultiLineString","LineString","MultiPoint","Point","Envelope"];var v,j,w,d;for(var p=0;p<f.length;++p){v=f[p];j=this.getElementsByTagNameNS(e,this.gmlns,v);if(j.length>0){d=this.parseGeometry[v.toLowerCase()];if(d){w=d.apply(this,[j[0]]);if(this.internalProjection&&this.externalProjection){w.transform(this.externalProjection,this.internalProjection)}}else{OpenLayers.Console.error(OpenLayers.i18n("unsupportedGeometryType",{geomType:v}))}break}}var b;var o=this.getElementsByTagNameNS(e,this.gmlns,"Box");for(p=0;p<o.length;++p){var u=o[p];var r=this.parseGeometry.box.apply(this,[u]);var q=u.parentNode;var h=q.localName||q.nodeName.split(":").pop();if(h==="boundedBy"){b=r}else{w=r.toGeometry()}}var m;if(this.extractAttributes){m=this.parseAttributes(e)}var z=new OpenLayers.Feature.Vector(w,m);z.bounds=b;z.gml={featureType:e.firstChild.nodeName.split(":")[1],featureNS:e.firstChild.namespaceURI,featureNSPrefix:e.firstChild.prefix};var a=e.firstChild;var g;while(a){if(a.nodeType==1){g=a.getAttribute("fid")||a.getAttribute("id");if(g){break}}a=a.nextSibling}z.fid=g;return z},parseGeometry:{point:function(e){var b,a;var f=[];var b=this.getElementsByTagNameNS(e,this.gmlns,"pos");if(b.length>0){a=b[0].firstChild.nodeValue;a=a.replace(this.regExes.trimSpace,"");f=a.split(this.regExes.splitSpace)}if(f.length==0){b=this.getElementsByTagNameNS(e,this.gmlns,"coordinates");if(b.length>0){a=b[0].firstChild.nodeValue;a=a.replace(this.regExes.removeSpace,"");f=a.split(",")}}if(f.length==0){b=this.getElementsByTagNameNS(e,this.gmlns,"coord");if(b.length>0){var g=this.getElementsByTagNameNS(b[0],this.gmlns,"X");var d=this.getElementsByTagNameNS(b[0],this.gmlns,"Y");if(g.length>0&&d.length>0){f=[g[0].firstChild.nodeValue,d[0].firstChild.nodeValue]}}}if(f.length==2){f[2]=null}if(this.xy){return new OpenLayers.Geometry.Point(f[0],f[1],f[2])}else{return new OpenLayers.Geometry.Point(f[1],f[0],f[2])}},multipoint:function(f){var b=this.getElementsByTagNameNS(f,this.gmlns,"Point");var e=[];if(b.length>0){var a;for(var d=0;d<b.length;++d){a=this.parseGeometry.point.apply(this,[b[d]]);if(a){e.push(a)}}}return new OpenLayers.Geometry.MultiPoint(e)},linestring:function(d,f){var e,b;var r=[];var u=[];e=this.getElementsByTagNameNS(d,this.gmlns,"posList");if(e.length>0){b=this.getChildValue(e[0]);b=b.replace(this.regExes.trimSpace,"");r=b.split(this.regExes.splitSpace);var m=parseInt(e[0].getAttribute("dimension"));var g,q,p,o;for(var h=0;h<r.length/m;++h){g=h*m;q=r[g];p=r[g+1];o=(m==2)?null:r[g+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){e=this.getElementsByTagNameNS(d,this.gmlns,"coordinates");if(e.length>0){b=this.getChildValue(e[0]);b=b.replace(this.regExes.trimSpace,"");b=b.replace(this.regExes.trimComma,",");var a=b.split(this.regExes.splitSpace);for(var h=0;h<a.length;++h){r=a[h].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(f){v=new OpenLayers.Geometry.LinearRing(u)}else{v=new OpenLayers.Geometry.LineString(u)}}return v},multilinestring:function(f){var b=this.getElementsByTagNameNS(f,this.gmlns,"LineString");var e=[];if(b.length>0){var a;for(var d=0;d<b.length;++d){a=this.parseGeometry.linestring.apply(this,[b[d]]);if(a){e.push(a)}}}return new OpenLayers.Geometry.MultiLineString(e)},polygon:function(f){var b=this.getElementsByTagNameNS(f,this.gmlns,"LinearRing");var e=[];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){e.push(a)}}}return new OpenLayers.Geometry.Polygon(e)},multipolygon:function(f){var a=this.getElementsByTagNameNS(f,this.gmlns,"Polygon");var e=[];if(a.length>0){var d;for(var b=0;b<a.length;++b){d=this.parseGeometry.polygon.apply(this,[a[b]]);if(d){e.push(d)}}}return new OpenLayers.Geometry.MultiPolygon(e)},envelope:function(b){var f=[];var a;var g;var o=this.getElementsByTagNameNS(b,this.gmlns,"lowerCorner");if(o.length>0){var j=[];if(o.length>0){a=o[0].firstChild.nodeValue;a=a.replace(this.regExes.trimSpace,"");j=a.split(this.regExes.splitSpace)}if(j.length==2){j[2]=null}if(this.xy){var e=new OpenLayers.Geometry.Point(j[0],j[1],j[2])}else{var e=new OpenLayers.Geometry.Point(j[1],j[0],j[2])}}var h=this.getElementsByTagNameNS(b,this.gmlns,"upperCorner");if(h.length>0){var j=[];if(h.length>0){a=h[0].firstChild.nodeValue;a=a.replace(this.regExes.trimSpace,"");j=a.split(this.regExes.splitSpace)}if(j.length==2){j[2]=null}if(this.xy){var m=new OpenLayers.Geometry.Point(j[0],j[1],j[2])}else{var m=new OpenLayers.Geometry.Point(j[1],j[0],j[2])}}if(e&&m){f.push(new OpenLayers.Geometry.Point(e.x,e.y));f.push(new OpenLayers.Geometry.Point(m.x,e.y));f.push(new OpenLayers.Geometry.Point(m.x,m.y));f.push(new OpenLayers.Geometry.Point(e.x,m.y));f.push(new OpenLayers.Geometry.Point(e.x,e.y));var d=new OpenLayers.Geometry.LinearRing(f);g=new OpenLayers.Geometry.Polygon([d])}return g},box:function(f){var d=this.getElementsByTagNameNS(f,this.gmlns,"coordinates");var b;var g,a=null,e=null;if(d.length>0){b=d[0].firstChild.nodeValue;g=b.split(" ");if(g.length==2){a=g[0].split(",");e=g[1].split(",")}}if(a!==null&&e!==null){return new OpenLayers.Bounds(parseFloat(a[0]),parseFloat(a[1]),parseFloat(e[0]),parseFloat(e[1]))}}},parseAttributes:function(f){var g={};var a=f.firstChild;var e,h,d,o,m,b,j;while(a){if(a.nodeType==1){e=a.childNodes;for(h=0;h<e.length;++h){d=e[h];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;j=m.nodeValue.replace(this.regExes.trimSpace,"");g[b]=j}}else{g[d.nodeName.split(":").pop()]=null}}}break}a=a.nextSibling}return g},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 j=o.geometry;var f=this.buildGeometryNode(j);var m=this.createElementNS(this.featureNS,this.featurePrefix+":"+this.geometryName);m.appendChild(f);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 h in o.attributes){var g=this.createTextNode(o.attributes[h]);var e=h.substring(h.lastIndexOf(":")+1);var b=this.createElementNS(this.featureNS,this.featurePrefix+":"+e);b.appendChild(g);p.appendChild(b)}a.appendChild(p);return a},buildGeometryNode:function(e){if(this.externalProjection&&this.internalProjection){e=e.clone();e.transform(this.internalProjection,this.externalProjection)}var d=e.CLASS_NAME;var b=d.substring(d.lastIndexOf(".")+1);var a=this.buildGeometry[b.toLowerCase()];return a.apply(this,[e])},buildGeometry:{point:function(b){var a=this.createElementNS(this.gmlns,"gml:Point");a.appendChild(this.buildCoordinatesNode(b));return a},multipoint:function(g){var e=this.createElementNS(this.gmlns,"gml:MultiPoint");var d=g.components;var b,f;for(var a=0;a<d.length;a++){b=this.createElementNS(this.gmlns,"gml:pointMember");f=this.buildGeometry.point.apply(this,[d[a]]);b.appendChild(f);e.appendChild(b)}return e},linestring:function(b){var a=this.createElementNS(this.gmlns,"gml:LineString");a.appendChild(this.buildCoordinatesNode(b));return a},multilinestring:function(g){var e=this.createElementNS(this.gmlns,"gml:MultiLineString");var a=g.components;var d,f;for(var b=0;b<a.length;++b){d=this.createElementNS(this.gmlns,"gml:lineStringMember");f=this.buildGeometry.linestring.apply(this,[a[b]]);d.appendChild(f);e.appendChild(d)}return e},linearring:function(b){var a=this.createElementNS(this.gmlns,"gml:LinearRing");a.appendChild(this.buildCoordinatesNode(b));return a},polygon:function(h){var e=this.createElementNS(this.gmlns,"gml:Polygon");var g=h.components;var d,f,b;for(var a=0;a<g.length;++a){b=(a==0)?"outerBoundaryIs":"innerBoundaryIs";d=this.createElementNS(this.gmlns,"gml:"+b);f=this.buildGeometry.linearring.apply(this,[g[a]]);d.appendChild(f);e.appendChild(d)}return e},multipolygon:function(g){var e=this.createElementNS(this.gmlns,"gml:MultiPolygon");var a=g.components;var f,b;for(var d=0;d<a.length;++d){f=this.createElementNS(this.gmlns,"gml:polygonMember");b=this.buildGeometry.polygon.apply(this,[a[d]]);f.appendChild(b);e.appendChild(f)}return e},bounds:function(b){var a=this.createElementNS(this.gmlns,"gml:Box");a.appendChild(this.buildCoordinatesNode(b));return a}},buildCoordinatesNode:function(g){var a=this.createElementNS(this.gmlns,"gml:coordinates");a.setAttribute("decimal",".");a.setAttribute("cs",",");a.setAttribute("ts"," ");var f=[];if(g instanceof OpenLayers.Bounds){f.push(g.left+","+g.bottom);f.push(g.right+","+g.top)}else{var d=(g.components)?g.components:[g];for(var b=0;b<d.length;b++){f.push(d[b].x+","+d[b].y)}}var e=this.createTextNode(f.join(" "));a.appendChild(e);return a},CLASS_NAME:"OpenLayers.Format.GML"});OpenLayers.Format.GeoJSON=OpenLayers.Class(OpenLayers.Format.JSON,{ignoreExtraDims:false,initialize:function(a){OpenLayers.Format.JSON.prototype.initialize.apply(this,[a])},read:function(m,h,a){h=(h)?h:"FeatureCollection";var e=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,h)){switch(h){case"Geometry":try{e=this.parseGeometry(d)}catch(b){OpenLayers.Console.error(b)}break;case"Feature":try{e=this.parseFeature(d);e.type="Feature"}catch(b){OpenLayers.Console.error(b)}break;case"FeatureCollection":e=[];switch(d.type){case"Feature":try{e.push(this.parseFeature(d))}catch(b){e=null;OpenLayers.Console.error(b)}break;case"FeatureCollection":for(var f=0,g=d.features.length;f<g;++f){try{e.push(this.parseFeature(d.features[f]))}catch(b){e=null;OpenLayers.Console.error(b)}}break;default:try{var j=this.parseGeometry(d);e.push(new OpenLayers.Feature.Vector(j))}catch(b){e=null;OpenLayers.Console.error(b)}}break}}}}return e},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(e){var b,g,a,f;a=(e.properties)?e.properties:{};f=(e.geometry&&e.geometry.bbox)||e.bbox;try{g=this.parseGeometry(e.geometry)}catch(d){throw d}b=new OpenLayers.Feature.Vector(g,a);if(f){b.bounds=OpenLayers.Bounds.fromArray(f)}if(e.id){b.fid=e.id}return b},parseGeometry:function(f){if(f==null){return null}var h,g=false;if(f.type=="GeometryCollection"){if(!(f.geometries instanceof Array)){throw"GeometryCollection must have geometries array: "+f}var b=f.geometries.length;var e=new Array(b);for(var a=0;a<b;++a){e[a]=this.parseGeometry.apply(this,[f.geometries[a]])}h=new OpenLayers.Geometry.Collection(e);g=true}else{if(!(f.coordinates instanceof Array)){throw"Geometry must have coordinates array: "+f}if(!this.parseCoords[f.type.toLowerCase()]){throw"Unsupported geometry type: "+f.type}try{h=this.parseCoords[f.type.toLowerCase()].apply(this,[f.coordinates])}catch(d){throw d}}if(this.internalProjection&&this.externalProjection&&!g){h.transform(this.externalProjection,this.internalProjection)}return h},parseCoords:{point:function(a){if(this.ignoreExtraDims==false&&a.length!=2){throw"Only 2D points are supported: "+a}return new OpenLayers.Geometry.Point(a[0],a[1])},multipoint:function(g){var d=[];var f=null;for(var b=0,a=g.length;b<a;++b){try{f=this.parseCoords.point.apply(this,[g[b]])}catch(e){throw e}d.push(f)}return new OpenLayers.Geometry.MultiPoint(d)},linestring:function(g){var d=[];var f=null;for(var b=0,a=g.length;b<a;++b){try{f=this.parseCoords.point.apply(this,[g[b]])}catch(e){throw e}d.push(f)}return new OpenLayers.Geometry.LineString(d)},multilinestring:function(g){var d=[];var b=null;for(var e=0,a=g.length;e<a;++e){try{b=this.parseCoords.linestring.apply(this,[g[e]])}catch(f){throw f}d.push(b)}return new OpenLayers.Geometry.MultiLineString(d)},polygon:function(h){var g=[];var f,b;for(var d=0,a=h.length;d<a;++d){try{b=this.parseCoords.linestring.apply(this,[h[d]])}catch(e){throw e}f=new OpenLayers.Geometry.LinearRing(b.components);g.push(f)}return new OpenLayers.Geometry.Polygon(g)},multipolygon:function(g){var b=[];var f=null;for(var d=0,a=g.length;d<a;++d){try{f=this.parseCoords.polygon.apply(this,[g[d]])}catch(e){throw e}b.push(f)}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(f,e){var a={type:null};if(f instanceof Array){a.type="FeatureCollection";var h=f.length;a.features=new Array(h);for(var d=0;d<h;++d){var b=f[d];if(!b instanceof OpenLayers.Feature.Vector){var g="FeatureCollection only supports collections of features: "+b;throw g}a.features[d]=this.extract.feature.apply(this,[b])}}else{if(f.CLASS_NAME.indexOf("OpenLayers.Geometry")==0){a=this.extract.geometry.apply(this,[f])}else{if(f instanceof OpenLayers.Feature.Vector){a=this.extract.feature.apply(this,[f]);if(f.layer&&f.layer.projection){a.crs=this.createCRSObject(f)}}}}return OpenLayers.Format.JSON.prototype.write.apply(this,[a,e])},createCRSObject:function(b){var d=b.layer.projection.toString();var a={};if(d.match(/epsg:/i)){var e=parseInt(d.substring(d.indexOf(":")+1));if(e==4326){a={type:"OGC",properties:{urn:"urn:ogc:def:crs:OGC:1.3:CRS84"}}}else{a={type:"EPSG",properties:{code:e}}}}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(e){if(e==null){return null}if(this.internalProjection&&this.externalProjection){e=e.clone();e.transform(this.internalProjection,this.externalProjection)}var a=e.CLASS_NAME.split(".")[2];var d=this.extract[a.toLowerCase()].apply(this,[e]);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 e=[];for(var b=0,a=d.components.length;b<a;++b){e.push(this.extract.point.apply(this,[d.components[b]]))}return e},linestring:function(b){var e=[];for(var d=0,a=b.components.length;d<a;++d){e.push(this.extract.point.apply(this,[b.components[d]]))}return e},multilinestring:function(d){var e=[];for(var b=0,a=d.components.length;b<a;++b){e.push(this.extract.linestring.apply(this,[d.components[b]]))}return e},polygon:function(d){var e=[];for(var b=0,a=d.components.length;b<a;++b){e.push(this.extract.linestring.apply(this,[d.components[b]]))}return e},multipolygon:function(e){var d=[];for(var b=0,a=e.components.length;b<a;++b){d.push(this.extract.polygon.apply(this,[e.components[b]]))}return d},collection:function(d){var a=d.components.length;var e=new Array(a);for(var b=0;b<a;++b){e[b]=this.extract.geometry.apply(this,[d.components[b]])}return e}},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(f){if(typeof f=="string"){f=OpenLayers.Format.XML.prototype.read.apply(this,[f])}if(f&&f.nodeType==9){f=f.documentElement}var d=[];this.readNode(f,{features:d});if(d.length==0){var e=this.getElementsByTagNameNS(f,this.namespaces.gml,"featureMember");if(e.length){for(var b=0,a=e.length;b<a;++b){this.readNode(e[b],{features:d})}}else{var e=this.getElementsByTagNameNS(f,this.namespaces.gml,"featureMembers");if(e.length){this.readNode(e[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(f,h){var j=this.getChildValue(f).replace(this.regExes.trimSpace,"");j=j.replace(this.regExes.trimComma,",");var a=j.split(this.regExes.splitSpace);var g;var e=a.length;var d=new Array(e);for(var b=0;b<e;++b){g=a[b].split(",");if(this.xy){d[b]=new OpenLayers.Geometry.Point(g[0],g[1],g[2])}else{d[b]=new OpenLayers.Geometry.Point(g[1],g[0],g[2])}}h.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,e){var a;var b=d.localName||d.nodeName.split(":").pop();if(e.features){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,e])}},_typeName:function(d,e){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 f=d.getAttribute("fid")||this.getAttributeNS(d,this.namespaces.gml,"id");if(f){b.fid=f}if(this.internalProjection&&this.externalProjection&&b.geometry){b.geometry.transform(this.externalProjection,this.internalProjection)}if(a.bounds){b.bounds=a.bounds}e.features.push(b)},_geometry:function(a,b){this.readChildNodes(a,b)},_attribute:function(b,e){var a=b.localName||b.nodeName.split(":").pop();var d=this.getChildValue(b);e.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(e){var d=this.createElementNSPlus("gml:GeometryCollection");for(var b=0,a=e.components.length;b<a;++b){this.writeNode("geometryMember",e.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 e=b.attributes[a];if(e!=null){this.writeNode("feature:_attribute",{name:a,value:e},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 e=this.writeNode("gml:"+a,d,b);if(this.srsName){e.setAttribute("srsName",this.srsName)}return b},_attribute:function(a){return this.createElementNSPlus("feature:"+a.name,{value:a.value})}},wfs:{FeatureCollection:function(d){var e=this.createElementNSPlus("wfs:FeatureCollection");for(var b=0,a=d.length;b<a;++b){this.writeNode("gml:featureMember",d[b],e)}return e}}},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(g){var d=this.buildGeometryNode(g.geometry);var h=this.createElementNS(this.featureNS,"feature:"+this.geometryName);h.appendChild(d);var b=this.createElementNS(this.featureNS,"feature:"+this.featureName);b.appendChild(h);for(var a in g.attributes){var j=this.createTextNode(g.attributes[a]);var e=a;if(a.search(":")!=-1){e=a.split(":")[1]}var f=this.createElementNS(this.featureNS,"feature:"+e);f.appendChild(j);b.appendChild(f)}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 g=this.createElementNS(this.wfsns,"wfs:Update");g.setAttribute("typeName",this.featurePrefix+":"+this.featureName);g.setAttribute("xmlns:"+this.featurePrefix,this.featureNS);var j=this.createElementNS(this.wfsns,"wfs:Property");var a=this.createElementNS(this.wfsns,"wfs:Name");var d=this.createTextNode(this.geometryName);a.appendChild(d);j.appendChild(a);var m=this.createElementNS(this.wfsns,"wfs:Value");var e=this.buildGeometryNode(o.geometry);if(o.layer){e.setAttribute("srsName",o.layer.projection.getCode())}m.appendChild(e);j.appendChild(m);g.appendChild(j);for(var f in o.attributes){j=this.createElementNS(this.wfsns,"wfs:Property");a=this.createElementNS(this.wfsns,"wfs:Name");a.appendChild(this.createTextNode(f));j.appendChild(a);m=this.createElementNS(this.wfsns,"wfs:Value");m.appendChild(this.createTextNode(o.attributes[f]));j.appendChild(m);g.appendChild(j)}var h=this.createElementNS(this.ogcns,"ogc:Filter");var b=this.createElementNS(this.ogcns,"ogc:FeatureId");b.setAttribute("fid",o.fid);h.appendChild(b);g.appendChild(h);return g},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 e=this.createElementNS(this.ogcns,"ogc:FeatureId");e.setAttribute("fid",b.fid);d.appendChild(e);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(e){var a="";e=this.adjustBounds(e);var d=new OpenLayers.Format.ArcXML(OpenLayers.Util.extend(this.options,{requesttype:"image",envelope:e.toArray(),tileSize:this.tileSize}));var b=new OpenLayers.Request.POST({url:this.getFullRequestString(),data:d.write(),async:false});if(b!=null){var g=b.responseXML;if(!g||!g.documentElement){g=b.responseText}var f=new OpenLayers.Format.ArcXML();var h=f.read(g);a=this.getUrlOrImage(h.image.output)}return a},getURLasync:function(d,a,f,e){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(g){var j=g.responseXML;if(!j||!j.documentElement){j=g.responseText}var h=new OpenLayers.Format.ArcXML();var m=h.read(j);a[f]=this.getUrlOrImage(m.image.output);e.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(j,g,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(j instanceof OpenLayers.LonLat){a.polygon=null;a.envelope=[j.lon-b,j.lat-b,j.lon+b,j.lat+b]}else{if(j instanceof OpenLayers.Geometry.Polygon){a.envelope=null;a.polygon=j}}var f=new OpenLayers.Format.ArcXML(a);OpenLayers.Util.extend(f.request.get_feature,p);f.request.get_feature.layer=g.id;if(typeof g.query.accuracy=="number"){f.request.get_feature.query.accuracy=g.query.accuracy}else{var h=this.map.getCenter();var e=this.map.getViewPortPxFromLonLat(h);e.x++;var d=this.map.getLonLatFromPixel(e);f.request.get_feature.query.accuracy=d.lon-h.lon}f.request.get_feature.query.where=g.query.where;f.request.get_feature.query.spatialfilter.relation="area_intersection";OpenLayers.Request.POST({url:this.getFullRequestString({CustomService:"Query"}),data:f.write(),callback:function(r){var q=f.parseResponse(r.responseText);if(!f.iserror()){m.call(o,q.features)}else{m.call(o,null)}}})},clone:function(a){if(a==null){a=new OpenLayers.Layer.ArcIMS(this.name,this.url,this.getOptions())}a=OpenLayers.Layer.Grid.prototype.clone.apply(this,[a]);return a},addTile:function(b,a){return new OpenLayers.Tile.Image(this,a,b,null,this.tileSize)},CLASS_NAME:"OpenLayers.Layer.ArcIMS"});OpenLayers.Format.GML.v2=OpenLayers.Class(OpenLayers.Format.GML.Base,{schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/2.1.2/feature.xsd",initialize:function(a){OpenLayers.Format.GML.Base.prototype.initialize.apply(this,[a])},readers:{gml:OpenLayers.Util.applyDefaults({outerBoundaryIs:function(b,a){var 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(e,b){var f={};this.readChildNodes(e,f);if(!b.components){b.components=[]}var d=f.points[0];var a=f.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(e){var d=e.length;var f=new Array(d);var a;for(var b=0;b<d;++b){a=e[b];if(this.xy){f[b]=a.x+","+a.y}else{f[b]=a.y+","+a.x}if(a.z!=undefined){f[b]+=","+a.z}}return this.createElementNSPlus("gml:coordinates",{attributes:{decimal:".",cs:",",ts:" "},value:(d==1)?f[0]:f.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,e){var f=this.getChildValue(b).replace(this.regExes.trimSpace,"");var d=f.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])}e.points=[a]},posList:function(a,e){var m=this.getChildValue(a).replace(this.regExes.trimSpace,"");var q=m.split(this.regExes.splitSpace);var f=parseInt(a.getAttribute("dimension"))||2;var b,r,p,h;var o=q.length/f;var u=new Array(o);for(var d=0,g=q.length;d<g;d+=f){r=q[d];p=q[d+1];h=(f==2)?undefined:q[d+2];if(this.xy){u[d/f]=new OpenLayers.Geometry.Point(r,p,h)}else{u[d/f]=new OpenLayers.Geometry.Point(p,r,h)}}e.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(e,b){var f={points:new Array(2)};this.readChildNodes(e,f);if(!b.components){b.components=[]}var d=f.points[0];var a=f.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 e=this.createElementNSPlus("gml:featureMembers");for(var b=0,a=d.length;b<a;++b){this.writeNode("feature:_typeName",d[b],e)}return e},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(e){var b=e.length;var f=new Array(b);var a;for(var d=0;d<b;++d){a=e[d];if(this.xy){f[d]=a.x+" "+a.y}else{f[d]=a.y+" "+a.x}}return this.createElementNSPlus("gml:posList",{value:f.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(e){var d=this.createElementNSPlus("gml:PolygonPatch",{attributes:{interpolation:"planar"}});this.writeNode("exterior",e.components[0],d);for(var b=1,a=e.components.length;b<a;++b){this.writeNode("interior",e.components[b],d)}return d},Polygon:function(e){var d=this.createElementNSPlus("gml:Polygon");this.writeNode("exterior",e.components[0],d);for(var b=1,a=e.components.length;b<a;++b){this.writeNode("interior",e.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(e){var d=this.createElementNSPlus("gml:MultiCurve");for(var b=0,a=e.components.length;b<a;++b){this.writeNode("curveMember",e.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(e){var d=this.createElementNSPlus("gml:MultiSurface");for(var b=0,a=e.components.length;b<a;++b){this.writeNode("surfaceMember",e.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.Atom=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{atom:"http://www.w3.org/2005/Atom",georss:"http://www.georss.org/georss"},feedTitle:"untitled",defaultEntryTitle:"untitled",gmlParser:null,xy:false,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},read:function(a){if(typeof a=="string"){a=OpenLayers.Format.XML.prototype.read.apply(this,[a])}return this.parseFeatures(a)},write:function(d){var e;if(d instanceof Array){e=this.createElementNSPlus("atom:feed");e.appendChild(this.createElementNSPlus("atom:title",{value:this.feedTitle}));for(var a=0,b=d.length;a<b;a++){e.appendChild(this.buildEntryNode(d[a]))}}else{e=this.buildEntryNode(d)}return OpenLayers.Format.XML.prototype.write.apply(this,[e])},buildContentNode:function(b){var a=this.createElementNSPlus("atom:content",{attributes:{type:b.type||null}});if(b.src){a.setAttribute("src",b.src)}else{if(b.type=="text"||b.type==null){a.appendChild(this.createTextNode(b.value))}else{if(b.type=="html"){if(typeof b.value!="string"){throw"HTML content must be in form of an escaped string"}a.appendChild(this.createTextNode(b.value))}else{if(b.type=="xhtml"){a.appendChild(b.value)}else{if(b.type=="xhtml"||b.type.match(/(\+|\/)xml$/)){a.appendChild(b.value)}else{a.appendChild(this.createTextNode(b.value))}}}}}return a},buildEntryNode:function(r){var d=r.attributes;var m=d.atom||{};var o=this.createElementNSPlus("atom:entry");if(m.authors){var j=m.authors instanceof Array?m.authors:[m.authors];for(var e=0,q=j.length;e<q;e++){o.appendChild(this.buildPersonConstructNode("author",j[e]))}}if(m.categories){var f=m.categories instanceof Array?m.categories:[m.categories];var a;for(var e=0,q=f.length;e<q;e++){a=f[e];o.appendChild(this.createElementNSPlus("atom:category",{attributes:{term:a.term,scheme:a.scheme||null,label:a.label||null}}))}}if(m.content){o.appendChild(this.buildContentNode(m.content))}if(m.contributors){var g=m.contributors instanceof Array?m.contributors:[m.contributors];for(var e=0,q=g.length;e<q;e++){o.appendChild(this.buildPersonConstructNode("contributor",g[e]))}}if(r.fid){o.appendChild(this.createElementNSPlus("atom:id",{value:r.fid}))}if(m.links){var p=m.links instanceof Array?m.links:[m.links];var h;for(var e=0,q=p.length;e<q;e++){h=p[e];o.appendChild(this.createElementNSPlus("atom:link",{attributes:{href:h.href,rel:h.rel||null,type:h.type||null,hreflang:h.hreflang||null,title:h.title||null,length:h.length||null}}))}}if(m.published){o.appendChild(this.createElementNSPlus("atom:published",{value:m.published}))}if(m.rights){o.appendChild(this.createElementNSPlus("atom:rights",{value:m.rights}))}if(m.summary||d.description){o.appendChild(this.createElementNSPlus("atom:summary",{value:m.summary||d.description}))}o.appendChild(this.createElementNSPlus("atom:title",{value:m.title||d.title||this.defaultEntryTitle}));if(m.updated){o.appendChild(this.createElementNSPlus("atom:updated",{value:m.updated}))}if(r.geometry){var b=this.createElementNSPlus("georss:where");b.appendChild(this.buildGeometryNode(r.geometry));o.appendChild(b)}return o},initGmlParser:function(){this.gmlParser=new OpenLayers.Format.GML.v3({xy:this.xy,featureNS:"http://example.com#feature",internalProjection:this.internalProjection,externalProjection:this.externalProjection})},buildGeometryNode:function(b){if(!this.gmlParser){this.initGmlParser()}var a=this.gmlParser.writeNode("feature:_geometry",b);return a.firstChild},buildPersonConstructNode:function(b,g){var e=["uri","email"];var a=this.createElementNSPlus("atom:"+b);a.appendChild(this.createElementNSPlus("atom:name",{value:g.name}));for(var d=0,f=e.length;d<f;d++){if(g[e[d]]){a.appendChild(this.createElementNSPlus("atom:"+e[d],{value:g[e[d]]}))}}return a},getFirstChildValue:function(e,b,d,g){var f;var a=this.getElementsByTagNameNS(e,b,d);if(a&&a.length>0){f=this.getChildValue(a[0],g)}else{f=g}return f},parseFeature:function(e){var q={};var r=null;var a=null;var o=null;var b=this.namespaces.atom;this.parsePersonConstructs(e,"author",q);a=this.getElementsByTagNameNS(e,b,"category");if(a.length>0){q.categories=[]}for(var h=0,u=a.length;h<u;h++){r={};r.term=a[h].getAttribute("term");o=a[h].getAttribute("scheme");if(o){r.scheme=o}o=a[h].getAttribute("label");if(o){r.label=o}q.categories.push(r)}a=this.getElementsByTagNameNS(e,b,"content");if(a.length>0){r={};o=a[0].getAttribute("type");if(o){r.type=o}o=a[0].getAttribute("src");if(o){r.src=o}else{if(r.type=="text"||r.type=="html"||r.type==null){r.value=this.getFirstChildValue(e,b,"content",null)}else{if(r.type=="xhtml"||r.type.match(/(\+|\/)xml$/)){r.value=this.getChildEl(a[0])}else{r.value=this.getFirstChildValue(e,b,"content",null)}}q.content=r}}this.parsePersonConstructs(e,"contributor",q);q.id=this.getFirstChildValue(e,b,"id",null);a=this.getElementsByTagNameNS(e,b,"link");if(a.length>0){q.links=new Array(a.length)}var d=["rel","type","hreflang","title","length"];for(var h=0,u=a.length;h<u;h++){r={};r.href=a[h].getAttribute("href");for(var f=0,m=d.length;f<m;f++){o=a[h].getAttribute(d[f]);if(o){r[d[f]]=o}}q.links[h]=r}r=this.getFirstChildValue(e,b,"published",null);if(r){q.published=r}r=this.getFirstChildValue(e,b,"rights",null);if(r){q.rights=r}r=this.getFirstChildValue(e,b,"summary",null);if(r){q.summary=r}q.title=this.getFirstChildValue(e,b,"title",null);q.updated=this.getFirstChildValue(e,b,"updated",null);var g={title:q.title,description:q.summary,atom:q};var p=this.parseLocations(e)[0];var v=new OpenLayers.Feature.Vector(p,g);v.fid=q.id;return v},parseFeatures:function(f){var e=[];var a=this.getElementsByTagNameNS(f,this.namespaces.atom,"entry");if(a.length==0){a=[f]}for(var b=0,d=a.length;b<d;b++){e.push(this.parseFeature(a[b]))}return e},parseLocations:function(d){var a=this.namespaces.georss;var o={components:[]};var g=this.getElementsByTagNameNS(d,a,"where");if(g&&g.length>0){if(!this.gmlParser){this.initGmlParser()}for(var f=0,w=g.length;f<w;f++){this.gmlParser.readChildNodes(g[f],o)}}var m=o.components;var u=this.getElementsByTagNameNS(d,a,"point");if(u&&u.length>0){for(var f=0,w=u.length;f<w;f++){var B=OpenLayers.String.trim(u[f].firstChild.nodeValue).split(/\s+/);if(B.length!=2){B=OpenLayers.String.trim(u[f].firstChild.nodeValue).split(/\s*,\s*/)}m.push(new OpenLayers.Geometry.Point(parseFloat(B[1]),parseFloat(B[0])))}}var z=this.getElementsByTagNameNS(d,a,"line");if(z&&z.length>0){var r;var b;var v;for(var f=0,w=z.length;f<w;f++){r=OpenLayers.String.trim(z[f].firstChild.nodeValue).split(/\s+/);v=[];for(var e=0,h=r.length;e<h;e+=2){b=new OpenLayers.Geometry.Point(parseFloat(r[e+1]),parseFloat(r[e]));v.push(b)}m.push(new OpenLayers.Geometry.LineString(v))}}var q=this.getElementsByTagNameNS(d,a,"polygon");if(q&&q.length>0){var r;var b;var v;for(var f=0,w=q.length;f<w;f++){r=OpenLayers.String.trim(q[f].firstChild.nodeValue).split(/\s+/);v=[];for(var e=0,h=r.length;e<h;e+=2){b=new OpenLayers.Geometry.Point(parseFloat(r[e+1]),parseFloat(r[e]));v.push(b)}m.push(new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing(m)]))}}if(this.internalProjection&&this.externalProjection){for(var f=0,w=m.length;f<w;f++){if(m[f]){m[f].transform(this.externalProjection,this.internalProjection)}}}return m},parsePersonConstructs:function(e,a,h){var q=[];var d=this.namespaces.atom;var b=this.getElementsByTagNameNS(e,d,a);var f=["uri","email"];for(var m=0,u=b.length;m<u;m++){var r={};r.name=this.getFirstChildValue(b[m],d,"name",null);for(var g=0,o=f.length;g<o;g++){var p=this.getFirstChildValue(b[m],d,f[g],null);if(p){r[f[g]]=p}}q.push(r)}if(q.length>0){h[a+"s"]=q}},CLASS_NAME:"OpenLayers.Format.Atom"});OpenLayers.Format.Filter.v1_0_0=OpenLayers.Class(OpenLayers.Format.GML.v2,OpenLayers.Format.Filter.v1,{VERSION:"1.0.0",schemaLocation:"http://www.opengis.net/ogc/filter/1.0.0/filter.xsd",initialize:function(a){OpenLayers.Format.GML.v2.prototype.initialize.apply(this,[a])},readers:{ogc:OpenLayers.Util.applyDefaults({PropertyIsEqualTo:function(b,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)},PropertyIsLike:function(e,f){var d=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.LIKE});this.readChildNodes(e,d);var g=e.getAttribute("wildCard");var b=e.getAttribute("singleChar");var a=e.getAttribute("escape");d.value2regex(g,b,a);f.filters.push(d)}},OpenLayers.Format.Filter.v1.prototype.readers.ogc),gml:OpenLayers.Format.GML.v2.prototype.readers.gml,feature:OpenLayers.Format.GML.v2.prototype.readers.feature},writers:{ogc:OpenLayers.Util.applyDefaults({PropertyIsEqualTo:function(a){var b=this.createElementNSPlus("ogc:PropertyIsEqualTo");this.writeNode("PropertyName",a,b);this.writeNode("Literal",a.value,b);return b},PropertyIsNotEqualTo:function(a){var b=this.createElementNSPlus("ogc:PropertyIsNotEqualTo");this.writeNode("PropertyName",a,b);this.writeNode("Literal",a.value,b);return b},PropertyIsLike:function(a){var b=this.createElementNSPlus("ogc:PropertyIsLike",{attributes:{wildCard:"*",singleChar:".",escape:"!"}});this.writeNode("PropertyName",a,b);this.writeNode("Literal",a.regex2value(),b);return b},BBOX:function(a){var 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 e;if(b.value instanceof OpenLayers.Geometry){e=this.writeNode("feature:_geometry",b.value).firstChild}else{e=this.writeNode("gml:Box",b.value)}if(b.projection){e.setAttribute("srsName",b.projection)}d.appendChild(e);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,e){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);e.filters.push(a)},PropertyIsNotEqualTo:function(b,e){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);e.filters.push(a)},PropertyIsLike:function(e,f){var d=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.LIKE});this.readChildNodes(e,d);var g=e.getAttribute("wildCard");var b=e.getAttribute("singleChar");var a=e.getAttribute("escapeChar");d.value2regex(g,b,a);f.filters.push(d)}},OpenLayers.Format.Filter.v1.prototype.readers.ogc),gml:OpenLayers.Format.GML.v3.prototype.readers.gml,feature:OpenLayers.Format.GML.v3.prototype.readers.feature},writers:{ogc:OpenLayers.Util.applyDefaults({PropertyIsEqualTo:function(a){var b=this.createElementNSPlus("ogc:PropertyIsEqualTo",{attributes:{matchCase:a.matchCase}});this.writeNode("PropertyName",a,b);this.writeNode("Literal",a.value,b);return b},PropertyIsNotEqualTo:function(a){var b=this.createElementNSPlus("ogc:PropertyIsNotEqualTo",{attributes:{matchCase:a.matchCase}});this.writeNode("PropertyName",a,b);this.writeNode("Literal",a.value,b);return b},PropertyIsLike:function(a){var b=this.createElementNSPlus("ogc:PropertyIsLike",{attributes:{wildCard:"*",singleChar:".",escapeChar:"!"}});this.writeNode("PropertyName",a,b);this.writeNode("Literal",a.regex2value(),b);return b},BBOX:function(a){var 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 e;if(b.value instanceof OpenLayers.Geometry){e=this.writeNode("feature:_geometry",b.value).firstChild}else{e=this.writeNode("gml:Envelope",b.value)}if(b.projection){e.setAttribute("srsName",b.projection)}d.appendChild(e);return d},CLASS_NAME:"OpenLayers.Format.Filter.v1_1_0"});OpenLayers.Format.SOSCapabilities.v1_0_0=OpenLayers.Class(OpenLayers.Format.SOSCapabilities,{namespaces:{ows:"http://www.opengis.net/ows/1.1",sos:"http://www.opengis.net/sos/1.0",gml:"http://www.opengis.net/gml",xlink:"http://www.w3.org/1999/xlink"},regExes:{trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)},initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a]);this.options=a},read:function(b){if(typeof b=="string"){b=OpenLayers.Format.XML.prototype.read.apply(this,[b])}if(b&&b.nodeType==9){b=b.documentElement}var a={};this.readNode(b,a);return a},readers:{gml:OpenLayers.Util.applyDefaults({name:function(a,b){b.name=this.getChildValue(a)},TimePeriod:function(a,b){b.timePeriod={};this.readChildNodes(a,b.timePeriod)},beginPosition:function(b,a){a.beginPosition=this.getChildValue(b)},endPosition:function(b,a){a.endPosition=this.getChildValue(b)}},OpenLayers.Format.GML.v3.prototype.readers.gml),sos:{Capabilities:function(a,b){this.readChildNodes(a,b)},Contents:function(a,b){b.contents={};this.readChildNodes(a,b.contents)},ObservationOfferingList:function(b,a){a.offeringList={};this.readChildNodes(b,a.offeringList)},ObservationOffering:function(b,a){var d=this.getAttributeNS(b,this.namespaces.gml,"id");a[d]={procedures:[],observedProperties:[],featureOfInterestIds:[],responseFormats:[],resultModels:[],responseModes:[]};this.readChildNodes(b,a[d])},time:function(a,b){b.time={};this.readChildNodes(a,b.time)},procedure:function(a,b){b.procedures.push(this.getAttributeNS(a,this.namespaces.xlink,"href"))},observedProperty:function(a,b){b.observedProperties.push(this.getAttributeNS(a,this.namespaces.xlink,"href"))},featureOfInterest:function(a,b){b.featureOfInterestIds.push(this.getAttributeNS(a,this.namespaces.xlink,"href"))},responseFormat:function(a,b){b.responseFormats.push(this.getChildValue(a))},resultModel:function(a,b){b.resultModels.push(this.getChildValue(a))},responseMode:function(a,b){b.responseModes.push(this.getChildValue(a))}},ows:OpenLayers.Format.OWSCommon.v1_1_0.prototype.readers.ows},CLASS_NAME:"OpenLayers.Format.SOSCapabilities.v1_0_0"});OpenLayers.Format.SOSGetFeatureOfInterest=OpenLayers.Class(OpenLayers.Format.XML,{VERSION:"1.0.0",namespaces:{sos:"http://www.opengis.net/sos/1.0",gml:"http://www.opengis.net/gml",sa:"http://www.opengis.net/sampling/1.0",xsi:"http://www.w3.org/2001/XMLSchema-instance"},schemaLocation:"http://www.opengis.net/sos/1.0 http://schemas.opengis.net/sos/1.0.0/sosAll.xsd",defaultPrefix:"sos",regExes:{trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)},initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},read:function(g){if(typeof g=="string"){g=OpenLayers.Format.XML.prototype.read.apply(this,[g])}if(g&&g.nodeType==9){g=g.documentElement}var h={features:[]};this.readNode(g,h);var f=[];for(var e=0,a=h.features.length;e<a;e++){var b=h.features[e];if(this.internalProjection&&this.externalProjection&&b.components[0]){b.components[0].transform(this.externalProjection,this.internalProjection)}var d=new OpenLayers.Feature.Vector(b.components[0],b.attributes);f.push(d)}return f},readers:{sa:{SamplingPoint:function(b,d){if(!d.attributes){var a={attributes:{}};d.features.push(a);d=a}d.attributes.id=this.getAttributeNS(b,this.namespaces.gml,"id");this.readChildNodes(b,d)},position:function(a,b){this.readChildNodes(a,b)}},gml:OpenLayers.Util.applyDefaults({FeatureCollection:function(a,b){this.readChildNodes(a,b)},featureMember:function(b,d){var a={attributes:{}};d.features.push(a);this.readChildNodes(b,a)},name:function(a,b){b.attributes.name=this.getChildValue(a)},pos:function(a,b){if(!this.externalProjection){this.externalProjection=new OpenLayers.Projection(a.getAttribute("srsName"))}OpenLayers.Format.GML.v3.prototype.readers.gml.pos.apply(this,[a,b])}},OpenLayers.Format.GML.v3.prototype.readers.gml)},writers:{sos:{GetFeatureOfInterest:function(b){var e=this.createElementNSPlus("GetFeatureOfInterest",{attributes:{version:this.VERSION,service:"SOS","xsi:schemaLocation":this.schemaLocation}});for(var d=0,a=b.fois.length;d<a;d++){this.writeNode("FeatureOfInterestId",{foi:b.fois[d]},e)}return e},FeatureOfInterestId:function(a){var b=this.createElementNSPlus("FeatureOfInterestId",{value:a.foi});return b}}},CLASS_NAME:"OpenLayers.Format.SOSGetFeatureOfInterest"});OpenLayers.Format.SOSGetObservation=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{ows:"http://www.opengis.net/ows",gml:"http://www.opengis.net/gml",sos:"http://www.opengis.net/sos/1.0",ogc:"http://www.opengis.net/ogc",om:"http://www.opengis.net/om/1.0",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},regExes:{trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)},VERSION:"1.0.0",schemaLocation:"http://www.opengis.net/sos/1.0 http://schemas.opengis.net/sos/1.0.0/sosGetObservation.xsd",defaultPrefix:"sos",initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},read:function(a){if(typeof a=="string"){a=OpenLayers.Format.XML.prototype.read.apply(this,[a])}if(a&&a.nodeType==9){a=a.documentElement}var b={measurements:[]};this.readNode(a,b);return b},write:function(a){var b=this.writeNode("sos:GetObservation",a);b.setAttribute("xmlns:om",this.namespaces.om);this.setAttributeNS(b,this.namespaces.xsi,"xsi:schemaLocation",this.schemaLocation);return OpenLayers.Format.XML.prototype.write.apply(this,[b])},readers:{om:{ObservationCollection:function(a,b){b.id=this.getAttributeNS(a,this.namespaces.gml,"id");this.readChildNodes(a,b)},member:function(a,b){this.readChildNodes(a,b)},Measurement:function(b,d){var a={};d.measurements.push(a);this.readChildNodes(b,a)},samplingTime:function(b,a){var d={};a.samplingTime=d;this.readChildNodes(b,d)},observedProperty:function(b,a){a.observedProperty=this.getAttributeNS(b,this.namespaces.xlink,"href");this.readChildNodes(b,a)},procedure:function(b,a){a.procedure=this.getAttributeNS(b,this.namespaces.xlink,"href");this.readChildNodes(b,a)},result:function(d,b){var a={};b.result=a;if(this.getChildValue(d)!==""){a.value=this.getChildValue(d);a.uom=d.getAttribute("uom")}else{this.readChildNodes(d,a)}}},gml:OpenLayers.Util.applyDefaults({TimeInstant:function(a,b){var d={};b.timeInstant=d;this.readChildNodes(a,d)},timePosition:function(a,b){b.timePosition=this.getChildValue(a)}},OpenLayers.Format.GML.v3.prototype.readers.gml)},writers:{sos:{GetObservation:function(a){var b=this.createElementNSPlus("GetObservation",{attributes:{version:this.VERSION,service:"SOS"}});this.writeNode("offering",a,b);this.writeNode("eventTime",a,b);this.writeNode("procedure",a,b);this.writeNode("observedProperty",a,b);this.writeNode("responseFormat",a,b);this.writeNode("resultModel",a,b);this.writeNode("responseMode",a,b);return b},responseFormat:function(a){return this.createElementNSPlus("responseFormat",{value:a.responseFormat})},procedure:function(a){return this.createElementNSPlus("procedure",{value:a.procedure})},offering:function(a){return this.createElementNSPlus("offering",{value:a.offering})},observedProperty:function(a){return this.createElementNSPlus("observedProperty",{value:a.observedProperty})},eventTime:function(a){var b=this.createElementNSPlus("eventTime");if(a.eventTime==="latest"){this.writeNode("ogc:TM_Equals",a,b)}return b},resultModel:function(a){return this.createElementNSPlus("resultModel",{value:a.resultModel})},responseMode:function(a){return this.createElementNSPlus("responseMode",{value:a.responseMode})}},ogc:{TM_Equals:function(a){var b=this.createElementNSPlus("ogc:TM_Equals");this.writeNode("ogc:PropertyName",{property:"urn:ogc:data:time:iso8601"},b);if(a.eventTime==="latest"){this.writeNode("gml:TimeInstant",{value:"latest"},b)}return b},PropertyName:function(a){return this.createElementNSPlus("ogc:PropertyName",{value:a.property})}},gml:{TimeInstant:function(a){var b=this.createElementNSPlus("gml:TimeInstant");this.writeNode("gml:timePosition",a,b);return b},timePosition:function(a){var b=this.createElementNSPlus("gml:timePosition",{value:a.value});return b}}},CLASS_NAME:"OpenLayers.Format.SOSGetObservation"});OpenLayers.Format.CSWGetRecords.v2_0_2=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance",csw:"http://www.opengis.net/cat/csw/2.0.2",dc:"http://purl.org/dc/elements/1.1/",dct:"http://purl.org/dc/terms/",ows:"http://www.opengis.net/ows"},defaultPrefix:"csw",version:"2.0.2",schemaLocation:"http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd",requestId:null,resultType:null,outputFormat:null,outputSchema:null,startPosition:null,maxRecords:null,DistributedSearch:null,ResponseHandler:null,Query:null,regExes:{trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)},initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},read:function(a){if(typeof a=="string"){a=OpenLayers.Format.XML.prototype.read.apply(this,[a])}if(a&&a.nodeType==9){a=a.documentElement}var b={};this.readNode(a,b);return b},readers:{csw:{GetRecordsResponse:function(b,d){d.records=[];this.readChildNodes(b,d);var a=this.getAttributeNS(b,"","version");if(a!=""){d.version=a}},RequestId:function(a,b){b.RequestId=this.getChildValue(a)},SearchStatus:function(a,d){d.SearchStatus={};var b=this.getAttributeNS(a,"","timestamp");if(b!=""){d.SearchStatus.timestamp=b}},SearchResults:function(e,f){this.readChildNodes(e,f);var b=e.attributes;var g={};for(var d=0,a=b.length;d<a;++d){if((b[d].name=="numberOfRecordsMatched")||(b[d].name=="numberOfRecordsReturned")||(b[d].name=="nextRecord")){g[b[d].name]=parseInt(b[d].nodeValue)}else{g[b[d].name]=b[d].nodeValue}}f.SearchResults=g},SummaryRecord:function(b,d){var a={type:"SummaryRecord"};this.readChildNodes(b,a);d.records.push(a)},BriefRecord:function(b,d){var a={type:"BriefRecord"};this.readChildNodes(b,a);d.records.push(a)},DCMIRecord:function(b,d){var a={type:"DCMIRecord"};this.readChildNodes(b,a);d.records.push(a)},Record:function(b,d){var a={type:"Record"};this.readChildNodes(b,a);d.records.push(a)}},dc:{"*":function(g,h){var e=g.localName||g.nodeName.split(":").pop();if(!(h[e] instanceof Array)){h[e]=new Array()}var d={};var b=g.attributes;for(var f=0,a=b.length;f<a;++f){d[b[f].name]=b[f].nodeValue}d.value=this.getChildValue(g);h[e].push(d)}},dct:{"*":function(b,d){var a=b.localName||b.nodeName.split(":").pop();if(!(d[a] instanceof Array)){d[a]=new Array()}d[a].push(this.getChildValue(b))}},ows:OpenLayers.Util.applyDefaults({BoundingBox:function(a,b){if(b.bounds){b.BoundingBox=[{crs:b.projection,value:[b.bounds.left,b.bounds.bottom,b.bounds.right,b.bounds.top]}];delete b.projection;delete b.bounds}OpenLayers.Format.OWSCommon.v1_0_0.prototype.readers.ows["BoundingBox"].apply(this,arguments)}},OpenLayers.Format.OWSCommon.v1_0_0.prototype.readers.ows)},write:function(a){var b=this.writeNode("csw:GetRecords",a);return OpenLayers.Format.XML.prototype.write.apply(this,[b])},writers:{csw:{GetRecords:function(b){if(!b){b={}}var f=this.createElementNSPlus("csw:GetRecords",{attributes:{service:"CSW",version:this.version,requestId:b.requestId||this.requestId,resultType:b.resultType||this.resultType,outputFormat:b.outputFormat||this.outputFormat,outputSchema:b.outputSchema||this.outputSchema,startPosition:b.startPosition||this.startPosition,maxRecords:b.maxRecords||this.maxRecords}});if(b.DistributedSearch||this.DistributedSearch){this.writeNode("csw:DistributedSearch",b.DistributedSearch||this.DistributedSearch,f)}var e=b.ResponseHandler||this.ResponseHandler;if(e instanceof Array&&e.length>0){for(var d=0,a=e.length;d<a;d++){this.writeNode("csw:ResponseHandler",e[d],f)}}this.writeNode("Query",b.Query||this.Query,f);return f},DistributedSearch:function(a){var b=this.createElementNSPlus("csw:DistributedSearch",{attributes:{hopCount:a.hopCount}});return b},ResponseHandler:function(a){var b=this.createElementNSPlus("csw:ResponseHandler",{value:a.value});return b},Query:function(b){if(!b){b={}}var f=this.createElementNSPlus("csw:Query",{attributes:{typeNames:b.typeNames||"csw:Record"}});var e=b.ElementName;if(e instanceof Array&&e.length>0){for(var d=0,a=e.length;d<a;d++){this.writeNode("csw:ElementName",e[d],f)}}else{this.writeNode("csw:ElementSetName",b.ElementSetName||{value:"summary"},f)}if(b.Constraint){this.writeNode("csw:Constraint",b.Constraint,f)}return f},ElementName:function(a){var b=this.createElementNSPlus("csw:ElementName",{value:a.value});return b},ElementSetName:function(a){var b=this.createElementNSPlus("csw:ElementSetName",{attributes:{typeNames:a.typeNames},value:a.value});return b},Constraint:function(a){var b=this.createElementNSPlus("csw:Constraint",{attributes:{version:a.version}});if(a.Filter){var d=new OpenLayers.Format.Filter({version:a.version});b.appendChild(d.write(a.Filter))}else{if(a.CqlText){var e=this.createElementNSPlus("CqlText",{value:a.CqlText.value});b.appendChild(e)}}return b}}},CLASS_NAME:"OpenLayers.Format.CSWGetRecords.v2_0_2"});OpenLayers.Format.SLD.v1=OpenLayers.Class(OpenLayers.Format.Filter.v1_0_0,{namespaces:{sld:"http://www.opengis.net/sld",ogc:"http://www.opengis.net/ogc",gml:"http://www.opengis.net/gml",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},defaultPrefix:"sld",schemaLocation:null,multipleSymbolizers:false,featureTypeCounter:null,defaultSymbolizer:{fillColor:"#808080",fillOpacity:1,strokeColor:"#000000",strokeOpacity:1,strokeWidth:1,strokeDashstyle:"solid",pointRadius:3,graphicName:"square"},initialize:function(a){OpenLayers.Format.Filter.v1_0_0.prototype.initialize.apply(this,[a])},read:function(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(e,f){var d={userStyles:[],namedStyles:[]};this.readChildNodes(e,d);for(var b=0,a=d.userStyles.length;b<a;++b){d.userStyles[b].layerName=d.name}if(f.namedLayers instanceof Array){f.namedLayers.push(d)}else{f.namedLayers[d.name]=d}},NamedStyle:function(b,a){a.namedStyles.push(this.getChildName(b.firstChild))},UserStyle:function(d,a){var e={defaultsPerSymbolizer:true,rules:[]};this.featureTypeCounter=-1;this.readChildNodes(d,e);var b;if(this.multipleSymbolizers){delete e.defaultsPerSymbolizer;b=new OpenLayers.Style2(e)}else{b=new OpenLayers.Style(this.defaultSymbolizer,e)}a.userStyles.push(b)},IsDefault:function(b,a){if(this.getChildValue(b)=="1"){a.isDefault=true}},FeatureTypeStyle:function(b,a){++this.featureTypeCounter;var d={rules:this.multipleSymbolizers?a.rules:[]};this.readChildNodes(b,d);if(!this.multipleSymbolizers){a.rules=d.rules}},Rule:function(b,e){var a;if(this.multipleSymbolizers){a={symbolizers:[]}}var d=new OpenLayers.Rule(a);this.readChildNodes(b,d);e.rules.push(d)},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={};this.readChildNodes(b,a);if(this.multipleSymbolizers){a.zIndex=this.featureTypeCounter;d.symbolizers.push(new OpenLayers.Symbolizer.Text(a))}else{d.symbolizer.Text=OpenLayers.Util.applyDefaults(a,d.symbolizer.Text)}},Label:function(b,a){var e={};this.readChildNodes(b,e);if(e.property){a.label="${"+e.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}},RasterSymbolizer:function(b,d){var a={};this.readChildNodes(b,a);if(this.multipleSymbolizers){a.zIndex=this.featureTypeCounter;d.symbolizers.push(new OpenLayers.Symbolizer.Raster(a))}else{d.symbolizer.Raster=OpenLayers.Util.applyDefaults(a,d.symbolizer.Raster)}},Geometry:function(a,b){b.geometry={};this.readChildNodes(a,b.geometry)},ColorMap:function(b,a){a.colorMap=[];this.readChildNodes(b,a.colorMap)},ColorMapEntry:function(b,a){var d=b.getAttribute("quantity");var e=b.getAttribute("opacity");a.push({color:b.getAttribute("color"),quantity:d!==null?parseFloat(d):undefined,label:b.getAttribute("label")||undefined,opacity:e!==null?parseFloat(e):undefined})},LineSymbolizer:function(b,d){var a={};this.readChildNodes(b,a);if(this.multipleSymbolizers){a.zIndex=this.featureTypeCounter;d.symbolizers.push(new OpenLayers.Symbolizer.Line(a))}else{d.symbolizer.Line=OpenLayers.Util.applyDefaults(a,d.symbolizer.Line)}},PolygonSymbolizer:function(b,d){var a={fill:false,stroke:false};if(!this.multipleSymbolizers){a=d.symbolizer.Polygon||a}this.readChildNodes(b,a);if(this.multipleSymbolizers){a.zIndex=this.featureTypeCounter;d.symbolizers.push(new OpenLayers.Symbolizer.Polygon(a))}else{d.symbolizer.Polygon=a}},PointSymbolizer:function(b,d){var a={fill:false,stroke:false,graphic:false};if(!this.multipleSymbolizers){a=d.symbolizer.Point||a}this.readChildNodes(b,a);if(this.multipleSymbolizers){a.zIndex=this.featureTypeCounter;d.symbolizers.push(new OpenLayers.Symbolizer.Point(a))}else{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 f=this.cssMap[a];if(f){var e=this.readOgcExpression(d);if(e){b[f]=e}}},Graphic:function(f,e){e.graphic=true;var j={};this.readChildNodes(f,j);var d=["stroke","strokeColor","strokeWidth","strokeOpacity","strokeLinecap","fill","fillColor","fillOpacity","graphicName","rotation","graphicFormat"];var h,g;for(var b=0,a=d.length;b<a;++b){h=d[b];g=j[h];if(g!=undefined){e[h]=g}}if(j.opacity!=undefined){e.graphicOpacity=j.opacity}if(j.size!=undefined){e.pointRadius=j.size/2}if(j.href!=undefined){e.externalGraphic=j.href}if(j.rotation!=undefined){e.rotation=j.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 e,d;for(var b in this.graphicFormats){if(this.graphicFormats[b].test(a)){e=b;break}}return e||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(f){var b=this.createElementNSPlus("sld:StyledLayerDescriptor",{attributes:{version:this.VERSION,"xsi:schemaLocation":this.schemaLocation}});b.setAttribute("xmlns:ogc",this.namespaces.ogc);b.setAttribute("xmlns:gml",this.namespaces.gml);if(f.name){this.writeNode("Name",f.name,b)}if(f.title){this.writeNode("Title",f.title,b)}if(f.description){this.writeNode("Abstract",f.description,b)}if(f.namedLayers instanceof Array){for(var e=0,a=f.namedLayers.length;e<a;++e){this.writeNode("NamedLayer",f.namedLayers[e],b)}}else{for(var d in f.namedLayers){this.writeNode("NamedLayer",f.namedLayers[d],b)}}return b},Name:function(a){return this.createElementNSPlus("sld:Name",{value:a})},Title:function(a){return this.createElementNSPlus("sld:Title",{value:a})},Abstract:function(a){return this.createElementNSPlus("sld:Abstract",{value:a})},NamedLayer:function(d){var e=this.createElementNSPlus("sld:NamedLayer");this.writeNode("Name",d.name,e);if(d.namedStyles){for(var b=0,a=d.namedStyles.length;b<a;++b){this.writeNode("NamedStyle",d.namedStyles[b],e)}}if(d.userStyles){for(var b=0,a=d.userStyles.length;b<a;++b){this.writeNode("UserStyle",d.userStyles[b],e)}}return e},NamedStyle:function(a){var b=this.createElementNSPlus("sld:NamedStyle");this.writeNode("Name",a,b);return b},UserStyle:function(b){var e=this.createElementNSPlus("sld:UserStyle");if(b.name){this.writeNode("Name",b.name,e)}if(b.title){this.writeNode("Title",b.title,e)}if(b.description){this.writeNode("Abstract",b.description,e)}if(b.isDefault){this.writeNode("IsDefault",b.isDefault,e)}if(this.multipleSymbolizers&&b.rules){var q={0:[]};var d=[0];var p,a,v,o,m;for(var g=0,u=b.rules.length;g<u;++g){p=b.rules[g];if(p.symbolizers){a={};for(var f=0,h=p.symbolizers.length;f<h;++f){v=p.symbolizers[f];o=v.zIndex;if(!(o in a)){m=p.clone();m.symbolizers=[];a[o]=m}a[o].symbolizers.push(v.clone())}for(o in a){if(!(o in q)){d.push(o);q[o]=[]}q[o].push(a[o])}}else{q[0].push(p.clone())}}d.sort();var r;for(var g=0,u=d.length;g<u;++g){r=q[d[g]];if(r.length>0){m=b.clone();m.rules=q[d[g]];this.writeNode("FeatureTypeStyle",m,e)}}}else{this.writeNode("FeatureTypeStyle",b,e)}return e},IsDefault:function(a){return this.createElementNSPlus("sld:IsDefault",{value:(a)?"1":"0"})},FeatureTypeStyle:function(d){var e=this.createElementNSPlus("sld:FeatureTypeStyle");for(var b=0,a=d.rules.length;b<a;++b){this.writeNode("Rule",d.rules[b],e)}return e},Rule:function(j){var h=this.createElementNSPlus("sld: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 g,f;if(this.multipleSymbolizers&&j.symbolizers){var f;for(var d=0,e=j.symbolizers.length;d<e;++d){f=j.symbolizers[d];g=f.CLASS_NAME.split(".").pop();this.writeNode(g+"Symbolizer",f,h)}}else{var b=OpenLayers.Style.SYMBOLIZER_PREFIXES;for(var d=0,a=b.length;d<a;++d){g=b[d];f=j.symbolizer[g];if(f){this.writeNode(g+"Symbolizer",f,h)}}}return h},ElseFilter:function(){return this.createElementNSPlus("sld:ElseFilter")},MinScaleDenominator:function(a){return this.createElementNSPlus("sld:MinScaleDenominator",{value:a})},MaxScaleDenominator:function(a){return this.createElementNSPlus("sld:MaxScaleDenominator",{value:a})},LineSymbolizer:function(a){var b=this.createElementNSPlus("sld:LineSymbolizer");this.writeNode("Stroke",a,b);return b},Stroke:function(a){var b=this.createElementNSPlus("sld:Stroke");if(a.strokeColor!=undefined){this.writeNode("CssParameter",{symbolizer:a,key:"strokeColor"},b)}if(a.strokeOpacity!=undefined){this.writeNode("CssParameter",{symbolizer:a,key:"strokeOpacity"},b)}if(a.strokeWidth!=undefined){this.writeNode("CssParameter",{symbolizer:a,key:"strokeWidth"},b)}if(a.strokeDashstyle!=undefined&&a.strokeDashstyle!=="solid"){this.writeNode("CssParameter",{symbolizer:a,key:"strokeDashstyle"},b)}if(a.strokeLinecap!=undefined){this.writeNode("CssParameter",{symbolizer:a,key:"strokeLinecap"},b)}return b},CssParameter:function(a){return this.createElementNSPlus("sld:CssParameter",{attributes:{name:this.getCssProperty(a.key)},value:a.symbolizer[a.key]})},TextSymbolizer:function(a){var b=this.createElementNSPlus("sld:TextSymbolizer");if(a.label!=null){this.writeNode("Label",a.label,b)}if(a.fontFamily!=null||a.fontSize!=null||a.fontWeight!=null||a.fontStyle!=null){this.writeNode("Font",a,b)}if(a.haloRadius!=null||a.haloColor!=null||a.haloOpacity!=null){this.writeNode("Halo",a,b)}if(a.fillColor!=null||a.fillOpacity!=null){this.writeNode("Fill",a,b)}return b},Font:function(a){var b=this.createElementNSPlus("sld:Font");if(a.fontFamily){this.writeNode("CssParameter",{symbolizer:a,key:"fontFamily"},b)}if(a.fontSize){this.writeNode("CssParameter",{symbolizer:a,key:"fontSize"},b)}if(a.fontWeight){this.writeNode("CssParameter",{symbolizer:a,key:"fontWeight"},b)}if(a.fontStyle){this.writeNode("CssParameter",{symbolizer:a,key:"fontStyle"},b)}return b},Label:function(b){var g=this.createElementNSPlus("sld:Label");var h=b.split("${");g.appendChild(this.createTextNode(h[0]));var f,e;for(var d=1,a=h.length;d<a;d++){f=h[d];e=f.indexOf("}");if(e>0){this.writeNode("ogc:PropertyName",{property:f.substring(0,e)},g);g.appendChild(this.createTextNode(f.substring(++e)))}else{g.appendChild(this.createTextNode("${"+f))}}return g},Halo:function(a){var b=this.createElementNSPlus("sld:Halo");if(a.haloRadius){this.writeNode("Radius",a.haloRadius,b)}if(a.haloColor||a.haloOpacity){this.writeNode("Fill",{fillColor:a.haloColor,fillOpacity:a.haloOpacity},b)}return b},Radius:function(a){return this.createElementNSPlus("sld:Radius",{value:a})},RasterSymbolizer:function(a){var b=this.createElementNSPlus("sld:RasterSymbolizer");if(a.geometry){this.writeNode("Geometry",a.geometry,b)}if(a.opacity){this.writeNode("Opacity",a.opacity,b)}if(a.colorMap){this.writeNode("ColorMap",a.colorMap,b)}return b},Geometry:function(b){var a=this.createElementNSPlus("sld:Geometry");if(b.property){this.writeNode("ogc:PropertyName",b,a)}return a},ColorMap:function(b){var e=this.createElementNSPlus("sld:ColorMap");for(var d=0,a=b.length;d<a;++d){this.writeNode("ColorMapEntry",b[d],e)}return e},ColorMapEntry:function(d){var e=this.createElementNSPlus("sld:ColorMapEntry");var b=d;e.setAttribute("color",b.color);b.opacity!==undefined&&e.setAttribute("opacity",parseFloat(b.opacity));b.quantity!==undefined&&e.setAttribute("quantity",parseFloat(b.quantity));b.label!==undefined&&e.setAttribute("label",b.label);return e},PolygonSymbolizer:function(a){var b=this.createElementNSPlus("sld:PolygonSymbolizer");if(a.fill!==false){this.writeNode("Fill",a,b)}if(a.stroke!==false){this.writeNode("Stroke",a,b)}return b},Fill:function(a){var b=this.createElementNSPlus("sld:Fill");if(a.fillColor){this.writeNode("CssParameter",{symbolizer:a,key:"fillColor"},b)}if(a.fillOpacity!=null){this.writeNode("CssParameter",{symbolizer:a,key:"fillOpacity"},b)}return b},PointSymbolizer:function(a){var b=this.createElementNSPlus("sld:PointSymbolizer");this.writeNode("Graphic",a,b);return b},Graphic:function(a){var b=this.createElementNSPlus("sld:Graphic");if(a.externalGraphic!=undefined){this.writeNode("ExternalGraphic",a,b)}else{this.writeNode("Mark",a,b)}if(a.graphicOpacity!=undefined){this.writeNode("Opacity",a.graphicOpacity,b)}if(a.pointRadius!=undefined){this.writeNode("Size",a.pointRadius*2,b)}if(a.rotation!=undefined){this.writeNode("Rotation",a.rotation,b)}return b},ExternalGraphic:function(a){var b=this.createElementNSPlus("sld:ExternalGraphic");this.writeNode("OnlineResource",a.externalGraphic,b);var d=a.graphicFormat||this.getGraphicFormat(a.externalGraphic);this.writeNode("Format",d,b);return b},Mark:function(a){var b=this.createElementNSPlus("sld:Mark");if(a.graphicName){this.writeNode("WellKnownName",a.graphicName,b)}if(a.fill!==false){this.writeNode("Fill",a,b)}if(a.stroke!==false){this.writeNode("Stroke",a,b)}return b},WellKnownName:function(a){return this.createElementNSPlus("sld:WellKnownName",{value:a})},Opacity:function(a){return this.createElementNSPlus("sld:Opacity",{value:a})},Size:function(a){return this.createElementNSPlus("sld:Size",{value:a})},Rotation:function(a){return this.createElementNSPlus("sld:Rotation",{value:a})},OnlineResource:function(a){return this.createElementNSPlus("sld:OnlineResource",{attributes:{"xlink:type":"simple","xlink:href":a}})},Format:function(a){return this.createElementNSPlus("sld:Format",{value:a})}}},OpenLayers.Format.Filter.v1_0_0.prototype.writers),CLASS_NAME:"OpenLayers.Format.SLD.v1"});OpenLayers.Format.WFST.v1_0_0=OpenLayers.Class(OpenLayers.Format.Filter.v1_0_0,OpenLayers.Format.WFST.v1,{version:"1.0.0",srsNameInQuery:false,schemaLocations:{wfs:"http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd"},initialize:function(a){OpenLayers.Format.Filter.v1_0_0.prototype.initialize.apply(this,[a]);OpenLayers.Format.WFST.v1.prototype.initialize.apply(this,[a])},readers:{wfs:OpenLayers.Util.applyDefaults({WFS_TransactionResponse:function(a,b){b.insertIds=[];b.success=false;this.readChildNodes(a,b)},InsertResult:function(b,a){var 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,srsNameInQuery:this.srsNameInQuery},b);var e=this.createElementNSPlus("wfs:Query",{attributes:{typeName:(b.featureNS?b.featurePrefix+":":"")+b.featureType}});if(b.srsNameInQuery&&b.srsName){e.setAttribute("srsName",b.srsName)}if(b.featureNS){e.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]},e)}}if(b.filter){this.setFilterProperty(b.filter);this.writeNode("ogc:Filter",b.filter,e)}return e}},OpenLayers.Format.WFST.v1.prototype.writers.wfs),gml:OpenLayers.Format.GML.v2.prototype.writers.gml,feature:OpenLayers.Format.GML.v2.prototype.writers.feature,ogc:OpenLayers.Format.Filter.v1_0_0.prototype.writers.ogc},CLASS_NAME:"OpenLayers.Format.WFST.v1_0_0"});OpenLayers.Format.WFST.v1_1_0=OpenLayers.Class(OpenLayers.Format.Filter.v1_1_0,OpenLayers.Format.WFST.v1,{version:"1.1.0",schemaLocations:{wfs:"http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"},initialize:function(a){OpenLayers.Format.Filter.v1_1_0.prototype.initialize.apply(this,[a]);OpenLayers.Format.WFST.v1.prototype.initialize.apply(this,[a])},readers:{wfs:OpenLayers.Util.applyDefaults({FeatureCollection:function(a,b){b.numberOfFeatures=parseInt(a.getAttribute("numberOfFeatures"));OpenLayers.Format.WFST.v1.prototype.readers.wfs["FeatureCollection"].apply(this,arguments)},TransactionResponse:function(a,b){b.insertIds=[];b.success=false;this.readChildNodes(a,b)},TransactionSummary:function(a,b){b.success=true},InsertResults:function(a,b){this.readChildNodes(a,b)},Feature:function(b,a){var 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({GetFeature:function(a){var b=OpenLayers.Format.WFST.v1.prototype.writers.wfs["GetFeature"].apply(this,arguments);a&&a.resultType&&this.setAttributes(b,{resultType:a.resultType});return b},Query:function(b){b=OpenLayers.Util.extend({featureNS:this.featureNS,featurePrefix:this.featurePrefix,featureType:this.featureType,srsName:this.srsName},b);var e=this.createElementNSPlus("wfs:Query",{attributes:{typeName:(b.featureNS?b.featurePrefix+":":"")+b.featureType,srsName:b.srsName}});if(b.featureNS){e.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]},e)}}if(b.filter){this.setFilterProperty(b.filter);this.writeNode("ogc:Filter",b.filter,e)}return e},PropertyName:function(a){return this.createElementNSPlus("wfs:PropertyName",{value:a.property})}},OpenLayers.Format.WFST.v1.prototype.writers.wfs),gml:OpenLayers.Format.GML.v3.prototype.writers.gml,feature:OpenLayers.Format.GML.v3.prototype.writers.feature,ogc:OpenLayers.Format.Filter.v1_1_0.prototype.writers.ogc},CLASS_NAME:"OpenLayers.Format.WFST.v1_1_0"});OpenLayers.Protocol.SOS.v1_0_0=OpenLayers.Class(OpenLayers.Protocol,{fois:null,formatOptions:null,initialize:function(a){OpenLayers.Protocol.prototype.initialize.apply(this,[a]);if(!a.format){this.format=new OpenLayers.Format.SOSGetFeatureOfInterest(this.formatOptions)}},destroy:function(){if(this.options&&!this.options.format){this.format.destroy()}this.format=null;OpenLayers.Protocol.prototype.destroy.apply(this)},read:function(b){b=OpenLayers.Util.extend({},b);OpenLayers.Util.applyDefaults(b,this.options||{});var a=new OpenLayers.Protocol.Response({requestType:"read"});var e=this.format;var d=OpenLayers.Format.XML.prototype.write.apply(e,[e.writeNode("sos:GetFeatureOfInterest",{fois:this.fois})]);a.priv=OpenLayers.Request.POST({url:b.url,callback:this.createCallback(this.handleRead,a,b),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)},CLASS_NAME:"OpenLayers.Protocol.SOS.v1_0_0"});OpenLayers.Format.SLD.v1_0_0=OpenLayers.Class(OpenLayers.Format.SLD.v1,{VERSION:"1.0.0",schemaLocation:"http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd",initialize:function(a){OpenLayers.Format.SLD.v1.prototype.initialize.apply(this,[a])},CLASS_NAME:"OpenLayers.Format.SLD.v1_0_0"});OpenLayers.Protocol.WFS.v1_0_0=OpenLayers.Class(OpenLayers.Protocol.WFS.v1,{version:"1.0.0",CLASS_NAME:"OpenLayers.Protocol.WFS.v1_0_0"});OpenLayers.Protocol.WFS.v1_1_0=OpenLayers.Class(OpenLayers.Protocol.WFS.v1,{version:"1.1.0",CLASS_NAME:"OpenLayers.Protocol.WFS.v1_1_0"});OpenLayers.Format.OWSContext.v0_3_1=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{owc:"http://www.opengis.net/ows-context",gml:"http://www.opengis.net/gml",kml:"http://www.opengis.net/kml/2.2",ogc:"http://www.opengis.net/ogc",ows:"http://www.opengis.net/ows",sld:"http://www.opengis.net/sld",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},VERSION:"0.3.1",schemaLocation:"http://www.opengis.net/ows-context http://www.ogcnetwork.net/schemas/owc/0.3.1/owsContext.xsd",defaultPrefix:"owc",extractAttributes:true,xy:true,regExes:{trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)},featureNS:"http://mapserver.gis.umn.edu/mapserver",featureType:"vector",geometryName:"geometry",nestingLayerLookup:null,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a]);OpenLayers.Format.GML.v2.prototype.setGeometryTypes.call(this)},setNestingPath:function(b){if(b.layersContext){for(var d=0,a=b.layersContext.length;d<a;d++){var g=b.layersContext[d];var e=[];var f=b.title||"";if(b.metadata&&b.metadata.nestingPath){e=b.metadata.nestingPath.slice()}if(f!=""){e.push(f)}g.metadata.nestingPath=e;if(g.layersContext){this.setNestingPath(g)}}}},decomposeNestingPath:function(d){var b=[];if(d instanceof Array){while(d.length>0){b.push(d.slice());d.pop()}b.reverse()}return b},read:function(b){if(typeof b=="string"){b=OpenLayers.Format.XML.prototype.read.apply(this,[b])}if(b&&b.nodeType==9){b=b.documentElement}var a={};this.readNode(b,a);this.setNestingPath({layersContext:a.layersContext});var d=[];this.processLayer(d,a);delete a.layersContext;a.layersContext=d;return a},processLayer:function(b,f){if(f.layersContext){for(var e=0,a=f.layersContext.length;e<a;e++){var d=f.layersContext[e];b.push(d);if(d.layersContext){this.processLayer(b,d)}}}},write:function(e,d){var b="OWSContext";this.nestingLayerLookup={};d=d||{};OpenLayers.Util.applyDefaults(d,e);var a=this.writeNode(b,d);this.nestingLayerLookup=null;this.setAttributeNS(a,this.namespaces.xsi,"xsi:schemaLocation",this.schemaLocation);return OpenLayers.Format.XML.prototype.write.apply(this,[a])},readers:{kml:{Document:function(a,b){b.features=new OpenLayers.Format.KML({kmlns:this.namespaces.kml,extractStyles:true}).read(a)}},owc:{OWSContext:function(a,b){this.readChildNodes(a,b)},General:function(a,b){this.readChildNodes(a,b)},ResourceList:function(a,b){this.readChildNodes(a,b)},Layer:function(a,d){var b={metadata:{},visibility:(a.getAttribute("hidden")!="1"),queryable:(a.getAttribute("queryable")=="1"),opacity:((a.getAttribute("opacity")!=null)?parseFloat(a.getAttribute("opacity")):null),name:a.getAttribute("name"),categoryLayer:(a.getAttribute("name")==null),formats:[],styles:[]};if(!d.layersContext){d.layersContext=[]}d.layersContext.push(b);this.readChildNodes(a,b)},InlineGeometry:function(b,e){e.features=[];var d=this.getElementsByTagNameNS(b,this.namespaces.gml,"featureMember");var a;if(d.length>=1){a=d[0]}if(a&&a.firstChild){var f=(a.firstChild.nextSibling)?a.firstChild.nextSibling:a.firstChild;this.setNamespace("feature",f.namespaceURI);this.featureType=f.localName||f.nodeName.split(":").pop();this.readChildNodes(b,e)}},Server:function(a,b){if((!b.service&&!b.version)||(b.service!=OpenLayers.Format.Context.serviceTypes.WMS)){b.service=a.getAttribute("service");b.version=a.getAttribute("version");this.readChildNodes(a,b)}},Name:function(a,b){b.name=this.getChildValue(a);this.readChildNodes(a,b)},Title:function(a,b){b.title=this.getChildValue(a);this.readChildNodes(a,b)},StyleList:function(a,b){this.readChildNodes(a,b.styles)},Style:function(b,d){var a={};d.push(a);this.readChildNodes(b,a)},LegendURL:function(b,d){var a={};d.legend=a;this.readChildNodes(b,a)},OnlineResource:function(a,b){b.url=this.getAttributeNS(a,this.namespaces.xlink,"href");this.readChildNodes(a,b)}},ows:OpenLayers.Format.OWSCommon.v1_0_0.prototype.readers.ows,gml:OpenLayers.Format.GML.v2.prototype.readers.gml,sld:OpenLayers.Format.SLD.v1_0_0.prototype.readers.sld,feature:OpenLayers.Format.GML.v2.prototype.readers.feature},writers:{owc:{OWSContext:function(a){var b=this.createElementNSPlus("OWSContext",{attributes:{version:this.VERSION,id:a.id||OpenLayers.Util.createUniqueID("OpenLayers_OWSContext_")}});this.writeNode("General",a,b);this.writeNode("ResourceList",a,b);return b},General:function(a){var b=this.createElementNSPlus("General");this.writeNode("ows:BoundingBox",a,b);this.writeNode("ows:Title",a.title||"OpenLayers OWSContext",b);return b},ResourceList:function(d){var g=this.createElementNSPlus("ResourceList");for(var f=0,b=d.layers.length;f<b;f++){var e=d.layers[f];var a=this.decomposeNestingPath(e.metadata.nestingPath);this.writeNode("_Layer",{layer:e,subPaths:a},g)}return g},Server:function(a){var b=this.createElementNSPlus("Server",{attributes:{version:a.version,service:a.service}});this.writeNode("OnlineResource",a,b);return b},OnlineResource:function(a){var b=this.createElementNSPlus("OnlineResource",{attributes:{"xlink:href":a.url}});return b},InlineGeometry:function(d){var e=this.createElementNSPlus("InlineGeometry");this.writeNode("gml:boundedBy",d.getDataExtent(),e);for(var b=0,a=d.features.length;b<a;b++){this.writeNode("gml:featureMember",d.features[b],e)}return e},StyleList:function(e){var d=this.createElementNSPlus("StyleList");for(var b=0,a=e.length;b<a;b++){this.writeNode("Style",e[b],d)}return d},Style:function(a){var b=this.createElementNSPlus("Style");this.writeNode("Name",a,b);this.writeNode("Title",a,b);this.writeNode("LegendURL",a,b);return b},Name:function(b){var a=this.createElementNSPlus("Name",{value:b.name});return a},Title:function(b){var a=this.createElementNSPlus("Title",{value:b.title});return a},LegendURL:function(a){var b=this.createElementNSPlus("LegendURL");this.writeNode("OnlineResource",a.legend,b);return b},_WMS:function(a){var b=this.createElementNSPlus("Layer",{attributes:{name:a.params.LAYERS,queryable:a.queryable?"1":"0",hidden:a.visibility?"0":"1",opacity:a.opacity?a.opacity:null}});this.writeNode("ows:Title",a.name,b);this.writeNode("ows:OutputFormat",a.params.FORMAT,b);this.writeNode("Server",{service:OpenLayers.Format.Context.serviceTypes.WMS,version:a.params.VERSION,url:a.url},b);if(a.metadata.styles&&a.metadata.styles.length>0){this.writeNode("StyleList",a.metadata.styles,b)}return b},_Layer:function(b){var d,h,e,g;d=b.layer;h=b.subPaths;e=null;g=null;if(h.length>0){var f=h[0].join("/");var a=f.lastIndexOf("/");e=this.nestingLayerLookup[f];g=(a>0)?f.substring(a+1,f.length):f;if(!e){e=this.createElementNSPlus("Layer");this.writeNode("ows:Title",g,e);this.nestingLayerLookup[f]=e}b.subPaths.shift();this.writeNode("_Layer",b,e);return e}else{if(d instanceof OpenLayers.Layer.WMS){e=this.writeNode("_WMS",d)}else{if(d instanceof OpenLayers.Layer.Vector){if(d.protocol instanceof OpenLayers.Protocol.WFS.v1){e=this.writeNode("_WFS",d)}else{if(d.protocol instanceof OpenLayers.Protocol.HTTP){if(d.protocol.format instanceof OpenLayers.Format.GML){d.protocol.format.version="2.1.2";e=this.writeNode("_GML",d)}else{if(d.protocol.format instanceof OpenLayers.Format.KML){d.protocol.format.version="2.2";e=this.writeNode("_KML",d)}}}else{this.setNamespace("feature",this.featureNS);e=this.writeNode("_InlineGeometry",d)}}}}if(d.options.maxScale){this.writeNode("sld:MinScaleDenominator",d.options.maxScale,e)}if(d.options.minScale){this.writeNode("sld:MaxScaleDenominator",d.options.minScale,e)}this.nestingLayerLookup[d.name]=e;return e}},_WFS:function(a){var b=this.createElementNSPlus("Layer",{attributes:{name:a.protocol.featurePrefix+":"+a.protocol.featureType,hidden:a.visibility?"0":"1"}});this.writeNode("ows:Title",a.name,b);this.writeNode("Server",{service:OpenLayers.Format.Context.serviceTypes.WFS,version:a.protocol.version,url:a.protocol.url},b);return b},_InlineGeometry:function(a){var b=this.createElementNSPlus("Layer",{attributes:{name:this.featureType,hidden:a.visibility?"0":"1"}});this.writeNode("ows:Title",a.name,b);this.writeNode("InlineGeometry",a,b);return b},_GML:function(a){var b=this.createElementNSPlus("Layer");this.writeNode("ows:Title",a.name,b);this.writeNode("Server",{service:OpenLayers.Format.Context.serviceTypes.GML,url:a.protocol.url,version:a.protocol.format.version},b);return b},_KML:function(a){var b=this.createElementNSPlus("Layer");this.writeNode("ows:Title",a.name,b);this.writeNode("Server",{service:OpenLayers.Format.Context.serviceTypes.KML,version:a.protocol.format.version,url:a.protocol.url},b);return b}},gml:OpenLayers.Util.applyDefaults({boundedBy:function(b){var a=this.createElementNSPlus("gml:boundedBy");this.writeNode("gml:Box",b,a);return a}},OpenLayers.Format.GML.v2.prototype.writers.gml),ows:OpenLayers.Format.OWSCommon.v1_0_0.prototype.writers.ows,sld:OpenLayers.Format.SLD.v1_0_0.prototype.writers.sld,feature:OpenLayers.Format.GML.v2.prototype.writers.feature},CLASS_NAME:"OpenLayers.Format.OWSContext.v0_3_1"});Proj4js={defaultDatum:"WGS84",transform:function(e,b,a){if(!e.readyToUse){this.reportError("Proj4js initialization for:"+e.srsCode+" not yet complete");return a}if(!b.readyToUse){this.reportError("Proj4js initialization for:"+b.srsCode+" not yet complete");return a}if((e.srsProjNumber=="900913"&&b.datumCode!="WGS84")||(b.srsProjNumber=="900913"&&e.datumCode!="WGS84")){var d=Proj4js.WGS84;this.transform(e,d,a);e=d}if(e.axis!="enu"){this.adjust_axis(e,false,a)}if(e.projName=="longlat"){a.x*=Proj4js.common.D2R;a.y*=Proj4js.common.D2R}else{if(e.to_meter){a.x*=e.to_meter;a.y*=e.to_meter}e.inverse(a)}if(e.from_greenwich){a.x+=e.from_greenwich}a=this.datum_transform(e.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(f,h,e){var d=e.x,m=e.y,a=e.z||0;var g,j;for(var b=0;b<3;b++){if(h&&b==2&&e.z===undefined){continue}if(b==0){g=d;j="x"}else{if(b==1){g=m;j="y"}else{g=a;j="z"}}switch(f.axis[b]){case"e":e[j]=g;break;case"w":e[j]=-g;break;case"n":e[j]=g;break;case"s":e[j]=-g;break;case"u":if(e[j]!==undefined){e.z=g}break;case"d":if(e[j]!==undefined){e.z=-g}break;default:alert("ERROR: unknow axis ("+f.axis[b]+") - check definition of "+src.projName);return null}}return e},reportError:function(a){},extend:function(a,e){a=a||{};if(e){for(var d in e){var b=e[d];if(b!==undefined){a[d]=b}}}return a},Class:function(){var b=function(){this.initialize.apply(this,arguments)};var a={};var e;for(var d=0;d<arguments.length;++d){if(typeof arguments[d]=="function"){e=arguments[d].prototype}else{e=arguments[d]}Proj4js.extend(a,e)}b.prototype=a;return b},bind:function(d,b){var a=Array.prototype.slice.apply(arguments,[2]);return function(){var e=a.concat(Array.prototype.slice.apply(arguments,[0]));return d.apply(b,e)}},scriptName:"proj4js.js",defsLookupService:"http://spatialreference.org/ref",libPath:null,getScriptLocation:function(){if(this.libPath){return this.libPath}var f=this.scriptName;var e=f.length;var a=document.getElementsByTagName("script");for(var d=0;d<a.length;d++){var g=a[d].getAttribute("src");if(g){var b=g.lastIndexOf(f);if((b>-1)&&(b+e==g.length)){this.libPath=g.slice(0,-e);break}}}return this.libPath||""},loadScript:function(e,f,d,a){var b=document.createElement("script");b.defer=false;b.type="text/javascript";b.id=e;b.src=e;b.onload=f;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 h=p.split(",");var u=h.shift();u=u.replace(/^\"/,"");u=u.replace(/\"$/,"");var r=new Array();var b=0;var g="";for(var f=0;f<h.length;++f){var d=h[f];for(var e=0;e<d.length;++e){if(d.charAt(e)=="["){++b}if(d.charAt(e)=="]"){--b}}g+=d;if(b===0){r.push(g);g=""}else{g+=","}}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 f=0;f<r.length;++f){this.parseWKT(r[f])}},parseDefs:function(){this.defData=Proj4js.defs[this.srsCode];var f,b;if(!this.defData){return}var a=this.defData.split("+");for(var g=0;g<a.length;g++){var e=a[g].split("=");f=e[0].toLowerCase();b=e[1];switch(f.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,e){var a=d*b;return e/(Math.sqrt(1-a*a))},tsfnz:function(f,e,d){var a=f*d;var b=0.5*f;a=Math.pow(((1-a)/(1+a)),b);return(Math.tan(0.5*(this.HALF_PI-e))/a)},phi2z:function(h,g){var f=0.5*h;var a,b;var e=this.HALF_PI-2*Math.atan(g);for(var d=0;d<=15;d++){a=h*Math.sin(e);b=this.HALF_PI-2*Math.atan(g*(Math.pow(((1-a)/(1+a)),f)))-e;e+=b;if(Math.abs(b)<=1e-10){return e}}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(f,e,d,b,a){return(f*a-e*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(e,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=e*b;return Math.log(Math.tan((this.HALF_PI+d)/2))+e*Math.log((1-a)/(1+a))/2},fL:function(b,a){return 2*Math.atan(b*Math.exp(a))-this.HALF_PI},invlatiso:function(f,d){var b=this.fL(1,d);var e=0;var a=0;do{e=b;a=f*Math.sin(e);b=this.fL(Math.exp(f*Math.log((1+a)/(1-a))/2),d)}while(Math.abs(b-e)>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 j=d.y;var e=d.z?d.z:0;var f;var b;var a;var o=0;var q;var m;var h;var g;if(j<-Proj4js.common.HALF_PI&&j>-1.001*Proj4js.common.HALF_PI){j=-Proj4js.common.HALF_PI}else{if(j>Proj4js.common.HALF_PI&&j<1.001*Proj4js.common.HALF_PI){j=Proj4js.common.HALF_PI}else{if((j<-Proj4js.common.HALF_PI)||(j>Proj4js.common.HALF_PI)){Proj4js.reportError("geocent:lat out of range:"+j);return null}}}if(r>Proj4js.common.PI){r-=(2*Proj4js.common.PI)}m=Math.sin(j);g=Math.cos(j);h=m*m;q=this.a/(Math.sqrt(1-this.es*h));f=(q+e)*g*Math.cos(r);b=(q+e)*g*Math.sin(r);a=((q*(1-this.es))+e)*m;d.x=f;d.y=b;d.z=a;return o},geocentric_to_geodetic:function(D){var I=1e-12;var E=(I*I);var g=30;var r;var j;var a;var v;var b;var u;var q;var H;var G;var o;var B;var z;var f;var F;var h=D.x;var e=D.y;var d=D.z?D.z:0;var m;var C;var w;f=false;r=Math.sqrt(h*h+e*e);j=Math.sqrt(h*h+e*e+d*d);if(r/this.a<I){f=true;m=0;if(j/this.a<I){C=Proj4js.common.HALF_PI;w=-this.b;return}}else{m=Math.atan2(e,h)}a=d/j;v=r/j;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<g);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 e=C.x;var d=C.y;var a=C.z?C.z:0;var h;var B;var r;var f;var v;var z;var u;var o;var j;var m;var F;var g;var E;var D;var w;var q;var b;e=parseFloat(e);d=parseFloat(d);a=parseFloat(a);b=false;if(e!=0){h=Math.atan2(d,e)}else{if(d>0){h=Proj4js.common.HALF_PI}else{if(d<0){h=-Proj4js.common.HALF_PI}else{b=true;h=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=e*e+d*d;f=Math.sqrt(v);z=a*Proj4js.common.AD_C;o=Math.sqrt(z*z+v);m=z/o;g=f/o;F=m*m*m;u=a+this.b*this.ep2*F;q=f-this.a*this.es*g*g*g;j=Math.sqrt(u*u+q*q);E=u/j;D=q/j;w=this.a/Math.sqrt(1-this.es*E*E);if(D>=Proj4js.common.COS_67P5){r=f/D-w}else{if(D<=-Proj4js.common.COS_67P5){r=f/-D-w}else{r=a/E+w*(this.es-1)}}if(b==false){B=Math.atan(E/D)}C.x=h;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 g=this.datum_params[0];var e=this.datum_params[1];var m=this.datum_params[2];var f=this.datum_params[3];var o=this.datum_params[4];var j=this.datum_params[5];var h=this.datum_params[6];var d=h*(b.x-j*b.y+o*b.z)+g;var a=h*(j*b.x+b.y-f*b.z)+e;var q=h*(-o*b.x+f*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 h=this.datum_params[0];var e=this.datum_params[1];var o=this.datum_params[2];var g=this.datum_params[3];var q=this.datum_params[4];var m=this.datum_params[5];var j=this.datum_params[6];var f=(d.x-h)/j;var b=(d.y-e)/j;var a=(d.z-o)/j;d.x=f+m*b-q*a;d.y=-m*f+b+g*a;d.z=q*f-g*b+a}}}});Proj4js.Point=Proj4js.Class({initialize:function(a,e,d){if(typeof a=="object"){this.x=a[0];this.y=a[1];this.z=a[2]||0}else{if(typeof a=="string"&&typeof e=="undefined"){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=e;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=Proj4js.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,e,h,m){var f={loaded:false,onload:e,onfail:h,loadCheck:m,transport:Proj4js.Try(function(){return new XMLHttpRequest()},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")})||null};if(!f.transport){return}if(f.transport.overrideMimeType){f.transport.overrideMimeType("text/xml")}var g="_tick_="+new Date().getTime();b+=(b.indexOf("?")+1?"&":"?")+g;if(Proj4js.ProxyHost){if(b.indexOf(Proj4js.ProxyHost)!=0){if(b.search(/^[a-z]+:\/\//i)!=-1){var j=b.match(/^[a-z]+:\/\/([^\/]*)\/?/i);if(j){j=j[1]}if(Proj4js.ProxyHostFQDN!=j){b=Proj4js.ProxyHost+encodeURIComponent(b)}}}}f.transport.open("GET",b,false);f.transport.onreadystatechange=Proj4js.bind(Proj4js.onStateChange,Proj4js,f);var d={"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript, text/html, application/xml, text/xml, */*",Proj4js:true};for(var a in d){f.transport.setRequestHeader(a,d[a])}f.transport.send(null);if(f.transport.overrideMimeType){Proj4js.onStateChange(f)}};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(f){var g=f.x;var e=f.y;this.sin_phi=Math.sin(e);this.cos_phi=Math.cos(e);var b=Proj4js.common.qsfnz(this.e3,this.sin_phi,this.cos_phi);var j=this.a*Math.sqrt(this.c-this.ns0*b)/this.ns0;var d=this.ns0*Proj4js.common.adjust_lon(g-this.long0);var a=j*Math.sin(d)+this.x0;var h=this.rh-j*Math.cos(d)+this.y0;f.x=a;f.y=h;return f},inverse:function(f){var h,a,b,d,g,e;f.x-=this.x0;f.y=this.rh-f.y+this.y0;if(this.ns0>=0){h=Math.sqrt(f.x*f.x+f.y*f.y);b=1}else{h=-Math.sqrt(f.x*f.x+f.y*f.y);b=-1}d=0;if(h!=0){d=Math.atan2(b*f.x,b*f.y)}b=h*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){e=this.phi1z(this.e3,a)}else{if(a>=0){e=0.5*PI}else{e=-0.5*PI}}}else{e=this.phi1z(e3,a)}g=Proj4js.common.adjust_lon(d/this.ns0+this.long0);f.x=g;f.y=e;return f},phi1z:function(j,a){var b,d,e;var h=Proj4js.common.asinz(0.5*a);if(j<Proj4js.common.EPSLN){return h}var g=j*j;for(var f=1;f<=25;f++){sinphi=Math.sin(h);cosphi=Math.cos(h);b=j*sinphi;d=1-b*b;e=0.5*d*d/cosphi*(a/(1-g)-sinphi/d+0.5/j*Math.log((1-b)/(1+b)));h=h+e;if(Math.abs(e)<=1e-7){return h}}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 f;var a=Math.sin(d.y);var e=Math.cos(d.y);var q=Proj4js.common.adjust_lon(b-this.long0);var o=Math.cos(q);var h=this.sin_p12*a+this.cos_p12*e*o;if(Math.abs(Math.abs(h)-1)<Proj4js.common.EPSLN){f=1;if(h<0){Proj4js.reportError("aeqd:Fwd:PointError");return}}else{var j=Math.acos(h);f=j/Math.sin(j)}d.x=this.x0+this.a*f*e*Math.sin(q);d.y=this.y0+this.a*f*(this.cos_p12*a-this.sin_p12*e*o);return d},inverse:function(b){b.x-=this.x0;b.y-=this.y0;var h=Math.sqrt(b.x*b.x+b.y*b.y);if(h>(2*Proj4js.common.HALF_PI*this.a)){Proj4js.reportError("aeqdInvDataError");return}var f=h/this.a;var e=Math.sin(f);var m=Math.cos(f);var a=this.long0;var g;if(Math.abs(h)<=Proj4js.common.EPSLN){g=this.lat0}else{g=Proj4js.common.asinz(m*this.sin_p12+(b.y*e*this.cos_p12)/h);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(g);if((Math.abs(d)<Proj4js.common.EPSLN)&&(Math.abs(b.x)<Proj4js.common.EPSLN)){}else{var j=Math.atan2((b.x*e*this.cos_p12),(d*h));a=Proj4js.common.adjust_lon(this.long0+Math.atan2((b.x*e*this.cos_p12),(d*h)))}}}b.x=a;b.y=g;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(e){var a,f;var b=e.x;var d=e.y;b=Proj4js.common.adjust_lon(b-this.long0);if(this.sphere){a=Math.asin(Math.cos(d)*Math.sin(b));f=Math.atan2(Math.tan(d),Math.cos(b))-this.phi0}else{this.n=Math.sin(d);this.c=Math.cos(d);f=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));f-=this.m0-this.n*this.tn*this.a2*(0.5+(5-this.t+6*this.c)*this.a2*this.C3)}e.x=this.a*a+this.x0;e.y=this.a*f+this.y0;return e},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(e,a,d,b){d*=a;a*=a;return(b[0]*e-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 e=d.x;var b=d.y;dlon=Proj4js.common.adjust_lon(e-this.long0);var a=this.x0+this.a*dlon*Math.cos(this.lat_ts);var f=this.y0+this.a*Math.sin(b)/Math.cos(this.lat_ts);d.x=a;d.y=f;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(e){var f=e.x;var d=e.y;var b=Proj4js.common.adjust_lon(f-this.long0);var a=Proj4js.common.adjust_lat(d-this.lat0);e.x=this.x0+(this.a*b*this.rc);e.y=this.y0+(this.a*a);return e},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(e){var f=e.x;var d=e.y;var j=Proj4js.common.mlfn(this.e0,this.e1,this.e2,this.e3,d);var h=this.a*(this.g-j);var b=this.ns*Proj4js.common.adjust_lon(f-this.long0);var a=this.x0+h*Math.sin(b);var g=this.y0+this.rh-h*Math.cos(b);e.x=a;e.y=g;return e},inverse:function(e){e.x-=this.x0;e.y=this.rh-e.y+this.y0;var a,h;if(this.ns>=0){var h=Math.sqrt(e.x*e.x+e.y*e.y);var a=1}else{h=-Math.sqrt(e.x*e.x+e.y*e.y);a=-1}var b=0;if(h!=0){b=Math.atan2(a*e.x,a*e.y)}var g=this.g-h/this.a;var d=this.phi3z(g,this.e0,this.e1,this.e2,this.e3);var f=Proj4js.common.adjust_lon(this.long0+b/this.ns);e.x=f;e.y=d;return e},phi3z:function(j,h,g,f,e){var d;var a;d=j;for(var b=0;b<15;b++){a=(j+g*Math.sin(2*d)-f*Math.sin(4*d)+e*Math.sin(6*d))/h-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(e){var f=e.x;var d=e.y;var b=Proj4js.common.adjust_lon(f-this.long0);var a=this.x0+this.a*b*Math.cos(this.lat0);var g=this.y0+this.a*d;this.t1=a;this.t2=Math.cos(this.lat0);e.x=a;e.y=g;return e},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(e){var d=1e-14;var f=e.x/this.C;var b=e.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(e.y),-0.5*this.e))-Proj4js.common.HALF_PI;if(Math.abs(b-e.y)<d){break}e.y=b}if(!a){Proj4js.reportError("gauss:inverse:convergence failed");return null}e.x=f;e.y=b;return e}};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,e;var o;var m;var f;var h;var b=d.x;var j=d.y;o=Proj4js.common.adjust_lon(b-this.long0);a=Math.sin(j);e=Math.cos(j);m=Math.cos(o);h=this.sin_p14*a+this.cos_p14*e*m;f=1;if((h>0)||(Math.abs(h)<=Proj4js.common.EPSLN)){x=this.x0+this.a*f*e*Math.sin(o)/h;y=this.y0+this.a*f*(this.cos_p14*a-this.sin_p14*e*m)/h}else{Proj4js.reportError("orthoFwdPointError");x=this.x0+this.infinity_dist*e*Math.sin(o);y=this.y0+this.infinity_dist*(this.cos_p14*a-this.sin_p14*e*m)}d.x=x;d.y=y;return d},inverse:function(f){var a;var h;var b,d;var j;var g,e;f.x=(f.x-this.x0)/this.a;f.y=(f.y-this.y0)/this.a;f.x/=this.k0;f.y/=this.k0;if((a=Math.sqrt(f.x*f.x+f.y*f.y))){j=Math.atan2(a,this.rc);b=Math.sin(j);d=Math.cos(j);e=Proj4js.common.asinz(d*this.sin_p14+(f.y*b*this.cos_p14)/a);g=Math.atan2(f.x*b,a*this.cos_p14*d-f.y*this.sin_p14*b);g=Proj4js.common.adjust_lon(this.long0+g)}else{e=this.phic0;g=0}f.x=g;f.y=e;return f}};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 e=Math.sin(b);this.cp=Proj4js.common.latiso(0,b,e)-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(f){var h=f.x;var e=f.y;var a=this.rs*(h-this.lc);var b=this.cp+(this.rs*Proj4js.common.latiso(this.e,e,Math.sin(e)));var g=Math.asin(Math.sin(a)/Proj4js.common.cosh(b));var d=Proj4js.common.latiso(0,g,Math.sin(g));f.x=this.xs+(this.n2*d);f.y=this.ys+(this.n2*Math.atan(Proj4js.common.sinh(b)/Math.cos(a)));return f},inverse:function(e){var b=e.x;var g=e.y;var a=Math.atan(Proj4js.common.sinh((b-this.xs)/this.n2)/Math.cos((g-this.ys)/this.n2));var f=Math.asin(Math.sin((g-this.ys)/this.n2)/Proj4js.common.cosh((b-this.xs)/this.n2));var d=Proj4js.common.latiso(0,f,Math.sin(f));e.x=this.lc+a/this.rs;e.y=Proj4js.common.invlatiso(this.e,(d-this.cp)/this.rs);return e}};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(f){var v,r;var w=f.x;var m=f.y;w=Proj4js.common.adjust_lon(w-this.long0);if(this.sphere){var u,h,d;d=Math.sin(m);h=Math.cos(m);u=Math.cos(w);switch(this.mode){case this.OBLIQ:case this.EQUIT:r=(this.mode==this.EQUIT)?1+h*u:1+this.sinph0*d+this.cosph0*h*u;if(r<=Proj4js.common.EPSLN){Proj4js.reportError("laea:fwd:y less than eps");return null}r=Math.sqrt(2/r);v=r*h*Math.sin(w);r*=(this.mode==this.EQUIT)?d:this.cosph0*d-this.sinph0*h*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,j,d,e,g=0,a=0,o=0;u=Math.cos(w);j=Math.sin(w);d=Math.sin(m);e=Proj4js.common.qsfnz(this.e,d);if(this.mode==this.OBLIQ||this.mode==this.EQUIT){g=e/this.qp;a=Math.sqrt(1-g*g)}switch(this.mode){case this.OBLIQ:o=1+this.sinb1*g+this.cosb1*a*u;break;case this.EQUIT:o=1+a*u;break;case this.N_POLE:o=Proj4js.common.HALF_PI+m;e=this.qp-e;break;case this.S_POLE:o=m-Proj4js.common.HALF_PI;e=this.qp+e;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*g-this.sinb1*a*u)}else{r=(o=Math.sqrt(2/(1+a*u)))*g*this.ymf}v=this.xmf*o*a*j;break;case this.N_POLE:case this.S_POLE:if(e>=0){v=(o=Math.sqrt(e))*j;r=u*((this.mode==this.S_POLE)?o:-o)}else{v=r=0}break}}f.x=this.a*v+this.x0;f.y=this.a*r+this.y0;return f},inverse:function(b){b.x-=this.x0;b.y-=this.y0;var j=b.x/this.a;var g=b.y/this.a;if(this.sphere){var u=0,o,d=0;o=Math.sqrt(j*j+g*g);var f=o*0.5;if(f>1){Proj4js.reportError("laea:Inv:DataError");return null}f=2*Math.asin(f);if(this.mode==this.OBLIQ||this.mode==this.EQUIT){d=Math.sin(f);u=Math.cos(f)}switch(this.mode){case this.EQUIT:f=(Math.abs(o)<=Proj4js.common.EPSLN)?0:Math.asin(g*d/o);j*=d;g=u*o;break;case this.OBLIQ:f=(Math.abs(o)<=Proj4js.common.EPSLN)?this.phi0:Math.asin(u*sinph0+g*d*cosph0/o);j*=d*cosph0;g=(u-Math.sin(f)*sinph0)*o;break;case this.N_POLE:g=-g;f=Proj4js.common.HALF_PI-f;break;case this.S_POLE:f-=Proj4js.common.HALF_PI;break}lam=(g==0&&(this.mode==this.EQUIT||this.mode==this.OBLIQ))?0:Math.atan2(j,g)}else{var m,e,a,h,r=0;switch(this.mode){case this.EQUIT:case this.OBLIQ:j/=this.dd;g*=this.dd;h=Math.sqrt(j*j+g*g);if(h<Proj4js.common.EPSLN){b.x=0;b.y=this.phi0;return b}e=2*Math.asin(0.5*h/this.rq);m=Math.cos(e);j*=(e=Math.sin(e));if(this.mode==this.OBLIQ){r=m*this.sinb1+g*e*this.cosb1/h;a=this.qp*r;g=h*this.cosb1*m-g*this.sinb1*e}else{r=g*e/h;a=this.qp*r;g=h*m}break;case this.N_POLE:g=-g;case this.S_POLE:a=(j*j+g*g);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(j,g);f=this.authlat(Math.asin(r),this.apa)}b.x=Proj4js.common.adjust_lon(this.long0+lam);b.y=f;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 h=Math.sin(this.lat1);var f=Math.cos(this.lat1);var m=Proj4js.common.msfnz(this.e,h,f);var b=Proj4js.common.tsfnz(this.e,this.lat1,h);var g=Math.sin(this.lat2);var e=Math.cos(this.lat2);var j=Proj4js.common.msfnz(this.e,g,e);var a=Proj4js.common.tsfnz(this.e,this.lat2,g);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/j)/Math.log(b/a)}else{this.ns=h}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(f){var g=f.x;var e=f.y;if(Math.abs(2*Math.abs(e)-Proj4js.common.PI)<=Proj4js.common.EPSLN){e=Proj4js.common.sign(e)*(Proj4js.common.HALF_PI-2*Proj4js.common.EPSLN)}var a=Math.abs(Math.abs(e)-Proj4js.common.HALF_PI);var d,h;if(a>Proj4js.common.EPSLN){d=Proj4js.common.tsfnz(this.e,e,Math.sin(e));h=this.a*this.f0*Math.pow(d,this.ns)}else{a=e*this.ns;if(a<=0){Proj4js.reportError("lcc:forward: No Projection");return null}h=0}var b=this.ns*Proj4js.common.adjust_lon(g-this.long0);f.x=this.k0*(h*Math.sin(b))+this.x0;f.y=this.k0*(this.rh-h*Math.cos(b))+this.y0;return f},inverse:function(b){var f,d,g;var h,a;var m=(b.x-this.x0)/this.k0;var j=(this.rh-(b.y-this.y0)/this.k0);if(this.ns>0){f=Math.sqrt(m*m+j*j);d=1}else{f=-Math.sqrt(m*m+j*j);d=-1}var e=0;if(f!=0){e=Math.atan2((d*m),(d*j))}if((f!=0)||(this.ns>0)){d=1/this.ns;g=Math.pow((f/(this.a*this.f0)),d);h=Proj4js.common.phi2z(this.e,g);if(h==-9999){return null}}else{h=-Proj4js.common.HALF_PI}a=Proj4js.common.adjust_lon(e/this.ns+this.long0);b.x=a;b.y=h;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(f){var g=f.x;var e=f.y;if(e*Proj4js.common.R2D>90&&e*Proj4js.common.R2D<-90&&g*Proj4js.common.R2D>180&&g*Proj4js.common.R2D<-180){Proj4js.reportError("merc:forward: llInputOutOfRange: "+g+" : "+e);return null}var a,h;if(Math.abs(Math.abs(e)-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(g-this.long0);h=this.y0+this.a*this.k0*Math.log(Math.tan(Proj4js.common.FORTPI+0.5*e))}else{var d=Math.sin(e);var b=Proj4js.common.tsfnz(this.e,e,d);a=this.x0+this.a*this.k0*Proj4js.common.adjust_lon(g-this.long0);h=this.y0-this.a*this.k0*Math.log(b)}f.x=a;f.y=h;return f}},inverse:function(e){var a=e.x-this.x0;var g=e.y-this.y0;var f,d;if(this.sphere){d=Proj4js.common.HALF_PI-2*Math.atan(Math.exp(-g/this.a*this.k0))}else{var b=Math.exp(-g/(this.a*this.k0));d=Proj4js.common.phi2z(this.e,b);if(d==-9999){Proj4js.reportError("merc:inverse: lat = -9999");return null}}f=Proj4js.common.adjust_lon(this.long0+a/(this.a*this.k0));e.x=f;e.y=d;return e}};Proj4js.Proj.mill={init:function(){},forward:function(e){var f=e.x;var d=e.y;var b=Proj4js.common.adjust_lon(f-this.long0);var a=this.x0+this.a*b;var g=this.y0+this.a*Math.log(Math.tan((Proj4js.common.PI/4)+(d/2.5)))*1.25;e.x=a;e.y=g;return e},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 j=d.y;var g=Proj4js.common.adjust_lon(a-this.long0);var f=j;var e=Proj4js.common.PI*Math.sin(j);for(var h=0;true;h++){var b=-(f+Math.sin(f)-e)/(1+Math.cos(f));f+=b;if(Math.abs(b)<Proj4js.common.EPSLN){break}if(h>=50){Proj4js.reportError("moll:Fwd:IterationError")}}f/=2;if(Proj4js.common.PI/2-Math.abs(j)<Proj4js.common.EPSLN){g=0}var o=0.900316316158*this.a*g*Math.cos(f)+this.x0;var m=1.4142135623731*this.a*Math.sin(f)+this.y0;d.x=o;d.y=m;return d},inverse:function(e){var b;var a;e.x-=this.x0;var a=e.y/(1.4142135623731*this.a);if(Math.abs(a)>0.999999999999){a=0.999999999999}var b=Math.asin(a);var f=Proj4js.common.adjust_lon(this.long0+(e.x/(0.900316316158*this.a*Math.cos(b))));if(f<(-Proj4js.common.PI)){f=-Proj4js.common.PI}if(f>Proj4js.common.PI){f=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);e.x=f;e.y=d;return e}};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 e=B/Proj4js.common.SEC_TO_RAD*0.00001;var a=m;var q=1;var j=0;for(n=1;n<=10;n++){q=q*e;j=j+this.A[n]*q}var o=j;var g=a;var r=1;var h=0;var z;var f;var w=0;var u=0;for(n=1;n<=6;n++){z=r*o-h*g;f=h*o+r*g;r=z;h=f;w=w+this.B_re[n]*r-this.B_im[n]*h;u=u+this.B_im[n]*r+this.B_re[n]*h}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 f=G/this.a;var m=1;var M=0;var g;var J;var o=0;var a=0;for(n=1;n<=6;n++){g=m*u-M*f;J=M*u+m*f;m=g;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 j=a;var E;var B;var d=u;var I=f;for(n=2;n<=6;n++){E=z*o-j*a;B=j*o+z*a;z=E;j=B;d=d+(n-1)*(this.B_re[n]*z-this.B_im[n]*j);I=I+(n-1)*(this.B_im[n]*z+this.B_re[n]*j)}z=1;j=0;var b=this.B_re[1];var H=this.B_im[1];for(n=2;n<=6;n++){E=z*o-j*a;B=j*o+z*a;z=E;j=B;b=b+n*(this.B_re[n]*z-this.B_im[n]*j);H=H+n*(this.B_im[n]*z+this.B_re[n]*j)}var e=b*b+H*H;o=(d*b+I*H)/e;a=(I*b-d*H)/e}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 h=this.long0+r;C.x=h;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 e,J;var I;var H,v,d;var g,D,F;var B,o,G;var w,E;var z;var a;var h;var f=C.x;var j=C.y;e=Math.sin(j);a=Proj4js.common.adjust_lon(f-this.longc);G=Math.sin(this.bl*a);if(Math.abs(Math.abs(j)-Proj4js.common.HALF_PI)>Proj4js.common.EPSLN){h=Proj4js.common.tsfnz(this.e,j,e);B=this.el/(Math.pow(h,this.bl));z=0.5*(B-1/B);v=0.5*(B+1/B);w=(z*this.singam-G*this.cosgam)/v;g=Math.cos(this.bl*a);if(Math.abs(g)<1e-7){o=this.al*this.bl*a}else{o=this.al*Math.atan((z*this.cosgam+G*this.singam)/g)/this.bl;if(g<0){o=o+Proj4js.common.PI*this.al/this.bl}}}else{if(j>=0){w=this.singam}else{w=-this.singam}o=this.al*j/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 j;var f;var e,I;var H;var F,r,d;var g,z,D;var B,m,v,u,h;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{g=1/this.bl;h=Math.pow((this.el/Math.sqrt((1+o)/(1-o))),g);lat=Proj4js.common.phi2z(this.e,h);j=this.longc-Math.atan2((u*this.cosgam-E*this.singam),g)/this.bl;lon=Proj4js.common.adjust_lon(j)}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,e;var r;var q;var f;var h;var b=d.x;var j=d.y;r=Proj4js.common.adjust_lon(b-this.long0);a=Math.sin(j);e=Math.cos(j);q=Math.cos(r);h=this.sin_p14*a+this.cos_p14*e*q;f=1;if((h>0)||(Math.abs(h)<=Proj4js.common.EPSLN)){var o=this.a*f*e*Math.sin(r);var m=this.y0+this.a*f*(this.cos_p14*a-this.sin_p14*e*q)}else{Proj4js.reportError("orthoFwdPointError")}d.x=o;d.y=m;return d},inverse:function(b){var h;var g;var e,m;var j;var d;var a,f;b.x-=this.x0;b.y-=this.y0;h=Math.sqrt(b.x*b.x+b.y*b.y);if(h>this.a+1e-7){Proj4js.reportError("orthoInvDataError")}g=Proj4js.common.asinz(h/this.a);e=Math.sin(g);m=Math.cos(g);a=this.long0;if(Math.abs(h)<=Proj4js.common.EPSLN){f=this.lat0}f=Proj4js.common.asinz(m*this.sin_p14+(b.y*e*this.cos_p14)/h);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(f);b.x=a;b.y=f;return b}};function phi4z(e,m,j,h,g,E,D,C,f){var o,B,w,z,u,r,q,p,d,v;f=E;for(v=1;v<=15;v++){o=Math.sin(f);tanphi=Math.tan(f);C=tanphi*Math.sqrt(1-e*o*o);B=Math.sin(2*f);z=m*f-j*B+h*Math.sin(4*f)-g*Math.sin(6*f);u=m-2*j*Math.cos(2*f)+4*h*Math.cos(4*f)-6*g*Math.cos(6*f);r=2*z+C*(z*z+D)-2*E*(C*z+1);q=e*B*(z*z+D-2*E*z)/(2*C);p=2*(E-z)*(C*u-2/B)-2*u;d=r/(q+p);f+=d;if(Math.abs(d)<=1e-10){return(f)}}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(e){var a,g;var j;var o;var f,h;var d;var r,q;var b=e.x;var m=e.y;f=Proj4js.common.adjust_lon(b-this.long0);if(Math.abs(m)<=1e-7){r=this.x0+this.a*f;q=this.y0-this.a*this.ml0}else{a=Math.sin(m);g=Math.cos(m);h=Proj4js.common.mlfn(this.e0,this.e1,this.e2,this.e3,m);d=Proj4js.common.msfnz(this.e,a,g);f=a;r=this.x0+this.a*d*Math.sin(f)/a;q=this.y0+this.a*(h-this.ml0+d*(1-Math.cos(f))/a)}e.x=r;e.y=q;return e},inverse:function(d){var q,h;var g;var r;var m;var e,f;var o;var a,j;d.x-=this.x0;d.y-=this.y0;g=this.ml0+d.y/this.a;o=0;if(Math.abs(g)<=1e-7){a=d.x/this.a+this.long0;j=0}else{r=g*g+(d.x/this.a)*(d.x/this.a);o=phi4z(this.es,this.e0,this.e1,this.e2,this.e3,this.al,r,m,j);if(o!=1){return(o)}a=Proj4js.common.adjust_lon((Proj4js.common.asinz(d.x*m/this.a)/Math.sin(j))+this.long0)}d.x=a;d.y=j;return d}};Proj4js.Proj.sinu={init:function(){this.R=6370997},forward:function(e){var a,g,b;var f=e.x;var d=e.y;b=Proj4js.common.adjust_lon(f-this.long0);a=this.R*b*Math.cos(d)+this.x0;g=this.R*d+this.y0;e.x=a;e.y=g;return e},inverse:function(d){var b,a,e;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));e=Proj4js.common.adjust_lon(a)}else{e=this.long0}d.x=e;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(g){var m=Math.log(Math.tan(Math.PI/4-g.y/2));var h=this.e/2*Math.log((1+this.e*Math.sin(g.y))/(1-this.e*Math.sin(g.y)));var e=-this.alpha*(m+h)+this.K;var a=2*(Math.atan(Math.exp(e))-Math.PI/4);var d=this.alpha*(g.x-this.lambda0);var j=Math.atan(Math.sin(d)/(Math.sin(this.b0)*Math.tan(a)+Math.cos(this.b0)*Math.cos(d)));var f=Math.asin(Math.cos(this.b0)*Math.sin(a)-Math.sin(this.b0)*Math.cos(a)*Math.cos(d));g.y=this.R/2*Math.log((1+Math.sin(f))/(1-Math.sin(f)))+this.y0;g.x=this.R*j+this.x0;return g},inverse:function(e){var d=e.x-this.x0;var f=e.y-this.y0;var r=d/this.R;var g=2*(Math.atan(Math.exp(f/this.R))-Math.PI/4);var o=Math.asin(Math.cos(this.b0)*Math.sin(g)+Math.sin(this.b0)*Math.cos(g)*Math.cos(r));var q=Math.atan(Math.sin(r)/(Math.cos(this.b0)*Math.cos(r)-Math.sin(this.b0)*Math.tan(g)));var m=this.lambda0+q/this.alpha;var j=0;var u=o;var a=-1000;var h=0;while(Math.abs(u-a)>1e-7){if(++h>20){Proj4js.reportError("omercFwdInfinity");return}j=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(j))-Math.PI/2}e.x=m;e.y=u;return e}};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 g=d.y;var m,h;if(this.sphere){var a,e,j,f;a=Math.sin(g);e=Math.cos(g);j=Math.cos(b);f=Math.sin(b);switch(this.mode){case this.EQUIT:h=1+e*j;if(h<=Proj4js.common.EPSLN){F_ERROR}h=this.akm1/h;m=h*e*f;h*=a;break;case this.OBLIQ:h=1+this.sinph0*a+this.cosph0*e*j;if(h<=Proj4js.common.EPSLN){F_ERROR}h=this.akm1/h;m=h*e*f;h*=this.cosph0*a-this.sinph0*e*j;break;case this.N_POLE:j=-j;g=-g;case this.S_POLE:if(Math.abs(g-Proj4js.common.HALF_PI)<this.TOL){F_ERROR}h=this.akm1*Math.tan(Proj4js.common.FORTPI+0.5*g);m=f*h;h*=j;break}}else{j=Math.cos(b);f=Math.sin(b);a=Math.sin(g);if(this.mode==this.OBLIQ||this.mode==this.EQUIT){X=2*Math.atan(this.ssfn_(g,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*j));h=A*(this.cosX1*sinX-this.sinX1*cosX*j);m=A*cosX;break;case this.EQUIT:A=2*this.akm1/(1+cosX*j);h=A*sinX;m=A*cosX;break;case this.S_POLE:g=-g;j=-j;a=-a;case this.N_POLE:m=this.akm1*Proj4js.common.tsfnz(this.e,g,a);h=-m*j;break}m=m*f}d.x=m*this.a+this.x0;d.y=h*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 h,a,v=0,e=0,u,g=0,m=0;var j;if(this.sphere){var o,z,f,B;z=Math.sqrt(w*w+r*r);o=2*Math.atan(z/this.akm1);f=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*f/z)}if(B!=0||w!=0){b=Math.atan2(w*f,B*z)}break;case this.OBLIQ:if(Math.abs(z)<=Proj4js.common.EPSLN){q=this.phi0}else{q=Math.asin(B*sinph0+r*f*cosph0/z)}o=B-sinph0*Math.sin(q);if(o!=0||w!=0){b=Math.atan2(w*f*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);h=Math.cos(v);a=Math.sin(v);if(u==0){e=Math.asin(h*this.sinX1)}else{e=Math.asin(h*this.sinX1+(r*a*this.cosX1/u))}v=Math.tan(0.5*(Proj4js.common.HALF_PI+e));w*=a;r=u*this.cosX1*h-r*this.sinX1*a;m=Proj4js.common.HALF_PI;g=0.5*this.e;break;case this.N_POLE:r=-r;case this.S_POLE:v=-u/this.akm1;e=Proj4js.common.HALF_PI-2*Math.atan(v);m=-Proj4js.common.HALF_PI;g=-0.5*this.e;break}for(j=this.NITER;j--;e=q){a=this.e*Math.sin(e);q=2*Math.atan(v*Math.pow((1+a)/(1-a),g))-m;if(Math.abs(e-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 g=Proj4js.common.adjust_lon(a-this.long0);var e;var B,w;var z=Math.sin(r);var o=Math.cos(r);if(this.sphere){var v=o*Math.sin(g);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));e=Math.acos(o*Math.cos(g)/Math.sqrt(1-v*v));if(r<0){e=-e}w=this.a*this.k0*(e-this.lat0)}}else{var m=o*g;var j=Math.pow(m,2);var q=this.ep2*Math.pow(o,2);var u=Math.tan(r);var C=Math.pow(u,2);e=1-this.es*Math.pow(z,2);var f=this.a/Math.sqrt(e);var h=this.a*Proj4js.common.mlfn(this.e0,this.e1,this.e2,this.e3,r);B=this.k0*f*m*(1+j/6*(1-C+q+j/20*(5-18*C+Math.pow(C,2)+72*q-58*this.ep2)))+this.x0;w=this.k0*(h-this.ml0+f*u*(j*(0.5+j/24*(5-C+9*q+4*Math.pow(q,2)+j/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,e;var N;var G;var u=6;var q,j;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)){j=this.long0}else{j=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;e=m;for(G=0;true;G++){N=((m+this.e1*Math.sin(2*e)-this.e2*Math.sin(4*e)+this.e3*Math.sin(6*e))/this.e0)-e;e+=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(e)<Proj4js.common.HALF_PI){var b=Math.sin(e);var O=Math.cos(e);var z=Math.tan(e);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=e-(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)));j=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);j=this.long0}}E.x=j;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 f=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*f)}else{w=this.y0+Proj4js.common.PI*this.R*-Math.tan(0.5*f)}}var r=0.5*Math.abs((Proj4js.common.PI/C)-(C/Proj4js.common.PI));var e=r*r;var u=Math.sin(f);var q=Math.cos(f);var o=q/(u+q-1);var j=o*o;var h=o*(2/u-1);var z=h*h;var b=Proj4js.common.PI*this.R*(r*(o-z)+Math.sqrt(e*(o-z)*(o-z)-(z+e)*(j-z)))/(z+e);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(f){var z;var a,r,w,m,j,h;var o,g;var e;var v;var b;var u;var q;f.x-=this.x0;f.y-=this.y0;b=Proj4js.common.PI*this.R;a=f.x/b;r=f.y/b;w=a*a+r*r;m=-Math.abs(r)*(1+w);j=m-2*r*r+a*a;h=-2*m+1+2*r*r+w*w;q=r*r/h+(2*j*j*j/h/h/h-9*m*j/h/h)/27;e=(m-j*j/3/h)/h;v=2*Math.sqrt(-e/3);b=((3*q)/e)/v;if(Math.abs(b)>1){if(b>=0){b=1}else{b=-1}}u=Math.acos(b)/3;if(f.y>=0){lat=(-v*Math.cos(u+Proj4js.common.PI/3)-j/3/h)*Proj4js.common.PI}else{lat=-(-v*Math.cos(u+Proj4js.common.PI/3)-j/3/h)*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);f.x=lon;f.y=lat;return f}};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:2986"]="+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.000000000 +k=0.96027295 +x_0=300000.000 +y_0=-2299363.482 +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:310024802"]="+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["EPSG:310032811"]="+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["EPSG:310486805"]="+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["EPSG:310547809"]="+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["EPSG:310642801"]="+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["EPSG:310642810"]="+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["EPSG:310642812"]="+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["EPSG:310642813"]="+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["EPSG:310642901"]="+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["EPSG:310700806"]="+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["EPSG:310702807"]="+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["EPSG:310706808"]="+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["EPSG:310915814"]="+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["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: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._document=document;OpenLayers.Class.newObject=function(b,a){function d(){return b.prototype.initialize.apply(this,a)}d.prototype=b.prototype;return new d()};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}}OpenLayers.Element.getElementsByTagName=function(a,d){var b=null;if(!d){d=OpenLayers._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(j,b,g){var f=function(q,m,o){var p=o.getElementsByClassName(q);return p||[]};var e=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=OpenLayers._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(!g){g=OpenLayers._document}if(!b){b="*"}if(!j){return[]}if(g.getElementsByClassName){return f(j,b,g)}var h=null;var d=j.split(" ");if(OpenLayers._document.evaluate){h=e(d,b,g)}if(!h){h=a(d,b,g)}return h||[]};OpenLayers.Element.importNode=function(o,f,g){if(o.importNode){return o.importNode(f,g)}var p=null,j=null,d=false;var a=["shape","rect","oval","fill","stroke","imagedata","group","textbox"];switch(f.nodeType){case Node.ELEMENT_NODE:if(g&&f.tagName&&OpenLayers.Util.indexOf(a,f.tagName)!=-1){if(f.__detached!==true){j=f.ownerDocument.createElement("div");j.id="dummy_"+f.id;f.parentNode.insertBefore(j,f);f.parentNode.removeChild(f);f.__detached=true}d=true;p=o.createElement(f.scopeName+":"+f.tagName)}else{p=o.createElement(f.nodeName)}if(f.attributes&&f.attributes.length>0){for(var e=0,m=f.attributes.length;e<m;e++){var h=f.attributes[e];if(d===true&&h.nodeName==="__detached"){continue}p.setAttribute(h.nodeName,f.getAttribute(h.nodeName))}}if(g&&f.childNodes&&f.childNodes.length>0){for(var e=0,m=f.childNodes.length;e<m;e++){var b=f.childNodes[e];if(d===true){b.__detached=true}p.appendChild(OpenLayers.Element.importNode(o,b,g));if(d===true){b.removeAttribute("__detached")}}}if(j){f.removeAttribute("__detached");j.parentNode.insertBefore(f,j);j.parentNode.removeChild(j);j=null}break;case Node.TEXT_NODE:case Node.CDATA_SECTION_NODE:p=o.createTextNode(f.nodeValue);break;case Node.COMMENT_NODE:p=o.createCommentNode(f.nodeValue);break;default:OpenLayers.Console.error("OpenLayers.Element.importNode: unsupported "+f.nodeType+"=["+f.innerHTML+"]");break}return p};OpenLayers.Element.getStyle=function(d,e){d=OpenLayers.Util.getElement(d);var f=null;if(d&&d.style){f=d.style[OpenLayers.String.camelize(e)];if(!f){if(d.ownerDocument.defaultView&&d.ownerDocument.defaultView.getComputedStyle){var b=d.ownerDocument.defaultView.getComputedStyle(d,null);f=b?b.getPropertyValue(e):null}else{if(d.currentStyle){f=d.currentStyle[OpenLayers.String.camelize(e)]}}}var a=["left","top","right","bottom"];if(window.opera&&(OpenLayers.Util.indexOf(a,e)!=-1)&&(OpenLayers.Element.getStyle(d,"position")=="static")){f="auto"}}return f=="auto"?null:f};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(e,g,f,b){if((f!=null)&&(OpenLayers.Util.indexOf(this.eventTypes,e)!=-1)){if(g==null){g=this.object}var d=this.listeners[e];var a={obj:g,func:f};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.Events.prototype.getMousePosition=function(a){var b=this.element.ownerDocument||OpenLayers._document;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=[(b.documentElement.scrollLeft||b.body.scrollLeft),(b.documentElement.scrollTop||b.body.scrollTop)]}if(!this.element.lefttop){this.element.lefttop=[(b.documentElement.clientLeft||0),(b.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])};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["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["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["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(e,a){var b;if(e){if(a==null||OpenLayers.INCHES_PER_UNIT[a]==undefined){a="degrees"}var d=OpenLayers.Util.normalizeScale(e);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 f=OpenLayers.String.contains(b,"#")?b.indexOf("#"):b.length;a=b.substring(d,f)}var p={};var e=a.split(/[&;]/);for(var h=0,j=e.length;h<j;++h){var g=e[h].split("=");if(g[0]){var o=decodeURIComponent(g[0]);var m=g[1]||"";m=decodeURIComponent(m.replace(/\+/g," ")).split(",");m=decodeURIComponent(unescape(m)).split(",");if(m.length==1){m=m[0]}p[o]=m}}return p};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(h,g,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(g.lon-h.lon);var S=Math.atan((1-P)*Math.tan(OpenLayers.Util.rad(h.lat)));var R=Math.atan((1-P)*Math.tan(OpenLayers.Util.rad(g.lat)));var r=Math.sin(S),o=Math.cos(S);var q=Math.sin(R),j=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),e=Math.cos(D);var V=Math.sqrt((j*K)*(j*K)+(o*q-r*j*e)*(o*q-r*j*e));if(V==0){return 0}var N=r*q+o*j*e;var J=Math.atan2(V,N);var p=Math.asin(o*j*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.Util.invertRGBColor=function(e){var d=e.match(/^#([0-9A-F]{3}([0-9A-F]{3})?)$/i);var h=255,f=255,a=255;if(d){if(d[1].length===6){h=parseInt(d[1].substr(0,2),16);f=parseInt(d[1].substr(2,2),16);a=parseInt(d[1].substr(4,2),16)}else{h=parseInt(d[1].charAt(0)+d[1].charAt(0),16);f=parseInt(d[1].charAt(1)+d[1].charAt(1),16);a=parseInt(d[1].charAt(2)+d[1].charAt(2),16)}}return"#"+(255-h).toString(16)+(255-f).toString(16)+(255-a).toString(16)};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=OpenLayers._document.createElement("style");a.setAttribute("type","text/css");if(a.styleSheet){a.styleSheet.cssText=b}else{a.appendChild(OpenLayers._document.createTextNode(b))}try{OpenLayers._document.getElementsByTagName("head")[0].appendChild(a);return a}catch(d){return null}};if(window.Proj4js){Proj4js.defs["EPSG:3857"]="+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["EPSG:3785"]=Proj4js.defs["EPSG:3857"]}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:4559","EPSG:32620"],UTM22RGFG95:["IGNF:UTM22RGFG95","EPSG:2972","EPSG:32622"],UTM42SW84:["IGNF:UTM42SW84","EPSG:32742"],UTM20W84MART:["IGNF:UTM20W84MART","EPSG:2989","EPSG:4559","EPSG:32620"],RGM04UTM38S:["IGNF:RGM04UTM38S","EPSG:4471","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:4467","EPSG:32606"],UTM01SW84:["IGNF:UTM01SW84","EPSG:32701"],GOOGLE:["EPSG:3857","EPSG:900913","EPSG:102113"]};OpenLayers.Projection.prototype.domainOfValidity=null;OpenLayers.Projection.prototype.initialize=function(g,d){OpenLayers.Util.extend(this,d);this.projCode=g;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(g)}catch(e){throw OpenLayers.i18n("unknown.crs",{crs:g})}}if(this.proj==null){throw OpenLayers.i18n("no.proj.implementation.found")}if(g=="EPSG:4326"||g=="CRS:84"||g=="IGNF:WGS84G"||g=="WGS84"){this.domainOfValidity=new OpenLayers.Bounds(-180,-90,180,90)}else{if(g=="EPSG:3857"||g=="EPSG:900913"||g=="EPSG:102113"||g=="GOOGLE"){this.domainOfValidity=new OpenLayers.Bounds(-180,-85.05113,180,85.05113)}else{if(this.isUTMZoneProjection()){var b=-180,a=-90,f=180,h=90;if(this.getProjName()=="utm"){f=this.getProperty("zone")*6-180;b=f-6;h=84;a=0;if(this.getProperty("south")===true){h=0;a=-80}}else{if(this.getProjName()=="stere"){if(this.getProperty("standard_parallel_1")>0){a=84}else{h=-80}}}this.domainOfValidity=new OpenLayers.Bounds(b,a,f,h)}}}};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||(this.proj.projName=="longlat"?"dd":"m")}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(m){if(!this.proj||!m){return false}var d=this.getCode(),b=m instanceof OpenLayers.Projection?m.getCode():m;if(this.aliases[b]===true){return true}if(this.aliases[b]===false){return false}var j=false,h=false;for(var f in OpenLayers.Projection.WKALIASES){if(OpenLayers.Projection.WKALIASES.hasOwnProperty(f)){var o=OpenLayers.Projection.WKALIASES[f];for(var g=0,e=o.length;g<e&&!(j&&h);g++){if(d==o[g]){j=true;continue}if(b==o[g]){h=true;continue}}if(j||h){break}}}this.aliases[b]=(j&&h);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,f){var d=["C","D","E","F","G","H","J","K","L","M","N","P","Q","R","S","T","U","V","W"];var b;if(f.lat<-80){if(f.lon<0){b="A"}else{b="B"}return b}if(f.lat>84){if(f.lon<0){b="Y"}else{b="Z"}return b}if(f.lat>72){if(f.lon<0||f.lon>42){b=a+"X"}else{if(f.lon<=9){b="31X"}else{if(f.lon<=21){b="33X"}else{if(f.lon<=33){b="35X"}else{b="37X"}}}}return b}var e=Math.abs(parseInt((f.lat+80)/8,10));b=a+d[e];if(b=="31V"&&f.lon>3){b="32V"}return b};OpenLayers.Projection.transform=function(e,f,b){if(f&&b){if(window.Proj4js&&(f.proj instanceof Proj4js.Proj)&&(b.proj instanceof Proj4js.Proj)){if(!f.equals(b)){if(e instanceof Array){for(var d=0,a=e.length;d<a;d++){e[d]=Proj4js.transform(f.proj,b.proj,e[d]);if(e[d] instanceof OpenLayers.Geometry){e[d].bounds=null}}}else{e=Proj4js.transform(f.proj,b.proj,e);if(e instanceof OpenLayers.Geometry){e.bounds=null}}}}else{if(OpenLayers.Projection.transforms[f.getCode()]&&OpenLayers.Projection.transforms[f.getCode()][b.getCode()]){if(e instanceof Array){for(var d=0,a=e.length;d<a;d++){OpenLayers.Projection.transforms[f.getCode()][b.getCode()](e[d]);if(e[d] instanceof OpenLayers.Geometry){e[d].bounds=null}}}else{OpenLayers.Projection.transforms[f.getCode()][b.getCode()](e);if(e instanceof OpenLayers.Geometry){e.bounds=null}}}}}return e};OpenLayers.Bounds.prototype.transform=function(z,m,E){if(!E){var q=OpenLayers.Projection.transform({x:this.left,y:this.bottom},z,m);var h=OpenLayers.Projection.transform({x:this.right,y:this.top},z,m);this.left=q.x<h.x?q.x:h.x;this.bottom=q.y<h.y?q.y:h.y;this.right=h.x>q.x?h.x:q.x;this.top=h.y>q.y?h.y:q.y;return this}var F=m.getProjName()=="longlat"?0.000028:1;var b,e,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,g,H;var I=[],f=0;for(var B=0;B<d;B++){I[f++]={x:this.left+B*r,y:this.bottom};I[f++]={x:this.right,y:this.bottom+B*o};I[f++]={x:this.right-B*r,y:this.top};I[f++]={x:this.left,y:this.top-B*o}}I=OpenLayers.Projection.transform(I,z,m);if(a==undefined){a=g=I[0].x;D=H=I[0].y}for(var w=0;w<f;w++){v=I[w];if(v.x<a){a=v.x}if(v.y<D){D=v.y}if(v.x>g){g=v.x}if(v.y>H){H=v.y}}I=null;if(b!=undefined&&Math.abs(a-b)<F&&Math.abs(D-e)<F&&Math.abs(g-G)<F&&Math.abs(H-u)<F){this.left=a;this.bottom=D;this.right=g;this.top=H;return this}b=a;e=D;G=g;u=H;d*=2}this.left=b;this.bottom=e;this.right=G;this.top=u;return this};OpenLayers.LonLat.prototype.equals=function(f,e){var d=false;if(!e){e=0.000001}if(f!=null){var b=(!isNaN(this.lon)&&!isNaN(f.lon))?Math.abs(this.lon-f.lon):1;var a=(!isNaN(this.lat)&&!isNaN(f.lat))?Math.abs(this.lat-f.lat):1;d=((b<=e&&a<=e)||(isNaN(this.lon)&&isNaN(this.lat)&&isNaN(f.lon)&&isNaN(f.lat)))}return d};OpenLayers.Map.prototype.removeLayer=function(d,f){if(f==null){f=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(f){for(var b=0,a=this.layers.length;b<a;b++){var e=this.layers[b];if(e.isBaseLayer||this.allOverlays){this.setBaseLayer(e);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.Layer.prototype.dataURL=null;OpenLayers.Layer.prototype.metadataURL=null;OpenLayers.Layer.prototype.savedStates={};OpenLayers.Layer.prototype.onLoadError=null;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.getOptions())}OpenLayers.Util.applyDefaults(a,this);a.map=null;a.savedStates={};return a};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 e=d.getNativeProjection();var a=b.isCompatibleWith(e)?b:null;return a};OpenLayers.Popup.prototype.updateSize=function(){var f="<div class='"+this.contentDisplayClass+"'>"+this.contentDiv.innerHTML+"</div>";var j=(this.map)?this.map.div:document.body;var m=OpenLayers.Util.getRenderedDimensions(f,null,{displayClass:this.displayClass,containerElement:j});var h=this.getSafeContentSize(m);var g=null;if(h.equals(m)){g=m}else{var b=new OpenLayers.Size();b.w=(h.w<m.w)?h.w:null;b.h=(h.h<m.h)?h.h:null;if(b.w&&b.h){g=h}else{var e=OpenLayers.Util.getRenderedDimensions(f,b,{displayClass:this.contentDisplayClass,containerElement:j});var d=OpenLayers.Element.getStyle(this.contentDiv,"overflow");if((d!="hidden")&&(e.equals(h))){var a=OpenLayers.Util.getScrollbarWidth();if(b.w){e.h+=a}else{e.w+=a}}g=this.getSafeContentSize(e)}}this.setSize(g)};OpenLayers.Tile.prototype.initialize=function(e,a,f,b,d){this.layer=e;this.position=a.clone();this.bounds=f.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(e.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(b){this.params=OpenLayers.Util.extend(this.params,b);if(this.GeoRM){OpenLayers.Util.extend(this.params,this.GeoRM.token);if(this.GeoRM.transport=="referrer"){OpenLayers.Util.extend(this.params,Geoportal.GeoRMHandler.getCookieReferrer((this.map?this.map.div:null),true))}}var a=this.redraw();if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"params"})}return a};OpenLayers.Layer.Grid.prototype.getFullRequestString=OpenLayers.Layer.HTTPRequest.prototype.getFullRequestString=function(h,e){var b=e||this.url;var g=OpenLayers.Util.extend({},this.params);g=OpenLayers.Util.extend(g,h);if(this.GeoRM){OpenLayers.Util.extend(g,this.GeoRM.token);if(this.GeoRM.transport=="referrer"){OpenLayers.Util.extend(this.params,Geoportal.GeoRMHandler.getCookieReferrer((this.map?this.map.div:null),true))}}var f=OpenLayers.Util.getParameterString(g);if(b instanceof Array){b=this.selectUrl(f,b)}var a=OpenLayers.Util.upperCaseObject(OpenLayers.Util.getParameters(b));for(var d in g){if(d.toUpperCase() in a){delete g[d]}}f=OpenLayers.Util.getParameterString(g);return OpenLayers.Util.urlAppend(b,f)};OpenLayers.Layer.WMS.prototype.getFullRequestString=function(f,d){var b=this.getNativeProjection();var a="SRS";if(this.params.VERSION.match(/^1\.3\..*/)){a="CRS";if(typeof(this.layerLimit)=="number"){var e=this.params.LAYERS.split(",");if(this.layerLimit<e.length){this.params.LAYERS=e.slice(0,this.layerLimit).join(",");OpenLayers.Console.warn("["+e.slice(this.layerLimit).join(",")+"]")}}}this.params[a]=(b==null)?"none":b.getCode();return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,arguments)};OpenLayers.Layer.WMS.prototype.getURL=function(d){var g=d.clone();g=this.adjustBounds(g);g.transform(this.map.getProjection(),this.getNativeProjection(),true);var f=this.getImageSize();var h={};var b=this.reverseAxisOrder();h.BBOX=this.encodeBBOX?g.toBBOX(null,b):g.toArray(b);h.WIDTH=f.w;h.HEIGHT=f.h;var a=this.getFullRequestString(h);return a};OpenLayers.Layer.WMS.prototype.getDataExtent=function(){return this.maxExtent};OpenLayers.Popup.Anchored.prototype.calculateNewPx=function(b){var f=b.offset(this.anchor.offset);var a=this.size||this.contentSize;var e=(this.relativePosition.charAt(0)=="t");f.y+=(e)?-a.h:this.anchor.size.h;var d=(this.relativePosition.charAt(1)=="l");f.x+=(d)?-a.w:this.anchor.size.w;return f};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=true;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 54:case 109:case 189:case 95:this.map.zoomOut();break;default:d=false;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 f=this;var d=b||OpenLayers.Projection.CRS84;if(b){if(!OpenLayers.Projection.CRS84.equals(b)){f=this.clone().transform(b,OpenLayers.Projection.CRS84);d=OpenLayers.Projection.CRS84}}var g=0;if(f.components&&(f.components.length>1)){var j,h;for(var e=1,a=f.components.length;e<a;e++){j=f.components[e-1];h=f.components[e];g+=OpenLayers.Util.distVincenty({lon:j.x,lat:j.y},{lon:h.x,lat:h.y},d)}}return g*1000};OpenLayers.Geometry.LinearRing.prototype.getGeodesicArea=function(f){var d=this;var h=f||OpenLayers.Projection.CRS84;if(f){if(!OpenLayers.Projection.CRS84.equals(f)){d=this.clone().transform(f,h);h=OpenLayers.Projection.CRS84}}var b=0;var g=d.components&&d.components.length;var j=h.getProperty("semi_major")||6378137;if(g>2){var o,m;for(var e=0;e<g-1;e++){o=d.components[e];m=d.components[e+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*j*j/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 j=this.drawGeometry(d.geometry,f,d.id);if(f.display!="none"&&f.label&&j!==false){var a=d.geometry.getCentroid();if(f.labelXOffset||f.labelYOffset){var e=isNaN(f.labelXOffset)?0:f.labelXOffset;var h=isNaN(f.labelYOffset)?0:f.labelYOffset;var b=this.getResolution();a.move(e*b,h*b)}this.drawText(d.id,f,a)}else{this.removeText(d.id)}return j}}};OpenLayers.Renderer.VML.prototype.HALO_ID_SUFFIX=OpenLayers.Renderer.SVG.prototype.HALO_ID_SUFFIX=OpenLayers.Renderer.Canvas.prototype.HALO_ID_SUFFIX=OpenLayers.Renderer.Elements.prototype.HALO_ID_SUFFIX="_halo";OpenLayers.Renderer.VML.prototype.removeText=OpenLayers.Renderer.SVG.prototype.removeText=OpenLayers.Renderer.Elements.prototype.removeText=function(d){var a=this.root.ownerDocument.getElementById(d+this.LABEL_ID_SUFFIX);if(a){this.textRoot.removeChild(a);var b=document.getElementById(d+this.LABEL_ID_SUFFIX+this.HALO_ID_SUFFIX);if(b){this.textRoot.removeChild(b)}}var e=this.root.ownerDocument.getElementById(d+this.LABEL_ID_SUFFIX+"_bg");if(e){this.textRoot.removeChild(e)}};OpenLayers.Renderer.Canvas.prototype.initialize=function(a){OpenLayers.Renderer.prototype.initialize.apply(this,arguments);this.root=OpenLayers._document.createElement("canvas");this.container.appendChild(this.root);this.canvas=this.root.getContext("2d");this.features={};this.geometryMap={}};OpenLayers.Renderer.Canvas.prototype.supported=function(){var a=OpenLayers._document.createElement("canvas");return !!a.getContext};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.Canvas.prototype.drawText=function(b,e){e=OpenLayers.Util.extend({fontColor:"#000000",labelAlign:"cm"},e);var f=this.getLocalXY(b);this.setCanvasStyle("reset");this.canvas.fillStyle=e.fontColor;this.canvas.globalAlpha=e.fontOpacity||1;var g=e.fontWeight+" "+e.fontSize+" "+e.fontFamily;if(this.canvas.fillText){var d=OpenLayers.Renderer.Canvas.LABEL_ALIGN[e.labelAlign[0]]||"center";this.canvas.font=g;this.canvas.textAlign=d;if(e.labelHaloColor){this.canvas.strokeStyle=e.labelHaloColor;this.canvas.lineWidth=e.labelHaloWidth||2;this.canvas.strokeText(e.label,f[0],f[1])}this.canvas.fillText(e.label,f[0],f[1])}else{if(this.canvas.mozDrawText){this.canvas.mozTextStyle=g;var a=this.canvas.mozMeasureText(e.label);switch(e.labelAlign[0]){case"l":break;case"r":f[0]-=a;break;case"c":default:f[0]-=a/2}this.canvas.translate(f[0],f[1]);this.canvas.mozDrawText(e.label);this.canvas.translate(-1*f[0],-1*f[1])}}this.setCanvasStyle("reset")};OpenLayers.Renderer.VML.prototype.initialize=function(b){if(!this.supported()){return}if(!OpenLayers._document.namespaces.olv){OpenLayers._document.namespaces.add("olv",this.xmlns);var f=OpenLayers._document.createStyleSheet();var d=["shape","rect","oval","fill","stroke","imagedata","group","textbox","fill","stroke","path","textpath"];for(var e=0,a=d.length;e<a;e++){f.addRule("olv\\:"+d[e],"behavior: url(#default#VML); position: absolute; display: inline-block;")}}OpenLayers.Renderer.Elements.prototype.initialize.apply(this,arguments)};OpenLayers.Renderer.VML.prototype.supported=function(){return !!(OpenLayers._document.namespaces)};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 g=(m?m.top/d-this.size.h:0)|0;if(a||!this.offset){this.offset={x:b,y:g};b=0;g=0}else{b=b-this.offset.x;g=g-this.offset.y}var p=b+" "+g;this.root.coordorigin=p;var j=[this.root,this.vectorRoot,this.textRoot];var h;for(var e=0,f=j.length;e<f;++e){h=j[e];var o=this.size.w+" "+this.size.h;h.coordsize=o}this.root.style.flip="y";return true};OpenLayers.Renderer.VML.prototype.graphicRotate=function(u,B,f,z){var z=z||u._style;var v=z.rotation||0;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,f,z)}},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=this.root.ownerDocument.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 g=v*Math.PI/180;var j=Math.sin(g);var e=Math.cos(g);var h="progid:DXImageTransform.Microsoft.Matrix(M11="+e+",M12="+(-j)+",M21="+j+",M22="+e+",SizingMethod='auto expand')\n";var b=z.graphicOpacity||z.fillOpacity;if(b&&b!=1){h+="progid:DXImageTransform.Microsoft.BasicImage(opacity="+b+")\n"}u.style.filter=h;var w=new OpenLayers.Geometry.Point(-B,-f);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"};OpenLayers.Renderer.VML.prototype.createNode=function(a,e){var d=this.root?this.root.ownerDocument:OpenLayers._document;var b=d.createElement(a);if(e){b.id=e}b.unselectable="on";b.onselectstart=OpenLayers.Function.False;return b};OpenLayers.Renderer.VML.prototype.drawText=function(f,a,m){if(a.labelHaloColor){var b=OpenLayers.Util.extend({},a);b.fontStrokeColor=b.labelHaloColor;b.fontStrokeWidth=b.labelHaloWidth||2;delete b.labelHaloColor;if(b.labelBackgroundColor){delete b.labelBackgroundColor}if(b.labelBorderColor){delete b.labelBorderColor}if(b.labelBorderSize){delete b.labelBorderSize}this.drawText2(f,b,m,true);delete a.labelHaloColor;if(a.labelHaloWidth){delete a.labelHaloWidth}this.drawText2(f,a,m,false);return}var j=this.nodeFactory(f+this.LABEL_ID_SUFFIX,"olv:rect");var h=this.nodeFactory(f+this.LABEL_ID_SUFFIX+"_textbox","olv:textbox");var e=this.getResolution();j.style.left=((m.x/e-this.offset.x)|0)+"px";j.style.top=((m.y/e-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=m;h._geometryClass=m.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";if(g.length==1){g+="m"}var o=h.clientWidth*(OpenLayers.Renderer.VML.LABEL_SHIFT[g.substr(0,1)]);var d=h.clientHeight*(OpenLayers.Renderer.VML.LABEL_SHIFT[g.substr(1,1)]);j.style.left=parseInt(j.style.left)-o-1+"px";j.style.top=parseInt(j.style.top)+d+"px"};OpenLayers.Renderer.VML.prototype.drawText2=function(j,a,q,o){var p=this.nodeFactory(j+this.LABEL_ID_SUFFIX+(o?this.HALO_ID_SUFFIX:""),"olv:shape");if(!p.parentNode){this.textRoot.appendChild(p)}var h=this.getResolution();p.style.left=((q.x/h-this.offset.x)|0)+"px";p.style.top=((q.y/h-this.offset.y)|0)+"px";p.style.flip="y";p.style.position="absolute";p.style.width=1+"px";p.style.height=1+"px";p.style.antialias="true";var d=document.createElement("olv:fill");d.on="true";d.color=a.fontColor;p.appendChild(d);var b=document.createElement("olv:stroke");if(a.fontStrokeColor){b.on="true";b.color=a.fontStrokeColor}else{b.on="false"}if(a.fontStrokeWidth){b.weight=a.fontStrokeWidth}p.appendChild(b);var f=document.createElement("olv:path");f.textpathok="True";f.v="m 0,0 l 200,0";p.appendChild(f);var r=document.createElement("olv:textpath");r.on="true";r.fitpath="false";r.string=a.label;p.appendChild(r);if(a.fontColor){r.style.color=a.fontColor}if(a.fontOpacity){d.opacity=a.fontOpacity;b.opacity=a.fontOpacity}if(a.fontFamily){r.style.fontFamily=a.fontFamily}if(a.fontSize){r.style.fontSize=a.fontSize}if(a.fontWeight){r.style.fontWeight=a.fontWeight}var m=a.labelAlign||"cm";if(m.length==1){m+="m"}var g;switch(m.substr(0,1)){case"l":g="left";break;case"c":g="center";break;case"r":g="right";break}r.style["v-text-align"]=g;if(a.labelSelect===true){p._featureId=j;p._geometry=q;p._geometryClass=q.CLASS_NAME}r.style.whiteSpace="nowrap";r.inset="1px,0px,0px,0px";var u=r.clientWidth*(OpenLayers.Renderer.VML.LABEL_SHIFT[m.substr(0,1)]);var e=r.clientHeight*(OpenLayers.Renderer.VML.LABEL_SHIFT[m.substr(1,1)]);p.style.left=parseInt(p.style.left)-u-1+"px";p.style.top=parseInt(p.style.top)+e+"px"};OpenLayers.Renderer.SVG.prototype.supported=function(){var b="http://www.w3.org/TR/SVG11/feature#";var a=OpenLayers._document;return(a.implementation&&(a.implementation.hasFeature("org.w3c.svg","1.0")||a.implementation.hasFeature(b+"SVG","1.1")||a.implementation.hasFeature(b+"BasicStructure","1.1")))};OpenLayers.Renderer.SVG.prototype.setExtent=function(b,e){OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments);var a=this.getResolution();var g=(b?-b.left/a:0)|0;var f=(b?b.top/a:0)|0;if(e){this.left=g;this.top=f;var d="0 0 "+this.size.w+" "+this.size.h;this.rendererRoot.setAttributeNS(null,"viewBox",d);this.translate(0,0);return true}else{var h=this.translate(g-this.left,f-this.top);if(!h){this.setExtent(b,true)}return h}};OpenLayers.Renderer.SVG.prototype.setStyle=function(w,C,b){C=C||w._style;b=b||w._options;var o=parseFloat(w.getAttributeNS(null,"r"));var m=1;var e;if(w._geometryClass=="OpenLayers.Geometry.Point"&&o){w.style.visibility="";if(C.graphic===false){w.style.visibility="hidden"}else{if(C.externalGraphic){e=this.getPosition(w);if(C.graphicTitle){w.setAttributeNS(null,"title",C.graphicTitle)}if(C.graphicWidth&&C.graphicHeight){w.setAttributeNS(null,"preserveAspectRatio","none")}var v=C.graphicWidth||C.graphicHeight;var q=C.graphicHeight||C.graphicWidth;v=v?v:C.pointRadius*2;q=q?q:C.pointRadius*2;var D=(C.graphicXOffset!=undefined)?C.graphicXOffset:-(0.5*v);var g=(C.graphicYOffset!=undefined)?C.graphicYOffset:-(0.5*q);var a=C.graphicOpacity||C.fillOpacity;w.setAttributeNS(null,"x",(e.x+D).toFixed());w.setAttributeNS(null,"y",(e.y+g).toFixed());w.setAttributeNS(null,"width",v);w.setAttributeNS(null,"height",q);w.setAttributeNS(this.xlinkns,"href",C.externalGraphic);w.setAttributeNS(null,"style","opacity: "+a)}else{if(this.isComplexSymbol(C.graphicName)){var d=C.pointRadius*3;var p=d*2;var u=this.importSymbol(C.graphicName);e=this.getPosition(w);m=this.symbolMetrics[u][0]*3/p;var h=w.parentNode;var j=w.nextSibling;if(h){h.removeChild(w)}if(this.supportUse===false){var f=((h&&h.ownerDocument)||OpenLayers._document).getElementById(u);w.firstChild&&w.removeChild(w.firstChild);w.appendChild(f.firstChild.cloneNode(true));w.setAttributeNS(null,"viewBox",f.getAttributeNS(null,"viewBox"))}else{w.setAttributeNS(this.xlinkns,"href","#"+u)}w.setAttributeNS(null,"width",p);w.setAttributeNS(null,"height",p);w.setAttributeNS(null,"x",e.x-d);w.setAttributeNS(null,"y",e.y-d);if(j){h.insertBefore(w,j)}else{if(h){h.appendChild(w)}}}else{w.setAttributeNS(null,"r",C.pointRadius)}}}var B=C.rotation;if((B!==undefined||w._rotation!==undefined)&&e){w._rotation=B;B|=0;if(w.nodeName!=="svg"){w.setAttributeNS(null,"transform","rotate("+B+" "+e.x+" "+e.y+")")}else{var z=this.symbolMetrics[u];w.firstChild.setAttributeNS(null,"transform","rotate("+C.rotation+" "+z[1]+" "+z[2]+")")}}}if(b.isFilled){w.setAttributeNS(null,"fill",C.fillColor);w.setAttributeNS(null,"fill-opacity",C.fillOpacity)}else{w.setAttributeNS(null,"fill","none")}if(b.isStroked){w.setAttributeNS(null,"stroke",C.strokeColor);w.setAttributeNS(null,"stroke-opacity",C.strokeOpacity);w.setAttributeNS(null,"stroke-width",C.strokeWidth*m);w.setAttributeNS(null,"stroke-linecap",C.strokeLinecap||"round");w.setAttributeNS(null,"stroke-linejoin","round");C.strokeDashstyle&&w.setAttributeNS(null,"stroke-dasharray",this.dashStyle(C,m))}else{w.setAttributeNS(null,"stroke","none")}if(C.pointerEvents){w.setAttributeNS(null,"pointer-events",C.pointerEvents)}if(C.cursor!=null){w.setAttributeNS(null,"cursor",C.cursor)}return w};OpenLayers.Renderer.SVG.prototype.createNode=function(a,e){var d=this.root?this.root.ownerDocument:OpenLayers._document;var b=d.createElementNS(this.xmlns,a);if(e){b.setAttributeNS(null,"id",e)}return b};OpenLayers.Renderer.SVG.prototype.drawText=function(g,a,w,r){var d=this.getResolution();var v=(w.x/d+this.left);var p=(w.y/d-this.top);var u=this.nodeFactory(g+this.LABEL_ID_SUFFIX+(r?this.HALO_ID_SUFFIX:""),"text");var o=this.nodeFactory(g+this.LABEL_ID_SUFFIX+"_tspan","tspan");u.setAttributeNS(null,"x",v);u.setAttributeNS(null,"y",-p);if(a.fontColor){u.setAttributeNS(null,"fill",a.fontColor)}if(a.fontStrokeColor){u.setAttributeNS(null,"stroke",a.fontStrokeColor)}if(a.fontStrokeWidth){u.setAttributeNS(null,"stroke-width",a.fontStrokeWidth)}if(a.fontOpacity){u.setAttributeNS(null,"opacity",a.fontOpacity)}if(a.fontFamily){u.setAttributeNS(null,"font-family",a.fontFamily)}if(a.fontSize){u.setAttributeNS(null,"font-size",a.fontSize)}if(a.fontWeight){u.setAttributeNS(null,"font-weight",a.fontWeight)}if(a.labelSelect===true){u.setAttributeNS(null,"pointer-events","visible");u._featureId=g;if(a.cursor!=null){u.setAttributeNS(null,"cursor",a.cursor)}o._featureId=g;o._geometry=w;o._geometryClass=w.CLASS_NAME}else{u.setAttributeNS(null,"pointer-events","none")}var h=a.labelAlign||"cm";u.setAttributeNS(null,"text-anchor",OpenLayers.Renderer.SVG.LABEL_ALIGN[h[0]]||"middle");if(this.isGecko){u.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(a.labelHaloColor){var b=OpenLayers.Util.extend({},a);b.fontColor=b.labelHaloColor;b.fontStrokeColor=b.labelHaloColor;b.fontStrokeWidth=a.labelHaloWidth||2;delete b.labelHaloColor;this.drawText(g,b,w,true)}if(!u.parentNode){u.appendChild(o);this.textRoot.appendChild(u)}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 z=u.getBBox();var j=z.width;var e=z.height;var q=2;if(a.labelPadding){var m=a.labelPadding.indexOf("px");if(m==-1){q=a.labelPadding}else{q=parseInt(a.labelPadding.substr(0,m))}}f.setAttributeNS(null,"x",z.x-q);f.setAttributeNS(null,"y",z.y-q);f.setAttributeNS(null,"height",(e+q*2)+"px");f.setAttributeNS(null,"width",(j+q*2)+"px");this.textRoot.insertBefore(f,u)}};OpenLayers.Renderer.SVG.prototype.importSymbol=function(f){if(!this.defs){this.defs=this.createDefs()}var b=this.container.id+"-"+f;if(this.root.ownerDocument.getElementById(b)!=null){return b}var e=OpenLayers.Renderer.symbol[f];if(!e){throw new Error(f+" is not a valid symbol name")}var h=this.nodeFactory(b,"symbol");var d=this.nodeFactory(null,"polygon");h.appendChild(d);var q=new OpenLayers.Bounds(Number.MAX_VALUE,Number.MAX_VALUE,0,0);var o=[];var m,j;for(var g=0;g<e.length;g=g+2){m=e[g];j=e[g+1];q.left=Math.min(q.left,m);q.bottom=Math.min(q.bottom,j);q.right=Math.max(q.right,m);q.top=Math.max(q.top,j);o.push(m,",",j)}d.setAttributeNS(null,"points",o.join(" "));var a=q.getWidth();var p=q.getHeight();var r=[q.left-a,q.bottom-p,a*3,p*3];h.setAttributeNS(null,"viewBox",r.join(" "));this.symbolMetrics[b]=[Math.max(a,p),q.getCenterLonLat().lon,q.getCenterLonLat().lat];this.defs.appendChild(h);return h.id};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 e=0;e<a;++e){b.symbolizers[e]=this.symbolizers[e].clone()}}else{b.symbolizer={};var g,f;for(var d in this.symbolizer){g=this.symbolizer[d];f=typeof g;if(f==="object"){b.symbolizer[d]=OpenLayers.Util.extend({},g)}else{if(f==="string"){b.symbolizer[d]=g}}}}b.filter=this.filter&&this.filter.clone();b.context=typeof this.context==="function"?this.context:this.context&&OpenLayers.Util.extend({},this.context);return new OpenLayers.Rule(b)};OpenLayers.Layer.GML.prototype.addFeatures=OpenLayers.Layer.Vector.prototype.addFeatures=function(b,o){if(!(b instanceof Array)){b=[b]}var j=!o||!o.silent;if(j){var a={features:b};var h=this.events.triggerEvent("beforefeaturesadded",a);if(h===false){return}b=a.features}var e=[];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 m=b[d];if(!(m instanceof OpenLayers.Feature.Vector)){continue}if(this.geometryType&&!(m.geometry.CLASS_NAME==this.geometryType)){var f=OpenLayers.i18n("componentShouldBe",{geomType:this.geometryType});throw f}m.layer=this;if(!m.style&&this.style){m.style=OpenLayers.Util.extend({},this.style)}if(j){if(this.events.triggerEvent("beforefeatureadded",{feature:m})===false){continue}this.preFeatureInsert(m)}e.push(m);this.features.push(m);this.drawFeature(m);if(j){this.events.triggerEvent("featureadded",{feature:m});this.onFeatureInsert(m)}}if(j){this.events.triggerEvent("featuresadded",{features:e})}};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.Layer.GML.prototype.clone=function(a){if(a==null){a=new OpenLayers.Layer.GML(this.name,this.url,this.getOptions())}a=OpenLayers.Layer.Vector.prototype.clone.apply(this,[a]);return a};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 e=OpenLayers._document.implementation.createDocument("","",null);if(e.importNode){b=e.importNode(b,true)}e.appendChild(b);d=a.serializeToString(e)}else{d=a.serializeToString(b)}}return d};OpenLayers.Format.XML.prototype.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=OpenLayers._document.createElementNS(d,a)}return b};OpenLayers.Format.XML.prototype.createTextNode=function(b){var a;if(typeof b!=="string"){b=String(b)}if(this.xmldom){a=this.xmldom.createTextNode(b)}else{a=OpenLayers._document.createTextNode(b)}return a};OpenLayers.Format.KML.prototype.setAttributeNS=OpenLayers.Format.OSM.prototype.setAttributeNS=OpenLayers.Format.XML.prototype.setAttributeNS=function(e,d,a,f){if(f==null||f==undefined){f=""}if(e.setAttributeNS){e.setAttributeNS(d,a,f)}else{if(this.xmldom){if(d){var b=e.ownerDocument.createNode(2,a,d);b.nodeValue=f;e.setAttributeNode(b)}else{e.setAttribute(a,f)}}else{throw OpenLayers.i18n("xml.setattributens")}}};OpenLayers.Format.KML.prototype.writeNode=OpenLayers.Format.OSM.prototype.writeNode=OpenLayers.Format.XML.prototype.writeNode=function(a,g,e){var f,d;var b=a.indexOf(":");if(b>0){f=a.substring(0,b);d=a.substring(b+1)}else{if(e){f=this.namespaceAlias[e.namespaceURI]}else{f=this.defaultPrefix}d=a}var h=this.writers[f][d].apply(this,[g]);if(e&&h){e.appendChild(h)}return h};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 h=["Link","NetworkLink","Style","StyleMap","Placemark"];for(var e=0,j=h.length;e<j;++e){var m=h[e];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 g=[];for(var o in this.folders){g.push(this.folders[o])}this.folders=g}return this.features};OpenLayers.Format.KML.prototype.parseStyle=function(H){var P={};var B=["LineStyle","PolyStyle","IconStyle","BalloonStyle","LabelStyle"];var f,S,j,e,p;for(var M=0,O=B.length;M<O;++M){f=B[M];p=this.getElementsByTagNameNS(H,"*",f)[0];if(!p){continue}switch(f.toLowerCase()){case"linestyle":var d=this.parseProperty(p,"*","color");var J=this.parseKmlColor(d);if(J){P.strokeColor=J.color;P.strokeOpacity=J.opacity}var G=this.parseProperty(p,"*","width");if(G){P.strokeWidth=G}break;case"polystyle":var d=this.parseProperty(p,"*","color");var J=this.parseKmlColor(d);if(J){P.fillOpacity=J.opacity;P.fillColor=J.color}var K=this.parseProperty(p,"*","fill");if(K=="0"){P.fillColor="none"}var m=this.parseProperty(p,"*","outline");if(m=="0"){P.strokeWidth="0"}break;case"iconstyle":var U=parseFloat(this.parseProperty(p,"*","scale")||1);var G=32*U;var E=32*U;var T=this.getElementsByTagNameNS(p,"*","Icon")[0];if(T){var L=this.parseProperty(T,"*","href");if(L){var z=this.parseProperty(T,"*","w");var N=this.parseProperty(T,"*","h");var g="http://maps.google.com/mapfiles/kml";if(OpenLayers.String.startsWith(L,g)&&!z&&!N){z=64;N=64;U=U/2}z=z||N;N=N||z;if(z){G=parseInt(z)*U}if(N){E=parseInt(N)*U}var b=L.match(this.regExes.kmlIconPalette);if(b){var Q=b[1];var D=b[2];var v=this.parseProperty(T,"*","x");var u=this.parseProperty(T,"*","y");var r=v?v/32:0;var q=u?(7-u/32):7;var o=q*8+r;L="http://maps.google.com/mapfiles/kml/pal"+Q+"/icon"+o+D}P.graphicOpacity=1;P.externalGraphic=L}}var C=this.getElementsByTagNameNS(p,"*","hotSpot")[0];if(C){var v=parseFloat(C.getAttribute("x"));var u=parseFloat(C.getAttribute("y"));var I=C.getAttribute("xunits");if(I=="pixels"){P.graphicXOffset=-v*U}else{if(I=="insetPixels"){P.graphicXOffset=-G+(v*U)}else{if(I=="fraction"){P.graphicXOffset=-G*v}}}var R=C.getAttribute("yunits");if(R=="pixels"){P.graphicYOffset=-E+(u*U)+1}else{if(R=="insetPixels"){P.graphicYOffset=-(u*U)+1}else{if(R=="fraction"){P.graphicYOffset=-E*(1-u)+1}}}}P.graphicWidth=G;P.graphicHeight=E;break;case"balloonstyle":var a=this.getElementsByTagNameNS(p,"*","text")[0];if(a){a=OpenLayers.Util.getXmlNodeValue(a)}if(a){P.balloonStyle=a.replace(this.regExes.straightBracket,"${$1}")}break;case"labelstyle":var d=this.parseProperty(p,"*","color");var J=this.parseKmlColor(d);if(J){P.fontColor=J.color;P.fontOpacity=J.opacity;var U=parseFloat(this.parseProperty(p,"*","scale")||1);P.label=true;P.labelAlign="cb";P.labelXOffset=20;P.labelYOffset=20;P.fontSize=(14*U)+"px";P.fontWeight="bold";P.labelHaloColor=OpenLayers.Util.invertRGBColor(J.color);P.labelHaloWidth="2px"}break;default:}}if(!P.strokeColor&&P.fillColor){P.strokeColor=P.fillColor}var F=H.getAttribute("id");if(F&&P){P.id=F}return P};OpenLayers.Format.KML.prototype.parseFeatures=function(d,v){var j=[];for(var m=0,p=d.length;m<p;m++){var f=d[m];var o=f.parentNode;var u=this.parseFeature.apply(this,[f]);if(u){if(this.extractStyles&&u.attributes&&u.attributes.styleUrl){u.style=this.getStyle(u.attributes.styleUrl,v)}if(this.extractStyles){var r=this.getElementsByTagNameNS(f,"*","Style")[0];if(r){var h=this.parseStyle(r);if(h){u.style=OpenLayers.Util.extend(u.style,h)}}}if(o&&o.nodeName.toLowerCase()=="folder"&&this.extractFolders){var e=this.parseAttributes(o);var b=e.name;if(this.folders[b]==undefined){this.folders[b]=e;this.folders[b]["features"]=[]}this.folders[b].features.push(u)}if(this.extractTracks){var q=this.getElementsByTagNameNS(f,this.namespaces.gx,"Track");if(q&&q.length>0){var g=q[0];var a={features:[],feature:u};this.readNode(g,a);if(a.features.length>0){j.push.apply(j,a.features)}}}else{if(this.extractStyles&&u.style&&u.style.label){u.style.label=u.attributes?u.attributes.name||"":""}j.push(u)}}else{throw"Bad Placemark: "+m}}this.features=this.features.concat(j)};OpenLayers.Format.KML.prototype.parseAttributes=function(e){var f={};var g=e.getElementsByTagName("ExtendedData");if(g.length){f=this.parseExtendedData(g[0])}var b,q,p;var d=e.childNodes;for(var h=0,m=d.length;h<m;++h){b=d[h];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,"");f[a]=o}continue}}if(a.match(/^Time(Stamp|Span)$/)){var j=this.parseAttributes(b);f[a]=j}}}return f};OpenLayers.Format.KML.prototype.parseExtendedData=function(b){var e={};var j=1;var d=null;var g,m=0;var f,q,h,r,p,a;do{switch(j){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){j++;continue}for(g=0;g<m;g++){f=d[g];q=j!=3?f.getAttribute("name"):(f.localName||f.nodeName.split(":").pop());h={};r=j==1?f.getElementsByTagName("value"):[f];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,"")}}}h.value=p;a=f.getElementsByTagName("displayName");if(a.length){h.displayName=this.getChildValue(a[0])}e[q]=h}j++}while(j<=3);return e};OpenLayers.Format.OSM.prototype.createXML.point=function(a){var f=null;var d=a.geometry?a.geometry:a;if(this.internalProjection&&this.externalProjection){d=d.clone();d.transform(this.internalProjection,this.externalProjection)}var e=false;if(a.osm_id){f=a.osm_id;if(this.created_nodes[f]){e=true}}else{f=-this.osm_id;this.osm_id++}if(e){b=this.created_nodes[f]}else{var b=this.createElementNS(null,"node")}this.created_nodes[f]=b;b.setAttribute("id",f);b.setAttribute("lon",d.x);b.setAttribute("lat",d.y);if(a.attributes){this.serializeTags(a,b)}this.setState(a,b);return e?[]:[b]};OpenLayers.VERSION_NUMBER="OpenLayers 2.10 -- $Revision: 10721 $";OpenLayers._getScriptLocation=(function(){var a=function(o){var j=document.documentElement.getElementsByTagName("script"),p,f,g="";for(var h=0,e=j.length;h<e;h++){p=j[h].getAttribute("src");if(p){var f=p.match(o);if(f){g=f[1];break}}}return g};var d=new RegExp("(^|(.*?\\/))((lib/OpenLayers).js)(\\?|$)");var b=a(d);if(b===""){d=new RegExp("(^|(.*?\\/))((Geoportal(Extended)?).js)(\\?|$)");b=a(d)}return(function(){return b})})();OpenLayers.String.preg_replace=function(g,f,b){var e=new String(g);for(i=0,l=f.length;i<l;i++){if(f[i]&&(f[i] instanceof String)){f[i]=new RegExp(f[i],"g")}var d=f[i];var a=b[i];e=e.replace(d,val)}return e};OpenLayers.String.stripAccentedLetters=(function(){var b=/[ÀÁÂÃÄÅàáâãäåÒÓÔÕÕÖØòóôõöøÈÉÊËèéêëðÇçÐÌÍÎÏìíîïÙÚÛÜùúûüÑñŠšßŸÿýŽž]/g;var a={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","ð":"e","Ç":"C","ç":"c","Ð":"D","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ñ":"n","ñ":"n","Š":"S","š":"s","ß":"s","Ÿ":"Y","ÿ":"y","ý":"y","Ž":"Z","ž":"z"};return function(d){if(d){return d.replace(b,function(e){return a[e]})}return d}})();OpenLayers.String.sprintf=function(){function h(q,a,m,p){var o=(q.length>=a)?"":Array(1+a-q.length>>>0).join(m);return p?q+o:o+q}function e(p,o,r,a,m){var q=a-p.length;if(q>0){if(r||!m){p=h(p,a," ",r)}else{p=p.slice(0,o.length)+h("",q,"0",true)+p.slice(o.length)}}return p}function j(u,r,q,v,m,a,p){var o=u>>>0;q=q&&o&&{"2":"0b","8":"0","16":"0x"}[r]||"";u=q+h(o.toString(r),a||0,"0",false);return e(u,q,v,m,p)}function b(p,q,m,a,o){if(a!=null){p=p.slice(0,a)}return e(p,"",q,m,o)}var d=arguments,f=0,g=d[f++];return g.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[f++]}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[f++]}else{if(v.charAt(0)=="*"){v=+d[v.slice(1,-1)]}else{v=+v}}}var G=F?d[F.slice(0,-1)]:d[f++];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 j(G,2,C,p,m,v,z);case"o":return j(G,8,C,p,m,v,z);case"x":return j(G,16,C,p,m,v,z);case"X":return j(G,16,C,p,m,v,z).toUpperCase();case"u":return j(G,10,C,p,m,v,z);case"i":case"d":var r=parseInt(+G);var w=r<0?"-":D;G=w+h(String(Math.abs(r)),v,"0",false);return e(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 e(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.Util.getElement=function(){var e=[];for(var d=0,a=arguments.length;d<a;d++){var b=arguments[d];if(typeof b=="string"){b=OpenLayers._document.getElementById(b)}if(arguments.length==1){return b}e.push(b)}return e};OpenLayers.Util.createDiv=function(a,m,j,g,f,d,b,h){var e=OpenLayers._document.createElement("div");if(g){e.style.backgroundImage="url("+g+")"}if(!a){a=OpenLayers.Util.createUniqueID("OpenLayersDiv")}if(!f){f="absolute"}OpenLayers.Util.modifyDOMElement(e,a,m,j,f,d,b,h);return e};OpenLayers.Util.createImage=function(a,j,h,f,e,d,g,m){var b=OpenLayers._document.createElement("img");if(!a){a=OpenLayers.Util.createUniqueID("OpenLayersDiv")}if(!e){e="relative"}OpenLayers.Util.modifyDOMElement(b,a,j,h,e,d,null,g);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(f){b.src=f}return b};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=!!(OpenLayers._document.body.filters)}catch(d){}OpenLayers.Util.alphaHackNeeded=(b&&(a>=5.5)&&(a<7))}return OpenLayers.Util.alphaHackNeeded};OpenLayers.Util.pagePosition=function(g){var a=0,f=0;var b=g;var h=g;while(b){if(b==b.ownerDocument.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.createUrlObject=function(d,p){p=p||{};if(!(/^\w+:\/\//).test(d)){var h=window.location;var f=h.port?":"+h.port:"";var j=h.protocol+"//"+h.host.split(":").shift()+f;if(d.indexOf("/")===0){d=j+d}else{var g=h.pathname.split("/");g.pop();d=j+g.join("/")+"/"+d}}if(p.ignoreCase){d=d.toLowerCase()}var m=OpenLayers._document.createElement("a");m.href=d;var e={};e.host=m.host.split(":").shift();e.protocol=m.protocol;if(p.ignorePort80){e.port=(m.port=="80"||m.port=="0")?"":m.port}else{e.port=(m.port==""||m.port=="0")?"80":m.port}e.hash=(p.ignoreHash||m.hash==="#")?"":m.hash;var b=m.search;if(!b){var o=d.indexOf("?");b=(o!=-1)?d.substr(o):""}e.args=OpenLayers.Util.getParameters(b);e.pathname=(m.pathname.charAt(0)=="/")?m.pathname:"/"+m.pathname;return e};OpenLayers.Util.getRenderedDimensions=function(b,r,u){var o,f;var u=u||{};var a=(u.containerElement?u.containerElement.ownerDocument:OpenLayers._document).createElement("div");a.style.visibility="hidden";var q=(u.containerElement)?u.containerElement:OpenLayers._document.body;if(r){if(r.w){o=r.w;a.style.width=o+"px"}else{if(r.h){f=r.h;a.style.height=f+"px"}}}if(u.displayClass){a.className=u.displayClass}var g=a.ownerDocument.createElement("div");g.innerHTML=b;g.style.overflow="visible";if(g.childNodes){for(var e=0,d=g.childNodes.length;e<d;e++){if(!g.childNodes[e].style){continue}g.childNodes[e].style.overflow="visible"}}a.appendChild(g);q.appendChild(a);var p=false;var m=a.parentNode;while(m&&m.tagName.toLowerCase()!="body"){var j=OpenLayers.Element.getStyle(m,"position");if(j=="absolute"){p=true;break}else{if(j&&j!="static"){break}}m=m.parentNode}if(!p){a.style.position="absolute"}if(!o){o=parseInt(g.scrollWidth);a.style.width=o+"px"}if(!f){f=parseInt(g.scrollHeight)}a.removeChild(g);q.removeChild(a);return new OpenLayers.Size(o,f)};OpenLayers.Util.getScrollbarWidth=function(){var d=OpenLayers.Util._scrollbarWidth;if(d==null){var f=null;var e=null;var a=0;var b=0;f=OpenLayers._document.createElement("div");f.style.position="absolute";f.style.top="-1000px";f.style.left="-1000px";f.style.width="100px";f.style.height="50px";f.style.overflow="hidden";e=OpenLayers._document.createElement("div");e.style.width="100%";e.style.height="200px";f.appendChild(e);OpenLayers._document.body.appendChild(f);a=e.offsetWidth;f.style.overflow="scroll";b=e.offsetWidth;OpenLayers._document.body.removeChild(OpenLayers._document.body.lastChild);OpenLayers.Util._scrollbarWidth=(a-b);d=OpenLayers.Util._scrollbarWidth}return d};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,e,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(e!=b){a=d+encodeURIComponent(a)}}}}return a};OpenLayers.Request.issue=function(b){var f=OpenLayers.Util.extend(this.DEFAULT_CONFIG,{proxy:OpenLayers.ProxyHost});b=OpenLayers.Util.applyDefaults(b,f);var e=new OpenLayers.Request.XMLHttpRequest();var a=b.url;if(b.params){var d=OpenLayers.Util.getParameterString(b.params);if(d.length>0){var h=(a.indexOf("?")>-1)?"&":"?";a+=h+d}}if(b.proxy){if(typeof b.proxy=="function"){a=b.proxy(a)}else{a=OpenLayers.Request.proxyfyUrl(b.proxy,OpenLayers.Request.getFQDNForUrl(b.proxy),a)}}e.open(b.method,a,b.async,b.user,b.password);for(var g in b.headers){e.setRequestHeader(g,b.headers[g])}var m=this.events;var j=this;e.onreadystatechange=function(){if(e.readyState==OpenLayers.Request.XMLHttpRequest.DONE){var o=m.triggerEvent("complete",{request:e,config:b,requestUrl:a});if(o!==false){j.runCallbacks({request:e,config:b,requestUrl:a})}}};if(b.async===false){e.send(b.data)}else{window.setTimeout(function(){if(e._aborted!==true){e.send(b.data)}},0)}return e};(function(){var f=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=f&&!o&&(window.location.protocol!=="file:"||!window.ActiveXObject)?new f:new window.ActiveXObject("Microsoft.XMLHTTP");this._listeners=[]}if(a&&f.wrapped){d.wrapped=f.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){e(w);w.abort()}};window.attachEvent("onunload",p)}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(!a&&!m){this.readyState=d.OPENED;b(this)}this._object.onreadystatechange=function(){if(a&&!r){return}w.readyState=w._object.readyState;h(w);if(w._aborted){w.readyState=d.UNSENT;return}if(w.readyState==d.DONE){e(w);if(m&&r){window.detachEvent("onunload",p)}}if(v!=w.readyState){b(w)}v=w.readyState}};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;h(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()}e(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;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 r={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(r.type=="readystatechange"&&this.onreadystatechange){(this.onreadystatechange.handleEvent||this.onreadystatechange).apply(this,[r])}for(var p=0,u;u=this._listeners[p];p++){if(u[0]==r.type&&!u[2]){(u[1].handleEvent||u[1]).apply(this,[r])}}};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=g(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 g(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+=g(z,true)}}}return w}function j(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 h(p){try{p.responseText=p._object.responseText}catch(q){}try{p.responseXML=j(p._object)}catch(q){}try{p.status=p._object.status}catch(q){}try{p.statusText=p._object.statusText}catch(q){}}function e(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.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);var d=this.map.div.ownerDocument||OpenLayers._document;if(!this.oldOnselectstart){this.oldOnselectstart=(d.onselectstart)?d.onselectstart:OpenLayers.Function.True}d.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)){var b=this.map.div.ownerDocument||OpenLayers._document;if(this.documentDrag===true&&this.documentEvents){if(a.element===document){this.adjustXY(a);this.setEvent(a)}else{this.destroyDocumentEvents()}}if(this.interval>0){this.timeoutId=setTimeout(OpenLayers.Function.bind(this.removeTimeout,this),this.interval)}this.dragging=true;this.move(a);this.callback("move",[a.xy]);if(!this.oldOnselectstart){this.oldOnselectstart=b.onselectstart;b.onselectstart=OpenLayers.Function.False}this.last=this.evt.xy}return true};OpenLayers.Handler.Drag.prototype.mouseup=function(b){if(this.started){if(this.documentDrag===true&&this.documentEvents){this.adjustXY(b);this.destroyDocumentEvents()}var a=(this.start!=this.last);this.started=false;this.dragging=false;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown");this.up(b);this.callback("up",[b.xy]);if(a){this.callback("done",[b.xy])}var d=this.map.div.ownerDocument||OpenLayers._document;d.onselectstart=this.oldOnselectstart}return true};OpenLayers.Handler.Drag.prototype.mouseout=function(b){if(this.started&&OpenLayers.Util.mouseLeft(b,this.map.div)){var d=this.map.div.ownerDocument||OpenLayers._document;if(this.documentDrag===true){this.documentEvents=new OpenLayers.Events(this,d,null,null,{includeXY:true});this.documentEvents.on({mousemove:this.mousemove,mouseup:this.mouseup});OpenLayers.Element.addClass(d.body,"olDragDown")}else{var a=(this.start!=this.last);this.started=false;this.dragging=false;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown");this.out(b);this.callback("out",[]);if(a){this.callback("done",[b.xy])}if(d.onselectstart){d.onselectstart=this.oldOnselectstart}}}return true};OpenLayers.Handler.Drag.prototype.destroyDocumentEvents=function(){var a=this.map.div.ownerDocument||OpenLayers._document;OpenLayers.Element.removeClass(a.body,"olDragDown");this.documentEvents.destroy();this.documentEvents=null};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(e,f,b){var d=this.EVENTMAP[e][f];if(d){if(e=="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.Handler.Keyboard.prototype.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(OpenLayers._document,this.KEY_EVENTS[b],this.eventListener)}return true}else{return false}};OpenLayers.Handler.Keyboard.prototype.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(OpenLayers._document,this.KEY_EVENTS[b],this.eventListener)}d=true}return d};OpenLayers.Handler.MouseWheel.prototype.onWheelEvent=function(o){if(!this.map||!this.checkModifiers(o)){return}var h=false;var q=false;var g=false;var b=OpenLayers.Event.element(o);while((b!=null)&&!g&&!h){if(!h){try{if(b.currentStyle){d=b.currentStyle.overflow}else{var a=b.ownerDocument.defaultView.getComputedStyle(b,null);var d=a.getPropertyValue("overflow")}h=(d&&(d=="auto")||(d=="scroll"))}catch(f){}}if(!q){for(var j=0,m=this.map.layers.length;j<m;j++){if(b==this.map.layers[j].div||b==this.map.layers[j].pane){q=true;break}}}g=(b==this.map.div);b=b.parentNode}if(!h&&g){if(q){var p=0;if(!o){o=window.event}if(o.wheelDelta){p=o.wheelDelta/120;if(window.opera&&window.opera.version()<9.2){p=-p}}else{if(o.detail){p=-o.detail/3}}this.delta=this.delta+p;if(this.interval){window.clearTimeout(this._timeoutId);this._timeoutId=window.setTimeout(OpenLayers.Function.bind(function(){this.wheelZoom(o)},this),this.interval)}else{this.wheelZoom(o)}}OpenLayers.Event.stop(o)}};OpenLayers.Handler.MouseWheel.prototype.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(OpenLayers._document,"mousewheel",b);return true}else{return false}};OpenLayers.Handler.MouseWheel.prototype.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(OpenLayers._document,"mousewheel",b);return true}else{return false}};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}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){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.OverviewMap.prototype.draw=function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!(this.layers.length>0)){if(this.map.baseLayer){var e=this.map.baseLayer.clone();this.layers=[e]}else{this.map.events.register("changebaselayer",this,this.baseLayerDraw);return this.div}}this.element=this.div.ownerDocument.createElement("div");this.element.className=this.displayClass+"Element";this.element.style.display="none";this.mapDiv=this.div.ownerDocument.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=this.div.ownerDocument.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 f=OpenLayers.Util.getImagesLocation();var b=f+"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=f+"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 g=["dblclick","mousedown"];for(var d=0,a=g.length;d<a;d++){OpenLayers.Event.observe(this.maximizeDiv,g[d],OpenLayers.Event.stop);OpenLayers.Event.observe(this.minimizeDiv,g[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);if(this.maximized){this.maximizeControl()}return this.div};OpenLayers.Control.KeyboardDefaults.prototype.autoActivate=false;OpenLayers.Control.KeyboardDefaults.prototype.initialize=function(){OpenLayers.Control.prototype.initialize.apply(this,arguments);if(this.activeOverMapOnly!==true){this.autoActivate=true}},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","controlvisibilitychanged","controldeleted","beforemove"];OpenLayers.Map.prototype.mapMouseDelay=100;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),this.mapMouseDelay)}};OpenLayers.Map.prototype.initialize=function(j,e){if(arguments.length===1&&typeof j==="object"){e=j;j=e&&e.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,e);this.layers=[];this.id=OpenLayers.Util.createUniqueID("OpenLayers.Map_");this.div=OpenLayers.Util.getElement(j);if(!this.div){this.div=OpenLayers._document.createElement("div");this.div.style.height="1px";this.div.style.width="1px"}OpenLayers.Element.addClass(this.div,"olMap");var h=this.id+"_OpenLayers_ViewPort";this.viewPortDiv=OpenLayers.Util.createDiv(h,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);h=this.id+"_OpenLayers_Container";this.layerContainerDiv=OpenLayers.Util.createDiv(h);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 g=true;var d=this.div.ownerDocument.getElementsByTagName("link");for(var f=0,a=d.length;f<a;++f){if(OpenLayers.Util.isEquivalentUrl(d.item(f).href,this.theme)){g=false;break}}if(g){var b=this.div.ownerDocument.createElement("link");b.setAttribute("rel","stylesheet");b.setAttribute("type","text/css");b.setAttribute("href",this.theme);this.div.ownerDocument.getElementsByTagName("head")[0].appendChild(b)}}if(this.controls==null){if(OpenLayers.Control!=null){this.controls=[new OpenLayers.Control.Navigation(),new OpenLayers.Control.PanZoom(),new OpenLayers.Control.ArgParser(),new OpenLayers.Control.Attribution()]}else{this.controls=[]}}for(var f=0,a=this.controls.length;f<a;f++){this.addControlToMap(this.controls[f])}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);if(e&&e.layers){this.addLayers(e.layers);if(e.center){this.setCenter(e.center,e.zoom)}}};OpenLayers.Map.prototype.destroy=function(){if(!this.unloadDestroy){return false}if(this.panTween){this.panTween.stop();this.panTween=null}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;if(this.eventListeners){this.events.un(this.eventListeners);this.eventListeners=null}this.events.destroy();this.events=null};OpenLayers.Map.prototype.moveTo=function(j,b,e){if(!e){e={}}if(b!=null){b=parseFloat(b);if(!this.fractionalZoom){b=Math.round(b)}}var r={zoom:b,lonlat:j,options:e};if(this.events.triggerEvent("beforemove",r)===false){return}b=r.zoom;j=r.lonlat;var B=j?j.clone():null;var u=e.dragging;var m=e.forceZoomChange;var d=e.noEvent;if(this.panTween&&e.caller=="setCenter"){this.panTween.stop()}if(!this.center&&!this.isValidLonLat(B)){if(this.size){var f=new OpenLayers.Pixel(this.size.w/2,this.size.h/2);B=this.getLonLatFromViewPortPx(f)}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 h=!(B&&this.isValidLonLat(B)&&B.equals(this.center,p));if(o||h||!u){if(!this.dragging&&!d){this.events.triggerEvent("movestart")}if(h&&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 g=this.getExtent();if(g&&this.baseLayer.visibility){this.baseLayer.moveTo(g,o,u);if(u){this.baseLayer.events.triggerEvent("move")}else{this.baseLayer.events.triggerEvent("moveend",{zoomChanged:o})}}g=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(g,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(e,f,j){if(e!=this.baseLayer){var h=null;var g=null;var m=null;if(this.baseLayer){h=this.baseLayer;g=this.getProjection();m=this.baseLayer.getExtent()}if(OpenLayers.Util.indexOf(this.layers,e)!=-1){var a=this.getCenter();var o=OpenLayers.Util.getResolutionFromScale(this.getScale(),e.units);if(e.events.triggerEvent("loadstart")===false){return}if(this.baseLayer!=null&&!this.allOverlays){this.baseLayer.setVisibility(false)}this.baseLayer=e;this.viewRequestID++;if(!this.allOverlays||this.baseLayer.visibility){this.baseLayer.setVisibility(true)}this.events.triggerEvent("changebaselayer",{layer:e,baseLayer:h});e.events.triggerEvent("loadend");if(a!=null||f!=null){var b=(f)?f.clone():(m)?m.getCenterLonLat():a;b.transform(g,this.getProjection());var d=(typeof(j)=="number")?j:(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)}}if(b.autoActivate){b.activate()}};OpenLayers.Map.prototype.removeControl=function(a){if((a)&&(a==this.getControl(a.id))){this.events.triggerEvent("controldeleted",{control:a});if(a.div&&(a.div.parentNode==this.viewPortDiv)){this.viewPortDiv.removeChild(a.div)}OpenLayers.Util.removeItem(this.controls,a)}};OpenLayers.Map.prototype.calculateBounds=function(a,b){var f=null;if(a==null){a=this.getCenter()}if(b==null){b=this.getResolution()}if((a!=null)&&(b!=null)){var e=this.getSize();if(e!=null){var g=e.w*b;var d=e.h*b;f=new OpenLayers.Bounds(a.lon-g/2,a.lat-d/2,a.lon+g/2,a.lat+d/2)}}return f};OpenLayers.Map.prototype.getApproxScaleDenominator=function(h){var g=0;if(this.baseLayer!=null){h=(h!=undefined?h:this.getZoom());var b=this.baseLayer.getResolutionForZoom(h);var a=this.baseLayer.getNativeProjection().getUnits();g=Math.round(OpenLayers.Util.getScaleFromResolution(b,a)||0);if(g>0){var j=Math.floor(Math.log(g)/Math.log(10));var f=Math.exp(j*Math.log(10));var e=g/f;g=Math.round(Math.round(e)*f)}}return g};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(a){if(this.map==null){this.map=a;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)}}if(this.minExtent){if(this.isBaseLayer){}else{this.minExtent.transform(this.projection,this.map.getProjection(),true)}}if(!this.maxExtent||!this.minExtent){var b=null;for(var g=0,e=a.layers.length;g<e;g++){var m=a.layers[g];if(!m.isBaseLayer){continue}if(this.projection.equals(m.getNativeProjection())){b=m;break}if(this.projection.isCompatibleWith(m.getNativeProjection())){b=m;continue}}if(!this.maxExtent){if(b&&b.maxExtent){this.maxExtent=b.maxExtent.clone().transform(b.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.minExtent){if(b&&b.minExtent){this.minExtent=b.minExtent.clone().transform(b.getNativeProjection(),this.map.getProjection(),true)}else{this.minExtent=null}}}if(this.restrictedExtent){this.restrictedExtent.transform(this.projection,this.map.getProjection(),true)}if(this.originators){for(var g=0,e=this.originators.length;g<e;g++){var d=this.originators[g];if(d.extent){if(!(d.extent instanceof Array)){d.extent=[d.extent]}for(var f=0,h=d.extent.length;f<h;f++){d.extent[f].transform(this.projection,this.map.getProjection(),true)}}}}this.initResolutions();if(!this.isBaseLayer){this.inRange=this.calculateInRange();var o=((this.visibility)&&(this.inRange));this.div.style.display=o?"":"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 e=false;if(this.alwaysInRange){e=true}else{if(this.map){var b=this.map.getResolution();e=((b>=this.minResolution)&&(b<=this.maxResolution));if(e&&!this.isBaseLayer&&this.maxExtent){var d=this.map.calculateBounds();if(d){var a=this.restrictedExtent||this.maxExtent;e=d.intersectsBounds(a)}}}}return e};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 f,a;var g={},e=true;for(f=0,a=this.RESOLUTION_PROPERTIES.length;f<a;f++){var j=this.RESOLUTION_PROPERTIES[f];g[j]=this.options[j];if(e&&this.options[j]){e=false}}if(this.alwaysInRange==null){this.alwaysInRange=e}if(g.resolutions==null){g.resolutions=this.resolutionsFromScales(g.scales)}if(g.resolutions==null){g.resolutions=this.calculateResolutions(g)}if(g.resolutions==null){for(f=0,a=this.RESOLUTION_PROPERTIES.length;f<a;f++){var j=this.RESOLUTION_PROPERTIES[f];g[j]=this.options[j]!=null?this.options[j]:this.map[j]}if(g.resolutions==null){g.resolutions=this.resolutionsFromScales(g.scales)}if(g.resolutions==null){g.resolutions=this.calculateResolutions(g)}}var d;if(this.options.maxResolution&&this.options.maxResolution!=="auto"){d=this.options.maxResolution}if(this.options.minScale){d=OpenLayers.Util.getResolutionFromScale(this.options.minScale,this.units)}var b;if(this.options.minResolution&&this.options.minResolution!=="auto"){b=this.options.minResolution}if(this.options.maxScale){b=OpenLayers.Util.getResolutionFromScale(this.options.maxScale,this.units)}if(g.resolutions){g.resolutions.sort(function(o,m){return(m-o)});if(!d){d=g.resolutions[0]}if(!b){var h=g.resolutions.length-1;b=g.resolutions[h]}}this.resolutions=g.resolutions;if(this.resolutions){a=this.resolutions.length;this.scales=new Array(a);for(f=0;f<a;f++){this.scales[f]=OpenLayers.Util.getScaleFromResolution(this.resolutions[f],this.units)}this.numZoomLevels=a}this.minResolution=b;if(b){this.maxScale=OpenLayers.Util.getScaleFromResolution(b,this.units)}this.maxResolution=d;if(d){this.minScale=OpenLayers.Util.getScaleFromResolution(d,this.units)}this.minZoomLevel=typeof(this.options.minZoomLevel)=="number"?this.options.minZoomLevel:this.map.minZoomLevel||0;if(this.minZoomLevel<0){this.minZoomLevel=0}this.maxZoomLevel=this.options.maxZoomLevel||this.map.maxZoomLevel;if(this.resolutions){this.maxZoomLevel=this.maxZoomLevel||this.resolutions.length-1;if(this.maxZoomLevel>this.resolutions.length){this.maxZoomLevel=this.resolutions.length-1}this.maxResolution=this.resolutions[this.minZoomLevel];this.minResolution=this.resolutions[this.maxZoomLevel];this.minScale=this.scales[this.minZoomLevel];this.maxScale=this.scales[this.maxZoomLevel]}};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 e=0,a=this.div.childNodes.length;e<a;++e){var d=this.div.childNodes[e].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=OpenLayers._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.updateSize=OpenLayers.Popup.Framed.prototype.updateSize=OpenLayers.Popup.AnchoredBubble.prototype.updateSize=OpenLayers.Popup.Anchored.prototype.updateSize=OpenLayers.Popup.prototype.updateSize=function(){var f="<div class='"+this.contentDisplayClass+"'>"+this.contentDiv.innerHTML+"</div>";var j=(this.map)?this.map.layerContainerDiv:OpenLayers._document.body;var m=OpenLayers.Util.getRenderedDimensions(f,null,{displayClass:this.displayClass,containerElement:j});var h=this.getSafeContentSize(m);var g=null;if(h.equals(m)){g=m}else{var b=new OpenLayers.Size();b.w=(h.w<m.w)?h.w:null;b.h=(h.h<m.h)?h.h:null;if(b.w&&b.h){g=h}else{var e=OpenLayers.Util.getRenderedDimensions(f,b,{displayClass:this.contentDisplayClass,containerElement:j});var d=OpenLayers.Element.getStyle(this.contentDiv,"overflow");if((d!="hidden")&&(e.equals(h))){var a=OpenLayers.Util.getScrollbarWidth();if(b.w){e.h+=a}else{e.w+=a}}g=this.getSafeContentSize(e)}}this.setSize(g)};OpenLayers.Popup.FramedCloud.prototype.getContentDivPadding=OpenLayers.Popup.Framed.prototype.getContentDivPadding=OpenLayers.Popup.AnchoredBubble.prototype.getContentDivPadding=OpenLayers.Popup.Anchored.prototype.getContentDivPadding=OpenLayers.Popup.prototype.getContentDivPadding=function(){var a=this._contentDivPadding;if(!a){if(this.div.parentNode==null){this.div.style.display="none";OpenLayers._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==OpenLayers._document.body){OpenLayers._document.body.removeChild(this.div);this.div.style.display=""}}return a};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.initialize=function(e,a,f,b,d){OpenLayers.Tile.prototype.initialize.apply(this,arguments);this.url=b;this.frame=OpenLayers._document.createElement("div");this.frame.style.overflow="hidden";this.frame.style.position="absolute";this.layerAlphaHack=this.layer.alpha&&OpenLayers.Util.alphaHack()};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)||this.layer.singleTile){if(a){if(!this.backBufferTile){this.backBufferTile=this.clone();this.backBufferTile.hide();this.backBufferTile.isBackBuffer=true;this.events.register("loadend",this,this.resetBackBuffer);this.layer.events.register("loadend",this,this.resetBackBuffer)}this.startTransition()}else{if(this.backBufferTile){this.backBufferTile.clear()}}}else{if(a&&this.isFirstDraw){this.events.register("loadend",this,this.showTile);this.isFirstDraw=false}}if(!a){return false}if(this.isLoading){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 e=this.layer.imageOffset;var b=this.layer.getImageSize(this.bounds);if(this.layerAlphaHack){this.imgDiv=OpenLayers.Util.createAlphaImageDiv(null,e,b,null,"relative",null,null,null,true)}else{this.imgDiv=OpenLayers.Util.createImage(null,e,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(d){var b=OpenLayers.Layer.prototype.getCompatibleProjection.apply(this,arguments);if(b!=null){return b}d=d||this.map.baseLayer;var e=d.getNativeProjection();for(var a in this.srs){if(!(a instanceof OpenLayers.Projection)){b=new OpenLayers.Projection(a)}else{b=a}if(b.isCompatibleWith(e)){return b}b=null}return null};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}if(this.handlers.click){this.handlers.click.destroy()}if(this.handlers.drag){this.handlers.drag.destroy()}if(this.mapDiv.childNodes.length>0){this.mapDiv.removeChild(this.extentRectangle)}this.extentRectangle=null;if(this.rectEvents){this.rectEvents.destroy();this.rectEvents=null}if(this.ovmap){this.ovmap.destroy();this.ovmap=null}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=OpenLayers._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,"dblclick",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}var e;for(var b=0,a=this.controls.length;b<a;b++){e=this.controls[b];if(e!=d&&(e.type===OpenLayers.Control.TYPE_TOOL||e.type==null)){e.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){this.addControlsToMap(b);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 f=this.layers||this.map.layers;var g=[];var e,b;for(var d=0,a=f.length;d<a;++d){e=f[d];if(e instanceof OpenLayers.Layer.WMS&&(!this.queryVisible||this.layerQueryable(e))){b=e.url instanceof Array?e.url[0]:e.url;if(this.drillDown===false&&!this.url){this.url=b}if(this.drillDown===true||this.urlMatches(b)){g.push(e)}}}return g};OpenLayers.Control.WMSGetFeatureInfo.prototype.buildWMSOptions=function(a,e,b,j){var h=[],m=[];for(var f=0,g=e.length;f<g;f++){h=h.concat(e[f].params.LAYERS);m=m.concat(this.getStyleNames(e[f]))}var d=OpenLayers.Util.extend({service:"WMS",version:e[0].params.VERSION,request:"GetFeatureInfo",layers:h,query_layers:h,styles:m,bbox:this.map.getExtent().transform(this.map.getProjection(),this.layers[0].getNativeProjection()).toBBOX(null,e[0].reverseAxisOrder()),feature_count:this.maxFeatures,height:this.map.getSize().h,width:this.map.getSize().w,format:j,info_format:this.infoFormat},(parseFloat(e[0].params.VERSION)>=1.3)?{crs:this.layers[0].getNativeProjection(),i:b.x,j:b.y}:{srs:e[0].getNativeProjection(),x:b.x,y:b.y});OpenLayers.Util.applyDefaults(d,this.vendorParams);return{url:a,params:OpenLayers.Util.upperCaseObject(d),callback:function(o){this.handleResponse(b,o)},scope:this}};OpenLayers.Control.WMSGetFeatureInfo.prototype.handleResponse=function(e,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)}if(this.drillDown===false){this.triggerGetFeatureInfo(b,e,a)}else{this._requestCount++;this._features=(this._features||[]).concat(a);if(this._requestCount===this._numRequests){this.triggerGetFeatureInfo(b,e,this._features.concat());delete this._features;delete this._requestCount;delete this._numRequests}}};OpenLayers.Control.Graticule.prototype.update=function(){var o=this.map.getExtent();if(!o){return}this.gratLayer.destroyFeatures();var p=OpenLayers.Projection.CRS84;var P=this.map.getProjection();var h=this.map.getResolution();switch(P.getProjName()){case"longlat":case"eqc":this.numPoints=1;break;default:break}var S=this.map.getCenter();var L=new OpenLayers.Pixel(S.lon,S.lat);OpenLayers.Projection.transform(L,P,p);var G=this.targetSize*h;G*=G;var v;for(var K=0;K<this.intervals.length;++K){v=this.intervals[K];var Q=v/2;var e=L.offset(new OpenLayers.Pixel(-Q,-Q));var b=L.offset(new OpenLayers.Pixel(Q,Q));OpenLayers.Projection.transform(e,p,P);OpenLayers.Projection.transform(b,p,P);var f=(e.x-b.x)*(e.x-b.x)+(e.y-b.y)*(e.y-b.y);if(f<=G){break}}L.x=Math.floor(L.x/v)*v;L.y=Math.floor(L.y/v)*v;var J=0;var w=[L.clone()];var u=L.clone();var H;do{u=u.offset(new OpenLayers.Pixel(0,v));H=OpenLayers.Projection.transform(u.clone(),p,P);w.unshift(u)}while(o.containsPixel(H)&&++J<1000);u=L.clone();do{u=u.offset(new OpenLayers.Pixel(0,-v));H=OpenLayers.Projection.transform(u.clone(),p,P);w.push(u)}while(o.containsPixel(H)&&++J<1000);J=0;var E=[L.clone()];u=L.clone();do{u=u.offset(new OpenLayers.Pixel(-v,0));H=OpenLayers.Projection.transform(u.clone(),p,P);E.unshift(u)}while(o.containsPixel(H)&&++J<1000);u=L.clone();do{u=u.offset(new OpenLayers.Pixel(v,0));H=OpenLayers.Projection.transform(u.clone(),p,P);E.push(u)}while(o.containsPixel(H)&&++J<1000);var a=[];for(var K=0;K<E.length;++K){var g=E[K].x;var D=[];var R=null;var M=Math.min(w[0].y,90);var r=Math.max(w[w.length-1].y,-90);var d=(M-r)/this.numPoints;var m=r;for(var I=0;I<=this.numPoints;++I){var N=new OpenLayers.Geometry.Point(g,m);N.transform(p,P);D.push(N);m+=d;if(N.y>=o.bottom&&!R){R=N}}if(this.labelled){var B=new OpenLayers.Geometry.Point(R.x,o.bottom);var O={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(B,O))}var C=new OpenLayers.Geometry.LineString(D);a.push(new OpenLayers.Feature.Vector(C))}for(var I=0;I<w.length;++I){m=w[I].y;if(m<-90||m>90){continue}var D=[];var F=E[0].x;var z=E[E.length-1].x;var q=(z-F)/this.numPoints;var g=F;var R=null;for(var K=0;K<=this.numPoints;++K){var N=new OpenLayers.Geometry.Point(g,m);N.transform(p,P);D.push(N);g+=q;if(N.x<o.right){R=N}}if(this.labelled){var B=new OpenLayers.Geometry.Point(o.right,R.y);var O={value:m,label:this.labelled?OpenLayers.Util.getFormattedLonLat(m,"lat",this.labelFormat):"",labelAlign:"rb",xOffset:-2,yOffset:2};this.gratLayer.addFeatures(new OpenLayers.Feature.Vector(B,O))}var C=new OpenLayers.Geometry.LineString(D);a.push(new OpenLayers.Feature.Vector(C))}this.gratLayer.addFeatures(a)};OpenLayers.Control.Graticule.prototype.changeLang=function(a){this.update()};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 h=this.map.getProjection();var g=b.baseLayer?b.baseLayer.getNativeProjection():null;this.options.formatOptions.internalProjection=h.clone();this.formatOptions.internalProjection=h.clone();this.addOptions({projection:h.clone()});for(var f=0,a=this.features.length;f<a;f++){var e=this.features[f];e.geometry.transform(g,h);if(e.popup&&e.popup.lonlat){e.popup.hide();e.popup.lonlat.transform(g,h)}}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 e=b.getWidth()*this.ratio;var d=b.getHeight()*this.ratio;this.bounds=new OpenLayers.Bounds(a.lon-(e/2),a.lat-(d/2),a.lon+(e/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.protocol.abort(this.response);this.layer.events.triggerEvent("loadend")}if(this.layer.events.triggerEvent("loadstart")===false){return}this.layer.events.on({visibilitychanged:this.abortIf,scope:this});this.response=this.layer.protocol.read({filter:this.createFilter(),callback:this.merge,scope:this});this.layer.events.un({visibilitychanged:this.abortIf,scope:this})};OpenLayers.Strategy.BBOX.prototype.abortIf=function(a){if(this.response&&a.property&&a.property=="visibility"){if(a.layer===this.layer&&!this.layer.visibility){this.layer.protocol.abort(this.response);this.response=null;this.layer.events.triggerEvent("loadend")}}};OpenLayers.Strategy.Fixed.prototype.response=null;OpenLayers.Strategy.Fixed.prototype.load=function(a){if(this.response){this.layer.protocol.abort(this.response);this.layer.events.triggerEvent("loadend")}if(this.layer.events.triggerEvent("loadstart")===false){return}this.response=this.layer.protocol.read(OpenLayers.Util.applyDefaults({callback:this.merge,filter:this.layer.filter,scope:this},a));this.layer.events.un({visibilitychanged:this.load,scope:this})};OpenLayers.Strategy.Fixed.prototype.merge=function(h){this.layer.destroyFeatures();var f=h.features;if(f&&f.length>0){var g=null;if(this.layer.protocol&&this.layer.protocol.format&&this.layer.protocol.format.internalProjection&&this.layer.protocol.format.externalProjection){g=this.layer.protocol.format.internalProjection}if(!g){g=this.layer.projection}var e=this.layer.map.getProjection();if(!e.equals(g)){var d;for(var b=0,a=f.length;b<a;++b){d=f[b].geometry;if(d){d.transform(g,e)}}}this.layer.addFeatures(f)}this.response=null;this.layer.events.triggerEvent("loadend")};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(f){var g=f.responseXML;if(!g||!g.documentElement){g=OpenLayers.parseXMLString(f.responseText)}var a=OpenLayers.Request.XMLHttpRequest.getParseErrorText(g);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(g));var e=this.getDataExtent();if(e&&!(e.getWidth()==0||e.getHeight()==0)){this.maxExtent=e}this.events.triggerEvent("loadend")};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.Format.XML.prototype.read=function(e){var b=e.indexOf("<");if(b>0){e=e.substring(b)}var d=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(e);return f}),this),function(){return new DOMParser().parseFromString(e,"text/xml")},function(){var f=new XMLHttpRequest();f.open("GET","data:text/xml;charset=utf-8,"+encodeURIComponent(e),false);if(f.overrideMimeType){f.overrideMimeType("text/xml")}f.send(null);return f.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.Filter.v1_1_0.prototype.readNode=OpenLayers.Format.Filter.v1_0_0.prototype.readNode=OpenLayers.Format.Filter.v1.prototype.readNode=OpenLayers.Format.Filter.prototype.readNode=OpenLayers.Format.GML.prototype.readNode=OpenLayers.Format.KML.prototype.readNode=OpenLayers.Format.OSM.prototype.readNode=OpenLayers.Format.WMSCapabilities.prototype.readNode=OpenLayers.Format.WMSDescribeLayer.prototype.readNode=OpenLayers.Format.WMSGetFeatureInfo.prototype.readNode=OpenLayers.Format.WMTSCapabilities.prototype.readNode=OpenLayers.Format.XML.prototype.readNode=function(d,f){if(!f){f={}}if(!d){return f}var e=this.readers[d.namespaceURI?this.namespaceAlias[d.namespaceURI]:this.defaultPrefix];if(e){var b=d.localName||d.nodeName.split(":").pop();var a=e[b]||e["*"];if(a){a.apply(this,[d,f])}}return f};OpenLayers.Format.Filter.v1_1_0.prototype.readChildNodes=OpenLayers.Format.Filter.v1_0_0.prototype.readChildNodes=OpenLayers.Format.Filter.v1.prototype.readChildNodes=OpenLayers.Format.Filter.prototype.readChildNodes=OpenLayers.Format.GML.prototype.readChildNodes=OpenLayers.Format.KML.prototype.readChildNodes=OpenLayers.Format.OSM.prototype.readChildNodes=OpenLayers.Format.WMSCapabilities.prototype.readChildNodes=OpenLayers.Format.WMSDescribeLayer.prototype.readChildNodes=OpenLayers.Format.WMSGetFeatureInfo.prototype.readChildNodes=OpenLayers.Format.WMTSCapabilities.prototype.readChildNodes=OpenLayers.Format.XML.prototype.readChildNodes=function(e,f){if(!f){f={}}if(!e){return f}var d=e.childNodes;var g;for(var b=0,a=d.length;b<a;++b){g=d[b];if(g.nodeType==1){this.readNode(g,f)}}return f};OpenLayers.Format.GML.prototype.read=function(g){if(typeof g=="string"){g=OpenLayers.Format.XML.prototype.read.apply(this,[g])}var b=g.nodeType==9?g.documentElement:g;var h=this.getElementsByTagNameNS(b,this.gmlns,this.featureName);var f=[];for(var e=0,a=h.length;e<a;e++){var d=this.parseFeature(h[e]);if(d){f.push(d)}}return f};OpenLayers.Format.GML.prototype.createFeatureXML=function(o){var j=o.geometry;var f=this.buildGeometryNode(j);if(this.externalProjection){f.setAttribute("srsName",this.externalProjection.toString())}var m=this.createElementNS(this.featureNS,this.featurePrefix+":"+this.geometryName);m.appendChild(f);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 h in o.attributes){var g=this.createTextNode(o.attributes[h]);var e=h.substring(h.lastIndexOf(":")+1);var b=this.createElementNS(this.featureNS,this.featurePrefix+":"+e);b.appendChild(g);p.appendChild(b)}a.appendChild(p);return a};OpenLayers.Format.GML.prototype.buildCoordinatesNode=function(h){var b=this.createElementNS(this.gmlns,"gml:coordinates");b.setAttribute("decimal",".");b.setAttribute("cs",",");b.setAttribute("ts"," ");var g=[];if(h instanceof OpenLayers.Bounds){g.push(h.left+","+h.bottom);g.push(h.right+","+h.top)}else{var e=(h.components)?h.components:[h];if(this.xy){for(var d=0,a=e.length;d<a;d++){g.push(e[d].x+","+e[d].y)}}else{for(var d=0,a=e.length;d<a;d++){g.push(e[d].y+","+e[d].x)}}}var f=this.createTextNode(g.join(" "));b.appendChild(f);return b};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.readers.wms["Layer"]=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.readers.wms["Layer"]=OpenLayers.Format.WMSCapabilities.v1_1.prototype.readers.wms["Layer"]=OpenLayers.Format.WMSCapabilities.v1.prototype.readers.wms["Layer"]=function(b,f){var p=b.getAttributeNode("queryable");var d=(p&&p.specified)?b.getAttribute("queryable"):null;p=b.getAttributeNode("cascaded");var m=(p&&p.specified)?b.getAttribute("cascaded"):null;p=b.getAttributeNode("opaque");var g=(p&&p.specified)?b.getAttribute("opaque"):null;var o=b.getAttribute("noSubsets");var a=b.getAttribute("fixedWidth");var j=b.getAttribute("fixedHeight");var h={nestedLayers:[],styles:[],srs:{},metadataURLs:[],bbox:{},dimensions:{},authorityURLs:{},identifiers:{},keywords:[],queryable:(d&&d!=="")?(d==="1"||d==="true"):null,cascaded:(m!==null)?parseInt(m):null,opaque:g?(g==="1"||g==="true"):null,noSubsets:(o!==null)?(o==="1"||o==="true"):null,fixedWidth:(a!=null)?parseInt(a):null,fixedHeight:(j!=null)?parseInt(j):null,dataURLs:[],featureListURLs:[]};f.nestedLayers.push(h);this.readChildNodes(b,h);if(h.name){var e=h.name.split(":");if(e.length>0){h.prefix=e[0]}}};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.readers.wms["MetadataURL"]=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.readers.wms["MetadataURL"]=OpenLayers.Format.WMSCapabilities.v1_1.prototype.readers.wms["MetadataURL"]=OpenLayers.Format.WMSCapabilities.v1.prototype.readers.wms["MetadataURL"]=function(a,b){var d={type:a.getAttribute("type"),formats:[]};b.metadataURLs.push(d);this.readChildNodes(a,d)};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.readers.wms["DataURL"]=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.readers.wms["DataURL"]=OpenLayers.Format.WMSCapabilities.v1_1.prototype.readers.wms["DataURL"]=OpenLayers.Format.WMSCapabilities.v1.prototype.readers.wms["DataURL"]=function(a,b){var d={};b.dataURLs.push(d);this.readChildNodes(a,d)};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.readers.wms["FeatureListURL"]=OpenLayers.Format.WMSCapabilities.v1_1_0.prototype.readers.wms["FeatureListURL"]=OpenLayers.Format.WMSCapabilities.v1_1.prototype.readers.wms["FeatureListURL"]=OpenLayers.Format.WMSCapabilities.v1.prototype.readers.wms["FeatureListURL"]=function(b,d){var a={};d.featureListURLs.push(a);this.readChildNodes(onde,a)};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.readers.wms["VendorSpecificCapabilities"]=function(a,b){b.vendorSpecificCaps={};this.readChildNodes(a,b.vendorSpecificCaps)};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.readers.wms["TileSet"]=function(a,d){var b={srs:{},bbox:{},formats:[],layers:[],styles:[]};this.readChildNodes(a,b);if(!d.tilesets){d.tilesets=[]}d.tilesets.push(b)};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.readers.wms["Resolutions"]=function(f,g){var e=this.getChildValue(f);var b=e.split(/ +/);var a=b.length;if(a>0){for(var d=0;d<a;d++){b[d]=parseFloat(b[d])}b.sort(function(j,h){return h-j});g.resolutions=b}};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.readers.wms["Width"]=function(a,b){b.width=parseInt(this.getChildValue(a))};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.readers.wms["Height"]=function(a,b){b.height=parseInt(this.getChildValue(a))};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.readers.wms["Layers"]=function(a,b){if(b.layers){b.layers.push(this.getChildValue(a))}};OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.readers.wms["Styles"]=function(a,b){if(b.styles){b.styles.push(this.getChildValue(a))}};OpenLayers.Format.CSWGetRecords.v2_0_2.prototype.readers.ows["ExceptionReport"]=function(a,d){var b={};this.readChildNodes(a,b);if(a.attributes&&a.attributes.language){b.language=a.attributes.language}d.exceptionReport=b};OpenLayers.Format.CSWGetRecords.v2_0_2.prototype.readers.ows["Exception"]=function(a,b){b.exception=this.getChildValue(a)};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.Lang.en.untitled="Untitled";OpenLayers.Lang.en["no.description"]="No description.";OpenLayers.Lang.en.creationDate="Creation date ";OpenLayers.Lang.en.lastUpdateDate="Last update date ";OpenLayers.Lang.en.by=" by ";if(typeof(OpenLayers.Lang.de)!="undefined"){OpenLayers.Lang.de.untitled="Untitled";OpenLayers.Lang.de["no.description"]="Keine Beschreibung.";OpenLayers.Lang.de.creationDate="Erstellungsdatum ";OpenLayers.Lang.de.lastUpdateDate="Zuletzt aktualisiert am Tag ";OpenLayers.Lang.de.by=" durch "}if(typeof(OpenLayers.Lang.es)!="undefined"){OpenLayers.Lang.es.untitled="Sin título";OpenLayers.Lang.es["no.description"]="La descripción no.";OpenLayers.Lang.es.creationDate="Fecha ";OpenLayers.Lang.es.lastUpdateDate="Última actualización fecha ";OpenLayers.Lang.es.by=" por "}if(typeof(OpenLayers.Lang.fr)!="undefined"){OpenLayers.Lang.fr.untitled="Sans titre";OpenLayers.Lang.fr["no.description"]="Aucune description.";OpenLayers.Lang.fr.creationDate="Date de création ";OpenLayers.Lang.fr.lastUpdateDate="Date de dernière mise-à-jour ";OpenLayers.Lang.fr.by=" par "}if(typeof(OpenLayers.Lang.it)!="undefined"){OpenLayers.Lang.it.untitled="Senza titolo";OpenLayers.Lang.it["no.description"]="Nessuna descrizione.";OpenLayers.Lang.it.creationDate="Data di creazione ";OpenLayers.Lang.it.lastUpdateDate="Ultimo aggiornamento data ";OpenLayers.Lang.it.by=" per "}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.Marker.prototype.draw=function(a){var b=this.icon.draw(a);b.style.cursor="pointer";return b};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.MousePosition.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.MousePosition.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.MousePosition.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.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.ZoomOut.prototype.draw=OpenLayers.Control.ZoomIn.prototype.draw=OpenLayers.Control.Split.prototype.draw=OpenLayers.Control.Snapping.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.MousePosition.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.LayerSwitcher.prototype.redraw=function(){if(!this.checkRedraw()){return this.div}this.clearLayersArray("base");this.clearLayersArray("data");var e=false;var q=false;var j=this.map.layers.length;this.layerStates=new Array(j);for(var g=0;g<j;g++){var h=this.map.layers[g];this.layerStates[g]={name:h.name,visibility:h.visibility,inRange:h.inRange,id:h.id}}var f=this.map.layers.slice();if(!this.ascending){f.reverse()}for(var g=0,j=f.length;g<j;g++){var h=f[g];var m=h.isBaseLayer;if(h.displayInLayerSwitcher){if(m){q=true}else{e=true}var p=(m)?(h==this.map.baseLayer):h.getVisibility();var o=this.div.ownerDocument.createElement("input");o.id=this.id+"_input_"+h.name;o.name=(m)?this.id+"_baseLayers":h.name;o.type=(m)?"radio":"checkbox";o.value=h.name;o.checked=p;o.defaultChecked=p;if(!m&&!h.inRange){o.disabled=true}var a={inputElem:o,layer:h,layerSwitcher:this};OpenLayers.Event.observe(o,"mouseup",OpenLayers.Function.bindAsEventListener(this.onInputClick,a));var b=this.div.ownerDocument.createElement("span");OpenLayers.Element.addClass(b,"labelSpan");if(!m&&!h.inRange){b.style.color="gray"}b.innerHTML=h.name;b.style.verticalAlign=(m)?"bottom":"baseline";OpenLayers.Event.observe(b,"click",OpenLayers.Function.bindAsEventListener(this.onInputClick,a));var u=this.div.ownerDocument.createElement("br");var r=(m)?this.baseLayers:this.dataLayers;r.push({layer:h,inputElem:o,labelSpan:b});var d=(m)?this.baseLayersDiv:this.dataLayersDiv;d.appendChild(o);d.appendChild(b);d.appendChild(u)}}this.dataLbl.style.display=(e)?"":"none";this.baseLbl.style.display=(q)?"":"none";return this.div};OpenLayers.Control.LayerSwitcher.prototype.loadContents=function(){OpenLayers.Event.observe(this.div,"mouseup",OpenLayers.Function.bindAsEventListener(this.mouseUp,this));OpenLayers.Event.observe(this.div,"click",this.ignoreEvent);OpenLayers.Event.observe(this.div,"mousedown",OpenLayers.Function.bindAsEventListener(this.mouseDown,this));OpenLayers.Event.observe(this.div,"dblclick",this.ignoreEvent);this.layersDiv=this.div.ownerDocument.createElement("div");this.layersDiv.id=this.id+"_layersDiv";OpenLayers.Element.addClass(this.layersDiv,"layersDiv");this.baseLbl=this.div.ownerDocument.createElement("div");this.baseLbl.innerHTML=OpenLayers.i18n("baseLayer");OpenLayers.Element.addClass(this.baseLbl,"baseLbl");this.baseLayersDiv=this.div.ownerDocument.createElement("div");OpenLayers.Element.addClass(this.baseLayersDiv,"baseLayersDiv");this.dataLbl=this.div.ownerDocument.createElement("div");this.dataLbl.innerHTML=OpenLayers.i18n("overlays");OpenLayers.Element.addClass(this.dataLbl,"dataLbl");this.dataLayersDiv=this.div.ownerDocument.createElement("div");OpenLayers.Element.addClass(this.dataLayersDiv,"dataLayersDiv");if(this.ascending){this.layersDiv.appendChild(this.baseLbl);this.layersDiv.appendChild(this.baseLayersDiv);this.layersDiv.appendChild(this.dataLbl);this.layersDiv.appendChild(this.dataLayersDiv)}else{this.layersDiv.appendChild(this.dataLbl);this.layersDiv.appendChild(this.dataLayersDiv);this.layersDiv.appendChild(this.baseLbl);this.layersDiv.appendChild(this.baseLayersDiv)}this.div.appendChild(this.layersDiv);if(this.roundedCorner){OpenLayers.Rico.Corner.round(this.div,{corners:"tl bl",bgColor:"transparent",color:this.roundedCornerColor,blend:false});OpenLayers.Rico.Corner.changeOpacity(this.layersDiv,0.75)}var 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");OpenLayers.Element.addClass(this.maximizeDiv,"maximizeDiv");this.maximizeDiv.style.display="none";OpenLayers.Event.observe(this.maximizeDiv,"click",OpenLayers.Function.bindAsEventListener(this.maximizeControl,this));this.div.appendChild(this.maximizeDiv);var a=d+"layer-switcher-minimize.png";var b=new OpenLayers.Size(18,18);this.minimizeDiv=OpenLayers.Util.createAlphaImageDiv("OpenLayers_Control_MinimizeDiv",null,b,a,"absolute");OpenLayers.Element.addClass(this.minimizeDiv,"minimizeDiv");this.minimizeDiv.style.display="none";OpenLayers.Event.observe(this.minimizeDiv,"click",OpenLayers.Function.bindAsEventListener(this.minimizeControl,this));this.div.appendChild(this.minimizeDiv)};OpenLayers.Control.Scale.prototype.draw=function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.element){this.element=this.div.ownerDocument.createElement("div");this.div.appendChild(this.element)}this.map.events.register("moveend",this,this.updateScale);this.updateScale();return this.div};OpenLayers.Control.ScaleLine.prototype.draw=function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.eTop){this.eTop=this.div.ownerDocument.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=this.div.ownerDocument.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};OpenLayers.Control.Permalink.prototype.initialize=function(b,d,a){OpenLayers.Control.prototype.initialize.apply(this,[a]);this.element=OpenLayers.Util.getElement(b);this.base=d||OpenLayers._document.location.href};OpenLayers.Control.Permalink.prototype.draw=function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.element){this.div.className=this.displayClass;this.element=this.div.ownerDocument.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};OpenLayers.Control.Measure.prototype.deactivate=function(){this.cancelDelay();return OpenLayers.Control.prototype.deactivate.apply(this,arguments)};OpenLayers.Control.Measure.prototype.cancelDelay=function(){if(this.delayedTrigger!==null){window.clearTimeout(this.delayedTrigger);this.delayedTrigger=null}};OpenLayers.Control.Measure.prototype.cancel=function(){this.cancelDelay();this.handler.cancel()};OpenLayers.Control.Measure.prototype.measureComplete=function(a){this.cancelDelay();this.measure(a,"measure")};OpenLayers.Control.Measure.prototype.measurePartial=function(a,b){this.cancelDelay();b=b.clone();if(this.handler.freehandMode(this.handler.evt)){this.measure(b,"measurepartial")}else{this.delayedTrigger=window.setTimeout(OpenLayers.Function.bind(function(){this.measure(b,"measurepartial");this.delayedTrigger=null},this),this.partialDelay)}};OpenLayers.Control.Measure.prototype.measure=function(b,a){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.Zoomify.prototype.getNativeProjection=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.Zoomify.prototype.calculateInRange=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.Zoomify.prototype.initResolutions=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.Zoomify.prototype.setOpacity=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.Zoomify.prototype.changeBaseLayer=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.Zoomify.prototype.getCompatibleProjection=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.Zoomify.prototype.mergeNewParams=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.Zoomify.prototype.getFullRequestString=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.clone();b.transform(this.map.getProjection(),this.getNativeProjection());b=b.toArray();var e=this.getImageSize();var a=this.getFullRequestString({mapext:b,imgext:b,map_size:[e.w,e.h],imgx:e.w/2,imgy:e.h/2,imgxy:[e.w,e.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 g=d.baseLayer?d.baseLayer.getNativeProjection():null;var h=this.map.getProjection();this.addOptions({projection:h.clone()});var e=this.getVisibility();if(e){this.setVisibility(false)}for(var f=0,b=this.markers.length;f<b;f++){var a=this.markers[f];a.lonlat.transform(g,h)}if(e){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.Layer.Google.prototype.loadMapObject=function(){if(!this.type){this.type=G_NORMAL_MAP}var h,f,a;var d=OpenLayers.Layer.Google.cache[this.map.id];if(d){h=d.mapObject;f=d.termsOfUse;a=d.poweredBy;++d.count}else{var b=this.map.viewPortDiv;var j=b.ownerDocument.createElement("div");j.id=this.map.id+"_GMap2Container";j.style.position="absolute";j.style.width="100%";j.style.height="100%";b.appendChild(j);try{h=new GMap2(j);f=j.lastChild;b.appendChild(f);f.style.zIndex="1100";f.style.right="";f.style.bottom="";f.className="olLayerGoogleCopyright";a=j.lastChild;b.appendChild(a);a.style.zIndex="1100";a.style.right="";a.style.bottom="";a.className="olLayerGooglePoweredBy gmnoprint"}catch(g){throw (g)}OpenLayers.Layer.Google.cache[this.map.id]={mapObject:h,termsOfUse:f,poweredBy:a,count:1}}this.mapObject=h;this.termsOfUse=f;this.poweredBy=a;if(OpenLayers.Util.indexOf(this.mapObject.getMapTypes(),this.type)===-1){this.mapObject.addMapType(this.type)}if(typeof h.getDragObject=="function"){this.dragObject=h.getDragObject()}else{this.dragPanMapObject=null}if(this.isBaseLayer===false){this.setGMapVisibility(this.div.style.display!=="none")}};OpenLayers.Layer.Google.v2.loadMapObject=function(){if(!this.type){this.type=G_NORMAL_MAP}var h,f,a;var d=OpenLayers.Layer.Google.cache[this.map.id];if(d){h=d.mapObject;f=d.termsOfUse;a=d.poweredBy;++d.count}else{var b=this.map.viewPortDiv;var j=b.ownerDocument.createElement("div");j.id=this.map.id+"_GMap2Container";j.style.position="absolute";j.style.width="100%";j.style.height="100%";b.appendChild(j);try{h=new GMap2(j);f=j.lastChild;b.appendChild(f);f.style.zIndex="1100";f.style.right="";f.style.bottom="";f.className="olLayerGoogleCopyright";a=j.lastChild;b.appendChild(a);a.style.zIndex="1100";a.style.right="";a.style.bottom="";a.className="olLayerGooglePoweredBy gmnoprint"}catch(g){throw (g)}OpenLayers.Layer.Google.cache[this.map.id]={mapObject:h,termsOfUse:f,poweredBy:a,count:1}}this.mapObject=h;this.termsOfUse=f;this.poweredBy=a;if(OpenLayers.Util.indexOf(this.mapObject.getMapTypes(),this.type)===-1){this.mapObject.addMapType(this.type)}if(typeof h.getDragObject=="function"){this.dragObject=h.getDragObject()}else{this.dragPanMapObject=null}if(this.isBaseLayer===false){this.setGMapVisibility(this.div.style.display!=="none")}};OpenLayers.Layer.Google.v3.loadMapObject=function(){if(!this.type){this.type=google.maps.MapTypeId.ROADMAP}var e;var d=OpenLayers.Layer.Google.cache[this.map.id];if(d){e=d.mapObject;++d.count}else{var b=this.map.viewPortDiv;var f=b.ownerDocument.createElement("div");f.id=this.map.id+"_GMapContainer";f.style.position="absolute";f.style.width="100%";f.style.height="100%";b.appendChild(f);var a=this.map.getCenter();e=new google.maps.Map(f,{center:a?new google.maps.LatLng(a.lat,a.lon):new google.maps.LatLng(0,0),zoom:this.map.getZoom()||0,mapTypeId:this.type,disableDefaultUI:true,keyboardShortcuts:false,draggable:false,disableDoubleClickZoom:true,scrollwheel:false});d={mapObject:e,count:1};OpenLayers.Layer.Google.cache[this.map.id]=d;this.repositionListener=google.maps.event.addListenerOnce(e,"center_changed",OpenLayers.Function.bind(this.repositionMapElements,this))}this.mapObject=e;this.setGMapVisibility(this.visibility)};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.ArcXML.prototype.readNode=OpenLayers.Format.Atom.prototype.readNode=OpenLayers.Format.SLD.v1_0_0.prototype.readNode=OpenLayers.Format.SLD.v1.prototype.readNode=OpenLayers.Format.SLD.prototype.readNode=OpenLayers.Format.SOSCapabilities.prototype.readNode=OpenLayers.Format.SOSGetFeatureOfInterest.prototype.readNode=OpenLayers.Format.SOSGetObservation.prototype.readNode=OpenLayers.Format.WFSCapabilities.prototype.readNode=OpenLayers.Format.WFSDescribeFeatureType.prototype.readNode=OpenLayers.Format.WFS.prototype.readNode=OpenLayers.Format.GeoRSS.prototype.readNode=OpenLayers.Format.XML.prototype.readNode;OpenLayers.Format.ArcXML.prototype.readChildNodes=OpenLayers.Format.Atom.prototype.readChildNodes=OpenLayers.Format.SLD.v1_0_0.prototype.readChildNodes=OpenLayers.Format.SLD.v1.prototype.readChildNodes=OpenLayers.Format.SLD.prototype.readChildNodes=OpenLayers.Format.SOSCapabilities.prototype.readChildNodes=OpenLayers.Format.SOSGetFeatureOfInterest.prototype.readChildNodes=OpenLayers.Format.SOSGetObservation.prototype.readChildNodes=OpenLayers.Format.WFSCapabilities.prototype.readChildNodes=OpenLayers.Format.WFSDescribeFeatureType.prototype.readChildNodes=OpenLayers.Format.WFS.prototype.readChildNodes=OpenLayers.Format.GeoRSS.prototype.readChildNodes=OpenLayers.Format.XML.prototype.readChildNodes;OpenLayers.Format.GML.Base.prototype.readers.feature._typeName=function(d,e){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 f=d.getAttribute("fid")||this.getAttributeNS(d,this.namespaces.gml,"id");if(f){b.fid=f}if(this.internalProjection&&this.externalProjection&&b.geometry){b.geometry.transform(this.externalProjection,this.internalProjection)}if(a.bounds){b.bounds=a.bounds;if(this.internalProjection&&this.externalProjection){b.bounds.transform(this.externalProjection,this.internalProjection)}}e.features.push(b)};OpenLayers.Format.GeoRSS.prototype.externalProjection=new OpenLayers.Projection("EPSG:4326");OpenLayers.Format.GeoRSS.prototype.createFeatureFromItem=function(p){var h=this.createGeometryFromItem(p);var m=this.getChildValue(p,"*","title",this.featureTitle);var o=this.getChildValue(p,"*","description",this.getChildValue(p,"*","content",this.getChildValue(p,"*","summary",this.featureDescription)));var j=this.getChildValue(p,"*","link");if(!j){try{j=this.getElementsByTagNameNS(p,"*","link")[0].getAttribute("href")}catch(f){j=null}}var g=this.getChildValue(p,"*","pubDate");if(!g){g=this.getChildValue(p,"*","updated");if(!g){g=this.getChildValue(p,"*","date")}}var b=this.getChildValue(p,"*","author");if(!b){b=this.getChildValue(p,"*","creator")}var a=this.getChildValue(p,"*","id",null);var d={title:m,description:o,link:j,pubDate:g,author:b};var q=new OpenLayers.Feature.Vector(h,d);q.fid=a;return q};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(f,e){var b=e.childNodes;var a,d,h,m;for(var g=0,j=b.length;g<j;++g){a=b[g];if(a.nodeType==1){h=this.getNamespacePrefix(a.namespaceURI);if(h==this.defaultPrefix){h=""}if(h.length>0){h+="_"}m=a.nodeName.split(":").pop();d=this["read_cap_"+h+m];if(d){d.apply(this,[f,a])}else{OpenLayers.Console.log("no read_cap_"+h+m);d=this["read_cap_"+m];if(d){d.apply(this,[f,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 e in a.operations){if(!b.operations.hasOwnProperty()){b.operations[e]=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_Operations=OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.read_cap_Operations=OpenLayers.Format.WFSCapabilities.v1.prototype.read_cap_Operations=function(f,e){var d=e.childNodes;var b;for(var a=0;a<d.length;a++){b=d[a];if(b.nodeType==1){f.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 e={};e.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}e.format=b;e.href=this.getChildValue(a);d.metadataURLs.push(e)};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_Keywords=function(h,g){var b=this.getChildValue(g);var e=[];if(b&&b.toLowerCase()!="none"){var b=b.replace(/\n/g,",").split(",");for(var f=0,a=b.length;f<a;f++){var d=OpenLayers.String.trim(b[f]);if(d){e.push(d)}}}if(e.length>0){h.keywords.push({keyword:e})}};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(d,b){var a={};this.runChildNodes(a,b);d.operations=a};OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.read_cap_GetCapabilities=function(d,b){var a={href:{}};this.runChildNodes(a,b);d.GetCapabilities=a};OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.read_cap_DescribeFeatureType=function(d,a){var b={href:{}};this.runChildNodes(b,a);d.DescribeFeaturetype=b};OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.read_cap_Transaction=function(d,b){var a={href:{}};this.runChildNodes(a,b);d.Transaction=a};OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.read_cap_GetFeature=function(d,b){var a={href:{},formats:[]};this.runChildNodes(a,b);d.GetFeature=a};OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.read_cap_GetFeatureWithLock=function(d,b){var a={href:{},formats:[]};this.runChildNodes(a,b);d.getFeatureWithLock=getFeatureWithLock};OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.read_cap_LockFeature=function(d,a){var b={href:{}};this.runChildNodes(b,a);d.LockFeature=b};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(e,d){var a={};var b=d.getAttribute("name");a[b]={parameters:[],constraints:[],metadata:[]};this.runChildNodes(a[b],d);e.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_HTTP=function(b,a){this.runChildNodes(b,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,e){var b=e.childNodes;var q,p,m,j;for(var h=0,g=b.length;h<g;h++){var a=b[h];var f=a.nodeName.split(":").pop();if(a.nodeType==1){if(f=="LowerCorner"){var o=this.getChildValue(a).split(" ");q=o[0];p=o[1]}else{if(f=="UpperCorner"){var o=this.getChildValue(a).split(" ");m=o[0];j=o[1]}}}}d.bbox.push([q,p,m,j])};OpenLayers.Format.GeoJSON.prototype.createCRSObject=function(b){var e;if(this.internalProjection&&this.externalProjection){e=this.externalProjection.toString()}else{e=b.layer.getNativeProjection().toString()}var f=e.substring(e.indexOf(":")+1);var d="";var a={};if(e.match(/^urn:/i)){f=e;d="OGC"}else{if(e.match(/epsg:/i)){f=parseInt(f);if(f==4326){f="urn:ogc:def:crs:OGC:1.3:CRS84";d="OGC"}else{d="EPSG"}}else{if(e.match(/crs:/i)){f="urn:ogc:def:crs:OGC:1.3:"+f;d="OGC"}else{if(e.match(/ignf:/i)){f="urn:ogc:def:crs:IGNF:1.1:"+f;d="OGC"}else{if(e.match(/http:\/\/www\.epsg\.org\/#/)){f=parseInt(e.substring(e.indexOf("#")+1));if(f==4326){f="urn:ogc:def:crs:OGC:1.3:CRS84";d="OGC"}else{d="EPSG"}}else{if(e.match(/\/RIG.xml#/)){f="urn:ogc:def:crs:IGNF:1.1:"+e.substring(e.indexOf("#")+1);d="OGC"}}}}}}switch(d){case"OGC":a={type:"OGC",properties:{urn:f}};break;case"EPSG":a={type:"EPSG",properties:{code:f}};break}return a};OpenLayers.Format.WMC.prototype.getParser=function(a){var b=a||this.version||this.defaultVersion;if(!this.parser||this.parser.VERSION!=b){var d=OpenLayers.Format.WMC["v"+b.replace(/\./g,"_")];if(!d){throw OpenLayers.i18n("wmc.version.not.supported",{v:a})}this.parser=new d(this.options)}return this.parser};OpenLayers.Format.WMC.prototype.layerToContext=function(a){var d=this.getParser();if(!a.params){a.params={}}var b={queryable:a.queryable,visibility:a.visibility,name:a.params.LAYERS,title:a.name,metadataURL:a.metadataURL,version:a.params.VERSION,url:a.url,maxExtent:a.maxExtent,transparent:a.params.TRANSPARENT,numZoomLevels:a.numZoomLevels,units:a.units,isBaseLayer:a.isBaseLayer,opacity:a.opacity,displayInLayerSwitcher:a.displayInLayerSwitcher,singleTile:a.singleTile,tileSize:(a.singleTile||!a.tileSize)?undefined:{width:a.tileSize.w||OpenLayers.Map.TILE_WIDTH,height:a.tileSize.h||OpenLayers.Map.TILE_HEIGHT},minScale:(a.options.resolutions||a.options.scales||a.options.maxResolution||a.options.minScale)?a.minScale:undefined,maxScale:(a.options.resolutions||a.options.scales||a.options.minResolution||a.options.maxScale)?a.maxScale:undefined,formats:[{value:a.params.FORMAT,current:true}],styles:[{href:a.params.SLD,body:a.params.SLD_BODY,name:a.params.STYLES||d.defaultStyleName,title:d.defaultStyleTitle,current:true}]};return b};OpenLayers.Format.WMC.prototype.toContext=function(h){var f={};var g=h.layers;if(typeof(OpenLayers.Map)!="undefined"&&(h instanceof OpenLayers.Map)){f.bounds=h.getExtent();f.maxExtent=h.maxExtent;f.projection=h.projection;var j=OpenLayers.Element.getDimensions(h.div);f.size=new OpenLayers.Size(j.width,j.height)}else{OpenLayers.Util.applyDefaults(f,h);if(f.layers!=undefined){delete (f.layers)}}if(f.layersContext==undefined){f.layersContext=[]}if(g!=undefined&&g instanceof Array){for(var e=0,a=g.length;e<a;e++){var b=g[e];if(b instanceof OpenLayers.Layer){f.layersContext.push(this.layerToContext(b))}}}return f};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(d,b){var f=b.getAttribute("service");if(this.serviceMap&&this.servicesMap[f]){d.classLayer=this.servicesMap[f]}else{d.classLayer=OpenLayers.Layer.WMS}d.version=b.getAttribute("version");var e={};var a=b.getElementsByTagName("OnlineResource");if(a.length>0){this.read_wmc_OnlineResource(e,a[0])}d.url=e.href};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 e={};var a=b.getElementsByTagName("OnlineResource");if(a.length>0){this.read_wmc_OnlineResource(e,a[0])}d.dataURL=e.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(f,e){var b=this.getChildValue(e).split(",");for(var d=0,a=b.length;d<a;d++){b[d]=parseFloat(b[d])}f.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(f,e){var b=this.getChildValue(e).split(",");for(var d=0,a=b.length;d<a;d++){b[d]=parseFloat(b[d])}f.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_General=OpenLayers.Format.WMC.v1_0_0.prototype.write_wmc_General=OpenLayers.Format.WMC.v1.prototype.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(18),miny:b.bottom.toPrecision(18),maxx:b.right.toPrecision(18),maxy:b.top.toPrecision(18),SRS:a.projection}));d.appendChild(this.createElementDefaultNS("Title",a.title||"none"));d.appendChild(this.write_ol_MapExtension(a));return d};OpenLayers.Format.WMC.v1_1_0.prototype.write_ol_MapExtension=OpenLayers.Format.WMC.v1_0_0.prototype.write_ol_MapExtension=OpenLayers.Format.WMC.v1.prototype.write_ol_MapExtension=function(b){var e=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(18),miny:d.bottom.toPrecision(18),maxx:d.right.toPrecision(18),maxy:d.top.toPrecision(18)});e.appendChild(a)}return e};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(e){var g=this.createElementDefaultNS("Extension");if(e.resolutions){var a=this.createElementNS(this.namespaces.ol,"ol:resolutions");a.appendChild(this.createTextNode(e.resolutions.join(",")));g.appendChild(a)}var b=e.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(e.tileSize&&!e.singleTile){var q=this.createElementNS(this.namespaces.ol,"ol:tileSize");this.setAttributes(q,e.tileSize);g.appendChild(q)}if(e.nativeResolutions){var a=this.createElementNS(this.namespaces.ol,"ol:nativeResolutions");a.appendChild(this.createTextNode(e.nativeResolutions.join(",")));g.appendChild(a)}if(e.nativeProjection){var d=this.createElementNS(this.namespaces.ol,"ol:nativeProjection");d.appendChild(this.createTextNode(""+e.nativeProjection));g.appendChild(d)}if(e.params&&e.params.TRANSPARENT){var u=this.createElementNS(this.namespaces.ol,"ol:transparent");u.appendChild(this.createTextNode(e.params.TRANSPARENT));g.appendChild(u)}var m=["numZoomLevels","units","isBaseLayer","opacity","displayInLayerSwitcher","singleTile","minZoomLevel","maxZoomLevel",];var f;for(var h=0,j=m.length;h<j;++h){f=this.createOLPropertyNode(e,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 e={service:"OGC:WMS",version:a.params&&a.version?a.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){e.service=d;e.version=a.params&&a.version?a.version:"0.0.0";break}}}}this.setAttributes(b,e);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.Tile.Image.IFrame.prototype.createImgDiv=function(){var b=OpenLayers._document.createElement("div");if(OpenLayers.Util.getBrowserName()=="msie"){b.style.backgroundColor="#FFFFFF";b.style.filter="chroma(color=#FFFFFF)"}OpenLayers.Util.modifyDOMElement(b,null,new OpenLayers.Pixel(0,0),this.layer.getImageSize(),"absolute");var a=OpenLayers._document.createElement("div");a.appendChild(b);return a};OpenLayers.Tile.Image.IFrame.prototype.createIFrame=function(){var d=this.id+"_iFrame";var a;if(OpenLayers.Util.getBrowserName()=="msie"){a=OpenLayers._document.createElement('<iframe name="'+d+'">');a.style.backgroundColor="#FFFFFF";a.style.filter="chroma(color=#FFFFFF)"}else{a=OpenLayers._document.createElement("iframe");a.style.backgroundColor="transparent";a.name=d}a.id=d;a.scrolling="no";a.marginWidth="0px";a.marginHeight="0px";a.frameBorder="0";OpenLayers.Util.modifyDOMElement(a,d,new OpenLayers.Pixel(0,0),this.layer.getImageSize(),"absolute");var b=function(){this.show();if(this.isLoading){this.isLoading=false;this.events.triggerEvent("loadend")}};OpenLayers.Event.observe(a,"load",OpenLayers.Function.bind(b,this));return a};OpenLayers.Tile.Image.IFrame.prototype.createRequestForm=function(){var b=OpenLayers._document.createElement("form");b.method="POST";var g=this.layer.params._OLSALT;g=(g?g+"_":"")+this.bounds.toBBOX();b.action=OpenLayers.Util.urlAppend(this.layer.url,g);this.imgDiv.insertBefore(this.createIFrame(),this.imgDiv.firstChild);b.target=this.id+"_iFrame";var d=this.layer.getImageSize();var f=OpenLayers.Util.extend({BBOX:this.encodeBBOX?this.bounds.toBBOX():this.bounds.toArray(),WIDTH:d.w,HEIGHT:d.h},this.layer.params);for(var a in f){var e=b.ownerDocument.createElement("input");e.type="hidden";e.name=a;e.value=f[a];b.appendChild(e)}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 h=d.featureType;if(!(d.featureType&&(d.featureType instanceof Array))){var h=[d.featureType]}var f=OpenLayers.Util.extend(d,{});for(var e=0,a=h.length;e<a;e++){f.featureType=h[e];var b=new OpenLayers.Protocol.Response({requestType:"read"});var g=OpenLayers.Format.XML.prototype.write.apply(this.format,[this.format.writeNode("wfs:GetFeature",f)]);b.priv=OpenLayers.Request.POST({url:f.url,callback:this.createCallback(this.handleRead,b,f),params:f.params,headers:f.headers,data:g})}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 h=(!r&&!this.tile.bounds.containsBounds(a));if(b||r||(!u&&h)){var d=a.getCenterLonLat();var q=a.getWidth()*this.ratio;var j=a.getHeight()*this.ratio;var o=new OpenLayers.Bounds(d.lon-(q/2),d.lat-(j/2),d.lon+(q/2),d.lat+(j/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 e=this.getFullRequestString();var g=null;var f=this.params.filter||this.params.FILTER;if(f){g={FILTER:f}}else{g={BBOX:this.encodeBBOX?o.toBBOX():o.toArray()}}if(this.map){var w=o.clone();w.transform(this.map.getProjection(),this.getNativeProjection());if(!f){g.BBOX=this.encodeBBOX?w.toBBOX():w.toArray()}}e+="&"+OpenLayers.Util.getParameterString(g);if(!this.tile){this.tile=new OpenLayers.Tile.WFS(this,p,o,e,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,e,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(j){if(OpenLayers.Layer.prototype.changeBaseLayer.apply(this,arguments)===false){return false}if(!this.isBaseLayer){var a=this.getCompatibleProjection(j.layer);if(a!=null){this.addOptions({projection:a.clone()})}var o=j.baseLayer?j.baseLayer.getNativeProjection():null;var g=this.map.getProjection();var h=this.getVisibility();if(h){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=g.clone();this.formatOptions.internalProjection=g.clone();this.formatObject.internalProjection=g.clone();for(var e=0,d=this.features.length;e<d;e++){var q=this.features[e];q.geometry.transform(o,g);if(q.popup&&q.popup.lonlat){q.popup.hide();q.popup.lonlat.transform(o,g)}}}else{for(var e=0,f=this.markers.length;e<f;e++){var b=this.markers[e];b.lonlat.transform(o,g)}}if(h){this.setVisibility(true)}}return true};OpenLayers.Layer.WFS.prototype.getCompatibleProjection=function(f){var e=OpenLayers.Layer.prototype.getCompatibleProjection.apply(this,arguments);if(e!=null){return e}f=f||this.map.baseLayer;var g=f.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)){e=new OpenLayers.Projection(b)}else{e=b}if(e.isCompatibleWith(g)){return e}e=null}}return null};OpenLayers.Control.GetFeature.prototype.polygon=false;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.selectClick},this.handlerOptions.click||{})}if(this.box){this.handlers.box=new OpenLayers.Handler.Box(this,{done:this.selectBox},OpenLayers.Util.extend(this.handlerOptions.box,{boxDivClassName:"olHandlerBoxSelectFeature"}))}if(this.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.selectBox=function(a){var d;if(a instanceof OpenLayers.Bounds){var e=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(e.lon,e.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.request=function(e,b){b=b||{};var d=new OpenLayers.Filter.Spatial({type:this.filterType,value:e,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?e.clone().transform(this.map.getProjection(),this.srs):e).getBounds(),projection:(this.srs||this.map.getProjection()).getCode()}),d]})}OpenLayers.Element.addClass(this.map.viewPortDiv,"olCursorWait");var a=this.protocol.read({maxFeatures:b.single==true?this.maxFeatures:undefined,filter:d,callback:function(f){if(f.success()){if(f.features.length){if(b.single==true){var g=(e instanceof OpenLayers.Bounds?e:e.getBounds()).getCenterLonLat();this.selectBestFeature(f.features,g,b)}else{this.select(f.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.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={VERSION_NUMBER:"Geoportal 1.2 Extended; publicationDate=2010-1x-yy",singleFile:true,_getScriptLocation:(function(){var g="";var d=new RegExp("(^|(.*?\\/))(GeoportalExtended?.js)(\\?|$)");var b=document.documentElement.getElementsByTagName("script");for(var f=0,a=b.length;f<a;f++){var h=b[f].getAttribute("src");if(h){var e=h.match(d);if(e){g=e[1];break}}}return(function(){return g})})()};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 e=Geoportal.Lang[d];if(!e){e={}}e[a]=b[a][d]}}}}},translate:function(b,a){var e=Geoportal.Lang[OpenLayers.Lang.getCode()];var d=e[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.","url.error":"Error when loading '${url}' ${msg}","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","gpControlCSW.title":"Search in the geocatalogue","gpControlCSW.cswTitle":"Title : ","gpControlCSW.cswTitle.help":" ","gpControlCSW.cswKeyWords":"KeyWords : ","gpControlCSW.cswKeyWords.help":" ","gpControlCSW.cswKeyWords.NoKeyWords":" ","gpControlCSW.cswKeyWords.Addresses":"Addresses","gpControlCSW.cswKeyWords.AdministrativeUnits":"Administrative units","gpControlCSW.cswKeyWords.Agricultural":"Agricultural and aquaculture facilities","gpControlCSW.cswKeyWords.RegulationZones":"Area management/restriction/regulation zones and reporting units","gpControlCSW.cswKeyWords.Atmospheric":"Atmospheric conditions","gpControlCSW.cswKeyWords.BioGeographical":"Bio-geographical regions","gpControlCSW.cswKeyWords.Buildings":"Buildings","gpControlCSW.cswKeyWords.Cadastral":"Cadastral parcels","gpControlCSW.cswKeyWords.CoordinateSystems":"Coordinate reference systems","gpControlCSW.cswKeyWords.Elevation":"Elevation","gpControlCSW.cswKeyWords.Energy":"Energy resources","gpControlCSW.cswKeyWords.EnvironmentalFacilities":"Environmental monitoring facilities","gpControlCSW.cswKeyWords.GeographicalSystems":"Geographical grid systems","gpControlCSW.cswKeyWords.GeographicalNames":"Geographical names","gpControlCSW.cswKeyWords.Geology":"Geology","gpControlCSW.cswKeyWords.Habitats":"Habitats and biotopes","gpControlCSW.cswKeyWords.HumanHealth":"Human health and safety","gpControlCSW.cswKeyWords.Hydrography":"Hydrography","gpControlCSW.cswKeyWords.LandCover":"Land cover","gpControlCSW.cswKeyWords.LandUse":"Land use","gpControlCSW.cswKeyWords.Meteorological":"Meteorological geographical features","gpControlCSW.cswKeyWords.Mineral":"Mineral resources","gpControlCSW.cswKeyWords.NaturalRiskZones":"Natural risk zones","gpControlCSW.cswKeyWords.Oceanographic":"Oceanographic geographical features","gpControlCSW.cswKeyWords.Orthoimagery":"Orthoimagery","gpControlCSW.cswKeyWords.Population":"Population distribution — Demography","gpControlCSW.cswKeyWords.Production":"Production and industrial facilities","gpControlCSW.cswKeyWords.ProtectedSites":"Protected sites","gpControlCSW.cswKeyWords.SeaRegions":"Sea regions","gpControlCSW.cswKeyWords.Soil":"Soil","gpControlCSW.cswKeyWords.SpeciesDistribution":"Species distribution","gpControlCSW.cswKeyWords.StatisticalUnits":"Statistical units","gpControlCSW.cswKeyWords.TransportNetworks":"Transport networks","gpControlCSW.cswKeyWords.UtilityServices":"Utility and governmental services","gpControlCSW.cswOrganism":"Organism : ","gpControlCSW.cswOrganism.help":" ","gpControlCSW.button.cancel":"Cancel","gpControlCSW.button.search":"Search","gpControlCSW.cswBBOX":"BBOX","gpControlCSW.cswNoBBOX":"World extent","gpControlCSW.cswNoBBOX.help":" ","gpControlCSW.cswCurrentBBOX":"Current extent","gpControlCSW.cswCurrentBBOX.help":" ","gpControlCSW.cswPersonnalBBOX":"Select an extent","gpControlCSW.cswPersonnalBBOX.help":" ","gpControlPageManager.button.previous":"<","gpControlPageManager.button.next":">","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","gpControlPrintMap.title":"Map's printing preview","gpControlPrintMap.comments":"Your notes or comments","approx.scale":"Approximate scale: 1:","approx.center":"Geographical coordinates of the center of the map","gpControlPrintMap.print.forbidden":"All rights reserved","gpControlPrintMap.print":"Print",gpControlInformationMini:"Click to get informations panel visible","OpenLayers.Control.WMSGetFeatureInfo.title":"Objects identification","lus.not.match":"No match found","csw.not.match":"No metadata record 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.","url.error":"Erreur au chargement de '${url}' ${msg}","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","gpControlCSW.title":"Rechercher dans le géocatalogue","gpControlCSW.cswTitle":"Titre : ","gpControlCSW.cswTitle.help":" ","gpControlCSW.cswKeyWords":"Mot-clés : ","gpControlCSW.cswKeyWords.help":" ","gpControlCSW.cswKeyWords.NoKeyWords":" ","gpControlCSW.cswKeyWords.Addresses":"Adresses","gpControlCSW.cswKeyWords.AdministrativeUnits":"Unités administratives","gpControlCSW.cswKeyWords.Agricultural":"Installations agricoles et aquacoles","gpControlCSW.cswKeyWords.RegulationZones":"Zones de gestion, de restriction ou de réglementation et unités de déclaration","gpControlCSW.cswKeyWords.Atmospheric":"Conditions atmosphériques","gpControlCSW.cswKeyWords.BioGeographical":"Régions biogéographiques","gpControlCSW.cswKeyWords.Buildings":"Bâtiments","gpControlCSW.cswKeyWords.Cadastral":"Parcelles cadastrales","gpControlCSW.cswKeyWords.CoordinateSystems":"Référentiels de coordonnées","gpControlCSW.cswKeyWords.Elevation":"Altitude","gpControlCSW.cswKeyWords.Energy":"Sources d'énergie","gpControlCSW.cswKeyWords.EnvironmentalFacilities":"Installations de suivi environnemental","gpControlCSW.cswKeyWords.GeographicalSystems":"Systèmes de maillage géographique","gpControlCSW.cswKeyWords.GeographicalNames":"Dénominations géographiques","gpControlCSW.cswKeyWords.Geology":"Géologie","gpControlCSW.cswKeyWords.Habitats":"Habitats et biotopes","gpControlCSW.cswKeyWords.HumanHealth":"Santé et sécurité des personnes","gpControlCSW.cswKeyWords.Hydrography":"Hydrographie","gpControlCSW.cswKeyWords.LandCover":"Occupation des terres","gpControlCSW.cswKeyWords.LandUse":"Usage des sols","gpControlCSW.cswKeyWords.Meteorological":"Caractéristiques géographiques météorologiques","gpControlCSW.cswKeyWords.Mineral":"Ressources minérales","gpControlCSW.cswKeyWords.NaturalRiskZones":"Zones à risque naturel","gpControlCSW.cswKeyWords.Oceanographic":"Caractéristiques géographiques océanographiques","gpControlCSW.cswKeyWords.Orthoimagery":"Ortho-imagerie","gpControlCSW.cswKeyWords.Population":"Répartition de la population — Démographie","gpControlCSW.cswKeyWords.Production":"Lieux de production et sites industriels","gpControlCSW.cswKeyWords.ProtectedSites":"Sites protégés","gpControlCSW.cswKeyWords.SeaRegions":"Régions maritimes","gpControlCSW.cswKeyWords.Soil":"Sols","gpControlCSW.cswKeyWords.SpeciesDistribution":"Répartition des espèces","gpControlCSW.cswKeyWords.StatisticalUnits":"Unités statistiques","gpControlCSW.cswKeyWords.TransportNetworks":"Réseaux de transport","gpControlCSW.cswKeyWords.UtilityServices":"Services d'utilité publique et services publics","gpControlCSW.cswOrganism":"Organisme : ","gpControlCSW.cswOrganism.help":" ","gpControlCSW.button.cancel":"Annuler","gpControlCSW.button.search":"Rechercher","gpControlCSW.cswBBOX":"Emprise : ","gpControlCSW.cswNoBBOX":"Mondiale","gpControlCSW.cswNoBBOX.help":" ","gpControlCSW.cswCurrentBBOX":"Emprise courante","gpControlCSW.cswCurrentBBOX.help":" ","gpControlCSW.cswPersonnalBBOX":"Sélectionner une emprise","gpControlCSW.cswPersonnalBBOX.help":" ","gpControlPageManager.button.previous":"<","gpControlPageManager.button.next":">","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","gpControlPrintMap.title":"Aperçu de la carte avant impression","gpControlPrintMap.comments":"Vos notes ou commentaires","approx.scale":"Échelle approximative: 1:","approx.center":"Coordonnées géographiques du centre de la carte","gpControlPrintMap.print.forbidden":"Tous droits réservés","gpControlPrintMap.print":"Imprimer",gpControlInformationMini:"Cliquer pour rendre visible les informations","OpenLayers.Control.WMSGetFeatureInfo.title":"Identifier les objets","lus.not.match":"Pas de correspondance trouvée","csw.not.match":"Pas de fiche de métadonnées 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.","url.error":"Fehler beim Laden '${url}' ${msg}","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","gpControlCSW.title":"Rechercher dans le géocatalogue","gpControlCSW.cswTitle":"Titre : ","gpControlCSW.cswTitle.help":" ","gpControlCSW.cswKeyWords":"Keywords : ","gpControlCSW.cswKeyWords.help":" ","gpControlCSW.cswKeyWords.NoKeyWords":" ","gpControlCSW.cswKeyWords.Addresses":"Adressen","gpControlCSW.cswKeyWords.AdministrativeUnits":"Verwaltungseinheiten","gpControlCSW.cswKeyWords.Agricultural":"Landwirtschaftliche Anlagen und Aquakulturanlagen","gpControlCSW.cswKeyWords.RegulationZones":"Bewirtschaftungsgebiete/Schutzgebiete/geregelte Gebiete und Berichterstattungseinheiten","gpControlCSW.cswKeyWords.Atmospheric":"Atmosphärische Bedingungen","gpControlCSW.cswKeyWords.BioGeographical":"Biogeografische Regionen","gpControlCSW.cswKeyWords.Buildings":"Gebäude","gpControlCSW.cswKeyWords.Cadastral":"Flurstücke/Grundstücke (Katasterparzellen)","gpControlCSW.cswKeyWords.CoordinateSystems":"Koordinatenreferenzsysteme","gpControlCSW.cswKeyWords.Elevation":"Höhe","gpControlCSW.cswKeyWords.Energy":"Energiequellen","gpControlCSW.cswKeyWords.EnvironmentalFacilities":"Umweltüberwachung","gpControlCSW.cswKeyWords.GeographicalSystems":"Geografische Gittersysteme","gpControlCSW.cswKeyWords.GeographicalNames":"Geografische Bezeichnungen","gpControlCSW.cswKeyWords.Geology":"Geologie","gpControlCSW.cswKeyWords.Habitats":"Lebensräume und Biotope","gpControlCSW.cswKeyWords.HumanHealth":"Gesundheit und Sicherheit","gpControlCSW.cswKeyWords.Hydrography":"Gewässernetz","gpControlCSW.cswKeyWords.LandCover":"Bodenbedeckung","gpControlCSW.cswKeyWords.LandUse":"Bodennutzung","gpControlCSW.cswKeyWords.Meteorological":"Meteorologisch-geografische Kennwerte","gpControlCSW.cswKeyWords.Mineral":"Mineralische Bodenschätze","gpControlCSW.cswKeyWords.NaturalRiskZones":"Gebiete mit naturbedingten Risiken","gpControlCSW.cswKeyWords.Oceanographic":"Ozeanografisch-geografische Kennwerte","gpControlCSW.cswKeyWords.Orthoimagery":"Orthofotografie","gpControlCSW.cswKeyWords.Population":"Verteilung der Bevölkerung — Demografie","gpControlCSW.cswKeyWords.Production":"Produktions- und Industrieanlagen","gpControlCSW.cswKeyWords.ProtectedSites":"Schutzgebiete","gpControlCSW.cswKeyWords.SeaRegions":"Meeresregionen","gpControlCSW.cswKeyWords.Soil":"Boden","gpControlCSW.cswKeyWords.SpeciesDistribution":"Verteilung der Arten","gpControlCSW.cswKeyWords.StatisticalUnits":"Statistische Einheiten","gpControlCSW.cswKeyWords.TransportNetworks":"Verkehrsnetze","gpControlCSW.cswKeyWords.UtilityServices":"Versorgungswirtschaft und staatliche Dienste","gpControlCSW.cswOrganism":"Organisme : ","gpControlCSW.cswOrganism.help":" ","gpControlCSW.button.cancel":"Abbrechen","gpControlCSW.button.search":"Suchen","gpControlCSW.cswBBOX":"BBOX","gpControlCSW.cswNoBBOX":"Mondiale","gpControlCSW.cswNoBBOX.help":" ","gpControlCSW.cswCurrentBBOX":"Emprise courante","gpControlCSW.cswCurrentBBOX.help":" ","gpControlCSW.cswPersonnalBBOX":"Sélectionner une emprise","gpControlCSW.cswPersonnalBBOX.help":" ","gpControlPageManager.button.previous":"<","gpControlPageManager.button.next":">","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","gpControlPrintMap.title":"Druck-Vorschau anzeigen","gpControlPrintMap.comments":"Ihre Anmerkungen oder Kommentare","approx.scale":"Ungefähren Maßstab: 1:","approx.center":"Geographische Koordinaten der Mitte der Karte","gpControlPrintMap.print.forbidden":"All rights reserved","gpControlPrintMap.print":"Drucken",gpControlInformationMini:"Klicken Sie auf Informationen Virenwarnung sichtbar","OpenLayers.Control.WMSGetFeatureInfo.title":"Identifikation von Objekten","lus.not.match":"Es konnte keine übereinstimmung gefunden werden","csw.not.match":"keine Metadaten Datensatz gefunden","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.","url.error":"Error al cargar '${url}' ${msg}","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","gpControlCSW.title":"Buscar en el geocatálogo","gpControlCSW.cswTitle":"Título : ","gpControlCSW.cswTitle.help":" ","gpControlCSW.cswKeyWords":"Palabras clave : ","gpControlCSW.cswKeyWords.help":" ","gpControlCSW.cswKeyWords.NoKeyWords":" ","gpControlCSW.cswKeyWords.Addresses":"Direcciones","gpControlCSW.cswKeyWords.AdministrativeUnits":"Unidades administrativas","gpControlCSW.cswKeyWords.Agricultural":"Instalaciones agrícolas y de acuicultura","gpControlCSW.cswKeyWords.RegulationZones":"Zonas sujetas a ordenación, a restricciones o reglamentaciones y unidades de notificación","gpControlCSW.cswKeyWords.Atmospheric":"Condiciones atmosféricas","gpControlCSW.cswKeyWords.BioGeographical":"Regiones biogeográficas","gpControlCSW.cswKeyWords.Buildings":"Edificios","gpControlCSW.cswKeyWords.Cadastral":"Parcelas catastrales","gpControlCSW.cswKeyWords.CoordinateSystems":"Sistemas de coordenadas de referencia","gpControlCSW.cswKeyWords.Elevation":"Elevaciones","gpControlCSW.cswKeyWords.Energy":"Recursos energéticos","gpControlCSW.cswKeyWords.EnvironmentalFacilities":"Instalaciones de observación del medio ambiente","gpControlCSW.cswKeyWords.GeographicalSystems":"Sistema de cuadrículas geográficas","gpControlCSW.cswKeyWords.GeographicalNames":"Nombres geográficos","gpControlCSW.cswKeyWords.Geology":"Geología","gpControlCSW.cswKeyWords.Habitats":"Hábitats y biotopos","gpControlCSW.cswKeyWords.HumanHealth":"Salud y seguridad humanas","gpControlCSW.cswKeyWords.Hydrography":"Hidrografía","gpControlCSW.cswKeyWords.LandCover":"Cubierta terrestre","gpControlCSW.cswKeyWords.LandUse":"Uso del suelo","gpControlCSW.cswKeyWords.Meteorological":"Aspectos geográficos de carácter meteorológico","gpControlCSW.cswKeyWords.Mineral":"Recursos minerales","gpControlCSW.cswKeyWords.NaturalRiskZones":"Zonas de riesgos naturales","gpControlCSW.cswKeyWords.Oceanographic":"Rasgos geográficos oceanográficos","gpControlCSW.cswKeyWords.Orthoimagery":"Ortoimágenes","gpControlCSW.cswKeyWords.Population":"Distribución de la población — Demografía","gpControlCSW.cswKeyWords.Production":"Instalaciones de producción e industriales","gpControlCSW.cswKeyWords.ProtectedSites":"Lugares protegidos","gpControlCSW.cswKeyWords.SeaRegions":"Regiones marinas","gpControlCSW.cswKeyWords.Soil":"Suelo","gpControlCSW.cswKeyWords.SpeciesDistribution":"Distribución de las especies","gpControlCSW.cswKeyWords.StatisticalUnits":"Unidades estadísticas","gpControlCSW.cswKeyWords.TransportNetworks":"Redes de transporte","gpControlCSW.cswKeyWords.UtilityServices":"Servicios de utilidad pública y estatales","gpControlCSW.cswOrganism":"Organismo : ","gpControlCSW.cswOrganism.help":" ","gpControlCSW.button.cancel":"Cancelar","gpControlCSW.button.search":"Buscar","gpControlCSW.cswBBOX":"BBOX","gpControlCSW.cswNoBBOX":"Mondiale","gpControlCSW.cswNoBBOX.help":" ","gpControlCSW.cswCurrentBBOX":"Emprise courante","gpControlCSW.cswCurrentBBOX.help":" ","gpControlCSW.cswPersonnalBBOX":"Sélectionner une emprise","gpControlCSW.cswPersonnalBBOX.help":" ","gpControlPageManager.button.previous":"<","gpControlPageManager.button.next":">","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","gpControlPrintMap.title":"Vista previa de impresión del mapa","gpControlPrintMap.comments":"Tus notas o comentarios","approx.scale":"Escala aproximada: 1:","approx.center":"Coordenadas geográficas del centro del mapa","gpControlPrintMap.print.forbidden":"Todos los derechos reservados","gpControlPrintMap.print":"Imprimir",gpControlInformationMini:"Haga clic para obtener la información del panel visible","OpenLayers.Control.WMSGetFeatureInfo.title":"La identificación de los objetos","lus.not.match":"No se ha encontrado ninguna correspondencia","csw.not.match":"No encontró registro de metadatos","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.","url.error":"Errore durante il caricamento '${url}' ${msg}","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","gpControlCSW.title":"Cercare nel geocatalogo","gpControlCSW.cswTitle":"Titolo : ","gpControlCSW.cswTitle.help":" ","gpControlCSW.cswKeyWords":"Descrittore : ","gpControlCSW.cswKeyWords.help":" ","gpControlCSW.cswKeyWords.NoKeyWords":" ","gpControlCSW.cswKeyWords.Addresses":"Indirizzi","gpControlCSW.cswKeyWords.AdministrativeUnits":"Unità amministrative","gpControlCSW.cswKeyWords.Agricultural":"Impianti agricoli e di acquacoltura","gpControlCSW.cswKeyWords.RegulationZones":"Zone sottoposte a gestione/limitazioni/regolamentazione e unità con obbligo di comunicare dati","gpControlCSW.cswKeyWords.Atmospheric":"Condizioni atmosferiche","gpControlCSW.cswKeyWords.BioGeographical":"Regioni biogeografiche","gpControlCSW.cswKeyWords.Buildings":"Edifici","gpControlCSW.cswKeyWords.Cadastral":"Parcelle catastali","gpControlCSW.cswKeyWords.CoordinateSystems":"Sistemi di coordinate","gpControlCSW.cswKeyWords.Elevation":"Elevazione","gpControlCSW.cswKeyWords.Energy":"Risorse energetiche","gpControlCSW.cswKeyWords.EnvironmentalFacilities":"Impianti di monitoraggio ambientale","gpControlCSW.cswKeyWords.GeographicalSystems":"Sistemi di griglie geografiche","gpControlCSW.cswKeyWords.GeographicalNames":"Nomi geografici","gpControlCSW.cswKeyWords.Geology":"Geologia","gpControlCSW.cswKeyWords.Habitats":"Habitat e biotopi","gpControlCSW.cswKeyWords.HumanHealth":"Salute umana e sicurezza","gpControlCSW.cswKeyWords.Hydrography":"Idrografia","gpControlCSW.cswKeyWords.LandCover":"Copertura del suolo","gpControlCSW.cswKeyWords.LandUse":"Utilizzo del territorio","gpControlCSW.cswKeyWords.Meteorological":"Elementi geografici meteorologici","gpControlCSW.cswKeyWords.Mineral":"Risorse minerarie","gpControlCSW.cswKeyWords.NaturalRiskZones":"Zone a rischio naturale","gpControlCSW.cswKeyWords.Oceanographic":"Elementi geografici oceanografici","gpControlCSW.cswKeyWords.Orthoimagery":"Orto immagini","gpControlCSW.cswKeyWords.Population":"Distribuzione della popolazione — Demografia","gpControlCSW.cswKeyWords.Production":"Produzione e impianti industriali","gpControlCSW.cswKeyWords.ProtectedSites":"Siti protetti","gpControlCSW.cswKeyWords.SeaRegions":"Regioni marine","gpControlCSW.cswKeyWords.Soil":"Suolo","gpControlCSW.cswKeyWords.SpeciesDistribution":"Distribuzione delle specie","gpControlCSW.cswKeyWords.StatisticalUnits":"Unità statistiche","gpControlCSW.cswKeyWords.TransportNetworks":"Reti di trasporto","gpControlCSW.cswKeyWords.UtilityServices":"Servizi di pubblica utilità e servizi amministrativi","gpControlCSW.cswOrganism":"Organismo : ","gpControlCSW.cswOrganism.help":" ","gpControlCSW.button.cancel":"Annullare","gpControlCSW.button.search":"Ricercare","gpControlCSW.cswBBOX":"Emprise : ","gpControlCSW.cswNoBBOX":"Mondiale","gpControlCSW.cswNoBBOX.help":" ","gpControlCSW.cswCurrentBBOX":"Emprise courante","gpControlCSW.cswCurrentBBOX.help":" ","gpControlCSW.cswPersonnalBBOX":"Sélectionner une emprise","gpControlCSW.cswPersonnalBBOX.help":" ","gpControlPageManager.button.previous":"<","gpControlPageManager.button.next":">","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","gpControlPrintMap.title":"Anteprima di stampa della mappa","gpControlPrintMap.comments":"Le note o commenti","approx.scale":"Dimensioni approssimative:","approx.center":"Coordinate geografiche del centro della mappa","gpControlPrintMap.print.forbidden":"Tutti i diritti riservati","gpControlPrintMap.print":"Stampa",gpControlInformationMini:"Fare clic per ottenere informazioni pannello visibile","OpenLayers.Control.WMSGetFeatureInfo.title":"Identificare gli oggetti","lus.not.match":"Non trovata nessuna corrispondenza","csw.not.match":"Trovato alcuna traccia dei metadati","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,e){if(!d){return["",""]}if(!e){e=[]}e.unshift("styleUrl");var f='<table border="1" cellspacing="0" cellpadding="0">';var b="";for(var a in d.attributes){if(d.attributes.hasOwnProperty(a)&&(OpenLayers.Array.filter(e,function(g){return new RegExp("^"+a+"$","i").test(g)})).length==0){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.Control.mapMouseOut=function(a){if(this.map&&this.map.events){this.map.events.triggerEvent("mapmouseout");if(a!=null){OpenLayers.Event.stop(a)}}};Geoportal.Control.mapMouseOver=function(a){if(this.map&&this.map.events){this.map.events.triggerEvent("mapmouseover");if(a!=null){OpenLayers.Event.stop(a)}}};Geoportal.Control.PageManager=OpenLayers.Class(Geoportal.Control,{previousButton:null,nextButton:null,currentPage:1,callback:null,nbPages:0,initialize:function(d,a,e,b){Geoportal.Control.prototype.initialize.apply(this,[b]);this.nbPages=a;this.callback=e},destroy:function(){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)){this.displayDiv();return true}return false},displayDiv:function(){var d=this.div.ownerDocument.createElement("div");d.id="PageManager"+this.id;d.className="gpPages";var b=this.div.ownerDocument.createElement("span");this.previousButton=this.buildButton(b,"previous",this.callback);OpenLayers.Event.observe(this.previousButton,"click",OpenLayers.Function.bind(this.previousPage,this,this.previousButton));if(this.currentPage==1){this.previousButton.disabled=true}else{this.previousButton.disabled=false}var a=this.div.ownerDocument.createElement("span");a.id="label"+this.id;a.innerHTML=this.currentPage+" /"+this.nbPages;b.appendChild(a);this.nextButton=this.buildButton(b,"next",this.callback);OpenLayers.Event.observe(this.nextButton,"click",OpenLayers.Function.bind(this.nextPage,this,this.nextButton));if(this.currentPage==this.nbPages){this.nextButton.disabled=true}else{this.nextButton.disabled=false}d.appendChild(b);this.div.appendChild(d)},previousPage:function(){this.currentPage=this.currentPage-1;if(this.currentPage==1){this.previousButton.disabled=true}else{this.previousButton.disabled=false}this.nextButton.disabled=false;OpenLayers.Util.getElement("label"+this.id).innerHTML=this.currentPage+" /"+this.nbPages},nextPage:function(){this.currentPage=this.currentPage+1;if(this.currentPage==this.nbPages){this.nextButton.disabled=true}else{this.nextButton.disabled=false}this.previousButton.disabled=false;OpenLayers.Util.getElement("label"+this.id).innerHTML=this.currentPage+" /"+this.nbPages},deactivate:function(){if(Geoportal.Control.prototype.deactivate.apply(this,arguments)){this.div.ownerDocument.getElementById("PageManager"+this.id).innerHTML="";return true}return false},buildButton:function(f,a,b){var d;d=this.div.ownerDocument.createElement("input");d.className=this.displayClass+"Button";d.type="button";d.id=a+this.id;d.name=d.id;d.value=OpenLayers.i18n(this.displayClass+".button."+a);if(b){OpenLayers.Event.observe(d,"click",OpenLayers.Function.bind(b,this,d))}f.appendChild(d);return d},CLASS_NAME:"Geoportal.Control.PageManager"});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,{clone:function(a){if(a==null){a=new Geoportal.Layer(this.name,this.getOptions())}a=OpenLayers.Layer.prototype.clone.apply(this,[a]);return a},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 e;for(var d=0,a=this.layers.length;d<a;d++){e=this.layers[d];e.map.removeLayer(this.layers[d],false)}}},clone:function(){var a=Geoportal.Layer.prototype.clone.apply(this,arguments);a.addLayers(this.layers)},setMap:function(f){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){f.addLayer(d)}}var e=this.maxExtent==null;Geoportal.Layer.prototype.setMap.apply(this,arguments);if(e){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(e){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 f,e;for(var d=0,a=this.layers.length;d<a;d++){f=this.layers[d];if(f.isBaseLayer){continue}if(f.territory!==undefined&&this.map.baseLayer.territory!==undefined){if(f.territory==this.map.baseLayer.territory){f.setVisibility(b)}continue}e=f.getNativeProjection();if(!e){continue}if(!(e.equals(this.map.baseLayer.nativeProjection)||(e.getProjName()=="longlat"&&e.isCompatibleWith(this.map.baseLayer.getNativeProjection())))){continue}if(this.map.baseLayer.maxExtent.intersectsBounds(f.restrictedExtent||f.maxExtent)){f.setVisibility(b)}}}if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"visibility"})}this.events.triggerEvent("visibilitychanged")}},display:function(e){var f=this.calculateInRange();if(e!=(this.div.style.display!="none")){this.div.style.display=(e&&f)?"block":"none";if(this.layers){var d;for(var b=0,a=this.layers.length;b<a;b++){d=this.layers[b];d.display(e)}}}},initResolutions:function(){if(this.layers){var f;var d=typeof(this.options.minZoomLevel)=="number";var b=typeof(this.options.maxZoomLevel)=="number";for(var e=0,a=this.layers.length;e<a;e++){f=this.layers[e];if(e==0){if(!d&&typeof(f.minZoomLevel)=="number"){this.options.minZoomLevel=f.minZoomLevel}if(!b&&typeof(f.maxZoomLevel)=="number"){this.options.maxZoomLevel=f.maxZoomLevel}}else{if(!d&&typeof(f.minZoomLevel)=="number"){this.options.minZoomLevel=Math.min(this.options.minZoomLevel,f.minZoomLevel)}if(!b&&typeof(f.maxZoomLevel)=="number"){this.options.maxZoomLevel=Math.max(this.options.maxZoomLevel,f.maxZoomLevel)}}}}Geoportal.Layer.prototype.initResolutions.apply(this,arguments)},getDataExtent:function(){var e=null;if(this.layers){var d;for(var b=0,a=this.layers.length;b<a;b++){d=this.layers[b];if(b==0){e=d.getDataExtent()}else{e.extend(d.getDataExtent())}}}return e},setOpacity:function(b){if(b!=this.opacity){Geoportal.Layer.prototype.setOpacity.apply(this,arguments);if(this.layers){var e;for(var d=0,a=this.layers.length;d<a;d++){e=this.layers[d];e.setOpacity(b)}}}},setZIndex:function(e){this.div.style.zIndex=e;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(e-b-1)}}}},addLayer:function(e){var b;for(var d=0,a=this.layers.length;d<a;d++){b=this.layers[d];if(b==e){var f=OpenLayers.i18n("layerAlreadyAdded",{layerName:e.name});OpenLayers.Console.warn(f);return}}if(e.aggregate){var f=OpenLayers.i18n("layerAlreadyAdded",{layerName:e.name});OpenLayers.Console.warn(f);return}e.displayInLayerSwitcher=false;e.visibility=this.visibility;if(typeof(e.minZoomLevel)=="number"&&typeof(this.minZoomLevel)=="number"&&e.minZoomLevel<this.minZoomLevel){e.minZoomLevel=this.minZoomLevel;if(e.resolutions){e.maxResolution=e.resolutions[e.minZoomLevel];e.maxScale=e.scales[e.minZoomLevel]}}if(typeof(e.maxZoomLevel)=="number"&&typeof(this.maxZoomLevel)=="number"&&this.maxZoomLevel<e.maxZoomLevel){e.maxZoomLevel=this.maxZoomLevel;if(e.resolutions){e.minResolution=e.resolutions[e.maxZoomLevel];e.minScale=e.scales[e.maxZoomLevel]}}e.aggregate=this;this.layers.push(e);if(this.map){if(e.map==null){this.map.addLayer(e)}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,f,j,e,a,g,m){if(b==null){b=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")}this.id=b;this.lonlat=f;this.contentSize=(j!=null?j:new OpenLayers.Size(OpenLayers.Popup.WIDTH,OpenLayers.Popup.HEIGHT));if(e!=null){this.contentHTML=e}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 h=this.div.id+"_contentDiv";this.contentDiv=OpenLayers.Util.createDiv(h,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(g)}this.registerEvents();if(this.feature&&this.feature.layer){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,g,f){if(d){g=g||"pointer";if(d.style){d.style.cursor=g}else{if(d.layer){if(d.layer.style){d.layer.style.cursor=g}else{if(!d.layer.styleMap){d.layer.styleMap=new OpenLayers.StyleMap()}if(!f){f=[];for(var e in d.layer.styleMap.styles){f.push(e)}}for(var b=0,a=f.length;b<a;b++){var e=d.layer.styleMap.styles[f[b]];if(e){d.layer.styleMap.styles[f[b]]=e.clone();d.layer.styleMap.styles[f[b]].defaultStyle.cursor=g}}}}else{d.style=OpenLayers.Util.applyDefaults({cursor:g},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 g=this.feature;var a=this.feature.layer.map.getControlsByClass(/^.*\.Control\.SelectFeature$/);for(var d=0,p=a.length;d<p;d++){var h=a[d];if(!h.active){continue}var e=h.layers||[h.layer];for(var b=0,m=e.length;b<m;b++){if(e[b]==g.layer){h.unselect(g)}}}}};Geoportal.Popup.defaultIcon=function(){var a=Geoportal.Util.getImagesLocation()+"xy-target.png";var b=new OpenLayers.Size(26,26);var d=function(e){return new OpenLayers.Pixel(-(e.w/2),-(e.h/2))};return new OpenLayers.Icon(a,b,null,d)};Geoportal.Tile=OpenLayers.Class(OpenLayers.Tile,{CLASS_NAME:"Geoportal.Tile"});Geoportal.Util={_imagesLocation:null,getImagesLocation:function(){if(!Geoportal.Util._imagesLocation){Geoportal.Util._imagesLocation=Geoportal._getScriptLocation()+"theme/geoportal/img/"}return Geoportal.Util._imagesLocation},setTheme:function(a){if(!a){a="geoportal"}Geoportal.Util._imagesLocation=Geoportal._getScriptLocation()+"theme/"+a+"/img/"},convertToPixels:function(e,a,f){if(!e){return undefined}if(a==undefined){a=false}if(/px$/.test(e)){return parseInt(e)}var d=OpenLayers._document.createElement("div");d.style.display="";d.style.visibility="hidden";d.style.position="absolute";d.style.lineHeight="0";if(!f){f=OpenLayers._document.body}if(/%$/.test(e)){f=f.parentNode||f;d.style[a?"width":"height"]=e}else{d.style.borderStyle="solid";if(a){d.style.borderBottomHeight="0";d.style.borderTopHeight=e}else{d.style.borderBottomWidth="0";d.style.borderTopWidth=e}}f.appendChild(d);var b=a?d.offsetWidth:d.offsetHeight;f.removeChild(d);return b},getComputedStyle:function(g,h,b){var a;if(g.currentStyle){a=g.currentStyle[OpenLayers.String.camelize(h)]}else{if(OpenLayers._document.defaultView.getComputedStyle){var f=OpenLayers._document.defaultView.getComputedStyle(g,null);a=f.getPropertyValue(h)}else{a=null}}var e=/(em|ex|pt|%)$/;var d=/(width)/i;a=b?a?e.test(a)?this.convertToPixels(a,d.test(a),g.parentNode):parseInt(a)||0:0:a;return a},loadJS:function(a,d,m,j){d=d||a;var e=OpenLayers.Util.getElement(d);if(e!=null){return[e,false]}var b=OpenLayers._document.getElementsByTagName("script"),f,o;var h,g;for(h=0,g=b.length;h<g;++h){if(OpenLayers.Util.isEquivalentUrl(b.item(h).src,a)){b.item(h).setAttribute("id",d);return[b.item(h),false]}}b=OpenLayers._document.getElementsByTagName("head");var p=b.length>0?b[0]:OpenLayers._document.body;var q=m&&m!=""?OpenLayers.Util.getElement(m):null;e=OpenLayers._document.createElement("script");e.setAttribute("type","text/javascript");e.setAttribute("src",a);e.setAttribute("charset","UTF-8");e.setAttribute("id",d);if(j!=undefined){e.onload=function(){if(e.readyState&&e.readyState!="loaded"&&e.readyState!="complete"){return}e.onreadystatechange=e.onload=null;j()};if(navigator.appName!="Opera"){e.onreadystatechange=e.onload}}if(q!=null){var q=OpenLayers.Util.getElement(m);OpenLayers.Element.insertAfter(e,q)}else{b=p.childNodes;o=null;for(h=b.length-1;h>=0;h--){f=b[h];if(f.nodeType!=1){continue}switch(f.tagName.toLowerCase()){case"script":if(f.getAttribute("type").toLowerCase()=="text/javascript"){o=f}break;default:break}if(o!=null){break}}if(o==null){p.appendChild(e)}else{OpenLayers.Element.insertAfter(e,o)}}return[e,true]},loadCSS:function(a,d,h){d=d||a;var j=OpenLayers.Util.getElement(d);if(j!=null){return[j,false]}var b=OpenLayers._document.getElementsByTagName("link"),e,m;var g,f;for(g=0,f=b.length;g<f;++g){if(OpenLayers.Util.isEquivalentUrl(b.item(g).href,a)){b.item(g).setAttribute("id",d);return[b.item(g),false]}}b=OpenLayers._document.getElementsByTagName("head");var o=b.length>0?b[0]:OpenLayers._document.body;j=OpenLayers._document.createElement("link");j.setAttribute("rel","stylesheet");j.setAttribute("type","text/css");j.setAttribute("href",a);j.setAttribute("id",d);if(h==""){o.appendChild(j);return[j,true]}var p=h?OpenLayers.Util.getElement(h):null;if(p!=null){OpenLayers.Element.insertAfter(j,p);return[j,true]}b=o.childNodes;m=null;for(g=0,f=b.length;g<f;g++){e=b[g];if(e.nodeType!=1){continue}switch(e.tagName.toLowerCase()){case"link":if(e.getAttribute("rel").toLowerCase()=="stylesheet"||e.getAttribute("type").toLowerCase()=="text/css"){m=e}break;case"style":m=e;break;default:break}if(m!=null){break}}if(m==null){o.appendChild(j)}else{m.parentNode.insertBefore(j,m)}return[j,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(OpenLayers._document.innerHeight>b){a=OpenLayers._document.innerWidth;b=OpenLayers._document.innerHeight}if(OpenLayers._document.documentElement&&OpenLayers._document.documentElement.clientHeight>b){a=OpenLayers._document.documentElement.clientWidth;b=OpenLayers._document.documentElement.clientHeight}if(OpenLayers._document.body&&OpenLayers._document.body.clientHeight>b){a=OpenLayers._document.body.clientWidth;b=OpenLayers._document.body.clientHeight}return new OpenLayers.Size(a,b)},getCSSRule:function(m){m=m.toLowerCase();if(document.styleSheets){for(var g=0,b=document.styleSheets.length;g<b;g++){var f=document.styleSheets[g];var d=[];for(var j in {rules:"",imports:"",cssRules:""}){try{d=f[j];if(d!=undefined){for(var p=0,o=d.length;p<o;p++){var a=d[p];if(a&&a.selectorText&&a.selectorText.toLowerCase()==m){return a}}}break}catch(h){}}}}return null},dmsToDeg:function(o){if(!o){return Number.NaN}var j=o.match(/(^\s?-)|(\s?[SW]\s?$)/)!=null?-1:1;o=o.replace(/(^\s?-)|(\s?[NSEW]\s?)$/,"");o=o.replace(/\s/g,"");var f=o.match(/(\d{1,3})[.,°d]?(\d{0,2})[']?(\d{0,2})[.,]?(\d{0,})(?:["]|[']{2})?/);if(f==null){return Number.NaN}var g=(f[1]?f[1]:"0.0")*1;var a=(f[2]?f[2]:"0.0")*1;var b=(f[3]?f[3]:"0.0")*1;var e=(f[4]?("0."+f[4]):"0.0")*1;var h=(g+(a/60)+(b/3600)+(e/3600))*j;return h},degToDMS:function(f,d,a,u){var p=Math.abs(f);var g=Math.round(p+0.5)-1;var m=60*(p-g);var j=Math.round(m+0.5)-1;m=60*(m-j);var r=Math.round(m+0.5)-1;if(a===undefined||a<0){a=1}var h=Math.pow(10,a);var q=h*(m-r);q=Math.round(q+0.5)-1;if(q>=h){r=r+1;q=0}if(r==60){j=j+1;r=0}if(j==60){g=g+1;j=0}var e="";if(d&&!u&&(d instanceof Array)&&d.length==2){e=" "+(f>0?d[0]:d[1])}else{if(f<0){g=-1*g}}var o="%4d° %02d' %02d",b='.%0*d"';if(u){o=u;b="%0*d"}var v=OpenLayers.String.sprintf(o,g,j,r)+(a>0?OpenLayers.String.sprintf(b,a,q):(u?'"':""))+e;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 e=this.urls;if(e&&e instanceof Array&&e.length>1){var f=this.src.toString();var d,a;for(a=0;d=e[a];a++){if(f.indexOf(d)!=-1){break}}var g=Math.floor(e.length*Math.random());var b=e[g];a=0;while(b==d&&a++<4){g=Math.floor(e.length*Math.random());b=e[g]}this.src=f.replace(d,b)}else{var f=this.src.toString().replace(/&?_tick_=\d+/,"");f+=(f.indexOf("?")+1>0?"&":"?")+"_tick_="+new Date().getTime();this.src=f}}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{OpenLayers.Element.addClass(this,"olImageLoadError")}}}this.style.display=""}}};Geoportal.Cookies={_get:function(f){var g=OpenLayers._document.cookie.split(";");var j={name:f,value:null,path:"",domain:"",ttl:0,secure:false};for(var e=0,a=g.length;e<a;e++){var d=g[e].split("=");var h=d[0];var b=d[1];if(OpenLayers.String.trim(h)===f){j.value=decodeURIComponent(b);break}}return(j.value===null?null:j)},get:function(b,a){var d=Geoportal.Cookies._get(OpenLayers.String.trim(b));return(d?d.value:a)},expireDateToHours:function(e){var b=new Date(e);if(isNaN(b)){return -1}var d=new Date();var a=(b.getTime()-d.getTime())/(60*60*1000);return a},set:function(j,e,b,m,d,a){if(j==null){return}var h=OpenLayers.String.trim(typeof(j)=="object"?j.name:j);var f=Geoportal.Cookies._get(h)||{name:"",value:null,ttl:0,path:"",domain:"",secure:false};var g;if(typeof(j)=="string"){g={name:h,value:typeof(e)==="undefined"?f.value||"":e,ttl:typeof(b)==="undefined"?f.ttl||"":b,path:f.path||m||"",domain:f.domain||d||"",secure:f.secure||a||false}}else{g={name:h,value:typeof(j.value)==="undefined"?f.value||"":j.value,ttl:typeof(j.ttl)==="undefined"?f.ttl||"":j.ttl,path:f.path||j.path||"",domain:f.domain||j.domain||"",secure:f.secure||j.secure||false}}OpenLayers._document.cookie=Geoportal.Cookies.toString(g)},remove:function(a){Geoportal.Cookies.set(a,"",-1)},toString:function(e,b){var a=[];a.push(e.name+"="+encodeURIComponent(""+e.value));if(e.path){a.push("path="+e.path)}if(b===true){a.push("domain="+(!e.domain?location.hostname:e.domain))}if(e.ttl&&!isNaN(e.ttl)){if(e.ttl<1){a.push("expires=Thu, 01-Jan-1970 00:00:01 GMT")}else{a.push("max-age="+e.ttl*60*60)}}if(e.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 e={keydown:this.handleKeypress};this.handlers={feature:new OpenLayers.Handler.Feature(this,b,this.callbacks,{geometryTypes:this.geometryTypes}),keyboard:new OpenLayers.Handler.Keyboard(this,e)};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 e=0,a=this.layer.selectedFeatures.length;e<a;e++){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,{handlesSuffixes:["tl","tm","tr","ml","mr","bl","bm","br"],contentControler:null,headDiv:null,headTitle:null,headDivEvents:null,closeDiv:null,closeDivEvents:null,bodyDiv:null,bodyDivEvents:null,divEvents:null,movingForm:true,size:null,_mouseDragStart:null,_downEventStart:null,_handles:null,_size:null,_minSize:null,_pos:null,onMaximize:function(a){},onMinimize:function(a){},onClose:function(a){},onSelect:function(a){},onUnselect:function(a){},onDrag:function(a){},onDragStop:function(a){},onHandleSelect:function(a){},onResize:function(a,b){},onResizeStop: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.closeDivEvents){this.closeDivEvents.un({click:this.closeControl,dblclick:this.dblClick});this.closeDivEvents=null}if(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._handles){for(var b in this._handles){var a=this._handles[b];if(a.events){a.events.destroy();a.events=null}OpenLayers.Element.remove(a.div);a.div.innerHTML="";a.div=null}this._handles=null}this._mouseDragStart=null;this._downEventStart=null;this._size=null;this._minSize=null;this._pos=null;if(this.size){this.size=null}if(this.div){this.divEvents.un({dblclick:this.ignoreEvent,mousedown:this.ignoreEvent,mouseup:this.ignoreEvent,mouseover:Geoportal.Control.mapMouseOut,mouseout:Geoportal.Control.mapMouseOver});this.divEvents=null;this.div.innerHTML="";if(this.div.parentNode){this.div.parentNode.removeChild(this.div)}this.div=null}this.contentControler=null},draw:function(a){Geoportal.Control.prototype.draw.apply(this,arguments);this.loadContents();if(OpenLayers.Element.visible(this.bodyDiv)){this.maximizeControl()}return this.div},clickOnLabel:function(a){var b=OpenLayers.Element.visible(this.bodyDiv);this.showControls(b);this.ignoreEvent(a)},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(b){if(b){this.headDiv.style.width=this.headDiv.offsetWidth+"px";this.setResizeHandles(false);if(this._size){this.div.style.width=this.div.style.height=""}}else{this.headDiv.style.width="auto";if(this._size){this.div.style.width=this._size.w+"px";this.div.style.height=this._size.h+"px"}}var a=b?OpenLayers.Element.hide:OpenLayers.Element.show;a(this.bodyDiv)},closeControl:function(a){this.ignoreEvent(a);if(this.contentControler){this.onClose.apply(this.contentControler,[a])}},dragStart:function(a){if(OpenLayers.Event.isLeftClick(a)){if(!this.downEventStart){this.mouseDragStart={x:a.xy.x,y:a.xy.y};this.downEventStart={x:a.xy.x,y:a.xy.y};this.headDiv.style.cursor="move";this._zIndex=this.div.style.zIndex;this.div.style.zIndex=9998;if(OpenLayers.Element.visible(this.bodyDiv)){this.setResizeHandles(true)}if(!this._size){this._size=new OpenLayers.Size(this.div.offsetWidth,this.div.offsetHeight);this._minSize=this._size.clone()}if(!this._pos){this._pos=new OpenLayers.Pixel(this.div.offsetLeft,this.div.offsetTop)}this.onSelect(a)}else{if(OpenLayers.Element.visible(this.bodyDiv)){this.setResizeHandles(false)}this.div.style.zIndex=this._zIndex;this._zIndex=-1;this.headDiv.style.cursor="pointer";this.downEventStart=null;this.mouseDragStart=null;this.onUnselect()}}OpenLayers.Event.stop(a)},drag:function(d){if(OpenLayers.Event.isLeftClick(d)&&this.downEventStart&&this.mouseDragStart){var b=d.xy.x-this.mouseDragStart.x;var a=d.xy.y-this.mouseDragStart.y;var f=this._pos.x+b;var e=this._pos.y+a;if((f>0)&&(e>0)&&(f+this.div.clientWidth<this.div.parentNode.clientWidth)&&(e+this.div.clientHeight<this.div.parentNode.clientHeight)){this._pos.x=f;this._pos.y=e;if(this.position){this.position.x=f;this.position.y=e}this.div.style.left=f+"px";this.div.style.top=e+"px";this.mouseDragStart.x=d.xy.x;this.mouseDragStart.y=d.xy.y;this.onDrag(d)}OpenLayers.Event.stop(d)}},dragStop:function(a){if(OpenLayers.Event.isLeftClick(a)&&this.downEventStart&&this.mouseDragStart){this.mouseDragStart=null;this.headDiv.style.cursor="pointer";this.onDragStop(a)}OpenLayers.Event.stop(a)},ignoreEvent:function(a){if(a){OpenLayers.Event.stop(a)}return false},passthroughEvent:function(a){if(a){OpenLayers.Event.stop(a,true)}},setResizeHandles:function(b){if(!this._handles){this._handles={};for(var d=0,a=this.handlesSuffixes.length;d<a;d++){var f=this.div.ownerDocument.createElement("div");f.suffix=this.handlesSuffixes[d];OpenLayers.Element.addClass(f,this.displayClass+"Hndl");var g=this.displayClass+"Hndl-"+this.handlesSuffixes[d];OpenLayers.Element.addClass(f,g);this._handles[g]={};this._handles[g].div=this.div.appendChild(f);this._handles[g].events=new OpenLayers.Events(this,f,null,true,{includeXY:true})}}for(var d=0,a=this.handlesSuffixes.length;d<a;d++){var g=this.displayClass+"Hndl-"+this.handlesSuffixes[d];this._handles[g].div.style.visibility=b?"inherit":"hidden";var e=b?OpenLayers.Events.prototype.on:OpenLayers.Events.prototype.un;e.apply(this._handles[g].events,[{mousedown:this.resizeStart,mousemove:this.resize,mouseout:this.resizeStop,mouseup:this.resizeStop,dblclick:this.ignoreEvent,click:this.ignoreEvent}])}},resizeStart:function(a){if(OpenLayers.Event.isLeftClick(a)){if(!this._size){this._size=new OpenLayers.Size(this.div.offsetWidth,this.div.offsetHeight);this._minSize=this._size.clone()}this.mouseDragStart={x:a.xy.x,y:a.xy.y};this.onHandleSelect(a)}OpenLayers.Event.stop(a)},resize:function(o){if(OpenLayers.Event.isLeftClick(o)&&this.mouseDragStart){var p=(o.target||o.srcElement).suffix;var b=o.xy.x-this.mouseDragStart.x;var a=o.xy.y-this.mouseDragStart.y;var g=this._pos.x,f=this._pos.y,m=this._size.w,d=this._size.h;if(p.indexOf("t")>=0){if((a>0&&d-this._minSize.h>=a)||a<0){f+=a;d-=a}else{a=0}}if(p.indexOf("b")>=0){if((a<0&&d-this._minSize.h>=-a)||a>0){d+=a}else{a=0}}if(p.indexOf("l")>=0){if((b>0&&m-this._minSize.w>=b)||b<0){g+=b;m-=b}else{b=0}}if(p.indexOf("r")>=0){if((b<0&&m-this._minSize.w>=-b)||b>0){m+=b}else{b=0}}var j=g;var e=f;if((j>0)&&(e>0)&&(j+this.div.clientWidth<this.div.parentNode.clientWidth)&&(e+this.div.clientHeight<this.div.parentNode.clientHeight)){this._pos.x=j;this._pos.y=e;if(this.position){this.position.x=j;this.position.y=e}this.div.style.left=j+"px";this.div.style.top=e+"px";this._size.w=m;this._size.h=d;this.div.style.width=this._size.w+"px";this.div.style.height=this._size.h+"px";this.mouseDragStart.x=o.xy.x;this.mouseDragStart.y=o.xy.y;if(this.contentControler){this.onResize.apply(this.contentControler,[o,{suffix:p,dx:b,dy:a}])}}}OpenLayers.Event.stop(o)},resizeStop:function(a){if(OpenLayers.Event.isLeftClick(a)){this.mouseDragStart=null;this.onResizeStop(a)}OpenLayers.Event.stop(a)},loadContents:function(){this.div.className=this.displayClass;this.headDiv=this.div.ownerDocument.createElement("div");this.headDiv.className=this.displayClass+"Head";var e=this.div.ownerDocument.createElement("span");e.id="spanTitle"+this.id;e.className=this.displayClass+"Head";e.appendChild(this.div.ownerDocument.createTextNode(OpenLayers.i18n(this.headTitle?this.headTitle:"???")));this.headDiv.appendChild(e);var h=Geoportal.Util.getImagesLocation();var g=new OpenLayers.Size(11,11);var d=this.div.ownerDocument.createElement("div");d.className=this.displayClass+"HeadBtns";if(this.contentControler){this.closeDiv=OpenLayers.Util.createDiv(this.id+"_CloseDiv",null,null,null,"relative");OpenLayers.Element.addClass(this.closeDiv,this.displayClass+"HeadBtnsClose");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 f=OpenLayers.Util.getRenderedDimensions(this.headDiv.innerHTML,a,{displayClass:this.headDiv.className});if(this.size){a=null;this.headDiv.style.height=f.h+"px";f.w=this.size.w}this.headDiv.style.width=f.w+"px";if(!this.position){var b=this.map.div.clientWidth||this.map.div.offsetWidth||800;this.div.style.left=(((b-f.w)*100)/(2*b))+"%"}f=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,mouseout:this.dragStop,mouseup:this.dragStop})}this.bodyDiv=this.div.ownerDocument.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,mouseout:this.passthroughEvent,mouseup:this.passthroughEvent})}if(this.contentControler){this.closeDivEvents=new OpenLayers.Events(this,this.closeDiv,null);this.closeDivEvents.on({click:this.closeControl,dblclick:this.dblClick})}this.div.appendChild(this.headDiv);this.div.appendChild(this.bodyDiv);this.divEvents=new OpenLayers.Events(this,this.div,null);this.divEvents.on({dblclick:this.ignoreEvent,mousedown:this.ignoreEvent,mouseup:this.ignoreEvent,mouseover:Geoportal.Control.mapMouseOut,mouseout:Geoportal.Control.mapMouseOver})},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){a=b.w+4;this.headDiv.style.width=a+"px"}this.bodyDiv.style.width=(a-4)+"px";if(!this.position){this.div.style.left=(((this.div.parentNode.clientWidth-a)*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);this.headDiv.style.width="auto";this.bodyDiv.style.width="auto"}},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=this.div.ownerDocument.createElement("div");this.divText2.className=this.displayClass+"Text2";this.div.appendChild(this.divText2);this.divText1=this.div.ownerDocument.createElement("div");this.divText1.className=this.displayClass+"Text1";this.divText1.innerHTML="0";this.div.appendChild(this.divText1);this.divLegend=this.div.ownerDocument.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 j=q*q;var g=Math.sin(w.lat*0.017453292519943295);var o=g*g;var C=B*B;var u=B*B*B*B;var e=v*v;var d=v*v*v*v;D*=0.017453292519943295*q*Math.sqrt((u*j+d*o)/(C*j+e*o))}}for(var p=0;p<this.METRICSUIMETER.length&&!m;p++){var r=100000;var f=this.METRICSUIMETER[p];while((Math.round(r)>0)&&!m){var h=Math.round((r*f)/D);if(h<this.barAreaWidth){m=true;this.currentUnitInfo=this.METRICSUIMETER[p];this.currentUiSymbol=this.METRICSUISYMBOL[p];this.currentWidth=h;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=this.div.ownerDocument.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 e,b,d,f;if(this.layers){f=this.layers;this.layers=null}else{if(this.map){this.map.events.unregister("preaddlayer",this,this.addLayer);if(this.map.layers){f=this.map.layers}}}if(f){for(e=0,b=f.length;e<b;e++){d=f[e];if(d instanceof Geoportal.Layer.Aggregate){if(d.layers){for(var e=0,a=d.layers.length;e<a;e++){d.layers[e].events.unregister("loadstart",this,this.increaseCounter);d.layers[e].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(g){Geoportal.Control.prototype.setMap.apply(this,arguments);if(!this.layers){this.map.events.register("preaddlayer",this,this.addLayer)}var f=this.layers||this.map.layers;for(var e=0,a=f.length;e<a;e++){var d=f[e];if(d instanceof Geoportal.Layer.Aggregate){if(d.layers){for(var b=0,h=d.layers.length;b<h;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 e=this.map.getSize();var b=e.w;var d=e.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,attributionDiv:null,separator:", ",_isSizeFixed:false,_listeLogos:null,_attributions:null,initialize:function(a){Geoportal.Control.prototype.initialize.apply(this,arguments);this._isSizeFixed=this.logoSize!=null;if(!this._isSizeFixed){this.logoSize=new OpenLayers.Size(Geoportal.Control.Logo.WHSizes.normal,Geoportal.Control.Logo.WHSizes.normal)}else{if(typeof(this.logoSize)=="number"){this.logoSize=new OpenLayers.Size(this.logoSize,this.logoSize)}}this._listeLogos=[];this._attributions=[]},destroy:function(){var b=this.div.childNodes;for(var a=0;a<b.length;a++){this.div.removeChild(b[a])}this._listeLogos=null;this._attributions=null;this.logoSize=null;this._isSizeFixed=false;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);this.map.events.unregister("controlvisibilitychanged",this,this.onVisibilityChanged);Geoportal.Control.prototype.destroy.apply(this,arguments)},draw:function(a){Geoportal.Control.prototype.draw.apply(this,arguments);return this.div},redraw:function(){var o,e;var p=this.div.childNodes;for(o=0,e=p.length;o<e;o++){p[o].style.display="none"}if(this.attributionDiv){this.attributionDiv.innerHTML=""}var m=this.map.layers;var v=this.map.getZoom();var d;this._attributions=[];for(o=0,e=m.length;o<e;o++){if(!m[o].getVisibility()||!m[o].inRange){continue}if(m[o].originators!=null){var r;for(var g=0,h=m[o].originators.length;g<h;g++){r=true;var d=m[o].originators[g];if(d.minZoomLevel&&(d.minZoomLevel>v)){r=false}if(r&&d.maxZoomLevel&&(d.maxZoomLevel<v)){r=false}if(r&&d.extent){var b=this.map.calculateBounds();if(b){if(!(d.extent instanceof Array)){d.extent=[d.extent]}var q=false;for(var f=0,a=d.extent.length;f<a;f++){if(b.intersectsBounds(d.extent[f])){q=true;break}}r=q}}if(r){if(!d.logo){d.logo=d.url||"#"}var u=d.attribution||m[o].attribution||"&copy; "+d.logo.toUpperCase();this._ajoutLogo(d.logo,d.url,d.pictureUrl,u)}}}}},_ajoutLogo:function(g,d,f,b){if(this._listeLogos[g]==null){var a=this.div.ownerDocument.createElement("div");this.div.appendChild(a);this._listeLogos[g]=a;var h=OpenLayers.Util.createImage(null,null,this.logoSize,f?f:this.logoPrefix+g+this.logoSuffix,null,null,null,false);if(d!=null){var e=this.div.ownerDocument.createElement("a");if(d.match(/^javascript:/)){e.setAttribute("href","#");e.setAttribute("onclick",d)}else{e.setAttribute("href",d);e.setAttribute("target","_blank")}e.appendChild(h);a.appendChild(e)}else{a.appendChild(h)}}else{this._listeLogos[g].style.display=""}if(this.attributionDiv){this._attributions.push(b);this.attributionDiv.innerHTML=this._attributions.join(this.separator)}},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);this.map.events.register("controlvisibilitychanged",this,this.onVisibilityChanged)},changeLogoSize:function(p){if(this._isFixedSize){return}var m=null;if(typeof(p)=="number"){m=new OpenLayers.Size(p,p)}else{m=p.clone()}this.logoSize=m;var e=this.map.layers;for(var f=0,o=e.length;f<o;f++){var h=e[f];if(h.originators!=null){for(var b=0,g=h.originators.length;b<g;b++){var a=h.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(q){if(!q){return}if(!(q.layer)){return}if(!(q.baseLayer)){return}var o=q.baseLayer.getNativeProjection();var p=q.layer.getNativeProjection();var h=this.map.layers;var b;for(var m=0,d=h.length;m<d;m++){if(h[m].originators!=null){for(var f=0,g=h[m].originators.length;f<g;f++){var b=h[m].originators[f];if(b.extent){if(!(b.extent instanceof Array)){b.extent=[b.extent]}for(var e=0,a=b.extent.length;e<a;e++){b.extent[e].transform(o,p,true)}}}}}},onVisibilityChanged:function(g){if(!g||!g.size){return}var d=(g.visibility?1:-1);var a=Geoportal.Util.getComputedStyle(this.div,"bottom",true);a=a+d*g.size.h;this.div.style.bottom=a+"px"},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=[];this.activeState={}},destroy:function(){if(this.controls){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=null}this.activeState=null;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.controls){var d;for(var b=0,a=this.controls.length;b<a;b++){d=this.controls[b];if(d===this.defaultControl||(this.saveState&&this.activeState[d.id])){d.activate()}}}if(this.saveState===true){this.defaultControl=null}this.redraw();return true}else{return false}},deactivate:function(){if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)){if(this.controls){var d;for(var b=0,a=this.controls.length;b<a;b++){d=this.controls[b];this.activeState[d.id]=d.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){if(!this.controls){return true}for(var d=0,a=this.controls.length;d<a;d++){var e=this.controls[d];if(e==b.control){continue}if(e.type==OpenLayers.Control.TYPE_BUTTON){continue}if(e.type==OpenLayers.Control.TYPE_TOGGLE&&(e instanceof Geoportal.Control.PanelToggle)){continue}e.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=OpenLayers._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);this.map.events.register("controlvisibilitychanged",this,this.onVisibilityChanged)},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"}},onVisibilityChanged:function(g){if(!g||!g.size){return}var d=(g.visibility?1:-1);var a=this.bottom;if(!a){a=(g.visibility?Geoportal.Util.getComputedStyle(this.div,"bottom",true):0)}this.bottom=a+d*g.size.h;this.div.style.bottom=this.bottom+"px"},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("controldeleted",this,this.onControlRemoved);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);this.map.events.register("controldeleted",this,this.onControlRemoved)},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 e=this.displayProjections[d];if(typeof(e)=="string"){this.displayProjections[d]=new OpenLayers.Projection(e)}}this.redraw()}},onControlRemoved:function(a){if(!a){return}if(this.selectProjs&&this.selectProjs.kbControl&&this.selectProjs.kbControl===a.control){this.selectProjs.kbControl=null}},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 h=this.div.ownerDocument.createElement("form");h.id="__fslpj__"+this.id;h.name=h.id;h.action="javascript:void(null)";this.selectProjs=this.div.ownerDocument.createElement("select");this.selectProjs.id="__slpj__"+this.id;this.selectProjs.name=this.selectProjs.id;this.selectProjs.className="gpSelectProjections";h.appendChild(this.selectProjs);var e=-1;for(var g=0,b=this.displayProjections.length;g<b;g++){var d=this.displayProjections[g];var j=OpenLayers.String.trim(d.getTitle());var m=g;if(d.isUTMZoneProjection()){if(e!=-1){continue}e=g;m=Geoportal.Control.Projections.MGRS_UTM;j=OpenLayers.i18n("utm.zone")}var a=this.div.ownerDocument.createElement("option");a.value=m;a.appendChild(this.div.ownerDocument.createTextNode(j));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(h);return this.div},onProjectionClick:function(b,a){if(a||window.event){OpenLayers.Event.stop(a?a:window.event)}if(b.kbControl){if(b.kbControl.active){b.kbControl.deactivate()}}b.hasFocus=true;b.focus()},onProjectionChange:function(h,b){if(b||window.event){OpenLayers.Event.stop(b?b:window.event)}if(h.options[h.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[h.options[h.selectedIndex].value]}else{var g=this.lookupUTMZone(this.map.getCenter().transform(this.map.getProjection(),OpenLayers.Projection.CRS84));if(g!=null){if(!this.displayProjection.isUTMZoneProjection()){this.map.events.register("mousemove",this,this.updateDisplayProjections);this.map.events.register("moveend",this,this.updateDisplayProjections)}this.displayProjection=g}else{var f=OpenLayers.String.trim(this.displayProjection.getTitle());for(var d=0,a=h.options.length;d<a;d++){var e=h.options[d];if(OpenLayers.String.trim(e.text)==f){h.selectedIndex=d;break}}}}this.map.displayProjection=this.displayProjection;this.map.events.triggerEvent("changedisplayprojection",{displayProjection:this.displayProjection});if(h.kbControl){if(!h.kbControl.active){h.kbControl.activate()}}h.hasFocus=false;h.blur()},setDisplayProjection:function(e){if(!this.selectProjs){return}if(typeof(e)=="string"){e=new OpenLayers.Projection(e);if(e==null){return}}var g=null,f=-1,j=null,d=e.getCode(),b=e.isUTMZoneProjection();for(var a=0,h=this.displayProjections.length;a<h;a++){j=this.displayProjections[a];if(d==j.getCode()){f=a;break}}if(f==-1){return}if(b){f=Geoportal.Control.Projections.MGRS_UTM}else{f=""+f}for(var a=0,h=this.selectProjs.options.length;a<h;a++){g=this.selectProjs.options[a];if(g.value==f){if(this.selectProjs.selectedIndex==a){return}this.selectProjs.selectedIndex=a;this.onProjectionChange(this.selectProjs);return}}},lookupUTMZone:function(g){var f=Number.NaN,h=null,j=Number.NaN,b=null,o=null,m=new OpenLayers.Geometry.Point(g.lon,g.lat);for(var e=0,a=this.displayProjections.length;e<a;e++){b=this.displayProjections[e];if(!b.isUTMZoneProjection()){continue}if(b.domainOfValidity.containsLonLat(g)){return b}o=b.domainOfValidity.toGeometry();j=m.distanceTo(o);if(isNaN(f)||j<f){f=j;h=b}o=null}return h},changeLang:function(b){if(this.selectProjs){for(var d=0,a=this.selectProjs.options.length;d<a;d++){var e=this.selectProjs.options[d];if(e.value!=Geoportal.Control.Projections.MGRS_UTM){e.innerHTML=this.displayProjections[e.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 f=new OpenLayers.Size();if(this.isVertical){f.w=this.levelBarImgWidth;f.h=this.levelBarIntervalLength*(this.getMaxAbsoluteLevels()-1)}else{f.w=this.levelBarIntervalLength*(this.getMaxAbsoluteLevels()-1);f.h=this.levelBarImgHeight}var e=OpenLayers.Util.createUniqueID("SliderBase");this.levelBarDiv=OpenLayers.Util.createDiv(e,b,f,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,mouseover:this.displayInfo,dblclick:this.doubleClick,click:this.doubleClick});this.div.appendChild(this.levelBarDiv);f.w=this.sliderImgWidth;f.h=this.sliderImgHeight;var g;if(isNaN(this.initialLevel)){g=this.getLevel()}else{g=this.initialLevel;this.initialLevel=Number.NaN}if(this.isVertical){b=b.add(-Math.round(b.x/2),this.levelToPos(g))}else{b=b.add(this.levelToPos(g),-Math.round(b.y/2))}var a=OpenLayers.Util.createUniqueID("SliderBaseHandle");this.slider=OpenLayers.Util.createAlphaImageDiv(a,b,f,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(g);return this.div},passEventToSlider:function(a){this.sliderEvents.handleBrowserEvent(a)},doubleClick:function(a){OpenLayers.Event.stop(a);return false},singleClick:function(a){},displayInfo: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=this.div.ownerDocument.createElement("a");b.setAttribute("href",this.tosURL);b.setAttribute("alt",a);b.setAttribute("title",a);b.setAttribute("target","_blank");b.appendChild(this.div.ownerDocument.createTextNode(a));this.div.appendChild(b)},setMap:function(){Geoportal.Control.prototype.setMap.apply(this,arguments);this.map.events.register("controlvisibilitychanged",this,this.onVisibilityChanged)},onVisibilityChanged:function(g){if(!g||!g.size){return}var d=(g.visibility?1:-1);var a=Geoportal.Util.getComputedStyle(this.div,"bottom",true);a=a+d*g.size.h;this.div.style.bottom=a+"px"},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);this.usersContent=null;this.cntrlContent=null;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));OpenLayers.Event.observe(this.div,"mouseover",OpenLayers.Function.bindAsEventListener(Geoportal.Control.mapMouseOut,this));OpenLayers.Event.observe(this.div,"mouseout",OpenLayers.Function.bindAsEventListener(Geoportal.Control.mapMouseOver,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(e,b){var a=null;if(this.usersContent){a=this.createInnerDiv(e,b,this.tbxContent);this.usersContent.appendChild(a)}return a},createInnerDiv:function(g,f,b,a){var e=(this.div?this.div.ownerDocument:OpenLayers._document).createElement("div");if(g){e.id=g}if(f==null){f=""}e.className=f+" olControlNoSelect";if(a){e.innerHTML=a}b.appendChild(e);return e},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){a=a||{};a.mapping=OpenLayers.Util.extend({},a.mapping);OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},read:function(e){if(typeof(e)=="string"){e=OpenLayers.Format.XML.prototype.read.apply(this,[e])}if(!e){return[]}var b=(e.nodeType==9?e.documentElement:e);var a=b.getAttribute("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)}var d=this.parser.read(e);this.version=this.parser.version;return d},write:function(features,options){var version=(options&&options.version)||this.version||this.defaultVersion;if(!this.parser||this.parser.VERSION!=version){var format=Geoportal.Format.GPX["v"+version.replace(/\./g,"_")];if(!format){throw OpenLayers.i18n("GPX.version",{gpxVersion:version})}this.parser=new format(this.options);this.parser.tags=eval("Geoportal.Format.GPX.v"+version.replace(/\./g,"_")+".TAGS")}var xml=this.parser.write(features,options);this.version=this.parser.version;return xml},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,precision:7,handleHeight:false,defaultPrefix:"gpx",gpxns:null,tags: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){if(typeof(b)=="string"){b=OpenLayers.Format.XML.prototype.read.apply(this,[b])}if(!b){return[]}var a=(b.nodeType==9?b.documentElement:b);var d={metadata:{onlineResource:{},contactPerson:{},owner:{}},features:[]};this.readNode(a,d);this.creator=d.creator;this.version=this.version||d.version;this.metadata=d.metadata;this.postProcessFeatures(d.features);return d.features},postProcessFeatures:function(a){},readers:{gpx:{gpx:function(a,b){b.version=a.getAttribute("version")||this.VERSION;b.creator=a.getAttribute("creator")||this.CLASS_NAME;this.nbWPT=this.nbRTE=this.nbTRK=0;this.mappingContext="gpx";this.readChildNodes(a,b);this.mappingContext=null},name:function(b,d){var a=this.getChildValue(b);if(d.attributes){this.assignAttribute("name",a,d.attributes)}else{switch(this.mappingContext){case"contactPerson":d.metadata.contactPerson.name=a;break;default:d.metadata.name=a;break}}},desc:function(b,d){var a=this.getChildValue(b);if(d.attributes){this.assignAttribute("desc",a,d.attributes)}else{d.metadata.desc=a}},type:function(b,d){var a=this.getChildValue(b);if(d.attributes){if(this.mappingContext=="link"){this.assignAttribute("type",a,d.attributes.onlineResource)}else{this.assignAttribute("type",a,d.attributes)}}else{switch(this.mappingContext){case"contactPerson":d.metadata.contactPerson.onlineResource.type=a;break;default:d.metadata.onlineResource.type=a;break}}},time:function(b,d){var a=this.getChildValue(b);if(d.attributes){this.assignAttribute("time",a,d.attributes)}else{d.metadata.time=a}},keywords:function(a,b){b.metadata.keywords=this.getChildValue(a).split(",")},bounds:function(f,g){var d=OpenLayers.Util.toFloat(f.getAttribute("minlat"),this.precision);var e=OpenLayers.Util.toFloat(f.getAttribute("minlon"),this.precision);var a=OpenLayers.Util.toFloat(f.getAttribute("maxlat"),this.precision);var b=OpenLayers.Util.toFloat(f.getAttribute("maxlon"),this.precision);g.metadata.extent=new OpenLayers.Bounds(e,d,b,a);if(this.internalProjection&&this.externalProjection){g.metadata.extent.transform(this.externalProjection,this.internalProjection,true)}},ele:function(a,b){this.assignAttribute("ele",parseFloat(this.getChildValue(a)),b.attributes)},magvar:function(a,b){this.assignAttribute("magvar",parseFloat(this.getChildValue(a)),b.attributes)},geoidheight:function(a,b){this.assignAttribute("geoidheight",parseFloat(this.getChildValue(a)),b.attributes)},cmt:function(a,b){this.assignAttribute("cmt",this.getChildValue(a),b.attributes)},src:function(a,b){this.assignAttribute("src",this.getChildValue(a),b.attributes)},sym:function(a,b){this.assignAttribute("sym",this.getChildValue(a),b.attributes)},fix:function(a,b){this.assignAttribute("fix",this.getChildValue(a),b.attributes)},sat:function(a,b){this.assignAttribute("sat",parseInt(this.getChildValue(a)),b.attributes)},hdop:function(a,b){this.assignAttribute("hdop",parseFloat(this.getChildValue(a)),b.attributes)},vdop:function(a,b){this.assignAttribute("vdop",parseFloat(this.getChildValue(a)),b.attributes)},pdop:function(a,b){this.assignAttribute("pdop",parseFloat(this.getChildValue(a)),b.attributes)},ageofdgpsdata:function(a,b){this.assignAttribute("ageofdgpsdata",parseFloat(this.getChildValue(a)),b.attributes)},dgpsid:function(a,b){this.assignAttribute("dgpsid",parseInt(this.getChildValue(a)),b.attributes)},course:function(a,b){this.assignAttribute("course",parseFloat(this.getChildValue(a)),b.attributes)},speed:function(a,b){this.assignAttribute("speed",parseFloat(this.getChildValue(a)),b.attributes)},number:function(a,b){this.assignAttribute("number",parseInt(this.getChildValue(a)),b.attributes)},wpt:function(e,h){if(this.nbRTE>0||this.nbTRK>0){h.metadata.error=true;return}this.nbWPT++;var d=new OpenLayers.Geometry.Point(OpenLayers.Util.toFloat(e.getAttribute("lon"),this.precision),OpenLayers.Util.toFloat(e.getAttribute("lat"),this.precision));if(this.internalProjection&&this.externalProjection){d.transform(this.externalProjection,this.internalProjection)}var b={geometry:d,attributes:{typeName:"wpt"}};if(this.extractAttributes){var f=this.mappingContext;this.mappingContext="wpt";this.readChildNodes(e,b);this.mappingContext=f}var a=new OpenLayers.Feature.Vector(b.geometry,b.attributes,this.style);if(a){h.features.push(a)}else{}},rte:function(d,f){if(this.nbTRK>0){f.metadata.error=true;return}this.nbRTE++;var b={attributes:{},geometry:new OpenLayers.Geometry.LineString()};var e=this.mappingContext;this.mappingContext="rte";this.readChildNodes(d,b);if(this.extractAttributes){b.attributes.typeName="rte";b.attributes.metadata=b.metadata||[]}this.mappingContext=e;var a=new OpenLayers.Feature.Vector(b.geometry,b.attributes,this.style);if(a){f.features.push(a)}else{}},rtept:function(a,d){var b=this.mappingContext;this.mappingContext="rtept";this.assignPoint(a,d);this.mappingContext=b},trk:function(b,f){this.nbTRK++;var e={attributes:{},geometry:new OpenLayers.Geometry.MultiLineString()};var d=this.mappingContext;this.mappingContext="trk";this.readChildNodes(b,e);if(this.extractAttributes){e.attributes.typeName="trk";e.attributes.metadata=e.metadata||[]}this.mappingContext=d;var a=new OpenLayers.Feature.Vector(e.geometry,e.attributes,this.style);if(a){f.features.push(a)}else{}},trkseg:function(a,d){var b={attributes:{},geometry:new OpenLayers.Geometry.LineString()};this.readChildNodes(a,b);if(!d.metadata){d.metadata=[]}d.metadata=d.metadata.concat(b.metadata);d.geometry.addComponent(b.geometry)},trkpt:function(a,d){var b=this.mappingContext;this.mappingContext="trkpt";this.assignPoint(a,d);this.mappingContext=b}}},write:function(b,a){if(!(b instanceof Array)){b=[b]}var d=this.writers.gpx.gpx.apply(this,[b]);return OpenLayers.Format.XML.prototype.write.apply(this,[d])},writers:{gpx:{gpx:function(f){this.mappingContext="gpx";var g=this.createElementNSPlus("gpx",{uri:this.gpxns,attributes:{version:this.version||this.VERSION,creator:this.creator||this.CLASS_NAME}});this.writeMetadata(this.metadata,g);for(var e=0,b=f.length;e<b;++e){var a=f[e].attributes.typeName||f[e].layer.options.typeName;if(a==undefined&&(f[e].geometry instanceof OpenLayers.Geometry.Point)){a="wpt"}if(a=="wpt"){var d=f[e].clone();d.attributes.typeName=a;this.writeNode(a,d,g)}}for(var e=0,b=f.length;e<b;++e){var a=f[e].attributes.typeName||f[e].layer.options.typeName;if(a==undefined&&(f[e].geometry instanceof OpenLayers.Geometry.LineString)){a="rte"}if(a=="rte"){var d=f[e].clone();d.attributes.typeName=a;this.writeNode(a,d,g)}}for(var e=0,b=f.length;e<b;++e){var a=f[e].attributes.typeName||f[e].layer.options.typeName;if(a==undefined&&(f[e].geometry instanceof OpenLayers.Geometry.MultiLineString)){a="trk"}if(a=="trk"){var d=f[e].clone();d.attributes.typeName=a;this.writeNode(a,d,g)}}this.mappingContext=null;return g},name:function(a){return this.createTag("name",a)},desc:function(a){return this.createTag("desc",a)},type:function(a){return this.createTag("type",a)},time:function(a){return this.createTag("time",a)},keywords:function(d){var a=d.keywords.join(",");var b=this.createElementNSPlus("keywords",{uri:this.gpxns,value:a});return b},bounds:function(d){var b=d.extent.clone();if(this.internalProjection&&this.externalProjection){b.transform(this.internalProjection,this.externalProjection,true)}var a=this.createElementNSPlus("bounds",{uri:this.gpxns,attributes:{minlat:OpenLayers.String.sprintf("%.*f",this.precision,b.bottom),minlon:OpenLayers.String.sprintf("%.*f",this.precision,b.left),maxlat:OpenLayers.String.sprintf("%.*f",this.precision,b.top),maxlon:OpenLayers.String.sprintf("%.*f",this.precision,b.right)}});return a},ele:function(a){return this.createTag("ele",a)},magvar:function(a){return this.createTag("magvar",a)},geoidheight:function(a){return this.createTag("geoidheight",a)},cmt:function(a){return this.createTag("cmt",a)},src:function(a){return this.createTag("src",a)},sym:function(a){return this.createTag("sym",a)},fix:function(a){return this.createTag("fix",a)},sat:function(a){return this.createTag("sat",a)},hdop:function(a){return this.createTag("hdop",a)},vdop:function(a){return this.createTag("vdop",a)},pdop:function(a){return this.createTag("pdop",a)},ageofdgpsdata:function(a){return this.createTag("ageofdgpsdata",a)},dgpsid:function(a){return this.createTag("dgpsid",a)},course:function(a){return this.createTag("course",a)},speed:function(a){return this.createTag("speed",a)},number:function(a){return this.createTag("number",a)},wpt:function(g){this.mappingContext="wpt";var f={x:g.geometry.x,y:g.geometry.y};if(this.internalProjection&&this.externalProjection){OpenLayers.Projection.transform(f,this.internalProjection,this.externalProjection)}var e=this.createElementNSPlus("wpt",{uri:this.gpxns,attributes:{lat:OpenLayers.String.sprintf("%.*f",this.precision,f.y),lon:OpenLayers.String.sprintf("%.*f",this.precision,f.x)}});for(var d=0,b=this.tags.wpt.length;d<b;d++){var a=this.tags.wpt[d];this.writeNode(a,g,e)}this.mappingContext=null;return e},rte:function(f){this.mappingContext="rte";var e=this.createElementNS(this.gpxns,"rte");for(var d=0,b=this.tags.rte.length;d<b;d++){var a=this.tags.rte[d];this.writeNode(a,f,e)}for(var d=0,b=f.geometry.components.length;d<b;d++){this.writeNode("rtept",{geometry:f.geometry.components[d],metadata:(f.attributes.metadata?f.attributes.metadata[d]:null)},e)}this.mappingContext=null;return e},rtept:function(g){var f={x:g.geometry.x,y:g.geometry.y};if(this.internalProjection&&this.externalProjection){OpenLayers.Projection.transform(f,this.internalProjection,this.externalProjection)}var e=this.createElementNSPlus("rtept",{uri:this.gpxns,attributes:{lat:OpenLayers.String.sprintf("%.*f",this.precision,f.y),lon:OpenLayers.String.sprintf("%.*f",this.precision,f.x)}});if(g.metadata){for(var d=0,b=this.tags.rtept.length;d<b;d++){var a=this.tags.rtept[d];this.writeNode(a,g.metadata,e)}}return e},trk:function(j){this.mappingContext="trk";var g=this.createElementNS(this.gpxns,"trk");for(var e=0,b=this.tags.trk.length;e<b;e++){var a=this.tags.trk[e];this.writeNode(a,j,g)}for(var e=0,b=j.geometry.components.length,h=0,d=0;e<b;e++){d=j.geometry.components[e].components.length;this.writeNode("trkseg",{geometry:j.geometry.components[e],metadata:(j.attributes.metadata?j.attributes.metadata.slice(h,h+d):null)},g);h+=d}this.mappingContext=null;return g},trkseg:function(e){var d=this.createElementNS(this.gpxns,"trkseg");for(var b=0,a=e.geometry.components.length;b<a;b++){this.writeNode("trkpt",{geometry:e.geometry.components[b],metadata:(e.metadata?e.metadata[b]:null)},d)}return d},trkpt:function(g){var f={x:g.geometry.x,y:g.geometry.y};if(this.internalProjection&&this.externalProjection){OpenLayers.Projection.transform(f,this.internalProjection,this.externalProjection)}var e=this.createElementNSPlus("trkpt",{uri:this.gpxns,attributes:{lat:OpenLayers.String.sprintf("%.*f",this.precision,f.y),lon:OpenLayers.String.sprintf("%.*f",this.precision,f.x)}});if(g.metadata){for(var d=0,b=this.tags.trkpt.length;d<b;d++){var a=this.tags.trkpt[d];this.writeNode(a,g.metadata,e)}}return e}}},assignAttribute:function(f,d,b){var e=(this.mapping[this.mappingContext||"gpx"]||this.mapping||{})[f];if(e==undefined){e=f}if(e!=null){b[e]=d}},readAttribute:function(e,d){var a=null;if(!d){return null}if(d instanceof OpenLayers.Feature.Vector){var b=(this.mapping[this.mappingContext||"gpx"]||this.mapping||{})[e];if(b==undefined){b=e}if(b!=null){a=d.attributes[b]}}else{a=d[e]}return a},assignPoint:function(b,e){var a=new OpenLayers.Geometry.Point(OpenLayers.Util.toFloat(b.getAttribute("lon"),this.precision),OpenLayers.Util.toFloat(b.getAttribute("lat"),this.precision));if(this.internalProjection&&this.externalProjection){a.transform(this.externalProjection,this.internalProjection)}if(this.extractAttributes){var d={attributes:{}};this.readChildNodes(b,d);if(!e.metadata){e.metadata=[]}e.metadata.push(d.attributes)}e.geometry.addComponent(a)},writeMetadata:function(b,a){},createTag:function(f,d,e){var b=null;var a=e||this.readAttribute(f,d);if(a!=null){b=this.createElementNSPlus(f,{uri:this.gpxns,value:a})}return b},CLASS_NAME:"Geoportal.Format.GPX.v1"});Geoportal.Format.GPX.v1.TAGS={};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:3857","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(e){var b=[];var p=e.split("\n");var f,d,a,o,g;for(f=0,d=p.length;f<d;f++){var m=p[f];if(m.charAt(0)=="/"){o=p[f].indexOf(" ");if(o<0){a=m.substring(o).replace("\r","")}else{a=m.substring(0,o);g=m.substring(o).replace("\r","")}switch(a){case"//$DELIMITER":break;case"//$SYSCOORD":var h=parseInt(g.substring(g.indexOf(":")+1,g.indexOf("}")));h=this.findCRS(h,"Type");if(h!=-1){this.externalProjection=new OpenLayers.Projection(this.SUPPORTED_CRSS[h].projCode[0])}break;case"//$FORMAT":if(parseInt(g.substring(g.indexOf(":")+1).replace(/ /g,""))==1){this.format=1}break;case"//$UNIT":this.unit=g.substring(g.indexOf(":")+1).replace(/ /g,"");switch(g){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=!(g.replace(/"/g,"")=="no");break;case"//$CHARSET":this.charset=g.replace(/ /g,"");break;case"//$3DOBJECT":this.dimensions=3;break;case"//$FIELD":break;default:break}continue}var j=this.readFeature(m);if(j){b.push(j);if(this.maxFeatures>0&&this.maxFeatures==b.length){break}}else{}}return b},readFeature:function(f){var j=f.split(this.separator);if(j.length<7){return null}var e=this.parseAttributes(j);var o=parseInt(j[4])+5;var r;var u,q,m=null;u=parseFloat(j[o++]);q=parseFloat(j[o++]);if(this.dimensions==3){m=parseFloat(f[o++])}if(j.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,e)}var b=true;var g=parseInt(j[o+2]);if(g*this.dimensions==j.length-o-3){o+=3}else{g=parseInt(f[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(j,v,o,g);if(b){r=new OpenLayers.Geometry.LineString(v)}else{var h=[];var d=new OpenLayers.Geometry.LinearRing(v);h.push(d);r=new OpenLayers.Geometry.Polygon(h)}r.transform(this.externalProjection,this.internalProjection);return new OpenLayers.Feature.Vector(r,e)},readComponent:function(e,g,h,a){var b=h+this.dimensions*a;if(b>data.length){return g}for(var d=h;d<b;d+=dim){var f=new OpenLayers.Geometry.Point(parseFloat(data[d]),parseFloat(data[d+1]));if(this.dimensions==3){f.z=parseFloat(data[d+2])}g.push(f)}return g},parseAttributes:function(b){var e={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 f=0;f<d;f++){if(attributs.length<f){e[attributs[f]]=b[5+f]}else{e["att"+f]=b[5+f]}}}return e},write:function(e){if(!(e instanceof Array)){e=[e]}var f='//$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"){f+="Angle:deg\n"}else{f+="Distance:m\n"}f+=this.writeCRS(a)}for(var d=0,b=e.length;d<b;d++){f+=this.writeFeature(e[d])}return f},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(f,a){var e="";var d=1;if(a){for(var b in a){d++}}e+=d+this.separator;e+=f+this.separator;if(a){for(var b in a){if(a.hasOwnProperty(b)){e+=a[b]?a[b].replace(/[\r\n]/g,"\\n"):"";e+=this.separator}}}return e},writeGeometry:function(e){e=e.clone();e.transform(this.internalProjection,this.externalProjection);var d=e.CLASS_NAME;var b=d.substring(d.lastIndexOf(".")+1);var a=this.buildGeometry[b.toLowerCase()];return a.apply(this,[e])},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(f){var e="";var d=f.components;for(var b=0,a=d.length;b<a;++b){if(b>0){e+=this.separator}e=this.buildCoordinates(d[b],true);if(b==0){e+=this.separator+(a-1)+this.separator}}return e},multipolygon:function(h){var g="";for(var d=0,b=h.components.length;d<b;d++){if(d>0){g+=this.separator}var f=h.componentTypes[d];var e=f.substring(f.lastIndexOf(".")+1);var a=this.buildGeometry[e.toLowerCase()];g+=a.apply(this,[h.components[d]]);if(d==0){g+=this.separator+(b-1)+this.separator}}return g}},buildCoordinates:function(g,f){var e;var d=g.components;if(d){var a=d.length;if(f){a--}e=d[0].x+this.separator+d[0].y+this.separator;if(!f){e+=d[a-1].x+this.separator+d[a-1].y+this.separator}e+=(a-1);for(var b=1;b<a;b++){e+=this.separator+d[b].x+this.separator+d[b].y}}else{e=g.x+this.separator+g.y}return e},findCRS:function(m,f){var g=-1;for(var e=0,a=this.SUPPORTED_CRSS.length;e<a&&g==-1;e++){var h=this.SUPPORTED_CRSS[e];switch(f){case"Type":if(h.Type==m){g=e}break;case"projCode":default:for(var b=0,d=h.projCode.length;b<d;b++){if(m==h.projCode[b]){g=e;break}}break}}return g},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(f){if(typeof f=="string"){f=OpenLayers.Format.XML.prototype.read.apply(this,[f])}if(f){var b=f.nodeType==9?f.documentElement:f;var a=this.version||this.defaultVersion;var d=this.coreService||this.defaultCoreService;if(!this.parser||this.parser.VERSION!=a||this.parser.CORESERVICE!=d){var e=Geoportal.Format.XLS["v"+a.replace(/\./g,"_")];var h=e?e[d]:null;if(!h){throw OpenLayers.i18n("XLS.version",{xlsVersion:a,coreService:d})}this.parser=new h(this.options)}var g=this.parser.read(b);return g}return null},write:function(e,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 f=Geoportal.Format.XLS["v"+a.replace(/\./g,"_")][d];if(!f){throw OpenLayers.i18n("XLS.version",{xlsVersion:a,coreService:d})}this.parser=new f(this.options)}return this.parser.write(e)},CLASS_NAME:"Geoportal.Format.XLS"});Geoportal.GeoRMHandler={};Geoportal.GeoRMHandler.Updater=OpenLayers.Class({GeoRMKey:null,serverUrl:null,ttl:600000,token:null,maps:null,tgts:null,queryUrl:null,lastUpdate:0,status:0,domHeads:null,scripts:null,reload:false,EVENT_TYPES:["tokenupdatestart","tokenupdateend","tokenloaded"],events:null,onTokenLoaded:function(a){a.setCenter(a.getCenter(),a.getZoom(),false,true)},initialize:function(d,b,a,e){OpenLayers.Util.extend(this,e);this.maps=[];this.tgts=[];this.scripts=[];this.domHeads=[];this.GeoRMKey=d;this.lastUpdate=0;this.serverUrl=b||Geoportal.GeoRMHandler.GEORM_SERVER_URL;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(e);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(f){for(var d=0,a=this.maps.length;d<a;d++){if(this.maps[d]===f){return}}this.maps.push(f);var e=f.div.ownerDocument||OpenLayers._document;for(var d=0,a=this.tgts.length;d<a;d++){if(this.tgts[d]===e){return}}this.tgts.push(e);var b=(e.getElementsByTagName("head").length?e.getElementsByTagName("head")[0]:e.body);this.domHeads.push(b);this.getToken()},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=null}if(this.token){this.token=null}if(this.maps){this.maps=null}if(this.tgts){this.tgts=null}if(this.scripts){this.scripts=null}if(this.domHeads){this.domHeads=null}if(this.queryUrl){this.queryUrl=null}},getToken:function(){if(this.domHeads.length==0){return null}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}for(var h=0,b=this.scripts.length;h<b;h++){var d=this.scripts[h];if(d){try{d.parentNode.removeChild(d)}catch(m){}this.scripts[h]=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}var f=this.queryUrl;for(var g in this.token){f+=g+"="+this.token[g]+"&"}for(var h=0,b=this.domHeads.length;h<b;h++){if(this.domHeads[h]==null){continue}try{var d=this.domHeads[h].ownerDocument.createElement("script");d.setAttribute("type","text/javascript");var j=f;if(this.transport=="referrer"){j+=Geoportal.GeoRMHandler.getCookieReferrer(this.domHeads[h])+"&"}d.setAttribute("src",j);this.domHeads[h].appendChild(d);this.scripts[h]=d;break}catch(m){this.domHeads[h]=null}}if(this.timeout){window.clearTimeout(this.timeout)}var a=this.status*this.ttl/10;this.timeout=window.setTimeout("Geoportal.GeoRMHandler.U"+this.GeoRMKey+" && 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.getCookieReferrer=function(g,m){var f=m===true?{}:"";if(Geoportal.Cookies.cookiesEnabled()){if(Geoportal.Cookies.get(Geoportal.GeoRMHandler.GEORM_REFERRER_COOKIENAME)===undefined){var j=g||OpenLayers._document;j=j.ownerDocument||j;var a=j.defaultView||j.parentWindow;var h=a.opener;var b="";try{b=h&&h.location&&h.location.href}catch(g){b=j.location.href}b="referrer,"+encodeURIComponent(b);f=m===true?{cookie:b}:"cookie="+b}}else{OpenLayers.Console.warn(OpenLayers.i18n("cookies.not.enabled"))}return f};Geoportal.GeoRMHandler.getContract=function(f){if(gGEOPORTALRIGHTSMANAGEMENT.pending>0){gGEOPORTALRIGHTSMANAGEMENT.pending--;if(f.error){OpenLayers.Console.warn(f.error)}else{gGEOPORTALRIGHTSMANAGEMENT.apiKey.push(f.key);gGEOPORTALRIGHTSMANAGEMENT[f.key]={tokenServer:{url:f.service,ttl:f.tokenTimeOut},tokenTimeOut:f.tokenTimeOut,bounds:f.boundingBox?[f.boundingBox.minx,f.boundingBox.miny,f.boundingBox.maxx,f.boundingBox.maxy]:[-180,-90,180,90],allowedGeoportalLayers:new Array(f.resources.length),resources:{}};for(var b=0,a=f.resources.length;b<a;b++){var e=f.resources[b];gGEOPORTALRIGHTSMANAGEMENT[f.key].allowedGeoportalLayers[b]=e.name+":"+e.type;gGEOPORTALRIGHTSMANAGEMENT[f.key].resources[e.name+":"+e.type]=OpenLayers.Util.extend({},e);if(gGEOPORTALRIGHTSMANAGEMENT.services[e.url]===undefined){if(gGEOPORTALRIGHTSMANAGEMENT.services[e.url]===undefined){gGEOPORTALRIGHTSMANAGEMENT.services[e.url]={id:"__"+e.url.replace(/[^a-z0-9.-]/gi,"_")+"__",type:e.type,caps:null}}}}var d=OpenLayers.Util.getElement("__"+f.key+"__");if(d&&d.parentNode){d.parentNode.removeChild(d)}}if(gGEOPORTALRIGHTSMANAGEMENT.pending==0&&typeof(gGEOPORTALRIGHTSMANAGEMENT.onContractsComplete)==="function"){gGEOPORTALRIGHTSMANAGEMENT.onContractsComplete()}}return gGEOPORTALRIGHTSMANAGEMENT};Geoportal.GeoRMHandler.getConfig=function(o,m,d,q){if(!o){return 0}if(typeof(o)=="string"){o=[o]}if(o.length==0){return 0}q=q||{};var b=function(u){if(!u){return null}var r=/\W*function\s+([\w\$]+)\(/.exec(u);if(!r){return null}return r[1]};var g=!m?"Geoportal.GeoRMHandler.getContract":typeof(m)=="string"?m:b(m);if(!g){return 0}var j=OpenLayers._document;var h=(j.getElementsByTagName("head").length?j.getElementsByTagName("head")[0]:j.body);for(var f=0,e=o.length;f<e;f++){var p=OpenLayers.Util.getElement("__"+o[f]+"__");if(p&&p.parentNode){p.parentNode.removeChild(p)}p=OpenLayers._document.createElement("script");p.id="__"+o[f]+"__";p.setAttribute("type","text/javascript");var a=(d||Geoportal.GeoRMHandler.GEORM_SERVER_URL)+"getConfig?key="+o[f]+"&output=json&callback="+g+"&";if(q.transport=="referrer"){a+=Geoportal.GeoRMHandler.getCookieReferrer(h)+"&"}p.setAttribute("src",a);h.appendChild(p)}if(!m){if(window.gGEOPORTALRIGHTSMANAGEMENT===undefined){gGEOPORTALRIGHTSMANAGEMENT={}}OpenLayers.Util.extend(gGEOPORTALRIGHTSMANAGEMENT,{pending:0,apiKey:[],services:{}});OpenLayers.Util.extend(gGEOPORTALRIGHTSMANAGEMENT,q);gGEOPORTALRIGHTSMANAGEMENT.pending+=o.length}return o.length};Geoportal.GeoRMHandler.getServicesCapabilities=function(m,o,e,r){if(window.gGEOPORTALRIGHTSMANAGEMENT===undefined){gGEOPORTALRIGHTSMANAGEMENT={}}if(!m){if(!gGEOPORTALRIGHTSMANAGEMENT.services){return null}m=gGEOPORTALRIGHTSMANAGEMENT.services}r=r||{};OpenLayers.Util.applyDefaults(r,gGEOPORTALRIGHTSMANAGEMENT.capabilities);var b=function(v){if(!v){return null}var u=/\W*function\s+([\w\$]+)\(/.exec(v);if(!u){return null}return u[1]};var g=!o?(r.callback?r.callback:"Geoportal.GeoRMHandler.getCapabilities"):(typeof(o)=="string"?o:b(o));if(!g){return null}for(var p in m){var d=m[p];var h=d.type;switch(d.type){case"WFS":break;case"WMTS":break;case"WMSC":h="WMS";break;case"WMS":break;default:d.caps={};continue}var j=OpenLayers._document;var f=(j.getElementsByTagName("head").length?j.getElementsByTagName("head")[0]:j.body);var q=OpenLayers.Util.getElement(d.id);if(q&&q.parentNode){q.parentNode.removeChild(q)}q=OpenLayers._document.createElement("script");q.id=d.id;q.setAttribute("type","text/javascript");var a=e||r.proxy||Geoportal.JSON_PROXY_URL;a=OpenLayers.Util.urlAppend(a,"url="+encodeURIComponent(OpenLayers.Util.urlAppend(p,"SERVICE="+h+"&REQUEST=GetCapabilities&"))+"&callback="+g+"&");q.setAttribute("src",a);f.appendChild(q)}if(!o){if(r.onCapabilitiesComplete){gGEOPORTALRIGHTSMANAGEMENT.onCapabilitiesComplete=r.onCapabilitiesComplete}}return m};Geoportal.GeoRMHandler.getCapabilities=function(j){if(!j){j={}}if(!j.http){j.http={}}if(!j.http.code){j.http.code=400}if(!j.http.url){j.http.url="http://localhost/?"}if(!j.xml){j.xml=""}var p=j.http.url.split("?")[0];var d=gGEOPORTALRIGHTSMANAGEMENT.services[p];if(j.http.code!=200){OpenLayers.Console.warn(OpenLayers.i18n("url.error",{url:j.http.url,msg:""}))}else{if(d){var m=OpenLayers.parseXMLString(j.xml);var e=null;switch(d.type){case"WFS":e=OpenLayers.Format.WFSCapabilities;break;case"WMTS":e=OpenLayers.Format.WMTSCapabilities;break;case"WMSC":case"WMS":e=OpenLayers.Format.WMSCapabilities;break;default:break}if(e){var a=new e();var g=null;try{g=a.read(m)}catch(o){OpenLayers.Console.warn("url.error",{url:j.http.url,msg:""})}finally{if(g&&g.exceptions){var b="";for(var h=0,f=g.exceptions.length;h<f;h++){b+=g.exceptions[h]+"\n"}OpenLayers.Console.warn("url.error",{url:j.http.url,msg:b})}else{d.caps=g}}}var q=OpenLayers.Util.getElement(d.id);if(q&&q.parentNode){q.parentNode.removeChild(q)}}}if(d&&!d.caps){d.caps={}}for(var d in gGEOPORTALRIGHTSMANAGEMENT.services){if(gGEOPORTALRIGHTSMANAGEMENT.services[d].caps===null){return}}if(typeof(gGEOPORTALRIGHTSMANAGEMENT.onCapabilitiesComplete)==="function"){gGEOPORTALRIGHTSMANAGEMENT.onCapabilitiesComplete()}};Geoportal.GeoRMHandler.addKey=function(d,b,a,g,e){var f=(OpenLayers._document.defaultView||OpenLayers._document.parentWindow).Geoportal.GeoRMHandler;if(!f["U"+d]){f["U"+d]=new Geoportal.GeoRMHandler.Updater(d,b,a,e);f["U"+d].getToken()}else{f["U"+d].addOptions(e)}f["U"+d].addMap(g);return f["U"+d]};Geoportal.GeoRMHandler.GEORM_REFERRER_COOKIENAME="__rfrrric__";Geoportal.GeoRMHandler.GEORM_SERVER_URL="http://jeton-api.ign.fr/";Geoportal.JSON_PROXY_URL="http://api.ign.fr/geoportail/api/xmlproxy?output=json";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,e,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(e,a,f){OpenLayers.Layer.HTTPRequest.prototype.moveTo.apply(this,arguments);e=e||this.map.getExtent();if(e!=null){var d=!this.grid.length||a;if(this.resample){d=true}var b=this.getTilesBounds();if(this.singleTile){if(d||(!f&&!b.containsBounds(e))){this.initSingleTile(e)}}else{if(d||!b.containsBounds(e,true)){this.initGriddedTiles(e)}else{this.moveGriddedTiles(e)}}}},calculateGridLayout:function(a,v,f){var p=f*this.tileSize.w;var d=f*this.tileSize.h;var m=a.left-this.gridOrigin.lon;var q=Math.floor(m/p)-this.buffer;var o=m/p-q;var g=-o*this.tileSize.w;var r=this.gridOrigin.lon+q*p;var b=a.top-(this.gridOrigin.lat+d);var j=Math.ceil(b/d)+this.buffer;var u=j-b/d;var e=-u*this.tileSize.h;var h=this.gridOrigin.lat+j*d;return{tilelon:p,tilelat:d,tileoffsetlon:r,tileoffsetlat:h,tileoffsetx:g,tileoffsety:e}},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 e=this.map.getSize();var f=Math.ceil(e.h/this.tileSize.h)+Math.max(1,2*this.buffer);var F=Math.ceil(e.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 j=new OpenLayers.Pixel(r,p);var g=v[T++];var m=Math.round(M+this.tileSize.w)-r;var z=Math.round(L+this.tileSize.h)-p;var h=new OpenLayers.Size(m,z);if(!g){g=this.addTile(K,j,h);this.addTileMonitoringHooks(g);v.push(g)}else{g.moveTo(K,j,false);g.setSize(h)}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<f);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(e,d,f,b){var a=[];f=OpenLayers.Util.upperCaseObject(f);a.push(e,d,f,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(e,a,d){var b=this.getURL(e);return new Geoportal.Tile.Image(this,a,e,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){return b}d=d||this.map.baseLayer;var e=d.getNativeProjection();var a=this.restrictedExtent||this.maxExtent;if(!a){return b}a=a.clone().transform(b,e);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 e=[];if(this._header&&this._header.errorList&&this._header.errorList.getNbErrors()>0){e=e.concat(this._header.errorList.getErrors())}for(var f=0,d=this.getNbBodies();f<d;f++){var a=this.getBodies()[f];if(a.errorList&&a.errorList.getNbErrors()>0){e=e.concat(a.errorList.getErrors())}}if(e.length==0){e=null}return e},CLASS_NAME:"Geoportal.OLS.XLS"});Geoportal.Popup.Anchored=OpenLayers.Class(Geoportal.Popup,{BORDER:2,anchor:null,relativePosition:null,border:"",initialize:function(d,g,p,e,f,a,m,h,j,o){var b=[d,g,p,e,a,j,o];Geoportal.Popup.prototype.initialize.apply(this,b);this.anchor=(f!=null?f:{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=h||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 f=0;var d=0;var g=this.map.getCenter();var m=this.map.getLayerPxFromLonLat(g);var e=this.map.getSize().w;var a=this.map.getSize().h;var j=this.map.getLayerPxFromLonLat(this.lonlat);var b=this.div.style.width;b=parseInt(b.replace("px",""));var h=this.div.style.height;h=parseInt(h.replace("px",""));if(e<b||a<h){this.panIntoView();return}f=j.x-m.x+(b/2);d=j.y-m.y-(h/2);if(Math.abs(f)>50||Math.abs(d)>50){this.map.pan(f,d)}}},calculateNewPx:function(b){var f=b.offset(this.anchor.offset);var a=this.size||this.contentSize;var e=(this.relativePosition&&this.relativePosition.charAt(0)=="t");f.y+=(e)?-a.h:this.anchor.size.h;var d=(this.relativePosition&&this.relativePosition.charAt(1)=="l");f.x+=(d)?-a.w:this.anchor.size.w;return f},CLASS_NAME:"Geoportal.Popup.Anchored"});Geoportal.Popup.Anchored._creat4KML=function(){var d;var a=OpenLayers.Util.extend({},this.layer.formatOptions);OpenLayers.Util.applyDefaults(a,{size:null,closeBox:true,onPopupClose:Geoportal.Popup.onPopupClose,backgroundColor:"#ffffff",opacity:0.75});var j=this.layer.formatOptions&&this.layer.formatOptions.popupClass?this.layer.formatOptions.popupClass:Geoportal.Popup.Anchored;var m;if(this.style){m=this.style.balloonStyle;if(m!=null){var e=/\$\{([a-zA-Z0-9_\-\.]*)\}/;while(m.match(e)){var g=RegExp.$1;g=(this.attributes[g]?(this.attributes[g].value?this.attributes[g].value:this.attributes[g]):"");m=m.replace(e,g)}}else{var h=this.layer.skipAttributes?this.layer.skipAttributes.slice(0):[];var b="";if(typeof(this.attributes.name)=="object"){b=this.attributes.name.value||""}else{b=this.attributes.name||""}if(b){h.push("name")}if(typeof(this.attributes.description)=="object"){m=this.attributes.description.value||""}else{m=this.attributes.description||""}m=Geoportal.Util.cleanContent(m);if(m){h.push("description")}var f=Geoportal.Control.renderFeatureAttributes(this,h);b=b||f[0];if(m!=""&&f[1]!=""){m+="<br/>"}m+=f[1];m=(b?b+"<br/>":"")+m}d=new j("chicken",this.geometry.getBounds().getCenterLonLat(),a.size,this.style.textColor?"<div class='gpPopupBody gpKML' style='"+this.style.textColor+";'>"+m+"</div>":"<div class='gpPopupBody gpKML'>"+m+"</div>",null,a.closeBox,this.style.bgColor,this.style.bgColorOpacity,a.onPopupClose,this)}else{var h=this.layer.skipAttributes?this.layer.skipAttributes.slice(0):[];var b="";if(typeof(this.attributes.name)=="object"){b=this.attributes.name.value||""}else{b=this.attributes.name||""}if(b){h.push("name")}if(typeof(this.attributes.description)=="object"){m=this.attributes.description.value||""}else{m=this.attributes.description||""}m=Geoportal.Util.cleanContent(m);if(m){h.push("description")}var f=Geoportal.Control.renderFeatureAttributes(this,h);b=b||f[0];if(m!=""&&f[1]!=""){m+="<br/>"}m+=f[1];d=new j("chicken",this.geometry.getBounds().getCenterLonLat(),a.size,"<div class='gpPopupHead gpKML'>"+b+"</div><div class='gpPopupBody gpKML'>"+m+"</div>",null,a.closeBox,a.backgroundColor,a.opacity,a.onPopupClose,this)}d=Geoportal.Popup.completePopup(d,this.layer.formatOptions);this.popup=d;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 e=this.layer.formatOptions&&this.layer.formatOptions.popupClass?this.layer.formatOptions.popupClass:Geoportal.Popup.Anchored;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 e("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 e=this.layer.formatOptions&&this.layer.formatOptions.popupClass?this.layer.formatOptions.popupClass:Geoportal.Popup.Anchored;var b=Geoportal.Control.renderFeatureAttributes(this);var a=new e("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 d=this.layer.formatOptions&&this.layer.formatOptions.popupClass?this.layer.formatOptions.popupClass:Geoportal.Popup.Anchored;var a=new d("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||"")+(this.attributes.pubDate&&this.attributes.author?"<div class='gpGeoRSSOriginator'>"+OpenLayers.i18n("lastUpdateDate")+this.attributes.pubDate+OpenLayers.i18n("by")+this.attributes.author+"</div>":"")+"</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.getImageSize();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(this.bounds);if(this.layerAlphaHack){OpenLayers.Util.modifyAlphaImageDiv(this.imgDiv,null,null,a,this.url)}else{OpenLayers.Util.modifyDOMElement(this.imgDiv,null,null,a);this.imgDiv.src=this.url}},initImgDiv:function(){var e=this.layer.imageOffset;var b=this.size||this.layer.getImageSize(this.bounds);if(this.layerAlphaHack){this.imgDiv=OpenLayers.Util.createAlphaImageDiv(null,e,b,null,"relative",null,null,null,true)}else{this.imgDiv=OpenLayers.Util.createImage(null,e,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(e,g,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=e;var f=null;if(g=="OpenLayers.Geometry.Point"){f=OpenLayers.Handler.Point}else{if(g=="OpenLayers.Geometry.LineString"){f=OpenLayers.Handler.Path}else{if(g=="OpenLayers.Geometry.Polygon"){if(this.regularPolygon){f=OpenLayers.Handler.RegularPolygon}else{f=OpenLayers.Handler.Polygon}}else{g=null}}}this.geometryType=g;if(!b){b={}}if(f){this.addControls(new OpenLayers.Control.DrawFeature(this.layer,f,OpenLayers.Util.extend(OpenLayers.Util.applyDefaults({},this.DEFAULT_OPTIONS[f.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;if(this.map){this.map.events.unregister("controldeleted",this,this.onControlRemoved)}Geoportal.Control.prototype.destroy.apply(this,arguments)},setMap:function(a){Geoportal.Control.prototype.setMap.apply(this,arguments);this.map.events.register("controldeleted",this,this.onControlRemoved)},onControlRemoved:function(a){if(!a){return}if(this.formControl){if(this.htmlElements){for(var b in this.htmlElements){if(this.htmlElements[b]&&this.htmlElements[b].kbControl===a.control){this.htmlElements[b].kbControl=null}}}}},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,onResize:this.resizeForm});this.labels={};this.buttons={};this.htmlElements={};this.resultDiv=null;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;this.resultDiv=null}if(!Geoportal.Control.prototype.deactivate.apply(this,arguments)){return false}return true},closeForm:function(b){this.deactivate();var d=this.map.getControlsByClass(OpenLayers.Control.KeyboardDefaults.prototype.CLASS_NAME)[0];if(d&&d.activeOverMapOnlySavedState){d.activeOverMapOnly=true;d.onMouseOver=OpenLayers.Control.KeyboardDefaults.prototype.onMouseOver;d.onMouseOut=OpenLayers.Control.KeyboardDefaults.prototype.onMouseOut;if(!d.active){d.activate()}}var a=this.map.getControlsByClass(/.*\.Control\.NavToolbar/)[0];if(a&&!a.controls[1].active){a.activateControl(a.controls[0])}},resizeForm:function(a,e){if(a&&e&&this.resultDiv){if(e.dy!=0&&this.resultDiv){var d="max-height";var b=OpenLayers.Element.getStyle(this.resultDiv,d);if(!b){d="height";b=OpenLayers.Element.getStyle(this.resultDiv,d)}if(b){b=parseInt(b);if(e.suffix.indexOf("t")>=0){b-=e.dy}if(e.suffix.indexOf("b")>=0){b+=e.dy}this.resultDiv.style[OpenLayers.String.camelize(d)]=b+"px"}}}},buildInputTextField:function(b,a){var f,d;if(typeof(a.type)=="undefined"||a.hidden===true){a.type="text"}if(!a.hidden){f=b.ownerDocument.createElement("label");f.id="lbl"+a.id+this.id;f.setAttribute("for",a.id+this.id);if(a.mandatory===true){f.style.fontWeight="bold"}this.buildTextNode(f,this.displayClass+"."+a.id)}if(a.type==="text"){d=b.ownerDocument.createElement("input")}else{d=b.ownerDocument.createElement("textarea")}d.id=a.id+this.id;if(a.name){d.name=a.name}else{d.name=d.id}if(a.type==="text"){if(!a.hidden){d.type="text"}else{d.type="hidden"}}if(a.value==undefined){a.value=""}d.value=a.value;if(a.size==undefined){a.size=80}if(a.type==="text"){if(a.size!=-1){d.size=a.size}if(a.length==undefined){a.length=128}if(a.length!=-1){d.maxLength=a.length}}else{if(typeof(a.rows)=="undefined"){a.rows=5}if(typeof(a.cols)=="undefined"){a.cols=25}d.rows=a.rows;d.cols=a.cols}if(a.css){d.className=a.css}d.disabled=a.disabled?true:false;d.hasFocus=false;if(!a.hidden){d.kbControl=this.map.getControlsByClass(OpenLayers.Control.KeyboardDefaults.prototype.CLASS_NAME)[0];this.addCallbacks(d,a);f.appendChild(d);b.appendChild(f);b.appendChild(b.ownerDocument.createElement("br"));f=this.addHelp(b,a)}else{b.appendChild(d)}return d},buildSelectField:function(f,d){var h,g;h=f.ownerDocument.createElement("label");h.id="lbl"+d.id+this.id;h.setAttribute("for",d.id+this.id);if(d.mandatory===true){h.style.fontWeight="bold"}this.buildTextNode(h,this.displayClass+"."+d.id);g=f.ownerDocument.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=f.ownerDocument.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}this.buildTextNode(j,d.options[b].text);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];this.addCallbacks(g,d);h.appendChild(g);f.appendChild(h);f.appendChild(f.ownerDocument.createElement("br"));h=this.addHelp(f,d);return g},buildCheckboxField:function(b,a){var f,d;f=b.ownerDocument.createElement("label");f.id="lbl"+a.id+this.id;f.setAttribute("for",a.id+this.id);this.buildTextNode(f,this.displayClass+"."+a.id);d=b.ownerDocument.createElement("input");d.id=a.id+this.id;if(a.name){d.name=a.name}else{d.name=d.id}d.value=d.id;d.type="checkbox";d.disabled=a.disabled?true:false;d.checked=a.checked?true:false;d.defaultChecked=a.defaultChecked?true:false;d.style.autocomplete="off";if(a.css){d.className=a.css}this.addCallbacks(d,a);f.appendChild(d);b.appendChild(f);b.appendChild(b.ownerDocument.createElement("br"));f=this.addHelp(b,a);return d},buildRadioFields:function(j,d){var h,o,m;h=j.ownerDocument.createElement("fieldset");h.className=this.displayClass+"RadioGroup";o=j.ownerDocument.createElement("legend");o.align=d.align||"left";this.buildTextNode(o,this.displayClass+"."+d.id);h.appendChild(o);for(var b=0,a=d.radios.length;b<a;b++){var f=d.radios[b];m=j.ownerDocument.createElement("input");m.id=f.id+this.id;if(d.name){m.name=d.name}else{m.name=d.id+this.id}m.value=m.id;m.type="radio";m.disabled=f.disabled?true:false;m.checked=f.checked?true:false;m.style.autocomplete="off";if(f.css){m.className=f.css}this.addCallbacks(m,f);h.appendChild(m);o=j.ownerDocument.createElement("label");o.id="lbl"+f.id+this.id;o.setAttribute("for",m.id);this.buildTextNode(o,this.displayClass+"."+f.id);h.appendChild(o);h.appendChild(j.ownerDocument.createElement("br"));o=this.addHelp(h,f)}j.appendChild(h);return h},buildTextNode:function(d,a){var b=d.ownerDocument.createTextNode(OpenLayers.String.trim(OpenLayers.i18n(a)));this.labels[a]=d;d.appendChild(b)},addCallbacks:function(e,d){if(d.callbacks&&d.callbacks.length>0){for(var b=0,a=d.callbacks.length;b<a;b++){OpenLayers.Event.observe(e,d.callbacks[b].evt,OpenLayers.Function.bind(d.callbacks[b].func,this,e));this.htmlElements[d.callbacks[b].evt+d.id+this.id]=e}}},addHelp:function(b,a){var d=b.ownerDocument.createElement("span");d.id="help"+a.id+this.id;d.className="gpFormSmall";this.buildTextNode(d,this.displayClass+"."+a.id+".help");b.appendChild(d);b.appendChild(b.ownerDocument.createElement("br"));return d},buildButton:function(f,a,d,b){var g;g=f.ownerDocument.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(e){if(e.keyCode==b||(b==13&&e.keyCode==10)){return d.apply(this,[g,e])}return true},this))}return g},buildImageButton:function(f,b,a,d){var g;g=f.ownerDocument.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){if(!this.resultDiv){this.resultDiv=a.ownerDocument.createElement("div");this.resultDiv.className=this.displayClass+"Results";this.resultDiv.id="results"+this.id;this.resultDiv.style.display="none";this.resultDiv.innerHTML="";a.appendChild(this.resultDiv)}},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.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.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"})]);this.defaultControl=this.controls[0]},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 f=0,d=this.controls.length;f<d;f++){var g=this.controls[f];var h=(g instanceof Geoportal.Control.PanelToggle);if(!g.panel_div){g.panel_div=this.div.removeChild(this.div.childNodes[0])}var e=g.panel_div;if(g.active===true){e.className=this.controls[f].displayClass+"ItemActive"}else{e.className=this.controls[f].displayClass+"ItemInactive"}if(e.parentNode){e=e.parentNode.removeChild(e)}if(h){if(this.panelVisibility){e.title=OpenLayers.i18n(g.displayClass+".opened")}else{e.title=OpenLayers.i18n(g.displayClass+".closed")}}this.div.appendChild(e);if(!h&&this.map){if(this.panelVisibility){e.style.display="block"}else{e.style.display="none"}}g.panel_div=null}}};this.panel.activateControl=function(f){if(!this.active){return false}if(f.type==OpenLayers.Control.TYPE_BUTTON){f.trigger();this.redraw();return}if(f.type==OpenLayers.Control.TYPE_TOGGLE){if(f.active){f.deactivate()}else{if(!(f instanceof Geoportal.Control.PanelToggle)&&this.map){this.map.events.triggerEvent("controlactivated",{control:f})}f.activate()}this.redraw();return}for(var e=0,d=this.controls.length;e<d;e++){if(this.controls[e]!=f){if(this.controls[e].type!=OpenLayers.Control.TYPE_TOGGLE){this.controls[e].deactivate()}}}if(this.map){this.map.events.triggerEvent("controlactivated",{control:f})}f.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)},displayInfo:function(a){var b=a.xy.y/this.levelBarIntervalLength;if(!this.map.fractionalZoom){b=Math.floor(b)}this.div.title=OpenLayers.i18n("approx.scale")+this.map.getApproxScaleDenominator(b)},sliderDrag:function(b){if(this.mouseDragStart!=null){var a=this.mouseDragStart.y-b.xy.y;var e=OpenLayers.Util.pagePosition(this.levelBarDiv);var d=b.clientY-e[1];if((this.minpos<=d)&&(d<this.maxpos)){var f=parseInt(this.slider.style.top);this.updateSlider(f-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 e=parseInt(this.slider.style.top);var a=e-b;var f=this.posToLevel(a);if(!this.map.fractionalZoom){f=Math.floor(f)}f=this.adjustLevel(f);this.map.zoomTo(f);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"},schemaLocation:"http://www.topografix.com/GPX/1/0/gpx.xsd",initialize:function(a){Geoportal.Format.GPX.v1.prototype.initialize.apply(this,[a]);this.tags=Geoportal.Format.GPX.v1_0.TAGS},readers:{gpx:OpenLayers.Util.applyDefaults({author:function(a,b){b.metadata.contactPerson.name=this.getChildValue(a)},email:function(a,b){b.metadata.contactPerson.email=this.getChildValue(a)},url:function(b,d){var a=this.getChildValue(b);if(d.attributes){if(!d.attributes.onlineResource){d.attributes.onlineResource={}}d.attributes.onlineResource.href=a}else{d.metadata.onlineResource.href=a}},urlname:function(b,d){var a=this.getChildValue(b);if(d.attributes){d.attributes.onlineResource.text=a}else{d.metadata.onlineResource.text=a}}},Geoportal.Format.GPX.v1.prototype.readers.gpx)},writers:{gpx:OpenLayers.Util.applyDefaults({author:function(a){return this.createTag("author",null,a.contactPerson.name)},email:function(a){return this.createTag("email",null,a.contactPerson.email)},url:function(a){if(a.onlineResource){return this.createTag("url",null,a.onlineResource.href)}else{if(a.attributes&&a.attributes.onlineResource){return this.createTag("url",null,a.attributes.onlineResource.href)}}},urlname:function(a){if(a.onlineResource){return this.createTag("urlname",null,a.onlineResource.text)}else{if(a.attributes&&a.attributes.onlineResource){return this.createTag("urlname",null,a.attributes.onlineResource.text)}}}},Geoportal.Format.GPX.v1.prototype.writers.gpx)},writeMetadata:function(f,e){if(f){for(var d=0,b=this.tags.gpx.length;d<b;d++){var a=this.tags.gpx[d];this.writeNode(a,f,e)}}},CLASS_NAME:"Geoportal.Format.GPX.v1_0"});Geoportal.Format.GPX.v1_0.TAGS=OpenLayers.Util.applyDefaults({gpx:["name","desc","author","email","url","urlname","time","keywords","bounds"],wpt:["ele","time","magvar","geoidheight","name","cmt","desc","src","url","urlname","sym","type","fix","sat","hdop","vdop","pdop","ageofdgpsdata","dgpsid"],rte:["name","cmt","desc","src","url","urlname","number"],rtept:["ele","time","magvar","geoidheight","name","cmt","desc","src","url","urlname","sym","type","fix","sat","hdop","vdop","pdop","ageofdgpsdata","dgpsid"],trk:["name","cmt","desc","src","url","urlname","number"],trkpt:["ele","time","course","speed","magvar","geoidheight","name","cmt","desc","src","url","urlname","sym","type","fix","sat","hdop","vdop","pdop","ageofdgpsdata","dgpsid"]},Geoportal.Format.GPX.v1.TAGS);Geoportal.Format.GPX.v1_1=OpenLayers.Class(Geoportal.Format.GPX.v1,{VERSION:"1.1",namespaces:{gpx:"http://www.topografix.com/GPX/1/1",xsi:"http://www.w3.org/2001/XMLSchema-instance"},schemaLocation:"http://www.topografix.com/GPX/1/1/gpx.xsd",initialize:function(a){Geoportal.Format.GPX.v1.prototype.initialize.apply(this,[a]);this.tags=Geoportal.Format.GPX.v1_1.TAGS},readers:{gpx:OpenLayers.Util.applyDefaults({metadata:function(a,b){this.readChildNodes(a,b)},author:function(a,d){var b=this.mappingContext;this.mappingContext="contactPerson";this.readChildNodes(a,d);this.mappingContext=b},email:function(a,b){b.metadata.contactPerson.email=a.getAttribute("id")+"@"+a.getAttribute("domain")},copyright:function(a,b){b.metadata.owner.author=a.getAttribute("author");this.readChildNodes(a,b)},year:function(a,b){b.metadata.owner.year=this.getChildValue(a)},license:function(a,b){b.metadata.owner.license=this.getChildValue(a)},link:function(b,e){var a=b.getAttribute("href");if(e.attributes){if(!e.attributes.onlineResource){e.attributes.onlineResource={}}e.attributes.onlineResource.href=a}else{switch(this.mappingContext){case"contactPerson":e.metadata.contactPerson.onlineResource={href:a};break;default:e.metadata.onlineResource.href=a;break}}var d=this.mappingContext;switch(d){case"wpt":case"rte":case"rtept":case"trk":case"trkpt":this.mappingContext="link";break;default:break}this.readChildNodes(b,e);this.mappingContext=d},text:function(b,d){var a=this.getChildValue(b);if(d.attributes){d.attributes.onlineResource.text=a}else{switch(this.mappingContext){case"contactPerson":d.metadata.contactPerson.onlineResource.text=a;break;default:d.metadata.onlineResource.text=a;break}}}},Geoportal.Format.GPX.v1.prototype.readers.gpx)},writers:{gpx:OpenLayers.Util.applyDefaults({metadata:function(f){var e=null;if(f){e=this.createElementNS(this.gpxns,"metadata");for(var d=0,b=this.tags.gpx.length;d<b;d++){var a=this.tags.gpx[d];this.writeNode(a,f,e)}}return e},author:function(b){var a=this.createElementNS(this.gpxns,"author");this.writeNode("name",b.contactPerson,a);this.writeNode("email",b.contactPerson,a);this.writeNode("link",b.contactPerson,a);return a},email:function(d){var b=d.email.split("@");var a=this.createElementNSPlus("email",{uri:this.gpxns,attributes:{id:b[0]||"nobody",domain:b[1]||"localhost"}});return a},copyright:function(b){var a=this.createElementNSPlus("copyright",{uri:this.gpxns,attributes:{author:b.owner.author}});this.writeNode("year",b.owner,a);this.writeNode("license",b.owner,a);return a},year:function(b){var a=this.createElementNSPlus("year",{uri:this.gpxns,value:b.year});return a},license:function(b){var a=this.createElementNSPlus("license",{uri:this.gpxns,value:b.license});return a},link:function(e){var a=(e.attributes||e.metadata||e).onlineResource;var b=this.createElementNSPlus("link",{uri:this.gpxns,attributes:{href:a.href}});this.writeNode("text",a,b);var d=this.mappingContext;this.mappingContext="link";this.writeNode("type",a,b);this.mappingContext=d;return b},text:function(b){var a=this.createElementNSPlus("text",{uri:this.gpxns,value:b.text});return a}},Geoportal.Format.GPX.v1.prototype.writers.gpx)},writeMetadata:function(b,a){if(b){var d=this.writers.gpx["metadata"].apply(this,[b]);if(a){a.appendChild(d)}}},CLASS_NAME:"Geoportal.Format.GPX.v1_1"});Geoportal.Format.GPX.v1_1.TAGS={gpx:["name","desc","author","copyright","link","time","keywords","bounds"],wpt:["ele","time","magvar","geoidheight","name","cmt","desc","src","link","sym","type","fix","sat","hdop","vdop","pdop","ageofdgpsdata","dgpsid"],rte:["name","cmt","desc","src","link","number","type"],rtept:["ele","time","magvar","geoidheight","name","cmt","desc","src","link","sym","type","fix","sat","hdop","vdop","pdop","ageofdgpsdata","dgpsid"],trk:["name","cmt","desc","src","link","number","type"],trkpt:["ele","time","course","speed","magvar","geoidheight","name","cmt","desc","src","link","sym","type","fix","sat","hdop","vdop","pdop","ageofdgpsdata","dgpsid"]};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(e,d,b){var a=[];a.push(e,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 e=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(e));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=this.div.ownerDocument.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(e){this.buildInputTextField(e,{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 f={value:this.supportedClasses[b],selected:(b==0),text:this.displayClass+".layerType."+this.supportedClasses[b].split(".").pop()};d.push(f)}this.buildSelectField(e,{id:"layerType",mandatory:true,options:d,callbacks:[{evt:"click",func:this.onClick},{evt:"change",func:this.onChange}]});this.buildButton(e,"cancel",this.closeForm);this.buildButton(e,"add",this.onClick,13);this.wImg=this.buildImageButton(e,"wait",Geoportal.Util.getImagesLocation()+"loading.gif");this.wImg.style.display="none";this.buildResultsField(e)},closeForm:function(){this.abortRequest();Geoportal.Control.Form.prototype.closeForm.apply(this,arguments)},onClick:function(g,q){if(q||window.event){OpenLayers.Event.stop(q?q:window.event)}var p=["layerUrl","layerType"];var b="^("+p.join("|")+")";var r=new RegExp(b);if(g.id.match(r)&&OpenLayers.String.contains(g.id,this.id)){if(!g.hasFocus){for(var j=0,d=p.length;j<d;j++){var o=OpenLayers.Util.getElement(p[j]+this.id);if(o&&g.id!=o.id&&o.hasFocus){Geoportal.Control.Form.focusOff(o)}}Geoportal.Control.Form.focusOn(g)}return false}if(g.id.match(/^add/)){g=OpenLayers.Util.getElement("layerType"+this.id);var m=OpenLayers.String.trim(g.options[g.selectedIndex].value);if(m==""){return false}g.options[0].selected=true;var f=m.match(/.*\.Layer\.(WMS|WMSC)$/);if(f){var a=OpenLayers.Util.getElement("layerUrl"+this.id);if(!a){return false}a=OpenLayers.String.trim(a.value);if(a.length==0){return false}this.wImg.style.display="";this.request=OpenLayers.Request.GET({async:this.asynchronousCapabilities,url:a,params:{SERVICE:"WMS",REQUEST:"GetCapabilities"},success:this.successedInLoadingUrl,failure:this.failedOnLoadingUrl,scope:{cntrl:this,serviceType:f[1]}})}else{OpenLayers.Console.error("type "+m+" 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,e){return e.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;for(var d in q.srs){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=this.cntrl.div.ownerDocument.createElement("div");z.className="gpWMSCapsLayersResult";if((C%2)==1){z.className+="Alternate"}var v=this.cntrl.div.ownerDocument.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=this.cntrl.div.ownerDocument.createElement("div");z.className="gpWMSCapsLayersResult";var v=this.cntrl.div.ownerDocument.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 o=this.cntrl.map.catalogue.getLayerParameters(this.cntrl.map.baseLayer.territory,D.name+":"+this.serviceType);if(o){this.cntrl.map.getApplication().addGeoportalLayer(o.resourceId,{visibility:true,view:{drop:true,zoomToExtent:true}});if(this.cntrl.map.getZoom()<o.options.minZoomLevel){this.cntrl.map.zoomTo(o.options.minZoomLevel)}else{if(o.options.maxZoomLevel<this.cntrl.map.getZoom()){this.cntrl.map.zoomTo(o.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 w=0,q=this.caps.capability.exception.formats.length;w<q;w++){F[this.caps.capability.exception.formats[w]]=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 w=0,q=D.formats.length;w<q;w++){F[D.formats[w]]=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 r=null;var I=new OpenLayers.Projection(a);if(D.bbox[a]){r=OpenLayers.Bounds.fromArray(D.bbox[a].bbox)}else{if(D.llbbox&&D.llbbox.length>0){r=OpenLayers.Bounds.fromArray(D.llbbox);if(I.getProjName()!="longlat"||!OpenLayers.Projection.CRS84.isCompatibleWith(I)){r.transform(OpenLayers.Projection.CRS84,I)}}}var e={projection:a,units:I.getUnits(),singleTile:true,maxExtent:r,visibility:true};switch(this.serviceType){case"WMS":if(D.minScale){e.minZoomLevel=this.cntrl.map.getZoomForResolution(OpenLayers.Util.getResolutionFromScale(D.minScale,this.cntrl.map.getProjection().getUnits()));if(!this.cntrl.map.isValidZoomLevel(e.minZoomLevel)){e.minZoomLevel=undefined}}if(e.minZoomLevel==undefined){e.minZoomLevel=this.cntrl.map.baseLayer.minZoomLevel}if(D.maxScale){e.maxZoomLevel=this.cntrl.map.getZoomForResolution(OpenLayers.Util.getResolutionFromScale(D.maxScale,this.cntrl.map.getProjection().getUnits()));if(!this.cntrl.map.isValidZoomLevel(e.maxZoomLevel)){e.maxZoomLevel=undefined}}if(e.maxZoomLevel==undefined){e.maxZoomLevel=this.cntrl.map.baseLayer.maxZoomLevel}break;case"WMSC":var N=this.caps.capability.vendorSpecificCaps.tilesets;for(var g=0,h=N.length;g<h;g++){var H=N[g];if(!(a in H.srs)){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){e.nativeTileSize=new OpenLayers.Size(H.width,H.height)}e.minZoomLevel=this.cntrl.map.baseLayer.minZoomLevel;e.maxZoomLevel=this.cntrl.map.baseLayer.maxZoomLevel;e.nativeResolutions=H.resolutions.slice(0);var m=H.resolutions.slice(0);if(!I.equals(this.cntrl.map.getProjection())){for(var Q=0,M=m.length;Q<M;Q++){var J=new OpenLayers.LonLat(m[Q],0);J.transform(I,this.cntrl.map.getProjection());m[Q]=parseFloat(J.lon.toFixed(0))}}var P=this.cntrl.map.resolutions[e.minZoomLevel],K=this.cntrl.map.resolutions[e.maxZoomLevel];if(m[m.length-1]>P||m[0]<K){e.minZoomLevel=this.cntrl.map.baseLayer.maxZoomLevel+1;e.maxZoomLevel=this.cntrl.map.baseLayer.maxZoomLevel+1}else{if(m[0]>=P){}else{do{e.minZoomLevel++;P=this.cntrl.map.resolutions[e.minZoomLevel]}while(m[0]<P&&e.minZoomLevel<e.maxZoomLevel)}if(m[m.length-1]<=K){}else{do{e.maxZoomLevel--;K=this.cntrl.map.resolutions[e.maxZoomLevel]}while(m[m.length-1]>K&&e.maxZoomLevel>e.minZoomLevel)}}for(var Q=0,M=e.minZoomLevel-1;Q<M;Q++){e.nativeResolutions.unshift(0)}for(var Q=e.maxZoomLevel+1,M=Geoportal.Catalogue.RESOLUTIONS.length-1;Q<M;Q++){e.nativeResolutions.push(0)}break}e.singleTile=false;break;default:break}e.description=[];if(D.attribution){if(D.attribution.title){e.description.push(D.attribution.title)}if(D.attribution.href&&!D.attribution.logo){e.description.push('<a href="'+D.attribution.href+'" target="_blank">'+D.title+"</a>")}}if(D["abstract"]){e.description.push(D["abstract"])}e.originators=[{logo:"logo"+D.name}];if(D.attribution&&D.attribution.logo&&D.attribution.logo.href){e.originators[0].pictureUrl=D.attribution.logo.href}else{e.originators[0].pictureUrl=Geoportal.Util.getImagesLocation()+"logo_unknownAuthority.gif"}if(D.attribution&&D.attribution.href){e.originators[0].url=D.attribution.href}else{if(D.AuthorityURL&&D.AuthorityURL[0]&&D.AuthorityURL[0].href){e.originators[0].url=D.AuthorityURL[0].href}else{e.originators[0].url="javascript:void(0)"}}if(D.metadataURLs&&D.metadataURLs.length>0){e.metadataURL=[];for(var O=0,z=D.metadataURLs.length;O<z;O++){e.metadataURL.push(D.metadataURLs[O].href)}}if(D.dataURLs&&D.dataURLs.length>0){e.dataURL=[];for(var O=0,z=D.dataURLs.length;O<z;O++){e.dataURL.push(D.dataURLs[O].href)}}if(D.styles&&D.styles.length>0){e.legends=[];for(var Q=0,M=D.styles.length,O=0;Q<M;Q++){var f=D.styles[Q];if(f.legend&&f.legend.href){e.legends[O]={style:f.name,title:f.title,href:f.legend.href,width:f.legend.width,height:f.legend.height};++O}}if(e.legends.length==0){e.legends=null}}if(this.serviceType=="WMS"&&this.caps.capability.request.getfeatureinfo){var u=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(u.formats,E[L])!=-1){break}}if(L!=b){e.afterAdd=function(){var p=this.map.getControlsBy("id","basic_"+this.id)[0];if(!p){return}var j=new OpenLayers.Control.WMSGetFeatureInfo({url:u.href,layers:[this],title:"OpenLayers.Control.WMSGetFeatureInfo.title",type:OpenLayers.Control.TYPE_BUTTON,queryVisible:true,infoFormat:E[L],maxFeatures:1,eventListeners:{getfeatureinfo:function(V){var S="";if(typeof(V.features)!="undefined"){for(var Y=0,U=V.features.length;Y<U;Y++){var W=Geoportal.Control.renderFeatureAttributes(V.features[Y]);S+='<div class="gpPopupHead">'+W[0]+'</div><div class="gpPopupBody">'+W[1]+"</div>"}}else{if(V.text){S=V.object.infoFormat=="text/plain"?'<div class="gpPopupBody">'+V.text.replace(/[\r\n]/g,"<br/>").replace(/ /g,"&nbsp;")+"</div>":V.text}}if(S){this.map.addPopup(new OpenLayers.Popup.FramedCloud("chicken",this.map.getLonLatFromPixel(V.xy),null,Geoportal.Util.cleanContent(S),null,true))}}},trigger:function(){if(this.active){this.deactivate()}else{this.activate()}}});p.addControls([j])}}}this.cntrl.wImg.style.display="none";var v=this.cntrl.map.addLayer(this.serviceType==="WMSC"?"WMS-C":this.serviceType,D.title,this.caps.capability.request.getmap.href,R,OpenLayers.Util.extend(e,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,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.layerVectorOptions){this.layerVectorOptions={}}},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=this.div.ownerDocument.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 j=false,h=false;var g=false,m=false;for(var e=0,f=this.supportedClasses.length;e<f;e++){var d={value:this.supportedClasses[e],selected:(e==0),text:this.displayClass+".layerType."+this.supportedClasses[e].split(".").pop()};if(this.supportedClasses[e].match(/^OpenLayers\.Geometry\.(LineString|Polygon)$/)){j=true;if(e==0){h=true}}if(this.supportedClasses[e].match(/^(.*\.Format\.(KML|GPX|OSM)|OpenLayers\.Layer\.(WFS|GeoRSS))$/)){g=true;if(e==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(j){this.buildCheckboxField(b,{id:"layerFreeHand",disabled:!h})}if(g){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)},closeForm:function(){this.abortRequest();Geoportal.Control.Form.prototype.closeForm.apply(this,arguments)},onClick:function(d,w){if(w||window.event){OpenLayers.Event.stop(w?w:window.event)}var J=["layerName","layerType","layerUrl"];var b="^("+J.join("|")+")";var K=new RegExp(b);if(d.id.match(K)&&OpenLayers.String.contains(d.id,this.id)){if(!d.hasFocus){for(var G=0,D=J.length;G<D;G++){var I=OpenLayers.Util.getElement(J[G]+this.id);if(I&&d.id!=I.id&&I.hasFocus){Geoportal.Control.Form.focusOff(I)}}Geoportal.Control.Form.focusOn(d)}return false}if(d.id.match(/^add/)){d=OpenLayers.Util.getElement("layerType"+this.id);var H=OpenLayers.String.trim(d.options[d.selectedIndex].value);if(H==""){return false}d.options[0].selected=true;var E=H.match(/^OpenLayers\.Geometry\.(Point|LineString|Polygon)$/)!=null;var C=H.match(/.*\.Format\.(KML|GPX|OSM)$/);var u=C!=null;var L=u?C[1]:"";C=H.match(/.*\.Layer\.(WFS|GeoRSS)$/);var f=C!=null;var j=f?C[1]:"";if(!E&&!u&&!f){return false}d=OpenLayers.Util.getElement("layerName"+this.id);var M=OpenLayers.String.trim(d.value);if(M==""&&(!f||j=="GeoRSS")){return false}d.value="";var a=false;d=OpenLayers.Util.getElement("layerFreeHand"+this.id);if(d!=null){a=d.checked;if(H.match(/Point$/)){a=false}d.checked=false}var v=null;if(E){this.wImg.style.display="";v=new OpenLayers.Layer.Vector(M,OpenLayers.Util.extend({hasType:H,projection:this.map.getProjection().clone(),styleMap:this.styleMapTemplates?this.styleMapTemplates[H].clone():undefined,view:{drop:true,zoomToExtent:true}},this.layerVectorOptions[H]));this.map.addLayer(v);var r=OpenLayers.Util.extend({},v.style||v.styleMap.createSymbolizer());r.fillOpacity=1;r.strokeOpacity=0.5;var B=OpenLayers.Util.applyDefaults({},{id:"edit_"+v.id,div:OpenLayers.Util.getElement("edit_"+v.id),drawFeatureOptions:OpenLayers.Util.extend({handlerOptions:{style:"default",layerOptions:{styleMap:this.styleMapTemplates?this.styleMapTemplates[H]:undefined},freehand:a}},this.drawFeatureOptions[H]),dragFeatureOptions:OpenLayers.Util.extend({},this.dragFeatureOptions[H]),modifyFeatureOptions:OpenLayers.Util.extend({virtualStyle:r},this.modifyFeatureOptions[H]),deleteFeatureOptions:OpenLayers.Util.extend({},this.deleteFeatureOptions[H]),selectFeatureOptions:OpenLayers.Util.extend({multiple:false,clickout:true,toggle:true,hover:false,box:false},this.selectFeatureOptions[H])});B=OpenLayers.Util.extend(B,this.editingToolbarOptions[H]);var z=new Geoportal.Control.EditingToolbar(v,H,B);this.map.addControl(z);v.setVisibility(false)}else{if(u||(f&&j=="GeoRSS")){var q=OpenLayers.Util.getElement("layerUrl"+this.id);if(!q){return false}q=OpenLayers.String.trim(q.value);if(q.length==0){return false}this.wImg.style.display="";var g=OpenLayers.Util.extend({visibility:true,styleMap:this.styleMapTemplates?this.styleMapTemplates[H]:undefined},this.layerVectorOptions[H]);if(!g.eventListeners){g.eventListeners={}}var F=g.eventListeners.loadend;g.eventListeners.loadend=function(){if(typeof(F)=="function"){F()}var e=this.getDataExtent();if(e){if(e.getWidth()==0||e.getHeight()==0){}else{this.map.zoomToExtent(e)}}};v=this.map.addLayer(L||j,M,q,g,{preventDefaultBehavior:{loadend:true}})}else{if(f){var q=OpenLayers.Util.getElement("layerUrl"+this.id);if(!q){return false}q=OpenLayers.String.trim(q.value);if(q.length==0){return false}this.wImg.style.display="";this.request=OpenLayers.Request.GET({async:this.asynchronousCapabilities,url:q,params:{SERVICE:"WFS",REQUEST:"GetCapabilities"},success:this.successedInLoadingUrl,failure:this.failedOnLoadingUrl,scope:{cntrl:this,serviceType:"WFS",name:M}});return false}else{OpenLayers.Console.error("type "+H+" 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.request=null;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.request=null;this.cntrl.wImg.style.display="none";OpenLayers.Console.userError(d.responseText);return}this.request=null;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(f,e){return e.title<f.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=this.cntrl.div.ownerDocument.createElement("div");q.className="gpWFSCapsFeatureTypesResult";if((F%2)==1){q.className+="Alternate"}var o=this.cntrl.div.ownerDocument.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=this.cntrl.div.ownerDocument.createElement("div");q.className="gpWFSCapsFeatureTypesResult";var o=this.cntrl.div.ownerDocument.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(u){if(u||window.event){OpenLayers.Event.stop(u?u:window.event)}this.cntrl.wImg.style.display="";var h=this.caps.featureTypeList.featureTypes[this.featureTypeIndex];var d={VERSION:this.caps.version,TYPENAME:h.name};var q=null;if(h.bbox.length>0){q=new OpenLayers.Bounds();for(var e=0,g=h.bbox.length;e<g;e++){q.extend(OpenLayers.Bounds.fromArray(h.bbox[e]))}var b=new OpenLayers.Projection(h.srs);q.transform(OpenLayers.Projection.CRS84,b)}var v={projection:h.srs,maxExtent:q,visibility:true};var o="OpenLayers.Layer.WFS";switch(this.serviceType){case"WFS":break;default:break}if(h["abstract"]){v.description=h["abstract"]}v.originators=[{logo:"logo"+h.name,pictureUrl:Geoportal.Util.getImagesLocation()+"logo_unknownAuthority.gif",url:(h.href?h.href:"javascript:void(0)")}];if(h.metadataURLs&&h.metadataURLs.length>0){v.metadataURL=[];for(var e=0,r=h.metadataURLs.length;e<r;e++){v.metadataURL.push(h.metadataURLs[e].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&&this.caps.capability.operations.GetFeature.post.href)||(this.caps.capability.operations.GetFeature.get&&this.caps.capability.operations.GetFeature.get.href);break;default:break}var m=this.cntrl.map.addLayer(this.serviceType,h.title||this.name,a,d,OpenLayers.Util.extend(v,this.cntrl.layerVectorOptions[o]));this.cntrl.closeForm()},failedOnLoadingUrl:function(a){OpenLayers.Console.userError(a.statusText);this.request=null;this.cntrl.closeForm()},abortRequest:function(){if(this.request){this.request.abort();this.request=null}},CLASS_NAME:"Geoportal.Control.AddVectorLayer"});Geoportal.Control.CSW=OpenLayers.Class(Geoportal.Control.Form,{type:OpenLayers.Control.TYPE_TOGGLE,bBoxViewer:null,bboxMapDiv:null,cswUrl:"http://www.geocatalogue.fr/api-public/servicesRest",getRecordsString:"",request:null,initialize:function(a){Geoportal.Control.Form.prototype.initialize.apply(this,[a])},destroy:function(){this.abortRequest();this.bboxMapDiv=null;Geoportal.Control.Form.prototype.destroy.apply(this,arguments)},activate:function(){if(!Geoportal.Control.Form.prototype.activate.apply(this,arguments)){return false}var a=this.div.ownerDocument.createElement("form");a.id="__searchcsw__"+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);return true},deactivate:function(){this.bboxViewer=null;return Geoportal.Control.Form.prototype.deactivate.apply(this,arguments)},loadContent:function(e){this.buildInputTextField(e,{id:"cswTitle",mandatory:false,size:60,callbacks:[{evt:"click",func:this.onFocus}],value:""});var a=["NoKeyWords","Addresses","AdministrativeUnits","Agricultural","RegulationZones","Atmospheric","BioGeographical","Buildings","Cadastral","CoordinateSystems","Elevation","Energy","EnvironmentalFacilities","GeographicalSystems","GeographicalNames","Geology","Habitats","HumanHealth","Hydrography","LandCover","LandUse","Meteorological","Mineral","NaturalRiskZones","Oceanographic","Orthoimagery","Population","Production","ProtectedSites","SeaRegions","Soil","SpeciesDistribution","StatisticalUnits","TransportNetworks","UtilityServices"];var g=[];for(var d=0,b=a.length;d<b;d++){var f={value:OpenLayers.i18n("gpControlCSW.cswKeyWords."+a[d]),selected:false,text:OpenLayers.i18n("gpControlCSW.cswKeyWords."+a[d])};g.push(f)}this.buildSelectField(e,{id:"cswKeyWords",length:5,multiple:true,mandatory:false,options:g,callbacks:[{evt:"click",func:this.onFocus}]});this.buildInputTextField(e,{id:"cswOrganism",mandatory:false,size:60,callbacks:[{evt:"click",func:this.onFocus}],value:""});this.buildRadioFields(e,{id:"cswBBOX",radios:[{id:"cswNoBBOX",checked:true,callbacks:[{evt:"click",func:this.hideBBOXMap}]},{id:"cswCurrentBBOX",callbacks:[{evt:"click",func:this.hideBBOXMap}]},{id:"cswPersonnalBBOX",callbacks:[{evt:"click",func:this.onClick}]}]});this.bboxMapDiv=e.ownerDocument.createElement("div");this.bboxMapDiv.id="bboxMap"+this.id;this.bboxMapDiv.className=this.displayClass+"BBOX";OpenLayers.Element.hide(this.bboxMapDiv);e.appendChild(this.bboxMapDiv);e.appendChild(e.ownerDocument.createElement("br"));this.buildButton(e,"cancel",this.closeForm);this.buildButton(e,"search",this.onSearchClick,13);this.wImg=this.buildImageButton(e,"wait",Geoportal.Util.getImagesLocation()+"loading.gif");this.wImg.style.display="none";this.buildResultsField(e)},closeForm:function(){this.abortRequest();Geoportal.Control.Form.prototype.closeForm.apply(this,arguments)},onFocus:function(g,b){if(b||window.event){OpenLayers.Event.stop(b?b:window.event)}var j=["cswTitle","cswKeyWords","cswOrganism"];var f="^("+j.join("|")+")";var m=new RegExp(f);if(g.id.match(m)&&OpenLayers.String.contains(g.id,this.id)){if(!g.hasFocus){this.resultDiv.style.display="none";for(var d=0,a=j.length;d<a;d++){var h=OpenLayers.Util.getElement(j[d]+this.id);if(h&&g.id!=h.id&&h.hasFocus){Geoportal.Control.Form.focusOff(h)}}Geoportal.Control.Form.focusOn(g)}return false}},onClick:function(p){this.resultDiv.style.display="none";OpenLayers.Element.show(this.bboxMapDiv);if(this.bboxViewer==null){var h={apiKey:[]};var f="GEOGRAPHICALGRIDSYSTEMS.MAPS:WMSC";for(var e=0,b=this.map.catalogue.apiKey.length;e<b;e++){var d=this.map.catalogue.apiKey[e];h.apiKey.push(d);var g=this.map.catalogue[d]||{};h[d]={tokenServer:g.tokenServer||"http://localhost/",tokenTimeOut:g.tokenTimeOut||60000,transport:g.transport||"json",bounds:(g.bounds||new OpenLayers.Bounds(-180,-90,180,90)).toArray(),resources:{},allowedGeoportalLayers:[]};if(g.layers.hasOwnProperty(f)){h[d].resources[f]=OpenLayers.Util.applyDefaults({},g.layers[f]);h[d].allowedGeoportalLayers.push(f)}}var o=new OpenLayers.Control.ZoomBox({keyMask:OpenLayers.Handler.MOD_CTRL});var a=OpenLayers.Util.extend({mode:"mini",territory:this.map.baseLayer.territory,projection:this.map.getProjection(),controls:[o,new OpenLayers.Control.Navigation()],nameInstance:"bboxViewer",loadTheme:function(){}},h);this.bboxViewer=new Geoportal.Viewer.Default(this.bboxMapDiv.id,a);if(this.bboxViewer){this.bboxViewer.addGeoportalLayer(f,{opacity:1,visibility:true});o.activate();(this.bboxViewer.getMap().getControlsByClass("Geoportal.Control.PermanentLogo")[0]).destroy();(this.bboxViewer.getMap().getControlsByClass("Geoportal.Control.TermsOfService")[0]).destroy()}else{o.destroy();OpenLayers.Element.hide(this.bboxMapDiv)}}if(this.bboxViewer){var m=this.map.getCenter().transform(this.map.getProjection(),OpenLayers.Projection.CRS84);var j=Math.max(this.map.getZoom()-4,0);this.bboxViewer.getMap().setCenterAtLonLat(m.lon,m.lat,j)}},hideBBOXMap:function(a){this.resultDiv.style.display="none";OpenLayers.Element.hide(this.bboxMapDiv)},onSearchClick:function(f,o){this.getRecordsString="";this.manager=null;if(o||window.event){OpenLayers.Event.stop(o?o:window.event)}var m=OpenLayers.Util.getElement("cswTitle"+this.id).value;var a=[];var j=OpenLayers.Util.getElement("cswKeyWords"+this.id);for(var g=0,b=j.options.length;g<b;g++){if(j.options[g].selected){a.push(OpenLayers.String.stripAccentedLetters(j.options[g].value))}}var d=OpenLayers.Util.getElement("cswOrganism"+this.id).value;var p=null;var h=null;if(OpenLayers.Util.getElement("cswCurrentBBOX"+this.id).checked){h=this.map}else{if(OpenLayers.Util.getElement("cswPersonnalBBOX"+this.id).checked){h=this.bboxViewer.getMap()}}if(h){p=h.getExtent().transform(h.getProjection(),OpenLayers.Projection.CRS84)}if(m!=""||a.length>=1||d!=""||p!=null){this.getRecords(m,a,d,p,1)}return false},getRecords:function(o,a,f,r,g){if(this.getRecordsString==""){var u='<?xml version="1.0" encoding="UTF-8"?><GetRecords service="CSW" version="2.0.2" maxRecords="10" startPosition="'+g;this.getRecordsString='" resultType="results" outputFormat="application/xml" outputSchema="http://www.opengis.net/cat/csw/2.0.2" xmlns="http://www.opengis.net/cat/csw/2.0.2" xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" xmlns:ows="http://www.opengis" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dct="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis http://schemas.opengis.net/ows/1.0.0/owsAll.xsd http://www.opengis.net/ogc http://schemas.opengis.net/filter/1.1.0/filter.xsd http://purl.org/dc/elements/1.1/ http://schemas.opengis.net/csw/2.0.2/rec-dcmes.xsd http://purl.org/dc/terms/ http://schemas.opengis.net/csw/2.0.2/rec-dcterms.xsd http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/base/geometryAggregates.xsd http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd"><Query typeNames="csw:Record"><ElementSetName typeNames="">brief</ElementSetName><Constraint version="1.1.0"><ogc:Filter><ogc:And>';var e=OpenLayers.String.stripAccentedLetters(o).split(" ");for(var h=0,b=e.length;h<b;h++){if(e[h]!=""){this.getRecordsString+='<ogc:PropertyIsLike wildCard="%" singleChar="_" escapeChar="\\"><ogc:PropertyName>dc:title</ogc:PropertyName><ogc:Literal>%'+e[h]+"%</ogc:Literal></ogc:PropertyIsLike>"}}for(var h=0,b=a.length;h<b;h++){var q=a[h];if(q!=" "){this.getRecordsString+="<ogc:Or>";var m=q.split(" ");for(var d=0,p=m.length;d<p;d++){if(m!="de"&&m!="et"&&m!="le"&&m!="la"){this.getRecordsString+='<ogc:PropertyIsLike wildCard="%" singleChar="_" escapeChar="\\"><ogc:PropertyName>dc:subject</ogc:PropertyName><ogc:Literal>%'+m[d]+"%</ogc:Literal></ogc:PropertyIsLike>"}}this.getRecordsString+="</ogc:Or>"}}if(r!=null){this.getRecordsString+="<ogc:BBOX><ogc:PropertyName>ows:BoundingBox</ogc:PropertyName><gml:Envelope><gml:lowerCorner>"+r.left+" "+r.bottom+"</gml:lowerCorner><gml:upperCorner>"+r.right+" "+r.top+"</gml:upperCorner></gml:Envelope></ogc:BBOX>"}this.getRecordsString+="</ogc:And></ogc:Filter></Constraint></Query></GetRecords>";u+=this.getRecordsString;this.wImg.style.display="";this.request=OpenLayers.Request.POST({url:this.cswUrl,headers:{"Content-Type":"application/xml"},data:u,success:this.CSWSuccess,failure:this.CSWFailure,scope:this})}else{var g;if(o.id.charAt(0)=="p"){g=(this.currentPage-2)*10+1}else{g=this.currentPage*10+1}var u='<?xml version="1.0" encoding="UTF-8"?><GetRecords service="CSW" version="2.0.2" maxRecords="10" startPosition="'+g;u+=this.control.getRecordsString;this.control.wImg.style.display="";this.request=OpenLayers.Request.POST({url:this.control.cswUrl,headers:{"Content-Type":"application/xml","Accept-Encoding":""},data:u,success:this.control.CSWSuccess,failure:this.control.CSWFailure,scope:this.control})}},showResults:function(f,j){var b=new OpenLayers.Format.CSWGetRecords();var g=b.read(f.responseXML);if(!g||!g.records||g.records.length==0){this.CSWFailure(f);return false}for(var h=0,d=g.records.length;h<d;h++){var a=j.ownerDocument.createElement("div");a.className="gpCSWResult";if((h%2)==1){a.className+="Alternate"}var o=j.ownerDocument.createElement("a");o.style.textDecoration="none";o.style.color="black";o.target="_blank";o.href="http://www.geocatalogue.fr/Detail.do?fileIdentifier="+g.records[h].identifier[0].value;var m=g.records[h].title[0].value;o.innerHTML=m.toString();a.appendChild(o);j.appendChild(a)}return g},CSWSuccess:function(b){this.wImg.style.display="none";this.resultDiv.innerHTML="";this.resultDiv.style.display="";var d=this.showResults(b,this.resultDiv);this.request=null;if(d.SearchResults!=null){var a=d.SearchResults.numberOfRecordsMatched/10;if(parseInt(a)!=parseFloat(a)){a=parseInt(a+1)}}else{return}if(this.manager==null){this.manager=new Geoportal.Control.PageManager(this,a,this.getRecords,{div:this.resultDiv});this.map.addControl(this.manager);this.manager.activate()}else{this.manager.displayDiv()}},CSWFailure:function(d){this.request=null;this.wImg.style.display="none";this.resultDiv.innerHTML="";var b=this.div.ownerDocument.createElement("div");b.className="gpCSWResult";var a=this.div.ownerDocument.createElement("span");a.innerHTML=OpenLayers.i18n("csw.not.match");b.appendChild(a);this.resultDiv.appendChild(b);this.resultDiv.style.display=""},abortRequest:function(){if(this.request){this.request.abort();this.request=null}},CLASS_NAME:"Geoportal.Control.CSW"});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=this.div.ownerDocument.createElement("div");a.id="trackSlider_"+this.layer.id;a.className="gpControlLayerOpacityTrackSliderClass";this.panel_div.appendChild(a);var d=this.div.ownerDocument.createElement("div");d.id="Opacity_"+this.layer.id;d.className="gpControlLayerOpacityOpacityClass";var e=""+Math.round(this.layer.opacity*100)+"%";d.appendChild(this.div.ownerDocument.createTextNode(e));d.title=e;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=this.div.ownerDocument.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(){this.deactivate();if(this.map){this.map.events.unregister("controldeleted",this,this.onControlRemoved);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)},activate:function(){if(OpenLayers.Control.prototype.activate.apply(this,arguments)){this.map.events.register("mousemove",this,this.redraw);this.map.events.register("mouseout",this,this.reset);return true}else{return false}},deactivate:function(){if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)){this.map.events.unregister("mousemove",this,this.redraw);this.map.events.unregister("mouseout",this,this.reset);return true}else{return false}},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 e;switch(this.pssKey){case"longlat":if(this.units[this.currentUnit]=="sexa"){e=this.displayDMS(b)}else{e=this.displayDEC(b)}break;case"utm":e=this.displayMRGS(b);break;default:e=this.displayEN(b);break}if(typeof(e)=="string"){while(this.div.childNodes.length>0){this.div.removeChild(this.div.firstChild)}var a=this.div.ownerDocument.createElement("div");a.style.border="0px";a.style.padding="0px";a.style.margin="0px";a.innerHTML=e;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 f=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=f;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=f;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=e.lon}if(this.latInput!=null){this.latInput.value=e.lat}if(this.zoneInput!=null){this.zoneInput.value=e.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 e=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,e).replace(/@ordinate@/g,d).replace(/@zone@/g,a);this.separator=b.separator.replace(/@abscissa@/g,e).replace(/@ordinate@/g,d).replace(/@zone@/g,a);this.suffix=b.suffix.replace(/@abscissa@/g,e).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 j=OpenLayers.i18n(this.displayClass+".north");var d=OpenLayers.i18n(this.displayClass+".south");var f=OpenLayers.i18n(this.displayClass+".east");var a=OpenLayers.i18n(this.displayClass+".west");var h=Geoportal.Util.degToDMS(b.lon,[f,a]);var g=Geoportal.Util.degToDMS(b.lat,[j,d]);if(this.selectUnits==null){var e=this.prefix+this.separator+this.getSuffix();e=OpenLayers.String.format(e,{lon:h.replace(/"/g,"&quot;").replace(/ /g,"&nbsp;"),lat:g.replace(/"/g,"&quot;").replace(/ /g,"&nbsp;")});return e}return{lon:h,lat:g}},displayDEC:function(b){var f=1,a=11,j=6;if(this.units[this.currentUnit]=="gon"){f=1.1111111111111112}else{if(this.units[this.currentUnit]=="rad"){f=0.017453292519943295;j=8}}var h=OpenLayers.String.sprintf("%*.*f",a,j,b.lon*f);var g=OpenLayers.String.sprintf("%*.*f",a,j,b.lat*f);if(this.selectUnits==null){var e=this.prefix+this.separator+this.getSuffix();e=OpenLayers.String.format(e,{lon:h.replace(/ /g,"&nbsp;"),lat:g.replace(/ /g,"&nbsp;")});return e}return{lon:h,lat:g}},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 f=OpenLayers.String.sprintf("%*.*f",10,this.numDigits,a.lon*d);var e=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:f.replace(/ /g,"&nbsp;"),lat:e.replace(/ /g,"&nbsp;")});return b}return{lon:f,lat:e}},displayMRGS:function(b){var e=1;if(this.units[this.currentUnit]=="km"){e=0.001}else{if(this.units[this.currentUnit]=="cm"){e=100}}var g=OpenLayers.String.sprintf("%*.*f",10,this.numDigits,b.lon*e);var f=OpenLayers.String.sprintf("%*.*f",10,this.numDigits,b.lat*e);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:g.replace(/ /g,"&nbsp;"),lat:f.replace(/ /g,"&nbsp;"),zone:a});return d}return{lon:g,lat:f,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(e,a){if(a||window.event){OpenLayers.Event.stop(a?a:window.event)}if(e.hasFocus){return}Geoportal.Control.Form.focusOn(e);if(e==this.lonInput||e==this.latInput){if(e.ciControl){e.ciControl.setSelectable()}var d=Geoportal.Util.getComputedStyle(e,"color")||"#000000";var b=Geoportal.Util.getComputedStyle(e,"background-color")||"#FFFFFF";e.style.color=b;e.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(g,p){if(p||window.event){OpenLayers.Event.stop(p?p:window.event)}if(!g.hasFocus){return}Geoportal.Control.Form.focusOff(g);if(g.ciControl){g.ciControl.setSelectable(false)}var h=Geoportal.Util.getComputedStyle(g,"color")||"#FFFFFF";var f=Geoportal.Util.getComputedStyle(g,"background-color")||"#000000";g.style.color=f;g.style.backgroundColor=h;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 j=new OpenLayers.LonLat(m,d);j.transform(this.displayProjection,this.map.getProjection());var e=(this.map.getProjection()?this.map.getProjection().getProjName()=="longlat"?0.000028:1:undefined);if(!this.map.getCenter().equals(j,e)){this.map.setCenter(j)}}},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("changebaselayer",this,this.changeBaseLayer);this.map.events.register("changedisplayprojection",this,this.changeDisplayProjection);this.map.events.register("controldeleted",this,this.onControlRemoved)},onControlRemoved:function(a){if(!a){return}if(this.selectUnits&&this.selectUnits.kbControl&&this.selectUnits.kbControl===a.control){this.selectUnits.kbControl=null}if(this.lonInput&&this.lonInput.kbControl&&this.lonInput.kbControl===a.control){this.lonInput.kbControl=null}if(this.lonInput&&this.lonInput.kbControl&&this.lonInput.kbControl===a.control){this.lonInput.kbControl=null}},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,scalesNames:["world","state","country","town","street","house"],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}if(this.levelsDivs){for(var b=0,a=this.levelsDivs.length;b<a;b++){OpenLayers.Event.stopObservingElement(this.levelsDivs[b].div)}this.levelsDivs=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(){var g=this.div.ownerDocument.createElement("div");g.id=OpenLayers.Util.createUniqueID("nameScale");g.className="nameScale";this.div.appendChild(g);this.levelsDivs=[];var f;for(var e=0,d=this.scalesNames.length;e<d;e++){f=this.div.ownerDocument.createElement("div");this.levelsDivs.push({div:f,label:this.displayClass+"."+this.scalesNames[e]});f.innerHTML=OpenLayers.i18n(this.levelsDivs[this.levelsDivs.length-1].label);g.appendChild(f)}var b="Geoportal_Control_ZoomSlider"+this.map.id;g=this.div.ownerDocument.createElement("div");g.id=b;if(g.style.styleFloat==undefined){g.style.cssFloat="left"}else{g.style.styleFloat="left"}this.div.appendChild(g);var h=Geoportal.Util.getImagesLocation();this.slider=new Geoportal.Control.ZoomSlider({div:OpenLayers.Util.getElement(b),levelBarImgWidth:10,levelBarImgHeight:130,levelBarImg:h+"bg_zoomVertical.gif",sliderImgWidth:15,sliderImgHeight:7,sliderImg:h+"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 j=this.map.getNumZoomLevels();if(j==null){j=Geoportal.Control.ZoomBar.ZOOMRANGE}return j-1}});this.map.addControl(this.slider,new OpenLayers.Pixel(10,0));var a=parseInt((this.slider.getMaxSelectableLevel()/(this.levelsDivs.length-1)).toFixed(0));f=this.levelsDivs[0].div;OpenLayers.Event.observe(f,"click",OpenLayers.Function.bindAsEventListener(this.onLabelClick,{cntrl:this,zoom:this.slider.getMinSelectableLevel()}));for(var e=1,d=this.levelsDivs.length-1;e<d;e++){f=this.levelsDivs[e].div;OpenLayers.Event.observe(f,"click",OpenLayers.Function.bindAsEventListener(this.onLabelClick,{cntrl:this,zoom:1+(a*e)}))}f=this.levelsDivs[this.levelsDivs.length-1].div;OpenLayers.Event.observe(f,"click",OpenLayers.Function.bindAsEventListener(this.onLabelClick,{cntrl:this,zoom:this.slider.getMaxSelectableLevel()}))},onLabelClick:function(a){if(a!=null){OpenLayers.Event.stop(a)}this.cntrl.map.zoomTo(this.zoom)},changeLang:function(b){for(var d=0,a=this.levelsDivs.length;d<a;d++){this.levelsDivs[d].div.innerHTML=OpenLayers.i18n(this.levelsDivs[d].label)}},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 h="";if(!this.streetAddress){h+=this.name||""}else{var a=this.streetAddress._streetLocation;if(a){if(a instanceof Geoportal.OLS.Building){if(a.num){h+=a.num}if(a.subdivision){h+=a.subdivision}h+=", "}}for(var e=0,d=this.streetAddress.getNbStreets();e<d;e++){var m=this.streetAddress.getStreets()[e];if(m.name!=null){h+=m.name}else{h+=(m.typePrefix||"")+" "+(m.officialName||"")+" "+(m.typeSuffix||"")}h+=", "}}var f=this.getNbPlaces();if(f>0){for(var g=0;g<f;g++){var b=this.getPlaces()[g];if(b.classification||b.name){if(b.classification){h+=" "+OpenLayers.i18n(b.classification)}if(b.name){h+=" ["+b.name+"]"}h+=", "}}}if(this.postalCode&&this.postalCode.name){h+=" ["+this.postalCode.name+"]"}h=h.replace(/^(\s*,)+/,"").replace(/(\s*,)+$/,"");return h},toHTMLString:function(){var f="";if(!this.streetAddress){f+="<b>"+(this.name||"")+"</b>"}else{var a=this.streetAddress._streetLocation;if(this.streetAddress._streetLocation){if(a instanceof Geoportal.OLS.Building){if(a.num){f+=a.num}if(a.subdivision){f+=a.subdivision}f+=",&nbsp;"}}for(var e=0,d=this.streetAddress.getNbStreets();e<d;e++){var g=this.streetAddress.getStreets()[e];if(g.name){f+="<b>"+(g.name||"")+"</b>"}else{f+="<b>"+(g.typePrefix||"")+" "+(g.officialName||"")+" "+(g.typeSuffix||"")+"</b>"}f+="<br/>"}}var d=this.getNbPlaces();if(d>0){for(var e=0;e<d;e++){var b=this.getPlaces()[e];if(b.classification||b.name){if(b.classification){f+=" "+OpenLayers.i18n(b.classification)}if(b.name){f+=" ["+b.name+"]"}f+="<br/>"}}}if(this.postalCode&&this.postalCode.name){f+=OpenLayers.i18n("geocoded.address.popup.postalCode")+"&nbsp;: "+this.postalCode.name}return f},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,e,d){this.methodName=b;this.version=a;this.requestID=e;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=[];this.timer={};if(!this.displayProjections){this.displayProjections=[OpenLayers.Projection.CRS84.clone()]}},destroy:function(){if(this.miniDiv){OpenLayers.Event.stopObservingElement(this.miniDiv);this.miniDiv=null}this.stopCapturingEvents();this.maxiDiv=null;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}if(this.timer){if(this.timer[true]){window.clearTimeout(this.timer[true])}if(this.timer[false]){window.clearTimeout(this.timer[false])}this.timer=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},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)}},maximizeControl:function(a){this.toggleControls(false);this.ignoreEvent(a)},minimizeControl:function(a){this.toggleControls(true);this.ignoreEvent(a)},captureEvents:function(){this.divEvents=new OpenLayers.Events(this,this.div,null,true);this.divEvents.on({dblclick:this.ignoreEvent,click:this.minimizeControl,mousedown:this.mouseDown,mouseup:this.mouseUp,mouseover:Geoportal.Control.mapMouseOut,mouseout:Geoportal.Control.mapMouseOver})},stopCapturingEvents:function(){if(this.divEvents){this.divEvents.un({dblclick:this.ignoreEvent,click:this.minimizeControl,mousedown:this.mouseDown,mouseup:this.mouseUp,mouseover:Geoportal.Control.mapMouseOut,mouseout:Geoportal.Control.mapMouseOver});this.divEvents.destroy();this.divEvents=null}},delayControls:function(a,b){if(this.timer[a]){window.clearTimeout(this.timer[a]);this.timer[a]=null}if((this.map&&this.map.getApplication()&&!this.map.getApplication().isMapReady())||(a&&this.timer[!a])){this.timer[a]=window.setTimeout(OpenLayers.Function.bind(function(d){this[b](d)},this,a),300);return true}return false},toggleControls:function(b){if(this.delayControls(b,"toggleControls")){return}this.maxiDiv.style.display=b?"none":"block";this.miniDiv.style.display=b?"block":"none";if(b){OpenLayers.Element.removeClass(this.div,this.displayClass);OpenLayers.Element.addClass(this.div,this.displayClass+"Minimized");this.stopCapturingEvents()}else{OpenLayers.Element.addClass(this.div,this.displayClass);OpenLayers.Element.removeClass(this.div,this.displayClass+"Minimized");this.captureEvents()}if(!b){var a=this.getSize(true)}if(this.map){this.map.events.triggerEvent("controlvisibilitychanged",{control:this,size:this.getSize(),visibility:!b})}},showControls:function(b){if(this.delayControls(b,"showControls")){return}var e=b?"none":"block";if((this.div.style.display=="none"&&!b)||(this.div.style.display!="none"&&b)||(this.div.style.display=="")){this.div.style.display=e;if(this.map){if(!b){var a=this.getSize(true)}this.map.events.triggerEvent("controlvisibilitychanged",{control:this,size:this.miniDiv.style.display!="none"?null:this.getSize(),visibility:!b})}}},loadContents:function(){this.captureEvents();this.maxiDiv=this.div.ownerDocument.createElement("div");var b=this.div.ownerDocument.createElement("div");b.id="gs_"+this.id;b.className="gpControlGraphicScale olControlNoSelect";this.maxiDiv.appendChild(b);var a=new Geoportal.Control.GraphicScale({id:b.id,div:b});this.controls.push(a);this.map.addControl(a);b=this.div.ownerDocument.createElement("div");b.id="pj_"+this.id;b.className="gpControlProjections olControlNoSelect";this.maxiDiv.appendChild(b);a=new Geoportal.Control.Projections({id:b.id,div:b,displayProjections:this.displayProjections});this.controls.push(a);this.map.addControl(a);b=this.div.ownerDocument.createElement("div");b.id="mp_"+this.id;b.className="gpControlMousePosition olControlNoSelect";this.maxiDiv.appendChild(b);a=new Geoportal.Control.MousePosition({id:b.id,div:b,activeOverMapOnly:true});this.controls.push(a);this.map.addControl(a);b=this.div.ownerDocument.createElement("div");b.id="cp_"+this.id;b.className="gpControlCopyright olControlNoSelect";this.maxiDiv.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);this.maxiDiv.style.display="block";this.div.appendChild(this.maxiDiv);this.miniDiv=this.div.ownerDocument.createElement("div");this.miniDiv.id="mini_"+this.id;this.miniDiv.title=OpenLayers.i18n(this.displayClass+"Mini");OpenLayers.Element.addClass(this.miniDiv,this.displayClass+"Mini");this.miniDiv.style.display="none";OpenLayers.Event.observe(this.miniDiv,"click",OpenLayers.Function.bindAsEventListener(this.maximizeControl,this));this.div.appendChild(this.miniDiv)},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()}}}},getSize:function(a){if(!this.controlSize||a===true){this.controlSize=new OpenLayers.Size(this.div.offsetWidth,this.div.offsetHeight)}return this.controlSize.clone()},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(g){var d=[0,this.unit],f=[0,"m"],a=-1;if(g.components.length==2){d=this.getBestAzimuth(g);var b=this.displaySystem;var h=this.map.getProjection();if(h&&h.getProjName()=="longlat"){this.displaySystem="geographic"}else{var e=this.displaySystemUnits.metric;if(e){this.displaySystem="metric"}}f=this.getBestLength(g);this.displaySystem=b;a=3}return{measure:d[0],units:d[1],order:a,distance:f[0],distanceUnits:f[1],geometry:g}},getBestAzimuth:function(b){var a=this.getAzimuth(b,this.unit);return[a,this.unit]},getAzimuth:function(e,b){var f=e.components[0].clone().transform(this.map.getProjection(),OpenLayers.Projection.CRS84);f.x=OpenLayers.Util.rad(f.x);f.y=OpenLayers.Util.rad(f.y);var d=e.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-f.x)*Math.cos(d.y),Math.cos(f.y)*Math.sin(d.y)-Math.sin(f.y)*Math.cos(d.y)*Math.cos(d.x-f.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 g=(this.distanceElement&&this.distanceElement.style.display!="none"?this.distanceElement:null);var e=(this.targetElement&&this.targetElement.style.display!="none"?this.targetElement:null);var f=(!(0<=d.order&&d.order<(this.measurementLabels||Geoportal.Control.MeasureToolbar.LABELS).length)||d.measure===0?"wait":(g&&e?"targetElement":"default"));var a=(f=="wait"?0:d.order);var b=[{order:1,measure:d.distance,unit:d.distanceUnits,key:f,label:(this.measurementLabels||Geoportal.Control.MeasureToolbar.LABELS)[1],targetFormat:(this.targetFormat||Geoportal.Control.MeasureToolbar.TARGETFORMAT)[f],targetElement:g,accuracy:(this.accuracies||Geoportal.Control.MeasureToolbar.ACCURACIES)[d.distanceUnits]||"",dimension:""},{order:a,measure:d.measure,unit:d.units,key:f,label:(this.measurementLabels||Geoportal.Control.MeasureToolbar.LABELS)[a],targetFormat:(this.targetFormat||Geoportal.Control.MeasureToolbar.TARGETFORMAT)[f],targetElement:e,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(g){var d=this.createElementNS(this.gmlns,"gml:Point");var f=this.createElementNS(this.gmlns,"gml:pos");var b;if(this.xy){b=g.x+" "+g.y}else{b=g.y+" "+g.x}var e=this.createTextNode(b);f.appendChild(e);d.appendChild(f);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(e,f){f.version=e.getAttribute("version")||this.VERSION;f.lang=e.getAttribute("lang");this.readChildNodes(e,f);if(!f._header){OpenLayers.Console.error(OpenLayers.i18n("Not.conformal.XLS",{part:"Header"}));return null}if(f._header.errorList&&f._header.errorList.getNbErrors()>0){this.reportError(f._header.errorList);return null}if(!f._body){OpenLayers.Console.error(OpenLayers.i18n("Not.conformal.XLS",{part:"Body"}));return null}var b=f.getNbBodies();if(b>0){var a=f.getBodies();for(var d=0;d<b;d++){if(a[d].errorList&&a[d].errorList.getNbErrors()>0){this.reportError(a[d].errorList)}}}return f},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(e,a){var d=e.childNodes.length>0?e.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 e=new Geoportal.OLS.UOM.Distance();e.value=parseFloat(a.getAttribute("value"));if(isNaN(e.value)){e.value=0}e.accuracy=parseFloat(a.getAttribute("accuracy"));if(isNaN(e.accuracy)){e.accuracy=null}e.uom=a.getAttribute("uom");if(b.setAccuracy){b.setAccuracy(e)}else{b.distance=e}},Angle:function(d,e){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(e.setAccuracy){e.setAccuracy(b)}else{e.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 e=this.createElementNSPlus("xls:XLS",g);var f=d._header;this.writeNode(this.getNodeName(f),f,e);for(var b=0,a=d.getNbBodies();b<a;b++){f=d.getBodies()[b];this.writeNode(this.getNodeName(f),f,e)}return e},ResponseHeader:function(a){var b=this.createElementNSPlus("xls:ResponseHeader");if(a.sessionID){b.setAttribute("sessionID",a.sessionID)}if(a.errorList){this.writeNode("ErrorList",a.errorList,b)}return b},ErrorList:function(d){var e=this.createElementNSPlus("xls:ErrorList");if(d.highestSeverity!=null){e.setAttribute("highestSeverity",d.highestSeverity)}for(var b=0,a=d.getNbErrors();b<a;b++){var f=d.getErrors()[b];this.writeNode(this.getNodeName(f),f,e)}return e},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("ErrorList",b.errorList,a)}if(b.getResponseParameters()){var d=b.getResponseParameters();this.writeNode(this.getNodeName(d),d,a)}return a},Address:function(d){var f=this.createElementNSPlus("xls:Address");f.setAttribute("countryCode",d.countryCode);if(d.addressee!=null){f.setAttribute("addressee",d.addressee)}if(d.name!=null){this.writeNode("xls:freeFormAddress",d,f)}else{if(d.streetAddress){this.writeNode("xls:StreetAddress",d.streetAddress,f)}for(var e=0,b=d.getNbPlaces();e<b;e++){this.writeNode("xls:Place",d.getPlaces()[e],f)}if(d.postalCode){this.writeNode("xls:PostalCode",d.postalCode,f)}}return f},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 e=this.createElementNSPlus("xls:StreetAddress");if(b._streetLocation){var f=b._streetLocation;this.writeNode(this.getNodeName(f),f,e)}for(var d=0,a=b.getNbStreets();d<a;d++){this.writeNode("xls:Street",b.getStreets()[d],e)}return e},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 e={attributes:{}};if(a.num!=null){OpenLayers.Util.extend(e.attributes,{number:a.num})}if(a.subdivision!=null){OpenLayers.Util.extend(e.attributes,{subdivision:a.subdivision})}if(a.name!=null){OpenLayers.Util.extend(e.attributes,{buildingName:a.name})}var d=this.createElementNSPlus("xls:Building",e);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()){var d=a.getRequestParameters();this.writeNode(this.getNodeName(d),d,b)}return b},Position:function(b){var a=this.createElementNSPlus("xls:Position");if(b.levelOfConf!=null){a.setAttribute("levelOfConf",b.levelOfConf)}this.writeNode("gml:Point",b.lonlat,a);if(b.qop){this.writeNode("xls:QoP",b.qop,a)}if(b.time){this.writeNode("xls:Time",b.time,a)}if(b.speed){this.writeNode("xls:Speed",b.speed,a)}if(b.direction){this.writeNode("xls:Direction",b.direction,a)}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("xls:HorizontalAcc",b.hAccuracy,a);this.writeNode("xls:VerticalAcc",b.vAccuracy,a);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");var d=a._doa;this.writeNode(this.getNodeName(d),d,b);return b},VerticalAcc:function(b){var a=this.createElementNSPlus("xls:VerticalAcc");this.writeNode("xls:Distance",b.distance,a);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")}}},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()},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,cntrlContent:null,usersContent: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 e=this.map.getControl(a+"_"+this.layerStates[d].id);if(e){e.deactivate();e.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})}this.usersContent=null;this.cntrlContent=null;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(e){var f=this[e+"Layers"];if(f){for(var d=0,a=f.length;d<a;d++){var b=f[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[e+"LayersDiv"].innerHTML="";this[e+"Layers"]=[]},checkRedraw:function(b){var g=b&&b.forceDraw===true||false;if(!g){if(!this.layerStates.length||(this.map.layers.length!=this.layerStates.length)){g=true}else{for(var e=0,a=this.layerStates.length;e<a;e++){var f=this.layerStates[e];var d=this.map.layers[e];if((f.displayInLayerSwitcher!=d.displayInLayerSwitcher)||(f.name!=d.name)||(f.inRange!=d.inRange)||(f.id!=d.id)||(f.visibility!=d.visibility)||(f.opacity!=d.opacity)){g=true;break}}}}return g},redraw:function(){if(!Geoportal.Control.LayerSwitcher.prototype.checkRedraw.apply(this,arguments)){return this.div}var T=this.div.ownerDocument;var L,K,J=this.map.layers.length;var R;this.layerStates=[];for(L=0;L<J;L++){R=this.map.layers[L];if(!R.preventControls){R.preventControls={}}OpenLayers.Util.extend(R.preventControls,this.preventControls);this.layerStates[L]={displayInLayerSwitcher:R.displayInLayerSwitcher,name:R.name,visibility:R.visibility,opacity:R.opacity,inRange:R.inRange,id:R.id};for(var E in this.cntrlKeys){var f=this.map.getControl(E+"_"+this.layerStates[L].id);if(f){var D=f.div;if(D.parentNode!=null){D.parentNode.removeChild(D)}}}}this.clearLayersArray("data");var o=false;var B=this.map.layers.slice();var C=this.dataLayersDiv;var h=false,d=false;for(L=J-1;L>=0;L--){R=B[L];var m=R.isBaseLayer;var r=this.layerStates[L];if(R.displayInLayerSwitcher&&!m){o=true;var I=T.createElement("div");I.id=this.id+"_"+R.id;I.className="gpLayerDivClass";if((this.dataLayers.length%2)==1){I.className+="Alternate"}C.appendChild(I);var z=T.createElement("div");z.className="gpLayerNameGroupDivClass";I.appendChild(z);var w=R.getVisibility();var q=T.createElement("input");q.id="input_"+R.id;q.name=R.name;q.type="checkbox";q.value=R.name;q.checked=w;q.defaultChecked=w;q.className="gpLayerVisibilityClass";q.style.autocomplete="off";if(!R.inRange){q.disabled=true}OpenLayers.Event.observe(q,"mouseup",OpenLayers.Function.bindAsEventListener(this.onInputClick,({inputElem:q,layer:R,layerSwitcher:this})));z.appendChild(q);var F=T.createElement("span");F.id="label_"+R.id;var O=OpenLayers.i18n(R.name);var H=T.createElement("textarea");H.innerHTML=O.replace(/</g,"&lt;").replace(/>/g,"&gt;");O=H.value;H=null;if(O.length>=Geoportal.Control.LayerSwitcher.LAYER_LABEL_MAXLENGTH){O=O.substring(0,Geoportal.Control.LayerSwitcher.LAYER_LABEL_REPLACEMENT_INDEX)+Geoportal.Control.LayerSwitcher.LAYER_LABEL_SUFFIX_REPLACEMENT}F.innerHTML=O;F.className="gpLayerSpanClass";F.title=OpenLayers.i18n(R.name);if(!R.inRange){F.className+="NotInRange"}if(R.description||R.dataURL||R.metadataURL||R.legends){F.style.cursor="help";OpenLayers.Event.observe(F,"click",OpenLayers.Function.bindAsEventListener(this.onLabelClick,({inputElem:q,layer:R,layerSwitcher:this})))}z.appendChild(F);var N=T.createElement("div");N.id="buttonsChangeOrder"+R.id;N.className="gpButtonsChangeOrderClass";z.appendChild(N);var e=T.createElement("div");e.id="buttonUp_"+R.id;e.className="gpButtonUp";if(!h){var u=true;for(K=L+1;K<J-1;K++){if(!B[K].isBaseLayer&&B[K].displayInLayerSwitcher){u=false;break}}if(u){e.className+="Deactive";h=true}}OpenLayers.Event.observe(e,"click",OpenLayers.Function.bindAsEventListener(this.onButtonUpClick,({layerSwitcher:this,layerRank:L})));N.appendChild(e);var Q=T.createElement("div");Q.id="buttonDown_"+R.id;Q.className="gpButtonDown";if(!d){var u=true;for(K=L-1;K>=0;K--){if(!B[K].isBaseLayer&&B[K].displayInLayerSwitcher){u=false;break}}if(u){Q.className+="Deactive";d=true}}OpenLayers.Event.observe(Q,"click",OpenLayers.Function.bindAsEventListener(this.onButtonDownClick,({layerSwitcher:this,layerRank:L})));N.appendChild(Q);var b="loading_"+R.id;var g=this.map.getControl(b);if(g){z.appendChild(g.div)}else{var P=T.createElement("div");P.id=b;P.className="gpControlLoading olControlNoSelect";g=new Geoportal.Control.Loading(R,{id:P.id,div:P});z.appendChild(P);this.map.addControl(g)}if(R.preventControls["Geoportal.Control.BasicLayerToolbar"]!==true&&((R.view&&(R.view.drop||R.view.zoomToExtent))||(R.opacity!=undefined))){b="basic_"+R.id;var p=this.map.getControl(b);if(p){I.appendChild(p.div);for(var v=0,S=p.controls.length;v<S;v++){if(p.controls[v] instanceof Geoportal.Control.LayerOpacity){p.controls[v].refreshOpacity();break}}}else{var M=T.createElement("div");M.id=b;M.className="gpControlBasicLayerToolbar olControlNoSelect";var p=new Geoportal.Control.BasicLayerToolbar(R,{id:M.id,div:M});I.appendChild(M);this.map.addControl(p)}}if(R.preventControls["Geoportal.Control.EditingToolbar"]!==true){b="edit_"+R.id;var a=this.map.getControl(b);if(a){I.appendChild(a.div);if(a.div.childNodes.length>0){a.div.style.display=""}else{a.div.style.display="none"}}else{var G=T.createElement("div");G.id=b;G.className="gpControlEditingToolbar olControlNoSelect";G.style.display="none";I.appendChild(G)}}this.dataLayers.push({layer:R,inputElem:q,labelSpan:F})}}if(!this.outsideViewport){this.dataLbl.style.display=o?"":"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(z){var E=this.layerSwitcher.div.ownerDocument;var g=null;if(z!=null){g=OpenLayers.Events.prototype.getMousePosition.apply({includeXY:true,element:this.layerSwitcher.map.div,clearMouseCache:function(){OpenLayers.Events.prototype.clearMouseCache.apply(this)}},[z]);OpenLayers.Event.stop(z);if(g.x<0){g.x=0}if(g.y<0){g.y=0}}if(OpenLayers.Util.getElement("_mtdpopup_"+this.layer.id)){return}var q=E.createElement("div");if(this.layer.description){var r=E.createElement("div");r.id="abstract_"+this.layer.id;r.className="gpLayerAbstractDivClass";if(typeof(this.layer.description)=="string"){this.layer.description=[this.layer.description]}r.innerHTML="";for(var u=0,p=this.layer.description.length;u<p;u++){var v=this.layer.description[u];r.innerHTML+="<p>"+OpenLayers.i18n(v)+"</p>"}q.appendChild(r)}if(this.layer.legends){var B=E.createElement("div");B.id="legends_"+this.layer.id;B.className="gpLayerLegendsDivClass";for(var u=0,p=this.layer.legends.length;u<p;u++){var a=this.layer.legends[u];var F=E.createElement("img");F.id="legend_"+a.style+"_"+this.layer.id;F.src=a.href.replace(/&amp;/g,"&");if(a.width&&a.height){F.width=a.width;F.height=a.height}if(a.title){F.alt=a.title;F.title=a.title}F.vspace=F.hspace=0;B.appendChild(F);if(u!=p-1){B.appendChild(E.createElement("br"))}}q.appendChild(B)}if(this.layer.dataURL||this.layer.metadataURL){var C="width=750,height=350,menubar=no,status=no,scrollbars=yes,resizable=yes";var b=E.createElement("div");b.id="dataUrls_"+this.layer.id;b.className="gpLayerUrlsDivClass";if(this.layer.dataURL){if(typeof(this.layer.dataURL)=="string"){this.layer.dataURL=[this.layer.dataURL]}var o=E.createElement("div");o.id="dataURLs_"+this.layer.id;o.className="gpLayerDataUrlsDivClass";for(var u=0,p=this.layer.dataURL.length;u<p;u++){var f=this.layer.dataURL[u];var j=E.createElement("a");j.id="dataURL_"+u+this.layer.id;j.className="gpLayerDataURLClass";j.title=OpenLayers.i18n("gpLayer.dataURL");j.alt=j.title;j.appendChild(E.createTextNode(j.title));OpenLayers.Event.observe(j,"click",OpenLayers.Function.bindAsEventListener(function(e){window.open(this.url,"data",C)},{url:f}));o.appendChild(j);if(u!=p-1){o.appendChild(E.createElement("br"))}}b.appendChild(o)}if(this.layer.metadataURL){if(typeof(this.layer.metadataURL)=="string"){this.layer.metadataURL=[this.layer.metadataURL]}var m=E.createElement("div");m.id="metadataURLs_"+this.layer.id;m.className="gpLayerMetadataUrlsDivClass";for(var u=0,p=this.layer.metadataURL.length;u<p;u++){var d=this.layer.metadataURL[u];var w=E.createElement("a");w.id="metadataURL_"+u+this.layer.id;w.className="gpLayerMetadataURLClass";w.title=OpenLayers.i18n("gpLayer.metadataURL");w.alt=w.title;w.appendChild(E.createTextNode(w.title));OpenLayers.Event.observe(w,"click",OpenLayers.Function.bindAsEventListener(function(e){window.open(this.url,"metadata",C)},{url:d}));m.appendChild(w);if(u!=p-1){m.appendChild(E.createElement("br"))}}b.appendChild(m)}q.appendChild(b)}var h=new OpenLayers.Size(Geoportal.Util.getComputedStyle(this.layerSwitcher.map.div,"width",true),Geoportal.Util.getComputedStyle(this.layerSwitcher.map.div,"height",true));h.w/=2;h.h/=4;var D=new Geoportal.Control.Floating(this,{id:"_mtdpopup_"+this.layer.id,headTitle:this.layer.name,size:h});D.onClose=OpenLayers.Function.bind(function(){this.destroy()},D);D.changeLang=OpenLayers.Function.bind(function(H){Geoportal.Control.Floating.prototype.changeLang.apply(this.cntrl,arguments);var J=OpenLayers.Util.getElement("abstract_"+this.layer.id);if(J){J.innerHTML="";for(var I=0,G=this.layer.description.length;I<G;I++){var K=this.layer.description[I];J.innerHTML+=OpenLayers.i18n(K)+"<br/>"}}for(var I=0,G=this.layer.dataURL;I<G;I++){J=OpenLayers.Util.getElement("dataURL_"+I+this.layer.id);if(J){J.title=OpenLayers.i18n("gpLayer.dataURL");J.alt=J.title;J.innerHTML="";J.appendChild(E.createTextNode(J.title))}}for(var I=0,G=this.layer.metadataURL;I<G;I++){J=OpenLayers.Util.getElement("metadataURL_"+I+this.layer.id);if(J){J.title=OpenLayers.i18n("gpLayer.metadataURL");J.alt=J.title;J.innerHTML="";J.appendChild(E.createTextNode(J.title))}}},{cntrl:D,layer:this.layer});this.layerSwitcher.map.addControl(D,g);g=null;D.addContent(q)},onButtonUpClick:function(h){var d,m;var f=null;var g=false;var a=this.layerSwitcher.map.layers;m=a.length;var b=a[this.layerRank];for(var d=this.layerRank+1;d<m;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(){var b=this.div.ownerDocument;if(!this.div.className){this.div.className=""}this.div.className+=" gpMainDivClass";this.cntrlContent=this.createInnerDiv(this.id+"_containerDiv","gpCLSContainer",this.div);OpenLayers.Event.observe(this.cntrlContent,"dblclick",OpenLayers.Function.bindAsEventListener(this.ignoreEvent,this));OpenLayers.Event.observe(this.cntrlContent,"click",OpenLayers.Function.bindAsEventListener(this.ignoreEvent,this));OpenLayers.Event.observe(this.cntrlContent,"mousedown",OpenLayers.Function.bindAsEventListener(this.mouseDown,this));OpenLayers.Event.observe(this.cntrlContent,"mouseup",OpenLayers.Function.bindAsEventListener(this.mouseUp,this));OpenLayers.Event.observe(this.div,"mouseover",OpenLayers.Function.bindAsEventListener(Geoportal.Control.mapMouseOut,this));OpenLayers.Event.observe(this.div,"mouseout",OpenLayers.Function.bindAsEventListener(Geoportal.Control.mapMouseOver,this));this.layersDiv=b.createElement("div");this.layersDiv.id=this.id+"_layersDiv";this.layersDiv.className="gpLayersClass";if(!this.outsideViewport){this.dataLbl=b.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=b.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=b.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.cntrlContent.appendChild(this.layersDiv);this.div.appendChild(this.cntrlContent);this.usersContent=this.createInnerDiv(this.id+"_userctrls","gpCLSUsersControlsContainer",this.div)},createControlAnchor:function(e,b){var a=null;if(this.usersContent){a=this.createInnerDiv(e,b,this.cntrlContent);this.usersContent.appendChild(a)}return a},createInnerDiv:function(g,f,b,a){var e=this.div.ownerDocument.createElement("div");if(g){e.id=g}if(f==null){f=""}e.className=f+" olControlNoSelect";if(a){e.innerHTML=a}b.appendChild(e);return e},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 e=this.map.getControl(a+"_"+b.layer.id);if(e){e.deactivate();e.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 e=(!(0<=b.order&&b.order<(b.object.measurementLabels||Geoportal.Control.MeasureToolbar.LABELS).length)||b.measure===0?"wait":(d?"targetElement":"default"));var a=(e=="wait"?0:b.order);this.lastMeasurement={order:a,measure:b.measure,unit:b.units,key:e,label:(b.object.measurementLabels||Geoportal.Control.MeasureToolbar.LABELS)[a],targetFormat:(b.object.targetFormat||Geoportal.Control.MeasureToolbar.TARGETFORMAT)[e],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 f=(a[d].key==="wait"?OpenLayers.i18n("waiting.measurement"):OpenLayers.i18n(a[d].label));var e=(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=e||f}else{a[d].targetElement.innerHTML=OpenLayers.String.sprintf(a[d].targetFormat.result,f,e)}}else{OpenLayers.Console.info(OpenLayers.String.sprintf(a[d].targetFormat.result,f,e))}}},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.Control.PrintMap=OpenLayers.Class(Geoportal.Control,{type:OpenLayers.Control.TYPE_BUTTON,title:null,size:null,popupSettings:"toolbar=no,location=no,menubar=no,scrollbars=no",onPrint:null,initialize:function(a){Geoportal.Control.prototype.initialize.apply(this,arguments);if(!this.title){this.title=this.displayClass+".title"}},destroy:function(){if(this.delayTrigger){window.clearTimeout(this.delayTrigger);this.delayTrigger=null}if(this.printableDocument){this.printableDocument.close();this.printableDocument=null}Geoportal.Control.prototype.destroy.apply(this,arguments)},setMap:function(a){Geoportal.Control.prototype.setMap.apply(this,arguments);if(!this.size){var b=(this.map.getApplication()?this.map.getApplication().div:this.map.div);this.size=new OpenLayers.Size(b.clientWidth,b.clientHeight)}},trigger:function(){if(this.delayTrigger){window.clearTimeout(this.delayTrigger);this.delayTrigger=null}if(!this.map||!this.map.getApplication()){return}this.tick=""+new Date().getTime();var a=this.getPageContent();if(this.printableDocument){this.printableDocument.close();this.printableDocument=null}var b=this.popupSettings;if(!b.match(/width/i)){b+=(b.length>0?",":"")+"width="+(20+this.size.w)}if(!b.match(/height/i)){b+=(b.length>0?",":"")+"height="+(320+this.size.h)}this.printableDocument=window.open((a.isUrl?a.html:"about:blank"),this.tick,b,true);if(this.printableDocument){if(a.isUrl){this.printableDocument.print();this.printableDocument.close();this.printableDocument=null;return}var d=this.printableDocument.document;d.open();d.write(a.html);d.close();this.delayTrigger=window.setTimeout(OpenLayers.Function.bind(this.createMap,this),100)}},copyCreatePopup:function(popup){var cn=eval(popup.CLASS_NAME);var args=[];args.push(popup.id);args.push(popup.lonlat.clone());args.push(popup.contentSize.clone());args.push(popup.contentHTML);if(popup.anchor){args.push(popup.anchor)}args.push(popup.closeDiv?true:false);if(popup.feature){args.push(popup.backgroundColor);args.push(popup.opacity);args.push(popup.closeDiv?function(e){OpenLayers.Event.stop(e)}:null);args.push(null)}else{args.push(popup.closeDiv?function(e){OpenLayers.Event.stop(e)}:null)}var cpopup=OpenLayers.Class.newObject(cn,args);if(popup.backgroundColor!=OpenLayers.Popup.COLOR){cpopup.setBackgroundColor(popup.backgroundColor)}if(popup.opacity!=OpenLayers.Popup.OPACITY){cpopup.setOpacity(popup.opacity)}if(popup.border!=OpenLayers.Popup.BORDER){cpopup.setBorder(popup.border)}if(popup.autoSize){cpopup.autoSize=true}if(popup.minSize){cpopup.minSize=popup.minSize.clone()}if(popup.maxSize){cpopup.maxSize=popup.maxSize.clone()}if(popup.panMapIfOutOfView){cpopup.panMapIfOutOfView=true}if(popup.keepInMap){cpopup.keepInMap=true}if(popup.closeOnMove){cpopup.closeOnMove=true}if(popup.fixedRelativePosition){cpopup.fixedRelativePosition=popup.fixedRelativePosition}return cpopup},copyCreateLayer:function(layer){var cn=eval(layer.CLASS_NAME);var args=[];args.push(layer.name);if(layer.url!=undefined){args.push(layer.url);if(layer.params!=undefined){if(layer.CLASS_NAME==="OpenLayers.Layer.WorldWind"){args.push(layer.lzd);args.push(layer.zoomLevels)}args.push(OpenLayers.Util.extend({},layer.params))}}else{if(layer.location!=undefined){if(layer.CLASS_NAME!=="OpenLayers.Layer.Text"){args.push(layer.location)}}}var opts=layer.getOptions();if(opts.projection){opts.projection=opts.projection.clone()}if(opts.formatOptions){if(opts.formatOptions.internalProjection){opts.formatOptions.internalProjection=opts.formatOptions.internalProjection.clone()}}if(opts.maxExtent){opts.maxExtent=opts.maxExtent.transform(layer.map.getProjection(),layer.getNativeProjection())}args.push(opts);var clayer=OpenLayers.Class.newObject(cn,args);return clayer},addLayers:function(){if(this.delayTrigger){window.clearTimeout(this.delayTrigger);this.delayTrigger=null}var f=null,b=null;try{f=this.printableDocument.document.getElementById("printContainer_"+this.tick);b=this.printableDocument.document.getElementById("printAttribution_"+this.tick);if(f==null||b==null||this.printableDocument.window.__Geoportal$PrintReady===undefined||this.printableDocument.window.printViewer===undefined||this.printableDocument.window.printViewer.isMapReady()===false){throw"|/-\\|"}}catch(e){this.delayTrigger=window.setTimeout(OpenLayers.Function.bind(this.addLayers,this),100);return}(function(r){var j=OpenLayers._document;OpenLayers._document=r.printableDocument.document;var g=r.printableDocument.window.printViewer.getMap();for(var o=0,m=r.map.layers.length;o<m;o++){var q=r.map.layers[o];if(q.isBaseLayer&&!(q instanceof Geoportal.Layer)){var u=r.copyCreateLayer(q);Geoportal.Map.prototype.addLayer.apply(g,[u])}}var v=r.map.getCenter().transform(r.map.getProjection(),OpenLayers.Projection.CRS84);g.setCenterAtLonLat(v.lon,v.lat,r.map.getZoom());for(var o=0,m=r.map.layers.length;o<m;o++){var q=r.map.layers[o];if(q.isBaseLayer){continue}if(!q.visibility){continue}if(!q.inRange){continue}if(q instanceof Geoportal.Layer.WMSC){var a={visibility:true,opacity:q.opacity};r.printableDocument.window.printViewer.addGeoportalLayer(q.name,a)}else{var B=r.copyCreateLayer(q);Geoportal.Map.prototype.addLayer.apply(g,[B]);if((q instanceof OpenLayers.Layer.Vector)&&q.features.length>0){var h=[];for(var z=0,w=q.features.length;z<w;z++){var C=q.features[z].clone();h.push(C)}B.addFeatures(h,{silent:true})}}}for(var o=0,m=r.map.popups.length;o<m;o++){var d=r.map.popups[o];if(!OpenLayers.Element.visible(d.div)){continue}var p=r.copyCreatePopup(d);Geoportal.Map.prototype.addPopup.apply(g,[p])}r.printableDocument.window.__Geoportal$PrintReady=true;OpenLayers._document=j})(this)},createMap:function(){if(this.delayTrigger){window.clearTimeout(this.delayTrigger);this.delayTrigger=null}var m=null,p=null;try{m=this.printableDocument.document.getElementById("printContainer_"+this.tick);p=this.printableDocument.document.getElementById("printAttribution_"+this.tick);if(this.printableDocument.window.OpenLayers===undefined||this.printableDocument.window.Geoportal===undefined||this.printableDocument.window.Geoportal.Viewer===undefined||this.printableDocument.window.Geoportal.Viewer.Default===undefined||this.printableDocument.window.printViewer===undefined||this.printableDocument.window.__Geoportal$PrintReady===undefined||m==null||p==null){throw"|/-\\|"}}catch(o){this.delayTrigger=window.setTimeout(OpenLayers.Function.bind(this.createMap,this),100);return}var j={apiKey:[]};for(var g=0,e=this.map.catalogue.apiKey.length;g<e;g++){var f=this.map.catalogue.apiKey[g];j.apiKey.push(f);var h=this.map.catalogue[f]||{};j[f]={tokenServer:h.tokenServer||"http://localhost/",tokenTimeOut:h.tokenTimeOut||60000,transport:"referrer",bounds:(h.bounds||new OpenLayers.Bounds(-180,-90,180,90)).toArray(),resources:{},allowedGeoportalLayers:(h.allowedGeoportalLayers||[]).slice()};for(var b in h.layers){j[f].resources[b]=OpenLayers.Util.applyDefaults({},h.layers[b])}}(function(d){var a=OpenLayers._document;OpenLayers._document=d.printableDocument.document;d.printableDocument.window.printViewer=new Geoportal.Viewer.Default(m,OpenLayers.Util.extend({mode:"mini",territory:d.map.baseLayer.territory,projection:d.map.getProjection().clone(),displayProjection:OpenLayers.Projection.CRS84.clone(),controls:[new Geoportal.Control.Logo({logoSize:Geoportal.Control.Logo.WHSizes.mini,attributionDiv:p}),new Geoportal.Control.Loading(null,{printButton:OpenLayers.Util.getElement("prnt"+d.id),maximizeControl:function(q){Geoportal.Control.Loading.prototype.maximizeControl.apply(this,[q]);OpenLayers.Element.hide(this.printButton)},minimizeControl:function(q){Geoportal.Control.Loading.prototype.minimizeControl.apply(this,[q]);OpenLayers.Element.show(this.printButton)}})],proxy:OpenLayers.ProxyHost||null,nameInstance:"printViewer",loadTheme:d.map.getApplication().loadTheme},j));OpenLayers._document=a})(this);this.addLayers()},getAPIScripts:function(){var a="";var d="";if(b=="Min"){d=!OpenLayers.singleFile?"lib/":"";a+='<script type="text/javascript" src="'+OpenLayers._getScriptLocation()+d+'OpenLayers.js"><!-- --><\/script>\n'}d=!Geoportal.singleFile?"lib/":"";var b=(Geoportal.VERSION_NUMBER.split(";").shift()).split(" ").pop();a+='<script type="text/javascript" src="'+Geoportal._getScriptLocation()+d+"Geoportal"+b+'.js"><!-- --><\/script>\n';return a},setScripts:function(e){var a="";if(e){if((e instanceof String)&&e.match(/^(http|\.|\/)/)){e=[e]}if(e instanceof String){a+='<script type="text/javascript" charset="utf-8">\n<!--\n'+e+"\n  -->\n<\/script>"}else{for(var d=0,b=e.length;d<b;d++){a+='\n<script type="text/javascript" charset="utf-8" src="'+e[d]+'"><!-- --><\/script>'}}}return a},getStyles:function(){var b="";for(var e=0,m=document.styleSheets.length;e<m;e++){var f=document.styleSheets.item(e);var a=f.owningElement||f.ownerNode;if(f.href){b+='<link rel="stylesheet" type="text/css" '+(a.id?'id="'+a.id+'" ':"")+'href="'+f.href+'"/>\n'}else{b+='<style type="text/css"'+(a.id?' id="'+a.id+'"':"")+">\n<!--\n";var o=f.rules||f.cssRules;for(var d=0,h=o.length;d<h;d++){var g=o.item(d);b+=g.selectorText+"{"+g.style.cssText+"}\n"}b+="  -->\n</style>\n"}}b+='<style type="text/css">\n<!--\n.gpMainMapCell {\nborder:0px solid none;\n}\ndiv#pHeader'+this.tick+"{\nfloat:left;\n}\nh1#pHeaderTitle"+this.tick+"{\n}\ndiv#pProlog"+this.tick+"{\n}\nform#pPrologFrm"+this.tick+"{\n}\nform#pPrologFrm"+this.tick+" div{\nwidth:"+this.size.w+"px;\nmargin-bottom:10px;\n}\ntextarea#pPrologComments"+this.tick+"{\nwidth:99%;\n}\ndiv#pFooter"+this.tick+"{\nfont-size:0.75em;\nwidth:99%;\nfloat:left;\n}\ndiv#pFooterInfo"+this.tick+"{\n}\ndiv#pFooterDate"+this.tick+"{\n}\ndiv#printAttribution_"+this.tick+"{\n}\n  -->\n</style>\n";return b},header:function(){var a='<div id="pHeader'+this.tick+'">\n<h1 id="pHeaderTitle'+this.tick+'">\n<a target="_blank" href="http://www.geoportail.fr/">\n<img alt="Mariane" src="'+Geoportal.Util.getImagesLocation()+'marianeHP.gif"/>\n<img alt="Géoportail" src="'+Geoportal.Util.getImagesLocation()+'logo_geoportail.gif"/>\n</a>\n</h1>\n</div>';return a},prolog:function(){var a='<div id="pProlog'+this.tick+'">\n<form name="pPrologFrm'+this.tick+'" action="javascript:(void)0;">\n<div>\n<textarea id="pPrologComments'+this.tick+'" name="pPrologComments'+this.tick+'" cols="80" rows="5">\n'+OpenLayers.i18n("gpControlPrintMap.comments")+"</textarea>\n</div></form>\n</div>";return a},epilog:function(){var a="";return a},footer:function(){var o=this.map.getCenter().transform(this.map.getProjection(),OpenLayers.Projection.CRS84);var h=OpenLayers.i18n("N");var f=OpenLayers.i18n("S");var p=OpenLayers.i18n("E");var b=OpenLayers.i18n("W");var a=Geoportal.Util.degToDMS(o.lon,[p,b]).replace(/"/g,"&quot;").replace(/ /g,"&nbsp;");var m=Geoportal.Util.degToDMS(o.lat,[h,f]).replace(/"/g,"&quot;").replace(/ /g,"&nbsp;");var e=this.map.getApproxScaleDenominator();var j=new Date();var g='<div id="pFooter'+this.tick+'">\n<div id="pFooterInfo'+this.tick+'">'+OpenLayers.i18n("approx.scale")+e+"<br/>"+OpenLayers.i18n("approx.center")+": "+a+"&nbsp;&nbsp;"+m+'</div>\n<div id="printAttribution_'+this.tick+'"></div>\n<div id="pFooterDate'+this.tick+'">'+OpenLayers.String.sprintf("%4d-%02d-%02d",j.getFullYear(),(j.getMonth()+1),j.getDate())+"&nbsp;&nbsp;-&nbsp;&nbsp;"+OpenLayers.i18n("gpControlPrintMap.print.forbidden")+"</div>\n</div>";return g},getPageContent:function(){var d=OpenLayers._document.location.pathname.split("?")[0];var e=d.split("/");d=e.pop();d=e.join("/");var a=OpenLayers._document.location.protocol+"//"+OpenLayers._document.location.hostname+(OpenLayers._document.location.port?":"+OpenLayers._document.location.port:"")+d+"/";var b='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml">\n<head>\n<title>'+OpenLayers.i18n(this.title)+'</title>\n<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>\n<base url="'+a+'"/>\n'+this.getAPIScripts()+this.setScripts()+this.getStyles()+'<style type="text/css">\n<!--\n@media print {body{display:block!important;}}\ndiv#printContainer_'+this.tick+"{width:"+this.size.w+"px;height:"+this.size.h+'px;}\n  -->\n</style>\n<script type="text/javascript">\n<!--\nvar printViewer= null, __Geoportal$timer= null, __Geoportal$PrintReady= false;\nfunction printPage() {\nif (__Geoportal$timer) { window.clearTimeout(__Geoportal$timer); __Geoportal$timer= null; }\nvar d= document.getElementById("printContainer_'+this.tick+'");\nvar a= document.getElementById("printAttribution_'+this.tick+'");\nif (typeof(OpenLayers)==="undefined" || typeof(Geoportal)==="undefined" || typeof(Geoportal.Viewer)==="undefined" || typeof(Geoportal.Viewer.Default)==="undefined" || printViewer==null || d==null || a==null || __Geoportal$PrintReady!==true) {\n__Geoportal$timer= window.setTimeout("printPage()", 500);\nreturn;\n}\nvar elm= OpenLayers.Util.getElement("prnt'+this.id+'");\nelm.onclick= function() {\nOpenLayers.Element.hide(elm);\nself.print();\nOpenLayers.Element.show(elm);\n};\n'+(this.onPrint||"")+'\n}\n  -->\n<\/script>\n</head>\n<body>\n<form id="prnt'+this.id+'" name="prnt'+this.id+'" style="display:none;" action="javascript:(void)0">\n<input type="button" value="'+OpenLayers.i18n(this.displayClass+".print")+'"/>\n</form>\n'+this.header()+"\n<center>\n"+this.prolog()+'\n<div id="printContainer_'+this.tick+'"></div>\n'+this.epilog()+"\n</center>\n"+this.footer()+'\n<script type="text/javascript">\n<!--\nfunction loadPage(e) {\nif (window.removeEventListener && e.eventPhase==3) window.removeEventListener("load",loadPage,false);\nelse if(window.detachEvent) window.detachEvent("onload",loadPage);\n\nprintPage();\n}\nif(window.addEventListener) window.addEventListener("load",loadPage,false);\nelse if (window.attachEvent) window.attachEvent("onload",loadPage);\n  -->\n<\/script>\n</body>\n</html>\n';return{isUrl:false,html:b,base:a}},changeLang:function(a){this.div.title=OpenLayers.i18n(this.displayClass+".title");if(this.panel_div){this.panel_div.title=this.div.title}},CLASS_NAME:"Geoportal.Control.PrintMap"});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 e=new Geoportal.OLS.LUS.SearchCentreDistance(a);e.accuracy=parseFloat(b.getAttribute("accuracy"));if(isNaN(e.accuracy)){e.accuracy=null}e.uom=b.getAttribute("uom");d.measure=e},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 e=this.createElementNSPlus("xls:GeocodeResponse");for(var d=0,a=b.getNbGeocodeResponseList();d<a;d++){this.writeNode("xls:GeocodeResponseList",b.getGeocodeResponseList()[d],e)}return e},ReverseGeocodeResponse:function(e){var d=this.createElementNSPlus("xls:ReverseGeocodeResponse");for(var b=0,a=e.getNbReverseGeocodedLocations();b<a;b++){this.writeNode("xls:ReverseGeocodedLocation",e.getReverseGeocodedLocations()[b],d)}return d},GeocodeResponseList:function(d){var e=this.createElementNSPlus("xls:GeocodeResponseList",{attributes:{numberOfGeocodedAddresses:d.getNbGeocodedAddresses()}});for(var b=0,a=d.getNbGeocodedAddresses();b<a;b++){this.writeNode("xls:GeocodedAddress",d.getGeocodedAddresses()[b],e)}return e},ReverseGeocodedLocation:function(a){var b=this.createElementNSPlus("xls:ReverseGeocodedLocation");this.writeNode("gml:Point",a.lonlat,b);if(a.address){this.writeNode("xls:Address",a.address,b)}if(a.searchCentreDistance){this.writeNode("xls:SearchCentreDistance",a.searchCentreDistance,b)}return b},GeocodedAddress:function(b){var a=this.createElementNSPlus("xls:GeocodedAddress");this.writeNode("gml:Point",b.lonlat,a);if(b.address){this.writeNode("xls:Address",b.address,a)}if(b.geocodeMatchCode){this.writeNode("xls:GeocodeMatchCode",b.geocodeMatchCode,a)}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 e=this.createElementNSPlus("xls:GeocodeRequest");for(var d=0,a=b.getNbAddresses();d<a;d++){this.writeNode("xls:Address",b.getAddresses()[d],e)}return e},ReverseGeocodeRequest:function(e){var d=this.createElementNSPlus("xls:ReverseGeocodeRequest");if(e.position){this.writeNode("xls:Position",e.position,d)}var a=e.getNbPreferences();if(a>0){for(var b=0;b<a;b++){this.writeNode("xls:ReverseGeocodePreference",e.getPreferences()[b],d)}}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"},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,olsRqst: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.png";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.abortRequest();this.cleanQueries();this.selectCntrl=null;Geoportal.Layer.OpenLS.Core.prototype.destroy.apply(this,arguments)},setMap:function(e){if(e){Geoportal.Layer.OpenLS.prototype.setMap.apply(this,arguments);if(this.selectCntrl){e.addControl(this.selectCntrl)}if(e.apiKey&&e.catalogue){var b;for(var d=0,a=e.apiKey.length;d<a;d++){b=e.apiKey[d];if(e.catalogue[b].layers[this.name]){this.GeoRM=this.options.GeoRM=Geoportal.GeoRMHandler.addKey(b,e.catalogue[b].tokenServer.url,e.catalogue[b].tokenServer.ttl,e,{transport:e.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(e,p){if(!(e instanceof Array)){e=[e]}if(this.GeoRM){if(!this.GeoRM.getToken(this,arguments)){var h=[];for(var f=0,b=e.length;f<b;f++){h.push(e[f].clone())}this.wait={clbk:Geoportal.Layer.OpenLS.Core.LocationUtilityService.prototype.GEOCODE,args:[h,OpenLayers.Util.extend({},p)]};return}}var d=new Geoportal.OLS.LUS.GeocodeRequest();if(!this.queriedAddresses){this.queriedAddresses=[]}for(var f=0,m=e.length;f<m;f++){this.queriedAddresses[f]={hash:e[f].toString(),features:null};d.addAddress(e[f].clone())}var j=new Geoportal.OLS.XLS({version:this.format.version,_header:new Geoportal.OLS.RequestHeader({sessionID:""})});j.addBody(new Geoportal.OLS.Request("GeocodeRequest",this.format.version,"",{maximumResponses:this.maximumResponses,_requestParameters:d}));var a=this.format.write(j);var g=OpenLayers.Format.XML.prototype.write.apply(this.format,[a]);a=null;j.destroy();j=null;d=null;var o=OpenLayers.Util.applyDefaults(p,this.postOptions);if(this.GeoRM){o.url=this.map.catalogue[this.GeoRM.GeoRMKey].layers[this.name].url;o.params=this.GeoRM.token;if(this.GeoRM.transport=="referrer"){OpenLayers.Util.extend(o.params,Geoportal.GeoRMHandler.getCookieReferrer((this.map?this.map.div:null),true))}}if(o.onSuccess&&o.scopeOn){this.options.onSuccess=o.onSuccess;this.options.scopeOn=o.scopeOn;o.success=function(q){this.postOptions.scope.GcSuccess.apply(this.postOptions.scope,[q]);if(this.options.scopeOn&&this.options.onSuccess){this.options.onSuccess.apply(this.options.scopeOn,[q])}}}else{o.success=function(q){this.postOptions.scope.GcSuccess.apply(this.postOptions.scope,[q])}}if(o.onFailure&&o.scopeOn){this.options.onFailure=o.onFailure;this.options.scopeOn=o.scopeOn;o.failure=function(q){this.postOptions.scope.LUSFailure.apply(this.postOptions.scope,[q]);if(this.options.scopeOn&&this.options.onFailure){this.options.onFailure.apply(this.options.scopeOn,[q])}}}else{o.failure=function(q){this.postOptions.scope.LUSFailure.apply(this.postOptions.scope,[q])}}this.olsRqst=OpenLayers.Request.POST(OpenLayers.Util.applyDefaults({data:g},o));g=null;o=null},REVERSE_GEOCODE:function(m,o){if(this.GeoRM){if(!this.GeoRM.getToken(this,arguments)){var g=[];for(var e=0,b=adr.length;e<b;e++){g.push(adr[e].clone())}this.wait={clbk:Geoportal.Layer.OpenLS.Core.LocationUtilityService.prototype.GEOCODE,args:[g,OpenLayers.Util.extend({},o)]};return}}var d=new Geoportal.OLS.LUS.ReverseGeocodeRequest(m);d.addPreference(new Geoportal.OLS.LUS.ReverseGeocodePreference("StreetAddress"));if(!this.queriedAddresses){this.queriedAddresses=[]}this.queriedAddresses[0]={hash:m.toString(),features:null};var h=new Geoportal.OLS.XLS({version:this.format.version,_header:new Geoportal.OLS.RequestHeader({sessionID:""})});h.addBody(new Geoportal.OLS.Request("ReverseGeocodeRequest",this.format.version,"",{maximumResponses:this.maximumResponses,_requestParameters:d}));var a=this.format.write(h);var f=OpenLayers.Format.XML.prototype.write.apply(this.format,[a]);a=null;h.destroy();h=null;d=null;var j=OpenLayers.Util.applyDefaults(o,this.postOptions);if(this.GeoRM){j.url=this.map.catalogue[this.GeoRM.GeoRMKey].layers[this.name].url;j.params=this.GeoRM.token;if(this.GeoRM.transport=="referrer"){OpenLayers.Util.extend(j.params,Geoportal.GeoRMHandler.getCookieReferrer((this.map?this.map.div:null),true))}}if(j.onSuccess&&j.scopeOn){this.options.onSuccess=j.onSuccess;this.options.scopeOn=j.scopeOn;j.success=function(p){this.postOptions.scope.RvGcSuccess.apply(this.postOptions.scope,[p]);if(this.options.scopeOn&&this.options.onSuccess){this.options.onSuccess.apply(this.options.scopeOn,[p])}}}else{j.success=function(p){this.postOptions.scope.RvGcSuccess.apply(this.postOptions.scope,[p])}}if(j.onFailure&&j.scopeOn){this.options.onFailure=j.onSuccess;this.options.scopeOn=j.scopeOn;j.failure=function(p){this.postOptions.scope.LUSFailure.apply(this.postOptions.scope,[p]);if(this.options.scopeOn&&this.options.onFailure){this.options.onFailure.apply(this.options.scopeOn,[p])}}}else{j.failure=function(p){this.postOptions.scope.LUSFailure.apply(this.postOptions.scope,[p])}}this.olsRqst=OpenLayers.Request.POST(OpenLayers.Util.applyDefaults({data:f},j));f=null;j=null},GcSuccess:function(e){Geoportal.Layer.OpenLS.prototype.success.apply(this,arguments);this.olsRqst=null;if(!this.ols){this.queriedAddresses=null;return}var m=this.ols.getBodies()[0];if(!m){this.queriedAddresses=null}else{var h=m.getResponseParameters();if(!h||h.getNbGeocodeResponseList()<=0){this.queriedAddresses=null}else{for(var g=0,d=h.getNbGeocodeResponseList();g<d;g++){var a=h.getGeocodeResponseList()[g];if(!a||a.getNbGeocodedAddresses()<=0){this.queriedAddresses=null}else{for(var f=0,o=a.getNbGeocodedAddresses();f<o;f++){var p=a.getGeocodedAddresses()[f];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[g].features){this.queriedAddresses[g].features=[]}this.queriedAddresses[g].features.push(q)}}}}}this.ols.destroy();this.ols=null},RvGcSuccess:function(j){Geoportal.Layer.OpenLS.prototype.success.apply(this,arguments);this.olsRqst=null;if(!this.ols){this.queriedAddresses=null;return}var a=this.ols.getBodies()[0];if(!a){this.queriedAddresses=null}else{var h=a.getResponseParameters();if(!h||h.getNbReverseGeocodedLocations()<=0){this.queriedAddresses=null}else{for(var g=0,f=h.getNbReverseGeocodedLocations();g<f;g++){var e=h.getReverseGeocodedLocations()[g];if(!e||!e.lonlat||!e.address){continue}var d=new OpenLayers.Feature.Vector(e.lonlat,{address:e.address.clone(),measure:(e.measure?e.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;this.olsRqst=null},createPopupForAddress:function(b){var a=function(){var e='<div class="gpPopupBody">';var f=b.attributes.address;e+=f.toHTMLString();e+="</div>";var d=new Geoportal.Popup.Anchored("chicken",this.geometry.getBounds().getCenterLonLat(),new OpenLayers.Size(80,40),e,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}},abortRequest:function(){if(this.olsRqst){this.olsRqst.abort();this.olsRqst=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,onSelectLocation: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=this.div.ownerDocument.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)},closeForm:function(){this.layer.abortRequest();Geoportal.Control.Form.prototype.closeForm.apply(this,arguments)},onSearchClick:function(b,a){if(a||window.event){OpenLayers.Event.stop(a?a:window.event)}this.resultDiv.innerHTML="";this.resultDiv.style.display="none";return false},geocode:function(){},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}this.resultDiv.innerHTML="";this.resultDiv.style.display="";return true},LUSFailure:function(d){if(this.wImg){this.wImg.style.display="none"}this.resultDiv.innerHTML="";var b=this.div.ownerDocument.createElement("div");b.className="gpLUSResult";var a=this.div.ownerDocument.createElement("span");a.innerHTML=OpenLayers.i18n("lus.not.match");b.appendChild(a);this.resultDiv.appendChild(b);this.resultDiv.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.onSelectLocation(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:50,length:80,callbacks:[{evt:"click",func:this.onSearchClick}]});Geoportal.Control.LocationUtilityService.prototype.loadContent.apply(this,arguments);Geoportal.Control.Form.focusOn(b)},onSearchClick:function(g,b){Geoportal.Control.LocationUtilityService.prototype.onSearchClick.apply(this,arguments);var j=["name"];var f="^("+j.join("|")+")";var m=new RegExp(f);if(g.id.match(m)&&OpenLayers.String.contains(g.id,this.id)){if(!g.hasFocus){for(var d=0,a=j.length;d<a;d++){var h=OpenLayers.Util.getElement(j[d]+this.id);if(h&&g.id!=h.id&&h.hasFocus){Geoportal.Control.Form.focusOff(h)}}Geoportal.Control.Form.focusOn(g)}return false}if(g.id.match(/^search/)){this.geocode();return false}this.closeForm();return false},geocode:function(){var b=new Geoportal.OLS.Address("FR");var d=OpenLayers.String.trim(OpenLayers.Util.getElement("name"+this.id).value);if(d==""){return}b.name=d;if(this.wImg){this.wImg.style.display=""}this.layer.GEOCODE([b],{onSuccess:this.LUSSuccess,onFailure:this.LUSFailure,scopeOn:this});b.destroy();b=null},LUSSuccess:function(j){if(Geoportal.Control.LocationUtilityService.prototype.LUSSuccess.apply(this,arguments)===false){return false}var d=this.layer.queriedAddresses[0].features;d=d.sort(Geoportal.Control.LocationUtilityService.GeoNames.orderBDNyme);this.resultDiv.style.display="none";for(var m=0,e=d.length;m<e;m++){var p=d[m];var a=this.div.ownerDocument.createElement("div");a.className="gpLUSResult";if((m%2)==1){a.className+="Alternate"}if(p.attributes.geocodeMatchCode){var g=this.div.ownerDocument.createElement("div");g.className="gpGeocodeMatchCode";if(p.attributes.geocodeMatchCode.accuracy<=1){g.className+="Accuracy075to100"}else{if(p.attributes.geocodeMatchCode.accuracy<=0.75){g.className+="Accuracy050to075"}else{if(p.attributes.geocodeMatchCode<=0.5){g.className+="Accuracy025to050"}else{if(p.attributes.geocodeMatchCode<=0.25){g.className+="Accuracy000to025"}}}}var o=this.div.ownerDocument.createElement("img");o.className="gpGeocodeMatchCodeMatchType";o.alt=o.title="";o.src=Geoportal.Util.getImagesLocation()+"OLSnone.gif";g.appendChild(o);a.appendChild(g)}var v=this.div.ownerDocument.createElement("span");v.style.cursor="pointer";var b={cntrl:this,feature:p};var u=p.attributes.address;var h=u.getNbPlaces()>0?(u.getPlaces()[0]).name||"":"?";var q=u.postalCode?u.postalCode.name||"":"?";v.innerHTML=h+" ["+q+"]";b.zoom=this.setZoom(p);OpenLayers.Event.observe(v,"click",OpenLayers.Function.bindAsEventListener(this.onResultClick,b));a.appendChild(v);this.resultDiv.appendChild(a)}this.resultDiv.style.display=""},CLASS_NAME:"Geoportal.Control.LocationUtilityService.GeoNames"});Geoportal.Control.LocationUtilityService.GeoNames.orderBDNyme=function(u,r){var p=r.attributes,d=u.attributes;var f=p.geocodeMatchCode.accuracy-d.geocodeMatchCode.accuracy;if(f==0){var v=p.address;var q=(v&&v.postalCode?v.postalCode.name:"")||"NR";var e=Geoportal.Control.LocationUtilityService.GeoNames.CODE_NAT[q];if(!e){e=Geoportal.Control.LocationUtilityService.GeoNames.CODE_NAT.NR}var g=e.weight;var j=(v&&v.places&&v.places.length>0?v.places[0].name:"")||"";v=d.address;q=(v&&v.postalCode?v.postalCode.name:"")||"NR";e=Geoportal.Control.LocationUtilityService.GeoNames.CODE_NAT[q];if(!e){e=Geoportal.Control.LocationUtilityService.GeoNames.CODE_NAT.NR}var h=e.weight;var m=(v&&v.places&&v.places.length>0?v.places[0].name:"")||"";if(g!=h){return g-h}return m>j?1:m<j?-1:0}return 1000*f};Geoportal.Control.LocationUtilityService.GeoNames.setZoomForBDNyme=function(b){var a=b.attributes.address;var d=a?a.postalCode?a.postalCode.name||"NR":"NR":"NR";var g=Geoportal.Control.LocationUtilityService.GeoNames.CODE_NAT[d];if(!g){g=Geoportal.Control.LocationUtilityService.GeoNames.CODE_NAT.NR}var e=g.zoom;return e};Geoportal.Control.LocationUtilityService.GeoNames.CODE_NAT={"Capitale d'état":{weight:500,zoom:10},"Préfecture de région":{weight:499,zoom:11},"Préfecture":{weight:498,zoom:12},"Sous-préfecture":{weight:497,zoom:13},Canton:{weight:496,zoom:13},Commune:{weight:495,zoom:14},"Lieu-dit habité":{weight:301,zoom:15},"Lieu-dit non habité":{weight:300,zoom:16},"Musée":{weight:299,zoom:13},"Enceinte militaire":{weight:298,zoom:13},"Parc de loisirs":{weight:297,zoom:13},"Parc des expositions":{weight:296,zoom:13},"Parc zoologique":{weight:295,zoom:13},"Village de vacances":{weight:294,zoom:13},Bois:{weight:293,zoom:13},Parc:{weight:292,zoom:13},"Enseignement supérieur":{weight:291,zoom:13},Science:{weight:290,zoom:13},"Centrale électrique":{weight:289,zoom:13},"Haras national":{weight:288,zoom:13},"Zone industrielle":{weight:287,zoom:13},"Etablissement thermal":{weight:286,zoom:13},"Espace public":{weight:285,zoom:13},"Habitation troglodytique":{weight:284,zoom:13},"Marais salants":{weight:283,zoom:13},Golf:{weight:282,zoom:13},Hippodrome:{weight:281,zoom:13},Stade:{weight:280,zoom:13},"Aérodrome militaire":{weight:279,zoom:13},"Aérodrome non militaire":{weight:278,zoom:13},"Aéroport international":{weight:277,zoom:13},"Aéroport quelconque":{weight:276,zoom:13},"Gare routière":{weight:275,zoom:13},"Gare voyageurs uniquement":{weight:274,zoom:13},"Gare voyageurs et fret":{weight:273,zoom:13},"Gare fret uniquement":{weight:272,zoom:13},"Téléphérique":{weight:271,zoom:13},"Voie ferrée":{weight:270,zoom:13},"Château":{weight:269,zoom:16},Grange:{weight:268,zoom:16},Moulin:{weight:267,zoom:16},Quartier:{weight:266,zoom:16},Refuge:{weight:265,zoom:16},"Etablissement pénitentiaire":{weight:264,zoom:16},"Maison forestière":{weight:263,zoom:16},Camping:{weight:262,zoom:16},Construction:{weight:261,zoom:16},"Maison du parc":{weight:260,zoom:16},Menhir:{weight:259,zoom:16},Monument:{weight:258,zoom:16},Arbre:{weight:257,zoom:16},Clinique:{weight:256,zoom:16},"Hôpital":{weight:255,zoom:16},"Etablissement hospitalier":{weight:254,zoom:16},Barrage:{weight:253,zoom:16},Croix:{weight:252,zoom:16},Tombeau:{weight:251,zoom:16},Digue:{weight:250,zoom:16},Dolmen:{weight:249,zoom:16},"Vestiges archéologiques":{weight:248,zoom:16},"Point de vue":{weight:247,zoom:16},Mine:{weight:246,zoom:16},"Ouvrage militaire":{weight:245,zoom:16},Amer:{weight:244,zoom:16},Baie:{weight:243,zoom:16},Banc:{weight:242,zoom:16},Canal:{weight:241,zoom:16},Cascade:{weight:240,zoom:16},Embouchure:{weight:239,zoom:16},"Espace maritime":{weight:238,zoom:16},Glacier:{weight:237,zoom:16},Lac:{weight:236,zoom:16},Marais:{weight:235,zoom:16},"Pêcherie":{weight:234,zoom:16},Perte:{weight:233,zoom:16},"Point d'eau":{weight:232,zoom:16},"Rivière":{weight:231,zoom:16},Cap:{weight:230,zoom:16},Cirque:{weight:229,zoom:16},Col:{weight:228,zoom:16},"Crête":{weight:227,zoom:16},"Dépression":{weight:226,zoom:16},Dune:{weight:225,zoom:16},Escarpement:{weight:224,zoom:16},Gorge:{weight:223,zoom:16},Grotte:{weight:222,zoom:16},Ile:{weight:221,zoom:16},Isthme:{weight:220,zoom:16},Montagne:{weight:219,zoom:16},Pic:{weight:218,zoom:16},Plage:{weight:217,zoom:16},Plaine:{weight:216,zoom:16},"Récif":{weight:215,zoom:16},Rochers:{weight:214,zoom:16},Sommet:{weight:213,zoom:16},"Vallée":{weight:212,zoom:16},Versant:{weight:211,zoom:16},Volcan:{weight:210,zoom:16},"Aire de repos":{weight:209,zoom:16},"Aire de service":{weight:208,zoom:16},Carrefour:{weight:207,zoom:16},Chemin:{weight:206,zoom:16},Echangeur:{weight:205,zoom:16},"Infrastructure routière":{weight:204,zoom:16},"Péage":{weight:203,zoom:16},Parking:{weight:202,zoom:16},Pont:{weight:201,zoom:16},Port:{weight:200,zoom:16},"Rond-point":{weight:199,zoom:16},Tunnel:{weight:198,zoom:16},NR:{weight:1,zoom:16}};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:50,length:80,callbacks:[{evt:"click",func:this.onSearchClick}]});this.buildInputTextField(a,{id:"municipality",mandatory:true,size:30,length:50,callbacks:[{evt:"click",func:this.onSearchClick}]});this.buildInputTextField(a,{id:"postalcode",size:10,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(g,b){Geoportal.Control.LocationUtilityService.prototype.onSearchClick.apply(this,arguments);var j=["address","municipality","postalcode"];var f="^("+j.join("|")+")";var m=new RegExp(f);if(g.id.match(m)&&OpenLayers.String.contains(g.id,this.id)){if(!g.hasFocus){for(var d=0,a=j.length;d<a;d++){var h=OpenLayers.Util.getElement(j[d]+this.id);if(h&&g.id!=h.id&&h.hasFocus){Geoportal.Control.Form.focusOff(h)}}Geoportal.Control.Form.focusOn(g)}return false}if(g.id.match(/^search/)){this.geocode();return false}this.closeForm();return false},geocode:function(){var d=new Geoportal.OLS.Address("FR");var e=OpenLayers.String.trim(OpenLayers.Util.getElement("address"+this.id).value);var f=new Geoportal.OLS.Street();f.name=e;e=OpenLayers.String.trim(OpenLayers.Util.getElement("municipality"+this.id).value);if(e==""){return}var b=new Geoportal.OLS.StreetAddress();b.addStreet(f);d.streetAddress=b;var g=new Geoportal.OLS.Place({classification:"Municipality",name:e});d.addPlace(g);e=OpenLayers.String.trim(OpenLayers.Util.getElement("postalcode"+this.id).value);d.postalCode=new Geoportal.OLS.PostalCode({name:e});if(this.wImg){this.wImg.style.display=""}this.layer.GEOCODE([d],{onSuccess:this.LUSSuccess,onFailure:this.LUSFailure,scopeOn:this});d.destroy();d=null},LUSSuccess:function(m){if(Geoportal.Control.LocationUtilityService.prototype.LUSSuccess.apply(this,arguments)===false){return false}var d=this.layer.queriedAddresses[0].features;this.resultDiv.style.display="none";for(var o=0,e=d.length;o<e;o++){var u=d[o];var a=this.div.ownerDocument.createElement("div");a.className="gpLUSResult";if((o%2)==1){a.className+="Alternate"}if(u.attributes.geocodeMatchCode){var g=this.div.ownerDocument.createElement("div");g.className="gpGeocodeMatchCode";if(u.attributes.geocodeMatchCode<=0.25){g.className+="Accuracy000to025"}else{if(u.attributes.geocodeMatchCode<=0.5){g.className+="Accuracy025to050"}else{if(u.attributes.geocodeMatchCode.accuracy<=0.75){g.className+="Accuracy050to075"}else{if(u.attributes.geocodeMatchCode.accuracy<=1){g.className+="Accuracy075to100"}}}}var p=this.div.ownerDocument.createElement("img");p.className="gpGeocodeMatchCodeMatchType";p.i18nKey=u.attributes.geocodeMatchCode.matchType;p.alt=p.title="";p.src=Geoportal.Util.getImagesLocation()+"OLSnone.gif";if(p.i18nKey){if(this.matchTypes){var v="";for(var h=0,q=this.matchTypes.length;h<q;h++){if(!this.matchTypes[h].re||(v=p.i18nKey.match(this.matchTypes[h].re))){v=v[0];p.i18nKey="gpControlLocationUtilityServiceGeocode.matchType."+v;p.src=this.matchTypes[h].src;break}}}p.alt=p.title=OpenLayers.i18n(p.i18nKey)}g.appendChild(p);a.appendChild(g)}var z=this.div.ownerDocument.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);this.resultDiv.appendChild(a)}this.resultDiv.style.display="";return true},onResultClick:function(a){Geoportal.Control.LocationUtilityService.prototype.onResultClick.apply(this,arguments);if(a.ctrlKey&&a.altKey&&this.feature.attributes.geocodeMatchCode.matchType.match(/city/i)){var b=this.feature.attributes.address.getPlaces()[0];var d=this.feature.attributes.address.postalCode;OpenLayers.Util.getElement("municipality"+this.cntrl.id).value=b.name;OpenLayers.Util.getElement("postalcode"+this.cntrl.id).value=d.name;this.cntrl.geocode()}},changeLang:function(a){Geoportal.Control.LocationUtilityService.prototype.changeLang.apply(this,arguments)},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 e=OpenLayers.Util.getElement("longitude"+this.id);var b=OpenLayers.Util.getElement("latitude"+this.id);OpenLayers.Event.observe(e,"change",OpenLayers.Function.bind(this.updateLocation,this,e,b));OpenLayers.Event.observe(b,"change",OpenLayers.Function.bind(this.updateLocation,this,e,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(e){var f=new OpenLayers.Geometry.Point(this.map.getCenter().lon,this.map.getCenter().lat);f.transform(this.map.getProjection(),OpenLayers.Projection.CRS84);this.buildInputTextField(e,{id:"longitude",mandatory:true,size:12,length:12,callbacks:[{evt:"click",func:this.onSearchClick}],value:f.x});this.buildInputTextField(e,{id:"latitude",mandatory:true,size:12,length:12,callbacks:[{evt:"click",func:this.onSearchClick}],value:f.y});var b=Geoportal.Util.getImagesLocation()+"xy-target.png";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(g){g.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(g){this.layer.dragCntrl.activate()},onUnselect:function(g){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(g,b){Geoportal.Control.LocationUtilityService.prototype.onSearchClick.apply(this,arguments);var j=["longitude","latitude"];var f="^("+j.join("|")+")";var m=new RegExp(f);if(g.id.match(m)&&OpenLayers.String.contains(g.id,this.id)){if(!g.hasFocus){for(var d=0,a=j.length;d<a;d++){var h=OpenLayers.Util.getElement(j[d]+this.id);if(h&&g.id!=h.id&&h.hasFocus){Geoportal.Control.Form.focusOff(h)}}Geoportal.Control.Form.focusOn(g)}return false}if(g.id.match(/^search/)){this.geocode();return false}this.closeForm();return false},geocode:function(){var g=OpenLayers.Util.getElement("longitude"+this.id);var a=OpenLayers.Util.getElement("latitude"+this.id);if(!g||!a){return}var f=parseFloat(g.value);var e=parseFloat(a.value);if(isNaN(f)||isNaN(e)){return}var d=new OpenLayers.Geometry.Point(f,e);d.transform(this.map.getDisplayProjection(),OpenLayers.Projection.CRS84);var b=new Geoportal.OLS.Position(d);if(this.wImg){this.wImg.style.display=""}this.layer.REVERSE_GEOCODE(b,{onSuccess:this.LUSSuccess,onFailure:this.LUSFailure,scopeOn:this});d=null;b.destroy();b=null},updateLLForm:function(b,a){if(!b||!b.geometry||!b.geometry.x){return}var e=new OpenLayers.Geometry.Point(b.geometry.x,b.geometry.y);e.transform(this.map.getProjection(),OpenLayers.Projection.CRS84);var f=OpenLayers.Util.getElement("longitude"+this.id);f.value=Math.round(e.x*this.accuracy)/this.accuracy;var d=OpenLayers.Util.getElement("latitude"+this.id);d.value=Math.round(e.y*this.accuracy)/this.accuracy},updateLocation:function(h,d,a){if(a||window.event){OpenLayers.Event.stop(a?a:window.event)}var b=this.rvgcvl.features[0];if(!b||!h||!d){return true}var g=parseFloat(h.value);var e=parseFloat(d.value);if(!isNaN(g)&&!isNaN(e)){this.rvgcvl.destroyFeatures();var f=new OpenLayers.Geometry.Point(g,e);f.transform(OpenLayers.Projection.CRS84,this.map.getProjection());b=new OpenLayers.Feature.Vector(f);this.rvgcvl.addFeatures([b]);this.map.setCenter(new OpenLayers.LonLat(f.x,f.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 h=null;if(b.geonamesOptions){if(b.geonamesOptions.control){h=b.geonamesOptions.control;this.geonamesCntrlId=h.id}else{b.geonamesOptions.layerOptions=b.geonamesOptions.layerOptions||{};var j=OpenLayers.Util.extend({},b.geonamesOptions.layerOptions);var g=new Geoportal.Layer.OpenLS.Core.LocationUtilityService(j.name||OpenLayers.Util.createUniqueID("LUS.Geonames"),j);this.geonamesCntrlId=b.geonamesOptions.id||(b.geonamesOptions.div?b.geonamesOptions.div.id:null)||"gn_"+this.id;h=new Geoportal.Control.LocationUtilityService.GeoNames(g,OpenLayers.Util.extend({id:this.geonamesCntrlId,title:"gpControlLocationUtilityService.geonames.title"},b.geonamesOptions))}this.addControls([h])}if(b.geocodeOptions){if(b.geocodeOptions.control){h=b.geocodeOptions.control;this.geocodeCntrlId=h.id}else{b.geocodeOptions.layerOptions=b.geocodeOptions.layerOptions||{};var a=OpenLayers.Util.extend({},b.geocodeOptions.layerOptions);var e=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;h=new Geoportal.Control.LocationUtilityService.Geocode(e,OpenLayers.Util.extend({id:this.geocodeCntrlId,title:"gpControlLocationUtilityService.geocode.title"},b.geocodeOptions))}this.addControls([h])}if(b.reverseGeocodeOptions){if(b.reverseGeocodeOptions.control){h=b.reverseGeocodeOptions.control;this.reverseGeocodeCntrlId=h.id}else{b.reverseGeocodeOptions.layerOptions=b.reverseGeocodeOptions.layerOptions||{};var d=OpenLayers.Util.extend({},b.reverseGeocodeOptions.layerOptions);var f=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;h=new Geoportal.Control.LocationUtilityService.ReverseGeocode(f,OpenLayers.Util.extend({id:this.reverseGeocodeCntrlId,title:"gpControlLocationUtilityService.reverse.geocode.title"},b.reverseGeocodeOptions))}this.addControls([h])}if(b.cswOptions){if(b.cswOptions.control){h=b.cswOptions.control;this.cswCntrlId=h.id}else{this.cswCntrlId=b.cswOptions.id||(b.cswOptions.div?b.cswOptions.div.id:null)||"csw_"+this.id;h=new Geoportal.Control.CSW(OpenLayers.Util.extend({id:this.cswCntrlId,title:"gpControlCSW.title"},b.cswOptions));this.addControls([h])}}},CLASS_NAME:"Geoportal.Control.SearchToolbar"});Geoportal.Catalogue=OpenLayers.Class({map:null,urlServices:{},initialize:function(b,u){if(b){this.map=b}if(u.apiKey){var h={"SEAREGIONS.LEVEL0:WMSC":"ELEVATION.LEVEL0:WMSC","ELEVATION.SLOPS:WMSC":"ELEVATION.SLOPES:WMSC"};if(!(u.apiKey instanceof Array)){u.apiKey=[u.apiKey]}var e;for(var g=0,d=u.apiKey.length;g<d;g++){e=u.apiKey[g];if(!e){continue}if(u[e]!=null){this[e]={tokenServer:u[e].tokenServer,geoRMKey:e,tokenTimeOut:u[e].tokenTimeOut,transport:u[e].transport||"json",bounds:u[e].bounds?OpenLayers.Bounds.fromArray(u[e].bounds):new OpenLayers.Bounds(-180,-90,180,90),layers:u[e].resources,allowedGeoportalLayers:u[e].allowedGeoportalLayers};for(var r in h){var m=this[e].layers[r];if(m){var a=OpenLayers.Util.extend(m,{name:h[r]});this[e].layers[a.name]=a;delete this[e].layers[r];for(var f=0,o=this[e].allowedGeoportalLayers.length;f<o;f++){if(this[e].allowedGeoportalLayers[f]===r){this[e].allowedGeoportalLayers[f]=a.name;break}}}}}else{this[e]={tokenServer:"http://localhost/",geoRMKey:e,tokenTimeOut:60000,layers:{},allowedGeoportalLayers:[]}}}this.apiKey=u.apiKey.slice(0);if(u.services){this.services={};for(var g=0,d=this.apiKey.length;g<d;g++){var e=this.apiKey[g];if(!e){continue}for(var p in this[e].resources){var q=this[e].resources[p].url;if(u.services[q]&&!this.services[q]){this.services[q]=u.services[q]}}}}}},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}if(this.services){this.services=null}},_orderLayersStack:function(b){var h=[];var o;var f,d=b.length;var p=new RegExp(/^([^:]+)(:(.+))?$/);for(f=0;f<d;f++){var e=b[f].match(p);if(e==null){continue}var j=e[1];if(j==null){continue}var a=e[3]||"WMSC";var g=0;switch(j){case"ORTHOIMAGERY.ORTHOPHOTOS":g=999;break;case"ORTHOIMAGERY.ORTHOPHOTOS2000-2005":g=998.99;break;case"ORTHOIMAGERY.ORTHOPHOTOS.GENEVE":g=998.9;break;case"GEOGRAPHICALGRIDSYSTEMS.MAPS":g=998;break;case"GEOGRAPHICALGRIDSYSTEMS.COASTALMAPS":g=997.9;break;case"GEOGRAPHICALGRIDSYSTEMS.FRANCERASTER":g=997.89;break;case"GEOGRAPHICALGRIDSYSTEMS.ETATMAJOR40":g=997.2;break;case"GEOGRAPHICALGRIDSYSTEMS.1900TYPEMAPS":g=997.19;break;case"GEOGRAPHICALGRIDSYSTEMS.CASSINI":g=997.1;break;case"ORTHOIMAGERY.ORTHOPHOTOS.COAST2000":g=997;break;case"GEOGRAPHICALGRIDSYSTEMS.ADMINISTRATIVEUNITS":g=997.09;break;case"LANDUSE.AGRICULTURE2009":g=996.2009;break;case"LANDUSE.AGRICULTURE2008":g=996.2008;break;case"LANDUSE.AGRICULTURE2007":g=996.2007;break;case"LANDCOVER.FORESTINVENTORY.V2":g=996.2005;break;case"LANDCOVER.FORESTINVENTORY.V1":g=996.1987;break;case"LANDCOVER.CORINELANDCOVER":g=996;break;case"ELEVATION.SLOPS":j=j.replace("SLOPS","SLOPES");case"ELEVATION.SLOPES":g=989;break;case"CADASTRALPARCELS.PARCELS":g=979;break;case"NATURALRISKZONES.1910FLOODEDWATERSHEDS":g=969.2;break;case"NATURALRISKZONES.1910FLOODEDCELLARS":g=969.1;break;case"HYDROGRAPHY.HYDROGRAPHY":g=969;break;case"TRANSPORTNETWORKS.ROADS":g=899;break;case"TRANSPORTNETWORKS.RAILWAYS":g=898;break;case"TRANSPORTNETWORKS.RUNWAYS":g=897;break;case"BUILDINGS.BUILDINGS":g=799;break;case"UTILITYANDGOVERNMENTALSERVICES.ALL":g=699;break;case"ADMINISTRATIVEUNITS.BOUNDARIES":g=599;break;case"SEAREGIONS.LEVEL0":j=j.replace("SEAREGIONS","ELEVATION");case"ELEVATION.LEVEL0":g=499;break;case"GEOGRAPHICALNAMES.NAMES":g=498.9;break;default:break}o={layerId:j+":"+a,weight:g};h.unshift(o)}h.sort(function(r,q){return q.weight-r.weight});d=h.length;var m=[];for(f=0;f<d;f++){o=h.shift();m[f]=o.layerId}return m},getTerritory:function(e){if(e==undefined){if(this.map){e=this.map.territory||"FXX"}else{e="FXX"}}if(Geoportal.Catalogue.TERRITORIES[e]==undefined){if(this.map){e=this.map.territory||"FXX"}else{e="FXX"}}for(var b=0,a=Geoportal.Catalogue.TERRITORIES[e].defaultCRS.length;b<a;b++){var d=Geoportal.Catalogue.TERRITORIES[e].defaultCRS[b];if(typeof(d)=="string"){Geoportal.Catalogue.TERRITORIES[e].defaultCRS[b]=new OpenLayers.Projection(d,{domainOfValidity:OpenLayers.Bounds.fromArray(Geoportal.Catalogue.TERRITORIES[e].geobbox)})}}if(typeof(Geoportal.Catalogue.TERRITORIES[e].geoCRS[0])=="string"){Geoportal.Catalogue.TERRITORIES[e].geoCRS[0]=new OpenLayers.Projection(Geoportal.Catalogue.TERRITORIES[e].geoCRS[0],{domainOfValidity:OpenLayers.Bounds.fromArray(Geoportal.Catalogue.TERRITORIES[e].geobbox)})}return e},findTerritory:function(e){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 f=OpenLayers.Bounds.fromArray(a.geobbox);var b=f.containsLonLat(e);f=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(j,m,a){if(j==undefined){if(this.map){j=this.map.territory||"FXX"}else{j="FXX"}}var o=[];if(!m){if(!a){o.push(Geoportal.Catalogue.TERRITORIES[j].displayCRS[0])}else{o=Geoportal.Catalogue.TERRITORIES[j].displayCRS.slice(0)}}else{o.push(m)}var b=[];for(var d=0,f=o.length;d<f;d++){var h=o[d];if(typeof(h)=="string"){try{h=new OpenLayers.Projection(h,{domainOfValidity:OpenLayers.Bounds.fromArray(Geoportal.Catalogue.TERRITORIES[j].geobbox)});b.push(h)}catch(g){}}else{b.push(h.clone())}}return b},getResolutions:function(f,d){var b=null;var e,a;if(d.getProjName()!="longlat"){b=[];for(e=0,a=Geoportal.Catalogue.RESOLUTIONS.length;e<a;e++){b[e]=Geoportal.Catalogue.RESOLUTIONS[e]}return b}if(d.getProjName()=="longlat"){b=[];for(e=0,a=Geoportal.Catalogue.RESOLUTIONS.length;e<a;e++){var g=new OpenLayers.LonLat(Geoportal.Catalogue.RESOLUTIONS[e],0);g.transform(Geoportal.Catalogue.TERRITORIES[f].defaultCRS[0],d);b[e]=g.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(f,d){var g=null;if(!f){if(this.apiKey){var b;for(var e=0,a=this.apiKey.length;e<a;e++){b=this.apiKey[e];if(this[b]&&this[b].bounds){if(!g){g=this[b].bounds.clone()}else{g.extend(this[b].bounds.clone())}}}}if(g==null){g=new OpenLayers.Bounds(-180,-90,180,90)}}else{g=OpenLayers.Bounds.fromArray(Geoportal.Catalogue.TERRITORIES[f].geobbox)}if(d&&typeof(d)!="string"){g.transform(f?Geoportal.Catalogue.TERRITORIES[f].geoCRS[0]:OpenLayers.Projection.CRS84,d,true)}return g},getDefaultMinZoom:function(d,a){if(!a){a=this.getNativeProjection(d)}var e=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<e){e=Geoportal.Catalogue.TERRITORIES[d].baseLayers[b].minZoomLevel}break}}}return e==Geoportal.Catalogue.RESOLUTIONS.length-1?0:e},getDefaultMaxZoom:function(e,b){if(!b){b=this.getNativeProjection(e)}var a=0;for(var d in Geoportal.Catalogue.TERRITORIES[e].baseLayers){if(Geoportal.Catalogue.TERRITORIES[e].baseLayers.hasOwnProperty(d)){if(b.isCompatibleWith(d)){if(Geoportal.Catalogue.TERRITORIES[e].baseLayers[d].maxZoomLevel>a){a=Geoportal.Catalogue.TERRITORIES[e].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,e){var d={logo:b,url:"#",attribution:"&copy; "};switch(b){case"asp":d.url="http://www.asp-public.fr/";d.attribution+="ASP";break;case"BNF":d.url="http://www.bnf.fr/";d.attribution+="BNF";break;case"cartosphere":d.url="http://www.esrifrance.fr/FranceRaster.asp";d.attribution+="CARTOSPHERE";break;case"cnes":d.url="http://www.cnes.fr";d.attribution+="CNES";break;case"cnrs":d.url="http://www.cnrs.fr";d.attribution+="CNRS";break;case"DIRENHAUTENORMANDIE":d.url="http://www.haute-normandie.ecologie.gouv.fr/";d.attribution+="DIRENHAUTENORMANDIE";break;case"DIRENIDF":d.url="http://www.ile-de-france.ecologie.gouv.fr/";d.attribution+="DIRENIDF";d.attribution+="CNV";case"div":d.url="http://www.ville.gouv.fr/";break;break;case"EHESS":d.url="http://www.ehess.fr/ldh/Themes/Theme_Cassini.htm";d.attribution+="EHESS";break;case"eurogeographics":d.url="http://www.eurogeographics.org/";d.attribution+="EuroGeographics";break;case"eea":d.url="http://www.stats.environnement.developpement-durable.gouv.fr/";d.attribution+="SOeS Environnement";break;case"ifn":d.url="http://www.ifn.fr/spip/sommaire.php3";d.attribution+="IFN";break;case"ird":d.url="http://www.cayenne.ird.fr/";d.attribution+="IRD";break;case"maaprat":d.url="http://agriculture.gouv.fr/";d.attribution+="MAAPRAT";break;case"meeddm":d.url="http://www.developpement-durable.gouv.fr/";d.attribution+="MEEDDM";break;case"partenaires-bdortho":d.url="http://www.ign.fr/institut/72/partenaires/partenaires-institutionnels-de-l-ign.htm";d.extent=[];d.extent.push(new OpenLayers.Bounds(5.80542659759521,45.6817817687988,7.04488706588745,46.4081611633301));d.extent.push(new OpenLayers.Bounds(2.38789987564087,45.2870712280273,3.98563718795776,46.2565994262695));break;case"planetobserver":d.url="http://www.planetobserver.com";d.attribution+="PlanetObserver";break;case"SEINEENPARTAGE":d.url="http://www.seineenpartage.fr/";d.attribution+="SEINEENPARTAGE";break;case"seasguyane":d.url="http://www.seas-guyane.org/";d.attribution+="SAES Guyane";break;case"shom":d.url="http://www.shom.fr";d.attribution+="SHOM";break;case"sitg":d.url="http://etat.geneve.ch/sitg/accueil.html";d.attribution+="SITG";break;case"spotimage":d.url="http://www.spotimage.fr";d.attribution+="SPOT IMAGE";break;default:d.logo="ign";d.url="http://www.ign.fr";d.attribution+="Institut Géographique National";break}if(a&&e){d.minZoomLevel=a;d.maxZoomLevel=e}return d},getLayerGeoRMKey:function(f,b){if(this.apiKey){var d;for(var e=0,a=this.apiKey.length;e<a;e++){d=this.apiKey[e];if(this[d]&&this[d].bounds&&this[d].bounds.intersectsBounds(this.getExtent(f),true)){for(var g in this[d].layers){if(g==b||g.match("^"+b+":")){return d}}}}}return null},getLayerParameters:function(a,p){var m={};var r=p.match("^([^:]+)(:(.+))?$");if(r==null){return null}var e=r[1],E=r[3];if(!e){return null}if(!E){E="WMSC"}if(e=="SEAREGIONS.LEVEL0"){e="ELEVATION.LEVEL0"}if(e=="ELEVATION.SLOPS"){e="ELEVATION.SLOPES"}var D=[];if(this.apiKey){var v;for(var z=0,u=this.apiKey.length;z<u;z++){v=this.apiKey[z];if(this[v]){for(var o in this[v].layers){if(o.match("^"+e+":"+E+"$")){D.push(OpenLayers.Util.extend({},this[v].layers[o]))}}}}}if(D.length==0){return null}var h=null;for(z=0,u=D.length;z<u;z++){if(E==D[z].type){h=D[z];break}}if(h==null){return null}m.resourceId=h.name+":"+h.type;m.url=h.url;m.params={layers:null,exceptions:"text/xml"};m.options={isBaseLayer:false,description:h.name+".description",visibility:false,opacity:1,view:{drop:false,zoomToExtent:false}};var q=Geoportal.Catalogue.TERRITORIES[a].defaultCRS.slice(0);switch(h.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(h.name){case"ORTHOIMAGERY.ORTHOPHOTOS":case"GEOGRAPHICALGRIDSYSTEMS.MAPS":m.options.visibility=true;break;default:break}switch(h.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(h.type=="WMSC"){m.params.format="image/jpeg"}break;default:if(h.type=="WMSC"){m.params.format="image/png";m.params.transparent=true}break}var b={};b.originators=[];var f="http://www.geocatalogue.fr/Detail.do?fileIdentifier=";switch(h.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(h.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=f+"GL_CARTE_ATF.xml";break;default:m=null;break}break;case"CHE":m=null;break;case"CRZ":switch(h.name){case"ORTHOIMAGERY.ORTHOPHOTOS":if(h.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(h.name){case"ORTHOIMAGERY.ORTHOPHOTOS":b.minZoomLevel=5;b.maxZoomLevel=18;if(h.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=f+"GL_PHOTO_FXX.xml";break;case"ORTHOIMAGERY.ORTHOPHOTOS2000-2005":b.minZoomLevel=9;b.maxZoomLevel=17;if(h.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(h.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=f+"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=f+"GL_CARTE_FXX.xml";break;case"GEOGRAPHICALGRIDSYSTEMS.COASTALMAPS":b.minZoomLevel=12;b.maxZoomLevel=15;if(h.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(h.type=="WMSC"){b.originators.push(this._getOriginator("cartosphere",7,17))}break;case"GEOGRAPHICALGRIDSYSTEMS.ETATMAJOR40":b.minZoomLevel=5;b.maxZoomLevel=16;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(h.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=f+"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(h.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=f+(h.name.match("2007$")?"0656092-c31f-4f44-b7ef-afb9b61df06f":h.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=f+"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=f+"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=f+"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=f+"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=16;b.maxExtent=new OpenLayers.Bounds(-5.559169,41.210393,9.835453,51.218632);b.metadataURL=f+"GL_HYDRO_FXX.xml";break;case"TRANSPORTNETWORKS.ROADS":b.minZoomLevel=5;b.maxZoomLevel=17;if(h.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,32.968315,34.21027,80.065907)}b.metadataURL=f+"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=f+"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=f+"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=f+"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=f+"GL_SRVPUB_FXX.xml";break;case"ADMINISTRATIVEUNITS.BOUNDARIES":b.minZoomLevel=5;b.maxZoomLevel=17;b.maxExtent=new OpenLayers.Bounds(-13.6841082,32.9683147,34.2102704,75.3561478);b.metadataURL=f+"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=f+"GL_LITO_FXX.xml";break;case"GEOGRAPHICALNAMES.NAMES":b.minZoomLevel=5;b.maxZoomLevel=17;b.metadataURL=f+"IGNF_BDNYMEr_2-0.xml";break;default:m=null;break}break;case"ANF":case"GLP":case"MTQ":case"SBA":case"SMA":switch(h.name){case"ORTHOIMAGERY.ORTHOPHOTOS":b.minZoomLevel=5;b.maxZoomLevel=17;if(h.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=f+"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=f+"GL_CARTE_"+a+".xml"}break;case"GEOGRAPHICALGRIDSYSTEMS.COASTALMAPS":b.minZoomLevel=12;b.maxZoomLevel=15;if(h.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(h.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=f+"GL_ALTI_"+a+".xml"}break;case"LANDUSE.AGRICULTURE2007":case"LANDUSE.AGRICULTURE2008":case"LANDUSE.AGRICULTURE2009":b.minZoomLevel=5;b.maxZoomLevel=15;if(h.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=f+(h.name.match("2007$")?"0656092-c31f-4f44-b7ef-afb9b61df06f":h.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=f+"GL_PARCEL_"+a+".xml"}break;case"HYDROGRAPHY.HYDROGRAPHY":b.minZoomLevel=5;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}if(a!="ANF"){b.metadataURL=f+"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=f+"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=f+"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=f+"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=f+"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=f+"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=11;b.maxZoomLevel=17;b.metadataURL=f+"IGNF_BDNYMEr_2-0.xml";break;default:m=null;break}break;case"GUF":switch(h.name){case"ORTHOIMAGERY.ORTHOPHOTOS":b.minZoomLevel=5;b.maxZoomLevel=17;if(h.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=f+"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=f+"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=f+"GL_ALTI_GUF.xml";break;case"LANDUSE.AGRICULTURE2007":case"LANDUSE.AGRICULTURE2008":case"LANDUSE.AGRICULTURE2009":b.minZoomLevel=5;b.maxZoomLevel=15;if(h.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=f+(h.name.match("2007$")?"0656092-c31f-4f44-b7ef-afb9b61df06f":h.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=16;b.maxExtent=new OpenLayers.Bounds(-54.515799,3.458729,-51.565011,5.813609);b.metadataURL=f+"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=f+"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=f+"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=f+"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=f+"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=f+"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=11;b.maxZoomLevel=17;b.metadataURL=f+"IGNF_BDNYMEr_2-0.xml";break;default:m=null;break}break;case"KER":switch(h.name){case"ORTHOIMAGERY.ORTHOPHOTOS":if(h.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=f+"GL_CARTE_KER.xml";break;default:m=null;break}break;case"MYT":switch(h.name){case"ORTHOIMAGERY.ORTHOPHOTOS":b.minZoomLevel=5;b.maxZoomLevel=17;if(h.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=f+"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=f+"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=f+"GL_ALTI_MYT.xml";break;case"HYDROGRAPHY.HYDROGRAPHY":b.minZoomLevel=14;b.maxZoomLevel=16;b.maxExtent=new OpenLayers.Bounds(44.989951,-13.025428,45.366121,-12.657478);b.metadataURL=f+"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=f+"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=f+"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=f+"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=f+"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(h.name){case"ORTHOIMAGERY.ORTHOPHOTOS":if(h.type=="WMSC"){b.minZoomLevel=5;b.maxZoomLevel=12;b.originators=[];b.originators.push(this._getOriginator("planetobserver",5,12));b.metadataURL=f+"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=f+"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=f+"GL_ALTI_NCL.xml";break;default:m=null;break}break;case"PYF":switch(h.name){case"ORTHOIMAGERY.ORTHOPHOTOS":if(h.type=="WMSC"){b.minZoomLevel=5;b.maxZoomLevel=12;b.originators=[];b.originators.push(this._getOriginator("planetobserver",5,12));b.metadataURL=f+"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=f+"GL_CARTE_PYF.xml";break;default:m=null;break}break;case"REU":switch(h.name){case"ORTHOIMAGERY.ORTHOPHOTOS":if(h.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=f+"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=f+"GL_CARTE_REU.xml";break;case"GEOGRAPHICALGRIDSYSTEMS.FRANCERASTER":b.minZoomLevel=10;b.maxZoomLevel=17;if(h.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=f+"GL_ALTI_REU.xml";break;case"LANDUSE.AGRICULTURE2007":case"LANDUSE.AGRICULTURE2008":case"LANDUSE.AGRICULTURE2009":b.minZoomLevel=5;b.maxZoomLevel=15;if(h.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=f+(h.name.match("2007$")?"0656092-c31f-4f44-b7ef-afb9b61df06f":h.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=f+"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=16;b.maxExtent=new OpenLayers.Bounds(55.177883,-21.414687,55.887313,-20.825967);b.metadataURL=f+"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=f+"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=f+"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=f+"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=f+"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=f+"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=11;b.maxZoomLevel=17;b.metadataURL=f+"IGNF_BDNYMEr_2-0.xml";break;default:m=null;break}break;case"ASP":switch(h.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=f+"GL_CARTE_ASP.xml";break;default:m=null;break}break;case"SPM":switch(h.name){case"ORTHOIMAGERY.ORTHOPHOTOS":b.minZoomLevel=5;b.maxZoomLevel=17;if(h.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=f+"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=f+"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=f+"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(h.name){case"ORTHOIMAGERY.ORTHOPHOTOS":b.minZoomLevel=0;b.maxZoomLevel=4;if(h.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(h.name){case"ORTHOIMAGERY.ORTHOPHOTOS":b.minZoomLevel=5;b.maxZoomLevel=17;if(h.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=f+"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=f+"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=f+"GL_ALTI_WLF.xml";break;default:m=null;break}break}if(m){b.name=h.name;b.projection=null;for(var z=0,C=q.length;z<C;z++){if(typeof(q[z])=="string"){q[z]=new OpenLayers.Projection(q[z],{domainOfValidity:OpenLayers.Bounds.fromArray(Geoportal.Catalogue.TERRITORIES[a].geobbox)})}else{q[z]=new OpenLayers.Projection(q[z].getCode(),{domainOfValidity:OpenLayers.Bounds.fromArray(Geoportal.Catalogue.TERRITORIES[a].geobbox)})}if(q[z].equals(this.map.getProjection())){b.projection=new OpenLayers.Projection(q[z].getCode(),{domainOfValidity:OpenLayers.Bounds.fromArray(Geoportal.Catalogue.TERRITORIES[a].geobbox)})}}if(h.type=="WMS"){b.srs={};for(var z=0,C=q.length;z<C;z++){var d=q[z].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=h.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 z=0,u=b.originators.length;z<u;z++){var g=b.originators[z];if(g.extent){if(!(g.extent instanceof Array)){g.extent=[g.extent]}for(var w=0,B=g.extent.length;w<B;w++){g.extent[w].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:["CRS:84","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:["CRS:84","IGNF:UTM39SW84"],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","IGNF:LAMB93","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","IGNF:UTM20W84GUAD"],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","IGNF:UTM22RGFG95"],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","IGNF:UTM42SW84"],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","IGNF:UTM20W84MART"],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","IGNF:RGM04UTM38S"],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","IGNF:RGNCUTM57S","IGNF:RGNCUTM58S","IGNF:RGNCUTM59S"],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","IGNF:RGPFUTM5S","IGNF:RGPFUTM6S","IGNF:RGPFUTM7S"],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","IGNF:RGR92UTM40S"],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:["CRS:84","IGNF:UTM43SW84"],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","IGNF:RGSPM06U21"],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:["CRS:84","IGNF:UTM01SW84"],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(j,f){OpenLayers.Map.prototype.initialize.apply(this,arguments);if(this.cursor){this.setCursor(this.cursor)}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 e;this.allowedGeoportalLayers=[];for(var g=0,b=this.apiKey.length;g<b;g++){e=this.apiKey[g];if(this.catalogue[e]&&this.catalogue[e].allowedGeoportalLayers){for(var a=0,h=this.catalogue[e].allowedGeoportalLayers.length;a<h;a++){this.allowedGeoportalLayers.push(this.catalogue[e].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){if(this.application){this.application.render(a)}else{OpenLayers.Map.prototype.render.apply(this,[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 e in this.catalogue[b].layers){if(this.catalogue[b].layers.hasOwnProperty(e)){this.catalogue[b].layers[e]=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 h=(this.getProjection()?this.getProjection().getProjName()=="longlat"?0.000028:1:undefined);var e=!(q.lonlat&&this.isValidLonLat(q.lonlat)&&q.lonlat.equals(this.center,h));if((b||e)&&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 g=0,j=this.getNumLayers();g<j;g++){var f=this.layers[g];if(!f.isBaseLayer||f==this.baseLayer){continue}if((p&&(((d<0&&typeof(f.minZoomLevel)=="number"&&f.minZoomLevel<=q.zoom)||(d>0&&typeof(f.maxZoomLevel)=="number"&&q.zoom<=f.maxZoomLevel))))||u){var r=f.projection;var m=o.clone();var v=f.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(f.maxZoomLevel)=="number"&&q.zoom>f.maxZoomLevel){q.zoom=f.maxZoomLevel}else{if(typeof(f.minZoomLevel)=="number"&&q.zoom<f.minZoomLevel){q.zoom=f.minZoomLevel}}}this.setBaseLayer(f,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(e){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(f,e){var b=f.getCenterLonLat();b=b.transform(OpenLayers.Projection.CRS84,this.getProjection());var g=f.clone().transform(OpenLayers.Projection.CRS84,this.getProjection(),true);if(this.baseLayer.wrapDateLine){var a=this.getMaxExtent();g=g.clone();while(g.right<g.left){g.right+=a.getWidth()}b=g.getCenterLonLat().wrapDateLine(a)}var d=this.getZoomForExtent(g,e)||0;this.setCenter(b,d)},setCenter:function(a,b,d,e){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,e])},setLonLatCenter:function(f,e,a,d,g){var b=new OpenLayers.LonLat(f,e);if(b){this.setCenter(b,a,d,g)}},setCenterAtLonLat:function(f,e,a,d,g){if(typeof(f)=="string"){f=Geoportal.Util.dmsToDeg(f)}if(typeof(e)=="string"){e=Geoportal.Util.dmsToDeg(e)}var b=new OpenLayers.LonLat(f,e);if(b){b.transform(OpenLayers.Projection.CRS84,this.getProjection());this.setCenter(b,a,d,g)}},setCursor:function(a){this.div.style.cursor=a},setProxyUrl:function(a){OpenLayers.Request.setProxyUrl(a)},setApplication:function(a){this.application=a},getApplication:function(){return this.application},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,handlersOptions:null,selectStyle:null,renderIntent:"select"};return a},addLayer:function(f,H,g,D,d){var G=null;var F=null;if(H&&!(typeof(H)=="string")){for(var v in H){if(H.hasOwnProperty(v)){var a={};a[v]=H[v];Geoportal.Lang.add(a);F=v;break}}}else{F=H}if(!F){F="#"+(this.getNumLayers()+1)}d=d||{};var E={all:false,preFeatureInsert:false,onFeatureInsert:false,format:false,loadend:false};if(d.preventDefaultBehavior===true){E={all:true,preFeatureInsert:true,onFeatureInsert:true,format:true,loadend:true}}else{if(d.preventDefaultBehavior!=undefined){E={preFeatureInsert:d.preventDefaultBehavior.preFeatureInsert||false,onFeatureInsert:d.preventDefaultBehavior.onFeatureInsert||false,format:d.preventDefaultBehavior.format||false,loadend:d.preventDefaultBehavior.loadend||false};E.all=E.preFeatureInsert&&E.onFeatureInsert&&E.format&&E.loadend}}d.preventDefaultBehavior=E;D=D||{};var b={isBaseLayer:false,visibility:false,view:{drop:true,zoomToExtent:true}};var I=false;switch(f){case"WMS":b=OpenLayers.Util.extend(b,{opacity:0.5,buffer:0,singleTile:false});G=new OpenLayers.Layer.WMS(F,g,D,OpenLayers.Util.extend(b,d));break;case"MapServer":if(!OpenLayers.Layer.MapServer){return null}b=OpenLayers.Util.extend(b,{opacity:0.5,singleTile:false});G=new OpenLayers.Layer.MapServer(F,g,D,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)});G=new Geoportal.Layer.WMSC(F,g,D,OpenLayers.Util.extend(b,d));break;case"WFS":if(!d.format&&!OpenLayers.Format.WFST){return null}b=OpenLayers.Util.extend(b,{strategies:[new OpenLayers.Strategy.BBOX()],extractAttributes:true,styleMap:new OpenLayers.StyleMap({pointRadius:4,strokeColor:"black",strokeWidth:2,strokeOpacity:0.5,fillOpacity:0.2,fillColor:"black"})});var u={url:g,featureType:D.typename||"NONE",featurePrefix:d.protocolOptions&&d.protocolOptions.featurePrefix,featureNS:d.protocolOptions&&d.protocolOptions.featureNS,geometryName:d.protocolOptions&&d.protocolOptions.geometryName,srsName:d.projection||this.getProjection().getCode(),version:D.version,format:d.format};if(d.projection&&!(d.projection instanceof OpenLayers.Projection)){d.projection=new OpenLayers.Projection(d.projection)}if(!d.format){delete u.format;OpenLayers.Util.extend(u,{formatOptions:{internalProjection:this.getProjection().clone(),externalProjection:d.projection||this.getProjection().clone()}});OpenLayers.Util.extend(u.formatOptions,d.formatOptions)}if(d.preventDefaultBehavior.preFeatureInsert===false){b.preFeatureInsert=Geoportal.Popup.setPointerCursorForFeature;I=true}if(d.preventDefaultBehavior.format===false){D=OpenLayers.Util.applyDefaults(D,{maxFeatures:50})}b.protocol=new OpenLayers.Protocol.WFS(u);if(d.projection){if(d.maxExtent){d.maxExtent.transform(d.projection,this.getProjection())}d.projection=this.getProjection();if(d.units){d.units=d.projection.getUnits()}}G=new OpenLayers.Layer.Vector(F,OpenLayers.Util.extend(b,d));break;case"KML":case"GPX":case"OSM":case"GeoRSS":case"GML":var h=OpenLayers.Layer.Vector;var u={format:OpenLayers.Format.GML,formatOptions:{internalProjection:this.getProjection()}};b=OpenLayers.Util.extend(b,{projection:this.getProjection(),panMapIfOutOfView:true,strategies:[new OpenLayers.Strategy.Fixed()]});if(d.preventDefaultBehavior.preFeatureInsert===false){b.preFeatureInsert=Geoportal.Popup.setPointerCursorForFeature;I=true}if(d.preventDefaultBehavior.onFeatureInsert===false){b.onFeatureInsert=Geoportal.Popup.Anchored.createPopUpForGMLFeature;I=true}switch(f){case"KML":u.format=OpenLayers.Format.KML;if(d.preventDefaultBehavior.onFeatureInsert===false){b.onFeatureInsert=Geoportal.Popup.Anchored.createPopUpForKMLFeature}if(d.preventDefaultBehavior.format===false){u.formatOptions.extractStyles=true}break;case"GPX":u.format=Geoportal.Format.GPX;if(d.preventDefaultBehavior.onFeatureInsert===false){b.onFeatureInsert=Geoportal.Popup.Anchored.createPopUpForGPXFeature}break;case"OSM":u.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.onFeatureInsert===false){b.onFeatureInsert=Geoportal.Popup.Anchored.createPopUpForGMLFeature}break;case"GeoRSS":u.format=OpenLayers.Format.GeoRSS;if(d.preventDefaultBehavior.onFeatureInsert===false){b.onFeatureInsert=Geoportal.Popup.Anchored.createPopUpForGeoRSSFeature}if(d.preventDefaultBehavior.format===false){u.formatOptions.size=new OpenLayers.Size(250,150);u.formatOptions.autoSize=false;u.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"])))}break;default:break}if(!u.format){return null}if(d.preventDefaultBehavior.loadend===false){D.eventListeners=D.eventListeners||{};var j=D.eventListeners.loadend||undefined;D.eventListeners.loadend=function(){var e=this.getDataExtent();if(e){this.maxExtent=e}if(j&&typeof(j)=="function"){j.apply(this,arguments)}}}OpenLayers.Util.extend(u.formatOptions,d.formatOptions);b.protocol=new OpenLayers.Protocol.HTTP({url:g,format:new u.format(u.formatOptions)});G=new h(F,OpenLayers.Util.extend(b,D));break;default:if(typeof(f)=="object"&&f instanceof OpenLayers.Layer){G=f;if(H&&!(typeof(H)=="string")){G.name=F}if(d.visibility!==undefined){G.visibility=d.visibility}if(d.preventDefaultBehavior.all===false){I=(typeof(OpenLayers.Layer.Vector)!="undefined"&&(G instanceof OpenLayers.Layer.Vector)&&(d.hasOwnProperty("onSelect")||d.hasOwnProperty("onUnselect")||d.hasOwnProperty("onBeforeSelect")||d.attachDefaultPopup===true))||(typeof(OpenLayers.Layer.Markers)!="undefined"&&(G instanceof OpenLayers.Layer.Markers))}break}return null}var B=!(G instanceof OpenLayers.Layer.Vector)&&(typeof(G.minZoomLevel)=="number"&&typeof(G.maxZoomLevel)=="number");if(!G.isBaseLayer&&B){for(var w=0,z=this.layers.length;w<z;w++){var m=this.layers[w];if(!m.isBaseLayer){continue}if(G.territory){if(m.territory==G.territory){this.adjustZoomLevels(m,G);break}continue}if(G.getCompatibleProjection(m)){if(G.maxExtent!=null){var C=G.maxExtent.clone();C.transform(G.getNativeProjection(),m.getNativeProjection());if(!(C.containsBounds(m.maxExtent,true,true)||m.maxExtent.containsBounds(C,true,true))){continue}}this.adjustZoomLevels(m,G);continue}}}if(!G.isBaseLayer&&G.getCompatibleProjection(this.baseLayer)===null){if(!(typeof(OpenLayers.Layer.WFS)!="undefined"&&(G instanceof OpenLayers.Layer.WFS))){G.displayInLayerSwitcher=false}}OpenLayers.Map.prototype.addLayer.apply(this,[G]);if(I){if(G instanceof OpenLayers.Layer.Vector){var p=this.getPopupDefaults(f);for(var r in p){if(d.hasOwnProperty(r)){p[r]=d[r]}}var q=new OpenLayers.Control.SelectFeature(G,p);this.addControl(q);if(G.visibility){q.activate()}this.events.on({changelayer:Geoportal.Map.onVisibilityChange,scope:q})}}if(G.isBaseLayer){this.events.register("preaddlayer",G,Geoportal.Layer.onPreAddLayer)}else{if(typeof(OpenLayers.Layer.Vector.RootContainer)=="undefined"||!(G instanceof (OpenLayers.Layer.Vector.RootContainer))){this.events.register("changebaselayer",G,G.changeBaseLayer,1)}}return G},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,e=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(e!=undefined&&(a.maxZoomLevel==undefined||e>a.maxZoomLevel)){a.maxZoomLevel=e;if(a.resolutions){a.minResolution=a.resolutions[e]}if(a.scales){a.maxScale=a.scales[e]}}},updateZoomLevels:function(o){if(o.property!="visibility"){return}if(o.layer.isBaseLayer){return}if(o.layer.getCompatibleProjection(this.baseLayer)==null){return}if(o.layer instanceof OpenLayers.Layer.Vector){return}if(typeof(o.layer.minZoomLevel)!="number"){return}var d=o.layer.minZoomLevel;if(typeof(o.layer.maxZoomLevel)!="number"){return}var g=o.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(o.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,m=this.layers.length;h<m;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","loadTheme"],variables:{},viewerOptions:{},loadTheme:function(){},loadLayout:function(a){return null},loadControls:function(a){},completeLayout:function(a){},browser:null,unloadDestroy:null,initialize:function(a,m){if(!a){a="geoportalViewerDiv"}this.div=OpenLayers.Util.getElement(a);if(!this.div){this.div=OpenLayers._document.createElement("div");this.div.style.height="1px";this.div.style.width="1px"}var b=navigator.userAgent.toLowerCase();this.browser={version:(b.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(b)&&!/chrome/.test(b),opera:/opera/.test(b),msie:/msie/.test(b)&&!/opera/.test(b),mozilla:/mozilla/.test(b)&&!/(compatible|webkit)/.test(b),chrome:/chrome/.test(b)};m=m||{};this._setOptions(m);var j=this.loadLayout(m.layoutOptions);if(!j){OpenLayers.Console.error(OpenLayers.i18n("div.not.found",{id:this.div.id||""}))}var f="__OpenLayersCss__";var h=Geoportal.Util.loadCSS(OpenLayers._getScriptLocation()+"theme/default/style.css",f,"");var e="";if(h[1]){if(OpenLayers.Util.alphaHack()){e="__IE6OpenLayersCss__";Geoportal.Util.loadCSS(OpenLayers._getScriptLocation()+"theme/default/ie6-style.css",e,"")}e="__GoogleOpenLayersCss__";Geoportal.Util.loadCSS(OpenLayers._getScriptLocation()+"theme/default/google.css",e,"");e="__FramedCloudOpenLayersCss__";Geoportal.Util.loadCSS(OpenLayers._getScriptLocation()+"theme/default/framedCloud.css",e,"")}this.map=new Geoportal.Map(j,this.viewerOptions);this.map.setApplication(this);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(m.theme){if(!(m.theme instanceof Array)){m.theme=[m.theme]}for(var g=0,d=m.theme.length;g<d;g++){Geoportal.Util.loadCSS(m.theme[g].css,m.theme[g].id||null,m.theme[g].anchor||"")}}if(m.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(m.controls==null||m.controls.length==0){this.loadControls(m.controlsOptions)}this.completeLayout(m.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){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 e=0,g=this.viewerSpecifics.length;e<g;e++){var b=this.viewerSpecifics[e];if(u[b]!=undefined){this[b]=u[b]}}var r=this._initMap(u);if(this.territories.length==0){this.territories.push(this.territory)}var j=u.resolutions;if(!j){j=r.getResolutions(this.territory,this.projection)}var q=u.maxExtent;if(!q){q=r.getExtent(null,this.projection)}var d=u.minZoomLevel;var f=u.maxZoomLevel;var p=u.zoom;if(p==undefined){if(u.resolutions){if(d&&f){p=d+f}else{p=10}p=(p-(p%2))/2;p=p>=0?Math.floor(p):Math.ceil(p)}else{if(j){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||null,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(f)!="undefined"){this.viewerOptions.restrictedMaxZoomLevel=f}var m=null;if(u.resolutions||!j){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 h=m[b];if(u[h]!==undefined){this.viewerOptions[h]=u[h]}}this.viewerOptions.isMapReady=this.isMapReady;this.timeout={}},_initMap:function(b){var e=new Geoportal.Catalogue(null,b);this.territory=e.getTerritory(this.territory);this.projection=e.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 f=this.allowedDisplayProjections[d];if(typeof(f)=="string"){this.allowedDisplayProjections[d]=new OpenLayers.Projection(f,{domainOfValidity:OpenLayers.Bounds.fromArray(Geoportal.Catalogue.TERRITORIES[this.territory].geobbox)})}}this.displayProjection=this.allowedDisplayProjections[0].clone()}return e},_addTerritoriesBaselayers:function(){var v=this.viewerOptions.catalogue;var B=v.getExtent();var r=this.projection.equals(v.getNativeProjection(this.territory));var f=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 e=typeof(this.viewerOptions.restrictedMaxZoomLevel)!="undefined";var p;for(var g=0,h=this.territories.length;g<h;g++){p=this.territories[g];if(p=="WLD"){this.territories[g]="!"+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]:(f&&d?Geoportal.Catalogue.TERRITORIES[p].geoCRS[0]:null)));if(!u){a=null;continue}var m=v.getNativeProjection(p,((r&&!d)||(f&&d)?null:this.projection));a.transform(Geoportal.Catalogue.TERRITORIES[p].geoCRS[0],u,true);var j=v.getDefaultMinZoom(p,m);var C=v.getDefaultMaxZoom(p,m);if(b===true){if(this.viewerOptions.restrictedMinZoomLevel>C){continue}if(this.viewerOptions.restrictedMinZoomLevel>=j){j=this.viewerOptions.restrictedMinZoomLevel}}if(e===true){if(this.viewerOptions.restrictedMaxZoomLevel<j){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:j,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[g]="!"+this.territories[g]}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(e!==true){E.maxZoomLevel=undefined}}}D=null;if(r||f){this._addWorldBaseLayer(v)}},_addWorldBaseLayer:function(p){var m=p.getTerritory("WLD");var b=p.getNativeProjection(m);var g=p.getResolutions(m,b);var d=p.getDefaultMinZoom(m,b);var e=p.getDefaultMaxZoom(m,b);var h=typeof(this.viewerOptions.restrictedMinZoomLevel)!="undefined";var f=typeof(this.viewerOptions.restrictedMaxZoomLevel)!="undefined";if(h===true){if(this.viewerOptions.restrictedMinZoomLevel>e){return}if(this.viewerOptions.restrictedMinZoomLevel>=d){d=this.viewerOptions.restrictedMinZoomLevel}}if(f===true){if(this.viewerOptions.restrictedMaxZoomLevel<d){return}if(this.viewerOptions.restrictedMaxZoomLevel<=e){e=this.viewerOptions.restrictedMaxZoomLevel}}var a={isBaseLayer:true,displayInLayerSwitcher:false,projection:b,units:b.getUnits(),nativeProjection:b,resolutions:g,minZoomLevel:d,maxZoomLevel:e,maxExtent:p.getExtent(m,b),wrapDateLine:true,territory:m,displayProjection:this.displayProjection||p.getDisplayProjections(m)[0],allowedDisplayProjections:this.allowedDisplayProjections||p.getDisplayProjections(m,null,true)};var j=new Geoportal.Layer("_WLD_world_",a);this.getMap().addLayer(j);if(h!==true){j.minZoomLevel=undefined}if(f!==true){j.maxZoomLevel=undefined}this.territories.push("WLD")},addSphericalMercatorBaseLayer:function(a){a=a||{};var b=new OpenLayers.Projection("EPSG:3857");var e={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),wrapDateLine:true,territory:"WSM"};OpenLayers.Util.extend(e,a);var d=new OpenLayers.Layer("_WSM_world_",e);this.getMap().addLayer(d);return d},addPlateCarreBaseLayer:function(e){e=e||{};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),wrapDateLine:true,territory:"WPC"};OpenLayers.Util.extend(b,e);var d=new OpenLayers.Layer("_WPC_world_",b);viewer.getMap().addLayer(d);return d},isMapReady:function(){var a=(this.div!=null);return a},getTerritory:function(){return this.territory},getMap:function(){return this.map},addGeoportalLayer:function(e,o){var a=this.getMap();o=o||{};var m;for(var g=0,f=this.territories.length;g<f;g++){m=this.territories[g];if(!Geoportal.Catalogue.TERRITORIES.hasOwnProperty(m)){continue}if(a.getLayersBy("territory",m).length==0){continue}var j=a.catalogue.getLayerParameters(m,e);if(!j){continue}var h=null;if(typeof(o.minZoomLevel)!=="undefined"){if(o.minZoomLevel<j.options.minZoomLevel||o.minZoomLevel>j.options.maxZoomLevel){o.minZoomLevel=j.options.minZoomLevel}}if(typeof(o.maxZoomLevel)!=="undefined"){if(o.maxZoomLevel<j.options.minZoomLevel||o.maxZoomLevel>j.options.maxZoomLevel){o.maxZoomLevel=j.options.maxZoomLevel}}j.options=OpenLayers.Util.extend(j.options,o);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=m;var d=a.catalogue.getLayerGeoRMKey(m,j.resourceId);if(d!=null){var b={};if(a.catalogue[d].transport){b.transport=a.catalogue[d].transport}j.options.GeoRM=Geoportal.GeoRMHandler.addKey(d,a.catalogue[d].tokenServer.url,a.catalogue[d].tokenServer.ttl,a,b)}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(z){if(!z){return}if(!(z.property=="visibility"||z.property=="opacity")){return}if(z.layer===this){return}if(z.layer.getCompatibleProjection()==null){return}if(z.layer.name!=this.name){return}var q=z.layer[z.property];if(this.getCompatibleProjection()==null&&q!=this[z.property]){if(z.property=="visibility"){this.visibility=q;this.display(q);this.redraw()}else{this.setOpacity(q)}var w=this.map.getLayersBy("isBaseLayer",true);for(var u=0,p=w.length;u<p;u++){var r=w[u];if(r===this.map.baseLayer){continue}if(this.getCompatibleProjection(r)!=null){if(!this.savedStates[r.id]){this.savedStates[r.id]={}}this.savedStates[r.id][z.property]=q}}w=null}})}}},addGeoportalLayers:function(){var h=arguments.length>=1?arguments[0]:null;var b=arguments.length==2?arguments[1]:{};if(!h||h.length==0){h=this.getMap().allowedGeoportalLayers;if(!h){return}}var g=this.getMap().catalogue._orderLayersStack(h);var f={};if(b.global!==undefined){OpenLayers.Util.extend(f,b.global)}for(var d=0,a=g.length;d<a;d++){var e=b[g[d]]!==undefined?OpenLayers.Util.applyDefaults(b[g[d]],f):f;this.addGeoportalLayer(g[d],e)}},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.load=function(g,b,f,d,a){if(!b){return null}if(typeof(b)=="string"){b=[b]}if(b.length==0){return null}if(window.__Geoportal$timer===undefined){window.__Geoportal$timer=null}if(__Geoportal$timer!=null){window.clearTimeout(__Geoportal$timer)}if(typeof(OpenLayers)=="undefined"||typeof(Geoportal)=="undefined"||typeof(Geoportal.Viewer)=="undefined"||typeof(Geoportal.Viewer.Standard)=="undefined"){__Geoportal$timer=window.setTimeout("Geoportal.loadJSViewer();",300);return}f=f||{};a=a||{};OpenLayers.Util.applyDefaults(a,{mode:"normal",territory:"FXX",displayProjection:["CRS:84"]});Geoportal.GeoRMHandler.getConfig(b,null,a.geormUrl||null,{onContractsComplete:function e(){if(a.language){OpenLayers.Lang.setCode(a.language)}if(typeof(a.onBeforeView)=="function"){a.onBeforeView(a)}var j=new (a.viewerClass||Geoportal.Viewer.Default)(g,OpenLayers.Util.extend(a,window.gGEOPORTALRIGHTSMANAGEMENT===undefined?{apiKey:b}:gGEOPORTALRIGHTSMANAGEMENT));var r=a.layers||["ORTHOIMAGERY.ORTHOPHOTOS:WMSC","GEOGRAPHICALGRIDSYSTEMS.MAPS:WMSC"];var o=[];var m={};for(var v=0,z=r.length;v<z;v++){var E=r[v];var u=false;for(var w=0,C=b.length;w<C;w++){var F=j.getMap().catalogue[b[w]].allowedGeoportalLayers;var D=E.match("^([^:]+)(:(.+))?$");if(D==null){continue}var h=D[1],I=D[3];if(!h){return null}if(!I){I="WMSC"}for(var G=0,B=F.length;G<B;G++){if(F[G].match("^"+h+":"+I+"$")){u=true;break}}if(u){break}}if(u){o.push(E);m[E]={}}}if(o.length==1){m[o[0]]={opacity:1,visibility:true}}j.addGeoportalLayers(o,m);if(f.place&&m["TOPONYMS.ALL:OPENLS"]){}if(f.address&&m["ADDRESSES.CROSSINGS:OPENLS"]){}if(f.geolocation){}if(typeof(f.lon)=="string"){f.lon=Geoportal.Util.dmsToDeg(f.lon)}if(typeof(f.lat)=="string"){f.lat=Geoportal.Util.dmsToDeg(f.lat)}if(!isNaN(Number(f.lon))&&!isNaN(Number(f.lat))){f.center=new OpenLayers.LonLat(f.lon,f.lat)}if(f.center){a.territory=Geoportal.Catalogue.prototype.findTerritory.apply(this,[f.center])}if(f.center){f.center.transform(OpenLayers.Projection.CRS84,j.getMap().getProjection())}j.getMap().setCenter(f.center||j.viewerOptions.defaultCenter,d||j.viewerOptions.defaultZoom);gGEOPORTALRIGHTSMANAGEMENT.application=j;if(typeof(a.onView)=="function"){a.onView(j,a)}else{if(!a.overlays){var p=new OpenLayers.Layer.Vector("-x-",{styleMap:new OpenLayers.StyleMap({externalGraphic:Geoportal.Util.getImagesLocation()+"marker-ign.png",graphicWidth:108,graphicHeight:54,graphicXOffset:-54,graphicYOffset:-54}),isBaseLayer:false,displayInLayerSwitcher:false,opacity:1,visibility:true,preFeatureInsert:Geoportal.Popup.setPointerCursorForFeature,onFeatureInsert:Geoportal.Popup.Anchored.createPopUpForKMLFeature,formatOptions:{popupClass:OpenLayers.Popup.FramedCloud,autoSize:false,closeBox:false,size:new OpenLayers.Size(200,60)}});j.getMap().addLayer(p,null,null,null,{attachDefaultPopup:true});var H=j.getMap().getCenter();var z=(H.clone()).transform(p.getNativeProjection(),OpenLayers.Projection.CRS84);var q=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(H.lon,H.lat),{name:'<span class="gpPopupLabelCenter">'+(a.label||OpenLayers.i18n("approx.center"))+"</span>",description:'<span class="gpPopupDescriptionCenter">'+(a.description||OpenLayers.String.sprintf("%.6f %.6f",z.lon,z.lat))+"</span>"});p.addFeatures([q])}else{}j.openLayersPanel(false);j.setInformationPanelVisibility(false)}}})};Geoportal.Viewer.Default=OpenLayers.Class(Geoportal.Viewer,{mode:"normal",mapDiv:null,viewerSpecifics:["mode"],initialize:function(b,a){this.viewerSpecifics=Geoportal.Viewer.Default.prototype.viewerSpecifics.concat(Geoportal.Viewer.prototype.viewerSpecifics);Geoportal.Viewer.prototype.initialize.apply(this,arguments)},render:function(b){var a=this.div;this.div=OpenLayers.Util.getElement(b);this.div.style.overflow="hidden";this.mapDiv.parentNode.removeChild(this.mapDiv);this.div.appendChild(this.mapDiv);this.getMap().updateSize();if(this.timeout.render){window.clearTimeout(this.timeout.render);this.timeout.render=null}this.timeout.render=window.setTimeout(OpenLayers.Function.bind(function(){this.ready={w:-1,h:-1,b:0};var d=(this.infoCntrl?(this.infoCntrl.div.style.display=="none"?false:true):false);this.setInformationPanelVisibility(true);if(!d){this.setInformationPanelVisibility(false)}},this),250)},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}if(this.timeout.render){window.clearTimeout(this.timeout.render);this.timeout.render=null}}Geoportal.Viewer.prototype.destroy.apply(this,arguments)},loadTheme:function(){Geoportal.Util.loadCSS(Geoportal._getScriptLocation()+"theme/geoportal/style.css","__GeoportalCss__","");if(OpenLayers.Util.alphaHack()){Geoportal.Util.loadCSS(OpenLayers._getScriptLocation()+"theme/geoportal/ie6-style.css","__IE6GeoportalCss__","")}},loadLayout:function(b){var a=this.div.ownerDocument;this.div.style.overflow="hidden";this.mapDiv=a.createElement("div");this.mapDiv.id=this.div.id+"_OlMap";this.mapDiv.style.width="1px";this.mapDiv.style.height="1px";OpenLayers.Element.addClass(this.mapDiv,"gpMainMap");OpenLayers.Element.addClass(this.mapDiv,"gpMainMapCell");OpenLayers.Element.addClass(this.mapDiv,"olMap");OpenLayers.Element.addClass(this.mapDiv,"gpMap");this.div.appendChild(this.mapDiv);this.ready={w:-1,h:-1,b:0};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:a.logoSize||Geoportal.Control.Logo.WHSizes[this.mode],destroy:function(){if(this.map.getApplication()){this.map.getApplication().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.getApplication()){this.map.getApplication().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.getApplication()){this.map.getApplication().lyrSwCntrl=null}Geoportal.Control.LayerSwitcher.prototype.destroy.apply(this,arguments)}});this.getMap().addControl(b);this.lyrSwCntrl=b;b=new Geoportal.Control.Information({displayProjections:this.allowedDisplayProjections,destroy:function(){if(this.map.getApplication()){this.map.getApplication().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(e,a){var b=this.div.offsetWidth-e;this.div.style.width=e+"px";var d=this.div.offsetHeight-a;this.div.style.height=a+"px";this.getMap().updateSize();if(b!=0||d!=0){this.render(this.div)}if(this.infoCntrl){this.infoCntrl.updateSize()}if(this.logoCntrl){this.logoCntrl.changeLogoSize(Geoportal.Control.Logo.WHSizes[this.mode])}},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(p){if(this.mode=="mini"){p=false}if(this.timeout[p]){window.clearTimeout(this.timeout[p]);this.timeout[p]=null}var a=false;if(!p&&this.timeout[!p]){a=true}else{var g=this.ready.h==-1;if(g){var q=this.div.offsetHeight;if(/\d(%|em|pt)/.test(this.div.style.height)){q=Geoportal.Util.convertToPixels(this.div.style.height,false,this.div.parentNode)||q}else{q=parseInt(this.div.style.height)||q}var j=this.infoCntrl?this.infoCntrl.div.offsetHeight-this.infoCntrl.div.clientHeight:0;var m=this.infoCntrl?Geoportal.Util.getComputedStyle(this.infoCntrl.div,"height",true):0;var o="gpViewerDefault";var u=OpenLayers.Util.getRenderedDimensions("",null,{displayClass:o});if(Geoportal.Util.getCSSRule("."+o)){u.w=1}var e=this.infoCntrl?this.infoCntrl.getSize(true):new OpenLayers.Size(0,0);var r=this.mapDiv.offsetHeight-this.mapDiv.clientHeight;var f=this.mapDiv.offsetWidth-this.mapDiv.clientWidth;this.mapDiv.style.height=(q-r)+"px";this.mapDiv.style.width=(this.div.offsetWidth-f)+"px";a=a||!this.isMapReady(p)||e.h!=j+m||u.w==0;this.ready.h=j+m}}if(a){if(p||(!p&&!this.timeout[!p])){this.ready.h=-1}this.timeout[p]=window.setTimeout(OpenLayers.Function.bind(function(d){this.setInformationPanelVisibility(d)},this,p),200);return}if(this.mode=="mini"){this.getMap().events.triggerEvent("controlvisibilitychanged",{visibility:false,size:new OpenLayers.Size(0,0)});return}if(this.infoCntrl){this.infoCntrl.showControls(!p);this.infoCntrl.updateSize()}},isMapReady:function(){var a=arguments[0];var d=(this.div!=null&&!(this.mapDiv.clientHeight<=1)&&this.div.offsetWidth==this.mapDiv.offsetWidth&&this.div.offsetHeight==this.mapDiv.offsetHeight&&this.mapDiv.clientWidth==parseInt(this.mapDiv.style.width)&&this.mapDiv.clientHeight==parseInt(this.mapDiv.style.height))&&!(this.timeout&&((a!=undefined&&this.timeout[a])||(a==undefined&&(this.timeout[true]||this.timeout[false]))));return d},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(m){var g=this.div;var d=g.offsetWidth,j=g.offsetHeight;this.div=OpenLayers.Util.getElement(m);this.div.style.overflow="hidden";var b=this.div.offsetWidth||d,f=this.div.offsetHeight||j;var a=this.catalgDiv.offsetWidth+this.toolsDiv.offsetWidth;var e=this.fullScDiv.parentNode.offsetHeight+this.infoTgDiv.parentNode.offsetHeight;this.mapTbl.parentNode.removeChild(this.mapTbl);this.catalgDiv.style.height=(f-e)+"px";this.toolsDiv.style.height=(f-e)+"px";this.div.appendChild(this.mapTbl);this.getMap().updateSize();if(this.timeout.render){window.clearTimeout(this.timeout.render);this.timeout.render=null}this.timeout.render=window.setTimeout(OpenLayers.Function.bind(function(){var h=(this.infoCntrl?(this.infoCntrl.div.style.display=="none"?false:true):false);this.setInformationPanelVisibility(true);if(!h){this.setInformationPanelVisibility(false)}},this),250)},destroy:function(){if(!this.unloadDestroy){return}OpenLayers.Event.stopObserving(window,"unload",this.unloadDestroy);this.unloadDestroy=null;this.toolboxDiv=null;this.infoTgDiv=null;this.rT=null;this.toolsDiv=null;this.lT=null;this.layersDiv=null;this.fullScDiv=null;this.catalgDiv=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}if(this.timeout.render){window.clearTimeout(this.timeout.render);this.timeout.render=null}}Geoportal.Viewer.prototype.destroy.apply(this,arguments)},loadTheme:function(){Geoportal.Util.loadCSS(Geoportal._getScriptLocation()+"theme/geoportal/style.css","__GeoportalCss__","");if(OpenLayers.Util.alphaHack()){Geoportal.Util.loadCSS(OpenLayers._getScriptLocation()+"theme/geoportal/ie6-style.css","__IE6GeoportalCss__","")}Geoportal.Util.loadCSS(Geoportal._getScriptLocation()+"theme/geoportal/standard.css","__StandardCss__","")},loadLayout:function(e){var d=this.div.ownerDocument;this.div.style.overflow="hidden";this.mapTbl=d.createElement("table");this.mapTbl.id=this.div.id+"_GpMap";this.mapTbl.cellSpacing=this.mapTbl.cellPadding="0";this.mapTbl.className="gpMainMap";var a=d.createElement("tbody");var f=d.createElement("tr");var g=d.createElement("td");g.colSpan="3";g.className="gpViewerUpperSeparator";this.fullScDiv=d.createElement("div");this.fullScDiv.id=this.div.id+"_fullScreenToggle";this.fullScDiv.className="gpHorizontalUpperToggle";g.appendChild(this.fullScDiv);f.appendChild(g);a.appendChild(f);this.mapTbl.appendChild(a);f=d.createElement("tr");g=d.createElement("td");g.vAlign="top";g.className="gpLeftColumnCell";this.leftCell=g;this.catalgDiv=d.createElement("div");this.catalgDiv.id=this.div.id+"_Catalg";this.catalgDiv.className="gpLeftColumn";this.layersDiv=d.createElement("div");this.layersDiv.id=this.div.id+"_Layers";this.layersDiv.className="gpLeftColumnLayers";this.catalgDiv.appendChild(this.layersDiv);this.lT=d.createElement("div");this.lT.id=this.div.id+"_LayersToggle";this.lT.className="gpVerticalLeftToggle";this.catalgDiv.appendChild(this.lT);g.appendChild(this.catalgDiv);f.appendChild(g);g=d.createElement("td");g.vAlign="top";g.className="gpCentralColumnCell";this.mapDiv=d.createElement("div");this.mapDiv.id=this.div.id+"_OlMap";this.mapDiv.className="gpMainMap gpMainMapCell olMap gpMap";g.appendChild(this.mapDiv);f.appendChild(g);g=d.createElement("td");g.vAlign="top";g.className="gpRightColumnCell";this.rightCell=g;this.toolsDiv=d.createElement("div");this.toolsDiv.id=this.div.id+"_Tools";this.toolsDiv.className="gpRightColumn";this.rT=d.createElement("div");this.rT.id=this.div.id+"_ToolsToggle";this.rT.className="gpVerticalRightToggle";this.toolsDiv.appendChild(this.rT);this.toolboxDiv=d.createElement("div");this.toolboxDiv.id=this.div.id+"_ToolBx";this.toolboxDiv.className="gpRightColumnTools";this.toolsDiv.appendChild(this.toolboxDiv);g.appendChild(this.toolsDiv);f.appendChild(g);a.appendChild(f);f=d.createElement("tr");g=d.createElement("td");g.colSpan="3";g.className="gpViewerLowerSeparator";this.infoTgDiv=d.createElement("div");this.infoTgDiv.id=this.div.id+"_infoToggle";this.infoTgDiv.className="gpHorizontalLowerToggle";g.appendChild(this.infoTgDiv);f.appendChild(g);a.appendChild(f);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}this.viewer.getMap().updateSize();if(this.viewer.infoCntrl){this.viewer.infoCntrl.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:a.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({displayProjections:this.allowedDisplayProjections,destroy:function(){if(this.map.getApplication()){this.map.getApplication().infoCntrl=null}Geoportal.Control.Information.prototype.destroy.apply(this,arguments)}});this.getMap().addControl(b);this.infoCntrl=b},completeLayout:function(a){this.setInformationPanelVisibility(true);if(this.timeout.render){window.clearTimeout(this.timeout.render);this.timeout.render=null}this.timeout.render=window.setTimeout(OpenLayers.Function.bind(function(){this.render(this.div)},this),250)},setSize:function(g,a){var d=this.div.offsetWidth-g;var f=this.div.offsetHeight-a;var b=this.catalgDiv.offsetWidth+this.toolsDiv.offsetWidth;var e=this.fullScDiv.parentNode.offsetHeight+this.infoTgDiv.parentNode.offsetHeight;this.div.style.width=g+"px";this.div.style.height=a+"px";if(f!=0){this.catalgDiv.style.height=(a-e)+"px";this.toolsDiv.style.height=(a-e)+"px"}this.getMap().updateSize();if(d!=0||f!=0){this.render(this.div)}if(this.infoCntrl){this.infoCntrl.updateSize()}},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(o){if(this.timeout[o]){window.clearTimeout(this.timeout[o]);this.timeout[o]=null}var a=false;if(!o&&this.timeout[!o]){a=true}else{var f=this.ready.h==-1;if(f){var g=this.infoCntrl?this.infoCntrl.div.offsetHeight-this.infoCntrl.div.clientHeight:0;var j=this.infoCntrl?Geoportal.Util.getComputedStyle(this.infoCntrl.div,"height",true):0;var m="gpViewerDefault";var q=OpenLayers.Util.getRenderedDimensions("",null,{displayClass:m});if(Geoportal.Util.getCSSRule("."+m)){q.w=1}var e=this.infoCntrl?this.infoCntrl.getSize(true):new OpenLayers.Size(0,0);if(/\d(%|em|pt)/.test(this.div.style.height)){var p=Geoportal.Util.convertToPixels(this.div.style.height,false,this.div.parentNode)||this.div.offsetHeight;this.mapTbl.style.height=p+"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.toolsDiv.style.height=this.catalgDiv.style.height=(-this.mapTbl.rows[0].offsetHeight+p-this.mapTbl.rows[2].offsetHeight)+"px"}a=a||!this.isMapReady(o)||e.h!=g+j||q.w==0;this.ready.h=g+j}}if(a){if(o||(!o&&!this.timeout[!o])){this.ready.h=-1}this.timeout[o]=window.setTimeout(OpenLayers.Function.bind(function(d){this.setInformationPanelVisibility(d)},this,o),200);return}if(this.infoCntrl){this.infoCntrl.showControls(!o);this.infoCntrl.updateSize()}},CLASS_NAME:"Geoportal.Viewer.Standard"});
