var OpenLayers={singleFile:true};(function(){var singleFile=(typeof OpenLayers=="object"&&OpenLayers.singleFile);var scriptLocation;window.OpenLayers={_scriptName:(!singleFile)?"lib/OpenLayers.js":"OpenLayers.js",_getScriptLocation:function(){if(scriptLocation!=undefined){return scriptLocation;}
scriptLocation="";var isOL=new RegExp("(^|(.*?\\/))("+OpenLayers._scriptName+")(\\?|$)");var scripts=document.getElementsByTagName('script');for(var i=0,len=scripts.length;i<len;i++){var src=scripts[i].getAttribute('src');if(src){var match=src.match(isOL);if(match){scriptLocation=match[1];break;}}}
return scriptLocation;}};if(!singleFile){var jsfiles=new Array("OpenLayers/Util.js","OpenLayers/BaseTypes.js","OpenLayers/BaseTypes/Class.js","OpenLayers/BaseTypes/Bounds.js","OpenLayers/BaseTypes/Element.js","OpenLayers/BaseTypes/LonLat.js","OpenLayers/BaseTypes/Pixel.js","OpenLayers/BaseTypes/Size.js","OpenLayers/Console.js","OpenLayers/Tween.js","Rico/Corner.js","Rico/Color.js","OpenLayers/Ajax.js","OpenLayers/Events.js","OpenLayers/Request.js","OpenLayers/Request/XMLHttpRequest.js","OpenLayers/Projection.js","OpenLayers/Map.js","OpenLayers/Layer.js","OpenLayers/Icon.js","OpenLayers/Marker.js","OpenLayers/Marker/Box.js","OpenLayers/Popup.js","OpenLayers/Tile.js","OpenLayers/Tile/Image.js","OpenLayers/Tile/Image/IFrame.js","OpenLayers/Tile/WFS.js","OpenLayers/Layer/Image.js","OpenLayers/Layer/SphericalMercator.js","OpenLayers/Layer/EventPane.js","OpenLayers/Layer/FixedZoomLevels.js","OpenLayers/Layer/Google.js","OpenLayers/Layer/VirtualEarth.js","OpenLayers/Layer/Yahoo.js","OpenLayers/Layer/HTTPRequest.js","OpenLayers/Layer/Grid.js","OpenLayers/Layer/MapGuide.js","OpenLayers/Layer/MapServer.js","OpenLayers/Layer/MapServer/Untiled.js","OpenLayers/Layer/KaMap.js","OpenLayers/Layer/KaMapCache.js","OpenLayers/Layer/MultiMap.js","OpenLayers/Layer/Markers.js","OpenLayers/Layer/Text.js","OpenLayers/Layer/WorldWind.js","OpenLayers/Layer/ArcGIS93Rest.js","OpenLayers/Layer/WMS.js","OpenLayers/Layer/WMS/Untiled.js","OpenLayers/Layer/WMS/Post.js","OpenLayers/Layer/ArcIMS.js","OpenLayers/Layer/GeoRSS.js","OpenLayers/Layer/Boxes.js","OpenLayers/Layer/XYZ.js","OpenLayers/Layer/TMS.js","OpenLayers/Layer/TileCache.js","OpenLayers/Layer/Zoomify.js","OpenLayers/Popup/Anchored.js","OpenLayers/Popup/AnchoredBubble.js","OpenLayers/Popup/Framed.js","OpenLayers/Popup/FramedCloud.js","OpenLayers/Feature.js","OpenLayers/Feature/Vector.js","OpenLayers/Feature/WFS.js","OpenLayers/Handler.js","OpenLayers/Handler/Click.js","OpenLayers/Handler/Hover.js","OpenLayers/Handler/Point.js","OpenLayers/Handler/Path.js","OpenLayers/Handler/Polygon.js","OpenLayers/Handler/Feature.js","OpenLayers/Handler/Drag.js","OpenLayers/Handler/RegularPolygon.js","OpenLayers/Handler/Box.js","OpenLayers/Handler/MouseWheel.js","OpenLayers/Handler/Keyboard.js","OpenLayers/Control.js","OpenLayers/Control/Attribution.js","OpenLayers/Control/Button.js","OpenLayers/Control/ZoomBox.js","OpenLayers/Control/ZoomToMaxExtent.js","OpenLayers/Control/DragPan.js","OpenLayers/Control/Navigation.js","OpenLayers/Control/MouseDefaults.js","OpenLayers/Control/MousePosition.js","OpenLayers/Control/OverviewMap.js","OpenLayers/Control/KeyboardDefaults.js","OpenLayers/Control/PanZoom.js","OpenLayers/Control/PanZoomBar.js","OpenLayers/Control/ArgParser.js","OpenLayers/Control/Permalink.js","OpenLayers/Control/Scale.js","OpenLayers/Control/ScaleLine.js","OpenLayers/Control/Snapping.js","OpenLayers/Control/Split.js","OpenLayers/Control/LayerSwitcher.js","OpenLayers/Control/DrawFeature.js","OpenLayers/Control/DragFeature.js","OpenLayers/Control/ModifyFeature.js","OpenLayers/Control/Panel.js","OpenLayers/Control/SelectFeature.js","OpenLayers/Control/NavigationHistory.js","OpenLayers/Control/Measure.js","OpenLayers/Control/WMSGetFeatureInfo.js","OpenLayers/Control/Graticule.js","OpenLayers/Control/TransformFeature.js","OpenLayers/Geometry.js","OpenLayers/Geometry/Rectangle.js","OpenLayers/Geometry/Collection.js","OpenLayers/Geometry/Point.js","OpenLayers/Geometry/MultiPoint.js","OpenLayers/Geometry/Curve.js","OpenLayers/Geometry/LineString.js","OpenLayers/Geometry/LinearRing.js","OpenLayers/Geometry/Polygon.js","OpenLayers/Geometry/MultiLineString.js","OpenLayers/Geometry/MultiPolygon.js","OpenLayers/Geometry/Surface.js","OpenLayers/Renderer.js","OpenLayers/Renderer/Elements.js","OpenLayers/Renderer/SVG.js","OpenLayers/Renderer/Canvas.js","OpenLayers/Renderer/VML.js","OpenLayers/Layer/Vector.js","OpenLayers/Layer/Vector/RootContainer.js","OpenLayers/Strategy.js","OpenLayers/Strategy/Fixed.js","OpenLayers/Strategy/Cluster.js","OpenLayers/Strategy/Paging.js","OpenLayers/Strategy/BBOX.js","OpenLayers/Strategy/Save.js","OpenLayers/Strategy/Refresh.js","OpenLayers/Filter.js","OpenLayers/Filter/FeatureId.js","OpenLayers/Filter/Logical.js","OpenLayers/Filter/Comparison.js","OpenLayers/Filter/Spatial.js","OpenLayers/Protocol.js","OpenLayers/Protocol/HTTP.js","OpenLayers/Protocol/SQL.js","OpenLayers/Protocol/SQL/Gears.js","OpenLayers/Protocol/WFS.js","OpenLayers/Protocol/WFS/v1.js","OpenLayers/Protocol/WFS/v1_0_0.js","OpenLayers/Protocol/WFS/v1_1_0.js","OpenLayers/Protocol/SOS.js","OpenLayers/Protocol/SOS/v1_0_0.js","OpenLayers/Layer/PointTrack.js","OpenLayers/Layer/GML.js","OpenLayers/Style.js","OpenLayers/StyleMap.js","OpenLayers/Rule.js","OpenLayers/Format.js","OpenLayers/Format/XML.js","OpenLayers/Format/ArcXML.js","OpenLayers/Format/ArcXML/Features.js","OpenLayers/Format/GML.js","OpenLayers/Format/GML/Base.js","OpenLayers/Format/GML/v2.js","OpenLayers/Format/GML/v3.js","OpenLayers/Format/Atom.js","OpenLayers/Format/KML.js","OpenLayers/Format/GeoRSS.js","OpenLayers/Format/WFS.js","OpenLayers/Format/WFSCapabilities.js","OpenLayers/Format/WFSCapabilities/v1.js","OpenLayers/Format/WFSCapabilities/v1_0_0.js","OpenLayers/Format/WFSCapabilities/v1_1_0.js","OpenLayers/Format/WFSDescribeFeatureType.js","OpenLayers/Format/WMSDescribeLayer.js","OpenLayers/Format/WMSDescribeLayer/v1_1.js","OpenLayers/Format/WKT.js","OpenLayers/Format/OSM.js","OpenLayers/Format/GPX.js","OpenLayers/Format/Filter.js","OpenLayers/Format/Filter/v1.js","OpenLayers/Format/Filter/v1_0_0.js","OpenLayers/Format/Filter/v1_1_0.js","OpenLayers/Format/SLD.js","OpenLayers/Format/SLD/v1.js","OpenLayers/Format/SLD/v1_0_0.js","OpenLayers/Format/CSWGetDomain.js","OpenLayers/Format/CSWGetDomain/v2_0_2.js","OpenLayers/Format/CSWGetRecords.js","OpenLayers/Format/CSWGetRecords/v2_0_2.js","OpenLayers/Format/WFST.js","OpenLayers/Format/WFST/v1.js","OpenLayers/Format/WFST/v1_0_0.js","OpenLayers/Format/WFST/v1_1_0.js","OpenLayers/Format/Text.js","OpenLayers/Format/JSON.js","OpenLayers/Format/GeoJSON.js","OpenLayers/Format/WMC.js","OpenLayers/Format/WMC/v1.js","OpenLayers/Format/WMC/v1_0_0.js","OpenLayers/Format/WMC/v1_1_0.js","OpenLayers/Format/WMSCapabilities.js","OpenLayers/Format/WMSCapabilities/v1.js","OpenLayers/Format/WMSCapabilities/v1_1.js","OpenLayers/Format/WMSCapabilities/v1_1_0.js","OpenLayers/Format/WMSCapabilities/v1_1_1.js","OpenLayers/Format/WMSCapabilities/v1_3.js","OpenLayers/Format/WMSCapabilities/v1_3_0.js","OpenLayers/Format/WMSGetFeatureInfo.js","OpenLayers/Format/OWSCommon/v1_1_0.js","OpenLayers/Format/SOSCapabilities.js","OpenLayers/Format/SOSCapabilities/v1_0_0.js","OpenLayers/Format/SOSGetObservation.js","OpenLayers/Format/SOSGetFeatureOfInterest.js","OpenLayers/Layer/WFS.js","OpenLayers/Control/GetFeature.js","OpenLayers/Control/MouseToolbar.js","OpenLayers/Control/NavToolbar.js","OpenLayers/Control/PanPanel.js","OpenLayers/Control/Pan.js","OpenLayers/Control/ZoomIn.js","OpenLayers/Control/ZoomOut.js","OpenLayers/Control/ZoomPanel.js","OpenLayers/Control/EditingToolbar.js","OpenLayers/Lang.js","OpenLayers/Lang/en.js");var agent=navigator.userAgent;var docWrite=(agent.match("MSIE")||agent.match("Safari"));if(docWrite){var allScriptTags=new Array(jsfiles.length);}
var host=OpenLayers._getScriptLocation()+"lib/";for(var i=0,len=jsfiles.length;i<len;i++){if(docWrite){allScriptTags[i]="<script src='"+host+jsfiles[i]+"'></script>";}else{var s=document.createElement("script");s.src=host+jsfiles[i];var h=document.getElementsByTagName("head").length?document.getElementsByTagName("head")[0]:document.body;h.appendChild(s);}}
if(docWrite){document.write(allScriptTags.join(""));}}})();OpenLayers.VERSION_NUMBER="$Revision: 10129 $";OpenLayers.Util={};OpenLayers.Util.getElement=function(){var elements=[];for(var i=0,len=arguments.length;i<len;i++){var element=arguments[i];if(typeof element=='string'){element=document.getElementById(element);}
if(arguments.length==1){return element;}
elements.push(element);}
return elements;};OpenLayers.Util.isElement=function(o){return!!(o&&o.nodeType===1);};if(typeof window.$==="undefined"){window.$=OpenLayers.Util.getElement;}
OpenLayers.Util.extend=function(destination,source){destination=destination||{};if(source){for(var property in source){var value=source[property];if(value!==undefined){destination[property]=value;}}
var sourceIsEvt=typeof window.Event=="function"&&source instanceof window.Event;if(!sourceIsEvt&&source.hasOwnProperty&&source.hasOwnProperty('toString')){destination.toString=source.toString;}}
return destination;};OpenLayers.Util.removeItem=function(array,item){for(var i=array.length-1;i>=0;i--){if(array[i]==item){array.splice(i,1);}}
return array;};OpenLayers.Util.clearArray=function(array){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{'newMethod':'array = []'}));array.length=0;};OpenLayers.Util.indexOf=function(array,obj){if(typeof array.indexOf=="function"){return array.indexOf(obj);}else{for(var i=0,len=array.length;i<len;i++){if(array[i]==obj){return i;}}
return-1;}};OpenLayers.Util.modifyDOMElement=function(element,id,px,sz,position,border,overflow,opacity){if(id){element.id=id;}
if(px){element.style.left=px.x+"px";element.style.top=px.y+"px";}
if(sz){element.style.width=sz.w+"px";element.style.height=sz.h+"px";}
if(position){element.style.position=position;}
if(border){element.style.border=border;}
if(overflow){element.style.overflow=overflow;}
if(parseFloat(opacity)>=0.0&&parseFloat(opacity)<1.0){element.style.filter='alpha(opacity='+(opacity*100)+')';element.style.opacity=opacity;}else if(parseFloat(opacity)==1.0){element.style.filter='';element.style.opacity='';}};OpenLayers.Util.createDiv=function(id,px,sz,imgURL,position,border,overflow,opacity){var dom=document.createElement('div');if(imgURL){dom.style.backgroundImage='url('+imgURL+')';}
if(!id){id=OpenLayers.Util.createUniqueID("OpenLayersDiv");}
if(!position){position="absolute";}
OpenLayers.Util.modifyDOMElement(dom,id,px,sz,position,border,overflow,opacity);return dom;};OpenLayers.Util.createImage=function(id,px,sz,imgURL,position,border,opacity,delayDisplay){var image=document.createElement("img");if(!id){id=OpenLayers.Util.createUniqueID("OpenLayersDiv");}
if(!position){position="relative";}
OpenLayers.Util.modifyDOMElement(image,id,px,sz,position,border,null,opacity);if(delayDisplay){image.style.display="none";OpenLayers.Event.observe(image,"load",OpenLayers.Function.bind(OpenLayers.Util.onImageLoad,image));OpenLayers.Event.observe(image,"error",OpenLayers.Function.bind(OpenLayers.Util.onImageLoadError,image));}
image.style.alt=id;image.galleryImg="no";if(imgURL){image.src=imgURL;}
return image;};OpenLayers.Util.setOpacity=function(element,opacity){OpenLayers.Util.modifyDOMElement(element,null,null,null,null,null,null,opacity);};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 urls=this.urls;if(urls&&urls instanceof Array&&urls.length>1){var src=this.src.toString();var current_url,k;for(k=0;current_url=urls[k];k++){if(src.indexOf(current_url)!=-1){break;}}
var guess=Math.floor(urls.length*Math.random());var new_url=urls[guess];k=0;while(new_url==current_url&&k++<4){guess=Math.floor(urls.length*Math.random());new_url=urls[guess];}
this.src=src.replace(current_url,new_url);}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 arVersion=navigator.appVersion.split("MSIE");var version=parseFloat(arVersion[1]);var filter=false;try{filter=!!(document.body.filters);}catch(e){}
OpenLayers.Util.alphaHackNeeded=(filter&&(version>=5.5)&&(version<7));}
return OpenLayers.Util.alphaHackNeeded;};OpenLayers.Util.modifyAlphaImageDiv=function(div,id,px,sz,imgURL,position,border,sizing,opacity){OpenLayers.Util.modifyDOMElement(div,id,px,sz,position,null,null,opacity);var img=div.childNodes[0];if(imgURL){img.src=imgURL;}
OpenLayers.Util.modifyDOMElement(img,div.id+"_innerImage",null,sz,"relative",border);if(OpenLayers.Util.alphaHack()){if(div.style.display!="none"){div.style.display="inline-block";}
if(sizing==null){sizing="scale";}
div.style.filter="progid:DXImageTransform.Microsoft"+".AlphaImageLoader(src='"+img.src+"', "+"sizingMethod='"+sizing+"')";if(parseFloat(div.style.opacity)>=0.0&&parseFloat(div.style.opacity)<1.0){div.style.filter+=" alpha(opacity="+div.style.opacity*100+")";}
img.style.filter="alpha(opacity=0)";}};OpenLayers.Util.createAlphaImageDiv=function(id,px,sz,imgURL,position,border,sizing,opacity,delayDisplay){var div=OpenLayers.Util.createDiv();var img=OpenLayers.Util.createImage(null,null,null,null,null,null,null,false);div.appendChild(img);if(delayDisplay){img.style.display="none";OpenLayers.Event.observe(img,"load",OpenLayers.Function.bind(OpenLayers.Util.onImageLoad,div));OpenLayers.Event.observe(img,"error",OpenLayers.Function.bind(OpenLayers.Util.onImageLoadError,div));}
OpenLayers.Util.modifyAlphaImageDiv(div,id,px,sz,imgURL,position,border,sizing,opacity);return div;};OpenLayers.Util.upperCaseObject=function(object){var uObject={};for(var key in object){uObject[key.toUpperCase()]=object[key];}
return uObject;};OpenLayers.Util.applyDefaults=function(to,from){to=to||{};var fromIsEvt=typeof window.Event=="function"&&from instanceof window.Event;for(var key in from){if(to[key]===undefined||(!fromIsEvt&&from.hasOwnProperty&&from.hasOwnProperty(key)&&!to.hasOwnProperty(key))){to[key]=from[key];}}
if(!fromIsEvt&&from&&from.hasOwnProperty&&from.hasOwnProperty('toString')&&!to.hasOwnProperty('toString')){to.toString=from.toString;}
return to;};OpenLayers.Util.getParameterString=function(params){var paramsArray=[];for(var key in params){var value=params[key];if((value!=null)&&(typeof value!='function')){var encodedValue;if(typeof value=='object'&&value.constructor==Array){var encodedItemArray=[];var item;for(var itemIndex=0,len=value.length;itemIndex<len;itemIndex++){item=value[itemIndex];encodedItemArray.push(encodeURIComponent((item===null||item===undefined)?"":item));}
encodedValue=encodedItemArray.join(",");}
else{encodedValue=encodeURIComponent(value);}
paramsArray.push(encodeURIComponent(key)+"="+encodedValue);}}
return paramsArray.join("&");};OpenLayers.Util.urlAppend=function(url,paramStr){var newUrl=url;if(paramStr){var parts=(url+" ").split(/[?&]/);newUrl+=(parts.pop()===" "?paramStr:parts.length?"&"+paramStr:"?"+paramStr);}
return newUrl;};OpenLayers.ImgPath='';OpenLayers.Util.getImagesLocation=function(){return OpenLayers.ImgPath||(OpenLayers._getScriptLocation()+"img/");};OpenLayers.Util.Try=function(){var returnValue=null;for(var i=0,len=arguments.length;i<len;i++){var lambda=arguments[i];try{returnValue=lambda();break;}catch(e){}}
return returnValue;};OpenLayers.Util.getNodes=function(p,tagName){var nodes=OpenLayers.Util.Try(function(){return OpenLayers.Util._getNodes(p.documentElement.childNodes,tagName);},function(){return OpenLayers.Util._getNodes(p.childNodes,tagName);});return nodes;};OpenLayers.Util._getNodes=function(nodes,tagName){var retArray=[];for(var i=0,len=nodes.length;i<len;i++){if(nodes[i].nodeName==tagName){retArray.push(nodes[i]);}}
return retArray;};OpenLayers.Util.getTagText=function(parent,item,index){var result=OpenLayers.Util.getNodes(parent,item);if(result&&(result.length>0))
{if(!index){index=0;}
if(result[index].childNodes.length>1){return result.childNodes[1].nodeValue;}
else if(result[index].childNodes.length==1){return result[index].firstChild.nodeValue;}}else{return"";}};OpenLayers.Util.getXmlNodeValue=function(node){var val=null;OpenLayers.Util.Try(function(){val=node.text;if(!val){val=node.textContent;}
if(!val){val=node.firstChild.nodeValue;}},function(){val=node.textContent;});return val;};OpenLayers.Util.mouseLeft=function(evt,div){var target=(evt.relatedTarget)?evt.relatedTarget:evt.toElement;while(target!=div&&target!=null){target=target.parentNode;}
return(target!=div);};OpenLayers.Util.DEFAULT_PRECISION=14;OpenLayers.Util.toFloat=function(number,precision){if(precision==null){precision=OpenLayers.Util.DEFAULT_PRECISION;}
var number;if(precision==0){number=parseFloat(number);}else{number=parseFloat(parseFloat(number).toPrecision(precision));}
return number;};OpenLayers.Util.rad=function(x){return x*Math.PI/180;};OpenLayers.Util.distVincenty=function(p1,p2){var a=6378137,b=6356752.3142,f=1/298.257223563;var L=OpenLayers.Util.rad(p2.lon-p1.lon);var U1=Math.atan((1-f)*Math.tan(OpenLayers.Util.rad(p1.lat)));var U2=Math.atan((1-f)*Math.tan(OpenLayers.Util.rad(p2.lat)));var sinU1=Math.sin(U1),cosU1=Math.cos(U1);var sinU2=Math.sin(U2),cosU2=Math.cos(U2);var lambda=L,lambdaP=2*Math.PI;var iterLimit=20;while(Math.abs(lambda-lambdaP)>1e-12&&--iterLimit>0){var sinLambda=Math.sin(lambda),cosLambda=Math.cos(lambda);var sinSigma=Math.sqrt((cosU2*sinLambda)*(cosU2*sinLambda)+
(cosU1*sinU2-sinU1*cosU2*cosLambda)*(cosU1*sinU2-sinU1*cosU2*cosLambda));if(sinSigma==0){return 0;}
var cosSigma=sinU1*sinU2+cosU1*cosU2*cosLambda;var sigma=Math.atan2(sinSigma,cosSigma);var alpha=Math.asin(cosU1*cosU2*sinLambda/sinSigma);var cosSqAlpha=Math.cos(alpha)*Math.cos(alpha);var cos2SigmaM=cosSigma-2*sinU1*sinU2/cosSqAlpha;var C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));lambdaP=lambda;lambda=L+(1-C)*f*Math.sin(alpha)*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)));}
if(iterLimit==0){return NaN;}
var uSq=cosSqAlpha*(a*a-b*b)/(b*b);var A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));var B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));var deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)-
B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));var s=b*A*(sigma-deltaSigma);var d=s.toFixed(3)/1000;return d;};OpenLayers.Util.getParameters=function(url){url=url||window.location.href;var paramsString="";if(OpenLayers.String.contains(url,'?')){var start=url.indexOf('?')+1;var end=OpenLayers.String.contains(url,"#")?url.indexOf('#'):url.length;paramsString=url.substring(start,end);}
var parameters={};var pairs=paramsString.split(/[&;]/);for(var i=0,len=pairs.length;i<len;++i){var keyValue=pairs[i].split('=');if(keyValue[0]){var key=decodeURIComponent(keyValue[0]);var value=keyValue[1]||'';value=decodeURIComponent(value.replace(/\+/g," ")).split(",");if(value.length==1){value=value[0];}
parameters[key]=value;}}
return parameters;};OpenLayers.Util.getArgs=function(url){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{'newMethod':'OpenLayers.Util.getParameters'}));return OpenLayers.Util.getParameters(url);};OpenLayers.Util.lastSeqID=0;OpenLayers.Util.createUniqueID=function(prefix){if(prefix==null){prefix="id_";}
OpenLayers.Util.lastSeqID+=1;return prefix+OpenLayers.Util.lastSeqID;};OpenLayers.INCHES_PER_UNIT={'inches':1.0,'ft':12.0,'mi':63360.0,'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.02540005080010160020;OpenLayers.Util.extend(OpenLayers.INCHES_PER_UNIT,{"Inch":OpenLayers.INCHES_PER_UNIT.inches,"Meter":1.0/OpenLayers.METERS_PER_INCH,"Foot":0.30480060960121920243/OpenLayers.METERS_PER_INCH,"IFoot":0.30480000000000000000/OpenLayers.METERS_PER_INCH,"ClarkeFoot":0.3047972651151/OpenLayers.METERS_PER_INCH,"SearsFoot":0.30479947153867624624/OpenLayers.METERS_PER_INCH,"GoldCoastFoot":0.30479971018150881758/OpenLayers.METERS_PER_INCH,"IInch":0.02540000000000000000/OpenLayers.METERS_PER_INCH,"MicroInch":0.00002540000000000000/OpenLayers.METERS_PER_INCH,"Mil":0.00000002540000000000/OpenLayers.METERS_PER_INCH,"Centimeter":0.01000000000000000000/OpenLayers.METERS_PER_INCH,"Kilometer":1000.00000000000000000000/OpenLayers.METERS_PER_INCH,"Yard":0.91440182880365760731/OpenLayers.METERS_PER_INCH,"SearsYard":0.914398414616029/OpenLayers.METERS_PER_INCH,"IndianYard":0.91439853074444079983/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.34721869443738887477/OpenLayers.METERS_PER_INCH,"IYard":0.91440000000000000000/OpenLayers.METERS_PER_INCH,"IMile":1609.34400000000000000000/OpenLayers.METERS_PER_INCH,"NautM":1852.00000000000000000000/OpenLayers.METERS_PER_INCH,"Lat-66":110943.316488932731/OpenLayers.METERS_PER_INCH,"Lat-83":110946.25736872234125/OpenLayers.METERS_PER_INCH,"Decimeter":0.10000000000000000000/OpenLayers.METERS_PER_INCH,"Millimeter":0.00100000000000000000/OpenLayers.METERS_PER_INCH,"Dekameter":10.00000000000000000000/OpenLayers.METERS_PER_INCH,"Decameter":10.00000000000000000000/OpenLayers.METERS_PER_INCH,"Hectometer":100.00000000000000000000/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.20116782494375872/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.00000000000000000000/OpenLayers.METERS_PER_INCH,"ModAmFt":0.304812252984505969011938/OpenLayers.METERS_PER_INCH,"Fathom":1.8288/OpenLayers.METERS_PER_INCH,"NautM-UK":1853.184/OpenLayers.METERS_PER_INCH,"50kilometers":50000.0/OpenLayers.METERS_PER_INCH,"150kilometers":150000.0/OpenLayers.METERS_PER_INCH});OpenLayers.Util.extend(OpenLayers.INCHES_PER_UNIT,{"mm":OpenLayers.INCHES_PER_UNIT["Meter"]/1000.0,"cm":OpenLayers.INCHES_PER_UNIT["Meter"]/100.0,"dm":OpenLayers.INCHES_PER_UNIT["Meter"]*100.0,"km":OpenLayers.INCHES_PER_UNIT["Meter"]*1000.0,"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(scale){var normScale=(scale>1.0)?(1.0/scale):scale;return normScale;};OpenLayers.Util.getResolutionFromScale=function(scale,units){var resolution;if(scale){if(units==null){units="degrees";}
var normScale=OpenLayers.Util.normalizeScale(scale);resolution=1/(normScale*OpenLayers.INCHES_PER_UNIT[units]*OpenLayers.DOTS_PER_INCH);}
return resolution;};OpenLayers.Util.getScaleFromResolution=function(resolution,units){if(units==null){units="degrees";}
var scale=resolution*OpenLayers.INCHES_PER_UNIT[units]*OpenLayers.DOTS_PER_INCH;return scale;};OpenLayers.Util.safeStopPropagation=function(evt){OpenLayers.Event.stop(evt,true);};OpenLayers.Util.pagePosition=function(forElement){var valueT=0,valueL=0;var element=forElement;var child=forElement;while(element){if(element==document.body){if(OpenLayers.Element.getStyle(child,'position')=='absolute'){break;}}
valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;child=element;try{element=element.offsetParent;}catch(e){OpenLayers.Console.error(OpenLayers.i18n("pagePositionFailed",{'elemId':element.id}));break;}}
element=forElement;while(element){valueT-=element.scrollTop||0;valueL-=element.scrollLeft||0;element=element.parentNode;}
return[valueL,valueT];};OpenLayers.Util.isEquivalentUrl=function(url1,url2,options){options=options||{};OpenLayers.Util.applyDefaults(options,{ignoreCase:true,ignorePort80:true,ignoreHash:true});var urlObj1=OpenLayers.Util.createUrlObject(url1,options);var urlObj2=OpenLayers.Util.createUrlObject(url2,options);for(var key in urlObj1){if(key!=="args"){if(urlObj1[key]!=urlObj2[key]){return false;}}}
for(var key in urlObj1.args){if(urlObj1.args[key]!=urlObj2.args[key]){return false;}
delete urlObj2.args[key];}
for(var key in urlObj2.args){return false;}
return true;};OpenLayers.Util.createUrlObject=function(url,options){options=options||{};if(!(/^\w+:\/\//).test(url)){var loc=window.location;var port=loc.port?":"+loc.port:"";var fullUrl=loc.protocol+"//"+loc.host.split(":").shift()+port;if(url.indexOf("/")===0){url=fullUrl+url;}else{var parts=loc.pathname.split("/");parts.pop();url=fullUrl+parts.join("/")+"/"+url;}}
if(options.ignoreCase){url=url.toLowerCase();}
var a=document.createElement('a');a.href=url;var urlObject={};urlObject.host=a.host.split(":").shift();urlObject.protocol=a.protocol;if(options.ignorePort80){urlObject.port=(a.port=="80"||a.port=="0")?"":a.port;}else{urlObject.port=(a.port==""||a.port=="0")?"80":a.port;}
urlObject.hash=(options.ignoreHash||a.hash==="#")?"":a.hash;var queryString=a.search;if(!queryString){var qMark=url.indexOf("?");queryString=(qMark!=-1)?url.substr(qMark):"";}
urlObject.args=OpenLayers.Util.getParameters(queryString);urlObject.pathname=(a.pathname.charAt(0)=="/")?a.pathname:"/"+a.pathname;return urlObject;};OpenLayers.Util.removeTail=function(url){var head=null;var qMark=url.indexOf("?");var hashMark=url.indexOf("#");if(qMark==-1){head=(hashMark!=-1)?url.substr(0,hashMark):url;}else{head=(hashMark!=-1)?url.substr(0,Math.min(qMark,hashMark)):url.substr(0,qMark);}
return head;};OpenLayers.Util.getBrowserName=function(){var browserName="";var ua=navigator.userAgent.toLowerCase();if(ua.indexOf("opera")!=-1){browserName="opera";}else if(ua.indexOf("msie")!=-1){browserName="msie";}else if(ua.indexOf("safari")!=-1){browserName="safari";}else if(ua.indexOf("mozilla")!=-1){if(ua.indexOf("firefox")!=-1){browserName="firefox";}else{browserName="mozilla";}}
return browserName;};OpenLayers.Util.getRenderedDimensions=function(contentHTML,size,options){var w,h;var container=document.createElement("div");container.style.visibility="hidden";var containerElement=(options&&options.containerElement)?options.containerElement:document.body;if(size){if(size.w){w=size.w;container.style.width=w+"px";}else if(size.h){h=size.h;container.style.height=h+"px";}}
if(options&&options.displayClass){container.className=options.displayClass;}
var content=document.createElement("div");content.innerHTML=contentHTML;content.style.overflow="visible";if(content.childNodes){for(var i=0,l=content.childNodes.length;i<l;i++){if(!content.childNodes[i].style)continue;content.childNodes[i].style.overflow="visible";}}
container.appendChild(content);containerElement.appendChild(container);var parentHasPositionAbsolute=false;var parent=container.parentNode;while(parent&&parent.tagName.toLowerCase()!="body"){var parentPosition=OpenLayers.Element.getStyle(parent,"position");if(parentPosition=="absolute"){parentHasPositionAbsolute=true;break;}else if(parentPosition&&parentPosition!="static"){break;}
parent=parent.parentNode;}
if(!parentHasPositionAbsolute){container.style.position="absolute";}
if(!w){w=parseInt(content.scrollWidth);container.style.width=w+"px";}
if(!h){h=parseInt(content.scrollHeight);}
container.removeChild(content);containerElement.removeChild(container);return new OpenLayers.Size(w,h);};OpenLayers.Util.getScrollbarWidth=function(){var scrollbarWidth=OpenLayers.Util._scrollbarWidth;if(scrollbarWidth==null){var scr=null;var inn=null;var wNoScroll=0;var wScroll=0;scr=document.createElement('div');scr.style.position='absolute';scr.style.top='-1000px';scr.style.left='-1000px';scr.style.width='100px';scr.style.height='50px';scr.style.overflow='hidden';inn=document.createElement('div');inn.style.width='100%';inn.style.height='200px';scr.appendChild(inn);document.body.appendChild(scr);wNoScroll=inn.offsetWidth;scr.style.overflow='scroll';wScroll=inn.offsetWidth;document.body.removeChild(document.body.lastChild);OpenLayers.Util._scrollbarWidth=(wNoScroll-wScroll);scrollbarWidth=OpenLayers.Util._scrollbarWidth;}
return scrollbarWidth;};OpenLayers.Util.getFormattedLonLat=function(coordinate,axis,dmsOption){if(!dmsOption){dmsOption='dms';}
var abscoordinate=Math.abs(coordinate)
var coordinatedegrees=Math.floor(abscoordinate);var coordinateminutes=(abscoordinate-coordinatedegrees)/(1/60);var tempcoordinateminutes=coordinateminutes;coordinateminutes=Math.floor(coordinateminutes);var coordinateseconds=(tempcoordinateminutes-coordinateminutes)/(1/60);coordinateseconds=Math.round(coordinateseconds*10);coordinateseconds/=10;if(coordinatedegrees<10){coordinatedegrees="0"+coordinatedegrees;}
var str=coordinatedegrees+" ";if(dmsOption.indexOf('dm')>=0){if(coordinateminutes<10){coordinateminutes="0"+coordinateminutes;}
str+=coordinateminutes+"'";if(dmsOption.indexOf('dms')>=0){if(coordinateseconds<10){coordinateseconds="0"+coordinateseconds;}
str+=coordinateseconds+'"';}}
if(axis=="lon"){str+=coordinate<0?OpenLayers.i18n("W"):OpenLayers.i18n("E");}else{str+=coordinate<0?OpenLayers.i18n("S"):OpenLayers.i18n("N");}
return str;};OpenLayers.Lang={code:null,defaultCode:"en",getCode:function(){if(!OpenLayers.Lang.code){OpenLayers.Lang.setCode();}
return OpenLayers.Lang.code;},setCode:function(code){var lang;if(!code){code=(OpenLayers.Util.getBrowserName()=="msie")?navigator.userLanguage:navigator.language;}
var parts=code.split('-');parts[0]=parts[0].toLowerCase();if(typeof OpenLayers.Lang[parts[0]]=="object"){lang=parts[0];}
if(parts[1]){var testLang=parts[0]+'-'+parts[1].toUpperCase();if(typeof OpenLayers.Lang[testLang]=="object"){lang=testLang;}}
if(!lang){OpenLayers.Console.warn('Failed to find OpenLayers.Lang.'+parts.join("-")+' dictionary, falling back to default language');lang=OpenLayers.Lang.defaultCode;}
OpenLayers.Lang.code=lang;},translate:function(key,context){var dictionary=OpenLayers.Lang[OpenLayers.Lang.getCode()];var message=dictionary[key];if(!message){message=key;}
if(context){message=OpenLayers.String.format(message,context);}
return message;}};OpenLayers.i18n=OpenLayers.Lang.translate;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 the"+"past. 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','layerAlreadyAdded':"You tried to add the layer: ${layerName} to the map, but it has already been added",'reprojectDeprecated':"You are using the 'reproject' option "+"on the ${layerName} layer. This option is deprecated: "+"its use was designed to support displaying data over commercial "+"basemaps, but that functionality should now be achieved by using "+"Spherical Mercator support. More information is available from "+"http://trac.openlayers.org/wiki/SphericalMercator.",'methodDeprecated':"This method has been deprecated and will be removed in 3.0. "+"Please use ${newMethod} instead.",'boundsAddError':"You must pass both x and y values to the add function.",'lonlatAddError':"You must pass both lon and lat values to the add function.",'pixelAddError':"You must pass both x and y values to the add function.",'unsupportedGeometryType':"Unsupported geometry type: ${geomType}",'pagePositionFailed':"OpenLayers.Util.pagePosition failed: element with id ${elemId} may be misplaced.",'end':'','filterEvaluateNotImplemented':"evaluate is not implemented for this filter type."};OpenLayers.Lang["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["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.Console={log:function(){},debug:function(){},info:function(){},warn:function(){},error:function(){},userError:function(error){alert(error);},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 scripts=document.getElementsByTagName("script");for(var i=0,len=scripts.length;i<len;++i){if(scripts[i].src.indexOf("firebug.js")!=-1){if(console){OpenLayers.Util.extend(OpenLayers.Console,console);break;}}}})();OpenLayers.String={startsWith:function(str,sub){return(str.indexOf(sub)==0);},contains:function(str,sub){return(str.indexOf(sub)!=-1);},trim:function(str){return str.replace(/^\s\s*/,'').replace(/\s\s*$/,'');},camelize:function(str){var oStringList=str.split('-');var camelizedString=oStringList[0];for(var i=1,len=oStringList.length;i<len;i++){var s=oStringList[i];camelizedString+=s.charAt(0).toUpperCase()+s.substring(1);}
return camelizedString;},format:function(template,context,args){if(!context){context=window;}
var replacer=function(str,match){var replacement;var subs=match.split(/\.+/);for(var i=0;i<subs.length;i++){if(i==0){replacement=context;}
replacement=replacement[subs[i]];}
if(typeof replacement=="function"){replacement=args?replacement.apply(null,args):replacement();}
if(typeof replacement=='undefined'){return'undefined';}else{return replacement;}};return template.replace(OpenLayers.String.tokenRegEx,replacer);},tokenRegEx:/\$\{([\w.]+?)\}/g,numberRegEx:/^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/,isNumeric:function(value){return OpenLayers.String.numberRegEx.test(value);},numericIf:function(value){return OpenLayers.String.isNumeric(value)?parseFloat(value):value;}};if(!String.prototype.startsWith){String.prototype.startsWith=function(sStart){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{'newMethod':'OpenLayers.String.startsWith'}));return OpenLayers.String.startsWith(this,sStart);};}
if(!String.prototype.contains){String.prototype.contains=function(str){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{'newMethod':'OpenLayers.String.contains'}));return OpenLayers.String.contains(this,str);};}
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(num,sig){var fig=0;if(sig>0){fig=parseFloat(num.toPrecision(sig));}
return fig;},format:function(num,dec,tsep,dsep){dec=(typeof dec!="undefined")?dec:0;tsep=(typeof tsep!="undefined")?tsep:OpenLayers.Number.thousandsSeparator;dsep=(typeof dsep!="undefined")?dsep:OpenLayers.Number.decimalSeparator;if(dec!=null){num=parseFloat(num.toFixed(dec));}
var parts=num.toString().split(".");if(parts.length==1&&dec==null){dec=0;}
var integer=parts[0];if(tsep){var thousands=/(-?[0-9]+)([0-9]{3})/;while(thousands.test(integer)){integer=integer.replace(thousands,"$1"+tsep+"$2");}}
var str;if(dec==0){str=integer;}else{var rem=parts.length>1?parts[1]:"0";if(dec!=null){rem=rem+new Array(dec-rem.length+1).join("0");}
str=integer+dsep+rem;}
return str;}};if(!Number.prototype.limitSigDigs){Number.prototype.limitSigDigs=function(sig){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{'newMethod':'OpenLayers.Number.limitSigDigs'}));return OpenLayers.Number.limitSigDigs(this,sig);};}
OpenLayers.Function={bind:function(func,object){var args=Array.prototype.slice.apply(arguments,[2]);return function(){var newArgs=args.concat(Array.prototype.slice.apply(arguments,[0]));return func.apply(object,newArgs);};},bindAsEventListener:function(func,object){return function(event){return func.call(object,event||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(object){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{'newMethod':'OpenLayers.Function.bindAsEventListener'}));return OpenLayers.Function.bindAsEventListener(this,object);};}
OpenLayers.Array={filter:function(array,callback,caller){var selected=[];if(Array.prototype.filter){selected=array.filter(callback,caller);}else{var len=array.length;if(typeof callback!="function"){throw new TypeError();}
for(var i=0;i<len;i++){if(i in array){var val=array[i];if(callback.call(caller,val,i,array)){selected.push(val);}}}}
return selected;}};OpenLayers.Class=function(){var Class=function(){if(arguments&&arguments[0]!=OpenLayers.Class.isPrototype){this.initialize.apply(this,arguments);}};var extended={};var parent,initialize;for(var i=0,len=arguments.length;i<len;++i){if(typeof arguments[i]=="function"){if(i==0&&len>1){initialize=arguments[i].prototype.initialize;arguments[i].prototype.initialize=function(){};extended=new arguments[i];if(initialize===undefined){delete arguments[i].prototype.initialize;}else{arguments[i].prototype.initialize=initialize;}}
parent=arguments[i].prototype;}else{parent=arguments[i];}
OpenLayers.Util.extend(extended,parent);}
Class.prototype=extended;return Class;};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 superClass=arguments[0];var proto=new superClass(OpenLayers.Class.isPrototype);for(var i=1,len=arguments.length;i<len;i++){if(typeof arguments[i]=="function"){var mixin=arguments[i];arguments[i]=new mixin(OpenLayers.Class.isPrototype);}
OpenLayers.Util.extend(proto,arguments[i]);}
return proto;};OpenLayers.Pixel=OpenLayers.Class({x:0.0,y:0.0,initialize:function(x,y){this.x=parseFloat(x);this.y=parseFloat(y);},toString:function(){return("x="+this.x+",y="+this.y);},clone:function(){return new OpenLayers.Pixel(this.x,this.y);},equals:function(px){var equals=false;if(px!=null){equals=((this.x==px.x&&this.y==px.y)||(isNaN(this.x)&&isNaN(this.y)&&isNaN(px.x)&&isNaN(px.y)));}
return equals;},add:function(x,y){if((x==null)||(y==null)){var msg=OpenLayers.i18n("pixelAddError");OpenLayers.Console.error(msg);return null;}
return new OpenLayers.Pixel(this.x+x,this.y+y);},offset:function(px){var newPx=this.clone();if(px){newPx=this.add(px.x,px.y);}
return newPx;},CLASS_NAME:"OpenLayers.Pixel"});OpenLayers.Bounds=OpenLayers.Class({left:null,bottom:null,right:null,top:null,centerLonLat:null,initialize:function(left,bottom,right,top){if(left!=null){this.left=OpenLayers.Util.toFloat(left);}
if(bottom!=null){this.bottom=OpenLayers.Util.toFloat(bottom);}
if(right!=null){this.right=OpenLayers.Util.toFloat(right);}
if(top!=null){this.top=OpenLayers.Util.toFloat(top);}},clone:function(){return new OpenLayers.Bounds(this.left,this.bottom,this.right,this.top);},equals:function(bounds){var equals=false;if(bounds!=null){equals=((this.left==bounds.left)&&(this.right==bounds.right)&&(this.top==bounds.top)&&(this.bottom==bounds.bottom));}
return equals;},toString:function(){return("left-bottom=("+this.left+","+this.bottom+")"
+" right-top=("+this.right+","+this.top+")");},toArray:function(reverseAxisOrder){if(reverseAxisOrder===true){return[this.bottom,this.left,this.top,this.right];}else{return[this.left,this.bottom,this.right,this.top];}},toBBOX:function(decimal,reverseAxisOrder){if(decimal==null){decimal=6;}
var mult=Math.pow(10,decimal);var xmin=Math.round(this.left*mult)/mult;var ymin=Math.round(this.bottom*mult)/mult;var xmax=Math.round(this.right*mult)/mult;var ymax=Math.round(this.top*mult)/mult;if(reverseAxisOrder===true){return ymin+","+xmin+","+ymax+","+xmax;}else{return xmin+","+ymin+","+xmax+","+ymax;}},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(ratio,origin){if(origin==null){origin=this.getCenterLonLat();}
var origx,origy;if(origin.CLASS_NAME=="OpenLayers.LonLat"){origx=origin.lon;origy=origin.lat;}else{origx=origin.x;origy=origin.y;}
var left=(this.left-origx)*ratio+origx;var bottom=(this.bottom-origy)*ratio+origy;var right=(this.right-origx)*ratio+origx;var top=(this.top-origy)*ratio+origy;return new OpenLayers.Bounds(left,bottom,right,top);},add:function(x,y){if((x==null)||(y==null)){var msg=OpenLayers.i18n("boundsAddError");OpenLayers.Console.error(msg);return null;}
return new OpenLayers.Bounds(this.left+x,this.bottom+y,this.right+x,this.top+y);},extend:function(object){var bounds=null;if(object){switch(object.CLASS_NAME){case"OpenLayers.LonLat":bounds=new OpenLayers.Bounds(object.lon,object.lat,object.lon,object.lat);break;case"OpenLayers.Geometry.Point":bounds=new OpenLayers.Bounds(object.x,object.y,object.x,object.y);break;case"OpenLayers.Bounds":bounds=object;break;}
if(bounds){this.centerLonLat=null;if((this.left==null)||(bounds.left<this.left)){this.left=bounds.left;}
if((this.bottom==null)||(bounds.bottom<this.bottom)){this.bottom=bounds.bottom;}
if((this.right==null)||(bounds.right>this.right)){this.right=bounds.right;}
if((this.top==null)||(bounds.top>this.top)){this.top=bounds.top;}}}},containsLonLat:function(ll,inclusive){return this.contains(ll.lon,ll.lat,inclusive);},containsPixel:function(px,inclusive){return this.contains(px.x,px.y,inclusive);},contains:function(x,y,inclusive){if(inclusive==null){inclusive=true;}
if(x==null||y==null){return false;}
x=OpenLayers.Util.toFloat(x);y=OpenLayers.Util.toFloat(y);var contains=false;if(inclusive){contains=((x>=this.left)&&(x<=this.right)&&(y>=this.bottom)&&(y<=this.top));}else{contains=((x>this.left)&&(x<this.right)&&(y>this.bottom)&&(y<this.top));}
return contains;},intersectsBounds:function(bounds,inclusive){if(inclusive==null){inclusive=true;}
var intersects=false;var mightTouch=(this.left==bounds.right||this.right==bounds.left||this.top==bounds.bottom||this.bottom==bounds.top);if(inclusive||!mightTouch){var inBottom=(((bounds.bottom>=this.bottom)&&(bounds.bottom<=this.top))||((this.bottom>=bounds.bottom)&&(this.bottom<=bounds.top)));var inTop=(((bounds.top>=this.bottom)&&(bounds.top<=this.top))||((this.top>bounds.bottom)&&(this.top<bounds.top)));var inLeft=(((bounds.left>=this.left)&&(bounds.left<=this.right))||((this.left>=bounds.left)&&(this.left<=bounds.right)));var inRight=(((bounds.right>=this.left)&&(bounds.right<=this.right))||((this.right>=bounds.left)&&(this.right<=bounds.right)));intersects=((inBottom||inTop)&&(inLeft||inRight));}
return intersects;},containsBounds:function(bounds,partial,inclusive){if(partial==null){partial=false;}
if(inclusive==null){inclusive=true;}
var bottomLeft=this.contains(bounds.left,bounds.bottom,inclusive);var bottomRight=this.contains(bounds.right,bounds.bottom,inclusive);var topLeft=this.contains(bounds.left,bounds.top,inclusive);var topRight=this.contains(bounds.right,bounds.top,inclusive);return(partial)?(bottomLeft||bottomRight||topLeft||topRight):(bottomLeft&&bottomRight&&topLeft&&topRight);},determineQuadrant:function(lonlat){var quadrant="";var center=this.getCenterLonLat();quadrant+=(lonlat.lat<center.lat)?"b":"t";quadrant+=(lonlat.lon<center.lon)?"l":"r";return quadrant;},transform:function(source,dest){this.centerLonLat=null;var ll=OpenLayers.Projection.transform({'x':this.left,'y':this.bottom},source,dest);var lr=OpenLayers.Projection.transform({'x':this.right,'y':this.bottom},source,dest);var ul=OpenLayers.Projection.transform({'x':this.left,'y':this.top},source,dest);var ur=OpenLayers.Projection.transform({'x':this.right,'y':this.top},source,dest);this.left=Math.min(ll.x,ul.x);this.bottom=Math.min(ll.y,lr.y);this.right=Math.max(lr.x,ur.x);this.top=Math.max(ul.y,ur.y);return this;},wrapDateLine:function(maxExtent,options){options=options||{};var leftTolerance=options.leftTolerance||0;var rightTolerance=options.rightTolerance||0;var newBounds=this.clone();if(maxExtent){while(newBounds.left<maxExtent.left&&(newBounds.right-rightTolerance)<=maxExtent.left){newBounds=newBounds.add(maxExtent.getWidth(),0);}
while((newBounds.left+leftTolerance)>=maxExtent.right&&newBounds.right>maxExtent.right){newBounds=newBounds.add(-maxExtent.getWidth(),0);}}
return newBounds;},CLASS_NAME:"OpenLayers.Bounds"});OpenLayers.Bounds.fromString=function(str){var bounds=str.split(",");return OpenLayers.Bounds.fromArray(bounds);};OpenLayers.Bounds.fromArray=function(bbox){return new OpenLayers.Bounds(parseFloat(bbox[0]),parseFloat(bbox[1]),parseFloat(bbox[2]),parseFloat(bbox[3]));};OpenLayers.Bounds.fromSize=function(size){return new OpenLayers.Bounds(0,size.h,size.w,0);};OpenLayers.Bounds.oppositeQuadrant=function(quadrant){var opp="";opp+=(quadrant.charAt(0)=='t')?'b':'t';opp+=(quadrant.charAt(1)=='l')?'r':'l';return opp;};OpenLayers.LonLat=OpenLayers.Class({lon:0.0,lat:0.0,initialize:function(lon,lat){this.lon=OpenLayers.Util.toFloat(lon);this.lat=OpenLayers.Util.toFloat(lat);},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(lon,lat){if((lon==null)||(lat==null)){var msg=OpenLayers.i18n("lonlatAddError");OpenLayers.Console.error(msg);return null;}
return new OpenLayers.LonLat(this.lon+lon,this.lat+lat);},equals:function(ll){var equals=false;if(ll!=null){equals=((this.lon==ll.lon&&this.lat==ll.lat)||(isNaN(this.lon)&&isNaN(this.lat)&&isNaN(ll.lon)&&isNaN(ll.lat)));}
return equals;},transform:function(source,dest){var point=OpenLayers.Projection.transform({'x':this.lon,'y':this.lat},source,dest);this.lon=point.x;this.lat=point.y;return this;},wrapDateLine:function(maxExtent){var newLonLat=this.clone();if(maxExtent){while(newLonLat.lon<maxExtent.left){newLonLat.lon+=maxExtent.getWidth();}
while(newLonLat.lon>maxExtent.right){newLonLat.lon-=maxExtent.getWidth();}}
return newLonLat;},CLASS_NAME:"OpenLayers.LonLat"});OpenLayers.LonLat.fromString=function(str){var pair=str.split(",");return new OpenLayers.LonLat(parseFloat(pair[0]),parseFloat(pair[1]));};OpenLayers.Element={visible:function(element){return OpenLayers.Util.getElement(element).style.display!='none';},toggle:function(){for(var i=0,len=arguments.length;i<len;i++){var element=OpenLayers.Util.getElement(arguments[i]);var display=OpenLayers.Element.visible(element)?'hide':'show';OpenLayers.Element[display](element);}},hide:function(){for(var i=0,len=arguments.length;i<len;i++){var element=OpenLayers.Util.getElement(arguments[i]);element.style.display='none';}},show:function(){for(var i=0,len=arguments.length;i<len;i++){var element=OpenLayers.Util.getElement(arguments[i]);element.style.display='';}},remove:function(element){element=OpenLayers.Util.getElement(element);element.parentNode.removeChild(element);},getHeight:function(element){element=OpenLayers.Util.getElement(element);return element.offsetHeight;},getDimensions:function(element){element=OpenLayers.Util.getElement(element);if(OpenLayers.Element.getStyle(element,'display')!='none'){return{width:element.offsetWidth,height:element.offsetHeight};}
var els=element.style;var originalVisibility=els.visibility;var originalPosition=els.position;var originalDisplay=els.display;els.visibility='hidden';els.position='absolute';els.display='';var originalWidth=element.clientWidth;var originalHeight=element.clientHeight;els.display=originalDisplay;els.position=originalPosition;els.visibility=originalVisibility;return{width:originalWidth,height:originalHeight};},hasClass:function(element,name){var names=element.className;return(!!names&&new RegExp("(^|\\s)"+name+"(\\s|$)").test(names));},addClass:function(element,name){if(!OpenLayers.Element.hasClass(element,name)){element.className+=(element.className?" ":"")+name;}
return element;},removeClass:function(element,name){var names=element.className;if(names){element.className=OpenLayers.String.trim(names.replace(new RegExp("(^|\\s+)"+name+"(\\s+|$)")," "));}
return element;},toggleClass:function(element,name){if(OpenLayers.Element.hasClass(element,name)){OpenLayers.Element.removeClass(element,name);}else{OpenLayers.Element.addClass(element,name);}
return element;},getStyle:function(element,style){element=OpenLayers.Util.getElement(element);var value=null;if(element&&element.style){value=element.style[OpenLayers.String.camelize(style)];if(!value){if(document.defaultView&&document.defaultView.getComputedStyle){var css=document.defaultView.getComputedStyle(element,null);value=css?css.getPropertyValue(style):null;}else if(element.currentStyle){value=element.currentStyle[OpenLayers.String.camelize(style)];}}
var positions=['left','top','right','bottom'];if(window.opera&&(OpenLayers.Util.indexOf(positions,style)!=-1)&&(OpenLayers.Element.getStyle(element,'position')=='static')){value='auto';}}
return value=='auto'?null:value;}};OpenLayers.Size=OpenLayers.Class({w:0.0,h:0.0,initialize:function(w,h){this.w=parseFloat(w);this.h=parseFloat(h);},toString:function(){return("w="+this.w+",h="+this.h);},clone:function(){return new OpenLayers.Size(this.w,this.h);},equals:function(sz){var equals=false;if(sz!=null){equals=((this.w==sz.w&&this.h==sz.h)||(isNaN(this.w)&&isNaN(this.h)&&isNaN(sz.w)&&isNaN(sz.h)));}
return equals;},CLASS_NAME:"OpenLayers.Size"});(function(){window.mapfish={singleFile:true};var foolOpenLayers=true;var scripts=document.getElementsByTagName('script');for(var i=0;i<scripts.length;i++){var src=scripts[i].getAttribute('src');if(src&&src.lastIndexOf("OpenLayers.js")>-1){foolOpenLayers=false;break;}}
if(foolOpenLayers){window.OpenLayers._getScriptLocation=function(){return mapfish._getScriptLocation()+"../openlayers/";};}})();(function(){var singleFile=(typeof window.mapfish=="object"&&window.mapfish.singleFile);window.mapfish={_scriptName:"MapFish.js",_getScriptLocation:function(){if(window.gMfLocation){return window.gMfLocation;}
var scriptLocation="";var scriptName=mapfish._scriptName;var scripts=document.getElementsByTagName('script');for(var i=0;i<scripts.length;i++){var src=scripts[i].getAttribute('src');if(src){var index=src.lastIndexOf(scriptName);if((index>-1)&&(index+scriptName.length==src.length)){scriptLocation=src.slice(0,-scriptName.length);break;}}}
return scriptLocation;}};if(!singleFile){var jsfiles=new Array("lang/en.js","core/Color.js","core/GeoStat.js","core/GeoStat/Choropleth.js","core/GeoStat/ProportionalSymbol.js","core/Routing.js","core/Util.js","core/Searcher.js","core/Searcher/Map.js","core/Searcher/Form.js","core/PrintProtocol.js","core/Offline.js","core/Protocol.js","core/Protocol/MapFish.js","core/Protocol/MergeFilterDecorator.js","core/Protocol/TriggerEventDecorator.js","core/Strategy.js","core/Strategy/ProtocolListener.js","widgets/MapComponent.js","widgets/Shortcuts.js","widgets/ComboBoxFactory.js","widgets/recenter/Base.js","widgets/recenter/Coords.js","widgets/recenter/DataField.js","widgets/data/FeatureReader.js","widgets/data/FeatureStore.js","widgets/data/FeatureStoreMediator.js","widgets/data/SearchStoreMediator.js","widgets/data/LayerStoreMediator.js","widgets/data/GridRowFeatureMediator.js","widgets/geostat/Choropleth.js","widgets/geostat/ProportionalSymbol.js","widgets/tree/LayerTree.js","widgets/tree/LayerTreeExtra.js","widgets/toolbar/Toolbar.js","widgets/toolbar/CheckItem.js","widgets/toolbar/MenuItem.js","widgets/editing/FeatureList.js","widgets/editing/FeatureProperties.js","widgets/editing/FeatureEditingPanel.js","widgets/print/Base.js","widgets/print/BaseWidget.js","widgets/print/SimpleForm.js","widgets/print/MultiPage.js","widgets/print/PrintAction.js","widgets/search/Form.js");var allScriptTags="";var host=mapfish._getScriptLocation();for(var i=0;i<jsfiles.length;i++){if(/MSIE/.test(navigator.userAgent)||/Safari/.test(navigator.userAgent)){var currentScriptTag="<script src='"+host+jsfiles[i]+"'></script>";allScriptTags+=currentScriptTag;}else{var s=document.createElement("script");s.src=host+jsfiles[i];var h=document.getElementsByTagName("head").length?document.getElementsByTagName("head")[0]:document.body;h.appendChild(s);}}
if(allScriptTags){document.write(allScriptTags);}}})();Ext.namespace("cdbund");cdbund.config={baseUrl:'http://map.geoportail.lu/',printUrl:'/print',tilecacheUrl:['http://wssec.geoportail.lu/c2c1/tilecache.cgi?','http://wssec.geoportail.lu/c2c2/tilecache.cgi?','http://wssec.geoportail.lu/c2c3/tilecache.cgi?','http://wssec.geoportail.lu/c2c4/tilecache.cgi?'],tilecacheDirectUrl:['http://tile1.geoportail.lu','http://tile2.geoportail.lu','http://tile3.geoportail.lu','http://tile4.geoportail.lu'],maxExtent:[48000,57000,107000,139000],resolutions:[500.0,250.0,150.0,100.0,50.0,20.0,10.0,5.0,2.0,1.0,0.5],serverResolutions:[4000,3750,3500,3250,3000,2750,2500,2250,2000,1750,1500,1250,1000,750,650,500,250,100,50,20,10,5,2.5,2,1.5,1,0.5],pixelmapResolutions:[500,250,150,100,50,20,10,5,2.0,1.0,0.5],scales:[6500000,5000000,2500000,1000000,500000,200000,100000,50000,25000,20000,10000,5000]};OpenLayers.Util.extend(OpenLayers.Lang.en,{'Coordinates: ':'Coordinates : ','Print':'Print','Full extent':'Full extent','Distance measurement (double-click to terminate)':'Distance measurement (double-click to terminate)','Area measurement (double-click to terminate)':'Area measurement (double-click to terminate)','Previous view':'Previous view','Next view':'Next view','previous':'Previous','next':'Next','a_A4_landscape':'A4 Landscape','b_A4_portrait':'A4 Portrait','c_A3_landscape':'A3 Landscape','d_A3_portrait':'A3 Portrait','Gebiete mit naturbedingten Risiken':'Natural hazard areas','flood_risk':'Flood risks','cantons_labels':'Cantons (names)','districts_labels':'Districts (names)','Cities_labels':'Municipalities (names)','cantons':'Cantons','districts':'Districts','Cities':'Municipalities','natura2000':'Natura 2000','rivers':'Rivers','roads':'Road Network','roads_labels':'Road Names','ortho':'Orthophoto 2007','ortho_irc':'Orthophoto 2007 (infrared)','ortho_2001':'Orthophoto 2001','ortho_2004':'Orthophoto 2004','1907_CAHANSEN':'Topographical Map 1907','1927_CAHANSEN':'Topographical Map 1927','TOPO25K1954C24':'Topographical Map 1954','topo':'Automatical Topographical Map','topo_5k':'Topographical Map 1:5000','topo_20k':'Topographical Map 1:20000','topo_decoupage_r':'Regional Mapsheets','topo_50k':'Topographical Map 1:50000','topo_100k':'Topographical Map 1:100000','bdcarto_100k':'Topographical Map (BDCARTO) 1:100000','topo_250k':'Topographical Map 1:250000','Topographische Karten':'Topographical Maps','wg_relief_dhm_2m':'Relief DEM 2','wg_hohenlinien_10m':'Contour 10 m','wg_ikonos_satellitendaten':'Satellite pcitures Ikonos','wg_wasserspiegel':'Water level','wg_grundwasser':'Groundwater','wg_niederschlag':'Precipitation','wg_landesgrenzen':'Country','country':'Country','wg_lufttemperatur':'Air temperature','wg_schneehohe':'Snow height','wg_bodentemperatur':'Soil temperature','wg_einzugsgebiete':'Catchments','wg_feuchtgebiete':'Wetland','wg_naturliche_(bassin)':'Natural basin','wg_kunstliche_(bassin)':'Artificial basin','wg_stausee_sauer':'Lake Haute Sûre','wg_kilometrierung_nebengewasser':'Measurement affluent watercourses','wg_kilometrierung_hauptgewasser':'Measurement main watercourses','wg_kanal__muhlgraben':'Channel, Millchannel','wg_nebengewasser':'Affluent watercourses','wg_hauptgewasser':'Main watercourses','wg_durchgangigkeit':'Continuity','wg_fischereiabschnitte':'Fishing sections','wg_versiegelungsklassen':'Sealing','wg_einschrankung_warmepumpe':'Restrictions geothermal heat pumps','wg_grundwasserleiter':'Aquifers','wg_bohrungen':'Drill','wg_quellen':'Spring','wg_nitratbelastung':'Nitrate pressure','wg_provisorische_trinkwasser_schutzzonen':'Provisional drinking water protection zones','wg_trinkwasserbehalter':'Drinking water basin','wg_landnutzung':'Land use','wg_trinkwassersyndikate':'Drinking water syndicates','wg_pumpstationen':'Pumping stations','wg_kontrollpunkte':'Monitoring points','wg_trinkwasserentnahmepunkte':'Drinking water abstraction points','wg_gefahrenklassen':'Hazard classification','wg_querprofile':'Cross sections','wg_bauwerke':'Buildings','wg_intensitaet_hq_extrem':'Intensity extreme flood event','wg_intensitaet_hq_200':'Intensity 200-year flood event','wg_intensitaet_hq_100':'Intensity 100-year flood event','wg_intensitaet_hq_50':'Intensity 50-year flood event','wg_wassertiefe_hq_extrem':'Water depth extreme flood event','wg_wassertiefe_hq_200':'Water depth 200-year flood event','wg_wassertiefe_hq_100':'Water depth 100-year flood event','wg_wassertiefe_hq_50':'Water depth 50-year flood event','wg_hangneigung_':'Slope °','wg_uesg_extrem':'Floodplain extreme flood','wg_uesg_200_jaehrlich':'Floodplain 200-year flood','wg_uesg_100_jaehrlich':'Floodplain 100-year flood','wg_uesg_50_jaehrlich':'Floodplain 50-year flood','wg_timis_hochwasser_gefahrdungen':'Flood risks','wg_timis_hochwasser_intensitaten_ehq':'Intensity extreme flood event','wg_timis_hochwasser_intensitaten_hq100':'Intensity 100-year flood event','wg_timis_hochwasser_intensitaten_hq50':'Intensity 50-year flood event','wg_timis_hochwasser_intensitaten_hq10':'Intensity 10-year flood event','wg_timis_wassertiefe_ehq':'Water depth extreme flood event','wg_timis_wassertiefe_hq100':'Water depth 100-year flood event','wg_timis_wassertiefe_hq50':'Water depth 50-year flood event','wg_timis_wassertiefe_hq10':'Water depth 10-year flood event','wg_timis_ueberflutungsflachen_ehq':'Floodplain extreme flood','wg_timis_ueberflutungsflachen_hq100':'Floodplain 100-year flood','wg_timis_ueberflutungsflachen_hq50':'Floodplain 50-year flood','wg_timis_ueberflutungsflachen_hq10':'Floodplain 10-year flood','wg_uesg_sure_1995':'Floodplain Sauer 1995','wg_uesg_alzette_1995':'Floodplain Alzette 1995','wg_uesg_1993_(ausser_mosel)':'Floodplain 1993 flood event (without Mosel)','wg_uesg_1983___mosel':'Floodplain 1983 flood event - Mosel','wg_exposition':'Exposition','wg_abwasser_syndikate':'Waste water syndicats','wg_klaranlagen':'Waste water treatment plants','wg_hmwb_(stark_modifizierte_wasserkorper)':'HMWB (heavily modified water bodies)','wg_betrachtungsraume':'Examination zones','wg_gewasserentwicklungsfahigkeit':'Water course development capacity','wg_relief':'Relief','Zoom to the max extent':'Zoom to the extent of the country','permalink action':'Link','print action':'Print','Search':'Search','Catalog':'Catalog','Layer Selection':'Layer Selection','Warning screen resolution':"Avertissement résolution d'écran",'Your screen resolution is smaller than 1024x768 pixels. map.geo.admin.ch is not optmized for small screen resolution.':"Your screen resolution is smaller than 1024x768 pixels. map.geoportail.lu is not optmized for small screen resolution.",'Full map':'Full map','Geo search...':'Search for places, municipalities, coordinates...','show column':'Show the layer manager','hide column':'Hide the layer manager','Map URL':'Paste the following link into an email','URL':'URL ','Basisdaten':'Geographical location','Referenzsysteme':'Reference systems','Geografische Namen':'Geographical names','Administrative Einheiten':'Administrative units','Bodennutzung':'Land use','Biologie':'Biology','Versorgungswirtschaft und staatliche Dienste':'Utility and governmental services','Wasserrahmenrichtlinie':'Water framework directive','Adressen':'Addresses','addresses':'Addresses','Flurstücke / Grundstücke':'Cadastral data','parcels':'Cadastral parcels','parcels_labels':'Cadastral parcels (numbers)','toponymes':'Cadastral region names','communes_cadastrales_labels':'Cadastral municipalities (names)','sections_cadastrales_labels':'Cadastral sections  (names)','communes_cadastrales':'Cadastral municipalities','sections_cadastrales':'Cadastral sections','feuilles_cadastrales':'Historical cadastral sheets','Oberflächendarstellung':'Land surface','Gewässernetz':'Hydrography','Höhe':'Height','Bodenbedeckung':'Land cover','Luft und Satellitenbilder':'Orthophoto-images','Raum und Bevölkerung':'Society and population','Gesundheit une Sicherheit':'Health and safety','Bevölkerungsdichte':'Population distribution','Raumplanung':'Urban and rural settlement','Infrastrucktur une Kommunikation':'Transport','Verkehrsnetze':'Transport networks','Gebäude':'Buildings','Öffentliche Einrichtungen und Dienste':'Public services','Umwelt, Biologie und Geologie':'Environment, Biology and Geology','Schutzgebiete':'Protected sites','Geologie':'Geology','Boden':'Soils','Umweltüberwachung':'Environmental survey','Natürliche Risikozonen':'Natural risk zones','Atmosphärische Bedingungen':'Atmospheric conditions','Meteorologie':'Meteorolgy','Biogeografische Regionen':'Biogeogrphic regions','Lebensräume une Biotope':'Habitats and biotopes','Artenvielfalt':'Species distribution','Mineralische Bodenschätze':'Mineral ressources','Energie und Wirtschaft':'Energy and economy','Statistische Einheiten':'Statistical units','Landnutzung':'Land use','Produktions- und Industrieanlagen':'Production facilities, industry','Land- und Wassertwirtschaft':'Agricultural facilities','Energiequellen':'Energy sources','show layer options':'Show layer options','hide layer options':'Hide layer options','Opacity:':'Opacity  :','about that layer':'About this layer','move layer up':'Move layer up','move layer down':'Move layer down','remove layer':'Remove layer','Feature tooltip':'Informations about the object','pixelmaps-color':'Topographic map','pixelmaps-gray':'Topographic map B/W','voidLayer':'White background','aerial attribution':'Aerial image: ACT 2007','pixelmap-color attribution':'Topographic map: ACT','pixelmap-gray attribution':'Topographic map B/W: ACT','loadingText':"Page is loading...",'Search data...':'Searching data...','Warning Internet Explorer 6':'Internet Explorer 6 Warning','You are using Internet Explorer 6.':'You are using Internet Explorer 6.','We recommend to upgrade to a newer release.':"We recommend that you use a newer version.",'You can add only 5 layers in the layer tree.':'You can add only 5 layers in the layer tree.','Layer metadata':'Metadata','Layer legend':'Legend','legend_link_parcels':'http://wiki.geoportail.lu/doku.php?id=en:legend:pcn:show&do=export_html#plan_cadastral_numerise_pcn_parcelles','metadata_link_parcels':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=de5373d6-340f-4203-a065-da7550a03cc4_2050','legend_link_buildings':'http://wiki.geoportail.lu/doku.php?id=en:legend:pcn:show&do=export_html#plan_cadastral_numerise_pcn_-_batiments','metadata_link_buildings':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=5d0efc9d-a05a-4964-9f9d-a0ab9932af04','legend_link_toponymes':'http://wiki.geoportail.lu/doku.php?id=en:legend:none&do=export_html','metadata_link_toponymes':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=ffa537f7-a438-47da-9e0c-8e32260646a9','legend_link_communes':'http://wiki.geoportail.lu/doku.php?id=en:legend:none&do=export_html','metadata_link_communes':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=de5373d6-340f-4203-a065-da7550a03cc4_2049','legend_link_ortho_irc':'http://wiki.geoportail.lu/doku.php?id=en:legend:none&do=export_html','metadata_link_ortho_irc':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=9848c7ac-0c12-430d-a05f-62dda9e234a0','legend_link_ortho_2004':'http://wiki.geoportail.lu/doku.php?id=en:legend:none&do=export_html','metadata_link_ortho_2004':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=a185f78a-ca9c-43f8-8d06-b1abba8ff056','legend_link_ortho_2001':'http://wiki.geoportail.lu/doku.php?id=en:legend:none&do=export_html','metadata_link_ortho_2001':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=e6ff269c-1c7c-401f-a90b-b805e80a046e','legend_link_natura2000':'http://wiki.geoportail.lu/doku.php?id=en:legend:natura2000&do=export_html','metadata_link_natura2000':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=c56bb027-9552-471b-b574-7cf9085cdd32','legend_link_rivers':'http://wiki.geoportail.lu/doku.php?id=en:legend:none&do=export_html','metadata_link_rivers':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=4ee7580f-3996-488b-9af3-629b3837a442','legend_link_roads':'http://wiki.geoportail.lu/doku.php?id=en:legend:road_network:show&do=export_html','metadata_link_roads':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=12627f90-f0f8-41b3-a56a-2e11a232ba59','legend_link_geologie':'http://www.geoportal.lu/Portail/legendes/geo100k_raster_legende.pdf','metadata_link_geologie':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=b206d194-0067-4f09-a89e-af4a6673413d','legend_link_flood_risk':'http://wiki.geoportail.lu/doku.php?id=en:legend:flood_risk&do=export_html','metadata_link_flood_risk':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=ba745f8e-662c-4c3f-ae41-850f24bb49d8','legend_link_communes':'http://wiki.geoportail.lu/doku.php?id=en:legend:none&do=export_html','legend_link_cantons':'http://wiki.geoportail.lu/doku.php?id=en:legend:none&do=export_html','legend_link_districts':'http://wiki.geoportail.lu/doku.php?id=en:legend:none&do=export_html','legend_link_pays':'http://wiki.geoportail.lu/doku.php?id=en:legend:none&do=export_html','legend_link_communes_cadastrales':'http://wiki.geoportail.lu/doku.php?id=en:legend:none&do=export_html','legend_link_sections_cadastrales':'http://wiki.geoportail.lu/doku.php?id=en:legend:none&do=export_html','legend_link_feuilles_cadastrales':'http://wiki.geoportail.lu/doku.php?id=en:legend:none&do=export_html','metadata_link_feuilles_cadastrales':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=51333029-c8cf-490f-b4a6-80ba239f0cb4','legend_link_wg_relief_dhm_2m':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:relief_dhm_2m&do=export_html','metadata_link_wg_relief_dhm_2m':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_hohenlinien_10m':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:hohenlinien_10m&do=export_html','metadata_link_wg_hohenlinien_10m':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_ikonos_satellitendaten':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:ikonos_satellitendaten&do=export_html','metadata_link_wg_ikonos_satellitendaten':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_wasserspiegel':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:wasserspiegel&do=export_html','metadata_link_wg_wasserspiegel':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_grundwasser':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:grundwasser&do=export_html','metadata_link_wg_grundwasser':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_niederschlag':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:niederschlag&do=export_html','metadata_link_wg_niederschlag':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_landesgrenzen':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:landesgrenzen&do=export_html','metadata_link_wg_landesgrenzen':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_lufttemperatur':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:lufttemperatur&do=export_html','metadata_link_wg_lufttemperatur':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_schneehohe':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:schneehohe&do=export_html','metadata_link_wg_schneehohe':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_bodentemperatur':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:bodentemperatur&do=export_html','metadata_link_wg_bodentemperatur':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_einzugsgebiete':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:einzugsgebiete&do=export_html','metadata_link_wg_einzugsgebiete':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_feuchtgebiete':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:feuchtgebiete&do=export_html','metadata_link_wg_feuchtgebiete':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_naturliche_(bassin)':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:naturliche_(bassin)&do=export_html','metadata_link_wg_naturliche_(bassin)':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_kunstliche_(bassin)':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:kunstliche_(bassin)&do=export_html','metadata_link_wg_kunstliche_(bassin)':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_stausee_sauer':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:stausee_sauer&do=export_html','metadata_link_wg_stausee_sauer':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_kilometrierung_nebengewasser':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:kilometrierung_nebengewasser&do=export_html','metadata_link_wg_kilometrierung_nebengewasser':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_kilometrierung_hauptgewasser':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:kilometrierung_hauptgewasser&do=export_html','metadata_link_wg_kilometrierung_hauptgewasser':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_kanal__muhlgraben':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:kanal__muhlgraben&do=export_html','metadata_link_wg_kanal__muhlgraben':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_nebengewasser':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:nebengewasser&do=export_html','metadata_link_wg_nebengewasser':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_hauptgewasser':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:hauptgewasser&do=export_html','metadata_link_wg_hauptgewasser':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_durchgangigkeit':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:durchgangigkeit&do=export_html','metadata_link_wg_durchgangigkeit':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_fischereiabschnitte':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:fischereiabschnitte&do=export_html','metadata_link_wg_fischereiabschnitte':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_versiegelungsklassen':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:versiegelungsklassen&do=export_html','metadata_link_wg_versiegelungsklassen':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_einschrankung_warmepumpe':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:einschrankung_warmepumpe&do=export_html','metadata_link_wg_einschrankung_warmepumpe':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_grundwasserleiter':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:grundwasserleiter&do=export_html','metadata_link_wg_grundwasserleiter':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_bohrungen':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:bohrungen&do=export_html','metadata_link_wg_bohrungen':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_quellen':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:quellen&do=export_html','metadata_link_wg_quellen':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_nitratbelastung':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:nitratbelastung&do=export_html','metadata_link_wg_nitratbelastung':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_provisorische_trinkwasser_schutzzonen':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:provisorische_trinkwasser_schutzzonen&do=export_html','metadata_link_wg_provisorische_trinkwasser_schutzzonen':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_trinkwasserbehalter':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:trinkwasserbehalter&do=export_html','metadata_link_wg_trinkwasserbehalter':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_landnutzung':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:landnutzung&do=export_html','metadata_link_wg_landnutzung':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_trinkwassersyndikate':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:trinkwassersyndikate&do=export_html','metadata_link_wg_trinkwassersyndikate':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_pumpstationen':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:pumpstationen&do=export_html','metadata_link_wg_pumpstationen':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_kontrollpunkte':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:kontrollpunkte&do=export_html','metadata_link_wg_kontrollpunkte':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_trinkwasserentnahmepunkte':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:trinkwasserentnahmepunkte&do=export_html','metadata_link_wg_trinkwasserentnahmepunkte':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_gefahrenklassen':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:gefahrenklassen&do=export_html','metadata_link_wg_gefahrenklassen':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_querprofile':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:querprofile&do=export_html','metadata_link_wg_querprofile':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_bauwerke':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:bauwerke&do=export_html','metadata_link_wg_bauwerke':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_intensitaet_hq_extrem':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:intensitaet_hq_extrem&do=export_html','metadata_link_wg_intensitaet_hq_extrem':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_intensitaet_hq_200':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:intensitaet_hq_200&do=export_html','metadata_link_wg_intensitaet_hq_200':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_intensitaet_hq_100':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:intensitaet_hq_100&do=export_html','metadata_link_wg_intensitaet_hq_100':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_intensitaet_hq_50':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:intensitaet_hq_50&do=export_html','metadata_link_wg_intensitaet_hq_50':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_wassertiefe_hq_extrem':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:wassertiefe_hq_extrem&do=export_html','metadata_link_wg_wassertiefe_hq_extrem':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_wassertiefe_hq_200':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:wassertiefe_hq_200&do=export_html','metadata_link_wg_wassertiefe_hq_200':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_wassertiefe_hq_100':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:wassertiefe_hq_100&do=export_html','metadata_link_wg_wassertiefe_hq_100':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_wassertiefe_hq_50':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:wassertiefe_hq_50&do=export_html','metadata_link_wg_wassertiefe_hq_50':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_hangneigung_':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:hangneigung_&do=export_html','metadata_link_wg_hangneigung_':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_uesg_extrem':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:uesg_extrem&do=export_html','metadata_link_wg_uesg_extrem':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_uesg_200_jaehrlich':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:uesg_200_jaehrlich&do=export_html','metadata_link_wg_uesg_200_jaehrlich':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_uesg_100_jaehrlich':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:uesg_100_jaehrlich&do=export_html','metadata_link_wg_uesg_100_jaehrlich':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_uesg_50_jaehrlich':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:uesg_50_jaehrlich&do=export_html','metadata_link_wg_uesg_50_jaehrlich':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_uesg_sure_1995':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:uesg_sure_1995&do=export_html','metadata_link_wg_uesg_sure_1995':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_uesg_alzette_1995':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:uesg_alzette_1995&do=export_html','metadata_link_wg_uesg_alzette_1995':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_uesg_1993_(ausser_mosel)':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:uesg_1993_(ausser_mosel)&do=export_html','metadata_link_wg_uesg_1993_(ausser_mosel)':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_uesg_1983___mosel':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:uesg_1983___mosel&do=export_html','metadata_link_wg_uesg_1983___mosel':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_exposition':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:exposition&do=export_html','metadata_link_wg_exposition':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_provisorische_trinkwasser_schutzzonen':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:provisorische_trinkwasser_schutzzonen&do=export_html','metadata_link_wg_provisorische_trinkwasser_schutzzonen':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_abwasser_syndikate':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:abwasser_syndikate&do=export_html','metadata_link_wg_abwasser_syndikate':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_klaranlagen':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:klaranlagen&do=export_html','metadata_link_wg_klaranlagen':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_hmwb_(stark_modifizierte_wasserkorper)':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:hmwb_(stark_modifizierte_wasserkorper)&do=export_html','metadata_link_wg_hmwb_(stark_modifizierte_wasserkorper)':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_betrachtungsraume':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:betrachtungsraume&do=export_html','metadata_link_wg_betrachtungsraume':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_provisorische_trinkwasser_schutzzonen':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:provisorische_trinkwasser_schutzzonen&do=export_html','metadata_link_wg_provisorische_trinkwasser_schutzzonen':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_gewasserentwicklungsfahigkeit':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:gewasserentwicklungsfahigkeit&do=export_html','metadata_link_wg_gewasserentwicklungsfahigkeit':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_relief':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:relief&do=export_html','metadata_link_wg_relief':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_timis_hochwasser_gefahrdungen':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg:_timis_hochwasser_gefahrdungen&do=export_html','legend_link_wg_timis_hochwasser_intensitaten_ehq':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg_timis_hochwasser_intensitaten&do=export_html','legend_link_wg_timis_hochwasser_intensitaten_hq10':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg_timis_hochwasser_intensitaten&do=export_html','legend_link_wg_timis_hochwasser_intensitaten_hq100':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg_timis_hochwasser_intensitaten&do=export_html','legend_link_wg_timis_hochwasser_intensitaten_hq50':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg_timis_hochwasser_intensitaten&do=export_html','legend_link_wg_timis_ueberflutungsflachen_ehq':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg_timis_ueberflutungsflachen&do=export_html','legend_link_wg_timis_ueberflutungsflachen_hq10':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg_timis_ueberflutungsflachen&do=export_html','legend_link_wg_timis_ueberflutungsflachen_hq100':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg_timis_ueberflutungsflachen&do=export_html','legend_link_wg_timis_ueberflutungsflachen_hq50':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg_timis_ueberflutungsflachen&do=export_html','legend_link_wg_timis_wassertiefe_ehq':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg_timis_wassertiefe&do=export_html','legend_link_wg_timis_wassertiefe_hq10':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg_timis_wassertiefe&do=export_html','legend_link_wg_timis_wassertiefe_hq100':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg_timis_wassertiefe&do=export_html','legend_link_wg_timis_wassertiefe_hq50':'http://wiki.geoportail.lu/doku.php?id=en:legend:wg_timis_wassertiefe&do=export_html','metadata_link_wg_timis_hochwasser_gefahrdungen':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_hochwasser_intensitaten_ehq':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_hochwasser_intensitaten_hq10':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_hochwasser_intensitaten_hq100':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_hochwasser_intensitaten_hq50':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_ueberflutungsflachen_ehq':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_ueberflutungsflachen_hq10':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_ueberflutungsflachen_hq100':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_ueberflutungsflachen_hq50':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_wassertiefe_ehq':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_wassertiefe_hq10':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_wassertiefe_hq100':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_wassertiefe_hq50':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_topo_5k':'http://wiki.geoportail.lu/doku.php?id=en:legend:none&do=export_html','metadata_link_topo_5k':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=270_2012','legend_link_topo_20k':'http://wiki.geoportail.lu/doku.php?id=en:legend:none&do=export_html','metadata_link_topo_20k':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=9fb01381-698c-4e5f-950e-6c4793e0a7fd','legend_link_topo_50k':'http://wiki.geoportail.lu/doku.php?id=en:legend:none&do=export_html','metadata_link_topo_50k':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=262','legend_link_topo_100k':'http://wiki.geoportail.lu/doku.php?id=en:legend:none&do=export_html','metadata_link_topo_100k':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=266','legend_link_topo_250k':'http://wiki.geoportail.lu/doku.php?id=en:legend:none&do=export_html','metadata_link_topo_250k':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=e1f601a5-ed8f-4043-8719-0cad50cbb483','legend_link_1907_CAHANSEN':'http://wiki.geoportail.lu/doku.php?id=en:legend:none&do=export_html','metadata_link_1907_CAHANSEN':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=b88e6524-67d3-4e34-b998-6f30120e3718','legend_link_1927_CAHANSEN':'http://wiki.geoportail.lu/doku.php?id=en:legend:none&do=export_html','metadata_link_1927_CAHANSEN':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=90750f9f-856d-41ac-a90f-a8befbd75434','legend_link_TOPO25K1954C24':'http://wiki.geoportail.lu/doku.php?id=en:legend:none&do=export_html','metadata_link_TOPO25K1954C24':'http://www.geoportal.lu/Portail/menuAction.do?lang=en&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=7a8bc9a4-e7c7-4584-bc4f-03deaf7b69b2','legend_link_parcels_labels':'http://wiki.geoportail.lu/doku.php?id=en:legend:none&do=export_html','legend_link_addresses':'http://wiki.geoportail.lu/doku.php?id=en:legend:none&do=export_html','legend_link_topo':'http://wiki.geoportail.lu/doku.php?id=en:legend:none&do=export_html','legend_link_bdcarto_100k':'http://wiki.geoportail.lu/doku.php?id=en:legend:none&do=export_html','legend_link_ortho':'http://wiki.geoportail.lu/doku.php?id=en:legend:none&do=export_html','legend_link_country':'http://wiki.geoportail.lu/doku.php?id=en:legend:none&do=export_html','legend_link_communes_labels':'http://wiki.geoportail.lu/doku.php?id=en:legend:none&do=export_html','legend_link_cantons_labels':'http://wiki.geoportail.lu/doku.php?id=en:legend:none&do=export_html','legend_link_districts_labels':'http://wiki.geoportail.lu/doku.php?id=en:legend:none&do=export_html','legend_link_communes_cadastrales_labels':'http://wiki.geoportail.lu/doku.php?id=en:legend:none&do=export_html','legend_link_sections_cadastrales_labels':'http://wiki.geoportail.lu/doku.php?id=en:legend:none&do=export_html','legend_link_roads_labels':'http://wiki.geoportail.lu/doku.php?id=en:legend:none&do=export_html','legend_link_topo_decoupage_r':'http://wiki.geoportail.lu/doku.php?id=en:legend:none&do=export_html','Position':'','redlining action':'Drawing'});OpenLayers.Util.extend(OpenLayers.Lang.fr,{'Coordinates: ':'Coordonn&eacute;es : ','Print':'Impression','Full extent':'Vue générale','Distance measurement (double-click to terminate)':'Mesure de distance (double-cliquer pour terminer)','Area measurement (double-click to terminate)':'Mesure de surface (double-cliquer pour terminer)','Previous view':'Retour au cadrage précédent','Next view':'Retour au cadrage suivant','previous':'Retour au cadrage précédent','next':'Retour au cadrage suivant','a_A4_landscape':'A4 Paysage','b_A4_portrait':'A4 Portrait','c_A3_landscape':'A3 Paysage','d_A3_portrait':'A3 Portrait','Gebiete mit naturbedingten Risiken':'Zones à risque naturel','flood_risk':'Risque de crue','natura2000':'Natura 2000','rivers':'Rivières','cantons_labels':'Cantons (Noms)','districts_labels':'Districts (Noms)','Cities_labels':'Communes (Noms)','cantons':'Cantons','districts':'Districts','Cities':'Communes','roads':'Réseau routier','roads_labels':'Noms de rue','ortho':'Orthophoto 2007','ortho_irc':'Orthophoto 2007 (infrarouge)','ortho_2001':'Orthophoto 2001','ortho_2004':'Orthophoto 2004','1907_CAHANSEN':'Carte topographique 1907','1927_CAHANSEN':'Carte topographique 1927','TOPO25K1954C24':'Carte topographique 1954','topo':'Carte topographique automatique','topo_5k':'Carte topographique 1:5000','topo_20k':'Carte topographique 1:20000','topo_decoupage_r':'Découpage Cartes Régionales','topo_50k':'Carte topographique 1:50000','topo_100k':'Carte topographique 1:100000','bdcarto_100k':'Carte topographique (BDCARTO) 1:100000','topo_250k':'Carte topographique 1:250000','Topographische Karten':'Cartes topographiques','wg_relief_dhm_2m':'Relief MNT 2m','wg_hohenlinien_10m':'Courbes de niveau 10m','wg_ikonos_satellitendaten':'Données spatiales Ikonos','wg_wasserspiegel':'Niveau d\'eau','wg_grundwasser':'Eaux souterraines','wg_niederschlag':'Précipitations','wg_landesgrenzen':'Frontières','country':'Frontières','wg_lufttemperatur':'Température de l\'air','wg_schneehohe':'Hauteur de neige','wg_bodentemperatur':'Température du sol','wg_einzugsgebiete':'Bassins versants','wg_feuchtgebiete':'Zones humides','wg_naturliche_(bassin)':'Bassin naturel','wg_kunstliche_(bassin)':'Bassin artificiel','wg_stausee_sauer':'Lac de la Haute Sûre','wg_kilometrierung_nebengewasser':'Kilométrage des cours d\'eau affluents','wg_kilometrierung_hauptgewasser':'Kilométrage des cours d\'eau principaux','wg_kanal__muhlgraben':'Canal, chenal de moulin','wg_nebengewasser':'Cours d\'eau affluents','wg_hauptgewasser':'Cours d\'eau principaux','wg_durchgangigkeit':'Continuité','wg_fischereiabschnitte':'Sections de pêche','wg_versiegelungsklassen':'Imperméabilisation','wg_einschrankung_warmepumpe':'Restrictions pompes à chaleur','wg_grundwasserleiter':'Aquifères','wg_bohrungen':'Forages','wg_quellen':'Sources','wg_nitratbelastung':'Pression causée par des nitrates','wg_provisorische_trinkwasser_schutzzonen':'Zones de protection d\'eau potable provisoires','wg_trinkwasserbehalter':'Réservoir d\'eau potable','wg_landnutzung':'Occupation du sol','wg_trinkwassersyndikate':'Syndicats d\'eau potable','wg_pumpstationen':'Stations de pompage','wg_kontrollpunkte':'Points de contrôle','wg_trinkwasserentnahmepunkte':'Points de prélèvement d\'eau potable','wg_gefahrenklassen':'Classes des dangers','wg_querprofile':'Profils en travers','wg_bauwerke':'Ouvrages','wg_intensitaet_hq_extrem':'Intensité crue extrème','wg_intensitaet_hq_200':'Intensité crue temps de retour 200 ans ','wg_intensitaet_hq_100':'Intensité crue centennale','wg_intensitaet_hq_50':'Intensité crue temps de retour 50 ans ','wg_wassertiefe_hq_extrem':'Profondeur d\'eau crue extrème','wg_wassertiefe_hq_200':'Profondeur d\'eau crue temps de retour 200 ans','wg_wassertiefe_hq_100':'Profondeur d\'eau crue centennale','wg_wassertiefe_hq_50':'Profondeur d\'eau crue temps de retour 50 ans','wg_hangneigung_':'Pente °','wg_uesg_extrem':'Zone inondable crue extrème','wg_uesg_200_jaehrlich':'Zone inondable crue temps de retour 200 ans','wg_uesg_100_jaehrlich':'Zone inondable crue centennale','wg_uesg_50_jaehrlich':'Zone inondable crue temps de retour 50 ans','wg_timis_hochwasser_gefahrdungen':'Risques de crue','wg_timis_hochwasser_intensitaten_ehq':'Intensité crue extrème','wg_timis_hochwasser_intensitaten_hq100':'Intensité crue centennale','wg_timis_hochwasser_intensitaten_hq50':'Intensité crue 50 ans','wg_timis_hochwasser_intensitaten_hq10':'Intensité crue 10 ans','wg_timis_wassertiefe_ehq':'Profondeur d\'eau crue extrème','wg_timis_wassertiefe_hq100':'Profondeur d\'eau crue centennale','wg_timis_wassertiefe_hq50':'Profondeur d\'eau crue 50 ans','wg_timis_wassertiefe_hq10':'Profondeur d\'eau crue 10 ans','wg_timis_ueberflutungsflachen_ehq':'Zone inondable crue extrème','wg_timis_ueberflutungsflachen_hq100':'Zone inondable crue centennale','wg_timis_ueberflutungsflachen_hq50':'Zone inondable crue 50 ans','wg_timis_ueberflutungsflachen_hq10':'Zone inondable crue 10 ans','wg_uesg_sure_1995':'Zone inondable Sauer 1995','wg_uesg_alzette_1995':'Zone inondable Alzette 1995','wg_uesg_1993_(ausser_mosel)':'Zone inondable crue 1993 (hors Moselle)','wg_uesg_1983___mosel':'Zone inondable crue 1983 - Moselle','wg_exposition':'Exposition','wg_provisorische_trinkwasser_schutzzonen':'Zones de protection d\'eau potable provisoires','wg_abwasser_syndikate':'Syndicats de dépollution','wg_klaranlagen':'Stations d\'épuration','wg_hmwb_(stark_modifizierte_wasserkorper)':'MEFM (masses d\'eau fortement modifiées)','wg_betrachtungsraume':'Zones d\'étude','wg_provisorische_trinkwasser_schutzzonen':'Zones de protection d\'eau potable provisoires','wg_gewasserentwicklungsfahigkeit':'Capacité de développement des cours d\'eau','wg_relief':'Relief','Zoom to the max extent':'Voir tout le Luxembourg','permalink action':'Lien','print action':'Imprimer','Search':'Recherche','Catalog':'Catalogue','Layer Selection':'Sélection de couches','Warning screen resolution':"Avertissement résolution d'écran",'Your screen resolution is smaller than 1024x768 pixels. map.geo.admin.ch is not optmized for small screen resolution.':"Votre résolution d'écran est inférieure à 1024x768 pixels. map.geoportail.lu n'est pas optimisé pour de petites résolutions d'écran.",'Full map':'Carte plus grande','Geo search...':'Recherche lieu, commune, coordonnées...','show column':'Afficher le gestionaire des couches','hide column':'Faire disparaître le gestionnaire de couches','Map URL':'Collez le lien suivant dans un e-mail','URL':'URL ','Basisdaten':'Données de base','Referenzsysteme':'Système de référence','Geografische Namen':'Noms géographiques','Administrative Einheiten':'Unités administratives','Bodennutzung':'Usage des sols','Biologie':'Biologie','Versorgungswirtschaft und staatliche Dienste':'Services d\'utilité publique et services publics','Wasserrahmenrichtlinie':'Directive-cadre sur l\'eau','Adressen':'Adresses','addresses':'Adresses','Flurstücke / Grundstücke':'Données cadastrales','parcels':'Parcelles cadastrales','parcels_labels':'Parcelles cadastrales (Numéros)','toponymes':'Toponymes cadastraux','communes_cadastrales_labels':'Communes cadastrales (Noms)','sections_cadastrales_labels':'Sections cadastrales (Noms)','communes_cadastrales':'Communes cadastrales','sections_cadastrales':'Sections cadastrales','feuilles_cadastrales':'Feuilles cadastrales historiques','Oberflächendarstellung':'Couverture du sol','Gewässernetz':'Hydrographie','Höhe':'Altitude','Bodenbedeckung':'Occupation des terres','Luft und Satellitenbilder':'Images aériennes et satelites','Raum und Bevölkerung':'Territoire et population','Gesundheit une Sicherheit':'Santé et sécurité des personnes','Bevölkerungsdichte':'Répartition de la population','Raumplanung':'Aménagement et développement du territoire','Infrastrucktur une Kommunikation':'Infrastructure et communication','Verkehrsnetze':'Réseaux de transport','Gebäude':'Bâtiments','Öffentliche Einrichtungen und Dienste':'Services publics','Umwelt, Biologie und Geologie':'Environnement, biologie et géologie','Schutzgebiete':'Sites protégés','Geologie':'Géologie','Boden':'Sols','Umweltüberwachung':'Installations de suivi environnemental','Natürliche Risikozonen':'Zones à risque naturel','Atmosphärische Bedingungen':'Conditions atmosphériques','Meteorologie':'Météorologie','Biogeografische Regionen':'Régions biogéographiques','Lebensräume une Biotope':'Habitats et biotopes','Artenvielfalt':'Répartition des espèces','Mineralische Bodenschätze':'Ressources minérales','Energie und Wirtschaft':'Energie et économie','Statistische Einheiten':'Unités statistiques','Landnutzung':'Usage des sols','Produktions- und Industrieanlagen':'Lieux de production et sites industriels','Land- und Wassertwirtschaft':'Installations agricoles et aquacoles','Energiequellen':'Sources d\'énergie','show layer options':'Afficher les options de la couche','hide layer options':'Masquer les options de la couche','Opacity:':'Transparence  :','about that layer':'Informations sur la couche','move layer up':'Modifier l\'ordre des couches','move layer down':'Modifier l\'ordre des couches','remove layer':'Supprimer la couche','Feature tooltip':'Information sur l\'objet','Aerial Images':'Images aériennes','pixelmaps-color':'Carte topographique','pixelmaps-gray':'Cartes topographique N/B','voidLayer':'Fond blanc','aerial attribution':'Photo aérienne: ACT 2007','pixelmap-color attribution':'Carte nationale: ACT','pixelmap-gray attribution':'Carte nationale N/B: ACT','loadingText':"En cours de chargement...",'Search data...':'Recherche données...','Warning Internet Explorer 6':'Mise en garde Internet Explorer 6','You are using Internet Explorer 6.':'Vous utilisez Internet Explorer 6.','We recommend to upgrade to a newer release.':"Nous recommandons d'utiliser une version plus récente.",'You can add only 5 layers in the layer tree.':'Vous ne pouvez ajouter que 5 couches dans l\'arbre des couches.','Layer metadata':'Métadonnées','Layer legend':'Légende','legend_link_parcels':'http://wiki.geoportail.lu/doku.php?id=fr:legend:pcn:show&do=export_html#plan_cadastral_numerise_pcn_parcelles','metadata_link_parcels':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=de5373d6-340f-4203-a065-da7550a03cc4_2050','legend_link_buildings':'http://wiki.geoportail.lu/doku.php?id=fr:legend:pcn:show&do=export_html#plan_cadastral_numerise_pcn_-_batiments','metadata_link_buildings':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=5d0efc9d-a05a-4964-9f9d-a0ab9932af04','legend_link_toponymes':'http://wiki.geoportail.lu/doku.php?id=fr:legend:none&do=export_html','metadata_link_toponymes':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=ffa537f7-a438-47da-9e0c-8e32260646a9','legend_link_communes':'http://wiki.geoportail.lu/doku.php?id=fr:legend:none&do=export_html','metadata_link_communes':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=de5373d6-340f-4203-a065-da7550a03cc4_2049','legend_link_roads':'http://wiki.geoportail.lu/doku.php?id=fr:legend:road_network:show&do=export_html','metadata_link_roads':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=12627f90-f0f8-41b3-a56a-2e11a232ba59','legend_link_ortho_irc':'http://wiki.geoportail.lu/doku.php?id=fr:legend:none&do=export_html','metadata_link_ortho_irc':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=9848c7ac-0c12-430d-a05f-62dda9e234a0','legend_link_ortho_2004':'http://wiki.geoportail.lu/doku.php?id=fr:legend:none&do=export_html','metadata_link_ortho_2004':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=a185f78a-ca9c-43f8-8d06-b1abba8ff056','legend_link_ortho_2001':'http://wiki.geoportail.lu/doku.php?id=fr:legend:none&do=export_html','metadata_link_ortho_2001':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=e6ff269c-1c7c-401f-a90b-b805e80a046e','legend_link_natura2000':'http://wiki.geoportail.lu/doku.php?id=fr:legend:natura2000&do=export_html','metadata_link_natura2000':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=c56bb027-9552-471b-b574-7cf9085cdd32','legend_link_rivers':'http://wiki.geoportail.lu/doku.php?id=fr:legend:none&do=export_html','metadata_link_rivers':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=4ee7580f-3996-488b-9af3-629b3837a442','legend_link_geologie':'http://www.geoportal.lu/Portail/legendes/geo100k_raster_legende.pdf','metadata_link_geologie':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=b206d194-0067-4f09-a89e-af4a6673413d','legend_link_flood_risk':'http://wiki.geoportail.lu/doku.php?id=fr:legend:flood_risk&do=export_html','metadata_link_flood_risk':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=ba745f8e-662c-4c3f-ae41-850f24bb49d8','legend_link_communes':'http://wiki.geoportail.lu/doku.php?id=fr:legend:none&do=export_html','legend_link_cantons':'http://wiki.geoportail.lu/doku.php?id=fr:legend:none&do=export_html','legend_link_districts':'http://wiki.geoportail.lu/doku.php?id=fr:legend:none&do=export_html','legend_link_pays':'http://wiki.geoportail.lu/doku.php?id=fr:legend:none&do=export_html','legend_link_communes_cadastrales':'http://wiki.geoportail.lu/doku.php?id=fr:legend:none&do=export_html','legend_link_sections_cadastrales':'http://wiki.geoportail.lu/doku.php?id=fr:legend:none&do=export_html','legend_link_feuilles_cadastrales':'http://wiki.geoportail.lu/doku.php?id=fr:legend:none&do=export_html','metadata_link_feuilles_cadastrales':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=51333029-c8cf-490f-b4a6-80ba239f0cb4','legend_link_wg_relief_dhm_2m':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:relief_dhm_2m&do=export_html','metadata_link_wg_relief_dhm_2m':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_hohenlinien_10m':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:hohenlinien_10m&do=export_html','metadata_link_wg_hohenlinien_10m':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_ikonos_satellitendaten':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:ikonos_satellitendaten&do=export_html','metadata_link_wg_ikonos_satellitendaten':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_wasserspiegel':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:wasserspiegel&do=export_html','metadata_link_wg_wasserspiegel':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_grundwasser':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:grundwasser&do=export_html','metadata_link_wg_grundwasser':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_niederschlag':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:niederschlag&do=export_html','metadata_link_wg_niederschlag':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_landesgrenzen':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:landesgrenzen&do=export_html','metadata_link_wg_landesgrenzen':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_lufttemperatur':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:lufttemperatur&do=export_html','metadata_link_wg_lufttemperatur':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_schneehohe':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:schneehohe&do=export_html','metadata_link_wg_schneehohe':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_bodentemperatur':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:bodentemperatur&do=export_html','metadata_link_wg_bodentemperatur':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_einzugsgebiete':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:einzugsgebiete&do=export_html','metadata_link_wg_einzugsgebiete':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_feuchtgebiete':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:feuchtgebiete&do=export_html','metadata_link_wg_feuchtgebiete':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_naturliche_(bassin)':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:naturliche_(bassin)&do=export_html','metadata_link_wg_naturliche_(bassin)':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_kunstliche_(bassin)':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:kunstliche_(bassin)&do=export_html','metadata_link_wg_kunstliche_(bassin)':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_stausee_sauer':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:stausee_sauer&do=export_html','metadata_link_wg_stausee_sauer':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_kilometrierung_nebengewasser':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:kilometrierung_nebengewasser&do=export_html','metadata_link_wg_kilometrierung_nebengewasser':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_kilometrierung_hauptgewasser':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:kilometrierung_hauptgewasser&do=export_html','metadata_link_wg_kilometrierung_hauptgewasser':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_kanal__muhlgraben':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:kanal__muhlgraben&do=export_html','metadata_link_wg_kanal__muhlgraben':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_nebengewasser':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:nebengewasser&do=export_html','metadata_link_wg_nebengewasser':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_hauptgewasser':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:hauptgewasser&do=export_html','metadata_link_wg_hauptgewasser':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_durchgangigkeit':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:durchgangigkeit&do=export_html','metadata_link_wg_durchgangigkeit':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_fischereiabschnitte':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:fischereiabschnitte&do=export_html','metadata_link_wg_fischereiabschnitte':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_versiegelungsklassen':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:versiegelungsklassen&do=export_html','metadata_link_wg_versiegelungsklassen':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_einschrankung_warmepumpe':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:einschrankung_warmepumpe&do=export_html','metadata_link_wg_einschrankung_warmepumpe':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_grundwasserleiter':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:grundwasserleiter&do=export_html','metadata_link_wg_grundwasserleiter':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_bohrungen':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:bohrungen&do=export_html','metadata_link_wg_bohrungen':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_quellen':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:quellen&do=export_html','metadata_link_wg_quellen':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_nitratbelastung':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:nitratbelastung&do=export_html','metadata_link_wg_nitratbelastung':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_provisorische_trinkwasser_schutzzonen':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:provisorische_trinkwasser_schutzzonen&do=export_html','metadata_link_wg_provisorische_trinkwasser_schutzzonen':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_trinkwasserbehalter':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:trinkwasserbehalter&do=export_html','metadata_link_wg_trinkwasserbehalter':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_landnutzung':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:landnutzung&do=export_html','metadata_link_wg_landnutzung':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_trinkwassersyndikate':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:trinkwassersyndikate&do=export_html','metadata_link_wg_trinkwassersyndikate':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_pumpstationen':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:pumpstationen&do=export_html','metadata_link_wg_pumpstationen':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_kontrollpunkte':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:kontrollpunkte&do=export_html','metadata_link_wg_kontrollpunkte':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_trinkwasserentnahmepunkte':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:trinkwasserentnahmepunkte&do=export_html','metadata_link_wg_trinkwasserentnahmepunkte':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_gefahrenklassen':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:gefahrenklassen&do=export_html','metadata_link_wg_gefahrenklassen':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_querprofile':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:querprofile&do=export_html','metadata_link_wg_querprofile':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_bauwerke':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:bauwerke&do=export_html','metadata_link_wg_bauwerke':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_intensitaet_hq_extrem':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:intensitaet_hq_extrem&do=export_html','metadata_link_wg_intensitaet_hq_extrem':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_intensitaet_hq_200':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:intensitaet_hq_200&do=export_html','metadata_link_wg_intensitaet_hq_200':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_intensitaet_hq_100':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:intensitaet_hq_100&do=export_html','metadata_link_wg_intensitaet_hq_100':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_intensitaet_hq_50':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:intensitaet_hq_50&do=export_html','metadata_link_wg_intensitaet_hq_50':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_wassertiefe_hq_extrem':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:wassertiefe_hq_extrem&do=export_html','metadata_link_wg_wassertiefe_hq_extrem':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_wassertiefe_hq_200':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:wassertiefe_hq_200&do=export_html','metadata_link_wg_wassertiefe_hq_200':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_wassertiefe_hq_100':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:wassertiefe_hq_100&do=export_html','metadata_link_wg_wassertiefe_hq_100':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_wassertiefe_hq_50':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:wassertiefe_hq_50&do=export_html','metadata_link_wg_wassertiefe_hq_50':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_hangneigung_':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:hangneigung_&do=export_html','metadata_link_wg_hangneigung_':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_uesg_extrem':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:uesg_extrem&do=export_html','metadata_link_wg_uesg_extrem':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_uesg_200_jaehrlich':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:uesg_200_jaehrlich&do=export_html','metadata_link_wg_uesg_200_jaehrlich':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_uesg_100_jaehrlich':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:uesg_100_jaehrlich&do=export_html','metadata_link_wg_uesg_100_jaehrlich':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_uesg_50_jaehrlich':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:uesg_50_jaehrlich&do=export_html','metadata_link_wg_uesg_50_jaehrlich':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_uesg_sure_1995':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:uesg_sure_1995&do=export_html','metadata_link_wg_uesg_sure_1995':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_uesg_alzette_1995':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:uesg_alzette_1995&do=export_html','metadata_link_wg_uesg_alzette_1995':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_uesg_1993_(ausser_mosel)':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:uesg_1993_(ausser_mosel)&do=export_html','metadata_link_wg_uesg_1993_(ausser_mosel)':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_uesg_1983___mosel':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:uesg_1983___mosel&do=export_html','metadata_link_wg_uesg_1983___mosel':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_exposition':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:exposition&do=export_html','metadata_link_wg_exposition':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_provisorische_trinkwasser_schutzzonen':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:provisorische_trinkwasser_schutzzonen&do=export_html','metadata_link_wg_provisorische_trinkwasser_schutzzonen':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_abwasser_syndikate':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:abwasser_syndikate&do=export_html','metadata_link_wg_abwasser_syndikate':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_klaranlagen':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:klaranlagen&do=export_html','metadata_link_wg_klaranlagen':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_hmwb_(stark_modifizierte_wasserkorper)':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:hmwb_(stark_modifizierte_wasserkorper)&do=export_html','metadata_link_wg_hmwb_(stark_modifizierte_wasserkorper)':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_betrachtungsraume':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:betrachtungsraume&do=export_html','metadata_link_wg_betrachtungsraume':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_provisorische_trinkwasser_schutzzonen':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:provisorische_trinkwasser_schutzzonen&do=export_html','metadata_link_wg_provisorische_trinkwasser_schutzzonen':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_gewasserentwicklungsfahigkeit':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:gewasserentwicklungsfahigkeit&do=export_html','metadata_link_wg_gewasserentwicklungsfahigkeit':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_relief':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:relief&do=export_html','metadata_link_wg_relief':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_timis_hochwasser_gefahrdungen':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg:_timis_hochwasser_gefahrdungen&do=export_html','legend_link_wg_timis_hochwasser_intensitaten_ehq':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg_timis_hochwasser_intensitaten&do=export_html','legend_link_wg_timis_hochwasser_intensitaten_hq10':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg_timis_hochwasser_intensitaten&do=export_html','legend_link_wg_timis_hochwasser_intensitaten_hq100':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg_timis_hochwasser_intensitaten&do=export_html','legend_link_wg_timis_hochwasser_intensitaten_hq50':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg_timis_hochwasser_intensitaten&do=export_html','legend_link_wg_timis_ueberflutungsflachen_ehq':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg_timis_ueberflutungsflachen&do=export_html','legend_link_wg_timis_ueberflutungsflachen_hq10':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg_timis_ueberflutungsflachen&do=export_html','legend_link_wg_timis_ueberflutungsflachen_hq100':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg_timis_ueberflutungsflachen&do=export_html','legend_link_wg_timis_ueberflutungsflachen_hq50':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg_timis_ueberflutungsflachen&do=export_html','legend_link_wg_timis_wassertiefe_ehq':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg_timis_wassertiefe&do=export_html','legend_link_wg_timis_wassertiefe_hq10':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg_timis_wassertiefe&do=export_html','legend_link_wg_timis_wassertiefe_hq100':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg_timis_wassertiefe&do=export_html','legend_link_wg_timis_wassertiefe_hq50':'http://wiki.geoportail.lu/doku.php?id=fr:legend:wg_timis_wassertiefe&do=export_html','metadata_link_wg_timis_hochwasser_gefahrdungen':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_hochwasser_intensitaten_ehq':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_hochwasser_intensitaten_hq10':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_hochwasser_intensitaten_hq100':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_hochwasser_intensitaten_hq50':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_ueberflutungsflachen_ehq':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_ueberflutungsflachen_hq10':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_ueberflutungsflachen_hq100':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_ueberflutungsflachen_hq50':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_wassertiefe_ehq':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_wassertiefe_hq10':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_wassertiefe_hq100':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_wassertiefe_hq50':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_topo_5k':'http://wiki.geoportail.lu/doku.php?id=fr:legend:none&do=export_html','metadata_link_topo_5k':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=270_2012','legend_link_topo_20k':'http://wiki.geoportail.lu/doku.php?id=fr:legend:none&do=export_html','metadata_link_topo_20k':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=9fb01381-698c-4e5f-950e-6c4793e0a7fd','legend_link_topo_50k':'http://wiki.geoportail.lu/doku.php?id=fr:legend:none&do=export_html','metadata_link_topo_50k':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=262','legend_link_topo_100k':'http://wiki.geoportail.lu/doku.php?id=fr:legend:none&do=export_html','metadata_link_topo_100k':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=266','legend_link_topo_250k':'http://wiki.geoportail.lu/doku.php?id=fr:legend:none&do=export_html','metadata_link_topo_250k':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=e1f601a5-ed8f-4043-8719-0cad50cbb483','legend_link_1907_CAHANSEN':'http://wiki.geoportail.lu/doku.php?id=fr:legend:none&do=export_html','metadata_link_1907_CAHANSEN':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=b88e6524-67d3-4e34-b998-6f30120e3718','legend_link_1927_CAHANSEN':'http://wiki.geoportail.lu/doku.php?id=fr:legend:none&do=export_html','metadata_link_1927_CAHANSEN':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=90750f9f-856d-41ac-a90f-a8befbd75434','legend_link_TOPO25K1954C24':'http://wiki.geoportail.lu/doku.php?id=fr:legend:none&do=export_html','metadata_link_TOPO25K1954C24':'http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=7a8bc9a4-e7c7-4584-bc4f-03deaf7b69b2','legend_link_parcels_labels':'http://wiki.geoportail.lu/doku.php?id=fr:legend:none&do=export_html','legend_link_addresses':'http://wiki.geoportail.lu/doku.php?id=fr:legend:none&do=export_html','legend_link_topo':'http://wiki.geoportail.lu/doku.php?id=fr:legend:none&do=export_html','legend_link_bdcarto_100k':'http://wiki.geoportail.lu/doku.php?id=fr:legend:none&do=export_html','legend_link_ortho':'http://wiki.geoportail.lu/doku.php?id=fr:legend:none&do=export_html','legend_link_country':'http://wiki.geoportail.lu/doku.php?id=fr:legend:none&do=export_html','legend_link_communes_labels':'http://wiki.geoportail.lu/doku.php?id=fr:legend:none&do=export_html','legend_link_cantons_labels':'http://wiki.geoportail.lu/doku.php?id=fr:legend:none&do=export_html','legend_link_districts_labels':'http://wiki.geoportail.lu/doku.php?id=fr:legend:none&do=export_html','legend_link_communes_cadastrales_labels':'http://wiki.geoportail.lu/doku.php?id=fr:legend:none&do=export_html','legend_link_sections_cadastrales_labels':'http://wiki.geoportail.lu/doku.php?id=fr:legend:none&do=export_html','legend_link_roads_labels':'http://wiki.geoportail.lu/doku.php?id=fr:legend:none&do=export_html','legend_link_topo_decoupage_r':'http://wiki.geoportail.lu/doku.php?id=fr:legend:none&do=export_html','Position':'','redlining action':'Dessin','redlining':'Dessin','style':'Style','name':'Label','Close':'Fermer','Delete feature':'Supprimer','Attributes':'Attributs','Create point':'Créer point','Create line':'Créer ligne','Create polygon':'Créer polygone','Create label':'Créer étiquette','Edit Feature':'Editer','Delete all features':'Supprimer tous les objets','Do you really want to delete this feature ?':'Voulez-vous vraiment supprimer cet objet ?','Do you really want to delete all features ?':'Voulez-vous vraiment supprimer tous les objets ?','arial 12':'Arial 12','arial 16':'Arial 16','arial 24':'Arial 24','red':'Rouge','red 2':'Rouge 2','yellow':'Jaune','yellow 2':'Jaune 2'});OpenLayers.Util.extend(OpenLayers.Lang.de,{'Coordinates: ':'Koordinaten : ','Print':'Drucken','Measure':'Messen','Pan':'Karte verschieben','Full extent':'Übersichtskarte','Distance measurement (double-click to terminate)':'Entfernungmessgeräte (Doppelklick zum beenden)','Area measurement (double-click to terminate)':'Flächenmessgeräte (Doppelklick zum beenden)','zoomin':'Hineinzoomen','zoomout':'Herauszoomen','Next view':'Vorwärts','Previous view':'Rückwärts','next':'Vorwärts','previous':'Rückwärts','Save context':'Context speichern','a_A4_landscape':'A4 Quer','b_A4_portrait':'A4 Hoch','c_A3_landscape':'A3 Quer','d_A3_portrait':'A3 Hoch','Gebiete mit naturbedingten Risiken':'Gebiete mit naturbedingten Risiken','flood_risk':'Hochwasserrisiken','natura2000':'Natura 2000','rivers':'Flussläufe','cantons_labels':'Kantone (Namen)','districts_labels':'Bezirke (Namen)','Cities_labels':'Gemeinden (Namen)','cantons':'Kantone','districts':'Bezirke','Cities':'Gemeinden','roads':'Straßennetz','roads_labels':'Straßennamen','ortho_irc':'Orthophoto 2007 (infrarot)','ortho':'Orthophoto 2007','ortho_2001':'Orthophoto 2001','ortho_2004':'Orthophoto 2004','1907_CAHANSEN':'Topographische Karte 1907','1927_CAHANSEN':'Topographische Karte 1927','TOPO25K1954C24':'Topographische Karte 1954','topo':'Automatische topographische Karte','topo_5k':'Topographische Karte 1:5000','topo_20k':'Topographische Karte 1:20000','topo_decoupage_r':'Blattschnitt Regionale Karte','topo_50k':'Topographische Karte 1:50000','topo_100k':'Topographische Karte 1:100000','bdcarto_100k':'Topographische Karte 1:100000 (BDCARTO)','topo_250k':'Topographische Karte 1:250000','Topographische Karten':'Topographische Karten','wg_relief_dhm_2m':'Relief DHM 2m','wg_hohenlinien_10m':'Höhenlinien 10m','wg_ikonos_satellitendaten':'Ikonos Satellitendaten','wg_wasserspiegel':'Wasserspiegel','wg_grundwasser':'Grundwasser','wg_niederschlag':'Niederschlag','wg_landesgrenzen':'Landesgrenzen','country':'Landesgrenzen','wg_lufttemperatur':'Lufttemperatur','wg_schneehohe':'Schneehöhe','wg_bodentemperatur':'Bodentemperatur','wg_einzugsgebiete':'Einzugsgebiete','wg_feuchtgebiete':'Feuchtgebiete','wg_naturliche_(bassin)':'Natürliche (Bassin)','wg_kunstliche_(bassin)':'Künstliche (Bassin)','wg_stausee_sauer':'Stausee Sauer','wg_kilometrierung_nebengewasser':'Kilometrierung Nebengewässer','wg_kilometrierung_hauptgewasser':'Kilometrierung Hauptgewässer','wg_kanal__muhlgraben':'Kanal, Mühlgraben','wg_nebengewasser':'Nebengewässer','wg_hauptgewasser':'Hauptgewässer','wg_durchgangigkeit':'Durchgängigkeit','wg_fischereiabschnitte':'Fischereiabschnitte','wg_versiegelungsklassen':'Versiegelungsklassen','wg_einschrankung_warmepumpe':'Einschränkung Wärmepumpe','wg_grundwasserleiter':'Grundwasserleiter','wg_bohrungen':'Bohrungen','wg_quellen':'Quellen','wg_nitratbelastung':'Nitratbelastung','wg_provisorische_trinkwasser_schutzzonen':'Provisorische Trinkwasser-Schutzzonen','wg_trinkwasserbehalter':'Trinkwasserbehälter','wg_landnutzung':'Landnutzung','wg_trinkwassersyndikate':'Trinkwassersyndikate','wg_pumpstationen':'Pumpstationen','wg_kontrollpunkte':'Kontrollpunkte','wg_trinkwasserentnahmepunkte':'Trinkwasserentnahmepunkte','wg_gefahrenklassen':'Gefahrenklassen','wg_querprofile':'Querprofile','wg_bauwerke':'Bauwerke','wg_intensitaet_hq_extrem':'Intensitaet HQ extrem','wg_intensitaet_hq_200':'Intensitaet HQ 200','wg_intensitaet_hq_100':'Intensitaet HQ 100','wg_intensitaet_hq_50':'Intensitaet HQ 50','wg_wassertiefe_hq_extrem':'Wassertiefe HQ Extrem','wg_wassertiefe_hq_200':'Wassertiefe HQ 200','wg_wassertiefe_hq_100':'Wassertiefe HQ 100','wg_wassertiefe_hq_50':'Wassertiefe HQ 50','wg_hangneigung_':'Hangneigung °','wg_uesg_extrem':'UESG extrem','wg_uesg_200_jaehrlich':'UESG 200-jaehrlich','wg_uesg_100_jaehrlich':'UESG 100-jaehrlich','wg_uesg_50_jaehrlich':'UESG 50-jaehrlich','wg_timis_hochwasser_gefahrdungen':'Hochwasser-Gefährdungen','wg_timis_hochwasser_intensitaten_ehq':'Hochwasser-Intensitäten-EHQ','wg_timis_hochwasser_intensitaten_hq100':'Hochwasser-Intensitäten-HQ100','wg_timis_hochwasser_intensitaten_hq50':'Hochwasser-Intensitäten-HQ50','wg_timis_hochwasser_intensitaten_hq10':'Hochwasser-Intensitäten-HQ10','wg_timis_wassertiefe_ehq':'Wassertiefe-EHQ','wg_timis_wassertiefe_hq100':'Wassertiefe-HQ100','wg_timis_wassertiefe_hq50':'Wassertiefe-HQ50','wg_timis_wassertiefe_hq10':'Wassertiefe-HQ10','wg_timis_ueberflutungsflachen_ehq':'Ueberflutungsflächen-EHQ','wg_timis_ueberflutungsflachen_hq100':'Ueberflutungsflächen-HQ100','wg_timis_ueberflutungsflachen_hq50':'Ueberflutungsflächen-HQ50','wg_timis_ueberflutungsflachen_hq10':'Ueberflutungsflächen-HQ10','wg_uesg_sure_1995':'UESG Sure 1995','wg_uesg_alzette_1995':'UESG Alzette 1995','wg_uesg_1993_(ausser_mosel)':'UESG 1993 (ausser Mosel)','wg_uesg_1983___mosel':'UESG 1983 - Mosel','wg_exposition':'Exposition','wg_provisorische_trinkwasser_schutzzonen':'Provisorische Trinkwasser-Schutzzonen','wg_abwasser_syndikate':'Abwasser-Syndikate','wg_klaranlagen':'Kläranlagen','wg_hmwb_(stark_modifizierte_wasserkorper)':'HMWB (stark modifizierte Wasserkörper)','wg_betrachtungsraume':'Betrachtungsräume','wg_provisorische_trinkwasser_schutzzonen':'Provisorische Trinkwasser-Schutzzonen','wg_gewasserentwicklungsfahigkeit':'Gewässerentwicklungsfähigkeit','wg_relief':'Relief','Zoom to the max extent':'Ganz Luxemburg','permalink action':'Link','print action':'Drucken','Search':'Suche','Catalog':'Katalog','Layer Selection':'Auswahl','Warning screen resolution':'Warnung Bildschirmauflösung','Ihre Bildschirmauflösung ist kleiner als 1024x768 pixels. map.geo.admin.ch is not optmized for small screen resolution.':'Your screen resolution is smaller than 1024x768 pixels. map.geoportail.lu ist nicht für kleine Bildschirmauflösung optimiert.','Full map':'Grössere Karte','Geo search...':'Suche Ort, Gemeinde, Koordinaten ...','show column':'Themen öffnen','hide column':'Ausblenden der Themen','Map URL':'Untenstehenden Link in e-mail einbinden','URL':'URL','Basisdaten':'Basisdaten','Referenzsysteme':'Referenzsysteme','Geografische Namen':'Geografische Namen','Administrative Einheiten':'Verwaltungseinheiten','Bodennutzung':'Bodennutzung','Biologie':'Biologie','Versorgungswirtschaft und staatliche Dienste':'Versorgungswirtschaft und staatliche Dienste','Wasserrahmenrichtlinie':'Wasserrahmenrichtlinie','Adressen':'Adressen','addresses':'Adressen','Flurstücke / Grundstücke':'Katasterdaten','parcels':'Katasterparzellen','parcels_labels':'Katasterparzellen (Nummern)','toponymes':'Katasterflurnamen','communes_cadastrales_labels':'Katastergemeinden (Namen)','sections_cadastrales_labels':'Katastersektionen (Namen)','communes_cadastrales':'Katastergemeinden','sections_cadastrales':'Katastersektionen','feuilles_cadastrales':'Kataster - Urpläne','Oberflächendarstellung':'Oberflächendarstellung','Gewässernetz':'Gewässernetz','Höhe':'Höhe','Bodenbedeckung':'Bodenbedeckung','Luft und Satellitenbilder':'Luft und Satellitenbilder','Raum und Bevölkerung':'Raum und Bevölkerung','Gesundheit une Sicherheit':'Gesundheit und Sicherheit','Bevölkerungsdichte':'Bevölkerungsverteilung','Raumplanung':'Raumplanung und -entwicklung','Infrastrucktur une Kommunikation':'Infrastruktur und Kommunikation','Verkehrsnetze':'Verkehrsnetze','Gebäude':'Gebäude','Öffentliche Einrichtungen und Dienste':'Öffentliche Einrichtungen','Umwelt, Biologie und Geologie':'Umwelt, Biologie und Geologie','Schutzgebiete':'Schutzgebiete','Geologie':'Geologie','Boden':'Boden','Umweltüberwachung':'Umweltüberwachung','Natürliche Risikozonen':'Natürliche Risikozonen','Atmosphärische Bedingungen':'Atmosphärische Bedingungen','Meteorologie':'Meteorologie','Biogeografische Regionen':'Biogeografische Regionen','Lebensräume une Biotope':'Lebensräume und Biotope','Artenvielfalt':'Artenvielfalt','Mineralische Bodenschätze':'Mineralische Bodenschätze','Energie und Wirtschaft':'Energie und Wirtschaft','Statistische Einheiten':'Statistische Einheiten','Landnutzung':'Landnutzung','Produktions- und Industrieanlagen':'Produktions- und Industrieanlagen','Land- und Wassertwirtschaft':'Land- und Wassertwirtschaft','Energiequellen':'Energiequellen','show layer options':'Layeroptionen anzeigen','hide layer options':'Layeroptionen ausblenden','Opacity:':'Transparenz','about that layer':'Informationen zu diesem Datensatz','move layer up':'Layer-Reihenfolge ändern','move layer down':'Layer-Reihenfolge ändern','remove layer':'entfernen des Datensatzes','Feature tooltip':'Objektinformation','Aerial Images':'Luftbild','pixelmaps-color':'Topographische Karte','pixelmaps-gray':'Topographische Karte SW','voidLayer':'Kein Hintergrund','aerial attribution':'Luftbild: ACT 2007','pixelmap-color attribution':'Topographische Karte: ACT','pixelmap-gray attribution':'Topographische Karte S&W: ACT','loadingText':"Lade Daten ...",'Search data...':'Daten suchen...','Warning Internet Explorer 6':'Warnung Internet Explorer 6','You are using Internet Explorer 6.':'Sie benutzen Internet Explorer 6.','We recommend to upgrade to a newer release.':'Wir empfehlen einr neuerr Version zu benutzen.','You can add only 5 layers in the layer tree.':'Sie können nur 5 Layer anzeigen.','Layer metadata':'','Layer legend':'','legend_link_parcels':'http://wiki.geoportail.lu/doku.php?id=de:legend:pcn:show&do=export_html#plan_cadastral_numerise_pcn_parcelles','metadata_link_parcels':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=de5373d6-340f-4203-a065-da7550a03cc4_2050','legend_link_buildings':'http://wiki.geoportail.lu/doku.php?id=de:legend:pcn:show&do=export_html#plan_cadastral_numerise_pcn_-_batiments','metadata_link_buildings':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=5d0efc9d-a05a-4964-9f9d-a0ab9932af04','legend_link_toponymes':'http://wiki.geoportail.lu/doku.php?id=de:legend:none&do=export_html','metadata_link_toponymes':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=ffa537f7-a438-47da-9e0c-8e32260646a9','legend_link_communes':'http://wiki.geoportail.lu/doku.php?id=de:legend:none&do=export_html','metadata_link_communes':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=de5373d6-340f-4203-a065-da7550a03cc4_2049','legend_link_ortho_irc':'http://wiki.geoportail.lu/doku.php?id=de:legend:none&do=export_html','metadata_link_ortho_irc':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=9848c7ac-0c12-430d-a05f-62dda9e234a0','legend_link_ortho_2004':'http://wiki.geoportail.lu/doku.php?id=de:legend:none&do=export_html','metadata_link_ortho_2004':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=a185f78a-ca9c-43f8-8d06-b1abba8ff056','legend_link_ortho_2001':'http://wiki.geoportail.lu/doku.php?id=de:legend:none&do=export_html','metadata_link_ortho_2001':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=e6ff269c-1c7c-401f-a90b-b805e80a046e','legend_link_roads':'http://wiki.geoportail.lu/doku.php?id=de:legend:road_network:show&do=export_html','metadata_link_roads':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=12627f90-f0f8-41b3-a56a-2e11a232ba59','legend_link_natura2000':'http://wiki.geoportail.lu/doku.php?id=de:legend:natura2000&do=export_html','metadata_link_natura2000':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=c56bb027-9552-471b-b574-7cf9085cdd32','legend_link_rivers':'http://wiki.geoportail.lu/doku.php?id=de:legend:none&do=export_html','metadata_link_rivers':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=4ee7580f-3996-488b-9af3-629b3837a442','legend_link_geologie':'http://www.geoportal.lu/Portail/legendes/geo100k_raster_legende.pdf','metadata_link_geologie':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=b206d194-0067-4f09-a89e-af4a6673413d','legend_link_flood_risk':'http://wiki.geoportail.lu/doku.php?id=de:legend:flood_risk&do=export_html','metadata_link_flood_risk':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=ba745f8e-662c-4c3f-ae41-850f24bb49d8','legend_link_communes':'http://wiki.geoportail.lu/doku.php?id=de:legend:none&do=export_html','legend_link_cantons':'http://wiki.geoportail.lu/doku.php?id=de:legend:none&do=export_html','legend_link_districts':'http://wiki.geoportail.lu/doku.php?id=de:legend:none&do=export_html','legend_link_pays':'http://wiki.geoportail.lu/doku.php?id=de:legend:none&do=export_html','legend_link_communes_cadastrales':'http://wiki.geoportail.lu/doku.php?id=de:legend:none&do=export_html','legend_link_sections_cadastrales':'http://wiki.geoportail.lu/doku.php?id=de:legend:none&do=export_html','legend_link_feuilles_cadastrales':'http://wiki.geoportail.lu/doku.php?id=de:legend:none&do=export_html','metadata_link_feuilles_cadastrales':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=51333029-c8cf-490f-b4a6-80ba239f0cb4','legend_link_wg_relief_dhm_2m':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:relief_dhm_2m&do=export_html','metadata_link_wg_relief_dhm_2m':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_hohenlinien_10m':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:hohenlinien_10m&do=export_html','metadata_link_wg_hohenlinien_10m':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_ikonos_satellitendaten':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:ikonos_satellitendaten&do=export_html','metadata_link_wg_ikonos_satellitendaten':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_wasserspiegel':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:wasserspiegel&do=export_html','metadata_link_wg_wasserspiegel':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_grundwasser':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:grundwasser&do=export_html','metadata_link_wg_grundwasser':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_niederschlag':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:niederschlag&do=export_html','metadata_link_wg_niederschlag':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_landesgrenzen':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:landesgrenzen&do=export_html','metadata_link_wg_landesgrenzen':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_lufttemperatur':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:lufttemperatur&do=export_html','metadata_link_wg_lufttemperatur':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_schneehohe':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:schneehohe&do=export_html','metadata_link_wg_schneehohe':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_bodentemperatur':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:bodentemperatur&do=export_html','metadata_link_wg_bodentemperatur':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_einzugsgebiete':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:einzugsgebiete&do=export_html','metadata_link_wg_einzugsgebiete':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_feuchtgebiete':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:feuchtgebiete&do=export_html','metadata_link_wg_feuchtgebiete':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_naturliche_(bassin)':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:naturliche_(bassin)&do=export_html','metadata_link_wg_naturliche_(bassin)':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_kunstliche_(bassin)':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:kunstliche_(bassin)&do=export_html','metadata_link_wg_kunstliche_(bassin)':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_stausee_sauer':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:stausee_sauer&do=export_html','metadata_link_wg_stausee_sauer':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_kilometrierung_nebengewasser':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:kilometrierung_nebengewasser&do=export_html','metadata_link_wg_kilometrierung_nebengewasser':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_kilometrierung_hauptgewasser':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:kilometrierung_hauptgewasser&do=export_html','metadata_link_wg_kilometrierung_hauptgewasser':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_kanal__muhlgraben':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:kanal__muhlgraben&do=export_html','metadata_link_wg_kanal__muhlgraben':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_nebengewasser':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:nebengewasser&do=export_html','metadata_link_wg_nebengewasser':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_hauptgewasser':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:hauptgewasser&do=export_html','metadata_link_wg_hauptgewasser':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_durchgangigkeit':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:durchgangigkeit&do=export_html','metadata_link_wg_durchgangigkeit':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_fischereiabschnitte':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:fischereiabschnitte&do=export_html','metadata_link_wg_fischereiabschnitte':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_versiegelungsklassen':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:versiegelungsklassen&do=export_html','metadata_link_wg_versiegelungsklassen':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_einschrankung_warmepumpe':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:einschrankung_warmepumpe&do=export_html','metadata_link_wg_einschrankung_warmepumpe':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_grundwasserleiter':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:grundwasserleiter&do=export_html','metadata_link_wg_grundwasserleiter':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_bohrungen':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:bohrungen&do=export_html','metadata_link_wg_bohrungen':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_quellen':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:quellen&do=export_html','metadata_link_wg_quellen':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_nitratbelastung':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:nitratbelastung&do=export_html','metadata_link_wg_nitratbelastung':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_provisorische_trinkwasser_schutzzonen':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:provisorische_trinkwasser_schutzzonen&do=export_html','metadata_link_wg_provisorische_trinkwasser_schutzzonen':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_trinkwasserbehalter':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:trinkwasserbehalter&do=export_html','metadata_link_wg_trinkwasserbehalter':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_landnutzung':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:landnutzung&do=export_html','metadata_link_wg_landnutzung':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_trinkwassersyndikate':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:trinkwassersyndikate&do=export_html','metadata_link_wg_trinkwassersyndikate':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_pumpstationen':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:pumpstationen&do=export_html','metadata_link_wg_pumpstationen':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_kontrollpunkte':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:kontrollpunkte&do=export_html','metadata_link_wg_kontrollpunkte':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_trinkwasserentnahmepunkte':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:trinkwasserentnahmepunkte&do=export_html','metadata_link_wg_trinkwasserentnahmepunkte':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_gefahrenklassen':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:gefahrenklassen&do=export_html','metadata_link_wg_gefahrenklassen':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_querprofile':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:querprofile&do=export_html','metadata_link_wg_querprofile':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_bauwerke':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:bauwerke&do=export_html','metadata_link_wg_bauwerke':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_intensitaet_hq_extrem':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:intensitaet_hq_extrem&do=export_html','metadata_link_wg_intensitaet_hq_extrem':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_intensitaet_hq_200':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:intensitaet_hq_200&do=export_html','metadata_link_wg_intensitaet_hq_200':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_intensitaet_hq_100':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:intensitaet_hq_100&do=export_html','metadata_link_wg_intensitaet_hq_100':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_intensitaet_hq_50':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:intensitaet_hq_50&do=export_html','metadata_link_wg_intensitaet_hq_50':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_wassertiefe_hq_extrem':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:wassertiefe_hq_extrem&do=export_html','metadata_link_wg_wassertiefe_hq_extrem':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_wassertiefe_hq_200':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:wassertiefe_hq_200&do=export_html','metadata_link_wg_wassertiefe_hq_200':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_wassertiefe_hq_100':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:wassertiefe_hq_100&do=export_html','metadata_link_wg_wassertiefe_hq_100':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_wassertiefe_hq_50':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:wassertiefe_hq_50&do=export_html','metadata_link_wg_wassertiefe_hq_50':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_hangneigung_':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:hangneigung_&do=export_html','metadata_link_wg_hangneigung_':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_uesg_extrem':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:uesg_extrem&do=export_html','metadata_link_wg_uesg_extrem':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_uesg_200_jaehrlich':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:uesg_200_jaehrlich&do=export_html','metadata_link_wg_uesg_200_jaehrlich':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_uesg_100_jaehrlich':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:uesg_100_jaehrlich&do=export_html','metadata_link_wg_uesg_100_jaehrlich':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_uesg_50_jaehrlich':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:uesg_50_jaehrlich&do=export_html','metadata_link_wg_uesg_50_jaehrlich':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_uesg_sure_1995':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:uesg_sure_1995&do=export_html','metadata_link_wg_uesg_sure_1995':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_uesg_alzette_1995':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:uesg_alzette_1995&do=export_html','metadata_link_wg_uesg_alzette_1995':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_uesg_1993_(ausser_mosel)':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:uesg_1993_(ausser_mosel)&do=export_html','metadata_link_wg_uesg_1993_(ausser_mosel)':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_uesg_1983___mosel':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:uesg_1983___mosel&do=export_html','metadata_link_wg_uesg_1983___mosel':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_exposition':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:exposition&do=export_html','metadata_link_wg_exposition':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_provisorische_trinkwasser_schutzzonen':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:provisorische_trinkwasser_schutzzonen&do=export_html','metadata_link_wg_provisorische_trinkwasser_schutzzonen':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_abwasser_syndikate':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:abwasser_syndikate&do=export_html','metadata_link_wg_abwasser_syndikate':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_klaranlagen':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:klaranlagen&do=export_html','metadata_link_wg_klaranlagen':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_hmwb_(stark_modifizierte_wasserkorper)':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:hmwb_(stark_modifizierte_wasserkorper)&do=export_html','metadata_link_wg_hmwb_(stark_modifizierte_wasserkorper)':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_betrachtungsraume':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:betrachtungsraume&do=export_html','metadata_link_wg_betrachtungsraume':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_provisorische_trinkwasser_schutzzonen':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:provisorische_trinkwasser_schutzzonen&do=export_html','metadata_link_wg_provisorische_trinkwasser_schutzzonen':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_gewasserentwicklungsfahigkeit':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:gewasserentwicklungsfahigkeit&do=export_html','metadata_link_wg_gewasserentwicklungsfahigkeit':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_relief':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:relief&do=export_html','metadata_link_wg_relief':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_timis_hochwasser_gefahrdungen':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg:_timis_hochwasser_gefahrdungen&do=export_html','legend_link_wg_timis_hochwasser_intensitaten_ehq':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg_timis_hochwasser_intensitaten&do=export_html','legend_link_wg_timis_hochwasser_intensitaten_hq10':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg_timis_hochwasser_intensitaten&do=export_html','legend_link_wg_timis_hochwasser_intensitaten_hq100':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg_timis_hochwasser_intensitaten&do=export_html','legend_link_wg_timis_hochwasser_intensitaten_hq50':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg_timis_hochwasser_intensitaten&do=export_html','legend_link_wg_timis_ueberflutungsflachen_ehq':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg_timis_ueberflutungsflachen&do=export_html','legend_link_wg_timis_ueberflutungsflachen_hq10':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg_timis_ueberflutungsflachen&do=export_html','legend_link_wg_timis_ueberflutungsflachen_hq100':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg_timis_ueberflutungsflachen&do=export_html','legend_link_wg_timis_ueberflutungsflachen_hq50':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg_timis_ueberflutungsflachen&do=export_html','legend_link_wg_timis_wassertiefe_ehq':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg_timis_wassertiefe&do=export_html','legend_link_wg_timis_wassertiefe_hq10':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg_timis_wassertiefe&do=export_html','legend_link_wg_timis_wassertiefe_hq100':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg_timis_wassertiefe&do=export_html','legend_link_wg_timis_wassertiefe_hq50':'http://wiki.geoportail.lu/doku.php?id=de:legend:wg_timis_wassertiefe&do=export_html','metadata_link_wg_timis_hochwasser_gefahrdungen':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_hochwasser_intensitaten_ehq':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_hochwasser_intensitaten_hq10':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_hochwasser_intensitaten_hq100':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_hochwasser_intensitaten_hq50':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_ueberflutungsflachen_ehq':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_ueberflutungsflachen_hq10':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_ueberflutungsflachen_hq100':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_ueberflutungsflachen_hq50':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_wassertiefe_ehq':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_wassertiefe_hq10':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_wassertiefe_hq100':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_wassertiefe_hq50':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_topo_5k':'http://wiki.geoportail.lu/doku.php?id=de:legend:none&do=export_html','metadata_link_topo_5k':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=270_2012','legend_link_topo_20k':'http://wiki.geoportail.lu/doku.php?id=de:legend:none&do=export_html','metadata_link_topo_20k':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=9fb01381-698c-4e5f-950e-6c4793e0a7fd','legend_link_topo_50k':'http://wiki.geoportail.lu/doku.php?id=de:legend:none&do=export_html','metadata_link_topo_50k':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=262','legend_link_topo_100k':'http://wiki.geoportail.lu/doku.php?id=de:legend:none&do=export_html','metadata_link_topo_100k':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=266','legend_link_topo_250k':'http://wiki.geoportail.lu/doku.php?id=de:legend:none&do=export_html','metadata_link_topo_250k':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=e1f601a5-ed8f-4043-8719-0cad50cbb483','legend_link_1907_CAHANSEN':'http://wiki.geoportail.lu/doku.php?id=de:legend:none&do=export_html','metadata_link_1907_CAHANSEN':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=b88e6524-67d3-4e34-b998-6f30120e3718','legend_link_1927_CAHANSEN':'http://wiki.geoportail.lu/doku.php?id=de:legend:none&do=export_html','metadata_link_1927_CAHANSEN':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=90750f9f-856d-41ac-a90f-a8befbd75434','legend_link_TOPO25K1954C24':'http://wiki.geoportail.lu/doku.php?id=de:legend:none&do=export_html','metadata_link_TOPO25K1954C24':'http://www.geoportal.lu/Portail/menuAction.do?lang=de&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=7a8bc9a4-e7c7-4584-bc4f-03deaf7b69b2','Position':'','redlining action':'Zeichnen'});Proj4js={defaultDatum:'WGS84',transform:function(source,dest,point){if(!source.readyToUse||!dest.readyToUse){this.reportError("Proj4js initialization for "+source.srsCode+" not yet complete");return point;}
if((source.srsProjNumber=="900913"&&dest.datumCode!="WGS84")||(dest.srsProjNumber=="900913"&&source.datumCode!="WGS84")){var wgs84=Proj4js.WGS84;this.transform(source,wgs84,point);source=wgs84;}
if(source.projName=="longlat"){point.x*=Proj4js.common.D2R;point.y*=Proj4js.common.D2R;}else{if(source.to_meter){point.x*=source.to_meter;point.y*=source.to_meter;}
source.inverse(point);}
if(source.from_greenwich){point.x+=source.from_greenwich;}
point=this.datum_transform(source.datum,dest.datum,point);if(dest.from_greenwich){point.x-=dest.from_greenwich;}
if(dest.projName=="longlat"){point.x*=Proj4js.common.R2D;point.y*=Proj4js.common.R2D;}else{dest.forward(point);if(dest.to_meter){point.x/=dest.to_meter;point.y/=dest.to_meter;}}
return point;},datum_transform:function(source,dest,point){if(source.compare_datums(dest)){return point;}
if(source.datum_type==Proj4js.common.PJD_NODATUM||dest.datum_type==Proj4js.common.PJD_NODATUM){return point;}
if(source.datum_type==Proj4js.common.PJD_GRIDSHIFT)
{alert("ERROR: Grid shift transformations are not implemented yet.");}
if(dest.datum_type==Proj4js.common.PJD_GRIDSHIFT)
{alert("ERROR: Grid shift transformations are not implemented yet.");}
if(source.es!=dest.es||source.a!=dest.a||source.datum_type==Proj4js.common.PJD_3PARAM||source.datum_type==Proj4js.common.PJD_7PARAM||dest.datum_type==Proj4js.common.PJD_3PARAM||dest.datum_type==Proj4js.common.PJD_7PARAM)
{source.geodetic_to_geocentric(point);if(source.datum_type==Proj4js.common.PJD_3PARAM||source.datum_type==Proj4js.common.PJD_7PARAM){source.geocentric_to_wgs84(point);}
if(dest.datum_type==Proj4js.common.PJD_3PARAM||dest.datum_type==Proj4js.common.PJD_7PARAM){dest.geocentric_from_wgs84(point);}
dest.geocentric_to_geodetic(point);}
if(dest.datum_type==Proj4js.common.PJD_GRIDSHIFT)
{alert("ERROR: Grid shift transformations are not implemented yet.");}
return point;},reportError:function(msg){},extend:function(destination,source){destination=destination||{};if(source){for(var property in source){var value=source[property];if(value!==undefined){destination[property]=value;}}}
return destination;},Class:function(){var Class=function(){this.initialize.apply(this,arguments);};var extended={};var parent;for(var i=0;i<arguments.length;++i){if(typeof arguments[i]=="function"){parent=arguments[i].prototype;}else{parent=arguments[i];}
Proj4js.extend(extended,parent);}
Class.prototype=extended;return Class;},bind:function(func,object){var args=Array.prototype.slice.apply(arguments,[2]);return function(){var newArgs=args.concat(Array.prototype.slice.apply(arguments,[0]));return func.apply(object,newArgs);};},scriptName:"proj4js-combined.js",defsLookupService:'http://spatialreference.org/ref',libPath:null,getScriptLocation:function(){if(this.libPath)return this.libPath;var scriptName=this.scriptName;var scriptNameLen=scriptName.length;var scripts=document.getElementsByTagName('script');for(var i=0;i<scripts.length;i++){var src=scripts[i].getAttribute('src');if(src){var index=src.lastIndexOf(scriptName);if((index>-1)&&(index+scriptNameLen==src.length)){this.libPath=src.slice(0,-scriptNameLen);break;}}}
return this.libPath||"";},loadScript:function(url,onload,onfail,loadCheck){var script=document.createElement('script');script.defer=false;script.type="text/javascript";script.id=url;script.src=url;script.onload=onload;script.onerror=onfail;script.loadCheck=loadCheck;if(/MSIE/.test(navigator.userAgent)){script.onreadystatechange=this.checkReadyState;}
document.getElementsByTagName('head')[0].appendChild(script);},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,initialize:function(srsCode){this.srsCodeInput=srsCode;if(srsCode.indexOf('urn:')==0){var urn=srsCode.split(':');if((urn[1]=='ogc'||urn[1]=='x-ogc')&&(urn[2]=='def')&&(urn[3]=='crs')&&urn.length==7){srsCode=urn[4]+':'+urn[6];}}else if(srsCode.indexOf('http://')==0){var url=srsCode.split('#');if(url[0].match(/epsg.org/)){srsCode='EPSG:'+url[1];}else if(url[0].match(/RIG.xml/)){srsCode='IGNF:'+url[1];}}
this.srsCode=srsCode.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 url=Proj4js.getScriptLocation()+'defs/'+this.srsAuth.toUpperCase()+this.srsProjNumber+'.js';Proj4js.loadScript(url,Proj4js.bind(this.defsLoaded,this),Proj4js.bind(this.loadFromService,this),Proj4js.bind(this.checkDefsLoaded,this));},loadFromService:function(){var url=Proj4js.defsLookupService+'/'+this.srsAuth+'/'+this.srsProjNumber+'/proj4js/';Proj4js.loadScript(url,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(projName){if(Proj4js.Proj[projName]){this.initTransforms();return;}
var url=Proj4js.getScriptLocation()+'projCode/'+projName+'.js';Proj4js.loadScript(url,Proj4js.bind(this.loadProjCodeSuccess,this,projName),Proj4js.bind(this.loadProjCodeFailure,this,projName),Proj4js.bind(this.checkCodeLoaded,this,projName));},loadProjCodeSuccess:function(projName){if(Proj4js.Proj[projName].dependsOn){this.loadProjCode(Proj4js.Proj[projName].dependsOn);}else{this.initTransforms();}},loadProjCodeFailure:function(projName){Proj4js.reportError("failed to find projection file for: "+projName);},checkCodeLoaded:function(projName){if(Proj4js.Proj[projName]){return true;}else{return false;}},initTransforms:function(){Proj4js.extend(this,Proj4js.Proj[this.projName]);this.init();this.readyToUse=true;},parseDefs:function(){this.defData=Proj4js.defs[this.srsCode];var paramName,paramVal;if(!this.defData){return;}
var paramArray=this.defData.split("+");for(var prop=0;prop<paramArray.length;prop++){var property=paramArray[prop].split("=");paramName=property[0].toLowerCase();paramVal=property[1];switch(paramName.replace(/\s/gi,"")){case"":break;case"title":this.title=paramVal;break;case"proj":this.projName=paramVal.replace(/\s/gi,"");break;case"units":this.units=paramVal.replace(/\s/gi,"");break;case"datum":this.datumCode=paramVal.replace(/\s/gi,"");break;case"nadgrids":this.nagrids=paramVal.replace(/\s/gi,"");break;case"ellps":this.ellps=paramVal.replace(/\s/gi,"");break;case"a":this.a=parseFloat(paramVal);break;case"b":this.b=parseFloat(paramVal);break;case"rf":this.rf=parseFloat(paramVal);break;case"lat_0":this.lat0=paramVal*Proj4js.common.D2R;break;case"lat_1":this.lat1=paramVal*Proj4js.common.D2R;break;case"lat_2":this.lat2=paramVal*Proj4js.common.D2R;break;case"lat_ts":this.lat_ts=paramVal*Proj4js.common.D2R;break;case"lon_0":this.long0=paramVal*Proj4js.common.D2R;break;case"alpha":this.alpha=parseFloat(paramVal)*Proj4js.common.D2R;break;case"lonc":this.longc=paramVal*Proj4js.common.D2R;break;case"x_0":this.x0=parseFloat(paramVal);break;case"y_0":this.y0=parseFloat(paramVal);break;case"k_0":this.k0=parseFloat(paramVal);break;case"k":this.k0=parseFloat(paramVal);break;case"r_a":this.R_A=true;break;case"zone":this.zone=parseInt(paramVal);break;case"south":this.utmSouth=true;break;case"towgs84":this.datum_params=paramVal.split(",");break;case"to_meter":this.to_meter=parseFloat(paramVal);break;case"from_greenwich":this.from_greenwich=paramVal*Proj4js.common.D2R;break;case"pm":paramVal=paramVal.replace(/\s/gi,"");this.from_greenwich=Proj4js.PrimeMeridian[paramVal]?Proj4js.PrimeMeridian[paramVal]:parseFloat(paramVal);this.from_greenwich*=Proj4js.common.D2R;break;case"no_defs":break;default:}}
this.deriveConstants();},deriveConstants:function(){if(this.nagrids=='@null')this.datumCode='none';if(this.datumCode&&this.datumCode!='none'){var datumDef=Proj4js.Datum[this.datumCode];if(datumDef){this.datum_params=datumDef.towgs84.split(',');this.ellps=datumDef.ellipse;this.datumName=datumDef.datumName?datumDef.datumName:this.datumCode;}}
if(!this.a){var ellipse=Proj4js.Ellipsoid[this.ellps]?Proj4js.Ellipsoid[this.ellps]:Proj4js.Ellipsoid['WGS84'];Proj4js.extend(this,ellipse);}
if(this.rf&&!this.b)this.b=(1.0-1.0/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.0;this.datum=new Proj4js.datum(this);}});Proj4js.Proj.longlat={init:function(){},forward:function(pt){return pt;},inverse:function(pt){return pt;}};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.141592653589793238,HALF_PI:1.570796326794896619,TWO_PI:6.283185307179586477,FORTPI:0.78539816339744833,R2D:57.29577951308232088,D2R:0.01745329251994329577,SEC_TO_RAD:4.84813681109535993589914102357e-6,EPSLN:1.0e-10,MAX_ITER:20,COS_67P5:0.38268343236508977,AD_C:1.0026000,PJD_UNKNOWN:0,PJD_3PARAM:1,PJD_7PARAM:2,PJD_GRIDSHIFT:3,PJD_WGS84:4,PJD_NODATUM:5,SRS_WGS84_SEMIMAJOR:6378137.0,SIXTH:.1666666666666666667,RA4:.04722222222222222222,RA6:.02215608465608465608,RV4:.06944444444444444444,RV6:.04243827160493827160,msfnz:function(eccent,sinphi,cosphi){var con=eccent*sinphi;return cosphi/(Math.sqrt(1.0-con*con));},tsfnz:function(eccent,phi,sinphi){var con=eccent*sinphi;var com=.5*eccent;con=Math.pow(((1.0-con)/(1.0+con)),com);return(Math.tan(.5*(this.HALF_PI-phi))/con);},phi2z:function(eccent,ts){var eccnth=.5*eccent;var con,dphi;var phi=this.HALF_PI-2*Math.atan(ts);for(i=0;i<=15;i++){con=eccent*Math.sin(phi);dphi=this.HALF_PI-2*Math.atan(ts*(Math.pow(((1.0-con)/(1.0+con)),eccnth)))-phi;phi+=dphi;if(Math.abs(dphi)<=.0000000001)return phi;}
alert("phi2z has NoConvergence");return(-9999);},qsfnz:function(eccent,sinphi,cosphi){var con;if(eccent>1.0e-7){con=eccent*sinphi;return((1.0-eccent*eccent)*(sinphi/(1.0-con*con)-(.5/eccent)*Math.log((1.0-con)/(1.0+con))));}else{return(2.0*sinphi);}},asinz:function(x){if(Math.abs(x)>1.0){x=(x>1.0)?1.0:-1.0;}
return Math.asin(x);},e0fn:function(x){return(1.0-0.25*x*(1.0+x/16.0*(3.0+1.25*x)));},e1fn:function(x){return(0.375*x*(1.0+0.25*x*(1.0+0.46875*x)));},e2fn:function(x){return(0.05859375*x*x*(1.0+0.75*x));},e3fn:function(x){return(x*x*x*(35.0/3072.0));},mlfn:function(e0,e1,e2,e3,phi){return(e0*phi-e1*Math.sin(2.0*phi)+e2*Math.sin(4.0*phi)-e3*Math.sin(6.0*phi));},srat:function(esinp,exp){return(Math.pow((1.0-esinp)/(1.0+esinp),exp));},sign:function(x){if(x<0.0)return(-1);else return(1);},adjust_lon:function(x){x=(Math.abs(x)<this.PI)?x:(x-(this.sign(x)*this.TWO_PI));return x;},adjust_lat:function(x){x=(Math.abs(x)<this.HALF_PI)?x:(x-(this.sign(x)*this.PI));return x;},latiso:function(eccent,phi,sinphi)
{if(Math.abs(phi)>this.HALF_PI)return+Number.NaN;if(phi==this.HALF_PI)return Number.POSITIVE_INFINITY;if(phi==-1.0*this.HALF_PI)return-1.0*Number.POSITIVE_INFINITY;var con=eccent*sinphi;return Math.log(Math.tan((this.HALF_PI+phi)/2.0))+eccent*Math.log((1.0-con)/(1.0+con))/2.0;},fL:function(x,L){return 2.0*Math.atan(x*Math.exp(L))-this.HALF_PI;},invlatiso:function(eccent,ts){var phi=this.fL(1.0,ts);var Iphi=0.0;var con=0.0;do{Iphi=phi;con=eccent*Math.sin(Iphi);phi=this.fL(Math.exp(eccent*Math.log((1.0+con)/(1.0-con))/2.0),ts)}while(Math.abs(phi-Iphi)>1.0e-12);return phi;},sinh:function(x)
{var r=Math.exp(x);r=(r-1.0/r)/2.0;return r;},cosh:function(x)
{var r=Math.exp(x);r=(r+1.0/r)/2.0;return r;},tanh:function(x)
{var r=Math.exp(x);r=(r-1.0/r)/(r+1.0/r);return r;},asinh:function(x)
{var s=(x>=0?1.0:-1.0);return s*(Math.log(Math.abs(x)+Math.sqrt(x*x+1.0)));},acosh:function(x)
{return 2.0*Math.log(Math.sqrt((x+1.0)/2.0)+Math.sqrt((x-1.0)/2.0));},atanh:function(x)
{return Math.log((x-1.0)/(x+1.0))/2.0;},gN:function(a,e,sinphi)
{var temp=e*sinphi;return a/Math.sqrt(1.0-temp*temp);}};Proj4js.datum=Proj4js.Class({initialize:function(proj){this.datum_type=Proj4js.common.PJD_WGS84;if(proj.datumCode&&proj.datumCode=='none'){this.datum_type=Proj4js.common.PJD_NODATUM;}
if(proj&&proj.datum_params){for(var i=0;i<proj.datum_params.length;i++){proj.datum_params[i]=parseFloat(proj.datum_params[i]);}
if(proj.datum_params[0]!=0||proj.datum_params[1]!=0||proj.datum_params[2]!=0){this.datum_type=Proj4js.common.PJD_3PARAM;}
if(proj.datum_params.length>3){if(proj.datum_params[3]!=0||proj.datum_params[4]!=0||proj.datum_params[5]!=0||proj.datum_params[6]!=0){this.datum_type=Proj4js.common.PJD_7PARAM;proj.datum_params[3]*=Proj4js.common.SEC_TO_RAD;proj.datum_params[4]*=Proj4js.common.SEC_TO_RAD;proj.datum_params[5]*=Proj4js.common.SEC_TO_RAD;proj.datum_params[6]=(proj.datum_params[6]/1000000.0)+1.0;}}}
if(proj){this.a=proj.a;this.b=proj.b;this.es=proj.es;this.ep2=proj.ep2;this.datum_params=proj.datum_params;}},compare_datums:function(dest){if(this.datum_type!=dest.datum_type){return false;}else if(this.a!=dest.a||Math.abs(this.es-dest.es)>0.000000000050){return false;}else if(this.datum_type==Proj4js.common.PJD_3PARAM){return(this.datum_params[0]==dest.datum_params[0]&&this.datum_params[1]==dest.datum_params[1]&&this.datum_params[2]==dest.datum_params[2]);}else if(this.datum_type==Proj4js.common.PJD_7PARAM){return(this.datum_params[0]==dest.datum_params[0]&&this.datum_params[1]==dest.datum_params[1]&&this.datum_params[2]==dest.datum_params[2]&&this.datum_params[3]==dest.datum_params[3]&&this.datum_params[4]==dest.datum_params[4]&&this.datum_params[5]==dest.datum_params[5]&&this.datum_params[6]==dest.datum_params[6]);}else if(this.datum_type==Proj4js.common.PJD_GRIDSHIFT){return strcmp(pj_param(this.params,"snadgrids").s,pj_param(dest.params,"snadgrids").s)==0;}else{return true;}},geodetic_to_geocentric:function(p){var Longitude=p.x;var Latitude=p.y;var Height=p.z?p.z:0;var X;var Y;var Z;var Error_Code=0;var Rn;var Sin_Lat;var Sin2_Lat;var Cos_Lat;if(Latitude<-Proj4js.common.HALF_PI&&Latitude>-1.001*Proj4js.common.HALF_PI){Latitude=-Proj4js.common.HALF_PI;}else if(Latitude>Proj4js.common.HALF_PI&&Latitude<1.001*Proj4js.common.HALF_PI){Latitude=Proj4js.common.HALF_PI;}else if((Latitude<-Proj4js.common.HALF_PI)||(Latitude>Proj4js.common.HALF_PI)){Proj4js.reportError('geocent:lat out of range:'+Latitude);return null;}
if(Longitude>Proj4js.common.PI)Longitude-=(2*Proj4js.common.PI);Sin_Lat=Math.sin(Latitude);Cos_Lat=Math.cos(Latitude);Sin2_Lat=Sin_Lat*Sin_Lat;Rn=this.a/(Math.sqrt(1.0e0-this.es*Sin2_Lat));X=(Rn+Height)*Cos_Lat*Math.cos(Longitude);Y=(Rn+Height)*Cos_Lat*Math.sin(Longitude);Z=((Rn*(1-this.es))+Height)*Sin_Lat;p.x=X;p.y=Y;p.z=Z;return Error_Code;},geocentric_to_geodetic:function(p){var genau=1.E-12;var genau2=(genau*genau);var maxiter=30;var P;var RR;var CT;var ST;var RX;var RK;var RN;var CPHI0;var SPHI0;var CPHI;var SPHI;var SDPHI;var At_Pole;var iter;var X=p.x;var Y=p.y;var Z=p.z?p.z:0.0;var Longitude;var Latitude;var Height;At_Pole=false;P=Math.sqrt(X*X+Y*Y);RR=Math.sqrt(X*X+Y*Y+Z*Z);if(P/this.a<genau){At_Pole=true;Longitude=0.0;if(RR/this.a<genau){Latitude=Proj4js.common.HALF_PI;Height=-this.b;return;}}else{Longitude=Math.atan2(Y,X);}
CT=Z/RR;ST=P/RR;RX=1.0/Math.sqrt(1.0-this.es*(2.0-this.es)*ST*ST);CPHI0=ST*(1.0-this.es)*RX;SPHI0=CT*RX;iter=0;do
{iter++;RN=this.a/Math.sqrt(1.0-this.es*SPHI0*SPHI0);Height=P*CPHI0+Z*SPHI0-RN*(1.0-this.es*SPHI0*SPHI0);RK=this.es*RN/(RN+Height);RX=1.0/Math.sqrt(1.0-RK*(2.0-RK)*ST*ST);CPHI=ST*(1.0-RK)*RX;SPHI=CT*RX;SDPHI=SPHI*CPHI0-CPHI*SPHI0;CPHI0=CPHI;SPHI0=SPHI;}
while(SDPHI*SDPHI>genau2&&iter<maxiter);Latitude=Math.atan(SPHI/Math.abs(CPHI));p.x=Longitude;p.y=Latitude;p.z=Height;return p;},geocentric_to_geodetic_noniter:function(p){var X=p.x;var Y=p.y;var Z=p.z?p.z:0;var Longitude;var Latitude;var Height;var W;var W2;var T0;var T1;var S0;var S1;var Sin_B0;var Sin3_B0;var Cos_B0;var Sin_p1;var Cos_p1;var Rn;var Sum;var At_Pole;X=parseFloat(X);Y=parseFloat(Y);Z=parseFloat(Z);At_Pole=false;if(X!=0.0)
{Longitude=Math.atan2(Y,X);}
else
{if(Y>0)
{Longitude=Proj4js.common.HALF_PI;}
else if(Y<0)
{Longitude=-Proj4js.common.HALF_PI;}
else
{At_Pole=true;Longitude=0.0;if(Z>0.0)
{Latitude=Proj4js.common.HALF_PI;}
else if(Z<0.0)
{Latitude=-Proj4js.common.HALF_PI;}
else
{Latitude=Proj4js.common.HALF_PI;Height=-this.b;return;}}}
W2=X*X+Y*Y;W=Math.sqrt(W2);T0=Z*Proj4js.common.AD_C;S0=Math.sqrt(T0*T0+W2);Sin_B0=T0/S0;Cos_B0=W/S0;Sin3_B0=Sin_B0*Sin_B0*Sin_B0;T1=Z+this.b*this.ep2*Sin3_B0;Sum=W-this.a*this.es*Cos_B0*Cos_B0*Cos_B0;S1=Math.sqrt(T1*T1+Sum*Sum);Sin_p1=T1/S1;Cos_p1=Sum/S1;Rn=this.a/Math.sqrt(1.0-this.es*Sin_p1*Sin_p1);if(Cos_p1>=Proj4js.common.COS_67P5)
{Height=W/Cos_p1-Rn;}
else if(Cos_p1<=-Proj4js.common.COS_67P5)
{Height=W/-Cos_p1-Rn;}
else
{Height=Z/Sin_p1+Rn*(this.es-1.0);}
if(At_Pole==false)
{Latitude=Math.atan(Sin_p1/Cos_p1);}
p.x=Longitude;p.y=Latitude;p.z=Height;return p;},geocentric_to_wgs84:function(p){if(this.datum_type==Proj4js.common.PJD_3PARAM)
{p.x+=this.datum_params[0];p.y+=this.datum_params[1];p.z+=this.datum_params[2];}
else if(this.datum_type==Proj4js.common.PJD_7PARAM)
{var Dx_BF=this.datum_params[0];var Dy_BF=this.datum_params[1];var Dz_BF=this.datum_params[2];var Rx_BF=this.datum_params[3];var Ry_BF=this.datum_params[4];var Rz_BF=this.datum_params[5];var M_BF=this.datum_params[6];var x_out=M_BF*(p.x-Rz_BF*p.y+Ry_BF*p.z)+Dx_BF;var y_out=M_BF*(Rz_BF*p.x+p.y-Rx_BF*p.z)+Dy_BF;var z_out=M_BF*(-Ry_BF*p.x+Rx_BF*p.y+p.z)+Dz_BF;p.x=x_out;p.y=y_out;p.z=z_out;}},geocentric_from_wgs84:function(p){if(this.datum_type==Proj4js.common.PJD_3PARAM)
{p.x-=this.datum_params[0];p.y-=this.datum_params[1];p.z-=this.datum_params[2];}
else if(this.datum_type==Proj4js.common.PJD_7PARAM)
{var Dx_BF=this.datum_params[0];var Dy_BF=this.datum_params[1];var Dz_BF=this.datum_params[2];var Rx_BF=this.datum_params[3];var Ry_BF=this.datum_params[4];var Rz_BF=this.datum_params[5];var M_BF=this.datum_params[6];var x_tmp=(p.x-Dx_BF)/M_BF;var y_tmp=(p.y-Dy_BF)/M_BF;var z_tmp=(p.z-Dz_BF)/M_BF;p.x=x_tmp+Rz_BF*y_tmp-Ry_BF*z_tmp;p.y=-Rz_BF*x_tmp+y_tmp+Rx_BF*z_tmp;p.z=Ry_BF*x_tmp-Rx_BF*y_tmp+z_tmp;}}});Proj4js.Point=Proj4js.Class({initialize:function(x,y,z){if(typeof x=='object'){this.x=x[0];this.y=x[1];this.z=x[2]||0.0;}else if(typeof x=='string'){var coords=x.split(',');this.x=parseFloat(coords[0]);this.y=parseFloat(coords[1]);this.z=parseFloat(coords[2])||0.0;}else{this.x=x;this.y=y;this.z=z||0.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.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.0,rf:298.257,ellipseName:"MERIT 1983"},"SGS85":{a:6378136.0,rf:298.257,ellipseName:"Soviet Geodetic System 85"},"GRS80":{a:6378137.0,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},"IAU76":{a:6378140.0,rf:298.257,ellipseName:"IAU 1976"},"airy":{a:6377563.396,b:6356256.910,ellipseName:"Airy 1830"},"APL4.":{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},"NWL9D":{a:6378145.0,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.0,ellipseName:"Andrae 1876 (Den., Iclnd.)"},"aust_SA":{a:6378160.0,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},"GRS67":{a:6378160.0,rf:298.2471674270,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.0,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.0,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},"fschr60m":{a:6378155.0,rf:298.3,ellipseName:"Fischer 1960"},"fschr68":{a:6378150.0,rf:298.3,ellipseName:"Fischer 1968"},"helmert":{a:6378200.0,rf:298.3,ellipseName:"Helmert 1906"},"hough":{a:6378270.0,rf:297.0,ellipseName:"Hough"},"intl":{a:6378388.0,rf:297.0,ellipseName:"International 1909 (Hayford)"},"kaula":{a:6378163.0,rf:298.24,ellipseName:"Kaula 1961"},"lerch":{a:6378139.0,rf:298.257,ellipseName:"Lerch 1979"},"mprts":{a:6397300.0,rf:191.0,ellipseName:"Maupertius 1738"},"new_intl":{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},"plessis":{a:6376523.0,rf:6355863.0,ellipseName:"Plessis 1817 (France)"},"krass":{a:6378245.0,rf:298.3,ellipseName:"Krassovsky, 1942"},"SEasia":{a:6378155.0,b:6356773.3205,ellipseName:"Southeast Asia"},"walbeck":{a:6376896.0,b:6355834.8467,ellipseName:"Walbeck"},"WGS60":{a:6378165.0,rf:298.3,ellipseName:"WGS 60"},"WGS66":{a:6378145.0,rf:298.25,ellipseName:"WGS 66"},"WGS72":{a:6378135.0,rf:298.26,ellipseName:"WGS 72"},"WGS84":{a:6378137.0,rf:298.257223563,ellipseName:"WGS 84"},"sphere":{a:6370997.0,b:6370997.0,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.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.0-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(p){var lon=p.x;var lat=p.y;this.sin_phi=Math.sin(lat);this.cos_phi=Math.cos(lat);var qs=Proj4js.common.qsfnz(this.e3,this.sin_phi,this.cos_phi);var rh1=this.a*Math.sqrt(this.c-this.ns0*qs)/this.ns0;var theta=this.ns0*Proj4js.common.adjust_lon(lon-this.long0);var x=rh1*Math.sin(theta)+this.x0;var y=this.rh-rh1*Math.cos(theta)+this.y0;p.x=x;p.y=y;return p;},inverse:function(p){var rh1,qs,con,theta,lon,lat;p.x-=this.x0;p.y=this.rh-p.y+this.y0;if(this.ns0>=0){rh1=Math.sqrt(p.x*p.x+p.y*p.y);con=1.0;}else{rh1=-Math.sqrt(p.x*p.x+p.y*p.y);con=-1.0;}
theta=0.0;if(rh1!=0.0){theta=Math.atan2(con*p.x,con*p.y);}
con=rh1*this.ns0/this.a;qs=(this.c-con*con)/this.ns0;if(this.e3>=1e-10){con=1-.5*(1.0-this.es)*Math.log((1.0-this.e3)/(1.0+this.e3))/this.e3;if(Math.abs(Math.abs(con)-Math.abs(qs))>.0000000001){lat=this.phi1z(this.e3,qs);}else{if(qs>=0){lat=.5*PI;}else{lat=-.5*PI;}}}else{lat=this.phi1z(e3,qs);}
lon=Proj4js.common.adjust_lon(theta/this.ns0+this.long0);p.x=lon;p.y=lat;return p;},phi1z:function(eccent,qs){var con,com,dphi;var phi=Proj4js.common.asinz(.5*qs);if(eccent<Proj4js.common.EPSLN)return phi;var eccnts=eccent*eccent;for(var i=1;i<=25;i++){sinphi=Math.sin(phi);cosphi=Math.cos(phi);con=eccent*sinphi;com=1.0-con*con;dphi=.5*com*com/cosphi*(qs/(1.0-eccnts)-sinphi/com+.5/eccent*Math.log((1.0-con)/(1.0+con)));phi=phi+dphi;if(Math.abs(dphi)<=1e-7)return phi;}
Proj4js.reportError("aea:phi1z:Convergence error");return null;}};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.0*this.rc;if(!this.title)this.title="Oblique Stereographic Alternative";},forward:function(p){p.x=Proj4js.common.adjust_lon(p.x-this.long0);Proj4js.Proj['gauss'].forward.apply(this,[p]);sinc=Math.sin(p.y);cosc=Math.cos(p.y);cosl=Math.cos(p.x);k=this.k0*this.R2/(1.0+this.sinc0*sinc+this.cosc0*cosc*cosl);p.x=k*cosc*Math.sin(p.x);p.y=k*(this.cosc0*sinc-this.sinc0*cosc*cosl);p.x=this.a*p.x+this.x0;p.y=this.a*p.y+this.y0;return p;},inverse:function(p){var lon,lat;p.x=(p.x-this.x0)/this.a;p.y=(p.y-this.y0)/this.a;p.x/=this.k0;p.y/=this.k0;if((rho=Math.sqrt(p.x*p.x+p.y*p.y))){c=2.0*Math.atan2(rho,this.R2);sinc=Math.sin(c);cosc=Math.cos(c);lat=Math.asin(cosc*this.sinc0+p.y*sinc*this.cosc0/rho);lon=Math.atan2(p.x*sinc,rho*this.cosc0*cosc-p.y*this.sinc0*sinc);}else{lat=this.phic0;lon=0.;}
p.x=lon;p.y=lat;Proj4js.Proj['gauss'].inverse.apply(this,[p]);p.x=Proj4js.common.adjust_lon(p.x+this.long0);return p;}};function phi4z(eccent,e0,e1,e2,e3,a,b,c,phi){var sinphi,sin2ph,tanph,ml,mlp,con1,con2,con3,dphi,i;phi=a;for(i=1;i<=15;i++){sinphi=Math.sin(phi);tanphi=Math.tan(phi);c=tanphi*Math.sqrt(1.0-eccent*sinphi*sinphi);sin2ph=Math.sin(2.0*phi);ml=e0*phi-e1*sin2ph+e2*Math.sin(4.0*phi)-e3*Math.sin(6.0*phi);mlp=e0-2.0*e1*Math.cos(2.0*phi)+4.0*e2*Math.cos(4.0*phi)-6.0*e3*Math.cos(6.0*phi);con1=2.0*ml+c*(ml*ml+b)-2.0*a*(c*ml+1.0);con2=eccent*sin2ph*(ml*ml+b-2.0*a*ml)/(2.0*c);con3=2.0*(a-ml)*(c*mlp-2.0/sin2ph)-2.0*mlp;dphi=con1/(con2+con3);phi+=dphi;if(Math.abs(dphi)<=.0000000001)return(phi);}
Proj4js.reportError("phi4z: No convergence");return null;}
function e4fn(x){var con,com;con=1.0+x;com=1.0-x;return(Math.sqrt((Math.pow(con,con))*(Math.pow(com,com))));}
Proj4js.Proj.poly={init:function(){var temp;if(this.lat0=0)this.lat0=90;this.temp=this.b/this.a;this.es=1.0-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(p){var sinphi,cosphi;var al;var c;var con,ml;var ms;var x,y;var lon=p.x;var lat=p.y;con=Proj4js.common.adjust_lon(lon-this.long0);if(Math.abs(lat)<=.0000001){x=this.x0+this.a*con;y=this.y0-this.a*this.ml0;}else{sinphi=Math.sin(lat);cosphi=Math.cos(lat);ml=Proj4js.common.mlfn(this.e0,this.e1,this.e2,this.e3,lat);ms=Proj4js.common.msfnz(this.e,sinphi,cosphi);con=sinphi;x=this.x0+this.a*ms*Math.sin(con)/sinphi;y=this.y0+this.a*(ml-this.ml0+ms*(1.0-Math.cos(con))/sinphi);}
p.x=x;p.y=y;return p;},inverse:function(p){var sin_phi,cos_phi;var al;var b;var c;var con,ml;var iflg;var lon,lat;p.x-=this.x0;p.y-=this.y0;al=this.ml0+p.y/this.a;iflg=0;if(Math.abs(al)<=.0000001){lon=p.x/this.a+this.long0;lat=0.0;}else{b=al*al+(p.x/this.a)*(p.x/this.a);iflg=phi4z(this.es,this.e0,this.e1,this.e2,this.e3,this.al,b,c,lat);if(iflg!=1)return(iflg);lon=Proj4js.common.adjust_lon((Proj4js.common.asinz(p.x*c/this.a)/Math.sin(lat))+this.long0);}
p.x=lon;p.y=lat;return p;}};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(p){var lon=p.x;var lat=p.y;var dlon=Proj4js.common.adjust_lon(lon-this.long0);var x=this.x0+this.a*dlon*Math.cos(this.lat0);var y=this.y0+this.a*lat;this.t1=x;this.t2=Math.cos(this.lat0);p.x=x;p.y=y;return p;},inverse:function(p){p.x-=this.x0;p.y-=this.y0;var lat=p.y/this.a;if(Math.abs(lat)>Proj4js.common.HALF_PI){Proj4js.reportError("equi:Inv:DataError");}
var lon=Proj4js.common.adjust_lon(this.long0+p.x/(this.a*Math.cos(this.lat0)));p.x=lon;p.y=lat;}};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(p){var lon=p.x;var lat=p.y;if(lat*Proj4js.common.R2D>90.0&&lat*Proj4js.common.R2D<-90.0&&lon*Proj4js.common.R2D>180.0&&lon*Proj4js.common.R2D<-180.0){Proj4js.reportError("merc:forward: llInputOutOfRange: "+lon+" : "+lat);return null;}
var x,y;if(Math.abs(Math.abs(lat)-Proj4js.common.HALF_PI)<=Proj4js.common.EPSLN){Proj4js.reportError("merc:forward: ll2mAtPoles");return null;}else{if(this.sphere){x=this.x0+this.a*this.k0*Proj4js.common.adjust_lon(lon-this.long0);y=this.y0+this.a*this.k0*Math.log(Math.tan(Proj4js.common.FORTPI+0.5*lat));}else{var sinphi=Math.sin(lat);var ts=Proj4js.common.tsfnz(this.e,lat,sinphi);x=this.x0+this.a*this.k0*Proj4js.common.adjust_lon(lon-this.long0);y=this.y0-this.a*this.k0*Math.log(ts);}
p.x=x;p.y=y;return p;}},inverse:function(p){var x=p.x-this.x0;var y=p.y-this.y0;var lon,lat;if(this.sphere){lat=Proj4js.common.HALF_PI-2.0*Math.atan(Math.exp(-y/this.a*this.k0));}else{var ts=Math.exp(-y/(this.a*this.k0));lat=Proj4js.common.phi2z(this.e,ts);if(lat==-9999){Proj4js.reportError("merc:inverse: lat = -9999");return null;}}
lon=Proj4js.common.adjust_lon(this.long0+x/(this.a*this.k0));p.x=lon;p.y=lat;return p;}};Proj4js.Proj.utm={dependsOn:'tmerc',init:function(){if(!this.zone){Proj4js.reportError("utm:init: zone must be specified for UTM");return;}
this.lat0=0.0;this.long0=((6*Math.abs(this.zone))-183)*Proj4js.common.D2R;this.x0=500000.0;this.y0=this.utmSouth?10000000.0:0.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.eqdc={init:function(){if(!this.mode)this.mode=0;this.temp=this.b/this.a;this.es=1.0-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(p){var lon=p.x;var lat=p.y;var ml=Proj4js.common.mlfn(this.e0,this.e1,this.e2,this.e3,lat);var rh1=this.a*(this.g-ml);var theta=this.ns*Proj4js.common.adjust_lon(lon-this.long0);var x=this.x0+rh1*Math.sin(theta);var y=this.y0+this.rh-rh1*Math.cos(theta);p.x=x;p.y=y;return p;},inverse:function(p){p.x-=this.x0;p.y=this.rh-p.y+this.y0;var con,rh1;if(this.ns>=0){var rh1=Math.sqrt(p.x*p.x+p.y*p.y);var con=1.0;}else{rh1=-Math.sqrt(p.x*p.x+p.y*p.y);con=-1.0;}
var theta=0.0;if(rh1!=0.0)theta=Math.atan2(con*p.x,con*p.y);var ml=this.g-rh1/this.a;var lat=this.phi3z(this.ml,this.e0,this.e1,this.e2,this.e3);var lon=Proj4js.common.adjust_lon(this.long0+theta/this.ns);p.x=lon;p.y=lat;return p;},phi3z:function(ml,e0,e1,e2,e3){var phi;var dphi;phi=ml;for(var i=0;i<15;i++){dphi=(ml+e1*Math.sin(2.0*phi)-e2*Math.sin(4.0*phi)+e3*Math.sin(6.0*phi))/e0-phi;phi+=dphi;if(Math.abs(dphi)<=.0000000001){return phi;}}
Proj4js.reportError("PHI3Z-CONV:Latitude failed to converge after 15 iterations");return null;}};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(p){var lon=p.x;var lat=p.y;var delta_lon=Proj4js.common.adjust_lon(lon-this.long0);var con;var x,y;var sin_phi=Math.sin(lat);var cos_phi=Math.cos(lat);if(this.sphere){var b=cos_phi*Math.sin(delta_lon);if((Math.abs(Math.abs(b)-1.0))<.0000000001){Proj4js.reportError("tmerc:forward: Point projects into infinity");return(93);}else{x=.5*this.a*this.k0*Math.log((1.0+b)/(1.0-b));con=Math.acos(cos_phi*Math.cos(delta_lon)/Math.sqrt(1.0-b*b));if(lat<0)con=-con;y=this.a*this.k0*(con-this.lat0);}}else{var al=cos_phi*delta_lon;var als=Math.pow(al,2);var c=this.ep2*Math.pow(cos_phi,2);var tq=Math.tan(lat);var t=Math.pow(tq,2);con=1.0-this.es*Math.pow(sin_phi,2);var n=this.a/Math.sqrt(con);var ml=this.a*Proj4js.common.mlfn(this.e0,this.e1,this.e2,this.e3,lat);x=this.k0*n*al*(1.0+als/6.0*(1.0-t+c+als/20.0*(5.0-18.0*t+Math.pow(t,2)+72.0*c-58.0*this.ep2)))+this.x0;y=this.k0*(ml-this.ml0+n*tq*(als*(0.5+als/24.0*(5.0-t+9.0*c+4.0*Math.pow(c,2)+als/30.0*(61.0-58.0*t+Math.pow(t,2)+600.0*c-330.0*this.ep2)))))+this.y0;}
p.x=x;p.y=y;return p;},inverse:function(p){var con,phi;var delta_phi;var i;var max_iter=6;var lat,lon;if(this.sphere){var f=Math.exp(p.x/(this.a*this.k0));var g=.5*(f-1/f);var temp=this.lat0+p.y/(this.a*this.k0);var h=Math.cos(temp);con=Math.sqrt((1.0-h*h)/(1.0+g*g));lat=Proj4js.common.asinz(con);if(temp<0)
lat=-lat;if((g==0)&&(h==0)){lon=this.long0;}else{lon=Proj4js.common.adjust_lon(Math.atan2(g,h)+this.long0);}}else{var x=p.x-this.x0;var y=p.y-this.y0;con=(this.ml0+y/this.k0)/this.a;phi=con;for(i=0;true;i++){delta_phi=((con+this.e1*Math.sin(2.0*phi)-this.e2*Math.sin(4.0*phi)+this.e3*Math.sin(6.0*phi))/this.e0)-phi;phi+=delta_phi;if(Math.abs(delta_phi)<=Proj4js.common.EPSLN)break;if(i>=max_iter){Proj4js.reportError("tmerc:inverse: Latitude failed to converge");return(95);}}
if(Math.abs(phi)<Proj4js.common.HALF_PI){var sin_phi=Math.sin(phi);var cos_phi=Math.cos(phi);var tan_phi=Math.tan(phi);var c=this.ep2*Math.pow(cos_phi,2);var cs=Math.pow(c,2);var t=Math.pow(tan_phi,2);var ts=Math.pow(t,2);con=1.0-this.es*Math.pow(sin_phi,2);var n=this.a/Math.sqrt(con);var r=n*(1.0-this.es)/con;var d=x/(n*this.k0);var ds=Math.pow(d,2);lat=phi-(n*tan_phi*ds/r)*(0.5-ds/24.0*(5.0+3.0*t+10.0*c-4.0*cs-9.0*this.ep2-ds/30.0*(61.0+90.0*t+298.0*c+45.0*ts-252.0*this.ep2-3.0*cs)));lon=Proj4js.common.adjust_lon(this.long0+(d*(1.0-ds/6.0*(1.0+2.0*t+c-ds/20.0*(5.0-2.0*c+28.0*t-3.0*cs+8.0*this.ep2+24.0*ts)))/cos_phi));}else{lat=Proj4js.common.HALF_PI*Proj4js.common.sign(y);lon=this.long0;}}
p.x=lon;p.y=lat;return p;}};Proj4js.defs["GOOGLE"]="+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:900913"]=Proj4js.defs["GOOGLE"];Proj4js.Proj.gstmerc={init:function(){var temp=this.b/this.a;this.e=Math.sqrt(1.0-temp*temp);this.lc=this.long0;this.rs=Math.sqrt(1.0+this.e*this.e*Math.pow(Math.cos(this.lat0),4.0)/(1.0-this.e*this.e));var sinz=Math.sin(this.lat0);var pc=Math.asin(sinz/this.rs);var sinzpc=Math.sin(pc);this.cp=Proj4js.common.latiso(0.0,pc,sinzpc)-this.rs*Proj4js.common.latiso(this.e,this.lat0,sinz);this.n2=this.k0*this.a*Math.sqrt(1.0-this.e*this.e)/(1.0-this.e*this.e*sinz*sinz);this.xs=this.x0;this.ys=this.y0-this.n2*pc;if(!this.title)this.title="Gauss Schreiber transverse mercator";},forward:function(p){var lon=p.x;var lat=p.y;var L=this.rs*(lon-this.lc);var Ls=this.cp+(this.rs*Proj4js.common.latiso(this.e,lat,Math.sin(lat)));var lat1=Math.asin(Math.sin(L)/Proj4js.common.cosh(Ls));var Ls1=Proj4js.common.latiso(0.0,lat1,Math.sin(lat1));p.x=this.xs+(this.n2*Ls1);p.y=this.ys+(this.n2*Math.atan(Proj4js.common.sinh(Ls)/Math.cos(L)));return p;},inverse:function(p){var x=p.x;var y=p.y;var L=Math.atan(Proj4js.common.sinh((x-this.xs)/this.n2)/Math.cos((y-this.ys)/this.n2));var lat1=Math.asin(Math.sin((y-this.ys)/this.n2)/Proj4js.common.cosh((x-this.xs)/this.n2));var LC=Proj4js.common.latiso(0.0,lat1,Math.sin(lat1));p.x=this.lc+L/this.rs;p.y=Proj4js.common.invlatiso(this.e,(LC-this.cp)/this.rs);return p;}};Proj4js.Proj.ortho={init:function(def){;this.sin_p14=Math.sin(this.lat0);this.cos_p14=Math.cos(this.lat0);},forward:function(p){var sinphi,cosphi;var dlon;var coslon;var ksp;var g;var lon=p.x;var lat=p.y;dlon=Proj4js.common.adjust_lon(lon-this.long0);sinphi=Math.sin(lat);cosphi=Math.cos(lat);coslon=Math.cos(dlon);g=this.sin_p14*sinphi+this.cos_p14*cosphi*coslon;ksp=1.0;if((g>0)||(Math.abs(g)<=Proj4js.common.EPSLN)){var x=this.a*ksp*cosphi*Math.sin(dlon);var y=this.y0+this.a*ksp*(this.cos_p14*sinphi-this.sin_p14*cosphi*coslon);}else{Proj4js.reportError("orthoFwdPointError");}
p.x=x;p.y=y;return p;},inverse:function(p){var rh;var z;var sinz,cosz;var temp;var con;var lon,lat;p.x-=this.x0;p.y-=this.y0;rh=Math.sqrt(p.x*p.x+p.y*p.y);if(rh>this.a+.0000001){Proj4js.reportError("orthoInvDataError");}
z=Proj4js.common.asinz(rh/this.a);sinz=Math.sin(z);cosi=Math.cos(z);lon=this.long0;if(Math.abs(rh)<=Proj4js.common.EPSLN){lat=this.lat0;}
lat=Proj4js.common.asinz(cosz*this.sin_p14+(y*sinz*this.cos_p14)/rh);con=Math.abs(lat0)-Proj4js.common.HALF_PI;if(Math.abs(con)<=Proj4js.common.EPSLN){if(this.lat0>=0){lon=Proj4js.common.adjust_lon(this.long0+Math.atan2(p.x,-p.y));}else{lon=Proj4js.common.adjust_lon(this.long0-Math.atan2(-p.x,p.y));}}
con=cosz-this.sin_p14*Math.sin(lat);if((Math.abs(con)>=Proj4js.common.EPSLN)||(Math.abs(x)>=Proj4js.common.EPSLN)){lon=Proj4js.common.adjust_lon(this.long0+Math.atan2((p.x*sinz*this.cos_p14),(con*rh)));}
p.x=lon;p.y=lat;return p;}};Proj4js.Proj.somerc={init:function(){var phy0=this.lat0;this.lambda0=this.long0;var sinPhy0=Math.sin(phy0);var semiMajorAxis=this.a;var invF=this.rf;var flattening=1/invF;var e2=2*flattening-Math.pow(flattening,2);var e=this.e=Math.sqrt(e2);this.R=semiMajorAxis*Math.sqrt(1-e2)/(1-e2*Math.pow(sinPhy0,2.0));this.alpha=Math.sqrt(1+e2/(1-e2)*Math.pow(Math.cos(phy0),4.0));this.b0=Math.asin(sinPhy0/this.alpha);this.K=Math.log(Math.tan(Math.PI/4.0+this.b0/2.0))
-this.alpha*Math.log(Math.tan(Math.PI/4.0+phy0/2.0))
+this.alpha*e/2*Math.log((1+e*sinPhy0)/(1-e*sinPhy0));},forward:function(p){var Sa1=Math.log(Math.tan(Math.PI/4.0-p.y/2.0));var Sa2=this.e/2.0*Math.log((1+this.e*Math.sin(p.y))/(1-this.e*Math.sin(p.y)));var S=-this.alpha*(Sa1+Sa2)+this.K;var b=2.0*(Math.atan(Math.exp(S))-Math.PI/4.0);var I=this.alpha*(p.x-this.lambda0);var rotI=Math.atan(Math.sin(I)/(Math.sin(this.b0)*Math.tan(b)+
Math.cos(this.b0)*Math.cos(I)));var rotB=Math.asin(Math.cos(this.b0)*Math.sin(b)-
Math.sin(this.b0)*Math.cos(b)*Math.cos(I));p.y=this.R/2.0*Math.log((1+Math.sin(rotB))/(1-Math.sin(rotB)))
+this.y0;p.x=this.R*rotI+this.x0;return p;},inverse:function(p){var Y=p.x-this.x0;var X=p.y-this.y0;var rotI=Y/this.R;var rotB=2*(Math.atan(Math.exp(X/this.R))-Math.PI/4.0);var b=Math.asin(Math.cos(this.b0)*Math.sin(rotB)
+Math.sin(this.b0)*Math.cos(rotB)*Math.cos(rotI));var I=Math.atan(Math.sin(rotI)/(Math.cos(this.b0)*Math.cos(rotI)-Math.sin(this.b0)*Math.tan(rotB)));var lambda=this.lambda0+I/this.alpha;var S=0.0;var phy=b;var prevPhy=-1000.0;var iteration=0;while(Math.abs(phy-prevPhy)>0.0000001)
{if(++iteration>20)
{Proj4js.reportError("omercFwdInfinity");return;}
S=1.0/this.alpha*(Math.log(Math.tan(Math.PI/4.0+b/2.0))-this.K)
+this.e*Math.log(Math.tan(Math.PI/4.0
+Math.asin(this.e*Math.sin(phy))/2.0));prevPhy=phy;phy=2.0*Math.atan(Math.exp(S))-Math.PI/2.0;}
p.x=lambda;p.y=phy;return p;}};Proj4js.Proj.stere={ssfn_:function(phit,sinphi,eccen){sinphi*=eccen;return(Math.tan(.5*(Proj4js.common.HALF_PI+phit))*Math.pow((1.-sinphi)/(1.+sinphi),.5*eccen));},TOL:1.e-8,NITER:8,CONV:1.e-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 t=Math.abs(this.lat0);if((Math.abs(t)-Proj4js.common.HALF_PI)<Proj4js.common.EPSLN){this.mode=this.lat0<0.?this.S_POLE:this.N_POLE;}else{this.mode=t>Proj4js.common.EPSLN?this.OBLIQ:this.EQUIT;}
this.phits=Math.abs(this.phits);if(this.es){var X;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{t=Math.sin(this.phits);this.akm1=Math.cos(this.phits)/Proj4js.common.tsfnz(this.e,this.phits,t);t*=this.e;this.akm1/=Math.sqrt(1.-t*t);}
break;case this.EQUIT:this.akm1=2.*this.k0;break;case this.OBLIQ:t=Math.sin(this.lat0);X=2.*Math.atan(this.ssfn_(this.lat0,t,this.e))-Proj4js.common.HALF_PI;t*=this.e;this.akm1=2.*this.k0*Math.cos(this.lat0)/Math.sqrt(1.-t*t);this.sinX1=Math.sin(X);this.cosX1=Math.cos(X);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-.5*this.phits):2.*this.k0;break;}}},forward:function(p){var lon=p.x;lon=Proj4js.common.adjust_lon(lon-this.long0);var lat=p.y;var x,y;if(this.sphere){var sinphi,cosphi,coslam,sinlam;sinphi=Math.sin(lat);cosphi=Math.cos(lat);coslam=Math.cos(lon);sinlam=Math.sin(lon);switch(this.mode){case this.EQUIT:y=1.+cosphi*coslam;if(y<=Proj4js.common.EPSLN){F_ERROR;}
y=this.akm1/y;x=y*cosphi*sinlam;y*=sinphi;break;case this.OBLIQ:y=1.+this.sinph0*sinphi+this.cosph0*cosphi*coslam;if(y<=Proj4js.common.EPSLN){F_ERROR;}
y=this.akm1/y;x=y*cosphi*sinlam;y*=this.cosph0*sinphi-this.sinph0*cosphi*coslam;break;case this.N_POLE:coslam=-coslam;lat=-lat;case this.S_POLE:if(Math.abs(lat-Proj4js.common.HALF_PI)<this.TOL){F_ERROR;}
y=this.akm1*Math.tan(Proj4js.common.FORTPI+.5*lat);x=sinlam*y;y*=coslam;break;}}else{coslam=Math.cos(lon);sinlam=Math.sin(lon);sinphi=Math.sin(lat);if(this.mode==this.OBLIQ||this.mode==this.EQUIT){X=2.*Math.atan(this.ssfn_(lat,sinphi,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*coslam));y=A*(this.cosX1*sinX-this.sinX1*cosX*coslam);x=A*cosX;break;case this.EQUIT:A=2.*this.akm1/(1.+cosX*coslam);y=A*sinX;x=A*cosX;break;case this.S_POLE:lat=-lat;coslam=-coslam;sinphi=-sinphi;case this.N_POLE:x=this.akm1*Proj4js.common.tsfnz(this.e,lat,sinphi);y=-x*coslam;break;}
x=x*sinlam;}
p.x=x*this.a+this.x0;p.y=y*this.a+this.y0;return p;},inverse:function(p){var x=(p.x-this.x0)/this.a;var y=(p.y-this.y0)/this.a;var lon,lat;var cosphi,sinphi,tp=0.0,phi_l=0.0,rho,halfe=0.0,pi2=0.0;var i;if(this.sphere){var c,rh,sinc,cosc;rh=Math.sqrt(x*x+y*y);c=2.*Math.atan(rh/this.akm1);sinc=Math.sin(c);cosc=Math.cos(c);lon=0.;switch(this.mode){case this.EQUIT:if(Math.abs(rh)<=Proj4js.common.EPSLN){lat=0.;}else{lat=Math.asin(y*sinc/rh);}
if(cosc!=0.||x!=0.)lon=Math.atan2(x*sinc,cosc*rh);break;case this.OBLIQ:if(Math.abs(rh)<=Proj4js.common.EPSLN){lat=this.phi0;}else{lat=Math.asin(cosc*sinph0+y*sinc*cosph0/rh);}
c=cosc-sinph0*Math.sin(lat);if(c!=0.||x!=0.){lon=Math.atan2(x*sinc*cosph0,c*rh);}
break;case this.N_POLE:y=-y;case this.S_POLE:if(Math.abs(rh)<=Proj4js.common.EPSLN){lat=this.phi0;}else{lat=Math.asin(this.mode==this.S_POLE?-cosc:cosc);}
lon=(x==0.&&y==0.)?0.:Math.atan2(x,y);break;}}else{rho=Math.sqrt(x*x+y*y);switch(this.mode){case this.OBLIQ:case this.EQUIT:tp=2.*Math.atan2(rho*this.cosX1,this.akm1);cosphi=Math.cos(tp);sinphi=Math.sin(tp);if(rho==0.0){phi_l=Math.asin(cosphi*this.sinX1);}else{phi_l=Math.asin(cosphi*this.sinX1+(y*sinphi*this.cosX1/rho));}
tp=Math.tan(.5*(Proj4js.common.HALF_PI+phi_l));x*=sinphi;y=rho*this.cosX1*cosphi-y*this.sinX1*sinphi;pi2=Proj4js.common.HALF_PI;halfe=.5*this.e;break;case this.N_POLE:y=-y;case this.S_POLE:tp=-rho/this.akm1;phi_l=Proj4js.common.HALF_PI-2.*Math.atan(tp);pi2=-Proj4js.common.HALF_PI;halfe=-.5*this.e;break;}
for(i=this.NITER;i--;phi_l=lat){sinphi=this.e*Math.sin(phi_l);lat=2.*Math.atan(tp*Math.pow((1.+sinphi)/(1.-sinphi),halfe))-pi2;if(Math.abs(phi_l-lat)<this.CONV){if(this.mode==this.S_POLE)lat=-lat;lon=(x==0.&&y==0.)?0.:Math.atan2(x,y);p.x=Proj4js.common.adjust_lon(lon+this.long0);p.y=lat;return p;}}}}};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.0;this.B_re[2]=+0.249204646;this.B_im[2]=+0.003371507;this.B_re[3]=-0.001541739;this.B_im[3]=+0.041058560;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.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.01220;this.D[8]=+0.00394;this.D[9]=-0.0013;},forward:function(p){var lon=p.x;var lat=p.y;var delta_lat=lat-this.lat0;var delta_lon=lon-this.long0;var d_phi=delta_lat/Proj4js.common.SEC_TO_RAD*1E-5;var d_lambda=delta_lon;var d_phi_n=1;var d_psi=0;for(n=1;n<=10;n++){d_phi_n=d_phi_n*d_phi;d_psi=d_psi+this.A[n]*d_phi_n;}
var th_re=d_psi;var th_im=d_lambda;var th_n_re=1;var th_n_im=0;var th_n_re1;var th_n_im1;var z_re=0;var z_im=0;for(n=1;n<=6;n++){th_n_re1=th_n_re*th_re-th_n_im*th_im;th_n_im1=th_n_im*th_re+th_n_re*th_im;th_n_re=th_n_re1;th_n_im=th_n_im1;z_re=z_re+this.B_re[n]*th_n_re-this.B_im[n]*th_n_im;z_im=z_im+this.B_im[n]*th_n_re+this.B_re[n]*th_n_im;}
x=(z_im*this.a)+this.x0;y=(z_re*this.a)+this.y0;p.x=x;p.y=y;return p;},inverse:function(p){var x=p.x;var y=p.y;var delta_x=x-this.x0;var delta_y=y-this.y0;var z_re=delta_y/this.a;var z_im=delta_x/this.a;var z_n_re=1;var z_n_im=0;var z_n_re1;var z_n_im1;var th_re=0;var th_im=0;for(n=1;n<=6;n++){z_n_re1=z_n_re*z_re-z_n_im*z_im;z_n_im1=z_n_im*z_re+z_n_re*z_im;z_n_re=z_n_re1;z_n_im=z_n_im1;th_re=th_re+this.C_re[n]*z_n_re-this.C_im[n]*z_n_im;th_im=th_im+this.C_im[n]*z_n_re+this.C_re[n]*z_n_im;}
for(i=0;i<this.iterations;i++){var th_n_re=th_re;var th_n_im=th_im;var th_n_re1;var th_n_im1;var num_re=z_re;var num_im=z_im;for(n=2;n<=6;n++){th_n_re1=th_n_re*th_re-th_n_im*th_im;th_n_im1=th_n_im*th_re+th_n_re*th_im;th_n_re=th_n_re1;th_n_im=th_n_im1;num_re=num_re+(n-1)*(this.B_re[n]*th_n_re-this.B_im[n]*th_n_im);num_im=num_im+(n-1)*(this.B_im[n]*th_n_re+this.B_re[n]*th_n_im);}
th_n_re=1;th_n_im=0;var den_re=this.B_re[1];var den_im=this.B_im[1];for(n=2;n<=6;n++){th_n_re1=th_n_re*th_re-th_n_im*th_im;th_n_im1=th_n_im*th_re+th_n_re*th_im;th_n_re=th_n_re1;th_n_im=th_n_im1;den_re=den_re+n*(this.B_re[n]*th_n_re-this.B_im[n]*th_n_im);den_im=den_im+n*(this.B_im[n]*th_n_re+this.B_re[n]*th_n_im);}
var den2=den_re*den_re+den_im*den_im;th_re=(num_re*den_re+num_im*den_im)/den2;th_im=(num_im*den_re-num_re*den_im)/den2;}
var d_psi=th_re;var d_lambda=th_im;var d_psi_n=1;var d_phi=0;for(n=1;n<=9;n++){d_psi_n=d_psi_n*d_psi;d_phi=d_phi+this.D[n]*d_psi_n;}
var lat=this.lat0+(d_phi*Proj4js.common.SEC_TO_RAD*1E5);var lon=this.long0+d_lambda;p.x=lon;p.y=lat;return p;}};Proj4js.Proj.mill={init:function(){},forward:function(p){var lon=p.x;var lat=p.y;var dlon=Proj4js.common.adjust_lon(lon-this.long0);var x=this.x0+this.a*dlon;var y=this.y0+this.a*Math.log(Math.tan((Proj4js.common.PI/4.0)+(lat/2.5)))*1.25;p.x=x;p.y=y;return p;},inverse:function(p){p.x-=this.x0;p.y-=this.y0;var lon=Proj4js.common.adjust_lon(this.long0+p.x/this.a);var lat=2.5*(Math.atan(Math.exp(0.8*p.y/this.a))-Proj4js.common.PI/4.0);p.x=lon;p.y=lat;return p;}};Proj4js.Proj.sinu={init:function(){this.R=6370997.0;},forward:function(p){var x,y,delta_lon;var lon=p.x;var lat=p.y;delta_lon=Proj4js.common.adjust_lon(lon-this.long0);x=this.R*delta_lon*Math.cos(lat)+this.x0;y=this.R*lat+this.y0;p.x=x;p.y=y;return p;},inverse:function(p){var lat,temp,lon;p.x-=this.x0;p.y-=this.y0;lat=p.y/this.R;if(Math.abs(lat)>Proj4js.common.HALF_PI){Proj4js.reportError("sinu:Inv:DataError");}
temp=Math.abs(lat)-Proj4js.common.HALF_PI;if(Math.abs(temp)>Proj4js.common.EPSLN){temp=this.long0+p.x/(this.R*Math.cos(lat));lon=Proj4js.common.adjust_lon(temp);}else{lon=this.long0;}
p.x=lon;p.y=lat;return p;}};Proj4js.Proj.vandg={init:function(){this.R=6370997.0;},forward:function(p){var lon=p.x;var lat=p.y;var dlon=Proj4js.common.adjust_lon(lon-this.long0);var x,y;if(Math.abs(lat)<=Proj4js.common.EPSLN){x=this.x0+this.R*dlon;y=this.y0;}
var theta=Proj4js.common.asinz(2.0*Math.abs(lat/Proj4js.common.PI));if((Math.abs(dlon)<=Proj4js.common.EPSLN)||(Math.abs(Math.abs(lat)-Proj4js.common.HALF_PI)<=Proj4js.common.EPSLN)){x=this.x0;if(lat>=0){y=this.y0+Proj4js.common.PI*this.R*Math.tan(.5*theta);}else{y=this.y0+Proj4js.common.PI*this.R*-Math.tan(.5*theta);}}
var al=.5*Math.abs((Proj4js.common.PI/dlon)-(dlon/Proj4js.common.PI));var asq=al*al;var sinth=Math.sin(theta);var costh=Math.cos(theta);var g=costh/(sinth+costh-1.0);var gsq=g*g;var m=g*(2.0/sinth-1.0);var msq=m*m;var con=Proj4js.common.PI*this.R*(al*(g-msq)+Math.sqrt(asq*(g-msq)*(g-msq)-(msq+asq)*(gsq-msq)))/(msq+asq);if(dlon<0){con=-con;}
x=this.x0+con;con=Math.abs(con/(Proj4js.common.PI*this.R));if(lat>=0){y=this.y0+Proj4js.common.PI*this.R*Math.sqrt(1.0-con*con-2.0*al*con);}else{y=this.y0-Proj4js.common.PI*this.R*Math.sqrt(1.0-con*con-2.0*al*con);}
p.x=x;p.y=y;return p;},inverse:function(p){var dlon;var xx,yy,xys,c1,c2,c3;var al,asq;var a1;var m1;var con;var th1;var d;p.x-=this.x0;p.y-=this.y0;con=Proj4js.common.PI*this.R;xx=p.x/con;yy=p.y/con;xys=xx*xx+yy*yy;c1=-Math.abs(yy)*(1.0+xys);c2=c1-2.0*yy*yy+xx*xx;c3=-2.0*c1+1.0+2.0*yy*yy+xys*xys;d=yy*yy/c3+(2.0*c2*c2*c2/c3/c3/c3-9.0*c1*c2/c3/c3)/27.0;a1=(c1-c2*c2/3.0/c3)/c3;m1=2.0*Math.sqrt(-a1/3.0);con=((3.0*d)/a1)/m1;if(Math.abs(con)>1.0){if(con>=0.0){con=1.0;}else{con=-1.0;}}
th1=Math.acos(con)/3.0;if(p.y>=0){lat=(-m1*Math.cos(th1+Proj4js.common.PI/3.0)-c2/3.0/c3)*Proj4js.common.PI;}else{lat=-(-m1*Math.cos(th1+PI/3.0)-c2/3.0/c3)*Proj4js.common.PI;}
if(Math.abs(xx)<Proj4js.common.EPSLN){lon=this.long0;}
lon=Proj4js.common.adjust_lon(this.long0+Proj4js.common.PI*(xys-1.0+Math.sqrt(1.0+2.0*(xx*xx-yy*yy)+xys*xys))/2.0/xx);p.x=lon;p.y=lat;return p;}};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(p){var lon=p.x;var lat=p.y;var dlon=Proj4js.common.adjust_lon(lon-this.long0);var dlat=Proj4js.common.adjust_lat(lat-this.lat0);p.x=this.x0+(this.a*dlon*this.rc);p.y=this.y0+(this.a*dlat);return p;},inverse:function(p){var x=p.x;var y=p.y;p.x=Proj4js.common.adjust_lon(this.long0+((x-this.x0)/(this.a*this.rc)));p.y=Proj4js.common.adjust_lat(this.lat0+((y-this.y0)/(this.a)));return p;}};Proj4js.Proj.gauss={init:function(){sphi=Math.sin(this.lat0);cphi=Math.cos(this.lat0);cphi*=cphi;this.rc=Math.sqrt(1.0-this.es)/(1.0-this.es*sphi*sphi);this.C=Math.sqrt(1.0+this.es*cphi*cphi/(1.0-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(p){var lon=p.x;var lat=p.y;p.y=2.0*Math.atan(this.K*Math.pow(Math.tan(0.5*lat+Proj4js.common.FORTPI),this.C)*Proj4js.common.srat(this.e*Math.sin(lat),this.ratexp))-Proj4js.common.HALF_PI;p.x=this.C*lon;return p;},inverse:function(p){var DEL_TOL=1e-14;var lon=p.x/this.C;var lat=p.y;num=Math.pow(Math.tan(0.5*lat+Proj4js.common.FORTPI)/this.K,1./this.C);for(var i=Proj4js.common.MAX_ITER;i>0;--i){lat=2.0*Math.atan(num*Proj4js.common.srat(this.e*Math.sin(p.y),-0.5*this.e))-Proj4js.common.HALF_PI;if(Math.abs(lat-p.y)<DEL_TOL)break;p.y=lat;}
if(!i){Proj4js.reportError("gauss:inverse:convergence failed");return null;}
p.x=lon;p.y=lat;return p;}};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 temp=this.b/this.a;var es=1.0-Math.pow(temp,2);var e=Math.sqrt(es);this.sin_p20=Math.sin(this.lat0);this.cos_p20=Math.cos(this.lat0);this.con=1.0-this.es*this.sin_p20*this.sin_p20;this.com=Math.sqrt(1.0-es);this.bl=Math.sqrt(1.0+this.es*Math.pow(this.cos_p20,4.0)/(1.0-es));this.al=this.a*this.bl*this.k0*this.com/this.con;if(Math.abs(this.lat0)<Proj4js.common.EPSLN){this.ts=1.0;this.d=1.0;this.el=1.0;}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)>0.0){if(this.lat0>=0.0){this.f=this.d+Math.sqrt(this.d*this.d-1.0);}else{this.f=this.d-Math.sqrt(this.d*this.d-1.0);}}else{this.f=this.d;}
this.el=this.f*Math.pow(this.ts,this.bl);}
if(this.mode!=0){this.g=.5*(this.f-1.0/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.0)/this.cosaz);}else{this.u=-(this.al/this.bl)*Math.atan(Math.sqrt(this.d*this.d-1.0)/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=.5*(this.f-1.0/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.0*Proj4js.common.PI;if(this.dlon>Proj4js.common.PI)this.lon2=this.lon2+2.0*Proj4js.common.PI;this.dlon=this.lon1-this.lon2;this.longc=.5*(this.lon1+this.lon2)-Math.atan(this.j*Math.tan(.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.0)/this.cosaz);}else{this.u=-(this.al/this.bl)*Math.atan(Math.sqrt(this.d*this.d-1.0)/this.cosaz);}}},forward:function(p){var theta;var sin_phi,cos_phi;var b;var c,t,tq;var con,n,ml;var q,us,vl;var ul,vs;var s;var dlon;var ts1;var lon=p.x;var lat=p.y;sin_phi=Math.sin(lat);dlon=Proj4js.common.adjust_lon(lon-this.longc);vl=Math.sin(this.bl*dlon);if(Math.abs(Math.abs(lat)-Proj4js.common.HALF_PI)>Proj4js.common.EPSLN){ts1=Proj4js.common.tsfnz(this.e,lat,sin_phi);q=this.el/(Math.pow(ts1,this.bl));s=.5*(q-1.0/q);t=.5*(q+1.0/q);ul=(s*this.singam-vl*this.cosgam)/t;con=Math.cos(this.bl*dlon);if(Math.abs(con)<.0000001){us=this.al*this.bl*dlon;}else{us=this.al*Math.atan((s*this.cosgam+vl*this.singam)/con)/this.bl;if(con<0)us=us+Proj4js.common.PI*this.al/this.bl;}}else{if(lat>=0){ul=this.singam;}else{ul=-this.singam;}
us=this.al*lat/this.bl;}
if(Math.abs(Math.abs(ul)-1.0)<=Proj4js.common.EPSLN){Proj4js.reportError("omercFwdInfinity");}
vs=.5*this.al*Math.log((1.0-ul)/(1.0+ul))/this.bl;us=us-this.u;var x=this.x0+vs*this.cosaz+us*this.sinaz;var y=this.y0+us*this.cosaz-vs*this.sinaz;p.x=x;p.y=y;return p;},inverse:function(p){var delta_lon;var theta;var delta_theta;var sin_phi,cos_phi;var b;var c,t,tq;var con,n,ml;var vs,us,q,s,ts1;var vl,ul,bs;var dlon;var flag;p.x-=this.x0;p.y-=this.y0;flag=0;vs=p.x*this.cosaz-p.y*this.sinaz;us=p.y*this.cosaz+p.x*this.sinaz;us=us+this.u;q=Math.exp(-this.bl*vs/this.al);s=.5*(q-1.0/q);t=.5*(q+1.0/q);vl=Math.sin(this.bl*us/this.al);ul=(vl*this.cosgam+s*this.singam)/t;if(Math.abs(Math.abs(ul)-1.0)<=Proj4js.common.EPSLN)
{lon=this.longc;if(ul>=0.0){lat=Proj4js.common.HALF_PI;}else{lat=-Proj4js.common.HALF_PI;}}else{con=1.0/this.bl;ts1=Math.pow((this.el/Math.sqrt((1.0+ul)/(1.0-ul))),con);lat=Proj4js.common.phi2z(this.e,ts1);theta=this.longc-Math.atan2((s*this.cosgam-vl*this.singam),con)/this.bl;lon=Proj4js.common.adjust_lon(theta);}
p.x=lon;p.y=lat;return p;}};Proj4js.Proj.lcc={init:function(){if(!this.lat2){this.lat2=this.lat0;}
if(!this.k0)this.k0=1.0;if(Math.abs(this.lat1+this.lat2)<Proj4js.common.EPSLN){Proj4js.reportError("lcc:init: Equal Latitudes");return;}
var temp=this.b/this.a;this.e=Math.sqrt(1.0-temp*temp);var sin1=Math.sin(this.lat1);var cos1=Math.cos(this.lat1);var ms1=Proj4js.common.msfnz(this.e,sin1,cos1);var ts1=Proj4js.common.tsfnz(this.e,this.lat1,sin1);var sin2=Math.sin(this.lat2);var cos2=Math.cos(this.lat2);var ms2=Proj4js.common.msfnz(this.e,sin2,cos2);var ts2=Proj4js.common.tsfnz(this.e,this.lat2,sin2);var ts0=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(ms1/ms2)/Math.log(ts1/ts2);}else{this.ns=sin1;}
this.f0=ms1/(this.ns*Math.pow(ts1,this.ns));this.rh=this.a*this.f0*Math.pow(ts0,this.ns);if(!this.title)this.title="Lambert Conformal Conic";},forward:function(p){var lon=p.x;var lat=p.y;if(lat<=90.0&&lat>=-90.0&&lon<=180.0&&lon>=-180.0){}else{Proj4js.reportError("lcc:forward: llInputOutOfRange: "+lon+" : "+lat);return null;}
var con=Math.abs(Math.abs(lat)-Proj4js.common.HALF_PI);var ts,rh1;if(con>Proj4js.common.EPSLN){ts=Proj4js.common.tsfnz(this.e,lat,Math.sin(lat));rh1=this.a*this.f0*Math.pow(ts,this.ns);}else{con=lat*this.ns;if(con<=0){Proj4js.reportError("lcc:forward: No Projection");return null;}
rh1=0;}
var theta=this.ns*Proj4js.common.adjust_lon(lon-this.long0);p.x=this.k0*(rh1*Math.sin(theta))+this.x0;p.y=this.k0*(this.rh-rh1*Math.cos(theta))+this.y0;return p;},inverse:function(p){var rh1,con,ts;var lat,lon;x=(p.x-this.x0)/this.k0;y=(this.rh-(p.y-this.y0)/this.k0);if(this.ns>0){rh1=Math.sqrt(x*x+y*y);con=1.0;}else{rh1=-Math.sqrt(x*x+y*y);con=-1.0;}
var theta=0.0;if(rh1!=0){theta=Math.atan2((con*x),(con*y));}
if((rh1!=0)||(this.ns>0.0)){con=1.0/this.ns;ts=Math.pow((rh1/(this.a*this.f0)),con);lat=Proj4js.common.phi2z(this.e,ts);if(lat==-9999)return null;}else{lat=-Proj4js.common.HALF_PI;}
lon=Proj4js.common.adjust_lon(theta/this.ns+this.long0);p.x=lon;p.y=lat;return p;}};Proj4js.Proj.laea={init:function(){this.sin_lat_o=Math.sin(this.lat0);this.cos_lat_o=Math.cos(this.lat0);},forward:function(p){var lon=p.x;var lat=p.y;var delta_lon=Proj4js.common.adjust_lon(lon-this.long0);var sin_lat=Math.sin(lat);var cos_lat=Math.cos(lat);var sin_delta_lon=Math.sin(delta_lon);var cos_delta_lon=Math.cos(delta_lon);var g=this.sin_lat_o*sin_lat+this.cos_lat_o*cos_lat*cos_delta_lon;if(g==-1.0){Proj4js.reportError("laea:fwd:Point projects to a circle of radius "+2.0*R);return null;}
var ksp=this.a*Math.sqrt(2.0/(1.0+g));var x=ksp*cos_lat*sin_delta_lon+this.x0;var y=ksp*(this.cos_lat_o*sin_lat-this.sin_lat_o*cos_lat*cos_delta_lon)+this.y0;p.x=x;p.y=y;return p;},inverse:function(p){p.x-=this.x0;p.y-=this.y0;var Rh=Math.sqrt(p.x*p.x+p.y*p.y);var temp=Rh/(2.0*this.a);if(temp>1){Proj4js.reportError("laea:Inv:DataError");return null;}
var z=2.0*Proj4js.common.asinz(temp);var sin_z=Math.sin(z);var cos_z=Math.cos(z);var lon=this.long0;if(Math.abs(Rh)>Proj4js.common.EPSLN){var lat=Proj4js.common.asinz(this.sin_lat_o*cos_z+this.cos_lat_o*sin_z*p.y/Rh);var temp=Math.abs(this.lat0)-Proj4js.common.HALF_PI;if(Math.abs(temp)>Proj4js.common.EPSLN){temp=cos_z-this.sin_lat_o*Math.sin(lat);if(temp!=0.0)lon=Proj4js.common.adjust_lon(this.long0+Math.atan2(p.x*sin_z*this.cos_lat_o,temp*Rh));}else if(this.lat0<0.0){lon=Proj4js.common.adjust_lon(this.long0-Math.atan2(-p.x,p.y));}else{lon=Proj4js.common.adjust_lon(this.long0+Math.atan2(p.x,-p.y));}}else{lat=this.lat0;}
p.x=lon;p.y=lat;return p;}};Proj4js.Proj.aeqd={init:function(){this.sin_p12=Math.sin(this.lat0);this.cos_p12=Math.cos(this.lat0);},forward:function(p){var lon=p.x;var lat=p.y;var ksp;var sinphi=Math.sin(p.y);var cosphi=Math.cos(p.y);var dlon=Proj4js.common.adjust_lon(lon-this.long0);var coslon=Math.cos(dlon);var g=this.sin_p12*sinphi+this.cos_p12*cosphi*coslon;if(Math.abs(Math.abs(g)-1.0)<Proj4js.common.EPSLN){ksp=1.0;if(g<0.0){Proj4js.reportError("aeqd:Fwd:PointError");return;}}else{var z=Math.acos(g);ksp=z/Math.sin(z);}
p.x=this.x0+this.a*ksp*cosphi*Math.sin(dlon);p.y=this.y0+this.a*ksp*(this.cos_p12*sinphi-this.sin_p12*cosphi*coslon);return p;},inverse:function(p){p.x-=this.x0;p.y-=this.y0;var rh=Math.sqrt(p.x*p.x+p.y*p.y);if(rh>(2.0*Proj4js.common.HALF_PI*this.a)){Proj4js.reportError("aeqdInvDataError");return;}
var z=rh/this.a;var sinz=Math.sin(z);var cosz=Math.cos(z);var lon=this.long0;var lat;if(Math.abs(rh)<=Proj4js.common.EPSLN){lat=this.lat0;}else{lat=Proj4js.common.asinz(cosz*this.sin_p12+(p.y*sinz*this.cos_p12)/rh);var con=Math.abs(this.lat0)-Proj4js.common.HALF_PI;if(Math.abs(con)<=Proj4js.common.EPSLN){if(lat0>=0.0){lon=Proj4js.common.adjust_lon(this.long0+Math.atan2(p.x,-p.y));}else{lon=Proj4js.common.adjust_lon(this.long0-Math.atan2(-p.x,p.y));}}else{con=cosz-this.sin_p12*Math.sin(lat);if((Math.abs(con)<Proj4js.common.EPSLN)&&(Math.abs(p.x)<Proj4js.common.EPSLN)){}else{var temp=Math.atan2((p.x*sinz*this.cos_p12),(con*rh));lon=Proj4js.common.adjust_lon(this.long0+Math.atan2((p.x*sinz*this.cos_p12),(con*rh)));}}}
p.x=lon;p.y=lat;return p;}};Proj4js.Proj.moll={init:function(){},forward:function(p){var lon=p.x;var lat=p.y;var delta_lon=Proj4js.common.adjust_lon(lon-this.long0);var theta=lat;var con=Proj4js.common.PI*Math.sin(lat);for(var i=0;true;i++){var delta_theta=-(theta+Math.sin(theta)-con)/(1.0+Math.cos(theta));theta+=delta_theta;if(Math.abs(delta_theta)<Proj4js.common.EPSLN)break;if(i>=50){Proj4js.reportError("moll:Fwd:IterationError");}}
theta/=2.0;if(Proj4js.common.PI/2-Math.abs(lat)<Proj4js.common.EPSLN)delta_lon=0;var x=0.900316316158*this.a*delta_lon*Math.cos(theta)+this.x0;var y=1.4142135623731*this.a*Math.sin(theta)+this.y0;p.x=x;p.y=y;return p;},inverse:function(p){var theta;var arg;p.x-=this.x0;var arg=p.y/(1.4142135623731*this.a);if(Math.abs(arg)>0.999999999999)arg=0.999999999999;var theta=Math.asin(arg);var lon=Proj4js.common.adjust_lon(this.long0+(p.x/(0.900316316158*this.a*Math.cos(theta))));if(lon<(-Proj4js.common.PI))lon=-Proj4js.common.PI;if(lon>Proj4js.common.PI)lon=Proj4js.common.PI;arg=(2.0*theta+Math.sin(2.0*theta))/Proj4js.common.PI;if(Math.abs(arg)>1.0)arg=1.0;var lat=Math.asin(arg);p.x=lon;p.y=lat;return p;}};Ext.namespace("GeoExt.tree");GeoExt.tree.LayerNodeUI=Ext.extend(Ext.tree.TreeNodeUI,{constructor:function(config){GeoExt.tree.LayerNodeUI.superclass.constructor.apply(this,arguments);},render:function(bulkRender){var a=this.node.attributes;if(a.checked===undefined){a.checked=this.node.layer.getVisibility();}
GeoExt.tree.LayerNodeUI.superclass.render.apply(this,arguments);var cb=this.checkbox;if(a.checkedGroup){var radio=Ext.DomHelper.insertAfter(cb,['<input type="radio" name="',a.checkedGroup,'_checkbox" class="',cb.className,cb.checked?'" checked="checked"':'','"></input>'].join(""));radio.defaultChecked=cb.defaultChecked;Ext.get(cb).remove();this.checkbox=radio;}
this.enforceOneVisible();},onClick:function(e){if(e.getTarget('.x-tree-node-cb',1)){this.toggleCheck(this.isChecked());}else{GeoExt.tree.LayerNodeUI.superclass.onClick.apply(this,arguments);}},toggleCheck:function(value){value=(value===undefined?!this.isChecked():value);GeoExt.tree.LayerNodeUI.superclass.toggleCheck.call(this,value);this.enforceOneVisible();},enforceOneVisible:function(){var attributes=this.node.attributes;var group=attributes.checkedGroup;if(group){var layer=this.node.layer;var checkedNodes=this.node.getOwnerTree().getChecked();var checkedCount=0;Ext.each(checkedNodes,function(n){var l=n.layer
if(!n.hidden&&n.attributes.checkedGroup===group){checkedCount++;if(l!=layer&&attributes.checked){l.setVisibility(false);}}});if(checkedCount===0&&attributes.checked==false){layer.setVisibility(true);}}},appendDDGhost:function(ghostNode){var n=this.elNode.cloneNode(true);var radio=Ext.DomQuery.select("input[type='radio']",n);Ext.each(radio,function(r){r.name=r.name+"_clone";});ghostNode.appendChild(n);}});GeoExt.tree.LayerNode=Ext.extend(Ext.tree.AsyncTreeNode,{layer:null,layerStore:null,constructor:function(config){config.leaf=config.leaf||!(config.children||config.loader);if(!config.iconCls&&!config.children){config.iconCls="gx-tree-layer-icon";}
if(config.loader&&!(config.loader instanceof Ext.tree.TreeLoader)){config.loader=new GeoExt.tree.LayerParamLoader(config.loader);}
this.defaultUI=this.defaultUI||GeoExt.tree.LayerNodeUI;Ext.apply(this,{layer:config.layer,layerStore:config.layerStore});if(config.text){this.fixedText=true;}
GeoExt.tree.LayerNode.superclass.constructor.apply(this,arguments);},render:function(bulkRender){var layer=this.layer instanceof OpenLayers.Layer&&this.layer;if(!layer){if(!this.layerStore||this.layerStore=="auto"){this.layerStore=GeoExt.MapPanel.guess().layers;}
var i=this.layerStore.findBy(function(o){return o.get("title")==this.layer;},this);if(i!=-1){layer=this.layerStore.getAt(i).get("layer");}}
if(!this.rendered||!layer){var ui=this.getUI();if(layer){this.layer=layer;if(layer.isBaseLayer){this.draggable=false;Ext.applyIf(this.attributes,{checkedGroup:"gx_baselayer"});}
if(!this.text){this.text=layer.name;}
ui.show();this.addVisibilityEventHandlers();}else{ui.hide();}
if(this.layerStore instanceof GeoExt.data.LayerStore){this.addStoreEventHandlers(layer);}}
GeoExt.tree.LayerNode.superclass.render.apply(this,arguments);},addVisibilityEventHandlers:function(){this.layer.events.on({"visibilitychanged":this.onLayerVisibilityChanged,scope:this});this.on({"checkchange":this.onCheckChange,scope:this});},onLayerVisibilityChanged:function(){if(!this._visibilityChanging){this.getUI().toggleCheck(this.layer.getVisibility());}},onCheckChange:function(node,checked){if(checked!=this.layer.getVisibility()){this._visibilityChanging=true;var layer=this.layer;if(checked&&layer.isBaseLayer&&layer.map){layer.map.setBaseLayer(layer);}else{layer.setVisibility(checked);}
delete this._visibilityChanging;}},addStoreEventHandlers:function(){this.layerStore.on({"add":this.onStoreAdd,"remove":this.onStoreRemove,"update":this.onStoreUpdate,scope:this});},onStoreAdd:function(store,records,index){var l;for(var i=0;i<records.length;++i){l=records[i].get("layer");if(this.layer==l){this.getUI().show();break;}else if(this.layer==l.name){this.render();break;}}},onStoreRemove:function(store,record,index){if(this.layer==record.get("layer")){this.getUI().hide();}},onStoreUpdate:function(store,record,operation){var layer=record.get("layer");if(!this.fixedText&&(this.layer==layer&&this.text!==layer.name)){this.setText(layer.name);}},destroy:function(){var layer=this.layer;if(layer instanceof OpenLayers.Layer){layer.events.un({"visibilitychanged":this.onLayerVisibilityChanged,scope:this});}
delete this.layer;var layerStore=this.layerStore;if(layerStore){layerStore.un("add",this.onStoreAdd,this);layerStore.un("remove",this.onStoreRemove,this);layerStore.un("update",this.onStoreUpdate,this);}
delete this.layerStore;this.un("checkchange",this.onCheckChange,this);GeoExt.tree.LayerNode.superclass.destroy.apply(this,arguments);}});Ext.tree.TreePanel.nodeTypes.gx_layer=GeoExt.tree.LayerNode;Ext.namespace("GeoExt.ux");GeoExt.ux.ScaleSelectorCombo=Ext.extend(Ext.form.ComboBox,{map:null,tpl:'<tpl for="."><div class="x-combo-list-item">1 : {[values.formattedScale]} </div></tpl>',editable:false,triggerAction:'all',mode:'local',thousandSeparator:'\'',decimalNumber:0,fakeScaleValue:null,initComponent:function(){GeoExt.ux.ScaleSelectorCombo.superclass.initComponent.apply(this,arguments);this.store=new GeoExt.data.ScaleStore({map:this.map});if(this.getLocalDecimalSeparator()==this.thousandSeparator){this.thousandSeparator='\'';}
for(var i=0;i<this.store.getCount();i++){if(this.fakeScaleValue){this.store.getAt(i).data.formattedScale=this.addThousandSeparator(this.roundNumber(this.fakeScaleValue[i],this.decimalNumber),this.thousandSeparator);}else{this.store.getAt(i).data.formattedScale=this.addThousandSeparator(this.roundNumber(this.store.getAt(i).data.scale,this.decimalNumber),this.thousandSeparator);}}
this.on('select',function(combo,record,index){this.map.zoomTo(record.data.level);},this);this.map.events.register('zoomend',this,this.zoomendUpdate);this.map.events.triggerEvent("zoomend");},zoomendUpdate:function(record){var scale=this.store.queryBy(function(record){return this.map.getZoom()==record.data.level;});if(scale.length>0){scale=scale.items[0];this.setValue("1 : "+scale.data.formattedScale);}else{if(!this.rendered){return;}
this.clearValue();}},addThousandSeparator:function(value,separator){if(separator===null){return value;}
value=value.toString();var sRegExp=new RegExp('(-?[0-9]+)([0-9]{3})');while(sRegExp.test(value)){value=value.replace(sRegExp,'$1'+separator+'$2');}
if(this.decimalNumber>3){var decimalPosition=value.lastIndexOf(this.getLocalDecimalSeparator());if(decimalPosition>0){var postDecimalCharacter=value.substr(decimalPosition);value=value.substr(0,decimalPosition)+postDecimalCharacter.replace(separator,'');}}
return value;},roundNumber:function(value,decimals){return Math.round(value*Math.pow(10,decimals))/Math.pow(10,decimals);},getLocalDecimalSeparator:function(){var n=1.1;return n.toLocaleString().substring(1,2);},beforeDestroy:function(){this.map.events.unregister('zoomend',this,this.zoomendUpdate);GeoExt.ux.ScaleSelectorCombo.superclass.beforeDestroy.apply(this,arguments);}});Ext.reg('gxux_scaleselectorcombo',GeoExt.ux.ScaleSelectorCombo);OpenLayers.Format=OpenLayers.Class({options:null,externalProjection:null,internalProjection:null,data:null,keepData:false,initialize:function(options){OpenLayers.Util.extend(this,options);this.options=options;},destroy:function(){},read:function(data){OpenLayers.Console.userError(OpenLayers.i18n("readNotImplemented"));},write:function(object){OpenLayers.Console.userError(OpenLayers.i18n("writeNotImplemented"));},CLASS_NAME:"OpenLayers.Format"});OpenLayers.Format.XML=OpenLayers.Class(OpenLayers.Format,{namespaces:null,namespaceAlias:null,defaultPrefix:null,readers:{},writers:{},xmldom:null,initialize:function(options){if(window.ActiveXObject){this.xmldom=new ActiveXObject("Microsoft.XMLDOM");}
OpenLayers.Format.prototype.initialize.apply(this,[options]);this.namespaces=OpenLayers.Util.extend({},this.namespaces);this.namespaceAlias={};for(var alias in this.namespaces){this.namespaceAlias[this.namespaces[alias]]=alias;}},destroy:function(){this.xmldom=null;OpenLayers.Format.prototype.destroy.apply(this,arguments);},setNamespace:function(alias,uri){this.namespaces[alias]=uri;this.namespaceAlias[uri]=alias;},read:function(text){var index=text.indexOf('<');if(index>0){text=text.substring(index);}
var node=OpenLayers.Util.Try(OpenLayers.Function.bind((function(){var xmldom;if(window.ActiveXObject&&!this.xmldom){xmldom=new ActiveXObject("Microsoft.XMLDOM");}else{xmldom=this.xmldom;}
xmldom.loadXML(text);return xmldom;}),this),function(){return new DOMParser().parseFromString(text,'text/xml');},function(){var req=new XMLHttpRequest();req.open("GET","data:"+"text/xml"+";charset=utf-8,"+encodeURIComponent(text),false);if(req.overrideMimeType){req.overrideMimeType("text/xml");}
req.send(null);return req.responseXML;});if(this.keepData){this.data=node;}
return node;},write:function(node){var data;if(this.xmldom){data=node.xml;}else{var serializer=new XMLSerializer();if(node.nodeType==1){var doc=document.implementation.createDocument("","",null);if(doc.importNode){node=doc.importNode(node,true);}
doc.appendChild(node);data=serializer.serializeToString(doc);}else{data=serializer.serializeToString(node);}}
return data;},createElementNS:function(uri,name){var element;if(this.xmldom){if(typeof uri=="string"){element=this.xmldom.createNode(1,name,uri);}else{element=this.xmldom.createNode(1,name,"");}}else{element=document.createElementNS(uri,name);}
return element;},createTextNode:function(text){var node;if(this.xmldom){node=this.xmldom.createTextNode(text);}else{node=document.createTextNode(text);}
return node;},getElementsByTagNameNS:function(node,uri,name){var elements=[];if(node.getElementsByTagNameNS){elements=node.getElementsByTagNameNS(uri,name);}else{var allNodes=node.getElementsByTagName("*");var potentialNode,fullName;for(var i=0,len=allNodes.length;i<len;++i){potentialNode=allNodes[i];fullName=(potentialNode.prefix)?(potentialNode.prefix+":"+name):name;if((name=="*")||(fullName==potentialNode.nodeName)){if((uri=="*")||(uri==potentialNode.namespaceURI)){elements.push(potentialNode);}}}}
return elements;},getAttributeNodeNS:function(node,uri,name){var attributeNode=null;if(node.getAttributeNodeNS){attributeNode=node.getAttributeNodeNS(uri,name);}else{var attributes=node.attributes;var potentialNode,fullName;for(var i=0,len=attributes.length;i<len;++i){potentialNode=attributes[i];if(potentialNode.namespaceURI==uri){fullName=(potentialNode.prefix)?(potentialNode.prefix+":"+name):name;if(fullName==potentialNode.nodeName){attributeNode=potentialNode;break;}}}}
return attributeNode;},getAttributeNS:function(node,uri,name){var attributeValue="";if(node.getAttributeNS){attributeValue=node.getAttributeNS(uri,name)||"";}else{var attributeNode=this.getAttributeNodeNS(node,uri,name);if(attributeNode){attributeValue=attributeNode.nodeValue;}}
return attributeValue;},getChildValue:function(node,def){var value=def||"";if(node){for(var child=node.firstChild;child;child=child.nextSibling){switch(child.nodeType){case 3:case 4:value+=child.nodeValue;}}}
return value;},concatChildValues:function(node,def){var value="";var child=node.firstChild;var childValue;while(child){childValue=child.nodeValue;if(childValue){value+=childValue;}
child=child.nextSibling;}
if(value==""&&def!=undefined){value=def;}
return value;},isSimpleContent:function(node){var simple=true;for(var child=node.firstChild;child;child=child.nextSibling){if(child.nodeType===1){simple=false;break;}}
return simple;},contentType:function(node){var simple=false,complex=false;var type=OpenLayers.Format.XML.CONTENT_TYPE.EMPTY;for(var child=node.firstChild;child;child=child.nextSibling){switch(child.nodeType){case 1:complex=true;break;case 8:break;default:simple=true;}
if(complex&&simple){break;}}
if(complex&&simple){type=OpenLayers.Format.XML.CONTENT_TYPE.MIXED;}else if(complex){return OpenLayers.Format.XML.CONTENT_TYPE.COMPLEX;}else if(simple){return OpenLayers.Format.XML.CONTENT_TYPE.SIMPLE;}
return type;},hasAttributeNS:function(node,uri,name){var found=false;if(node.hasAttributeNS){found=node.hasAttributeNS(uri,name);}else{found=!!this.getAttributeNodeNS(node,uri,name);}
return found;},setAttributeNS:function(node,uri,name,value){if(node.setAttributeNS){node.setAttributeNS(uri,name,value);}else{if(this.xmldom){if(uri){var attribute=node.ownerDocument.createNode(2,name,uri);attribute.nodeValue=value;node.setAttributeNode(attribute);}else{node.setAttribute(name,value);}}else{throw"setAttributeNS not implemented";}}},createElementNSPlus:function(name,options){options=options||{};var uri=options.uri||this.namespaces[options.prefix];if(!uri){var loc=name.indexOf(":");uri=this.namespaces[name.substring(0,loc)];}
if(!uri){uri=this.namespaces[this.defaultPrefix];}
var node=this.createElementNS(uri,name);if(options.attributes){this.setAttributes(node,options.attributes);}
var value=options.value;if(value!=null){if(typeof value=="boolean"){value=String(value);}
node.appendChild(this.createTextNode(value));}
return node;},setAttributes:function(node,obj){var value,uri;for(var name in obj){if(obj[name]!=null&&obj[name].toString){value=obj[name].toString();uri=this.namespaces[name.substring(0,name.indexOf(":"))]||null;this.setAttributeNS(node,uri,name,value);}}},readNode:function(node,obj){if(!obj){obj={};}
var group=this.readers[node.namespaceURI?this.namespaceAlias[node.namespaceURI]:this.defaultPrefix];if(group){var local=node.localName||node.nodeName.split(":").pop();var reader=group[local]||group["*"];if(reader){reader.apply(this,[node,obj]);}}
return obj;},readChildNodes:function(node,obj){if(!obj){obj={};}
var children=node.childNodes;var child;for(var i=0,len=children.length;i<len;++i){child=children[i];if(child.nodeType==1){this.readNode(child,obj);}}
return obj;},writeNode:function(name,obj,parent){var prefix,local;var split=name.indexOf(":");if(split>0){prefix=name.substring(0,split);local=name.substring(split+1);}else{if(parent){prefix=this.namespaceAlias[parent.namespaceURI];}else{prefix=this.defaultPrefix;}
local=name;}
var child=this.writers[prefix][local].apply(this,[obj]);if(parent){parent.appendChild(child);}
return child;},getChildEl:function(node,name,uri){return node&&this.getThisOrNextEl(node.firstChild,name,uri);},getNextEl:function(node,name,uri){return node&&this.getThisOrNextEl(node.nextSibling,name,uri);},getThisOrNextEl:function(node,name,uri){outer:for(var sibling=node;sibling;sibling=sibling.nextSibling){switch(sibling.nodeType){case 1:if((!name||name===(sibling.localName||sibling.nodeName.split(":").pop()))&&(!uri||uri===sibling.namespaceURI)){break outer;}
sibling=null;break outer;case 3:if(/^\s*$/.test(sibling.nodeValue)){break;}
case 4:case 6:case 12:case 10:case 11:sibling=null;break outer;}}
return sibling||null;},lookupNamespaceURI:function(node,prefix){var uri=null;if(node){if(node.lookupNamespaceURI){uri=node.lookupNamespaceURI(prefix);}else{outer:switch(node.nodeType){case 1:if(node.namespaceURI!==null&&node.prefix===prefix){uri=node.namespaceURI;break outer;}
var len=node.attributes.length;if(len){var attr;for(var i=0;i<len;++i){attr=node.attributes[i];if(attr.prefix==="xmlns"&&attr.name==="xmlns:"+prefix){uri=attr.value||null;break outer;}else if(attr.name==="xmlns"&&prefix===null){uri=attr.value||null;break outer;}}}
uri=this.lookupNamespaceURI(node.parentNode,prefix);break outer;case 2:uri=this.lookupNamespaceURI(node.ownerElement,prefix);break outer;case 9:uri=this.lookupNamespaceURI(node.documentElement,prefix);break outer;case 6:case 12:case 10:case 11:break outer;default:uri=this.lookupNamespaceURI(node.parentNode,prefix);break outer;}}}
return uri;},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.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(event){return event.target||event.srcElement;},isLeftClick:function(event){return(((event.which)&&(event.which==1))||((event.button)&&(event.button==1)));},isRightClick:function(event){return(((event.which)&&(event.which==3))||((event.button)&&(event.button==2)));},stop:function(event,allowDefault){if(!allowDefault){if(event.preventDefault){event.preventDefault();}else{event.returnValue=false;}}
if(event.stopPropagation){event.stopPropagation();}else{event.cancelBubble=true;}},findElement:function(event,tagName){var element=OpenLayers.Event.element(event);while(element.parentNode&&(!element.tagName||(element.tagName.toUpperCase()!=tagName.toUpperCase()))){element=element.parentNode;}
return element;},observe:function(elementParam,name,observer,useCapture){var element=OpenLayers.Util.getElement(elementParam);useCapture=useCapture||false;if(name=='keypress'&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||element.attachEvent)){name='keydown';}
if(!this.observers){this.observers={};}
if(!element._eventCacheID){var idPrefix="eventCacheID_";if(element.id){idPrefix=element.id+"_"+idPrefix;}
element._eventCacheID=OpenLayers.Util.createUniqueID(idPrefix);}
var cacheID=element._eventCacheID;if(!this.observers[cacheID]){this.observers[cacheID]=[];}
this.observers[cacheID].push({'element':element,'name':name,'observer':observer,'useCapture':useCapture});if(element.addEventListener){element.addEventListener(name,observer,useCapture);}else if(element.attachEvent){element.attachEvent('on'+name,observer);}},stopObservingElement:function(elementParam){var element=OpenLayers.Util.getElement(elementParam);var cacheID=element._eventCacheID;this._removeElementObservers(OpenLayers.Event.observers[cacheID]);},_removeElementObservers:function(elementObservers){if(elementObservers){for(var i=elementObservers.length-1;i>=0;i--){var entry=elementObservers[i];var args=new Array(entry.element,entry.name,entry.observer,entry.useCapture);var removed=OpenLayers.Event.stopObserving.apply(this,args);}}},stopObserving:function(elementParam,name,observer,useCapture){useCapture=useCapture||false;var element=OpenLayers.Util.getElement(elementParam);var cacheID=element._eventCacheID;if(name=='keypress'){if(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||element.detachEvent){name='keydown';}}
var foundEntry=false;var elementObservers=OpenLayers.Event.observers[cacheID];if(elementObservers){var i=0;while(!foundEntry&&i<elementObservers.length){var cacheEntry=elementObservers[i];if((cacheEntry.name==name)&&(cacheEntry.observer==observer)&&(cacheEntry.useCapture==useCapture)){elementObservers.splice(i,1);if(elementObservers.length==0){delete OpenLayers.Event.observers[cacheID];}
foundEntry=true;break;}
i++;}}
if(foundEntry){if(element.removeEventListener){element.removeEventListener(name,observer,useCapture);}else if(element&&element.detachEvent){element.detachEvent('on'+name,observer);}}
return foundEntry;},unloadCache:function(){if(OpenLayers.Event&&OpenLayers.Event.observers){for(var cacheID in OpenLayers.Event.observers){var elementObservers=OpenLayers.Event.observers[cacheID];OpenLayers.Event._removeElementObservers.apply(this,[elementObservers]);}
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(object,element,eventTypes,fallThrough,options){OpenLayers.Util.extend(this,options);this.object=object;this.fallThrough=fallThrough;this.listeners={};this.eventHandler=OpenLayers.Function.bindAsEventListener(this.handleBrowserEvent,this);this.clearMouseListener=OpenLayers.Function.bind(this.clearMouseCache,this);this.eventTypes=[];if(eventTypes!=null){for(var i=0,len=eventTypes.length;i<len;i++){this.addEventType(eventTypes[i]);}}
if(element!=null){this.attachToElement(element);}},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(eventName){if(!this.listeners[eventName]){this.eventTypes.push(eventName);this.listeners[eventName]=[];}},attachToElement:function(element){if(this.element){OpenLayers.Event.stopObservingElement(this.element);}
this.element=element;for(var i=0,len=this.BROWSER_EVENTS.length;i<len;i++){var eventType=this.BROWSER_EVENTS[i];this.addEventType(eventType);OpenLayers.Event.observe(element,eventType,this.eventHandler);}
OpenLayers.Event.observe(element,"dragstart",OpenLayers.Event.stop);},on:function(object){for(var type in object){if(type!="scope"){this.register(type,object.scope,object[type]);}}},register:function(type,obj,func){if((func!=null)&&(OpenLayers.Util.indexOf(this.eventTypes,type)!=-1)){if(obj==null){obj=this.object;}
var listeners=this.listeners[type];listeners.push({obj:obj,func:func});}},registerPriority:function(type,obj,func){if(func!=null){if(obj==null){obj=this.object;}
var listeners=this.listeners[type];if(listeners!=null){listeners.unshift({obj:obj,func:func});}}},un:function(object){for(var type in object){if(type!="scope"){this.unregister(type,object.scope,object[type]);}}},unregister:function(type,obj,func){if(obj==null){obj=this.object;}
var listeners=this.listeners[type];if(listeners!=null){for(var i=0,len=listeners.length;i<len;i++){if(listeners[i].obj==obj&&listeners[i].func==func){listeners.splice(i,1);break;}}}},remove:function(type){if(this.listeners[type]!=null){this.listeners[type]=[];}},triggerEvent:function(type,evt){var listeners=this.listeners[type];if(!listeners||listeners.length==0){return;}
if(evt==null){evt={};}
evt.object=this.object;evt.element=this.element;if(!evt.type){evt.type=type;}
var listeners=listeners.slice(),continueChain;for(var i=0,len=listeners.length;i<len;i++){var callback=listeners[i];continueChain=callback.func.apply(callback.obj,[evt]);if((continueChain!=undefined)&&(continueChain==false)){break;}}
if(!this.fallThrough){OpenLayers.Event.stop(evt,true);}
return continueChain;},handleBrowserEvent:function(evt){if(this.includeXY){evt.xy=this.getMousePosition(evt);}
this.triggerEvent(evt.type,evt);},clearMouseCache:function(){this.element.scrolls=null;this.element.lefttop=null;this.element.offsets=null;},getMousePosition:function(evt){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((evt.clientX+this.element.scrolls[0])-this.element.offsets[0]
-this.element.lefttop[0],(evt.clientY+this.element.scrolls[1])-this.element.offsets[1]
-this.element.lefttop[1]);},CLASS_NAME:"OpenLayers.Events"});OpenLayers.Icon=OpenLayers.Class({url:null,size:null,offset:null,calculateOffset:null,imageDiv:null,px:null,initialize:function(url,size,offset,calculateOffset){this.url=url;this.size=(size)?size:new OpenLayers.Size(20,20);this.offset=offset?offset:new OpenLayers.Pixel(-(this.size.w/2),-(this.size.h/2));this.calculateOffset=calculateOffset;var id=OpenLayers.Util.createUniqueID("OL_Icon_");this.imageDiv=OpenLayers.Util.createAlphaImageDiv(id);},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(size){if(size!=null){this.size=size;}
this.draw();},setUrl:function(url){if(url!=null){this.url=url;}
this.draw();},draw:function(px){OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv,null,null,this.size,this.url,"absolute");this.moveTo(px);return this.imageDiv;},erase:function(){if(this.imageDiv!=null&&this.imageDiv.parentNode!=null){OpenLayers.Element.remove(this.imageDiv);}},setOpacity:function(opacity){OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv,null,null,null,null,null,null,null,opacity);},moveTo:function(px){if(px!=null){this.px=px;}
if(this.imageDiv!=null){if(this.px==null){this.display(false);}else{if(this.calculateOffset){this.offset=this.calculateOffset(this.size);}
var offsetPx=this.px.offset(this.offset);OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv,null,offsetPx);}}},display:function(display){this.imageDiv.style.display=(display)?"":"none";},isDrawn:function(){var isDrawn=(this.imageDiv&&this.imageDiv.parentNode&&(this.imageDiv.parentNode.nodeType!=11));return isDrawn;},CLASS_NAME:"OpenLayers.Icon"});OpenLayers.Marker=OpenLayers.Class({icon:null,lonlat:null,events:null,map:null,initialize:function(lonlat,icon){this.lonlat=lonlat;var newIcon=(icon)?icon:OpenLayers.Marker.defaultIcon();if(this.icon==null){this.icon=newIcon;}else{this.icon.url=newIcon.url;this.icon.size=newIcon.size;this.icon.offset=newIcon.offset;this.icon.calculateOffset=newIcon.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(px){return this.icon.draw(px);},erase:function(){if(this.icon!=null){this.icon.erase();}},moveTo:function(px){if((px!=null)&&(this.icon!=null)){this.icon.moveTo(px);}
this.lonlat=this.map.getLonLatFromLayerPx(px);},isDrawn:function(){var isDrawn=(this.icon&&this.icon.isDrawn());return isDrawn;},onScreen:function(){var onScreen=false;if(this.map){var screenBounds=this.map.getExtent();onScreen=screenBounds.containsLonLat(this.lonlat);}
return onScreen;},inflate:function(inflate){if(this.icon){var newSize=new OpenLayers.Size(this.icon.size.w*inflate,this.icon.size.h*inflate);this.icon.setSize(newSize);}},setOpacity:function(opacity){this.icon.setOpacity(opacity);},setUrl:function(url){this.icon.setUrl(url);},display:function(display){this.icon.display(display);},CLASS_NAME:"OpenLayers.Marker"});OpenLayers.Marker.defaultIcon=function(){var url=OpenLayers.Util.getImagesLocation()+"marker.png";var size=new OpenLayers.Size(21,25);var calculateOffset=function(size){return new OpenLayers.Pixel(-(size.w/2),-size.h);};return new OpenLayers.Icon(url,size,null,calculateOffset);};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(id,lonlat,contentSize,contentHTML,closeBox,closeBoxCallback){if(id==null){id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");}
this.id=id;this.lonlat=lonlat;this.contentSize=(contentSize!=null)?contentSize:new OpenLayers.Size(OpenLayers.Popup.WIDTH,OpenLayers.Popup.HEIGHT);if(contentHTML!=null){this.contentHTML=contentHTML;}
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 groupDivId=this.id+"_GroupDiv";this.groupDiv=OpenLayers.Util.createDiv(groupDivId,null,null,null,"relative",null,"hidden");var id=this.div.id+"_contentDiv";this.contentDiv=OpenLayers.Util.createDiv(id,null,this.contentSize.clone(),null,"relative");this.contentDiv.className=this.contentDisplayClass;this.groupDiv.appendChild(this.contentDiv);this.div.appendChild(this.groupDiv);if(closeBox){this.addCloseBox(closeBoxCallback);}
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(px){if(px==null){if((this.lonlat!=null)&&(this.map!=null)){px=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 style=document.defaultView.getComputedStyle(this.contentDiv,null);var currentOverflow=style.getPropertyValue("overflow");if(currentOverflow!="hidden"){this.contentDiv._oldOverflow=currentOverflow;this.contentDiv.style.overflow="hidden";}});this.map.events.register("moveend",this,function(){var oldOverflow=this.contentDiv._oldOverflow;if(oldOverflow){this.contentDiv.style.overflow=oldOverflow;this.contentDiv._oldOverflow=null;}});}
this.moveTo(px);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 px=this.map.getLayerPxFromLonLat(this.lonlat);if(px){this.moveTo(px);}}},moveTo:function(px){if((px!=null)&&(this.div!=null)){this.div.style.left=px.x+"px";this.div.style.top=px.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(contentSize){this.size=contentSize.clone();var contentDivPadding=this.getContentDivPadding();var wPadding=contentDivPadding.left+contentDivPadding.right;var hPadding=contentDivPadding.top+contentDivPadding.bottom;this.fixPadding();wPadding+=this.padding.left+this.padding.right;hPadding+=this.padding.top+this.padding.bottom;if(this.closeDiv){var closeDivWidth=parseInt(this.closeDiv.style.width);wPadding+=closeDivWidth+contentDivPadding.right;}
this.size.w+=wPadding;this.size.h+=hPadding;if(OpenLayers.Util.getBrowserName()=="msie"){this.contentSize.w+=contentDivPadding.left+contentDivPadding.right;this.contentSize.h+=contentDivPadding.bottom+contentDivPadding.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=contentSize.w+"px";this.contentDiv.style.height=contentSize.h+"px";}},updateSize:function(){var preparedHTML="<div class='"+this.contentDisplayClass+"'>"+
this.contentDiv.innerHTML+"</div>";var containerElement=(this.map)?this.map.layerContainerDiv:document.body;var realSize=OpenLayers.Util.getRenderedDimensions(preparedHTML,null,{displayClass:this.displayClass,containerElement:containerElement});var safeSize=this.getSafeContentSize(realSize);var newSize=null;if(safeSize.equals(realSize)){newSize=realSize;}else{var fixedSize=new OpenLayers.Size();fixedSize.w=(safeSize.w<realSize.w)?safeSize.w:null;fixedSize.h=(safeSize.h<realSize.h)?safeSize.h:null;if(fixedSize.w&&fixedSize.h){newSize=safeSize;}else{var clippedSize=OpenLayers.Util.getRenderedDimensions(preparedHTML,fixedSize,{displayClass:this.contentDisplayClass,containerElement:containerElement});var currentOverflow=OpenLayers.Element.getStyle(this.contentDiv,"overflow");if((currentOverflow!="hidden")&&(clippedSize.equals(safeSize))){var scrollBar=OpenLayers.Util.getScrollbarWidth();if(fixedSize.w){clippedSize.h+=scrollBar;}else{clippedSize.w+=scrollBar;}}
newSize=this.getSafeContentSize(clippedSize);}}
this.setSize(newSize);},setBackgroundColor:function(color){if(color!=undefined){this.backgroundColor=color;}
if(this.div!=null){this.div.style.backgroundColor=this.backgroundColor;}},setOpacity:function(opacity){if(opacity!=undefined){this.opacity=opacity;}
if(this.div!=null){this.div.style.opacity=this.opacity;this.div.style.filter='alpha(opacity='+this.opacity*100+')';}},setBorder:function(border){if(border!=undefined){this.border=border;}
if(this.div!=null){this.div.style.border=this.border;}},setContentHTML:function(contentHTML){if(contentHTML!=null){this.contentHTML=contentHTML;}
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 onImgLoad=function(){this.popup.updateSize();if(this.popup.visible()&&this.popup.panMapIfOutOfView){this.popup.panIntoView();}
OpenLayers.Event.stopObserving(this.img,"load",this.img._onImageLoad);};var images=this.contentDiv.getElementsByTagName("img");for(var i=0,len=images.length;i<len;i++){var img=images[i];if(img.width==0||img.height==0){var context={'popup':this,'img':img};img._onImgLoad=OpenLayers.Function.bind(onImgLoad,context);OpenLayers.Event.observe(img,'load',img._onImgLoad);}}},getSafeContentSize:function(size){var safeContentSize=size.clone();var contentDivPadding=this.getContentDivPadding();var wPadding=contentDivPadding.left+contentDivPadding.right;var hPadding=contentDivPadding.top+contentDivPadding.bottom;this.fixPadding();wPadding+=this.padding.left+this.padding.right;hPadding+=this.padding.top+this.padding.bottom;if(this.closeDiv){var closeDivWidth=parseInt(this.closeDiv.style.width);wPadding+=closeDivWidth+contentDivPadding.right;}
if(this.minSize){safeContentSize.w=Math.max(safeContentSize.w,(this.minSize.w-wPadding));safeContentSize.h=Math.max(safeContentSize.h,(this.minSize.h-hPadding));}
if(this.maxSize){safeContentSize.w=Math.min(safeContentSize.w,(this.maxSize.w-wPadding));safeContentSize.h=Math.min(safeContentSize.h,(this.maxSize.h-hPadding));}
if(this.map&&this.map.size){var extraX=0,extraY=0;if(this.keepInMap&&!this.panMapIfOutOfView){var px=this.map.getPixelFromLonLat(this.lonlat);switch(this.relativePosition){case"tr":extraX=px.x;extraY=this.map.size.h-px.y;break;case"tl":extraX=this.map.size.w-px.x;extraY=this.map.size.h-px.y;break;case"bl":extraX=this.map.size.w-px.x;extraY=px.y;break;case"br":extraX=px.x;extraY=px.y;break;default:extraX=px.x;extraY=this.map.size.h-px.y;break;}}
var maxY=this.map.size.h-
this.map.paddingForPopups.top-
this.map.paddingForPopups.bottom-
hPadding-extraY;var maxX=this.map.size.w-
this.map.paddingForPopups.left-
this.map.paddingForPopups.right-
wPadding-extraX;safeContentSize.w=Math.min(safeContentSize.w,maxX);safeContentSize.h=Math.min(safeContentSize.h,maxY);}
return safeContentSize;},getContentDivPadding:function(){var contentDivPadding=this._contentDivPadding;if(!contentDivPadding){if(this.div.parentNode==null){this.div.style.display="none";document.body.appendChild(this.div);}
contentDivPadding=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=contentDivPadding;if(this.div.parentNode==document.body){document.body.removeChild(this.div);this.div.style.display="";}}
return contentDivPadding;},addCloseBox:function(callback){this.closeDiv=OpenLayers.Util.createDiv(this.id+"_close",null,new OpenLayers.Size(17,17));this.closeDiv.className="olPopupCloseBox";var contentDivPadding=this.getContentDivPadding();this.closeDiv.style.right=contentDivPadding.right+"px";this.closeDiv.style.top=contentDivPadding.top+"px";this.groupDiv.appendChild(this.closeDiv);var closePopup=callback||function(e){this.hide();OpenLayers.Event.stop(e);};OpenLayers.Event.observe(this.closeDiv,"click",OpenLayers.Function.bindAsEventListener(closePopup,this));},panIntoView:function(){var mapSize=this.map.getSize();var origTL=this.map.getViewPortPxFromLayerPx(new OpenLayers.Pixel(parseInt(this.div.style.left),parseInt(this.div.style.top)));var newTL=origTL.clone();if(origTL.x<this.map.paddingForPopups.left){newTL.x=this.map.paddingForPopups.left;}else
if((origTL.x+this.size.w)>(mapSize.w-this.map.paddingForPopups.right)){newTL.x=mapSize.w-this.map.paddingForPopups.right-this.size.w;}
if(origTL.y<this.map.paddingForPopups.top){newTL.y=this.map.paddingForPopups.top;}else
if((origTL.y+this.size.h)>(mapSize.h-this.map.paddingForPopups.bottom)){newTL.y=mapSize.h-this.map.paddingForPopups.bottom-this.size.h;}
var dx=origTL.x-newTL.x;var dy=origTL.y-newTL.y;this.map.pan(dx,dy);},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(evt){this.mousedown=true;OpenLayers.Event.stop(evt,true);},onmousemove:function(evt){if(this.mousedown){OpenLayers.Event.stop(evt,true);}},onmouseup:function(evt){if(this.mousedown){this.mousedown=false;OpenLayers.Event.stop(evt,true);}},onclick:function(evt){OpenLayers.Event.stop(evt,true);},onmouseout:function(evt){this.mousedown=false;},ondblclick:function(evt){OpenLayers.Event.stop(evt,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.Popup.Anchored=OpenLayers.Class(OpenLayers.Popup,{relativePosition:null,keepInMap:true,anchor:null,initialize:function(id,lonlat,contentSize,contentHTML,anchor,closeBox,closeBoxCallback){var newArguments=[id,lonlat,contentSize,contentHTML,closeBox,closeBoxCallback];OpenLayers.Popup.prototype.initialize.apply(this,newArguments);this.anchor=(anchor!=null)?anchor:{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(px){var oldRelativePosition=this.relativePosition;this.relativePosition=this.calculateRelativePosition(px);var newPx=this.calculateNewPx(px);var newArguments=new Array(newPx);OpenLayers.Popup.prototype.moveTo.apply(this,newArguments);if(this.relativePosition!=oldRelativePosition){this.updateRelativePosition();}},setSize:function(contentSize){OpenLayers.Popup.prototype.setSize.apply(this,arguments);if((this.lonlat)&&(this.map)){var px=this.map.getLayerPxFromLonLat(this.lonlat);this.moveTo(px);}},calculateRelativePosition:function(px){var lonlat=this.map.getLonLatFromLayerPx(px);var extent=this.map.getExtent();var quadrant=extent.determineQuadrant(lonlat);return OpenLayers.Bounds.oppositeQuadrant(quadrant);},updateRelativePosition:function(){},calculateNewPx:function(px){var newPx=px.offset(this.anchor.offset);var size=this.size||this.contentSize;var top=(this.relativePosition.charAt(0)=='t');newPx.y+=(top)?-size.h:this.anchor.size.h;var left=(this.relativePosition.charAt(1)=='l');newPx.x+=(left)?-size.w:this.anchor.size.w;return newPx;},CLASS_NAME:"OpenLayers.Popup.Anchored"});OpenLayers.Popup.AnchoredBubble=OpenLayers.Class(OpenLayers.Popup.Anchored,{rounded:false,initialize:function(id,lonlat,contentSize,contentHTML,anchor,closeBox,closeBoxCallback){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(px){OpenLayers.Popup.Anchored.prototype.draw.apply(this,arguments);this.setContentHTML();this.setBackgroundColor();this.setOpacity();return this.div;},updateRelativePosition:function(){this.setRicoCorners();},setSize:function(contentSize){OpenLayers.Popup.Anchored.prototype.setSize.apply(this,arguments);this.setRicoCorners();},setBackgroundColor:function(color){if(color!=undefined){this.backgroundColor=color;}
if(this.div!=null){if(this.contentDiv!=null){this.div.style.background="transparent";OpenLayers.Rico.Corner.changeColor(this.groupDiv,this.backgroundColor);}}},setOpacity:function(opacity){OpenLayers.Popup.Anchored.prototype.setOpacity.call(this,opacity);if(this.div!=null){if(this.groupDiv!=null){OpenLayers.Rico.Corner.changeOpacity(this.groupDiv,this.opacity);}}},setBorder:function(border){this.border=0;},setRicoCorners:function(){var corners=this.getCornersToRound(this.relativePosition);var options={corners:corners,color:this.backgroundColor,bgColor:"transparent",blend:false};if(!this.rounded){OpenLayers.Rico.Corner.round(this.div,options);this.rounded=true;}else{OpenLayers.Rico.Corner.reRound(this.groupDiv,options);this.setBackgroundColor();this.setOpacity();}},getCornersToRound:function(){var corners=['tl','tr','bl','br'];var corner=OpenLayers.Bounds.oppositeQuadrant(this.relativePosition);OpenLayers.Util.removeItem(corners,corner);return corners.join(" ");},CLASS_NAME:"OpenLayers.Popup.AnchoredBubble"});OpenLayers.Popup.AnchoredBubble.CORNER_SIZE=5;OpenLayers.Feature=OpenLayers.Class({layer:null,id:null,lonlat:null,data:null,marker:null,popupClass:OpenLayers.Popup.AnchoredBubble,popup:null,initialize:function(layer,lonlat,data){this.layer=layer;this.lonlat=lonlat;this.data=(data!=null)?data:{};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 onScreen=false;if((this.layer!=null)&&(this.layer.map!=null)){var screenBounds=this.layer.map.getExtent();onScreen=screenBounds.containsLonLat(this.lonlat);}
return onScreen;},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(closeBox){if(this.lonlat!=null){var id=this.id+"_popup";var anchor=(this.marker)?this.marker.icon:null;if(!this.popup){this.popup=new this.popupClass(id,this.lonlat,this.data.popupSize,this.data.popupContentHTML,anchor,closeBox);}
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.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(geometry,attributes,style){OpenLayers.Feature.prototype.initialize.apply(this,[null,null,attributes]);this.lonlat=null;this.geometry=geometry?geometry:null;this.state=null;this.attributes={};if(attributes){this.attributes=OpenLayers.Util.extend(this.attributes,attributes);}
this.style=style?style: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(boundsOnly){var onScreen=false;if(this.layer&&this.layer.map){var screenBounds=this.layer.map.getExtent();if(boundsOnly){var featureBounds=this.geometry.getBounds();onScreen=screenBounds.intersectsBounds(featureBounds);}else{var screenPoly=screenBounds.toGeometry();onScreen=screenPoly.intersects(this.geometry);}}
return onScreen;},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(lonlat,toleranceLon,toleranceLat){var atPoint=false;if(this.geometry){atPoint=this.geometry.atPoint(lonlat,toleranceLon,toleranceLat);}
return atPoint;},destroyPopup:function(){},move:function(location){if(!this.layer||!this.geometry.move){return;}
var pixel;if(location.CLASS_NAME=="OpenLayers.LonLat"){pixel=this.layer.getViewPortPxFromLonLat(location);}else{pixel=location;}
var lastPixel=this.layer.getViewPortPxFromLonLat(this.geometry.getBounds().getCenterLonLat());var res=this.layer.map.getResolution();this.geometry.move(res*(pixel.x-lastPixel.x),res*(lastPixel.y-pixel.y));this.layer.drawFeature(this);return lastPixel;},toState:function(state){if(state==OpenLayers.State.UPDATE){switch(this.state){case OpenLayers.State.UNKNOWN:case OpenLayers.State.DELETE:this.state=state;break;case OpenLayers.State.UPDATE:case OpenLayers.State.INSERT:break;}}else if(state==OpenLayers.State.INSERT){switch(this.state){case OpenLayers.State.UNKNOWN:break;default:this.state=state;break;}}else if(state==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=state;break;}}else if(state==OpenLayers.State.UNKNOWN){this.state=state;}},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.Format.WKT=OpenLayers.Class(OpenLayers.Format,{initialize:function(options){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,[options]);},read:function(wkt){var features,type,str;var matches=this.regExes.typeStr.exec(wkt);if(matches){type=matches[1].toLowerCase();str=matches[2];if(this.parse[type]){features=this.parse[type].apply(this,[str]);}
if(this.internalProjection&&this.externalProjection){if(features&&features.CLASS_NAME=="OpenLayers.Feature.Vector"){features.geometry.transform(this.externalProjection,this.internalProjection);}else if(features&&type!="geometrycollection"&&typeof features=="object"){for(var i=0,len=features.length;i<len;i++){var component=features[i];component.geometry.transform(this.externalProjection,this.internalProjection);}}}}
return features;},write:function(features){var collection,geometry,type,data,isCollection;if(features.constructor==Array){collection=features;isCollection=true;}else{collection=[features];isCollection=false;}
var pieces=[];if(isCollection){pieces.push('GEOMETRYCOLLECTION(');}
for(var i=0,len=collection.length;i<len;++i){if(isCollection&&i>0){pieces.push(',');}
geometry=collection[i].geometry;type=geometry.CLASS_NAME.split('.')[2].toLowerCase();if(!this.extract[type]){return null;}
if(this.internalProjection&&this.externalProjection){geometry=geometry.clone();geometry.transform(this.internalProjection,this.externalProjection);}
data=this.extract[type].apply(this,[geometry]);pieces.push(type.toUpperCase()+'('+data+')');}
if(isCollection){pieces.push(')');}
return pieces.join('');},extract:{'point':function(point){return point.x+' '+point.y;},'multipoint':function(multipoint){var array=[];for(var i=0,len=multipoint.components.length;i<len;++i){array.push(this.extract.point.apply(this,[multipoint.components[i]]));}
return array.join(',');},'linestring':function(linestring){var array=[];for(var i=0,len=linestring.components.length;i<len;++i){array.push(this.extract.point.apply(this,[linestring.components[i]]));}
return array.join(',');},'multilinestring':function(multilinestring){var array=[];for(var i=0,len=multilinestring.components.length;i<len;++i){array.push('('+
this.extract.linestring.apply(this,[multilinestring.components[i]])+')');}
return array.join(',');},'polygon':function(polygon){var array=[];for(var i=0,len=polygon.components.length;i<len;++i){array.push('('+
this.extract.linestring.apply(this,[polygon.components[i]])+')');}
return array.join(',');},'multipolygon':function(multipolygon){var array=[];for(var i=0,len=multipolygon.components.length;i<len;++i){array.push('('+
this.extract.polygon.apply(this,[multipolygon.components[i]])+')');}
return array.join(',');}},parse:{'point':function(str){var coords=OpenLayers.String.trim(str).split(this.regExes.spaces);return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(coords[0],coords[1]));},'multipoint':function(str){var points=OpenLayers.String.trim(str).split(',');var components=[];for(var i=0,len=points.length;i<len;++i){components.push(this.parse.point.apply(this,[points[i]]).geometry);}
return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiPoint(components));},'linestring':function(str){var points=OpenLayers.String.trim(str).split(',');var components=[];for(var i=0,len=points.length;i<len;++i){components.push(this.parse.point.apply(this,[points[i]]).geometry);}
return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString(components));},'multilinestring':function(str){var line;var lines=OpenLayers.String.trim(str).split(this.regExes.parenComma);var components=[];for(var i=0,len=lines.length;i<len;++i){line=lines[i].replace(this.regExes.trimParens,'$1');components.push(this.parse.linestring.apply(this,[line]).geometry);}
return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiLineString(components));},'polygon':function(str){var ring,linestring,linearring;var rings=OpenLayers.String.trim(str).split(this.regExes.parenComma);var components=[];for(var i=0,len=rings.length;i<len;++i){ring=rings[i].replace(this.regExes.trimParens,'$1');linestring=this.parse.linestring.apply(this,[ring]).geometry;linearring=new OpenLayers.Geometry.LinearRing(linestring.components);components.push(linearring);}
return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon(components));},'multipolygon':function(str){var polygon;var polygons=OpenLayers.String.trim(str).split(this.regExes.doubleParenComma);var components=[];for(var i=0,len=polygons.length;i<len;++i){polygon=polygons[i].replace(this.regExes.trimParens,'$1');components.push(this.parse.polygon.apply(this,[polygon]).geometry);}
return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiPolygon(components));},'geometrycollection':function(str){str=str.replace(/,\s*([A-Za-z])/g,'|$1');var wktArray=OpenLayers.String.trim(str).split('|');var components=[];for(var i=0,len=wktArray.length;i<len;++i){components.push(OpenLayers.Format.WKT.prototype.read.apply(this,[wktArray[i]]));}
return components;}},CLASS_NAME:"OpenLayers.Format.WKT"});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(bounds){if(bounds){this.bounds=bounds.clone();}},clearBounds:function(){this.bounds=null;if(this.parent){this.parent.clearBounds();}},extendBounds:function(newBounds){var bounds=this.getBounds();if(!bounds){this.setBounds(newBounds);}else{this.bounds.extend(newBounds);}},getBounds:function(){if(this.bounds==null){this.calculateBounds();}
return this.bounds;},calculateBounds:function(){},distanceTo:function(geometry,options){},getVertices:function(nodes){},atPoint:function(lonlat,toleranceLon,toleranceLat){var atPoint=false;var bounds=this.getBounds();if((bounds!=null)&&(lonlat!=null)){var dX=(toleranceLon!=null)?toleranceLon:0;var dY=(toleranceLat!=null)?toleranceLat:0;var toleranceBounds=new OpenLayers.Bounds(this.bounds.left-dX,this.bounds.bottom-dY,this.bounds.right+dX,this.bounds.top+dY);atPoint=toleranceBounds.containsLonLat(lonlat);}
return atPoint;},getLength:function(){return 0.0;},getArea:function(){return 0.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(wkt){var format=arguments.callee.format;if(!format){format=new OpenLayers.Format.WKT();arguments.callee.format=format;}
var geom;var result=format.read(wkt);if(result instanceof OpenLayers.Feature.Vector){geom=result.geometry;}else if(result instanceof Array){var len=result.length;var components=new Array(len);for(var i=0;i<len;++i){components[i]=result[i].geometry;}
geom=new OpenLayers.Geometry.Collection(components);}
return geom;};OpenLayers.Geometry.segmentsIntersect=function(seg1,seg2,options){var point=options&&options.point;var tolerance=options&&options.tolerance;var intersection=false;var x11_21=seg1.x1-seg2.x1;var y11_21=seg1.y1-seg2.y1;var x12_11=seg1.x2-seg1.x1;var y12_11=seg1.y2-seg1.y1;var y22_21=seg2.y2-seg2.y1;var x22_21=seg2.x2-seg2.x1;var d=(y22_21*x12_11)-(x22_21*y12_11);var n1=(x22_21*y11_21)-(y22_21*x11_21);var n2=(x12_11*y11_21)-(y12_11*x11_21);if(d==0){if(n1==0&&n2==0){intersection=true;}}else{var along1=n1/d;var along2=n2/d;if(along1>=0&&along1<=1&&along2>=0&&along2<=1){if(!point){intersection=true;}else{var x=seg1.x1+(along1*x12_11);var y=seg1.y1+(along1*y12_11);intersection=new OpenLayers.Geometry.Point(x,y);}}}
if(tolerance){var dist;if(intersection){if(point){var segs=[seg1,seg2];var seg,x,y;outer:for(var i=0;i<2;++i){seg=segs[i];for(var j=1;j<3;++j){x=seg["x"+j];y=seg["y"+j];dist=Math.sqrt(Math.pow(x-intersection.x,2)+
Math.pow(y-intersection.y,2));if(dist<tolerance){intersection.x=x;intersection.y=y;break outer;}}}}}else{var segs=[seg1,seg2];var source,target,x,y,p,result;outer:for(var i=0;i<2;++i){source=segs[i];target=segs[(i+1)%2];for(var j=1;j<3;++j){p={x:source["x"+j],y:source["y"+j]};result=OpenLayers.Geometry.distanceToSegment(p,target);if(result.distance<tolerance){if(point){intersection=new OpenLayers.Geometry.Point(p.x,p.y);}else{intersection=true;}
break outer;}}}}}
return intersection;};OpenLayers.Geometry.distanceToSegment=function(point,segment){var x0=point.x;var y0=point.y;var x1=segment.x1;var y1=segment.y1;var x2=segment.x2;var y2=segment.y2;var dx=x2-x1;var dy=y2-y1;var along=((dx*(x0-x1))+(dy*(y0-y1)))/(Math.pow(dx,2)+Math.pow(dy,2));var x,y;if(along<=0.0){x=x1;y=y1;}else if(along>=1.0){x=x2;y=y2;}else{x=x1+along*dx;y=y1+along*dy;}
return{distance:Math.sqrt(Math.pow(x-x0,2)+Math.pow(y-y0,2)),x:x,y:y};};OpenLayers.Geometry.Point=OpenLayers.Class(OpenLayers.Geometry,{x:null,y:null,initialize:function(x,y){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);this.x=parseFloat(x);this.y=parseFloat(y);},clone:function(obj){if(obj==null){obj=new OpenLayers.Geometry.Point(this.x,this.y);}
OpenLayers.Util.applyDefaults(obj,this);return obj;},calculateBounds:function(){this.bounds=new OpenLayers.Bounds(this.x,this.y,this.x,this.y);},distanceTo:function(geometry,options){var edge=!(options&&options.edge===false);var details=edge&&options&&options.details;var distance,x0,y0,x1,y1,result;if(geometry instanceof OpenLayers.Geometry.Point){x0=this.x;y0=this.y;x1=geometry.x;y1=geometry.y;distance=Math.sqrt(Math.pow(x0-x1,2)+Math.pow(y0-y1,2));result=!details?distance:{x0:x0,y0:y0,x1:x1,y1:y1,distance:distance};}else{result=geometry.distanceTo(this,options);if(details){result={x0:result.x1,y0:result.y1,x1:result.x0,y1:result.y0,distance:result.distance};}}
return result;},equals:function(geom){var equals=false;if(geom!=null){equals=((this.x==geom.x&&this.y==geom.y)||(isNaN(this.x)&&isNaN(this.y)&&isNaN(geom.x)&&isNaN(geom.y)));}
return equals;},toShortString:function(){return(this.x+", "+this.y);},move:function(x,y){this.x=this.x+x;this.y=this.y+y;this.clearBounds();},rotate:function(angle,origin){angle*=Math.PI/180;var radius=this.distanceTo(origin);var theta=angle+Math.atan2(this.y-origin.y,this.x-origin.x);this.x=origin.x+(radius*Math.cos(theta));this.y=origin.y+(radius*Math.sin(theta));this.clearBounds();},getCentroid:function(){return new OpenLayers.Geometry.Point(this.x,this.y);},resize:function(scale,origin,ratio){ratio=(ratio==undefined)?1:ratio;this.x=origin.x+(scale*ratio*(this.x-origin.x));this.y=origin.y+(scale*(this.y-origin.y));this.clearBounds();return this;},intersects:function(geometry){var intersect=false;if(geometry.CLASS_NAME=="OpenLayers.Geometry.Point"){intersect=this.equals(geometry);}else{intersect=geometry.intersects(this);}
return intersect;},transform:function(source,dest){if((source&&dest)){OpenLayers.Projection.transform(this,source,dest);this.bounds=null;}
return this;},getVertices:function(nodes){return[this];},CLASS_NAME:"OpenLayers.Geometry.Point"});OpenLayers.Geometry.Collection=OpenLayers.Class(OpenLayers.Geometry,{components:null,componentTypes:null,initialize:function(components){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);this.components=[];if(components!=null){this.addComponents(components);}},destroy:function(){this.components.length=0;this.components=null;},clone:function(){var geometry=eval("new "+this.CLASS_NAME+"()");for(var i=0,len=this.components.length;i<len;i++){geometry.addComponent(this.components[i].clone());}
OpenLayers.Util.applyDefaults(geometry,this);return geometry;},getComponentsString:function(){var strings=[];for(var i=0,len=this.components.length;i<len;i++){strings.push(this.components[i].toShortString());}
return strings.join(",");},calculateBounds:function(){this.bounds=null;if(this.components&&this.components.length>0){this.setBounds(this.components[0].getBounds());for(var i=1,len=this.components.length;i<len;i++){this.extendBounds(this.components[i].getBounds());}}},addComponents:function(components){if(!(components instanceof Array)){components=[components];}
for(var i=0,len=components.length;i<len;i++){this.addComponent(components[i]);}},addComponent:function(component,index){var added=false;if(component){if(this.componentTypes==null||(OpenLayers.Util.indexOf(this.componentTypes,component.CLASS_NAME)>-1)){if(index!=null&&(index<this.components.length)){var components1=this.components.slice(0,index);var components2=this.components.slice(index,this.components.length);components1.push(component);this.components=components1.concat(components2);}else{this.components.push(component);}
component.parent=this;this.clearBounds();added=true;}}
return added;},removeComponents:function(components){if(!(components instanceof Array)){components=[components];}
for(var i=components.length-1;i>=0;--i){this.removeComponent(components[i]);}},removeComponent:function(component){OpenLayers.Util.removeItem(this.components,component);this.clearBounds();},getLength:function(){var length=0.0;for(var i=0,len=this.components.length;i<len;i++){length+=this.components[i].getLength();}
return length;},getArea:function(){var area=0.0;for(var i=0,len=this.components.length;i<len;i++){area+=this.components[i].getArea();}
return area;},getGeodesicArea:function(projection){var area=0.0;for(var i=0,len=this.components.length;i<len;i++){area+=this.components[i].getGeodesicArea(projection);}
return area;},getCentroid:function(){return this.components.length&&this.components[0].getCentroid();},getGeodesicLength:function(projection){var length=0.0;for(var i=0,len=this.components.length;i<len;i++){length+=this.components[i].getGeodesicLength(projection);}
return length;},move:function(x,y){for(var i=0,len=this.components.length;i<len;i++){this.components[i].move(x,y);}},rotate:function(angle,origin){for(var i=0,len=this.components.length;i<len;++i){this.components[i].rotate(angle,origin);}},resize:function(scale,origin,ratio){for(var i=0;i<this.components.length;++i){this.components[i].resize(scale,origin,ratio);}
return this;},distanceTo:function(geometry,options){var edge=!(options&&options.edge===false);var details=edge&&options&&options.details;var result,best,distance;var min=Number.POSITIVE_INFINITY;for(var i=0,len=this.components.length;i<len;++i){result=this.components[i].distanceTo(geometry,options);distance=details?result.distance:result;if(distance<min){min=distance;best=result;if(min==0){break;}}}
return best;},equals:function(geometry){var equivalent=true;if(!geometry||!geometry.CLASS_NAME||(this.CLASS_NAME!=geometry.CLASS_NAME)){equivalent=false;}else if(!(geometry.components instanceof Array)||(geometry.components.length!=this.components.length)){equivalent=false;}else{for(var i=0,len=this.components.length;i<len;++i){if(!this.components[i].equals(geometry.components[i])){equivalent=false;break;}}}
return equivalent;},transform:function(source,dest){if(source&&dest){for(var i=0,len=this.components.length;i<len;i++){var component=this.components[i];component.transform(source,dest);}
this.bounds=null;}
return this;},intersects:function(geometry){var intersect=false;for(var i=0,len=this.components.length;i<len;++i){intersect=geometry.intersects(this.components[i]);if(intersect){break;}}
return intersect;},getVertices:function(nodes){var vertices=[];for(var i=0,len=this.components.length;i<len;++i){Array.prototype.push.apply(vertices,this.components[i].getVertices(nodes));}
return vertices;},CLASS_NAME:"OpenLayers.Geometry.Collection"});OpenLayers.Geometry.MultiPoint=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.Point"],initialize:function(components){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments);},addPoint:function(point,index){this.addComponent(point,index);},removePoint:function(point){this.removeComponent(point);},CLASS_NAME:"OpenLayers.Geometry.MultiPoint"});OpenLayers.Geometry.Curve=OpenLayers.Class(OpenLayers.Geometry.MultiPoint,{componentTypes:["OpenLayers.Geometry.Point"],initialize:function(points){OpenLayers.Geometry.MultiPoint.prototype.initialize.apply(this,arguments);},getLength:function(){var length=0.0;if(this.components&&(this.components.length>1)){for(var i=1,len=this.components.length;i<len;i++){length+=this.components[i-1].distanceTo(this.components[i]);}}
return length;},getGeodesicLength:function(projection){var geom=this;if(projection){var gg=new OpenLayers.Projection("EPSG:4326");if(!gg.equals(projection)){geom=this.clone().transform(projection,gg);}}
var length=0.0;if(geom.components&&(geom.components.length>1)){var p1,p2;for(var i=1,len=geom.components.length;i<len;i++){p1=geom.components[i-1];p2=geom.components[i];length+=OpenLayers.Util.distVincenty({lon:p1.x,lat:p1.y},{lon:p2.x,lat:p2.y});}}
return length*1000;},CLASS_NAME:"OpenLayers.Geometry.Curve"});OpenLayers.Geometry.LineString=OpenLayers.Class(OpenLayers.Geometry.Curve,{initialize:function(points){OpenLayers.Geometry.Curve.prototype.initialize.apply(this,arguments);},removeComponent:function(point){if(this.components&&(this.components.length>2)){OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments);}},intersects:function(geometry){var intersect=false;var type=geometry.CLASS_NAME;if(type=="OpenLayers.Geometry.LineString"||type=="OpenLayers.Geometry.LinearRing"||type=="OpenLayers.Geometry.Point"){var segs1=this.getSortedSegments();var segs2;if(type=="OpenLayers.Geometry.Point"){segs2=[{x1:geometry.x,y1:geometry.y,x2:geometry.x,y2:geometry.y}];}else{segs2=geometry.getSortedSegments();}
var seg1,seg1x1,seg1x2,seg1y1,seg1y2,seg2,seg2y1,seg2y2;outer:for(var i=0,len=segs1.length;i<len;++i){seg1=segs1[i];seg1x1=seg1.x1;seg1x2=seg1.x2;seg1y1=seg1.y1;seg1y2=seg1.y2;inner:for(var j=0,jlen=segs2.length;j<jlen;++j){seg2=segs2[j];if(seg2.x1>seg1x2){break;}
if(seg2.x2<seg1x1){continue;}
seg2y1=seg2.y1;seg2y2=seg2.y2;if(Math.min(seg2y1,seg2y2)>Math.max(seg1y1,seg1y2)){continue;}
if(Math.max(seg2y1,seg2y2)<Math.min(seg1y1,seg1y2)){continue;}
if(OpenLayers.Geometry.segmentsIntersect(seg1,seg2)){intersect=true;break outer;}}}}else{intersect=geometry.intersects(this);}
return intersect;},getSortedSegments:function(){var numSeg=this.components.length-1;var segments=new Array(numSeg),point1,point2;for(var i=0;i<numSeg;++i){point1=this.components[i];point2=this.components[i+1];if(point1.x<point2.x){segments[i]={x1:point1.x,y1:point1.y,x2:point2.x,y2:point2.y};}else{segments[i]={x1:point2.x,y1:point2.y,x2:point1.x,y2:point1.y};}}
function byX1(seg1,seg2){return seg1.x1-seg2.x1;}
return segments.sort(byX1);},splitWithSegment:function(seg,options){var edge=!(options&&options.edge===false);var tolerance=options&&options.tolerance;var lines=[];var verts=this.getVertices();var points=[];var intersections=[];var split=false;var vert1,vert2,point;var node,vertex,target;var interOptions={point:true,tolerance:tolerance};var result=null;for(var i=0,stop=verts.length-2;i<=stop;++i){vert1=verts[i];points.push(vert1.clone());vert2=verts[i+1];target={x1:vert1.x,y1:vert1.y,x2:vert2.x,y2:vert2.y};point=OpenLayers.Geometry.segmentsIntersect(seg,target,interOptions);if(point instanceof OpenLayers.Geometry.Point){if((point.x===seg.x1&&point.y===seg.y1)||(point.x===seg.x2&&point.y===seg.y2)||point.equals(vert1)||point.equals(vert2)){vertex=true;}else{vertex=false;}
if(vertex||edge){if(!point.equals(intersections[intersections.length-1])){intersections.push(point.clone());}
if(i===0){if(point.equals(vert1)){continue;}}
if(point.equals(vert2)){continue;}
split=true;if(!point.equals(vert1)){points.push(point);}
lines.push(new OpenLayers.Geometry.LineString(points));points=[point.clone()];}}}
if(split){points.push(vert2.clone());lines.push(new OpenLayers.Geometry.LineString(points));}
if(intersections.length>0){var xDir=seg.x1<seg.x2?1:-1;var yDir=seg.y1<seg.y2?1:-1;result={lines:lines,points:intersections.sort(function(p1,p2){return(xDir*p1.x-xDir*p2.x)||(yDir*p1.y-yDir*p2.y);})};}
return result;},split:function(target,options){var results=null;var mutual=options&&options.mutual;var sourceSplit,targetSplit,sourceParts,targetParts;if(target instanceof OpenLayers.Geometry.LineString){var verts=this.getVertices();var vert1,vert2,seg,splits,lines,point;var points=[];sourceParts=[];for(var i=0,stop=verts.length-2;i<=stop;++i){vert1=verts[i];vert2=verts[i+1];seg={x1:vert1.x,y1:vert1.y,x2:vert2.x,y2:vert2.y};targetParts=targetParts||[target];if(mutual){points.push(vert1.clone());}
for(var j=0;j<targetParts.length;++j){splits=targetParts[j].splitWithSegment(seg,options);if(splits){lines=splits.lines;if(lines.length>0){lines.unshift(j,1);Array.prototype.splice.apply(targetParts,lines);j+=lines.length-2;}
if(mutual){for(var k=0,len=splits.points.length;k<len;++k){point=splits.points[k];if(!point.equals(vert1)){points.push(point);sourceParts.push(new OpenLayers.Geometry.LineString(points));if(point.equals(vert2)){points=[];}else{points=[point.clone()];}}}}}}}
if(mutual&&sourceParts.length>0&&points.length>0){points.push(vert2.clone());sourceParts.push(new OpenLayers.Geometry.LineString(points));}}else{results=target.splitWith(this,options);}
if(targetParts&&targetParts.length>1){targetSplit=true;}else{targetParts=[];}
if(sourceParts&&sourceParts.length>1){sourceSplit=true;}else{sourceParts=[];}
if(targetSplit||sourceSplit){if(mutual){results=[sourceParts,targetParts];}else{results=targetParts;}}
return results;},splitWith:function(geometry,options){return geometry.split(this,options);},getVertices:function(nodes){var vertices;if(nodes===true){vertices=[this.components[0],this.components[this.components.length-1]];}else if(nodes===false){vertices=this.components.slice(1,this.components.length-1);}else{vertices=this.components.slice();}
return vertices;},distanceTo:function(geometry,options){var edge=!(options&&options.edge===false);var details=edge&&options&&options.details;var result,best={};var min=Number.POSITIVE_INFINITY;if(geometry instanceof OpenLayers.Geometry.Point){var segs=this.getSortedSegments();var x=geometry.x;var y=geometry.y;var seg;for(var i=0,len=segs.length;i<len;++i){seg=segs[i];result=OpenLayers.Geometry.distanceToSegment(geometry,seg);if(result.distance<min){min=result.distance;best=result;if(min===0){break;}}else{if(seg.x2>x&&((y>seg.y1&&y<seg.y2)||(y<seg.y1&&y>seg.y2))){break;}}}
if(details){best={distance:best.distance,x0:best.x,y0:best.y,x1:x,y1:y};}else{best=best.distance;}}else if(geometry instanceof OpenLayers.Geometry.LineString){var segs0=this.getSortedSegments();var segs1=geometry.getSortedSegments();var seg0,seg1,intersection,x0,y0;var len1=segs1.length;var interOptions={point:true};outer:for(var i=0,len=segs0.length;i<len;++i){seg0=segs0[i];x0=seg0.x1;y0=seg0.y1;for(var j=0;j<len1;++j){seg1=segs1[j];intersection=OpenLayers.Geometry.segmentsIntersect(seg0,seg1,interOptions);if(intersection){min=0;best={distance:0,x0:intersection.x,y0:intersection.y,x1:intersection.x,y1:intersection.y};break outer;}else{result=OpenLayers.Geometry.distanceToSegment({x:x0,y:y0},seg1);if(result.distance<min){min=result.distance;best={distance:min,x0:x0,y0:y0,x1:result.x,y1:result.y};}}}}
if(!details){best=best.distance;}
if(min!==0){if(seg0){result=geometry.distanceTo(new OpenLayers.Geometry.Point(seg0.x2,seg0.y2),options);var dist=details?result.distance:result;if(dist<min){if(details){best={distance:min,x0:result.x1,y0:result.y1,x1:result.x0,y1:result.y0};}else{best=dist;}}}}}else{best=geometry.distanceTo(this,options);if(details){best={distance:best.distance,x0:best.x1,y0:best.y1,x1:best.x0,y1:best.y0};}}
return best;},CLASS_NAME:"OpenLayers.Geometry.LineString"});OpenLayers.Geometry.LinearRing=OpenLayers.Class(OpenLayers.Geometry.LineString,{componentTypes:["OpenLayers.Geometry.Point"],initialize:function(points){OpenLayers.Geometry.LineString.prototype.initialize.apply(this,arguments);},addComponent:function(point,index){var added=false;var lastPoint=this.components.pop();if(index!=null||!point.equals(lastPoint)){added=OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,arguments);}
var firstPoint=this.components[0];OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,[firstPoint]);return added;},removeComponent:function(point){if(this.components.length>4){this.components.pop();OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments);var firstPoint=this.components[0];OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,[firstPoint]);}},move:function(x,y){for(var i=0,len=this.components.length;i<len-1;i++){this.components[i].move(x,y);}},rotate:function(angle,origin){for(var i=0,len=this.components.length;i<len-1;++i){this.components[i].rotate(angle,origin);}},resize:function(scale,origin,ratio){for(var i=0,len=this.components.length;i<len-1;++i){this.components[i].resize(scale,origin,ratio);}
return this;},transform:function(source,dest){if(source&&dest){for(var i=0,len=this.components.length;i<len-1;i++){var component=this.components[i];component.transform(source,dest);}
this.bounds=null;}
return this;},getCentroid:function(){if(this.components&&(this.components.length>2)){var sumX=0.0;var sumY=0.0;for(var i=0;i<this.components.length-1;i++){var b=this.components[i];var c=this.components[i+1];sumX+=(b.x+c.x)*(b.x*c.y-c.x*b.y);sumY+=(b.y+c.y)*(b.x*c.y-c.x*b.y);}
var area=-1*this.getArea();var x=sumX/(6*area);var y=sumY/(6*area);return new OpenLayers.Geometry.Point(x,y);}else{return null;}},getArea:function(){var area=0.0;if(this.components&&(this.components.length>2)){var sum=0.0;for(var i=0,len=this.components.length;i<len-1;i++){var b=this.components[i];var c=this.components[i+1];sum+=(b.x+c.x)*(c.y-b.y);}
area=-sum/2.0;}
return area;},getGeodesicArea:function(projection){var ring=this;if(projection){var gg=new OpenLayers.Projection("EPSG:4326");if(!gg.equals(projection)){ring=this.clone().transform(projection,gg);}}
var area=0.0;var len=ring.components&&ring.components.length;if(len>2){var p1,p2;for(var i=0;i<len-1;i++){p1=ring.components[i];p2=ring.components[i+1];area+=OpenLayers.Util.rad(p2.x-p1.x)*(2+Math.sin(OpenLayers.Util.rad(p1.y))+
Math.sin(OpenLayers.Util.rad(p2.y)));}
area=area*6378137.0*6378137.0/2.0;}
return area;},containsPoint:function(point){var approx=OpenLayers.Number.limitSigDigs;var digs=14;var px=approx(point.x,digs);var py=approx(point.y,digs);function getX(y,x1,y1,x2,y2){return(((x1-x2)*y)+((x2*y1)-(x1*y2)))/(y1-y2);}
var numSeg=this.components.length-1;var start,end,x1,y1,x2,y2,cx,cy;var crosses=0;for(var i=0;i<numSeg;++i){start=this.components[i];x1=approx(start.x,digs);y1=approx(start.y,digs);end=this.components[i+1];x2=approx(end.x,digs);y2=approx(end.y,digs);if(y1==y2){if(py==y1){if(x1<=x2&&(px>=x1&&px<=x2)||x1>=x2&&(px<=x1&&px>=x2)){crosses=-1;break;}}
continue;}
cx=approx(getX(py,x1,y1,x2,y2),digs);if(cx==px){if(y1<y2&&(py>=y1&&py<=y2)||y1>y2&&(py<=y1&&py>=y2)){crosses=-1;break;}}
if(cx<=px){continue;}
if(x1!=x2&&(cx<Math.min(x1,x2)||cx>Math.max(x1,x2))){continue;}
if(y1<y2&&(py>=y1&&py<y2)||y1>y2&&(py<y1&&py>=y2)){++crosses;}}
var contained=(crosses==-1)?1:!!(crosses&1);return contained;},intersects:function(geometry){var intersect=false;if(geometry.CLASS_NAME=="OpenLayers.Geometry.Point"){intersect=this.containsPoint(geometry);}else if(geometry.CLASS_NAME=="OpenLayers.Geometry.LineString"){intersect=geometry.intersects(this);}else if(geometry.CLASS_NAME=="OpenLayers.Geometry.LinearRing"){intersect=OpenLayers.Geometry.LineString.prototype.intersects.apply(this,[geometry]);}else{for(var i=0,len=geometry.components.length;i<len;++i){intersect=geometry.components[i].intersects(this);if(intersect){break;}}}
return intersect;},getVertices:function(nodes){return(nodes===true)?[]:this.components.slice(0,this.components.length-1);},CLASS_NAME:"OpenLayers.Geometry.LinearRing"});OpenLayers.Geometry.Polygon=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.LinearRing"],initialize:function(components){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments);},getArea:function(){var area=0.0;if(this.components&&(this.components.length>0)){area+=Math.abs(this.components[0].getArea());for(var i=1,len=this.components.length;i<len;i++){area-=Math.abs(this.components[i].getArea());}}
return area;},getGeodesicArea:function(projection){var area=0.0;if(this.components&&(this.components.length>0)){area+=Math.abs(this.components[0].getGeodesicArea(projection));for(var i=1,len=this.components.length;i<len;i++){area-=Math.abs(this.components[i].getGeodesicArea(projection));}}
return area;},containsPoint:function(point){var numRings=this.components.length;var contained=false;if(numRings>0){contained=this.components[0].containsPoint(point);if(contained!==1){if(contained&&numRings>1){var hole;for(var i=1;i<numRings;++i){hole=this.components[i].containsPoint(point);if(hole){if(hole===1){contained=1;}else{contained=false;}
break;}}}}}
return contained;},intersects:function(geometry){var intersect=false;var i,len;if(geometry.CLASS_NAME=="OpenLayers.Geometry.Point"){intersect=this.containsPoint(geometry);}else if(geometry.CLASS_NAME=="OpenLayers.Geometry.LineString"||geometry.CLASS_NAME=="OpenLayers.Geometry.LinearRing"){for(i=0,len=this.components.length;i<len;++i){intersect=geometry.intersects(this.components[i]);if(intersect){break;}}
if(!intersect){for(i=0,len=geometry.components.length;i<len;++i){intersect=this.containsPoint(geometry.components[i]);if(intersect){break;}}}}else{for(i=0,len=geometry.components.length;i<len;++i){intersect=this.intersects(geometry.components[i]);if(intersect){break;}}}
if(!intersect&&geometry.CLASS_NAME=="OpenLayers.Geometry.Polygon"){var ring=this.components[0];for(i=0,len=ring.components.length;i<len;++i){intersect=geometry.containsPoint(ring.components[i]);if(intersect){break;}}}
return intersect;},distanceTo:function(geometry,options){var edge=!(options&&options.edge===false);var result;if(!edge&&this.intersects(geometry)){result=0;}else{result=OpenLayers.Geometry.Collection.prototype.distanceTo.apply(this,[geometry,options]);}
return result;},CLASS_NAME:"OpenLayers.Geometry.Polygon"});OpenLayers.Geometry.Polygon.createRegularPolygon=function(origin,radius,sides,rotation){var angle=Math.PI*((1/sides)-(1/2));if(rotation){angle+=(rotation/180)*Math.PI;}
var rotatedAngle,x,y;var points=[];for(var i=0;i<sides;++i){rotatedAngle=angle+(i*2*Math.PI/sides);x=origin.x+(radius*Math.cos(rotatedAngle));y=origin.y+(radius*Math.sin(rotatedAngle));points.push(new OpenLayers.Geometry.Point(x,y));}
var ring=new OpenLayers.Geometry.LinearRing(points);return new OpenLayers.Geometry.Polygon([ring]);};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(options){OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);},createGeometryFromItem:function(item){var point=this.getElementsByTagNameNS(item,this.georssns,"point");var lat=this.getElementsByTagNameNS(item,this.geons,'lat');var lon=this.getElementsByTagNameNS(item,this.geons,'long');var line=this.getElementsByTagNameNS(item,this.georssns,"line");var polygon=this.getElementsByTagNameNS(item,this.georssns,"polygon");var where=this.getElementsByTagNameNS(item,this.georssns,"where");var box=this.getElementsByTagNameNS(item,this.georssns,"box");if(point.length>0||(lat.length>0&&lon.length>0)){var location;if(point.length>0){location=OpenLayers.String.trim(point[0].firstChild.nodeValue).split(/\s+/);if(location.length!=2){location=OpenLayers.String.trim(point[0].firstChild.nodeValue).split(/\s*,\s*/);}}else{location=[parseFloat(lat[0].firstChild.nodeValue),parseFloat(lon[0].firstChild.nodeValue)];}
var geometry=new OpenLayers.Geometry.Point(parseFloat(location[1]),parseFloat(location[0]));}else if(line.length>0){var coords=OpenLayers.String.trim(this.concatChildValues(line[0])).split(/\s+/);var components=[];var point;for(var i=0,len=coords.length;i<len;i+=2){point=new OpenLayers.Geometry.Point(parseFloat(coords[i+1]),parseFloat(coords[i]));components.push(point);}
geometry=new OpenLayers.Geometry.LineString(components);}else if(polygon.length>0){var coords=OpenLayers.String.trim(this.concatChildValues(polygon[0])).split(/\s+/);var components=[];var point;for(var i=0,len=coords.length;i<len;i+=2){point=new OpenLayers.Geometry.Point(parseFloat(coords[i+1]),parseFloat(coords[i]));components.push(point);}
geometry=new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing(components)]);}else if(where.length>0){if(!this.gmlParser){this.gmlParser=new OpenLayers.Format.GML({'xy':this.xy});}
var feature=this.gmlParser.parseFeature(where[0]);geometry=feature.geometry;}else if(box.length>0){var coords=OpenLayers.String.trim(box[0].firstChild.nodeValue).split(/\s+/);var components=[];var point;if(coords.length>3){point=new OpenLayers.Geometry.Point(parseFloat(coords[1]),parseFloat(coords[0]));components.push(point);point=new OpenLayers.Geometry.Point(parseFloat(coords[1]),parseFloat(coords[2]));components.push(point);point=new OpenLayers.Geometry.Point(parseFloat(coords[3]),parseFloat(coords[2]));components.push(point);point=new OpenLayers.Geometry.Point(parseFloat(coords[3]),parseFloat(coords[0]));components.push(point);point=new OpenLayers.Geometry.Point(parseFloat(coords[1]),parseFloat(coords[0]));components.push(point);}
geometry=new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing(components)]);}
if(geometry&&this.internalProjection&&this.externalProjection){geometry.transform(this.externalProjection,this.internalProjection);}
return geometry;},createFeatureFromItem:function(item){var geometry=this.createGeometryFromItem(item);var title=this.getChildValue(item,"*","title",this.featureTitle);var description=this.getChildValue(item,"*","description",this.getChildValue(item,"*","content",this.getChildValue(item,"*","summary",this.featureDescription)));var link=this.getChildValue(item,"*","link");if(!link){try{link=this.getElementsByTagNameNS(item,"*","link")[0].getAttribute("href");}catch(e){link=null;}}
var id=this.getChildValue(item,"*","id",null);var data={"title":title,"description":description,"link":link};var feature=new OpenLayers.Feature.Vector(geometry,data);feature.fid=id;return feature;},getChildValue:function(node,nsuri,name,def){var value;var eles=this.getElementsByTagNameNS(node,nsuri,name);if(eles&&eles[0]&&eles[0].firstChild&&eles[0].firstChild.nodeValue){value=eles[0].firstChild.nodeValue;}else{value=(def==undefined)?"":def;}
return value;},read:function(doc){if(typeof doc=="string"){doc=OpenLayers.Format.XML.prototype.read.apply(this,[doc]);}
var itemlist=null;itemlist=this.getElementsByTagNameNS(doc,'*','item');if(itemlist.length==0){itemlist=this.getElementsByTagNameNS(doc,'*','entry');}
var numItems=itemlist.length;var features=new Array(numItems);for(var i=0;i<numItems;i++){features[i]=this.createFeatureFromItem(itemlist[i]);}
return features;},write:function(features){var georss;if(features instanceof Array){georss=this.createElementNS(this.rssns,"rss");for(var i=0,len=features.length;i<len;i++){georss.appendChild(this.createFeatureXML(features[i]));}}else{georss=this.createFeatureXML(features);}
return OpenLayers.Format.XML.prototype.write.apply(this,[georss]);},createFeatureXML:function(feature){var geometryNode=this.buildGeometryNode(feature.geometry);var featureNode=this.createElementNS(this.rssns,"item");var titleNode=this.createElementNS(this.rssns,"title");titleNode.appendChild(this.createTextNode(feature.attributes.title?feature.attributes.title:""));var descNode=this.createElementNS(this.rssns,"description");descNode.appendChild(this.createTextNode(feature.attributes.description?feature.attributes.description:""));featureNode.appendChild(titleNode);featureNode.appendChild(descNode);if(feature.attributes.link){var linkNode=this.createElementNS(this.rssns,"link");linkNode.appendChild(this.createTextNode(feature.attributes.link));featureNode.appendChild(linkNode);}
for(var attr in feature.attributes){if(attr=="link"||attr=="title"||attr=="description"){continue;}
var attrText=this.createTextNode(feature.attributes[attr]);var nodename=attr;if(attr.search(":")!=-1){nodename=attr.split(":")[1];}
var attrContainer=this.createElementNS(this.featureNS,"feature:"+nodename);attrContainer.appendChild(attrText);featureNode.appendChild(attrContainer);}
featureNode.appendChild(geometryNode);return featureNode;},buildGeometryNode:function(geometry){if(this.internalProjection&&this.externalProjection){geometry=geometry.clone();geometry.transform(this.internalProjection,this.externalProjection);}
var node;if(geometry.CLASS_NAME=="OpenLayers.Geometry.Polygon"){node=this.createElementNS(this.georssns,'georss:polygon');node.appendChild(this.buildCoordinatesNode(geometry.components[0]));}
else if(geometry.CLASS_NAME=="OpenLayers.Geometry.LineString"){node=this.createElementNS(this.georssns,'georss:line');node.appendChild(this.buildCoordinatesNode(geometry));}
else if(geometry.CLASS_NAME=="OpenLayers.Geometry.Point"){node=this.createElementNS(this.georssns,'georss:point');node.appendChild(this.buildCoordinatesNode(geometry));}else{throw"Couldn't parse "+geometry.CLASS_NAME;}
return node;},buildCoordinatesNode:function(geometry){var points=null;if(geometry.components){points=geometry.components;}
var path;if(points){var numPoints=points.length;var parts=new Array(numPoints);for(var i=0;i<numPoints;i++){parts[i]=points[i].y+" "+points[i].x;}
path=parts.join(" ");}else{path=geometry.y+" "+geometry.x;}
return this.createTextNode(path);},CLASS_NAME:"OpenLayers.Format.GeoRSS"});Ext.namespace("GeoExt.data");GeoExt.data.LayerStoreMixin=function(){return{map:null,reader:null,constructor:function(config){config=config||{};config.reader=config.reader||new GeoExt.data.LayerReader({},config.fields);delete config.fields;var map=config.map instanceof GeoExt.MapPanel?config.map.map:config.map;delete config.map;if(config.layers){config.data=config.layers;}
delete config.layers;var options={initDir:config.initDir};delete config.initDir;arguments.callee.superclass.constructor.call(this,config);if(map){this.bind(map,options);}},bind:function(map,options){if(this.map){return;}
this.map=map;options=options||{};var initDir=options.initDir;if(options.initDir==undefined){initDir=GeoExt.data.LayerStore.MAP_TO_STORE|GeoExt.data.LayerStore.STORE_TO_MAP;}
var layers=map.layers.slice(0);if(initDir&GeoExt.data.LayerStore.STORE_TO_MAP){this.each(function(record){this.map.addLayer(record.get("layer"));},this);}
if(initDir&GeoExt.data.LayerStore.MAP_TO_STORE){this.loadData(layers,true);}
map.events.on({"changelayer":this.onChangeLayer,"addlayer":this.onAddLayer,"removelayer":this.onRemoveLayer,scope:this});this.on({"load":this.onLoad,"clear":this.onClear,"add":this.onAdd,"remove":this.onRemove,"update":this.onUpdate,scope:this});this.data.on({"replace":this.onReplace,scope:this});},unbind:function(){if(this.map){this.map.events.un({"changelayer":this.onChangeLayer,"addlayer":this.onAddLayer,"removelayer":this.onRemoveLayer,scope:this});this.un("load",this.onLoad,this);this.un("clear",this.onClear,this);this.un("add",this.onAdd,this);this.un("remove",this.onRemove,this);this.data.un("replace",this.onReplace,this);this.map=null;}},onChangeLayer:function(evt){var layer=evt.layer;var recordIndex=this.findBy(function(rec,id){return rec.get("layer")===layer;});if(recordIndex>-1){var record=this.getAt(recordIndex);if(evt.property==="order"){if(!this._adding&&!this._removing){var layerIndex=this.map.getLayerIndex(layer);if(layerIndex!==recordIndex){this._removing=true;this.remove(record);delete this._removing;this._adding=true;this.insert(layerIndex,[record]);delete this._adding;}}}else if(evt.property==="name"){record.set("title",layer.name);}else{this.fireEvent("update",this,record,Ext.data.Record.EDIT);}}},onAddLayer:function(evt){if(!this._adding){var layer=evt.layer;this._adding=true;this.loadData([layer],true);delete this._adding;}},onRemoveLayer:function(evt){if(this.map.unloadDestroy){if(!this._removing){var layer=evt.layer;this._removing=true;this.remove(this.getById(layer.id));delete this._removing;}}else{this.unbind();}},onLoad:function(store,records,options){if(!Ext.isArray(records)){records=[records];}
if(options&&!options.add){this._removing=true;for(var i=this.map.layers.length-1;i>=0;i--){this.map.removeLayer(this.map.layers[i]);}
delete this._removing;var len=records.length;if(len>0){var layers=new Array(len);for(var j=0;j<len;j++){layers[j]=records[j].get("layer");}
this._adding=true;this.map.addLayers(layers);delete this._adding;}}},onClear:function(store){this._removing=true;for(var i=this.map.layers.length-1;i>=0;i--){this.map.removeLayer(this.map.layers[i]);}
delete this._removing;},onAdd:function(store,records,index){if(!this._adding){this._adding=true;var layer;for(var i=records.length-1;i>=0;--i){layer=records[i].get("layer");this.map.addLayer(layer);if(index!==this.map.layers.length-1){this.map.setLayerIndex(layer,index);}}
delete this._adding;}},onRemove:function(store,record,index){if(!this._removing){var layer=record.get("layer");if(this.map.getLayer(layer.id)!=null){this._removing=true;this.removeMapLayer(record);delete this._removing;}}},onUpdate:function(store,record,operation){if(operation===Ext.data.Record.EDIT){if(record.modified&&record.modified.title){var layer=record.get("layer");var title=record.get("title");if(title!==layer.name){layer.setName(title);}}}},removeMapLayer:function(record){this.map.removeLayer(record.get("layer"));},onReplace:function(key,oldRecord,newRecord){this.removeMapLayer(oldRecord);},destroy:function(){this.unbind();GeoExt.data.LayerStore.superclass.destroy.call(this);}};};GeoExt.data.LayerStore=Ext.extend(Ext.data.Store,new GeoExt.data.LayerStoreMixin);GeoExt.data.LayerStore.MAP_TO_STORE=1;GeoExt.data.LayerStore.STORE_TO_MAP=2;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(options){this.displayClass=this.CLASS_NAME.replace("OpenLayers.","ol").replace(/\./g,"");OpenLayers.Util.extend(this,options);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 key in this.handlers){if(this.handlers.hasOwnProperty(key)&&typeof this.handlers[key].destroy=="function"){this.handlers[key].destroy();}}
this.handlers=null;}
if(this.map){this.map.removeControl(this);this.map=null;}},setMap:function(map){this.map=map;if(this.handler){this.handler.setMap(map);}},draw:function(px){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(px!=null){this.position=px.clone();}
this.moveTo(this.position);return this.div;},moveTo:function(px){if((px!=null)&&(this.div!=null)){this.div.style.left=px.x+"px";this.div.style.top=px.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.Handler=OpenLayers.Class({id:null,control:null,map:null,keyMask:null,active:false,evt:null,initialize:function(control,callbacks,options){OpenLayers.Util.extend(this,options);this.control=control;this.callbacks=callbacks;if(control.map){this.setMap(control.map);}
OpenLayers.Util.extend(this,options);this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");},setMap:function(map){this.map=map;},checkModifiers:function(evt){if(this.keyMask==null){return true;}
var keyModifiers=(evt.shiftKey?OpenLayers.Handler.MOD_SHIFT:0)|(evt.ctrlKey?OpenLayers.Handler.MOD_CTRL:0)|(evt.altKey?OpenLayers.Handler.MOD_ALT:0);return(keyModifiers==this.keyMask);},activate:function(){if(this.active){return false;}
var events=OpenLayers.Events.prototype.BROWSER_EVENTS;for(var i=0,len=events.length;i<len;i++){if(this[events[i]]){this.register(events[i],this[events[i]]);}}
this.active=true;return true;},deactivate:function(){if(!this.active){return false;}
var events=OpenLayers.Events.prototype.BROWSER_EVENTS;for(var i=0,len=events.length;i<len;i++){if(this[events[i]]){this.unregister(events[i],this[events[i]]);}}
this.active=false;return true;},callback:function(name,args){if(name&&this.callbacks[name]){this.callbacks[name].apply(this.control,args);}},register:function(name,method){this.map.events.registerPriority(name,this,method);this.map.events.registerPriority(name,this,this.setEvent);},unregister:function(name,method){this.map.events.unregister(name,this,method);this.map.events.unregister(name,this,this.setEvent);},setEvent:function(evt){this.evt=evt;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.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(control,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,arguments);if(this.pixelTolerance!=null){this.mousedown=function(evt){this.down=evt.xy;return true;};}},mousedown:null,mouseup:function(evt){var propagate=true;if(this.checkModifiers(evt)&&this.control.handleRightClicks&&OpenLayers.Event.isRightClick(evt)){propagate=this.rightclick(evt);}
return propagate;},rightclick:function(evt){if(this.passesTolerance(evt)){if(this.rightclickTimerId!=null){this.clearTimer();this.callback('dblrightclick',[evt]);return!this.stopDouble;}else{var clickEvent=this['double']?OpenLayers.Util.extend({},evt):this.callback('rightclick',[evt]);var delayedRightCall=OpenLayers.Function.bind(this.delayedRightCall,this,clickEvent);this.rightclickTimerId=window.setTimeout(delayedRightCall,this.delay);}}
return!this.stopSingle;},delayedRightCall:function(evt){this.rightclickTimerId=null;if(evt){this.callback('rightclick',[evt]);}
return!this.stopSingle;},dblclick:function(evt){if(this.passesTolerance(evt)){if(this["double"]){this.callback('dblclick',[evt]);}
this.clearTimer();}
return!this.stopDouble;},click:function(evt){if(this.passesTolerance(evt)){if(this.timerId!=null){this.clearTimer();}else{var clickEvent=this.single?OpenLayers.Util.extend({},evt):null;this.timerId=window.setTimeout(OpenLayers.Function.bind(this.delayedCall,this,clickEvent),this.delay);}}
return!this.stopSingle;},passesTolerance:function(evt){var passes=true;if(this.pixelTolerance!=null&&this.down){var dpx=Math.sqrt(Math.pow(this.down.x-evt.xy.x,2)+
Math.pow(this.down.y-evt.xy.y,2));if(dpx>this.pixelTolerance){passes=false;}}
return passes;},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(evt){this.timerId=null;if(evt){this.callback('click',[evt]);}},deactivate:function(){var deactivated=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.clearTimer();this.down=null;deactivated=true;}
return deactivated;},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(control,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,arguments);},down:function(evt){},move:function(evt){},up:function(evt){},out:function(evt){},mousedown:function(evt){var propagate=true;this.dragging=false;if(this.checkModifiers(evt)&&OpenLayers.Event.isLeftClick(evt)){this.started=true;this.start=evt.xy;this.last=evt.xy;OpenLayers.Element.addClass(this.map.viewPortDiv,"olDragDown");this.down(evt);this.callback("down",[evt.xy]);OpenLayers.Event.stop(evt);if(!this.oldOnselectstart){this.oldOnselectstart=(document.onselectstart)?document.onselectstart:OpenLayers.Function.True;document.onselectstart=OpenLayers.Function.False;}
propagate=!this.stopDown;}else{this.started=false;this.start=null;this.last=null;}
return propagate;},mousemove:function(evt){if(this.started&&!this.timeoutId&&(evt.xy.x!=this.last.x||evt.xy.y!=this.last.y)){if(this.documentDrag===true&&this.documentEvents){if(evt.element===document){this.adjustXY(evt);this.setEvent(evt);}else{this.destroyDocumentEvents();}}
if(this.interval>0){this.timeoutId=setTimeout(OpenLayers.Function.bind(this.removeTimeout,this),this.interval);}
this.dragging=true;this.move(evt);this.callback("move",[evt.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(evt){if(this.started){if(this.documentDrag===true&&this.documentEvents){this.adjustXY(evt);this.destroyDocumentEvents();}
var dragged=(this.start!=this.last);this.started=false;this.dragging=false;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown");this.up(evt);this.callback("up",[evt.xy]);if(dragged){this.callback("done",[evt.xy]);}
document.onselectstart=this.oldOnselectstart;}
return true;},mouseout:function(evt){if(this.started&&OpenLayers.Util.mouseLeft(evt,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 dragged=(this.start!=this.last);this.started=false;this.dragging=false;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown");this.out(evt);this.callback("out",[]);if(dragged){this.callback("done",[evt.xy]);}
if(document.onselectstart){document.onselectstart=this.oldOnselectstart;}}}
return true;},click:function(evt){return(this.start==this.last);},activate:function(){var activated=false;if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.dragging=false;activated=true;}
return activated;},deactivate:function(){var deactivated=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.started=false;this.dragging=false;this.start=null;this.last=null;deactivated=true;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown");}
return deactivated;},adjustXY:function(evt){var pos=OpenLayers.Util.pagePosition(this.map.div);evt.xy.x-=pos[0];evt.xy.y-=pos[1];},destroyDocumentEvents:function(){OpenLayers.Element.removeClass(document.body,"olDragDown");this.documentEvents.destroy();this.documentEvents=null;},CLASS_NAME:"OpenLayers.Handler.Drag"});OpenLayers.Handler.Box=OpenLayers.Class(OpenLayers.Handler,{dragHandler:null,boxDivClassName:'olHandlerBoxZoomBox',boxCharacteristics:null,initialize:function(control,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,arguments);var callbacks={"down":this.startBox,"move":this.moveBox,"out":this.removeBox,"up":this.endBox};this.dragHandler=new OpenLayers.Handler.Drag(this,callbacks,{keyMask:this.keyMask});},setMap:function(map){OpenLayers.Handler.prototype.setMap.apply(this,arguments);if(this.dragHandler){this.dragHandler.setMap(map);}},startBox:function(xy){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(xy){var startX=this.dragHandler.start.x;var startY=this.dragHandler.start.y;var deltaX=Math.abs(startX-xy.x);var deltaY=Math.abs(startY-xy.y);this.zoomBox.style.width=Math.max(1,deltaX)+"px";this.zoomBox.style.height=Math.max(1,deltaY)+"px";this.zoomBox.style.left=xy.x<startX?xy.x+"px":startX+"px";this.zoomBox.style.top=xy.y<startY?xy.y+"px":startY+"px";var box=this.getBoxCharacteristics();if(box.newBoxModel){if(xy.x>startX){this.zoomBox.style.width=Math.max(1,deltaX-box.xOffset)+"px";}
if(xy.y>startY){this.zoomBox.style.height=Math.max(1,deltaY-box.yOffset)+"px";}}},endBox:function(end){var result;if(Math.abs(this.dragHandler.start.x-end.x)>5||Math.abs(this.dragHandler.start.y-end.y)>5){var start=this.dragHandler.start;var top=Math.min(start.y,end.y);var bottom=Math.max(start.y,end.y);var left=Math.min(start.x,end.x);var right=Math.max(start.x,end.x);result=new OpenLayers.Bounds(left,bottom,right,top);}else{result=this.dragHandler.start.clone();}
this.removeBox();this.callback("done",[result]);},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 xOffset=parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-left-width"))+parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-right-width"))+1;var yOffset=parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-top-width"))+parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-bottom-width"))+1;var newBoxModel=OpenLayers.Util.getBrowserName()=="msie"?document.compatMode!="BackCompat":true;this.boxCharacteristics={xOffset:xOffset,yOffset:yOffset,newBoxModel:newBoxModel};}
return this.boxCharacteristics;},CLASS_NAME:"OpenLayers.Handler.Box"});OpenLayers.Handler.Hover=OpenLayers.Class(OpenLayers.Handler,{delay:500,pixelTolerance:null,stopMove:false,px:null,timerId:null,initialize:function(control,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,arguments);},mousemove:function(evt){if(this.passesTolerance(evt.xy)){this.clearTimer();this.callback('move',[evt]);this.px=evt.xy;evt=OpenLayers.Util.extend({},evt);this.timerId=window.setTimeout(OpenLayers.Function.bind(this.delayedCall,this,evt),this.delay);}
return!this.stopMove;},mouseout:function(evt){if(OpenLayers.Util.mouseLeft(evt,this.map.div)){this.clearTimer();this.callback('move',[evt]);}
return true;},passesTolerance:function(px){var passes=true;if(this.pixelTolerance&&this.px){var dpx=Math.sqrt(Math.pow(this.px.x-px.x,2)+
Math.pow(this.px.y-px.y,2));if(dpx<this.pixelTolerance){passes=false;}}
return passes;},clearTimer:function(){if(this.timerId!=null){window.clearTimeout(this.timerId);this.timerId=null;}},delayedCall:function(evt){this.callback('pause',[evt]);},deactivate:function(){var deactivated=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.clearTimer();deactivated=true;}
return deactivated;},CLASS_NAME:"OpenLayers.Handler.Hover"});OpenLayers.Style=OpenLayers.Class({name:null,title:null,description:null,layerName:null,isDefault:false,rules:null,context:null,defaultStyle:null,defaultsPerSymbolizer:false,propertyStyles:null,initialize:function(style,options){OpenLayers.Util.extend(this,options);this.rules=[];if(options&&options.rules){this.addRules(options.rules);}
this.setDefaultStyle(style||OpenLayers.Feature.Vector.style["default"]);},destroy:function(){for(var i=0,len=this.rules.length;i<len;i++){this.rules[i].destroy();this.rules[i]=null;}
this.rules=null;this.defaultStyle=null;},createSymbolizer:function(feature){var style=this.defaultsPerSymbolizer?{}:this.createLiterals(OpenLayers.Util.extend({},this.defaultStyle),feature);var rules=this.rules;var rule,context;var elseRules=[];var appliedRules=false;for(var i=0,len=rules.length;i<len;i++){rule=rules[i];var applies=rule.evaluate(feature);if(applies){if(rule instanceof OpenLayers.Rule&&rule.elseFilter){elseRules.push(rule);}else{appliedRules=true;this.applySymbolizer(rule,style,feature);}}}
if(appliedRules==false&&elseRules.length>0){appliedRules=true;for(var i=0,len=elseRules.length;i<len;i++){this.applySymbolizer(elseRules[i],style,feature);}}
if(rules.length>0&&appliedRules==false){style.display="none";}
return style;},applySymbolizer:function(rule,style,feature){var symbolizerPrefix=feature.geometry?this.getSymbolizerPrefix(feature.geometry):OpenLayers.Style.SYMBOLIZER_PREFIXES[0];var symbolizer=rule.symbolizer[symbolizerPrefix]||rule.symbolizer;if(this.defaultsPerSymbolizer===true){var defaults=this.defaultStyle;OpenLayers.Util.applyDefaults(symbolizer,{pointRadius:defaults.pointRadius});if(symbolizer.stroke===true||symbolizer.graphic===true){OpenLayers.Util.applyDefaults(symbolizer,{strokeWidth:defaults.strokeWidth,strokeColor:defaults.strokeColor,strokeOpacity:defaults.strokeOpacity,strokeDashstyle:defaults.strokeDashstyle,strokeLinecap:defaults.strokeLinecap});}
if(symbolizer.fill===true||symbolizer.graphic===true){OpenLayers.Util.applyDefaults(symbolizer,{fillColor:defaults.fillColor,fillOpacity:defaults.fillOpacity});}
if(symbolizer.graphic===true){OpenLayers.Util.applyDefaults(symbolizer,{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(style,symbolizer),feature);},createLiterals:function(style,feature){var context=OpenLayers.Util.extend({},feature.attributes||feature.data);OpenLayers.Util.extend(context,this.context);for(var i in this.propertyStyles){style[i]=OpenLayers.Style.createLiteral(style[i],context,feature,i);}
return style;},findPropertyStyles:function(){var propertyStyles={};var style=this.defaultStyle;this.addPropertyStyles(propertyStyles,style);var rules=this.rules;var symbolizer,value;for(var i=0,len=rules.length;i<len;i++){symbolizer=rules[i].symbolizer;for(var key in symbolizer){value=symbolizer[key];if(typeof value=="object"){this.addPropertyStyles(propertyStyles,value);}else{this.addPropertyStyles(propertyStyles,symbolizer);break;}}}
return propertyStyles;},addPropertyStyles:function(propertyStyles,symbolizer){var property;for(var key in symbolizer){property=symbolizer[key];if(typeof property=="string"&&property.match(/\$\{\w+\}/)){propertyStyles[key]=true;}}
return propertyStyles;},addRules:function(rules){this.rules=this.rules.concat(rules);this.propertyStyles=this.findPropertyStyles();},setDefaultStyle:function(style){this.defaultStyle=style;this.propertyStyles=this.findPropertyStyles();},getSymbolizerPrefix:function(geometry){var prefixes=OpenLayers.Style.SYMBOLIZER_PREFIXES;for(var i=0,len=prefixes.length;i<len;i++){if(geometry.CLASS_NAME.indexOf(prefixes[i])!=-1){return prefixes[i];}}},CLASS_NAME:"OpenLayers.Style"});OpenLayers.Style.createLiteral=function(value,context,feature,property){if(typeof value=="string"&&value.indexOf("${")!=-1){value=OpenLayers.String.format(value,context,[feature,property]);value=(isNaN(value)||!value)?value:parseFloat(value);}
return value;};OpenLayers.Style.SYMBOLIZER_PREFIXES=['Point','Line','Polygon','Text'];OpenLayers.Filter=OpenLayers.Class({initialize:function(options){OpenLayers.Util.extend(this,options);},destroy:function(){},evaluate:function(context){return true;},clone:function(){return null;},CLASS_NAME:"OpenLayers.Filter"});OpenLayers.Filter.Spatial=OpenLayers.Class(OpenLayers.Filter,{type:null,property:null,value:null,distance:null,distanceUnits:null,initialize:function(options){OpenLayers.Filter.prototype.initialize.apply(this,[options]);},evaluate:function(feature){var intersect=false;switch(this.type){case OpenLayers.Filter.Spatial.BBOX:case OpenLayers.Filter.Spatial.INTERSECTS:if(feature.geometry){var geom=this.value;if(this.value.CLASS_NAME=="OpenLayers.Bounds"){geom=this.value.toGeometry();}
if(feature.geometry.intersects(geom)){intersect=true;}}
break;default:OpenLayers.Console.error(OpenLayers.i18n("filterEvaluateNotImplemented"));break;}
return intersect;},clone:function(){var options=OpenLayers.Util.applyDefaults({value:this.value&&this.value.clone&&this.value.clone()},this);return new OpenLayers.Filter.Spatial(options);},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.Control.GetFeature=OpenLayers.Class(OpenLayers.Control,{protocol:null,multipleKey:null,toggleKey:null,modifiers:null,multiple:false,click:true,clickout:true,toggle:false,clickTolerance:5,hover:false,box:false,maxFeatures:10,features:null,hoverFeature:null,handlerOptions:null,handlers:null,hoverResponse:null,filterType:OpenLayers.Filter.Spatial.BBOX,EVENT_TYPES:["featureselected","featuresselected","featureunselected","clickout","beforefeatureselected","beforefeaturesselected","hoverfeature","outfeature"],initialize:function(options){this.EVENT_TYPES=OpenLayers.Control.GetFeature.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);options.handlerOptions=options.handlerOptions||{};OpenLayers.Control.prototype.initialize.apply(this,[options]);this.features={};this.handlers={};if(this.click){this.handlers.click=new OpenLayers.Handler.Click(this,{click:this.selectSingle},this.handlerOptions.click||{});}
if(this.box){this.handlers.box=new OpenLayers.Handler.Box(this,{done:this.selectBox},OpenLayers.Util.extend(this.handlerOptions.box,{boxDivClassName:"olHandlerBoxSelectFeature"}));}
if(this.hover){this.handlers.hover=new OpenLayers.Handler.Hover(this,{'move':this.cancelHover,'pause':this.selectHover},OpenLayers.Util.extend(this.handlerOptions.hover,{'delay':250}));}},activate:function(){if(!this.active){for(var i in this.handlers){this.handlers[i].activate();}}
return OpenLayers.Control.prototype.activate.apply(this,arguments);},deactivate:function(){if(this.active){for(var i in this.handlers){this.handlers[i].deactivate();}}
return OpenLayers.Control.prototype.deactivate.apply(this,arguments);},selectSingle:function(evt){OpenLayers.Element.addClass(this.map.viewPortDiv,"olCursorWait");var bounds=this.pixelToBounds(evt.xy);this.setModifiers(evt);this.request(bounds,{single:true});},selectBox:function(position){var bounds;if(position instanceof OpenLayers.Bounds){var minXY=this.map.getLonLatFromPixel(new OpenLayers.Pixel(position.left,position.bottom));var maxXY=this.map.getLonLatFromPixel(new OpenLayers.Pixel(position.right,position.top));bounds=new OpenLayers.Bounds(minXY.lon,minXY.lat,maxXY.lon,maxXY.lat);}else{if(this.click){return;}
bounds=this.pixelToBounds(position);}
this.setModifiers(this.handlers.box.dragHandler.evt);this.request(bounds);},selectHover:function(evt){var bounds=this.pixelToBounds(evt.xy);this.request(bounds,{single:true,hover:true});},cancelHover:function(){if(this.hoverResponse){this.protocol.abort(this.hoverResponse);this.hoverResponse=null;}},request:function(bounds,options){options=options||{};var filter=new OpenLayers.Filter.Spatial({type:this.filterType,value:bounds});var response=this.protocol.read({maxFeatures:options.single==true?this.maxFeatures:undefined,filter:filter,callback:function(result){if(result.success()){if(result.features.length){if(options.single==true){this.selectBestFeature(result.features,bounds.getCenterLonLat(),options);}else{this.select(result.features);}}else if(options.hover){this.hoverSelect();}else{this.events.triggerEvent("clickout");if(this.clickout){this.unselectAll();}}}
OpenLayers.Element.removeClass(this.map.viewPortDiv,"olCursorWait");},scope:this});if(options.hover==true){this.hoverResponse=response;}},selectBestFeature:function(features,clickPosition,options){options=options||{};if(features.length){var point=new OpenLayers.Geometry.Point(clickPosition.lon,clickPosition.lat);var feature,resultFeature,dist;var minDist=Number.MAX_VALUE;for(var i=0;i<features.length;++i){feature=features[i];if(feature.geometry){dist=point.distanceTo(feature.geometry,{edge:false});if(dist<minDist){minDist=dist;resultFeature=feature;if(minDist==0){break;}}}}
if(options.hover==true){this.hoverSelect(resultFeature);}else{this.select(resultFeature||features);}}},setModifiers:function(evt){this.modifiers={multiple:this.multiple||(this.multipleKey&&evt[this.multipleKey]),toggle:this.toggle||(this.toggleKey&&evt[this.toggleKey])};},select:function(features){if(!this.modifiers.multiple&&!this.modifiers.toggle){this.unselectAll();}
if(!(features instanceof Array)){features=[features];}
var cont=this.events.triggerEvent("beforefeaturesselected",{features:features});if(cont!==false){var selectedFeatures=[];var feature;for(var i=0,len=features.length;i<len;++i){feature=features[i];if(this.features[feature.fid||feature.id]){if(this.modifiers.toggle){this.unselect(this.features[feature.fid||feature.id]);}}else{cont=this.events.triggerEvent("beforefeatureselected",{feature:feature});if(cont!==false){this.features[feature.fid||feature.id]=feature;selectedFeatures.push(feature);this.events.triggerEvent("featureselected",{feature:feature});}}}
this.events.triggerEvent("featuresselected",{features:selectedFeatures});}},hoverSelect:function(feature){var fid=feature?feature.fid||feature.id:null;var hfid=this.hoverFeature?this.hoverFeature.fid||this.hoverFeature.id:null;if(hfid&&hfid!=fid){this.events.triggerEvent("outfeature",{feature:this.hoverFeature});this.hoverFeature=null;}
if(fid&&fid!=hfid){this.events.triggerEvent("hoverfeature",{feature:feature});this.hoverFeature=feature;}},unselect:function(feature){delete this.features[feature.fid||feature.id];this.events.triggerEvent("featureunselected",{feature:feature});},unselectAll:function(){for(var fid in this.features){this.unselect(this.features[fid]);}},setMap:function(map){for(var i in this.handlers){this.handlers[i].setMap(map);}
OpenLayers.Control.prototype.setMap.apply(this,arguments);},pixelToBounds:function(pixel){var llPx=pixel.add(-this.clickTolerance/2,this.clickTolerance/2);var urPx=pixel.add(this.clickTolerance/2,-this.clickTolerance/2);var ll=this.map.getLonLatFromPixel(llPx);var ur=this.map.getLonLatFromPixel(urPx);return new OpenLayers.Bounds(ll.lon,ll.lat,ur.lon,ur.lat);},CLASS_NAME:"OpenLayers.Control.GetFeature"});OpenLayers.Format.JSON=OpenLayers.Class(OpenLayers.Format,{indent:"    ",space:" ",newline:"\n",level:0,pretty:false,initialize:function(options){OpenLayers.Format.prototype.initialize.apply(this,[options]);},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(value,pretty){this.pretty=!!pretty;var json=null;var type=typeof value;if(this.serialize[type]){try{json=this.serialize[type].apply(this,[value]);}catch(err){OpenLayers.Console.error("Trouble serializing: "+err);}}
return json;},writeIndent:function(){var pieces=[];if(this.pretty){for(var i=0;i<this.level;++i){pieces.push(this.indent);}}
return pieces.join('');},writeNewline:function(){return(this.pretty)?this.newline:'';},writeSpace:function(){return(this.pretty)?this.space:'';},serialize:{'object':function(object){if(object==null){return"null";}
if(object.constructor==Date){return this.serialize.date.apply(this,[object]);}
if(object.constructor==Array){return this.serialize.array.apply(this,[object]);}
var pieces=['{'];this.level+=1;var key,keyJSON,valueJSON;var addComma=false;for(key in object){if(object.hasOwnProperty(key)){keyJSON=OpenLayers.Format.JSON.prototype.write.apply(this,[key,this.pretty]);valueJSON=OpenLayers.Format.JSON.prototype.write.apply(this,[object[key],this.pretty]);if(keyJSON!=null&&valueJSON!=null){if(addComma){pieces.push(',');}
pieces.push(this.writeNewline(),this.writeIndent(),keyJSON,':',this.writeSpace(),valueJSON);addComma=true;}}}
this.level-=1;pieces.push(this.writeNewline(),this.writeIndent(),'}');return pieces.join('');},'array':function(array){var json;var pieces=['['];this.level+=1;for(var i=0,len=array.length;i<len;++i){json=OpenLayers.Format.JSON.prototype.write.apply(this,[array[i],this.pretty]);if(json!=null){if(i>0){pieces.push(',');}
pieces.push(this.writeNewline(),this.writeIndent(),json);}}
this.level-=1;pieces.push(this.writeNewline(),this.writeIndent(),']');return pieces.join('');},'string':function(string){var m={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};if(/["\\\x00-\x1f]/.test(string)){return'"'+string.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c;}
c=b.charCodeAt();return'\\u00'+
Math.floor(c/16).toString(16)+
(c%16).toString(16);})+'"';}
return'"'+string+'"';},'number':function(number){return isFinite(number)?String(number):"null";},'boolean':function(bool){return String(bool);},'date':function(date){function format(number){return(number<10)?'0'+number:number;}
return'"'+date.getFullYear()+'-'+
format(date.getMonth()+1)+'-'+
format(date.getDate())+'T'+
format(date.getHours())+':'+
format(date.getMinutes())+':'+
format(date.getSeconds())+'"';}},CLASS_NAME:"OpenLayers.Format.JSON"});OpenLayers.Geometry.MultiLineString=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.LineString"],initialize:function(components){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments);},split:function(geometry,options){var results=null;var mutual=options&&options.mutual;var splits,sourceLine,sourceLines,sourceSplit,targetSplit;var sourceParts=[];var targetParts=[geometry];for(var i=0,len=this.components.length;i<len;++i){sourceLine=this.components[i];sourceSplit=false;for(var j=0;j<targetParts.length;++j){splits=sourceLine.split(targetParts[j],options);if(splits){if(mutual){sourceLines=splits[0];for(var k=0,klen=sourceLines.length;k<klen;++k){if(k===0&&sourceParts.length){sourceParts[sourceParts.length-1].addComponent(sourceLines[k]);}else{sourceParts.push(new OpenLayers.Geometry.MultiLineString([sourceLines[k]]));}}
sourceSplit=true;splits=splits[1];}
if(splits.length){splits.unshift(j,1);Array.prototype.splice.apply(targetParts,splits);break;}}}
if(!sourceSplit){if(sourceParts.length){sourceParts[sourceParts.length-1].addComponent(sourceLine.clone());}else{sourceParts=[new OpenLayers.Geometry.MultiLineString(sourceLine.clone())];}}}
if(sourceParts&&sourceParts.length>1){sourceSplit=true;}else{sourceParts=[];}
if(targetParts&&targetParts.length>1){targetSplit=true;}else{targetParts=[];}
if(sourceSplit||targetSplit){if(mutual){results=[sourceParts,targetParts];}else{results=targetParts;}}
return results;},splitWith:function(geometry,options){var results=null;var mutual=options&&options.mutual;var splits,targetLine,sourceLines,sourceSplit,targetSplit,sourceParts,targetParts;if(geometry instanceof OpenLayers.Geometry.LineString){targetParts=[];sourceParts=[geometry];for(var i=0,len=this.components.length;i<len;++i){targetSplit=false;targetLine=this.components[i];for(var j=0;j<sourceParts.length;++j){splits=sourceParts[j].split(targetLine,options);if(splits){if(mutual){sourceLines=splits[0];if(sourceLines.length){sourceLines.unshift(j,1);Array.prototype.splice.apply(sourceParts,sourceLines);j+=sourceLines.length-2;}
splits=splits[1];if(splits.length===0){splits=[targetLine.clone()];}}
for(var k=0,klen=splits.length;k<klen;++k){if(k===0&&targetParts.length){targetParts[targetParts.length-1].addComponent(splits[k]);}else{targetParts.push(new OpenLayers.Geometry.MultiLineString([splits[k]]));}}
targetSplit=true;}}
if(!targetSplit){if(targetParts.length){targetParts[targetParts.length-1].addComponent(targetLine.clone());}else{targetParts=[new OpenLayers.Geometry.MultiLineString([targetLine.clone()])];}}}}else{results=geometry.split(this);}
if(sourceParts&&sourceParts.length>1){sourceSplit=true;}else{sourceParts=[];}
if(targetParts&&targetParts.length>1){targetSplit=true;}else{targetParts=[];}
if(sourceSplit||targetSplit){if(mutual){results=[sourceParts,targetParts];}else{results=targetParts;}}
return results;},CLASS_NAME:"OpenLayers.Geometry.MultiLineString"});OpenLayers.Geometry.MultiPolygon=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.Polygon"],initialize:function(components){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments);},CLASS_NAME:"OpenLayers.Geometry.MultiPolygon"});OpenLayers.Format.GeoJSON=OpenLayers.Class(OpenLayers.Format.JSON,{ignoreExtraDims:false,initialize:function(options){OpenLayers.Format.JSON.prototype.initialize.apply(this,[options]);},read:function(json,type,filter){type=(type)?type:"FeatureCollection";var results=null;var obj=null;if(typeof json=="string"){obj=OpenLayers.Format.JSON.prototype.read.apply(this,[json,filter]);}else{obj=json;}
if(!obj){OpenLayers.Console.error("Bad JSON: "+json);}else if(typeof(obj.type)!="string"){OpenLayers.Console.error("Bad GeoJSON - no type: "+json);}else if(this.isValidType(obj,type)){switch(type){case"Geometry":try{results=this.parseGeometry(obj);}catch(err){OpenLayers.Console.error(err);}
break;case"Feature":try{results=this.parseFeature(obj);results.type="Feature";}catch(err){OpenLayers.Console.error(err);}
break;case"FeatureCollection":results=[];switch(obj.type){case"Feature":try{results.push(this.parseFeature(obj));}catch(err){results=null;OpenLayers.Console.error(err);}
break;case"FeatureCollection":for(var i=0,len=obj.features.length;i<len;++i){try{results.push(this.parseFeature(obj.features[i]));}catch(err){results=null;OpenLayers.Console.error(err);}}
break;default:try{var geom=this.parseGeometry(obj);results.push(new OpenLayers.Feature.Vector(geom));}catch(err){results=null;OpenLayers.Console.error(err);}}
break;}}
return results;},isValidType:function(obj,type){var valid=false;switch(type){case"Geometry":if(OpenLayers.Util.indexOf(["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon","Box","GeometryCollection"],obj.type)==-1){OpenLayers.Console.error("Unsupported geometry type: "+
obj.type);}else{valid=true;}
break;case"FeatureCollection":valid=true;break;default:if(obj.type==type){valid=true;}else{OpenLayers.Console.error("Cannot convert types from "+
obj.type+" to "+type);}}
return valid;},parseFeature:function(obj){var feature,geometry,attributes,bbox;attributes=(obj.properties)?obj.properties:{};bbox=(obj.geometry&&obj.geometry.bbox)||obj.bbox;try{geometry=this.parseGeometry(obj.geometry);}catch(err){throw err;}
feature=new OpenLayers.Feature.Vector(geometry,attributes);if(bbox){feature.bounds=OpenLayers.Bounds.fromArray(bbox);}
if(obj.id){feature.fid=obj.id;}
return feature;},parseGeometry:function(obj){if(obj==null){return null;}
var geometry,collection=false;if(obj.type=="GeometryCollection"){if(!(obj.geometries instanceof Array)){throw"GeometryCollection must have geometries array: "+obj;}
var numGeom=obj.geometries.length;var components=new Array(numGeom);for(var i=0;i<numGeom;++i){components[i]=this.parseGeometry.apply(this,[obj.geometries[i]]);}
geometry=new OpenLayers.Geometry.Collection(components);collection=true;}else{if(!(obj.coordinates instanceof Array)){throw"Geometry must have coordinates array: "+obj;}
if(!this.parseCoords[obj.type.toLowerCase()]){throw"Unsupported geometry type: "+obj.type;}
try{geometry=this.parseCoords[obj.type.toLowerCase()].apply(this,[obj.coordinates]);}catch(err){throw err;}}
if(this.internalProjection&&this.externalProjection&&!collection){geometry.transform(this.externalProjection,this.internalProjection);}
return geometry;},parseCoords:{"point":function(array){if(this.ignoreExtraDims==false&&array.length!=2){throw"Only 2D points are supported: "+array;}
return new OpenLayers.Geometry.Point(array[0],array[1]);},"multipoint":function(array){var points=[];var p=null;for(var i=0,len=array.length;i<len;++i){try{p=this.parseCoords["point"].apply(this,[array[i]]);}catch(err){throw err;}
points.push(p);}
return new OpenLayers.Geometry.MultiPoint(points);},"linestring":function(array){var points=[];var p=null;for(var i=0,len=array.length;i<len;++i){try{p=this.parseCoords["point"].apply(this,[array[i]]);}catch(err){throw err;}
points.push(p);}
return new OpenLayers.Geometry.LineString(points);},"multilinestring":function(array){var lines=[];var l=null;for(var i=0,len=array.length;i<len;++i){try{l=this.parseCoords["linestring"].apply(this,[array[i]]);}catch(err){throw err;}
lines.push(l);}
return new OpenLayers.Geometry.MultiLineString(lines);},"polygon":function(array){var rings=[];var r,l;for(var i=0,len=array.length;i<len;++i){try{l=this.parseCoords["linestring"].apply(this,[array[i]]);}catch(err){throw err;}
r=new OpenLayers.Geometry.LinearRing(l.components);rings.push(r);}
return new OpenLayers.Geometry.Polygon(rings);},"multipolygon":function(array){var polys=[];var p=null;for(var i=0,len=array.length;i<len;++i){try{p=this.parseCoords["polygon"].apply(this,[array[i]]);}catch(err){throw err;}
polys.push(p);}
return new OpenLayers.Geometry.MultiPolygon(polys);},"box":function(array){if(array.length!=2){throw"GeoJSON box coordinates must have 2 elements";}
return new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing([new OpenLayers.Geometry.Point(array[0][0],array[0][1]),new OpenLayers.Geometry.Point(array[1][0],array[0][1]),new OpenLayers.Geometry.Point(array[1][0],array[1][1]),new OpenLayers.Geometry.Point(array[0][0],array[1][1]),new OpenLayers.Geometry.Point(array[0][0],array[0][1])])]);}},write:function(obj,pretty){var geojson={"type":null};if(obj instanceof Array){geojson.type="FeatureCollection";var numFeatures=obj.length;geojson.features=new Array(numFeatures);for(var i=0;i<numFeatures;++i){var element=obj[i];if(!element instanceof OpenLayers.Feature.Vector){var msg="FeatureCollection only supports collections "+"of features: "+element;throw msg;}
geojson.features[i]=this.extract.feature.apply(this,[element]);}}else if(obj.CLASS_NAME.indexOf("OpenLayers.Geometry")==0){geojson=this.extract.geometry.apply(this,[obj]);}else if(obj instanceof OpenLayers.Feature.Vector){geojson=this.extract.feature.apply(this,[obj]);if(obj.layer&&obj.layer.projection){geojson.crs=this.createCRSObject(obj);}}
return OpenLayers.Format.JSON.prototype.write.apply(this,[geojson,pretty]);},createCRSObject:function(object){var proj=object.layer.projection.toString();var crs={};if(proj.match(/epsg:/i)){var code=parseInt(proj.substring(proj.indexOf(":")+1));if(code==4326){crs={"type":"OGC","properties":{"urn":"urn:ogc:def:crs:OGC:1.3:CRS84"}};}else{crs={"type":"EPSG","properties":{"code":code}};}}
return crs;},extract:{'feature':function(feature){var geom=this.extract.geometry.apply(this,[feature.geometry]);return{"type":"Feature","id":feature.fid==null?feature.id:feature.fid,"properties":feature.attributes,"geometry":geom};},'geometry':function(geometry){if(geometry==null){return null;}
if(this.internalProjection&&this.externalProjection){geometry=geometry.clone();geometry.transform(this.internalProjection,this.externalProjection);}
var geometryType=geometry.CLASS_NAME.split('.')[2];var data=this.extract[geometryType.toLowerCase()].apply(this,[geometry]);var json;if(geometryType=="Collection"){json={"type":"GeometryCollection","geometries":data};}else{json={"type":geometryType,"coordinates":data};}
return json;},'point':function(point){return[point.x,point.y];},'multipoint':function(multipoint){var array=[];for(var i=0,len=multipoint.components.length;i<len;++i){array.push(this.extract.point.apply(this,[multipoint.components[i]]));}
return array;},'linestring':function(linestring){var array=[];for(var i=0,len=linestring.components.length;i<len;++i){array.push(this.extract.point.apply(this,[linestring.components[i]]));}
return array;},'multilinestring':function(multilinestring){var array=[];for(var i=0,len=multilinestring.components.length;i<len;++i){array.push(this.extract.linestring.apply(this,[multilinestring.components[i]]));}
return array;},'polygon':function(polygon){var array=[];for(var i=0,len=polygon.components.length;i<len;++i){array.push(this.extract.linestring.apply(this,[polygon.components[i]]));}
return array;},'multipolygon':function(multipolygon){var array=[];for(var i=0,len=multipolygon.components.length;i<len;++i){array.push(this.extract.polygon.apply(this,[multipolygon.components[i]]));}
return array;},'collection':function(collection){var len=collection.components.length;var array=new Array(len);for(var i=0;i<len;++i){array[i]=this.extract.geometry.apply(this,[collection.components[i]]);}
return array;}},CLASS_NAME:"OpenLayers.Format.GeoJSON"});OpenLayers.Protocol=OpenLayers.Class({format:null,options:null,autoDestroy:true,defaultFilter:null,initialize:function(options){options=options||{};OpenLayers.Util.extend(this,options);this.options=options;},mergeWithDefaultFilter:function(filter){if(filter){if(this.defaultFilter){filter=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.AND,filters:[this.defaultFilter,filter]});}}else{filter=this.defaultFilter;}
return filter;},destroy:function(){this.options=null;this.format=null;},read:function(options){options=options||{};options.filter=this.mergeWithDefaultFilter(options.filter);},create:function(){},update:function(){},"delete":function(){},commit:function(){},abort:function(response){},createCallback:function(method,response,options){return OpenLayers.Function.bind(function(){method.apply(this,[response,options]);},this);},CLASS_NAME:"OpenLayers.Protocol"});OpenLayers.Protocol.Response=OpenLayers.Class({code:null,requestType:null,last:true,features:null,reqFeatures:null,priv:null,initialize:function(options){OpenLayers.Util.extend(this,options);},success:function(){return this.code>0;},CLASS_NAME:"OpenLayers.Protocol.Response"});OpenLayers.Protocol.Response.SUCCESS=1;OpenLayers.Protocol.Response.FAILURE=0;OpenLayers.Filter.Comparison=OpenLayers.Class(OpenLayers.Filter,{type:null,property:null,value:null,matchCase:true,lowerBoundary:null,upperBoundary:null,initialize:function(options){OpenLayers.Filter.prototype.initialize.apply(this,[options]);},evaluate:function(context){var result=false;switch(this.type){case OpenLayers.Filter.Comparison.EQUAL_TO:var got=context[this.property];var exp=this.value;if(!this.matchCase&&typeof got=="string"&&typeof exp=="string"){result=(got.toUpperCase()==exp.toUpperCase());}else{result=(got==exp);}
break;case OpenLayers.Filter.Comparison.NOT_EQUAL_TO:var got=context[this.property];var exp=this.value;if(!this.matchCase&&typeof got=="string"&&typeof exp=="string"){result=(got.toUpperCase()!=exp.toUpperCase());}else{result=(got!=exp);}
break;case OpenLayers.Filter.Comparison.LESS_THAN:result=context[this.property]<this.value;break;case OpenLayers.Filter.Comparison.GREATER_THAN:result=context[this.property]>this.value;break;case OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO:result=context[this.property]<=this.value;break;case OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO:result=context[this.property]>=this.value;break;case OpenLayers.Filter.Comparison.BETWEEN:result=(context[this.property]>=this.lowerBoundary)&&(context[this.property]<=this.upperBoundary);break;case OpenLayers.Filter.Comparison.LIKE:var regexp=new RegExp(this.value,"gi");result=regexp.test(context[this.property]);break;}
return result;},value2regex:function(wildCard,singleChar,escapeChar){if(wildCard=="."){var msg="'.' is an unsupported wildCard character for "+"OpenLayers.Filter.Comparison";OpenLayers.Console.error(msg);return null;}
wildCard=wildCard?wildCard:"*";singleChar=singleChar?singleChar:".";escapeChar=escapeChar?escapeChar:"!";this.value=this.value.replace(new RegExp("\\"+escapeChar+"(.|$)","g"),"\\$1");this.value=this.value.replace(new RegExp("\\"+singleChar,"g"),".");this.value=this.value.replace(new RegExp("\\"+wildCard,"g"),".*");this.value=this.value.replace(new RegExp("\\\\.\\*","g"),"\\"+wildCard);this.value=this.value.replace(new RegExp("\\\\\\.","g"),"\\"+singleChar);return this.value;},regex2value:function(){var value=this.value;value=value.replace(/!/g,"!!");value=value.replace(/(\\)?\\\./g,function($0,$1){return $1?$0:"!.";});value=value.replace(/(\\)?\\\*/g,function($0,$1){return $1?$0:"!*";});value=value.replace(/\\\\/g,"\\");value=value.replace(/\.\*/g,"*");return value;},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.Logical=OpenLayers.Class(OpenLayers.Filter,{filters:null,type:null,initialize:function(options){this.filters=[];OpenLayers.Filter.prototype.initialize.apply(this,[options]);},destroy:function(){this.filters=null;OpenLayers.Filter.prototype.destroy.apply(this);},evaluate:function(context){switch(this.type){case OpenLayers.Filter.Logical.AND:for(var i=0,len=this.filters.length;i<len;i++){if(this.filters[i].evaluate(context)==false){return false;}}
return true;case OpenLayers.Filter.Logical.OR:for(var i=0,len=this.filters.length;i<len;i++){if(this.filters[i].evaluate(context)==true){return true;}}
return false;case OpenLayers.Filter.Logical.NOT:return(!this.filters[0].evaluate(context));}},clone:function(){var filters=[];for(var i=0,len=this.filters.length;i<len;++i){filters.push(this.filters[i].clone());}
return new OpenLayers.Filter.Logical({type:this.type,filters:filters});},CLASS_NAME:"OpenLayers.Filter.Logical"});OpenLayers.Filter.Logical.AND="&&";OpenLayers.Filter.Logical.OR="||";OpenLayers.Filter.Logical.NOT="!";OpenLayers.Protocol.HTTP=OpenLayers.Class(OpenLayers.Protocol,{url:null,headers:null,params:null,callback:null,scope:null,readWithPOST:false,wildcarded:false,initialize:function(options){options=options||{};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(options){OpenLayers.Protocol.prototype.read.apply(this,arguments);options=OpenLayers.Util.applyDefaults(options,this.options);options.params=OpenLayers.Util.applyDefaults(options.params,this.options.params);if(options.filter){options.params=this.filterToParams(options.filter,options.params);}
var readWithPOST=(options.readWithPOST!==undefined)?options.readWithPOST:this.readWithPOST;var resp=new OpenLayers.Protocol.Response({requestType:"read"});if(readWithPOST){resp.priv=OpenLayers.Request.POST({url:options.url,callback:this.createCallback(this.handleRead,resp,options),data:OpenLayers.Util.getParameterString(options.params),headers:{"Content-Type":"application/x-www-form-urlencoded"}});}else{resp.priv=OpenLayers.Request.GET({url:options.url,callback:this.createCallback(this.handleRead,resp,options),params:options.params,headers:options.headers});}
return resp;},handleRead:function(resp,options){this.handleResponse(resp,options);},filterToParams:function(filter,params){params=params||{};var className=filter.CLASS_NAME;var filterType=className.substring(className.lastIndexOf(".")+1);switch(filterType){case"Spatial":switch(filter.type){case OpenLayers.Filter.Spatial.BBOX:params.bbox=filter.value.toArray();break;case OpenLayers.Filter.Spatial.DWITHIN:params.tolerance=filter.distance;case OpenLayers.Filter.Spatial.WITHIN:params.lon=filter.value.x;params.lat=filter.value.y;break;default:OpenLayers.Console.warn("Unknown spatial filter type "+filter.type);}
break;case"Comparison":var op=OpenLayers.Protocol.HTTP.COMP_TYPE_TO_OP_STR[filter.type];if(op!==undefined){var value=filter.value;if(filter.type==OpenLayers.Filter.Comparison.LIKE){value=this.regex2value(value);if(this.wildcarded){value="%"+value+"%";}}
params[filter.property+"__"+op]=value;params.queryable=params.queryable||[];params.queryable.push(filter.property);}else{OpenLayers.Console.warn("Unknown comparison filter type "+filter.type);}
break;case"Logical":if(filter.type===OpenLayers.Filter.Logical.AND){for(var i=0,len=filter.filters.length;i<len;i++){params=this.filterToParams(filter.filters[i],params);}}else{OpenLayers.Console.warn("Unsupported logical filter type "+filter.type);}
break;default:OpenLayers.Console.warn("Unknown filter type "+filterType);}
return params;},regex2value:function(value){value=value.replace(/%/g,"\\%");value=value.replace(/\\\\\.(\*)?/g,function($0,$1){return $1?$0:"\\\\_";});value=value.replace(/\\\\\.\*/g,"\\\\%");value=value.replace(/(\\)?\.(\*)?/g,function($0,$1,$2){return $1||$2?$0:"_";});value=value.replace(/(\\)?\.\*/g,function($0,$1){return $1?$0:"%";});value=value.replace(/\\\./g,".");value=value.replace(/(\\)?\\\*/g,function($0,$1){return $1?$0:"*";});return value;},create:function(features,options){options=OpenLayers.Util.applyDefaults(options,this.options);var resp=new OpenLayers.Protocol.Response({reqFeatures:features,requestType:"create"});resp.priv=OpenLayers.Request.POST({url:options.url,callback:this.createCallback(this.handleCreate,resp,options),headers:options.headers,data:this.format.write(features)});return resp;},handleCreate:function(resp,options){this.handleResponse(resp,options);},update:function(feature,options){options=options||{};var url=options.url||feature.url||this.options.url+"/"+feature.fid;options=OpenLayers.Util.applyDefaults(options,this.options);var resp=new OpenLayers.Protocol.Response({reqFeatures:feature,requestType:"update"});resp.priv=OpenLayers.Request.PUT({url:url,callback:this.createCallback(this.handleUpdate,resp,options),headers:options.headers,data:this.format.write(feature)});return resp;},handleUpdate:function(resp,options){this.handleResponse(resp,options);},"delete":function(feature,options){options=options||{};var url=options.url||feature.url||this.options.url+"/"+feature.fid;options=OpenLayers.Util.applyDefaults(options,this.options);var resp=new OpenLayers.Protocol.Response({reqFeatures:feature,requestType:"delete"});resp.priv=OpenLayers.Request.DELETE({url:url,callback:this.createCallback(this.handleDelete,resp,options),headers:options.headers});return resp;},handleDelete:function(resp,options){this.handleResponse(resp,options);},handleResponse:function(resp,options){var request=resp.priv;if(options.callback){if(request.status>=200&&request.status<300){if(resp.requestType!="delete"){resp.features=this.parseFeatures(request);}
resp.code=OpenLayers.Protocol.Response.SUCCESS;}else{resp.code=OpenLayers.Protocol.Response.FAILURE;}
options.callback.call(options.scope,resp);}},parseFeatures:function(request){var doc=request.responseXML;if(!doc||!doc.documentElement){doc=request.responseText;}
if(!doc||doc.length<=0){return null;}
return this.format.read(doc);},commit:function(features,options){options=OpenLayers.Util.applyDefaults(options,this.options);var resp=[],nResponses=0;var types={};types[OpenLayers.State.INSERT]=[];types[OpenLayers.State.UPDATE]=[];types[OpenLayers.State.DELETE]=[];var feature,list,requestFeatures=[];for(var i=0,len=features.length;i<len;++i){feature=features[i];list=types[feature.state];if(list){list.push(feature);requestFeatures.push(feature);}}
var nRequests=(types[OpenLayers.State.INSERT].length>0?1:0)+
types[OpenLayers.State.UPDATE].length+
types[OpenLayers.State.DELETE].length;var success=true;var finalResponse=new OpenLayers.Protocol.Response({reqFeatures:requestFeatures});function insertCallback(response){var len=response.features?response.features.length:0;var fids=new Array(len);for(var i=0;i<len;++i){fids[i]=response.features[i].fid;}
finalResponse.insertIds=fids;callback.apply(this,[response]);}
function callback(response){this.callUserCallback(response,options);success=success&&response.success();nResponses++;if(nResponses>=nRequests){if(options.callback){finalResponse.code=success?OpenLayers.Protocol.Response.SUCCESS:OpenLayers.Protocol.Response.FAILURE;options.callback.apply(options.scope,[finalResponse]);}}}
var queue=types[OpenLayers.State.INSERT];if(queue.length>0){resp.push(this.create(queue,OpenLayers.Util.applyDefaults({callback:insertCallback,scope:this},options.create)));}
queue=types[OpenLayers.State.UPDATE];for(var i=queue.length-1;i>=0;--i){resp.push(this.update(queue[i],OpenLayers.Util.applyDefaults({callback:callback,scope:this},options.update)));}
queue=types[OpenLayers.State.DELETE];for(var i=queue.length-1;i>=0;--i){resp.push(this["delete"](queue[i],OpenLayers.Util.applyDefaults({callback:callback,scope:this},options["delete"])));}
return resp;},abort:function(response){if(response){response.priv.abort();}},callUserCallback:function(resp,options){var opt=options[resp.requestType];if(opt&&opt.callback){opt.callback.call(opt.scope,resp);}},CLASS_NAME:"OpenLayers.Protocol.HTTP"});(function(){var o=OpenLayers.Protocol.HTTP.COMP_TYPE_TO_OP_STR={};o[OpenLayers.Filter.Comparison.EQUAL_TO]="eq";o[OpenLayers.Filter.Comparison.NOT_EQUAL_TO]="ne";o[OpenLayers.Filter.Comparison.LESS_THAN]="lt";o[OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO]="lte";o[OpenLayers.Filter.Comparison.GREATER_THAN]="gt";o[OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO]="gte";o[OpenLayers.Filter.Comparison.LIKE]="ilike";})();Ext.namespace("GeoExt");GeoExt.Popup=Ext.extend(Ext.Window,{anchored:true,map:null,panIn:true,unpinnable:true,feature:null,lonlat:null,animCollapse:false,draggable:false,shadow:false,popupCls:"gx-popup",ancCls:null,initComponent:function(){if(this.map instanceof GeoExt.MapPanel){this.map=this.map.map;}
if(!this.map&&this.feature&&this.feature.layer){this.map=this.feature.layer.map;}
if(!this.feature&&this.lonlat){this.feature=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(this.lonlat.lon,this.lonlat.lat));}
if(this.anchored){this.addAnchorEvents();}
this.baseCls=this.popupCls+" "+this.baseCls;this.elements+=',anc';GeoExt.Popup.superclass.initComponent.call(this);},onRender:function(ct,position){GeoExt.Popup.superclass.onRender.call(this,ct,position);this.ancCls=this.popupCls+"-anc";this.createElement("anc",this.el.dom);},initTools:function(){if(this.unpinnable){this.addTool({id:'unpin',handler:this.unanchorPopup.createDelegate(this,[])});}
GeoExt.Popup.superclass.initTools.call(this);},show:function(){GeoExt.Popup.superclass.show.apply(this,arguments);if(this.anchored){this.position();if(this.panIn&&!this._mapMove){this.panIntoView();}}},maximize:function(){if(!this.maximized&&this.anc){this.unanchorPopup();}
GeoExt.Popup.superclass.maximize.apply(this,arguments);},setSize:function(w,h){if(this.anc){var ancSize=this.anc.getSize();if(typeof w=='object'){h=w.height-ancSize.height;w=w.width;}else if(!isNaN(h)){h=h-ancSize.height;}}
GeoExt.Popup.superclass.setSize.call(this,w,h);},position:function(){var centerLonLat=this.feature.geometry.getBounds().getCenterLonLat();if(this._mapMove===true){var visible=this.map.getExtent().containsLonLat(centerLonLat);if(visible!==this.isVisible()){this.setVisible(visible);}}
if(this.isVisible()){var centerPx=this.map.getViewPortPxFromLonLat(centerLonLat);var mapBox=Ext.fly(this.map.div).getBox();var anc=this.anc;var dx=anc.getLeft(true)+anc.getWidth()/2;var dy=this.el.getHeight();this.setPosition(centerPx.x+mapBox.x-dx,centerPx.y+mapBox.y-dy);}},unanchorPopup:function(){this.removeAnchorEvents();this.draggable=true;this.header.addClass("x-window-draggable");this.dd=new Ext.Window.DD(this);this.anc.remove();this.anc=null;this.tools.unpin.hide();},panIntoView:function(){var centerLonLat=this.feature.geometry.getBounds().getCenterLonLat();var centerPx=this.map.getViewPortPxFromLonLat(centerLonLat);var mapBox=Ext.fly(this.map.div).getBox();var popupPos=this.getPosition(true);popupPos[0]-=mapBox.x;popupPos[1]-=mapBox.y;var panelSize=[mapBox.width,mapBox.height];var popupSize=this.getSize();var newPos=[popupPos[0],popupPos[1]];var padding=this.map.paddingForPopups;if(popupPos[0]<padding.left){newPos[0]=padding.left;}else if(popupPos[0]+popupSize.width>panelSize[0]-padding.right){newPos[0]=panelSize[0]-padding.right-popupSize.width;}
if(popupPos[1]<padding.top){newPos[1]=padding.top;}else if(popupPos[1]+popupSize.height>panelSize[1]-padding.bottom){newPos[1]=panelSize[1]-padding.bottom-popupSize.height;}
var dx=popupPos[0]-newPos[0];var dy=popupPos[1]-newPos[1];this.map.pan(dx,dy);},onMapMove:function(){this._mapMove=true;this.position();delete this._mapMove;},addAnchorEvents:function(){this.map.events.on({"move":this.onMapMove,scope:this});this.on({"resize":this.position,"collapse":this.position,"expand":this.position,scope:this});},removeAnchorEvents:function(){this.map.events.un({"move":this.onMapMove,scope:this});this.un("resize",this.position,this);this.un("collapse",this.position,this);this.un("expand",this.position,this);},beforeDestroy:function(){if(this.anchored){this.removeAnchorEvents();}
GeoExt.Popup.superclass.beforeDestroy.call(this);}});Ext.reg('gx_popup',GeoExt.Popup);Ext.namespace("geoadmin");geoadmin.TooltipFeature=OpenLayers.Class(OpenLayers.Control.GetFeature,{layer:null,popup:null,api:null,initialize:function(options){options=options||{};OpenLayers.Util.extend(options,{protocol:new OpenLayers.Protocol.HTTP({url:'bodfeature/search',format:new OpenLayers.Format.GeoJSON(),params:{lang:OpenLayers.Lang.getCode()}})});OpenLayers.Control.GetFeature.prototype.initialize.apply(this,[options]);this.api=options.api;this.layer=api.drawLayer;this.events.on({featureselected:function(evt){this.layer.addFeatures(evt.feature);},featureunselected:function(evt){this.layer.removeFeatures(evt.feature);if(this.popup){this.popup.close();}},scope:this});},getQueryableLayers:function(){var queryable=[];for(var i=0,len=this.map.layers.length;i<len;i++){var layer=this.map.layers[i];if(layer.bodid&&api.layers[layer.bodid]&&api.layers[layer.bodid].queryable===true){queryable.push(layer.bodid);}}
return queryable;},request:function(bounds,options){options=options||{};OpenLayers.Util.extend(options,{single:false});OpenLayers.Util.extend(this.protocol.params,{layers:this.getQueryableLayers(),scale:parseInt(this.map.getScale())});if(this.protocol.params.layers.length>0){OpenLayers.Control.GetFeature.prototype.request.apply(this,[bounds,options]);}else{OpenLayers.Element.removeClass(this.map.viewPortDiv,"olCursorWait");}},select:function(features){OpenLayers.Control.GetFeature.prototype.select.apply(this,arguments);this.show(this.features);},setMap:function(map){OpenLayers.Control.GetFeature.prototype.setMap.apply(this,arguments);this.map.addLayer(this.layer);},selectSingle:function(evt){OpenLayers.Control.GetFeature.prototype.selectSingle.apply(this,arguments);this.clickLonLat=this.map.getLonLatFromPixel(evt.xy);},show:function(features){var items=[],layername;for(var i in features){items.push({html:features[i].attributes.html,fid:i});}
if(this.popup){this.popup.close();}
this.popup=new GeoExt.Popup({protocol:this.protocol,map:this.map,lonlat:this.clickLonLat,unpinnable:false,draggable:true,panIn:true,width:450,autoScroll:true,title:OpenLayers.i18n('Feature tooltip'),items:items,tools:[{id:'print',handler:function(event,toolEl,panel){var params=OpenLayers.Util.applyDefaults({print:true},panel.protocol.params);var url=panel.protocol.url;var separator=(url.indexOf('?')>-1)?'&':'?';url+=separator+OpenLayers.Util.getParameterString(params)+"&baseUrl="+cdbund.config.baseUrl;window.open(url,'','width=500, height=400, toolbar=no, location=no,'+'directories=no, status=no, menubar=no, scrollbars=yes,'+'copyhistory=no, resizable=no');}}],toolTemplate:new Ext.XTemplate('<tpl if="id==\'print\'">','<div class="x-tool x-tool-print">',OpenLayers.i18n('print action'),'</div>','</tpl>','<tpl if="id!=\'download\'">','<div class="x-tool x-tool-{id}">&#160;</div>','</tpl>'),listeners:{close:function(w){this.unselectAll();},scope:this}});this.popup.show();},CLASS_NAME:"geoadmin.TooltipFeature"});Ext.namespace("GeoExt");GeoExt.LayerOpacitySlider=Ext.extend(Ext.Slider,{layer:null,complementaryLayer:null,delay:5,changeVisibilityDelay:5,aggressive:false,changeVisibility:false,value:null,constructor:function(config){if(config.layer){if(config.layer instanceof OpenLayers.Layer){this.layer=config.layer;}else if(config.layer instanceof GeoExt.data.LayerRecord){this.layer=config.layer.get('layer');}
if(config.complementaryLayer instanceof OpenLayers.Layer){this.complementaryLayer=config.complementaryLayer;}else if(config.complementaryLayer instanceof
GeoExt.data.LayerRecord){this.complementaryLayer=config.complementaryLayer.get('layer');}
delete config.layer;delete config.complementaryLayer;}
GeoExt.LayerOpacitySlider.superclass.constructor.call(this,config);},initComponent:function(){if(this.layer&&this.layer.opacity!==null){this.value=parseInt(this.layer.opacity*(this.maxValue-this.minValue));}else if(this.value==null){this.value=this.maxValue;}
GeoExt.LayerOpacitySlider.superclass.initComponent.call(this);if(this.changeVisibility&&this.layer&&(this.layer.opacity==0||this.value==this.minValue)){this.layer.setVisibility(false);}
if(this.complementaryLayer&&((this.layer&&this.layer.opacity==1)||(this.value==this.maxValue))){this.complementaryLayer.setVisibility(false);}
if(this.aggressive===true){this.on('change',this.changeLayerOpacity,this,{buffer:this.delay});}else{this.on('changecomplete',this.changeLayerOpacity,this);}
if(this.changeVisibility===true){this.on('change',this.changeLayerVisibility,this,{buffer:this.changeVisibilityDelay});}
if(this.complementaryLayer){this.on('change',this.changeComplementaryLayerVisibility,this,{buffer:this.changeVisibilityDelay});}},changeLayerOpacity:function(slider,value){if(this.layer){this.layer.setOpacity(value/100.0);}},changeLayerVisibility:function(slider,value){var currentVisibility=this.layer.getVisibility();if(value==this.minValue&&currentVisibility===true){this.layer.setVisibility(false);}else if(value>this.minValue&&currentVisibility==false){this.layer.setVisibility(true);}},changeComplementaryLayerVisibility:function(slider,value){var currentVisibility=this.complementaryLayer.getVisibility();if(value==this.maxValue&&currentVisibility===true){this.complementaryLayer.setVisibility(false);}else if(value<this.maxValue&&currentVisibility==false){this.complementaryLayer.setVisibility(true);}},addToMapPanel:function(panel){this.on({render:function(){var el=this.getEl();el.setStyle({position:"absolute",zIndex:panel.map.Z_INDEX_BASE.Control});el.on({mousedown:this.stopMouseEvents,click:this.stopMouseEvents});},scope:this});},removeFromMapPanel:function(panel){var el=this.getEl();el.un({mousedown:this.stopMouseEvents,click:this.stopMouseEvents,scope:this});},stopMouseEvents:function(e){e.stopEvent();}});Ext.reg('gx_opacityslider',GeoExt.LayerOpacitySlider);Ext.namespace("GeoExt.tree");GeoExt.tree.LayerNodeUI=Ext.extend(Ext.tree.TreeNodeUI,{actionsCls:"gx-tree-layer-actions",actionCls:"gx-tree-layer-action",radio:null,constructor:function(config){GeoExt.tree.LayerNodeUI.superclass.constructor.apply(this,arguments);},render:function(bulkRender){var attr=this.node.attributes;if(attr.checked===undefined){attr.checked=this.node.layer.getVisibility();}
var rendered=this.rendered;GeoExt.tree.LayerNodeUI.superclass.render.apply(this,arguments);if(!rendered){var cb=this.checkbox;if(attr.radioGroup&&this.radio===null){this.radio=Ext.DomHelper.insertAfter(cb,['<input type="radio" class="gx-tree-layer-radio" name="',attr.radioGroup,'_radio"></input>'].join(""));}
if(attr.checkedGroup){var radio=Ext.DomHelper.insertAfter(cb,['<input type="radio" name="',attr.checkedGroup,'_checkbox" class="',cb.className,cb.checked?'" checked="checked"':'','"></input>'].join(""));radio.defaultChecked=cb.defaultChecked;Ext.get(cb).remove();this.checkbox=radio;}
this.enforceOneVisible();var actions=attr.actions||this.actions;if(actions&&actions.length>0){var html=['<div class="',this.actionsCls,'">'];for(var i=0,len=actions.length;i<len;i++){var a=actions[i];html=html.concat(['<img id="'+this.node.id+'_'+a.action,'" ext:qtip="'+a.qtip,'" src="'+this.emptyIcon,'" class="'+this.actionCls+' '+a.action+'" />']);}
html.concat(['</div>']);Ext.DomHelper.insertFirst(this.elNode,html.join(""));}
this.updateActions(actions);var component=attr.component||this.component;if(component){var elt=Ext.DomHelper.append(this.elNode,[{"tag":"div"}]);if(typeof component=="function"){component=component(this.node,elt);}else if(typeof component=="object"&&typeof component.fn=="function"){component=component.fn.apply(component.scope,[this.node,elt]);}
if(typeof component=="object"&&typeof component.xtype=="string"){component=Ext.ComponentMgr.create(component);}
if(component instanceof Ext.Component){component.render(elt);this.node.component=component;}}}},onClick:function(e){if(e.getTarget('.gx-tree-layer-radio',1)){this.radio.defaultChecked=this.radio.checked;this.fireEvent("radiochange",this.node);}else if(e.getTarget('.x-tree-node-cb',1)){this.onCheckChange();}else if(e.getTarget('.'+this.actionCls,1)){var t=e.getTarget('.'+this.actionCls,1);var action=t.className.replace(this.actionCls+' ','');if(this.fireEvent("action",this.node,action,e)===false){return;}}else{GeoExt.tree.LayerNodeUI.superclass.onClick.apply(this,arguments);}},updateActions:function(){var n=this.node;var actions=this.node.attributes.actions||this.actions||[];Ext.each(actions,function(a,index){var el=Ext.get(n.id+'_'+a.action);if(el&&typeof a.hide=="function"){if(a.hide.call(n)){el.setVisibilityMode(Ext.Element.VISIBILITY);el.hide();}else{el.show();}}});},toggleCheck:function(value){if(!this._visibilityChanging){this._visibilityChanging=true;value=(value===undefined?!this.isChecked():value)||(this.isChecked()&&!!this.node.attributes.checkedGroup);GeoExt.tree.LayerNodeUI.superclass.toggleCheck.call(this,value);this.enforceOneVisible();delete this._visibilityChanging;}},enforceOneVisible:function(){var attributes=this.node.attributes;var group=attributes.checkedGroup;if(group){var layer=this.node.layer;var checkedNodes=this.node.getOwnerTree().getChecked();var checkedCount=0;Ext.each(checkedNodes,function(n){var ui=n.getUI();var l=n.layer
if(!n.hidden&&n.attributes.checkedGroup===group){checkedCount++;if(l!=layer&&attributes.checked){ui.checkbox.defaultChecked=false;ui.checkbox.checked=false;l.setVisibility(false);}}});if(checkedCount===0&&attributes.checked==false){var ui=this.node.getUI();ui.checkbox.defaultChecked=true;ui.checkbox.checked=true;layer.setVisibility(true);}}},appendDDGhost:function(ghostNode){var n=this.elNode.cloneNode(true);var radio=Ext.DomQuery.select("input[type='radio']",n);Ext.each(radio,function(r){r.name=r.name+"_clone";});ghostNode.appendChild(n);},destroy:function(){delete this.radio;GeoExt.tree.LayerNodeUI.superclass.destroy.apply(this,arguments);}});GeoExt.tree.LayerNode=Ext.extend(Ext.tree.AsyncTreeNode,{layer:null,layerStore:null,constructor:function(config){config.leaf=config.leaf||!(config.children||config.loader);if(!config.iconCls&&!config.children){config.iconCls="gx-tree-layer-icon";}
if(config.loader&&!(config.loader instanceof Ext.tree.TreeLoader)){config.loader=new GeoExt.tree.LayerParamLoader(config.loader);}
this.defaultUI=this.defaultUI||GeoExt.tree.LayerNodeUI;this.addEvents("radiochange","action");Ext.apply(this,{layer:config.layer,layerStore:config.layerStore});if(config.text){this.fixedText=true;}
GeoExt.tree.LayerNode.superclass.constructor.apply(this,arguments);},render:function(bulkRender){var layer=this.layer instanceof OpenLayers.Layer&&this.layer;if(!layer){if(!this.layerStore||this.layerStore=="auto"){this.layerStore=GeoExt.MapPanel.guess().layers;}
var i=this.layerStore.findBy(function(o){return o.get("title")==this.layer;},this);if(i!=-1){layer=this.layerStore.getAt(i).get("layer");}}
if(!this.rendered||!layer){var ui=this.getUI();if(layer){this.layer=layer;if(layer.isBaseLayer){this.draggable=false;Ext.applyIf(this.attributes,{checkedGroup:"gx_baselayer"});}
if(!this.text){this.text=layer.name;}
ui.show();this.addVisibilityEventHandlers();}else{ui.hide();}
if(this.layerStore instanceof GeoExt.data.LayerStore){this.addStoreEventHandlers(layer);}}
GeoExt.tree.LayerNode.superclass.render.apply(this,arguments);},addVisibilityEventHandlers:function(){this.layer.events.on({"visibilitychanged":this.onLayerVisibilityChanged,scope:this});this.on({"checkchange":this.onCheckChange,scope:this});},onLayerVisibilityChanged:function(){this.getUI().toggleCheck(this.layer.getVisibility());},onCheckChange:function(node,checked){if(checked!=this.layer.getVisibility()){var layer=this.layer;if(checked&&layer.isBaseLayer&&layer.map){layer.map.setBaseLayer(layer);}else{layer.setVisibility(checked);}}},addStoreEventHandlers:function(){this.layerStore.on({"add":this.onStoreAdd,"remove":this.onStoreRemove,"update":this.onStoreUpdate,scope:this});},onStoreAdd:function(store,records,index){var l;for(var i=0;i<records.length;++i){l=records[i].get("layer");if(this.layer==l){this.getUI().show();break;}else if(this.layer==l.name){this.render();break;}}},onStoreRemove:function(store,record,index){if(this.layer==record.get("layer")){this.getUI().hide();}},onStoreUpdate:function(store,record,operation){var layer=record.get("layer");if(!this.fixedText&&(this.layer==layer&&this.text!==layer.name)){this.setText(layer.name);}},destroy:function(){var layer=this.layer;if(layer instanceof OpenLayers.Layer){layer.events.un({"visibilitychanged":this.onLayerVisibilityChanged,scope:this});}
delete this.layer;var layerStore=this.layerStore;if(layerStore){layerStore.un("add",this.onStoreAdd,this);layerStore.un("remove",this.onStoreRemove,this);layerStore.un("update",this.onStoreUpdate,this);}
delete this.layerStore;this.un("checkchange",this.onCheckChange,this);GeoExt.tree.LayerNode.superclass.destroy.apply(this,arguments);}});Ext.tree.TreePanel.nodeTypes.gx_layer=GeoExt.tree.LayerNode;Ext.namespace("geoadmin");geoadmin.InspireCatalogPanel=Ext.extend(Ext.tree.TreePanel,{id:'inspire_catalog_panel',animate:false,root:{nodeType:'async'},border:false,rootVisible:false,selectedNode:null,selectedNodeId:'',layers:null,listeners:{dblclick:function(node,e){this.nodeSelectionManagement(node);this.selectedNodeId=node.id;},click:function(node,e){this.nodeSelectionManagement(node);this.selectedNodeId=node.id;},checkchange:function(node,state){if(state){if(api.getBodNumberLayer()==5){this.suspendEvents();node.getUI().toggleCheck(false);this.updateCustomizedCheckbox(node,false);alert(OpenLayers.i18n('You can add only 5 layers in the layer tree.'));this.resumeEvents();}else{this.updateCustomizedCheckbox(node,true);api.addLayerToMap(this.getLayerIdFromNodeId(node.id));}}else{api.removeLayerFromMap(this.getLayerIdFromNodeId(node.id));}},beforeclick:function(node,event){if(event.getTarget().className=='treelayerlink'){return false;}else{this.selectedNode=node;this.selectedNodeId=node.id;return true;}},beforedblclick:function(node,event){if(event.getTarget().className=='treelayerlink'){return false;}else{this.selectedNode=node;this.selectedNodeId=node.id;return true;}}},updateCustomizedCheckbox:function(node,state){Ext.get(node.id+'_cb').dom.className=state?'checkboxOn':'checkboxOff';},nodeSelectionManagement:function(node){if(node.attributes.cls=='nodeLT1'||node.attributes.cls=='nodeLT1selected'){this.selectLT1node(node);}
if(node.attributes.cls=='nodeLT2'||node.attributes.cls=='nodeLT2selected'){this.selectLT2node(node);}
if(node.attributes.cls=='nodeLT3'||node.attributes.cls=='nodeLT3selected'){this.selectLT3node(node);}},addtreeLayerLink:function(id,nodeId){var iconTypeClass="treelayericon-"+this.layers[id].type;var layerlink='<div class="'+iconTypeClass+'"></div><div class="layerNodeTools"><div class="treelayerpipe"></div><div class="treelayerlink" onclick="geoadmin.LayerInfo.openDetails(\''+id+'\');"></div><div class="treelayerpipe"></div><div class="checkboxOff" id="'+nodeId+'_cb" onclick="api.inspireCatalogPanel.toggleCheckbox(\''+nodeId+'\');"></div><div class="treelayerpipe"></div></div>';return layerlink;},toggleCheckbox:function(nodeId){this.getNodeById(nodeId).ui.toggleCheck();},getSelectedNode:function(){if(this.selectedNode){return this.selectedNode.id;}else{return'';}},setSelectedNode:function(){var node=null;for(i=0;i<this.root.childNodes.length;i++){childNode=this.root.childNodes[i];if(childNode.id==this.selectedNodeId){node=childNode;}
childNode.expand();for(j=0;j<childNode.childNodes.length;j++){childChildNode=childNode.childNodes[j];if(childChildNode.id==this.selectedNodeId){node=childChildNode;}
childChildNode.expand();for(k=0;k<childChildNode.childNodes.length;k++){childChildChildNode=childChildNode.childNodes[k];if(childChildChildNode.id==this.selectedNodeId){node=childChildChildNode;}}
childChildNode.collapse();}
childNode.collapse();}
if(node){this.nodeSelectionManagement(node);node.expand();node.ensureVisible();this.selectedNode=node;}},getLayerIdFromNodeId:function(nodeId){var result=nodeId.replace('node_','');result=result.substring(0,result.length-1);return result;},setCheckNodes:function(map){for(i=0;i<this.root.childNodes.length;i++){childNode=this.root.childNodes[i];childNode.expand();for(j=0;j<childNode.childNodes.length;j++){childChildNode=childNode.childNodes[j];childChildNode.expand();for(k=0;k<childChildNode.childNodes.length;k++){childChildChildNode=childChildNode.childNodes[k];var layer=map.getLayersBy('bodid',this.getLayerIdFromNodeId(childChildChildNode.id));if(layer[0]){this.suspendEvents();childChildChildNode.getUI().toggleCheck(true);this.updateCustomizedCheckbox(childChildChildNode,true);this.resumeEvents();}else{this.suspendEvents();childChildChildNode.getUI().toggleCheck(false);this.updateCustomizedCheckbox(childChildChildNode,false);this.resumeEvents();}}
childChildNode.collapse();}
childNode.collapse();}},registerMapEvent:function(map){map.events.on({'removelayer':function(layer){if(map){this.setCheckNodes(map);this.setSelectedNode();}},'addlayer':function(layer){if(map){this.setCheckNodes(map);this.setSelectedNode();}},scope:this});},selectLT1node:function(node){node.ui.addClass('nodeBackgroundSelected');if(node.attributes.cls=='nodeLT1'){node.ui.removeClass('nodeLT1');node.ui.addClass('nodeLT1selected');}else{node.ui.addClass('nodeLT1');node.ui.removeClass('nodeLT1selected');node.ui.removeClass('nodeBackgroundSelected');}
for(i=0;i<this.root.childNodes.length;i++){childNode=this.root.childNodes[i];if(childNode.attributes.cls=='nodeLT1'||childNode.attributes.cls=='nodeLT1selected'){for(j=0;j<childNode.childNodes.length;j++){childChildNode=childNode.childNodes[j];childChildNode.collapse();childChildNode.ui.addClass('nodeLT2');childChildNode.ui.removeClass('nodeLT2selected');childChildNode.ui.removeClass('nodeBackgroundSelected');for(k=0;k<childChildNode.childNodes.length;k++){childChildChildNode=childChildNode.childNodes[k];childChildChildNode.collapse();childChildChildNode.ui.addClass('nodeLT3');childChildChildNode.ui.removeClass('nodeLT3selected');childChildChildNode.ui.removeClass('nodeBackgroundSelected');}}
if(node.attributes.id!=childNode.attributes.id){childNode.collapse();childNode.ui.addClass('nodeLT1');childNode.ui.removeClass('nodeLT1selected');childNode.ui.removeClass('nodeBackgroundSelected');}}}},selectLT2node:function(node){node.ui.addClass('nodeBackgroundSelected');if(node.attributes.cls=='nodeLT2'){node.ui.removeClass('nodeLT2');node.ui.addClass('nodeLT2selected');}else{node.ui.addClass('nodeLT2');node.ui.removeClass('nodeLT2selected');node.ui.removeClass('nodeBackgroundSelected');}
for(i=0;i<node.parentNode.childNodes.length;i++){childNode=node.parentNode.childNodes[i];if(childNode.attributes.cls=='nodeLT2'||childNode.attributes.cls=='nodeLT2selected'){for(j=0;j<childNode.childNodes.length;j++){childChildNode=childNode.childNodes[j];childChildNode.collapse();childChildNode.ui.addClass('nodeLT3');childChildNode.ui.removeClass('nodeLT3selected');childChildNode.ui.removeClass('nodeBackgroundSelected');}
if(node.attributes.id!=childNode.attributes.id){childNode.collapse();childNode.ui.addClass('nodeLT2');childNode.ui.removeClass('nodeLT2selected');childNode.ui.removeClass('nodeBackgroundSelected');}}}
node.parentNode.ui.addClass('nodeLT1selected');node.parentNode.ui.removeClass('nodeLT1');node.parentNode.ui.removeClass('nodeBackgroundSelected');},selectLT3node:function(node){node.ui.addClass('nodeBackgroundSelected');if(node.attributes.cls=='nodeLT3'){node.ui.removeClass('nodeLT3');node.ui.addClass('nodeLT3selected');}else{node.ui.addClass('nodeLT3');node.ui.removeClass('nodeLT3selected');node.ui.removeClass('nodeBackgroundSelected');}
for(i=0;i<node.parentNode.childNodes.length;i++){childNode=node.parentNode.childNodes[i];if(childNode.attributes.cls=='nodeLT3'||childNode.attributes.cls=='nodeLT3selected'){if(node.attributes.id!=childNode.attributes.id){childNode.collapse();childNode.ui.addClass('nodeLT3');childNode.ui.removeClass('nodeLT3selected');childNode.ui.removeClass('nodeBackgroundSelected');}}}
node.parentNode.ui.addClass('nodeLT2selected');node.parentNode.ui.removeClass('nodeLT2');node.parentNode.ui.removeClass('nodeBackgroundSelected');node.parentNode.parentNode.ui.addClass('nodeLT1selected');node.parentNode.parentNode.ui.removeClass('nodeLT1');node.parentNode.parentNode.ui.removeClass('nodeBackgroundSelected');},initComponent:function(){this.root.children=[{text:OpenLayers.i18n('Basisdaten'),cls:'nodeLT1',singleClickExpand:true,id:"LT1_1",children:[{text:' '+OpenLayers.i18n('Administrative Einheiten'),cls:'nodeLT2',singleClickExpand:true,id:"LT2_1",children:[{text:this.addtreeLayerLink("communes_labels","node_communes_labels1")+' '+this.layers["communes_labels"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_communes_labels1'},{text:this.addtreeLayerLink("communes","node_communes1")+' '+this.layers["communes"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_communes1'},{text:this.addtreeLayerLink("cantons_labels","node_cantons_labels1")+' '+this.layers["cantons_labels"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_cantons_labels1'},{text:this.addtreeLayerLink("cantons","node_cantons1")+' '+this.layers["cantons"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_cantons1'},{text:this.addtreeLayerLink("districts_labels","node_districts_labels1")+' '+this.layers["districts_labels"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_districts_labels1'},{text:this.addtreeLayerLink("districts","node_districts1")+' '+this.layers["districts"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_districts1'},{text:this.addtreeLayerLink("country","node_country1")+' '+this.layers["country"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_country1'}]},{text:' '+OpenLayers.i18n('Flurstücke / Grundstücke'),cls:'nodeLT2',singleClickExpand:true,id:"LT2_2",children:[{text:this.addtreeLayerLink("parcels","node_parcels1")+' '+this.layers["parcels"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_parcels1'},{text:this.addtreeLayerLink("parcels_labels","node_parcels_labels1")+' '+this.layers["parcels_labels"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_parcels_labels1'},{text:this.addtreeLayerLink("buildings","node_buildings1")+' '+this.layers["buildings"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_buildings1'},{text:this.addtreeLayerLink("toponymes","node_toponymes1")+' '+this.layers["toponymes"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_toponymes1'},{text:this.addtreeLayerLink("communes_cadastrales_labels","node_communes_cadastrales_labels1")+' '+this.layers["communes_cadastrales_labels"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_communes_cadastrales_labels1'},{text:this.addtreeLayerLink("communes_cadastrales","node_communes_cadastrales1")+' '+this.layers["communes_cadastrales"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_communes_cadastrales1'},{text:this.addtreeLayerLink("sections_cadastrales_labels","node_sections_cadastrales_labels1")+' '+this.layers["sections_cadastrales_labels"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_sections_cadastrales_labels1'},{text:this.addtreeLayerLink("sections_cadastrales","node_sections_cadastrales1")+' '+this.layers["sections_cadastrales"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_sections_cadastrales1'},{text:this.addtreeLayerLink("feuilles_cadastrales","node_feuilles_cadastrales1")+' '+this.layers["feuilles_cadastrales"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_feuilles_cadastrales1'}]},{text:' '+OpenLayers.i18n('Adressen'),cls:'nodeLT2',singleClickExpand:true,id:"LT2_17",children:[{text:this.addtreeLayerLink("addresses","node_addresses1")+' '+this.layers["addresses"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_addresses1'}]},{text:' '+OpenLayers.i18n('Topographische Karten'),cls:'nodeLT2',singleClickExpand:true,id:"LT2_18",children:[{text:this.addtreeLayerLink("topo","node_topo1")+' '+this.layers["topo"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_topo1'},{text:this.addtreeLayerLink("topo_250k","node_topo_250k1")+' '+this.layers["topo_250k"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_topo_250k1'},{text:this.addtreeLayerLink("topo_100k","node_topo_100k1")+' '+this.layers["topo_100k"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_topo_100k1'},{text:this.addtreeLayerLink("topo_50k","node_topo_50k1")+' '+this.layers["topo_50k"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_topo_50k1'},{text:this.addtreeLayerLink("topo_20k","node_topo_20k1")+' '+this.layers["topo_20k"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_topo_20k1'},{text:this.addtreeLayerLink("topo_decoupage_r","topo_decoupage_r1")+' '+this.layers["topo_decoupage_r"].name,leaf:true,checked:false,cls:'nodeLT3',id:'topo_decoupage_r1'},{text:this.addtreeLayerLink("topo_5k","node_topo_5k1")+' '+this.layers["topo_5k"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_topo_5k1'},{text:this.addtreeLayerLink("1907_CAHANSEN","node_1907_CAHANSEN1")+' '+this.layers["1907_CAHANSEN"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_1907_CAHANSEN1'},{text:this.addtreeLayerLink("1927_CAHANSEN","node_1927_CAHANSEN1")+' '+this.layers["1927_CAHANSEN"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_1927_CAHANSEN1'},{text:this.addtreeLayerLink("TOPO25K1954C24","node_TOPO25K1954C241")+' '+this.layers["TOPO25K1954C24"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_TOPO25K1954C241'}]}]},{text:OpenLayers.i18n('Infrastrucktur une Kommunikation'),cls:'nodeLT1',singleClickExpand:true,id:"LT1_2",children:[{text:' '+OpenLayers.i18n('Gebäude'),cls:'nodeLT2',singleClickExpand:true,id:"LT2_3",children:[{text:this.addtreeLayerLink("buildings","node_buildings2")+' '+this.layers["buildings"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_buildings2'}]},{text:' '+OpenLayers.i18n('Verkehrsnetze'),cls:'nodeLT2',singleClickExpand:true,id:"LT2_4",children:[{text:this.addtreeLayerLink("roads","node_roads1")+' '+this.layers["roads"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_roads1'},{text:this.addtreeLayerLink("roads_labels","node_roads_labels1")+' '+this.layers["roads_labels"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_roads_labels1'}]}]},{text:OpenLayers.i18n('Oberflächendarstellung'),cls:'nodeLT1',singleClickExpand:true,id:"LT1_3",children:[{text:' '+OpenLayers.i18n('Luft und Satellitenbilder'),cls:'nodeLT2',singleClickExpand:true,id:"LT2_5",children:[{text:this.addtreeLayerLink("ortho","node_ortho1")+' '+this.layers["ortho"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_ortho1'},{text:this.addtreeLayerLink("ortho_irc","node_ortho_irc1")+' '+this.layers["ortho_irc"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_ortho_irc1'},{text:this.addtreeLayerLink("ortho_2004","node_ortho_20041")+' '+this.layers["ortho_2004"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_ortho_20041'},{text:this.addtreeLayerLink("ortho_irc","node_ortho_20011")+' '+this.layers["ortho_2001"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_ortho_20011'},{text:this.addtreeLayerLink("wg_ikonos_satellitendaten","node_wg_ikonos_satellitendaten1")+' '+this.layers["wg_ikonos_satellitendaten"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_ikonos_satellitendaten1'}]},{text:' '+OpenLayers.i18n('Bodennutzung'),cls:'nodeLT2',singleClickExpand:true,id:"LT2_10",children:[{text:this.addtreeLayerLink("wg_landnutzung","node_wg_landnutzung1")+' '+this.layers["wg_landnutzung"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_landnutzung1'},{text:this.addtreeLayerLink("wg_versiegelungsklassen","node_wg_versiegelungsklassen1")+' '+this.layers["wg_versiegelungsklassen"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_versiegelungsklassen1'}]},{text:' '+OpenLayers.i18n('Höhe'),cls:'nodeLT2',singleClickExpand:true,id:"LT2_11",children:[{text:this.addtreeLayerLink("wg_relief","node_wg_relief1")+' '+this.layers["wg_relief"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_relief1'},{text:this.addtreeLayerLink("wg_relief_dhm_2m","node_wg_relief_dhm_2m1")+' '+this.layers["wg_relief_dhm_2m"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_relief_dhm_2m1'},{text:this.addtreeLayerLink("wg_hohenlinien_10m","node_wg_hohenlinien_10m1")+' '+this.layers["wg_hohenlinien_10m"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_hohenlinien_10m1'},{text:this.addtreeLayerLink("wg_hangneigung_","node_wg_hangneigung_1")+' '+this.layers["wg_hangneigung_"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_hangneigung_1'},{text:this.addtreeLayerLink("wg_exposition","node_wg_exposition1")+' '+this.layers["wg_exposition"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_exposition1'}]},{text:' '+OpenLayers.i18n('Gewässernetz'),cls:'nodeLT2',singleClickExpand:true,id:"LT2_6",children:[{text:this.addtreeLayerLink("rivers","node_rivers1")+' '+this.layers["rivers"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_rivers1'},{text:this.addtreeLayerLink("wg_hauptgewasser","node_wg_hauptgewasser1")+' '+this.layers["wg_hauptgewasser"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_hauptgewasser1'},{text:this.addtreeLayerLink("wg_nebengewasser","node_wg_nebengewasser1")+' '+this.layers["wg_nebengewasser"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_nebengewasser1'},{text:this.addtreeLayerLink("wg_kanal__muhlgraben","node_wg_kanal__muhlgraben1")+' '+this.layers["wg_kanal__muhlgraben"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_kanal__muhlgraben1'},{text:this.addtreeLayerLink("wg_kilometrierung_hauptgewasser","node_wg_kilometrierung_hauptgewasser1")+' '+this.layers["wg_kilometrierung_hauptgewasser"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_kilometrierung_hauptgewasser1'},{text:this.addtreeLayerLink("wg_kilometrierung_nebengewasser","node_wg_kilometrierung_nebengewasser1")+' '+this.layers["wg_kilometrierung_nebengewasser"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_kilometrierung_nebengewasser1'},{text:this.addtreeLayerLink("wg_stausee_sauer","node_wg_stausee_sauer1")+' '+this.layers["wg_stausee_sauer"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_stausee_sauer1'},{text:this.addtreeLayerLink("wg_naturliche_(bassin)","node_wg_naturliche_(bassin)1")+' '+this.layers["wg_naturliche_(bassin)"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_naturliche_(bassin)1'},{text:this.addtreeLayerLink("wg_kunstliche_(bassin)","node_wg_kunstliche_(bassin)1")+' '+this.layers["wg_kunstliche_(bassin)"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_kunstliche_(bassin)1'},{text:this.addtreeLayerLink("wg_feuchtgebiete","node_wg_feuchtgebiete1")+' '+this.layers["wg_feuchtgebiete"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_feuchtgebiete1'},{text:this.addtreeLayerLink("wg_einzugsgebiete","node_wg_einzugsgebiete1")+' '+this.layers["wg_einzugsgebiete"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_einzugsgebiete1'},{text:this.addtreeLayerLink("wg_querprofile","node_wg_querprofile1")+' '+this.layers["wg_querprofile"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_querprofile1'},{text:this.addtreeLayerLink("wg_bauwerke","node_wg_bauwerke1")+' '+this.layers["wg_bauwerke"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_bauwerke1'}]}]},{text:OpenLayers.i18n('Umwelt, Biologie und Geologie'),cls:'nodeLT1',singleClickExpand:true,id:"LT1_4",children:[{text:' '+OpenLayers.i18n('Lebensräume une Biotope'),cls:'nodeLT2',singleClickExpand:true,id:"LT2_7",children:[{text:this.addtreeLayerLink("natura2000","node_natura20001")+' '+this.layers["natura2000"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_natura20001'}]},{text:' '+OpenLayers.i18n('Biologie'),cls:'nodeLT2',singleClickExpand:true,id:"LT2_12",children:[{text:this.addtreeLayerLink("wg_nitratbelastung","node_wg_nitratbelastung1")+' '+this.layers["wg_nitratbelastung"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_nitratbelastung1'},{text:this.addtreeLayerLink("wg_durchgangigkeit","node_wg_durchgangigkeit1")+' '+this.layers["wg_durchgangigkeit"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_durchgangigkeit1'},{text:this.addtreeLayerLink("wg_fischereiabschnitte","node_wg_fischereiabschnitte1")+' '+this.layers["wg_fischereiabschnitte"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_fischereiabschnitte1'}]},{text:' '+OpenLayers.i18n('Geologie'),cls:'nodeLT2',singleClickExpand:true,id:"LT2_8",children:[{text:this.addtreeLayerLink("geologie","node_geologie1")+' '+this.layers["geologie"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_geologie1'},{text:this.addtreeLayerLink("wg_einschrankung_warmepumpe","node_wg_einschrankung_warmepumpe1")+' '+this.layers["wg_einschrankung_warmepumpe"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_einschrankung_warmepumpe1'},{text:this.addtreeLayerLink("wg_grundwasserleiter","node_wg_grundwasserleiter1")+' '+this.layers["wg_grundwasserleiter"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_grundwasserleiter1'},{text:this.addtreeLayerLink("wg_bohrungen","node_wg_bohrungen1")+' '+this.layers["wg_bohrungen"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_bohrungen1'},{text:this.addtreeLayerLink("wg_quellen","node_wg_quellen1")+' '+this.layers["wg_quellen"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_quellen1'}]},{text:' '+OpenLayers.i18n('Gebiete mit naturbedingten Risiken'),cls:'nodeLT2',singleClickExpand:true,id:"LT2_9",children:[{text:this.addtreeLayerLink("wg_timis_hochwasser_gefahrdungen","node_wg_timis_hochwasser_gefahrdungen1")+' '+this.layers["wg_timis_hochwasser_gefahrdungen"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_timis_hochwasser_gefahrdungen1'},{text:this.addtreeLayerLink("wg_timis_hochwasser_intensitaten_ehq","node_wg_timis_hochwasser_intensitaten_ehq1")+' '+this.layers["wg_timis_hochwasser_intensitaten_ehq"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_timis_hochwasser_intensitaten_ehq1'},{text:this.addtreeLayerLink("wg_timis_hochwasser_intensitaten_hq100","node_wg_timis_hochwasser_intensitaten_hq1001")+' '+this.layers["wg_timis_hochwasser_intensitaten_hq100"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_timis_hochwasser_intensitaten_hq1001'},{text:this.addtreeLayerLink("wg_timis_hochwasser_intensitaten_hq50","node_wg_timis_hochwasser_intensitaten_hq501")+' '+this.layers["wg_timis_hochwasser_intensitaten_hq50"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_timis_hochwasser_intensitaten_hq501'},{text:this.addtreeLayerLink("wg_timis_hochwasser_intensitaten_hq10","node_wg_timis_hochwasser_intensitaten_hq101")+' '+this.layers["wg_timis_hochwasser_intensitaten_hq10"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_timis_hochwasser_intensitaten_hq101'},{text:this.addtreeLayerLink("wg_timis_wassertiefe_ehq","node_wg_timis_wassertiefe_ehq1")+' '+this.layers["wg_timis_wassertiefe_ehq"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_timis_wassertiefe_ehq1'},{text:this.addtreeLayerLink("wg_timis_wassertiefe_hq100","node_wg_timis_wassertiefe_hq1001")+' '+this.layers["wg_timis_wassertiefe_hq100"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_timis_wassertiefe_hq1001'},{text:this.addtreeLayerLink("wg_timis_wassertiefe_hq50","node_wg_timis_wassertiefe_hq501")+' '+this.layers["wg_timis_wassertiefe_hq50"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_timis_wassertiefe_hq501'},{text:this.addtreeLayerLink("wg_timis_wassertiefe_hq10","node_wg_timis_wassertiefe_hq101")+' '+this.layers["wg_timis_wassertiefe_hq10"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_timis_wassertiefe_hq101'},{text:this.addtreeLayerLink("wg_timis_ueberflutungsflachen_ehq","node_wg_timis_ueberflutungsflachen_ehq1")+' '+this.layers["wg_timis_ueberflutungsflachen_ehq"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_timis_ueberflutungsflachen_ehq1'},{text:this.addtreeLayerLink("wg_timis_ueberflutungsflachen_hq100","node_wg_timis_ueberflutungsflachen_hq1001")+' '+this.layers["wg_timis_ueberflutungsflachen_hq100"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_timis_ueberflutungsflachen_hq1001'},{text:this.addtreeLayerLink("wg_timis_ueberflutungsflachen_hq50","node_wg_timis_ueberflutungsflachen_hq501")+' '+this.layers["wg_timis_ueberflutungsflachen_hq50"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_timis_ueberflutungsflachen_hq501'},{text:this.addtreeLayerLink("wg_timis_ueberflutungsflachen_hq10","node_wg_timis_ueberflutungsflachen_hq101")+' '+this.layers["wg_timis_ueberflutungsflachen_hq10"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_timis_ueberflutungsflachen_hq101'},{text:this.addtreeLayerLink("wg_uesg_sure_1995","node_wg_uesg_sure_19951")+' '+this.layers["wg_uesg_sure_1995"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_uesg_sure_19951'},{text:this.addtreeLayerLink("wg_uesg_alzette_1995","node_wg_uesg_alzette_19951")+' '+this.layers["wg_uesg_alzette_1995"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_uesg_alzette_19951'},{text:this.addtreeLayerLink("wg_uesg_1993_(ausser_mosel)","node_wg_uesg_1993_(ausser_mosel)1")+' '+this.layers["wg_uesg_1993_(ausser_mosel)"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_uesg_1993_(ausser_mosel)1'},{text:this.addtreeLayerLink("wg_uesg_1983___mosel","node_wg_uesg_1983___mosel1")+' '+this.layers["wg_uesg_1983___mosel"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_uesg_1983___mosel1'}]},{text:' '+OpenLayers.i18n('Schutzgebiete'),cls:'nodeLT2',singleClickExpand:true,id:"LT2_13",children:[{text:this.addtreeLayerLink("wg_provisorische_trinkwasser_schutzzonen","node_wg_provisorische_trinkwasser_schutzzonen1")+' '+this.layers["wg_provisorische_trinkwasser_schutzzonen"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_provisorische_trinkwasser_schutzzonen1'}]},{text:' '+OpenLayers.i18n('Umweltüberwachung'),cls:'nodeLT2',singleClickExpand:true,id:"LT2_14",children:[{text:this.addtreeLayerLink("wg_wasserspiegel","node_wg_wasserspiegel1")+' '+this.layers["wg_wasserspiegel"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_wasserspiegel1'},{text:this.addtreeLayerLink("wg_grundwasser","node_wg_grundwasser1")+' '+this.layers["wg_grundwasser"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_grundwasser1'},{text:this.addtreeLayerLink("wg_niederschlag","node_wg_niederschlag1")+' '+this.layers["wg_niederschlag"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_niederschlag1'},{text:this.addtreeLayerLink("wg_lufttemperatur","node_wg_lufttemperatur1")+' '+this.layers["wg_lufttemperatur"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_lufttemperatur1'},{text:this.addtreeLayerLink("wg_schneehohe","node_wg_schneehohe1")+' '+this.layers["wg_schneehohe"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_schneehohe1'},{text:this.addtreeLayerLink("wg_bodentemperatur","node_wg_bodentemperatur1")+' '+this.layers["wg_bodentemperatur"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_bodentemperatur1'}]},{text:' '+OpenLayers.i18n('Versorgungswirtschaft und staatliche Dienste'),cls:'nodeLT2',singleClickExpand:true,id:"LT2_15",children:[{text:this.addtreeLayerLink("wg_abwasser_syndikate","node_wg_abwasser_syndikate1")+' '+this.layers["wg_abwasser_syndikate"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_abwasser_syndikate1'},{text:this.addtreeLayerLink("wg_klaranlagen","node_wg_klaranlagen1")+' '+this.layers["wg_klaranlagen"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_klaranlagen1'},{text:this.addtreeLayerLink("wg_provisorische_trinkwasser_schutzzonen","node_wg_provisorische_trinkwasser_schutzzonen2")+' '+this.layers["wg_provisorische_trinkwasser_schutzzonen"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_provisorische_trinkwasser_schutzzonen2'},{text:this.addtreeLayerLink("wg_trinkwasserbehalter","node_wg_trinkwasserbehalter1")+' '+this.layers["wg_trinkwasserbehalter"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_trinkwasserbehalter1'},{text:this.addtreeLayerLink("wg_trinkwassersyndikate","node_wg_trinkwassersyndikate1")+' '+this.layers["wg_trinkwassersyndikate"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_trinkwassersyndikate1'},{text:this.addtreeLayerLink("wg_pumpstationen","node_wg_pumpstationen1")+' '+this.layers["wg_pumpstationen"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_pumpstationen1'},{text:this.addtreeLayerLink("wg_kontrollpunkte","node_wg_kontrollpunkte1")+' '+this.layers["wg_kontrollpunkte"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_kontrollpunkte1'},{text:this.addtreeLayerLink("wg_trinkwasserentnahmepunkte","node_wg_trinkwasserentnahmepunkte1")+' '+this.layers["wg_trinkwasserentnahmepunkte"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_trinkwasserentnahmepunkte1'}]},{text:' '+OpenLayers.i18n('Wasserrahmenrichtlinie'),cls:'nodeLT2',singleClickExpand:true,id:"LT2_16",children:[{text:this.addtreeLayerLink("wg_provisorische_trinkwasser_schutzzonen","node_wg_provisorische_trinkwasser_schutzzonen3")+' '+this.layers["wg_provisorische_trinkwasser_schutzzonen"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_provisorische_trinkwasser_schutzzonen3'},{text:this.addtreeLayerLink("wg_hmwb_(stark_modifizierte_wasserkorper)","node_wg_hmwb_(stark_modifizierte_wasserkorper)1")+' '+this.layers["wg_hmwb_(stark_modifizierte_wasserkorper)"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_hmwb_(stark_modifizierte_wasserkorper)1'},{text:this.addtreeLayerLink("wg_betrachtungsraume","node_wg_betrachtungsraume1")+' '+this.layers["wg_betrachtungsraume"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_betrachtungsraume1'},{text:this.addtreeLayerLink("wg_gewasserentwicklungsfahigkeit","node_wg_gewasserentwicklungsfahigkeit1")+' '+this.layers["wg_gewasserentwicklungsfahigkeit"].name,leaf:true,checked:false,cls:'nodeLT3',id:'node_wg_gewasserentwicklungsfahigkeit1'}]}]}];geoadmin.InspireCatalogPanel.superclass.initComponent.call(this);}});Ext.namespace("geoadmin.LayerInfo");geoadmin.LayerInfo.win=null;geoadmin.LayerInfo.openDetails=function(id){var win=geoadmin.LayerInfo.win;if(win==null){var title=api.layers[id]?api.layers[id].name:'';win=new Ext.Window({closeAction:'hide',resizable:true,autoScroll:true,width:525,cls:'LayerInfo',tools:[{id:'infoBox'},{id:'infoTool'},{id:'close',handler:function(event,toolEl,panel){win.close();}}],toolTemplate:new Ext.XTemplate('<tpl if="id==\'infoBox\'">','<div class="x-tool x-tool-infoBox">infobox</div>','</tpl>','<tpl if="id==\'infoTool\'">','<div class="x-tool x-tool-infoTool">&#160;</div>','</tpl>','<tpl if="id==\'close\'">','<div class="x-tool x-tool-close">&#160;</div>','</tpl>'),layout:'anchor',margin:'10 10 10 10',items:{html:'<a href="'+OpenLayers.i18n('metadata_link_'+id)+'" target="_blank">'+OpenLayers.i18n('Layer metadata')+'</a> - '+'<a href="'+OpenLayers.i18n('legend_link_'+id)+'" target="_blank">'+OpenLayers.i18n('Layer legend')+'</a>'}});win.show();}};Ext.namespace("geoadmin.layerNode");geoadmin.TextItem=Ext.extend(Ext.Toolbar.Item,{constructor:function(config){var s=document.createElement("span");s.id=config.id;s.className="ytb-text";if(config.opacity==null){s.innerHTML='100%';}else{s.innerHTML=parseInt(config.opacity*100)+'%';}
geoadmin.TextItem.superclass.constructor.call(this,s);},enable:Ext.emptyFn,disable:Ext.emptyFn,focus:Ext.emptyFn});geoadmin.LayerOpacitySliderLabel=Ext.extend(Ext.Component,{target:null,el:null,constructor:function(target){this.target=target;},init:function(slider){slider.on("change",this.change,this);},change:function(slider,value){if(!this.el){this.el=Ext.get(this.target);}
this.el.dom.innerHTML=value+'%';}});geoadmin.toggleVisibility=function(layer,action){layer.setVisibility(!layer.visibility);if(action){if(layer.visibility){action.setIconClass('visibility-on');}else{action.setIconClass('visibility-off');}}};geoadmin.layerNode.tbar=function(node,ct){return new Ext.Toolbar({cls:"gx-toolbar",ctCls:"line-height-zero",hidden:false,buttons:[OpenLayers.i18n('Opacity:'),new GeoExt.LayerOpacitySlider({layer:node.layer,aggressive:true,plugins:new geoadmin.LayerOpacitySliderLabel(node.layer.bodid+'-opacity-lbl'),width:100}),new geoadmin.TextItem({id:node.layer.bodid+'-opacity-lbl',opacity:node.layer.opacity}),'->',new Ext.Action({iconCls:node.layer.visibility?'visibility-on':'visibility-off',tooltip:OpenLayers.i18n("Layer visibility"),handler:function(){geoadmin.toggleVisibility(node.layer,this);}}),new Ext.Action({iconCls:'layer-info',tooltip:OpenLayers.i18n("about that layer"),handler:function(){geoadmin.LayerInfo.openDetails(node.layer.bodid);}})]});};geoadmin.layerNode.act=function(node,action,evt){var layer=node.layer;switch(action){case"down":layer.map.raiseLayer(layer,-1);break;case"up":layer.map.raiseLayer(layer,+1);break;case"delete":layer.destroy();break;case"close":node.component.hide();var open_button=Ext.get(node.id+'_open');var close_button=Ext.get(node.id+'_close');close_button.hide();open_button.show();break;case"open":node.component.show();var open_button=Ext.get(node.id+'_open');var close_button=Ext.get(node.id+'_close');open_button.hide();close_button.show();break;}};geoadmin.LayerNode=Ext.extend(GeoExt.tree.LayerNode,{constructor:function(config){if(config.layer.layerType){config.iconCls='tree-layer-icon-'+config.layer.layerType;}
geoadmin.LayerNode.superclass.constructor.apply(this,arguments);},hideIfFirst:function(node){var isFirst=this.isFirst();if(isFirst&&!this._updating&&this.nextSibling&&this.nextSibling.hidden===false){this._updating=true;var next=this.nextSibling;if(next){next.getUI().updateActions();}
delete this._updating;}
return isFirst;},hideIfLast:function(node){var isLast=this.isLast();if(isLast&&!this._updating&&this.previousSibling&&this.previousSibling.hidden===false){this._updating=true;var previous=this.previousSibling;if(previous){previous.getUI().updateActions();}
delete this._updating;}
return isLast;}});Ext.tree.TreePanel.nodeTypes.geoadmin_layer=geoadmin.LayerNode;OpenLayers.Util.extend(OpenLayers.Lang.en,{'mf.tools':'Tools','mf.layertree':'Layer tree','mf.layertree.opacity':'Opacity','mf.layertree.remove':'Remove','mf.layertree.zoomToExtent':'Zoom to extent','mf.print.mapTitle':'Title','mf.print.comment':'Comments','mf.print.loadingConfig':'Loading the configuration...','mf.print.serverDown':'The print service is not working','mf.print.unableToPrint':"Unable to print",'mf.print.generatingPDF':"Generating PDF...",'mf.print.dpi':'DPI','mf.print.scale':'Scale','mf.print.rotation':'Rotation','mf.print.print':'Print','mf.print.resetPos':'Reset Pos.','mf.print.layout':'Layout','mf.print.addPage':'Add page','mf.print.remove':'Remove page','mf.print.clearAll':'Clear all','mf.print.pdfReady':'Your PDF document is ready.','mf.print.noPage':'No page selected, click on the "Add page" button to add one.','mf.print.print-tooltip':'Generate a PDF with at least the extent shown on the map','mf.error':'Error','mf.warning':'Warning','mf.information':'Information','mf.cancel':'Cancel','mf.recenter.x':'X','mf.recenter.y':'Y','mf.recenter.submit':'Recenter','mf.recenter.missingCoords':'Some coordinates are missing.','mf.recenter.outOfRangeCoords':'Submitted coordinates (${myX}, ${myY}) are not in the map area<br />'+'and must be within following ranges:<br/>'+'${coordX} between ${minCoordX} and ${maxCoordX},<br />'+'${coordY} between ${minCoordY} and ${maxCoordY}','mf.recenter.emptyText':'Text to search','mf.recenter.ws.error':'An error occured when accessing the distant webservice:','mf.recenter.ws.service':'Selected service','mf.control.previous':'Previous view','mf.control.next':'Next view','mf.control.pan':'Pan','mf.control.zoomIn':'Zoom in','mf.control.zoomOut':'Zoom out','mf.control.zoomAll':'Zoom all','mf.editing.comboNoneName':'None','mf.editing.import':'Import','mf.editing.importTooltip':'Import data','mf.editing.commit':'Commit','mf.editing.commitTooltip':'Commit data','mf.editing.delete':'Delete','mf.editing.deleteTooltip':'Delete selected feature','mf.editing.comboLabel':'Layer to edit','mf.editing.confirmMessageTitle':'Edited features','mf.editing.confirmMessage':'There are uncommitted features, are you sure '+'you want to switch layer?','mf.editing.selectModifyFeature':'Modify features','mf.editing.drawPointTitle':'Draw points','mf.editing.drawLineTitle':'Draw lines','mf.editing.drawPolygonTitle':'Draw polygons','mf.editing.formTitle':'Attributes','mf.editing.gridIdHeader':'Id','mf.editing.gridStateHeader':'State','mf.editing.gridTitle':'Edited features','mf.editing.onContextClickMessage':'Edit this feature','mf.editing.onBeforeUnloadMessage':'The feature editing panel has '+'uncommitted features'});OpenLayers.Control.PanZoom=OpenLayers.Class(OpenLayers.Control,{slideFactor:50,slideRatio:null,buttons:null,position:null,initialize:function(options){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(px){OpenLayers.Control.prototype.draw.apply(this,arguments);px=this.position;this.buttons=[];var sz=new OpenLayers.Size(18,18);var centered=new OpenLayers.Pixel(px.x+sz.w/2,px.y);this._addButton("panup","north-mini.png",centered,sz);px.y=centered.y+sz.h;this._addButton("panleft","west-mini.png",px,sz);this._addButton("panright","east-mini.png",px.add(sz.w,0),sz);this._addButton("pandown","south-mini.png",centered.add(0,sz.h*2),sz);this._addButton("zoomin","zoom-plus-mini.png",centered.add(0,sz.h*3+5),sz);this._addButton("zoomworld","zoom-world-mini.png",centered.add(0,sz.h*4+5),sz);this._addButton("zoomout","zoom-minus-mini.png",centered.add(0,sz.h*5+5),sz);return this.div;},_addButton:function(id,img,xy,sz){var imgLocation=OpenLayers.Util.getImagesLocation()+img;var btn=OpenLayers.Util.createAlphaImageDiv(this.id+"_"+id,xy,sz,imgLocation,"absolute");this.div.appendChild(btn);OpenLayers.Event.observe(btn,"mousedown",OpenLayers.Function.bindAsEventListener(this.buttonDown,btn));OpenLayers.Event.observe(btn,"dblclick",OpenLayers.Function.bindAsEventListener(this.doubleClick,btn));OpenLayers.Event.observe(btn,"click",OpenLayers.Function.bindAsEventListener(this.doubleClick,btn));btn.action=id;btn.map=this.map;if(!this.slideRatio){var slideFactorPixels=this.slideFactor;var getSlideFactor=function(){return slideFactorPixels;};}else{var slideRatio=this.slideRatio;var getSlideFactor=function(dim){return this.map.getSize()[dim]*slideRatio;};}
btn.getSlideFactor=getSlideFactor;this.buttons.push(btn);return btn;},_removeButton:function(btn){OpenLayers.Event.stopObservingElement(btn);btn.map=null;btn.getSlideFactor=null;this.div.removeChild(btn);OpenLayers.Util.removeItem(this.buttons,btn);},removeButtons:function(){for(var i=this.buttons.length-1;i>=0;--i){this._removeButton(this.buttons[i]);}},doubleClick:function(evt){OpenLayers.Event.stop(evt);return false;},buttonDown:function(evt){if(!OpenLayers.Event.isLeftClick(evt)){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(evt);},CLASS_NAME:"OpenLayers.Control.PanZoom"});OpenLayers.Control.PanZoom.X=4;OpenLayers.Control.PanZoom.Y=4;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(map){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(px){OpenLayers.Control.prototype.draw.apply(this,arguments);px=this.position.clone();this.buttons=[];var sz=new OpenLayers.Size(18,18);var centered=new OpenLayers.Pixel(px.x+sz.w/2,px.y);var wposition=sz.w;if(this.zoomWorldIcon){centered=new OpenLayers.Pixel(px.x+sz.w,px.y);}
this._addButton("panup","north-mini.png",centered,sz);px.y=centered.y+sz.h;this._addButton("panleft","west-mini.png",px,sz);if(this.zoomWorldIcon){this._addButton("zoomworld","zoom-world-mini.png",px.add(sz.w,0),sz);wposition*=2;}
this._addButton("panright","east-mini.png",px.add(wposition,0),sz);this._addButton("pandown","south-mini.png",centered.add(0,sz.h*2),sz);this._addButton("zoomin","zoom-plus-mini.png",centered.add(0,sz.h*3+5),sz);centered=this._addZoomBar(centered.add(0,sz.h*4+5));this._addButton("zoomout","zoom-minus-mini.png",centered,sz);return this.div;},_addZoomBar:function(centered){var imgLocation=OpenLayers.Util.getImagesLocation();var id=this.id+"_"+this.map.id;var zoomsToEnd=this.map.getNumZoomLevels()-1-this.map.getZoom();var slider=OpenLayers.Util.createAlphaImageDiv(id,centered.add(-1,zoomsToEnd*this.zoomStopHeight),new OpenLayers.Size(20,9),imgLocation+"slider.png","absolute");this.slider=slider;this.sliderEvents=new OpenLayers.Events(this,slider,null,true,{includeXY:true});this.sliderEvents.on({"mousedown":this.zoomBarDown,"mousemove":this.zoomBarDrag,"mouseup":this.zoomBarUp,"dblclick":this.doubleClick,"click":this.doubleClick});var sz=new OpenLayers.Size();sz.h=this.zoomStopHeight*this.map.getNumZoomLevels();sz.w=this.zoomStopWidth;var div=null;if(OpenLayers.Util.alphaHack()){var id=this.id+"_"+this.map.id;div=OpenLayers.Util.createAlphaImageDiv(id,centered,new OpenLayers.Size(sz.w,this.zoomStopHeight),imgLocation+"zoombar.png","absolute",null,"crop");div.style.height=sz.h+"px";}else{div=OpenLayers.Util.createDiv('OpenLayers_Control_PanZoomBar_Zoombar'+this.map.id,centered,sz,imgLocation+"zoombar.png");}
this.zoombarDiv=div;this.divEvents=new OpenLayers.Events(this,div,null,true,{includeXY:true});this.divEvents.on({"mousedown":this.divClick,"mousemove":this.passEventToSlider,"dblclick":this.doubleClick,"click":this.doubleClick});this.div.appendChild(div);this.startTop=parseInt(div.style.top);this.div.appendChild(slider);this.map.events.register("zoomend",this,this.moveZoomBar);centered=centered.add(0,this.zoomStopHeight*this.map.getNumZoomLevels());return centered;},_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(evt){this.sliderEvents.handleBrowserEvent(evt);},divClick:function(evt){if(!OpenLayers.Event.isLeftClick(evt)){return;}
var y=evt.xy.y;var top=OpenLayers.Util.pagePosition(evt.object)[1];var levels=(y-top)/this.zoomStopHeight;if(this.forceFixedZoomLevel||!this.map.fractionalZoom){levels=Math.floor(levels);}
var zoom=(this.map.getNumZoomLevels()-1)-levels;zoom=Math.min(Math.max(zoom,0),this.map.getNumZoomLevels()-1);this.map.zoomTo(zoom);OpenLayers.Event.stop(evt);},zoomBarDown:function(evt){if(!OpenLayers.Event.isLeftClick(evt)){return;}
this.map.events.on({"mousemove":this.passEventToSlider,"mouseup":this.passEventToSlider,scope:this});this.mouseDragStart=evt.xy.clone();this.zoomStart=evt.xy.clone();this.div.style.cursor="move";this.zoombarDiv.offsets=null;OpenLayers.Event.stop(evt);},zoomBarDrag:function(evt){if(this.mouseDragStart!=null){var deltaY=this.mouseDragStart.y-evt.xy.y;var offsets=OpenLayers.Util.pagePosition(this.zoombarDiv);if((evt.clientY-offsets[1])>0&&(evt.clientY-offsets[1])<parseInt(this.zoombarDiv.style.height)-2){var newTop=parseInt(this.slider.style.top)-deltaY;this.slider.style.top=newTop+"px";this.mouseDragStart=evt.xy.clone();}
OpenLayers.Event.stop(evt);}},zoomBarUp:function(evt){if(!OpenLayers.Event.isLeftClick(evt)){return;}
if(this.mouseDragStart){this.div.style.cursor="";this.map.events.un({"mouseup":this.passEventToSlider,"mousemove":this.passEventToSlider,scope:this});var deltaY=this.zoomStart.y-evt.xy.y;var zoomLevel=this.map.zoom;if(!this.forceFixedZoomLevel&&this.map.fractionalZoom){zoomLevel+=deltaY/this.zoomStopHeight;zoomLevel=Math.min(Math.max(zoomLevel,0),this.map.getNumZoomLevels()-1);}else{zoomLevel+=Math.round(deltaY/this.zoomStopHeight);}
this.map.zoomTo(zoomLevel);this.mouseDragStart=null;this.zoomStart=null;OpenLayers.Event.stop(evt);}},moveZoomBar:function(){var newTop=((this.map.getNumZoomLevels()-1)-this.map.getZoom())*this.zoomStopHeight+this.startTop+1;this.slider.style.top=newTop+"px";},CLASS_NAME:"OpenLayers.Control.PanZoomBar"});var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return}f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S)}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E()}},10)}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null)}R(E)}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E()}}function E(){if(e){return}if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u)}catch(w){return}}e=true;if(Z){clearInterval(Z);Z=null}var q=o.length;for(var r=0;r<q;r++){o[r]()}}function f(q){if(e){q()}else{o[o.length]=q}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false)}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false)}else{if(typeof j.attachEvent!=b){I(j,"onload",r)}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r()}}else{j.onload=r}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r)}W(u,true)}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q])}else{O(r)}}}}else{W(u,true)}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue)}else{w.setAttribute(y[u].nodeName,y[u].nodeValue)}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"))}}}t.parentNode.replaceChild(w,t)}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId}}else{M=G(u)}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310"}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137"}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u)};I(j,"onload",v)}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x)}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t)};I(j,"onload",q)}else{t.parentNode.replaceChild(G(t),t)}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true))}}}}}return u}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB]}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"'}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"'}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />'}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id)}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z])}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z])}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z])}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y])}}}v.parentNode.replaceChild(AC,v);q=AC}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x])}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x])}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w])}}v.parentNode.replaceChild(u,v);q=u}}}return q}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u)}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r)}else{j.attachEvent("onload",function(){B(r)})}}else{q.parentNode.removeChild(q)}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null}}r.parentNode.removeChild(r)}}function C(t){var q=null;try{q=K.getElementById(t)}catch(r){}return q}function a(q){return K.createElement(q)}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r]}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false}function V(v,r){if(h.ie&&h.mac){return}var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"))}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r)}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r}else{V("#"+t,"visibility:"+r)}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2])}var t=i.length;for(var u=0;u<t;u++){X(i[u])}for(var r in h){h[r]=null}h=null;for(var q in swfobject){swfobject[q]=null}swfobject=null})}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return}var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false)},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t}else{if(typeof u.SetVariable!=b){q=u}}}}return q},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return}AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v]}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u]}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t]}else{y.flashvars=t+"="+r[t]}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true)}})}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF)})}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]}},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q)}else{return undefined}},removeSWF:function(q){if(h.w3cdom){X(q)}},createCSS:function(r,q){if(h.w3cdom){V(r,q)}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u)}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block"}}M=null;l=null;A=false}}}}}();OpenLayers.Tween=OpenLayers.Class({INTERVAL:10,easing:null,begin:null,finish:null,duration:null,callbacks:null,time:null,interval:null,playing:false,initialize:function(easing){this.easing=(easing)?easing:OpenLayers.Easing.Expo.easeOut;},start:function(begin,finish,duration,options){this.playing=true;this.begin=begin;this.finish=finish;this.duration=duration;this.callbacks=options.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 value={};for(var i in this.begin){var b=this.begin[i];var f=this.finish[i];if(b==null||f==null||isNaN(b)||isNaN(f)){OpenLayers.Console.error('invalid value for Tween');}
var c=f-b;value[i]=this.easing.apply(this,[this.time,b,c,this.duration]);}
this.time++;if(this.callbacks&&this.callbacks.eachStep){this.callbacks.eachStep.call(this,value);}
if(this.time>this.duration){if(this.callbacks&&this.callbacks.done){this.callbacks.done.call(this,this.finish);this.playing=false;}
window.clearInterval(this.interval);this.interval=null;}},CLASS_NAME:"OpenLayers.Tween"});OpenLayers.Easing={CLASS_NAME:"OpenLayers.Easing"};OpenLayers.Easing.Linear={easeIn:function(t,b,c,d){return c*t/d+b;},easeOut:function(t,b,c,d){return c*t/d+b;},easeInOut:function(t,b,c,d){return c*t/d+b;},CLASS_NAME:"OpenLayers.Easing.Linear"};OpenLayers.Easing.Expo={easeIn:function(t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOut:function(t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOut:function(t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b;},CLASS_NAME:"OpenLayers.Easing.Expo"};OpenLayers.Easing.Quad={easeIn:function(t,b,c,d){return c*(t/=d)*t+b;},easeOut:function(t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeInOut:function(t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;},CLASS_NAME:"OpenLayers.Easing.Quad"};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(div,options){if(arguments.length===1&&typeof div==="object"){options=div;div=options&&options.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,options);this.layers=[];this.id=OpenLayers.Util.createUniqueID("OpenLayers.Map_");this.div=OpenLayers.Util.getElement(div);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 id=this.id+"_OpenLayers_ViewPort";this.viewPortDiv=OpenLayers.Util.createDiv(id,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);id=this.id+"_OpenLayers_Container";this.layerContainerDiv=OpenLayers.Util.createDiv(id);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 addNode=true;var nodes=document.getElementsByTagName('link');for(var i=0,len=nodes.length;i<len;++i){if(OpenLayers.Util.isEquivalentUrl(nodes.item(i).href,this.theme)){addNode=false;break;}}
if(addNode){var cssNode=document.createElement('link');cssNode.setAttribute('rel','stylesheet');cssNode.setAttribute('type','text/css');cssNode.setAttribute('href',this.theme);document.getElementsByTagName('head')[0].appendChild(cssNode);}}
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 i=0,len=this.controls.length;i<len;i++){this.addControlToMap(this.controls[i]);}
this.popups=[];this.unloadDestroy=OpenLayers.Function.bind(this.destroy,this);OpenLayers.Event.observe(window,'unload',this.unloadDestroy);if(options&&options.layers){this.addLayers(options.layers);if(options.center){this.setCenter(options.center,options.zoom);}}},render:function(div){this.div=OpenLayers.Util.getElement(div);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.playing){this.panTween.stop();}
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 i=this.controls.length-1;i>=0;--i){this.controls[i].destroy();}
this.controls=null;}
if(this.layers!=null){for(var i=this.layers.length-1;i>=0;--i){this.layers[i].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(options){OpenLayers.Util.extend(this,options);},getTileSize:function(){return this.tileSize;},getBy:function(array,property,match){var test=(typeof match.test=="function");var found=OpenLayers.Array.filter(this[array],function(item){return item[property]==match||(test&&match.test(item[property]));});return found;},getLayersBy:function(property,match){return this.getBy("layers",property,match);},getLayersByName:function(match){return this.getLayersBy("name",match);},getLayersByClass:function(match){return this.getLayersBy("CLASS_NAME",match);},getControlsBy:function(property,match){return this.getBy("controls",property,match);},getControlsByClass:function(match){return this.getControlsBy("CLASS_NAME",match);},getLayer:function(id){var foundLayer=null;for(var i=0,len=this.layers.length;i<len;i++){var layer=this.layers[i];if(layer.id==id){foundLayer=layer;break;}}
return foundLayer;},setLayerZIndex:function(layer,zIdx){layer.setZIndex(this.Z_INDEX_BASE[layer.isBaseLayer?'BaseLayer':'Overlay']
+zIdx*5);},resetLayersZIndex:function(){for(var i=0,len=this.layers.length;i<len;i++){var layer=this.layers[i];this.setLayerZIndex(layer,i);}},addLayer:function(layer){for(var i=0,len=this.layers.length;i<len;i++){if(this.layers[i]==layer){var msg=OpenLayers.i18n('layerAlreadyAdded',{'layerName':layer.name});OpenLayers.Console.warn(msg);return false;}}
if(this.allOverlays){layer.isBaseLayer=false;}
if(this.events.triggerEvent("preaddlayer",{layer:layer})===false){return;}
layer.div.className="olLayerDiv";layer.div.style.overflow="";this.setLayerZIndex(layer,this.layers.length);if(layer.isFixed){this.viewPortDiv.appendChild(layer.div);}else{this.layerContainerDiv.appendChild(layer.div);}
this.layers.push(layer);layer.setMap(this);if(layer.isBaseLayer||(this.allOverlays&&!this.baseLayer)){if(this.baseLayer==null){this.setBaseLayer(layer);}else{layer.setVisibility(false);}}else{layer.redraw();}
this.events.triggerEvent("addlayer",{layer:layer});layer.afterAdd();},addLayers:function(layers){for(var i=0,len=layers.length;i<len;i++){this.addLayer(layers[i]);}},removeLayer:function(layer,setNewBaseLayer){if(setNewBaseLayer==null){setNewBaseLayer=true;}
if(layer.isFixed){this.viewPortDiv.removeChild(layer.div);}else{this.layerContainerDiv.removeChild(layer.div);}
OpenLayers.Util.removeItem(this.layers,layer);layer.removeMap(this);layer.map=null;if(this.baseLayer==layer){this.baseLayer=null;if(setNewBaseLayer){for(var i=0,len=this.layers.length;i<len;i++){var iLayer=this.layers[i];if(iLayer.isBaseLayer||this.allOverlays){this.setBaseLayer(iLayer);break;}}}}
this.resetLayersZIndex();this.events.triggerEvent("removelayer",{layer:layer});},getNumLayers:function(){return this.layers.length;},getLayerIndex:function(layer){return OpenLayers.Util.indexOf(this.layers,layer);},setLayerIndex:function(layer,idx){var base=this.getLayerIndex(layer);if(idx<0){idx=0;}else if(idx>this.layers.length){idx=this.layers.length;}
if(base!=idx){this.layers.splice(base,1);this.layers.splice(idx,0,layer);for(var i=0,len=this.layers.length;i<len;i++){this.setLayerZIndex(this.layers[i],i);}
this.events.triggerEvent("changelayer",{layer:layer,property:"order"});if(this.allOverlays){if(idx===0){this.setBaseLayer(layer);}else if(this.baseLayer!==this.layers[0]){this.setBaseLayer(this.layers[0]);}}}},raiseLayer:function(layer,delta){var idx=this.getLayerIndex(layer)+delta;this.setLayerIndex(layer,idx);},setBaseLayer:function(newBaseLayer){if(newBaseLayer!=this.baseLayer){if(OpenLayers.Util.indexOf(this.layers,newBaseLayer)!=-1){var center=this.getCenter();var newResolution=OpenLayers.Util.getResolutionFromScale(this.getScale(),newBaseLayer.units);if(this.baseLayer!=null&&!this.allOverlays){this.baseLayer.setVisibility(false);}
this.baseLayer=newBaseLayer;this.viewRequestID++;if(!this.allOverlays||this.baseLayer.visibility){this.baseLayer.setVisibility(true);}
if(center!=null){var newZoom=this.getZoomForResolution(newResolution||this.resolution,true);this.setCenter(center,newZoom,false,true);}
this.events.triggerEvent("changebaselayer",{layer:this.baseLayer});}}},addControl:function(control,px){this.controls.push(control);this.addControlToMap(control,px);},addControls:function(controls,pixels){var pxs=(arguments.length===1)?[]:pixels;for(var i=0,len=controls.length;i<len;i++){var ctrl=controls[i];var px=(pxs[i])?pxs[i]:null;this.addControl(ctrl,px);}},addControlToMap:function(control,px){control.outsideViewport=(control.div!=null);if(this.displayProjection&&!control.displayProjection){control.displayProjection=this.displayProjection;}
control.setMap(this);var div=control.draw(px);if(div){if(!control.outsideViewport){div.style.zIndex=this.Z_INDEX_BASE['Control']+
this.controls.length;this.viewPortDiv.appendChild(div);}}
if(control.autoActivate){control.activate();}},getControl:function(id){var returnControl=null;for(var i=0,len=this.controls.length;i<len;i++){var control=this.controls[i];if(control.id==id){returnControl=control;break;}}
return returnControl;},removeControl:function(control){if((control)&&(control==this.getControl(control.id))){if(control.div&&(control.div.parentNode==this.viewPortDiv)){this.viewPortDiv.removeChild(control.div);}
OpenLayers.Util.removeItem(this.controls,control);}},addPopup:function(popup,exclusive){if(exclusive){for(var i=this.popups.length-1;i>=0;--i){this.removePopup(this.popups[i]);}}
popup.map=this;this.popups.push(popup);var popupDiv=popup.draw();if(popupDiv){popupDiv.style.zIndex=this.Z_INDEX_BASE['Popup']+
this.popups.length;this.layerContainerDiv.appendChild(popupDiv);}},removePopup:function(popup){OpenLayers.Util.removeItem(this.popups,popup);if(popup.div){try{this.layerContainerDiv.removeChild(popup.div);}
catch(e){}}
popup.map=null;},getSize:function(){var size=null;if(this.size!=null){size=this.size.clone();}
return size;},updateSize:function(){var newSize=this.getCurrentSize();if(newSize&&!isNaN(newSize.h)&&!isNaN(newSize.w)){this.events.clearMouseCache();var oldSize=this.getSize();if(oldSize==null){this.size=oldSize=newSize;}
if(!newSize.equals(oldSize)){this.size=newSize;for(var i=0,len=this.layers.length;i<len;i++){this.layers[i].onMapResize();}
var center=this.getCenter();if(this.baseLayer!=null&&center!=null){var zoom=this.getZoom();this.zoom=null;this.setCenter(center,zoom);}}}},getCurrentSize:function(){var size=new OpenLayers.Size(this.div.clientWidth,this.div.clientHeight);if(size.w==0&&size.h==0||isNaN(size.w)&&isNaN(size.h)){size.w=this.div.offsetWidth;size.h=this.div.offsetHeight;}
if(size.w==0&&size.h==0||isNaN(size.w)&&isNaN(size.h)){size.w=parseInt(this.div.style.width);size.h=parseInt(this.div.style.height);}
return size;},calculateBounds:function(center,resolution){var extent=null;if(center==null){center=this.getCenter();}
if(resolution==null){resolution=this.getResolution();}
if((center!=null)&&(resolution!=null)){var size=this.getSize();var w_deg=size.w*resolution;var h_deg=size.h*resolution;extent=new OpenLayers.Bounds(center.lon-w_deg/2,center.lat-h_deg/2,center.lon+w_deg/2,center.lat+h_deg/2);}
return extent;},getCenter:function(){var center=null;if(this.center){center=this.center.clone();}
return center;},getZoom:function(){return this.zoom;},pan:function(dx,dy,options){options=OpenLayers.Util.applyDefaults(options,{animate:true,dragging:false});var centerPx=this.getViewPortPxFromLonLat(this.getCenter());var newCenterPx=centerPx.add(dx,dy);if(!options.dragging||!newCenterPx.equals(centerPx)){var newCenterLonLat=this.getLonLatFromViewPortPx(newCenterPx);if(options.animate){this.panTo(newCenterLonLat);}else{this.setCenter(newCenterLonLat,null,options.dragging);}}},panTo:function(lonlat){if(this.panMethod&&this.getExtent().scale(this.panRatio).containsLonLat(lonlat)){if(!this.panTween){this.panTween=new OpenLayers.Tween(this.panMethod);}
var center=this.getCenter();if(lonlat.lon==center.lon&&lonlat.lat==center.lat){return;}
var from={lon:center.lon,lat:center.lat};var to={lon:lonlat.lon,lat:lonlat.lat};this.panTween.start(from,to,this.panDuration,{callbacks:{start:OpenLayers.Function.bind(function(lonlat){this.events.triggerEvent("movestart");},this),eachStep:OpenLayers.Function.bind(function(lonlat){lonlat=new OpenLayers.LonLat(lonlat.lon,lonlat.lat);this.moveTo(lonlat,this.zoom,{'dragging':true,'noEvent':true});},this),done:OpenLayers.Function.bind(function(lonlat){lonlat=new OpenLayers.LonLat(lonlat.lon,lonlat.lat);this.moveTo(lonlat,this.zoom,{'noEvent':true});this.events.triggerEvent("moveend");},this)}});}else{this.setCenter(lonlat);}},setCenter:function(lonlat,zoom,dragging,forceZoomChange){this.moveTo(lonlat,zoom,{'dragging':dragging,'forceZoomChange':forceZoomChange,'caller':'setCenter'});},moveTo:function(lonlat,zoom,options){if(!options){options={};}
if(zoom!=null){zoom=parseFloat(zoom);if(!this.fractionalZoom){zoom=Math.round(zoom);}}
var dragging=options.dragging;var forceZoomChange=options.forceZoomChange;var noEvent=options.noEvent;if(this.panTween&&options.caller=="setCenter"){this.panTween.stop();}
if(!this.center&&!this.isValidLonLat(lonlat)){lonlat=this.maxExtent.getCenterLonLat();}
if(this.restrictedExtent!=null){if(lonlat==null){lonlat=this.getCenter();}
if(zoom==null){zoom=this.getZoom();}
var resolution=this.getResolutionForZoom(zoom);var extent=this.calculateBounds(lonlat,resolution);if(!this.restrictedExtent.containsBounds(extent)){var maxCenter=this.restrictedExtent.getCenterLonLat();if(extent.getWidth()>this.restrictedExtent.getWidth()){lonlat=new OpenLayers.LonLat(maxCenter.lon,lonlat.lat);}else if(extent.left<this.restrictedExtent.left){lonlat=lonlat.add(this.restrictedExtent.left-
extent.left,0);}else if(extent.right>this.restrictedExtent.right){lonlat=lonlat.add(this.restrictedExtent.right-
extent.right,0);}
if(extent.getHeight()>this.restrictedExtent.getHeight()){lonlat=new OpenLayers.LonLat(lonlat.lon,maxCenter.lat);}else if(extent.bottom<this.restrictedExtent.bottom){lonlat=lonlat.add(0,this.restrictedExtent.bottom-
extent.bottom);}
else if(extent.top>this.restrictedExtent.top){lonlat=lonlat.add(0,this.restrictedExtent.top-
extent.top);}}}
var zoomChanged=forceZoomChange||((this.isValidZoomLevel(zoom))&&(zoom!=this.getZoom()));var centerChanged=(this.isValidLonLat(lonlat))&&(!lonlat.equals(this.center));if(zoomChanged||centerChanged||!dragging){if(!this.dragging&&!noEvent){this.events.triggerEvent("movestart");}
if(centerChanged){if((!zoomChanged)&&(this.center)){this.centerLayerContainer(lonlat);}
this.center=lonlat.clone();}
if((zoomChanged)||(this.layerContainerOrigin==null)){this.layerContainerOrigin=this.center.clone();this.layerContainerDiv.style.left="0px";this.layerContainerDiv.style.top="0px";}
if(zoomChanged){this.zoom=zoom;this.resolution=this.getResolutionForZoom(zoom);this.viewRequestID++;}
var bounds=this.getExtent();if(this.baseLayer.visibility){this.baseLayer.moveTo(bounds,zoomChanged,dragging);if(dragging){this.baseLayer.events.triggerEvent("move");}else{this.baseLayer.events.triggerEvent("moveend",{"zoomChanged":zoomChanged});}}
bounds=this.baseLayer.getExtent();for(var i=0,len=this.layers.length;i<len;i++){var layer=this.layers[i];if(layer!==this.baseLayer&&!layer.isBaseLayer){var inRange=layer.calculateInRange();if(layer.inRange!=inRange){layer.inRange=inRange;if(!inRange){layer.display(false);}
this.events.triggerEvent("changelayer",{layer:layer,property:"visibility"});}
if(inRange&&layer.visibility){layer.moveTo(bounds,zoomChanged,dragging);if(dragging){layer.events.triggerEvent("move");}else{layer.events.triggerEvent("moveend",{"zoomChanged":zoomChanged});}}}}
if(zoomChanged){for(var i=0,len=this.popups.length;i<len;i++){this.popups[i].updatePosition();}}
this.events.triggerEvent("move");if(zoomChanged){this.events.triggerEvent("zoomend");}}
if(!dragging&&!noEvent){this.events.triggerEvent("moveend");}
this.dragging=!!dragging;},centerLayerContainer:function(lonlat){var originPx=this.getViewPortPxFromLonLat(this.layerContainerOrigin);var newPx=this.getViewPortPxFromLonLat(lonlat);if((originPx!=null)&&(newPx!=null)){this.layerContainerDiv.style.left=Math.round(originPx.x-newPx.x)+"px";this.layerContainerDiv.style.top=Math.round(originPx.y-newPx.y)+"px";}},isValidZoomLevel:function(zoomLevel){return((zoomLevel!=null)&&(zoomLevel>=0)&&(zoomLevel<this.getNumZoomLevels()));},isValidLonLat:function(lonlat){var valid=false;if(lonlat!=null){var maxExtent=this.getMaxExtent();valid=maxExtent.containsLonLat(lonlat);}
return valid;},getProjection:function(){var projection=this.getProjectionObject();return projection?projection.getCode():null;},getProjectionObject:function(){var projection=null;if(this.baseLayer!=null){projection=this.baseLayer.projection;}
return projection;},getMaxResolution:function(){var maxResolution=null;if(this.baseLayer!=null){maxResolution=this.baseLayer.maxResolution;}
return maxResolution;},getMaxExtent:function(options){var maxExtent=null;if(options&&options.restricted&&this.restrictedExtent){maxExtent=this.restrictedExtent;}else if(this.baseLayer!=null){maxExtent=this.baseLayer.maxExtent;}
return maxExtent;},getNumZoomLevels:function(){var numZoomLevels=null;if(this.baseLayer!=null){numZoomLevels=this.baseLayer.numZoomLevels;}
return numZoomLevels;},getExtent:function(){var extent=null;if(this.baseLayer!=null){extent=this.baseLayer.getExtent();}
return extent;},getResolution:function(){var resolution=null;if(this.baseLayer!=null){resolution=this.baseLayer.getResolution();}else if(this.allOverlays===true&&this.layers.length>0){resolution=this.layers[0].getResolution();}
return resolution;},getUnits:function(){var units=null;if(this.baseLayer!=null){units=this.baseLayer.units;}
return units;},getScale:function(){var scale=null;if(this.baseLayer!=null){var res=this.getResolution();var units=this.baseLayer.units;scale=OpenLayers.Util.getScaleFromResolution(res,units);}
return scale;},getZoomForExtent:function(bounds,closest){var zoom=null;if(this.baseLayer!=null){zoom=this.baseLayer.getZoomForExtent(bounds,closest);}
return zoom;},getResolutionForZoom:function(zoom){var resolution=null;if(this.baseLayer){resolution=this.baseLayer.getResolutionForZoom(zoom);}
return resolution;},getZoomForResolution:function(resolution,closest){var zoom=null;if(this.baseLayer!=null){zoom=this.baseLayer.getZoomForResolution(resolution,closest);}
return zoom;},zoomTo:function(zoom){if(this.isValidZoomLevel(zoom)){this.setCenter(null,zoom);}},zoomIn:function(){this.zoomTo(this.getZoom()+1);},zoomOut:function(){this.zoomTo(this.getZoom()-1);},zoomToExtent:function(bounds,closest){var center=bounds.getCenterLonLat();if(this.baseLayer.wrapDateLine){var maxExtent=this.getMaxExtent();bounds=bounds.clone();while(bounds.right<bounds.left){bounds.right+=maxExtent.getWidth();}
center=bounds.getCenterLonLat().wrapDateLine(maxExtent);}
this.setCenter(center,this.getZoomForExtent(bounds,closest));},zoomToMaxExtent:function(options){var restricted=(options)?options.restricted:true;var maxExtent=this.getMaxExtent({'restricted':restricted});this.zoomToExtent(maxExtent);},zoomToScale:function(scale,closest){var res=OpenLayers.Util.getResolutionFromScale(scale,this.baseLayer.units);var size=this.getSize();var w_deg=size.w*res;var h_deg=size.h*res;var center=this.getCenter();var extent=new OpenLayers.Bounds(center.lon-w_deg/2,center.lat-h_deg/2,center.lon+w_deg/2,center.lat+h_deg/2);this.zoomToExtent(extent,closest);},getLonLatFromViewPortPx:function(viewPortPx){var lonlat=null;if(this.baseLayer!=null){lonlat=this.baseLayer.getLonLatFromViewPortPx(viewPortPx);}
return lonlat;},getViewPortPxFromLonLat:function(lonlat){var px=null;if(this.baseLayer!=null){px=this.baseLayer.getViewPortPxFromLonLat(lonlat);}
return px;},getLonLatFromPixel:function(px){return this.getLonLatFromViewPortPx(px);},getPixelFromLonLat:function(lonlat){var px=this.getViewPortPxFromLonLat(lonlat);px.x=Math.round(px.x);px.y=Math.round(px.y);return px;},getViewPortPxFromLayerPx:function(layerPx){var viewPortPx=null;if(layerPx!=null){var dX=parseInt(this.layerContainerDiv.style.left);var dY=parseInt(this.layerContainerDiv.style.top);viewPortPx=layerPx.add(dX,dY);}
return viewPortPx;},getLayerPxFromViewPortPx:function(viewPortPx){var layerPx=null;if(viewPortPx!=null){var dX=-parseInt(this.layerContainerDiv.style.left);var dY=-parseInt(this.layerContainerDiv.style.top);layerPx=viewPortPx.add(dX,dY);if(isNaN(layerPx.x)||isNaN(layerPx.y)){layerPx=null;}}
return layerPx;},getLonLatFromLayerPx:function(px){px=this.getViewPortPxFromLayerPx(px);return this.getLonLatFromViewPortPx(px);},getLayerPxFromLonLat:function(lonlat){var px=this.getPixelFromLonLat(lonlat);return this.getLayerPxFromViewPortPx(px);},CLASS_NAME:"OpenLayers.Map"});OpenLayers.Map.TILE_WIDTH=256;OpenLayers.Map.TILE_HEIGHT=256;OpenLayers.Projection=OpenLayers.Class({proj:null,projCode:null,initialize:function(projCode,options){OpenLayers.Util.extend(this,options);this.projCode=projCode;if(window.Proj4js){this.proj=new Proj4js.Proj(projCode);}},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(projection){if(projection&&projection.getCode){return this.getCode()==projection.getCode();}else{return false;}},destroy:function(){delete this.proj;delete this.projCode;},CLASS_NAME:"OpenLayers.Projection"});OpenLayers.Projection.transforms={};OpenLayers.Projection.addTransform=function(from,to,method){if(!OpenLayers.Projection.transforms[from]){OpenLayers.Projection.transforms[from]={};}
OpenLayers.Projection.transforms[from][to]=method;};OpenLayers.Projection.transform=function(point,source,dest){if(source.proj&&dest.proj){point=Proj4js.transform(source.proj,dest.proj,point);}else if(source&&dest&&OpenLayers.Projection.transforms[source.getCode()]&&OpenLayers.Projection.transforms[source.getCode()][dest.getCode()]){OpenLayers.Projection.transforms[source.getCode()][dest.getCode()](point);}
return point;};OpenLayers.Layer=OpenLayers.Class({id:null,name:null,div:null,opacity:null,alwaysInRange:null,EVENT_TYPES:["loadstart","loadend","loadcancel","visibilitychanged","move","moveend"],events:null,map:null,isBaseLayer:false,alpha:false,displayInLayerSwitcher:true,visibility:true,attribution:null,inRange:false,imageSize:null,imageOffset:null,options:null,eventListeners:null,gutter:0,projection:null,units:null,scales:null,resolutions:null,maxExtent:null,minExtent:null,maxResolution:null,minResolution:null,numZoomLevels:null,minScale:null,maxScale:null,displayOutsideMaxExtent:false,wrapDateLine:false,transitionEffect:null,SUPPORTED_TRANSITIONS:['resize'],initialize:function(name,options){this.addOptions(options);this.name=name;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(setNewBaseLayer){if(setNewBaseLayer==null){setNewBaseLayer=true;}
if(this.map!=null){this.map.removeLayer(this,setNewBaseLayer);}
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(obj){if(obj==null){obj=new OpenLayers.Layer(this.name,this.getOptions());}
OpenLayers.Util.applyDefaults(obj,this);obj.map=null;return obj;},getOptions:function(){var options={};for(var o in this.options){options[o]=this[o];}
return options;},setName:function(newName){if(newName!=this.name){this.name=newName;if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"name"});}}},addOptions:function(newOptions){if(this.options==null){this.options={};}
OpenLayers.Util.extend(this.options,newOptions);OpenLayers.Util.extend(this,newOptions);},onMapResize:function(){},redraw:function(){var redrawn=false;if(this.map){this.inRange=this.calculateInRange();var extent=this.getExtent();if(extent&&this.inRange&&this.visibility){var zoomChanged=true;this.moveTo(extent,zoomChanged,false);this.events.triggerEvent("moveend",{"zoomChanged":zoomChanged});redrawn=true;}}
return redrawn;},moveTo:function(bounds,zoomChanged,dragging){var display=this.visibility;if(!this.isBaseLayer){display=display&&this.inRange;}
this.display(display);},setMap:function(map){if(this.map==null){this.map=map;this.maxExtent=this.maxExtent||this.map.maxExtent;this.projection=this.projection||this.map.projection;if(this.projection&&typeof this.projection=="string"){this.projection=new OpenLayers.Projection(this.projection);}
this.units=this.projection.getUnits()||this.units||this.map.units;this.initResolutions();if(!this.isBaseLayer){this.inRange=this.calculateInRange();var show=((this.visibility)&&(this.inRange));this.div.style.display=show?"":"none";}
this.setTileSize();}},afterAdd:function(){},removeMap:function(map){},getImageSize:function(bounds){return(this.imageSize||this.tileSize);},setTileSize:function(size){var tileSize=(size)?size:((this.tileSize)?this.tileSize:this.map.getTileSize());this.tileSize=tileSize;if(this.gutter){this.imageOffset=new OpenLayers.Pixel(-this.gutter,-this.gutter);this.imageSize=new OpenLayers.Size(tileSize.w+(2*this.gutter),tileSize.h+(2*this.gutter));}},getVisibility:function(){return this.visibility;},setVisibility:function(visibility){if(visibility!=this.visibility){this.visibility=visibility;this.display(visibility);this.redraw();if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"visibility"});}
this.events.triggerEvent("visibilitychanged");}},display:function(display){if(display!=(this.div.style.display!="none")){this.div.style.display=(display&&this.calculateInRange())?"block":"none";}},calculateInRange:function(){var inRange=false;if(this.alwaysInRange){inRange=true;}else{if(this.map){var resolution=this.map.getResolution();inRange=((resolution>=this.minResolution)&&(resolution<=this.maxResolution));}}
return inRange;},setIsBaseLayer:function(isBaseLayer){if(isBaseLayer!=this.isBaseLayer){this.isBaseLayer=isBaseLayer;if(this.map!=null){this.map.events.triggerEvent("changebaselayer",{layer:this});}}},initResolutions:function(){var props=new Array('projection','units','scales','resolutions','maxScale','minScale','maxResolution','minResolution','minExtent','maxExtent','numZoomLevels','maxZoomLevel');var notScaleProps=['projection','units'];var useInRange=false;var confProps={};for(var i=0,len=props.length;i<len;i++){var property=props[i];if(this.options[property]&&OpenLayers.Util.indexOf(notScaleProps,property)==-1){useInRange=true;}
confProps[property]=this.options[property]||this.map[property];}
if(this.alwaysInRange==null){this.alwaysInRange=!useInRange;}
if((this.options.minScale!=null||this.options.maxScale!=null)&&this.options.scales==null){confProps.scales=null;}
if((this.options.minResolution!=null||this.options.maxResolution!=null)&&this.options.resolutions==null){confProps.resolutions=null;}
if((!confProps.numZoomLevels)&&(confProps.maxZoomLevel)){confProps.numZoomLevels=confProps.maxZoomLevel+1;}
if((confProps.scales!=null)||(confProps.resolutions!=null)){if(confProps.scales!=null){confProps.resolutions=[];for(var i=0,len=confProps.scales.length;i<len;i++){var scale=confProps.scales[i];confProps.resolutions[i]=OpenLayers.Util.getResolutionFromScale(scale,confProps.units);}}
confProps.numZoomLevels=confProps.resolutions.length;}else{if(confProps.minScale){confProps.maxResolution=OpenLayers.Util.getResolutionFromScale(confProps.minScale,confProps.units);}else if(confProps.maxResolution=="auto"){var viewSize=this.map.getSize();var wRes=confProps.maxExtent.getWidth()/viewSize.w;var hRes=confProps.maxExtent.getHeight()/viewSize.h;confProps.maxResolution=Math.max(wRes,hRes);}
if(confProps.maxScale!=null){confProps.minResolution=OpenLayers.Util.getResolutionFromScale(confProps.maxScale,confProps.units);}else if((confProps.minResolution=="auto")&&(confProps.minExtent!=null)){var viewSize=this.map.getSize();var wRes=confProps.minExtent.getWidth()/viewSize.w;var hRes=confProps.minExtent.getHeight()/viewSize.h;confProps.minResolution=Math.max(wRes,hRes);}
if(confProps.minResolution!=null&&this.options.numZoomLevels==undefined){var ratio=confProps.maxResolution/confProps.minResolution;confProps.numZoomLevels=Math.floor(Math.log(ratio)/Math.log(2))+1;}
confProps.resolutions=new Array(confProps.numZoomLevels);var base=2;if(typeof confProps.minResolution=="number"&&confProps.numZoomLevels>1){base=Math.pow((confProps.maxResolution/confProps.minResolution),(1/(confProps.numZoomLevels-1)));}
for(var i=0;i<confProps.numZoomLevels;i++){var res=confProps.maxResolution/Math.pow(base,i);confProps.resolutions[i]=res;}}
confProps.resolutions.sort(function(a,b){return(b-a);});this.resolutions=confProps.resolutions;this.maxResolution=confProps.resolutions[0];var lastIndex=confProps.resolutions.length-1;this.minResolution=confProps.resolutions[lastIndex];this.scales=[];for(var i=0,len=confProps.resolutions.length;i<len;i++){this.scales[i]=OpenLayers.Util.getScaleFromResolution(confProps.resolutions[i],confProps.units);}
this.minScale=this.scales[0];this.maxScale=this.scales[this.scales.length-1];this.numZoomLevels=confProps.numZoomLevels;},getResolution:function(){var zoom=this.map.getZoom();return this.getResolutionForZoom(zoom);},getExtent:function(){return this.map.calculateBounds();},getZoomForExtent:function(extent,closest){var viewSize=this.map.getSize();var idealResolution=Math.max(extent.getWidth()/viewSize.w,extent.getHeight()/viewSize.h);return this.getZoomForResolution(idealResolution,closest);},getDataExtent:function(){},getResolutionForZoom:function(zoom){zoom=Math.max(0,Math.min(zoom,this.resolutions.length-1));var resolution;if(this.map.fractionalZoom){var low=Math.floor(zoom);var high=Math.ceil(zoom);resolution=this.resolutions[low]-
((zoom-low)*(this.resolutions[low]-this.resolutions[high]));}else{resolution=this.resolutions[Math.round(zoom)];}
return resolution;},getZoomForResolution:function(resolution,closest){var zoom;if(this.map.fractionalZoom){var lowZoom=0;var highZoom=this.resolutions.length-1;var highRes=this.resolutions[lowZoom];var lowRes=this.resolutions[highZoom];var res;for(var i=0,len=this.resolutions.length;i<len;++i){res=this.resolutions[i];if(res>=resolution){highRes=res;lowZoom=i;}
if(res<=resolution){lowRes=res;highZoom=i;break;}}
var dRes=highRes-lowRes;if(dRes>0){zoom=lowZoom+((highRes-resolution)/dRes);}else{zoom=lowZoom;}}else{var diff;var minDiff=Number.POSITIVE_INFINITY;for(var i=0,len=this.resolutions.length;i<len;i++){if(closest){diff=Math.abs(this.resolutions[i]-resolution);if(diff>minDiff){break;}
minDiff=diff;}else{if(this.resolutions[i]<resolution){break;}}}
zoom=Math.max(0,i-1);}
return zoom;},getLonLatFromViewPortPx:function(viewPortPx){var lonlat=null;if(viewPortPx!=null){var size=this.map.getSize();var center=this.map.getCenter();if(center){var res=this.map.getResolution();var delta_x=viewPortPx.x-(size.w/2);var delta_y=viewPortPx.y-(size.h/2);lonlat=new OpenLayers.LonLat(center.lon+delta_x*res,center.lat-delta_y*res);if(this.wrapDateLine){lonlat=lonlat.wrapDateLine(this.maxExtent);}}}
return lonlat;},getViewPortPxFromLonLat:function(lonlat){var px=null;if(lonlat!=null){var resolution=this.map.getResolution();var extent=this.map.getExtent();px=new OpenLayers.Pixel((1/resolution*(lonlat.lon-extent.left)),(1/resolution*(extent.top-lonlat.lat)));}
return px;},setOpacity:function(opacity){if(opacity!=this.opacity){this.opacity=opacity;for(var i=0,len=this.div.childNodes.length;i<len;++i){var element=this.div.childNodes[i].firstChild;OpenLayers.Util.modifyDOMElement(element,null,null,null,null,null,null,opacity);}
if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"opacity"});}}},getZIndex:function(){return this.div.style.zIndex;},setZIndex:function(zIndex){this.div.style.zIndex=zIndex;},adjustBounds:function(bounds){if(this.gutter){var mapGutter=this.gutter*this.map.getResolution();bounds=new OpenLayers.Bounds(bounds.left-mapGutter,bounds.bottom-mapGutter,bounds.right+mapGutter,bounds.top+mapGutter);}
if(this.wrapDateLine){var wrappingOptions={'rightTolerance':this.getResolution()};bounds=bounds.wrapDateLine(this.maxExtent,wrappingOptions);}
return bounds;},CLASS_NAME:"OpenLayers.Layer"});OpenLayers.Layer.HTTPRequest=OpenLayers.Class(OpenLayers.Layer,{URL_HASH_FACTOR:(Math.sqrt(5)-1)/2,url:null,params:null,reproject:false,initialize:function(name,url,params,options){var newArguments=arguments;newArguments=[name,options];OpenLayers.Layer.prototype.initialize.apply(this,newArguments);this.url=url;this.params=OpenLayers.Util.extend({},params);},destroy:function(){this.url=null;this.params=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.HTTPRequest(this.name,this.url,this.params,this.getOptions());}
obj=OpenLayers.Layer.prototype.clone.apply(this,[obj]);return obj;},setUrl:function(newUrl){this.url=newUrl;},mergeNewParams:function(newParams){this.params=OpenLayers.Util.extend(this.params,newParams);var ret=this.redraw();if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"params"});}
return ret;},redraw:function(force){if(force){return this.mergeNewParams({"_olSalt":Math.random()});}else{return OpenLayers.Layer.prototype.redraw.apply(this,[]);}},selectUrl:function(paramString,urls){var product=1;for(var i=0,len=paramString.length;i<len;i++){product*=paramString.charCodeAt(i)*this.URL_HASH_FACTOR;product-=Math.floor(product);}
return urls[Math.floor(product*urls.length)];},getFullRequestString:function(newParams,altUrl){var url=altUrl||this.url;var allParams=OpenLayers.Util.extend({},this.params);allParams=OpenLayers.Util.extend(allParams,newParams);var paramsString=OpenLayers.Util.getParameterString(allParams);if(url instanceof Array){url=this.selectUrl(paramsString,url);}
var urlParams=OpenLayers.Util.upperCaseObject(OpenLayers.Util.getParameters(url));for(var key in allParams){if(key.toUpperCase()in urlParams){delete allParams[key];}}
paramsString=OpenLayers.Util.getParameterString(allParams);return OpenLayers.Util.urlAppend(url,paramsString);},CLASS_NAME:"OpenLayers.Layer.HTTPRequest"});OpenLayers.Layer.Grid=OpenLayers.Class(OpenLayers.Layer.HTTPRequest,{tileSize:null,grid:null,singleTile:false,ratio:1.5,buffer:2,numLoadingTiles:0,initialize:function(name,url,params,options){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 iRow=0,len=this.grid.length;iRow<len;iRow++){var row=this.grid[iRow];for(var iCol=0,clen=row.length;iCol<clen;iCol++){var tile=row[iCol];this.removeTileMonitoringHooks(tile);tile.destroy();}}
this.grid=[];}},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.Grid(this.name,this.url,this.params,this.getOptions());}
obj=OpenLayers.Layer.HTTPRequest.prototype.clone.apply(this,[obj]);if(this.tileSize!=null){obj.tileSize=this.tileSize.clone();}
obj.grid=[];return obj;},moveTo:function(bounds,zoomChanged,dragging){OpenLayers.Layer.HTTPRequest.prototype.moveTo.apply(this,arguments);bounds=bounds||this.map.getExtent();if(bounds!=null){var forceReTile=!this.grid.length||zoomChanged;var tilesBounds=this.getTilesBounds();if(this.singleTile){if(forceReTile||(!dragging&&!tilesBounds.containsBounds(bounds))){this.initSingleTile(bounds);}}else{if(forceReTile||!tilesBounds.containsBounds(bounds,true)){this.initGriddedTiles(bounds);}else{this.moveGriddedTiles(bounds);}}}},setTileSize:function(size){if(this.singleTile){size=this.map.getSize().clone();size.h=parseInt(size.h*this.ratio);size.w=parseInt(size.w*this.ratio);}
OpenLayers.Layer.HTTPRequest.prototype.setTileSize.apply(this,[size]);},getGridBounds:function(){var msg="The getGridBounds() function is deprecated. It will be "+"removed in 3.0. Please use getTilesBounds() instead.";OpenLayers.Console.warn(msg);return this.getTilesBounds();},getTilesBounds:function(){var bounds=null;if(this.grid.length){var bottom=this.grid.length-1;var bottomLeftTile=this.grid[bottom][0];var right=this.grid[0].length-1;var topRightTile=this.grid[0][right];bounds=new OpenLayers.Bounds(bottomLeftTile.bounds.left,bottomLeftTile.bounds.bottom,topRightTile.bounds.right,topRightTile.bounds.top);}
return bounds;},initSingleTile:function(bounds){var center=bounds.getCenterLonLat();var tileWidth=bounds.getWidth()*this.ratio;var tileHeight=bounds.getHeight()*this.ratio;var tileBounds=new OpenLayers.Bounds(center.lon-(tileWidth/2),center.lat-(tileHeight/2),center.lon+(tileWidth/2),center.lat+(tileHeight/2));var ul=new OpenLayers.LonLat(tileBounds.left,tileBounds.top);var px=this.map.getLayerPxFromLonLat(ul);if(!this.grid.length){this.grid[0]=[];}
var tile=this.grid[0][0];if(!tile){tile=this.addTile(tileBounds,px);this.addTileMonitoringHooks(tile);tile.draw();this.grid[0][0]=tile;}else{tile.moveTo(tileBounds,px);}
this.removeExcessTiles(1,1);},calculateGridLayout:function(bounds,extent,resolution){var tilelon=resolution*this.tileSize.w;var tilelat=resolution*this.tileSize.h;var offsetlon=bounds.left-extent.left;var tilecol=Math.floor(offsetlon/tilelon)-this.buffer;var tilecolremain=offsetlon/tilelon-tilecol;var tileoffsetx=-tilecolremain*this.tileSize.w;var tileoffsetlon=extent.left+tilecol*tilelon;var offsetlat=bounds.top-(extent.bottom+tilelat);var tilerow=Math.ceil(offsetlat/tilelat)+this.buffer;var tilerowremain=tilerow-offsetlat/tilelat;var tileoffsety=-tilerowremain*this.tileSize.h;var tileoffsetlat=extent.bottom+tilerow*tilelat;return{tilelon:tilelon,tilelat:tilelat,tileoffsetlon:tileoffsetlon,tileoffsetlat:tileoffsetlat,tileoffsetx:tileoffsetx,tileoffsety:tileoffsety};},initGriddedTiles:function(bounds){var viewSize=this.map.getSize();var minRows=Math.ceil(viewSize.h/this.tileSize.h)+
Math.max(1,2*this.buffer);var minCols=Math.ceil(viewSize.w/this.tileSize.w)+
Math.max(1,2*this.buffer);var extent=this.maxExtent;var resolution=this.map.getResolution();var tileLayout=this.calculateGridLayout(bounds,extent,resolution);var tileoffsetx=Math.round(tileLayout.tileoffsetx);var tileoffsety=Math.round(tileLayout.tileoffsety);var tileoffsetlon=tileLayout.tileoffsetlon;var tileoffsetlat=tileLayout.tileoffsetlat;var tilelon=tileLayout.tilelon;var tilelat=tileLayout.tilelat;this.origin=new OpenLayers.Pixel(tileoffsetx,tileoffsety);var startX=tileoffsetx;var startLon=tileoffsetlon;var rowidx=0;var layerContainerDivLeft=parseInt(this.map.layerContainerDiv.style.left);var layerContainerDivTop=parseInt(this.map.layerContainerDiv.style.top);do{var row=this.grid[rowidx++];if(!row){row=[];this.grid.push(row);}
tileoffsetlon=startLon;tileoffsetx=startX;var colidx=0;do{var tileBounds=new OpenLayers.Bounds(tileoffsetlon,tileoffsetlat,tileoffsetlon+tilelon,tileoffsetlat+tilelat);var x=tileoffsetx;x-=layerContainerDivLeft;var y=tileoffsety;y-=layerContainerDivTop;var px=new OpenLayers.Pixel(x,y);var tile=row[colidx++];if(!tile){tile=this.addTile(tileBounds,px);this.addTileMonitoringHooks(tile);row.push(tile);}else{tile.moveTo(tileBounds,px,false);}
tileoffsetlon+=tilelon;tileoffsetx+=this.tileSize.w;}while((tileoffsetlon<=bounds.right+tilelon*this.buffer)||colidx<minCols);tileoffsetlat-=tilelat;tileoffsety+=this.tileSize.h;}while((tileoffsetlat>=bounds.bottom-tilelat*this.buffer)||rowidx<minRows);this.removeExcessTiles(rowidx,colidx);this.spiralTileLoad();},spiralTileLoad:function(){var tileQueue=[];var directions=["right","down","left","up"];var iRow=0;var iCell=-1;var direction=OpenLayers.Util.indexOf(directions,"right");var directionsTried=0;while(directionsTried<directions.length){var testRow=iRow;var testCell=iCell;switch(directions[direction]){case"right":testCell++;break;case"down":testRow++;break;case"left":testCell--;break;case"up":testRow--;break;}
var tile=null;if((testRow<this.grid.length)&&(testRow>=0)&&(testCell<this.grid[0].length)&&(testCell>=0)){tile=this.grid[testRow][testCell];}
if((tile!=null)&&(!tile.queued)){tileQueue.unshift(tile);tile.queued=true;directionsTried=0;iRow=testRow;iCell=testCell;}else{direction=(direction+1)%4;directionsTried++;}}
for(var i=0,len=tileQueue.length;i<len;i++){var tile=tileQueue[i];tile.draw();tile.queued=false;}},addTile:function(bounds,position){},addTileMonitoringHooks:function(tile){tile.onLoadStart=function(){if(this.numLoadingTiles==0){this.events.triggerEvent("loadstart");}
this.numLoadingTiles++;};tile.events.register("loadstart",this,tile.onLoadStart);tile.onLoadEnd=function(){this.numLoadingTiles--;this.events.triggerEvent("tileloaded");if(this.numLoadingTiles==0){this.events.triggerEvent("loadend");}};tile.events.register("loadend",this,tile.onLoadEnd);tile.events.register("unload",this,tile.onLoadEnd);},removeTileMonitoringHooks:function(tile){tile.unload();tile.events.un({"loadstart":tile.onLoadStart,"loadend":tile.onLoadEnd,"unload":tile.onLoadEnd,scope:this});},moveGriddedTiles:function(bounds){var buffer=this.buffer||1;while(true){var tlLayer=this.grid[0][0].position;var tlViewPort=this.map.getViewPortPxFromLayerPx(tlLayer);if(tlViewPort.x>-this.tileSize.w*(buffer-1)){this.shiftColumn(true);}else if(tlViewPort.x<-this.tileSize.w*buffer){this.shiftColumn(false);}else if(tlViewPort.y>-this.tileSize.h*(buffer-1)){this.shiftRow(true);}else if(tlViewPort.y<-this.tileSize.h*buffer){this.shiftRow(false);}else{break;}};},shiftRow:function(prepend){var modelRowIndex=(prepend)?0:(this.grid.length-1);var grid=this.grid;var modelRow=grid[modelRowIndex];var resolution=this.map.getResolution();var deltaY=(prepend)?-this.tileSize.h:this.tileSize.h;var deltaLat=resolution*-deltaY;var row=(prepend)?grid.pop():grid.shift();for(var i=0,len=modelRow.length;i<len;i++){var modelTile=modelRow[i];var bounds=modelTile.bounds.clone();var position=modelTile.position.clone();bounds.bottom=bounds.bottom+deltaLat;bounds.top=bounds.top+deltaLat;position.y=position.y+deltaY;row[i].moveTo(bounds,position);}
if(prepend){grid.unshift(row);}else{grid.push(row);}},shiftColumn:function(prepend){var deltaX=(prepend)?-this.tileSize.w:this.tileSize.w;var resolution=this.map.getResolution();var deltaLon=resolution*deltaX;for(var i=0,len=this.grid.length;i<len;i++){var row=this.grid[i];var modelTileIndex=(prepend)?0:(row.length-1);var modelTile=row[modelTileIndex];var bounds=modelTile.bounds.clone();var position=modelTile.position.clone();bounds.left=bounds.left+deltaLon;bounds.right=bounds.right+deltaLon;position.x=position.x+deltaX;var tile=prepend?this.grid[i].pop():this.grid[i].shift();tile.moveTo(bounds,position);if(prepend){row.unshift(tile);}else{row.push(tile);}}},removeExcessTiles:function(rows,columns){while(this.grid.length>rows){var row=this.grid.pop();for(var i=0,l=row.length;i<l;i++){var tile=row[i];this.removeTileMonitoringHooks(tile);tile.destroy();}}
while(this.grid[0].length>columns){for(var i=0,l=this.grid.length;i<l;i++){var row=this.grid[i];var tile=row.pop();this.removeTileMonitoringHooks(tile);tile.destroy();}}},onMapResize:function(){if(this.singleTile){this.clearGrid();this.setTileSize();}},getTileBounds:function(viewPortPx){var maxExtent=this.maxExtent;var resolution=this.getResolution();var tileMapWidth=resolution*this.tileSize.w;var tileMapHeight=resolution*this.tileSize.h;var mapPoint=this.getLonLatFromViewPortPx(viewPortPx);var tileLeft=maxExtent.left+(tileMapWidth*Math.floor((mapPoint.lon-
maxExtent.left)/tileMapWidth));var tileBottom=maxExtent.bottom+(tileMapHeight*Math.floor((mapPoint.lat-
maxExtent.bottom)/tileMapHeight));return new OpenLayers.Bounds(tileLeft,tileBottom,tileLeft+tileMapWidth,tileBottom+tileMapHeight);},CLASS_NAME:"OpenLayers.Layer.Grid"});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(layer,position,bounds,url,size){this.layer=layer;this.position=position.clone();this.bounds=bounds.clone();this.url=url;this.size=size.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(obj){if(obj==null){obj=new OpenLayers.Tile(this.layer,this.position,this.bounds,this.url,this.size);}
OpenLayers.Util.applyDefaults(obj,this);return obj;},draw:function(){var maxExtent=this.layer.maxExtent;var withinMaxExtent=(maxExtent&&this.bounds.intersectsBounds(maxExtent,false));this.shouldDraw=(withinMaxExtent||this.layer.displayOutsideMaxExtent);this.clear();return this.shouldDraw;},moveTo:function(bounds,position,redraw){if(redraw==null){redraw=true;}
this.bounds=bounds.clone();this.position=position.clone();if(redraw){this.draw();}},clear:function(){},getBoundsFromBaseLayer:function(position){var msg=OpenLayers.i18n('reprojectDeprecated',{'layerName':this.layer.name});OpenLayers.Console.warn(msg);var topLeft=this.layer.map.getLonLatFromLayerPx(position);var bottomRightPx=position.clone();bottomRightPx.x+=this.size.w;bottomRightPx.y+=this.size.h;var bottomRight=this.layer.map.getLonLatFromLayerPx(bottomRightPx);if(topLeft.lon>bottomRight.lon){if(topLeft.lon<0){topLeft.lon=-180-(topLeft.lon+180);}else{bottomRight.lon=180+bottomRight.lon+180;}}
var bounds=new OpenLayers.Bounds(topLeft.lon,bottomRight.lat,bottomRight.lon,topLeft.lat);return bounds;},showTile:function(){if(this.shouldDraw){this.show();}},show:function(){},hide:function(){},CLASS_NAME:"OpenLayers.Tile"});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(layer,position,bounds,url,size){OpenLayers.Tile.prototype.initialize.apply(this,arguments);this.url=url;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(obj){if(obj==null){obj=new OpenLayers.Tile.Image(this.layer,this.position,this.bounds,this.url,this.size);}
obj=OpenLayers.Tile.prototype.clone.apply(this,[obj]);obj.imgDiv=null;return obj;},draw:function(){if(this.layer!=this.layer.map.baseLayer&&this.layer.reproject){this.bounds=this.getBoundsFromBaseLayer(this.position);}
var drawTile=OpenLayers.Tile.prototype.draw.apply(this,arguments);if(OpenLayers.Util.indexOf(this.layer.SUPPORTED_TRANSITIONS,this.layer.transitionEffect)!=-1){if(drawTile){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(drawTile&&this.isFirstDraw){this.events.register('loadend',this,this.showTile);this.isFirstDraw=false;}}
if(!drawTile){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 maxExtent=this.layer.maxExtent;var withinMaxExtent=(maxExtent&&this.bounds.intersectsBounds(maxExtent,false));if(withinMaxExtent){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 imageSize=this.layer.getImageSize(this.bounds);if(this.layerAlphaHack){OpenLayers.Util.modifyAlphaImageDiv(this.imgDiv,null,null,imageSize,this.url);}else{OpenLayers.Util.modifyDOMElement(this.imgDiv,null,null,imageSize);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 offset=this.layer.imageOffset;var size=this.layer.getImageSize(this.bounds);if(this.layerAlphaHack){this.imgDiv=OpenLayers.Util.createAlphaImageDiv(null,offset,size,null,"relative",null,null,null,true);}else{this.imgDiv=OpenLayers.Util.createImage(null,offset,size,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 onload=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(onload,this));}else{OpenLayers.Event.observe(this.imgDiv,'load',OpenLayers.Function.bind(onload,this));}
var onerror=function(){if(this.imgDiv._attempts>OpenLayers.IMAGE_RELOAD_ATTEMPTS){onload.call(this);}};OpenLayers.Event.observe(this.imgDiv,"error",OpenLayers.Function.bind(onerror,this));},checkImgURL:function(){if(this.layer){var loaded=this.layerAlphaHack?this.imgDiv.firstChild.src:this.imgDiv.src;if(!OpenLayers.Util.isEquivalentUrl(loaded,this.url)){this.hide();}}},startTransition:function(){if(!this.backBufferTile||!this.backBufferTile.imgDiv){return;}
var ratio=1;if(this.backBufferTile.resolution){ratio=this.backBufferTile.resolution/this.layer.getResolution();}
if(ratio!=this.lastRatio){if(this.layer.transitionEffect=='resize'){var upperLeft=new OpenLayers.LonLat(this.backBufferTile.bounds.left,this.backBufferTile.bounds.top);var size=new OpenLayers.Size(this.backBufferTile.size.w*ratio,this.backBufferTile.size.h*ratio);var px=this.layer.map.getLayerPxFromLonLat(upperLeft);OpenLayers.Util.modifyDOMElement(this.backBufferTile.frame,null,px,size);var imageSize=this.backBufferTile.imageSize;imageSize=new OpenLayers.Size(imageSize.w*ratio,imageSize.h*ratio);var imageOffset=this.backBufferTile.imageOffset;if(imageOffset){imageOffset=new OpenLayers.Pixel(imageOffset.x*ratio,imageOffset.y*ratio);}
OpenLayers.Util.modifyDOMElement(this.backBufferTile.imgDiv,null,imageOffset,imageSize);this.backBufferTile.show();}}else{if(this.layer.singleTile){this.backBufferTile.show();}else{this.backBufferTile.hide();}}
this.lastRatio=ratio;},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.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'],initialize:function(name,url,params,options){var newArguments=[];params=OpenLayers.Util.upperCaseObject(params);newArguments.push(name,url,params,options);OpenLayers.Layer.Grid.prototype.initialize.apply(this,newArguments);OpenLayers.Util.applyDefaults(this.params,OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS));if(!this.noMagic&&this.params.TRANSPARENT&&this.params.TRANSPARENT.toString().toLowerCase()=="true"){if((options==null)||(!options.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(obj){if(obj==null){obj=new OpenLayers.Layer.WMS(this.name,this.url,this.params,this.getOptions());}
obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);return obj;},reverseAxisOrder:function(){return(parseFloat(this.params.VERSION)>=1.3&&OpenLayers.Util.indexOf(this.yx,this.map.getProjectionObject().getCode())!==-1)},getURL:function(bounds){bounds=this.adjustBounds(bounds);var imageSize=this.getImageSize();var newParams={};var reverseAxisOrder=this.reverseAxisOrder();newParams.BBOX=this.encodeBBOX?bounds.toBBOX(null,reverseAxisOrder):bounds.toArray(reverseAxisOrder);newParams.WIDTH=imageSize.w;newParams.HEIGHT=imageSize.h;var requestString=this.getFullRequestString(newParams);return requestString;},addTile:function(bounds,position){return new OpenLayers.Tile.Image(this,position,bounds,null,this.tileSize);},mergeNewParams:function(newParams){var upperParams=OpenLayers.Util.upperCaseObject(newParams);var newArguments=[upperParams];return OpenLayers.Layer.Grid.prototype.mergeNewParams.apply(this,newArguments);},getFullRequestString:function(newParams,altUrl){var projectionCode=this.map.getProjection();var value=(projectionCode=="none")?null:projectionCode
if(parseFloat(this.params.VERSION)>=1.3){this.params.CRS=value;}else{this.params.SRS=value;}
return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,arguments);},CLASS_NAME:"OpenLayers.Layer.WMS"});OpenLayers.Layer.WMS.Untiled=OpenLayers.Class(OpenLayers.Layer.WMS,{singleTile:true,initialize:function(name,url,params,options){OpenLayers.Layer.WMS.prototype.initialize.apply(this,arguments);var msg="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(msg);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.WMS.Untiled(this.name,this.url,this.params,this.getOptions());}
obj=OpenLayers.Layer.WMS.prototype.clone.apply(this,[obj]);return obj;},CLASS_NAME:"OpenLayers.Layer.WMS.Untiled"});OpenLayers.Layer.MapServer=OpenLayers.Class(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{mode:"map",map_imagetype:"png"},initialize:function(name,url,params,options){var newArguments=[];newArguments.push(name,url,params,options);OpenLayers.Layer.Grid.prototype.initialize.apply(this,newArguments);this.params=OpenLayers.Util.applyDefaults(this.params,this.DEFAULT_PARAMS);if(options==null||options.isBaseLayer==null){this.isBaseLayer=((this.params.transparent!="true")&&(this.params.transparent!=true));}},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.MapServer(this.name,this.url,this.params,this.getOptions());}
obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);return obj;},addTile:function(bounds,position){return new OpenLayers.Tile.Image(this,position,bounds,null,this.tileSize);},getURL:function(bounds){bounds=this.adjustBounds(bounds);var extent=[bounds.left,bounds.bottom,bounds.right,bounds.top];var imageSize=this.getImageSize();var url=this.getFullRequestString({mapext:extent,imgext:extent,map_size:[imageSize.w,imageSize.h],imgx:imageSize.w/2,imgy:imageSize.h/2,imgxy:[imageSize.w,imageSize.h]});return url;},getFullRequestString:function(newParams,altUrl){var url=(altUrl==null)?this.url:altUrl;var allParams=OpenLayers.Util.extend({},this.params);allParams=OpenLayers.Util.extend(allParams,newParams);var paramsString=OpenLayers.Util.getParameterString(allParams);if(url instanceof Array){url=this.selectUrl(paramsString,url);}
var urlParams=OpenLayers.Util.upperCaseObject(OpenLayers.Util.getParameters(url));for(var key in allParams){if(key.toUpperCase()in urlParams){delete allParams[key];}}
paramsString=OpenLayers.Util.getParameterString(allParams);var requestString=url;paramsString=paramsString.replace(/,/g,"+");if(paramsString!=""){var lastServerChar=url.charAt(url.length-1);if((lastServerChar=="&")||(lastServerChar=="?")){requestString+=paramsString;}else{if(url.indexOf('?')==-1){requestString+='?'+paramsString;}else{requestString+='&'+paramsString;}}}
return requestString;},CLASS_NAME:"OpenLayers.Layer.MapServer"});Ext.namespace('mapfish.widgets');mapfish.widgets.RadioTreeNodeUI=Ext.extend(Ext.tree.TreeNodeUI,{renderElements:function(n,a,targetNode,bulkRender){this.indentMarkup=n.parentNode?n.parentNode.ui.getChildIndent():'';var cb=typeof a.checked=='boolean';var radioGrp=n.attributes.radioGrp||"radioGrp";var href=a.href?a.href:Ext.isGecko?"":"#";var buf=['<li class="x-tree-node"><div ext:tree-node-id="',n.id,'" class="x-tree-node-el x-tree-node-leaf x-unselectable ',a.cls,'" unselectable="on">','<span class="x-tree-node-indent">',this.indentMarkup,"</span>",'<img src="',this.emptyIcon,'" class="x-tree-ec-icon x-tree-elbow" />','<img src="',a.icon||this.emptyIcon,'" class="x-tree-node-icon',(a.icon?" x-tree-node-inline-icon":""),(a.iconCls?" "+a.iconCls:""),'" unselectable="on" />',cb?('<input class="x-tree-node-cb" type="radio" id="'+n.id+'" name="'+radioGrp+'" '+(a.checked?'checked="checked" />':'/>')):'','<a hidefocus="on" class="x-tree-node-anchor" href="',href,'" tabIndex="1" ',a.hrefTarget?' target="'+a.hrefTarget+'"':"",'><span unselectable="on">',n.text,"</span></a></div>",'<ul class="x-tree-node-ct" style="display:none;"></ul>',"</li>"].join('');var nel;if(bulkRender!==true&&n.nextSibling&&(nel=n.nextSibling.ui.getEl())){this.wrap=Ext.DomHelper.insertHtml("beforeBegin",nel,buf);}else{this.wrap=Ext.DomHelper.insertHtml("beforeEnd",targetNode,buf);}
this.elNode=this.wrap.childNodes[0];this.ctNode=this.wrap.childNodes[1];var cs=this.elNode.childNodes;this.indentNode=cs[0];this.ecNode=cs[1];this.iconNode=cs[2];var index=3;if(cb){this.checkbox=cs[3];index++;}
this.anchor=cs[index];this.textNode=cs[index].firstChild;},_unused_renderElements:function(n,a,targetNode,bulkRender){mapfish.widgets.RadioTreeNodeUI.superclass.renderElements.apply(this,arguments);var cbNode=Ext.DomQuery.selectNode(".x-tree-node-cb",this.elNode);var radioGrp=n.attributes.radioGrp||"radioGrp";cbNode.setAttribute("type","radio");cbNode.setAttribute("id",n.id);cbNode.setAttribute("name",radioGrp);},onRadioChange:function(){var checked=this.checkbox.checked;this.node.attributes.checked=checked;this.fireEvent('radiochange',this.node,checked);}});mapfish.widgets.LayerTreeEventModel=Ext.extend(Ext.tree.TreeEventModel,{delegateClick:function(e,t){if(!this.beforeEvent(e)){return;}
if(e.getTarget('input[type=checkbox]',1)){this.onCheckboxClick(e,this.getNode(e));}
else if(e.getTarget('input[type=radio]',1)){this.onRadioClick(e,this.getNode(e));}
else if(e.getTarget('.x-tree-ec-icon',1)){this.onIconClick(e,this.getNode(e));}
else if(this.getNodeTarget(e)){this.onNodeClick(e,this.getNode(e));}},onRadioClick:function(e,node){if(!node.ui.onRadioChange){OpenLayers.Console.error("Invalid TreeNodeUI Class, no "+"onRadioChange is available");return;}
node.ui.onRadioChange(e);}});mapfish.widgets.LayerTree=function(config){Ext.apply(this,config);mapfish.widgets.LayerTree.superclass.constructor.call(this);};Ext.extend(mapfish.widgets.LayerTree,Ext.tree.TreePanel,{separator:":",model:null,showWmsLegend:false,rootVisible:false,animate:true,autoScroll:true,loader:new Ext.tree.TreeLoader({}),enableDD:false,containerScroll:true,ascending:true,_automaticModel:true,layerNameToLayer:{},baseLayerNames:[],layersWithSublayers:{},layerToNodeIds:{},nodeIdToNode:{},nodeIdToLayers:{},hasCheckbox:function(node){return typeof(node.attributes.checked)=="boolean";},setNodeChecked:function(nodeOrId,checked,fireEvent){var node=(nodeOrId instanceof Ext.data.Node)?nodeOrId:this.getNodeById(nodeOrId);if(!node||!this.hasCheckbox(node)){return;}
if(checked===undefined){checked=!node.attributes.checked;}
node.attributes.checked=checked;if(node.ui&&node.ui.checkbox){node.ui.checkbox.checked=checked;}
if(fireEvent||(fireEvent===undefined)){node.fireEvent('checkchange',node,checked);}},_updateCachedObjects:function(){if(!this.map){OpenLayers.Console.error("map Object needs to be available when "+"calling _updateCachedObjects");return;}
this.layerNameToLayer={};this.baseLayerNames=[];this.layersWithSublayers={};this.layerToNodeIds={};this.nodeIdToNode={};this.nodeIdToLayers={};Ext.each(this.map.layers,function(layer){var name=layer.name;this.layerNameToLayer[name]=layer;if(layer.isBaseLayer)
this.baseLayerNames.push(name);},this);this.getRootNode().cascade(function(node){if(!node.attributes.layerNames)
return true;var layerNames=node.attributes.layerNames;for(var i=0;i<layerNames.length;i++){var name=layerNames[i];if(name.indexOf(this.separator)!=-1){var name=name.split(this.separator)[0];this.layersWithSublayers[name]=true;}
if(!this.nodeIdToLayers[node.id])
this.nodeIdToLayers[node.id]=[];this.nodeIdToLayers[node.id].push(this.layerNameToLayer[name]);}},this);this.getRootNode().cascade(function(node){var checked=node.attributes.checked;var layerNames=node.attributes.layerNames;if(!layerNames)
return;for(var i=0;i<layerNames.length;i++){var layerName=layerNames[i];if(!layerName)
continue;if(!this.layerToNodeIds[layerName])
this.layerToNodeIds[layerName]=[];this.layerToNodeIds[layerName].push(node.id);this.nodeIdToNode[node.id]=node;}},this);},_updateCheckboxAncestors:function(){var unvisitedNodeIds={};var tree=this;function updateNodeCheckbox(node){if(!tree.hasCheckbox(node)){throw new Error(arguments.callee.name+" should only be called on checkbox nodes");}
var checkboxChildren=[];node.eachChild(function(child){if(tree.hasCheckbox(child))
checkboxChildren.push(child);},this);if(checkboxChildren.length==0){return node.attributes.checked;}
var allChecked=true;Ext.each(checkboxChildren,function(child){if(!updateNodeCheckbox(child)){allChecked=false;return false;}},this);tree.setNodeChecked(node,allChecked,false);delete unvisitedNodeIds[node.id];return allChecked;}
var checkboxNodes=[];this.getRootNode().cascade(function(node){if(this.hasCheckbox(node)){checkboxNodes.push(node);unvisitedNodeIds[node.id]=true;}},this);var node;while(node=checkboxNodes.shift()){if(unvisitedNodeIds[node.id])
updateNodeCheckbox(node);}},_handleModelChange:function LT__handleModelChange(clickedNode,checked){if(clickedNode){clickedNode.cascade(function(node){this.setNodeChecked(node,checked,false);},this);}
this._updateCheckboxAncestors();if(!this.map){return;}
this._updateCachedObjects();function getVisibilityFromMap(){var layerVisibility={};Ext.each(this.map.layers,function(layer){var name=layer.name;layerVisibility[name]=layer.visibility;if(!(layer instanceof OpenLayers.Layer.WMS)&&!(layer instanceof OpenLayers.Layer.WMS.Untiled)&&!(layer instanceof OpenLayers.Layer.MapServer))
{return;}
if(!this.layersWithSublayers[layer.name])
return;if(layer.isBaseLayer){OpenLayers.Console.error("Using sublayers on a base layer "+"is not supported (base layer is "+
name+")");}
if(!layer._origLayers){layer._origLayers=layer.params.LAYERS||layer.params.layers;}
var sublayers=layer._origLayers;if(sublayers instanceof Array){for(var j=0;j<sublayers.length;j++){var sublayer=sublayers[j];layerVisibility[name+this.separator+sublayer]=layer.visibility;}}},this);return layerVisibility;}
function updateVisibilityFromTree(layerVisibility){var forcedVisibility={};this.getRootNode().cascade(function(node){var checked=node.attributes.checked;var layerNames=node.attributes.layerNames;var radioGrp=null;if(!layerNames)
return;for(var i=0;i<layerNames.length;i++){var layerName=layerNames[i];if(!layerName)
continue;if(layerVisibility[layerName]==undefined)
OpenLayers.Console.error("Invalid layer: ",layerName);if(node.attributes.radio){radioGrp=node.attributes.radioGrp||"radioGrp";if(!radioButton[radioGrp])
radioButton[radioGrp]={};radioButton[radioGrp][layerName]=checked;}
if(forcedVisibility[layerName])
continue;if(node==clickedNode){if(this.baseLayerNames.indexOf(layerName)!=-1){clickedBaseLayer=layerName;}
if(radioGrp){clickedRadioButton[0]=radioGrp;clickedRadioButton[1]=layerName;}
forcedVisibility[layerName]=true;}
layerVisibility[layerName]=checked;}},this);return layerVisibility;}
function applyBaseLayerRestriction(layerVisibility,clickedBaseLayer,currentBaseLayerName){var numBaseLayer=0;for(var i=0;i<this.baseLayerNames.length;i++){if(layerVisibility[this.baseLayerNames[i]])
numBaseLayer++;}
if(numBaseLayer==1)
return layerVisibility;for(var i=0;i<this.baseLayerNames.length;i++){layerVisibility[this.baseLayerNames[i]]=false;}
if(clickedBaseLayer){layerVisibility[clickedBaseLayer]=true;return layerVisibility;}
if(!currentBaseLayerName)
return layerVisibility;layerVisibility[currentBaseLayerName]=true;return layerVisibility;}
function applyRadioButtonRestriction(layerVisibility,clickedRadioButton,radioButton){for(var radioGrp in radioButton){for(var layerName in radioButton[radioGrp]){if(clickedRadioButton[0]==radioGrp){layerVisibility[layerName]=layerName==clickedRadioButton[1];}else{layerVisibility[layerName]=radioButton[radioGrp][layerName];}}}
return layerVisibility;}
function updateTreeFromVisibility(layerVisibility){for(var layerName in layerVisibility){var nodeIds=this.layerToNodeIds[layerName];if(!nodeIds)
continue;for(var i=0;i<nodeIds.length;i++){var node=this.nodeIdToNode[nodeIds[i]];if(!node)
continue;var layerNames=node.attributes.layerNames;if(!layerNames){OpenLayers.Console.error("unexpected state");continue;}
var allChecked=true;for(var j=0;j<layerNames.length;j++){var layerName=layerNames[j];if(!layerName)
continue;if(!layerVisibility[layerName]){allChecked=false;break;}}
this.setNodeChecked(node,allChecked,false);}}}
function updateMapFromVisibility(layerVisibility){var wmsLayers={};for(var layerName in layerVisibility){var visible=layerVisibility[layerName];var splitName=layerName.split(this.separator);if(splitName.length!=2)
continue;delete layerVisibility[layerName];layerName=splitName[0];var sublayerName=splitName[1];if(!wmsLayers[layerName]){wmsLayers[layerName]=[];}
if(visible){wmsLayers[layerName].push(sublayerName);}}
for(layerName in wmsLayers){if(layerVisibility[layerName]!==undefined)
delete layerVisibility[layerName];}
for(var layerName in layerVisibility){var layer=this.layerNameToLayer[layerName];if(!layer){OpenLayers.Console.error("Non existing layer name",layerName);continue;}
if(this.baseLayerNames.indexOf(layerName)!=-1){if(layerVisibility[layerName]){this.map.setBaseLayer(layer);}}else{layer.setVisibility(layerVisibility[layerName]);}}
for(var layerName in wmsLayers){var layer=this.layerNameToLayer[layerName];var sublayers=wmsLayers[layerName];if(layer.isBaseLayer){OpenLayers.Console.error("base layer for sublayer "+"are not supported");return;}
if(sublayers.length==0){layer.setVisibility(false,true);}else{if(!this.enableDD){if(!layer._origLayers){OpenLayers.Console.error("Assertion failure");}
var origLayers=layer._origLayers;var orderedLayers=[];for(var i=0;i<origLayers.length;i++){var l=origLayers[i];if(sublayers.indexOf(l)!=-1)
orderedLayers.push(l);}
sublayers=orderedLayers;}
var layerParamName=layer.params.LAYERS?"LAYERS":"layers";if(!mapfish.Util.arrayEqual(layer.params[layerParamName],sublayers)){var p={};p[layerParamName]=sublayers;layer.mergeNewParams(p);}
layer.setVisibility(true,true);}}}
var currentBaseLayerName;if(this.map.baseLayer)
currentBaseLayerName=this.map.baseLayer.name;var clickedBaseLayer;var radioButton={};var clickedRadioButton=[];var layerVisibility=getVisibilityFromMap.call(this);layerVisibility=updateVisibilityFromTree.call(this,layerVisibility);applyBaseLayerRestriction.call(this,layerVisibility,clickedBaseLayer,currentBaseLayerName);applyRadioButtonRestriction.call(this,layerVisibility,clickedRadioButton,radioButton);updateTreeFromVisibility.call(this,layerVisibility);updateMapFromVisibility.call(this,layerVisibility);},_extractOLModel:function LT__extractOLModel(){var layers=[];var layersArray=this.map.layers.slice();if(!this.ascending){layersArray.reverse();}
for(var i=0;i<layersArray.length;i++){var l=layersArray[i];var wmsChildren=[];if(l instanceof OpenLayers.Layer.WMS||l instanceof OpenLayers.Layer.WMS.Untiled||l instanceof OpenLayers.Layer.MapServer){var sublayers=l.params.LAYERS||l.params.layers;if(sublayers instanceof Array){for(var j=0;j<sublayers.length;j++){var w=sublayers[j];var iconUrl;if(this.showWmsLegend){iconUrl=mapfish.Util.getIconUrl(l.url,{layer:w});}
var wmsChild={text:w,checked:l.getVisibility(),icon:iconUrl,layerName:l.name+this.separator+w,children:[],cls:"cf-wms-node"};if(this.ascending){wmsChildren.push(wmsChild);}else{wmsChildren.unshift(wmsChild);}}}}
var info={text:l.name,checked:l.getVisibility(),layerName:(wmsChildren.length>0?null:l.name),children:wmsChildren};if(!l.displayInLayerSwitcher){info.uiProvider=function(){};info.hidden=true;info.uiProvider.prototype={render:function(){},renderIndent:function(){},updateExpandIcon:function(){}};}
layers.push(info);}
return layers;},_updateOrder:function(){this._updateCachedObjects();function layerIndex(layers,name){for(var i=0;i<layers.length;i++){var l=layers[i];if(l.name==name)
return i;}
return-1;}
var orderedLayers=this.map.layers.slice();var seenLayers={};var nodes=[];this.getRootNode().cascade(function(node){if(this.ascending)
nodes.push(node);else
nodes.unshift(node);},this);Ext.each(nodes,function(node){var layers=this.nodeIdToLayers[node.id];if(!layers)
return;Ext.each(layers,function(layer){var layerName=layer.name;if(seenLayers[layerName])
return;seenLayers[layerName]=true;var index=layerIndex(orderedLayers,layerName);if(index==-1||!this.layerNameToLayer[layerName]){throw new Error("Layer "+layerName+" not available");}
orderedLayers.splice(index,1);orderedLayers.push(this.layerNameToLayer[layerName]);},this);},this);this._updateCheckboxAncestors();this.map.layers=orderedLayers;for(var i=0;i<this.map.layers.length;i++){this.map.setLayerZIndex(this.map.layers[i],i);}},_fixupModel:function(){this.getRootNode().cascade(function(node){var attrs=node.attributes;if(!attrs.layerNames&&attrs.layerName){attrs.layerNames=[attrs.layerName];delete attrs.layerName;}},this);if(this.map)
this._updateCachedObjects();this.getRootNode().cascade(function(node){var layers;if(!node.attributes.radio&&(!this.map||!(layers=this.nodeIdToLayers[node.id])))
return;var isBaseLayer=false;var displayInLayerSwitcher=false;if(layers){isBaseLayer=true;Ext.each(layers,function(layer){if(!layer.isBaseLayer){isBaseLayer=false;}
if(layer.displayInLayerSwitcher){displayInLayerSwitcher=true;}},this);}else{displayInLayerSwitcher=true;}
if((isBaseLayer||node.attributes.radio)&&displayInLayerSwitcher){node.attributes.uiProvider=mapfish.widgets.RadioTreeNodeUI;if(node.ui)
node.ui=new mapfish.widgets.RadioTreeNodeUI(node);}},this);},initComponent:function(){this.eventModel=new mapfish.widgets.LayerTreeEventModel(this);mapfish.widgets.LayerTree.superclass.initComponent.call(this);this.addListener("checkchange",function checkChange(node,checked){this._handleModelChange(node,checked);},this);this.addListener("radiochange",function radioChange(node,checked){this._handleModelChange(node,checked);},this);this._automaticModel=!this.model;if(!this.model){this.model=this._extractOLModel();}
var root={text:'Root',draggable:false,id:'source',children:this.model,leaf:false};function buildTree(attributes){var node=new Ext.tree.TreeNode(attributes);var cs=attributes.children;node.leaf=!cs;if(!cs)
return node;for(var i=0;i<cs.length;i++){if(!cs[i]){continue;}
node.appendChild(buildTree(cs[i]));}
return node;}
var rootNode=buildTree(root);this.setRootNode(rootNode);this._fixupModel();if(this.enableDD){this.addListener("dragdrop",function(){this._updateOrder(arguments);},this);this.addListener('nodedragover',this.isDragAllowed,this);}
if(!this._automaticModel){this._handleModelChange(null,null);if(this.enableDD){this._updateOrder();}}},isDragAllowed:function(e){var draggedNode=e.data.node;var targetParentNode=e.target;if(e.point=="above"||e.point=="below"){targetParentNode=targetParentNode.parentNode;}
if(draggedNode.parentNode!=targetParentNode){return false;}
return true;},onRender:function(container,position){if(!this.el){this.el=document.createElement('div');}
mapfish.widgets.LayerTree.superclass.onRender.apply(this,arguments);}});Ext.reg('layertree',mapfish.widgets.LayerTree);mapfish.widgets.LayerTree.getNodeLayers=function(layerTree,node){var olLayers=[];node.cascade(function(subNode){var curLayers=layerTree.nodeIdToLayers[subNode.id];if(curLayers){olLayers=olLayers.concat(curLayers);}});return olLayers;};mapfish.widgets.LayerTree.removeNode=function(layerTree,node){node.cascade(function(subNode){if(subNode.attributes&&subNode.attributes.layerNames){var layerNames=subNode.attributes.layerNames;for(var i=0;i<layerNames.length;++i){var layerName=layerNames[i].split(layerTree.separator);var olLayer=layerTree.layerNameToLayer[layerName[0]];var wmsLayer=layerName[1];var layerList;if(olLayer.params.LAYERS){layerList=olLayer.params.LAYERS=mapfish.Util.fixArray(olLayer.params.LAYERS);}else{layerList=olLayer.params.layers=mapfish.Util.fixArray(olLayer.params.layers);}
if(wmsLayer&&layerList){layerList.remove(wmsLayer);}
if(!wmsLayer||!layerList||layerList.length==0){olLayer.destroy();}else{olLayer.redraw();}}}});var parent=node.parentNode;node.remove();while(parent){if(parent.hasChildNodes()){break;}
var cur=parent;parent=parent.parentNode;cur.remove();}
layerTree._updateCachedObjects();};mapfish.widgets.LayerTree.MenuFeatures={opacitySlide:function(layerTree,node,olLayers){if(olLayers.length==0)return null;return{text:OpenLayers.Lang.translate("mf.layertree.opacity"),menu:{plain:true,items:[mapfish.widgets.LayerTree.MenuFeatures.opacitySlideDirect(layerTree,node,olLayers)]}};},opacitySlideDirect:function(layerTree,node,olLayers){if(olLayers.length==0)return null;var value=0;for(var i=0;i<olLayers.length;++i){value+=olLayers[i].opacity==null?1.0:olLayers[i].opacity;}
value=value/olLayers.length;return new Ext.menu.Adapter(new Ext.Slider({width:200,value:value*100,listeners:{change:function(slider,value){for(var j=0;j<olLayers.length;++j){olLayers[j].setOpacity(value/100.0);}}}}));},remove:function(layerTree,node,olLayers){if(olLayers.length==0)return null;for(var i=0;i<olLayers.length;++i){var layer=olLayers[i];if(layer.isBaseLayer&&layer.getVisibility()){return null;}}
return{text:OpenLayers.Lang.translate('mf.layertree.remove'),handler:function(){mapfish.widgets.LayerTree.removeNode(layerTree,node);}};},zoomToExtent:function(layerTree,node,olLayers){if(olLayers.length==0)return null;var bbox=null;for(var i=0;i<olLayers.length;++i){var layer=olLayers[i];if(bbox){bbox.extend(layer.maxExtent);}else{bbox=layer.maxExtent.clone();}}
return{text:OpenLayers.Lang.translate('mf.layertree.zoomToExtent'),handler:function(){layerTree.map.zoomToExtent(bbox);}};}};mapfish.widgets.LayerTree.createContextualMenuPlugin=function(options){return{init:function(layerTree){function openMenu(node,e){var olLayers=mapfish.widgets.LayerTree.getNodeLayers(layerTree,node);var items=[];for(var j=0;j<options.length;++j){var constructor=mapfish.widgets.LayerTree.MenuFeatures[options[j]];var menuItem=constructor(layerTree,node,olLayers);if(menuItem){items.push(menuItem);}}
if(items.length>0){var menu=new Ext.menu.Menu({ignoreParentClick:true,defaults:{scope:layerTree},items:items});menu.showAt(e.getXY());menu.on('hide',function(){menu.destroy();});}}
if(Ext.isOpera){layerTree.on('click',function(node,e){if(e.hasModifier()){e.stopEvent();openMenu(node,e);}});}else{layerTree.on('contextMenu',function(node,e){e.stopEvent();openMenu(node,e);});}}};};mapfish.widgets.LayerTree.createDisableLayersPlugin=function(serverResolution){return{init:function(layertree){if(!layertree.map){return;}
layertree.map.events.on({zoomend:function(){function checkDisable(node,disable){if(disable){node.disable();}else{var scale=layertree.map.getScale();scale=scale*serverResolution/OpenLayers.DOTS_PER_INCH;if(scale<node.attributes.minScale||scale>node.attributes.maxScale){node.disable();disable=true;}else{node.enable();disable=false;}}
node.eachChild(function(child){checkDisable(child,disable);});}
checkDisable(layertree.root,false);}});}};};OpenLayers.Control.DrawFeature=OpenLayers.Class(OpenLayers.Control,{layer:null,callbacks:null,EVENT_TYPES:["featureadded"],multi:false,featureAdded:function(){},handlerOptions:null,initialize:function(layer,handler,options){this.EVENT_TYPES=OpenLayers.Control.DrawFeature.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);OpenLayers.Control.prototype.initialize.apply(this,[options]);this.callbacks=OpenLayers.Util.extend({done:this.drawFeature,modify:function(vertex,feature){this.layer.events.triggerEvent("sketchmodified",{vertex:vertex,feature:feature});},create:function(vertex,feature){this.layer.events.triggerEvent("sketchstarted",{vertex:vertex,feature:feature});}},this.callbacks);this.layer=layer;this.handlerOptions=this.handlerOptions||{};if(!("multi"in this.handlerOptions)){this.handlerOptions.multi=this.multi;}
var sketchStyle=this.layer.styleMap&&this.layer.styleMap.styles.temporary;if(sketchStyle){this.handlerOptions.layerOptions=OpenLayers.Util.applyDefaults(this.handlerOptions.layerOptions,{styleMap:new OpenLayers.StyleMap({"default":sketchStyle})});}
this.handler=new handler(this,this.callbacks,this.handlerOptions);},drawFeature:function(geometry){var feature=new OpenLayers.Feature.Vector(geometry);var proceed=this.layer.events.triggerEvent("sketchcomplete",{feature:feature});if(proceed!==false){feature.state=OpenLayers.State.INSERT;this.layer.addFeatures([feature]);this.featureAdded(feature);this.events.triggerEvent("featureadded",{feature:feature});}},CLASS_NAME:"OpenLayers.Control.DrawFeature"});OpenLayers.Control.Button=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_BUTTON,trigger:function(){},CLASS_NAME:"OpenLayers.Control.Button"});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(options){OpenLayers.Control.prototype.initialize.apply(this,[options]);this.registry=OpenLayers.Util.extend({"moveend":this.getState},this.registry);var previousOptions={trigger:OpenLayers.Function.bind(this.previousTrigger,this),displayClass:this.displayClass+" "+this.displayClass+"Previous"};OpenLayers.Util.extend(previousOptions,this.previousOptions);this.previous=new OpenLayers.Control.Button(previousOptions);var nextOptions={trigger:OpenLayers.Function.bind(this.nextTrigger,this),displayClass:this.displayClass+" "+this.displayClass+"Next"};OpenLayers.Util.extend(nextOptions,this.nextOptions);this.next=new OpenLayers.Control.Button(nextOptions);this.clear();},onPreviousChange:function(state,length){if(state&&!this.previous.active){this.previous.activate();}else if(!state&&this.previous.active){this.previous.deactivate();}},onNextChange:function(state,length){if(state&&!this.next.active){this.next.activate();}else if(!state&&this.next.active){this.next.deactivate();}},destroy:function(){OpenLayers.Control.prototype.destroy.apply(this);this.previous.destroy();this.next.destroy();this.deactivate();for(var prop in this){this[prop]=null;}},setMap:function(map){this.map=map;this.next.setMap(map);this.previous.setMap(map);},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);this.next.draw();this.previous.draw();},previousTrigger:function(){var current=this.previousStack.shift();var state=this.previousStack.shift();if(state!=undefined){this.nextStack.unshift(current);this.previousStack.unshift(state);this.restoring=true;this.restore(state);this.restoring=false;this.onNextChange(this.nextStack[0],this.nextStack.length);this.onPreviousChange(this.previousStack[1],this.previousStack.length-1);}else{this.previousStack.unshift(current);}
return state;},nextTrigger:function(){var state=this.nextStack.shift();if(state!=undefined){this.previousStack.unshift(state);this.restoring=true;this.restore(state);this.restoring=false;this.onNextChange(this.nextStack[0],this.nextStack.length);this.onPreviousChange(this.previousStack[1],this.previousStack.length-1);}
return state;},clear:function(){this.previousStack=[];this.previous.deactivate();this.nextStack=[];this.next.deactivate();},getState:function(){return{center:this.map.getCenter(),resolution:this.map.getResolution()};},restore:function(state){var zoom=this.map.getZoomForResolution(state.resolution);this.map.setCenter(state.center,zoom);},setListeners:function(){this.listeners={};for(var type in this.registry){this.listeners[type]=OpenLayers.Function.bind(function(){if(!this.restoring){var state=this.registry[type].apply(this,arguments);this.previousStack.unshift(state);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 activated=false;if(this.map){if(OpenLayers.Control.prototype.activate.apply(this)){if(this.listeners==null){this.setListeners();}
for(var type in this.listeners){this.map.events.register(type,this,this.listeners[type]);}
activated=true;if(this.previousStack.length==0){this.initStack();}}}
return activated;},initStack:function(){if(this.map.getCenter()){this.listeners.moveend();}},deactivate:function(){var deactivated=false;if(this.map){if(OpenLayers.Control.prototype.deactivate.apply(this)){for(var type in this.listeners){this.map.events.unregister(type,this,this.listeners[type]);}
if(this.clearOnDeactivate){this.clear();}
deactivated=true;}}
return deactivated;},CLASS_NAME:"OpenLayers.Control.NavigationHistory"});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(control,layer,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,[control,callbacks,options]);this.layer=layer;},mousedown:function(evt){this.down=evt.xy;return this.handle(evt)?!this.stopDown:true;},mouseup:function(evt){this.up=evt.xy;return this.handle(evt)?!this.stopUp:true;},click:function(evt){return this.handle(evt)?!this.stopClick:true;},mousemove:function(evt){if(!this.callbacks['over']&&!this.callbacks['out']){return true;}
this.handle(evt);return true;},dblclick:function(evt){return!this.handle(evt);},geometryTypeMatches:function(feature){return this.geometryTypes==null||OpenLayers.Util.indexOf(this.geometryTypes,feature.geometry.CLASS_NAME)>-1;},handle:function(evt){if(this.feature&&!this.feature.layer){this.feature=null;}
var type=evt.type;var handled=false;var previouslyIn=!!(this.feature);var click=(type=="click"||type=="dblclick");this.feature=this.layer.getFeatureFromEvent(evt);if(this.feature&&!this.feature.layer){this.feature=null;}
if(this.lastFeature&&!this.lastFeature.layer){this.lastFeature=null;}
if(this.feature){var inNew=(this.feature!=this.lastFeature);if(this.geometryTypeMatches(this.feature)){if(previouslyIn&&inNew){if(this.lastFeature){this.triggerCallback(type,'out',[this.lastFeature]);}
this.triggerCallback(type,'in',[this.feature]);}else if(!previouslyIn||click){this.triggerCallback(type,'in',[this.feature]);}
this.lastFeature=this.feature;handled=true;}else{if(this.lastFeature&&(previouslyIn&&inNew||click)){this.triggerCallback(type,'out',[this.lastFeature]);}
this.feature=null;}}else{if(this.lastFeature&&(previouslyIn||click)){this.triggerCallback(type,'out',[this.lastFeature]);}}
return handled;},triggerCallback:function(type,mode,args){var key=this.EVENTMAP[type][mode];if(key){if(type=='click'&&this.up&&this.down){var dpx=Math.sqrt(Math.pow(this.up.x-this.down.x,2)+
Math.pow(this.up.y-this.down.y,2));if(dpx<=this.clickTolerance){this.callback(key,args);}}else{this.callback(key,args);}}},activate:function(){var activated=false;if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.moveLayerToTop();this.map.events.on({"removelayer":this.handleMapEvents,"changelayer":this.handleMapEvents,scope:this});activated=true;}
return activated;},deactivate:function(){var deactivated=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});deactivated=true;}
return deactivated;},handleMapEvents:function(evt){if(!evt.property||evt.property=="order"){this.moveLayerToTop();}},moveLayerToTop:function(){var index=Math.max(this.map.Z_INDEX_BASE['Feature']-1,this.layer.getZIndex())+1;this.layer.setZIndex(index);},moveLayerBack:function(){var index=this.layer.getZIndex()-1;if(index>=this.map.Z_INDEX_BASE['Feature']){this.layer.setZIndex(index);}else{this.map.setLayerZIndex(this.layer,this.map.getLayerIndex(this.layer));}},CLASS_NAME:"OpenLayers.Handler.Feature"});OpenLayers.Renderer=OpenLayers.Class({container:null,root:null,extent:null,locked:false,size:null,resolution:null,map:null,initialize:function(containerID,options){this.container=OpenLayers.Util.getElement(containerID);},destroy:function(){this.container=null;this.extent=null;this.size=null;this.resolution=null;this.map=null;},supported:function(){return false;},setExtent:function(extent,resolutionChanged){this.extent=extent.clone();if(resolutionChanged){this.resolution=null;}},setSize:function(size){this.size=size.clone();this.resolution=null;},getResolution:function(){this.resolution=this.resolution||this.map.getResolution();return this.resolution;},drawFeature:function(feature,style){if(style==null){style=feature.style;}
if(feature.geometry){var bounds=feature.geometry.getBounds();if(bounds){if(!bounds.intersectsBounds(this.extent)){style={display:"none"};}
var rendered=this.drawGeometry(feature.geometry,style,feature.id);if(style.display!="none"&&style.label&&rendered!==false){var location=feature.geometry.getCentroid();if(style.labelXOffset||style.labelYOffset){xOffset=isNaN(style.labelXOffset)?0:style.labelXOffset;yOffset=isNaN(style.labelYOffset)?0:style.labelYOffset;var res=this.getResolution();location.move(xOffset*res,yOffset*res);}
this.drawText(feature.id,style,location);}else{this.removeText(feature.id);}
return rendered;}}},drawGeometry:function(geometry,style,featureId){},drawText:function(featureId,style,location){},removeText:function(featureId){},clear:function(){},getFeatureIdFromEvent:function(evt){},eraseFeatures:function(features){if(!(features instanceof Array)){features=[features];}
for(var i=0,len=features.length;i<len;++i){this.eraseGeometry(features[i].geometry);this.removeText(features[i].id);}},eraseGeometry:function(geometry){},moveRoot:function(renderer){},getRenderLayerId:function(){return this.container.id;},CLASS_NAME:"OpenLayers.Renderer"});OpenLayers.StyleMap=OpenLayers.Class({styles:null,extendDefault:true,initialize:function(style,options){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(style instanceof OpenLayers.Style){this.styles["default"]=style;this.styles["select"]=style;this.styles["temporary"]=style;this.styles["delete"]=style;}else if(typeof style=="object"){for(var key in style){if(style[key]instanceof OpenLayers.Style){this.styles[key]=style[key];}else if(typeof style[key]=="object"){this.styles[key]=new OpenLayers.Style(style[key]);}else{this.styles["default"]=new OpenLayers.Style(style);this.styles["select"]=new OpenLayers.Style(style);this.styles["temporary"]=new OpenLayers.Style(style);this.styles["delete"]=new OpenLayers.Style(style);break;}}}
OpenLayers.Util.extend(this,options);},destroy:function(){for(var key in this.styles){this.styles[key].destroy();}
this.styles=null;},createSymbolizer:function(feature,intent){if(!feature){feature=new OpenLayers.Feature.Vector();}
if(!this.styles[intent]){intent="default";}
feature.renderIntent=intent;var defaultSymbolizer={};if(this.extendDefault&&intent!="default"){defaultSymbolizer=this.styles["default"].createSymbolizer(feature);}
return OpenLayers.Util.extend(defaultSymbolizer,this.styles[intent].createSymbolizer(feature));},addUniqueValueRules:function(renderIntent,property,symbolizers,context){var rules=[];for(var value in symbolizers){rules.push(new OpenLayers.Rule({symbolizer:symbolizers[value],context:context,filter:new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.EQUAL_TO,property:property,value:value})}));}
this.styles[renderIntent].addRules(rules);},CLASS_NAME:"OpenLayers.StyleMap"});OpenLayers.Layer.Vector=OpenLayers.Class(OpenLayers.Layer,{EVENT_TYPES:["beforefeatureadded","beforefeaturesadded","featureadded","featuresadded","beforefeatureremoved","featureremoved","featuresremoved","beforefeatureselected","featureselected","featureunselected","beforefeaturemodified","featuremodified","afterfeaturemodified","vertexmodified","sketchstarted","sketchmodified","sketchcomplete","refresh"],isBaseLayer:false,isFixed:false,isVector:true,features:null,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(name,options){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 i=0,len=this.strategies.length;i<len;i++){this.strategies[i].setLayer(this);}}},destroy:function(){if(this.strategies){var strategy,i,len;for(i=0,len=this.strategies.length;i<len;i++){strategy=this.strategies[i];if(strategy.autoDestroy){strategy.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(obj){if(obj==null){obj=new OpenLayers.Layer.Vector(this.name,this.getOptions());}
obj=OpenLayers.Layer.prototype.clone.apply(this,[obj]);var features=this.features;var len=features.length;var clonedFeatures=new Array(len);for(var i=0;i<len;++i){clonedFeatures[i]=features[i].clone();}
obj.features=clonedFeatures;return obj;},refresh:function(obj){if(this.calculateInRange()&&this.visibility){this.events.triggerEvent("refresh",obj);}},assignRenderer:function(){for(var i=0,len=this.renderers.length;i<len;i++){var rendererClass=OpenLayers.Renderer[this.renderers[i]];if(rendererClass&&rendererClass.prototype.supported()){this.renderer=new rendererClass(this.div,this.rendererOptions);break;}}},displayError:function(){if(this.reportError){OpenLayers.Console.userError(OpenLayers.i18n("browserNotSupported",{'renderers':this.renderers.join("\n")}));}},setMap:function(map){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 strategy,i,len;for(i=0,len=this.strategies.length;i<len;i++){strategy=this.strategies[i];if(strategy.autoActivate){strategy.activate();}}}},removeMap:function(map){if(this.strategies){var strategy,i,len;for(i=0,len=this.strategies.length;i<len;i++){strategy=this.strategies[i];if(strategy.autoActivate){strategy.deactivate();}}}},onMapResize:function(){OpenLayers.Layer.prototype.onMapResize.apply(this,arguments);this.renderer.setSize(this.map.getSize());},moveTo:function(bounds,zoomChanged,dragging){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);var coordSysUnchanged=true;if(!dragging){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 extent=this.map.getExtent();coordSysUnchanged=this.renderer.setExtent(extent,zoomChanged);this.renderer.root.style.visibility="visible";if(navigator.userAgent.toLowerCase().indexOf("gecko")!=-1){this.div.scrollLeft=this.div.scrollLeft;}
if(!zoomChanged&&coordSysUnchanged){for(var i in this.unrenderedFeatures){var feature=this.unrenderedFeatures[i];this.drawFeature(feature);}}}
if(!this.drawn||zoomChanged||!coordSysUnchanged){this.drawn=true;var feature;for(var i=0,len=this.features.length;i<len;i++){this.renderer.locked=(i!==(len-1));feature=this.features[i];this.drawFeature(feature);}}},display:function(display){OpenLayers.Layer.prototype.display.apply(this,arguments);var currentDisplay=this.div.style.display;if(currentDisplay!=this.renderer.root.style.display){this.renderer.root.style.display=currentDisplay;}},addFeatures:function(features,options){if(!(features instanceof Array)){features=[features];}
var notify=!options||!options.silent;if(notify){var event={features:features};var ret=this.events.triggerEvent("beforefeaturesadded",event);if(ret===false){return;}
features=event.features;}
for(var i=0,len=features.length;i<len;i++){if(i!=(features.length-1)){this.renderer.locked=true;}else{this.renderer.locked=false;}
var feature=features[i];if(this.geometryType&&!(feature.geometry instanceof this.geometryType)){var throwStr=OpenLayers.i18n('componentShouldBe',{'geomType':this.geometryType.prototype.CLASS_NAME});throw throwStr;}
this.features.push(feature);feature.layer=this;if(!feature.style&&this.style){feature.style=OpenLayers.Util.extend({},this.style);}
if(notify){if(this.events.triggerEvent("beforefeatureadded",{feature:feature})===false){continue;};this.preFeatureInsert(feature);}
this.drawFeature(feature);if(notify){this.events.triggerEvent("featureadded",{feature:feature});this.onFeatureInsert(feature);}}
if(notify){this.events.triggerEvent("featuresadded",{features:features});}},removeFeatures:function(features,options){if(!features||features.length===0){return;}
if(!(features instanceof Array)){features=[features];}
if(features===this.features||features===this.selectedFeatures){features=features.slice();}
var notify=!options||!options.silent;for(var i=features.length-1;i>=0;i--){if(i!=0&&features[i-1].geometry){this.renderer.locked=true;}else{this.renderer.locked=false;}
var feature=features[i];delete this.unrenderedFeatures[feature.id];if(notify){this.events.triggerEvent("beforefeatureremoved",{feature:feature});}
this.features=OpenLayers.Util.removeItem(this.features,feature);feature.layer=null;if(feature.geometry){this.renderer.eraseFeatures(feature);}
if(OpenLayers.Util.indexOf(this.selectedFeatures,feature)!=-1){OpenLayers.Util.removeItem(this.selectedFeatures,feature);}
if(notify){this.events.triggerEvent("featureremoved",{feature:feature});}}
if(notify){this.events.triggerEvent("featuresremoved",{features:features});}},destroyFeatures:function(features,options){var all=(features==undefined);if(all){features=this.features;}
if(features){this.removeFeatures(features,options);for(var i=features.length-1;i>=0;i--){features[i].destroy();}}},drawFeature:function(feature,style){if(!this.drawn){return}
if(typeof style!="object"){if(!style&&feature.state===OpenLayers.State.DELETE){style="delete";}
var renderIntent=style||feature.renderIntent;style=feature.style||this.style;if(!style){style=this.styleMap.createSymbolizer(feature,renderIntent);}}
if(!this.renderer.drawFeature(feature,style)){this.unrenderedFeatures[feature.id]=feature;}else{delete this.unrenderedFeatures[feature.id];};},eraseFeatures:function(features){this.renderer.eraseFeatures(features);},getFeatureFromEvent:function(evt){if(!this.renderer){OpenLayers.Console.error(OpenLayers.i18n("getFeatureError"));return null;}
var featureId=this.renderer.getFeatureIdFromEvent(evt);return this.getFeatureById(featureId);},getFeatureById:function(featureId){var feature=null;for(var i=0,len=this.features.length;i<len;++i){if(this.features[i].id==featureId){feature=this.features[i];break;}}
return feature;},onFeatureInsert:function(feature){},preFeatureInsert:function(feature){},getDataExtent:function(){var maxExtent=null;var features=this.features;if(features&&(features.length>0)){maxExtent=new OpenLayers.Bounds();var geometry=null;for(var i=0,len=features.length;i<len;i++){geometry=features[i].geometry;if(geometry){maxExtent.extend(geometry.getBounds());}}}
return maxExtent;},CLASS_NAME:"OpenLayers.Layer.Vector"});OpenLayers.Layer.Vector.RootContainer=OpenLayers.Class(OpenLayers.Layer.Vector,{displayInLayerSwitcher:false,layers:null,initialize:function(name,options){OpenLayers.Layer.Vector.prototype.initialize.apply(this,arguments);},display:function(){},getFeatureFromEvent:function(evt){var layers=this.layers;var feature;for(var i=0;i<layers.length;i++){feature=layers[i].getFeatureFromEvent(evt);if(feature){return feature;}}},setMap:function(map){OpenLayers.Layer.Vector.prototype.setMap.apply(this,arguments);this.collectRoots();map.events.register("changelayer",this,this.handleChangeLayer);},removeMap:function(map){map.events.unregister("changelayer",this,this.handleChangeLayer);this.resetRoots();OpenLayers.Layer.Vector.prototype.removeMap.apply(this,arguments);},collectRoots:function(){var layer;for(var i=0;i<this.map.layers.length;++i){layer=this.map.layers[i];if(OpenLayers.Util.indexOf(this.layers,layer)!=-1){layer.renderer.moveRoot(this.renderer);}}},resetRoots:function(){var layer;for(var i=0;i<this.layers.length;++i){layer=this.layers[i];if(this.renderer&&layer.renderer.getRenderLayerId()==this.id){this.renderer.moveRoot(layer.renderer);}}},handleChangeLayer:function(evt){var layer=evt.layer;if(evt.property=="order"&&OpenLayers.Util.indexOf(this.layers,layer)!=-1){this.resetRoots();this.collectRoots();}},CLASS_NAME:"OpenLayers.Layer.Vector.RootContainer"});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(layers,options){this.EVENT_TYPES=OpenLayers.Control.SelectFeature.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);OpenLayers.Control.prototype.initialize.apply(this,[options]);if(this.scope===null){this.scope=this;}
this.initLayer(layers);var callbacks={click:this.clickFeature,clickout:this.clickoutFeature};if(this.hover){callbacks.over=this.overFeature;callbacks.out=this.outFeature;}
this.callbacks=OpenLayers.Util.extend(callbacks,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(layers){if(layers instanceof Array){this.layers=layers;this.layer=new OpenLayers.Layer.Vector.RootContainer(this.id+"_container",{layers:layers});}else{this.layer=layers;}},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(options){var layers=this.layers||[this.layer];var layer,feature;for(var l=0;l<layers.length;++l){layer=layers[l];for(var i=layer.selectedFeatures.length-1;i>=0;--i){feature=layer.selectedFeatures[i];if(!options||options.except!=feature){this.unselect(feature);}}}},clickFeature:function(feature){if(!this.hover){var selected=(OpenLayers.Util.indexOf(feature.layer.selectedFeatures,feature)>-1);if(selected){if(this.toggleSelect()){this.unselect(feature);}else if(!this.multipleSelect()){this.unselectAll({except:feature});}}else{if(!this.multipleSelect()){this.unselectAll({except:feature});}
this.select(feature);}}},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(feature){if(!this.hover&&this.clickout){this.unselectAll();}},overFeature:function(feature){var layer=feature.layer;if(this.hover){if(this.highlightOnly){this.highlight(feature);}else if(OpenLayers.Util.indexOf(layer.selectedFeatures,feature)==-1){this.select(feature);}}},outFeature:function(feature){if(this.hover){if(this.highlightOnly){if(feature._lastHighlighter==this.id){if(feature._prevHighlighter&&feature._prevHighlighter!=this.id){delete feature._lastHighlighter;var control=this.map.getControl(feature._prevHighlighter);if(control){control.highlight(feature);}}else{this.unhighlight(feature);}}}else{this.unselect(feature);}}},highlight:function(feature){var layer=feature.layer;var cont=this.events.triggerEvent("beforefeaturehighlighted",{feature:feature});if(cont!==false){feature._prevHighlighter=feature._lastHighlighter;feature._lastHighlighter=this.id;var style=this.selectStyle||this.renderIntent;layer.drawFeature(feature,style);this.events.triggerEvent("featurehighlighted",{feature:feature});}},unhighlight:function(feature){var layer=feature.layer;feature._lastHighlighter=feature._prevHighlighter;delete feature._prevHighlighter;layer.drawFeature(feature,feature.style||feature.layer.style||"default");this.events.triggerEvent("featureunhighlighted",{feature:feature});},select:function(feature){var cont=this.onBeforeSelect.call(this.scope,feature);var layer=feature.layer;if(cont!==false){cont=layer.events.triggerEvent("beforefeatureselected",{feature:feature});if(cont!==false){layer.selectedFeatures.push(feature);this.highlight(feature);if(!this.handlers.feature.lastFeature){this.handlers.feature.lastFeature=layer.selectedFeatures[0];}
layer.events.triggerEvent("featureselected",{feature:feature});this.onSelect.call(this.scope,feature);}}},unselect:function(feature){var layer=feature.layer;this.unhighlight(feature);OpenLayers.Util.removeItem(layer.selectedFeatures,feature);layer.events.triggerEvent("featureunselected",{feature:feature});this.onUnselect.call(this.scope,feature);},selectBox:function(position){if(position instanceof OpenLayers.Bounds){var minXY=this.map.getLonLatFromPixel(new OpenLayers.Pixel(position.left,position.bottom));var maxXY=this.map.getLonLatFromPixel(new OpenLayers.Pixel(position.right,position.top));var bounds=new OpenLayers.Bounds(minXY.lon,minXY.lat,maxXY.lon,maxXY.lat);if(!this.multipleSelect()){this.unselectAll();}
var prevMultiple=this.multiple;this.multiple=true;var layers=this.layers||[this.layer];var layer;for(var l=0;l<layers.length;++l){layer=layers[l];for(var i=0,len=layer.features.length;i<len;++i){var feature=layer.features[i];if(!feature.getVisibility()){continue;}
if(this.geometryTypes==null||OpenLayers.Util.indexOf(this.geometryTypes,feature.geometry.CLASS_NAME)>-1){if(bounds.toGeometry().intersects(feature.geometry)){if(OpenLayers.Util.indexOf(layer.selectedFeatures,feature)==-1){this.select(feature);}}}}}
this.multiple=prevMultiple;}},setMap:function(map){this.handlers.feature.setMap(map);if(this.box){this.handlers.box.setMap(map);}
OpenLayers.Control.prototype.setMap.apply(this,arguments);},setLayer:function(layers){var isActive=this.active;this.unselectAll();this.deactivate();if(this.layers){this.layer.destroy();this.layers=null;}
this.initLayer(layers);this.handlers.feature.layer=this.layer;if(isActive){this.activate();}},CLASS_NAME:"OpenLayers.Control.SelectFeature"});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(position){if(position instanceof OpenLayers.Bounds){var bounds;if(!this.out){var minXY=this.map.getLonLatFromPixel(new OpenLayers.Pixel(position.left,position.bottom));var maxXY=this.map.getLonLatFromPixel(new OpenLayers.Pixel(position.right,position.top));bounds=new OpenLayers.Bounds(minXY.lon,minXY.lat,maxXY.lon,maxXY.lat);}else{var pixWidth=Math.abs(position.right-position.left);var pixHeight=Math.abs(position.top-position.bottom);var zoomFactor=Math.min((this.map.size.h/pixHeight),(this.map.size.w/pixWidth));var extent=this.map.getExtent();var center=this.map.getLonLatFromPixel(position.getCenterPixel());var xmin=center.lon-(extent.getWidth()/2)*zoomFactor;var xmax=center.lon+(extent.getWidth()/2)*zoomFactor;var ymin=center.lat-(extent.getHeight()/2)*zoomFactor;var ymax=center.lat+(extent.getHeight()/2)*zoomFactor;bounds=new OpenLayers.Bounds(xmin,ymin,xmax,ymax);}
var lastZoom=this.map.getZoom();this.map.zoomToExtent(bounds);if(lastZoom==this.map.getZoom()&&this.alwaysZoom==true){this.map.zoomTo(lastZoom+(this.out?-1:1));}}else{if(!this.out){this.map.setCenter(this.map.getLonLatFromPixel(position),this.map.getZoom()+1);}else{this.map.setCenter(this.map.getLonLatFromPixel(position),this.map.getZoom()-1);}}},CLASS_NAME:"OpenLayers.Control.ZoomBox"});OpenLayers.Renderer.Canvas=OpenLayers.Class(OpenLayers.Renderer,{canvas:null,features:null,geometryMap:null,initialize:function(containerID){OpenLayers.Renderer.prototype.initialize.apply(this,arguments);this.root=document.createElement("canvas");this.container.appendChild(this.root);this.canvas=this.root.getContext("2d");this.features={};this.geometryMap={};},eraseGeometry:function(geometry){this.eraseFeatures(this.features[this.geometryMap[geometry.id]][0]);},supported:function(){var canvas=document.createElement("canvas");return!!canvas.getContext;},setExtent:function(extent){this.extent=extent.clone();this.resolution=null;this.redraw();},setSize:function(size){this.size=size.clone();this.root.style.width=size.w+"px";this.root.style.height=size.h+"px";this.root.width=size.w;this.root.height=size.h;this.resolution=null;},drawFeature:function(feature,style){if(style==null){style=feature.style;}
style=OpenLayers.Util.extend({'fillColor':'#000000','strokeColor':'#000000','strokeWidth':2,'fillOpacity':1,'strokeOpacity':1},style);this.features[feature.id]=[feature,style];if(feature.geometry){this.geometryMap[feature.geometry.id]=feature.id;}
this.redraw();},drawGeometry:function(geometry,style){var className=geometry.CLASS_NAME;if((className=="OpenLayers.Geometry.Collection")||(className=="OpenLayers.Geometry.MultiPoint")||(className=="OpenLayers.Geometry.MultiLineString")||(className=="OpenLayers.Geometry.MultiPolygon")){for(var i=0;i<geometry.components.length;i++){this.drawGeometry(geometry.components[i],style);}
return;};switch(geometry.CLASS_NAME){case"OpenLayers.Geometry.Point":this.drawPoint(geometry,style);break;case"OpenLayers.Geometry.LineString":this.drawLineString(geometry,style);break;case"OpenLayers.Geometry.LinearRing":this.drawLinearRing(geometry,style);break;case"OpenLayers.Geometry.Polygon":this.drawPolygon(geometry,style);break;default:break;}},drawExternalGraphic:function(pt,style){var img=new Image();img.src=style.externalGraphic;if(style.graphicTitle){img.title=style.graphicTitle;}
var width=style.graphicWidth||style.graphicHeight;var height=style.graphicHeight||style.graphicWidth;width=width?width:style.pointRadius*2;height=height?height:style.pointRadius*2;var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset:-(0.5*width);var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset:-(0.5*height);var opacity=style.graphicOpacity||style.fillOpacity;var context={img:img,x:(pt[0]+xOffset),y:(pt[1]+yOffset),width:width,height:height,canvas:this.canvas};img.onload=OpenLayers.Function.bind(function(){this.canvas.drawImage(this.img,this.x,this.y,this.width,this.height);},context);},setCanvasStyle:function(type,style){if(type=="fill"){this.canvas.globalAlpha=style['fillOpacity'];this.canvas.fillStyle=style['fillColor'];}else if(type=="stroke"){this.canvas.globalAlpha=style['strokeOpacity'];this.canvas.strokeStyle=style['strokeColor'];this.canvas.lineWidth=style['strokeWidth'];}else{this.canvas.globalAlpha=0;this.canvas.lineWidth=1;}},drawPoint:function(geometry,style){if(style.graphic!==false){var pt=this.getLocalXY(geometry);if(style.externalGraphic){this.drawExternalGraphic(pt,style);}else{if(style.fill!==false){this.setCanvasStyle("fill",style);this.canvas.beginPath();this.canvas.arc(pt[0],pt[1],style.pointRadius,0,Math.PI*2,true);this.canvas.fill();}
if(style.stroke!==false){this.setCanvasStyle("stroke",style);this.canvas.beginPath();this.canvas.arc(pt[0],pt[1],style.pointRadius,0,Math.PI*2,true);this.canvas.stroke();this.setCanvasStyle("reset");}}}},drawLineString:function(geometry,style){if(style.stroke!==false){this.setCanvasStyle("stroke",style);this.canvas.beginPath();var start=this.getLocalXY(geometry.components[0]);this.canvas.moveTo(start[0],start[1]);for(var i=1;i<geometry.components.length;i++){var pt=this.getLocalXY(geometry.components[i]);this.canvas.lineTo(pt[0],pt[1]);}
this.canvas.stroke();}
this.setCanvasStyle("reset");},drawLinearRing:function(geometry,style){if(style.fill!==false){this.setCanvasStyle("fill",style);this.canvas.beginPath();var start=this.getLocalXY(geometry.components[0]);this.canvas.moveTo(start[0],start[1]);for(var i=1;i<geometry.components.length-1;i++){var pt=this.getLocalXY(geometry.components[i]);this.canvas.lineTo(pt[0],pt[1]);}
this.canvas.fill();}
if(style.stroke!==false){var oldWidth=this.canvas.lineWidth;this.setCanvasStyle("stroke",style);this.canvas.beginPath();var start=this.getLocalXY(geometry.components[0]);this.canvas.moveTo(start[0],start[1]);for(var i=1;i<geometry.components.length;i++){var pt=this.getLocalXY(geometry.components[i]);this.canvas.lineTo(pt[0],pt[1]);}
this.canvas.stroke();}
this.setCanvasStyle("reset");},drawPolygon:function(geometry,style){this.drawLinearRing(geometry.components[0],style);for(var i=1;i<geometry.components.length;i++){this.drawLinearRing(geometry.components[i],{fillOpacity:0,strokeWidth:0,strokeOpacity:0,strokeColor:'#000000',fillColor:'#000000'});}},drawText:function(location,style){style=OpenLayers.Util.extend({fontColor:"#000000",labelAlign:"cm"},style);var pt=this.getLocalXY(location);this.setCanvasStyle("reset");this.canvas.fillStyle=style.fontColor;this.canvas.globalAlpha=style.fontOpacity||1.0;var fontStyle=style.fontWeight+" "+style.fontSize+" "+style.fontFamily;if(this.canvas.fillText){var labelAlign=OpenLayers.Renderer.Canvas.LABEL_ALIGN[style.labelAlign[0]]||"center";this.canvas.font=fontStyle;this.canvas.textAlign=labelAlign;this.canvas.fillText(style.label,pt[0],pt[1]);}else if(this.canvas.mozDrawText){this.canvas.mozTextStyle=fontStyle;var len=this.canvas.mozMeasureText(style.label);switch(style.labelAlign[0]){case"l":break;case"r":pt[0]-=len;break;case"c":default:pt[0]-=len/2;}
this.canvas.translate(pt[0],pt[1]);this.canvas.mozDrawText(style.label);this.canvas.translate(-1*pt[0],-1*pt[1]);}
this.setCanvasStyle("reset");},getLocalXY:function(point){var resolution=this.getResolution();var extent=this.extent;var x=(point.x/resolution+(-extent.left/resolution));var y=((extent.top/resolution)-point.y/resolution);return[x,y];},clear:function(){this.canvas.clearRect(0,0,this.root.width,this.root.height);},getFeatureIdFromEvent:function(evt){var loc=this.map.getLonLatFromPixel(evt.xy);var resolution=this.getResolution();var bounds=new OpenLayers.Bounds(loc.lon-resolution*5,loc.lat-resolution*5,loc.lon+resolution*5,loc.lat+resolution*5);var geom=bounds.toGeometry();for(var feat in this.features){if(!this.features.hasOwnProperty(feat)){continue;}
if(this.features[feat][0].geometry.intersects(geom)){return feat;}}
return null;},eraseFeatures:function(features){if(!(features instanceof Array)){features=[features];}
for(var i=0;i<features.length;++i){delete this.features[features[i].id];}
this.redraw();},redraw:function(){if(!this.locked){this.clear();var labelMap=[];var feature,style;for(var id in this.features){if(!this.features.hasOwnProperty(id)){continue;}
feature=this.features[id][0];style=this.features[id][1];if(!feature.geometry){continue;}
this.drawGeometry(feature.geometry,style);if(style.label){labelMap.push([feature,style]);}}
var item;for(var i=0;len=labelMap.length,i<len;++i){item=labelMap[i];this.drawText(item[0].geometry.getCentroid(),item[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(yOrdering){this.compare=yOrdering?OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER_Y_ORDER:OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER_DRAWING_ORDER;this.order=[];this.indices={};this.maxZIndex=0;},insert:function(newNode){if(this.exists(newNode)){this.remove(newNode);}
var nodeId=newNode.id;this.determineZIndex(newNode);var leftIndex=-1;var rightIndex=this.order.length;var middle;while(rightIndex-leftIndex>1){middle=parseInt((leftIndex+rightIndex)/2);var placement=this.compare(this,newNode,OpenLayers.Util.getElement(this.order[middle]));if(placement>0){leftIndex=middle;}else{rightIndex=middle;}}
this.order.splice(rightIndex,0,nodeId);this.indices[nodeId]=this.getZIndex(newNode);return this.getNextElement(rightIndex);},remove:function(node){var nodeId=node.id;var arrayIndex=OpenLayers.Util.indexOf(this.order,nodeId);if(arrayIndex>=0){this.order.splice(arrayIndex,1);delete this.indices[nodeId];if(this.order.length>0){var lastId=this.order[this.order.length-1];this.maxZIndex=this.indices[lastId];}else{this.maxZIndex=0;}}},clear:function(){this.order=[];this.indices={};this.maxZIndex=0;},exists:function(node){return(this.indices[node.id]!=null);},getZIndex:function(node){return node._style.graphicZIndex;},determineZIndex:function(node){var zIndex=node._style.graphicZIndex;if(zIndex==null){zIndex=this.maxZIndex;node._style.graphicZIndex=zIndex;}else if(zIndex>this.maxZIndex){this.maxZIndex=zIndex;}},getNextElement:function(index){var nextIndex=index+1;if(nextIndex<this.order.length){var nextElement=OpenLayers.Util.getElement(this.order[nextIndex]);if(nextElement==undefined){nextElement=this.getNextElement(nextIndex);}
return nextElement;}else{return null;}},CLASS_NAME:"OpenLayers.ElementsIndexer"});OpenLayers.ElementsIndexer.IndexingMethods={Z_ORDER:function(indexer,newNode,nextNode){var newZIndex=indexer.getZIndex(newNode);var returnVal=0;if(nextNode){var nextZIndex=indexer.getZIndex(nextNode);returnVal=newZIndex-nextZIndex;}
return returnVal;},Z_ORDER_DRAWING_ORDER:function(indexer,newNode,nextNode){var returnVal=OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER(indexer,newNode,nextNode);if(nextNode&&returnVal==0){returnVal=1;}
return returnVal;},Z_ORDER_Y_ORDER:function(indexer,newNode,nextNode){var returnVal=OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER(indexer,newNode,nextNode);if(nextNode&&returnVal===0){var result=nextNode._boundsBottom-newNode._boundsBottom;returnVal=(result===0)?1:result;}
return returnVal;}};OpenLayers.Renderer.Elements=OpenLayers.Class(OpenLayers.Renderer,{rendererRoot:null,root:null,vectorRoot:null,textRoot:null,xmlns:null,indexer:null,BACKGROUND_ID_SUFFIX:"_background",LABEL_ID_SUFFIX:"_label",minimumSymbolizer:{strokeLinecap:"round",strokeOpacity:1,strokeDashstyle:"solid",fillOpacity:1,pointRadius:0},initialize:function(containerID,options){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(options&&(options.zIndexing||options.yOrdering)){this.indexer=new OpenLayers.ElementsIndexer(options.yOrdering);}},destroy:function(){this.clear();this.rendererRoot=null;this.root=null;this.xmlns=null;OpenLayers.Renderer.prototype.destroy.apply(this,arguments);},clear:function(){if(this.vectorRoot){while(this.vectorRoot.childNodes.length>0){this.vectorRoot.removeChild(this.vectorRoot.firstChild);}}
if(this.textRoot){while(this.textRoot.childNodes.length>0){this.textRoot.removeChild(this.textRoot.firstChild);}}
if(this.indexer){this.indexer.clear();}},getNodeType:function(geometry,style){},drawGeometry:function(geometry,style,featureId){var className=geometry.CLASS_NAME;var rendered=true;if((className=="OpenLayers.Geometry.Collection")||(className=="OpenLayers.Geometry.MultiPoint")||(className=="OpenLayers.Geometry.MultiLineString")||(className=="OpenLayers.Geometry.MultiPolygon")){for(var i=0,len=geometry.components.length;i<len;i++){rendered=this.drawGeometry(geometry.components[i],style,featureId)&&rendered;}
return rendered;};rendered=false;if(style.display!="none"){if(style.backgroundGraphic){this.redrawBackgroundNode(geometry.id,geometry,style,featureId);}
rendered=this.redrawNode(geometry.id,geometry,style,featureId);}
if(rendered==false){var node=document.getElementById(geometry.id);if(node){if(node._style.backgroundGraphic){node.parentNode.removeChild(document.getElementById(geometry.id+this.BACKGROUND_ID_SUFFIX));}
node.parentNode.removeChild(node);}}
return rendered;},redrawNode:function(id,geometry,style,featureId){var node=this.nodeFactory(id,this.getNodeType(geometry,style));node._featureId=featureId;node._boundsBottom=geometry.getBounds().bottom;node._geometryClass=geometry.CLASS_NAME;node._style=style;var drawResult=this.drawGeometryNode(node,geometry,style);if(drawResult===false){return false;}
node=drawResult.node;if(this.indexer){var insert=this.indexer.insert(node);if(insert){this.vectorRoot.insertBefore(node,insert);}else{this.vectorRoot.appendChild(node);}}else{if(node.parentNode!==this.vectorRoot){this.vectorRoot.appendChild(node);}}
this.postDraw(node);return drawResult.complete;},redrawBackgroundNode:function(id,geometry,style,featureId){var backgroundStyle=OpenLayers.Util.extend({},style);backgroundStyle.externalGraphic=backgroundStyle.backgroundGraphic;backgroundStyle.graphicXOffset=backgroundStyle.backgroundXOffset;backgroundStyle.graphicYOffset=backgroundStyle.backgroundYOffset;backgroundStyle.graphicZIndex=backgroundStyle.backgroundGraphicZIndex;backgroundStyle.graphicWidth=backgroundStyle.backgroundWidth||backgroundStyle.graphicWidth;backgroundStyle.graphicHeight=backgroundStyle.backgroundHeight||backgroundStyle.graphicHeight;backgroundStyle.backgroundGraphic=null;backgroundStyle.backgroundXOffset=null;backgroundStyle.backgroundYOffset=null;backgroundStyle.backgroundGraphicZIndex=null;return this.redrawNode(id+this.BACKGROUND_ID_SUFFIX,geometry,backgroundStyle,null);},drawGeometryNode:function(node,geometry,style){style=style||node._style;OpenLayers.Util.applyDefaults(style,this.minimumSymbolizer);var options={'isFilled':style.fill===undefined?true:style.fill,'isStroked':style.stroke===undefined?!!style.strokeWidth:style.stroke};var drawn;switch(geometry.CLASS_NAME){case"OpenLayers.Geometry.Point":if(style.graphic===false){options.isFilled=false;options.isStroked=false;}
drawn=this.drawPoint(node,geometry);break;case"OpenLayers.Geometry.LineString":options.isFilled=false;drawn=this.drawLineString(node,geometry);break;case"OpenLayers.Geometry.LinearRing":drawn=this.drawLinearRing(node,geometry);break;case"OpenLayers.Geometry.Polygon":drawn=this.drawPolygon(node,geometry);break;case"OpenLayers.Geometry.Surface":drawn=this.drawSurface(node,geometry);break;case"OpenLayers.Geometry.Rectangle":drawn=this.drawRectangle(node,geometry);break;default:break;}
node._options=options;if(drawn!=false){return{node:this.setStyle(node,style,options,geometry),complete:drawn};}else{return false;}},postDraw:function(node){},drawPoint:function(node,geometry){},drawLineString:function(node,geometry){},drawLinearRing:function(node,geometry){},drawPolygon:function(node,geometry){},drawRectangle:function(node,geometry){},drawCircle:function(node,geometry){},drawSurface:function(node,geometry){},removeText:function(featureId){var label=document.getElementById(featureId+this.LABEL_ID_SUFFIX);if(label){this.textRoot.removeChild(label);}},getFeatureIdFromEvent:function(evt){var target=evt.target;var useElement=target&&target.correspondingUseElement;var node=useElement?useElement:(target||evt.srcElement);var featureId=node._featureId;return featureId;},eraseGeometry:function(geometry){if((geometry.CLASS_NAME=="OpenLayers.Geometry.MultiPoint")||(geometry.CLASS_NAME=="OpenLayers.Geometry.MultiLineString")||(geometry.CLASS_NAME=="OpenLayers.Geometry.MultiPolygon")||(geometry.CLASS_NAME=="OpenLayers.Geometry.Collection")){for(var i=0,len=geometry.components.length;i<len;i++){this.eraseGeometry(geometry.components[i]);}}else{var element=OpenLayers.Util.getElement(geometry.id);if(element&&element.parentNode){if(element.geometry){element.geometry.destroy();element.geometry=null;}
element.parentNode.removeChild(element);if(this.indexer){this.indexer.remove(element);}
if(element._style.backgroundGraphic){var backgroundId=geometry.id+this.BACKGROUND_ID_SUFFIX;var bElem=OpenLayers.Util.getElement(backgroundId);if(bElem&&bElem.parentNode){bElem.parentNode.removeChild(bElem);}}}}},nodeFactory:function(id,type){var node=OpenLayers.Util.getElement(id);if(node){if(!this.nodeTypeCompare(node,type)){node.parentNode.removeChild(node);node=this.nodeFactory(id,type);}}else{node=this.createNode(type,id);}
return node;},nodeTypeCompare:function(node,type){},createNode:function(type,id){},moveRoot:function(renderer){var root=this.root;if(renderer.root.parentNode==this.rendererRoot){root=renderer.root;}
root.parentNode.removeChild(root);renderer.rendererRoot.appendChild(root);},getRenderLayerId:function(){return this.root.parentNode.parentNode.id;},isComplexSymbol:function(graphicName){return(graphicName!="circle")&&!!graphicName;},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.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(containerID){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 svgFeature="http://www.w3.org/TR/SVG11/feature#";return(document.implementation&&(document.implementation.hasFeature("org.w3c.svg","1.0")||document.implementation.hasFeature(svgFeature+"SVG","1.1")||document.implementation.hasFeature(svgFeature+"BasicStructure","1.1")));},inValidRange:function(x,y,xyOnly){var left=x+(xyOnly?0:this.translationParameters.x);var top=y+(xyOnly?0:this.translationParameters.y);return(left>=-this.MAX_PIXEL&&left<=this.MAX_PIXEL&&top>=-this.MAX_PIXEL&&top<=this.MAX_PIXEL);},setExtent:function(extent,resolutionChanged){OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments);var resolution=this.getResolution();var left=-extent.left/resolution;var top=extent.top/resolution;if(resolutionChanged){this.left=left;this.top=top;var extentString="0 0 "+this.size.w+" "+this.size.h;this.rendererRoot.setAttributeNS(null,"viewBox",extentString);this.translate(0,0);return true;}else{var inRange=this.translate(left-this.left,top-this.top);if(!inRange){this.setExtent(extent,true);}
return inRange;}},translate:function(x,y){if(!this.inValidRange(x,y,true)){return false;}else{var transformString="";if(x||y){transformString="translate("+x+","+y+")";}
this.root.setAttributeNS(null,"transform",transformString);this.translationParameters={x:x,y:y};return true;}},setSize:function(size){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(geometry,style){var nodeType=null;switch(geometry.CLASS_NAME){case"OpenLayers.Geometry.Point":if(style.externalGraphic){nodeType="image";}else if(this.isComplexSymbol(style.graphicName)){nodeType=this.supportUse===false?"svg":"use";}else{nodeType="circle";}
break;case"OpenLayers.Geometry.Rectangle":nodeType="rect";break;case"OpenLayers.Geometry.LineString":nodeType="polyline";break;case"OpenLayers.Geometry.LinearRing":nodeType="polygon";break;case"OpenLayers.Geometry.Polygon":case"OpenLayers.Geometry.Curve":case"OpenLayers.Geometry.Surface":nodeType="path";break;default:break;}
return nodeType;},setStyle:function(node,style,options){style=style||node._style;options=options||node._options;var r=parseFloat(node.getAttributeNS(null,"r"));var widthFactor=1;var pos;if(node._geometryClass=="OpenLayers.Geometry.Point"&&r){node.style.visibility="";if(style.graphic===false){node.style.visibility="hidden";}else if(style.externalGraphic){pos=this.getPosition(node);if(style.graphicTitle){node.setAttributeNS(null,"title",style.graphicTitle);}
if(style.graphicWidth&&style.graphicHeight){node.setAttributeNS(null,"preserveAspectRatio","none");}
var width=style.graphicWidth||style.graphicHeight;var height=style.graphicHeight||style.graphicWidth;width=width?width:style.pointRadius*2;height=height?height:style.pointRadius*2;var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset:-(0.5*width);var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset:-(0.5*height);var opacity=style.graphicOpacity||style.fillOpacity;node.setAttributeNS(null,"x",(pos.x+xOffset).toFixed());node.setAttributeNS(null,"y",(pos.y+yOffset).toFixed());node.setAttributeNS(null,"width",width);node.setAttributeNS(null,"height",height);node.setAttributeNS(this.xlinkns,"href",style.externalGraphic);node.setAttributeNS(null,"style","opacity: "+opacity);}else if(this.isComplexSymbol(style.graphicName)){var offset=style.pointRadius*3;var size=offset*2;var id=this.importSymbol(style.graphicName);pos=this.getPosition(node);widthFactor=this.symbolMetrics[id][0]*3/size;var parent=node.parentNode;var nextSibling=node.nextSibling;if(parent){parent.removeChild(node);}
if(this.supportUse===false){var src=document.getElementById(id);node.firstChild&&node.removeChild(node.firstChild);node.appendChild(src.firstChild.cloneNode(true));node.setAttributeNS(null,"viewBox",src.getAttributeNS(null,"viewBox"));}else{node.setAttributeNS(this.xlinkns,"href","#"+id);}
node.setAttributeNS(null,"width",size);node.setAttributeNS(null,"height",size);node.setAttributeNS(null,"x",pos.x-offset);node.setAttributeNS(null,"y",pos.y-offset);if(nextSibling){parent.insertBefore(node,nextSibling);}else if(parent){parent.appendChild(node);}}else{node.setAttributeNS(null,"r",style.pointRadius);}
var rotation=style.rotation;if((rotation!==undefined||node._rotation!==undefined)&&pos){node._rotation=rotation;rotation|=0;if(node.nodeName!=="svg"){node.setAttributeNS(null,"transform","rotate("+rotation+" "+pos.x+" "+
pos.y+")");}else{var metrics=this.symbolMetrics[id]
node.firstChild.setAttributeNS(null,"transform","rotate("+style.rotation+" "+metrics[1]+" "+metrics[2]+")");}}}
if(options.isFilled){node.setAttributeNS(null,"fill",style.fillColor);node.setAttributeNS(null,"fill-opacity",style.fillOpacity);}else{node.setAttributeNS(null,"fill","none");}
if(options.isStroked){node.setAttributeNS(null,"stroke",style.strokeColor);node.setAttributeNS(null,"stroke-opacity",style.strokeOpacity);node.setAttributeNS(null,"stroke-width",style.strokeWidth*widthFactor);node.setAttributeNS(null,"stroke-linecap",style.strokeLinecap);node.setAttributeNS(null,"stroke-linejoin","round");node.setAttributeNS(null,"stroke-dasharray",this.dashStyle(style,widthFactor));}else{node.setAttributeNS(null,"stroke","none");}
if(style.pointerEvents){node.setAttributeNS(null,"pointer-events",style.pointerEvents);}
if(style.cursor!=null){node.setAttributeNS(null,"cursor",style.cursor);}
return node;},dashStyle:function(style,widthFactor){var w=style.strokeWidth*widthFactor;var str=style.strokeDashstyle;switch(str){case'solid':return'none';case'dot':return[1,4*w].join();case'dash':return[4*w,4*w].join();case'dashdot':return[4*w,4*w,1,4*w].join();case'longdash':return[8*w,4*w].join();case'longdashdot':return[8*w,4*w,1,4*w].join();default:return OpenLayers.String.trim(str).replace(/\s+/g,",");}},createNode:function(type,id){var node=document.createElementNS(this.xmlns,type);if(id){node.setAttributeNS(null,"id",id);}
return node;},nodeTypeCompare:function(node,type){return(type==node.nodeName);},createRenderRoot:function(){return this.nodeFactory(this.container.id+"_svgRoot","svg");},createRoot:function(suffix){return this.nodeFactory(this.container.id+suffix,"g");},createDefs:function(){var defs=this.nodeFactory(this.container.id+"_defs","defs");this.rendererRoot.appendChild(defs);return defs;},drawPoint:function(node,geometry){return this.drawCircle(node,geometry,1);},drawCircle:function(node,geometry,radius){var resolution=this.getResolution();var x=(geometry.x/resolution+this.left);var y=(this.top-geometry.y/resolution);if(this.inValidRange(x,y)){node.setAttributeNS(null,"cx",x);node.setAttributeNS(null,"cy",y);node.setAttributeNS(null,"r",radius);return node;}else{return false;}},drawLineString:function(node,geometry){var componentsResult=this.getComponentsString(geometry.components);if(componentsResult.path){node.setAttributeNS(null,"points",componentsResult.path);return(componentsResult.complete?node:null);}else{return false;}},drawLinearRing:function(node,geometry){var componentsResult=this.getComponentsString(geometry.components);if(componentsResult.path){node.setAttributeNS(null,"points",componentsResult.path);return(componentsResult.complete?node:null);}else{return false;}},drawPolygon:function(node,geometry){var d="";var draw=true;var complete=true;var linearRingResult,path;for(var j=0,len=geometry.components.length;j<len;j++){d+=" M";linearRingResult=this.getComponentsString(geometry.components[j].components," ");path=linearRingResult.path;if(path){d+=" "+path;complete=linearRingResult.complete&&complete;}else{draw=false;}}
d+=" z";if(draw){node.setAttributeNS(null,"d",d);node.setAttributeNS(null,"fill-rule","evenodd");return complete?node:null;}else{return false;}},drawRectangle:function(node,geometry){var resolution=this.getResolution();var x=(geometry.x/resolution+this.left);var y=(this.top-geometry.y/resolution);if(this.inValidRange(x,y)){node.setAttributeNS(null,"x",x);node.setAttributeNS(null,"y",y);node.setAttributeNS(null,"width",geometry.width/resolution);node.setAttributeNS(null,"height",geometry.height/resolution);return node;}else{return false;}},drawSurface:function(node,geometry){var d=null;var draw=true;for(var i=0,len=geometry.components.length;i<len;i++){if((i%3)==0&&(i/3)==0){var component=this.getShortString(geometry.components[i]);if(!component){draw=false;}
d="M "+component;}else if((i%3)==1){var component=this.getShortString(geometry.components[i]);if(!component){draw=false;}
d+=" C "+component;}else{var component=this.getShortString(geometry.components[i]);if(!component){draw=false;}
d+=" "+component;}}
d+=" Z";if(draw){node.setAttributeNS(null,"d",d);return node;}else{return false;}},drawText:function(featureId,style,location){var resolution=this.getResolution();var x=(location.x/resolution+this.left);var y=(location.y/resolution-this.top);var label=this.nodeFactory(featureId+this.LABEL_ID_SUFFIX,"text");var tspan=this.nodeFactory(featureId+this.LABEL_ID_SUFFIX+"_tspan","tspan");label.setAttributeNS(null,"x",x);label.setAttributeNS(null,"y",-y);if(style.fontColor){label.setAttributeNS(null,"fill",style.fontColor);}
if(style.fontOpacity){label.setAttributeNS(null,"opacity",style.fontOpacity);}
if(style.fontFamily){label.setAttributeNS(null,"font-family",style.fontFamily);}
if(style.fontSize){label.setAttributeNS(null,"font-size",style.fontSize);}
if(style.fontWeight){label.setAttributeNS(null,"font-weight",style.fontWeight);}
if(style.labelSelect===true){label.setAttributeNS(null,"pointer-events","visible");label._featureId=featureId;tspan._featureId=featureId;tspan._geometry=location;tspan._geometryClass=location.CLASS_NAME;}else{label.setAttributeNS(null,"pointer-events","none");}
var align=style.labelAlign||"cm";label.setAttributeNS(null,"text-anchor",OpenLayers.Renderer.SVG.LABEL_ALIGN[align[0]]||"middle");if(this.isGecko){label.setAttributeNS(null,"dominant-baseline",OpenLayers.Renderer.SVG.LABEL_ALIGN[align[1]]||"central");}else{tspan.setAttributeNS(null,"baseline-shift",OpenLayers.Renderer.SVG.LABEL_VSHIFT[align[1]]||"-35%");}
tspan.textContent=style.label;if(!label.parentNode){label.appendChild(tspan);this.textRoot.appendChild(label);}},getComponentsString:function(components,separator){var renderCmp=[];var complete=true;var len=components.length;var strings=[];var str,component,j;for(var i=0;i<len;i++){component=components[i];renderCmp.push(component);str=this.getShortString(component);if(str){strings.push(str);}else{if(i>0){if(this.getShortString(components[i-1])){strings.push(this.clipLine(components[i],components[i-1]));}}
if(i<len-1){if(this.getShortString(components[i+1])){strings.push(this.clipLine(components[i],components[i+1]));}}
complete=false;}}
return{path:strings.join(separator||","),complete:complete};},clipLine:function(badComponent,goodComponent){if(goodComponent.equals(badComponent)){return"";}
var resolution=this.getResolution();var maxX=this.MAX_PIXEL-this.translationParameters.x;var maxY=this.MAX_PIXEL-this.translationParameters.y;var x1=goodComponent.x/resolution+this.left;var y1=this.top-goodComponent.y/resolution;var x2=badComponent.x/resolution+this.left;var y2=this.top-badComponent.y/resolution;var k;if(x2<-maxX||x2>maxX){k=(y2-y1)/(x2-x1);x2=x2<0?-maxX:maxX;y2=y1+(x2-x1)*k;}
if(y2<-maxY||y2>maxY){k=(x2-x1)/(y2-y1);y2=y2<0?-maxY:maxY;x2=x1+(y2-y1)*k;}
return x2+","+y2;},getShortString:function(point){var resolution=this.getResolution();var x=(point.x/resolution+this.left);var y=(this.top-point.y/resolution);if(this.inValidRange(x,y)){return x+","+y;}else{return false;}},getPosition:function(node){return({x:parseFloat(node.getAttributeNS(null,"cx")),y:parseFloat(node.getAttributeNS(null,"cy"))});},importSymbol:function(graphicName){if(!this.defs){this.defs=this.createDefs();}
var id=this.container.id+"-"+graphicName;if(document.getElementById(id)!=null){return id;}
var symbol=OpenLayers.Renderer.symbol[graphicName];if(!symbol){throw new Error(graphicName+' is not a valid symbol name');return;}
var symbolNode=this.nodeFactory(id,"symbol");var node=this.nodeFactory(null,"polygon");symbolNode.appendChild(node);var symbolExtent=new OpenLayers.Bounds(Number.MAX_VALUE,Number.MAX_VALUE,0,0);var points="";var x,y;for(var i=0;i<symbol.length;i=i+2){x=symbol[i];y=symbol[i+1];symbolExtent.left=Math.min(symbolExtent.left,x);symbolExtent.bottom=Math.min(symbolExtent.bottom,y);symbolExtent.right=Math.max(symbolExtent.right,x);symbolExtent.top=Math.max(symbolExtent.top,y);points+=" "+x+","+y;}
node.setAttributeNS(null,"points",points);var width=symbolExtent.getWidth();var height=symbolExtent.getHeight();var viewBox=[symbolExtent.left-width,symbolExtent.bottom-height,width*3,height*3];symbolNode.setAttributeNS(null,"viewBox",viewBox.join(" "));this.symbolMetrics[id]=[Math.max(width,height),symbolExtent.getCenterLonLat().lon,symbolExtent.getCenterLonLat().lat];this.defs.appendChild(symbolNode);return symbolNode.id;},getFeatureIdFromEvent:function(evt){var featureId=OpenLayers.Renderer.Elements.prototype.getFeatureIdFromEvent.apply(this,arguments);if(this.supportUse===false&&!featureId){var target=evt.target;featureId=target.parentNode&&target!=this.rendererRoot&&target.parentNode._featureId;}
return featureId;},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(containerID){if(!this.supported()){return;}
if(!document.namespaces.olv){document.namespaces.add("olv",this.xmlns);var style=document.createStyleSheet();var shapes=['shape','rect','oval','fill','stroke','imagedata','group','textbox'];for(var i=0,len=shapes.length;i<len;i++){style.addRule('olv\\:'+shapes[i],"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(extent,resolutionChanged){OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments);var resolution=this.getResolution();var left=(extent.left/resolution)|0;var top=(extent.top/resolution-this.size.h)|0;if(resolutionChanged||!this.offset){this.offset={x:left,y:top};left=0;top=0;}else{left=left-this.offset.x;top=top-this.offset.y;}
var org=left+" "+top;this.root.coordorigin=org;var roots=[this.root,this.vectorRoot,this.textRoot];var root;for(var i=0,len=roots.length;i<len;++i){root=roots[i];var size=this.size.w+" "+this.size.h;root.coordsize=size;}
this.root.style.flip="y";return true;},setSize:function(size){OpenLayers.Renderer.prototype.setSize.apply(this,arguments);var roots=[this.rendererRoot,this.root,this.vectorRoot,this.textRoot];var w=this.size.w+"px";var h=this.size.h+"px";var root;for(var i=0,len=roots.length;i<len;++i){root=roots[i];root.style.width=w;root.style.height=h;}},getNodeType:function(geometry,style){var nodeType=null;switch(geometry.CLASS_NAME){case"OpenLayers.Geometry.Point":if(style.externalGraphic){nodeType="olv:rect";}else if(this.isComplexSymbol(style.graphicName)){nodeType="olv:shape";}else{nodeType="olv:oval";}
break;case"OpenLayers.Geometry.Rectangle":nodeType="olv:rect";break;case"OpenLayers.Geometry.LineString":case"OpenLayers.Geometry.LinearRing":case"OpenLayers.Geometry.Polygon":case"OpenLayers.Geometry.Curve":case"OpenLayers.Geometry.Surface":nodeType="olv:shape";break;default:break;}
return nodeType;},setStyle:function(node,style,options,geometry){style=style||node._style;options=options||node._options;var widthFactor=1;var fillColor=style.fillColor;if(node._geometryClass==="OpenLayers.Geometry.Point"){if(style.externalGraphic){if(style.graphicTitle){node.title=style.graphicTitle;}
var width=style.graphicWidth||style.graphicHeight;var height=style.graphicHeight||style.graphicWidth;width=width?width:style.pointRadius*2;height=height?height:style.pointRadius*2;var resolution=this.getResolution();var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset:-(0.5*width);var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset:-(0.5*height);node.style.left=(((geometry.x/resolution-this.offset.x)+xOffset)|0)+"px";node.style.top=(((geometry.y/resolution-this.offset.y)-(yOffset+height))|0)+"px";node.style.width=width+"px";node.style.height=height+"px";node.style.flip="y";fillColor="none";options.isStroked=false;}else if(this.isComplexSymbol(style.graphicName)){var cache=this.importSymbol(style.graphicName);node.path=cache.path;node.coordorigin=cache.left+","+cache.bottom;var size=cache.size;node.coordsize=size+","+size;this.drawCircle(node,geometry,style.pointRadius);node.style.flip="y";}else{this.drawCircle(node,geometry,style.pointRadius);}}
if(options.isFilled){node.fillcolor=fillColor;}else{node.filled="false";}
var fills=node.getElementsByTagName("fill");var fill=(fills.length==0)?null:fills[0];if(!options.isFilled){if(fill){node.removeChild(fill);}}else{if(!fill){fill=this.createNode('olv:fill',node.id+"_fill");}
fill.opacity=style.fillOpacity;if(node._geometryClass==="OpenLayers.Geometry.Point"&&style.externalGraphic){if(style.graphicOpacity){fill.opacity=style.graphicOpacity;}
fill.src=style.externalGraphic;fill.type="frame";if(!(style.graphicWidth&&style.graphicHeight)){fill.aspect="atmost";}}
if(fill.parentNode!=node){node.appendChild(fill);}}
var rotation=style.rotation;if(rotation!==node._rotation){node._rotation=rotation;if(style.externalGraphic){this.graphicRotate(node,xOffset,yOffset,style);fill.opacity=0;}else if(node._geometryClass==="OpenLayers.Geometry.Point"){node.style.rotation=rotation||0;}}
if(options.isStroked){node.strokecolor=style.strokeColor;node.strokeweight=style.strokeWidth+"px";}else{node.stroked=false;}
var strokes=node.getElementsByTagName("stroke");var stroke=(strokes.length==0)?null:strokes[0];if(!options.isStroked){if(stroke){node.removeChild(stroke);}}else{if(!stroke){stroke=this.createNode('olv:stroke',node.id+"_stroke");node.appendChild(stroke);}
stroke.opacity=style.strokeOpacity;stroke.endcap=!style.strokeLinecap||style.strokeLinecap=='butt'?'flat':style.strokeLinecap;stroke.dashstyle=this.dashStyle(style);}
if(style.cursor!="inherit"&&style.cursor!=null){node.style.cursor=style.cursor;}
return node;},graphicRotate:function(node,xOffset,yOffset,style){var style=style||node._style;var options=node._options;var rotation=style.rotation||0;var aspectRatio,size;if(!(style.graphicWidth&&style.graphicHeight)){var img=new Image();img.onreadystatechange=OpenLayers.Function.bind(function(){if(img.readyState=="complete"||img.readyState=="interactive"){aspectRatio=img.width/img.height;size=Math.max(style.pointRadius*2,style.graphicWidth||0,style.graphicHeight||0);xOffset=xOffset*aspectRatio;style.graphicWidth=size*aspectRatio;style.graphicHeight=size;this.graphicRotate(node,xOffset,yOffset,style);}},this);img.src=style.externalGraphic;return;}else{size=Math.max(style.graphicWidth,style.graphicHeight);aspectRatio=style.graphicWidth/style.graphicHeight;}
var width=Math.round(style.graphicWidth||size*aspectRatio);var height=Math.round(style.graphicHeight||size);node.style.width=width+"px";node.style.height=height+"px";var image=document.getElementById(node.id+"_image");if(!image){image=this.createNode("olv:imagedata",node.id+"_image");node.appendChild(image);}
image.style.width=width+"px";image.style.height=height+"px";image.src=style.externalGraphic;image.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader("+"src='', sizingMethod='scale')";var rot=rotation*Math.PI/180;var sintheta=Math.sin(rot);var costheta=Math.cos(rot);var filter="progid:DXImageTransform.Microsoft.Matrix(M11="+costheta+",M12="+(-sintheta)+",M21="+sintheta+",M22="+costheta+",SizingMethod='auto expand')\n";var opacity=style.graphicOpacity||style.fillOpacity;if(opacity&&opacity!=1){filter+="progid:DXImageTransform.Microsoft.BasicImage(opacity="+
opacity+")\n";}
node.style.filter=filter;var centerPoint=new OpenLayers.Geometry.Point(-xOffset,-yOffset);var imgBox=new OpenLayers.Bounds(0,0,width,height).toGeometry();imgBox.rotate(style.rotation,centerPoint);var imgBounds=imgBox.getBounds();node.style.left=Math.round(parseInt(node.style.left)+imgBounds.left)+"px";node.style.top=Math.round(parseInt(node.style.top)-imgBounds.bottom)+"px";},postDraw:function(node){node.style.visibility="visible";var fillColor=node._style.fillColor;var strokeColor=node._style.strokeColor;if(fillColor=="none"&&node.fillcolor!=fillColor){node.fillcolor=fillColor;}
if(strokeColor=="none"&&node.strokecolor!=strokeColor){node.strokecolor=strokeColor;}},setNodeDimension:function(node,geometry){var bbox=geometry.getBounds();if(bbox){var resolution=this.getResolution();var scaledBox=new OpenLayers.Bounds((bbox.left/resolution-this.offset.x)|0,(bbox.bottom/resolution-this.offset.y)|0,(bbox.right/resolution-this.offset.x)|0,(bbox.top/resolution-this.offset.y)|0);node.style.left=scaledBox.left+"px";node.style.top=scaledBox.top+"px";node.style.width=scaledBox.getWidth()+"px";node.style.height=scaledBox.getHeight()+"px";node.coordorigin=scaledBox.left+" "+scaledBox.top;node.coordsize=scaledBox.getWidth()+" "+scaledBox.getHeight();}},dashStyle:function(style){var dash=style.strokeDashstyle;switch(dash){case'solid':case'dot':case'dash':case'dashdot':case'longdash':case'longdashdot':return dash;default:var parts=dash.split(/[ ,]/);if(parts.length==2){if(1*parts[0]>=2*parts[1]){return"longdash";}
return(parts[0]==1||parts[1]==1)?"dot":"dash";}else if(parts.length==4){return(1*parts[0]>=2*parts[1])?"longdashdot":"dashdot";}
return"solid";}},createNode:function(type,id){var node=document.createElement(type);if(id){node.id=id;}
node.unselectable='on';node.onselectstart=OpenLayers.Function.False;return node;},nodeTypeCompare:function(node,type){var subType=type;var splitIndex=subType.indexOf(":");if(splitIndex!=-1){subType=subType.substr(splitIndex+1);}
var nodeName=node.nodeName;splitIndex=nodeName.indexOf(":");if(splitIndex!=-1){nodeName=nodeName.substr(splitIndex+1);}
return(subType==nodeName);},createRenderRoot:function(){return this.nodeFactory(this.container.id+"_vmlRoot","div");},createRoot:function(suffix){return this.nodeFactory(this.container.id+suffix,"olv:group");},drawPoint:function(node,geometry){return this.drawCircle(node,geometry,1);},drawCircle:function(node,geometry,radius){if(!isNaN(geometry.x)&&!isNaN(geometry.y)){var resolution=this.getResolution();node.style.left=(((geometry.x/resolution-this.offset.x)|0)-radius)+"px";node.style.top=(((geometry.y/resolution-this.offset.y)|0)-radius)+"px";var diameter=radius*2;node.style.width=diameter+"px";node.style.height=diameter+"px";return node;}
return false;},drawLineString:function(node,geometry){return this.drawLine(node,geometry,false);},drawLinearRing:function(node,geometry){return this.drawLine(node,geometry,true);},drawLine:function(node,geometry,closeLine){this.setNodeDimension(node,geometry);var resolution=this.getResolution();var numComponents=geometry.components.length;var parts=new Array(numComponents);var comp,x,y;for(var i=0;i<numComponents;i++){comp=geometry.components[i];x=(comp.x/resolution-this.offset.x)|0;y=(comp.y/resolution-this.offset.y)|0;parts[i]=" "+x+","+y+" l ";}
var end=(closeLine)?" x e":" e";node.path="m"+parts.join("")+end;return node;},drawPolygon:function(node,geometry){this.setNodeDimension(node,geometry);var resolution=this.getResolution();var path=[];var linearRing,i,j,len,ilen,comp,x,y;for(j=0,len=geometry.components.length;j<len;j++){linearRing=geometry.components[j];path.push("m");for(i=0,ilen=linearRing.components.length;i<ilen;i++){comp=linearRing.components[i];x=(comp.x/resolution-this.offset.x)|0;y=(comp.y/resolution-this.offset.y)|0;path.push(" "+x+","+y);if(i==0){path.push(" l");}}
path.push(" x ");}
path.push("e");node.path=path.join("");return node;},drawRectangle:function(node,geometry){var resolution=this.getResolution();node.style.left=((geometry.x/resolution-this.offset.x)|0)+"px";node.style.top=((geometry.y/resolution-this.offset.y)|0)+"px";node.style.width=((geometry.width/resolution)|0)+"px";node.style.height=((geometry.height/resolution)|0)+"px";return node;},drawText:function(featureId,style,location){var label=this.nodeFactory(featureId+this.LABEL_ID_SUFFIX,"olv:rect");var textbox=this.nodeFactory(featureId+this.LABEL_ID_SUFFIX+"_textbox","olv:textbox");var resolution=this.getResolution();label.style.left=((location.x/resolution-this.offset.x)|0)+"px";label.style.top=((location.y/resolution-this.offset.y)|0)+"px";label.style.flip="y";textbox.innerText=style.label;if(style.fontColor){textbox.style.color=style.fontColor;}
if(style.fontOpacity){textbox.style.filter='alpha(opacity='+(style.fontOpacity*100)+')';}
if(style.fontFamily){textbox.style.fontFamily=style.fontFamily;}
if(style.fontSize){textbox.style.fontSize=style.fontSize;}
if(style.fontWeight){textbox.style.fontWeight=style.fontWeight;}
if(style.labelSelect===true){label._featureId=featureId;textbox._featureId=featureId;textbox._geometry=location;textbox._geometryClass=location.CLASS_NAME;}
textbox.style.whiteSpace="nowrap";textbox.inset="1px,0px,0px,0px";if(!label.parentNode){label.appendChild(textbox);this.textRoot.appendChild(label);}
var align=style.labelAlign||"cm";var xshift=textbox.clientWidth*(OpenLayers.Renderer.VML.LABEL_SHIFT[align[0]||"c"]);var yshift=textbox.clientHeight*(OpenLayers.Renderer.VML.LABEL_SHIFT[align[1]||"m"]);label.style.left=parseInt(label.style.left)-xshift-1+"px";label.style.top=parseInt(label.style.top)+yshift+"px";},drawSurface:function(node,geometry){this.setNodeDimension(node,geometry);var resolution=this.getResolution();var path=[];var comp,x,y;for(var i=0,len=geometry.components.length;i<len;i++){comp=geometry.components[i];x=(comp.x/resolution-this.offset.x)|0;y=(comp.y/resolution-this.offset.y)|0;if((i%3)==0&&(i/3)==0){path.push("m");}else if((i%3)==1){path.push(" c");}
path.push(" "+x+","+y);}
path.push(" x e");node.path=path.join("");return node;},moveRoot:function(renderer){var layer=this.map.getLayer(renderer.container.id);if(layer instanceof OpenLayers.Layer.Vector.RootContainer){layer=this.map.getLayer(this.container.id);}
layer&&layer.renderer.clear();OpenLayers.Renderer.Elements.prototype.moveRoot.apply(this,arguments);layer&&layer.redraw();},importSymbol:function(graphicName){var id=this.container.id+"-"+graphicName;var cache=this.symbolCache[id];if(cache){return cache;}
var symbol=OpenLayers.Renderer.symbol[graphicName];if(!symbol){throw new Error(graphicName+' is not a valid symbol name');return;}
var symbolExtent=new OpenLayers.Bounds(Number.MAX_VALUE,Number.MAX_VALUE,0,0);var pathitems=["m"];for(var i=0;i<symbol.length;i=i+2){var x=symbol[i];var y=symbol[i+1];symbolExtent.left=Math.min(symbolExtent.left,x);symbolExtent.bottom=Math.min(symbolExtent.bottom,y);symbolExtent.right=Math.max(symbolExtent.right,x);symbolExtent.top=Math.max(symbolExtent.top,y);pathitems.push(x);pathitems.push(y);if(i==0){pathitems.push("l");}}
pathitems.push("x e");var path=pathitems.join(" ");var diff=(symbolExtent.getWidth()-symbolExtent.getHeight())/2;if(diff>0){symbolExtent.bottom=symbolExtent.bottom-diff;symbolExtent.top=symbolExtent.top+diff;}else{symbolExtent.left=symbolExtent.left+diff;symbolExtent.right=symbolExtent.right-diff;}
cache={path:path,size:symbolExtent.getWidth(),left:symbolExtent.left,bottom:symbolExtent.bottom};this.symbolCache[id]=cache;return cache;},CLASS_NAME:"OpenLayers.Renderer.VML"});OpenLayers.Renderer.VML.LABEL_SHIFT={"l":0,"c":.5,"r":1,"t":0,"m":.5,"b":1};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(config){var defaultConfig=OpenLayers.Util.extend(this.DEFAULT_CONFIG,{proxy:OpenLayers.ProxyHost});config=OpenLayers.Util.applyDefaults(config,defaultConfig);var request=new OpenLayers.Request.XMLHttpRequest();var url=config.url;if(config.params){var paramString=OpenLayers.Util.getParameterString(config.params);if(paramString.length>0){var separator=(url.indexOf('?')>-1)?'&':'?';url+=separator+paramString;}}
if(config.proxy&&(url.indexOf("http")==0)){if(typeof config.proxy=="function"){url=config.proxy(url);}else{url=config.proxy+encodeURIComponent(url);}}
request.open(config.method,url,config.async,config.user,config.password);for(var header in config.headers){request.setRequestHeader(header,config.headers[header]);}
var events=this.events;var self=this;request.onreadystatechange=function(){if(request.readyState==OpenLayers.Request.XMLHttpRequest.DONE){var proceed=events.triggerEvent("complete",{request:request,config:config,requestUrl:url});if(proceed!==false){self.runCallbacks({request:request,config:config,requestUrl:url});}}};if(config.async===false){request.send(config.data);}else{window.setTimeout(function(){request.send(config.data);},0);}
return request;},runCallbacks:function(options){var request=options.request;var config=options.config;var complete=(config.scope)?OpenLayers.Function.bind(config.callback,config.scope):config.callback;var success;if(config.success){success=(config.scope)?OpenLayers.Function.bind(config.success,config.scope):config.success;}
var failure;if(config.failure){failure=(config.scope)?OpenLayers.Function.bind(config.failure,config.scope):config.failure;}
complete(request);if(!request.status||(request.status>=200&&request.status<300)){this.events.triggerEvent("success",options);if(success){success(request);}}
if(request.status&&(request.status<200||request.status>=300)){this.events.triggerEvent("failure",options);if(failure){failure(request);}}},GET:function(config){config=OpenLayers.Util.extend(config,{method:"GET"});return OpenLayers.Request.issue(config);},POST:function(config){config=OpenLayers.Util.extend(config,{method:"POST"});config.headers=config.headers?config.headers:{};if(!("CONTENT-TYPE"in OpenLayers.Util.upperCaseObject(config.headers))){config.headers["Content-Type"]="application/xml";}
return OpenLayers.Request.issue(config);},PUT:function(config){config=OpenLayers.Util.extend(config,{method:"PUT"});config.headers=config.headers?config.headers:{};if(!("CONTENT-TYPE"in OpenLayers.Util.upperCaseObject(config.headers))){config.headers["Content-Type"]="application/xml";}
return OpenLayers.Request.issue(config);},DELETE:function(config){config=OpenLayers.Util.extend(config,{method:"DELETE"});return OpenLayers.Request.issue(config);},HEAD:function(config){config=OpenLayers.Util.extend(config,{method:"HEAD"});return OpenLayers.Request.issue(config);},OPTIONS:function(config){config=OpenLayers.Util.extend(config,{method:"OPTIONS"});return OpenLayers.Request.issue(config);}};Ext.namespace("GeoExt");GeoExt.Action=Ext.extend(Ext.Action,{control:null,map:null,uScope:null,uHandler:null,uToggleHandler:null,uCheckHandler:null,constructor:function(config){this.uScope=config.scope;this.uHandler=config.handler;this.uToggleHandler=config.toggleHandler;this.uCheckHandler=config.checkHandler;config.scope=this;config.handler=this.pHandler;config.toggleHandler=this.pToggleHandler;config.checkHandler=this.pCheckHandler;var ctrl=this.control=config.control;delete config.control;if(ctrl){if(config.map){config.map.addControl(ctrl);delete config.map;}
if((config.pressed||config.checked)&&ctrl.map){ctrl.activate();}
ctrl.events.on({activate:this.onCtrlActivate,deactivate:this.onCtrlDeactivate,scope:this});}
arguments.callee.superclass.constructor.call(this,config);},pHandler:function(cmp){var ctrl=this.control;if(ctrl&&ctrl.type==OpenLayers.Control.TYPE_BUTTON){ctrl.trigger();}
if(this.uHandler){this.uHandler.apply(this.uScope,arguments);}},pToggleHandler:function(cmp,state){this.changeControlState(state);if(this.uToggleHandler){this.uToggleHandler.apply(this.uScope,arguments);}},pCheckHandler:function(cmp,state){this.changeControlState(state);if(this.uCheckHandler){this.uCheckHandler.apply(this.uScope,arguments);}},changeControlState:function(state){if(state){if(!this._activating){this._activating=true;this.control.activate();this._activating=false;}}else{if(!this._deactivating){this._deactivating=true;this.control.deactivate();this._deactivating=false;}}},onCtrlActivate:function(){var ctrl=this.control;if(ctrl.type==OpenLayers.Control.TYPE_BUTTON){this.enable();}else{this.safeCallEach("toggle",[true]);this.safeCallEach("setChecked",[true]);}},onCtrlDeactivate:function(){var ctrl=this.control;if(ctrl.type==OpenLayers.Control.TYPE_BUTTON){this.disable();}else{this.safeCallEach("toggle",[false]);this.safeCallEach("setChecked",[false]);}},safeCallEach:function(fnName,args){var cs=this.items;for(var i=0,len=cs.length;i<len;i++){if(cs[i][fnName]){cs[i].rendered?cs[i][fnName].apply(cs[i],args):cs[i].on({"render":cs[i][fnName].createDelegate(cs[i],args),single:true});}}}});Ext.namespace("GeoExt");GeoExt.MapPanel=Ext.extend(Ext.Panel,{map:null,layers:null,center:null,zoom:null,prettyStateKeys:false,extent:null,stateEvents:["aftermapmove","afterlayervisibilitychange","afterlayeropacitychange"],initComponent:function(){if(!(this.map instanceof OpenLayers.Map)){this.map=new OpenLayers.Map(Ext.applyIf(this.map||{},{allOverlays:true}));}
var layers=this.layers;if(!layers||layers instanceof Array){this.layers=new GeoExt.data.LayerStore({layers:layers,map:this.map});}
if(typeof this.center=="string"){this.center=OpenLayers.LonLat.fromString(this.center);}else if(this.center instanceof Array){this.center=new OpenLayers.LonLat(this.center[0],this.center[1]);}
if(typeof this.extent=="string"){this.extent=OpenLayers.Bounds.fromString(this.extent);}else if(this.extent instanceof Array){this.extent=OpenLayers.Bounds.fromArray(this.extent);}
GeoExt.MapPanel.superclass.initComponent.call(this);this.addEvents("aftermapmove","afterlayervisibilitychange","afterlayeropacitychange");this.map.events.on({"moveend":this.onMoveend,"changelayer":this.onLayerchange,scope:this});},onMoveend:function(){this.fireEvent("aftermapmove");},onLayerchange:function(e){if(e.property){if(e.property==="visibility"){this.fireEvent("afterlayervisibilitychange");}else if(e.property==="opacity"){this.fireEvent("afterlayeropacitychange");}}},applyState:function(state){this.center=new OpenLayers.LonLat(state.x,state.y);this.zoom=state.zoom;var i,l,layer,layerId,visibility,opacity;var layers=this.map.layers;for(i=0,l=layers.length;i<l;i++){layer=layers[i];layerId=this.prettyStateKeys?layer.name:layer.id;visibility=state["visibility_"+layerId];if(visibility!==undefined){visibility=(/^true$/i).test(visibility);if(layer.isBaseLayer){if(visibility){this.map.setBaseLayer(layer);}}else{layer.setVisibility(visibility);}}
opacity=state["opacity_"+layerId];if(opacity!==undefined){layer.setOpacity(opacity);}}},getState:function(){var state;if(!this.map){return;}
var center=this.map.getCenter();state={x:center.lon,y:center.lat,zoom:this.map.getZoom()};var i,l,layer,layerId,layers=this.map.layers;for(i=0,l=layers.length;i<l;i++){layer=layers[i];layerId=this.prettyStateKeys?layer.name:layer.id;state["visibility_"+layerId]=layer.getVisibility();state["opacity_"+layerId]=layer.opacity==null?1:layer.opacity;}
return state;},updateMapSize:function(){if(this.map){this.map.updateSize();}},renderMap:function(){var map=this.map;map.render(this.body.dom);if(map.layers.length>0){if(this.center||this.zoom!=null){map.setCenter(this.center,this.zoom);}else if(this.extent){map.zoomToExtent(this.extent);}else{map.zoomToMaxExtent();}}},afterRender:function(){GeoExt.MapPanel.superclass.afterRender.apply(this,arguments);if(!this.ownerCt){this.renderMap();}else{this.ownerCt.on("move",this.updateMapSize,this);this.ownerCt.on({"afterlayout":{fn:this.renderMap,scope:this,single:true}});}},onResize:function(){GeoExt.MapPanel.superclass.onResize.apply(this,arguments);this.updateMapSize();},onBeforeAdd:function(item){if(typeof item.addToMapPanel==="function"){item.addToMapPanel(this);}
GeoExt.MapPanel.superclass.onBeforeAdd.apply(this,arguments);},remove:function(item,autoDestroy){if(typeof item.removeFromMapPanel==="function"){item.removeFromMapPanel(this);}
GeoExt.MapPanel.superclass.remove.apply(this,arguments);},beforeDestroy:function(){if(this.ownerCt){this.ownerCt.un("move",this.updateMapSize,this);}
GeoExt.MapPanel.superclass.beforeDestroy.apply(this,arguments);if(this.map&&this.map.events){this.map.events.un({"moveend":this.onMoveend,"changelayer":this.onLayerchange,scope:this});}
if(!this.initialConfig.map||!(this.initialConfig.map instanceof OpenLayers.Map)){if(this.map&&this.map.destroy){this.map.destroy();}}
delete this.map;}});GeoExt.MapPanel.guess=function(){return Ext.ComponentMgr.all.find(function(o){return o instanceof GeoExt.MapPanel;});};Ext.reg('gx_mappanel',GeoExt.MapPanel);Ext.namespace("MapFish");mapFishApiPool={apiRefs:[],createRef:function(ref){var index=this.apiRefs.length;this.apiRefs[index]=ref;return index;}};MapFish.API=OpenLayers.Class({map:null,drawLayer:null,baseConfig:null,apiId:null,searcher:null,debug:null,tree:null,isMainApp:null,recenterUrl:'/recenter',highlightUrl:'/geometry',layerTreeNodes:null,selectCtrl:null,popup:null,apiName:'MapFish',tools:null,activatePopup:true,initialize:function(config){Ext.QuickTips.init();Ext.BLANK_IMAGE_URL=OpenLayers.Util.getImagesLocation()+"blank.gif";this.apiId=mapFishApiPool.createRef(this);this.baseConfig=config||{};OpenLayers.Tile.Image.useBlankTile=false;this.debug=Boolean(this.baseConfig.debug);this.isMainApp=Boolean(this.baseConfig.isMainApp);if(typeof this.baseConfig.activatePopup!='undefined'){this.activatePopup=this.baseConfig.activatePopup;}
this.layerTreeNodes=[];var lang=this.baseConfig.lang||($('lang')?$('lang').value:null)||this.lang;if(lang){OpenLayers.Lang.setCode(lang);}
if(!this.debug){OpenLayers.Util.onImageLoadError=function(){this.style.display="none";this.src=Ext.BLANK_IMAGE_URL;};}},createMap:function(config){config=config||{};var options=this.getMapOptions();if(config.div){options.div=config.div;}
var layers=this.getLayers(config);var controls=this.getControls(config);if(controls){options.controls=controls;}
this.map=new OpenLayers.Map(options);this.drawLayer=this.getDrawingLayer();layers.push(this.drawLayer);this.map.addLayers(layers);this.drawLayer.setZIndex(this.map.Z_INDEX_BASE['Feature']);this.map.events.on({scope:this.drawLayer,changelayer:function(evt){if(evt.property=="order"){this.setZIndex(this.map.Z_INDEX_BASE['Feature']);}}});if(!this.map.getCenter()){if(config.easting&&config.northing){this.map.setCenter(new OpenLayers.LonLat(config.easting,config.northing),config.zoom);}else if(config.bbox){this.map.zoomToExtent(new OpenLayers.Bounds.fromArray(config.bbox));}else if(this.baseConfig.initialExtent){this.map.zoomToExtent(new OpenLayers.Bounds.fromArray(this.baseConfig.initialExtent));}else{this.map.zoomToMaxExtent();}}
return this.map;},getCreateMapDescription:function(html){var separator=this.getReturnLine(html);var comment="      // createMap config parameters"+separator;comment=comment+"      //  div - div where to place the map"+separator;comment=comment+"      //  easting - center of the map, easting value"+separator;comment=comment+"      //  northing - center of the map, northing value"+separator;comment=comment+"      //  zoom - zoom level"+separator;comment=comment+"      //  bbox - bbox of the initial extent"+separator;return comment;},createPermalinkFormPanel:function(){return new MapFish.API.PermalinkFormPanel();},createApiFormPanel:function(){return new MapFish.API.ApiFormPanel(this);},createAddWmsLayerFormPanel:function(){return new MapFish.API.AddWmsLayerFormPanel(this);},getReturnLine:function(html){var separator="\n";if(html){separator="<br>";}
return separator;},createApiCode:function(html){var separator=this.getReturnLine(html);var apiText='<html xmlns=\"http://www.w3.org/1999/xhtml\">';apiText=apiText+separator;apiText=apiText+"  <head>";apiText=apiText+separator;apiText=apiText+"    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf8\" />";apiText=apiText+separator;apiText=apiText+"    <meta name=\"content-language\" content=\"en\" />";apiText=apiText+separator;apiText=apiText+"    <title>API</title>";s=document.styleSheets;for(i=0;i<s.length;i++){apiText=apiText+separator;apiText=apiText+"    <link rel=\"stylesheet\" type=\"text/css\" href=\""+s[i].href+"\"/>";}
var scripts=document.getElementsByTagName('script');for(i=0;i<scripts.length;i++){var script=scripts[i];if(script.src.indexOf('init.js')<0&&script.src.indexOf('ws.geonames.org')<0){apiText=apiText+separator;apiText=apiText+"    <script type=\"text/javascript\" src=\""+script.src+"\"></script>";}}
apiText=apiText+separator;apiText=apiText+"  <script type=\"text/javascript\">"+separator;apiText=apiText+"    Ext.onReady(function() {"+separator;apiText=apiText+"      geo = new "+this.apiName+".API();"+separator;apiText=apiText+this.getCreateMapDescription(html);apiText=apiText+"      geo.createMap({"+separator;apiText=apiText+"         div: 'mymap1',"+separator;apiText=apiText+"         zoom: "+this.map.zoom+","+separator,apiText=apiText+"         easting: "+this.map.getCenter().lon+","+separator,apiText=apiText+"         northing: "+this.map.getCenter().lat+separator,apiText=apiText+"      });"+separator;var cbShowMarker=Ext.getCmp('cbMarkerApiFormPanel');if(cbShowMarker){if(cbShowMarker.getValue()){apiText=apiText+this.getShowMarkerDescription(html);apiText=apiText+"      geo.showMarker();"+separator;}}
var cbShowPopup=Ext.getCmp('cbPopupApiFormPanel');if(cbShowPopup){if(cbShowPopup.getValue()){apiText=apiText+this.getShowPopupDescription(html);apiText=apiText+"      geo.showPopup({"+separator;apiText=apiText+"         html: '"+Ext.getCmp('cbPopupContentApiFormPanel').getValue()+"'"+separator;apiText=apiText+"      });"+separator;}}
apiText=apiText+"    });"+separator;apiText=apiText+"  </script>"+separator;apiText=apiText+"  </head>";apiText=apiText+separator;apiText=apiText+"    <body>";apiText=apiText+separator;apiText=apiText+"       <div id=\"mymap1\" style=\"width:800px;height:600px;border:1px solid black;\"></div>";apiText=apiText+separator;apiText=apiText+"    </body>";apiText=apiText+separator;apiText=apiText+"</html>";apiText=apiText+separator;return apiText;},createMapPanel:function(config){var mapPanel;config=config||{};if(!this.map){var mapConfig=config.mapInfo||{};this.createMap(mapConfig);}
config.map=this.map;var center=this.map.getCenter();if(center){config.center=[center.lon,center.lat];}
var zoom=this.map.getZoom();if(zoom){config.zoom=zoom;}
if(config.showTools){var tbarConfig=config.toolbar||{};config.tbar=this.createToolbar(tbarConfig);}
if(config.renderTo){mapPanel=new GeoExt.MapPanel(config);}else{mapPanel=Ext.apply(config,{xtype:'gx_mappanel'});}
return mapPanel;},createLayerTree:function(config){config=config||{};var options={id:config.id,map:this.map,showWmsLegend:config.showWmsLegend,model:this.getLayerTreeModel(),plugins:[mapfish.widgets.LayerTree.createContextualMenuPlugin(['opacitySlideDirect'])]}
if(config.div){Ext.apply(options,{renderTo:config.div,height:'auto'});}else{Ext.apply(options,{title:config.title,listeners:{checkchange:function(node,checked){var permalink=this.map.getControl('mapfish.api.permalink');if(permalink){permalink.updateLink();}}}});}
this.tree=new mapfish.widgets.LayerTree(options);if(config.layers){var checkedNodes=this.tree.getChecked();for(var i=0,n=checkedNodes.length;i<n;i++){this.tree.setNodeChecked(checkedNodes[i],false);}
for(var i=0,n=config.layers.length;i<n;i++){var layer=config.layers[i];var node=this.tree.nodeIdToNode[layer];this.tree.setNodeChecked(node,true);}}
return this.tree;},createToolbar:function(config){config=Ext.apply({items:['ZoomToMaxExtent','Navigation','ZoomBox','LengthMeasure','AreaMeasure','NavigationHistory']},config);this.tools=[];for(var i=0;i<config.items.length;i++){this['init'+config.items[i]](config);}
return this.tools;},initSeparator:function(config){this.tools.push(new Ext.Toolbar.Spacer());this.tools.push(new Ext.Toolbar.Separator());this.tools.push(new Ext.Toolbar.Spacer());},initFillToolbar:function(config){this.tools.push('->');},initZoomToMaxExtent:function(config){var action=new GeoExt.Action(Ext.apply({map:this.map,control:new MapFish.API.ZoomToExtent(config.controls),iconCls:'zoomfull',tooltip:OpenLayers.i18n("max extent")},config.actions));this.tools.push(action);},initNavigation:function(config){var action=new Ext.Button(Ext.apply({toggleGroup:config.toggleGroup||'navigation',allowDepress:false,pressed:true,id:'navigationButton',tooltip:OpenLayers.i18n('pan'),iconCls:'pan'},config.actions));this.tools.push(action);},initZoomBox:function(config){var action=new GeoExt.Action(Ext.apply({map:this.map,control:new OpenLayers.Control.ZoomBox(config.controls),toggleGroup:config.toggleGroup||'navigation',allowDepress:false,tooltip:OpenLayers.i18n('zoom box'),iconCls:'zoomin'},config.actions));this.tools.push(action);},initZoomOut:function(config){var action=new GeoExt.Action(Ext.apply({map:this.map,control:new OpenLayers.Control.ZoomBox(Ext.apply({out:true},config.controls)),toggleGroup:config.toggleGroup||'navigation',allowDepress:false,tooltip:OpenLayers.i18n('zoom out'),iconCls:'zoomout'},config.actions));this.tools.push(action);},initLengthMeasure:function(config){var measure=new MapFish.API.Measure(config.controls);var action=new GeoExt.Action(Ext.apply({map:this.map,control:measure.createLengthMeasureControl(),toggleGroup:config.toggleGroup||'navigation',allowDepress:false,tooltip:OpenLayers.i18n('length measure'),iconCls:'measureLength'},config.actions));this.tools.push(action);},initAreaMeasure:function(config){var measure=new MapFish.API.Measure(config.controls);var action=new GeoExt.Action(Ext.apply({map:this.map,control:measure.createAreaMeasureControl(),toggleGroup:config.toggleGroup||'navigation',allowDepress:false,tooltip:OpenLayers.i18n('area measure'),iconCls:'measureArea'},config.actions));this.tools.push(action);},initNavigationHistory:function(config){var history=new OpenLayers.Control.NavigationHistory(config.controls);history.activate();this.map.addControl(history);var action=new GeoExt.Action(Ext.apply({tooltip:OpenLayers.i18n("previous"),control:history.previous,iconCls:'previous',disabled:true},config.actions));this.tools.push(action);action=new GeoExt.Action(Ext.apply({tooltip:OpenLayers.i18n("next"),control:history.next,iconCls:'next',disabled:true},config.actions));this.tools.push(action);},initDrawFeature:function(config){var handlers=mapfish.Util.fixArray(config.drawHandlers||['Point','Path','Polygon']);for(var i=0;i<handlers.length;i++){var control=new OpenLayers.Control.DrawFeature(this.getDrawingLayer(),OpenLayers.Handler[handlers[i]],config.controls);this.map.addControl(control);var action=new GeoExt.Action(Ext.apply({map:this.map,control:control,toggleGroup:config.toggleGroup||'navigation',allowDepress:false,iconCls:'draw'+handlers[i]},config.actions));this.tools.push(action);}},initClearFeatures:function(config){var scope=this;var action=new Ext.Button(Ext.apply({handler:function(){scope.getDrawingLayer().destroyFeatures()},iconCls:'clearfeatures'},config.actions));this.tools.push(action);},showFeatureTooltip:function(config){if(!config.layer||!config.id)return;this.getSearcher().recenterProtocol.read({params:{layer:config.layer,id:config.id}});},recenterOnObjects:function(layer,ids,pointZoomLevel){if(this.isMainApp){OpenLayers.Request.GET({url:this.baseConfig.baseUrl+this.recenterUrl,params:{layers:layer,ids:ids},success:function(response){var f=new OpenLayers.Format.JSON();var bbox=f.read(response.responseText);this.recenterOnBbox(bbox,pointZoomLevel);},scope:this});}else{var ds=new Ext.data.Store({proxy:new Ext.data.ScriptTagProxy({url:this.baseConfig.baseUrl+this.recenterUrl}),reader:new Ext.data.JsonReader({root:"rows",totalProperty:"results"},[{name:'bbox'}])});ds.load({params:{layers:layer,ids:[ids],cb:'mapFishApiPool.apiRefs['+this.apiId+'].recenterOnBboxCb('+pointZoomLevel+')'}});}},highlightObjects:function(layer,ids){var ds=new Ext.data.Store({proxy:new Ext.data.ScriptTagProxy({url:this.baseConfig.baseUrl+this.highlightUrl}),reader:new Ext.data.JsonReader({root:"rows",totalProperty:"results"},[{name:'features'}])});ds.load({params:{layers:layer,ids:[ids],cb:'mapFishApiPool.apiRefs['+this.apiId+'].highlightObjectsCb'}});},showFeatures:function(layer,ids,pointZoomLevel){this.recenterOnObjects(layer,ids,pointZoomLevel);this.highlightObjects(layer,ids);},showMarker:function(options){options=options||{};var easting;var northing;var iconPath;var recenter;var graphicHeight;var graphicWidth;var fillOpacity;var html;if(options.easting){easting=options.easting;}else{easting=this.map.getCenter().lon;}
if(options.northing){northing=options.northing;}else{northing=this.map.getCenter().lat;}
if(options.iconPath){if(options.iconPath.indexOf('http://')==0){iconPath=this.getIconPath(options.iconPath);}else{if(options.iconPath.indexOf('/')==0){iconPath=this.baseConfig.baseUrl+this.getIconPath(options.iconPath);}else{iconPath=this.baseConfig.baseUrl+'/'+this.getIconPath(options.iconPath);}}}else{iconPath=this.baseConfig.baseUrl+"/mfbase/openlayers/img/marker-gold.png";}
if(options.recenter){if(options.recenter=="true"||options.recenter=="True"||options.recenter=="TRUE"){recenter="true";}else{recenter="false";}}else{recenter="false";}
if(options.graphicHeight){graphicHeight=options.graphicHeight;}else{var graphic=new Image();graphic.src=this.getIconPath(iconPath);if(graphic.height){graphicHeight=graphic.height;}else{graphicHeight=25;}}
if(options.graphicWidth){graphicWidth=options.graphicWidth;}else{var graphic=new Image();graphic.src=this.getIconPath(iconPath);if(graphic.width){graphicWidth=graphic.width;}else{graphicWidth=25;}}
if(options.fillOpacity){fillOpacity=options.fillOpacity;}else{fillOpacity=1;}
if(options.html){html=options.html;}else{html=null;}
var style_mark=OpenLayers.Util.extend({},OpenLayers.Feature.Vector.style['default']);style_mark.externalGraphic=this.getIconPath(iconPath);style_mark.fillOpacity=fillOpacity;style_mark.graphicHeight=graphicHeight;style_mark.graphicWidth=graphicWidth;var features=new Array(1);features[0]=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(easting,northing),{html:html},style_mark);this.drawLayer.addFeatures(features);if(recenter=="true"){this.map.setCenter(new OpenLayers.LonLat(easting,northing));}
return features;},getShowMarkerDescription:function(html){var separator=this.getReturnLine(html);var comment="      // showMarker config parameters"+separator;comment=comment+"      //  easting - position of the marker, default: map center"+separator;comment=comment+"      //  northing - position of the marker, default: map center"+separator;comment=comment+"      //  iconPath - path of a custom icon for the marker (url or relative), default: /mfbase/openlayers/img/marker-gold.png"+separator;comment=comment+"      //  recenter - define if the map has to recentered at the marker position, default: false"+separator;comment=comment+"      //  graphicHeight - height of the height, default: the icon height"+separator;comment=comment+"      //  graphicWidth - width of the height, default: the icon width"+separator;comment=comment+"      //  fillOpacity - opacity of the marker (from 0 to 1), default: 1"+separator;comment=comment+"      //  html - html content of a popup, default: null"+separator;return comment;},showPopup:function(options){options=options||{};var easting;var northing;var title;var html;var recenter;var width;var collapsible;var unpinnable;var feature;if(options.feature){feature=options.feature;html=options.feature.attributes.html;}else{if(options.easting){easting=options.easting;}else{easting=this.map.getCenter().lon;}
if(options.northing){northing=options.northing;}else{northing=this.map.getCenter().lat;}
if(options.html){html=options.html;}else{html=null;}}
if(options.title){title=options.title;}else{title="";}
if(options.recenter){if(options.recenter=="true"||options.recenter=="True"||options.recenter=="TRUE"){recenter="true";}else{recenter="false";}}else{recenter="false";}
if(options.width){width=options.width;}else{width=200;}
if(options.collapsible){collapsible=options.collapsible;}else{collapsible=false;}
if(options.unpinnable){unpinnable=options.unpinnable;}else{unpinnable=true;}
if(this.popup){this.popup.close();}
if(html){this.popup=new GeoExt.Popup({map:this.map,feature:feature,title:title,lonlat:new OpenLayers.LonLat(easting,northing),width:width,html:html,collapsible:collapsible,unpinnable:unpinnable});if(feature){this.popup.on({close:function(){if(OpenLayers.Util.indexOf(this.drawLayer.selectedFeatures,feature)>-1){this.selectCtrl.unselect(feature);}},scope:this});}
this.popup.show();}
if(recenter=="true"){this.map.setCenter(new OpenLayers.LonLat(easting,northing));}},getShowPopupDescription:function(html){var separator=this.getReturnLine(html);var comment="      // showPopup config parameters"+separator;comment=comment+"      //  easting - position of the popup - default: map center"+separator;comment=comment+"      //  northing - position of the popup, default: map center"+separator;comment=comment+"      //  title - title of the window, default: "+separator;comment=comment+"      //  html - html content of the popup, default: '' . If empty, no popup is shown"+separator;comment=comment+"      //  recenter - define if the map has to recentered at the popup position, default: false"+separator;comment=comment+"      //  width - width of the popup, default: 200"+separator;comment=comment+"      //  collapsible - default: false"+separator;comment=comment+"      //  unpinnable - default: true"+separator;comment=comment+"      //  feature - feature associated with the popup"+separator;return comment;},updateLayerTreeFromPermalink:function(){var layertree=this.tree;if(layertree&&this.layerTreeNodes.length>0){var checkedNodes=layertree.getChecked();for(var i=0,len=checkedNodes.length;i<len;i++){layertree.setNodeChecked(checkedNodes[i],false);}
for(var i=0,len=this.layerTreeNodes.length;i<len;i++){var nodeId=layertree.nodeIdToNode[this.layerTreeNodes[i]];if(nodeId){layertree.setNodeChecked(nodeId,true);}}}},recenterOnBboxCb:function(r,pointZoomLevel){this.recenterOnBbox(r.rows[0].bbox);},recenterOnBbox:function(bbox,pointZoomLevel){var bounds=new OpenLayers.Bounds(bbox[0],bbox[1],bbox[2],bbox[3]);if(bounds.getWidth()&&bounds.getHeight()){this.map.zoomToExtent(bounds);}else{var center=bounds.getCenterLonLat();if(center.lat&&center.lon){if(pointZoomLevel){this.map.setCenter(center,pointZoomLevel);}else{this.map.setCenter(center,19);}}}},highlightObjectsCb:function(r){var geo=new OpenLayers.Format.GeoJSON();var features=geo.read(r.rows[0].features);if(features){var layer=this.getDrawingLayer();layer.addFeatures(features);}},getDrawingLayer:function(){if(!this.drawLayer){var myStyles=new OpenLayers.StyleMap({"default":new OpenLayers.Style({pointRadius:"10",fillColor:"#FFFF00",fillOpacity:0.8,strokeColor:"#FF8000",strokeOpacity:0.8,strokeWidth:2})});this.drawLayer=new OpenLayers.Layer.Vector("Drawings layer",{displayInLayerSwitcher:false,styleMap:myStyles});if(!this.selectCtrl){this.selectCtrl=new OpenLayers.Control.SelectFeature(this.drawLayer);this.map.addControl(this.selectCtrl);this.selectCtrl.activate();this.drawLayer.events.on({featureselected:function(e){if(this.activatePopup){this.showPopup({feature:e.feature});};document.body.style.cursor='default';},scope:this});}}
return this.drawLayer;},getLayers:function(config){return null;},getControls:function(config){return null;},getMapOptions:function(){return null;},getLayerTreeModel:function(){return null;},getSearcher:function(){if(!this.searcher){this.searcher=new MapFish.API.Search({api:this,url:this.baseConfig.searchUrl});}
return this.searcher;},getIconPath:function(iconPath){return iconPath;}});OpenLayers.Control.MousePosition=OpenLayers.Class(OpenLayers.Control,{element:null,prefix:'',separator:', ',suffix:'',numDigits:5,granularity:10,emptyString:null,lastXy:null,displayProjection:null,initialize:function(options){OpenLayers.Control.prototype.initialize.apply(this,arguments);},destroy:function(){if(this.map){this.map.events.unregister('mousemove',this,this.redraw);}
OpenLayers.Control.prototype.destroy.apply(this,arguments);},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.element){this.div.left="";this.div.top="";this.element=this.div;}
this.redraw();return this.div;},redraw:function(evt){var lonLat;if(evt==null){this.reset();return;}else{if(this.lastXy==null||Math.abs(evt.xy.x-this.lastXy.x)>this.granularity||Math.abs(evt.xy.y-this.lastXy.y)>this.granularity)
{this.lastXy=evt.xy;return;}
lonLat=this.map.getLonLatFromPixel(evt.xy);if(!lonLat){return;}
if(this.displayProjection){lonLat.transform(this.map.getProjectionObject(),this.displayProjection);}
this.lastXy=evt.xy;}
var newHtml=this.formatOutput(lonLat);if(newHtml!=this.element.innerHTML){this.element.innerHTML=newHtml;}},reset:function(evt){if(this.emptyString!=null){this.element.innerHTML=this.emptyString;}},formatOutput:function(lonLat){var digits=parseInt(this.numDigits);var newHtml=this.prefix+
lonLat.lon.toFixed(digits)+
this.separator+
lonLat.lat.toFixed(digits)+
this.suffix;return newHtml;},setMap:function(){OpenLayers.Control.prototype.setMap.apply(this,arguments);this.map.events.register('mousemove',this,this.redraw);this.map.events.register('mouseout',this,this.reset);},CLASS_NAME:"OpenLayers.Control.MousePosition"});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(xy){this.panned=true;this.map.pan(this.handler.last.x-xy.x,this.handler.last.y-xy.y,{dragging:this.handler.dragging,animate:false});},panMapDone:function(xy){if(this.panned){this.panMap(xy);this.panned=false;}},CLASS_NAME:"OpenLayers.Control.DragPan"});OpenLayers.Handler.MouseWheel=OpenLayers.Class(OpenLayers.Handler,{wheelListener:null,mousePosition:null,interval:0,delta:0,cumulative:true,initialize:function(control,callbacks,options){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(e){if(!this.map||!this.checkModifiers(e)){return;}
var overScrollableDiv=false;var overLayerDiv=false;var overMapDiv=false;var elem=OpenLayers.Event.element(e);while((elem!=null)&&!overMapDiv&&!overScrollableDiv){if(!overScrollableDiv){try{if(elem.currentStyle){overflow=elem.currentStyle["overflow"];}else{var style=document.defaultView.getComputedStyle(elem,null);var overflow=style.getPropertyValue("overflow");}
overScrollableDiv=(overflow&&(overflow=="auto")||(overflow=="scroll"));}catch(err){}}
if(!overLayerDiv){for(var i=0,len=this.map.layers.length;i<len;i++){if(elem==this.map.layers[i].div||elem==this.map.layers[i].pane){overLayerDiv=true;break;}}}
overMapDiv=(elem==this.map.div);elem=elem.parentNode;}
if(!overScrollableDiv&&overMapDiv){if(overLayerDiv){var delta=0;if(!e){e=window.event;}
if(e.wheelDelta){delta=e.wheelDelta/120;if(window.opera&&window.opera.version()<9.2){delta=-delta;}}else if(e.detail){delta=-e.detail/3;}
this.delta=this.delta+delta;if(this.interval){window.clearTimeout(this._timeoutId);this._timeoutId=window.setTimeout(OpenLayers.Function.bind(function(){this.wheelZoom(e);},this),this.interval);}else{this.wheelZoom(e);}}
OpenLayers.Event.stop(e);}},wheelZoom:function(e){var delta=this.delta;this.delta=0;if(delta){if(this.mousePosition){e.xy=this.mousePosition;}
if(!e.xy){e.xy=this.map.getPixelFromLonLat(this.map.getCenter());}
if(delta<0){this.callback("down",[e,this.cumulative?delta:-1]);}else{this.callback("up",[e,this.cumulative?delta:1]);}}},mousemove:function(evt){this.mousePosition=evt.xy;},activate:function(evt){if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){var wheelListener=this.wheelListener;OpenLayers.Event.observe(window,"DOMMouseScroll",wheelListener);OpenLayers.Event.observe(window,"mousewheel",wheelListener);OpenLayers.Event.observe(document,"mousewheel",wheelListener);return true;}else{return false;}},deactivate:function(evt){if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){var wheelListener=this.wheelListener;OpenLayers.Event.stopObserving(window,"DOMMouseScroll",wheelListener);OpenLayers.Event.stopObserving(window,"mousewheel",wheelListener);OpenLayers.Event.stopObserving(document,"mousewheel",wheelListener);return true;}else{return false;}},CLASS_NAME:"OpenLayers.Handler.MouseWheel"});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(options){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 clickCallbacks={'dblclick':this.defaultDblClick,'dblrightclick':this.defaultDblRightClick};var clickOptions={'double':true,'stopDouble':true};this.handlers.click=new OpenLayers.Handler.Click(this,clickCallbacks,clickOptions);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(evt){var newCenter=this.map.getLonLatFromViewPortPx(evt.xy);this.map.setCenter(newCenter,this.map.zoom+1);},defaultDblRightClick:function(evt){var newCenter=this.map.getLonLatFromViewPortPx(evt.xy);this.map.setCenter(newCenter,this.map.zoom-1);},wheelChange:function(evt,deltaZ){var currentZoom=this.map.getZoom();var newZoom=this.map.getZoom()+Math.round(deltaZ);newZoom=Math.max(newZoom,0);newZoom=Math.min(newZoom,this.map.getNumZoomLevels());if(newZoom===currentZoom){return;}
var size=this.map.getSize();var deltaX=size.w/2-evt.xy.x;var deltaY=evt.xy.y-size.h/2;var newRes=this.map.baseLayer.getResolutionForZoom(newZoom);var zoomPoint=this.map.getLonLatFromPixel(evt.xy);var newCenter=new OpenLayers.LonLat(zoomPoint.lon+deltaX*newRes,zoomPoint.lat+deltaY*newRes);this.map.setCenter(newCenter,newZoom);},wheelUp:function(evt,delta){this.wheelChange(evt,delta||1);},wheelDown:function(evt,delta){this.wheelChange(evt,delta||-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.Control.OverviewMap=OpenLayers.Class(OpenLayers.Control,{element:null,ovmap:null,size:new OpenLayers.Size(180,90),layers:null,minRectSize:15,minRectDisplayClass:"RectReplacement",minRatio:8,maxRatio:32,mapOptions:null,autoPan:false,handlers:null,resolutionFactor:1,initialize:function(options){this.layers=[];this.handlers={};OpenLayers.Control.prototype.initialize.apply(this,[options]);},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 layer=this.map.baseLayer.clone();this.layers=[layer];}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 imgLocation=OpenLayers.Util.getImagesLocation();var img=imgLocation+'layer-switcher-maximize.png';this.maximizeDiv=OpenLayers.Util.createAlphaImageDiv(this.displayClass+'MaximizeButton',null,new OpenLayers.Size(18,18),img,'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 img=imgLocation+'layer-switcher-minimize.png';this.minimizeDiv=OpenLayers.Util.createAlphaImageDiv('OpenLayers_Control_minimizeDiv',null,new OpenLayers.Size(18,18),img,'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 eventsToStop=['dblclick','mousedown'];for(var i=0,len=eventsToStop.length;i<len;i++){OpenLayers.Event.observe(this.maximizeDiv,eventsToStop[i],OpenLayers.Event.stop);OpenLayers.Event.observe(this.minimizeDiv,eventsToStop[i],OpenLayers.Event.stop);}
this.minimizeControl();}else{this.element.style.display='';}
if(this.map.getExtent()){this.update();}
this.map.events.register('moveend',this,this.update);return this.div;},baseLayerDraw:function(){this.draw();this.map.events.unregister("changebaselayer",this,this.baseLayerDraw);},rectDrag:function(px){var deltaX=this.handlers.drag.last.x-px.x;var deltaY=this.handlers.drag.last.y-px.y;if(deltaX!=0||deltaY!=0){var rectTop=this.rectPxBounds.top;var rectLeft=this.rectPxBounds.left;var rectHeight=Math.abs(this.rectPxBounds.getHeight());var rectWidth=this.rectPxBounds.getWidth();var newTop=Math.max(0,(rectTop-deltaY));newTop=Math.min(newTop,this.ovmap.size.h-this.hComp-rectHeight);var newLeft=Math.max(0,(rectLeft-deltaX));newLeft=Math.min(newLeft,this.ovmap.size.w-this.wComp-rectWidth);this.setRectPxBounds(new OpenLayers.Bounds(newLeft,newTop+rectHeight,newLeft+rectWidth,newTop));}},mapDivClick:function(evt){var pxCenter=this.rectPxBounds.getCenterPixel();var deltaX=evt.xy.x-pxCenter.x;var deltaY=evt.xy.y-pxCenter.y;var top=this.rectPxBounds.top;var left=this.rectPxBounds.left;var height=Math.abs(this.rectPxBounds.getHeight());var width=this.rectPxBounds.getWidth();var newTop=Math.max(0,(top+deltaY));newTop=Math.min(newTop,this.ovmap.size.h-height);var newLeft=Math.max(0,(left+deltaX));newLeft=Math.min(newLeft,this.ovmap.size.w-width);this.setRectPxBounds(new OpenLayers.Bounds(newLeft,newTop+height,newLeft+width,newTop));this.updateMapToRect();},maximizeControl:function(e){this.element.style.display='';this.showToggle(false);if(e!=null){OpenLayers.Event.stop(e);}},minimizeControl:function(e){this.element.style.display='none';this.showToggle(true);if(e!=null){OpenLayers.Event.stop(e);}},showToggle:function(minimize){this.maximizeDiv.style.display=minimize?'':'none';this.minimizeDiv.style.display=minimize?'none':'';},update:function(){if(this.ovmap==null){this.createMap();}
if(this.autoPan||!this.isSuitableOverview()){this.updateOverview();}
this.updateRectToMap();},isSuitableOverview:function(){var mapExtent=this.map.getExtent();var maxExtent=this.map.maxExtent;var testExtent=new OpenLayers.Bounds(Math.max(mapExtent.left,maxExtent.left),Math.max(mapExtent.bottom,maxExtent.bottom),Math.min(mapExtent.right,maxExtent.right),Math.min(mapExtent.top,maxExtent.top));if(this.ovmap.getProjection()!=this.map.getProjection()){testExtent=testExtent.transform(this.map.getProjectionObject(),this.ovmap.getProjectionObject());}
var resRatio=this.ovmap.getResolution()/this.map.getResolution();return((resRatio>this.minRatio)&&(resRatio<=this.maxRatio)&&(this.ovmap.getExtent().containsBounds(testExtent)));},updateOverview:function(){var mapRes=this.map.getResolution();var targetRes=this.ovmap.getResolution();var resRatio=targetRes/mapRes;if(resRatio>this.maxRatio){targetRes=this.minRatio*mapRes;}else if(resRatio<=this.minRatio){targetRes=this.maxRatio*mapRes;}
var center;if(this.ovmap.getProjection()!=this.map.getProjection()){center=this.map.center.clone();center.transform(this.map.getProjectionObject(),this.ovmap.getProjectionObject());}else{center=this.map.center;}
this.ovmap.setCenter(center,this.ovmap.getZoomForResolution(targetRes*this.resolutionFactor));this.updateRectToMap();},createMap:function(){var options=OpenLayers.Util.extend({controls:[],maxResolution:'auto',fallThrough:false},this.mapOptions);this.ovmap=new OpenLayers.Map(this.mapDiv,options);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(e){if(!this.handlers.drag.active&&!this.map.dragging){this.handlers.drag.activate();}});this.rectEvents.register("mouseout",this,function(e){if(!this.handlers.drag.dragging){this.handlers.drag.deactivate();}});if(this.ovmap.getProjection()!=this.map.getProjection()){var sourceUnits=this.map.getProjectionObject().getUnits()||this.map.units||this.map.baseLayer.units;var targetUnits=this.ovmap.getProjectionObject().getUnits()||this.ovmap.units||this.ovmap.baseLayer.units;this.resolutionFactor=sourceUnits&&targetUnits?OpenLayers.INCHES_PER_UNIT[sourceUnits]/OpenLayers.INCHES_PER_UNIT[targetUnits]:1;}},updateRectToMap:function(){var bounds;if(this.ovmap.getProjection()!=this.map.getProjection()){bounds=this.map.getExtent().transform(this.map.getProjectionObject(),this.ovmap.getProjectionObject());}else{bounds=this.map.getExtent();}
var pxBounds=this.getRectBoundsFromMapBounds(bounds);if(pxBounds){this.setRectPxBounds(pxBounds);}},updateMapToRect:function(){var lonLatBounds=this.getMapBoundsFromRectBounds(this.rectPxBounds);if(this.ovmap.getProjection()!=this.map.getProjection()){lonLatBounds=lonLatBounds.transform(this.ovmap.getProjectionObject(),this.map.getProjectionObject());}
this.map.panTo(lonLatBounds.getCenterLonLat());},setRectPxBounds:function(pxBounds){var top=Math.max(pxBounds.top,0);var left=Math.max(pxBounds.left,0);var bottom=Math.min(pxBounds.top+Math.abs(pxBounds.getHeight()),this.ovmap.size.h-this.hComp);var right=Math.min(pxBounds.left+pxBounds.getWidth(),this.ovmap.size.w-this.wComp);var width=Math.max(right-left,0);var height=Math.max(bottom-top,0);if(width<this.minRectSize||height<this.minRectSize){this.extentRectangle.className=this.displayClass+
this.minRectDisplayClass;var rLeft=left+(width/2)-(this.minRectSize/2);var rTop=top+(height/2)-(this.minRectSize/2);this.extentRectangle.style.top=Math.round(rTop)+'px';this.extentRectangle.style.left=Math.round(rLeft)+'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(top)+'px';this.extentRectangle.style.left=Math.round(left)+'px';this.extentRectangle.style.height=Math.round(height)+'px';this.extentRectangle.style.width=Math.round(width)+'px';}
this.rectPxBounds=new OpenLayers.Bounds(Math.round(left),Math.round(bottom),Math.round(right),Math.round(top));},getRectBoundsFromMapBounds:function(lonLatBounds){var leftBottomLonLat=new OpenLayers.LonLat(lonLatBounds.left,lonLatBounds.bottom);var rightTopLonLat=new OpenLayers.LonLat(lonLatBounds.right,lonLatBounds.top);var leftBottomPx=this.getOverviewPxFromLonLat(leftBottomLonLat);var rightTopPx=this.getOverviewPxFromLonLat(rightTopLonLat);var bounds=null;if(leftBottomPx&&rightTopPx){bounds=new OpenLayers.Bounds(leftBottomPx.x,leftBottomPx.y,rightTopPx.x,rightTopPx.y);}
return bounds;},getMapBoundsFromRectBounds:function(pxBounds){var leftBottomPx=new OpenLayers.Pixel(pxBounds.left,pxBounds.bottom);var rightTopPx=new OpenLayers.Pixel(pxBounds.right,pxBounds.top);var leftBottomLonLat=this.getLonLatFromOverviewPx(leftBottomPx);var rightTopLonLat=this.getLonLatFromOverviewPx(rightTopPx);return new OpenLayers.Bounds(leftBottomLonLat.lon,leftBottomLonLat.lat,rightTopLonLat.lon,rightTopLonLat.lat);},getLonLatFromOverviewPx:function(overviewMapPx){var size=this.ovmap.size;var res=this.ovmap.getResolution();var center=this.ovmap.getExtent().getCenterLonLat();var delta_x=overviewMapPx.x-(size.w/2);var delta_y=overviewMapPx.y-(size.h/2);return new OpenLayers.LonLat(center.lon+delta_x*res,center.lat-delta_y*res);},getOverviewPxFromLonLat:function(lonlat){var res=this.ovmap.getResolution();var extent=this.ovmap.getExtent();var px=null;if(extent){px=new OpenLayers.Pixel(Math.round(1/res*(lonlat.lon-extent.left)),Math.round(1/res*(extent.top-lonlat.lat)));}
return px;},CLASS_NAME:'OpenLayers.Control.OverviewMap'});OpenLayers.Control.Scale=OpenLayers.Class(OpenLayers.Control,{element:null,initialize:function(element,options){OpenLayers.Control.prototype.initialize.apply(this,[options]);this.element=OpenLayers.Util.getElement(element);},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 scale=this.map.getScale();if(!scale){return;}
if(scale>=9500&&scale<=950000){scale=Math.round(scale/1000)+"K";}else if(scale>=950000){scale=Math.round(scale/1000000)+"M";}else{scale=Math.round(scale);}
this.element.innerHTML=OpenLayers.i18n("scale",{'scaleDenom':scale});},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(options){OpenLayers.Control.prototype.initialize.apply(this,[options]);},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.eTop){this.eTop=document.createElement("div");this.eTop.className=this.displayClass+"Top";var theLen=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(maxLen){var digits=parseInt(Math.log(maxLen)/Math.log(10));var pow10=Math.pow(10,digits);var firstChar=parseInt(maxLen/pow10);var barLen;if(firstChar>5){barLen=5;}else if(firstChar>2){barLen=2;}else{barLen=1;}
return barLen*pow10;},update:function(){var res=this.map.getResolution();if(!res){return;}
var curMapUnits=this.map.getUnits();var inches=OpenLayers.INCHES_PER_UNIT;var maxSizeData=this.maxWidth*res*inches[curMapUnits];var geodesicRatio=1;if(this.geodesic===true){var maxSizeGeodesic=this.getGeodesicLength(this.maxWidth);var maxSizeKilometers=maxSizeData/inches["km"];geodesicRatio=maxSizeGeodesic/maxSizeKilometers;maxSizeData*=geodesicRatio;}
var topUnits;var bottomUnits;if(maxSizeData>100000){topUnits=this.topOutUnits;bottomUnits=this.bottomOutUnits;}else{topUnits=this.topInUnits;bottomUnits=this.bottomInUnits;}
var topMax=maxSizeData/inches[topUnits];var bottomMax=maxSizeData/inches[bottomUnits];var topRounded=this.getBarLen(topMax);var bottomRounded=this.getBarLen(bottomMax);topMax=topRounded/inches[curMapUnits]*inches[topUnits];bottomMax=bottomRounded/inches[curMapUnits]*inches[bottomUnits];var topPx=topMax/res/geodesicRatio;var bottomPx=bottomMax/res/geodesicRatio;if(this.eBottom.style.visibility=="visible"){this.eBottom.style.width=Math.round(bottomPx)+"px";this.eBottom.innerHTML=bottomRounded+" "+bottomUnits;}
if(this.eTop.style.visibility=="visible"){this.eTop.style.width=Math.round(topPx)+"px";this.eTop.innerHTML=topRounded+" "+topUnits;}},getGeodesicLength:function(pixels){var map=this.map;var centerPx=map.getPixelFromLonLat(map.getCenter());var bottom=map.getLonLatFromPixel(centerPx.add(0,-pixels/2));var top=map.getLonLatFromPixel(centerPx.add(0,pixels/2));var source=map.getProjectionObject();var dest=new OpenLayers.Projection("EPSG:4326");if(!source.equals(dest)){bottom.transform(source,dest);top.transform(source,dest);}
return OpenLayers.Util.distVincenty(bottom,top);},CLASS_NAME:"OpenLayers.Control.ScaleLine"});OpenLayers.Layer.TileCache=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:true,format:'image/png',serverResolutions:null,initialize:function(name,url,layername,options){this.layername=layername;OpenLayers.Layer.Grid.prototype.initialize.apply(this,[name,url,{},options]);this.extension=this.format.split('/')[1].toLowerCase();this.extension=(this.extension=='jpg')?'jpeg':this.extension;},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.TileCache(this.name,this.url,this.layername,this.getOptions());}
obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);return obj;},getURL:function(bounds){var res=this.map.getResolution();var bbox=this.maxExtent;var size=this.tileSize;var tileX=Math.round((bounds.left-bbox.left)/(res*size.w));var tileY=Math.round((bounds.bottom-bbox.bottom)/(res*size.h));var tileZ=this.serverResolutions!=null?OpenLayers.Util.indexOf(this.serverResolutions,res):this.map.getZoom();function zeroPad(number,length){number=String(number);var zeros=[];for(var i=0;i<length;++i){zeros.push('0');}
return zeros.join('').substring(0,length-number.length)+number;}
var components=[this.layername,zeroPad(tileZ,2),zeroPad(parseInt(tileX/1000000),3),zeroPad((parseInt(tileX/1000)%1000),3),zeroPad((parseInt(tileX)%1000),3),zeroPad(parseInt(tileY/1000000),3),zeroPad((parseInt(tileY/1000)%1000),3),zeroPad((parseInt(tileY)%1000),3)+'.'+this.extension];var path=components.join('/');var url=this.url;if(url instanceof Array){url=this.selectUrl(path,url);}
url=(url.charAt(url.length-1)=='/')?url:url+'/';return url+path;},addTile:function(bounds,position){var url=this.getURL(bounds);return new OpenLayers.Tile.Image(this,position,bounds,url,this.tileSize);},CLASS_NAME:"OpenLayers.Layer.TileCache"});Ext.namespace("cdbund");cdbund.API=OpenLayers.Class(MapFish.API,{lang:'de',mapOptions:null,bgLayers:{},mapOpacitySlider:null,mapOpacityValue:100,initialize:function(config){MapFish.API.prototype.initialize.apply(this,arguments);this.baseConfig=cdbund.config;if(this.isMainApp){this.baseConfig.baseUrl='';}
if(config){Ext.apply(this.baseConfig,config);}},createSearchBox:function(config){config=config||{};var store=new Ext.data.JsonStore({proxy:new Ext.data.HttpProxy({url:this.baseConfig.searchUrl+'properties',method:'GET'}),baseParams:{lang:OpenLayers.Lang.getCode(),ref:config.ref||''},root:'results',fields:['label','listlabel','service','bbox','objectorig']});var tpl=new Ext.XTemplate('<tpl for="."><div class="x-combo-list-item {service}">','{listlabel}','</div></tpl>');var searchConfig={store:store,tpl:tpl,hideTrigger:true,minChars:2,queryDelay:50,emptyText:OpenLayers.i18n('Geo search...'),loadingText:OpenLayers.i18n('loadingText'),displayField:'label',cls:'cbSearchCls',ctCls:'cbSearchContainerCls',width:config.width||200};if(config.renderTo){searchConfig['renderTo']=config.renderTo;}
var search=new Ext.form.ComboBox(searchConfig);search.on('beforequery',function(queryEvent){var query=queryEvent.query;var coord_re=/([\d\.']+)[\s,]+([\d\.']+)/;var match=query.match(coord_re);if(match){var left=parseFloat(match[1].replace("'",""));var right=parseFloat(match[2].replace("'",""));var position=new OpenLayers.LonLat(left>right?left:right,right<left?right:left);var valid=false;if(this.map.maxExtent.containsLonLat(position)){valid=true;}else{position=new OpenLayers.LonLat(left<right?left:right,right>left?right:left);position.transform(new OpenLayers.Projection("EPSG:4326"),this.map.getProjectionObject());if(this.map.maxExtent.containsLonLat(position)){valid=true;}}
if(valid){this.map.setCenter(position,5);return false;}}
return true;},this);search.on('select',function(combo,record,index){var bbox=record.get('bbox');var service=record.get('service');if(bbox){if(service=='swissnames'){var objectorig=record.get('objectorig');if(objectorig=='LK500'){this.map.setCenter(OpenLayers.Bounds.fromArray(bbox).getCenterLonLat(),4);}else if(objectorig=='LK200'){this.map.setCenter(OpenLayers.Bounds.fromArray(bbox).getCenterLonLat(),5);}else if(objectorig=='LK100'){this.map.setCenter(OpenLayers.Bounds.fromArray(bbox).getCenterLonLat(),6);}else if(objectorig=='LK50'){this.map.setCenter(OpenLayers.Bounds.fromArray(bbox).getCenterLonLat(),7);}else if(objectorig=='LK25'){this.map.setCenter(OpenLayers.Bounds.fromArray(bbox).getCenterLonLat(),8);}else{this.map.zoomToExtent(OpenLayers.Bounds.fromArray(bbox));}}else{this.map.zoomToExtent(OpenLayers.Bounds.fromArray(bbox));}}},this);return search;},createMapOpacitySlider:function(config){config=config||{};this.handleMapOpacity();this.mapOpacitySlider=new GeoExt.LayerOpacitySlider(Ext.apply({cls:'mapopacityslider',layer:this.bgLayers['primaryLayer'],complementaryLayer:this.bgLayers['complementaryLayer'],changeVisibility:true,width:config.width||200,aggressive:true},config));return this.mapOpacitySlider;},createMap:function(config){this.map=MapFish.API.prototype.createMap.apply(this,arguments);if(this.isMainApp){if(this.map.zoom<2){this.map.zoomTo(1);}}
return this.map;},handleMapOpacity:function(){this.bgLayers['primaryLayer'].setOpacity(this.mapOpacityValue/100);if(this.mapOpacityValue==100){return;}
if(this.mapOpacityValue==0){this.bgLayers['primaryLayer'].setVisibility(false);this.bgLayers['complementaryLayer'].setVisibility(true);}else{this.bgLayers['primaryLayer'].setVisibility(true);this.bgLayers['complementaryLayer'].setVisibility(true);}},getMapOptions:function(){if(!this.mapOptions){this.mapOptions={projection:new OpenLayers.Projection("EPSG:21781"),units:"m",maxExtent:new OpenLayers.Bounds.fromArray(this.baseConfig.maxExtent),restrictedExtent:new OpenLayers.Bounds.fromArray(this.baseConfig.maxExtent),allOverlays:true,resolutions:this.baseConfig.resolutions};}
return this.mapOptions;},getLayers:function(config){return[new OpenLayers.Layer("void-layer",{isBaseLayer:true,visibility:false}),new OpenLayers.Layer.TileCache("pixelmaps-color",this.baseConfig.tilecacheDirectUrl,'Pixelmap_color_smaller',{format:'image/png',isBaseLayer:true,buffer:0,resolutions:this.baseConfig.pixelmapResolutions,transitionEffect:'resize',serverResolutions:this.baseConfig.serverResolutions}),new OpenLayers.Layer.TileCache("pixelmaps-gray",this.baseConfig.tilecacheDirectUrl,'Pixelmap_gray',{format:'image/png',isBaseLayer:true,visibility:false,buffer:0,resolutions:this.baseConfig.pixelmapResolutions,transitionEffect:'resize'}),new OpenLayers.Layer.TileCache("aerial",['http://t0.tilecache.ab-swisstopo.camptocamp.net/cache/','http://t1.tilecache.ab-swisstopo.camptocamp.net/cache/','http://t3.tilecache.ab-swisstopo.camptocamp.net/cache/'],'aerial_smaller',{format:'image/jpeg',isBaseLayer:true,visibility:false,buffer:0,transitionEffect:'resize',serverResolutions:this.baseConfig.serverResolutions}),new OpenLayers.Layer.WMS("admin",this.baseConfig.tilecacheUrl,{layers:['gemeinde','bezirke','kanton','suisse'],transparent:true,format:'image/png'},{isBaseLayer:false,visibility:false,buffer:0})];},getControls:function(config){var options=this.getMapOptions();return[new OpenLayers.Control.Navigation(),new OpenLayers.Control.ScaleLine(),new OpenLayers.Control.MousePosition({div:$('mousepos'),numDigits:0,prefix:OpenLayers.i18n('Coordinates (m): ')}),new OpenLayers.Control.OverviewMap({div:$('overviewmap'),layers:[new OpenLayers.Layer.Image("overview",this.baseConfig.baseUrl+"/gfx/keymap.png",new OpenLayers.Bounds(485000,65000,835000,298000),new OpenLayers.Size(150,99))],size:new OpenLayers.Size(180,100),isSuitableOverview:function(){return true;},mapOptions:{units:options.units,projection:options.projection,maxExtent:options.maxExtent,scales:[7000000]}}),new OpenLayers.Control.Scale($('scale'),{updateScale:function(){var scale=this.map.getScale();if(!scale){return;}
this.element.innerHTML=OpenLayers.i18n("scale",{scaleDenom:OpenLayers.Number.format(scale,0,"'")});}})];},getLayerTreeModel:function(){return[{text:OpenLayers.i18n('Background'),printText:'',expanded:false,children:[{text:OpenLayers.i18n('Administrative'),printText:'',checked:false,expanded:true,children:[{text:OpenLayers.i18n('Gemeinde'),printText:'',checked:false,layerName:'admin:gemeinde'},{text:OpenLayers.i18n('Bezirk'),printText:'',checked:false,layerName:'admin:bezirke'},{text:OpenLayers.i18n('Kanton'),printText:'',checked:false,layerName:'admin:kanton'},{text:OpenLayers.i18n('Schweiz'),printText:'',checked:false,layerName:'admin:suisse'}]},{text:OpenLayers.i18n('Nationales Maps'),printText:'',checked:true,layerName:'pixelmaps-color'},{text:OpenLayers.i18n('Grays Nationales Maps'),printText:'',checked:false,layerName:'pixelmaps-gray'},{text:OpenLayers.i18n('Aerial Images'),printText:'',checked:false,layerName:'aerial'},{text:OpenLayers.i18n('None'),printText:'',checked:false,layerName:'void-layer'}]}];},getMapOpacitySlider:function(){if(!this.mapOpacitySlider){this.mapOpacitySlider=this.createMapOpacitySlider();}
return this.mapOpacitySlider;}});OpenLayers.Layer.Image=OpenLayers.Class(OpenLayers.Layer,{isBaseLayer:true,url:null,extent:null,size:null,tile:null,aspectRatio:null,initialize:function(name,url,extent,size,options){this.url=url;this.extent=extent;this.maxExtent=extent;this.size=size;OpenLayers.Layer.prototype.initialize.apply(this,[name,options]);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(obj){if(obj==null){obj=new OpenLayers.Layer.Image(this.name,this.url,this.extent,this.size,this.getOptions());}
obj=OpenLayers.Layer.prototype.clone.apply(this,[obj]);return obj;},setMap:function(map){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(bounds,zoomChanged,dragging){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);var firstRendering=(this.tile==null);if(zoomChanged||firstRendering){this.setTileSize();var ul=new OpenLayers.LonLat(this.extent.left,this.extent.top);var ulPx=this.map.getLayerPxFromLonLat(ul);if(firstRendering){this.tile=new OpenLayers.Tile.Image(this,ulPx,this.extent,null,this.tileSize);this.addTileMonitoringHooks(this.tile);}else{this.tile.size=this.tileSize.clone();this.tile.position=ulPx.clone();}
this.tile.draw();}},setTileSize:function(){var tileWidth=this.extent.getWidth()/this.map.getResolution();var tileHeight=this.extent.getHeight()/this.map.getResolution();this.tileSize=new OpenLayers.Size(tileWidth,tileHeight);},addTileMonitoringHooks:function(tile){tile.onLoadStart=function(){this.events.triggerEvent("loadstart");};tile.events.register("loadstart",this,tile.onLoadStart);tile.onLoadEnd=function(){this.events.triggerEvent("loadend");};tile.events.register("loadend",this,tile.onLoadEnd);tile.events.register("unload",this,tile.onLoadEnd);},removeTileMonitoringHooks:function(tile){tile.unload();tile.events.un({"loadstart":tile.onLoadStart,"loadend":tile.onLoadEnd,"unload":tile.onLoadEnd,scope:this});},setUrl:function(newUrl){this.url=newUrl;this.tile.draw();},getURL:function(bounds){return this.url;},CLASS_NAME:"OpenLayers.Layer.Image"});function GetFlashVersionActivex(i){try{var control=new ActiveXObject('ShockwaveFlash.ShockwaveFlash.'+i);var version=control.GetVariable("$version");var temp=version.split(" ");var version_array=temp[1].split(",");return parseFloat(version_array[0]+"."+version_array[2]);}
catch(e){return 0.0;}}
function GetFlashVersionPlugin(){var flash_version=0.0;if(navigator.plugins!==null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var plugin_name=navigator.plugins["Shockwave Flash 2.0"]?"Shockwave Flash 2.0":"Shockwave Flash";var flash_desc=navigator.plugins[plugin_name].description;var desc_segments=flash_desc.split(" ");var major_segments=desc_segments[2].split(".");var major=major_segments[0];var minor_segments=(desc_segments[3]!="")?desc_segments[3].split("r"):desc_segments[4].split("r");var minor=minor_segments[1]>0?minor_segments[1]:0;flash_version=parseFloat(major+"."+minor);}
else{flash_version=-1;}}
else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1){flash_version=4;}
else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1){flash_version=3;}
else if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1){flash_version=2;}
else{flash_version=-1;}
return flash_version;}
function GetFlashVersion(){var is_ie=navigator.appVersion.toLowerCase().indexOf("msie")!=-1;var is_win=navigator.appVersion.toLowerCase().indexOf("win")!=-1;var is_opera=navigator.userAgent.toLowerCase().indexOf("opera")!=-1;for(i=12;i>0;i--){var flash_version=(is_ie&&is_win&&!is_opera)?GetFlashVersionActivex(i):GetFlashVersionPlugin();if(flash_version!==0){return flash_version;}}
return 0.0;}
Ext.namespace("GeoExt.ux.data");GeoExt.ux.data.formats=[['KML','OpenLayers.Format.KML',{extractStyles:true,extractAttributes:true,kmlns:"http://www.opengis.net/kml/2.2"}],['GeoJSON','OpenLayers.Format.GeoJSON',{}],['GeoRSS','OpenLayers.Format.GeoRSS',{}],['GML','OpenLayers.Format.GML',{}]];GeoExt.ux.data.formats.getFormatConfig=function(format){for(var i=0;i<GeoExt.ux.data.formats.length;i++){if(GeoExt.ux.data.formats[i][0]==format){return GeoExt.ux.data.formats[i][2];}}};GeoExt.ux.data.FormatStore=new Ext.data.SimpleStore({fields:['shortName','openLayersClass','formatConfig'],data:GeoExt.ux.data.formats});OpenLayers.Control.ArgParser=OpenLayers.Class(OpenLayers.Control,{center:null,zoom:null,layers:null,displayProjection:null,initialize:function(options){OpenLayers.Control.prototype.initialize.apply(this,arguments);},setMap:function(map){OpenLayers.Control.prototype.setMap.apply(this,arguments);for(var i=0,len=this.map.controls.length;i<len;i++){var control=this.map.controls[i];if((control!=this)&&(control.CLASS_NAME=="OpenLayers.Control.ArgParser")){if(control.displayProjection!=this.displayProjection){this.displayProjection=control.displayProjection;}
break;}}
if(i==this.map.controls.length){var args=OpenLayers.Util.getParameters();if(args.layers){this.layers=args.layers;this.map.events.register('addlayer',this,this.configureLayers);this.configureLayers();}
if(args.lat&&args.lon){this.center=new OpenLayers.LonLat(parseFloat(args.lon),parseFloat(args.lat));if(args.zoom){this.zoom=parseInt(args.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 i=0,len=this.layers.length;i<len;i++){var layer=this.map.layers[i];var c=this.layers.charAt(i);if(c=="B"){this.map.setBaseLayer(layer);}else if((c=="T")||(c=="F")){layer.setVisibility(c=="T");}}}},CLASS_NAME:"OpenLayers.Control.ArgParser"});Ext.namespace("MapFish");MapFish.API.ArgParser=OpenLayers.Class(OpenLayers.Control.ArgParser,{coordsParams:null,api:null,initialize:function(options){OpenLayers.Control.prototype.initialize.apply(this,arguments);this.api=options&&options.api;this.coordsParams=options&&options.coordsParams||{lon:'lon',lat:'lat'};},setMap:function(map){OpenLayers.Control.prototype.setMap.apply(this,arguments);var args=OpenLayers.Util.getParameters();if(args.layerNodes){if(typeof args.layerNodes=='string'){args.layerNodes=[args.layerNodes];}
if(this.api){this.api.layerTreeNodes=args.layerNodes;}}
var lon=args[this.coordsParams.lon];var lat=args[this.coordsParams.lat];if(lon&&lat){this.center=new OpenLayers.LonLat(parseFloat(lon),parseFloat(lat));if(args.zoom){this.zoom=parseInt(args.zoom);}
this.map.events.register('changebaselayer',this,this.setCenter);this.setCenter();}},CLASS_NAME:"MapFish.API.ArgParser"});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(control,callbacks,options){if(!(options&&options.layerOptions&&options.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 options=OpenLayers.Util.extend({displayInLayerSwitcher:false,calculateInRange:OpenLayers.Function.True},this.layerOptions);this.layer=new OpenLayers.Layer.Vector(this.CLASS_NAME,options);this.map.addLayer(this.layer);return true;},createFeature:function(pixel){var lonlat=this.map.getLonLatFromPixel(pixel);this.point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(lonlat.lon,lonlat.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(cancel){var key=cancel?"cancel":"done";this.drawing=false;this.mouseDown=false;this.lastDown=null;this.lastUp=null;this.callback(key,[this.geometryClone()]);if(cancel||!this.persist){this.destroyFeature();}},cancel:function(){this.finalize(true);},click:function(evt){OpenLayers.Event.stop(evt);return false;},dblclick:function(evt){OpenLayers.Event.stop(evt);return false;},modifyFeature:function(pixel){var lonlat=this.map.getLonLatFromPixel(pixel);this.point.geometry.x=lonlat.lon;this.point.geometry.y=lonlat.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 geometry=this.point&&this.point.geometry;if(geometry&&this.multi){geometry=new OpenLayers.Geometry.MultiPoint([geometry]);}
return geometry;},geometryClone:function(){var geom=this.getGeometry();return geom&&geom.clone();},mousedown:function(evt){if(!this.checkModifiers(evt)){return true;}
if(this.lastDown&&this.lastDown.equals(evt.xy)){return true;}
this.drawing=true;if(this.lastDown==null){if(this.persist){this.destroyFeature();}
this.createFeature(evt.xy);}else{this.modifyFeature(evt.xy);}
this.lastDown=evt.xy;return false;},mousemove:function(evt){if(this.drawing){this.modifyFeature(evt.xy);}
return true;},mouseup:function(evt){if(this.drawing){this.finalize();return false;}else{return true;}},CLASS_NAME:"OpenLayers.Handler.Point"});OpenLayers.Handler.Path=OpenLayers.Class(OpenLayers.Handler.Point,{line:null,freehand:false,freehandToggle:'shiftKey',initialize:function(control,callbacks,options){OpenLayers.Handler.Point.prototype.initialize.apply(this,arguments);},createFeature:function(pixel){var lonlat=this.control.map.getLonLatFromPixel(pixel);this.point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(lonlat.lon,lonlat.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(pixel){this.layer.removeFeatures([this.point]);var lonlat=this.control.map.getLonLatFromPixel(pixel);this.point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(lonlat.lon,lonlat.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(evt){return(this.freehandToggle&&evt[this.freehandToggle])?!this.freehand:this.freehand;},modifyFeature:function(pixel){var lonlat=this.control.map.getLonLatFromPixel(pixel);this.point.geometry.x=lonlat.lon;this.point.geometry.y=lonlat.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 geometry=this.line&&this.line.geometry;if(geometry&&this.multi){geometry=new OpenLayers.Geometry.MultiLineString([geometry]);}
return geometry;},mousedown:function(evt){if(this.lastDown&&this.lastDown.equals(evt.xy)){return false;}
if(this.lastDown==null){if(this.persist){this.destroyFeature();}
this.createFeature(evt.xy);}else if((this.lastUp==null)||!this.lastUp.equals(evt.xy)){this.addPoint(evt.xy);}
this.mouseDown=true;this.lastDown=evt.xy;this.drawing=true;return false;},mousemove:function(evt){if(this.drawing){if(this.mouseDown&&this.freehandMode(evt)){this.addPoint(evt.xy);}else{this.modifyFeature(evt.xy);}}
return true;},mouseup:function(evt){this.mouseDown=false;if(this.drawing){if(this.freehandMode(evt)){this.removePoint();this.finalize();}else{if(this.lastUp==null){this.addPoint(evt.xy);}
this.lastUp=evt.xy;}
return false;}
return true;},dblclick:function(evt){if(!this.freehandMode(evt)){var index=this.line.geometry.components.length-1;this.line.geometry.removeComponent(this.line.geometry.components[index]);this.removePoint();this.finalize();}
return false;},CLASS_NAME:"OpenLayers.Handler.Path"});OpenLayers.Handler.Polygon=OpenLayers.Class(OpenLayers.Handler.Path,{polygon:null,initialize:function(control,callbacks,options){OpenLayers.Handler.Path.prototype.initialize.apply(this,arguments);},createFeature:function(pixel){var lonlat=this.control.map.getLonLatFromPixel(pixel);this.point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(lonlat.lon,lonlat.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 geometry=this.polygon&&this.polygon.geometry;if(geometry&&this.multi){geometry=new OpenLayers.Geometry.MultiPolygon([geometry]);}
return geometry;},dblclick:function(evt){if(!this.freehandMode(evt)){var index=this.line.geometry.components.length-2;this.line.geometry.removeComponent(this.line.geometry.components[index]);this.removePoint();this.finalize();}
return false;},CLASS_NAME:"OpenLayers.Handler.Polygon"});OpenLayers.Control.DragFeature=OpenLayers.Class(OpenLayers.Control,{geometryTypes:null,onStart:function(feature,pixel){},onDrag:function(feature,pixel){},onComplete:function(feature,pixel){},documentDrag:false,layer:null,feature:null,dragCallbacks:{},featureCallbacks:{},lastPixel:null,initialize:function(layer,options){OpenLayers.Control.prototype.initialize.apply(this,[options]);this.layer=layer;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(feature){if(!this.handlers.drag.dragging){this.feature=feature;this.handlers.drag.activate();this.over=true;OpenLayers.Element.addClass(this.map.viewPortDiv,this.displayClass+"Over");}else{if(this.feature.id==feature.id){this.over=true;}else{this.over=false;}}},downFeature:function(pixel){this.lastPixel=pixel;this.onStart(this.feature,pixel);},moveFeature:function(pixel){var res=this.map.getResolution();this.feature.geometry.move(res*(pixel.x-this.lastPixel.x),res*(this.lastPixel.y-pixel.y));this.layer.drawFeature(this.feature);this.lastPixel=pixel;this.onDrag(this.feature,pixel);},upFeature:function(pixel){if(!this.over){this.handlers.drag.deactivate();}},doneDragging:function(pixel){this.onComplete(this.feature,pixel);},outFeature:function(feature){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==feature.id){this.over=false;}}},cancel:function(){this.handlers.drag.deactivate();this.over=false;},setMap:function(map){this.handlers.drag.setMap(map);this.handlers.feature.setMap(map);OpenLayers.Control.prototype.setMap.apply(this,arguments);},CLASS_NAME:"OpenLayers.Control.DragFeature"});OpenLayers.Handler.Keyboard=OpenLayers.Class(OpenLayers.Handler,{KEY_EVENTS:["keydown","keyup"],eventListener:null,initialize:function(control,callbacks,options){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 i=0,len=this.KEY_EVENTS.length;i<len;i++){OpenLayers.Event.observe(document,this.KEY_EVENTS[i],this.eventListener);}
return true;}else{return false;}},deactivate:function(){var deactivated=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){for(var i=0,len=this.KEY_EVENTS.length;i<len;i++){OpenLayers.Event.stopObserving(document,this.KEY_EVENTS[i],this.eventListener);}
deactivated=true;}
return deactivated;},handleKeyEvent:function(evt){if(this.checkModifiers(evt)){this.callback(evt.type,[evt]);}},CLASS_NAME:"OpenLayers.Handler.Keyboard"});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(layer,options){this.layer=layer;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,[options]);if(!(this.deleteCodes instanceof Array)){this.deleteCodes=[this.deleteCodes];}
var control=this;var selectOptions={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(layer,selectOptions);}
var dragOptions={geometryTypes:["OpenLayers.Geometry.Point"],snappingOptions:this.snappingOptions,onStart:function(feature,pixel){control.dragStart.apply(control,[feature,pixel]);},onDrag:function(feature,pixel){control.dragVertex.apply(control,[feature,pixel]);},onComplete:function(feature){control.dragComplete.apply(control,[feature]);},featureCallbacks:{over:function(feature){if(control.standalone!==true||feature._sketch||control.feature===feature){control.dragControl.overFeature.apply(control.dragControl,[feature]);}}}};this.dragControl=new OpenLayers.Control.DragFeature(layer,dragOptions);var keyboardOptions={keydown:this.handleKeypress};this.handlers={keyboard:new OpenLayers.Handler.Keyboard(this,keyboardOptions)};},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 deactivated=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 feature=this.feature;var valid=feature&&feature.geometry&&feature.layer;if(this.standalone===false){if(valid){this.selectControl.unselect.apply(this.selectControl,[feature]);}
this.selectControl.deactivate();}else{if(valid){this.unselectFeature(feature);}}
this.handlers.keyboard.deactivate();deactivated=true;}
return deactivated;},beforeSelectFeature:function(feature){return this.layer.events.triggerEvent("beforefeaturemodified",{feature:feature});},selectFeature:function(feature){this.feature=feature;this.modified=false;this.resetVertices();this.dragControl.activate();this.onModificationStart(this.feature);},unselectFeature:function(feature){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(feature);this.layer.events.triggerEvent("afterfeaturemodified",{feature:feature,modified:this.modified});this.modified=false;},dragStart:function(feature,pixel){if(feature!=this.feature&&!feature.geometry.parent&&feature!=this.dragHandle&&feature!=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,feature.geometry.CLASS_NAME)!=-1){this.standalone||this.selectControl.clickFeature.apply(this.selectControl,[feature]);this.dragControl.overFeature.apply(this.dragControl,[feature]);this.dragControl.lastPixel=pixel;this.dragControl.handlers.drag.started=true;this.dragControl.handlers.drag.start=pixel;this.dragControl.handlers.drag.last=pixel;}}},dragVertex:function(vertex,pixel){this.modified=true;if(this.feature.geometry.CLASS_NAME=="OpenLayers.Geometry.Point"){if(this.feature!=vertex){this.feature=vertex;}
this.layer.events.triggerEvent("vertexmodified",{vertex:vertex.geometry,feature:this.feature,pixel:pixel});}else{if(vertex._index){vertex.geometry.parent.addComponent(vertex.geometry,vertex._index);delete vertex._index;OpenLayers.Util.removeItem(this.virtualVertices,vertex);this.vertices.push(vertex);}else if(vertex==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(vertex!==this.radiusHandle){this.layer.events.triggerEvent("vertexmodified",{vertex:vertex.geometry,feature:this.feature,pixel:pixel});}
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(vertex);},dragComplete:function(vertex){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(evt){var code=evt.keyCode;if(this.feature&&OpenLayers.Util.indexOf(this.deleteCodes,code)!=-1){var vertex=this.dragControl.feature;if(vertex&&OpenLayers.Util.indexOf(this.vertices,vertex)!=-1&&!this.dragControl.handlers.drag.dragging&&vertex.geometry.parent){vertex.geometry.parent.removeComponent(vertex.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 control=this;function collectComponentVertices(geometry){var i,vertex,component,len;if(geometry.CLASS_NAME=="OpenLayers.Geometry.Point"){vertex=new OpenLayers.Feature.Vector(geometry);vertex._sketch=true;control.vertices.push(vertex);}else{var numVert=geometry.components.length;if(geometry.CLASS_NAME=="OpenLayers.Geometry.LinearRing"){numVert-=1;}
for(i=0;i<numVert;++i){component=geometry.components[i];if(component.CLASS_NAME=="OpenLayers.Geometry.Point"){vertex=new OpenLayers.Feature.Vector(component);vertex._sketch=true;control.vertices.push(vertex);}else{collectComponentVertices(component);}}
if(geometry.CLASS_NAME!="OpenLayers.Geometry.MultiPoint"){for(i=0,len=geometry.components.length;i<len-1;++i){var prevVertex=geometry.components[i];var nextVertex=geometry.components[i+1];if(prevVertex.CLASS_NAME=="OpenLayers.Geometry.Point"&&nextVertex.CLASS_NAME=="OpenLayers.Geometry.Point"){var x=(prevVertex.x+nextVertex.x)/2;var y=(prevVertex.y+nextVertex.y)/2;var point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(x,y),null,control.virtualStyle);point.geometry.parent=geometry;point._index=i+1;point._sketch=true;control.virtualVertices.push(point);}}}}}
collectComponentVertices.call(this,this.feature.geometry);this.layer.addFeatures(this.virtualVertices,{silent:true});this.layer.addFeatures(this.vertices,{silent:true});},collectDragHandle:function(){var geometry=this.feature.geometry;var center=geometry.getBounds().getCenterLonLat();var originGeometry=new OpenLayers.Geometry.Point(center.lon,center.lat);var origin=new OpenLayers.Feature.Vector(originGeometry);originGeometry.move=function(x,y){OpenLayers.Geometry.Point.prototype.move.call(this,x,y);geometry.move(x,y);};origin._sketch=true;this.dragHandle=origin;this.layer.addFeatures([this.dragHandle],{silent:true});},collectRadiusHandle:function(){var geometry=this.feature.geometry;var bounds=geometry.getBounds();var center=bounds.getCenterLonLat();var originGeometry=new OpenLayers.Geometry.Point(center.lon,center.lat);var radiusGeometry=new OpenLayers.Geometry.Point(bounds.right,bounds.bottom);var radius=new OpenLayers.Feature.Vector(radiusGeometry);var resize=(this.mode&OpenLayers.Control.ModifyFeature.RESIZE);var reshape=(this.mode&OpenLayers.Control.ModifyFeature.RESHAPE);var rotate=(this.mode&OpenLayers.Control.ModifyFeature.ROTATE);radiusGeometry.move=function(x,y){OpenLayers.Geometry.Point.prototype.move.call(this,x,y);var dx1=this.x-originGeometry.x;var dy1=this.y-originGeometry.y;var dx0=dx1-x;var dy0=dy1-y;if(rotate){var a0=Math.atan2(dy0,dx0);var a1=Math.atan2(dy1,dx1);var angle=a1-a0;angle*=180/Math.PI;geometry.rotate(angle,originGeometry);}
if(resize){var scale,ratio;if(reshape){scale=dy1/dy0;ratio=(dx1/dx0)/scale;}else{var l0=Math.sqrt((dx0*dx0)+(dy0*dy0));var l1=Math.sqrt((dx1*dx1)+(dy1*dy1));scale=l1/l0;}
geometry.resize(scale,originGeometry,ratio);}};radius._sketch=true;this.radiusHandle=radius;this.layer.addFeatures([this.radiusHandle],{silent:true});},setMap:function(map){this.standalone||this.selectControl.setMap(map);this.dragControl.setMap(map);OpenLayers.Control.prototype.setMap.apply(this,arguments);},CLASS_NAME:"OpenLayers.Control.ModifyFeature"});OpenLayers.Control.ModifyFeature.RESHAPE=1;OpenLayers.Control.ModifyFeature.RESIZE=2;OpenLayers.Control.ModifyFeature.ROTATE=4;OpenLayers.Control.ModifyFeature.DRAG=8;OpenLayers.Control.ZoomToMaxExtent=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_BUTTON,trigger:function(){if(this.map){this.map.zoomToMaxExtent();}},CLASS_NAME:"OpenLayers.Control.ZoomToMaxExtent"});Ext.namespace("GeoExt.ux.form");GeoExt.ux.form.FeaturePanel=Ext.extend(Ext.form.FormPanel,{labelWidth:100,border:false,bodyStyle:'padding:5px 5px 5px 5px',width:'auto',autoWidth:true,height:'auto',autoHeight:true,defaults:{width:120},defaultType:'textfield',features:null,layer:null,controler:null,autoSave:true,deleteAction:null,attributeFieldSetId:"gx_featurepanel_attributefieldset_id",labelAttribute:"name",useIcons:true,initComponent:function(){this.initFeatures(this.features);this.initToolbar();this.initForm();GeoExt.ux.form.FeaturePanel.superclass.initComponent.call(this);},initFeatures:function(features){if(features instanceof Array){this.features=features;}else{this.features=[features];}},initToolbar:function(){this.initDeleteAction();Ext.apply(this,{bbar:new Ext.Toolbar(this.getActions())});},initForm:function(){var oItems,oGroup,feature,field,oGroupItems;if(this.features.length!=1){return;}else{feature=this.features[0];}
oItems=[];oGroupItems=[];oGroup={id:this.attributeFieldSetId,xtype:'fieldset',title:OpenLayers.i18n('Attributes'),layout:'form',collapsible:true,autoHeight:this.autoHeight,autoWidth:this.autoWidth,defaults:this.defaults,defaultType:this.defaultType};for(var attribute in feature.attributes){field={'name':attribute,'fieldLabel':attribute,'id':attribute,'value':feature.attributes[attribute]};oGroupItems.push(field);}
oGroup.items=oGroupItems;oItems.push(oGroup);Ext.apply(this,{items:oItems});},initDeleteAction:function(){var actionOptions={handler:this.deleteFeatures,scope:this,tooltip:OpenLayers.i18n('Delete feature')};if(this.useIcons===true){actionOptions.iconCls="gx-featureediting-delete";}else{actionOptions.text=OpenLayers.i18n('Delete');}
this.deleteAction=new Ext.Action(actionOptions);},deleteFeatures:function(){Ext.MessageBox.confirm(OpenLayers.i18n('Delete Feature'),OpenLayers.i18n('Do you really want to delete this feature ?'),function(btn){if(btn=='yes'){for(var i=0;i<this.features.length;i++){var feature=this.features[i];if(feature.popup){feature.popup.close();feature.popup=null;}
feature.layer.destroyFeatures([feature]);}
this.controler.reactivateDrawControl();}},this);},getActions:function(){return[this.deleteAction];},triggerAutoSave:function(){if(this.autoSave){this.save();}},save:function(){var feature;if(this.features&&this.features.length===0){return;}
if(this.features.length!=1){return;}else{feature=this.features[0];}
this.parseFormFieldsToFeatureAttributes(feature);if(feature.isLabel===true){if(feature.attributes[this.labelAttribute]!=""){feature.style.label=feature.attributes[this.labelAttribute];feature.style.graphic=false;feature.style.labelSelect=true;feature.layer.drawFeature(feature);}else{feature.layer.destroyFeatures([feature]);if(this.controler.popup){this.controler.popup.close();this.controler.popup=null;}}}},parseFeatureAttributesToFormFields:function(feature){var aoElements,nElements,fieldSet;fieldSet=this.findById(this.attributeFieldSetId);aoElements=fieldSet.items.items;nElements=aoElements.length;for(var i=0;i<nElements;i++){var oElement=aoElements[i];var szAttribute=oElement.getName();var szValue=null;if(oElement.initialConfig.isfid)
{szValue=feature.fid;}
else
{szValue=feature.attributes[szAttribute];}
oElement.setValue(szValue);}},parseFormFieldsToFeatureAttributes:function(feature){var field,id,value,fieldSet;fieldSet=this.findById(this.attributeFieldSetId);for(var i=0;i<fieldSet.items.length;i++){field=fieldSet.items.get(i);id=field.getName();value=field.getValue();feature.attributes[id]=value;}},onAfterRender:function(){var feature;if(this.features.length!=1){return;}else{feature=this.features[0];}
this.parseFeatureAttributesToFormFields(feature);},beforeDestroy:function(){delete this.feature;}});Ext.reg("gx_featurepanel",GeoExt.ux.form.FeaturePanel);OpenLayers.Control.Panel=OpenLayers.Class(OpenLayers.Control,{controls:null,autoActivate:true,defaultControl:null,initialize:function(options){OpenLayers.Control.prototype.initialize.apply(this,[options]);this.controls=[];},destroy:function(){OpenLayers.Control.prototype.destroy.apply(this,arguments);for(var i=this.controls.length-1;i>=0;i--){if(this.controls[i].events){this.controls[i].events.un({"activate":this.redraw,"deactivate":this.redraw,scope:this});}
OpenLayers.Event.stopObservingElement(this.controls[i].panel_div);this.controls[i].panel_div=null;}},activate:function(){if(OpenLayers.Control.prototype.activate.apply(this,arguments)){for(var i=0,len=this.controls.length;i<len;i++){if(this.controls[i]==this.defaultControl){this.controls[i].activate();}}
this.redraw();return true;}else{return false;}},deactivate:function(){if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)){for(var i=0,len=this.controls.length;i<len;i++){this.controls[i].deactivate();}
return true;}else{return false;}},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);for(var i=0,len=this.controls.length;i<len;i++){this.map.addControl(this.controls[i]);this.controls[i].deactivate();this.controls[i].events.on({"activate":this.redraw,"deactivate":this.redraw,scope:this});}
return this.div;},redraw:function(){this.div.innerHTML="";if(this.active){for(var i=0,len=this.controls.length;i<len;i++){var element=this.controls[i].panel_div;if(this.controls[i].active){element.className=this.controls[i].displayClass+"ItemActive";}else{element.className=this.controls[i].displayClass+"ItemInactive";}
this.div.appendChild(element);}}},activateControl:function(control){if(!this.active){return false;}
if(control.type==OpenLayers.Control.TYPE_BUTTON){control.trigger();this.redraw();return;}
if(control.type==OpenLayers.Control.TYPE_TOGGLE){if(control.active){control.deactivate();}else{control.activate();}
this.redraw();return;}
for(var i=0,len=this.controls.length;i<len;i++){if(this.controls[i]!=control){if(this.controls[i].type!=OpenLayers.Control.TYPE_TOGGLE){this.controls[i].deactivate();}}}
control.activate();},addControls:function(controls){if(!(controls instanceof Array)){controls=[controls];}
this.controls=this.controls.concat(controls);for(var i=0,len=controls.length;i<len;i++){var element=document.createElement("div");controls[i].panel_div=element;if(controls[i].title!=""){controls[i].panel_div.title=controls[i].title;}
OpenLayers.Event.observe(controls[i].panel_div,"click",OpenLayers.Function.bind(this.onClick,this,controls[i]));OpenLayers.Event.observe(controls[i].panel_div,"dblclick",OpenLayers.Function.bind(this.onDoubleClick,this,controls[i]));OpenLayers.Event.observe(controls[i].panel_div,"mousedown",OpenLayers.Function.bindAsEventListener(OpenLayers.Event.stop));}
if(this.map){for(var i=0,len=controls.length;i<len;i++){this.map.addControl(controls[i]);controls[i].deactivate();controls[i].events.on({"activate":this.redraw,"deactivate":this.redraw,scope:this});}
this.redraw();}},onClick:function(ctrl,evt){OpenLayers.Event.stop(evt?evt:window.event);this.activateControl(ctrl);},onDoubleClick:function(ctrl,evt){OpenLayers.Event.stop(evt?evt:window.event);},getControlsBy:function(property,match){var test=(typeof match.test=="function");var found=OpenLayers.Array.filter(this.controls,function(item){return item[property]==match||(test&&match.test(item[property]));});return found;},getControlsByName:function(match){return this.getControlsBy("name",match);},getControlsByClass:function(match){return this.getControlsBy("CLASS_NAME",match);},CLASS_NAME:"OpenLayers.Control.Panel"});OpenLayers.Control.Permalink=OpenLayers.Class(OpenLayers.Control,{argParserClass:OpenLayers.Control.ArgParser,element:null,base:'',displayProjection:null,initialize:function(element,base,options){OpenLayers.Control.prototype.initialize.apply(this,[options]);this.element=OpenLayers.Util.getElement(element);this.base=base||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(map){OpenLayers.Control.prototype.setMap.apply(this,arguments);for(var i=0,len=this.map.controls.length;i<len;i++){var control=this.map.controls[i];if(control.CLASS_NAME==this.argParserClass.CLASS_NAME){if(control.displayProjection!=this.displayProjection){this.displayProjection=control.displayProjection;}
break;}}
if(i==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 href=this.base;if(href.indexOf('?')!=-1){href=href.substring(0,href.indexOf('?'));}
href+='?'+OpenLayers.Util.getParameterString(this.createParams());this.element.href=href;},createParams:function(center,zoom,layers){center=center||this.map.getCenter();var params=OpenLayers.Util.getParameters(this.base);if(center){params.zoom=zoom||this.map.getZoom();var lat=center.lat;var lon=center.lon;if(this.displayProjection){var mapPosition=OpenLayers.Projection.transform({x:lon,y:lat},this.map.getProjectionObject(),this.displayProjection);lon=mapPosition.x;lat=mapPosition.y;}
params.lat=Math.round(lat*100000)/100000;params.lon=Math.round(lon*100000)/100000;layers=layers||this.map.layers;params.layers='';for(var i=0,len=layers.length;i<len;i++){var layer=layers[i];if(layer.isBaseLayer){params.layers+=(layer==this.map.baseLayer)?"B":"0";}else{params.layers+=(layer.getVisibility())?"T":"F";}}}
return params;},CLASS_NAME:"OpenLayers.Control.Permalink"});Ext.namespace("GeoExt.ux.data");GeoExt.ux.data.importFeatures=null;GeoExt.ux.data.Import=function(map,layer,format,filecontent,features){GeoExt.ux.data.Import.importFeatures=[];if(format&&filecontent){if(format=='KML'){var kmlReader=new OpenLayers.Format.KML(OpenLayers.Util.extend({externalProjection:new OpenLayers.Projection("EPSG:4326"),internalProjection:map.getProjectionObject()},GeoExt.ux.data.formats.getFormatConfig(format)));GeoExt.ux.data.importFeatures=kmlReader.read(filecontent);}else if(format=='GML'){var gmlReader=new OpenLayers.Format.GML(GeoExt.ux.data.formats.getFormatConfig(format));GeoExt.ux.data.importFeatures=gmlReader.read(filecontent);}else if(format=='GeoJSON'){var geojsonReader=new OpenLayers.Format.GeoJSON(GeoExt.ux.data.formats.getFormatConfig(format));GeoExt.ux.data.importFeatures=geojsonReader.read(filecontent);}else if(format=='GeoRSS'){var georssReader=new OpenLayers.Format.GeoRSS(GeoExt.ux.data.formats.getFormatConfig(format));GeoExt.ux.data.importFeatures=georssReader.read(filecontent);}else{return'Format '+format+' not supported. Patch welcome !';}}
if(features){GeoExt.ux.data.importFeatures=features;}
if(!layer){layer=new OpenLayers.Layer.Vector("Import",{projection:map.displayProjection});map.addLayer(layer);}
layer.addFeatures(GeoExt.ux.data.importFeatures);return layer;};GeoExt.ux.data.Import.KMLImport=function(map,layer){GeoExt.ux.data.Export.format='KML';var importPanel=new GeoExt.ux.LayerManagerImportPanel({map:map,defaultFormat:'KML',layer:layer});importPanel.on('dataimported',function(panel,format,filecontent,features){alert(OpenLayers.i18n("KML data sucessfully imported in layer: "+panel.layer.name+" !"+" Number of imported features: "+features.length));importWindow.close();});var importWindow=new Ext.Window({id:'importwindow',modal:true,title:OpenLayers.i18n('Import KML'),height:135,width:290,items:[importPanel]});importWindow.show();};(function(){var oXMLHttpRequest=window.XMLHttpRequest;var bGecko=!!window.controllers,bIE=window.document.all&&!window.opera;function cXMLHttpRequest(){this._object=oXMLHttpRequest?new oXMLHttpRequest:new window.ActiveXObject('Microsoft.XMLHTTP');};if(bGecko&&oXMLHttpRequest.wrapped)
cXMLHttpRequest.wrapped=oXMLHttpRequest.wrapped;cXMLHttpRequest.UNSENT=0;cXMLHttpRequest.OPENED=1;cXMLHttpRequest.HEADERS_RECEIVED=2;cXMLHttpRequest.LOADING=3;cXMLHttpRequest.DONE=4;cXMLHttpRequest.prototype.readyState=cXMLHttpRequest.UNSENT;cXMLHttpRequest.prototype.responseText="";cXMLHttpRequest.prototype.responseXML=null;cXMLHttpRequest.prototype.status=0;cXMLHttpRequest.prototype.statusText="";cXMLHttpRequest.prototype.onreadystatechange=null;cXMLHttpRequest.onreadystatechange=null;cXMLHttpRequest.onopen=null;cXMLHttpRequest.onsend=null;cXMLHttpRequest.onabort=null;cXMLHttpRequest.prototype.open=function(sMethod,sUrl,bAsync,sUser,sPassword){this._async=bAsync;var oRequest=this,nState=this.readyState;if(bIE){var fOnUnload=function(){if(oRequest._object.readyState!=cXMLHttpRequest.DONE)
fCleanTransport(oRequest);};if(bAsync)
window.attachEvent("onunload",fOnUnload);}
this._object.onreadystatechange=function(){if(bGecko&&!bAsync)
return;oRequest.readyState=oRequest._object.readyState;fSynchronizeValues(oRequest);if(oRequest._aborted){oRequest.readyState=cXMLHttpRequest.UNSENT;return;}
if(oRequest.readyState==cXMLHttpRequest.DONE){fCleanTransport(oRequest);if(bIE&&bAsync)
window.detachEvent("onunload",fOnUnload);}
if(nState!=oRequest.readyState)
fReadyStateChange(oRequest);nState=oRequest.readyState;};if(cXMLHttpRequest.onopen)
cXMLHttpRequest.onopen.apply(this,arguments);this._object.open(sMethod,sUrl,bAsync,sUser,sPassword);if(!bAsync&&bGecko){this.readyState=cXMLHttpRequest.OPENED;fReadyStateChange(this);}};cXMLHttpRequest.prototype.send=function(vData){if(cXMLHttpRequest.onsend)
cXMLHttpRequest.onsend.apply(this,arguments);if(vData&&vData.nodeType){vData=window.XMLSerializer?new window.XMLSerializer().serializeToString(vData):vData.xml;if(!this._headers["Content-Type"])
this._object.setRequestHeader("Content-Type","application/xml");}
this._object.send(vData);if(bGecko&&!this._async){this.readyState=cXMLHttpRequest.OPENED;fSynchronizeValues(this);while(this.readyState<cXMLHttpRequest.DONE){this.readyState++;fReadyStateChange(this);if(this._aborted)
return;}}};cXMLHttpRequest.prototype.abort=function(){if(cXMLHttpRequest.onabort)
cXMLHttpRequest.onabort.apply(this,arguments);if(this.readyState>cXMLHttpRequest.UNSENT)
this._aborted=true;this._object.abort();fCleanTransport(this);};cXMLHttpRequest.prototype.getAllResponseHeaders=function(){return this._object.getAllResponseHeaders();};cXMLHttpRequest.prototype.getResponseHeader=function(sName){return this._object.getResponseHeader(sName);};cXMLHttpRequest.prototype.setRequestHeader=function(sName,sValue){if(!this._headers)
this._headers={};this._headers[sName]=sValue;return this._object.setRequestHeader(sName,sValue);};cXMLHttpRequest.prototype.toString=function(){return'['+"object"+' '+"XMLHttpRequest"+']';};cXMLHttpRequest.toString=function(){return'['+"XMLHttpRequest"+']';};function fReadyStateChange(oRequest){if(oRequest.onreadystatechange)
oRequest.onreadystatechange.apply(oRequest);if(cXMLHttpRequest.onreadystatechange)
cXMLHttpRequest.onreadystatechange.apply(oRequest);};function fGetDocument(oRequest){var oDocument=oRequest.responseXML;if(bIE&&oDocument&&!oDocument.documentElement&&oRequest.getResponseHeader("Content-Type").match(/[^\/]+\/[^\+]+\+xml/)){oDocument=new ActiveXObject('Microsoft.XMLDOM');oDocument.loadXML(oRequest.responseText);}
if(oDocument)
if((bIE&&oDocument.parseError!=0)||(oDocument.documentElement&&oDocument.documentElement.tagName=="parsererror"))
return null;return oDocument;};function fSynchronizeValues(oRequest){try{oRequest.responseText=oRequest._object.responseText;}catch(e){}
try{oRequest.responseXML=fGetDocument(oRequest._object);}catch(e){}
try{oRequest.status=oRequest._object.status;}catch(e){}
try{oRequest.statusText=oRequest._object.statusText;}catch(e){}};function fCleanTransport(oRequest){oRequest._object.onreadystatechange=new window.Function;delete oRequest._headers;};if(!window.Function.prototype.apply){window.Function.prototype.apply=function(oRequest,oArguments){if(!oArguments)
oArguments=[];oRequest.__func=this;oRequest.__func(oArguments[0],oArguments[1],oArguments[2],oArguments[3],oArguments[4]);delete oRequest.__func;};};OpenLayers.Request.XMLHttpRequest=cXMLHttpRequest;})();OpenLayers.Format.KML=OpenLayers.Class(OpenLayers.Format.XML,{kmlns:"http://earth.google.com/kml/2.0",placemarksDesc:"No description available",foldersName:"OpenLayers export",foldersDesc:"Exported on "+new Date(),extractAttributes:true,extractStyles:false,internalns:null,features:null,styles:null,styleBaseUrl:"",fetched:null,maxDepth:0,initialize:function(options){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,[options]);},read:function(data){this.features=[];this.styles={};this.fetched={};var options={depth:0,styleBaseUrl:this.styleBaseUrl};return this.parseData(data,options);},parseData:function(data,options){if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);}
var types=["Link","NetworkLink","Style","StyleMap","Placemark"];for(var i=0,len=types.length;i<len;++i){var type=types[i];var nodes=this.getElementsByTagNameNS(data,"*",type);if(nodes.length==0){continue;}
switch(type.toLowerCase()){case"link":case"networklink":this.parseLinks(nodes,options);break;case"style":if(this.extractStyles){this.parseStyles(nodes,options);}
break;case"stylemap":if(this.extractStyles){this.parseStyleMaps(nodes,options);}
break;case"placemark":this.parseFeatures(nodes,options);break;}}
return this.features;},parseLinks:function(nodes,options){if(options.depth>=this.maxDepth){return false;}
var newOptions=OpenLayers.Util.extend({},options);newOptions.depth++;for(var i=0,len=nodes.length;i<len;i++){var href=this.parseProperty(nodes[i],"*","href");if(href&&!this.fetched[href]){this.fetched[href]=true;var data=this.fetchLink(href);if(data){this.parseData(data,newOptions);}}}},fetchLink:function(href){var request=OpenLayers.Request.GET({url:href,async:false});if(request){return request.responseText;}},parseStyles:function(nodes,options){for(var i=0,len=nodes.length;i<len;i++){var style=this.parseStyle(nodes[i]);if(style){var styleName=(options.styleBaseUrl||"")+"#"+style.id;this.styles[styleName]=style;}}},parseKmlColor:function(kmlColor){var color=null;if(kmlColor){var matches=kmlColor.match(this.regExes.kmlColor);if(matches){color={color:'#'+matches[4]+matches[3]+matches[2],opacity:parseInt(matches[1],16)/255};}}
return color;},parseStyle:function(node){var style={};var types=["LineStyle","PolyStyle","IconStyle","BalloonStyle","LabelStyle"];var type,nodeList,geometry,parser;for(var i=0,len=types.length;i<len;++i){type=types[i];styleTypeNode=this.getElementsByTagNameNS(node,"*",type)[0];if(!styleTypeNode){continue;}
switch(type.toLowerCase()){case"linestyle":var kmlColor=this.parseProperty(styleTypeNode,"*","color");var color=this.parseKmlColor(kmlColor);if(color){style["strokeColor"]=color.color;style["strokeOpacity"]=color.opacity;}
var width=this.parseProperty(styleTypeNode,"*","width");if(width){style["strokeWidth"]=width;}
break;case"polystyle":var kmlColor=this.parseProperty(styleTypeNode,"*","color");var color=this.parseKmlColor(kmlColor);if(color){style["fillOpacity"]=color.opacity;style["fillColor"]=color.color;}
var fill=this.parseProperty(styleTypeNode,"*","fill");if(fill=="0"){style["fillColor"]="none";}
var outline=this.parseProperty(styleTypeNode,"*","outline");if(outline=="0"){style["strokeWidth"]="0";}
break;case"iconstyle":var scale=parseFloat(this.parseProperty(styleTypeNode,"*","scale")||1);var width=32*scale;var height=32*scale;var iconNode=this.getElementsByTagNameNS(styleTypeNode,"*","Icon")[0];if(iconNode){var href=this.parseProperty(iconNode,"*","href");if(href){var w=this.parseProperty(iconNode,"*","w");var h=this.parseProperty(iconNode,"*","h");var google="http://maps.google.com/mapfiles/kml";if(OpenLayers.String.startsWith(href,google)&&!w&&!h){w=64;h=64;scale=scale/2;}
w=w||h;h=h||w;if(w){width=parseInt(w)*scale;}
if(h){height=parseInt(h)*scale;}
var matches=href.match(this.regExes.kmlIconPalette);if(matches){var palette=matches[1];var file_extension=matches[2];var x=this.parseProperty(iconNode,"*","x");var y=this.parseProperty(iconNode,"*","y");var posX=x?x/32:0;var posY=y?(7-y/32):7;var pos=posY*8+posX;href="http://maps.google.com/mapfiles/kml/pal"
+palette+"/icon"+pos+file_extension;}
style["graphicOpacity"]=1;style["externalGraphic"]=href;}}
var hotSpotNode=this.getElementsByTagNameNS(styleTypeNode,"*","hotSpot")[0];if(hotSpotNode){var x=parseFloat(hotSpotNode.getAttribute("x"));var y=parseFloat(hotSpotNode.getAttribute("y"));var xUnits=hotSpotNode.getAttribute("xunits");if(xUnits=="pixels"){style["graphicXOffset"]=-x*scale;}
else if(xUnits=="insetPixels"){style["graphicXOffset"]=-width+(x*scale);}
else if(xUnits=="fraction"){style["graphicXOffset"]=-width*x;}
var yUnits=hotSpotNode.getAttribute("yunits");if(yUnits=="pixels"){style["graphicYOffset"]=-height+(y*scale)+1;}
else if(yUnits=="insetPixels"){style["graphicYOffset"]=-(y*scale)+1;}
else if(yUnits=="fraction"){style["graphicYOffset"]=-height*(1-y)+1;}}
style["graphicWidth"]=width;style["graphicHeight"]=height;break;case"balloonstyle":var balloonStyle=OpenLayers.Util.getXmlNodeValue(styleTypeNode);if(balloonStyle){style["balloonStyle"]=balloonStyle.replace(this.regExes.straightBracket,"${$1}");}
break;case"labelstyle":var kmlColor=this.parseProperty(styleTypeNode,"*","color");var color=this.parseKmlColor(kmlColor);if(color){style["fontColor"]=color.color;style["fontOpacity"]=color.opacity;}
break;default:}}
if(!style["strokeColor"]&&style["fillColor"]){style["strokeColor"]=style["fillColor"];}
var id=node.getAttribute("id");if(id&&style){style.id=id;}
return style;},parseStyleMaps:function(nodes,options){for(var i=0,len=nodes.length;i<len;i++){var node=nodes[i];var pairs=this.getElementsByTagNameNS(node,"*","Pair");var id=node.getAttribute("id");for(var j=0,jlen=pairs.length;j<jlen;j++){var pair=pairs[j];var key=this.parseProperty(pair,"*","key");var styleUrl=this.parseProperty(pair,"*","styleUrl");if(styleUrl&&key=="normal"){this.styles[(options.styleBaseUrl||"")+"#"+id]=this.styles[(options.styleBaseUrl||"")+styleUrl];}
if(styleUrl&&key=="highlight"){}}}},parseFeatures:function(nodes,options){var features=new Array(nodes.length);for(var i=0,len=nodes.length;i<len;i++){var featureNode=nodes[i];var feature=this.parseFeature.apply(this,[featureNode]);if(feature){if(this.extractStyles&&feature.attributes&&feature.attributes.styleUrl){feature.style=this.getStyle(feature.attributes.styleUrl,options);}
if(this.extractStyles){var inlineStyleNode=this.getElementsByTagNameNS(featureNode,"*","Style")[0];if(inlineStyleNode){var inlineStyle=this.parseStyle(inlineStyleNode);if(inlineStyle){feature.style=OpenLayers.Util.extend(feature.style,inlineStyle);}}}
features[i]=feature;}else{throw"Bad Placemark: "+i;}}
this.features=this.features.concat(features);},parseFeature:function(node){var order=["MultiGeometry","Polygon","LineString","Point"];var type,nodeList,geometry,parser;for(var i=0,len=order.length;i<len;++i){type=order[i];this.internalns=node.namespaceURI?node.namespaceURI:this.kmlns;nodeList=this.getElementsByTagNameNS(node,this.internalns,type);if(nodeList.length>0){var parser=this.parseGeometry[type.toLowerCase()];if(parser){geometry=parser.apply(this,[nodeList[0]]);if(this.internalProjection&&this.externalProjection){geometry.transform(this.externalProjection,this.internalProjection);}}else{OpenLayers.Console.error(OpenLayers.i18n("unsupportedGeometryType",{'geomType':type}));}
break;}}
var attributes;if(this.extractAttributes){attributes=this.parseAttributes(node);}
var feature=new OpenLayers.Feature.Vector(geometry,attributes);var fid=node.getAttribute("id")||node.getAttribute("name");if(fid!=null){feature.fid=fid;}
return feature;},getStyle:function(styleUrl,options){var styleBaseUrl=OpenLayers.Util.removeTail(styleUrl);var newOptions=OpenLayers.Util.extend({},options);newOptions.depth++;newOptions.styleBaseUrl=styleBaseUrl;if(!this.styles[styleUrl]&&!OpenLayers.String.startsWith(styleUrl,"#")&&newOptions.depth<=this.maxDepth&&!this.fetched[styleBaseUrl]){var data=this.fetchLink(styleBaseUrl);if(data){this.parseData(data,newOptions);}}
var style=OpenLayers.Util.extend({},this.styles[styleUrl]);return style;},parseGeometry:{point:function(node){var nodeList=this.getElementsByTagNameNS(node,this.internalns,"coordinates");var coords=[];if(nodeList.length>0){var coordString=nodeList[0].firstChild.nodeValue;coordString=coordString.replace(this.regExes.removeSpace,"");coords=coordString.split(",");}
var point=null;if(coords.length>1){if(coords.length==2){coords[2]=null;}
point=new OpenLayers.Geometry.Point(coords[0],coords[1],coords[2]);}else{throw"Bad coordinate string: "+coordString;}
return point;},linestring:function(node,ring){var nodeList=this.getElementsByTagNameNS(node,this.internalns,"coordinates");var line=null;if(nodeList.length>0){var coordString=this.getChildValue(nodeList[0]);coordString=coordString.replace(this.regExes.trimSpace,"");coordString=coordString.replace(this.regExes.trimComma,",");var pointList=coordString.split(this.regExes.splitSpace);var numPoints=pointList.length;var points=new Array(numPoints);var coords,numCoords;for(var i=0;i<numPoints;++i){coords=pointList[i].split(",");numCoords=coords.length;if(numCoords>1){if(coords.length==2){coords[2]=null;}
points[i]=new OpenLayers.Geometry.Point(coords[0],coords[1],coords[2]);}else{throw"Bad LineString point coordinates: "+
pointList[i];}}
if(numPoints){if(ring){line=new OpenLayers.Geometry.LinearRing(points);}else{line=new OpenLayers.Geometry.LineString(points);}}else{throw"Bad LineString coordinates: "+coordString;}}
return line;},polygon:function(node){var nodeList=this.getElementsByTagNameNS(node,this.internalns,"LinearRing");var numRings=nodeList.length;var components=new Array(numRings);if(numRings>0){var ring;for(var i=0,len=nodeList.length;i<len;++i){ring=this.parseGeometry.linestring.apply(this,[nodeList[i],true]);if(ring){components[i]=ring;}else{throw"Bad LinearRing geometry: "+i;}}}
return new OpenLayers.Geometry.Polygon(components);},multigeometry:function(node){var child,parser;var parts=[];var children=node.childNodes;for(var i=0,len=children.length;i<len;++i){child=children[i];if(child.nodeType==1){var type=(child.prefix)?child.nodeName.split(":")[1]:child.nodeName;var parser=this.parseGeometry[type.toLowerCase()];if(parser){parts.push(parser.apply(this,[child]));}}}
return new OpenLayers.Geometry.Collection(parts);}},parseAttributes:function(node){var attributes={};var edNodes=node.getElementsByTagName("ExtendedData");if(edNodes.length){attributes=this.parseExtendedData(edNodes[0]);}
var child,grandchildren,grandchild;var children=node.childNodes;for(var i=0,len=children.length;i<len;++i){child=children[i];if(child.nodeType==1){grandchildren=child.childNodes;if(grandchildren.length>=1&&grandchildren.length<=3){var grandchild;switch(grandchildren.length){case 1:grandchild=grandchildren[0];break;case 2:var c1=grandchildren[0];var c2=grandchildren[1];grandchild=(c1.nodeType==3||c1.nodeType==4)?c1:c2;break;case 3:default:grandchild=grandchildren[1];break;}
if(grandchild.nodeType==3||grandchild.nodeType==4){var name=(child.prefix)?child.nodeName.split(":")[1]:child.nodeName;var value=OpenLayers.Util.getXmlNodeValue(grandchild);if(value){value=value.replace(this.regExes.trimSpace,"");attributes[name]=value;}}}}}
return attributes;},parseExtendedData:function(node){var attributes={};var i,len,data,key;var dataNodes=node.getElementsByTagName("Data");for(i=0,len=dataNodes.length;i<len;i++){data=dataNodes[i];key=data.getAttribute("name");var ed={};var valueNode=data.getElementsByTagName("value");if(valueNode.length){ed['value']=this.getChildValue(valueNode[0]);}
var nameNode=data.getElementsByTagName("displayName");if(nameNode.length){ed['displayName']=this.getChildValue(nameNode[0]);}
attributes[key]=ed;}
var simpleDataNodes=node.getElementsByTagName("SimpleData");for(i=0,len=simpleDataNodes.length;i<len;i++){var ed={};data=simpleDataNodes[i];key=data.getAttribute("name");ed['value']=this.getChildValue(data);ed['displayName']=key;attributes[key]=ed;}
return attributes;},parseProperty:function(xmlNode,namespace,tagName){var value;var nodeList=this.getElementsByTagNameNS(xmlNode,namespace,tagName);try{value=OpenLayers.Util.getXmlNodeValue(nodeList[0]);}catch(e){value=null;}
return value;},write:function(features){if(!(features instanceof Array)){features=[features];}
var kml=this.createElementNS(this.kmlns,"kml");var folder=this.createFolderXML();for(var i=0,len=features.length;i<len;++i){folder.appendChild(this.createPlacemarkXML(features[i]));}
kml.appendChild(folder);return OpenLayers.Format.XML.prototype.write.apply(this,[kml]);},createFolderXML:function(){var folder=this.createElementNS(this.kmlns,"Folder");if(this.foldersName){var folderName=this.createElementNS(this.kmlns,"name");var folderNameText=this.createTextNode(this.foldersName);folderName.appendChild(folderNameText);folder.appendChild(folderName);}
if(this.foldersDesc){var folderDesc=this.createElementNS(this.kmlns,"description");var folderDescText=this.createTextNode(this.foldersDesc);folderDesc.appendChild(folderDescText);folder.appendChild(folderDesc);}
return folder;},createPlacemarkXML:function(feature){var placemarkName=this.createElementNS(this.kmlns,"name");var name=feature.style&&feature.style.label?feature.style.label:feature.attributes.name||feature.id;placemarkName.appendChild(this.createTextNode(name));var placemarkDesc=this.createElementNS(this.kmlns,"description");var desc=feature.attributes.description||this.placemarksDesc;placemarkDesc.appendChild(this.createTextNode(desc));var placemarkNode=this.createElementNS(this.kmlns,"Placemark");if(feature.fid!=null){placemarkNode.setAttribute("id",feature.fid);}
placemarkNode.appendChild(placemarkName);placemarkNode.appendChild(placemarkDesc);var geometryNode=this.buildGeometryNode(feature.geometry);placemarkNode.appendChild(geometryNode);return placemarkNode;},buildGeometryNode:function(geometry){if(this.internalProjection&&this.externalProjection){geometry=geometry.clone();geometry.transform(this.internalProjection,this.externalProjection);}
var className=geometry.CLASS_NAME;var type=className.substring(className.lastIndexOf(".")+1);var builder=this.buildGeometry[type.toLowerCase()];var node=null;if(builder){node=builder.apply(this,[geometry]);}
return node;},buildGeometry:{point:function(geometry){var kml=this.createElementNS(this.kmlns,"Point");kml.appendChild(this.buildCoordinatesNode(geometry));return kml;},multipoint:function(geometry){return this.buildGeometry.collection.apply(this,[geometry]);},linestring:function(geometry){var kml=this.createElementNS(this.kmlns,"LineString");kml.appendChild(this.buildCoordinatesNode(geometry));return kml;},multilinestring:function(geometry){return this.buildGeometry.collection.apply(this,[geometry]);},linearring:function(geometry){var kml=this.createElementNS(this.kmlns,"LinearRing");kml.appendChild(this.buildCoordinatesNode(geometry));return kml;},polygon:function(geometry){var kml=this.createElementNS(this.kmlns,"Polygon");var rings=geometry.components;var ringMember,ringGeom,type;for(var i=0,len=rings.length;i<len;++i){type=(i==0)?"outerBoundaryIs":"innerBoundaryIs";ringMember=this.createElementNS(this.kmlns,type);ringGeom=this.buildGeometry.linearring.apply(this,[rings[i]]);ringMember.appendChild(ringGeom);kml.appendChild(ringMember);}
return kml;},multipolygon:function(geometry){return this.buildGeometry.collection.apply(this,[geometry]);},collection:function(geometry){var kml=this.createElementNS(this.kmlns,"MultiGeometry");var child;for(var i=0,len=geometry.components.length;i<len;++i){child=this.buildGeometryNode.apply(this,[geometry.components[i]]);if(child){kml.appendChild(child);}}
return kml;}},buildCoordinatesNode:function(geometry){var coordinatesNode=this.createElementNS(this.kmlns,"coordinates");var path;var points=geometry.components;if(points){var point;var numPoints=points.length;var parts=new Array(numPoints);for(var i=0;i<numPoints;++i){point=points[i];parts[i]=point.x+","+point.y;}
path=parts.join(" ");}else{path=geometry.x+","+geometry.y;}
var txtNode=this.createTextNode(path);coordinatesNode.appendChild(txtNode);return coordinatesNode;},CLASS_NAME:"OpenLayers.Format.KML"});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(handler,options){this.EVENT_TYPES=OpenLayers.Control.Measure.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);OpenLayers.Control.prototype.initialize.apply(this,[options]);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 handler(this,this.callbacks,this.handlerOptions);},cancel:function(){this.handler.cancel();},updateHandler:function(handler,options){var active=this.active;if(active){this.deactivate();}
this.handler=new handler(this,this.callbacks,options);if(active){this.activate();}},measureComplete:function(geometry){if(this.delayedTrigger){window.clearTimeout(this.delayedTrigger);}
this.measure(geometry,"measure");},measurePartial:function(point,geometry){this.delayedTrigger=window.setTimeout(OpenLayers.Function.bind(function(){this.measure(geometry,"measurepartial");},this),this.partialDelay);},measure:function(geometry,eventType){var stat,order;if(geometry.CLASS_NAME.indexOf('LineString')>-1){stat=this.getBestLength(geometry);order=1;}else{stat=this.getBestArea(geometry);order=2;}
this.events.triggerEvent(eventType,{measure:stat[0],units:stat[1],order:order,geometry:geometry});},getBestArea:function(geometry){var units=this.displaySystemUnits[this.displaySystem];var unit,area;for(var i=0,len=units.length;i<len;++i){unit=units[i];area=this.getArea(geometry,unit);if(area>1){break;}}
return[area,unit];},getArea:function(geometry,units){var area,geomUnits;if(this.geodesic){area=geometry.getGeodesicArea(this.map.getProjectionObject());geomUnits="m";}else{area=geometry.getArea();geomUnits=this.map.getUnits();}
var inPerDisplayUnit=OpenLayers.INCHES_PER_UNIT[units];if(inPerDisplayUnit){var inPerMapUnit=OpenLayers.INCHES_PER_UNIT[geomUnits];area*=Math.pow((inPerMapUnit/inPerDisplayUnit),2);}
return area;},getBestLength:function(geometry){var units=this.displaySystemUnits[this.displaySystem];var unit,length;for(var i=0,len=units.length;i<len;++i){unit=units[i];length=this.getLength(geometry,unit);if(length>1){break;}}
return[length,unit];},getLength:function(geometry,units){var length,geomUnits;if(this.geodesic){length=geometry.getGeodesicLength(this.map.getProjectionObject());geomUnits="m";}else{length=geometry.getLength();geomUnits=this.map.getUnits();}
var inPerDisplayUnit=OpenLayers.INCHES_PER_UNIT[units];if(inPerDisplayUnit){var inPerMapUnit=OpenLayers.INCHES_PER_UNIT[geomUnits];length*=(inPerMapUnit/inPerDisplayUnit);}
return length;},CLASS_NAME:"OpenLayers.Control.Measure"});OpenLayers.Rule=OpenLayers.Class({id:null,name:'default',title:null,description:null,context:null,filter:null,elseFilter:false,symbolizer:null,minScaleDenominator:null,maxScaleDenominator:null,initialize:function(options){this.symbolizer={};OpenLayers.Util.extend(this,options);this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");},destroy:function(){for(var i in this.symbolizer){this.symbolizer[i]=null;}
this.symbolizer=null;},evaluate:function(feature){var context=this.getContext(feature);var applies=true;if(this.minScaleDenominator||this.maxScaleDenominator){var scale=feature.layer.map.getScale();}
if(this.minScaleDenominator){applies=scale>=OpenLayers.Style.createLiteral(this.minScaleDenominator,context);}
if(applies&&this.maxScaleDenominator){applies=scale<OpenLayers.Style.createLiteral(this.maxScaleDenominator,context);}
if(applies&&this.filter){if(this.filter.CLASS_NAME=="OpenLayers.Filter.FeatureId"){applies=this.filter.evaluate(feature);}else{applies=this.filter.evaluate(context);}}
return applies;},getContext:function(feature){var context=this.context;if(!context){context=feature.attributes||feature.data;}
if(typeof this.context=="function"){context=this.context(feature);}
return context;},clone:function(){var options=OpenLayers.Util.extend({},this);options.symbolizer={};for(var key in this.symbolizer){value=this.symbolizer[key];type=typeof value;if(type==="object"){options.symbolizer[key]=OpenLayers.Util.extend({},value);}else if(type==="string"){options.symbolizer[key]=value;}}
options.filter=this.filter&&this.filter.clone();options.context=this.context&&OpenLayers.Util.extend({},this.context);return new OpenLayers.Rule(options);},CLASS_NAME:"OpenLayers.Rule"});Ext.namespace("MapFish");MapFish.API.Measure=OpenLayers.Class({prevPopup:null,options:null,initialize:function(config){config=config||{};Ext.apply(this,config);var options=null;if(!Ext.isEmpty(config.options)){options=config.options;};this.options=Ext.apply({persist:true,handlerOptions:{layerOptions:{styleMap:this.getStyleMap()}},eventListeners:{'measure':this.renderMeasure,'measurepartial':this.clearMeasure,'deactivate':this.deactivateTool,scope:this}},options);},createLengthMeasureControl:function(){return new OpenLayers.Control.Measure(OpenLayers.Handler.Path,this.options);},createAreaMeasureControl:function(){return new OpenLayers.Control.Measure(OpenLayers.Handler.Polygon,this.options);},getStyleMap:function(){var sketchSymbolizers={"Point":{pointRadius:4,graphicName:"square",fillColor:"white",fillOpacity:1,strokeWidth:1,strokeOpacity:1,strokeColor:"#FFFF33"},"Line":{strokeWidth:3,strokeOpacity:1,strokeColor:"#FFFF33"},"Polygon":{strokeWidth:2,strokeOpacity:1,strokeColor:"#FFFF33",fillColor:"white",fillOpacity:0.3}};var style=new OpenLayers.Style();style.addRules([new OpenLayers.Rule({symbolizer:sketchSymbolizers})]);return new OpenLayers.StyleMap({"default":style});},renderMeasure:function(event){var out=event.measure.toFixed(3)+" "+event.units;if(event.order!=1){out+="<sup>2</"+"sup>";}
this.createPopup(out);},createPopup:function(out){this.clearMeasure();var popup=new Ext.Window({title:OpenLayers.i18n('Measure'),html:out,width:150,bodyStyle:'background-color: #FFFFD0;'});this.prevPopup=popup;popup.show();},clearMeasure:function(){var th=this.scope||this;if(th.prevPopup){th.prevPopup.close();}
th.prevPopup=null;},deactivateTool:function(){this.clearMeasure();}});OpenLayers.Util.extend(OpenLayers.Lang.fr,{'scale':"Echelle = 1 : ${scaleDenom}",'mf.tools':'Outils','mf.layertree':'Arbre des couches','mf.layertree.opacity':'Opacité','mf.layertree.remove':'Supprimer','mf.layertree.zoomToExtent':'Zoom sur l\'emprise','mf.print.mapTitle':'Titre','mf.print.comment':'Commentaires','mf.print.unableToPrint':"Impossible d'imprimer",'mf.print.generatingPDF':"Génération du PDF...",'mf.print.dpi':'Résolution','mf.print.scale':'Échelle','mf.print.rotation':'Rotation','mf.print.print':'Imprimer','mf.print.resetPos':'Réinit. pos.','mf.print.layout':'Format','mf.print.addPage':'Ajouter page','mf.print.remove':'Enlever page','mf.print.clearAll':'Supprimer toutes','mf.print.pdfReady':'Votre document PDF est prêt.','mf.print.noPage':'Pas de page sélectionnée, appuyez sur le bouton "Ajouter page" pour en créer une.','mf.print.print-tooltip':'Générer un PDF contenant au moins l\'étendue de la carte','mf.print.serverDown':"Le service d'impression ne fonctionne pas",'mf.error':'Erreur','mf.warning':'Attention','mf.information':'Information','mf.cancel':'Annuler','mf.recenter.x':'X','mf.recenter.y':'Y','mf.recenter.submit':'Recentrer','mf.recenter.missingCoords':'Les coordonnées sont incomplètes.','mf.recenter.outOfRangeCoords':'Les coordonnées fournies (${myX}, ${myY}) sont en dehors de la carte.<br />'+'Elles doivent être comprises dans les limites suivantes :<br/>'+'${coordX} entre ${minCoordX} et ${maxCoordX},<br />'+'${coordY} entre ${minCoordY} et ${maxCoordY}','mf.recenter.emptyText':'Texte à rechercher','mf.recenter.ws.error':'Une erreur est survenue lors de l\'accès au webservice distant:','mf.recenter.ws.service':'Service sélectionné','mf.control.previous':'Vue précédente','mf.control.next':'Vue suivante','mf.control.pan':'Déplacer','mf.control.zoomIn':'Zoom avant','mf.control.zoomOut':'Zoom arrière','mf.control.zoomAll':'Vue globale','mf.editing.comboNoneName':'Aucun','mf.editing.import':'Importer','mf.editing.importTooltip':'Importer les données','mf.editing.commit':'Sauver','mf.editing.commitTooltip':'Sauvegarder les données','mf.editing.delete':'Supprimer','mf.editing.deleteTooltip':'Supprimer l\'élément sélectionné','mf.editing.comboLabel':'Couche à éditer','mf.editing.confirmMessageTitle':'Eléments édités','mf.editing.confirmMessage':'Certains éléments ne sont pas sauvegardés, '+'changer de couche?','mf.editing.selectModifyFeature':'Modifier des éléments','mf.editing.drawPointTitle':'Dessiner des points','mf.editing.drawLineTitle':'Dessiner des lignes','mf.editing.drawPolygonTitle':'Dessiner des polygones','mf.editing.formTitle':'Attributs','mf.editing.gridIdHeader':'Id','mf.editing.gridStateHeader':'Etat','mf.editing.gridTitle':'Eléments sélectionnés','mf.editing.onContextClickMessage':'Editer cet élément','mf.editing.onBeforeUnloadMessage':'Le panneau d\'édition contient '+'des éléments non sauvegardés'});OpenLayers.Control.Attribution=OpenLayers.Class(OpenLayers.Control,{separator:", ",initialize:function(options){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 attributions=[];if(this.map&&this.map.layers){for(var i=0,len=this.map.layers.length;i<len;i++){var layer=this.map.layers[i];if(layer.attribution&&layer.getVisibility()){if(OpenLayers.Util.indexOf(attributions,layer.attribution)===-1){attributions.push(layer.attribution);}}}
this.div.innerHTML=attributions.join(this.separator);}},CLASS_NAME:"OpenLayers.Control.Attribution"});Ext.namespace("GeoExt.tree");GeoExt.tree.LayerLoader=function(config){Ext.apply(this,config);this.addEvents("beforeload","load");GeoExt.tree.LayerLoader.superclass.constructor.call(this);};Ext.extend(GeoExt.tree.LayerLoader,Ext.util.Observable,{store:null,filter:function(record){return record.get("layer").displayInLayerSwitcher==true;},uiProviders:null,load:function(node,callback){if(this.fireEvent("beforeload",this,node)){this.removeStoreHandlers();while(node.firstChild){node.removeChild(node.firstChild);}
if(!this.uiProviders){this.uiProviders=node.getOwnerTree().getLoader().uiProviders;}
if(!this.store){this.store=GeoExt.MapPanel.guess().layers;}
this.store.each(function(record){this.addLayerNode(node,record);},this);this.addStoreHandlers(node);if(typeof callback=="function"){callback();}
this.fireEvent("load",this,node);}},onStoreAdd:function(store,records,index,node){if(!this._reordering){var nodeIndex=node.recordIndexToNodeIndex(index+records.length-1);for(var i=0;i<records.length;++i){this.addLayerNode(node,records[i],nodeIndex);}}},onStoreRemove:function(store,record,index,node){if(!this._reordering){this.removeLayerNode(node,record);}},addLayerNode:function(node,layerRecord,index){index=index||0;if(this.filter(layerRecord)===true){var child=this.createNode({nodeType:'gx_layer',layer:layerRecord.get("layer"),layerStore:this.store});var sibling=node.item(index);if(sibling){node.insertBefore(child,sibling);}else{node.appendChild(child);}
child.on("move",this.onChildMove,this);}},removeLayerNode:function(node,layerRecord){if(this.filter(layerRecord)===true){var child=node.findChildBy(function(node){return node.layer==layerRecord.get("layer");});if(child){child.un("move",this.onChildMove,this);child.remove();node.reload();}}},onChildMove:function(tree,node,oldParent,newParent,index){this._reordering=true;var oldRecordIndex=this.store.findBy(function(record){return record.get("layer")===node.layer;});var record=this.store.getAt(oldRecordIndex);if(newParent instanceof GeoExt.tree.LayerContainer&&this.store===newParent.loader.store){newParent.loader._reordering=true;this.store.remove(record);var newRecordIndex;if(newParent.childNodes.length>1){var searchIndex=(index===0)?index+1:index-1;newRecordIndex=this.store.findBy(function(r){return newParent.childNodes[searchIndex].layer===r.get("layer");});index===0&&newRecordIndex++;}else if(oldParent.parentNode===newParent.parentNode){var prev=newParent;do{prev=prev.previousSibling;}while(prev&&!(prev instanceof GeoExt.tree.LayerContainer&&prev.lastChild));if(prev){newRecordIndex=this.store.findBy(function(r){return prev.lastChild.layer===r.get("layer");});}else{var next=newParent;do{next=next.nextSibling;}while(next&&!(next instanceof GeoExt.tree.LayerContainer&&next.firstChild));if(next){newRecordIndex=this.store.findBy(function(r){return next.firstChild.layer===r.get("layer");});}
newRecordIndex++;}}
if(newRecordIndex!==undefined){this.store.insert(newRecordIndex,[record]);window.setTimeout(function(){newParent.reload();oldParent.reload();});}else{this.store.insert(oldRecordIndex,[record]);}
delete newParent.loader._reordering;}
delete this._reordering;},addStoreHandlers:function(node){if(!this._storeHandlers){this._storeHandlers={"add":this.onStoreAdd.createDelegate(this,[node],true),"remove":this.onStoreRemove.createDelegate(this,[node],true)};for(var evt in this._storeHandlers){this.store.on(evt,this._storeHandlers[evt],this);}}},removeStoreHandlers:function(){if(this._storeHandlers){for(var evt in this._storeHandlers){this.store.un(evt,this._storeHandlers[evt],this);}
delete this._storeHandlers;}},createNode:function(attr){if(this.baseAttrs){Ext.apply(attr,this.baseAttrs);}
if(typeof attr.uiProvider=='string'){attr.uiProvider=this.uiProviders[attr.uiProvider]||eval(attr.uiProvider);}
attr.nodeType=attr.nodeType||"gx_layer";return new Ext.tree.TreePanel.nodeTypes[attr.nodeType](attr);},destroy:function(){this.removeStoreHandlers();}});Ext.namespace('GeoExt.ux');var scriptSourceLayerManagerExportWindow=(function(){var scripts=document.getElementsByTagName('script'),script=scripts[scripts.length-1];if(script.getAttribute.length!==undefined){return script.src;}
return script.getAttribute('src',-1);}());GeoExt.ux.LayerManagerExportWindow=Ext.extend(Ext.Window,{id:'layermanagerexportwindow',modal:true,title:OpenLayers.i18n('Export Window'),width:500,height:300,minWidth:300,minHeight:200,layout:'absolute',plain:true,bodyStyle:'padding:5px;',filename:null,filecontent:null,downloadifyBox:null,downloadifyLoaded:false,baseUrl:scriptSourceLayerManagerExportWindow.replace('/widgets/LayerManagerExportWindow.js',''),initComponent:function(){this.downloadifyBox=new Ext.BoxComponent({x:405,y:6,width:66,height:21,id:'downloadify',anchor:'',autoEl:{tag:'p',style:"text-align:right"}});this.items=[{x:10,y:5,xtype:'textfield',id:'filename',name:'filename',value:this.filename,width:384},this.downloadifyBox,{x:10,y:35,xtype:'textarea',id:'data',name:'data',value:this.filecontent,anchor:'100% 100%'}];GeoExt.ux.LayerManagerExportWindow.superclass.initComponent.call(this);this.on('afterlayout',function(){var el=Ext.get('downloadify');if(el&&!this.downloadifyLoaded&&GetFlashVersion()>=10.00){Downloadify.create('downloadify',{filename:function(){return document.getElementById('filename').value;},data:function(){return document.getElementById('data').value;},onComplete:function(){Ext.getCmp('layermanagerexportwindow').close();},onCancel:function(){},onError:function(){alert('Error occured during storage');},transparent:false,swf:this.baseUrl+'/downloadify/media/downloadify.swf',downloadImage:this.baseUrl+'/downloadify/images/extjs_download_default.png',width:66,height:21,append:false});this.downloadifyLoaded=true;}},this);}});Ext.reg('gxux_layermanagerexportwindow',GeoExt.ux.LayerManagerExportWindow);Ext.namespace("GeoExt.ux");GeoExt.ux.FeatureEditingControler=Ext.extend(Ext.util.Observable,{map:null,drawControls:null,lastDrawControl:null,deleteAllAction:null,actions:null,featureControl:null,layers:null,activeLayer:null,featurePanel:null,popup:null,useIcons:true,downloadService:null,useDefaultAttributes:true,defaultAttributes:['name','description'],autoSave:true,style:null,defaultStyle:{fillColor:"red",strokeColor:"red"},layerOptions:{},cosmetic:false,fadeRatio:0.4,opacityProperties:["fillOpacity","hoverFillOpacity","strokeOpacity","hoverStrokeOpacity"],defaultOpacity:1,'import':true,'export':true,toggleGroup:null,popupOptions:{},defaultPopupOptions:{title:OpenLayers.i18n('Edit Feature'),layout:'fit',width:280},selectControlOptions:{},constructor:function(config){Ext.apply(this,config);this.addEvents(["activelayerchanged"]);this.drawControls=[];this.actions=[];this.layers=[];this.initMap();if(config['layers']!=null){this.addLayers(config['layers']);delete config['layers'];}
if(this.cosmetic===true){var style=this.style||OpenLayers.Util.applyDefaults(this.defaultStyle,OpenLayers.Feature.Vector.style["default"]);var styleMap=new OpenLayers.StyleMap(style);var layerOptions=OpenLayers.Util.applyDefaults(this.layerOptions,{styleMap:styleMap,displayInLayerSwitcher:false});layer=new OpenLayers.Layer.Vector("Cosmetic",layerOptions);this.addLayers([layer]);}
if(this.layers.length>0){this.setActiveLayer(this.layers[0]);}
GeoExt.ux.FeatureEditingControler.superclass.constructor.apply(this,arguments);},addLayers:function(layers){for(var i=0;i<layers.length;i++){this.addLayer(layers[i]);}},addLayer:function(layer){if(!layer.map){this.map.addLayer(layer);}
this.layers.push(layer);layer.events.on({"beforefeatureselected":this.onBeforeFeatureSelect,"featureunselected":this.onFeatureUnselect,"featureselected":this.onFeatureSelect,"beforefeaturemodified":this.onModificationStart,"featuremodified":this.onModification,"afterfeaturemodified":this.onModificationEnd,"beforefeatureadded":this.onBeforeFeatureAdded,scope:this});},setActiveLayer:function(layer){this.activeLayer=layer;this.fireEvent("activelayerchanged",this,layer);this.initDrawControls(layer);this.initFeatureControl(layer);this.initDeleteAllAction();this.initImport();this.initExport();},initMap:function(){if(this.map instanceof GeoExt.MapPanel){this.map=this.map.map;}
if(!this.map){this.map=GeoExt.MapPanel.guess().map;}
if(!this.toggleGroup){this.toggleGroup=this.map.id;}},initFeatureControl:function(layer){var control,actionOptions;control=new OpenLayers.Control.ModifyFeature(layer,this.selectControlOptions);this.featureControl=control;this.map.addControl(control);actionOptions={control:control,map:this.map,toggleGroup:this.toggleGroup,allowDepress:false,pressed:false,tooltip:OpenLayers.i18n("Edit Feature"),group:this.toggleGroup,checked:false};if(this.useIcons===true){actionOptions.iconCls="gx-featureediting-editfeature";}else{actionOptions.text=OpenLayers.i18n("Edit Feature");}
var action=new GeoExt.Action(actionOptions);this.actions.push(action);},destroyFeatureControl:function(){},initDrawControls:function(layer){var control,handler,geometryTypes,geometryType,options,action,iconCls,actionOptions,tooltip;geometryTypes=[];options={};if(OpenLayers.i18n(layer.geometryType)){geometryTypes.push(OpenLayers.i18n(layer.geometryType));}else{geometryTypes.push(OpenLayers.i18n("Point"));geometryTypes.push(OpenLayers.i18n("LineString"));geometryTypes.push(OpenLayers.i18n("Polygon"));geometryTypes.push(OpenLayers.i18n("Label"));}
for(var i=0;i<geometryTypes.length;i++){geometryType=geometryTypes[i];switch(geometryType){case OpenLayers.i18n("LineString"):case OpenLayers.i18n("MultiLineString"):handler=OpenLayers.Handler.Path;iconCls="gx-featureediting-draw-line";tooltip=OpenLayers.i18n("Create line");break;case OpenLayers.i18n("Point"):case OpenLayers.i18n("MultiPoint"):handler=OpenLayers.Handler.Point;iconCls="gx-featureediting-draw-point";tooltip=OpenLayers.i18n("Create point");break;case OpenLayers.i18n("Polygon"):case OpenLayers.i18n("MultiPolygon"):handler=OpenLayers.Handler.Polygon;iconCls="gx-featureediting-draw-polygon";tooltip=OpenLayers.i18n("Create polygon");break;case OpenLayers.i18n("Label"):handler=OpenLayers.Handler.Point;iconCls="gx-featureediting-draw-label";tooltip=OpenLayers.i18n("Create label");break;}
control=new OpenLayers.Control.DrawFeature(layer,handler,options);this.drawControls.push(control);this.map.addControl(control);if(geometryType==OpenLayers.i18n("Label")){control.events.on({"featureadded":this.onLabelAdded,scope:this});}
control.events.on({"featureadded":this.onFeatureAdded,scope:this});actionOptions={control:control,map:this.map,toggleGroup:this.toggleGroup,allowDepress:false,pressed:false,tooltip:tooltip,group:this.toggleGroup,checked:false};if(this.useIcons===true){actionOptions.iconCls=iconCls;}else{actionOptions.text=geometryType;}
action=new GeoExt.Action(actionOptions);this.actions.push(action);}},destroyDrawControls:function(){for(var i=0;i<this.drawControls.length;i++){this.drawControls[i].destroy();}
this.drawControls=[];},initDeleteAllAction:function(){var actionOptions={handler:this.deleteAllFeatures,scope:this,tooltip:OpenLayers.i18n('Delete all features')};if(this.useIcons===true){actionOptions.iconCls="gx-featureediting-delete";}else{actionOptions.text=OpenLayers.i18n('DeleteAll');}
var action=new Ext.Action(actionOptions);this.deleteAllAction=action;this.actions.push(action);},deleteAllFeatures:function(){Ext.MessageBox.confirm(OpenLayers.i18n('Delete All Features'),OpenLayers.i18n('Do you really want to delete all features ?'),function(btn){if(btn=='yes'){if(this.popup){this.popup.close();this.popup=null;}
for(var i=0;i<this.layers.length;i++){this.layers[i].destroyFeatures();}}},this);},initImport:function(layer){if(this['import']===true){var actionOptions={handler:this.importFeatures,scope:this,tooltip:OpenLayers.i18n('Import KML')};if(this.useIcons===true){actionOptions.iconCls="gx-featureediting-import";}else{actionOptions.text=OpenLayers.i18n("Import");}
var action=new Ext.Action(actionOptions);this.actions.push(action);}},importFeatures:function(){GeoExt.ux.data.Import.KMLImport(this.map,this.activeLayer);},initExport:function(){if(this['export']===true){var actionOptions={handler:this.exportFeatures,scope:this,tooltip:OpenLayers.i18n('Export KML')};if(this.useIcons===true){actionOptions.iconCls="gx-featureediting-export";}else{actionOptions.text=OpenLayers.i18n("Export");}
var action=new Ext.Action(actionOptions);this.actions.push(action);}},exportFeatures:function(){GeoExt.ux.data.Export.KMLExport(this.map,this.layers,null,this.downloadService);},getSelectControl:function(){var control=false;switch(this.featureControl.CLASS_NAME){case"OpenLayers.Control.SelectFeature":control=this.featureControl;break;case"OpenLayers.Control.ModifyFeature":case"OpenLayers.Control.DeleteFeature":control=this.featureControl.selectControl;break;}
return control;},getActiveDrawControl:function(){var control=false;for(var i=0;i<this.drawControls.length;i++){if(this.drawControls[i].active){control=this.drawControls[i];break;}}
return control;},onLabelAdded:function(event){var feature=event.feature;feature.isLabel=true;},onFeatureAdded:function(event){var feature,drawControl;feature=event.feature;feature.state=OpenLayers.State.INSERT;drawControl=this.getActiveDrawControl();if(drawControl){drawControl.deactivate();this.lastDrawControl=drawControl;}
this.featureControl.activate();this.getSelectControl().select(feature);},onModificationStart:function(event){var feature=(event.geometry)?event:event.feature;var drawControl=this.getActiveDrawControl();if(drawControl){drawControl.deactivate();this.featureControl.activate();}
var options={autoSave:this.autoSave,features:[feature],controler:this,useIcons:this.useIcons};if(this['export']===true){options['plugins']=[new GeoExt.ux.ExportFeature(),new GeoExt.ux.CloseFeatureDialog()];}
this.featurePanel=new GeoExt.ux.form.FeaturePanel(options);popupOptions={feature:feature,controler:this,items:[this.featurePanel]};popupOptions=OpenLayers.Util.applyDefaults(popupOptions,this.popupOptions);popupOptions=OpenLayers.Util.applyDefaults(popupOptions,this.defaultPopupOptions);var popup=new GeoExt.Popup(popupOptions);feature.popup=popup;this.popup=popup;popup.on({close:function(){if(OpenLayers.Util.indexOf(this.controler.activeLayer.selectedFeatures,this.feature)>-1){this.controler.getSelectControl().unselect(this.feature);}}});popup.show();},onModification:function(event){var feature=(event.geometry)?event:event.feature;},onModificationEnd:function(event){var feature=(event.geometry)?event:event.feature;if(!feature){return;}
this.triggerAutoSave();if(feature.popup){feature.popup.close();feature.popup=null;}
this.reactivateDrawControl();},onBeforeFeatureAdded:function(event){var feature=event.feature;this.parseFeatureStyle(feature);this.parseFeatureDefaultAttributes(feature);},parseFeatureStyle:function(feature){var symbolizer=this.activeLayer.styleMap.createSymbolizer(feature);feature.style=symbolizer;},parseFeatureDefaultAttributes:function(feature){var hasAttributes;if(this.useDefaultAttributes===true){hasAttributes=false;for(var key in feature.attributes){hasAttributes=true;break;}
if(!hasAttributes){for(var i=0;i<this.defaultAttributes.length;i++){feature.attributes[this.defaultAttributes[i]]='';}}}},reactivateDrawControl:function(){if(this.lastDrawControl&&this.activeLayer.selectedFeatures.length===0){this.featureControl.deactivate();this.lastDrawControl.activate();this.lastDrawControl=null;}},triggerAutoSave:function(){if(this.autoSave){this.featurePanel.triggerAutoSave();}},onBeforeFeatureSelect:function(event){var feature=(event.geometry)?event:event.feature;if(feature.layer.selectedFeatures.length===0){this.applyStyles('faded',{'redraw':true});}},onFeatureUnselect:function(event){var feature=(event.geometry)?event:event.feature;this.applyStyle(feature,'faded',{'redraw':true});if(feature.layer.selectedFeatures.length===0){this.applyStyles('normal',{'redraw':true});}},onFeatureSelect:function(event){var feature=(event.geometry)?event:event.feature;this.applyStyle(feature,'normal',{'redraw':true});},applyStyles:function(style,options){style=style||"normal";options=options||{};for(var i=0;i<this.layers.length;i++){layer=this.layers[i];for(var j=0;j<layer.features.length;j++){feature=layer.features[j];if(!feature._sketch){this.applyStyle(feature,style);}}
if(options['redraw']===true){layer.redraw();}}},applyStyle:function(feature,style,options){var fRatio;options=options||{};switch(style){case"faded":fRatio=this.fadeRatio;break;default:fRatio=1/this.fadeRatio;}
for(var i=0;i<this.opacityProperties.length;i++){property=this.opacityProperties[i];if(feature.style[property]){feature.style[property]*=fRatio;}}
if(options['redraw']===true){feature.layer.drawFeature(feature);}},CLASS_NAME:"GeoExt.ux.FeatureEditingControler"});Ext.namespace("geoadmin");geoadmin.Layers=OpenLayers.Class({layers:null,initialize:function(){this.layers={"parcels":{name:OpenLayers.i18n("parcels"),format:"image/png",type:"polygon",queryable:true,exclusion:[1,11,21,31,32,33,34,35,36,37,38,39,51,52,53,54,55,56,57,58]},"parcels_labels":{name:OpenLayers.i18n("parcels_labels"),format:"image/png",type:"point",queryable:false},"buildings":{name:OpenLayers.i18n('Gebäude'),format:"image/png",type:"polygon",queryable:true,exclusion:[2,12,22,41,42,43,44,45,46,47,48,49,61,62,63,64,65,66,67,68]},"toponymes":{name:OpenLayers.i18n('toponymes'),format:"image/png",type:"polygon",queryable:false,exclusion:[3,13,23]},"addresses":{name:OpenLayers.i18n('addresses'),format:"image/png",type:"point",queryable:true},"topo":{name:OpenLayers.i18n("topo"),format:"image/png",type:"raster",queryable:false,exclusion:[1,2]},"topo_5k":{name:OpenLayers.i18n("topo_5k"),format:"image/png",type:"raster",queryable:false,exclusion:[1,2]},"topo_20k":{name:OpenLayers.i18n("topo_20k"),format:"image/png",type:"raster",queryable:false},"topo_50k":{name:OpenLayers.i18n("topo_50k"),format:"image/png",type:"raster",queryable:false},"topo_100k":{name:OpenLayers.i18n("topo_100k"),format:"image/png",type:"raster",queryable:false},"bdcarto_100k":{name:OpenLayers.i18n("bdcarto_100k"),format:"image/png",type:"raster",queryable:false},"topo_250k":{name:OpenLayers.i18n("topo_250k"),format:"image/png",type:"raster",queryable:false},"ortho":{name:OpenLayers.i18n("ortho"),format:"image/jpeg",type:"raster",queryable:false,exclusion:[1,2]},"ortho_irc":{name:OpenLayers.i18n("ortho_irc"),format:"image/jpeg",type:"raster",queryable:false,exclusion:[1,2]},"ortho_2004":{name:OpenLayers.i18n("ortho_2004"),format:"image/jpeg",type:"raster",queryable:false,exclusion:[1,2]},"ortho_2001":{name:OpenLayers.i18n("ortho_2001"),format:"image/jpeg",type:"raster",queryable:false,exclusion:[1,2]},"1907_CAHANSEN":{name:OpenLayers.i18n("1907_CAHANSEN"),format:"image/png",type:"raster",queryable:false,exclusion:[]},"1927_CAHANSEN":{name:OpenLayers.i18n("1927_CAHANSEN"),format:"image/png",type:"raster",queryable:false,exclusion:[]},"TOPO25K1954C24":{name:OpenLayers.i18n("TOPO25K1954C24"),format:"image/png",type:"raster",queryable:false,exclusion:[]},"natura2000":{name:OpenLayers.i18n("natura2000"),format:"image/png",type:"polygon",queryable:true},"geologie":{name:OpenLayers.i18n("Geologie"),format:"image/png",type:"raster",queryable:false},"communes":{name:OpenLayers.i18n("Cities"),format:"image/png",type:"polygon",queryable:true},"cantons":{name:OpenLayers.i18n("cantons"),format:"image/png",type:"polygon",queryable:true},"districts":{name:OpenLayers.i18n("districts"),format:"image/png",type:"polygon",queryable:true},"country":{name:OpenLayers.i18n("country"),format:"image/png",type:"polygon",queryable:true},"communes_cadastrales":{name:OpenLayers.i18n("communes_cadastrales"),format:"image/png",type:"polygon",queryable:true},"sections_cadastrales":{name:OpenLayers.i18n("sections_cadastrales"),format:"image/png",type:"polygon",queryable:true},"feuilles_cadastrales":{name:OpenLayers.i18n("feuilles_cadastrales"),format:"image/png",type:"polygon",queryable:true},"communes_labels":{name:OpenLayers.i18n("Cities_labels"),format:"image/png",type:"polygon",queryable:true},"cantons_labels":{name:OpenLayers.i18n("cantons_labels"),format:"image/png",type:"polygon",queryable:true},"districts_labels":{name:OpenLayers.i18n("districts_labels"),format:"image/png",type:"polygon",queryable:true},"communes_cadastrales_labels":{name:OpenLayers.i18n("communes_cadastrales_labels"),format:"image/png",type:"polygon",queryable:true},"sections_cadastrales_labels":{name:OpenLayers.i18n("sections_cadastrales_labels"),format:"image/png",type:"polygon",queryable:true},"roads":{name:OpenLayers.i18n("roads"),format:"image/png",type:"line",queryable:false},"roads_labels":{name:OpenLayers.i18n("roads_labels"),format:"image/png",type:"line",queryable:false},"rivers":{name:OpenLayers.i18n("rivers"),format:"image/png",type:"line",queryable:false},"flood_risk":{name:OpenLayers.i18n("flood_risk"),format:"image/png",type:"polygon",queryable:false,exclusion:[1,2]},"wg_relief_dhm_2m":{name:OpenLayers.i18n("wg_relief_dhm_2m"),format:"image/png",type:"raster",queryable:false,exclusion:[]},"wg_hohenlinien_10m":{name:OpenLayers.i18n("wg_hohenlinien_10m"),format:"image/png",type:"line",queryable:true,exclusion:[]},"wg_ikonos_satellitendaten":{name:OpenLayers.i18n("wg_ikonos_satellitendaten"),format:"image/png",type:"raster",queryable:false,exclusion:[]},"wg_wasserspiegel":{name:OpenLayers.i18n("wg_wasserspiegel"),format:"image/png",type:"point",queryable:false,exclusion:[]},"wg_grundwasser":{name:OpenLayers.i18n("wg_grundwasser"),format:"image/png",type:"point",queryable:false,exclusion:[]},"wg_niederschlag":{name:OpenLayers.i18n("wg_niederschlag"),format:"image/png",type:"point",queryable:false,exclusion:[]},"wg_landesgrenzen":{name:OpenLayers.i18n("wg_landesgrenzen"),format:"image/png",type:"polygon",queryable:false,exclusion:[]},"wg_lufttemperatur":{name:OpenLayers.i18n("wg_lufttemperatur"),format:"image/png",type:"point",queryable:false,exclusion:[]},"wg_schneehohe":{name:OpenLayers.i18n("wg_schneehohe"),format:"image/png",type:"point",queryable:false,exclusion:[]},"wg_bodentemperatur":{name:OpenLayers.i18n("wg_bodentemperatur"),format:"image/png",type:"point",queryable:false,exclusion:[]},"wg_einzugsgebiete":{name:OpenLayers.i18n("wg_einzugsgebiete"),format:"image/png",type:"polygon",queryable:true,exclusion:[]},"wg_feuchtgebiete":{name:OpenLayers.i18n("wg_feuchtgebiete"),format:"image/png",type:"polygon",queryable:false,exclusion:[]},"wg_naturliche_(bassin)":{name:OpenLayers.i18n("wg_naturliche_(bassin)"),format:"image/png",type:"polygon",queryable:false,exclusion:[]},"wg_kunstliche_(bassin)":{name:OpenLayers.i18n("wg_kunstliche_(bassin)"),format:"image/png",type:"polygon",queryable:false,exclusion:[]},"wg_stausee_sauer":{name:OpenLayers.i18n("wg_stausee_sauer"),format:"image/png",type:"polygon",queryable:false,exclusion:[]},"wg_kilometrierung_nebengewasser":{name:OpenLayers.i18n("wg_kilometrierung_nebengewasser"),format:"image/png",type:"point",queryable:false,exclusion:[]},"wg_kilometrierung_hauptgewasser":{name:OpenLayers.i18n("wg_kilometrierung_hauptgewasser"),format:"image/png",type:"point",queryable:false,exclusion:[]},"wg_kanal__muhlgraben":{name:OpenLayers.i18n("wg_kanal__muhlgraben"),format:"image/png",type:"line",queryable:true,exclusion:[]},"wg_nebengewasser":{name:OpenLayers.i18n("wg_nebengewasser"),format:"image/png",type:"line",queryable:true,exclusion:[]},"wg_hauptgewasser":{name:OpenLayers.i18n("wg_hauptgewasser"),format:"image/png",type:"polygon",queryable:true,exclusion:[]},"wg_durchgangigkeit":{name:OpenLayers.i18n("wg_durchgangigkeit"),format:"image/png",type:"line",queryable:false,exclusion:[]},"wg_fischereiabschnitte":{name:OpenLayers.i18n("wg_fischereiabschnitte"),format:"image/png",type:"line",queryable:false,exclusion:[]},"wg_versiegelungsklassen":{name:OpenLayers.i18n("wg_versiegelungsklassen"),format:"image/png",type:"polygon",queryable:false,exclusion:[]},"wg_einschrankung_warmepumpe":{name:OpenLayers.i18n("wg_einschrankung_warmepumpe"),format:"image/png",type:"polygon",queryable:false,exclusion:[]},"wg_grundwasserleiter":{name:OpenLayers.i18n("wg_grundwasserleiter"),format:"image/png",type:"polygon",queryable:false,exclusion:[]},"wg_bohrungen":{name:OpenLayers.i18n("wg_bohrungen"),format:"image/png",type:"point",queryable:false,exclusion:[]},"wg_quellen":{name:OpenLayers.i18n("wg_quellen"),format:"image/png",type:"point",queryable:false,exclusion:[]},"wg_nitratbelastung":{name:OpenLayers.i18n("wg_nitratbelastung"),format:"image/png",type:"point",queryable:false,exclusion:[]},"wg_provisorische_trinkwasser_schutzzonen":{name:OpenLayers.i18n("wg_provisorische_trinkwasser_schutzzonen"),format:"image/png",type:"polygon",queryable:false,exclusion:[]},"wg_trinkwasserbehalter":{name:OpenLayers.i18n("wg_trinkwasserbehalter"),format:"image/png",type:"point",queryable:false,exclusion:[]},"wg_landnutzung":{name:OpenLayers.i18n("wg_landnutzung"),format:"image/png",type:"polygon",queryable:true,exclusion:[]},"wg_trinkwassersyndikate":{name:OpenLayers.i18n("wg_trinkwassersyndikate"),format:"image/png",type:"polygon",queryable:false,exclusion:[]},"wg_pumpstationen":{name:OpenLayers.i18n("wg_pumpstationen"),format:"image/png",type:"point",queryable:false,exclusion:[]},"wg_kontrollpunkte":{name:OpenLayers.i18n("wg_kontrollpunkte"),format:"image/png",type:"point",queryable:false,exclusion:[]},"wg_trinkwasserentnahmepunkte":{name:OpenLayers.i18n("wg_trinkwasserentnahmepunkte"),format:"image/png",type:"point",queryable:false,exclusion:[]},"wg_gefahrenklassen":{name:OpenLayers.i18n("wg_gefahrenklassen"),format:"image/png",type:"polygon",queryable:false,exclusion:[39,49]},"wg_querprofile":{name:OpenLayers.i18n("wg_querprofile"),format:"image/png",type:"line",queryable:true,exclusion:[]},"wg_bauwerke":{name:OpenLayers.i18n("wg_bauwerke"),format:"image/png",type:"point",queryable:true,exclusion:[]},"wg_intensitaet_hq_extrem":{name:OpenLayers.i18n("wg_intensitaet_hq_extrem"),format:"image/png",type:"polygon",queryable:false,exclusion:[51,61]},"wg_intensitaet_hq_200":{name:OpenLayers.i18n("wg_intensitaet_hq_200"),format:"image/png",type:"polygon",queryable:false,exclusion:[52,62]},"wg_intensitaet_hq_100":{name:OpenLayers.i18n("wg_intensitaet_hq_100"),format:"image/png",type:"polygon",queryable:false,exclusion:[53,63]},"wg_intensitaet_hq_50":{name:OpenLayers.i18n("wg_intensitaet_hq_50"),format:"image/png",type:"polygon",queryable:false,exclusion:[54,64]},"wg_wassertiefe_hq_extrem":{name:OpenLayers.i18n("wg_wassertiefe_hq_extrem"),format:"image/png",type:"polygon",queryable:false,exclusion:[55,65]},"wg_wassertiefe_hq_200":{name:OpenLayers.i18n("wg_wassertiefe_hq_200"),format:"image/png",type:"polygon",queryable:false,exclusion:[56,66]},"wg_wassertiefe_hq_100":{name:OpenLayers.i18n("wg_wassertiefe_hq_100"),format:"image/png",type:"polygon",queryable:false,exclusion:[57,67]},"wg_wassertiefe_hq_50":{name:OpenLayers.i18n("wg_wassertiefe_hq_50"),format:"image/png",type:"polygon",queryable:false,exclusion:[58,68]},"wg_hangneigung_":{name:OpenLayers.i18n("wg_hangneigung_"),format:"image/png",type:"polygon",queryable:false,exclusion:[]},"wg_uesg_extrem":{name:OpenLayers.i18n("wg_uesg_extrem"),format:"image/png",type:"polygon",queryable:false,exclusion:[31,41]},"wg_uesg_200_jaehrlich":{name:OpenLayers.i18n("wg_uesg_200_jaehrlich"),format:"image/png",type:"polygon",queryable:false,exclusion:[32,42]},"wg_uesg_100_jaehrlich":{name:OpenLayers.i18n("wg_uesg_100_jaehrlich"),format:"image/png",type:"polygon",queryable:false,exclusion:[33,43]},"wg_uesg_50_jaehrlich":{name:OpenLayers.i18n("wg_uesg_50_jaehrlich"),format:"image/png",type:"polygon",queryable:false,exclusion:[34,44]},"wg_uesg_sure_1995":{name:OpenLayers.i18n("wg_uesg_sure_1995"),format:"image/png",type:"polygon",queryable:false,exclusion:[35,45]},"wg_uesg_alzette_1995":{name:OpenLayers.i18n("wg_uesg_alzette_1995"),format:"image/png",type:"polygon",queryable:false,exclusion:[36,46]},"wg_uesg_1993_(ausser_mosel)":{name:OpenLayers.i18n("wg_uesg_1993_(ausser_mosel)"),format:"image/png",type:"polygon",queryable:false,exclusion:[37,47]},"wg_uesg_1983___mosel":{name:OpenLayers.i18n("wg_uesg_1983___mosel"),format:"image/png",type:"polygon",queryable:false,exclusion:[38,48]},"wg_exposition":{name:OpenLayers.i18n("wg_exposition"),format:"image/png",type:"polygon",queryable:false,exclusion:[]},"wg_abwasser_syndikate":{name:OpenLayers.i18n("wg_abwasser_syndikate"),format:"image/png",type:"polygon",queryable:false,exclusion:[]},"wg_klaranlagen":{name:OpenLayers.i18n("wg_klaranlagen"),format:"image/png",type:"point",queryable:false,exclusion:[]},"wg_hmwb_(stark_modifizierte_wasserkorper)":{name:OpenLayers.i18n("wg_hmwb_(stark_modifizierte_wasserkorper)"),format:"image/png",type:"line",queryable:false,exclusion:[]},"wg_betrachtungsraume":{name:OpenLayers.i18n("wg_betrachtungsraume"),format:"image/png",type:"polygon",queryable:false,exclusion:[]},"wg_gewasserentwicklungsfahigkeit":{name:OpenLayers.i18n("wg_gewasserentwicklungsfahigkeit"),format:"image/png",type:"line",queryable:false,exclusion:[]},"wg_relief":{name:OpenLayers.i18n("wg_relief"),format:"image/png",type:"raster",queryable:false,exclusion:[]},"wg_timis_hochwasser_gefahrdungen":{name:OpenLayers.i18n("wg_timis_hochwasser_gefahrdungen"),format:"image/png",type:"polygon",queryable:false,exclusion:[39,49],opacity:70},"wg_timis_hochwasser_intensitaten_ehq":{name:OpenLayers.i18n("wg_timis_hochwasser_intensitaten_ehq"),format:"image/png",type:"polygon",queryable:false,exclusion:[55,65]},"wg_timis_hochwasser_intensitaten_hq100":{name:OpenLayers.i18n("wg_timis_hochwasser_intensitaten_hq100"),format:"image/png",type:"polygon",queryable:false,exclusion:[56,66]},"wg_timis_hochwasser_intensitaten_hq50":{name:OpenLayers.i18n("wg_timis_hochwasser_intensitaten_hq50"),format:"image/png",type:"polygon",queryable:false,exclusion:[57,67]},"wg_timis_hochwasser_intensitaten_hq10":{name:OpenLayers.i18n("wg_timis_hochwasser_intensitaten_hq10"),format:"image/png",type:"polygon",queryable:false,exclusion:[58,68]},"wg_timis_wassertiefe_ehq":{name:OpenLayers.i18n("wg_timis_wassertiefe_ehq"),format:"image/png",type:"polygon",queryable:false,exclusion:[51,61]},"wg_timis_wassertiefe_hq100":{name:OpenLayers.i18n("wg_timis_wassertiefe_hq100"),format:"image/png",type:"polygon",queryable:false,exclusion:[52,62]},"wg_timis_wassertiefe_hq50":{name:OpenLayers.i18n("wg_timis_wassertiefe_hq50"),format:"image/png",type:"polygon",queryable:false,exclusion:[53,63]},"wg_timis_wassertiefe_hq10":{name:OpenLayers.i18n("wg_timis_wassertiefe_hq10"),format:"image/png",type:"polygon",queryable:false,exclusion:[54,64]},"wg_timis_ueberflutungsflachen_ehq":{name:OpenLayers.i18n("wg_timis_ueberflutungsflachen_ehq"),format:"image/png",type:"polygon",queryable:false,exclusion:[31,41]},"wg_timis_ueberflutungsflachen_hq100":{name:OpenLayers.i18n("wg_timis_ueberflutungsflachen_hq100"),format:"image/png",type:"polygon",queryable:false,exclusion:[32,42]},"wg_timis_ueberflutungsflachen_hq50":{name:OpenLayers.i18n("wg_timis_ueberflutungsflachen_hq50"),format:"image/png",type:"polygon",queryable:false,exclusion:[33,43]},"wg_timis_ueberflutungsflachen_hq10":{name:OpenLayers.i18n("wg_timis_ueberflutungsflachen_hq10"),format:"image/png",type:"polygon",queryable:false,exclusion:[34,44]},"topo_decoupage_r":{name:OpenLayers.i18n("topo_decoupage_r"),format:"image/png",type:"polygon",queryable:true}};}});Proj4js.defs["EPSG:2169"]="+title=Luxembourg 1930 / Gauss+proj=tmerc +lat_0=49.83333333333334 +lon_0=6.166666666666667 +k=1 +x_0=80000 +y_0=100000 +ellps=intl +towgs84=-193,13.7,-39.3,-0.41,-2.933,2.688,0.43 +units=m +no_defs";OpenLayers.Util.extend(OpenLayers.Lang.de,{'mf.tools':'Werkzeuge','mf.layertree':'Legendendarstellung','mf.layertree.opacity':'Transparenz','mf.layertree.remove':'Ausblenden','mf.layertree.zoomToExtent':'Auf die Ausdehnung zoomen','mf.print.mapTitle':'Titel','mf.print.comment':'Kommentar','mf.print.loadingConfig':'Laden der Konfiguration...','mf.print.serverDown':'Der Druck-Systemdienst funktioniert nicht','mf.print.unableToPrint':"Kann nicht drucken",'mf.print.generatingPDF':"Generierung des PDFs...",'mf.print.dpi':'DPI','mf.print.scale':'Maßstab','mf.print.rotation':'Rotation','mf.print.print':'Drucken','mf.print.resetPos':'Zurücksetzen','mf.print.layout':'Layout','mf.print.addPage':'Seite hinzufügen','mf.print.remove':'Seite entfernen','mf.print.clearAll':'Alles löschen','mf.print.pdfReady':'Das PDF-Dokument kann heruntergeladen werden.','mf.print.noPage':'Keine Seite ausgewählt, bitte auf "'+this['mf.print.addPage']+'"-'+'Button klicken um eine Seite hinzuzufügen.','mf.print.print-tooltip':'Ein PDF generieren, dass mindestens die bounding box umfasst','mf.error':'Fehler','mf.warning':'Warnung','mf.information':'Information','mf.cancel':'Abbrechen','mf.recenter.x':'X','mf.recenter.y':'Y','mf.recenter.submit':'zentrieren','mf.recenter.missingCoords':'Fehlende Koordinaten.','mf.recenter.outOfRangeCoords':'Eingegebene Koordinaten (${myX}, ${myY}) sind außerhalb des Kartenperimeters<br />'+'und sollen in folgenden Auschnitt sein:<br/>'+'${coordX} zwischen ${minCoordX} und ${maxCoordX},<br />'+'${coordY} zwischen ${minCoordY} und ${maxCoordY}','mf.recenter.ws.error':'Ein Fehler ist beim Zugang zum Webdienst vorgekommen:','mf.recenter.ws.service':'Ausgewählter Webdienst','mf.control.previous':'Vorherige Ansicht','mf.control.next':'Nächste Ansicht','mf.control.pan':'Verschieben','mf.control.zoomIn':'Hinein zoomen','mf.control.zoomOut':'Heraus zoomen','mf.control.zoomAll':'Globale Ansicht'});OpenLayers.Lang.lu={'Coordinates: ':'Koordinaten : ','Print':'Drëcken','Measure':'Moossen','Pan':'Kaart verschieben','Full extent':'Iwwersichtskaart','Distance measurement (double-click to terminate)':'Entfernung moossen (Doppelklick fier oofzeschléissen)','Area measurement (double-click to terminate)':'Fläch moossen (Doppelklick fier oofzeschléissen)','zoomin':'Razoomen','zoomout':'Rauszoomen','Next view':'No fier','Previous view':'No hannen','next':'No fier','previous':'No hannen','Save context':'Kontext speicheren','mf.print.layout':'Layout','a_A4_landscape':'A4 Landscape','b_A4_portrait':'A4 Portrait','c_A3_landscape':'A3 Landscape','d_A3_portrait':'A3 Portrait','Gebiete mit naturbedingten Risiken':'Gebidder matt natierleche Risiken','flood_risk':'Héichwaasserrisiken','natura2000':'Natura 2000','rivers':'Flëssleef','Cities_labels':'Gemengen (Nimm)','cantons_labels':'Kantoner (Nimm)','districts_labels':'Distrikter (Nimm)','Cities':'Gemengen','cantons':'Kantoner','districts':'Distrikter','roads':'Stroossennnetz','roads_labels':'Stroossennimm','ortho':'Orthophoto 2007','ortho_irc':'Orthophoto 2007 (infrarout)','ortho_2001':'Orthophoto 2001','ortho_2004':'Orthophoto 2004','1907_CAHANSEN':'Topographesch Kaart 1907','1927_CAHANSEN':'Topographesch Kaart 1927','TOPO25K1954C24':'Topographesch Kaart 1954','topo':'Automatesch topographesch Kaart','topo_5k':'Topographesch Kaart 1:5000','topo_20k':'Topographesch Kaart 1:20000','topo_decoupage_r':'Blaatschnett Regional Kaart','topo_50k':'Topographesch Kaart 1:50000','topo_100k':'Topographesch Kaart 1:100000','topo_250k':'Topographesch Kaart 1:250000','Topographische Karten':'Topographesch Kaarten','wg_relief_dhm_2m':'Relief DHM 2m','wg_hohenlinien_10m':'Héichtenlinien 10m','wg_ikonos_satellitendaten':'Satellitendonnée Ikonos','wg_wasserspiegel':'Waasserspigel','wg_grundwasser':'Grondwaasser','wg_niederschlag':'Nidderschlag','wg_landesgrenzen':'Landesgrenzen','country':'Landesgrenzen','wg_lufttemperatur':'Lofttemperatur','wg_schneehohe':'Schnéihéicht','wg_bodentemperatur':'Buedemtemperatur','wg_einzugsgebiete':'Anzuchsgebidder','wg_feuchtgebiete':'Fiichtgebieter','wg_naturliche_(bassin)':'Natierleche Baseng','wg_kunstliche_(bassin)':'Kënstleche Baseng','wg_stausee_sauer':'Stausee Sauer','wg_kilometrierung_nebengewasser':'Kilometréierung Niewengewässer','wg_kilometrierung_hauptgewasser':'Kilometréierung Haaptgewässer','wg_kanal__muhlgraben':'Kanal, Millekanal','wg_nebengewasser':'Niewengewässer','wg_hauptgewasser':'Haaptgewässer','wg_durchgangigkeit':'Duerchgängegkeet','wg_fischereiabschnitte':'Fëschereiofschnëtter','wg_versiegelungsklassen':'Versichelung','wg_einschrankung_warmepumpe':'Aschränkungen Wärmepompelen','wg_grundwasserleiter':'Grondwaasserleeder','wg_bohrungen':'Buerung','wg_quellen':'Quell','wg_nitratbelastung':'Nitratbelaaschtung','wg_provisorische_trinkwasser_schutzzonen':'Provisoresch Drénkwaasserschutzgebidder','wg_trinkwasserbehalter':'Drénkwaasserbehälter','wg_landnutzung':'Landnotzung','wg_trinkwassersyndikate':'Drénkwaassersyndikater','wg_pumpstationen':'Pompelstatiounen','wg_kontrollpunkte':'Iwwerwaachungspunkten','wg_trinkwasserentnahmepunkte':'Drénkwaasserentnamepunkten','wg_gefahrenklassen':'Geforenklassen','wg_querprofile':'Querprofiler','wg_bauwerke':'Bauwierker','wg_intensitaet_hq_extrem':'Intensitéit Extrem Héichwaasser','wg_intensitaet_hq_200':'Intensitéit 200 jährlecht Héichwaasser','wg_intensitaet_hq_100':'Intensitéit 100 jährlecht Héichwaasser','wg_intensitaet_hq_50':'Intensitéit 50 jährlecht Héichwaasser','wg_wassertiefe_hq_extrem':'Extrem Héichwaasserdéift','wg_wassertiefe_hq_200':'200 jährlech Héichwaasserdéift','wg_wassertiefe_hq_100':'100 jährlech Héichwaasserdéift','wg_wassertiefe_hq_50':'50 jährlech Héichwaasserdéift','wg_hangneigung_':'Hangneigung','wg_uesg_extrem':'ISG Extrem','wg_uesg_200_jaehrlich':'ISG 200-jährlech','wg_uesg_100_jaehrlich':'ISG 100-jährlech','wg_uesg_50_jaehrlich':'ISG 50-jährlech','wg_timis_hochwasser_gefahrdungen':'Héichwaasser-Gefährdungen','wg_timis_hochwasser_intensitaten_ehq':'Intensitéit Extrem Héichwaasser','wg_timis_hochwasser_intensitaten_hq100':'Intensitéit 100 jährlecht Héichwaasser','wg_timis_hochwasser_intensitaten_hq50':'Intensitéit 50 jährlecht Héichwaasser','wg_timis_hochwasser_intensitaten_hq10':'Intensitéit 10 jährlecht Héichwaasser','wg_timis_wassertiefe_ehq':'Extrem Héichwaasserdéift','wg_timis_wassertiefe_hq100':'100 jährlech Héichwaasserdéift','wg_timis_wassertiefe_hq50':'50 jährlech Héichwaasserdéift','wg_timis_wassertiefe_hq10':'10 jährlech Héichwaasserdéift','wg_timis_ueberflutungsflachen_ehq':'ISG Extrem','wg_timis_ueberflutungsflachen_hq100':'ISG 100-jährlech','wg_timis_ueberflutungsflachen_hq50':'ISG 50-jährlech','wg_timis_ueberflutungsflachen_hq10':'ISG 10-jährlech','wg_uesg_sure_1995':'ISG Sauer 1995','wg_uesg_alzette_1995':'ISG Uelzecht 1995','wg_uesg_1993_(ausser_mosel)':'ISG 1993 (ausser Musel)','wg_uesg_1983___mosel':'ISG 1983 - Musel','wg_exposition':'Expositioun','wg_abwasser_syndikate':'Oofwaassersyndikater','wg_klaranlagen':'Kläranlagen','wg_hmwb_(stark_modifizierte_wasserkorper)':'HMWB (staark modifizéiert Waasserkiirper)','wg_betrachtungsraume':'Betruechtungsraim','wg_gewasserentwicklungsfahigkeit':'Gewässerentwëcklungsfähegkeet','wg_relief':'Relief','Zoom to the max extent':'Ganz Lëtzebuerg','permalink action':'Link','print action':'Drëcken','Search':'Sich','Catalog':'Katalog','Layer Selection':'Auswiel','Warning screen resolution':'Warnung Bildschirmopléisung','Ihre Bildschirmauflösung ist kleiner als 1024x768 pixels. map.geo.admin.ch is not optmized for small screen resolution.':'Äer Bildschirmopléisung ass méi kleng wéi 1024x768 Pixel. map.geoportail.lu ass net fier eng kleng Bildschirmauflösung optiméiert.','Full map':'Grouss Kaart','Geo search...':'Sich no Uertschaften, Gemengen, Koordinaten ...','show column':'Layerlëscht uweisen','hide column':'Layerlëscht verstoppen','Map URL':'Deen ënnestoende Link an eng Email abannen','URL':'URL','Basisdaten':'Basisdaten','Referenzsysteme':'Referenzsystemer','Geografische Namen':'Geographësch Nimm','Administrative Einheiten':'Administrativ Eenheeten','Bodennutzung':'Buedemnotzung','Biologie':'Biologie','Versorgungswirtschaft und staatliche Dienste':'Versuergungs- an öffentlech Dëngschter','Wasserrahmenrichtlinie':'Waasserramerichtlinn','Adressen':'Adressen','addresses':'Adressen','Flurstücke / Grundstücke':'Kadasterdaten','parcels':'Kadasterparzellen','parcels_labels':'Kadasterparzellen (Nummeren)','communes_cadastrales_labels':'Kadastergemengen (Nimm)','sections_cadastrales_labels':'Kadastersektiounen (Nimm)','communes_cadastrales':'Kadastergemengen','sections_cadastrales':'Kadastersektiounen','feuilles_cadastrales':'Kadaster Urpläng','toponymes':'Kadaster-Flouernimm','Oberflächendarstellung':'Uewerflächenduerstellung','Gewässernetz':'Gewässernetz','Höhe':'Héicht','Bodenbedeckung':'Buedembedeckung','Luft und Satellitenbilder':'Loft a Satellitebilder','Raum und Bevölkerung':'Raum a Bevölkerung','Gesundheit une Sicherheit':'Gesondheet a Sëcherheet','Bevölkerungsdichte':'Bevölkerungsverdeelung','Raumplanung':'Raumplanung an -entwicklung','Infrastrucktur une Kommunikation':'Infrastruktur a Kommunikation','Verkehrsnetze':'Verkéiersnetzer','Gebäude':'Gebeier','Öffentliche Einrichtungen und Dienste':'Öffentlech Ariichtungen','Umwelt, Biologie und Geologie':'Ëmwelt, Biologie a Geologie','Schutzgebiete':'Schutzgebidder','Geologie':'Geologie','Boden':'Buedem','Umweltüberwachung':'Ëmweltiwwerwaachung','Natürliche Risikozonen':'Natierlech Risikozonen','Atmosphärische Bedingungen':'Atmosphäresch Bedingungen','Meteorologie':'Meteorologie','Biogeografische Regionen':'Biogeographësch Regiounen','Lebensräume une Biotope':'Liewensreim a Biotoper','Artenvielfalt':'Artevillfalt','Mineralische Bodenschätze':'Mineralësch Buedemschätz','Energie und Wirtschaft':'Energie a Wirtschaft','Statistische Einheiten':'Statistisch Eenheeten','Landnutzung':'Landnotzung','Produktions- und Industrieanlagen':'Produktiouns- an Industrieanlagen','Land- und Wassertwirtschaft':'Land- a Waassertwirtschaft','Energiequellen':'Energiequellen','show layer options':'Layeroptiounen uweisen','hide layer options':'Layeroptiounen ausblenden','Opacity:':'Transparenz','about that layer':'Informatiounen zu dësem Datesatz','move layer up':'Layer-Reihenfolg änneren','move layer down':'Layer-Reihenfolg änneren','remove layer':'Datesatz entfernen','Feature tooltip':'Objektinformatioun','Aerial Images':'Loftbild','pixelmaps-color':'Topographesch Kaart','pixelmaps-gray':'Topographesch Kaart S/W','voidLayer':'Keen Hannergrond','aerial attribution':'Loftild: ACT 2007','pixelmap-color attribution':'Topographesch Kaart: ACT','pixelmap-gray attribution':'Topographesch Kaart S/W: ACT','loadingText':"Lueden Daten ...",'Search data...':'Daten suihen...','Warning Internet Explorer 6':'Warnung Internet Explorer 6','You are using Internet Explorer 6.':'Dier benotzt Internet Explorer 6.','We recommend to upgrade to a newer release.':'Mir empfehlen, eng méi nei Versioun ze benotzen.','You can add only 5 layers in the layer tree.':'Dier kënnt nëmmen 5 Layer auswielen.','Layer metadata':'','Layer legend':'','legend_link_parcels':'http://wiki.geoportail.lu/doku.php?id=lu:legend:pcn:show&do=export_html#plan_cadastral_numerise_pcn_parcelles','metadata_link_parcels':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=de5373d6-340f-4203-a065-da7550a03cc4_2050','legend_link_toponymes':'http://wiki.geoportail.lu/doku.php?id=lu:legend:none&do=export_html','metadata_link_toponymes':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=ffa537f7-a438-47da-9e0c-8e32260646a9','legend_link_buildings':'http://wiki.geoportail.lu/doku.php?id=lu:legend:pcn:show&do=export_html#plan_cadastral_numerise_pcn_-_batiments','metadata_link_buildings':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=5d0efc9d-a05a-4964-9f9d-a0ab9932af04','legend_link_communes':'http://wiki.geoportail.lu/doku.php?id=lu:legend:none&do=export_html','metadata_link_communes':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=de5373d6-340f-4203-a065-da7550a03cc4_2049','legend_link_roads':'http://wiki.geoportail.lu/doku.php?id=lu:legend:road_network:show&do=export_html','metadata_link_roads':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=12627f90-f0f8-41b3-a56a-2e11a232ba59','legend_link_ortho_irc':'http://wiki.geoportail.lu/doku.php?id=lu:legend:none&do=export_html','metadata_link_ortho_irc':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=9848c7ac-0c12-430d-a05f-62dda9e234a0','legend_link_ortho_2004':'http://wiki.geoportail.lu/doku.php?id=lu:legend:none&do=export_html','metadata_link_ortho_2004':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=a185f78a-ca9c-43f8-8d06-b1abba8ff056','legend_link_ortho_2001':'http://wiki.geoportail.lu/doku.php?id=lu:legend:none&do=export_html','metadata_link_ortho_2001':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=e6ff269c-1c7c-401f-a90b-b805e80a046e','legend_link_natura2000':'http://wiki.geoportail.lu/doku.php?id=lu:legend:natura2000&do=export_html','metadata_link_natura2000':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=c56bb027-9552-471b-b574-7cf9085cdd32','legend_link_rivers':'http://wiki.geoportail.lu/doku.php?id=lu:legend:none&do=export_html','metadata_link_rivers':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=4ee7580f-3996-488b-9af3-629b3837a442','legend_link_geologie':'http://www.geoportal.lu/Portail/legendes/geo100k_raster_legende.pdf','metadata_link_geologie':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=b206d194-0067-4f09-a89e-af4a6673413d','legend_link_flood_risk':'http://wiki.geoportail.lu/doku.php?id=lu:legend:flood_risk&do=export_html','metadata_link_flood_risk':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=ba745f8e-662c-4c3f-ae41-850f24bb49d8','legend_link_communes':'http://wiki.geoportail.lu/doku.php?id=lu:legend:none&do=export_html','legend_link_cantons':'http://wiki.geoportail.lu/doku.php?id=lu:legend:none&do=export_html','legend_link_districts':'http://wiki.geoportail.lu/doku.php?id=lu:legend:none&do=export_html','legend_link_pays':'http://wiki.geoportail.lu/doku.php?id=lu:legend:none&do=export_html','legend_link_communes_cadastrales':'http://wiki.geoportail.lu/doku.php?id=lu:legend:none&do=export_html','legend_link_sections_cadastrales':'http://wiki.geoportail.lu/doku.php?id=lu:legend:none&do=export_html','legend_link_feuilles_cadastrales':'http://wiki.geoportail.lu/doku.php?id=lu:legend:none&do=export_html','metadata_link_feuilles_cadastrales':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=51333029-c8cf-490f-b4a6-80ba239f0cb4','legend_link_wg_relief_dhm_2m':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:relief_dhm_2m&do=export_html','metadata_link_wg_relief_dhm_2m':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_hohenlinien_10m':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:hohenlinien_10m&do=export_html','metadata_link_wg_hohenlinien_10m':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_ikonos_satellitendaten':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:ikonos_satellitendaten&do=export_html','metadata_link_wg_ikonos_satellitendaten':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_wasserspiegel':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:wasserspiegel&do=export_html','metadata_link_wg_wasserspiegel':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_grundwasser':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:grundwasser&do=export_html','metadata_link_wg_grundwasser':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_niederschlag':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:niederschlag&do=export_html','metadata_link_wg_niederschlag':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_landesgrenzen':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:landesgrenzen&do=export_html','metadata_link_wg_landesgrenzen':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_lufttemperatur':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:lufttemperatur&do=export_html','metadata_link_wg_lufttemperatur':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_schneehohe':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:schneehohe&do=export_html','metadata_link_wg_schneehohe':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_bodentemperatur':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:bodentemperatur&do=export_html','metadata_link_wg_bodentemperatur':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_einzugsgebiete':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:einzugsgebiete&do=export_html','metadata_link_wg_einzugsgebiete':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_feuchtgebiete':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:feuchtgebiete&do=export_html','metadata_link_wg_feuchtgebiete':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_naturliche_(bassin)':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:naturliche_(bassin)&do=export_html','metadata_link_wg_naturliche_(bassin)':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_kunstliche_(bassin)':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:kunstliche_(bassin)&do=export_html','metadata_link_wg_kunstliche_(bassin)':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_stausee_sauer':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:stausee_sauer&do=export_html','metadata_link_wg_stausee_sauer':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_kilometrierung_nebengewasser':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:kilometrierung_nebengewasser&do=export_html','metadata_link_wg_kilometrierung_nebengewasser':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_kilometrierung_hauptgewasser':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:kilometrierung_hauptgewasser&do=export_html','metadata_link_wg_kilometrierung_hauptgewasser':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_kanal__muhlgraben':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:kanal__muhlgraben&do=export_html','metadata_link_wg_kanal__muhlgraben':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_nebengewasser':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:nebengewasser&do=export_html','metadata_link_wg_nebengewasser':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_hauptgewasser':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:hauptgewasser&do=export_html','metadata_link_wg_hauptgewasser':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_durchgangigkeit':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:durchgangigkeit&do=export_html','metadata_link_wg_durchgangigkeit':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_fischereiabschnitte':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:fischereiabschnitte&do=export_html','metadata_link_wg_fischereiabschnitte':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_versiegelungsklassen':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:versiegelungsklassen&do=export_html','metadata_link_wg_versiegelungsklassen':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_einschrankung_warmepumpe':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:einschrankung_warmepumpe&do=export_html','metadata_link_wg_einschrankung_warmepumpe':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_grundwasserleiter':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:grundwasserleiter&do=export_html','metadata_link_wg_grundwasserleiter':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_bohrungen':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:bohrungen&do=export_html','metadata_link_wg_bohrungen':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_quellen':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:quellen&do=export_html','metadata_link_wg_quellen':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_nitratbelastung':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:nitratbelastung&do=export_html','metadata_link_wg_nitratbelastung':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_provisorische_trinkwasser_schutzzonen':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:provisorische_trinkwasser_schutzzonen&do=export_html','metadata_link_wg_provisorische_trinkwasser_schutzzonen':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_trinkwasserbehalter':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:trinkwasserbehalter&do=export_html','metadata_link_wg_trinkwasserbehalter':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_landnutzung':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:landnutzung&do=export_html','metadata_link_wg_landnutzung':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_trinkwassersyndikate':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:trinkwassersyndikate&do=export_html','metadata_link_wg_trinkwassersyndikate':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_pumpstationen':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:pumpstationen&do=export_html','metadata_link_wg_pumpstationen':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_kontrollpunkte':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:kontrollpunkte&do=export_html','metadata_link_wg_kontrollpunkte':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_trinkwasserentnahmepunkte':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:trinkwasserentnahmepunkte&do=export_html','metadata_link_wg_trinkwasserentnahmepunkte':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_gefahrenklassen':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:gefahrenklassen&do=export_html','metadata_link_wg_gefahrenklassen':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_querprofile':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:querprofile&do=export_html','metadata_link_wg_querprofile':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_bauwerke':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:bauwerke&do=export_html','metadata_link_wg_bauwerke':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_intensitaet_hq_extrem':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:intensitaet_hq_extrem&do=export_html','metadata_link_wg_intensitaet_hq_extrem':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_intensitaet_hq_200':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:intensitaet_hq_200&do=export_html','metadata_link_wg_intensitaet_hq_200':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_intensitaet_hq_100':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:intensitaet_hq_100&do=export_html','metadata_link_wg_intensitaet_hq_100':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_intensitaet_hq_50':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:intensitaet_hq_50&do=export_html','metadata_link_wg_intensitaet_hq_50':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_wassertiefe_hq_extrem':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:wassertiefe_hq_extrem&do=export_html','metadata_link_wg_wassertiefe_hq_extrem':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_wassertiefe_hq_200':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:wassertiefe_hq_200&do=export_html','metadata_link_wg_wassertiefe_hq_200':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_wassertiefe_hq_100':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:wassertiefe_hq_100&do=export_html','metadata_link_wg_wassertiefe_hq_100':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_wassertiefe_hq_50':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:wassertiefe_hq_50&do=export_html','metadata_link_wg_wassertiefe_hq_50':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_hangneigung_':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:hangneigung_&do=export_html','metadata_link_wg_hangneigung_':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_uesg_extrem':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:uesg_extrem&do=export_html','metadata_link_wg_uesg_extrem':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_uesg_200_jaehrlich':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:uesg_200_jaehrlich&do=export_html','metadata_link_wg_uesg_200_jaehrlich':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_uesg_100_jaehrlich':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:uesg_100_jaehrlich&do=export_html','metadata_link_wg_uesg_100_jaehrlich':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_uesg_50_jaehrlich':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:uesg_50_jaehrlich&do=export_html','metadata_link_wg_uesg_50_jaehrlich':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_uesg_sure_1995':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:uesg_sure_1995&do=export_html','metadata_link_wg_uesg_sure_1995':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_uesg_alzette_1995':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:uesg_alzette_1995&do=export_html','metadata_link_wg_uesg_alzette_1995':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_uesg_1993_(ausser_mosel)':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:uesg_1993_(ausser_mosel)&do=export_html','metadata_link_wg_uesg_1993_(ausser_mosel)':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_uesg_1983___mosel':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:uesg_1983___mosel&do=export_html','metadata_link_wg_uesg_1983___mosel':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_exposition':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:exposition&do=export_html','metadata_link_wg_exposition':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_provisorische_trinkwasser_schutzzonen':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:provisorische_trinkwasser_schutzzonen&do=export_html','metadata_link_wg_provisorische_trinkwasser_schutzzonen':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_abwasser_syndikate':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:abwasser_syndikate&do=export_html','metadata_link_wg_abwasser_syndikate':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_klaranlagen':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:klaranlagen&do=export_html','metadata_link_wg_klaranlagen':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_hmwb_(stark_modifizierte_wasserkorper)':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:hmwb_(stark_modifizierte_wasserkorper)&do=export_html','metadata_link_wg_hmwb_(stark_modifizierte_wasserkorper)':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_betrachtungsraume':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:betrachtungsraume&do=export_html','metadata_link_wg_betrachtungsraume':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_provisorische_trinkwasser_schutzzonen':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:provisorische_trinkwasser_schutzzonen&do=export_html','metadata_link_wg_provisorische_trinkwasser_schutzzonen':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_gewasserentwicklungsfahigkeit':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:gewasserentwicklungsfahigkeit&do=export_html','metadata_link_wg_gewasserentwicklungsfahigkeit':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_relief':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:relief&do=export_html','metadata_link_wg_relief':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_wg_timis_hochwasser_gefahrdungen':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg:_timis_hochwasser_gefahrdungen&do=export_html','legend_link_wg_timis_hochwasser_intensitaten_ehq':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg_timis_hochwasser_intensitaten&do=export_html','legend_link_wg_timis_hochwasser_intensitaten_hq10':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg_timis_hochwasser_intensitaten&do=export_html','legend_link_wg_timis_hochwasser_intensitaten_hq100':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg_timis_hochwasser_intensitaten&do=export_html','legend_link_wg_timis_hochwasser_intensitaten_hq50':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg_timis_hochwasser_intensitaten&do=export_html','legend_link_wg_timis_ueberflutungsflachen_ehq':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg_timis_ueberflutungsflachen&do=export_html','legend_link_wg_timis_ueberflutungsflachen_hq10':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg_timis_ueberflutungsflachen&do=export_html','legend_link_wg_timis_ueberflutungsflachen_hq100':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg_timis_ueberflutungsflachen&do=export_html','legend_link_wg_timis_ueberflutungsflachen_hq50':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg_timis_ueberflutungsflachen&do=export_html','legend_link_wg_timis_wassertiefe_ehq':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg_timis_wassertiefe&do=export_html','legend_link_wg_timis_wassertiefe_hq10':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg_timis_wassertiefe&do=export_html','legend_link_wg_timis_wassertiefe_hq100':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg_timis_wassertiefe&do=export_html','legend_link_wg_timis_wassertiefe_hq50':'http://wiki.geoportail.lu/doku.php?id=lu:legend:wg_timis_wassertiefe&do=export_html','metadata_link_wg_timis_hochwasser_gefahrdungen':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_hochwasser_intensitaten_ehq':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_hochwasser_intensitaten_hq10':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_hochwasser_intensitaten_hq100':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_hochwasser_intensitaten_hq50':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_ueberflutungsflachen_ehq':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_ueberflutungsflachen_hq10':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_ueberflutungsflachen_hq100':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_ueberflutungsflachen_hq50':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_wassertiefe_ehq':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_wassertiefe_hq10':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_wassertiefe_hq100':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','metadata_link_wg_timis_wassertiefe_hq50':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=none','legend_link_topo_5k':'http://wiki.geoportail.lu/doku.php?id=lu:legend:none&do=export_html','metadata_link_topo_5k':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=270_2012','legend_link_topo_20k':'http://wiki.geoportail.lu/doku.php?id=lu:legend:none&do=export_html','metadata_link_topo_20k':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=9fb01381-698c-4e5f-950e-6c4793e0a7fd','legend_link_topo_50k':'http://wiki.geoportail.lu/doku.php?id=lu:legend:none&do=export_html','metadata_link_topo_50k':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=262','legend_link_topo_100k':'http://wiki.geoportail.lu/doku.php?id=lu:legend:none&do=export_html','metadata_link_topo_100k':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=266','legend_link_topo_250k':'http://wiki.geoportail.lu/doku.php?id=lu:legend:none&do=export_html','metadata_link_topo_250k':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=e1f601a5-ed8f-4043-8719-0cad50cbb483','legend_link_1907_CAHANSEN':'http://wiki.geoportail.lu/doku.php?id=lu:legend:none&do=export_html','metadata_link_1907_CAHANSEN':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=b88e6524-67d3-4e34-b998-6f30120e3718','legend_link_1927_CAHANSEN':'http://wiki.geoportail.lu/doku.php?id=lu:legend:none&do=export_html','metadata_link_1927_CAHANSEN':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=90750f9f-856d-41ac-a90f-a8befbd75434','legend_link_TOPO25K1954C24':'http://wiki.geoportail.lu/doku.php?id=lu:legend:none&do=export_html','metadata_link_TOPO25K1954C24':'http://www.geoportal.lu/Portail/menuAction.do?lang=lu&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=7a8bc9a4-e7c7-4584-bc4f-03deaf7b69b2','legend_link_parcels_labels':'http://wiki.geoportail.lu/doku.php?id=lu:legend:none&do=export_html','legend_link_addresses':'http://wiki.geoportail.lu/doku.php?id=lu:legend:none&do=export_html','legend_link_topo':'http://wiki.geoportail.lu/doku.php?id=lu:legend:none&do=export_html','legend_link_bdcarto_100k':'http://wiki.geoportail.lu/doku.php?id=lu:legend:none&do=export_html','legend_link_ortho':'http://wiki.geoportail.lu/doku.php?id=lu:legend:none&do=export_html','legend_link_country':'http://wiki.geoportail.lu/doku.php?id=lu:legend:none&do=export_html','legend_link_communes_labels':'http://wiki.geoportail.lu/doku.php?id=lu:legend:none&do=export_html','legend_link_cantons_labels':'http://wiki.geoportail.lu/doku.php?id=lu:legend:none&do=export_html','legend_link_districts_labels':'http://wiki.geoportail.lu/doku.php?id=lu:legend:none&do=export_html','legend_link_communes_cadastrales_labels':'http://wiki.geoportail.lu/doku.php?id=lu:legend:none&do=export_html','legend_link_sections_cadastrales_labels':'http://wiki.geoportail.lu/doku.php?id=lu:legend:none&do=export_html','legend_link_roads_labels':'http://wiki.geoportail.lu/doku.php?id=lu:legend:none&do=export_html','legend_link_topo_decoupage_r':'http://wiki.geoportail.lu/doku.php?id=lu:legend:none&do=export_html','mf.print.scale':'Moossstab','mf.print.print':'Drëcken','mf.print.generatingPDF':'PDF gëtt erstallt','Position':'','redlining action':'Zeechnen'};Ext.namespace("GeoExt.ux");GeoExt.ux.DisplayProjectionSelectorCombo=Ext.extend(Ext.form.ComboBox,{map:null,updateMapDisplayProjection:true,controls:null,projections:null,tpl:'<tpl for="."><div class="x-combo-list-item">{[values.title]} </div></tpl>',editable:false,triggerAction:'all',mode:'local',initComponent:function(){GeoExt.ux.DisplayProjectionSelectorCombo.superclass.initComponent.apply(this,arguments);this.store=new Ext.data.Store();var projectionRecord=Ext.data.Record.create([{name:'title'},{name:'projName'},{name:'srsCode'}]);var mapProjection=null;var mapProjectionRecord=null;if(this.projections){for(var i=0;i<this.projections.length;i++){mapProjection=new OpenLayers.Projection(this.projections[i]);mapProjectionRecord=new projectionRecord({title:mapProjection.proj.title,projName:mapProjection.proj.projName,srsCode:mapProjection.proj.srsCodeInput});this.store.add(mapProjectionRecord);}}else{mapProjection=new OpenLayers.Projection(this.map.getProjection());mapProjectionRecord=new projectionRecord({title:mapProjection.proj.title,projName:mapProjection.proj.projName,srsCode:mapProjection.proj.srsCodeInput});this.store.add(mapProjectionRecord);if(this.map.displayProjection&&mapProjection.proj.title!=this.map.displayProjection.proj.title){var mapDisplayProjectionRecord=new projectionRecord({title:this.map.displayProjection.proj.title,projName:this.map.displayProjection.proj.projName,srsCode:this.map.displayProjection.proj.srsCodeInput});this.store.add(mapDisplayProjectionRecord);}}
if(this.map.displayProjection){this.setValue(this.map.displayProjection.proj.title);}else{this.setValue(mapProjection.proj.title);}
this.on('select',function(combo,record,index){var displayProjection=new OpenLayers.Projection(record.data.srsCode);if(this.updateMapDisplayProjection){this.map.displayProjection=displayProjection;}
var control=null;if(this.controls){for(var k=0;k<this.controls.length;k++){control=this.controls[k];if(control.displayProjection){control.displayProjection=displayProjection;}
if(control.redraw){control.redraw();}}}else{for(var i=0;i<this.map.controls.length;i++){control=this.map.controls[i];if(control.displayProjection){control.displayProjection=displayProjection;}
if(control.redraw){control.redraw();}}}
this.fireEvent('displayProjectionChanged',this);},this);this.on('displayProjectionChanged',function(combo){combo.setValue(this.map.displayProjection.proj.title);},this);this.addEvents('displayProjectionChanged');}});Ext.reg('gxux_displayprojectionselectorcombo',GeoExt.ux.DisplayProjectionSelectorCombo);Ext.namespace("GeoExt.ux.form");GeoExt.ux.form.FeatureEditingPanel=Ext.extend(Ext.form.FormPanel,{labelWidth:100,border:false,bodyStyle:'padding:5px 5px 5px 5px',width:300,defaults:{width:120},defaultType:'textfield',controler:null,downloadService:null,initComponent:function(){if(this.controler){this.initToolbar();this.initForm();}
GeoExt.ux.form.FeatureEditingPanel.superclass.initComponent.call(this);},initToolbar:function(){Ext.apply(this,{tbar:new Ext.Toolbar(this.controler.actions)});},initForm:function(){oItems=[];oItems.push({id:"testid",fieldLabel:OpenLayers.i18n("myOption"),maxLength:50,xtype:"checkbox"});Ext.apply(this,{items:oItems});},beforeDestroy:function(){delete this.controler;}});Ext.reg("gx_featureeditingpanel",GeoExt.ux.form.FeatureEditingPanel);Ext.namespace("GeoExt.ux.form");GeoExt.ux.form.RedLiningPanel=Ext.extend(GeoExt.ux.form.FeatureEditingPanel,{map:null,'import':true,'export':true,toggleGroup:null,popupOptions:{},selectControlOptions:{},initComponent:function(){this.initMap();this.initControler();GeoExt.ux.form.RedLiningPanel.superclass.initComponent.call(this);},initMap:function(){if(this.map instanceof GeoExt.MapPanel){this.map=this.map.map;}
if(!this.map){this.map=GeoExt.MapPanel.guess().map;}},initControler:function(){this.controler=new GeoExt.ux.FeatureEditingControler({'cosmetic':true,'map':this.map,'import':this['import'],'export':this['export'],'toggleGroup':this.toggleGroup,'popupOptions':this.popupOptions,'selectControlOptions':this.selectControlOptions});}});Ext.reg("gx_redliningpanel",GeoExt.ux.form.RedLiningPanel);Ext.namespace("GeoExt.ux.form");GeoExt.ux.form.FeaturePanel=Ext.extend(Ext.form.FormPanel,{labelWidth:100,border:false,bodyStyle:'padding:5px 5px 5px 5px',width:'auto',autoWidth:true,height:'auto',autoHeight:true,defaults:{width:120},defaultType:'textfield',features:null,layer:null,controler:null,autoSave:true,deleteAction:null,attributeFieldSetId:"gx_featurepanel_attributefieldset_id",labelAttribute:"name",useIcons:true,initComponent:function(){this.initFeatures(this.features);this.initToolbar();this.initForm();GeoExt.ux.form.FeaturePanel.superclass.initComponent.call(this);},initFeatures:function(features){if(features instanceof Array){this.features=features;}else{this.features=[features];}},initToolbar:function(){this.initDeleteAction();Ext.apply(this,{bbar:new Ext.Toolbar(this.getActions())});},initForm:function(){var oItems,oGroup,feature,field,oGroupItems;if(this.features.length!=1){return;}else{feature=this.features[0];}
oItems=[];oGroupItems=[];oGroup={id:this.attributeFieldSetId,xtype:'fieldset',title:OpenLayers.i18n('Attributes'),layout:'form',collapsible:true,autoHeight:this.autoHeight,autoWidth:this.autoWidth,defaults:this.defaults,defaultType:this.defaultType};if(feature.isLabel){oGroupItems.push({name:'name',fieldLabel:OpenLayers.i18n('name'),id:'name',value:feature.attributes['name']});}
var styles=[];switch(feature.geometry.CLASS_NAME){case"OpenLayers.Geometry.Point":if(feature.isLabel){styles=[["default",OpenLayers.i18n("arial 12"),{fontSize:'12px'}],["arial_16",OpenLayers.i18n("arial 16"),{fontSize:'16px'}],["arial_24",OpenLayers.i18n("arial 24"),{fontSize:'24px'}]];}else{styles=[["default",OpenLayers.i18n("red"),{graphicName:null,fillColor:'red',strokeColor:'red'}],["yellow",OpenLayers.i18n("yellow"),{graphicName:'star',fillColor:'yellow',strokeColor:'black'}]];}
break;case"OpenLayers.Geometry.Polygon":styles=[["default",OpenLayers.i18n("red"),{fillColor:'red',strokeColor:'red'}],["yellow",OpenLayers.i18n("yellow"),{fillColor:'yellow',strokeColor:'yellow'}]];break;case"OpenLayers.Geometry.LineString":styles=[["default",OpenLayers.i18n("red"),{strokeColor:'red',strokeWidth:1}],["yellow",OpenLayers.i18n("yellow"),{strokeColor:'yellow',strokeWidth:1}],["red_2",OpenLayers.i18n("red 2"),{strokeColor:'red',strokeWidth:2}],["yellow_2",OpenLayers.i18n("yellow 2"),{strokeColor:'yellow',strokeWidth:2}]];break;default:alert("unknow");break;}
var styleStore=new Ext.data.SimpleStore({fields:['id','name','style'],data:styles});var styleCombo=new Ext.form.ComboBox({store:styleStore,triggerAction:'all',mode:'local',valueField:'id',displayField:'name',editable:false,fieldLabel:OpenLayers.i18n("style"),value:feature.attributes.__styleid||"default"});styleCombo.on("select",function(combo,record,index){var n=record.get("name");var s=record.get("style");for(var i=0;i<this.features.length;i++){var f=this.features[i];f.style=OpenLayers.Util.extend(f.style,s);f.layer.drawFeature(f);f.attributes.__styleid=n;}},this);oGroupItems.push(styleCombo);oGroup.items=oGroupItems;oItems.push(oGroup);Ext.apply(this,{items:oItems});},initDeleteAction:function(){var actionOptions={handler:this.deleteFeatures,scope:this,tooltip:OpenLayers.i18n('Delete feature')};if(this.useIcons===true){actionOptions.iconCls="gx-featureediting-delete";}else{actionOptions.text=OpenLayers.i18n('Delete');}
this.deleteAction=new Ext.Action(actionOptions);},deleteFeatures:function(){Ext.MessageBox.confirm(OpenLayers.i18n('Delete Feature'),OpenLayers.i18n('Do you really want to delete this feature ?'),function(btn){if(btn=='yes'){for(var i=0;i<this.features.length;i++){var feature=this.features[i];if(feature.popup){feature.popup.close();feature.popup=null;}
feature.layer.destroyFeatures([feature]);}
this.controler.reactivateDrawControl();}},this);},getActions:function(){if(!this.closeAction){this.closeAction=new Ext.Action({handler:function(){this.controler.triggerAutoSave();if(this.controler.popup){this.controler.popup.close();}
this.controler.reactivateDrawControl();},scope:this,text:OpenLayers.i18n('Close')});}
return[this.deleteAction,'->',this.closeAction];},triggerAutoSave:function(){if(this.autoSave){this.save();}},save:function(){var feature;if(this.features&&this.features.length===0){return;}
if(this.features.length!=1){return;}else{feature=this.features[0];}
this.parseFormFieldsToFeatureAttributes(feature);if(feature.isLabel===true){if(feature.attributes[this.labelAttribute]!=""){feature.style.label=feature.attributes[this.labelAttribute];feature.style.graphic=false;feature.style.labelSelect=true;feature.layer.drawFeature(feature);}else{feature.layer.destroyFeatures([feature]);if(this.controler.popup){this.controler.popup.close();this.controler.popup=null;}}}},parseFeatureAttributesToFormFields:function(feature){var aoElements,nElements,fieldSet;fieldSet=this.findById(this.attributeFieldSetId);aoElements=fieldSet.items.items;nElements=aoElements.length;for(var i=0;i<nElements;i++){var oElement=aoElements[i];var szAttribute=oElement.getName();var szValue=null;if(oElement.initialConfig.isfid)
{szValue=feature.fid;}
else
{szValue=feature.attributes[szAttribute];}
oElement.setValue(szValue);}},parseFormFieldsToFeatureAttributes:function(feature){var field,id,value,fieldSet;fieldSet=this.findById(this.attributeFieldSetId);for(var i=0;i<fieldSet.items.length;i++){field=fieldSet.items.get(i);id=field.getName();value=field.getValue();feature.attributes[id]=value;}},onAfterRender:function(){var feature;if(this.features.length!=1){return;}else{feature=this.features[0];}
this.parseFeatureAttributesToFormFields(feature);},beforeDestroy:function(){delete this.feature;}});Ext.reg("gx_featurepanel",GeoExt.ux.form.FeaturePanel);mapfish.PrintProtocol=OpenLayers.Class({config:null,spec:null,params:null,hasOverview:false,geodetic:false,initialize:function(map,config,overrides,dpi,params,geodetic){this.config=config;this.spec={pages:[]};overrides=this.fixOverrides(overrides,map);this.geodetic=(geodetic!=undefined)?geodetic:this.geodetic;this.addMapParams(overrides,map,dpi);this.addOverviewMapParams(overrides,map,dpi);this.params=params;},getAllInOneUrl:function(){var json=new OpenLayers.Format.JSON();var result=this.config.printURL+"?spec="+
json.write(this.encodeForURL(this.spec));if(this.params){result+="&"+OpenLayers.Util.getParameterString(this.params);}
return result;},createPDF:function(success,popup,failure,context){var specTxt=new OpenLayers.Format.JSON().write(this.spec);OpenLayers.Console.info(specTxt);try{var charset="UTF-8";var params=OpenLayers.Util.applyDefaults({url:this.config.createURL},this.params);OpenLayers.Request.POST({url:this.config.createURL,data:specTxt,params:params,headers:{'CONTENT-TYPE':"application/json; charset="+charset},callback:function(request){if(request.status>=200&&request.status<300){var json=new OpenLayers.Format.JSON();var answer=json.read(request.responseText);if(answer&&answer.getURL){this.openPdf(answer,success,popup,context);}else{failure.call(context,request);}}else{failure.call(context,request);}},scope:this});}catch(err){OpenLayers.Console.warn("Cannot request the print service by AJAX. You must set "+"the 'OpenLayers.ProxyHost' variable. Fallback to GET method");window.open(this.getAllInOneUrl());success.call(context,err);}},openPdf:function(answer,success,popup,context){OpenLayers.Console.info(answer.getURL);if(Ext.isIE||Ext.isOpera){popup.call(context,answer);}else{window.location=answer.getURL;success.call(context);}},fixOverrides:function(overrides,map){overrides=OpenLayers.Util.extend({},overrides);var hasOverview=false;var name;for(var i=0;i<map.layers.length;++i){var olLayer=map.layers[i];name=olLayer.name;if(!overrides[name]){overrides[name]={};}else if(overrides[name].overview){hasOverview=true;}}
if(hasOverview){for(name in overrides){var cur=overrides[name];if(!cur.overview){cur.overview=false;}}}
this.hasOverview=hasOverview;return overrides;},addMapParams:function(overrides,map,dpi){var spec=this.spec;spec.dpi=dpi;spec.units=map.baseLayer.units;spec.srs=map.baseLayer.projection.getCode();spec.geodetic=this.geodetic;var layers=spec.layers=[];this.fillLayers(layers,map.layers,overrides,dpi);},addOverviewMapParams:function(overrides,map,dpi){if(!this.hasOverview){var overviewControls=map.getControlsByClass('OpenLayers.Control.OverviewMap');if(overviewControls.length>0){var spec=this.spec;var layers=spec.overviewLayers=[];this.fillLayers(layers,overviewControls[0].layers,overrides,dpi);}}},fillLayers:function(layers,olLayers,overrides,dpi){for(var i=0;i<olLayers.length;++i){var olLayer=olLayers[i];var layerOverrides=OpenLayers.Util.extend({},overrides[olLayer.name]);OpenLayers.Util.extend(layerOverrides,layerOverrides[dpi]);if((olLayer.getVisibility()&&layerOverrides.visibility!==false)||layerOverrides.visibility===true){var type=olLayer.CLASS_NAME;var handler=mapfish.PrintProtocol.SUPPORTED_TYPES[type];if(handler){var layer=handler.call(this,olLayer);if(layer){this.applyOverrides(layer,layerOverrides);if(olLayer.isBaseLayer){layers.unshift(layer);}else{layers.push(layer);}}}else if(!handler){OpenLayers.Console.error("Don't know how to print a layer of type "+type+" ("+olLayer.name+")");}}}},applyOverrides:function(layer,overrides){for(var key in overrides){if(isNaN(parseInt(key))){var value=overrides[key];if(key=='layers'||key=='styles'){value=mapfish.Util.fixArray(value);}
if(key=="visibility"){}else if(layer[key]!=null||key=="overview"){layer[key]=value;}else{layer.customParams[key]=value;}}}},convertLayer:function(olLayer){var url=olLayer.url;if(url instanceof Array){url=url[0];}
return{baseURL:mapfish.Util.relativeToAbsoluteURL(url),opacity:(olLayer.opacity!=null)?olLayer.opacity:1.0,singleTile:olLayer.singleTile,customParams:{}};},convertWMSLayer:function(olLayer){var layer=OpenLayers.Util.extend(this.convertLayer(olLayer),{type:'WMS',layers:mapfish.Util.fixArray(olLayer.params.LAYERS),format:olLayer.params.FORMAT||olLayer.DEFAULT_PARAMS.format,styles:mapfish.Util.fixArray(olLayer.params.STYLES||olLayer.DEFAULT_PARAMS.styles)});for(var paramName in olLayer.params){var paramNameLow=paramName.toLowerCase();if(olLayer.DEFAULT_PARAMS[paramNameLow]==null&&paramNameLow!='layers'&&paramNameLow!='width'&&paramNameLow!='height'&&paramNameLow!='srs'){layer.customParams[paramName]=olLayer.params[paramName];}}
return layer;},convertMapServerLayer:function(olLayer){var layer=OpenLayers.Util.extend(this.convertLayer(olLayer),{type:'MapServer',layers:mapfish.Util.fixArray(olLayer.params.LAYERS||olLayer.params.layers),format:olLayer.params.FORMAT||olLayer.params.format||olLayer.DEFAULT_PARAMS.format});for(var paramName in olLayer.params){var paramNameLow=paramName.toLowerCase();if(olLayer.DEFAULT_PARAMS[paramNameLow]==null&&paramNameLow!='layers'&&paramNameLow!='format'&&paramNameLow!='width'&&paramNameLow!='height'&&paramNameLow!='srs'){layer.customParams[paramName]=olLayer.params[paramName];}}
return layer;},convertTileCacheLayer:function(olLayer){return OpenLayers.Util.extend(this.convertLayer(olLayer),{type:'TileCache',layer:olLayer.layername,maxExtent:olLayer.maxExtent.toArray(),tileSize:[olLayer.tileSize.w,olLayer.tileSize.h],extension:olLayer.extension,resolutions:olLayer.serverResolutions||olLayer.resolutions});},convertOSMLayer:function(olLayer){var layerInfo=this.convertTileCacheLayer(olLayer);layerInfo.type='Osm';layerInfo.baseURL=layerInfo.baseURL.substr(0,layerInfo.baseURL.indexOf("$"));layerInfo.extension="png";return layerInfo;},convertGoogleLayer:function(olLayer){var layerInfo=this.convertTileCacheLayer(olLayer);layerInfo.type='Google';layerInfo.baseURL='http://maps.google.com/maps/api/staticmap';layerInfo.extension="png";layerInfo.format='png32';layerInfo.sensor='false';if(olLayer.type){if(olLayer.type.getName()=='Satellite'){layerInfo.maptype='satellite';}else if(olLayer.type.getName()=='Hybrid'){layerInfo.maptype='hybrid';}else if(olLayer.type.getName()=='Terrain'){layerInfo.maptype='terrain';}else{layerInfo.maptype='roadmap';}}else{layerInfo.maptype='roadmap';}
return layerInfo;},convertTMSLayer:function(olLayer){var layerInfo=this.convertTileCacheLayer(olLayer);layerInfo.type='TMS';layerInfo.baseURL=olLayer.url;layerInfo.format=olLayer.type;return layerInfo;},convertImageLayer:function(olLayer){var url=olLayer.getURL(olLayer.extent);return{type:'Image',baseURL:mapfish.Util.relativeToAbsoluteURL(url),opacity:(olLayer.opacity!=null)?olLayer.opacity:1.0,extent:olLayer.extent.toArray(),pixelSize:[olLayer.size.w,olLayer.size.h],name:olLayer.name};},convertVectorLayer:function(olLayer){var olFeatures=olLayer.features;var features=[];var styles={};var formatter=new OpenLayers.Format.GeoJSON();var nextId=1;for(var i=0;i<olFeatures.length;++i){var feature=olFeatures[i];var style=feature.style||olLayer.style||olLayer.styleMap.createSymbolizer(feature,feature.renderIntent);var styleName;if(style._printId){styleName=style._printId;}else{style._printId=styleName=nextId++;styles[styleName]=style;if(style.externalGraphic){style.externalGraphic=mapfish.Util.relativeToAbsoluteURL(style.externalGraphic);}}
var featureGeoJson=formatter.extract.feature.call(formatter,feature);featureGeoJson.properties=OpenLayers.Util.extend({_style:styleName},featureGeoJson.properties);for(var cur in featureGeoJson.properties){var curVal=featureGeoJson.properties[cur];if(curVal instanceof Object&&!(curVal instanceof String)){delete featureGeoJson.properties[cur];}}
features.push(featureGeoJson);}
for(var key in styles){delete styles[key]._printId;}
var geoJson={"type":"FeatureCollection","features":features};return OpenLayers.Util.extend(this.convertLayer(olLayer),{type:'Vector',styles:styles,styleProperty:'_style',geoJson:geoJson,name:olLayer.name,opacity:(olLayer.opacity!=null)?olLayer.opacity:1.0});},encodeForURL:function(cur){if(cur==null)return null;var type=typeof cur;Ext.type(cur);if(type=='string'){return escape(cur.replace(/[\n]/g,"\\n"));}else if(type=='object'&&cur.constructor==Array){var array=[];for(var i=0;i<cur.length;++i){var val=this.encodeForURL(cur[i]);if(val!=null)array.push(val);}
return array;}else if(type=='object'&&cur.CLASS_NAME&&cur.CLASS_NAME=='OpenLayers.Feature.Vector'){return new OpenLayers.Format.WKT().write(cur);}else if(type=='object'){var hash={};for(var j in cur){var val2=this.encodeForURL(cur[j]);if(val2!=null)hash[j]=val2;}
return hash;}else{return cur;}},CLASS_NAME:"mapfish.PrintProtocol"});mapfish.PrintProtocol.getConfiguration=function(url,success,failure,context,params){try{params=OpenLayers.Util.extend(params,{url:url});OpenLayers.Request.GET({url:url,params:params,callback:function(request){if(request.status>=200&&request.status<300){var json=new OpenLayers.Format.JSON();var answer=json.read(request.responseText);if(answer){success.call(context,answer);}else{failure.call(context,request);}}else{failure.call(context,request);}}});}catch(err){failure.call(context,err);}};mapfish.PrintProtocol.IGNORED=function(){return null;};mapfish.PrintProtocol.SUPPORTED_TYPES={'OpenLayers.Layer':mapfish.PrintProtocol.IGNORED,'OpenLayers.Layer.WMS':mapfish.PrintProtocol.prototype.convertWMSLayer,'OpenLayers.Layer.WMS.Untiled':mapfish.PrintProtocol.prototype.convertWMSLayer,'OpenLayers.Layer.TileCache':mapfish.PrintProtocol.prototype.convertTileCacheLayer,'OpenLayers.Layer.OSM':mapfish.PrintProtocol.prototype.convertOSMLayer,'OpenLayers.Layer.TMS':mapfish.PrintProtocol.prototype.convertTMSLayer,'OpenLayers.Layer.Vector':mapfish.PrintProtocol.prototype.convertVectorLayer,'OpenLayers.Layer.Vector.RootContainer':mapfish.PrintProtocol.prototype.convertVectorLayer,'OpenLayers.Layer.GML':mapfish.PrintProtocol.prototype.convertVectorLayer,'OpenLayers.Layer.PointTrack':mapfish.PrintProtocol.prototype.convertVectorLayer,'OpenLayers.Layer.MapServer':mapfish.PrintProtocol.prototype.convertMapServerLayer,'OpenLayers.Layer.MapServer.Untiled':mapfish.PrintProtocol.prototype.convertMapServerLayer,'OpenLayers.Layer.Image':mapfish.PrintProtocol.prototype.convertImageLayer,'OpenLayers.Layer.Google':mapfish.PrintProtocol.prototype.convertGoogleLayer};mapfish.Util={};mapfish.Util.sum=function(array){for(var i=0,sum=0;i<array.length;sum+=array[i++]);return sum;};mapfish.Util.max=function(array){return Math.max.apply({},array);};mapfish.Util.min=function(array){return Math.min.apply({},array);};mapfish.Util.getIconUrl=function(wmsUrl,options){if(!options.layer){OpenLayers.Console.warn('Missing required layer option in mapfish.Util.getIconUrl');return'';}
if(!options.rule){options.rule=options.layer;}
if(wmsUrl.indexOf("?")<0){wmsUrl+="?";}else if(wmsUrl.lastIndexOf('&')!=(wmsUrl.length-1)){if(wmsUrl.indexOf("?")!=(wmsUrl.length-1)){wmsUrl+="&";}}
var options=OpenLayers.Util.extend({layer:"",rule:"",service:"WMS",version:"1.1.1",request:"GetLegendGraphic",format:"image/png",width:16,height:16},options);options=OpenLayers.Util.upperCaseObject(options);return wmsUrl+OpenLayers.Util.getParameterString(options);};mapfish.Util.arrayEqual=function(a,b){if(a==null||b==null)
return false;if(typeof(a)!='object'||typeof(b)!='object')
return false;if(a.length!=b.length)
return false;for(var i=0;i<a.length;i++){if(typeof(a[i])!=typeof(b[i]))
return false;if(a[i]!=b[i])
return false;}
return true;};mapfish.Util.isIE7=function(){var ua=navigator.userAgent.toLowerCase();return ua.indexOf("msie 7")>-1;};mapfish.Util.relativeToAbsoluteURL=function(source,loc){loc=loc||location;var h,p,re;if(/^\w+:/.test(source)||!source){return source;}
h=loc.protocol+"//"+loc.host;if(source.indexOf("/")==0){return h+source;}
p=loc.pathname.replace(/\/[^\/]*$/,'');p=p+"/"+source;re=/\/[^\/]+\/\.\.\//;while(p.match(re)!==null){p=p.replace(re,'/');}
if(p.indexOf("/../")>-1){return null;}
re=/\/\.\//;while(p.match(re)!==null){p=p.replace(re,'/');}
return h+p;};mapfish.Util.fixArray=function(subs){if(subs==''||subs==null){return[];}else if(subs instanceof Array){return subs;}else{return subs.split(',');}};mapfish.Util.formatURL=function(url){var proxy=mapfish.PROXY_HOST;if(proxy&&(url.indexOf("http")==0)){var str=url;var protocol=str.match(/https?:\/\//)[0].split(':')[0];str=str.slice((protocol+'://').length);var path=undefined;var pathSeparatorIndex=str.indexOf('/');if(pathSeparatorIndex!=-1){path=str.substring(pathSeparatorIndex);str=str.slice(0,pathSeparatorIndex);}
var host_port=str.split(":");var host=host_port[0];var port=host_port.length>1?host_port[1]:undefined;url=protocol+','+host;url+=(port==undefined?'':','+port);url+=(path==undefined?'':path);if(proxy.lastIndexOf('/')!=proxy.length-1){url='/'+url;}
url=proxy+url;}
return url;};Ext.namespace('mapfish.widgets');Ext.namespace('mapfish.widgets.print');mapfish.widgets.print.Base={map:null,overrides:null,configUrl:null,config:null,layerTree:null,grids:null,serviceParams:null,mask:null,printing:false,geodetic:false,initPrint:function(){if(this.overrides==null){this.overrides={};}
if(this.config==null){mapfish.PrintProtocol.getConfiguration(this.configUrl,this.configReceived,this.configFailed,this,this.serviceParams);return true;}else{this.fillComponent();return false;}},configReceived:function(config){this.config=config;if(this.mask){this.mask.hide();}},configFailed:function(){if(this.mask){this.mask.hide();}},print:function(){if(this.mask){this.mask.msg=OpenLayers.Lang.translate('mf.print.generatingPDF');this.mask.show();}
var printCommand=new mapfish.PrintProtocol(this.map,this.config,this.overrides,this.getCurDpi(),this.serviceParams,this.geodetic);if(this.layerTree){this.addLegends(printCommand.spec);}
if(this.grids){this.addGrids(printCommand.spec);}
this.fillSpec(printCommand);this.printing=true;printCommand.createPDF(function(){if(this.mask)this.mask.hide();this.printing=false;},function(request){var onClick='Ext.getCmp(\'printPopup\').destroy();';if(Ext.isOpera){onClick+='window.open(\''+request.getURL+'\', \'_blank\');';}else{onClick+='window.location=\''+request.getURL+'\';';}
var content=OpenLayers.Lang.translate('mf.print.pdfReady')+'<br /><br />'+'<table onclick="'+onClick+'" border="0" cellpadding="0" cellspacing="0" class="x-btn-wrap" align="center">'+'<tbody><tr><td class="x-btn-left"><i>&#160;</i></td>'+'<td class="x-btn-center"><em unselectable="on" class="x-btn x-btn-text">'+Ext.MessageBox.buttonText.ok+'</em></td>'+'<td class="x-btn-right"><i>&#160;</i></td></tr>'+'</tbody></table>';var popup=new Ext.Window({bodyStyle:'padding: 7px;',width:200,id:"printPopup",autoHeight:true,constrain:true,closable:false,title:OpenLayers.Lang.translate('mf.information'),html:content,listeners:{destroy:function(){if(this.mask)this.mask.hide();this.printing=false;},scope:this}});popup.show();},function(request){Ext.Msg.alert(OpenLayers.Lang.translate('mf.error'),OpenLayers.Lang.translate('mf.print.unableToPrint'));if(this.mask)this.mask.hide();this.printing=false;},this);},addGrids:function(spec){var grids=this.grids;if(grids&&typeof grids=="function"){grids=grids();}
if(grids){for(var name in grids){var grid=grids[name];if(!grid){continue;}
spec[name]={};var specData=spec[name].data=[];var specCols=spec[name].columns=[];var columns=grid.getColumnModel();var store=grid.getStore();for(var j=0;j<columns.getColumnCount();++j){if(!columns.isHidden(j)){specCols.push(columns.getDataIndex(j));}}
store.each(function(record){var hash={};for(var key in record.data){var val=record.data[key];if(val!=null){if(val.CLASS_NAME&&val.CLASS_NAME=='OpenLayers.Feature.Vector'){val=new OpenLayers.Format.WKT().write(val);}
hash[key]=val;}}
specData.push(hash);},this);}}},addLegends:function(spec){var legends=spec.legends=[];function addLayer(layerNode){var layerInfo={name:layerNode.attributes.printText||layerNode.attributes.text,icon:mapfish.Util.relativeToAbsoluteURL(layerNode.attributes.icon)};var classesInfo=layerInfo.classes=[];layerNode.eachChild(function(classNode){classesInfo.push({name:classNode.attributes.printText||classNode.attributes.text,icon:mapfish.Util.relativeToAbsoluteURL(classNode.attributes.icon)});},this);legends.push(layerInfo);}
function goDeep(root){root.eachChild(function(node){var attr=node.attributes;if(attr.checked&&attr.layerNames&&!attr.hidden&&attr.printText!==''){addLayer(node);}else{goDeep(node);}},this);}
goDeep(this.layerTree.getRootNode());if(legends.length==0){delete spec.legends;}},fillSpec:null,getCurDpi:null};Ext.namespace('mapfish.widgets');Ext.namespace('mapfish.widgets.print');mapfish.widgets.print.BaseWidget=function(options){mapfish.widgets.print.BaseWidget.superclass.constructor.call(this,options);};Ext.extend(mapfish.widgets.print.BaseWidget,Ext.Panel,{pageDrag:null,rotateHandle:null,layer:null,styleMap:null,layout:'fit',initComponent:function(){mapfish.widgets.print.BaseWidget.superclass.initComponent.call(this);this.addEvents("configloaded");this.on('expand',this.setUp,this);this.on('collapse',this.tearDown,this);this.on('activate',this.setUp,this);this.on('deactivate',this.tearDown,this);this.on('enable',this.setUp,this);this.on('disable',this.tearDown,this);this.on('destroy',this.tearDown,this);this.on('render',function(){var mask=this.mask=new Ext.LoadMask(this.body,{msg:OpenLayers.Lang.translate('mf.print.loadingConfig')});if(this.config==null){mask.show();}},this);if(!this.initPrint()){this.fillComponent();}},configReceived:function(config){mapfish.widgets.print.Base.configReceived.call(this,config);this.fillComponent();this.doLayout();this.setUp();this.fireEvent("configloaded");},configFailed:function(){mapfish.widgets.print.Base.configFailed.call(this);this.add({border:false,region:'center',html:OpenLayers.Lang.translate('mf.print.serverDown')});this.doLayout();this.config=false;},isReallyVisible:function(){if(!this.isVisible()||!this.body.isVisible(true))return false;var result=true;this.bubble(function(component){return result=result&&component.isVisible()&&(!component.body||component.body.isVisible());},this);return result;},setUp:function(){if(!this.disabled&&this.isReallyVisible()&&this.config&&!this.layer){this.map.addLayer(this.getOrCreateLayer());this.pageDrag.activate();}},tearDown:function(){if(this.config&&this.pageDrag&&this.layer){this.pageDrag.destroy();this.pageDrag=null;this.removeRotateHandle();this.layer.removeFeatures(this.layer.features);this.layer.destroy();this.layer=null;}},getOrCreateLayer:function(){if(!this.layer){var self=this;this.layer=new OpenLayers.Layer.Vector("_Print"+this.getId(),{displayInLayerSwitcher:false,styleMap:this.styleMap,calculateInRange:function(){return true;}});this.pageDrag=new OpenLayers.Control.DragFeature(this.layer);this.map.addControl(this.pageDrag);var curFeature=null;this.pageDrag.onStart=function(feature){OpenLayers.Control.DragFeature.prototype.onStart.apply(this,arguments);curFeature=feature;if(feature.attributes.rotate){self.pageRotateStart(feature);}else{self.pageDragStart(feature);}};this.pageDrag.onDrag=function(feature){OpenLayers.Control.DragFeature.prototype.onDrag.apply(this,arguments);if(!feature)feature=curFeature;if(feature.attributes.rotate){self.pageRotated(feature);}};this.pageDrag.onComplete=function(feature){OpenLayers.Control.DragFeature.prototype.onComplete.apply(this,arguments);if(!feature)feature=curFeature;if(feature.attributes.rotate){self.pageRotateComplete(feature);}else{self.pageDragComplete(feature);}
curFeature=null;};this.afterLayerCreated();}
return this.layer;},pageRotateStart:function(feature){},pageRotated:function(feature){var center=feature.attributes.center;var pos=feature.geometry;var angle=Math.atan2(pos.x-center.x,pos.y-center.y)*180/Math.PI;var page=feature.attributes.page;page.attributes.rotation=angle;var centerPoint=new OpenLayers.Geometry.Point(center.x,center.y);page.geometry.rotate(feature.attributes.prevAngle-angle,centerPoint);this.layer.drawFeature(page);this.setCurRotation(Math.round(angle));feature.attributes.prevAngle=angle;},pageRotateComplete:function(feature){this.createRotateHandle(feature.attributes.page);},pageDragStart:function(feature){this.removeRotateHandle();},removeRotateHandle:function(){if(this.rotateHandle){this.rotateHandle.destroy();this.rotateHandle=null;}},pageDragComplete:function(feature){if(this.getCurLayout().rotation){this.createRotateHandle(feature);}},createRotateHandle:function(feature){this.removeRotateHandle();var firstPoint=feature.geometry.components[0].components[2];var secondPoint=feature.geometry.components[0].components[3];var lon=(firstPoint.x+secondPoint.x)/2;var lat=(firstPoint.y+secondPoint.y)/2;var rotatePoint=new OpenLayers.Geometry.Point(lon,lat);var center=this.getCenterRectangle(feature);this.rotateHandle=new OpenLayers.Feature.Vector(rotatePoint,{rotate:true,page:feature,center:{x:center[0],y:center[1]},prevAngle:feature.attributes.rotation});this.layer.addFeatures(this.rotateHandle);},createRectangle:function(center,scale,layout,rotation){var extent=this.getExtent(center,scale,layout);var rect=extent.toGeometry();if(rotation!=0.0){var centerPoint=new OpenLayers.Geometry.Point(center.lon,center.lat);rect.rotate(-rotation,centerPoint);}
var feature=new OpenLayers.Feature.Vector(rect,{rotation:rotation});this.layer.addFeatures(feature);return feature;},getCenterRectangle:function(rectangle){var center=rectangle.geometry.getBounds().getCenterLonLat();return[center.lon,center.lat];},getExtent:function(center,scale,layout){var unitsRatio=OpenLayers.INCHES_PER_UNIT[this.map.baseLayer.units];var w=layout.map.width/72.0/unitsRatio*scale/2.0;var h=layout.map.height/72.0/unitsRatio*scale/2.0;var proj=this.map.getProjectionObject();if(this.geodetic&&(proj.projCode!='EPGS:4326')){var wgs84=new OpenLayers.Projection('EPSG:4326');var wgs84center=center.clone().transform(proj,wgs84);var dest=OpenLayers.Util.destinationVincenty;var wp1=dest(wgs84center,90,w);var wp2=dest(wgs84center,270,w);var hp1=dest(wgs84center,0,h);var hp2=dest(wgs84center,180,h);var p=OpenLayers.Geometry.Point;var bounds=new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing([new p(wp1.lon,wp1.lat),new p(hp2.lon,hp2.lat),new p(wp2.lon,wp2.lat),new p(hp1.lon,hp1.lat)])]).getBounds();return bounds.transform(wgs84,proj);}
return new OpenLayers.Bounds(center.lon-w,center.lat-h,center.lon+w,center.lat+h);},fitScale:function(layout){var availsTxt=this.config.scales;if(availsTxt.length==0)return;var avails=[];for(var i=0;i<availsTxt.length;++i){avails.push(parseFloat(availsTxt[i].value));}
avails.sort(function(a,b){return a-b;});var bounds=this.map.getExtent();var unitsRatio=OpenLayers.INCHES_PER_UNIT[this.map.baseLayer.units];var size=layout.map;var targetScale=Math.min(bounds.getWidth()/size.width*72.0*unitsRatio,bounds.getHeight()/size.height*72.0*unitsRatio);var nearestScale=avails[0];for(var j=1;j<avails.length;++j){if(avails[j]<=targetScale){nearestScale=avails[j];}else{break;}}
return nearestScale;},print:function(){this.overrides[this.layer.name]={visibility:false};mapfish.widgets.print.Base.print.call(this);delete this.overrides[this.layer.name];},getLayoutForName:function(layoutName){var layouts=this.config.layouts;for(var i=0;i<layouts.length;++i){var cur=layouts[i];if(cur.name==layoutName){return cur;}}},createScaleCombo:function(){var scaleStore=new Ext.data.JsonStore({root:"scales",fields:['name','value'],data:this.config});return new Ext.form.ComboBox({fieldLabel:OpenLayers.Lang.translate('mf.print.scale'),store:scaleStore,displayField:'name',valueField:'value',typeAhead:false,mode:'local',id:'scale_'+this.getId(),hiddenId:'scaleId_'+this.getId(),hiddenName:"scale",name:"scale",editable:false,triggerAction:'all',value:this.config.scales[this.config.scales.length-1].value});},createDpiCombo:function(name){if(this.config.dpis.length>1){var dpiStore=new Ext.data.JsonStore({root:"dpis",fields:['name','value'],data:this.config});return{fieldLabel:OpenLayers.Lang.translate('mf.print.dpi'),xtype:'combo',store:dpiStore,displayField:'name',valueField:'value',typeAhead:false,mode:'local',id:'dpi_'+this.getId(),hiddenId:'dpiId_'+this.getId(),hiddenName:name,name:name,editable:false,triggerAction:'all',value:this.config.dpis[0].value};}else{return{xtype:'hidden',name:name,value:this.config.dpis[0].value};}},createLayoutCombo:function(name){if(this.config.layouts.length>1){var layoutStore=new Ext.data.JsonStore({root:"layouts",fields:['name'],data:this.config});return new Ext.form.ComboBox({fieldLabel:OpenLayers.Lang.translate('mf.print.layout'),store:layoutStore,displayField:'name',valueField:'name',typeAhead:false,mode:'local',id:'layout_'+this.getId(),hiddenId:'layoutId_'+this.getId(),hiddenName:name,name:name,editable:false,triggerAction:'all',value:this.config.layouts[0].name});}else{return new Ext.form.Hidden({name:name,value:this.config.layouts[0].name});}},createRotationTextField:function(){var layouts=this.config.layouts;var hasRotation=false;for(var i=0;i<layouts.length&&!hasRotation;++i){hasRotation=layouts[i].rotation;}
if(hasRotation){var num=/^-?[0-9]+$/;return new Ext.form.TextField({fieldLabel:OpenLayers.Lang.translate('mf.print.rotation'),name:'rotation',value:'0',maskRe:/^[-0-9]$/,msgTarget:'side',validator:function(v){return num.test(v)?true:"Not a number";}});}else{return null;}},fillComponent:null,afterLayerCreated:null,fillSpec:null,getCurLayout:null,setCurRotation:null});OpenLayers.Util.applyDefaults(mapfish.widgets.print.BaseWidget.prototype,mapfish.widgets.print.Base);Ext.namespace('mapfish.widgets');Ext.namespace('mapfish.widgets.print');mapfish.widgets.print.SimpleForm=Ext.extend(mapfish.widgets.print.BaseWidget,{formConfig:null,wantResetButton:true,scale:null,rectangle:null,rotation:null,infoPanel:null,fillComponent:function(){var formConfig=OpenLayers.Util.extend({border:false,bodyBorder:false},this.formConfig);var formPanel=this.formPanel=new Ext.form.FormPanel(formConfig);var layout=this.createLayoutCombo("/layout");if(this.config.layouts.length>1){layout.on('select',this.updateRectangle,this);}
formPanel.add(layout);formPanel.add(this.createDpiCombo("/dpi"));this.scale=formPanel.add(this.createScaleCombo());this.scale.on('select',this.updateRectangle,this);this.rotation=this.createRotationTextField();if(this.rotation!=null){this.rotation.setDisabled(!this.config.layouts[0].rotation);formPanel.add(this.rotation);this.rotation.on('change',function(){if(!this.rotation.isValid(true)){this.rotation.setValue(0);}
this.updateRectangle();},this);}
if(this.infoPanel!=null){formPanel.add(this.infoPanel);}
if(this.wantResetButton){formPanel.addButton({text:OpenLayers.Lang.translate('mf.print.resetPos'),scope:this,handler:function(){this.setCurScale(this.fitScale(this.getCurLayout()));if(this.rotation){this.setCurRotation(0);}
this.createTheRectangle();}});}
formPanel.addButton({text:OpenLayers.Lang.translate('mf.print.print'),scope:this,handler:this.print});this.add(formPanel);},updateRectangle:function(){this.layer.removeFeatures(this.rectangle);var center=this.rectangle.geometry.getBounds().getCenterLonLat();var layout=this.getCurLayout();this.rectangle=this.createRectangle(center,this.getCurScale(),layout,this.rotation&&layout.rotation?this.rotation.getValue():0);if(this.rotation){this.rotation.setDisabled(!layout.rotation);if(!layout.rotation){this.rotation.setValue(0);}}
if(layout.rotation){this.createRotateHandle(this.rectangle);}else{this.removeRotateHandle();}},createTheRectangle:function(){if(this.rectangle)this.layer.removeFeatures(this.rectangle);var layout=this.getCurLayout();this.rectangle=this.createRectangle(this.map.getCenter(),this.getCurScale(),this.getCurLayout(),this.rotation&&layout.rotation?this.rotation.getValue():0);if(layout.rotation){this.createRotateHandle(this.rectangle);}},afterLayerCreated:function(){this.setCurScale(this.fitScale(this.getCurLayout()));this.createTheRectangle();},getCurLayout:function(){var values=this.formPanel.getForm().getValues();var layoutName=values['/layout'];return this.getLayoutForName(layoutName);},getCurScale:function(){var values=this.formPanel.getForm().getValues();return values['scale'];},setCurScale:function(value){this.scale.setValue(value);},getCurDpi:function(){var values=this.formPanel.getForm().getValues();return values["dpi"];},setCurRotation:function(rotation){this.rotation.setValue(rotation);},fillSpec:function(printCommand){var singlePage={center:this.getCenterRectangle(this.rectangle)};var params=printCommand.spec;params.pages.push(singlePage);this.formPanel.getForm().items.each(function(cur){var name=cur.getName();if(OpenLayers.String.startsWith(name,"/")){params[name.substr(1)]=cur.getValue();}else{singlePage[name]=cur.getValue();}},this);}});Ext.reg('print-simple',mapfish.widgets.print.SimpleForm);Ext.namespace("GeoExt.tree");GeoExt.tree.LayerContainer=Ext.extend(Ext.tree.AsyncTreeNode,{constructor:function(config){config=Ext.applyIf(config||{},{text:"Layers"});this.loader=config.loader instanceof GeoExt.tree.LayerLoader?config.loader:new GeoExt.tree.LayerLoader(Ext.applyIf(config.loader||{},{store:config.layerStore}));GeoExt.tree.LayerContainer.superclass.constructor.call(this,config);},recordIndexToNodeIndex:function(index){var store=this.loader.store;var count=store.getCount();var nodeCount=this.childNodes.length;var nodeIndex=-1;for(var i=count-1;i>=0;--i){if(this.loader.filter(store.getAt(i))===true){++nodeIndex;if(index===i||nodeIndex>nodeCount-1){break;}}}
return nodeIndex;},destroy:function(){delete this.layerStore;GeoExt.tree.LayerContainer.superclass.destroy.apply(this,arguments);}});Ext.tree.TreePanel.nodeTypes.gx_layercontainer=GeoExt.tree.LayerContainer;Ext.namespace("geoadmin");geoadmin.API=OpenLayers.Class(cdbund.API,{printPanel:{},linkPanel:{},inspireCatalogPanel:{},layers:{},bgLayer:'',bgSwitchLayers:{},permalinkLayers:[],permalinkLayersIndices:[],permalinkLayersOpacity:[],permalinkLayersVisibility:[],noHeader:'false',showLocation:'false',crosshair:'false',recenterUrl:'/bodfeature/bbox',highlightUrl:'/bodfeature/geometry',locationLabel:null,showLocationRequestOngoing:false,showLocationInMapRequestOngoing:false,clientX:null,clientY:null,navControl:null,mousePosition:null,bgLayerCombo:null,aerial:null,featuresToShow:null,featuresShown:null,initialize:function(config){OpenLayers.IMAGE_RELOAD_ATTEMPTS=3;cdbund.API.prototype.initialize.apply(this,arguments);this.layers=(new geoadmin.Layers()).layers;if(this.isMainApp){this.initInspireCatalogPanel();}
OpenLayers.ImgPath=this.baseConfig.baseUrl+'/gfx/ol/';Ext.BLANK_IMAGE_URL=this.baseConfig.baseUrl+'/mfbase/ext/resources/images/default/s.gif';Ext.QuickTips.init();},createMap:function(config){if(config){if(config.layers){var reg=new RegExp("( )","g");config.layers=config.layers.replace(reg,'');this.permalinkLayers=config.layers.split(',');}
if(config.layers_indices){this.permalinkLayersIndices=config.layers_indices.split(',');}
if(config.layers_opacity){this.permalinkLayersOpacity=config.layers_opacity.split(',');}
if(config.layers_visibility){this.permalinkLayersVisibility=config.layers_visibility.split(',');}
if(config.bgLayer){this.bgLayer=config.bgLayer;}
if(typeof config.bgOpacity!='undefined'){this.mapOpacityValue=parseInt(config.bgOpacity);}}
if(!this.bgLayer){var args=OpenLayers.Util.getParameters();if(args.bgLayer){this.bgLayer=args.bgLayer;}}
this.map=cdbund.API.prototype.createMap.apply(this,arguments);this.getDrawingLayer().events.on({'moveend':function(evt){if(this.featuresShown){this.getDrawingLayer().destroyFeatures();this.featuresShown=false;}},scope:this});if(!this.isMainApp){this.handleMapOpacity();}
if(this.permalinkLayers.length>0){this.checkPermalinkLayersExclusions();for(var i=0,len=this.permalinkLayers.length;i<len;i++){this.addLayerToMap(this.permalinkLayers[i]);}
this.orderLayers();this.setLayersOpacity();this.setLayersVisibility();}
if(this.featuresToShow){this.showFeatures(this.featuresToShow.layer,this.featuresToShow.ids);this.addLayerToMap(this.featuresToShow.layer);}
var zoomToMaxExtent=new OpenLayers.Control.ZoomToMaxExtent({title:OpenLayers.i18n('Zoom to the max extent')});var panel=new OpenLayers.Control.Panel({defaultControl:zoomToMaxExtent});panel.addControls([zoomToMaxExtent]);this.map.addControl(panel);if(this.isMainApp){var tooltips=new geoadmin.TooltipFeature({api:this,map:this.map});tooltips.activate();this.map.addControl(tooltips);if(this.showLocationInMap=='true'){this.createLocationTooltip();}
this.map.events.on({'addlayer':this.updateLayersZIndex,scope:this});}
if(this.crosshair){this.showMarker();}
return this.map;},createToolbar:function(config){config=Ext.apply({items:['MapOpacity','NavigationHistory','Measure','Searchbox','Permalink','Print']},config);var items=[],action;if(config.items.indexOf('MapOpacity')!=-1){items.push('<span class="mapopacityslider">'+OpenLayers.i18n('Aerial Images')+'</span> ');items.push(this.createMapOpacitySlider({width:100}));this.mapOpacitySlider.on('change',this.checkBgOpacityForLayerExclusion,this);items.push(this.createBgLayerCombo());}
if(config.items.indexOf('NavigationHistory')!=-1){var history=new OpenLayers.Control.NavigationHistory(config.controls);history.activate();this.map.addControl(history);action=new GeoExt.Action(Ext.apply({tooltip:OpenLayers.i18n("previous"),control:history.previous,iconCls:'previous',disabled:true},config.actions));items.push(action);action=new GeoExt.Action(Ext.apply({tooltip:OpenLayers.i18n("next"),control:history.next,iconCls:'next',disabled:true},config.actions));items.push(action);}
if(config.items.indexOf('Measure')!=-1){var measure=new MapFish.API.Measure(config.controls);items.push(new GeoExt.Action(Ext.apply({map:this.map,control:measure.createLengthMeasureControl(),toggleGroup:'navigation',allowDepress:true,iconCls:'measureLength'},config.actions)));items.push(new GeoExt.Action(Ext.apply({map:this.map,control:measure.createAreaMeasureControl(),toggleGroup:'navigation',allowDepress:true,iconCls:'measureArea'},config.actions)));}
if(config.items.indexOf('Searchbox')!=-1){items.push(this.createSearchBox({ref:'geoadmin',width:200}));}
if(this.isMainApp&&api.showLocation=='true'){items.push(this.createLocationLabel());}
items.push('->');if(this.isMainApp&&config.items.indexOf('Permalink')!=-1){this.initLinkPanel();var permalink=new geoadmin.API.Permalink('permalink',null,{api:this});permalink.activate();this.map.addControl(permalink);var handler=function(){var lc=Ext.get('linkContainer');if(!lc.isVisible()){var pc=Ext.get('printContainer');if(pc.isVisible()){pc.hide();this.printPanel.disable();this.drawLayer.setZIndex(this.map.Z_INDEX_BASE['Feature']);}
this.deactivateRedlining();lc.show();this.linkPanel.enable();this.linkPanel.doLayout();}else{lc.hide();this.linkPanel.disable();}};action=new Ext.Action({text:OpenLayers.i18n('permalink action'),enableToggle:true,toggleGroup:'export',handler:handler.createDelegate(this)});items.push(action);}
if(this.isMainApp&&config.items.indexOf('Print')!=-1){this.initPrintPanel();var handler=function(){var pc=Ext.get('printContainer');if(!pc.isVisible()){Ext.get('linkContainer').hide();this.deactivateRedlining();pc.show();this.printPanel.enable();this.printPanel.doLayout();}else{pc.hide();this.printPanel.disable();this.drawLayer.setZIndex(this.map.Z_INDEX_BASE['Feature']);}};action=new Ext.Action({text:OpenLayers.i18n('print action'),enableToggle:true,toggleGroup:'export',handler:handler.createDelegate(this)});items.push(action);}
if(this.isMainApp){this.initRedliningPanel();var handler=function(){var rc=Ext.get('redliningContainer');if(rc.isVisible()){this.deactivateRedlining();}else{rc.show();this.redliningPanel.enable();this.redliningPanel.doLayout();Ext.get('linkContainer').hide();this.printPanel.disable();Ext.get('printContainer').hide();}};action=new Ext.Action({text:OpenLayers.i18n('redlining action'),enableToggle:true,toggleGroup:'export',handler:handler.createDelegate(this)});items.push(action);}
return items;},createBbar:function(config){var items=[];items.push(' ');items.push(new GeoExt.ux.ScaleSelectorCombo({map:this.map,fakeScaleValue:["1500","3000","6000","15000","30000","60000","150000","300000","450000","700000","1500000"],width:100}));items.push('  ');items.push(new GeoExt.ux.DisplayProjectionSelectorCombo({map:this.map,controls:[this.mousePosition],projections:['EPSG:2169','EPSG:4326'],width:170}));items.push('  ');items.push(Ext.getDom('mousepos'));items.push('->');items.push('<a href="http://www.geoportal.lu/Portail/menuAction.do?dispatch=load&menuToLoad=consultation" target="_blank">Geoportail</a>');return items;},createSearchBox:function(config){config=config||{};var store=new Ext.data.JsonStore({proxy:new Ext.data.HttpProxy({url:'locationsearch',method:'GET'}),baseParams:{lang:OpenLayers.Lang.getCode(),ref:config.ref||''},root:'results',fields:['label','listlabel','type','bbox','id']});var tpl=new Ext.XTemplate('<tpl for="."><div class="x-combo-list-item">','{listlabel}','</div></tpl>');var searchConfig={store:store,tpl:tpl,hideTrigger:true,minChars:1,queryDelay:50,emptyText:OpenLayers.i18n('Geo search...'),loadingText:OpenLayers.i18n('loadingText'),displayField:'label',cls:'cbSearchCls',ctCls:'cbSearchContainerCls',width:config.width||200,listWidth:280};if(config.renderTo){searchConfig['renderTo']=config.renderTo;}
var search=new Ext.form.ComboBox(searchConfig);search.on('beforequery',function(queryEvent){var query=queryEvent.query;var coord_re=/([\d\.']+)[\s,]+([\d\.']+)/;var match=query.match(coord_re);if(match){var left=parseFloat(match[1].replace("'",""));var right=parseFloat(match[2].replace("'",""));var position=new OpenLayers.LonLat(left,right);var valid=false;if(this.map.maxExtent.containsLonLat(position)){valid=true;}else{position.transform(new OpenLayers.Projection("EPSG:4326"),this.map.getProjectionObject());if(this.map.maxExtent.containsLonLat(position)){valid=true;}}
if(valid){this.map.setCenter(position,9);this.getDrawingLayer().destroyFeatures();this.showMarker();return false;}}
return true;},this);search.on('select',function(combo,record,index){this.map.zoomToExtent(OpenLayers.Bounds.fromArray(record.get('bbox')));if(record.data.type=='Adresse'||record.data.type=='Parcelle'){var layer;switch(record.data.type){case'Adresse':layer='addresses';break;case'Parcelle':layer='parcels';break;}
this.addLayerToMap(layer);if(this.featuresShown){this.getDrawingLayer().destroyFeatures();this.featuresShown=false;}
this.showFeatures('locations',[record.data.id]);}},this);return search;},createLocationLabel:function(){this.locationLabel=new Ext.form.Label({id:'locationLabel',text:' ',cls:'location-label'});this.map.events.register('mousemove',this,this.updateLocationLabel);return this.locationLabel;},createLocationTooltip:function(){this.map.events.register('mousemove',this,this.showLocationTooltip);this.map.events.register('mouseout',this,this.hideMouseOver);},showLocationTooltip:function(evt){if(this.showLocationInMapRequestOngoing){return;}
var updateTooltip=function(response){var x=Ext.decode(response.responseText)
var text="";var firstDone=false;for(i=0;i<x.features.length;i++){if(firstDone){text=text+" - ";}
if(x.features[i].origin=='zipcode'){if(x.features[i].plz!='0'&&x.features[i].plz!=''){text=text+x.features[i].plz;firstDone=true;}}
if(x.features[i].origin=='kantone'){text=text+x.features[i].name;firstDone=true;}
if(x.features[i].origin=='gg25'){text=text+x.features[i].gemname;firstDone=true;}
if(x.features[i].origin=='sn25'){text=text+x.features[i].name;firstDone=true;}}
var mouseOver=Ext.get('MouseOver').dom;if(text.length>0){mouseOver.innerHTML=text;var topPixel=this.clientY+10;var leftPixel=this.clientX+10;mouseOver.style.top=topPixel+"px";mouseOver.style.left=leftPixel+"px";mouseOver.style.display="block";}else{mouseOver.innerHTML="";mouseOver.style.top="0px";mouseOver.style.left="0px";mouseOver.style.display="none";}
this.showLocationInMapRequestOngoing=false;};var lonLat=this.map.getLonLatFromPixel(evt.xy);this.clientX=evt.clientX;this.clientY=evt.clientY;Ext.Ajax.request({url:this.baseConfig.baseUrl+'/swisssearch/geocoding',success:updateTooltip,failure:function(){this.showLocationInMapRequestOngoing=false},method:'GET',params:{easting:lonLat.lon,northing:lonLat.lat,ref:'geoadmin'},scope:this});this.showLocationInMapRequestOngoing=true;},hideMouseOver:function(evt){var mouseOver=Ext.get('MouseOver').dom;mouseOver.innerHTML="";mouseOver.style.top="0px";mouseOver.style.left="0px";mouseOver.style.display="none";},updateLocationLabel:function(evt){if(this.showLocationRequestOngoing){return;}
var updateLabel=function(response){var x=Ext.decode(response.responseText)
var text="";var firstDone=false;for(i=0;i<x.features.length;i++){if(firstDone){text=text+" - ";}
if(x.features[i].origin=='zipcode'){if(x.features[i].plz!='0'&&x.features[i].plz!=''){text=text+x.features[i].plz;firstDone=true;}}
if(x.features[i].origin=='kantone'){text=text+x.features[i].name;firstDone=true;}
if(x.features[i].origin=='gg25'){text=text+x.features[i].gemname;firstDone=true;}
if(x.features[i].origin=='sn25'){text=text+x.features[i].name;firstDone=true;}}
Ext.getCmp('locationLabel').setText(text);this.showLocationRequestOngoing=false;};var lonLat=this.map.getLonLatFromPixel(evt.xy);Ext.Ajax.request({url:'swisssearch/geocoding',success:updateLabel,failure:function(){this.showLocationRequestOngoing=false},method:'GET',params:{easting:lonLat.lon,northing:lonLat.lat,ref:'geoadmin'},scope:this});this.showLocationRequestOngoing=true;},resizeCatalogTreePanel:function(height){var layerManager=Ext.getCmp('layermanager');layerManager.setHeight(height-180);},createLayerTree:function(config){config=config||{};if(config.div){alert('layertree is not available in external mode');return null;}
this.tree=new Ext.tree.TreePanel({title:OpenLayers.i18n('Layer Selection'),id:'layertree',rootVisible:false,autoScroll:true,containerScroll:true,height:150,lines:false,loader:{applyLoader:false},root:{nodeType:"gx_layercontainer",loader:{baseAttrs:{nodeType:"geoadmin_layer",actions:[{action:"close",qtip:OpenLayers.i18n("hide layer options")},{action:"open",qtip:OpenLayers.i18n("show layer options")},{action:"pipe-up",qtip:'',hide:function(node){return this.hideIfFirst(node);}},{action:"up",qtip:OpenLayers.i18n("move layer up"),hide:function(node){return this.hideIfFirst(node);}},{action:"pipe-down",qtip:'',hide:function(node){return this.hideIfLast(node);}},{action:"down",qtip:OpenLayers.i18n("move layer down"),hide:function(node){return this.hideIfLast(node);}},{action:"pipe",qtip:''},{action:"delete",qtip:OpenLayers.i18n("remove layer")},{action:"pipe",qtip:''}],checked:null,component:geoadmin.layerNode.tbar}}},listeners:{action:geoadmin.layerNode.act}});return this.tree;},orderLayers:function(){if(this.permalinkLayers&&this.permalinkLayersIndices){for(i=0;i<this.permalinkLayers.length;i++){var layers=this.map.getLayersBy('bodid',this.permalinkLayers[i]);if(layers.length==1&&this.permalinkLayersIndices[i]){this.map.setLayerIndex(layers[0],this.permalinkLayersIndices[i]);}}}},setLayersOpacity:function(){if(this.permalinkLayers&&this.permalinkLayersOpacity){for(var i=0;i<this.permalinkLayers.length;i++){var layers=this.map.getLayersBy('bodid',this.permalinkLayers[i]);if(layers.length==1&&this.permalinkLayersOpacity[i]){layers[0].setOpacity(this.permalinkLayersOpacity[i]);}}}},setLayersVisibility:function(){if(this.permalinkLayers&&this.permalinkLayersVisibility){for(var i=0;i<this.permalinkLayers.length;i++){var layers=this.map.getLayersBy('bodid',this.permalinkLayers[i]);if(layers.length==1&&this.permalinkLayersVisibility[i]){if(this.permalinkLayersVisibility[i]=='true'){layers[0].setVisibility(true);}else{layers[0].setVisibility(false);}}}}},createBgLayerCombo:function(config){var bgLayers=[];var layerId;for(layerId in this.bgSwitchLayers){bgLayers.push([layerId,OpenLayers.i18n(layerId)]);}
var store=new Ext.data.SimpleStore({fields:['id','name'],data:bgLayers});this.bgLayerCombo=new Ext.form.ComboBox({id:'bgLayer',editable:false,hideLabel:true,width:150,cls:'bgLayerCls',ctCls:'bgLayerContainerCls',store:store,displayField:'name',valueField:'id',forceSelection:true,value:this.bgLayers.primaryLayer.name,triggerAction:'all',mode:'local',listeners:{select:function(combo,record,index){var layerId=record.data.id;this.updateBgLayerCombo(layerId);this.checkForLayersExclusion(layerId,true);},scope:this}});return this.bgLayerCombo;},updateBgLayerCombo:function(layerId){if(this.bgSwitchLayers[layerId]){var primaryLayer=this.bgSwitchLayers[layerId];primaryLayer.setVisibility(true);primaryLayer.setOpacity(this.mapOpacitySlider.layer.opacity);this.bgLayers['primaryLayer']=primaryLayer;this.mapOpacitySlider.layer=primaryLayer;var bgLayer;for(bgLayer in this.bgSwitchLayers){if(bgLayer!=layerId){var layer=this.map.getLayersByName(bgLayer)[0];if(layer){layer.setVisibility(false);}}}}},getMapOptions:function(){if(!this.mapOptions){this.mapOptions={projection:new OpenLayers.Projection("EPSG:2169"),displayProjection:new OpenLayers.Projection("EPSG:2169"),units:"m",maxExtent:new OpenLayers.Bounds.fromArray(this.baseConfig.maxExtent),restrictedExtent:new OpenLayers.Bounds.fromArray([40000,50000,120000,150000]),allOverlays:true,resolutions:this.baseConfig.resolutions,theme:this.baseConfig.baseUrl+'/mfbase/openlayers/theme/default/style.css'};}
return this.mapOptions;},getLayers:function(config){this.aerial=new OpenLayers.Layer.TileCache("aerial",this.baseConfig.tilecacheDirectUrl,'ortho',{format:'image/jpeg',visibility:false,buffer:0,transitionEffect:'resize',displayInLayerSwitcher:false,serverResolutions:this.baseConfig.pixelmapResolutions,exclusion:[1,2],isBgLayer:true,attribution:OpenLayers.i18n("aerial attribution")});var pixelmapsColor=new OpenLayers.Layer.TileCache("pixelmaps-color",this.baseConfig.tilecacheDirectUrl,'topo',{format:'image/png',visibility:false,buffer:0,transitionEffect:'resize',displayInLayerSwitcher:false,serverResolutions:this.baseConfig.pixelmapResolutions,exclusion:[11,12],isBgLayer:true,attribution:OpenLayers.i18n("pixelmap-color attribution")});var voidLayer=new OpenLayers.Layer("voidLayer",{isBaseLayer:false,isBgLayer:true,displayInLayerSwitcher:false});this.bgSwitchLayers={'pixelmaps-color':pixelmapsColor,'voidLayer':voidLayer};var initialPrimaryLayer;if(this.bgLayer&&this.bgSwitchLayers[this.bgLayer]){initialPrimaryLayer=this.bgSwitchLayers[this.bgLayer];}else{initialPrimaryLayer=pixelmapsColor;}
initialPrimaryLayer.setVisibility(true);this.bgLayers={primaryLayer:initialPrimaryLayer,complementaryLayer:this.aerial};return[this.aerial,pixelmapsColor,voidLayer];},getControls:function(config){var options=this.getMapOptions();this.navControl=new OpenLayers.Control.Navigation({handleRightClicks:true});this.mousePosition=new OpenLayers.Control.MousePosition({div:$('mousepos'),prefix:OpenLayers.i18n('Coordinates: ')});var controls=[new OpenLayers.Control.PanZoomBar(),this.navControl,new OpenLayers.Control.ScaleLine(),new OpenLayers.Control.Attribution(),this.mousePosition,new OpenLayers.Control.OverviewMap({layers:[new OpenLayers.Layer.Image("overview",this.baseConfig.baseUrl+"/gfx/keymap.png",new OpenLayers.Bounds(40000,44000,114000,149000),new OpenLayers.Size(130,150))],size:new OpenLayers.Size(130,150),isSuitableOverview:function(){return true;},mapOptions:{units:options.units,projection:options.projection,maxExtent:options.maxExtent,scales:[2000000]}})];if(this.isMainApp){controls.push(new geoadmin.API.ArgParser({api:this}));}
return controls;},deactivateRedlining:function(){Ext.get('redliningContainer').hide();var actions=this.redlining.controler.actions;for(var i=0;i<actions.length;i++){if(actions[i].control){actions[i].control.deactivate();}}},initRedliningPanel:function(){var closebtn=new Ext.Action({iconCls:'close-button',toggleGroup:'export',handler:this.deactivateRedlining.createDelegate(this)});this.redlining=new GeoExt.ux.form.RedLiningPanel({map:this.map,layerOptions:{displayInLayerSwitcher:false},popupOptions:{unpinnable:false,draggable:true},selectControlOptions:{toggle:false,clickout:false},id:'redliningPanel','export':false,'import':false,bodyStyle:'display: none',title:OpenLayers.i18n('redlining'),baseCls:'export-panel',border:false});this.redliningPanel=new Ext.Panel({tbar:[closebtn],renderTo:'redliningContainer',width:200,border:false,items:[this.redlining]});},initPrintPanel:function(){var closebtn=new Ext.Action({iconCls:'close-button',toggleGroup:'export',handler:function(){Ext.get('printContainer').hide();this.printPanel.disable();this.drawLayer.setZIndex(this.map.Z_INDEX_BASE['Feature']);},scope:this});this.printPanel=new mapfish.widgets.print.SimpleForm({renderTo:'printContainer',width:200,configUrl:this.baseConfig.printUrl+'/info.json',layerTree:this.tree,map:this.map,baseCls:'export-panel',styleMap:new OpenLayers.StyleMap({"default":new OpenLayers.Style({pointRadius:"10",fillColor:"#FF0000",fillOpacity:0.5,strokeColor:"#FF0000",strokeOpacity:1.0,strokeWidth:1})}),columns:[],title:OpenLayers.i18n('PDF'),tbar:[closebtn],createLayoutCombo:function(name){var orientations=[];for(var i=0;i<this.config.layouts.length;i++){var layout=this.config.layouts[i];orientations.push({'name':layout.name,'label':OpenLayers.i18n(layout.name)});}
var layoutStore=new Ext.data.JsonStore({fields:['name','label'],data:orientations});return new Ext.form.ComboBox({fieldLabel:OpenLayers.Lang.translate('mf.print.layout'),store:layoutStore,displayField:'label',valueField:'name',typeAhead:false,mode:'local',id:'layout_'+this.getId(),hiddenId:'layoutId_'+this.getId(),hiddenName:name,name:name,editable:false,triggerAction:'all',value:this.config.layouts[0].name});},formConfig:{labelAlign:'top',defaults:{width:160,listWidth:160},items:[{xtype:'hidden',name:'lang'+OpenLayers.Lang.getCode(),value:true}]},serviceParams:{locale:'fr_CH'},wantResetButton:false});},initLinkPanel:function(){var closebtn=new Ext.Action({iconCls:'close-button',toggleGroup:'export',handler:function(){Ext.get('linkContainer').hide();}});this.linkPanel=new Ext.FormPanel({renderTo:'linkContainer',width:450,title:OpenLayers.i18n('Map URL'),border:false,baseCls:'export-panel',tbar:[closebtn],labelAlign:'top',items:[{xtype:'textfield',fieldLabel:OpenLayers.i18n('URL'),width:440,id:'permalink',listeners:{'focus':function(){this.selectText();}}}]});},addLayerToMap:function(id){var bodLayersCount=0;var maxlayerNumber=5;for(var i=0,len=this.map.layers.length;i<len;i++){var layer=this.map.layers[i];if(layer.bodid!=undefined){if(layer.bodid==id){return false;}else{bodLayersCount++;}}}
this.checkForLayersExclusion(id);if(bodLayersCount<maxlayerNumber){var config=this.layers[id];if(config){var layer=new OpenLayers.Layer.TileCache(config.name,this.baseConfig.tilecacheDirectUrl,id,{format:config.format,bodid:id,datenherr:config.datenherr?config.datenherr:'',isBaseLayer:false,layerType:config.type,buffer:0,exclusion:config.exclusion,transitionEffect:'resize',serverResolutions:this.baseConfig.pixelmapResolutions})
this.map.addLayer(layer);return true;}else{return false;}}},getBodNumberLayer:function(){var bodLayersCount=0;for(var i=0,len=this.map.layers.length;i<len;i++){var layer=this.map.layers[i];if(layer.bodid!=undefined){bodLayersCount++;}}
return bodLayersCount;},removeLayerFromMap:function(id){var layers=this.map.getLayersBy('bodid',id);if(layers.length==1){var layer=layers[0];layer.destroy();}
this.drawLayer.setZIndex(this.map.Z_INDEX_BASE['Feature']);},initInspireCatalogPanel:function(){this.inspireCatalogPanel=new geoadmin.InspireCatalogPanel({layers:this.layers});},getInspireCatalogPanel:function(){return this.inspireCatalogPanel;},getLayerTreeModel:function(){return null;},checkBgOpacityForLayerExclusion:function(slider,value){this.checkForLayersExclusionHelper(this.aerial.exclusion,true);},checkForLayersExclusion:function(id,isBgLayer){var layers=isBgLayer?this.bgSwitchLayers:this.layers;if(!layers[id]||!layers[id].exclusion)return;this.checkForLayersExclusionHelper(layers[id].exclusion,isBgLayer);},checkForLayersExclusionHelper:function(newLayerExclusion,isBgLayer){var layersToRemove=[];for(var i=0,len=this.map.layers.length;i<len;i++){var layer=this.map.layers[i];if(!layer.exclusion)continue;if(this.haveExclusionMatch(newLayerExclusion,layer.exclusion)){if(!layer.isBgLayer){layersToRemove.push(layer.bodid);}else if(!isBgLayer){layer.setVisibility(false);this.showVoidLayer();}}}
for(var i=0,len=layersToRemove.length;i<len;i++){this.removeLayerFromMap(layersToRemove[i]);}},checkPermalinkLayersExclusions:function(){var layersToRemove=[],layers=[],bodid,layer1,layer2;for(var i=0,len=this.permalinkLayers.length;i<len;i++){bodid=this.permalinkLayers[i];if(!this.layers[bodid]){layersToRemove.push(i);continue;}
layer1=this.layers[bodid];if(layers.length==0||!layer1.exclusion){layers.push(bodid);continue;}
for(var j=0,len2=layers.length;j<len2;j++){layer2=this.layers[layers[j]];if(layer2.exclusion&&this.haveExclusionMatch(layer1.exclusion,layer2.exclusion)){layersToRemove.push(this.permalinkLayers.indexOf(layers[j]));}
layers.push(bodid);}}
var permalinkLayers=[];for(var i=0,len=this.permalinkLayers.length;i<len;i++){if(layersToRemove.indexOf(i)==-1){permalinkLayers.push(this.permalinkLayers[i]);}}
this.permalinkLayers=permalinkLayers;if(this.permalinkLayersIndices){var permalinkLayersIndices=[];for(var i=0,len=this.permalinkLayersIndices.length;i<len;i++){if(layersToRemove.indexOf(i)==-1){permalinkLayersIndices.push(this.permalinkLayersIndices[i]);}}
this.permalinkLayersIndices=permalinkLayersIndices;}
if(this.permalinkLayersOpacity){var permalinkLayersOpacity=[];for(var i=0,len=this.permalinkLayersOpacity.length;i<len;i++){if(layersToRemove.indexOf(i)==-1){permalinkLayersOpacity.push(this.permalinkLayersOpacity[i]);}}
this.permalinkLayersOpacity=permalinkLayersOpacity;}},haveExclusionMatch:function(array1,array2){for(var i=0,len=array1.length;i<len;i++){if(array2.indexOf(array1[i])!=-1){return true;}}
return false;},showVoidLayer:function(){if(this.mapOpacitySlider&&this.bgLayerCombo){this.mapOpacitySlider.setValue(100);this.bgLayerCombo.setValue('voidLayer');this.updateBgLayerCombo('voidLayer');}else{this.mapOpacityValue=100;this.bgLayer='voidLayer';this.bgLayers.primaryLayer=this.bgSwitchLayers[this.bgLayer];}},updateLayersZIndex:function(addedLayer){var layer=this.map.getLayersByName('Drawings layer')[0];this.map.setLayerIndex(layer,this.map.layers.length);var layer=this.map.getLayersByName('Cosmetic')[0];this.map.setLayerIndex(layer,this.map.layers.length-1);},recenterOnBbox:function(bbox){var bounds=new OpenLayers.Bounds(bbox[0],bbox[1],bbox[2],bbox[3]);if(bounds.getWidth()&&bounds.getHeight()){this.map.zoomToExtent(bounds);}else{var center=bounds.getCenterLonLat();if(center.lat&&center.lon){this.map.setCenter(center,9);}}},showFeatures:function(layer,ids){var ds=new Ext.data.Store({proxy:new Ext.data.ScriptTagProxy({url:this.baseConfig.baseUrl+this.highlightUrl}),reader:new Ext.data.JsonReader({root:"rows",totalProperty:"results"},[{name:'features'}])});ds.load({params:{layers:layer,ids:[ids],ref:'geoadmin',cb:'mapFishApiPool.apiRefs['+this.apiId+'].showFeaturesCb'}});},showFeaturesCb:function(r){var geo=new OpenLayers.Format.GeoJSON();var features=geo.read(r.rows[0].features);if(features.length>0){var layer=this.getDrawingLayer();layer.addFeatures(features);if(features.length==1&&features[0].geometry instanceof OpenLayers.Geometry.Point){var point=features[0].geometry;this.map.setCenter(new OpenLayers.LonLat(point.x,point.y),10);}else{this.map.zoomToExtent(layer.getDataExtent());}
this.featuresShown=true;}}});Ext.namespace("MapFish");MapFish.API.Permalink=OpenLayers.Class(OpenLayers.Control.Permalink,{id:'mapfish.api.permalink',coordsParams:null,api:null,argParserClass:MapFish.API.ArgParser,initialize:function(element,base,options){OpenLayers.Control.Permalink.prototype.initialize.apply(this,arguments);this.api=options&&options.api;this.coordsParams=options&&options.coordsParams||{lon:'lon',lat:'lat'};},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);this.map.events.on({'moveend':this.updateLink,'changelayer':this.updateLink,'changebaselayer':this.updateLink,scope:this});this.updateLink();return this.div;},updateLink:function(){var href=this.base;if(href.indexOf('?')!=-1){href=href.substring(0,href.indexOf('?'));}
href+='?'+OpenLayers.Util.getParameterString(this.createParams());if(this.element){this.element.value=href;}},createParams:function(center,zoom,layers){if(this.map){center=center||this.map.getCenter();}else{return'';}
if(OpenLayers.String.contains(this.base,'?')){}else{this.base=this.base+"?";}
var params=OpenLayers.Util.getParameters(this.base);if(center){params.zoom=zoom||this.map.getZoom();var lat=center.lat;var lon=center.lon;if(this.displayProjection){var mapPosition=OpenLayers.Projection.transform({x:lon,y:lat},this.map.getProjectionObject(),this.displayProjection);lon=mapPosition.x;lat=mapPosition.y;}
params[this.coordsParams.lat]=Math.round(lat*100000)/100000;params[this.coordsParams.lon]=Math.round(lon*100000)/100000;params.layers=null;var layertree=this.api.tree;if(layertree){var nodes=[];var checkedNodes=layertree.getChecked();for(var i=0,len=checkedNodes.length;i<len;i++){var node=checkedNodes[i];if(node.id){nodes.push(node.id);}}
if(nodes.length>0){params.layerNodes=nodes;}}}
return params;},CLASS_NAME:"MapFish.API.Permalink"});Ext.namespace("geoadmin.API");geoadmin.API.Permalink=OpenLayers.Class(MapFish.API.Permalink,{initialize:function(element,base,options){MapFish.API.Permalink.prototype.initialize.apply(this,arguments);this.coordsParams=options&&options.coordsParams||{lon:'Y',lat:'X'};},setMap:function(map){OpenLayers.Control.prototype.setMap.apply(this,arguments);},draw:function(){MapFish.API.Permalink.prototype.draw.apply(this,arguments);this.map.events.on({'addlayer':this.updateLink,'removelayer':this.updateLink,scope:this});this.api.getInspireCatalogPanel().on({'click':this.updateLink,'dblclick':this.updateLink,scope:this});this.api.getMapOpacitySlider().on({'click':this.updateLink,scope:this});Ext.getCmp('bgLayer').on({'select':this.updateLink,scope:this});this.updateLink();return this.div;},createParams:function(center,zoom,layers){var params=MapFish.API.Permalink.prototype.createParams.apply(this,arguments);if(this.map){}else{return'';}
params.layers=null;params.layers_indices=null;params.layers_opacity=null;params.layers_visibility=null;layers=layers||this.map.layers;var activatedLayers=[];var activatedLayersIndices=[];var activatedLayersOpacity=[];var activatedLayersVisibility=[];for(var i=0,len=layers.length;i<len;i++){var layer=layers[i];if(!layer.isBaseLayer&&layer.name!='aerial'&&layer.name!='pixelmaps-color'&&layer.name!='pixelmaps-gray'&&layer.name!='Drawings layer'&&layer.name!='voidLayer'&&layer.name!='Cosmetic'){activatedLayers.push(layer.layername);activatedLayersIndices.push(this.map.getLayerIndex(layer));if(layer.opacity){activatedLayersOpacity.push(layer.opacity);}else{activatedLayersOpacity.push('1');}
activatedLayersVisibility.push(layer.visibility);}}
if(activatedLayers.length){params.layers=activatedLayers;params.layers_indices=activatedLayersIndices;params.layers_opacity=activatedLayersOpacity;params.layers_visibility=activatedLayersVisibility;}
var bgOpacity=this.api.getMapOpacitySlider().value;if(typeof bgOpacity!='undefined'&&bgOpacity!=100){params.bgOpacity=bgOpacity;}else{params.bgOpacity=null;}
var bgLayer=Ext.getCmp('bgLayer').value;params.bgLayer=(bgLayer!='pixelmaps-color')?bgLayer:null;var selectedNode=this.api.getInspireCatalogPanel().getSelectedNode();if(selectedNode){params.selectedNode=selectedNode;}
if(params.scale){params.zoom=null;}
return params;},CLASS_NAME:"geoadmin.API.Permalink"});Ext.namespace("GeoExt.data");GeoExt.data.LayerRecord=Ext.data.Record.create([{name:"layer"},{name:"title",type:"string",mapping:"name"}]);GeoExt.data.LayerRecord.prototype.clone=function(id){var layer=this.get("layer")&&this.get("layer").clone();return new this.constructor(Ext.applyIf({layer:layer},this.data),id||layer.id);};GeoExt.data.LayerRecord.create=function(o){var f=Ext.extend(GeoExt.data.LayerRecord,{});var p=f.prototype;p.fields=new Ext.util.MixedCollection(false,function(field){return field.name;});GeoExt.data.LayerRecord.prototype.fields.each(function(f){p.fields.add(f);});if(o){for(var i=0,len=o.length;i<len;i++){p.fields.add(new Ext.data.Field(o[i]));}}
f.getField=function(name){return p.fields.get(name);};return f;};Ext.namespace("MapFish");MapFish.API.ZoomToExtent=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_BUTTON,initialize:function(config){Ext.apply(this,config);OpenLayers.Control.prototype.initialize.apply(this,arguments);},trigger:function(){if(this.map){if(this.extent){this.map.zoomToExtent(this.extent);}else if(this.center&&this.zoom){this.map.setCenter(this.center,this.zoom);}else{this.map.zoomToMaxExtent();}}},CLASS_NAME:"MapFish.API.ZoomToExtent"});OpenLayers.Popup.Framed=OpenLayers.Class(OpenLayers.Popup.Anchored,{imageSrc:null,imageSize:null,isAlphaImage:false,positionBlocks:null,blocks:null,fixedRelativePosition:false,initialize:function(id,lonlat,contentSize,contentHTML,anchor,closeBox,closeBoxCallback){OpenLayers.Popup.Anchored.prototype.initialize.apply(this,arguments);if(this.fixedRelativePosition){this.updateRelativePosition();this.calculateRelativePosition=function(px){return this.relativePosition;};}
this.contentDiv.style.position="absolute";this.contentDiv.style.zIndex=1;if(closeBox){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 i=0;i<this.blocks.length;i++){var block=this.blocks[i];if(block.image){block.div.removeChild(block.image);}
block.image=null;if(block.div){this.groupDiv.removeChild(block.div);}
block.div=null;}
this.blocks=null;OpenLayers.Popup.Anchored.prototype.destroy.apply(this,arguments);},setBackgroundColor:function(color){},setBorder:function(){},setOpacity:function(opacity){},setSize:function(contentSize){OpenLayers.Popup.Anchored.prototype.setSize.apply(this,arguments);this.updateBlocks();},updateRelativePosition:function(){this.padding=this.positionBlocks[this.relativePosition].padding;if(this.closeDiv){var contentDivPadding=this.getContentDivPadding();this.closeDiv.style.right=contentDivPadding.right+
this.padding.right+"px";this.closeDiv.style.top=contentDivPadding.top+
this.padding.top+"px";}
this.updateBlocks();},calculateNewPx:function(px){var newPx=OpenLayers.Popup.Anchored.prototype.calculateNewPx.apply(this,arguments);newPx=newPx.offset(this.positionBlocks[this.relativePosition].offset);return newPx;},createBlocks:function(){this.blocks=[];var firstPosition=null;for(var key in this.positionBlocks){firstPosition=key;break;}
var position=this.positionBlocks[firstPosition];for(var i=0;i<position.blocks.length;i++){var block={};this.blocks.push(block);var divId=this.id+'_FrameDecorationDiv_'+i;block.div=OpenLayers.Util.createDiv(divId,null,null,null,"absolute",null,"hidden",null);var imgId=this.id+'_FrameDecorationImg_'+i;var imageCreator=(this.isAlphaImage)?OpenLayers.Util.createAlphaImageDiv:OpenLayers.Util.createImage;block.image=imageCreator(imgId,null,this.imageSize,this.imageSrc,"absolute",null,null,null);block.div.appendChild(block.image);this.groupDiv.appendChild(block.div);}},updateBlocks:function(){if(!this.blocks){this.createBlocks();}
if(this.size&&this.relativePosition){var position=this.positionBlocks[this.relativePosition];for(var i=0;i<position.blocks.length;i++){var positionBlock=position.blocks[i];var block=this.blocks[i];var l=positionBlock.anchor.left;var b=positionBlock.anchor.bottom;var r=positionBlock.anchor.right;var t=positionBlock.anchor.top;var w=(isNaN(positionBlock.size.w))?this.size.w-(r+l):positionBlock.size.w;var h=(isNaN(positionBlock.size.h))?this.size.h-(b+t):positionBlock.size.h;block.div.style.width=(w<0?0:w)+'px';block.div.style.height=(h<0?0:h)+'px';block.div.style.left=(l!=null)?l+'px':'';block.div.style.bottom=(b!=null)?b+'px':'';block.div.style.right=(r!=null)?r+'px':'';block.div.style.top=(t!=null)?t+'px':'';block.image.style.left=positionBlock.position.x+'px';block.image.style.top=positionBlock.position.y+'px';}
this.contentDiv.style.left=this.padding.left+"px";this.contentDiv.style.top=this.padding.top+"px";}},CLASS_NAME:"OpenLayers.Popup.Framed"});Ext.namespace("GeoExt");GeoExt.SliderTip=Ext.extend(Ext.Tip,{hover:true,minWidth:10,minWidth:10,offsets:[0,-10],dragging:false,init:function(slider){slider.on({dragstart:this.onSlide,drag:this.onSlide,dragend:this.hide,destroy:this.destroy,scope:this});if(this.hover){slider.on("render",this.registerThumbListeners,this);}
this.slider=slider;},registerThumbListeners:function(){var el=this.slider.thumb||this.slider.thumbs[0].tracker.el;el.on({"mouseover":function(){this.onSlide(this.slider);this.dragging=false;},"mouseout":function(){if(!this.dragging){this.hide.apply(this,arguments);}},scope:this});},onSlide:function(slider){this.dragging=true;this.show();this.body.update(this.getText(slider));this.doAutoWidth();var el=slider.thumb||slider.thumbs[0].tracker.el;this.el.alignTo(el,'b-t?',this.offsets);},getText:function(slider){return slider.getValue();}});Ext.namespace("GeoExt");GeoExt.LayerOpacitySliderTip=Ext.extend(GeoExt.SliderTip,{template:'<div>{opacity}%</div>',compiledTemplate:null,init:function(slider){this.compiledTemplate=new Ext.Template(this.template);GeoExt.LayerOpacitySliderTip.superclass.init.call(this,slider);},getText:function(slider){var data={opacity:slider.getValue()};return this.compiledTemplate.apply(data);}});Ext.namespace('GeoExt.ux');GeoExt.ux.LayerManagerImportPanel=Ext.extend(Ext.Panel,{map:null,border:false,defaultFormat:'KML',layer:null,formatCombo:null,initComponent:function(){this.formatCombo=new Ext.form.ComboBox({id:'layermanagerimportformat',fieldLabel:OpenLayers.i18n('Format'),store:GeoExt.ux.data.FormatStore,displayField:'shortName',typeAhead:true,mode:'local',triggerAction:'all',emptyText:'Select a format...',selectOnFocus:true,resizable:true});this.formatCombo.setValue(this.defaultFormat);this.fileSelectorBox=new Ext.BoxComponent({id:'fileSelectorBox',autoEl:{html:'<input type="file" name="fileselector" id="fileselector"/>'}});this.items=[{layout:'form',border:false,items:[{layout:'column',border:false,defaults:{layout:'form',border:false,bodyStyle:'padding:5px 5px 5px 5px'},items:[{columnWidth:1,defaults:{anchor:'100%'},items:[this.formatCombo]}]}]},{layout:'column',border:false,defaults:{layout:'form',border:false,bodyStyle:'padding:5px 5px 5px 5px'},items:[{columnWidth:1,bodyCfg:{tag:'center'},items:[this.fileSelectorBox]}]},{layout:'column',border:false,defaults:{layout:'form',border:false,bodyStyle:'padding:5px 5px 5px 5px'},items:[{columnWidth:1,bodyCfg:{tag:'center'},items:[{xtype:'button',text:OpenLayers.i18n('Import'),handler:function(){if(document.getElementById('fileselector').value==""){alert(OpenLayers.i18n('Select a file to import'));}else{var filecontent;if(Ext.isIE){try{var objFSO=new ActiveXObject("Scripting.FileSystemObject");if(objFSO.FileExists(document.getElementById('fileselector').value)){filecontent=objFSO.OpenTextFile(document.getElementById('fileselector').value,1).ReadAll();}}
catch(e)
{alert('Dear IE user. Add this site in the list of trusted site and activate the ActiveX. '+e.description);return;}}else if(Ext.isGecko){filecontent=document.getElementById('fileselector').files.item(0).getAsText('UTF-8');}else{alert('Your browser is not supported. Patch welcome !');return;}
this.fireEvent('beforedataimported',this,this.formatCombo.getValue(),filecontent);this.layer=GeoExt.ux.data.Import(this.map,this.layer,this.formatCombo.getValue(),filecontent,null);this.fireEvent('dataimported',this,this.formatCombo.getValue(),filecontent,GeoExt.ux.data.importFeatures);}},scope:this}]}]}];this.addEvents('dataimported','beforedataimported');GeoExt.ux.LayerManagerImportPanel.superclass.initComponent.call(this);}});Ext.reg('gxux_layermanagerimportpanel',GeoExt.ux.LayerManagerImportPanel);(function(){Downloadify=window.Downloadify={queue:{},uid:(new Date).getTime(),getTextForSave:function(b){if(b=Downloadify.queue[b])return b.getData();return""},getFileNameForSave:function(b){if(b=Downloadify.queue[b])return b.getFilename();return""},saveComplete:function(b){(b=Downloadify.queue[b])&&b.complete();return true},saveCancel:function(b){(b=Downloadify.queue[b])&&b.cancel();return true},saveError:function(b){(b=Downloadify.queue[b])&&b.error();return true},addToQueue:function(b){Downloadify.queue[b.queue_name]=b},getUID:function(b){if(b.id=="")b.id="downloadify_"+Downloadify.uid++;return b.id}};Downloadify.create=function(b,c){b=typeof b=="string"?document.getElementById(b):b;return new Downloadify.Container(b,c)};Downloadify.Container=function(b,c){var a=this;a.el=b;a.enabled=true;a.dataCallback=null;a.filenameCallback=null;a.data=null;a.filename=null;function f(){a.options=c;if(!a.options.append)a.el.innerHTML="";a.flashContainer=document.createElement("span");a.el.appendChild(a.flashContainer);a.queue_name=Downloadify.getUID(a.flashContainer);if(typeof a.options.filename==="function")a.filenameCallback=a.options.filename;else if(a.options.filename)a.filename=a.options.filename;if(typeof a.options.data==="function")a.dataCallback=a.options.data;else if(a.options.data)a.data=a.options.data;var d={queue_name:a.queue_name,width:a.options.width,height:a.options.height},e={allowScriptAccess:"always"},g={id:a.flashContainer.id,name:a.flashContainer.id};if(a.options.enabled===false)a.enabled=false;if(a.options.transparent===true)e.wmode="transparent";if(a.options.downloadImage)d.downloadImage=a.options.downloadImage;swfobject.embedSWF(a.options.swf,a.flashContainer.id,a.options.width,a.options.height,"10",null,d,e,g);Downloadify.addToQueue(a)}a.enable=function(){var d=document.getElementById(a.flashContainer.id);d.setEnabled(true);a.enabled=true};a.disable=function(){var d=document.getElementById(a.flashContainer.id);d.setEnabled(false);a.enabled=false};a.getData=function(){if(!a.enabled)return"";return a.dataCallback?a.dataCallback():a.data?a.data:""};a.getFilename=function(){return a.filenameCallback?a.filenameCallback():a.filename?a.filename:""};a.complete=function(){typeof a.options.onComplete==="function"&&a.options.onComplete()};a.cancel=function(){typeof a.options.onCancel==="function"&&a.options.onCancel()};a.error=function(){typeof a.options.onError==="function"&&a.options.onError()};f()};Downloadify.defaultOptions={swf:"media/downloadify.swf",downloadImage:"images/download.png",width:100,height:30,transparent:true,append:false}})();typeof jQuery!="undefined"&&function(b){b.fn.downloadify=function(c){return this.each(function(){c=b.extend({},Downloadify.defaultOptions,c);var a=Downloadify.create(this,c);b(this).data("Downloadify",a)})}}(jQuery);OpenLayers.Popup.FramedCloud=OpenLayers.Class(OpenLayers.Popup.Framed,{contentDisplayClass:"olFramedCloudPopupContent",autoSize:true,panMapIfOutOfView:true,imageSize:new OpenLayers.Size(676,736),isAlphaImage:false,fixedRelativePosition:false,positionBlocks:{"tl":{'offset':new OpenLayers.Pixel(44,0),'padding':new OpenLayers.Bounds(8,40,8,9),'blocks':[{size:new OpenLayers.Size('auto','auto'),anchor:new OpenLayers.Bounds(0,51,22,0),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,'auto'),anchor:new OpenLayers.Bounds(null,50,0,0),position:new OpenLayers.Pixel(-638,0)},{size:new OpenLayers.Size('auto',19),anchor:new OpenLayers.Bounds(0,32,22,null),position:new OpenLayers.Pixel(0,-631)},{size:new OpenLayers.Size(22,18),anchor:new OpenLayers.Bounds(null,32,0,null),position:new OpenLayers.Pixel(-638,-632)},{size:new OpenLayers.Size(81,35),anchor:new OpenLayers.Bounds(null,0,0,null),position:new OpenLayers.Pixel(0,-688)}]},"tr":{'offset':new OpenLayers.Pixel(-45,0),'padding':new OpenLayers.Bounds(8,40,8,9),'blocks':[{size:new OpenLayers.Size('auto','auto'),anchor:new OpenLayers.Bounds(0,51,22,0),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,'auto'),anchor:new OpenLayers.Bounds(null,50,0,0),position:new OpenLayers.Pixel(-638,0)},{size:new OpenLayers.Size('auto',19),anchor:new OpenLayers.Bounds(0,32,22,null),position:new OpenLayers.Pixel(0,-631)},{size:new OpenLayers.Size(22,19),anchor:new OpenLayers.Bounds(null,32,0,null),position:new OpenLayers.Pixel(-638,-631)},{size:new OpenLayers.Size(81,35),anchor:new OpenLayers.Bounds(0,0,null,null),position:new OpenLayers.Pixel(-215,-687)}]},"bl":{'offset':new OpenLayers.Pixel(45,0),'padding':new OpenLayers.Bounds(8,9,8,40),'blocks':[{size:new OpenLayers.Size('auto','auto'),anchor:new OpenLayers.Bounds(0,21,22,32),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,'auto'),anchor:new OpenLayers.Bounds(null,21,0,32),position:new OpenLayers.Pixel(-638,0)},{size:new OpenLayers.Size('auto',21),anchor:new OpenLayers.Bounds(0,0,22,null),position:new OpenLayers.Pixel(0,-629)},{size:new OpenLayers.Size(22,21),anchor:new OpenLayers.Bounds(null,0,0,null),position:new OpenLayers.Pixel(-638,-629)},{size:new OpenLayers.Size(81,33),anchor:new OpenLayers.Bounds(null,null,0,0),position:new OpenLayers.Pixel(-101,-674)}]},"br":{'offset':new OpenLayers.Pixel(-44,0),'padding':new OpenLayers.Bounds(8,9,8,40),'blocks':[{size:new OpenLayers.Size('auto','auto'),anchor:new OpenLayers.Bounds(0,21,22,32),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,'auto'),anchor:new OpenLayers.Bounds(null,21,0,32),position:new OpenLayers.Pixel(-638,0)},{size:new OpenLayers.Size('auto',21),anchor:new OpenLayers.Bounds(0,0,22,null),position:new OpenLayers.Pixel(0,-629)},{size:new OpenLayers.Size(22,21),anchor:new OpenLayers.Bounds(null,0,0,null),position:new OpenLayers.Pixel(-638,-629)},{size:new OpenLayers.Size(81,33),anchor:new OpenLayers.Bounds(0,null,null,0),position:new OpenLayers.Pixel(-311,-674)}]}},minSize:new OpenLayers.Size(105,10),maxSize:new OpenLayers.Size(600,660),initialize:function(id,lonlat,contentSize,contentHTML,anchor,closeBox,closeBoxCallback){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"});Ext.namespace("geoadmin.API");geoadmin.API.ArgParser=OpenLayers.Class(MapFish.API.ArgParser,{initialize:function(options){MapFish.API.ArgParser.prototype.initialize.apply(this,arguments);this.coordsParams=options&&options.coordsParams||{lon:'Y',lat:'X'};},setMap:function(map){MapFish.API.ArgParser.prototype.setMap.apply(this,arguments);var args=OpenLayers.Util.getParameters();if(args.selectedNode){this.api.getInspireCatalogPanel().selectedNodeId=args.selectedNode;}
if(args.layers){if(typeof args.layers=='string'){args.layers=[args.layers];args.layers_indices=[args.layers_indices];args.layers_opacity=[args.layers_opacity];args.layers_visibility=[args.layers_visibility];}
this.api.permalinkLayers=args.layers;this.api.permalinkLayersIndices=args.layers_indices;this.api.permalinkLayersOpacity=args.layers_opacity;this.api.permalinkLayersVisibility=args.layers_visibility;}
if(args.crosshair){this.api.crosshair=args.crosshair;}else{this.api.crosshair=false;}
if(typeof args.bgOpacity!='undefined'){if(parseInt(args.bgOpacity)<100){this.api.mapOpacityValue=parseInt(args.bgOpacity);}}
if(args.scale){this.zoom=this.getZoomFromScale(args.scale);this.setCenter();}
if(args.noHeader){this.api.noHeader=args.noHeader;}
if(args.showLocation){this.api.showLocation=args.showLocation;}
if(args.showLocationInMap){this.api.showLocationInMap=args.showLocationInMap;}
for(var key in args){if(args[key]&&key!="mode"&&key!="lang"&&key!="selectedNode"&&key!="layers"&&key!="bgOpacity"&&key!="bgLayer"&&key!="zoom"&&key!="X"&&key!="Y"&&key!="scale"&&key!="layers_indices"&&key!="layers_opacity"&&key!="layers_visibility"&&key!="noHeader"&&key!="showLocation"){this.api.featuresToShow={layer:key,ids:args[key]};}}},getZoomFromScale:function(scale){if(scale=='6500000')return 0;if(scale=='5000000')return 1;if(scale=='2500000')return 2;if(scale=='1000000')return 3;if(scale=='500000')return 4;if(scale=='200000')return 5;if(scale=='100000')return 6;if(scale=='50000')return 7;if(scale=='25000')return 8;if(scale=='20000')return 9;if(scale=='10000')return 10;if(scale=='5000')return 11;},CLASS_NAME:"geoadmin.API.ArgParser"});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(options){this.regExes={trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)};OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);},read:function(data){if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);}
var featureNodes=this.getElementsByTagNameNS(data.documentElement,this.gmlns,this.featureName);var features=[];for(var i=0;i<featureNodes.length;i++){var feature=this.parseFeature(featureNodes[i]);if(feature){features.push(feature);}}
return features;},parseFeature:function(node){var order=["MultiPolygon","Polygon","MultiLineString","LineString","MultiPoint","Point","Envelope","Box"];var type,nodeList,geometry,parser;for(var i=0;i<order.length;++i){type=order[i];nodeList=this.getElementsByTagNameNS(node,this.gmlns,type);if(nodeList.length>0){parser=this.parseGeometry[type.toLowerCase()];if(parser){geometry=parser.apply(this,[nodeList[0]]);if(this.internalProjection&&this.externalProjection){geometry.transform(this.externalProjection,this.internalProjection);}}else{OpenLayers.Console.error(OpenLayers.i18n("unsupportedGeometryType",{'geomType':type}));}
break;}}
var attributes;if(this.extractAttributes){attributes=this.parseAttributes(node);}
var feature=new OpenLayers.Feature.Vector(geometry,attributes);feature.gml={featureType:node.firstChild.nodeName.split(":")[1],featureNS:node.firstChild.namespaceURI,featureNSPrefix:node.firstChild.prefix};var boundedByNodes=this.getElementsByTagNameNS(node,this.gmlns,'boundedBy');if(boundedByNodes.length===1){parser=this.parseGeometry['box'];if(parser){feature.bounds=parser.apply(this,[boundedByNodes[0]]);}}
var childNode=node.firstChild;var fid;while(childNode){if(childNode.nodeType==1){fid=childNode.getAttribute("fid")||childNode.getAttribute("id");if(fid){break;}}
childNode=childNode.nextSibling;}
feature.fid=fid;return feature;},parseGeometry:{point:function(node){var nodeList,coordString;var coords=[];var nodeList=this.getElementsByTagNameNS(node,this.gmlns,"pos");if(nodeList.length>0){coordString=nodeList[0].firstChild.nodeValue;coordString=coordString.replace(this.regExes.trimSpace,"");coords=coordString.split(this.regExes.splitSpace);}
if(coords.length==0){nodeList=this.getElementsByTagNameNS(node,this.gmlns,"coordinates");if(nodeList.length>0){coordString=nodeList[0].firstChild.nodeValue;coordString=coordString.replace(this.regExes.removeSpace,"");coords=coordString.split(",");}}
if(coords.length==0){nodeList=this.getElementsByTagNameNS(node,this.gmlns,"coord");if(nodeList.length>0){var xList=this.getElementsByTagNameNS(nodeList[0],this.gmlns,"X");var yList=this.getElementsByTagNameNS(nodeList[0],this.gmlns,"Y");if(xList.length>0&&yList.length>0){coords=[xList[0].firstChild.nodeValue,yList[0].firstChild.nodeValue];}}}
if(coords.length==2){coords[2]=null;}
if(this.xy){return new OpenLayers.Geometry.Point(coords[0],coords[1],coords[2]);}
else{return new OpenLayers.Geometry.Point(coords[1],coords[0],coords[2]);}},multipoint:function(node){var nodeList=this.getElementsByTagNameNS(node,this.gmlns,"Point");var components=[];if(nodeList.length>0){var point;for(var i=0;i<nodeList.length;++i){point=this.parseGeometry.point.apply(this,[nodeList[i]]);if(point){components.push(point);}}}
return new OpenLayers.Geometry.MultiPoint(components);},linestring:function(node,ring){var nodeList,coordString;var coords=[];var points=[];nodeList=this.getElementsByTagNameNS(node,this.gmlns,"posList");if(nodeList.length>0){coordString=this.getChildValue(nodeList[0]);coordString=coordString.replace(this.regExes.trimSpace,"");coords=coordString.split(this.regExes.splitSpace);var dim=parseInt(nodeList[0].getAttribute("dimension"));var j,x,y,z;for(var i=0;i<coords.length/dim;++i){j=i*dim;x=coords[j];y=coords[j+1];z=(dim==2)?null:coords[j+2];if(this.xy){points.push(new OpenLayers.Geometry.Point(x,y,z));}else{points.push(new OpenLayers.Geometry.Point(y,x,z));}}}
if(coords.length==0){nodeList=this.getElementsByTagNameNS(node,this.gmlns,"coordinates");if(nodeList.length>0){coordString=this.getChildValue(nodeList[0]);coordString=coordString.replace(this.regExes.trimSpace,"");coordString=coordString.replace(this.regExes.trimComma,",");var pointList=coordString.split(this.regExes.splitSpace);for(var i=0;i<pointList.length;++i){coords=pointList[i].split(",");if(coords.length==2){coords[2]=null;}
if(this.xy){points.push(new OpenLayers.Geometry.Point(coords[0],coords[1],coords[2]));}else{points.push(new OpenLayers.Geometry.Point(coords[1],coords[0],coords[2]));}}}}
var line=null;if(points.length!=0){if(ring){line=new OpenLayers.Geometry.LinearRing(points);}else{line=new OpenLayers.Geometry.LineString(points);}}
return line;},multilinestring:function(node){var nodeList=this.getElementsByTagNameNS(node,this.gmlns,"LineString");var components=[];if(nodeList.length>0){var line;for(var i=0;i<nodeList.length;++i){line=this.parseGeometry.linestring.apply(this,[nodeList[i]]);if(line){components.push(line);}}}
return new OpenLayers.Geometry.MultiLineString(components);},polygon:function(node){var nodeList=this.getElementsByTagNameNS(node,this.gmlns,"LinearRing");var components=[];if(nodeList.length>0){var ring;for(var i=0;i<nodeList.length;++i){ring=this.parseGeometry.linestring.apply(this,[nodeList[i],true]);if(ring){components.push(ring);}}}
return new OpenLayers.Geometry.Polygon(components);},multipolygon:function(node){var nodeList=this.getElementsByTagNameNS(node,this.gmlns,"Polygon");var components=[];if(nodeList.length>0){var polygon;for(var i=0;i<nodeList.length;++i){polygon=this.parseGeometry.polygon.apply(this,[nodeList[i]]);if(polygon){components.push(polygon);}}}
return new OpenLayers.Geometry.MultiPolygon(components);},envelope:function(node){var components=[];var coordString;var envelope;var lpoint=this.getElementsByTagNameNS(node,this.gmlns,"lowerCorner");if(lpoint.length>0){var coords=[];if(lpoint.length>0){coordString=lpoint[0].firstChild.nodeValue;coordString=coordString.replace(this.regExes.trimSpace,"");coords=coordString.split(this.regExes.splitSpace);}
if(coords.length==2){coords[2]=null;}
if(this.xy){var lowerPoint=new OpenLayers.Geometry.Point(coords[0],coords[1],coords[2]);}else{var lowerPoint=new OpenLayers.Geometry.Point(coords[1],coords[0],coords[2]);}}
var upoint=this.getElementsByTagNameNS(node,this.gmlns,"upperCorner");if(upoint.length>0){var coords=[];if(upoint.length>0){coordString=upoint[0].firstChild.nodeValue;coordString=coordString.replace(this.regExes.trimSpace,"");coords=coordString.split(this.regExes.splitSpace);}
if(coords.length==2){coords[2]=null;}
if(this.xy){var upperPoint=new OpenLayers.Geometry.Point(coords[0],coords[1],coords[2]);}else{var upperPoint=new OpenLayers.Geometry.Point(coords[1],coords[0],coords[2]);}}
if(lowerPoint&&upperPoint){components.push(new OpenLayers.Geometry.Point(lowerPoint.x,lowerPoint.y));components.push(new OpenLayers.Geometry.Point(upperPoint.x,lowerPoint.y));components.push(new OpenLayers.Geometry.Point(upperPoint.x,upperPoint.y));components.push(new OpenLayers.Geometry.Point(lowerPoint.x,upperPoint.y));components.push(new OpenLayers.Geometry.Point(lowerPoint.x,lowerPoint.y));var ring=new OpenLayers.Geometry.LinearRing(components);envelope=new OpenLayers.Geometry.Polygon([ring]);}
return envelope;},box:function(node){var nodeList=this.getElementsByTagNameNS(node,this.gmlns,"coordinates");var coordString;var coords,beginPoint=null,endPoint=null;if(nodeList.length>0){coordString=nodeList[0].firstChild.nodeValue;coords=coordString.split(" ");if(coords.length==2){beginPoint=coords[0].split(",");endPoint=coords[1].split(",");}}
if(beginPoint!==null&&endPoint!==null){return new OpenLayers.Bounds(parseFloat(beginPoint[0]),parseFloat(beginPoint[1]),parseFloat(endPoint[0]),parseFloat(endPoint[1]));}}},parseAttributes:function(node){var attributes={};var childNode=node.firstChild;var children,i,child,grandchildren,grandchild,name,value;while(childNode){if(childNode.nodeType==1){children=childNode.childNodes;for(i=0;i<children.length;++i){child=children[i];if(child.nodeType==1){grandchildren=child.childNodes;if(grandchildren.length==1){grandchild=grandchildren[0];if(grandchild.nodeType==3||grandchild.nodeType==4){name=(child.prefix)?child.nodeName.split(":")[1]:child.nodeName;value=grandchild.nodeValue.replace(this.regExes.trimSpace,"");attributes[name]=value;}}else{attributes[child.nodeName.split(":").pop()]=null;}}}
break;}
childNode=childNode.nextSibling;}
return attributes;},write:function(features){if(!(features instanceof Array)){features=[features];}
var gml=this.createElementNS("http://www.opengis.net/wfs","wfs:"+this.collectionName);for(var i=0;i<features.length;i++){gml.appendChild(this.createFeatureXML(features[i]));}
return OpenLayers.Format.XML.prototype.write.apply(this,[gml]);},createFeatureXML:function(feature){var geometry=feature.geometry;var geometryNode=this.buildGeometryNode(geometry);var geomContainer=this.createElementNS(this.featureNS,this.featurePrefix+":"+
this.geometryName);geomContainer.appendChild(geometryNode);var featureNode=this.createElementNS(this.gmlns,"gml:"+this.featureName);var featureContainer=this.createElementNS(this.featureNS,this.featurePrefix+":"+
this.layerName);var fid=feature.fid||feature.id;featureContainer.setAttribute("fid",fid);featureContainer.appendChild(geomContainer);for(var attr in feature.attributes){var attrText=this.createTextNode(feature.attributes[attr]);var nodename=attr.substring(attr.lastIndexOf(":")+1);var attrContainer=this.createElementNS(this.featureNS,this.featurePrefix+":"+
nodename);attrContainer.appendChild(attrText);featureContainer.appendChild(attrContainer);}
featureNode.appendChild(featureContainer);return featureNode;},buildGeometryNode:function(geometry){if(this.externalProjection&&this.internalProjection){geometry=geometry.clone();geometry.transform(this.internalProjection,this.externalProjection);}
var className=geometry.CLASS_NAME;var type=className.substring(className.lastIndexOf(".")+1);var builder=this.buildGeometry[type.toLowerCase()];return builder.apply(this,[geometry]);},buildGeometry:{point:function(geometry){var gml=this.createElementNS(this.gmlns,"gml:Point");gml.appendChild(this.buildCoordinatesNode(geometry));return gml;},multipoint:function(geometry){var gml=this.createElementNS(this.gmlns,"gml:MultiPoint");var points=geometry.components;var pointMember,pointGeom;for(var i=0;i<points.length;i++){pointMember=this.createElementNS(this.gmlns,"gml:pointMember");pointGeom=this.buildGeometry.point.apply(this,[points[i]]);pointMember.appendChild(pointGeom);gml.appendChild(pointMember);}
return gml;},linestring:function(geometry){var gml=this.createElementNS(this.gmlns,"gml:LineString");gml.appendChild(this.buildCoordinatesNode(geometry));return gml;},multilinestring:function(geometry){var gml=this.createElementNS(this.gmlns,"gml:MultiLineString");var lines=geometry.components;var lineMember,lineGeom;for(var i=0;i<lines.length;++i){lineMember=this.createElementNS(this.gmlns,"gml:lineStringMember");lineGeom=this.buildGeometry.linestring.apply(this,[lines[i]]);lineMember.appendChild(lineGeom);gml.appendChild(lineMember);}
return gml;},linearring:function(geometry){var gml=this.createElementNS(this.gmlns,"gml:LinearRing");gml.appendChild(this.buildCoordinatesNode(geometry));return gml;},polygon:function(geometry){var gml=this.createElementNS(this.gmlns,"gml:Polygon");var rings=geometry.components;var ringMember,ringGeom,type;for(var i=0;i<rings.length;++i){type=(i==0)?"outerBoundaryIs":"innerBoundaryIs";ringMember=this.createElementNS(this.gmlns,"gml:"+type);ringGeom=this.buildGeometry.linearring.apply(this,[rings[i]]);ringMember.appendChild(ringGeom);gml.appendChild(ringMember);}
return gml;},multipolygon:function(geometry){var gml=this.createElementNS(this.gmlns,"gml:MultiPolygon");var polys=geometry.components;var polyMember,polyGeom;for(var i=0;i<polys.length;++i){polyMember=this.createElementNS(this.gmlns,"gml:polygonMember");polyGeom=this.buildGeometry.polygon.apply(this,[polys[i]]);polyMember.appendChild(polyGeom);gml.appendChild(polyMember);}
return gml;},bounds:function(bounds){var gml=this.createElementNS(this.gmlns,"gml:Box");gml.appendChild(this.buildCoordinatesNode(bounds));return gml;}},buildCoordinatesNode:function(geometry){var coordinatesNode=this.createElementNS(this.gmlns,"gml:coordinates");coordinatesNode.setAttribute("decimal",".");coordinatesNode.setAttribute("cs",",");coordinatesNode.setAttribute("ts"," ");var parts=[];if(geometry instanceof OpenLayers.Bounds){parts.push(geometry.left+","+geometry.bottom);parts.push(geometry.right+","+geometry.top);}else{var points=(geometry.components)?geometry.components:[geometry];for(var i=0;i<points.length;i++){parts.push(points[i].x+","+points[i].y);}}
var txtNode=this.createTextNode(parts.join(" "));coordinatesNode.appendChild(txtNode);return coordinatesNode;},CLASS_NAME:"OpenLayers.Format.GML"});Ext.namespace("GeoExt.data");GeoExt.data.ScaleStore=Ext.extend(Ext.data.Store,{map:null,constructor:function(config){var map=(config.map instanceof GeoExt.MapPanel?config.map.map:config.map);delete config.map;config=Ext.applyIf(config,{reader:new Ext.data.JsonReader({},["level","resolution","scale"])});GeoExt.data.ScaleStore.superclass.constructor.call(this,config);if(map){this.bind(map);}},bind:function(map,options){this.map=(map instanceof GeoExt.MapPanel?map.map:map);this.map.events.register('changebaselayer',this,this.populateFromMap);if(this.map.baseLayer){this.populateFromMap();}else{this.map.events.register('addlayer',this,this.populateOnAdd);}},unbind:function(){if(this.map){this.map.events.unregister('addlayer',this,this.populateOnAdd);this.map.events.unregister('changebaselayer',this,this.populateFromMap);delete this.map;}},populateOnAdd:function(evt){if(evt.layer.isBaseLayer){this.populateFromMap();this.map.events.unregister('addlayer',this,this.populateOnAdd);}},populateFromMap:function(){var zooms=[];var resolutions=this.map.baseLayer.resolutions;var units=this.map.baseLayer.units;for(var i=resolutions.length-1;i>=0;i--){var res=resolutions[i];zooms.push({level:i,resolution:res,scale:OpenLayers.Util.getScaleFromResolution(res,units)});}
this.loadData(zooms);},destroy:function(){this.unbind();GeoExt.data.ScaleStore.superclass.destroy.apply(this,arguments);}});Ext.namespace("GeoExt.ux");GeoExt.ux.ExportFeature=Ext.extend(Ext.util.Observable,{controler:null,editFeatureForm:null,init:function(form){this.controler=form.controler;var actionOptions={handler:this.exportFeatures,scope:this,tooltip:OpenLayers.i18n('Export KML')};if(this.controler.useIcons===true){actionOptions.iconCls="gx-featureediting-export";}else{actionOptions.text=OpenLayers.i18n("Export");}
var action=new Ext.Action(actionOptions);var bbar=form.getBottomToolbar();if(bbar.rendered||!bbar.buttons){bbar.add(action);}else{bbar.buttons.push(action);}
this.editFeatureForm=form;},exportFeatures:function(){var map=this.controler.map;var downloadService=this.controler.downloadService;var features=this.editFeatureForm.features;this.controler.triggerAutoSave();GeoExt.ux.data.Export.KMLExport(map,null,features,downloadService);}});Ext.namespace("GeoExt.ux");GeoExt.ux.CloseFeatureDialog=Ext.extend(Ext.util.Observable,{controler:null,editFeatureForm:null,init:function(form){this.controler=form.controler;var actionOptions={handler:this.closeFeatureDialog,scope:this,tooltip:OpenLayers.i18n('Close')};actionOptions.text=OpenLayers.i18n("Close");var action=new Ext.Action(actionOptions);var bbar=form.getBottomToolbar();if(bbar.rendered||!bbar.buttons){bbar.add('->');bbar.add(action);}else{bbar.buttons.push('->');bbar.buttons.push(action);}
this.editFeatureForm=form;},closeFeatureDialog:function(){this.controler.triggerAutoSave();if(this.controler.popup){this.controler.popup.close();}
this.controler.reactivateDrawControl();}});Ext.namespace("GeoExt","GeoExt.data");GeoExt.data.LayerReader=function(meta,recordType){meta=meta||{};if(!(recordType instanceof Function)){recordType=GeoExt.data.LayerRecord.create(recordType||meta.fields||{});}
GeoExt.data.LayerReader.superclass.constructor.call(this,meta,recordType);};Ext.extend(GeoExt.data.LayerReader,Ext.data.DataReader,{totalRecords:null,readRecords:function(layers){var records=[];if(layers){var recordType=this.recordType,fields=recordType.prototype.fields;var i,lenI,j,lenJ,layer,values,field,v;for(i=0,lenI=layers.length;i<lenI;i++){layer=layers[i];values={};for(j=0,lenJ=fields.length;j<lenJ;j++){field=fields.items[j];v=layer[field.mapping||field.name]||field.defaultValue;v=field.convert(v);values[field.name]=v;}
values.layer=layer;records[records.length]=new recordType(values,layer.id);}}
return{records:records,totalRecords:this.totalRecords!=null?this.totalRecords:records.length};}});Ext.namespace("GeoExt.ux.data");GeoExt.ux.data.Export=function(map,format,layers,features){var exportLayers=[];var exportFeatures=[];if(features){exportFeatures=features;}else{if(layers){exportLayers=layers;}else{for(var i=0;i<map.layers.length;i++){var layer=map.layers[i];if(layer.CLASS_NAME){if(GeoExt.ux.data.Export.isLayerSupported(layer.CLASS_NAME)){exportLayers.push(layer);}}}}
for(var j=0;j<exportLayers.length;j++){var exportLayer=exportLayers[j];if(exportLayer.features){for(var k=0;k<exportLayer.features.length;k++){exportFeatures.push(exportLayer.features[k]);}}}}
if(format=='KML'){var kmlWriter=new OpenLayers.Format.KML(OpenLayers.Util.extend({externalProjection:new OpenLayers.Projection("EPSG:4326"),internalProjection:map.getProjectionObject()},GeoExt.ux.data.formats.getFormatConfig(format)));return kmlWriter.write(exportFeatures);}else if(format=='GeoJSON'){var geojsonWriter=new OpenLayers.Format.GeoJSON(GeoExt.ux.data.formats.getFormatConfig(format));return geojsonWriter.write(exportFeatures);}else if(format=='GeoRSS'){var georssWriter=new OpenLayers.Format.GeoRSS(GeoExt.ux.data.formats.getFormatConfig(format));return georssWriter.write(exportFeatures);}else if(format=='GML'){var gmlWriter=new OpenLayers.Format.GML(GeoExt.ux.data.formats.getFormatConfig(format));return gmlWriter.write(exportFeatures);}else{return'Format '+format+' not supported. Patch welcome !';}};GeoExt.ux.data.Export.content=null;GeoExt.ux.data.Export.format=null;GeoExt.ux.data.Export.exportWindow=null;GeoExt.ux.data.Export.SupportedLayerType=[['OpenLayers.Layer.Vector'],['OpenLayers.Layer.WFS'],['OpenLayers.Layer.GML'],['OpenLayers.Layer.GeoRSS']];GeoExt.ux.data.Export.isLayerSupported=function(className){for(var i=0;i<GeoExt.ux.data.Export.SupportedLayerType.length;i++){if(GeoExt.ux.data.Export.SupportedLayerType[i][0]===className){return true;}}
return false;};GeoExt.ux.data.Export.OpenWindowDownloadify=function(){GeoExt.ux.data.Export.exportWindow=new GeoExt.ux.LayerManagerExportWindow({filename:'export.'+GeoExt.ux.data.Export.format.toLowerCase(),filecontent:GeoExt.ux.data.Export.content.replace(/&lt;/g,'<').replace(/&gt;/g,'>')});GeoExt.ux.data.Export.exportWindow.show();};GeoExt.ux.data.Export.KMLExport=function(map,layers,features,downloadService){GeoExt.ux.data.Export.format='KML';GeoExt.ux.data.Export.content=GeoExt.ux.data.Export(map,GeoExt.ux.data.Export.format,layers,features);if(downloadService){var form=document.createElement("form");form.setAttribute("method",'POST');form.setAttribute("action",downloadService);var formatField=document.createElement("input");formatField.setAttribute("type","hidden");formatField.setAttribute("name","format");formatField.setAttribute("value",GeoExt.ux.data.Export.format);var contentField=document.createElement("input");contentField.setAttribute("type","hidden");contentField.setAttribute("name","content");contentField.setAttribute("value",GeoExt.ux.data.Export.content.replace(/&lt;/g,'<').replace(/&gt;/g,'>'));form.appendChild(formatField);form.appendChild(contentField);document.body.appendChild(form);form.submit();}else{if(GetFlashVersion()>10.00){GeoExt.ux.data.Export.OpenWindowDownloadify();}else{alert('Please install Flash 10 in order to use the following window.');GeoExt.ux.data.Export.OpenWindowDownloadify();}}};