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;}};var OpenLayers={VERSION_NUMBER:"$Revision: 10995 $",singleFile:true,_getScriptLocation:(function(){var r=new RegExp("(^|(.*?\\/))(OpenLayers\.js)(\\?|$)"),s=document.getElementsByTagName('script'),src,m,l="";for(var i=0,len=s.length;i<len;i++){src=s[i].getAttribute('src');if(src){var m=src.match(r);if(m){l=m[1];break;}}}
return(function(){return l;});})()};(function(){var singleFile=(typeof OpenLayers=="object"&&OpenLayers.singleFile);var scriptName=(!singleFile)?"lib/OpenLayers.js":"OpenLayers.js";var jsFiles=window.OpenLayers;window.OpenLayers={_getScriptLocation:(function(){var r=new RegExp("(^|(.*?\\/))("+scriptName+")(\\?|$)"),s=document.getElementsByTagName('script'),src,m,l="";for(var i=0,len=s.length;i<len;i++){src=s[i].getAttribute('src');if(src){var m=src.match(r);if(m){l=m[1];break;}}}
return(function(){return l;});})()};if(!singleFile){if(!jsFiles){jsFiles=["OpenLayers/BaseTypes/Class.js","OpenLayers/Util.js","OpenLayers/BaseTypes.js","OpenLayers/BaseTypes/Bounds.js","OpenLayers/BaseTypes/Date.js","OpenLayers/BaseTypes/Element.js","OpenLayers/BaseTypes/LonLat.js","OpenLayers/BaseTypes/Pixel.js","OpenLayers/BaseTypes/Size.js","OpenLayers/Console.js","OpenLayers/Tween.js","OpenLayers/Kinetic.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/BackBufferable.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/Google/v3.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/WMTS.js","OpenLayers/Layer/ArcIMS.js","OpenLayers/Layer/GeoRSS.js","OpenLayers/Layer/Boxes.js","OpenLayers/Layer/XYZ.js","OpenLayers/Layer/Bing.js","OpenLayers/Layer/TMS.js","OpenLayers/Layer/TileCache.js","OpenLayers/Layer/Zoomify.js","OpenLayers/Layer/ArcGISCache.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/Pinch.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/PinchZoom.js","OpenLayers/Control/TouchNavigation.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/WMTSGetFeatureInfo.js","OpenLayers/Control/Graticule.js","OpenLayers/Control/TransformFeature.js","OpenLayers/Control/SLDSelect.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/NG.js","OpenLayers/Renderer/SVG.js","OpenLayers/Renderer/SVG2.js","OpenLayers/Renderer/Canvas.js","OpenLayers/Renderer/VML.js","OpenLayers/Layer/Vector.js","OpenLayers/Layer/PointGrid.js","OpenLayers/Layer/Vector/RootContainer.js","OpenLayers/Strategy.js","OpenLayers/Strategy/Filter.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/Filter/Function.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/Script.js","OpenLayers/Protocol/SOS.js","OpenLayers/Protocol/SOS/v1_0_0.js","OpenLayers/Layer/PointTrack.js","OpenLayers/Layer/GML.js","OpenLayers/Style.js","OpenLayers/Style2.js","OpenLayers/StyleMap.js","OpenLayers/Rule.js","OpenLayers/Format.js","OpenLayers/Format/QueryStringFilter.js","OpenLayers/Format/XML.js","OpenLayers/Format/XML/VersionedOGC.js","OpenLayers/Format/Context.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/CQL.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/OWSCommon.js","OpenLayers/Format/OWSCommon/v1.js","OpenLayers/Format/OWSCommon/v1_0_0.js","OpenLayers/Format/OWSCommon/v1_1_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/WCSGetCoverage.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/WMSCapabilities/v1_1_1_WMSC.js","OpenLayers/Format/WMSGetFeatureInfo.js","OpenLayers/Format/SOSCapabilities.js","OpenLayers/Format/SOSCapabilities/v1_0_0.js","OpenLayers/Format/SOSGetFeatureOfInterest.js","OpenLayers/Format/SOSGetObservation.js","OpenLayers/Format/OWSContext.js","OpenLayers/Format/OWSContext/v0_3_1.js","OpenLayers/Format/WMTSCapabilities.js","OpenLayers/Format/WMTSCapabilities/v1_0_0.js","OpenLayers/Format/WPSCapabilities.js","OpenLayers/Format/WPSCapabilities/v1_0_0.js","OpenLayers/Format/WPSDescribeProcess.js","OpenLayers/Format/WPSExecute.js","OpenLayers/Format/XLS.js","OpenLayers/Format/XLS/v1.js","OpenLayers/Format/XLS/v1_1_0.js","OpenLayers/Format/OGCExceptionReport.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/Control/Geolocate.js","OpenLayers/Symbolizer.js","OpenLayers/Symbolizer/Point.js","OpenLayers/Symbolizer/Line.js","OpenLayers/Symbolizer/Polygon.js","OpenLayers/Symbolizer/Text.js","OpenLayers/Symbolizer/Raster.js","OpenLayers/Lang.js","OpenLayers/Lang/en.js"];}
var scriptTags=new Array(jsFiles.length);var host=OpenLayers._getScriptLocation()+"lib/";for(var i=0,len=jsFiles.length;i<len;i++){scriptTags[i]="<script src='"+host+jsFiles[i]+"'></script>";}
if(scriptTags.length>0){document.write(scriptTags.join(""));}}})();OpenLayers.VERSION_NUMBER="$Revision: 12317 $";OpenLayers.Class=function(){var len=arguments.length;var P=arguments[0];var F=arguments[len-1];var C=typeof F.initialize=="function"?F.initialize:function(){P.prototype.initialize.apply(this,arguments);};if(len>1){var newArgs=[C,P].concat(Array.prototype.slice.call(arguments).slice(1,len-1),F);OpenLayers.inherit.apply(null,newArgs);}else{C.prototype=F;}
return C;};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(P){var C=function(){P.call(this);};var newArgs=[C].concat(Array.prototype.slice.call(arguments));OpenLayers.inherit.apply(null,newArgs);return C.prototype;};OpenLayers.inherit=function(C,P){var F=function(){};F.prototype=P.prototype;C.prototype=new F;var i,l,o;for(i=2,l=arguments.length;i<l;i++){o=arguments[i];if(typeof o==="function"){o=o.prototype;}
OpenLayers.Util.extend(C.prototype,o);}};OpenLayers.Util=OpenLayers.Util||{};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=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);};OpenLayers.Util.isArray=function(a){return(Object.prototype.toString.call(a)==='[object Array]');};if(typeof window.$==="undefined"){window.$=OpenLayers.Util.getElement;}
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&&OpenLayers.Util.isArray(urls)&&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.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;}
if(typeof number!=="number"){number=parseFloat(number);}
return precision===0?number:parseFloat(number.toPrecision(precision));};OpenLayers.Util.rad=function(x){return x*Math.PI/180;};OpenLayers.Util.deg=function(x){return x*180/Math.PI;};OpenLayers.Util.VincentyConstants={a:6378137,b:6356752.3142,f:1/298.257223563};OpenLayers.Util.distVincenty=function(p1,p2){var ct=OpenLayers.Util.VincentyConstants;var a=ct.a,b=ct.b,f=ct.f;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.destinationVincenty=function(lonlat,brng,dist){var u=OpenLayers.Util;var ct=u.VincentyConstants;var a=ct.a,b=ct.b,f=ct.f;var lon1=lonlat.lon;var lat1=lonlat.lat;var s=dist;var alpha1=u.rad(brng);var sinAlpha1=Math.sin(alpha1);var cosAlpha1=Math.cos(alpha1);var tanU1=(1-f)*Math.tan(u.rad(lat1));var cosU1=1/Math.sqrt((1+tanU1*tanU1)),sinU1=tanU1*cosU1;var sigma1=Math.atan2(tanU1,cosAlpha1);var sinAlpha=cosU1*sinAlpha1;var cosSqAlpha=1-sinAlpha*sinAlpha;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 sigma=s/(b*A),sigmaP=2*Math.PI;while(Math.abs(sigma-sigmaP)>1e-12){var cos2SigmaM=Math.cos(2*sigma1+sigma);var sinSigma=Math.sin(sigma);var cosSigma=Math.cos(sigma);var deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)-
B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));sigmaP=sigma;sigma=s/(b*A)+deltaSigma;}
var tmp=sinU1*sinSigma-cosU1*cosSigma*cosAlpha1;var lat2=Math.atan2(sinU1*cosSigma+cosU1*sinSigma*cosAlpha1,(1-f)*Math.sqrt(sinAlpha*sinAlpha+tmp*tmp));var lambda=Math.atan2(sinSigma*sinAlpha1,cosU1*cosSigma-sinU1*sinSigma*cosAlpha1);var C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));var L=lambda-(1-C)*f*sinAlpha*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)));var revAz=Math.atan2(sinAlpha,-tmp);return new OpenLayers.LonLat(lon1+u.deg(L),u.deg(lat2));};OpenLayers.Util.getParameters=function(url){url=(url===null||url===undefined)?window.location.href:url;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=keyValue[0];try{key=decodeURIComponent(key);}catch(err){key=unescape(key);}
var value=(keyValue[1]||'').replace(/\+/g," ");try{value=decodeURIComponent(value);}catch(err){value=unescape(value);}
value=value.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 pos=[0,0];var viewportElement=OpenLayers.Util.getViewportElement();if(!forElement||forElement==window||forElement==viewportElement){return pos;}
var BUGGY_GECKO_BOX_OBJECT=OpenLayers.IS_GECKO&&document.getBoxObjectFor&&OpenLayers.Element.getStyle(forElement,'position')=='absolute'&&(forElement.style.top==''||forElement.style.left=='');var parent=null;var box;if(forElement.getBoundingClientRect){box=forElement.getBoundingClientRect();var scrollTop=viewportElement.scrollTop;var scrollLeft=viewportElement.scrollLeft;pos[0]=box.left+scrollLeft;pos[1]=box.top+scrollTop;}else if(document.getBoxObjectFor&&!BUGGY_GECKO_BOX_OBJECT){box=document.getBoxObjectFor(forElement);var vpBox=document.getBoxObjectFor(viewportElement);pos[0]=box.screenX-vpBox.screenX;pos[1]=box.screenY-vpBox.screenY;}else{pos[0]=forElement.offsetLeft;pos[1]=forElement.offsetTop;parent=forElement.offsetParent;if(parent!=forElement){while(parent){pos[0]+=parent.offsetLeft;pos[1]+=parent.offsetTop;parent=parent.offsetParent;}}
var browser=OpenLayers.BROWSER_NAME;if(browser=="opera"||(browser=="safari"&&OpenLayers.Element.getStyle(forElement,'position')=='absolute')){pos[1]-=document.body.offsetTop;}
parent=forElement.offsetParent;while(parent&&parent!=document.body){pos[0]-=parent.scrollLeft;if(browser!="opera"||parent.tagName!='TR'){pos[1]-=parent.scrollTop;}
parent=parent.offsetParent;}}
return pos;};OpenLayers.Util.getViewportElement=function(){var viewportElement=arguments.callee.viewportElement;if(viewportElement==undefined){viewportElement=(OpenLayers.BROWSER_NAME=="msie"&&document.compatMode!='CSS1Compat')?document.body:document.documentElement;arguments.callee.viewportElement=viewportElement;}
return viewportElement;};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.IS_GECKO=(function(){var ua=navigator.userAgent.toLowerCase();return ua.indexOf("webkit")==-1&&ua.indexOf("gecko")!=-1;})();OpenLayers.BROWSER_NAME=(function(){var name="";var ua=navigator.userAgent.toLowerCase();if(ua.indexOf("opera")!=-1){name="opera";}else if(ua.indexOf("msie")!=-1){name="msie";}else if(ua.indexOf("safari")!=-1){name="safari";}else if(ua.indexOf("mozilla")!=-1){if(ua.indexOf("firefox")!=-1){name="firefox";}else{name="mozilla";}}
return name;})();OpenLayers.Util.getBrowserName=function(){return OpenLayers.BROWSER_NAME;};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';}
coordinate=(coordinate+540)%360-180;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(coordinateseconds>=60){coordinateseconds-=60;coordinateminutes+=1;if(coordinateminutes>=60){coordinateminutes-=60;coordinatedegrees+=1;}}
if(coordinatedegrees<10){coordinatedegrees="0"+coordinatedegrees;}
var str=coordinatedegrees+"\u00B0";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.BROWSER_NAME=="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&&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",'Base Layer':"Base Layer",'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 = 1 : ${scaleDenom}':"Scale = 1 : ${scaleDenom}",'W':'W','E':'E','N':'N','S':'S','Graticule':'Graticule','layerAlreadyAdded':"You tried to add the layer: ${layerName} to the map, but it has already been added",'reprojectDeprecated':"You are using the 'reproject' option "+"on the ${layerName} layer. This option is deprecated: "+"its use was designed to support displaying data over commercial "+"basemaps, but that functionality should now be achieved by using "+"Spherical Mercator support. More information is available from "+"http://trac.openlayers.org/wiki/SphericalMercator.",'methodDeprecated':"This method has been deprecated and will be removed in 3.0. "+"Please use ${newMethod} instead.",'boundsAddError':"You must pass both x and y values to the add function.",'lonlatAddError':"You must pass both lon and lat values to the add function.",'pixelAddError':"You must pass both x and y values to the add function.",'unsupportedGeometryType':"Unsupported geometry type: ${geomType}",'filterEvaluateNotImplemented':"evaluate is not implemented for this filter type.",'proxyNeeded':"You probably need to set OpenLayers.ProxyHost to access ${url}."+"See http://trac.osgeo.org/openlayers/wiki/FrequentlyAskedQuestions#ProxyHost",'end':''};OpenLayers.Lang["fr"]=OpenLayers.Util.applyDefaults({'unhandledRequest':"Requête non gérée, retournant ${statusText}",'Permalink':"Permalien",'Overlays':"Calques",'Base Layer':"Calque de base",'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 = 1 : ${scaleDenom}':"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}",'filterEvaluateNotImplemented':"évaluer n\'a pas encore été implémenté pour ce type de filtre.",'proxyNeeded':"Vous avez très probablement besoin de renseigner OpenLayers.ProxyHost pour accéder à ${url}. Voir http://trac.osgeo.org/openlayers/wiki/FrequentlyAskedQuestions#ProxyHost"});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;},Void:function(){}};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.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;},distanceTo:function(px){return Math.sqrt(Math.pow(this.x-px.x,2)+
Math.pow(this.y-px.y,2));},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[this.left,this.bottom,this.right,this.top].join(",");},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,reverseAxisOrder){var bounds=str.split(",");return OpenLayers.Bounds.fromArray(bounds,reverseAxisOrder);};OpenLayers.Bounds.fromArray=function(bbox,reverseAxisOrder){return reverseAxisOrder===true?new OpenLayers.Bounds(parseFloat(bbox[1]),parseFloat(bbox[0]),parseFloat(bbox[3]),parseFloat(bbox[2])):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+OpenLayers.Util.toFloat(lon),this.lat+OpenLayers.Util.toFloat(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(pair[0],pair[1]);};OpenLayers.LonLat.fromArray=function(arr){var gotArr=OpenLayers.Util.isArray(arr),lon=gotArr&&arr[0],lat=gotArr&&arr[1];return new OpenLayers.LonLat(lon,lat);};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(){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"element.style.display = 'none';"}));for(var i=0,len=arguments.length;i<len;i++){var element=OpenLayers.Util.getElement(arguments[i]);if(element){element.style.display='none';}}},show:function(){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"element.style.display = '';"}));for(var i=0,len=arguments.length;i<len;i++){var element=OpenLayers.Util.getElement(arguments[i]);if(element){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"});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;}
this.div=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.Rico=OpenLayers.Rico||{};OpenLayers.Rico.Corner={round:function(e,options){e=OpenLayers.Util.getElement(e);this._setOptions(options);var color=this.options.color;if(this.options.color=="fromElement"){color=this._background(e);}
var bgColor=this.options.bgColor;if(this.options.bgColor=="fromParent"){bgColor=this._background(e.offsetParent);}
this._roundCornersImpl(e,color,bgColor);},changeColor:function(theDiv,newColor){theDiv.style.backgroundColor=newColor;var spanElements=theDiv.parentNode.getElementsByTagName("span");for(var currIdx=0;currIdx<spanElements.length;currIdx++){spanElements[currIdx].style.backgroundColor=newColor;}},changeOpacity:function(theDiv,newOpacity){var mozillaOpacity=newOpacity;var ieOpacity='alpha(opacity='+newOpacity*100+')';theDiv.style.opacity=mozillaOpacity;theDiv.style.filter=ieOpacity;var spanElements=theDiv.parentNode.getElementsByTagName("span");for(var currIdx=0;currIdx<spanElements.length;currIdx++){spanElements[currIdx].style.opacity=mozillaOpacity;spanElements[currIdx].style.filter=ieOpacity;}},reRound:function(theDiv,options){var topRico=theDiv.parentNode.childNodes[0];var bottomRico=theDiv.parentNode.childNodes[2];theDiv.parentNode.removeChild(topRico);theDiv.parentNode.removeChild(bottomRico);this.round(theDiv.parentNode,options);},_roundCornersImpl:function(e,color,bgColor){if(this.options.border){this._renderBorder(e,bgColor);}
if(this._isTopRounded()){this._roundTopCorners(e,color,bgColor);}
if(this._isBottomRounded()){this._roundBottomCorners(e,color,bgColor);}},_renderBorder:function(el,bgColor){var borderValue="1px solid "+this._borderColor(bgColor);var borderL="border-left: "+borderValue;var borderR="border-right: "+borderValue;var style="style='"+borderL+";"+borderR+"'";el.innerHTML="<div "+style+">"+el.innerHTML+"</div>";},_roundTopCorners:function(el,color,bgColor){var corner=this._createCorner(bgColor);for(var i=0;i<this.options.numSlices;i++){corner.appendChild(this._createCornerSlice(color,bgColor,i,"top"));}
el.style.paddingTop=0;el.insertBefore(corner,el.firstChild);},_roundBottomCorners:function(el,color,bgColor){var corner=this._createCorner(bgColor);for(var i=(this.options.numSlices-1);i>=0;i--){corner.appendChild(this._createCornerSlice(color,bgColor,i,"bottom"));}
el.style.paddingBottom=0;el.appendChild(corner);},_createCorner:function(bgColor){var corner=document.createElement("div");corner.style.backgroundColor=(this._isTransparent()?"transparent":bgColor);return corner;},_createCornerSlice:function(color,bgColor,n,position){var slice=document.createElement("span");var inStyle=slice.style;inStyle.backgroundColor=color;inStyle.display="block";inStyle.height="1px";inStyle.overflow="hidden";inStyle.fontSize="1px";var borderColor=this._borderColor(color,bgColor);if(this.options.border&&n==0){inStyle.borderTopStyle="solid";inStyle.borderTopWidth="1px";inStyle.borderLeftWidth="0px";inStyle.borderRightWidth="0px";inStyle.borderBottomWidth="0px";inStyle.height="0px";inStyle.borderColor=borderColor;}
else if(borderColor){inStyle.borderColor=borderColor;inStyle.borderStyle="solid";inStyle.borderWidth="0px 1px";}
if(!this.options.compact&&(n==(this.options.numSlices-1))){inStyle.height="2px";}
this._setMargin(slice,n,position);this._setBorder(slice,n,position);return slice;},_setOptions:function(options){this.options={corners:"all",color:"fromElement",bgColor:"fromParent",blend:true,border:false,compact:false};OpenLayers.Util.extend(this.options,options||{});this.options.numSlices=this.options.compact?2:4;if(this._isTransparent()){this.options.blend=false;}},_whichSideTop:function(){if(this._hasString(this.options.corners,"all","top")){return"";}
if(this.options.corners.indexOf("tl")>=0&&this.options.corners.indexOf("tr")>=0){return"";}
if(this.options.corners.indexOf("tl")>=0){return"left";}else if(this.options.corners.indexOf("tr")>=0){return"right";}
return"";},_whichSideBottom:function(){if(this._hasString(this.options.corners,"all","bottom")){return"";}
if(this.options.corners.indexOf("bl")>=0&&this.options.corners.indexOf("br")>=0){return"";}
if(this.options.corners.indexOf("bl")>=0){return"left";}else if(this.options.corners.indexOf("br")>=0){return"right";}
return"";},_borderColor:function(color,bgColor){if(color=="transparent"){return bgColor;}else if(this.options.border){return this.options.border;}else if(this.options.blend){return this._blend(bgColor,color);}else{return"";}},_setMargin:function(el,n,corners){var marginSize=this._marginSize(n);var whichSide=corners=="top"?this._whichSideTop():this._whichSideBottom();if(whichSide=="left"){el.style.marginLeft=marginSize+"px";el.style.marginRight="0px";}
else if(whichSide=="right"){el.style.marginRight=marginSize+"px";el.style.marginLeft="0px";}
else{el.style.marginLeft=marginSize+"px";el.style.marginRight=marginSize+"px";}},_setBorder:function(el,n,corners){var borderSize=this._borderSize(n);var whichSide=corners=="top"?this._whichSideTop():this._whichSideBottom();if(whichSide=="left"){el.style.borderLeftWidth=borderSize+"px";el.style.borderRightWidth="0px";}
else if(whichSide=="right"){el.style.borderRightWidth=borderSize+"px";el.style.borderLeftWidth="0px";}
else{el.style.borderLeftWidth=borderSize+"px";el.style.borderRightWidth=borderSize+"px";}
if(this.options.border!=false){el.style.borderLeftWidth=borderSize+"px";el.style.borderRightWidth=borderSize+"px";}},_marginSize:function(n){if(this._isTransparent()){return 0;}
var marginSizes=[5,3,2,1];var blendedMarginSizes=[3,2,1,0];var compactMarginSizes=[2,1];var smBlendedMarginSizes=[1,0];if(this.options.compact&&this.options.blend){return smBlendedMarginSizes[n];}else if(this.options.compact){return compactMarginSizes[n];}else if(this.options.blend){return blendedMarginSizes[n];}else{return marginSizes[n];}},_borderSize:function(n){var transparentBorderSizes=[5,3,2,1];var blendedBorderSizes=[2,1,1,1];var compactBorderSizes=[1,0];var actualBorderSizes=[0,2,0,0];if(this.options.compact&&(this.options.blend||this._isTransparent())){return 1;}else if(this.options.compact){return compactBorderSizes[n];}else if(this.options.blend){return blendedBorderSizes[n];}else if(this.options.border){return actualBorderSizes[n];}else if(this._isTransparent()){return transparentBorderSizes[n];}
return 0;},_hasString:function(str){for(var i=1;i<arguments.length;i++)if(str.indexOf(arguments[i])>=0){return true;}return false;},_blend:function(c1,c2){var cc1=OpenLayers.Rico.Color.createFromHex(c1);cc1.blend(OpenLayers.Rico.Color.createFromHex(c2));return cc1;},_background:function(el){try{return OpenLayers.Rico.Color.createColorFromBackground(el).asHex();}catch(err){return"#ffffff";}},_isTransparent:function(){return this.options.color=="transparent";},_isTopRounded:function(){return this._hasString(this.options.corners,"all","top","tl","tr");},_isBottomRounded:function(){return this._hasString(this.options.corners,"all","bottom","bl","br");},_hasSingleTextChild:function(el){return el.childNodes.length==1&&el.childNodes[0].nodeType==3;}};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.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){var i,len;switch(this.type){case OpenLayers.Filter.Logical.AND:for(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(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));}
return undefined;},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.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]);if(this.type===OpenLayers.Filter.Comparison.LIKE&&options.matchCase===undefined){this.matchCase=null;}},evaluate:function(context){if(context instanceof OpenLayers.Feature.Vector){context=context.attributes;}
var result=false;var got=context[this.property];var exp;switch(this.type){case OpenLayers.Filter.Comparison.EQUAL_TO: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: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=got<this.value;break;case OpenLayers.Filter.Comparison.GREATER_THAN:result=got>this.value;break;case OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO:result=got<=this.value;break;case OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO:result=got>=this.value;break;case OpenLayers.Filter.Comparison.BETWEEN:result=(got>=this.lowerBoundary)&&(got<=this.upperBoundary);break;case OpenLayers.Filter.Comparison.LIKE:var regexp=new RegExp(this.value,"gi");result=regexp.test(got);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="~";Ext.namespace("GeoExt.plugins");GeoExt.plugins.PrintExtent=Ext.extend(Ext.util.Observable,{initialConfig:null,printProvider:null,map:null,layer:null,control:null,pages:null,page:null,constructor:function(config){config=config||{};Ext.apply(this,config);this.initialConfig=config;if(!this.printProvider){this.printProvider=this.pages[0].printProvider;}
if(!this.pages){this.pages=[];}
this.addEvents("selectpage");GeoExt.plugins.PrintExtent.superclass.constructor.apply(this,arguments);},print:function(options){this.printProvider.print(this.map,this.pages,options);},init:function(mapPanel){this.map=mapPanel.map;mapPanel.on("destroy",this.onMapPanelDestroy,this);if(!this.layer){this.layer=new OpenLayers.Layer.Vector(null,{displayInLayerSwitcher:false});}
this.createControl();for(var i=0,len=this.pages.length;i<len;++i){this.addPage(this.pages[i]);}
this.show();},addPage:function(page){page=page||new GeoExt.data.PrintPage({printProvider:this.printProvider});if(this.pages.indexOf(page)===-1){this.pages.push(page);}
this.layer.addFeatures([page.feature]);page.on("change",this.onPageChange,this);this.page=page;var map=this.map;if(map.getCenter()){this.fitPage();}else{map.events.register("moveend",this,function(){map.events.unregister("moveend",this,arguments.callee);this.fitPage();});}
return page;},removePage:function(page){this.pages.remove(page);if(page.feature.layer){this.layer.removeFeatures([page.feature]);}
page.un("change",this.onPageChange,this);},selectPage:function(page){this.control.active&&this.control.setFeature(page.feature);},show:function(){this.map.addLayer(this.layer);this.map.addControl(this.control);this.control.activate();if(this.page&&this.map.getCenter()){this.updateBox();}},hide:function(){var map=this.map;var control=this.control;if(control&&control.events){control.deactivate();if(map&&map.events&&control.map){map.removeControl(control);}}
var layer=this.layer;if(!this.initialConfig.layer&&map&&map.events&&layer&&layer.map){map.removeLayer(layer);}},onMapPanelDestroy:function(){var map=this.map;for(var len=this.pages.length-1,i=len;i>=0;i--){this.removePage(this.pages[i]);}
this.hide();var control=this.control;if(map&&map.events&&control&&control.events){control.destroy();}
var layer=this.layer;if(!this.initialConfig.layer&&map&&map.events&&layer&&layer.events){layer.destroy();}
delete this.layer;delete this.control;delete this.page;this.map=null;},createControl:function(){this.control=new OpenLayers.Control.TransformFeature(this.layer,{preserveAspectRatio:true,eventListeners:{"beforesetfeature":function(e){for(var i=0,len=this.pages.length;i<len;++i){if(this.pages[i].feature===e.feature){this.page=this.pages[i];e.object.rotation=-this.pages[i].rotation;break;}}},"setfeature":function(e){for(var i=0,len=this.pages.length;i<len;++i){if(this.pages[i].feature===e.feature){this.fireEvent("selectpage",this.pages[i]);break;}}},"beforetransform":function(e){this._updating=true;var page=this.page;if(e.rotation){if(this.printProvider.layout.get("rotation")){page.setRotation(-e.object.rotation);}else{e.object.setFeature(page.feature);}}else if(e.center){page.setCenter(OpenLayers.LonLat.fromString(e.center.toShortString()));}else{page.fit(e.object.box,{mode:"closest"});var minScale=this.printProvider.scales.getAt(0);var maxScale=this.printProvider.scales.getAt(this.printProvider.scales.getCount()-1);var boxBounds=e.object.box.geometry.getBounds();var pageBounds=page.feature.geometry.getBounds();var tooLarge=page.scale===minScale&&boxBounds.containsBounds(pageBounds);var tooSmall=page.scale===maxScale&&pageBounds.containsBounds(boxBounds);if(tooLarge===true||tooSmall===true){this.updateBox();}}
delete this._updating;return false;},"transformcomplete":this.updateBox,scope:this}});},fitPage:function(){if(this.page){this.page.fit(this.map,{mode:"screen"});}},updateBox:function(){var page=this.page;this.control.active&&this.control.setFeature(page.feature,{rotation:-page.rotation});},onPageChange:function(page,mods){if(!this._updating){this.control.active&&this.control.setFeature(page.feature,{rotation:-page.rotation});}}});Ext.preg("gx_printextent",GeoExt.plugins.PrintExtent);Ext.ns('Ext.ux.form');Ext.ux.form.FileUploadField=Ext.extend(Ext.form.TextField,{buttonText:'Browse...',buttonOnly:false,buttonOffset:3,readOnly:true,autoSize:Ext.emptyFn,initComponent:function(){Ext.ux.form.FileUploadField.superclass.initComponent.call(this);this.addEvents('fileselected');},onRender:function(ct,position){Ext.ux.form.FileUploadField.superclass.onRender.call(this,ct,position);this.wrap=this.el.wrap({cls:'x-form-field-wrap x-form-file-wrap'});this.el.addClass('x-form-file-text');this.el.dom.removeAttribute('name');this.createFileInput();var btnCfg=Ext.applyIf(this.buttonCfg||{},{text:this.buttonText});this.button=new Ext.Button(Ext.apply(btnCfg,{renderTo:this.wrap,cls:'x-form-file-btn'+(btnCfg.iconCls?' x-btn-icon':'')}));if(this.buttonOnly){this.el.hide();this.wrap.setWidth(this.button.getEl().getWidth());}
this.bindListeners();this.resizeEl=this.positionEl=this.wrap;},bindListeners:function(){this.fileInput.on({scope:this,mouseenter:function(){this.button.addClass(['x-btn-over','x-btn-focus'])},mouseleave:function(){this.button.removeClass(['x-btn-over','x-btn-focus','x-btn-click'])},mousedown:function(){this.button.addClass('x-btn-click')},mouseup:function(){this.button.removeClass(['x-btn-over','x-btn-focus','x-btn-click'])},change:function(){var v=this.fileInput.dom.value;this.setValue(v);this.fireEvent('fileselected',this,v);}});},createFileInput:function(){this.fileInput=this.wrap.createChild({id:this.getFileInputId(),name:this.name||this.getId(),cls:'x-form-file',tag:'input',type:'file',size:1});},reset:function(){if(this.rendered){this.fileInput.remove();this.createFileInput();this.bindListeners();}
Ext.ux.form.FileUploadField.superclass.reset.call(this);},getFileInputId:function(){return this.id+'-file';},onResize:function(w,h){Ext.ux.form.FileUploadField.superclass.onResize.call(this,w,h);this.wrap.setWidth(w);if(!this.buttonOnly){var w=this.wrap.getWidth()-this.button.getEl().getWidth()-this.buttonOffset;this.el.setWidth(w);}},onDestroy:function(){Ext.ux.form.FileUploadField.superclass.onDestroy.call(this);Ext.destroy(this.fileInput,this.button,this.wrap);},onDisable:function(){Ext.ux.form.FileUploadField.superclass.onDisable.call(this);this.doDisable(true);},onEnable:function(){Ext.ux.form.FileUploadField.superclass.onEnable.call(this);this.doDisable(false);},doDisable:function(disabled){this.fileInput.dom.disabled=disabled;this.button.setDisabled(disabled);},preFocus:Ext.emptyFn,alignErrorIcon:function(){this.errorIcon.alignTo(this.wrap,'tl-tr',[2,0]);}});Ext.reg('fileuploadfield',Ext.ux.form.FileUploadField);Ext.form.FileUploadField=Ext.ux.form.FileUploadField;Ext.namespace("GeoExt.data");GeoExt.data.WMSCapabilitiesReader=function(meta,recordType){meta=meta||{};if(!meta.format){meta.format=new OpenLayers.Format.WMSCapabilities();}
if(typeof recordType!=="function"){recordType=GeoExt.data.LayerRecord.create(recordType||meta.fields||[{name:"name",type:"string"},{name:"title",type:"string"},{name:"abstract",type:"string"},{name:"queryable",type:"boolean"},{name:"opaque",type:"boolean"},{name:"noSubsets",type:"boolean"},{name:"cascaded",type:"int"},{name:"fixedWidth",type:"int"},{name:"fixedHeight",type:"int"},{name:"minScale",type:"float"},{name:"maxScale",type:"float"},{name:"prefix",type:"string"},{name:"formats"},{name:"styles"},{name:"srs"},{name:"dimensions"},{name:"bbox"},{name:"llbbox"},{name:"attribution"},{name:"keywords"},{name:"identifiers"},{name:"authorityURLs"},{name:"metadataURLs"}]);}
GeoExt.data.WMSCapabilitiesReader.superclass.constructor.call(this,meta,recordType);};Ext.extend(GeoExt.data.WMSCapabilitiesReader,Ext.data.DataReader,{attributionCls:"gx-attribution",read:function(request){var data=request.responseXML;if(!data||!data.documentElement){data=request.responseText;}
return this.readRecords(data);},serviceExceptionFormat:function(formats){if(OpenLayers.Util.indexOf(formats,"application/vnd.ogc.se_inimage")>-1){return"application/vnd.ogc.se_inimage";}
if(OpenLayers.Util.indexOf(formats,"application/vnd.ogc.se_xml")>-1){return"application/vnd.ogc.se_xml";}
return formats[0];},imageFormat:function(layer){var formats=layer.formats;if(layer.opaque&&OpenLayers.Util.indexOf(formats,"image/jpeg")>-1){return"image/jpeg";}
if(OpenLayers.Util.indexOf(formats,"image/png")>-1){return"image/png";}
if(OpenLayers.Util.indexOf(formats,"image/png; mode=24bit")>-1){return"image/png; mode=24bit";}
if(OpenLayers.Util.indexOf(formats,"image/gif")>-1){return"image/gif";}
return formats[0];},imageTransparent:function(layer){return layer.opaque==undefined||!layer.opaque;},readRecords:function(data){if(typeof data==="string"||data.nodeType){data=this.meta.format.read(data);}
if(!!data.error){throw new Ext.data.DataReader.Error("invalid-response",data.error);}
var version=data.version;var capability=data.capability||{};var url=capability.request&&capability.request.getmap&&capability.request.getmap.href;var layers=capability.layers;var formats=capability.exception?capability.exception.formats:[];var exceptions=this.serviceExceptionFormat(formats);var records=[];if(url&&layers){var fields=this.recordType.prototype.fields;var layer,values,options,params,field,v;for(var i=0,lenI=layers.length;i<lenI;i++){layer=layers[i];if(layer.name){values={};for(var 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;}
options={attribution:layer.attribution?this.attributionMarkup(layer.attribution):undefined,minScale:layer.minScale,maxScale:layer.maxScale};if(this.meta.layerOptions){Ext.apply(options,this.meta.layerOptions);}
params={layers:layer.name,exceptions:exceptions,format:this.imageFormat(layer),transparent:this.imageTransparent(layer),version:version};if(this.meta.layerParams){Ext.apply(params,this.meta.layerParams);}
values.layer=new OpenLayers.Layer.WMS(layer.title||layer.name,url,params,options);records.push(new this.recordType(values,values.layer.id));}}}
return{totalRecords:records.length,success:true,records:records};},attributionMarkup:function(attribution){var markup=[];if(attribution.logo){markup.push("<img class='"+this.attributionCls+"-image' "
+"src='"+attribution.logo.href+"' />");}
if(attribution.title){markup.push("<span class='"+this.attributionCls+"-title'>"
+attribution.title
+"</span>");}
if(attribution.href){for(var i=0;i<markup.length;i++){markup[i]="<a class='"
+this.attributionCls+"-link' "
+"href="
+attribution.href
+">"
+markup[i]
+"</a>";}}
return markup.join(" ");}});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);this.addEvents("bind");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.getLayer());},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});this.fireEvent("bind",this,map);},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.getLayer()===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].getLayer();}
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].getLayer();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.getLayer();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.getLayer();var title=record.get("title");if(title!==layer.name){layer.setName(title);}}}},removeMapLayer:function(record){this.map.removeLayer(record.getLayer());},onReplace:function(key,oldRecord,newRecord){this.removeMapLayer(oldRecord);},getByLayer:function(layer){var index=this.findBy(function(r){return r.getLayer()===layer;});if(index>-1){return this.getAt(index);}},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.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.Feature=OpenLayers.Class({layer:null,id:null,lonlat:null,data:null,marker:null,popupClass:null,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){if(!this.popup){var anchor=(this.marker)?this.marker.icon:null;var popupClass=this.popupClass?this.popupClass:OpenLayers.Popup.AnchoredBubble;this.popup=new popupClass(this.id+"_popup",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",modified:null,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;this.modified=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 undefined;}
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;wkt=wkt.replace(/[\n\r]/g," ");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;pieces.push(this.extractGeometry(geometry));}
if(isCollection){pieces.push(')');}
return pieces.join('');},extractGeometry:function(geometry){var 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);}
var wktType=type=='collection'?'GEOMETRYCOLLECTION':type.toUpperCase();var data=wktType+'('+this.extract[type].apply(this,[geometry])+')';return data;},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(',');},'collection':function(collection){var array=[];for(var i=0,len=collection.components.length;i<len;++i){array.push(this.extractGeometry.apply(this,[collection.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 point;var points=OpenLayers.String.trim(str).split(',');var components=[];for(var i=0,len=points.length;i<len;++i){point=points[i].replace(this.regExes.trimParens,'$1');components.push(this.parse.point.apply(this,[point]).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(OpenLayers.Util.isArray(result)){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.Projection=OpenLayers.Class({proj:null,projCode:null,titleRegEx:/\+title=[^\+]*/,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){var p=projection,equals=false;if(p){if(window.Proj4js&&this.proj.defData&&p.proj.defData){equals=this.proj.defData.replace(this.titleRegEx,"")==p.proj.defData.replace(this.titleRegEx,"");}else if(p.getCode){var source=this.getCode(),target=p.getCode();equals=source==target||!!OpenLayers.Projection.transforms[source]&&OpenLayers.Projection.transforms[source][target]===OpenLayers.Projection.nullTransform;}}
return equals;},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.Projection.nullTransform=function(point){return point;};Ext.namespace('GeoExt.ux');var scriptSourceGoogleEarth=(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.GoogleEarthPanel=Ext.extend(Ext.Panel,{map:null,ge:null,geProjection:new OpenLayers.Projection("EPSG:4326"),showBordersLayer:false,showTerrainLayer:true,showRoadsLayer:false,showBuildingsLayer:true,showBuildingsLowResolutionLayer:false,show2DNavigationTool:true,navigationMode2D:false,navigationMode3D:false,clickMode:true,earthAvailable:true,lookAt:null,altitude:100,altitudeMode:1,heading:0,tilt:0,range:100,kmlUrl:null,networkLinkUrl:null,layers:null,layerCache:{},readPermalink:true,baseUrl:scriptSourceGoogleEarth.replace('/ux/widgets/GoogleEarthPanel.js',''),initComponent:function(){var defConfig={border:true};Ext.applyIf(this,defConfig);GeoExt.ux.GoogleEarthPanel.superclass.initComponent.call(this);},afterRender:function(){if(this.ownerCt){var wh=this.ownerCt.getSize();Ext.applyIf(this,wh);}
GeoExt.ux.GoogleEarthPanel.superclass.afterRender.call(this);if(this.readPermalink){var parameters=OpenLayers.Util.getParameters();this.setPermalink(parameters);}
if(!this.ge){google.earth.createInstance(this.body.dom,this.initCallback.createDelegate(this),this.failureCallback.createDelegate(this));}},setLookAt:function(lat,lon,altitude,altitudeMode,heading,tilt,range){if(this.ge){var lookAt=this.ge.createLookAt('');lookAt.set(lat,lon,altitude,altitudeMode,heading,tilt,range);this.ge.getView().setAbstractView(lookAt);}},initCallback:function(object){this.ge=object;this.ge.getWindow().setVisibility(true);if(!this.lookAt){this.lookAt=this.map.getCenter();this.transformToGE(this.lookAt);}
this.setLookAt(this.lookAt.lat,this.lookAt.lon,this.altitude,this.altitudeMode,this.heading,this.tilt,this.range);this.ge.getNavigationControl().setVisibility(this.ge.VISIBILITY_SHOW);this.ge.getOptions().setFlyToSpeed(this.ge.SPEED_TELEPORT);this.manageLayers();this.setShow2DNavigationTool(this.show2DNavigationTool);this.setClickMode(this.clickMode);this.setNavigationMode2D(this.navigationMode2D);if(this.kmlUrl){google.earth.fetchKml(this.ge,this.kmlUrl,function(obj){this.ge.getFeatures().appendChild(obj);});}
if(this.networkLinkUrl){if(this.networkLinkUrl.constructor.toString().indexOf("Array")!=-1){for(var i=0;i<this.networkLinkUrl.length;i++){this.addNetwokLink(this.networkLinkUrl[i]);}}else{this.addNetwokLink(this.networkLinkUrl);}}
if(this.layers){for(i=0;i<this.layers.length;i++){var layer=this.layers[i];this.addLayer(layer);layer.events.on({"visibilitychanged":this.updateVisibility,scope:this});}}
var self=this;google.earth.addEventListener(this.ge,"frameend",function(){self.onFrameEnd();});},failureCallback:function(errorcode){alert('Google Earth plug in not working: '+errorcode);this.earthAvailable=false;},addNetwokLink:function(url){var link=this.ge.createLink('');link.setHref(url);var networkLink=this.ge.createNetworkLink('');networkLink.set(link,true,false);this.ge.getFeatures().appendChild(networkLink);},removeNetworkLink:function(url){var links=this.ge.getFeatures().getChildNodes();for(var i=0;i<links.getLength();i++){if(links.item(i).getLink().getHref()==url){this.ge.getFeatures().removeChild(links.item(i));break;}}},addLayer:function(layer,order){if(this.ge){if(layer.CLASS_NAME=='OpenLayers.Layer.WMS'){var name=layer.id;var networkLink=null;if(this.layerCache[name]){networkLink=this.layerCache[name];}else{var link=this.ge.createLink('kl_'+name);var ows=layer.url;ows=ows.replace(/\?.*/,'');var kmlPath='/kml?mode=refresh&layers='+layer.params.LAYERS;link.setHref(ows+kmlPath);networkLink=this.ge.createNetworkLink('nl_'+name);networkLink.setName(name);networkLink.setLink(link);this.layerCache[name]=networkLink;}
networkLink.setVisibility(layer.getVisibility());if(order!==undefined&&order<this.ge.getFeatures().getChildNodes().getLength()){this.ge.getFeatures().insertBefore(this.ge.getFeatures().getChildNodes().item(order));}else{this.ge.getFeatures().appendChild(networkLink);}}}},updateVisibility:function(event){if(!this.ge){return;}
var layer=event.object;var networkLink=this.layerCache[layer.id];if(networkLink){networkLink.setVisibility(layer.getVisibility());}},setShow2DNavigationTool:function(state){this.show2DNavigationTool=state;if(state){if(this.map){this.earthLayer=new OpenLayers.Layer.Vector("Google Earth Navigation",{displayInLayerSwitcher:false});this.map.addLayer(this.earthLayer);this.features=[new OpenLayers.Feature.Vector(null,{role:'line'},{strokeColor:'#ff0000',strokeWidth:3,pointRadius:6}),new OpenLayers.Feature.Vector(null,{role:'lookAt'},{pointRadius:8,fillColor:'#ff0000'}),new OpenLayers.Feature.Vector(null,{role:'camera'},{externalGraphic:this.baseUrl+'/resources/eye.png',graphicHeight:18,graphicWidth:31,graphicYOffset:-3,rotation:0})];this.drag=new OpenLayers.Control.DragFeature(this.earthLayer,{earth:this,downFeature:function(pixel){this.lastPixel=pixel;this.firstPixel=pixel;this.firstGeom=this.feature.geometry;},moveFeature:function(pixel){if(this.feature===null){return;}
if(this.feature.attributes.role!='line'){var res=this.map.getResolution();var x=res*(pixel.x-this.firstPixel.x)+this.firstGeom.x;var y=res*(this.firstPixel.y-pixel.y)+this.firstGeom.y;var lonLat=new OpenLayers.LonLat(x,y);if(this.feature.attributes.role=='lookAt'){this.earth.lookTo(lonLat);}else if(this.feature.attributes.role=='camera'){this.earth.lookFrom(lonLat);}}
this.lastPixel=pixel;}});this.map.addControl(this.drag);this.drag.activate();}else{this.show2DNavigationTool=false;}}
else{if(this.map){if(this.drag){this.drag.deactivate();this.map.removeControl(this.drag);this.map.removeLayer(this.earthLayer);this.earthLayer.destroy();this.features=null;}}else{this.show2DNavigationTool=false;}}},getshow2DNavigationTool:function(){return this.show2DNavigationTool;},setClickMode:function(state){this.clickMode=state;if(state){if(this.map){this.clickControl=new GeoExt.ux.GoogleEarthClick({handlerOptions:{"single":true},gePanel:this});this.map.addControl(this.clickControl);this.clickControl.activate();}else{this.clickMode=false;}}else{if(this.map){if(this.clickControl){this.clickControl.deactivate();this.map.removeControl(this.clickControl);}}else{this.clickMode=false;}}},getClickMode:function(){return this.clickMode;},setNavigationMode2D:function(state){this.navigationMode2D=state;if(state){if(this.map){this.map.events.on({moveend:this.onMoveEnd,scope:this});}else{this.navigationMode2D=false;}}else{if(this.map){this.map.events.un({move:this.onMoveEnd,scope:this});}else{this.navigationMode2D=false;}}},getNavigationMode2D:function(){return this.navigationMode2D;},manageLayers:function(){if(this.ge){this.setBuildingsLayer(this.showBuildingsLayer);this.setBordersLayer(this.showBordersLayer);this.setTerrainLayer(this.showTerrainLayer);this.setRoadsLayer(this.showRoadsLayer);this.setBuildingsLowResolutionLayer(this.showBuildingsLowResolutionLayer);}},setBuildingsLayer:function(state){this.showBuildingsLayer=state;if(state){this.ge.getLayerRoot().enableLayerById(this.ge.LAYER_BUILDINGS,true);}else{this.ge.getLayerRoot().enableLayerById(this.ge.LAYER_BUILDINGS,false);}},getBuildingsLayer:function(){return this.showBuildingsLayer;},setBordersLayer:function(state){this.showBordersLayer=state;if(state){this.ge.getLayerRoot().enableLayerById(this.ge.LAYER_BORDERS,true);}else{this.ge.getLayerRoot().enableLayerById(this.ge.LAYER_BORDERS,false);}},getBordersLayer:function(){return this.showBordersLayer;},setTerrainLayer:function(state){this.showTerrainLayer=state;if(state){this.ge.getLayerRoot().enableLayerById(this.ge.LAYER_TERRAIN,true);}else{this.ge.getLayerRoot().enableLayerById(this.ge.LAYER_TERRAIN,false);}},getTerrainLayer:function(){return this.showTerrainLayer;},setRoadsLayer:function(state){this.showRoadsLayer=state;if(state){this.ge.getLayerRoot().enableLayerById(this.ge.LAYER_ROADS,true);}else{this.ge.getLayerRoot().enableLayerById(this.ge.LAYER_ROADS,false);}},getRoadsLayer:function(){return this.showRoadsLayer;},setBuildingsLowResolutionLayer:function(state){this.showBuildingsLowResolutionLayer=state;if(state){this.ge.getLayerRoot().enableLayerById(this.ge.LAYER_BUILDINGS_LOW_RESOLUTION,true);}else{this.ge.getLayerRoot().enableLayerById(this.ge.LAYER_BUILDINGS_LOW_RESOLUTION,false);}},getBuildingsLowResolutionLayer:function(){return this.showBuildingsLowResolutionLayer;},transformToGE:function(lonLat){lonLat.transform(this.map.getProjectionObject(),this.geProjection);},transformFromGE:function(geLonLat){geLonLat.transform(this.geProjection,this.map.getProjectionObject());},getPermalink:function(complete){var permalink;if(complete){permalink=window.location.href;if(OpenLayers.String.contains(permalink,'?')){var end=permalink.indexOf('?');permalink=permalink.substring(0,end);}
permalink=permalink+"?";}else{permalink='';}
var lookAt=this.ge.getView().copyAsLookAt(this.altitudeMode);permalink=permalink+"gelookAtLatitude="+lookAt.getLatitude();permalink=permalink+"&gelookAtLongitude="+lookAt.getLongitude();permalink=permalink+"&gerange="+lookAt.getRange();permalink=permalink+"&getilt="+lookAt.getTilt();permalink=permalink+"&geheading="+lookAt.getHeading();permalink=permalink+"&gealtitude="+lookAt.getAltitude();permalink=permalink+"&gealtitudeMode="+lookAt.getAltitudeMode();permalink=permalink+"&geshowBordersLayer="+this.showBordersLayer;permalink=permalink+"&geshowTerrainLayer="+this.showTerrainLayer;permalink=permalink+"&geshowRoadsLayer="+this.showRoadsLayer;permalink=permalink+"&geshowBuildingsLayer="+this.showBuildingsLayer;permalink=permalink+"&geshowBuildingsLowResolutionLayer="+this.showBuildingsLowResolutionLayer;permalink=permalink+"&geshow2DNavigationTool="+this.show2DNavigationTool;permalink=permalink+"&genavigationMode2D="+this.navigationMode2D;permalink=permalink+"&genavigationMode3D="+this.navigationMode3D;permalink=permalink+"&geclickMode="+this.clickMode;if(this.map){permalink=permalink+"&geeasting="+this.map.getCenter().lon;permalink=permalink+"&genorthing="+this.map.getCenter().lat;permalink=permalink+"&gezoom="+this.map.getZoom();}
return permalink;},setPermalink:function(parameters){if(parameters.geeasting&&parameters.genorthing){var position=new OpenLayers.LonLat(parseFloat(parameters.geeasting),parseFloat(parameters.genorthing));if(this.map){this.map.setCenter(position);}}
if(parameters.gezoom){if(this.map){this.map.zoomTo(parseInt(parameters.gezoom,10));}}
if(parameters.gelookAtLatitude&&parameters.gelookAtLongitude){this.lookAt=new OpenLayers.LonLat(parseFloat(parameters.gelookAtLongitude),parseFloat(parameters.gelookAtLatitude));}
if(parameters.gealtitude){this.altitude=parseFloat(parameters.gealtitude);}
if(parameters.geheading){this.heading=parseFloat(parameters.geheading);}
if(parameters.getilt){this.tilt=parseFloat(parameters.getilt);}
if(parameters.gerange){this.range=parseFloat(parameters.gerange);}
if(parameters.gealtitudeMode){this.altitudeMode=parseInt(parameters.gealtitudeMode,10);}
if(parameters.geshowBordersLayer){this.showBordersLayer=this.stringToBoolean(parameters.geshowBordersLayer);}
if(parameters.geshowTerrainLayer){this.showTerrainLayer=this.stringToBoolean(parameters.geshowTerrainLayer);}
if(parameters.geshowRoadsLayer){this.showRoadsLayer=this.stringToBoolean(parameters.geshowRoadsLayer);}
if(parameters.geshowBuildingsLayer){this.showBuildingsLayer=this.stringToBoolean(parameters.geshowBuildingsLayer);}
if(parameters.geshowBuildingsLowResolutionLayer){this.showBuildingsLowResolutionLayer=this.stringToBoolean(parameters.geshowBuildingsLowResolutionLayer);}
if(parameters.geshow2DNavigationTool){this.show2DNavigationTool=this.stringToBoolean(parameters.geshow2DNavigationTool);}
if(parameters.genavigationMode2D){this.navigationMode2D=this.stringToBoolean(parameters.genavigationMode2D);}
if(parameters.genavigationMode3D){this.navigationMode3D=this.stringToBoolean(parameters.genavigationMode3D);}
if(parameters.geclickMode){this.clickMode=this.stringToBoolean(parameters.geclickMode);}
if(this.ge){google.earth.createInstance(this.body.dom,this.initCallback.createDelegate(this),this.failureCallback.createDelegate(this));}else{if(this.lookAt){this.setLookAt(this.lookAt.lat,this.lookAt.lon,this.altitude,this.altitudeMode,this.heading,this.tilt,this.range);}}},stringToBoolean:function(string){switch(string.toLowerCase()){case"true":case"yes":case"1":return true;case"false":case"no":case"0":case null:return false;default:return Boolean(string);}},beforeDestroy:function(){this.setShow2DNavigationTool(false);this.setClickMode(false);this.setNavigationMode2D(false);if(this.ge){google.earth.removeEventListener(this.ge,"frameend",function(){self.onFrameEnd();});this.ge.getNavigationControl().setVisibility(this.ge.VISIBILITY_HIDE);}
GeoExt.ux.GoogleEarthPanel.superclass.beforeDestroy.apply(this,arguments);},onMoveEnd:function(){this.lookTo(this.map.getCenter());},onFrameEnd:function(){var lookAt=this.ge.getView().copyAsLookAt(this.altitudeMode);this.lookAt=new OpenLayers.LonLat(lookAt.getLongitude(),lookAt.getLatitude());this.range=lookAt.getRange();this.til=lookAt.getTilt();this.heading=lookAt.getHeading();this.altitude=lookAt.getAltitude();this.altitudeMode=lookAt.getAltitudeMode();if(this.map&&this.show2DNavigationTool){this.refreshNavigation2DTool();}
if(this.map&&this.navigationMode3D){this.transformFromGE(this.lookAt);this.map.setCenter(this.lookAt);}},lookTo:function(lonLat){if(!this.ge){return;}else{if(this.ge.getNavigationControl().getVisibility()==this.ge.VISIBILITY_SHOW){this.transformToGE(lonLat);var lookAt=this.ge.getView().copyAsLookAt(this.altitudeMode);lookAt.setLongitude(lonLat.lon);lookAt.setLatitude(lonLat.lat);this.ge.getView().setAbstractView(lookAt);}}},lookFrom:function(lonLat){if(!this.ge){return;}
var lookAt=this.ge.getView().copyAsLookAt(this.altitudeMode);var geLonLat=new OpenLayers.LonLat(lookAt.getLongitude(),lookAt.getLatitude());var lonLatTmp=lonLat.clone();this.transformToGE(lonLatTmp);var dist=OpenLayers.Util.distVincenty(lonLatTmp,geLonLat)*1000;this.transformFromGE(geLonLat);var rot=(180/Math.PI)*Math.atan((geLonLat.lon-lonLat.lon)/(geLonLat.lat-lonLat.lat));if(geLonLat.lat<lonLat.lat){rot=rot+180;}
lookAt.setHeading(rot);var tilt=lookAt.getTilt();var range=dist/Math.sin(tilt/(180/Math.PI));lookAt.setRange(range);this.ge.getView().setAbstractView(lookAt);},getCameraPosition:function(){if(this.ge){var camera=this.ge.getView().copyAsCamera(this.altitudeMode);return new OpenLayers.LonLat(camera.getLongitude(),camera.getLatitude());}},getLookAtPosition:function(){if(this.ge){var lookAt=this.ge.getView().copyAsLookAt(this.altitudeMode);return new OpenLayers.LonLat(lookAt.getLongitude(),lookAt.getLatitude());}},refreshNavigation2DTool:function(){if(!this.ge){return;}
var pl=this.getLookAtPosition();this.transformFromGE(pl);var pc=this.getCameraPosition();this.transformFromGE(pc);if(this.pl&&this.pc){if(this.pl.lat==pl.lat&&this.pl.lon==pl.lon&&this.pc.lat==pc.lat&&this.pc.lon){return;}else{this.pl=pl;this.pc=pc;}}else{this.pl=pl;this.pc=pc;}
this.earthLayer.removeFeatures(this.features);this.features[0].geometry=new OpenLayers.Geometry.LineString([new OpenLayers.Geometry.Point(pl.lon,pl.lat),new OpenLayers.Geometry.Point(pc.lon,pc.lat)]);this.features[1].geometry=new OpenLayers.Geometry.Point(pl.lon,pl.lat);this.features[2].geometry=new OpenLayers.Geometry.Point(pc.lon,pc.lat);if(pl.lon==pc.lon){this.features[2].style.rotation=0;}else{var rot=(180/Math.PI)*Math.atan((pl.lon-pc.lon)/(pl.lat-pc.lat));if(pl.lat>pc.lat){this.features[2].style.rotation=rot+180;}else{this.features[2].style.rotation=rot;}}
this.earthLayer.addFeatures(this.features);}});Ext.reg('gxux_googleearthpanel',GeoExt.ux.GoogleEarthPanel);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(){this.removeButtons();this.buttons=null;this.position=null;OpenLayers.Control.prototype.destroy.apply(this,arguments);},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");btn.style.cursor="pointer";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,panIcons:true,forceFixedZoomLevel:false,mouseDragStart:null,deltaY:null,zoomStart:null,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);if(this.panIcons){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);}
else{this._addButton("zoomin","zoom-plus-mini.png",px,sz);centered=this._addZoomBar(px.add(0,sz.h));this._addButton("zoomout","zoom-minus-mini.png",centered,sz);if(this.zoomWorldIcon){centered=centered.add(0,sz.h+3);this._addButton("zoomworld","zoom-world-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");slider.style.cursor="move";this.slider=slider;this.sliderEvents=new OpenLayers.Events(this,slider,null,true,{includeXY:true});this.sliderEvents.on({"touchstart":this.zoomBarDown,"touchmove":this.zoomBarDrag,"touchend":this.zoomBarUp,"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");}
div.style.cursor="pointer";this.zoombarDiv=div;this.divEvents=new OpenLayers.Events(this,div,null,true,{includeXY:true});this.divEvents.on({"touchmove":this.passEventToSlider,"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({"touchmove":this.zoomBarDrag,"mousedown":this.zoomBarDown,"mousemove":this.zoomBarDrag,"mouseup":this.zoomBarUp,"dblclick":this.doubleClick,"click":this.doubleClick});this.sliderEvents.destroy();this.divEvents.un({"touchmove":this.passEventToSlider,"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 levels=evt.xy.y/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)&&!OpenLayers.Event.isSingleTouch(evt)){return;}
this.map.events.on({"touchmove":this.passEventToSlider,"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();}
this.deltaY=this.zoomStart.y-evt.xy.y;OpenLayers.Event.stop(evt);}},zoomBarUp:function(evt){if(!OpenLayers.Event.isLeftClick(evt)&&evt.type!=="touchend"){return;}
if(this.mouseDragStart){this.div.style.cursor="";this.map.events.un({"touchmove":this.passEventToSlider,"mouseup":this.passEventToSlider,"mousemove":this.passEventToSlider,scope:this});var zoomLevel=this.map.zoom;if(!this.forceFixedZoomLevel&&this.map.fractionalZoom){zoomLevel+=this.deltaY/this.zoomStopHeight;zoomLevel=Math.min(Math.max(zoomLevel,0),this.map.getNumZoomLevels()-1);}else{zoomLevel+=this.deltaY/this.zoomStopHeight;zoomLevel=Math.max(Math.round(zoomLevel),0);}
this.map.zoomTo(zoomLevel);this.mouseDragStart=null;this.zoomStart=null;this.deltaY=0;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"});Ext.ns("GeoExt.ux");GeoExt.ux.MultiPagePrint=Ext.extend(Ext.form.FormPanel,{layoutText:"Layout",dpiText:"DPI",scaleText:"Scale",rotationText:"Rotation",printText:"Print",creatingPdfText:"Creating PDF...",pageText:"Page",addPageText:"Add page",titleFieldLabel:"Title",commentFieldLabel:"Comment",defaultTitleText:"A custom title",defaultCommentText:"A custom comment",printOptions:null,fieldsWidth:150,busyMask:null,pagesPanel:null,printExtent:null,printPages:null,initComponent:function(){GeoExt.ux.MultiPagePrint.superclass.initComponent.call(this);this.printExtent=new GeoExt.plugins.PrintExtent({printProvider:this.initialConfig.printProvider,layer:this.initialConfig.layer});this.printPages=this.printExtent.pages;this.mapPanel.initPlugin(this.printExtent);if(!this.busyMask){this.busyMask=new Ext.LoadMask(Ext.getBody(),{msg:this.creatingPdfText});}
this.printExtent.printProvider.on({"beforeprint":this.busyMask.show,"print":this.busyMask.hide,scope:this.busyMask});if(this.printExtent.printProvider.capabilities){this.initForm();}else{this.printExtent.printProvider.on({"loadcapabilities":this.initForm,scope:this,single:true});}
this.on('expand',this.showExtent,this);this.on('collapse',this.hideExtent,this);this.on('activate',this.showExtent,this);this.on('deactivate',this.hideExtent,this);this.on('enable',this.showExtent,this);this.on('disable',this.hideExtent,this);this.on('destroy',this.hideExtent,this);},initForm:function(){var p=this.printExtent.printProvider;var hideUnique=this.initialConfig.hideUnique!==false;!(hideUnique&&p.layouts.getCount()<=1)&&this.add({xtype:"combo",fieldLabel:this.layoutText,store:p.layouts,displayField:"name",typeAhead:true,mode:"local",forceSelection:true,triggerAction:"all",selectOnFocus:true,width:this.fieldsWidth,plugins:{ptype:'gx_printproviderfield',printProvider:p}});!(hideUnique&&p.dpis.getCount()<=1)&&this.add({xtype:"combo",fieldLabel:this.dpiText,store:p.dpis,displayField:"name",typeAhead:true,mode:"local",forceSelection:true,triggerAction:"all",selectOnFocus:true,width:this.fieldsWidth,plugins:{ptype:'gx_printproviderfield',printProvider:p}});this.pagesPanel=new Ext.TabPanel({title:'the pages form',enableTabScroll:true,plain:true,layoutOnTabChange:true});this.add(new Ext.Button({text:this.addPageText,handler:this.addPage,scope:this}));this.add(this.pagesPanel);this.addButton({text:this.printText,handler:function(){this.printExtent.print(this.printOptions);},scope:this});this.doLayout();if(this.autoFit===true){this.onMoveend();this.mapPanel.map.events.on({"moveend":this.onMoveend,scope:this});}
this.addPage();this.printExtent.on('selectpage',function(page){for(var i=0,len=this.printPages.length;i<len;++i){if(this.printPages[i]==page){this.pagesPanel.setActiveTab(i);break;}}},this);this.pagesPanel.on({'beforeremove':function(container,panel){if(container.items.length<=1){return false;}}});},addPage:function(){var page=this.printExtent.addPage();this.addPageForm(page);},addPageForm:function(page){var p=this.printExtent.printProvider;var hideUnique=this.initialConfig.hideUnique!==false;var pageTab=new Ext.Panel({title:this.pageText,layout:'form',autoHeight:true,closable:true});pageTab.add({xtype:"textfield",name:"mapTitle",fieldLabel:this.titleFieldLabel,value:this.defaultTitleText,width:this.fieldsWidth,plugins:{ptype:'gx_printpagefield',printPage:page},listeners:{valid:function(field){pageTab.setTitle(field.getValue());}}});pageTab.add({xtype:"textarea",fieldLabel:this.commentFieldLabel,name:"comment",value:this.defaultCommentText,width:this.fieldsWidth,plugins:{ptype:'gx_printpagefield',printPage:page}});!(hideUnique&&p.scales.getCount()<=1)&&pageTab.add({xtype:"combo",fieldLabel:this.scaleText,store:p.scales,displayField:"name",typeAhead:true,mode:"local",forceSelection:true,triggerAction:"all",selectOnFocus:true,width:this.fieldsWidth,plugins:{ptype:'gx_printpagefield',printPage:page}});pageTab.initialConfig.hideRotation!==true&&pageTab.add({xtype:"textfield",fieldLabel:this.rotationText,name:"rotation",enableKeyEvents:true,width:this.fieldsWidth,validator:function(v){return!isNaN(v);},plugins:{ptype:'gx_printpagefield',printPage:page}});pageTab.on({'activate':function(panel){this.printExtent.selectPage(page);},'destroy':function(panel){this.printExtent.removePage(page);},scope:this});this.pagesPanel.add(pageTab);this.doLayout();this.pagesPanel.setActiveTab(pageTab);},onMoveend:function(){},beforeDestroy:function(){var p=this.printExtent.printProvider;p.un("beforePrint",this.busyMask.show,this.busyMask);p.un("print",this.busyMask.hide,this.busyMask);if(this.autoFit===true){this.mapPanel.map.events.un({"moveend":this.onMoveend,scope:this});}
GeoExt.ux.MultiPagePrint.superclass.beforeDestroy.apply(this,arguments);},showExtent:function(){this.printExtent.show();},hideExtent:function(){this.printExtent.hide();}});Ext.reg("gxux_multipageprint",GeoExt.ux.MultiPagePrint);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.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;},isSingleTouch:function(event){return event.touches&&event.touches.length==1;},isMultiTouch:function(event){return event.touches&&event.touches.length>1;},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","touchstart","touchmove","touchend"],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 undefined;}
if(evt==null){evt={};}
evt.object=this.object;evt.element=this.element;if(!evt.type){evt.type=type;}
listeners=listeners.slice();var 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){var type=evt.type,listeners=this.listeners[type];if(!listeners||listeners.length==0){return;}
var touches=evt.touches;if(touches&&touches[0]){var x=0;var y=0;var num=touches.length;var touch;for(var i=0;i<num;++i){touch=touches[i];x+=touch.clientX;y+=touch.clientY;}
evt.clientX=x/num;evt.clientY=y/num;}
if(this.includeXY){evt.xy=this.getMousePosition(evt);}
this.triggerEvent(type,evt);},clearMouseCache:function(){this.element.scrolls=null;this.element.lefttop=null;var body=document.body;if(body&&!((body.scrollTop!=0||body.scrollLeft!=0)&&navigator.userAgent.match(/iPhone/i))){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){var viewportElement=OpenLayers.Util.getViewportElement();this.element.scrolls=[viewportElement.scrollLeft,viewportElement.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);}
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.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){this.stop();}},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","preremovelayer","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,minPx:null,maxPx: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);var eventsDiv=document.createElement("div");eventsDiv.id=this.id+"_events";eventsDiv.style.position="absolute";eventsDiv.style.width="100%";eventsDiv.style.height="100%";eventsDiv.style.zIndex=this.Z_INDEX_BASE.Control-1;this.viewPortDiv.appendChild(eventsDiv);this.eventsDiv=eventsDiv;this.events=new OpenLayers.Events(this,this.eventsDiv,this.EVENT_TYPES,this.fallThrough,{includeXY:true});id=this.id+"_OpenLayers_Container";this.layerContainerDiv=OpenLayers.Util.createDiv(id);this.layerContainerDiv.style.zIndex=this.Z_INDEX_BASE['Popup']-1;this.eventsDiv.appendChild(this.layerContainerDiv);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){delete this.center;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.viewPortDiv.parentNode.removeChild(this.viewPortDiv);this.div.appendChild(this.viewPortDiv);this.updateSize();},unloadDestroy:null,updateSizeDestroy:null,destroy:function(){if(!this.unloadDestroy){return false;}
if(this.panTween){this.panTween.stop();this.panTween=null;}
OpenLayers.Event.stopObserving(window,'unload',this.unloadDestroy);this.unloadDestroy=null;if(this.updateSizeDestroy){OpenLayers.Event.stopObserving(window,'resize',this.updateSizeDestroy);}else{this.events.unregister("resize",this,this.updateSize);}
this.paddingForPopups=null;if(this.controls!=null){for(var 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){var updatePxExtent=this.minPx&&options.restrictedExtent!=this.restrictedExtent;OpenLayers.Util.extend(this,options);updatePxExtent&&this.moveTo(this.getCachedCenter(),this.zoom,{forceZoomChange:true});},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.events.triggerEvent("preaddlayer",{layer:layer})===false){return;}
if(this.allOverlays){layer.isBaseLayer=false;}
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.events.triggerEvent("added",{map:this,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(this.events.triggerEvent("preremovelayer",{layer:layer})===false){return;}
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});layer.events.triggerEvent("removed",{map:this,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.getCachedCenter();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.getCachedCenter();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.getCachedCenter();}
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;var cachedCenter=this.getCachedCenter();if(cachedCenter){center=cachedCenter.clone();}
return center;},getCachedCenter:function(){if(!this.center&&this.size){this.center=this.getLonLatFromViewPortPx(new OpenLayers.Pixel(this.size.w/2,this.size.h/2));}
return this.center;},getZoom:function(){return this.zoom;},pan:function(dx,dy,options){options=OpenLayers.Util.applyDefaults(options,{animate:true,dragging:false});if(options.dragging){if(dx!=0||dy!=0){this.moveByPx(dx,dy);}}else{var centerPx=this.getViewPortPxFromLonLat(this.getCachedCenter());var newCenterPx=centerPx.add(dx,dy);if(this.dragging||!newCenterPx.equals(centerPx)){var newCenterLonLat=this.getLonLatFromViewPortPx(newCenterPx);if(options.animate){this.panTo(newCenterLonLat);}else{this.moveTo(newCenterLonLat);this.dragging=false;this.events.triggerEvent("moveend");}}}},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.getCachedCenter();if(lonlat.equals(center)){return;}
var from=this.getPixelFromLonLat(center);var to=this.getPixelFromLonLat(lonlat);var vector={x:to.x-from.x,y:to.y-from.y};var last={x:0,y:0};this.panTween.start({x:0,y:0},vector,this.panDuration,{callbacks:{eachStep:OpenLayers.Function.bind(function(px){var x=px.x-last.x,y=px.y-last.y;this.moveByPx(x,y);last.x=Math.round(px.x);last.y=Math.round(px.y);},this),done:OpenLayers.Function.bind(function(px){this.moveTo(lonlat);this.dragging=false;this.events.triggerEvent("moveend");},this)}});}else{this.setCenter(lonlat);}},setCenter:function(lonlat,zoom,dragging,forceZoomChange){this.panTween&&this.panTween.stop();this.moveTo(lonlat,zoom,{'dragging':dragging,'forceZoomChange':forceZoomChange});},moveByPx:function(dx,dy){var hw=this.size.w/2;var hh=this.size.h/2;var x=hw+dx;var y=hh+dy;var wrapDateLine=this.baseLayer.wrapDateLine;var xRestriction=0;var yRestriction=0;if(this.restrictedExtent){xRestriction=hw;yRestriction=hh;wrapDateLine=false;}
dx=wrapDateLine||x<=this.maxPx.x-xRestriction&&x>=this.minPx.x+xRestriction?Math.round(dx):0;dy=y<=this.maxPx.y-yRestriction&&y>=this.minPx.y+yRestriction?Math.round(dy):0;var minX=this.minPx.x,maxX=this.maxPx.x;if(dx||dy){if(!this.dragging){this.dragging=true;this.events.triggerEvent("movestart");}
this.center=null;if(dx){this.layerContainerDiv.style.left=parseInt(this.layerContainerDiv.style.left)-dx+"px";this.minPx.x-=dx;this.maxPx.x-=dx;if(wrapDateLine){if(this.maxPx.x>maxX){this.maxPx.x-=(maxX-minX);}
if(this.minPx.x<minX){this.minPx.x+=(maxX-minX);}}}
if(dy){this.layerContainerDiv.style.top=parseInt(this.layerContainerDiv.style.top)-dy+"px";this.minPx.y-=dy;this.maxPx.y-=dy;}
var layer,i,len;for(i=0,len=this.layers.length;i<len;++i){layer=this.layers[i];if(layer.visibility&&(layer===this.baseLayer||layer.inRange)){layer.moveByPx(dx,dy);layer.events.triggerEvent("move");}}
this.events.triggerEvent("move");}},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||this.dragging;var forceZoomChange=options.forceZoomChange;if(!this.getCachedCenter()&&!this.isValidLonLat(lonlat)){lonlat=this.maxExtent.getCenterLonLat();this.center=lonlat.clone();}
if(this.restrictedExtent!=null){if(lonlat==null){lonlat=this.center;}
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){dragging||this.events.triggerEvent("movestart");if(centerChanged){if(!zoomChanged&&this.center){this.centerLayerContainer(lonlat);}
this.center=lonlat.clone();}
var res=zoomChanged?this.getResolutionForZoom(zoom):this.getResolution();if(zoomChanged||this.layerContainerOrigin==null){this.layerContainerOrigin=this.getCachedCenter();this.layerContainerDiv.style.left="0px";this.layerContainerDiv.style.top="0px";var maxExtent=this.getMaxExtent({restricted:true});var maxExtentCenter=maxExtent.getCenterLonLat();var lonDelta=this.center.lon-maxExtentCenter.lon;var latDelta=maxExtentCenter.lat-this.center.lat;var extentWidth=Math.round(maxExtent.getWidth()/res);var extentHeight=Math.round(maxExtent.getHeight()/res);var left=(this.size.w-extentWidth)/2-lonDelta/res;var top=(this.size.h-extentHeight)/2-latDelta/res;this.minPx=new OpenLayers.Pixel(left,top);this.maxPx=new OpenLayers.Pixel(left+extentWidth,top+extentHeight);}
if(zoomChanged){this.zoom=zoom;this.resolution=res;this.viewRequestID++;}
var bounds=this.getExtent();if(this.baseLayer.visibility){this.baseLayer.moveTo(bounds,zoomChanged,options.dragging);options.dragging||this.baseLayer.events.triggerEvent("moveend",{zoomChanged:zoomChanged});}
bounds=this.baseLayer.getExtent();for(var i=this.layers.length-1;i>=0;--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,options.dragging);options.dragging||layer.events.triggerEvent("moveend",{zoomChanged:zoomChanged});}}}
this.events.triggerEvent("move");dragging||this.events.triggerEvent("moveend");if(zoomChanged){for(var i=0,len=this.popups.length;i<len;i++){this.popups[i].updatePosition();}
this.events.triggerEvent("zoomend");}}},centerLayerContainer:function(lonlat){var originPx=this.getViewPortPxFromLonLat(this.layerContainerOrigin);var newPx=this.getViewPortPxFromLonLat(lonlat);if((originPx!=null)&&(newPx!=null)){var oldLeft=parseInt(this.layerContainerDiv.style.left);var oldTop=parseInt(this.layerContainerDiv.style.top);var newLeft=Math.round(originPx.x-newPx.x);var newTop=Math.round(originPx.y-newPx.y);this.layerContainerDiv.style.left=newLeft+"px";this.layerContainerDiv.style.top=newTop+"px";var dx=oldLeft-newLeft;var dy=oldTop-newTop;this.minPx.x-=dx;this.maxPx.x-=dx;this.minPx.y-=dy;this.maxPx.y-=dy;}},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.getCachedCenter();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;},getGeodesicPixelSize:function(px){var lonlat=px?this.getLonLatFromPixel(px):(this.getCachedCenter()||new OpenLayers.LonLat(0,0));var res=this.getResolution();var left=lonlat.add(-res/2,0);var right=lonlat.add(res/2,0);var bottom=lonlat.add(0,-res/2);var top=lonlat.add(0,res/2);var dest=new OpenLayers.Projection("EPSG:4326");var source=this.getProjectionObject()||dest;if(!source.equals(dest)){left.transform(source,dest);right.transform(source,dest);bottom.transform(source,dest);top.transform(source,dest);}
return new OpenLayers.Size(OpenLayers.Util.distVincenty(left,right),OpenLayers.Util.distVincenty(bottom,top));},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.Layer=OpenLayers.Class({id:null,name:null,div:null,opacity:1,alwaysInRange:null,EVENT_TYPES:["loadstart","loadend","loadcancel","visibilitychanged","move","moveend","added","removed"],RESOLUTION_PROPERTIES:['scales','resolutions','maxScale','minScale','maxResolution','minResolution','numZoomLevels','maxZoomLevel'],events:null,map:null,isBaseLayer:false,alpha:false,displayInLayerSwitcher:true,visibility:true,attribution:null,inRange:false,imageSize:null,imageOffset:null,options:null,eventListeners:null,gutter:0,projection:null,units:null,scales:null,resolutions:null,maxExtent:null,minExtent:null,maxResolution:null,minResolution:null,numZoomLevels:null,minScale:null,maxScale:null,displayOutsideMaxExtent:false,wrapDateLine:false,transitionEffect:null,SUPPORTED_TRANSITIONS:['resize'],metadata:{},initialize:function(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,reinitialize){if(this.options==null){this.options={};}
OpenLayers.Util.extend(this.options,newOptions);OpenLayers.Util.extend(this,newOptions);if(typeof this.projection=="string"){this.projection=new OpenLayers.Projection(this.projection);}
if(this.projection&&this.projection.getUnits()){this.units=this.projection.getUnits();}
if(this.map){var resolution=this.map.getResolution();var properties=this.RESOLUTION_PROPERTIES.concat(["projection","units","minExtent","maxExtent"]);for(var o in newOptions){if(newOptions.hasOwnProperty(o)&&OpenLayers.Util.indexOf(properties,o)>=0){this.initResolutions();if(reinitialize&&this.map.baseLayer===this){this.map.setCenter(this.map.getCenter(),this.map.getZoomForResolution(resolution),false,true);this.map.events.triggerEvent("changebaselayer",{layer:this});}
break;}}}},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);},moveByPx:function(dx,dy){},setMap:function(map){if(this.map==null){this.map=map;this.maxExtent=this.maxExtent||this.map.maxExtent;this.minExtent=this.minExtent||this.map.minExtent;this.projection=this.projection||this.map.projection;if(typeof this.projection=="string"){this.projection=new OpenLayers.Projection(this.projection);}
this.units=this.projection.getUnits()||this.units||this.map.units;this.initResolutions();if(!this.isBaseLayer){this.inRange=this.calculateInRange();var 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 i,len,p;var props={},alwaysInRange=true;for(i=0,len=this.RESOLUTION_PROPERTIES.length;i<len;i++){p=this.RESOLUTION_PROPERTIES[i];props[p]=this.options[p];if(alwaysInRange&&this.options[p]){alwaysInRange=false;}}
if(this.alwaysInRange==null){this.alwaysInRange=alwaysInRange;}
if(props.resolutions==null){props.resolutions=this.resolutionsFromScales(props.scales);}
if(props.resolutions==null){props.resolutions=this.calculateResolutions(props);}
if(props.resolutions==null){for(i=0,len=this.RESOLUTION_PROPERTIES.length;i<len;i++){p=this.RESOLUTION_PROPERTIES[i];props[p]=this.options[p]!=null?this.options[p]:this.map[p];}
if(props.resolutions==null){props.resolutions=this.resolutionsFromScales(props.scales);}
if(props.resolutions==null){props.resolutions=this.calculateResolutions(props);}}
var maxResolution;if(this.options.maxResolution&&this.options.maxResolution!=="auto"){maxResolution=this.options.maxResolution;}
if(this.options.minScale){maxResolution=OpenLayers.Util.getResolutionFromScale(this.options.minScale,this.units);}
var minResolution;if(this.options.minResolution&&this.options.minResolution!=="auto"){minResolution=this.options.minResolution;}
if(this.options.maxScale){minResolution=OpenLayers.Util.getResolutionFromScale(this.options.maxScale,this.units);}
if(props.resolutions){props.resolutions.sort(function(a,b){return(b-a);});if(!maxResolution){maxResolution=props.resolutions[0];}
if(!minResolution){var lastIdx=props.resolutions.length-1;minResolution=props.resolutions[lastIdx];}}
this.resolutions=props.resolutions;if(this.resolutions){len=this.resolutions.length;this.scales=new Array(len);for(i=0;i<len;i++){this.scales[i]=OpenLayers.Util.getScaleFromResolution(this.resolutions[i],this.units);}
this.numZoomLevels=len;}
this.minResolution=minResolution;if(minResolution){this.maxScale=OpenLayers.Util.getScaleFromResolution(minResolution,this.units);}
this.maxResolution=maxResolution;if(maxResolution){this.minScale=OpenLayers.Util.getScaleFromResolution(maxResolution,this.units);}},resolutionsFromScales:function(scales){if(scales==null){return;}
var resolutions,i,len;len=scales.length;resolutions=new Array(len);for(i=0;i<len;i++){resolutions[i]=OpenLayers.Util.getResolutionFromScale(scales[i],this.units);}
return resolutions;},calculateResolutions:function(props){var viewSize,wRes,hRes;var maxResolution=props.maxResolution;if(props.minScale!=null){maxResolution=OpenLayers.Util.getResolutionFromScale(props.minScale,this.units);}else if(maxResolution=="auto"&&this.maxExtent!=null){viewSize=this.map.getSize();wRes=this.maxExtent.getWidth()/viewSize.w;hRes=this.maxExtent.getHeight()/viewSize.h;maxResolution=Math.max(wRes,hRes);}
var minResolution=props.minResolution;if(props.maxScale!=null){minResolution=OpenLayers.Util.getResolutionFromScale(props.maxScale,this.units);}else if(props.minResolution=="auto"&&this.minExtent!=null){viewSize=this.map.getSize();wRes=this.minExtent.getWidth()/viewSize.w;hRes=this.minExtent.getHeight()/viewSize.h;minResolution=Math.max(wRes,hRes);}
var maxZoomLevel=props.maxZoomLevel;var numZoomLevels=props.numZoomLevels;if(typeof minResolution==="number"&&typeof maxResolution==="number"&&numZoomLevels===undefined){var ratio=maxResolution/minResolution;numZoomLevels=Math.floor(Math.log(ratio)/Math.log(2))+1;}else if(numZoomLevels===undefined&&maxZoomLevel!=null){numZoomLevels=maxZoomLevel+1;}
if(typeof numZoomLevels!=="number"||numZoomLevels<=0||(typeof maxResolution!=="number"&&typeof minResolution!=="number")){return;}
var resolutions=new Array(numZoomLevels);var base=2;if(typeof minResolution=="number"&&typeof maxResolution=="number"){base=Math.pow((maxResolution/minResolution),(1/(numZoomLevels-1)));}
var i;if(typeof maxResolution==="number"){for(i=0;i<numZoomLevels;i++){resolutions[i]=maxResolution/Math.pow(base,i);}}else{for(i=0;i<numZoomLevels;i++){resolutions[numZoomLevels-1-i]=minResolution*Math.pow(base,i);}}
return resolutions;},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,i,len;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(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(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;var map=this.map;if(viewPortPx!=null&&map.minPx){var res=map.getResolution();var maxExtent=map.getMaxExtent({restricted:true});var lon=(viewPortPx.x-map.minPx.x)*res+maxExtent.left;var lat=(map.minPx.y-viewPortPx.y)*res+maxExtent.top;lonlat=new OpenLayers.LonLat(lon,lat);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(),'leftTolerance':this.getResolution()};bounds=bounds.wrapDateLine(this.maxExtent,wrappingOptions);}
return bounds;},CLASS_NAME:"OpenLayers.Layer"});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,options){this.layer=layer;this.position=position.clone();this.bounds=bounds.clone();this.url=url;if(size){this.size=size.clone();}
this.id=OpenLayers.Util.createUniqueID("Tile_");this.events=new OpenLayers.Events(this,null,this.EVENT_TYPES);OpenLayers.Util.extend(this,options);},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;},draw:function(){this.clear();return this.shouldDraw();},shouldDraw:function(){var maxExtent=this.layer.maxExtent;var withinMaxExtent=(maxExtent&&this.bounds.intersectsBounds(maxExtent,false));return withinMaxExtent||this.layer.displayOutsideMaxExtent;},moveTo:function(bounds,position,redraw){if(redraw==null){redraw=true;}
this.bounds=bounds.clone();this.position=position.clone();if(redraw){this.draw();}},clear:function(draw){},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;},CLASS_NAME:"OpenLayers.Tile"});OpenLayers.Tile.BackBufferable=OpenLayers.Class(OpenLayers.Tile,{backBufferMode:null,backBufferData:null,initialize:function(){OpenLayers.Tile.prototype.initialize.apply(this,arguments);var transitionSupported=OpenLayers.Util.indexOf(this.layer.SUPPORTED_TRANSITIONS,this.layer.transitionEffect)!=-1;this.backBufferMode=(this.layer.singleTile&&1)|(transitionSupported&&2);this.backBufferData={};if(!this.size){this.size=new OpenLayers.Size(256,256);}},draw:function(){var draw=OpenLayers.Tile.prototype.shouldDraw.apply(this,arguments),backBufferMode=this.backBufferMode;if(draw){this.updateBackBuffer();}
this.clear();if(!draw){this.resetBackBuffer();};return draw;},setBackBufferData:function(){this.backBufferData=OpenLayers.Util.extend(this.backBufferData,{bounds:this.bounds,resolution:this.layer.map.getResolution()});},updateBackBuffer:function(){var layer=this.layer,map=layer.map,backBufferMode=this.backBufferMode,data=this.backBufferData,tile=this.getTile(),backBuffer=data.tile,resolution=data.resolution,ratio=resolution?resolution/map.getResolution():1,notNeeded=!(ratio==1?backBufferMode&1:backBufferMode&2),noParent=tile&&tile.parentNode!==layer.div,noTile=!(tile&&tile.childNodes.length>0),noBackBuffer=!backBuffer&&this.isLoading;if(notNeeded||noParent||noTile||noBackBuffer){this.setBackBufferData();return;}
if(!backBuffer){backBuffer=this.createBackBuffer();layer.events.register("loadend",this,this.resetBackBuffer);data.tile=backBuffer;layer.div.insertBefore(backBuffer,tile);}
var lonLat={lon:data.bounds.left,lat:data.bounds.top},position=map.getPixelFromLonLat(lonLat),containerStyle=map.layerContainerDiv.style,leftOffset=parseInt(containerStyle.left,10),topOffset=parseInt(containerStyle.top,10),style=backBuffer.style;style.left=(position.x-leftOffset)+"px";style.top=(position.y-topOffset)+"px";style.width=(this.size.w*ratio)+"px";style.height=(this.size.h*ratio)+"px";return backBuffer;},resetBackBuffer:function(){this.layer.events.unregister("loadend",this,this.resetBackBuffer);this.removeBackBuffer();this.setBackBufferData();},removeBackBuffer:function(){var backBufferData=this.backBufferData;var backBuffer=backBufferData.tile;delete backBufferData.tile;var parent=backBuffer&&backBuffer.parentNode;if(backBuffer){parent.removeChild(backBuffer);}},destroy:function(){this.removeBackBuffer();this.layer.events.unregister("loadend",this,this.resetBackBuffer);this.backBufferData=null;OpenLayers.Tile.prototype.destroy.apply(this,arguments);}});OpenLayers.Tile.Image=OpenLayers.Class(OpenLayers.Tile.BackBufferable,{url:null,imgDiv:null,frame:null,imageReloadAttempts:null,layerAlphaHack:null,asyncRequestId:null,blankImageUrl:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAQAIBRAA7",maxGetUrlLength:null,initialize:function(layer,position,bounds,url,size,options){OpenLayers.Tile.BackBufferable.prototype.initialize.apply(this,arguments);this.url=url;this.frame=document.createElement("div");this.frame.style.position="absolute";this.frame.style.overflow="hidden";this.layerAlphaHack=this.layer.alpha&&OpenLayers.Util.alphaHack();if(this.maxGetUrlLength!=null){OpenLayers.Util.extend(this,OpenLayers.Tile.Image.IFrame);}},destroy:function(){if(this.frame!=null){this.clear();this.imgDiv=null;this.frame=null;}
this.asyncRequestId=null;OpenLayers.Tile.BackBufferable.prototype.destroy.apply(this,arguments);},draw:function(){var drawn=OpenLayers.Tile.BackBufferable.prototype.draw.apply(this,arguments);if(drawn){if(this.layer!=this.layer.map.baseLayer&&this.layer.reproject){this.bounds=this.getBoundsFromBaseLayer(this.position);}
if(this.isLoading){this.events.triggerEvent("reload");}else{this.isLoading=true;this.events.triggerEvent("loadstart");}
this.positionTile();this.renderTile();}else{this.unload();}
return drawn;},renderTile:function(){this.layer.div.appendChild(this.frame);if(this.layer.async){var myId=this.asyncRequestId=(this.asyncRequestId||0)+1;this.layer.getURLasync(this.bounds,this,"url",function(){if(myId==this.asyncRequestId){this.initImage();}});}else{this.url=this.layer.getURL(this.bounds);this.initImage();}},positionTile:function(){var style=this.frame.style;style.left=this.position.x+"px";style.top=this.position.y+"px";style.width=this.size.w+"px";style.height=this.size.h+"px";},clear:function(){var img=this.imgDiv;if(img){OpenLayers.Event.stopObservingElement(img);if(this.frame.parentNode===this.layer.div){this.layer.div.removeChild(this.frame);}
this.setImgSrc();if(this.layerAlphaHack===true){img.style.filter="";}
OpenLayers.Element.removeClass(img,"olImageLoadError");}},createImage:function(){var img=document.createElement("img");this.imgDiv=img;img.className="olTileImage";img.galleryImg="no";var style=img.style,gutter=this.layer.gutter;if(gutter){var tileSize=this.layer.tileSize,left=(gutter/tileSize.w*100),top=(gutter/tileSize.h*100);style.left=-left+"%";style.top=-top+"%";style.width=(2*left+100)+"%";style.height=(2*top+100)+"%";style.position="absolute";}else{style.width="100%";style.height="100%";}
style.display="none";if(this.layer.opacity<1){OpenLayers.Util.modifyDOMElement(img,null,null,null,null,null,null,this.layer.opacity);}
if(this.layerAlphaHack){style.paddingTop=style.height;style.height="0";}
this.frame.appendChild(img);return img;},initImage:function(){var img=this.imgDiv||this.createImage();if(this.url&&img.getAttribute("src")==this.url){this.onImageLoad();}else{var load=OpenLayers.Function.bind(function(){OpenLayers.Event.stopObservingElement(img);OpenLayers.Event.observe(img,"load",OpenLayers.Function.bind(this.onImageLoad,this));OpenLayers.Event.observe(img,"error",OpenLayers.Function.bind(this.onImageError,this));this.imageReloadAttempts=0;this.setImgSrc(this.url);},this);if(img.getAttribute("src")==this.blankImageUrl){load();}else{OpenLayers.Event.observe(img,"load",load);OpenLayers.Event.observe(img,"error",load);img.src=this.blankImageUrl;}}},setImgSrc:function(url){var img=this.imgDiv;img.style.display="none";if(url){img.src=url;}},getTile:function(){return this.frame;},createBackBuffer:function(){var frame=this.frame.cloneNode(false);frame.appendChild(this.imgDiv);this.imgDiv=null;return frame;},onImageLoad:function(){var img=this.imgDiv;OpenLayers.Event.stopObservingElement(img);img.style.display="";this.isLoading=false;this.events.triggerEvent("loadend");if(this.layerAlphaHack===true){img.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+
img.src+"', sizingMethod='scale')";}},onImageError:function(){var img=this.imgDiv;if(img.src!=null){this.imageReloadAttempts++;if(this.imageReloadAttempts<=OpenLayers.IMAGE_RELOAD_ATTEMPTS){this.setImgSrc(this.layer.getURL(this.bounds));}else{OpenLayers.Element.addClass(img,"olImageLoadError");this.onImageLoad();}}},CLASS_NAME:"OpenLayers.Tile.Image"});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"});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;OpenLayers.Geometry.prototype.destroy.apply(this,arguments);},clone:function(){var geometry=eval("new "+this.CLASS_NAME+"()");for(var i=0,len=this.components.length;i<len;i++){geometry.addComponent(this.components[i].clone());}
OpenLayers.Util.applyDefaults(geometry,this);return geometry;},getComponentsString:function(){var 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;var bounds=new OpenLayers.Bounds();var components=this.components;if(components){for(var i=0,len=components.length;i<len;i++){bounds.extend(components[i].getBounds());}}
if(bounds.left!=null&&bounds.bottom!=null&&bounds.right!=null&&bounds.top!=null){this.setBounds(bounds);}},addComponents:function(components){if(!(OpenLayers.Util.isArray(components))){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){var removed=false;if(!(OpenLayers.Util.isArray(components))){components=[components];}
for(var i=components.length-1;i>=0;--i){removed=this.removeComponent(components[i])||removed;}
return removed;},removeComponent:function(component){OpenLayers.Util.removeItem(this.components,component);this.clearBounds();return true;},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(weighted){if(!weighted){return this.components.length&&this.components[0].getCentroid();}
var len=this.components.length;if(!len){return false;}
var areas=[];var centroids=[];var areaSum=0;var minArea=Number.MAX_VALUE;var component;for(var i=0;i<len;++i){component=this.components[i];var area=component.getArea();var centroid=component.getCentroid(true);if(isNaN(area)||isNaN(centroid.x)||isNaN(centroid.y)){continue;}
areas.push(area);areaSum+=area;minArea=(area<minArea&&area>0)?area:minArea;centroids.push(centroid);}
len=areas.length;if(areaSum===0){for(var i=0;i<len;++i){areas[i]=1;}
areaSum=areas.length;}else{for(var i=0;i<len;++i){areas[i]/=minArea;}
areaSum/=minArea;}
var xSum=0,ySum=0,centroid,area;for(var i=0;i<len;++i){centroid=centroids[i];area=areas[i];xSum+=centroid.x*area;ySum+=centroid.y*area;}
return new OpenLayers.Geometry.Point(xSum/areaSum,ySum/areaSum);},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(!(OpenLayers.Util.isArray(geometry.components))||(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.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.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){var removed=this.components&&(this.components.length>2);if(removed){OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments);}
return removed;},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;},simplify:function(tolerance){if(this&&this!==null){var points=this.getVertices();if(points.length<3){return this;}
var compareNumbers=function(a,b){return(a-b);};var douglasPeuckerReduction=function(points,firstPoint,lastPoint,tolerance){var maxDistance=0;var indexFarthest=0;for(var index=firstPoint,distance;index<lastPoint;index++){distance=perpendicularDistance(points[firstPoint],points[lastPoint],points[index]);if(distance>maxDistance){maxDistance=distance;indexFarthest=index;}}
if(maxDistance>tolerance&&indexFarthest!=firstPoint){pointIndexsToKeep.push(indexFarthest);douglasPeuckerReduction(points,firstPoint,indexFarthest,tolerance);douglasPeuckerReduction(points,indexFarthest,lastPoint,tolerance);}};var perpendicularDistance=function(point1,point2,point){var area=Math.abs(0.5*(point1.x*point2.y+point2.x*point.y+point.x*point1.y-point2.x*point1.y-point.x*point2.y-point1.x*point.y));var bottom=Math.sqrt(Math.pow(point1.x-point2.x,2)+Math.pow(point1.y-point2.y,2));var height=area/bottom*2;return height;};var firstPoint=0;var lastPoint=points.length-1;var pointIndexsToKeep=[];pointIndexsToKeep.push(firstPoint);pointIndexsToKeep.push(lastPoint);while(points[firstPoint].equals(points[lastPoint])){lastPoint--;pointIndexsToKeep.push(lastPoint);}
douglasPeuckerReduction(points,firstPoint,lastPoint,tolerance);var returnPoints=[];pointIndexsToKeep.sort(compareNumbers);for(var index=0;index<pointIndexsToKeep.length;index++){returnPoints.push(points[pointIndexsToKeep[index]]);}
return new OpenLayers.Geometry.LineString(returnPoints);}
else{return this;}},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){var removed=this.components&&(this.components.length>3);if(removed){this.components.pop();OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments);var firstPoint=this.components[0];OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,[firstPoint]);}
return removed;},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"});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});Ext.namespace('App');App.ContextPopup=OpenLayers.Class(OpenLayers.Control,{map:null,serviceUrl:null,defaultHandlerOptions:{'single':true,'double':false,'pixelTolerance':0,'stopSingle':false,'stopDouble':false},handleRightClicks:true,initialize:function(options){this.eventMethods={'rightclick':function(e){var lonlatCH=this.map.getLonLatFromViewPortPx(e.xy);this.xy=e.xy;var lonlat=lonlatCH.clone();var paramsObject=OpenLayers.Util.getParameters(Ext.state.Manager.getProvider().getLink());paramsObject.map_x=lonlat.lon;paramsObject.map_y=lonlat.lat;if(!paramsObject.zoom){paramsObject.zoom=0;}
var params=OpenLayers.Util.getParameterString(paramsObject);var html="<table><tr><td width=\"150\">{swiss_coord_label}</td>"+"<td>{swiss_x} {swiss_y}</td></tr>"+"<tr><td>{wsg_coord_label}</td><td>{wsg_x} {wsg_y}</td></tr><tr><td>{elevation_label} (Terrain)</td><td>{elevation_dtm} [m] </td></tr>"+"<tr><td>{elevation_label} (Surface)</td><td>{elevation_dsm} [m] </td></tr>"+"<tr><td>Hauteur (Surface-Terrain)</td><td>{elevation_dhm} [m] </td></tr>"+"<tr><td>Pente du terrain</td><td>{elevation_slope} [° dég.] - {elevation_slope_percents} [%]</td></tr>"+"<tr><td colspan=2><a href=\"?{params}\" target='new'>{link_label}</a></td></tr></table>";var tpl=new Ext.Template(html);tpl.compile();Ext.Ajax.request({url:this.serviceUrl,success:function(response){var x=Ext.decode(response.responseText);var swiss_x=(Math.round(lonlat.lon*10)/10).toFixed(1);var swiss_y=(Math.round(lonlat.lat*10)/10).toFixed(1);lonlat.transform(this.map.getProjectionObject(),new OpenLayers.Projection("EPSG:4326"));var Dh=Math.round((x.coordinates2-x.coordinates)*10)/10;if(Dh<0){Dh=0;}
var content=tpl.apply({'swiss_coord_label':OpenLayers.i18n('Swiss Coordinate'),'params':params+'&map_crosshair=1','swiss_x':swiss_x,'swiss_y':swiss_y,'wsg_coord_label':OpenLayers.i18n('WGS 84'),'wsg_x':Math.round(lonlat.lon*100000)/100000,'wsg_y':Math.round(lonlat.lat*100000)/100000,'elevation_label':OpenLayers.i18n('Elevation'),'elevation_dtm':x.coordinates,'elevation_dsm':x.coordinates2,'elevation_slope':x.coordinates3,'elevation_slope_percents':Math.round(100*Math.tan(x.coordinates3*Math.PI/180)),'elevation_dhm':Dh,'link_label':OpenLayers.i18n("Link here")});if(this.popup){this.popup.destroy();}
this.popup=new GeoExt.Popup({cls:'positionPopup',title:OpenLayers.i18n('Position'),location:this.map.getLonLatFromPixel(this.xy),width:300,map:this.map,html:content,maximizable:false,collapsible:false,unpinnable:false});this.popup.show();},method:'GET',params:{lon:lonlat.lon,lat:lonlat.lat},scope:this});}};this.handlerOptions=OpenLayers.Util.extend({},this.defaultHandlerOptions);OpenLayers.Control.prototype.initialize.apply(this,arguments);this.handler=new OpenLayers.Handler.Click(this,this.eventMethods,this.handlerOptions);this.map.viewPortDiv.oncontextmenu=function(e){e=e?e:window.event;if(e.preventDefault){e.preventDefault();}
else{return false;}};this.map.addControl(this);this.activate();},CLASS_NAME:"App.ContextPopup"});Ext.namespace('GeoExt.ux');GeoExt.ux.StreetViewClick=OpenLayers.Class(OpenLayers.Control,{defaultHandlerOptions:{'single':true,'double':false,'pixelTolerance':0,'stopSingle':false,'stopDouble':false},initialize:function(options){this.handlerOptions=OpenLayers.Util.extend({},this.defaultHandlerOptions);OpenLayers.Control.prototype.initialize.apply(this,arguments);this.handler=new OpenLayers.Handler.Click(this,{'click':this.onClick,'dblclick':this.onDblclick},this.handlerOptions);},onClick:function(evt){var lonlat=this.map.getLonLatFromViewPortPx(evt.xy);lonlat.transform(this.map.getProjectionObject(),new OpenLayers.Projection("EPSG:4326"));var clickedPosition=new GLatLng(lonlat.lat,lonlat.lon);this.streetviewclient.getNearestPanorama(clickedPosition,this.panorama.callback.createDelegate(this));},onDblclick:function(evt){alert('doubleClick');}});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;var map=this.map||control.map;if(map){this.setMap(map);}
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.Point=OpenLayers.Class(OpenLayers.Handler,{point:null,layer:null,multi:false,citeCompliant:false,mouseDown:false,stoppedDown:null,lastDown:null,lastUp:null,persist:false,stopDown:false,stopUp:false,layerOptions:null,pixelTolerance:5,touch:false,lastTouchPx: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,wrapDateLine:this.citeCompliant},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.layer.getLonLatFromViewPortPx(pixel);var geometry=new OpenLayers.Geometry.Point(lonlat.lon,lonlat.lat);this.point=new OpenLayers.Feature.Vector(geometry);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;}
this.cancel();if(this.layer.map!=null){this.destroyFeature(true);this.layer.destroy(false);}
this.layer=null;this.touch=false;return true;},destroyFeature:function(force){if(this.layer&&(force||!this.persist)){this.layer.destroyFeatures();}
this.point=null;},destroyPersistedFeature:function(){var layer=this.layer;if(layer&&layer.features.length>1){this.layer.features[0].destroy();}},finalize:function(cancel){var key=cancel?"cancel":"done";this.mouseDown=false;this.lastDown=null;this.lastUp=null;this.lastTouchPx=null;this.callback(key,[this.geometryClone()]);this.destroyFeature(cancel);},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){if(!this.point){this.createFeature(pixel);}
var lonlat=this.layer.getLonLatFromViewPortPx(pixel);this.point.geometry.x=lonlat.lon;this.point.geometry.y=lonlat.lat;this.callback("modify",[this.point.geometry,this.point,false]);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){return this.down(evt);},touchstart:function(evt){if(!this.touch){this.touch=true;this.map.events.un({mousedown:this.mousedown,mouseup:this.mouseup,mousemove:this.mousemove,click:this.click,dblclick:this.dblclick,scope:this});}
this.lastTouchPx=evt.xy;return this.down(evt);},mousemove:function(evt){return this.move(evt);},touchmove:function(evt){this.lastTouchPx=evt.xy;return this.move(evt);},mouseup:function(evt){return this.up(evt);},touchend:function(evt){evt.xy=this.lastTouchPx;return this.up(evt);},down:function(evt){this.mouseDown=true;this.lastDown=evt.xy;if(!this.touch){this.modifyFeature(evt.xy);}
this.stoppedDown=this.stopDown;return!this.stopDown;},move:function(evt){if(!this.touch&&(!this.mouseDown||this.stoppedDown)){this.modifyFeature(evt.xy);}
return true;},up:function(evt){this.mouseDown=false;this.stoppedDown=this.stopDown;if(!this.checkModifiers(evt)){return true;}
if(this.lastUp&&this.lastUp.equals(evt.xy)){return true;}
if(this.lastDown&&this.passesTolerance(this.lastDown,evt.xy,this.pixelTolerance)){if(this.touch){this.modifyFeature(evt.xy);}
if(this.persist){this.destroyPersistedFeature();}
this.lastUp=evt.xy;this.finalize();return!this.stopUp;}else{return true;}},mouseout:function(evt){if(OpenLayers.Util.mouseLeft(evt,this.map.eventsDiv)){this.stoppedDown=this.stopDown;this.mouseDown=false;}},passesTolerance:function(pixel1,pixel2,tolerance){var passes=true;if(tolerance!=null&&pixel1&&pixel2){var dist=pixel1.distanceTo(pixel2);if(dist>tolerance){passes=false;}}
return passes;},CLASS_NAME:"OpenLayers.Handler.Point"});OpenLayers.Handler.Path=OpenLayers.Class(OpenLayers.Handler.Point,{line:null,maxVertices:null,doubleTouchTolerance:20,freehand:false,freehandToggle:'shiftKey',timerId:null,redoStack:null,initialize:function(control,callbacks,options){OpenLayers.Handler.Point.prototype.initialize.apply(this,arguments);},createFeature:function(pixel){var lonlat=this.layer.getLonLatFromViewPortPx(pixel);var geometry=new OpenLayers.Geometry.Point(lonlat.lon,lonlat.lat);this.point=new OpenLayers.Feature.Vector(geometry);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(force){OpenLayers.Handler.Point.prototype.destroyFeature.call(this,force);this.line=null;},destroyPersistedFeature:function(){var layer=this.layer;if(layer&&layer.features.length>2){this.layer.features[0].destroy();}},removePoint:function(){if(this.point){this.layer.removeFeatures([this.point]);}},addPoint:function(pixel){this.layer.removeFeatures([this.point]);var lonlat=this.layer.getLonLatFromViewPortPx(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.layer.addFeatures([this.point]);this.callback("point",[this.point.geometry,this.getGeometry()]);this.callback("modify",[this.point.geometry,this.getSketch()]);this.drawFeature();delete this.redoStack;},insertXY:function(x,y){this.line.geometry.addComponent(new OpenLayers.Geometry.Point(x,y),this.getCurrentPointIndex());this.drawFeature();delete this.redoStack;},insertDeltaXY:function(dx,dy){var previousIndex=this.getCurrentPointIndex()-1;var p0=this.line.geometry.components[previousIndex];if(p0&&!isNaN(p0.x)&&!isNaN(p0.y)){this.insertXY(p0.x+dx,p0.y+dy);}},insertDirectionLength:function(direction,length){direction*=Math.PI/180;var dx=length*Math.cos(direction);var dy=length*Math.sin(direction);this.insertDeltaXY(dx,dy);},insertDeflectionLength:function(deflection,length){var previousIndex=this.getCurrentPointIndex()-1;if(previousIndex>0){var p1=this.line.geometry.components[previousIndex];var p0=this.line.geometry.components[previousIndex-1];var theta=Math.atan2(p1.y-p0.y,p1.x-p0.x);this.insertDirectionLength((theta*180/Math.PI)+deflection,length);}},getCurrentPointIndex:function(){return this.line.geometry.components.length-1;},undo:function(){var geometry=this.line.geometry;var components=geometry.components;var index=this.getCurrentPointIndex()-1;var target=components[index];var undone=geometry.removeComponent(target);if(undone){if(!this.redoStack){this.redoStack=[];}
this.redoStack.push(target);this.drawFeature();}
return undone;},redo:function(){var target=this.redoStack&&this.redoStack.pop();if(target){this.line.geometry.addComponent(target,this.getCurrentPointIndex());this.drawFeature();}
return!!target;},freehandMode:function(evt){return(this.freehandToggle&&evt[this.freehandToggle])?!this.freehand:this.freehand;},modifyFeature:function(pixel,drawing){if(!this.line){this.createFeature(pixel);}
var lonlat=this.layer.getLonLatFromViewPortPx(pixel);this.point.geometry.x=lonlat.lon;this.point.geometry.y=lonlat.lat;this.callback("modify",[this.point.geometry,this.getSketch(),drawing]);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;},touchstart:function(evt){if(this.timerId&&this.passesTolerance(this.lastTouchPx,evt.xy,this.doubleTouchTolerance)){this.finishGeometry();window.clearTimeout(this.timerId);this.timerId=null;return false;}else{if(this.timerId){window.clearTimeout(this.timerId);this.timerId=null;}
this.timerId=window.setTimeout(OpenLayers.Function.bind(function(){this.timerId=null;},this),300);return OpenLayers.Handler.Point.prototype.touchstart.call(this,evt);}},down:function(evt){var stopDown=this.stopDown;if(this.freehandMode(evt)){stopDown=true;if(this.touch){this.modifyFeature(evt.xy,!!this.lastUp);OpenLayers.Event.stop(evt);}}
if(!this.touch&&(!this.lastDown||!this.passesTolerance(this.lastDown,evt.xy,this.pixelTolerance))){this.modifyFeature(evt.xy,!!this.lastUp);}
this.mouseDown=true;this.lastDown=evt.xy;this.stoppedDown=stopDown;return!stopDown;},move:function(evt){if(this.stoppedDown&&this.freehandMode(evt)){if(this.persist){this.destroyPersistedFeature();}
this.addPoint(evt.xy);return false;}
if(!this.touch&&(!this.mouseDown||this.stoppedDown)){this.modifyFeature(evt.xy,!!this.lastUp);}
return true;},up:function(evt){if(this.mouseDown&&(!this.lastUp||!this.lastUp.equals(evt.xy))){if(this.stoppedDown&&this.freehandMode(evt)){if(this.persist){this.destroyPersistedFeature();}
this.removePoint();this.finalize();}else{if(this.passesTolerance(this.lastDown,evt.xy,this.pixelTolerance)){if(this.touch){this.modifyFeature(evt.xy);}
if(this.lastUp==null&&this.persist){this.destroyPersistedFeature();}
this.addPoint(evt.xy);this.lastUp=evt.xy;if(this.line.geometry.components.length===this.maxVertices+1){this.finishGeometry();}}}}
this.stoppedDown=this.stopDown;this.mouseDown=false;return!this.stopUp;},finishGeometry:function(){var index=this.line.geometry.components.length-1;this.line.geometry.removeComponent(this.line.geometry.components[index]);this.removePoint();this.finalize();},dblclick:function(evt){if(!this.freehandMode(evt)){this.finishGeometry();}
return false;},CLASS_NAME:"OpenLayers.Handler.Path"});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.Handler.Polygon=OpenLayers.Class(OpenLayers.Handler.Path,{holeModifier:null,drawingHole:false,polygon:null,initialize:function(control,callbacks,options){OpenLayers.Handler.Path.prototype.initialize.apply(this,arguments);},createFeature:function(pixel){var lonlat=this.layer.getLonLatFromViewPortPx(pixel);var geometry=new OpenLayers.Geometry.Point(lonlat.lon,lonlat.lat);this.point=new OpenLayers.Feature.Vector(geometry);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});},addPoint:function(pixel){if(!this.drawingHole&&this.holeModifier&&this.evt&&this.evt[this.holeModifier]){var geometry=this.point.geometry;var features=this.control.layer.features;var candidate,polygon;for(var i=features.length-1;i>=0;--i){candidate=features[i].geometry;if((candidate instanceof OpenLayers.Geometry.Polygon||candidate instanceof OpenLayers.Geometry.MultiPolygon)&&candidate.intersects(geometry)){polygon=features[i];this.control.layer.removeFeatures([polygon],{silent:true});this.control.layer.events.registerPriority("sketchcomplete",this,this.finalizeInteriorRing);this.control.layer.events.registerPriority("sketchmodified",this,this.enforceTopology);polygon.geometry.addComponent(this.line.geometry);this.polygon=polygon;this.drawingHole=true;break;}}}
OpenLayers.Handler.Path.prototype.addPoint.apply(this,arguments);},getCurrentPointIndex:function(){return this.line.geometry.components.length-2;},enforceTopology:function(event){var point=event.vertex;var components=this.line.geometry.components;if(!this.polygon.geometry.intersects(point)){var last=components[components.length-3];point.x=last.x;point.y=last.y;}},finishGeometry:function(){var index=this.line.geometry.components.length-2;this.line.geometry.removeComponent(this.line.geometry.components[index]);this.removePoint();this.finalize();},finalizeInteriorRing:function(){var ring=this.line.geometry;var modified=(ring.getArea()!==0);if(modified){var rings=this.polygon.geometry.components;for(var i=rings.length-2;i>=0;--i){if(ring.intersects(rings[i])){modified=false;break;}}
if(modified){var target;outer:for(var i=rings.length-2;i>0;--i){var points=rings[i].components;for(var j=0,jj=points.length;j<jj;++j){if(ring.containsPoint(points[j])){modified=false;break outer;}}}}}
if(modified){if(this.polygon.state!==OpenLayers.State.INSERT){this.polygon.state=OpenLayers.State.UPDATE;}}else{this.polygon.geometry.removeComponent(ring);}
this.restoreFeature();return false;},cancel:function(){if(this.drawingHole){this.polygon.geometry.removeComponent(this.line.geometry);this.restoreFeature(true);}
return OpenLayers.Handler.Path.prototype.cancel.apply(this,arguments);},restoreFeature:function(cancel){this.control.layer.events.unregister("sketchcomplete",this,this.finalizeInteriorRing);this.control.layer.events.unregister("sketchmodified",this,this.enforceTopology);this.layer.removeFeatures([this.polygon],{silent:true});this.control.layer.addFeatures([this.polygon],{silent:true});this.drawingHole=false;if(!cancel){this.control.layer.events.triggerEvent("sketchcomplete",{feature:this.polygon});}},destroyFeature:function(force){OpenLayers.Handler.Path.prototype.destroyFeature.call(this,force);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;},CLASS_NAME:"OpenLayers.Handler.Polygon"});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},'touchstart':{'in':'click','out':'clickout'}},feature:null,lastFeature:null,down:null,up:null,touch:false,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;},touchstart:function(evt){if(!this.touch){this.touch=true;this.map.events.un({mousedown:this.mousedown,mouseup:this.mouseup,mousemove:this.mousemove,click:this.click,dblclick:this.dblclick,scope:this});}
return OpenLayers.Event.isMultiTouch(evt)?true:this.mousedown(evt);},touchmove:function(evt){OpenLayers.Event.stop(evt);},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"||type=="touchstart");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){if(type==="touchstart"){OpenLayers.Event.stop(evt);}
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.touch=false;this.map.events.un({"removelayer":this.handleMapEvents,"changelayer":this.handleMapEvents,scope:this});deactivated=true;}
return deactivated;},handleMapEvents:function(evt){if(evt.type=="removelayer"||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);OpenLayers.Util.extend(this,options);},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){var xOffset=isNaN(style.labelXOffset)?0:style.labelXOffset;var 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(!(OpenLayers.Util.isArray(features))){features=[features];}
for(var i=0,len=features.length;i<len;++i){var feature=features[i];this.eraseGeometry(feature.geometry,feature.id);this.removeText(feature.id);}},eraseGeometry:function(geometry,featureId){},moveRoot:function(renderer){},getRenderLayerId:function(){return this.container.id;},applyDefaultSymbolizer:function(symbolizer){var result=OpenLayers.Util.extend({},OpenLayers.Renderer.defaultSymbolizer);if(symbolizer.stroke===false){delete result.strokeWidth;delete result.strokeColor;}
if(symbolizer.fill===false){delete result.fillColor;}
OpenLayers.Util.extend(result,symbolizer);return result;},CLASS_NAME:"OpenLayers.Renderer"});OpenLayers.Renderer.defaultSymbolizer={fillColor:"#000000",strokeColor:"#000000",strokeWidth:2,fillOpacity:1,strokeOpacity:1,pointRadius:0};OpenLayers.Style=OpenLayers.Class({id:null,name:null,title:null,description:null,layerName:null,isDefault:false,rules:null,context:null,defaultStyle:null,defaultsPerSymbolizer:false,propertyStyles:null,initialize:function(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"]);this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");},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";}
if(style.label&&typeof style.label!=="string"){style.label=String(style.label);}
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){Array.prototype.push.apply(this.rules,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];}}},clone:function(){var options=OpenLayers.Util.extend({},this);if(this.rules){options.rules=[];for(var i=0,len=this.rules.length;i<len;++i){options.rules.push(this.rules[i].clone());}}
options.context=this.context&&OpenLayers.Util.extend({},this.context);var defaultStyle=OpenLayers.Util.extend({},this.defaultStyle);return new OpenLayers.Style(defaultStyle,options);},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','Raster'];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","beforefeaturesremoved","featureremoved","featuresremoved","beforefeatureselected","featureselected","featureunselected","beforefeaturemodified","featuremodified","afterfeaturemodified","vertexmodified","vertexremoved","sketchstarted","sketchmodified","sketchcomplete","refresh"],isBaseLayer:false,isFixed:false,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=this.renderers[i];var renderer=(typeof rendererClass=="function")?rendererClass:OpenLayers.Renderer[rendererClass];if(renderer&&renderer.prototype.supported()){this.renderer=new renderer(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){this.drawn=false;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 ng=(OpenLayers.Renderer.NG&&this.renderer instanceof OpenLayers.Renderer.NG);if(ng){dragging||this.renderer.updateDimensions(zoomChanged);}else{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(OpenLayers.IS_GECKO===true){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||(!ng&&(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);}}},redraw:function(){if(OpenLayers.Renderer.NG&&this.renderer instanceof OpenLayers.Renderer.NG){this.drawn=false;}
return OpenLayers.Layer.prototype.redraw.apply(this,arguments);},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(!(OpenLayers.Util.isArray(features))){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;}
var featuresAdded=[];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;}
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);}
featuresAdded.push(feature);this.features.push(feature);this.drawFeature(feature);if(notify){this.events.triggerEvent("featureadded",{feature:feature});this.onFeatureInsert(feature);}}
if(notify){this.events.triggerEvent("featuresadded",{features:featuresAdded});}},removeFeatures:function(features,options){if(!features||features.length===0){return;}
if(features===this.features){return this.removeAllFeatures(options);}
if(!(OpenLayers.Util.isArray(features))){features=[features];}
if(features===this.selectedFeatures){features=features.slice();}
var notify=!options||!options.silent;if(notify){this.events.triggerEvent("beforefeaturesremoved",{features:features});}
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});}},removeAllFeatures:function(options){var notify=!options||!options.silent;var features=this.features;if(notify){this.events.triggerEvent("beforefeaturesremoved",{features:features});}
var feature;for(var i=features.length-1;i>=0;i--){feature=features[i];if(notify){this.events.triggerEvent("beforefeatureremoved",{feature:feature});}
feature.layer=null;if(notify){this.events.triggerEvent("featureremoved",{feature:feature});}}
this.renderer.clear();this.features=[];this.unrenderedFeatures={};this.selectedFeatures=[];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);}}
var drawn=this.renderer.drawFeature(feature,style);if(drawn===false||drawn===null){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 feature=null;var featureId=this.renderer.getFeatureIdFromEvent(evt);if(featureId){if(typeof featureId==="string"){feature=this.getFeatureById(featureId);}else{feature=featureId;}}
return feature;},getFeatureBy:function(property,value){var feature=null;for(var i=0,len=this.features.length;i<len;++i){if(this.features[i][property]==value){feature=this.features[i];break;}}
return feature;},getFeatureById:function(featureId){return this.getFeatureBy('id',featureId);},getFeatureByFid:function(featureFid){return this.getFeatureBy('fid',featureFid);},getFeaturesByAttribute:function(attrName,attrValue){var i,feature,len=this.features.length,foundFeatures=[];for(i=0;i<len;i++){feature=this.features[i];if(feature&&feature.attributes){if(feature.attributes[attrName]===attrValue){foundFeatures.push(feature);}}}
return foundFeatures;},onFeatureInsert:function(feature){},preFeatureInsert:function(feature){},getDataExtent:function(){var maxExtent=null;var features=this.features;if(features&&(features.length>0)){var geometry=null;for(var i=0,len=features.length;i<len;i++){geometry=features[i].geometry;if(geometry){if(maxExtent===null){maxExtent=new OpenLayers.Bounds();}
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(OpenLayers.Util.isArray(layers)){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;if(feature._prevHighlighter==undefined){delete feature._lastHighlighter;}else if(feature._prevHighlighter==this.id){delete feature._prevHighlighter;}else{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.Handler.Drag=OpenLayers.Class(OpenLayers.Handler,{started:false,stopDown:true,dragging:false,touch:false,last:null,start:null,lastMoveEvt:null,oldOnselectstart:null,interval:0,timeoutId:null,documentDrag:false,documentEvents:null,initialize:function(control,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,arguments);if(this.documentDrag===true){var me=this;this._docMove=function(evt){me.mousemove({xy:{x:evt.clientX,y:evt.clientY},element:document});};this._docUp=function(evt){me.mouseup({xy:{x:evt.clientX,y:evt.clientY}});};}},dragstart:function(evt){var propagate=true;this.dragging=false;if(this.checkModifiers(evt)&&(OpenLayers.Event.isLeftClick(evt)||OpenLayers.Event.isSingleTouch(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;},dragmove:function(evt){this.lastMoveEvt=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.removeDocumentEvents();}}
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=evt.xy;}
return true;},dragend:function(evt){if(this.started){if(this.documentDrag===true&&this.documentEvents){this.adjustXY(evt);this.removeDocumentEvents();}
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;},down:function(evt){},move:function(evt){},up:function(evt){},out:function(evt){},mousedown:function(evt){return this.dragstart(evt);},touchstart:function(evt){if(!this.touch){this.touch=true;this.map.events.un({mousedown:this.mousedown,mouseup:this.mouseup,mousemove:this.mousemove,click:this.click,scope:this});}
return this.dragstart(evt);},mousemove:function(evt){return this.dragmove(evt);},touchmove:function(evt){return this.dragmove(evt);},removeTimeout:function(){this.timeoutId=null;if(this.dragging){this.mousemove(this.lastMoveEvt);}},mouseup:function(evt){return this.dragend(evt);},touchend:function(evt){evt.xy=this.last;return this.dragend(evt);},mouseout:function(evt){if(this.started&&OpenLayers.Util.mouseLeft(evt,this.map.eventsDiv)){if(this.documentDrag===true){this.addDocumentEvents();}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.touch=false;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.viewPortDiv);evt.xy.x-=pos[0];evt.xy.y-=pos[1];},addDocumentEvents:function(){OpenLayers.Element.addClass(document.body,"olDragDown");this.documentEvents=true;OpenLayers.Event.observe(document,"mousemove",this._docMove);OpenLayers.Event.observe(document,"mouseup",this._docUp);},removeDocumentEvents:function(){OpenLayers.Element.removeClass(document.body,"olDragDown");this.documentEvents=false;OpenLayers.Event.stopObserving(document,"mousemove",this._docMove);OpenLayers.Event.stopObserving(document,"mouseup",this._docUp);},CLASS_NAME:"OpenLayers.Handler.Drag"});OpenLayers.Control.DragFeature=OpenLayers.Class(OpenLayers.Control,{geometryTypes:null,onStart:function(feature,pixel){},onDrag:function(feature,pixel){},onComplete:function(feature,pixel){},onEnter:function(feature){},onLeave:function(feature){},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({click:this.clickFeature,clickout:this.clickoutFeature,over:this.overFeature,out:this.outFeature},this.featureCallbacks),{geometryTypes:this.geometryTypes})};},clickFeature:function(feature){if(this.handlers.feature.touch&&!this.over&&this.overFeature(feature)){this.handlers.drag.dragstart(this.handlers.feature.evt);this.handlers.drag.stopDown=false;}},clickoutFeature:function(feature){if(this.handlers.feature.touch&&this.over){this.outFeature(feature);this.handlers.drag.stopDown=true;}},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){var activated=false;if(!this.handlers.drag.dragging){this.feature=feature;this.handlers.drag.activate();activated=true;this.over=true;OpenLayers.Element.addClass(this.map.viewPortDiv,this.displayClass+"Over");this.onEnter(feature);}else{if(this.feature.id==feature.id){this.over=true;}else{this.over=false;}}
return activated;},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.onLeave(feature);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,vertexRenderIntent:null,mode:null,modified:false,radiusHandle:null,dragHandle:null,onModificationStart:function(){},onModification:function(){},onModificationEnd:function(){},initialize:function(layer,options){options=options||{};this.layer=layer;this.vertices=[];this.virtualVertices=[];this.virtualStyle=OpenLayers.Util.extend({},this.layer.style||this.layer.styleMap.createSymbolizer(null,options.vertexRenderIntent));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(!(OpenLayers.Util.isArray(this.deleteCodes))){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){if(!this.standalone||this.beforeSelectFeature(feature)!==false){this.feature=feature;this.modified=false;this.resetVertices();this.dragControl.activate();this.onModificationStart(this.feature);}
var modified=feature.modified;if(feature.geometry&&!(modified&&modified.geometry)){this._originalGeometry=feature.geometry.clone();}},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;if(this.modified&&this._originalGeometry){var feature=this.feature;feature.modified=OpenLayers.Util.extend(feature.modified,{geometry:this._originalGeometry});delete this._originalGeometry;}}},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.events.triggerEvent("vertexremoved",{vertex:vertex.geometry,feature:this.feature,pixel:evt.xy});this.layer.drawFeature(this.feature,this.standalone?undefined:this.selectControl.renderIntent);this.modified=true;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;vertex.renderIntent=control.vertexRenderIntent;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;vertex.renderIntent=control.vertexRenderIntent;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;Ext.namespace("GeoExt.tree");GeoExt.tree.TreeNodeUIEventMixin=function(){return{constructor:function(node){node.addEvents("rendernode","rawclicknode");this.superclass=arguments.callee.superclass;this.superclass.constructor.apply(this,arguments);},render:function(bulkRender){if(!this.rendered){this.superclass.render.apply(this,arguments);this.fireEvent("rendernode",this.node);}},onClick:function(e){if(this.fireEvent("rawclicknode",this.node,e)!==false){this.superclass.onClick.apply(this,arguments);}}}};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.Symbolizer=OpenLayers.Class({zIndex:0,initialize:function(config){OpenLayers.Util.extend(this,config);},clone:function(){var Type=eval(this.CLASS_NAME);return new Type(OpenLayers.Util.extend({},this));},CLASS_NAME:"OpenLayers.Symbolizer"});OpenLayers.Symbolizer.Raster=OpenLayers.Class(OpenLayers.Symbolizer,{initialize:function(config){OpenLayers.Symbolizer.prototype.initialize.apply(this,arguments);},CLASS_NAME:"OpenLayers.Symbolizer.Raster"});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"});Ext.namespace("GeoExt.form");GeoExt.form.toFilter=function(form,logicalOp,wildcard){if(form instanceof Ext.form.FormPanel){form=form.getForm();}
var filters=[],values=form.getValues(false);for(var prop in values){var s=prop.split("__");var value=values[prop],type;if(s.length>1&&(type=GeoExt.form.toFilter.FILTER_MAP[s[1]])!==undefined){prop=s[0];}else{type=OpenLayers.Filter.Comparison.EQUAL_TO;}
if(type===OpenLayers.Filter.Comparison.LIKE){switch(wildcard){case GeoExt.form.ENDS_WITH:value='.*'+value;break;case GeoExt.form.STARTS_WITH:value+='.*';break;case GeoExt.form.CONTAINS:value='.*'+value+'.*';break;default:break;}}
filters.push(new OpenLayers.Filter.Comparison({type:type,value:value,property:prop}));}
return filters.length==1&&logicalOp!=OpenLayers.Filter.Logical.NOT?filters[0]:new OpenLayers.Filter.Logical({type:logicalOp||OpenLayers.Filter.Logical.AND,filters:filters});};GeoExt.form.toFilter.FILTER_MAP={"eq":OpenLayers.Filter.Comparison.EQUAL_TO,"ne":OpenLayers.Filter.Comparison.NOT_EQUAL_TO,"lt":OpenLayers.Filter.Comparison.LESS_THAN,"le":OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO,"gt":OpenLayers.Filter.Comparison.GREATER_THAN,"ge":OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO,"like":OpenLayers.Filter.Comparison.LIKE};GeoExt.form.ENDS_WITH=1;GeoExt.form.STARTS_WITH=2;GeoExt.form.CONTAINS=3;GeoExt.form.recordToField=function(record){var type=record.get("type");if(typeof type==="object"&&type.xtype){return type;}
var field;var name=record.get("name");var label=record.get("label");var restriction=record.get("restriction")||{};if(label==null){label=name;}
type=type.split(":").pop();var r=GeoExt.form.recordToField.REGEXES;if(type.match(r["text"])){var maxLength=restriction["maxLength"]!==undefined?parseFloat(restriction["maxLength"]):undefined;var minLength=restriction["minLength"]!==undefined?parseFloat(restriction["minLength"]):undefined;field={xtype:"textfield",name:name,fieldLabel:label,maxLength:maxLength,minLength:minLength};}else if(type.match(r["number"])){var maxValue=restriction["maxInclusive"]!==undefined?parseFloat(restriction["maxInclusive"]):undefined;var minValue=restriction["minInclusive"]!==undefined?parseFloat(restriction["minInclusive"]):undefined;field={xtype:"numberfield",name:name,fieldLabel:label,maxValue:maxValue,minValue:minValue};}else if(type.match(r["boolean"])){field={xtype:"checkbox",name:name,boxLabel:label};}else if(type.match(r["date"])){field={xtype:"datefield",fieldLabel:label,name:name,format:'c'};}
return field;};GeoExt.form.recordToField.REGEXES={"text":new RegExp("^(text|string)$","i"),"number":new RegExp("^(number|float|decimal|double|int|long|integer|short)$","i"),"boolean":new RegExp("^(boolean)$","i"),"date":new RegExp("^(date|dateTime)$","i")};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,styler:null,initComponent:function(){this.initFeatures(this.features);this.initToolbar();this.initMyItems();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())});},initMyItems: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);switch(this.styler)
{case"combobox":if(!GeoExt.ux.LayerStyleManager){break;}
var styleStore=new Ext.data.SimpleStore(GeoExt.ux.data.getFeatureEditingDefaultStyleStoreOptions());styleStore.sort('name');var styler=new GeoExt.ux.LayerStyleManager(new GeoExt.ux.StyleSelectorComboBox({store:styleStore,comboBoxOptions:{emptyText:OpenLayers.i18n("select a color..."),fieldLabel:OpenLayers.i18n('color')}}),{});oGroup={xtype:'fieldset',title:OpenLayers.i18n('Style'),layout:'form',collapsible:true,autoHeight:this.autoHeight,autoWidth:this.autoWidth,defaults:this.defaults,defaultType:this.defaultType,items:[styler.createLayout().comboBox]};oItems.push(oGroup);styler.setCurrentFeature(this.features[0]);break;}
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);Ext.namespace("GeoExt.tree");GeoExt.tree.LayerParamNode=Ext.extend(Ext.tree.TreeNode,{layer:null,param:null,item:null,delimiter:null,allItems:null,constructor:function(attributes){var config=attributes||{};config.iconCls=config.iconCls||"gx-tree-layerparam-icon";config.text=config.text||config.item;this.param=config.param;this.item=config.item;this.delimiter=config.delimiter||",";this.allItems=config.allItems;GeoExt.tree.LayerParamNode.superclass.constructor.apply(this,arguments);this.getLayer();if(this.layer){if(!this.allItems){this.allItems=this.getItemsFromLayer();}
if(this.attributes.checked==null){this.attributes.checked=this.layer.getVisibility()&&this.getItemsFromLayer().indexOf(this.item)>=0;}else{this.onCheckChange(this,this.attributes.checked);}
this.layer.events.on({"visibilitychanged":this.onLayerVisibilityChanged,scope:this});this.on({"checkchange":this.onCheckChange,scope:this});}},getLayer:function(){if(!this.layer){var layer=this.attributes.layer;if(typeof layer=="string"){var store=this.attributes.layerStore||GeoExt.MapPanel.guess().layers;var i=store.findBy(function(o){return o.get("title")==layer;});layer=i!=-1?store.getAt(i).getLayer():null;}
this.layer=layer;}
return this.layer;},getItemsFromLayer:function(){var paramValue=this.layer.params[this.param];return paramValue instanceof Array?paramValue:(paramValue?paramValue.split(this.delimiter):[]);},createParams:function(items){var params={};params[this.param]=this.layer.params[this.param]instanceof Array?items:items.join(this.delimiter);return params;},onLayerVisibilityChanged:function(){if(this.getItemsFromLayer().length===0){this.layer.mergeNewParams(this.createParams(this.allItems));}
var visible=this.layer.getVisibility();if(visible&&this.getItemsFromLayer().indexOf(this.item)!==-1){this.getUI().toggleCheck(true);}
if(!visible){this.layer.mergeNewParams(this.createParams([]));this.getUI().toggleCheck(false);}},onCheckChange:function(node,checked){var layer=this.layer;var newItems=[];var curItems=this.getItemsFromLayer();if(checked===true&&layer.getVisibility()===false&&curItems.length===this.allItems.length){curItems=[];}
Ext.each(this.allItems,function(item){if((item!==this.item&&curItems.indexOf(item)!==-1)||(checked===true&&item===this.item)){newItems.push(item);}},this);var visible=(newItems.length>0);visible&&layer.mergeNewParams(this.createParams(newItems));if(visible!==layer.getVisibility()){layer.setVisibility(visible);}
(!visible)&&layer.mergeNewParams(this.createParams([]));},destroy:function(){var layer=this.layer;if(layer instanceof OpenLayers.Layer){layer.events.un({"visibilitychanged":this.onLayerVisibilityChanged,scope:this});}
delete this.layer;this.un("checkchange",this.onCheckChange,this);GeoExt.tree.LayerParamNode.superclass.destroy.apply(this,arguments);}});Ext.tree.TreePanel.nodeTypes.gx_layerparam=GeoExt.tree.LayerParamNode;OpenLayers.Control.ArgParser=OpenLayers.Class(OpenLayers.Control,{center:null,zoom:null,layers:null,displayProjection:null,getParameters:function(url){url=url||window.location.href;var parameters=OpenLayers.Util.getParameters(url);var index=url.indexOf('#');if(index>0){url='?'+url.substring(index+1,url.length);OpenLayers.Util.extend(parameters,OpenLayers.Util.getParameters(url));}
return parameters;},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=this.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"});OpenLayers.Control.Permalink=OpenLayers.Class(OpenLayers.Control,{argParserClass:OpenLayers.Control.ArgParser,element:null,anchor:false,base:'',displayProjection:null,initialize:function(element,base,options){if(element!==null&&typeof element=='object'&&!OpenLayers.Util.isElement(element)){options=element;this.base=document.location.href;OpenLayers.Control.prototype.initialize.apply(this,[options]);if(this.element!=null){this.element=OpenLayers.Util.getElement(this.element);}}
else{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.anchor){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 separator=this.anchor?'#':'?';var href=this.base;if(href.indexOf(separator)!=-1){href=href.substring(0,href.indexOf(separator));}
href+=separator+OpenLayers.Util.getParameterString(this.createParams());if(this.anchor&&!this.element){window.location.href=href;}
else{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"});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){OpenLayers.Layer.prototype.initialize.apply(this,[name,options]);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(OpenLayers.Util.isArray(url)){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,tileOriginCorner:"bl",tileOrigin:null,tileOptions:null,grid:null,singleTile:false,ratio:1.5,buffer:0,numLoadingTiles:0,tileLoadingDelay:100,timerId:null,initialize:function(name,url,params,options){OpenLayers.Layer.HTTPRequest.prototype.initialize.apply(this,arguments);this.events.addEventType("tileloaded");this.grid=[];this._moveGriddedTiles=OpenLayers.Function.bind(this.moveGriddedTiles,this);},removeMap:function(map){if(this.timerId!=null){window.clearTimeout(this.timerId);this.timerId=null;}},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.scheduleMoveGriddedTiles();}}}},moveByPx:function(dx,dy){if(!this.singleTile){this.scheduleMoveGriddedTiles();}},scheduleMoveGriddedTiles:function(){if(this.timerId!=null){window.clearTimeout(this.timerId);}
this.timerId=window.setTimeout(this._moveGriddedTiles,this.tileLoadingDelay);},setTileSize:function(size){if(this.singleTile){size=this.map.getSize();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,origin,resolution){var tilelon=resolution*this.tileSize.w;var tilelat=resolution*this.tileSize.h;var offsetlon=bounds.left-origin.lon;var tilecol=Math.floor(offsetlon/tilelon)-this.buffer;var tilecolremain=offsetlon/tilelon-tilecol;var tileoffsetx=-tilecolremain*this.tileSize.w;var tileoffsetlon=origin.lon+tilecol*tilelon;var offsetlat=bounds.top-(origin.lat+tilelat);var tilerow=Math.ceil(offsetlat/tilelat)+this.buffer;var tilerowremain=tilerow-offsetlat/tilelat;var tileoffsety=-tilerowremain*this.tileSize.h;var tileoffsetlat=origin.lat+tilerow*tilelat;return{tilelon:tilelon,tilelat:tilelat,tileoffsetlon:tileoffsetlon,tileoffsetlat:tileoffsetlat,tileoffsetx:tileoffsetx,tileoffsety:tileoffsety};},getTileOrigin:function(){var origin=this.tileOrigin;if(!origin){var extent=this.getMaxExtent();var edges=({"tl":["left","top"],"tr":["right","top"],"bl":["left","bottom"],"br":["right","bottom"]})[this.tileOriginCorner];origin=new OpenLayers.LonLat(extent[edges[0]],extent[edges[1]]);}
return origin;},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 origin=this.getTileOrigin();var resolution=this.map.getResolution();var tileLayout=this.calculateGridLayout(bounds,origin,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();},getMaxExtent:function(){return this.maxExtent;},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){return new OpenLayers.Tile.Image(this,position,bounds,null,this.tileSize,this.tileOptions);},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(){var shifted=true;var buffer=this.buffer||1;var tlLayer=this.grid[0][0].position;var offsetX=parseInt(this.map.layerContainerDiv.style.left);var offsetY=parseInt(this.map.layerContainerDiv.style.top);var tlViewPort=tlLayer.add(offsetX,offsetY);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{shifted=false;}
if(shifted){this.timerId=window.setTimeout(this._moveGriddedTiles,0);}},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.Layer.TMS=OpenLayers.Class(OpenLayers.Layer.Grid,{serviceVersion:"1.0.0",layername:null,type:null,isBaseLayer:true,tileOrigin:null,serverResolutions:null,zoomOffset:0,initialize:function(name,url,options){var newArguments=[];newArguments.push(name,url,{},options);OpenLayers.Layer.Grid.prototype.initialize.apply(this,newArguments);},destroy:function(){OpenLayers.Layer.Grid.prototype.destroy.apply(this,arguments);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.TMS(this.name,this.url,this.getOptions());}
obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);return obj;},getURL:function(bounds){bounds=this.adjustBounds(bounds);var res=this.map.getResolution();var x=Math.round((bounds.left-this.tileOrigin.lon)/(res*this.tileSize.w));var y=Math.round((bounds.bottom-this.tileOrigin.lat)/(res*this.tileSize.h));var z=this.serverResolutions!=null?OpenLayers.Util.indexOf(this.serverResolutions,res):this.map.getZoom()+this.zoomOffset;var path=this.serviceVersion+"/"+this.layername+"/"+z+"/"+x+"/"+y+"."+this.type;var url=this.url;if(OpenLayers.Util.isArray(url)){url=this.selectUrl(path,url);}
return url+path;},setMap:function(map){OpenLayers.Layer.Grid.prototype.setMap.apply(this,arguments);if(!this.tileOrigin){this.tileOrigin=new OpenLayers.LonLat(this.map.maxExtent.left,this.map.maxExtent.bottom);}},CLASS_NAME:"OpenLayers.Layer.TMS"});Ext.namespace('App');App.GetFeature=function(map){var TITLE_ATTRIBUTE='__label__';var layer=null;var tip=new Ext.Window({id:'getfeaturetip',width:417,closable:true,draggable:true,layout:'fit',header:true,closeAction:'hide'});tip.on('hide',function(p){if(Ext.getCmp('infowindow')){Ext.getCmp('infowindow').destroy();}
layer.removeAllFeatures();});EtatCadreReference=new Array();EtatCadreReference['MN03']="MN03";EtatCadreReference['MN95']="MN95";EtatCadreReference['MN95TT']="MN95 transformée - renouvellement";EtatCadreReference['MN95TC']="MN95 transformée - approuvée";EtatCadreReference['TFMT']="En transformation";var templates={'pois':new Ext.XTemplate('<b>{nom_point}</b> ({type_point})','<tpl if=lien>','<br /><a href="{lien}" target="_blank">plus d\'infos</a>','</tpl>'),'zonesprotection':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Classe zone : </b></div></th><td>{categorie}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Sanction : </b></div></th><td>{sanction}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Surface m<sup>2</sup>  : </b></div></th><td>{surf_m2}<br /></td></tr>','</table>'),'zonescommunales':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Catégorie : </b></div></th><td>{categorie}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Commune : </b></div></th><td>{commune}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Abréviation cantonale :</b></div></th><td>{abreviation_cantonale}<br /></td></tr>','<tr><th width="50%" scope="row"<div align="left"><b>Nom cantonal :  </b></div></th><td>{nom_cantonal}<br /></td></tr>','<tpl if="abreviation_communale==null">','<tr><th width="50%" scope="row"><div align="left"><b>Abréviation communale : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="abreviation_communale">','<tr><th width="50%" scope="row"><div align="left"><b>Abréviation communale : </b></div></th><td>{abreviation_communale}</td></tr>','</tpl>','<tr><th width="50%" scope="row"<div align="left"><b>Nom communal : </b></div></th><td>{nom_communal}<br /></td></tr>','<tpl if="sanction_conseil_etat==null">','<tr><th width="50%" scope="row"><div align="left"><b>Sanction conseil d\'état : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="sanction_conseil_etat">','<tr><th width="50%" scope="row"><div align="left"><b>Sanction conseil d\'état : </b></div></th><td>{sanction_conseil_etat}</td></tr>','</tpl>','<tpl if="mise_a_jour==null">','<tr><th width="50%" scope="row"><div align="left"><b>Mise à jour : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="mise_a_jour">','<tr><th width="50%" scope="row"><div align="left"><b>Mise à jour : </b></div></th><td>{mise_a_jour}</td></tr>','</tpl>','</table>'),'autorisationsconstruire':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>N° SATAC : </b></div></th><td>{instance_id}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type de construction : </b></div></th><td>{descr2_lib}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Lien : </b></div></th><td><a href="{url}" target="new">Cliquer ici</a><br /></td></tr>','</table>'),'zonesviticoles':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Niveau : </b></div></th><td>{niveau}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Catégorie : </b></div></th><td>{categorie}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Surface [ha] : </b></div></th><td>{surface_objet_ha}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Sanction conseil d\'état : </b></div></th><td>{sanction_conseil_etat}<br /></td></tr>','</table>'),'decrets1966':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Niveau : </b></div></th><td>{niveau}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Catégorie : </b></div></th><td>{categorie}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type : </b></div></th><td>{type}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Surface [ha] : </b></div></th><td>{surface_objet_ha}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Sanction conseil d\'état : </b></div></th><td>{sanction_conseil_etat}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Lien : </b></div></th><td><a href="{url}" target="new">Cliquer ici</a><br /></td></tr>','</table>'),'zonesrives':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Niveau : </b></div></th><td>{niveau}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Catégorie : </b></div></th><td>{categorie}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Surface [ha] : </b></div></th><td>{surface_objet_ha}<br /></td></tr>','<tpl if="date_conf==null">','<tr><th width="50%" scope="row"><div align="left"><b>Date confédération : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="date_conf">','<tr><th width="50%" scope="row"><div align="left"><b>Date confédération : </b></div></th><td>{date_conf}</td></tr>','</tpl>','<tr><th width="50%" scope="row"><div align="left"><b>Date république de Neuchâtel : </b></div></th><td>{date_canton}<br /></td></tr>','</table>'),'reserveschasse':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Niveau : </b></div></th><td>{niveau}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Catégorie : </b></div></th><td>{categorie}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Surface [ha] : </b></div></th><td>{surface_objet_ha}<br /></td></tr>','<tpl if="sanction_conseil_etat==null">','<tr><th width="50%" scope="row"><div align="left"><b>Sanction conseil d\'état : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="sanction_conseil_etat">','<tr><th width="50%" scope="row"><div align="left"><b>Sanction conseil d\'état : </b></div></th><td>{sanction_conseil_etat}</td></tr>','</tpl>','</table>'),'reservesnaturelles':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Niveau : </b></div></th><td>{niveau}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Catégorie : </b></div></th><td>{categorie}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Nom de l\'objet : </b></div></th><td>{nom_objet}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Surface [ha] : </b></div></th><td>{surface_objet_ha}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Sanction conseil d\'état : </b></div></th><td>{sanction_conseil_etat}<br /></td></tr>','</table>'),'biotopes':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Niveau : </b></div></th><td>{niveau}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Catégorie : </b></div></th><td>{categorie}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>N° objet : </b></div></th><td>{no_objet}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Nom de l\'objet : </b></div></th><td>{nom_objet}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Surface [ha] : </b></div></th><td>{surface_objet_ha}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Sanction conseil d\'état : </b></div></th><td>{sanction_conseil_etat}<br /></td></tr>','</table>'),'perimetresurbanisation':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Niveau : </b></div></th><td>{niveau}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Catégorie : </b></div></th><td>{categorie}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type : </b></div></th><td>{type_plan}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Surface [ha] : </b></div></th><td>{surface_objet_ha}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Sanction conseil d\'état : </b></div></th><td>{sanction_conseil_etat}<br /></td></tr>','</table>'),'zonescantonales':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Niveau : </b></div></th><td>{niveau}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Catégorie : </b></div></th><td>{categorie}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type plan : </b></div></th><td>{type_pac}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Nom général : </b></div></th><td>{nom_general}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Abbréviation spécifique : </b></div></th><td>{abreviation_specifique}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Nom spécifique : </b></div></th><td>{nom_specifique}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Surface [ha] : </b></div></th><td>{surface_objet_ha}<br /></td></tr>','<tpl if="remarque==null">','<tr><th width="50%" scope="row"><div align="left"><b>Remarque : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="remarque">','<tr><th width="50%" scope="row"><div align="left"><b>Remarque : </b></div></th><td>{remarque}</td></tr>','</tpl>','<tr><th width="50%" scope="row"><div align="left"><b>Sanction conseil d\'état : </b></div></th><td>{sanction_conseil_etat}<br /></td></tr>','</table>'),'sitesmarecageux':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Niveau : </b></div></th><td>{niveau}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Catégorie : </b></div></th><td>{categorie}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type : </b></div></th><td>{type_plan}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Surface [ha] : </b></div></th><td>{surface_objet_ha}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Sanction conseil d\'état : </b></div></th><td>{sanction_conseil_etat}<br /></td></tr>','</table>'),'revisionspcaz':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Niveau : </b></div></th><td>{niveau}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Commune : </b></div></th><td>{commune}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Sanction conseil d\'état : </b></div></th><td>{sanction_conseil_etat}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Sanction partielle : </b></div></th><td>{sanction_partielle}<br /></td></tr>','<tpl if="detail_sanction_partielle==null">','<tr><th width="50%" scope="row"><div align="left"><b>Détail sanction partielle : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="detail_sanction_partielle">','<tr><th width="50%" scope="row"><div align="left"><b>Détail sanction partielle : </b></div></th><td>{detail_sanction_partielle}</td></tr>','</tpl>','<tr><th width="50%" scope="row"><div align="left"><b>Données disponibles : </b></div></th><td>{disponibilite_serveur_cantonal}<br /></td></tr>','</table>'),'perimetresurbanisation2':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Niveau : </b></div></th><td>{niveau}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Catégorie : </b></div></th><td>{categorie}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Commune : </b></div></th><td>{commune}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type plan : </b></div></th><td>{type_plan}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Surface [ha] : </b></div></th><td>{surface_objet_ha}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Sanction conseil d\'état : </b></div></th><td>{sanction_conseil_etat}<br /></td></tr>','</table>'),'sitesbatis2':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Niveau : </b></div></th><td>{niveau}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Catégorie : </b></div></th><td>{categorie}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Commune : </b></div></th><td>{commune}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type plan : </b></div></th><td>{type_plan}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Surface [ha] : </b></div></th><td>{surface_objet_ha}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Sanction conseil d\'état : </b></div></th><td>{sanction_conseil_etat}<br /></td></tr>','</table>'),'plansdirecteurs':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Niveau : </b></div></th><td>{niveau}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Catégorie : </b></div></th><td>{categorie}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Commune : </b></div></th><td>{commune}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>État de l\'équipement : </b></div></th><td>{etat}<br /></td></tr>','<tpl if="nom==null">','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="nom">','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>{nom}</td></tr>','</tpl>','<tr><th width="50%" scope="row"><div align="left"><b>Surface [ha] : </b></div></th><td>{surface_objet_ha}<br /></td></tr>','<tpl if="remarque==null">','<tr><th width="50%" scope="row"><div align="left"><b>Remarque : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="remarque">','<tr><th width="50%" scope="row"><div align="left"><b>Remarque : </b></div></th><td>{remarque}</td></tr>','</tpl>','<tpl if="adoption_conseil_communal==null">','<tr><th width="50%" scope="row"><div align="left"><b>Adopt. conseil comm. : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="adoption_conseil_communal">','<tr><th width="50%" scope="row"><div align="left"><b>Adopt. conseil comm. : </b></div></th><td>{adoption_conseil_communal}</td></tr>','</tpl>','</table>'),'plansdirecteursquartiers':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Niveau : </b></div></th><td>{niveau}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Catégorie : </b></div></th><td>{categorie}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Commune : </b></div></th><td>{commune}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>État de l\'équipement : </b></div></th><td>{etat}<br /></td></tr>','<tpl if="nom==null">','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="nom">','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>{nom}</td></tr>','</tpl>','<tr><th width="50%" scope="row"><div align="left"><b>Surface [ha] : </b></div></th><td>{surface_objet_ha}<br /></td></tr>','<tpl if="remarque==null">','<tr><th width="50%" scope="row"><div align="left"><b>Remarque : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="remarque">','<tr><th width="50%" scope="row"><div align="left"><b>Remarque : </b></div></th><td>{remarque}</td></tr>','</tpl>','<tpl if="adoption_conseil_communal==null">','<tr><th width="50%" scope="row"><div align="left"><b>Adopt. conseil comm. : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="adoption_conseil_communal">','<tr><th width="50%" scope="row"><div align="left"><b>Adopt. conseil comm. : </b></div></th><td>{adoption_conseil_communal}</td></tr>','</tpl>','</table>'),'plansquartiers':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Niveau : </b></div></th><td>{niveau}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Catégorie : </b></div></th><td>{categorie}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Commune : </b></div></th><td>{commune}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>État de l\'équipement : </b></div></th><td>{etat}<br /></td></tr>','<tpl if="nom==null">','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="nom">','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>{nom}</td></tr>','</tpl>','<tr><th width="50%" scope="row"><div align="left"><b>Surface [ha] : </b></div></th><td>{surface_objet_ha}<br /></td></tr>','<tpl if="remarque==null">','<tr><th width="50%" scope="row"><div align="left"><b>Remarque : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="remarque">','<tr><th width="50%" scope="row"><div align="left"><b>Remarque : </b></div></th><td>{remarque}</td></tr>','</tpl>','<tpl if="sanction_conseil_etat==null">','<tr><th width="50%" scope="row"><div align="left"><b>Sanction conseil d\'état : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="sanction_conseil_etat">','<tr><th width="50%" scope="row"><div align="left"><b>Sanction conseil d\'état : </b></div></th><td>{sanction_conseil_etat}</td></tr>','</tpl>','</table>'),'plansspeciaux':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Commune : </b></div></th><td>{commune}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Surface [ha] : </b></div></th><td>{surface_objet_ha}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Remarque : </b></div></th><td>{remarque}</td></tr>','</table>'),'paysagesproteges':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Niveau : </b></div></th><td>{niveau}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Catégorie : </b></div></th><td>{categorie}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Commune : </b></div></th><td>{commune}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type plan : </b></div></th><td>{type_plan}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Surface [ha] : </b></div></th><td>{surface_objet_ha}<br /></td></tr>','<tpl if="remarque==null">','<tr><th width="50%" scope="row"><div align="left"><b>Remarque : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="remarque">','<tr><th width="50%" scope="row"><div align="left"><b>Remarque : </b></div></th><td>{remarque}</td></tr>','</tpl>','<tr><th width="50%" scope="row"><div align="left"><b>Sanction conseil d\'état : </b></div></th><td>{sanction_conseil_etat}</td></tr>','</table>'),'objsprotegesponct':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Niveau : </b></div></th><td>{niveau}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Catégorie : </b></div></th><td>{categorie}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type : </b></div></th><td>{type_objet}<br /></td></tr>','<tpl if="remarque==null">','<tr><th width="50%" scope="row"><div align="left"><b>Remarque : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="remarque">','<tr><th width="50%" scope="row"><div align="left"><b>Remarque : </b></div></th><td>{remarque}</td></tr>','</tpl>','<tr><th width="50%" scope="row"><div align="left"><b>Adoption conseil d\'état : </b></div></th><td>{adoption_conseil_etat}</td></tr>','</table>'),'objsprotegeslin':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Niveau : </b></div></th><td>{niveau}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Catégorie : </b></div></th><td>{categorie}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type : </b></div></th><td>{type_objet}<br /></td></tr>','<tpl if="remarque==null">','<tr><th width="50%" scope="row"><div align="left"><b>Remarque : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="remarque">','<tr><th width="50%" scope="row"><div align="left"><b>Remarque : </b></div></th><td>{remarque}</td></tr>','</tpl>','<tr><th width="50%" scope="row"><div align="left"><b>Adoption conseil d\'état : </b></div></th><td>{adoption_conseil_etat}</td></tr>','</table>'),'objsprotegessurf':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Niveau : </b></div></th><td>{niveau}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Catégorie : </b></div></th><td>{categorie}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type : </b></div></th><td>{type_objet}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Surface [ha] : </b></div></th><td>{surface_objet_ha}<br /></td></tr>','<tpl if="remarque==null">','<tr><th width="50%" scope="row"><div align="left"><b>Remarque : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="remarque">','<tr><th width="50%" scope="row"><div align="left"><b>Remarque : </b></div></th><td>{remarque}</td></tr>','</tpl>','<tr><th width="50%" scope="row"><div align="left"><b>Adoption conseil d\'état : </b></div></th><td>{adoption_conseil_etat}</td></tr>','</table>'),'perimetresarcheologiques':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Niveau : </b></div></th><td>{niveau}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Catégorie : </b></div></th><td>{categorie}<br /></td></tr>','<tpl if="inventaire==null">','<tr><th width="50%" scope="row"><div align="left"><b>Date inventaire : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="inventaire">','<tr><th width="50%" scope="row"><div align="left"><b>Date inventaire : </b></div></th><td>{inventaire}</td></tr>','</tpl>','<tr><th width="50%" scope="row"><div align="left"><b>Surface [ha] : </b></div></th><td>{surface_obj_ha}<br /></td></tr>','<tpl if="remarque==null">','<tr><th width="50%" scope="row"><div align="left"><b>Remarque : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="remarque">','<tr><th width="50%" scope="row"><div align="left"><b>Remarque : </b></div></th><td>{remarque}</td></tr>','</tpl>','</table>'),'perimetrestirs':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Niveau : </b></div></th><td>{niveau}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Catégorie : </b></div></th><td>{categorie}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Commune : </b></div></th><td>{commune}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Surface [ha] : </b></div></th><td>{surface_obj_ha}<br /></td></tr>','</table>'),'zonesreservees':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Niveau : </b></div></th><td>{niveau}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Catégorie : </b></div></th><td>{categorie}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Commune : </b></div></th><td>{commune}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type plan : </b></div></th><td>{type_plan}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Surface [ha] : </b></div></th><td>{surface_objet_ha}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Sanction conseil d\'état : </b></div></th><td>{sanction_conseil_etat}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Echéance : </b></div></th><td>{echeance}</td></tr>','</table>'),'limitesconstruction':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Niveau : </b></div></th><td>{niveau}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Catégorie : </b></div></th><td>{categorie}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Commune : </b></div></th><td>{commune}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type plan : </b></div></th><td>{type_plan}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type objet : </b></div></th><td>{type_objet}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Distance à l\'objet : </b></div></th><td>{distance_objet}<br /></td></tr>','<tpl if="remarque==null">','<tr><th width="50%" scope="row"><div align="left"><b>Remarque : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="remarque">','<tr><th width="50%" scope="row"><div align="left"><b>Remarque : </b></div></th><td>{remarque}</td></tr>','</tpl>','<tpl if="nom_auteur_plan==null">','<tr><th width="50%" scope="row"><div align="left"><b>Auteur du plan : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="nom_auteur_plan">','<tr><th width="50%" scope="row"><div align="left"><b>Auteur du plan : </b></div></th><td>{nom_auteur_plan}</td></tr>','</tpl>','<tpl if="date_auteur_plan==null">','<tr><th width="50%" scope="row"><div align="left"><b>Date du plan : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="date_auteur_plan">','<tr><th width="50%" scope="row"><div align="left"><b>Date du plan : </b></div></th><td>{date_auteur_plan}</td></tr>','</tpl>','<tpl if="sanction_conseil_etat==null">','<tr><th width="50%" scope="row"><div align="left"><b>Sanction conseil d\'état : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="sanction_conseil_etat">','<tr><th width="50%" scope="row"><div align="left"><b>Sanction conseil d\'état : </b></div></th><td>{sanction_conseil_etat}</td></tr>','</tpl>','</table>'),'zonesassolement':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Niveau : </b></div></th><td>{niveau}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Catégorie : </b></div></th><td>{categorie}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type : </b></div></th><td>{type}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Date inventaire : </b></div></th><td>{inventaire}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Surface [ha] : </b></div></th><td>{surface_obj_ha}<br /></td></tr>','<tpl if="remarque==null">','<tr><th width="50%" scope="row"><div align="left"><b>Remarque : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="remarque">','<tr><th width="50%" scope="row"><div align="left"><b>Remarque : </b></div></th><td>{remarque}</td></tr>','</tpl>','</table>'),'exploitationsmateriaux':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Niveau : </b></div></th><td>{niveau}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Catégorie : </b></div></th><td>{categorie}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Commune : </b></div></th><td>{commune}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type : </b></div></th><td>{type}<br /></td></tr>','</table>'),'remonteesmecaniques':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Niveau : </b></div></th><td>{niveau}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Catégorie : </b></div></th><td>{categorie}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Commune : </b></div></th><td>{commune}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Société : </b></div></th><td>{societe}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type : </b></div></th><td>{type}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Longueur [m] : </b></div></th><td>{longueur_m}<br /></td></tr>','</table>'),'itinerairespedestres':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Niveau : </b></div></th><td>{niveau_princ}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Dénomination Suisse mobile : </b></div></th><td>{denomination_ch_mobile}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>N° Suisse mobile : </b></div></th><td>{no_ch_mobile}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Dénomination cantonale : </b></div></th><td>{denom_cant}<br /></td></tr>','</table>'),'reseauxvtt':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Niveau : </b></div></th><td>{niveau_princ}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Dénomination Suisse mobile : </b></div></th><td>{denomination_ch_mobile}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>N° Suisse mobile : </b></div></th><td>{no_ch_mobile}<br /></td></tr>','<tpl if="denom_cant==null">','<tr><th width="50%" scope="row"><div align="left"><b>Dénomination cantonale : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="denom_cant">','<tr><th width="50%" scope="row"><div align="left"><b>Dénomination cantonale : </b></div></th><td>{denom_cant}</td></tr>','</tpl>','</table>'),'itinerairescyclistes':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Niveau : </b></div></th><td>{niveau_princ}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Dénomination Suisse mobile : </b></div></th><td>{denomination_ch_mobile}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>N° Suisse mobile : </b></div></th><td>{no_ch_mobile}<br /></td></tr>','</table>'),'itinerairesrollers':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Niveau : </b></div></th><td>{niveau_princ}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Dénomination Suisse mobile : </b></div></th><td>{denomination_ch_mobile}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>N° Suisse mobile : </b></div></th><td>{no_ch_mobile}<br /></td></tr>','</table>'),'inv_fed_ifps':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>{nom}<br /></td></tr>','</table>'),'inv_fed_bas_maraiss':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>{nom}<br /></td></tr>','</table>'),'inv_fed_col_bouqs':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>{nom}<br /></td></tr>','</table>'),'inv_fed_cpns':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>{nom}<br /></td></tr>','</table>'),'inv_fed_distr_francs':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>{nom}<br /></td></tr>','</table>'),'inv_fed_haut_maraiss':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>{nom}<br /></td></tr>','</table>'),'inv_fed_prair_patu_secs':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>{nom}<br /></td></tr>','</table>'),'inv_fed_repro_batraciens':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>{nom}<br /></td></tr>','</table>'),'inv_fed_res_ois_eau_migrats':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>{nom}<br /></td></tr>','</table>'),'inv_fed_sites_marecags':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>{nom}<br /></td></tr>','</table>'),'inv_fed_zones_alluviales':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>{nom}<br /></td></tr>','</table>'),'clocouloirs':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Niveau : </b></div></th><td>{niveau}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Catégorie : </b></div></th><td>{categorie}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>{nom}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type : </b></div></th><td>{type}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Surface [ha] : </b></div></th><td>{surface_objet_ha}<br /></td></tr>','</table>'),'clocotesaltitudes':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Cote altitude obstacle min. : </b></div></th><td>{cote_alt_obstacles_minimum}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Cote altitude obstacle max. : </b></div></th><td>{cote_alt_obstacles_maximum}<br /></td></tr>','</table>'),'patrimoinesarchitecturaux':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>N° fiche : </b></div></th><td>{id_fiche}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Infos : </b></div></th><td>{name_opms}<br /></td></tr>','</table>'),'batimentsofs':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>EGID : </b></div></th><td>{egid2}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Rue : </b></div></th><td>{rue}<br /></td></tr>','<tpl if="numuni==null">','<tr><th width="50%" scope="row"><div align="left"><b>NUMUNI : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="numuni">','<tr><th width="50%" scope="row"><div align="left"><b>NUMUNI : </b></div></th><td>{numuni}</td></tr>','</tpl>','</table>'),'nomslocaux':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>{nomloc}<br /></td></tr>','</table>'),'distributionsplans':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>N° plan : </b></div></th><td>{planno}<br /></td></tr>','<tpl if="typlan==null">','<tr><th width="50%" scope="row"><div align="left"><b>Type de plan : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="typlan">','<tr><th width="50%" scope="row"><div align="left"><b>Type de plan : </b></div></th><td>{typlan}</td></tr>','</tpl>','<tr><th width="50%" scope="row"><div align="left"><b>Statut juridique : </b></div></th><td>{statut}<br /></td></tr>','<tpl if="datmev==null">','<tr><th width="50%" scope="row"><div align="left"><b>Mise en vigueur : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="datmev">','<tr><th width="50%" scope="row"><div align="left"><b>Mise en vigueur : </b></div></th><td>{datmev}</td></tr>','</tpl>','<tr><th width="50%" scope="row"><div align="left"><b>Echelle : </b></div></th><td>{echell}<br /></td></tr>','</table>'),'etats_cadre_reference':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tpl if="cadre_ref">','<tr><th width="50%" scope="row"><div align="left"><b>Cadre de réference : </b></div></th><td>{[EtatCadreReference[values.cadre_ref]]}</td></tr>','</tpl>','</table>'),'etatsmo':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Commune : </b></div></th><td>{commune}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type : </b></div></th><td>{type2}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>N° du lot : </b></div></th><td>{no_lot}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Validité : </b></div></th><td>{validite}<br /></td></tr>','</table>'),'conduites':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Exploitant : </b></div></th><td>{exploitant}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Description : </b></div></th><td>{description}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Genre : </b></div></th><td>{genre}<br /></td></tr>','</table>'),'pointsfixes':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Type : </b></div></th><td>{type}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>N° point : </b></div></th><td>{nopoin}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Y [m] : </b></div></th><td>{y}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>X [m] : </b></div></th><td>{x}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Altitude [m] : </b></div></th><td>{altitu}<br /></td></tr>','<tpl if="url_fiche==null">','<tr><th width="50%" scope="row"><div align="left"><b>Fiche signalétique : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="url_fiche">','<tr><th width="50%" scope="row"><div align="left"><b>Fiche signalétique : </b></div></th><td><a href="{url_fiche}" target="new">Cliquer ici</a></td></tr>','</tpl>','</table>'),'pointsfixes3':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Type : </b></div></th><td>{type}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>N° point : </b></div></th><td>{nopoin}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Y [m] : </b></div></th><td>{y}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>X [m] : </b></div></th><td>{x}<br /></td></tr>','<tpl if="altitu==null">','<tr><th width="50%" scope="row"><div align="left"><b>Altitude [m] : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="altitu">','<tr><th width="50%" scope="row"><div align="left"><b>Altitude [m] : </b></div></th><td>{altitu}<br /></td></tr>','</tpl>','</table>'),'pointsfixesalt':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Type : </b></div></th><td>{type}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>N° point : </b></div></th><td>{nopoin}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Y [m] : </b></div></th><td>{y}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>X [m] : </b></div></th><td>{x}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Altitude [m] : </b></div></th><td>{altitu}<br /></td></tr>','<tpl if="url_fiche==null">','<tr><th width="50%" scope="row"><div align="left"><b>Fiche signalétique : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="url_fiche">','<tr><th width="50%" scope="row"><div align="left"><b>Fiche signalétique : </b></div></th><td><a href="{url_fiche}" target="new">Cliquer ici</a></td></tr>','</tpl>','</table>'),'pointsdetail':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>N° plan : </b></div></th><td>{planno}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>N° point : </b></div></th><td>{nopoin}<br /></td></tr>','</table>'),'servitudesclig':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>N° servitudes : </b></div></th><td>{text10}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Classe : </b></div></th><td>{classe}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type de servitude : </b></div></th><td>{libele}<br /></td></tr>','</table>'),'servitudescsurfautre':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>N° servitudes : </b></div></th><td>{text10}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Classe : </b></div></th><td>{classe}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type de servitude : </b></div></th><td>{libele}<br /></td></tr>','</table>'),'servitudescsurf':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>N° servitudes : </b></div></th><td>{text10}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Classe : </b></div></th><td>{classe}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type de servitude : </b></div></th><td>{libele}<br /></td></tr>','</table>'),'servitudesalig':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>N° servitudes : </b></div></th><td>{text10}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Classe : </b></div></th><td>{classe}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type de servitude : </b></div></th><td>{libele}<br /></td></tr>','</table>'),'servitudesasurf':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>N° servitudes : </b></div></th><td>{text10}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Classe : </b></div></th><td>{classe}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type de servitude : </b></div></th><td>{libele}<br /></td></tr>','</table>'),'servitudesglig':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>N° servitudes : </b></div></th><td>{text10}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Classe : </b></div></th><td>{classe}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type de servitude : </b></div></th><td>{libele}<br /></td></tr>','</table>'),'servitudesgpts':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>N° servitudes : </b></div></th><td>{text10}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Classe : </b></div></th><td>{classe}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type de servitude : </b></div></th><td>{libele}<br /></td></tr>','</table>'),'servitudesgsurf':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>N° servitudes : </b></div></th><td>{text10}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Classe : </b></div></th><td>{classe}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type de servitude : </b></div></th><td>{libele}<br /></td></tr>','</table>'),'batiments':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>N° bâtiment : </b></div></th><td>{numele}<br /></td></tr>','<tpl if="desnat==null">','<tr><th width="50%" scope="row"><div align="left"><b>Nature : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="desnat">','<tr><th width="50%" scope="row"><div align="left"><b>Nature : </b></div></th><td>{desnat}</td></tr>','</tpl>','<tpl if="desba1==null">','<tr><th width="50%" scope="row"><div align="left"><b>Type : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="desba1">','<tr><th width="50%" scope="row"><div align="left"><b>Type : </b></div></th><td>{desba1}</td></tr>','</tpl>','</table>'),'batimentsprojetes':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Cadastre : </b></div></th><td>{cadastre}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Source : </b></div></th><td>{source}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Lien : </b></div></th><td><a href="{url}" target="new">Cliquer ici</a><br /></td></tr>','</table>'),'batimentsprovisoires':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tpl if="cadastre==null">','<tr><th width="50%" scope="row"><div align="left"><b>Cadastre : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="cadastre">','<tr><th width="50%" scope="row"><div align="left"><b>Cadastre : </b></div></th><td>{cadastre}</td></tr>','</tpl>','<tpl if="numele==null">','<tr><th width="50%" scope="row"><div align="left"><b>N° bâtiment : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="numele">','<tr><th width="50%" scope="row"><div align="left"><b>N° bâtiment : </b></div></th><td>{numele}</td></tr>','</tpl>','<tr><th width="50%" scope="row"><div align="left"><b>Source : </b></div></th><td>{source}<br /></td></tr>','</table>'),'stationsmeteo':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>{nom}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Propriétaire : </b></div></th><td>{prop}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Utilisation : </b></div></th><td>{util}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Températures moyenns : </b></div></th><td><a href="{url_statio}" target="new">Cliquer ici</a><br /></td></tr>','</table>'),'ptsdistribution':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>N° point : </b></div></th><td>{id_pt}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Entreprise : </b></div></th><td>{nom_entr}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Installation : </b></div></th><td>{comment}<br /></td></tr>','</table>'),'airesdesserte':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>N° aire : </b></div></th><td>{id_aire}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Entreprise : </b></div></th><td>{nom_entr}<br /></td></tr>','</table>'),'exclusionsforages':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Genre de zone : </b></div></th><td>{genre}<br /></td></tr>','</table>'),'profondeursforages':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Profondeur maximale : </b></div></th><td>{profondeur}<br /></td></tr>','</table>'),'restrictionsforages':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Contrainte CANEPO : </b></div></th><td>{contrainte}<br /></td></tr>','</table>'),'dangerschutespierres':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Carte indicative : </b></div></th><td>{type_danger}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Degré danger : </b></div></th><td>{degre_danger}<br /></td></tr>','<tpl if="description1==null">','<tr><th width="50%" scope="row"><div align="left"><b>Description : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="description1">','<tr><th width="50%" scope="row"><div align="left"><b>Description : </b></div></th><td>{description1}</td></tr>','</tpl>','</table>'),'dangersglissements':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Carte indicative : </b></div></th><td>{type_danger}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Degré danger : </b></div></th><td>{degre_danger}<br /></td></tr>','<tpl if="description1==null">','<tr><th width="50%" scope="row"><div align="left"><b>Description : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="description1">','<tr><th width="50%" scope="row"><div align="left"><b>Description : </b></div></th><td>{description1}</td></tr>','</tpl>','</table>'),'dangersinondations':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Carte indicative : </b></div></th><td>{type_danger}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Degré danger : </b></div></th><td>{degre_danger}<br /></td></tr>','<tpl if="description1==null">','<tr><th width="50%" scope="row"><div align="left"><b>Description : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="description1">','<tr><th width="50%" scope="row"><div align="left"><b>Description : </b></div></th><td>{description1}</td></tr>','</tpl>','</table>'),'dangerstotaux':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tpl if="cp_degre_danger==null">','<tr><th width="50%" scope="row"><div align="left"><b>Chutes de pierres : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="cp_degre_danger">','<tr><th width="50%" scope="row"><div align="left"><b>Chutes de pierres : </b></div></th><td>danger {cp_degre_danger}</td></tr>','</tpl>','<tpl if="in_degre_danger==null">','<tr><th width="50%" scope="row"><div align="left"><b>Inondations : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="in_degre_danger">','<tr><th width="50%" scope="row"><div align="left"><b>Inondations : </b></div></th><td>danger {in_degre_danger}</td></tr>','</tpl>','<tpl if="gl_degre_danger==null">','<tr><th width="50%" scope="row"><div align="left"><b>Glissements : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="gl_degre_danger">','<tr><th width="50%" scope="row"><div align="left"><b>Glissements : </b></div></th><td>danger {gl_degre_danger}</td></tr>','</tpl>','</table>'),'solsfondation':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Classe des sols de fondation : </b></div></th><td>{classe_sol}</td></tr>','</table>'),'indicativesglissements':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Description : </b></div></th><td>{description}</td></tr>','</table>'),'indicativeschutespierres':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Description : </b></div></th><td>{description}</td></tr>','</table>'),'indicativesinondations':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Description : </b></div></th><td>{description}</td></tr>','</table>'),'indicativeslavestorrentielles':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Description : </b></div></th><td>{description}</td></tr>','</table>'),'etatsremaniements':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>{nom_syndicat}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Etat de l\'équipement : </b></div></th><td>{etat_syndicat}</td></tr>','</table>'),'surfacesagricolesutiles':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Nature : </b></div></th><td>{desnat}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type de couverture : </b></div></th><td>{typcou}</td></tr>','</table>'),'soussolages':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>N° cantonal : </b></div></th><td>{numcom}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>N° zone : </b></div></th><td>{nozone}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Date DT : </b></div></th><td>{datedt}</td></tr>','</table>'),'zonesassainies':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>N° cantonal : </b></div></th><td>{numcom}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>N° zone : </b></div></th><td>{nozone}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Date DT : </b></div></th><td>{datedt}</td></tr>','</table>'),'etatsdrainages':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Etat d\'avancement : </b></div></th><td>{sdf_name}</td></tr>','</table>'),'agpointsnouveaux':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Fonction : </b></div></th><td>{fonction}</td></tr>','</table>'),'agpointsanciens':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Fonction : </b></div></th><td>{fonction}</td></tr>','</table>'),'agcollecteursprincnouv':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Fonction : </b></div></th><td>{fonction}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Diamètre : </b></div></th><td>{diametre}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Pente : </b></div></th><td>{pente}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Matériau : </b></div></th><td>{materiau}</td></tr>','</table>'),'agcollecteurssecnouv':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Fonction : </b></div></th><td>{fonction}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Diamètre : </b></div></th><td>{diametre}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Pente : </b></div></th><td>{pente}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Matériau : </b></div></th><td>{materiau}</td></tr>','</table>'),'agdrainsnouv':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Fonction : </b></div></th><td>{fonction}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Diamètre : </b></div></th><td>{diametre}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Pente : </b></div></th><td>{pente}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Matériau : </b></div></th><td>{materiau}</td></tr>','</table>'),'agtrancheesnouv':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Fonction : </b></div></th><td>{fonction}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Diamètre : </b></div></th><td>{diametre}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Pente : </b></div></th><td>{pente}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Matériau : </b></div></th><td>{materiau}</td></tr>','</table>'),'agtrancheesanc':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Fonction : </b></div></th><td>{fonction}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Diamètre : </b></div></th><td>{diametre}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Pente : </b></div></th><td>{pente}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Matériau : </b></div></th><td>{materiau}</td></tr>','</table>'),'agcollecteursprincanc':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Fonction : </b></div></th><td>{fonction}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Diamètre : </b></div></th><td>{diametre}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Pente : </b></div></th><td>{pente}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Matériau : </b></div></th><td>{materiau}</td></tr>','</table>'),'agcollecteursseccanc':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Fonction : </b></div></th><td>{fonction}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Diamètre : </b></div></th><td>{diametre}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Pente : </b></div></th><td>{pente}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Matériau : </b></div></th><td>{materiau}</td></tr>','</table>'),'agdrainsanc':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Fonction : </b></div></th><td>{fonction}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Diamètre : </b></div></th><td>{diametre}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Pente : </b></div></th><td>{pente}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Matériau : </b></div></th><td>{materiau}</td></tr>','</table>'),'degressensibilitebruit':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>{comnom}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type : </b></div></th><td>{type_ds}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Date de sanction : </b></div></th><td>{dat_sanct}</td></tr>','</table>'),'sitesopam':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Nom de l\'entreprise : </b></div></th><td>{nomsite}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Statut : </b></div></th><td>{opam}</td></tr>','</table>'),'csephydrants':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>N° de l\'hydrant : </b></div></th><td>{no_hydrant}</td></tr>','<tpl if="debit==null">','<tr><th width="50%" scope="row"><div align="left"><b>Débit à 2 bar en l/min. : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="debit">','<tr><th width="50%" scope="row"><div align="left"><b>Débit à 2 bar en l/min. : </b></div></th><td>{debit}</td></tr>','</tpl>','</table>'),'ecomorphologies':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>N° cours d\'eau : </b></div></th><td>{no_ce}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>N° tronçon : </b></div></th><td>{no_tron}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Classe écomorphologique : </b></div></th><td>{class_ecom}</td></tr>','</table>'),'risquesradon':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>{comnom}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Risque Radon : </b></div></th><td>{radon}</td></tr>','</table>'),'coursseau':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>N° : </b></div></th><td>{codece}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>{nomce_comp}</td></tr>','</table>'),'axesrtescantonales':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Propriétaire : </b></div></th><td>{prop}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Axe : </b></div></th><td>{axe}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type: </b></div></th><td>{type}</td></tr>','<tpl if="nom==null">','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="nom">','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>{nom}</td></tr>','</tpl>','</table>'),'ptsreperescantonaux':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>N° point : </b></div></th><td>{pr}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Distance : </b></div></th><td>{dist}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Axe: </b></div></th><td>{axe}</td></tr>','</table>'),'axesrtescommunales':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tpl if="prop==null">','<tr><th width="50%" scope="row"><div align="left"><b>Propriétaire : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="prop">','<tr><th width="50%" scope="row"><div align="left"><b>Propriétaire : </b></div></th><td>{prop}</td></tr>','</tpl>','<tpl if="axe==null">','<tr><th width="50%" scope="row"><div align="left"><b>Axe : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="axe">','<tr><th width="50%" scope="row"><div align="left"><b>Axe : </b></div></th><td>{axe}</td></tr>','</tpl>','<tpl if="nom==null">','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="nom">','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>{nom}</td></tr>','</tpl>','</table>'),'ptsreperescommunaux':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>N° point : </b></div></th><td>{pr}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Distance : </b></div></th><td>{dist}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Axe: </b></div></th><td>{axe}</td></tr>','</table>'),'trafics10':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Nbre de véhicules par jour : </b></div></th><td>{tjm}</td></tr>','</table>'),'trafics09':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Nbre de véhicules par jour : </b></div></th><td>{tjm}</td></tr>','</table>'),'trafics08':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Nbre de véhicules par jour : </b></div></th><td>{tjm}</td></tr>','</table>'),'trafics07':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Nbre de véhicules par jour : </b></div></th><td>{tjm}</td></tr>','</table>'),'trafics06':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Nbre de véhicules par jour : </b></div></th><td>{tjm}</td></tr>','</table>'),'trafics05':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Nbre de véhicules par jour : </b></div></th><td>{tjm}</td></tr>','</table>'),'trafics04':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Nbre de véhicules par jour : </b></div></th><td>{tjm}</td></tr>','</table>'),'trafics03':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Nbre de véhicules par jour : </b></div></th><td>{tjm}</td></tr>','</table>'),'trafics02':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Nbre de véhicules par jour : </b></div></th><td>{tjm}</td></tr>','</table>'),'arretstp':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>{nom}</td></tr>','</table>'),'cheminsforestiers':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tpl if="denomination==null">','<tr><th width="50%" scope="row"><div align="left"><b>Dénomination : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="denomination">','<tr><th width="50%" scope="row"><div align="left"><b>Dénomination : </b></div></th><td>{denomination}</td></tr>','</tpl>','<tr><th width="50%" scope="row"><div align="left"><b>Mixte : </b></div></th><td>{mixte}</td></tr>','</table>'),'arrondissementsforets':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>{nom}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Inspecteur : </b></div></th><td>{inspecteur}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Téléphone : </b></div></th><td>{telephone}</td></tr>','</table>'),'cantonnementsforets':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Numéro : </b></div></th><td>{numero}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Dénomination : </b></div></th><td>{denomination}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Titulaire : </b></div></th><td>{titulaire}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Arrondissement : </b></div></th><td>{arrdt}</td></tr>','</table>'),'administrationsforets':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Administration : </b></div></th><td>{adm}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>N° administration : </b></div></th><td>{codeadm}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>{nom}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Arrondissement : </b></div></th><td>{arrdt}</td></tr>','</table>'),'cartesphyto':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Type : </b></div></th><td>{assoc}</td></tr>','</table>'),'carteshydrogeologiques':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Type : </b></div></th><td>{nom_nat}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Perméabilité : </b></div></th><td>{nom_per}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Réserve en eau : </b></div></th><td>{nom_res}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Stratigraphie : </b></div></th><td>{nom_str}</td></tr>','</table>'),'plantesinvasives':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Plantes observées : </b></div></th><td>{plantes}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Description : </b></div></th><td>{description}</td></tr>','</table>'),'perturbationsactuelleslignes':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tpl if="type_evenement==null">','<tr><th width="50%" scope="row"><div align="left"><b>Type d\' événement : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="type_evenement">','<tr><th width="50%" scope="row"><div align="left"><b>Type d\' événement : </b></div></th><td>{type_evenement}</td></tr>','</tpl>','<tpl if="libelle==null">','<tr><th width="50%" scope="row"><div align="left"><b>Libellé : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="libelle">','<tr><th width="50%" scope="row"><div align="left"><b>Libellé : </b></div></th><td>{libelle}</td></tr>','</tpl>','<tpl if="type_perturbation==null">','<tr><th width="50%" scope="row"><div align="left"><b>Type de perturbation : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="type_perturbation">','<tr><th width="50%" scope="row"><div align="left"><b>Type de perturbation : </b></div></th><td>{type_perturbation}</td></tr>','</tpl>','<tpl if="date_debut==null">','<tr><th width="50%" scope="row"><div align="left"><b>Date début : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="date_debut">','<tr><th width="50%" scope="row"><div align="left"><b>Date début : </b></div></th><td>{date_debut}</td></tr>','</tpl>','<tpl if="date_fin==null">','<tr><th width="50%" scope="row"><div align="left"><b>Date fin : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="date_fin">','<tr><th width="50%" scope="row"><div align="left"><b>Date fin : </b></div></th><td>{date_fin}</td></tr>','</tpl>','<tpl if="remarques==null">','<tr><th width="50%" scope="row"><div align="left"><b>Remarques : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="remarques">','<tr><th width="50%" scope="row"><div align="left"><b>Remarques : </b></div></th><td>{remarques}</td></tr>','</tpl>','</table>'),'perturbationslignes':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tpl if="type_evenement==null">','<tr><th width="50%" scope="row"><div align="left"><b>Type d\' événement : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="type_evenement">','<tr><th width="50%" scope="row"><div align="left"><b>Type d\' événement : </b></div></th><td>{type_evenement}</td></tr>','</tpl>','<tpl if="libelle==null">','<tr><th width="50%" scope="row"><div align="left"><b>Libellé : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="libelle">','<tr><th width="50%" scope="row"><div align="left"><b>Libellé : </b></div></th><td>{libelle}</td></tr>','</tpl>','<tpl if="type_perturbation==null">','<tr><th width="50%" scope="row"><div align="left"><b>Type de perturbation : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="type_perturbation">','<tr><th width="50%" scope="row"><div align="left"><b>Type de perturbation : </b></div></th><td>{type_perturbation}</td></tr>','</tpl>','<tpl if="date_debut==null">','<tr><th width="50%" scope="row"><div align="left"><b>Date début : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="date_debut">','<tr><th width="50%" scope="row"><div align="left"><b>Date début : </b></div></th><td>{date_debut}</td></tr>','</tpl>','<tpl if="date_fin==null">','<tr><th width="50%" scope="row"><div align="left"><b>Date fin : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="date_fin">','<tr><th width="50%" scope="row"><div align="left"><b>Date fin : </b></div></th><td>{date_fin}</td></tr>','</tpl>','<tpl if="remarques==null">','<tr><th width="50%" scope="row"><div align="left"><b>Remarques : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="remarques">','<tr><th width="50%" scope="row"><div align="left"><b>Remarques : </b></div></th><td>{remarques}</td></tr>','</tpl>','</table>'),'perturbationsactuellespts':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tpl if="type_evenement==null">','<tr><th width="50%" scope="row"><div align="left"><b>Type d\' événement : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="type_evenement">','<tr><th width="50%" scope="row"><div align="left"><b>Type d\' événement : </b></div></th><td>{type_evenement}</td></tr>','</tpl>','<tpl if="libelle==null">','<tr><th width="50%" scope="row"><div align="left"><b>Libellé : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="libelle">','<tr><th width="50%" scope="row"><div align="left"><b>Libellé : </b></div></th><td>{libelle}</td></tr>','</tpl>','<tpl if="type_perturbation==null">','<tr><th width="50%" scope="row"><div align="left"><b>Type de perturbation : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="type_perturbation">','<tr><th width="50%" scope="row"><div align="left"><b>Type de perturbation : </b></div></th><td>{type_perturbation}</td></tr>','</tpl>','<tpl if="date_debut==null">','<tr><th width="50%" scope="row"><div align="left"><b>Date début : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="date_debut">','<tr><th width="50%" scope="row"><div align="left"><b>Date début : </b></div></th><td>{date_debut}</td></tr>','</tpl>','<tpl if="date_fin==null">','<tr><th width="50%" scope="row"><div align="left"><b>Date fin : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="date_fin">','<tr><th width="50%" scope="row"><div align="left"><b>Date fin : </b></div></th><td>{date_fin}</td></tr>','</tpl>','<tpl if="remarques==null">','<tr><th width="50%" scope="row"><div align="left"><b>Remarques : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="remarques">','<tr><th width="50%" scope="row"><div align="left"><b>Remarques : </b></div></th><td>{remarques}</td></tr>','</tpl>','</table>'),'perturbationspts':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tpl if="type_evenement==null">','<tr><th width="50%" scope="row"><div align="left"><b>Type d\' événement : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="type_evenement">','<tr><th width="50%" scope="row"><div align="left"><b>Type d\' événement : </b></div></th><td>{type_evenement}</td></tr>','</tpl>','<tpl if="libelle==null">','<tr><th width="50%" scope="row"><div align="left"><b>Libellé : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="libelle">','<tr><th width="50%" scope="row"><div align="left"><b>Libellé : </b></div></th><td>{libelle}</td></tr>','</tpl>','<tpl if="type_perturbation==null">','<tr><th width="50%" scope="row"><div align="left"><b>Type de perturbation : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="type_perturbation">','<tr><th width="50%" scope="row"><div align="left"><b>Type de perturbation : </b></div></th><td>{type_perturbation}</td></tr>','</tpl>','<tpl if="date_debut==null">','<tr><th width="50%" scope="row"><div align="left"><b>Date début : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="date_debut">','<tr><th width="50%" scope="row"><div align="left"><b>Date début : </b></div></th><td>{date_debut}</td></tr>','</tpl>','<tpl if="date_fin==null">','<tr><th width="50%" scope="row"><div align="left"><b>Date fin : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="date_fin">','<tr><th width="50%" scope="row"><div align="left"><b>Date fin : </b></div></th><td>{date_fin}</td></tr>','</tpl>','<tpl if="remarques==null">','<tr><th width="50%" scope="row"><div align="left"><b>Remarques : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="remarques">','<tr><th width="50%" scope="row"><div align="left"><b>Remarques : </b></div></th><td>{remarques}</td></tr>','</tpl>','</table>'),'adressessitn2':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Adresse : </b></div></th><td>{nom_adresse}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>N° cantonal rue : </b></div></th><td>{covoie}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Source : </b></div></th><td>{source}</td></tr>','</table>'),'npas':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Numéro postal : </b></div></th><td>{npa}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Localité : </b></div></th><td>{localite}</td></tr>','<tpl if="npa_comp==null">','<tr><th width="50%" scope="row"><div align="left"><b>Complément au n° postal : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="npa_comp">','<tr><th width="50%" scope="row"><div align="left"><b>Complément au n° postal : </b></div></th><td>{npa_comp}</td></tr>','</tpl>','</table>'),'communes2':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>{comnom}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>N° cantonal : </b></div></th><td>{numcom}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>N° fédéral : </b></div></th><td>{nufeco}</td></tr>','<tpl if="url_site==null">','<tr><th width="50%" scope="row"><div align="left"><b>Site web : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="url_site">','<tr><th width="50%" scope="row"><div align="left"><b>Site web : </b></div></th><td><a href="{url_site}" target="new">Cliquer ici</a></td></tr>','</tpl>','<tr><th width="50%" scope="row"><div align="left"><b>Statistiques : </b></div></th><td><a href="{url_stat}" target="new">Cliquer ici</a></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Image : </b></div></th><td><img src="{image2}" width="45" border="0" /></td></tr>','</table>'),'pois_admin':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>{nom_point}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type : </b></div></th><td>{type_point}</td></tr>','<tpl if="lien==null">','<tr><th width="50%" scope="row"><div align="left"><b>Site web : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="lien">','<tr><th width="50%" scope="row"><div align="left"><b>Site web : </b></div></th><td><a href="{lien}" target="new">Cliquer ici</a></td></tr>','</tpl>','<tpl if="lien_email==null">','<tr><th width="50%" scope="row"><div align="left"><b>Email : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="lien_email">','<tr><th width="50%" scope="row"><div align="left"><b>Email : </b></div></th><td><a href="mailto:{lien_email}" target="new">Cliquer ici</a></td></tr>','</tpl>','<tpl if="lien_telephone==null">','<tr><th width="50%" scope="row"><div align="left"><b>Téléphone : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="lien_telephone">','<tr><th width="50%" scope="row"><div align="left"><b>Téléphone : </b></div></th><td>{lien_telephone}</td></tr>','</tpl>','</table>'),'pois_culture':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>{nom_point}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type : </b></div></th><td>{type_point}</td></tr>','<tpl if="lien==null">','<tr><th width="50%" scope="row"><div align="left"><b>Site web : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="lien">','<tr><th width="50%" scope="row"><div align="left"><b>Site web : </b></div></th><td><a href="{lien}" target="new">Cliquer ici</a></td></tr>','</tpl>','<tpl if="lien_email==null">','<tr><th width="50%" scope="row"><div align="left"><b>Email : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="lien_email">','<tr><th width="50%" scope="row"><div align="left"><b>Email : </b></div></th><td><a href="mailto:{lien_email}" target="new">Cliquer ici</a></td></tr>','</tpl>','<tpl if="lien_telephone==null">','<tr><th width="50%" scope="row"><div align="left"><b>Téléphone : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="lien_telephone">','<tr><th width="50%" scope="row"><div align="left"><b>Téléphone : </b></div></th><td>{lien_telephone}</td></tr>','</tpl>','</table>'),'pois_transport':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Nom : </b></div></th><td>{nom_point}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type : </b></div></th><td>{type_point}</td></tr>','<tpl if="lien==null">','<tr><th width="50%" scope="row"><div align="left"><b>Site web : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="lien">','<tr><th width="50%" scope="row"><div align="left"><b>Site web : </b></div></th><td><a href="{lien}" target="new">Cliquer ici</a></td></tr>','</tpl>','<tpl if="lien_email==null">','<tr><th width="50%" scope="row"><div align="left"><b>Email : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="lien_email">','<tr><th width="50%" scope="row"><div align="left"><b>Email : </b></div></th><td><a href="mailto:{lien_email}" target="new">Cliquer ici</a></td></tr>','</tpl>','<tpl if="lien_telephone==null">','<tr><th width="50%" scope="row"><div align="left"><b>Téléphone : </b></div></th><td>-</td></tr>','</tpl>','<tpl if="lien_telephone">','<tr><th width="50%" scope="row"><div align="left"><b>Téléphone : </b></div></th><td>{lien_telephone}</td></tr>','</tpl>','</table>'),'points_collecte_dechets':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Commune : </b></div></th><td>{commune}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Zone : </b></div></th><td>{zone}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type filière : </b></div></th><td>{type_filiere}</td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Déchets collectés : </b></div></th><td>{dechets_collectes}</td></tr>','</table>'),'canepoaccidents':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>No. CANEPO : </b></div></th><td>{no_canepo}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Localité : </b></div></th><td>{localite}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Statut OSites : </b></div></th><td>{statut_osi}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Nom ou raison sociale : </b></div></th><td>{nom_rs}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Adresse : </b></div></th><td>{adresse}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Cause de pollution : </b></div></th><td>{activite}<br /></td></tr>','<tpl if="atteintes==null">','<tr><th width="50%" scope="row"><div align="left"><b>Atteintes constatées : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="atteintes">','<tr><th width="50%" scope="row"><div align="left"><b>Atteintes constatées : </b></div></th><td>{atteintes}<br /></td></tr>','</tpl>','<tpl if="mesures==null">','<tr><th width="50%" scope="row"><div align="left"><b>Mesures réalisées : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="mesures">','<tr><th width="50%" scope="row"><div align="left"><b>Mesures réalisées : </b></div></th><td>{mesures}<br /></td></tr>','</tpl>','<tpl if="restrict==null">','<tr><th width="50%" scope="row"><div align="left"><b>Restrictions : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="restrict">','<tr><th width="50%" scope="row"><div align="left"><b>Restrictions : </b></div></th><td>{restrict}<br /></td></tr>','</tpl>','<tpl if="parcelles==null">','<tr><th width="50%" scope="row"><div align="left"><b>Biens-fonds concernés : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="parcelles">','<tr><th width="50%" scope="row"><div align="left"><b>Biens-fonds concernés : </b></div></th><td><a href="javascript:App.popWin(\'/canepo/listeParcelles.php?nocanepo={no_canepo}\',400,400)">Cliquer ici</a><br /></td></tr>','</tpl>','<tpl if="date_acc==null">','<tr><th width="50%" scope="row"><div align="left"><b>Date accident : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="date_acc">','<tr><th width="50%" scope="row"><div align="left"><b>Date accident : </b></div></th><td>{date_acc}<br /></td></tr>','</tpl>','<tpl if="url_osites==null">','<tr><th width="50%" scope="row"><div align="left"><b>Ordonnance fédérale: </b></div></th><td><br /></td></tr>','</tpl>','<tpl if="url_osites">','<tr><th width="50%" scope="row"><div align="left"><b>Ordonnance fédérale: </b></div></th><td><a href="{url_osites}" target="new">Cliquer ici</a><br /></td></tr>','</tpl>','</table>'),'canepoentreprises':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>No. CANEPO : </b></div></th><td>{no_canepo}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Localité : </b></div></th><td>{localite}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Statut OSites : </b></div></th><td>{statut_osi}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Nom ou raison sociale : </b></div></th><td>{nom_rs}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Adresse : </b></div></th><td>{adresse}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Activité déterminante : </b></div></th><td>{activite}<br /></td></tr>','<tpl if="atteintes==null">','<tr><th width="50%" scope="row"><div align="left"><b>Atteintes constatées : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="atteintes">','<tr><th width="50%" scope="row"><div align="left"><b>Atteintes constatées : </b></div></th><td>{atteintes}<br /></td></tr>','</tpl>','<tpl if="mesures==null">','<tr><th width="50%" scope="row"><div align="left"><b>Mesures réalisées : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="mesures">','<tr><th width="50%" scope="row"><div align="left"><b>Mesures réalisées : </b></div></th><td>{mesures}<br /></td></tr>','</tpl>','<tpl if="restrict==null">','<tr><th width="50%" scope="row"><div align="left"><b>Restrictions : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="restrict">','<tr><th width="50%" scope="row"><div align="left"><b>Restrictions : </b></div></th><td>{restrict}<br /></td></tr>','</tpl>','<tpl if="parcelles==null">','<tr><th width="50%" scope="row"><div align="left"><b>Biens-fonds concernés : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="parcelles">','<tr><th width="50%" scope="row"><div align="left"><b>Biens-fonds concernés : </b></div></th><td><a href="javascript:App.popWin(\'/canepo/listeParcelles.php?nocanepo={no_canepo}\',400,400)">Cliquer ici</a><br /></td></tr>','</tpl>','<tpl if="duree_act==null">','<tr><th width="50%" scope="row"><div align="left"><b>Durée de l\'activité : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="duree_act">','<tr><th width="50%" scope="row"><div align="left"><b>Durée de l\'activité : </b></div></th><td>{duree_act}<br /></td></tr>','</tpl>','<tpl if="url_osites">','<tr><th width="50%" scope="row"><div align="left"><b>Ordonnance fédérale: </b></div></th><td>{url_osites}<br /></td></tr>','</tpl>','</table>'),'canepodecharges':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>No. CANEPO : </b></div></th><td>{no_canepo}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Localité : </b></div></th><td>{localite}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Statut OSites : </b></div></th><td>{statut_osi}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Nom ou raison sociale : </b></div></th><td>{nom_rs}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Adresse : </b></div></th><td>{adresse}<br /></td></tr>','<tpl if="atteintes==null">','<tr><th width="50%" scope="row"><div align="left"><b>Atteintes constatées : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="atteintes">','<tr><th width="50%" scope="row"><div align="left"><b>Atteintes constatées : </b></div></th><td>{atteintes}<br /></td></tr>','</tpl>','<tpl if="mesures==null">','<tr><th width="50%" scope="row"><div align="left"><b>Mesures réalisées : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="mesures">','<tr><th width="50%" scope="row"><div align="left"><b>Mesures réalisées : </b></div></th><td>{mesures}<br /></td></tr>','</tpl>','<tpl if="restrict==null">','<tr><th width="50%" scope="row"><div align="left"><b>Restrictions : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="restrict">','<tr><th width="50%" scope="row"><div align="left"><b>Restrictions : </b></div></th><td>{restrict}<br /></td></tr>','</tpl>','<tpl if="parcelles==null">','<tr><th width="50%" scope="row"><div align="left"><b>Biens-fonds concernés : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="parcelles">','<tr><th width="50%" scope="row"><div align="left"><b>Biens-fonds concernés : </b></div></th><td><a href="javascript:App.popWin(\'/canepo/listeParcelles.php?nocanepo={no_canepo}\',400,400)">Cliquer ici</a><br /></td></tr>','</tpl>','<tpl if="duree_act==null">','<tr><th width="50%" scope="row"><div align="left"><b>Durée de l\'exploitation: </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="duree_act">','<tr><th width="50%" scope="row"><div align="left"><b>Durée de l\'exploitation: </b></div></th><td>{duree_act}<br /></td></tr>','</tpl>','<tpl if="volume_dec==null">','<tr><th width="50%" scope="row"><div align="left"><b>Volume de la décharge : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="volume_dec">','<tr><th width="50%" scope="row"><div align="left"><b>Volume de la décharge : </b></div></th><td>{volume_dec}<br /></td></tr>','</tpl>','<tpl if="incert_vol==null">','<tr><th width="50%" scope="row"><div align="left"><b>Incertitude sur le volume : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="incert_vol">','<tr><th width="50%" scope="row"><div align="left"><b>Incertitude sur le volume : </b></div></th><td>{incert_vol}<br /></td></tr>','</tpl>','<tr><th width="50%" scope="row"><div align="left"><b>Ordonnance fédérale: </b></div></th><td><a href="{url_osites}" target="new">Cliquer ici</a><br /></td></tr>','</table>'),'canepoentreprisespoints':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>No. CANEPO : </b></div></th><td>{no_canepo}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Localité : </b></div></th><td>{localite}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Statut OSites : </b></div></th><td>{statut_osi}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Nom ou raison sociale : </b></div></th><td>{nom_rs}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Adresse : </b></div></th><td>{adresse}<br /></td></tr>','<tpl if="atteintes==null">','<tr><th width="50%" scope="row"><div align="left"><b>Atteintes constatées : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="atteintes">','<tr><th width="50%" scope="row"><div align="left"><b>Atteintes constatées : </b></div></th><td>{atteintes}<br /></td></tr>','</tpl>','<tpl if="mesures==null">','<tr><th width="50%" scope="row"><div align="left"><b>Mesures réalisées : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="mesures">','<tr><th width="50%" scope="row"><div align="left"><b>Mesures réalisées : </b></div></th><td>{mesures}<br /></td></tr>','</tpl>','<tpl if="restrict==null">','<tr><th width="50%" scope="row"><div align="left"><b>Restrictions : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="restrict">','<tr><th width="50%" scope="row"><div align="left"><b>Restrictions : </b></div></th><td>{restrict}<br /></td></tr>','</tpl>','<tpl if="parcelles==null">','<tr><th width="50%" scope="row"><div align="left"><b>Biens-fonds concernés : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="parcelles">','<tr><th width="50%" scope="row"><div align="left"><b>Biens-fonds concernés : </b></div></th><td><a href="javascript:App.popWin(\'/canepo/listeParcelles.php?nocanepo={no_canepo}\',400,400)">Cliquer ici</a><br /></td></tr>','</tpl>','<tpl if="duree_act==null">','<tr><th width="50%" scope="row"><div align="left"><b>Durée de l\'activité : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="duree_act">','<tr><th width="50%" scope="row"><div align="left"><b>Durée de l\'activité : </b></div></th><td>{duree_act}<br /></td></tr>','</tpl>','<tr><th width="50%" scope="row"><div align="left"><b>Ordonnance fédérale: </b></div></th><td><a href="{url_osites}" target="new">Cliquer ici</a><br /></td></tr>','</table>'),'canepoentreprisespolygones':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>No. CANEPO : </b></div></th><td>{no_canepo}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Localité : </b></div></th><td>{localite}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Statut OSites : </b></div></th><td>{statut_osi}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Nom ou raison sociale : </b></div></th><td>{nom_rs}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Adresse : </b></div></th><td>{adresse}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Activité déterminante : </b></div></th><td>{activite}<br /></td></tr>','<tpl if="atteintes==null">','<tr><th width="50%" scope="row"><div align="left"><b>Atteintes constatées : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="atteintes">','<tr><th width="50%" scope="row"><div align="left"><b>Atteintes constatées : </b></div></th><td>{atteintes}<br /></td></tr>','</tpl>','<tpl if="mesures==null">','<tr><th width="50%" scope="row"><div align="left"><b>Mesures réalisées : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="mesures">','<tr><th width="50%" scope="row"><div align="left"><b>Mesures réalisées : </b></div></th><td>{mesures}<br /></td></tr>','</tpl>','<tpl if="restrict==null">','<tr><th width="50%" scope="row"><div align="left"><b>Restrictions : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="restrict">','<tr><th width="50%" scope="row"><div align="left"><b>Restrictions : </b></div></th><td>{restrict}<br /></td></tr>','</tpl>','<tpl if="parcelles==null">','<tr><th width="50%" scope="row"><div align="left"><b>Biens-fonds concernés : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="parcelles">','<tr><th width="50%" scope="row"><div align="left"><b>Biens-fonds concernés : </b></div></th><td><a href="javascript:App.popWin(\'/canepo/listeParcelles.php?nocanepo={no_canepo}\',400,400)">Cliquer ici</a><br /></td></tr>','</tpl>','<tpl if="duree_act==null">','<tr><th width="50%" scope="row"><div align="left"><b>Durée de l\'activité : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="duree_act">','<tr><th width="50%" scope="row"><div align="left"><b>Durée de l\'activité : </b></div></th><td>{duree_act}<br /></td></tr>','</tpl>','<tr><th width="50%" scope="row"><div align="left"><b>Ordonnance fédérale: </b></div></th><td>{url_osites}<br /></td></tr>','</table>'),'canepodechargespoints':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>No. CANEPO : </b></div></th><td>{no_canepo}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Localité : </b></div></th><td>{localite}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Statut OSites : </b></div></th><td>{statut_osi}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Nom ou raison sociale : </b></div></th><td>{nom_rs}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Adresse : </b></div></th><td>{adresse}<br /></td></tr>','<tpl if="atteintes==null">','<tr><th width="50%" scope="row"><div align="left"><b>Atteintes constatées : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="atteintes">','<tr><th width="50%" scope="row"><div align="left"><b>Atteintes constatées : </b></div></th><td>{atteintes}<br /></td></tr>','</tpl>','<tpl if="mesures==null">','<tr><th width="50%" scope="row"><div align="left"><b>Mesures réalisées : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="mesures">','<tr><th width="50%" scope="row"><div align="left"><b>Mesures réalisées : </b></div></th><td>{mesures}<br /></td></tr>','</tpl>','<tpl if="restrict==null">','<tr><th width="50%" scope="row"><div align="left"><b>Restrictions : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="restrict">','<tr><th width="50%" scope="row"><div align="left"><b>Restrictions : </b></div></th><td>{restrict}<br /></td></tr>','</tpl>','<tpl if="parcelles==null">','<tr><th width="50%" scope="row"><div align="left"><b>Biens-fonds concernés : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="parcelles">','<tr><th width="50%" scope="row"><div align="left"><b>Biens-fonds concernés : </b></div></th><td><a href="javascript:App.popWin(\'/canepo/listeParcelles.php?nocanepo={no_canepo}\',400,400)">Cliquer ici</a><br /></td></tr>','</tpl>','<tpl if="duree_act==null">','<tr><th width="50%" scope="row"><div align="left"><b>Durée de l\'exploitation: </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="duree_act">','<tr><th width="50%" scope="row"><div align="left"><b>Durée de l\'exploitation: </b></div></th><td>{duree_act}<br /></td></tr>','</tpl>','<tpl if="volume_dec==null">','<tr><th width="50%" scope="row"><div align="left"><b>Volume de la décharge : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="volume_dec">','<tr><th width="50%" scope="row"><div align="left"><b>Volume de la décharge : </b></div></th><td>{volume_dec}<br /></td></tr>','</tpl>','<tpl if="incert_vol==null">','<tr><th width="50%" scope="row"><div align="left"><b>Incertitude sur le volume : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="incert_vol">','<tr><th width="50%" scope="row"><div align="left"><b>Incertitude sur le volume : </b></div></th><td>{incert_vol}<br /></td></tr>','</tpl>','<tr><th width="50%" scope="row"><div align="left"><b>Ordonnance fédérale: </b></div></th><td><a href="{url_osites}" target="new">Cliquer ici</a><br /></td></tr>','</table>'),'canepodechargespolygones':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>No. CANEPO : </b></div></th><td>{no_canepo}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Localité : </b></div></th><td>{localite}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Statut OSites : </b></div></th><td>{statut_osi}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Nom ou raison sociale : </b></div></th><td>{nom_rs}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Adresse : </b></div></th><td>{adresse}<br /></td></tr>','<tpl if="atteintes==null">','<tr><th width="50%" scope="row"><div align="left"><b>Atteintes constatées : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="atteintes">','<tr><th width="50%" scope="row"><div align="left"><b>Atteintes constatées : </b></div></th><td>{atteintes}<br /></td></tr>','</tpl>','<tpl if="mesures==null">','<tr><th width="50%" scope="row"><div align="left"><b>Mesures réalisées : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="mesures">','<tr><th width="50%" scope="row"><div align="left"><b>Mesures réalisées : </b></div></th><td>{mesures}<br /></td></tr>','</tpl>','<tpl if="restrict==null">','<tr><th width="50%" scope="row"><div align="left"><b>Restrictions : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="restrict">','<tr><th width="50%" scope="row"><div align="left"><b>Restrictions : </b></div></th><td>{restrict}<br /></td></tr>','</tpl>','<tpl if="parcelles==null">','<tr><th width="50%" scope="row"><div align="left"><b>Biens-fonds concernés : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="parcelles">','<tr><th width="50%" scope="row"><div align="left"><b>Biens-fonds concernés : </b></div></th><td><a href="javascript:App.popWin(\'/canepo/listeParcelles.php?nocanepo={no_canepo}\',400,400)">Cliquer ici</a><br /></td></tr>','</tpl>','<tpl if="duree_act==null">','<tr><th width="50%" scope="row"><div align="left"><b>Durée de l\'exploitation: </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="duree_act">','<tr><th width="50%" scope="row"><div align="left"><b>Durée de l\'exploitation: </b></div></th><td>{duree_act}<br /></td></tr>','</tpl>','<tpl if="volume_dec==null">','<tr><th width="50%" scope="row"><div align="left"><b>Volume de la décharge : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="volume_dec">','<tr><th width="50%" scope="row"><div align="left"><b>Volume de la décharge : </b></div></th><td>{volume_dec}<br /></td></tr>','</tpl>','<tpl if="incert_vol==null">','<tr><th width="50%" scope="row"><div align="left"><b>Incertitude sur le volume : </b></div></th><td>&nbsp;<br /></td></tr>','</tpl>','<tpl if="incert_vol">','<tr><th width="50%" scope="row"><div align="left"><b>Incertitude sur le volume : </b></div></th><td>{incert_vol}<br /></td></tr>','</tpl>','<tr><th width="50%" scope="row"><div align="left"><b>Ordonnance fédérale: </b></div></th><td><a href="{url_osites}" target="new">Cliquer ici</a><br /></td></tr>','</table>'),'parcelles':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>Cadastre : </b></div></th><td>{cadastre}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>N° de bien-fonds : </b></div></th><td>{nummai}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type : </b></div></th><td>{typimm}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Surface m<sup>2</sup> : </b></div></th><td>{srfmai}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Propriétaire : </b></div></th><td><a href="{url_terris}">Cliquer ici</a><br /></td></tr>','<tpl if="App.theme.id==&quot;canepo&quot;">','<tr><th width="50%" scope="row"><div align="left"><b>Attestation CANEPO : </b></div></th><td><a href="javascript:App.popWin(\'/canepo/attestation_pdf.php?idemai={idemai}\',400,400)">Cliquer ici</a><br /></td></tr>','</tpl>','</table>'),'photosobliques':new Ext.XTemplate('<table><tr><td align="left"><b><font color="#CC0000">Photo  : {name}</font></b></td>','<td align="right"></td></tr>','<tr><td align="right">copyright 2007</td><td align="right">photo K. Budmiger - Flotron AG</td></tr>','<tr><td colspan="2" align="center"><font face="Arial">','<a href="{urllarge}" target="blank">','<img src ="{urlsmall}"></img></a>','</font><td/></td></tr>','</table>'),'photosrives':new Ext.XTemplate('<table><tr><td align="left"><b><font color="#CC0000">Photo  : {name}</font></b></td></tr>','<tr><td align="left">copyright 2005 - photo J.-M. Zellweger</tr>','<tr><td align="left"><a href="{urllarge}" target="blank">','<img src ="{urlsmall}"></img></a>','</font><td/></tr>','</table>'),'ecoreseaux11a':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux11b':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux11c':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux11d':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux12a':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux12b':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux12c':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux21a':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux21b':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux22a':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux22b':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux22c':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux22d':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux23a':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux23b':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux23c':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux23d':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux31a':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux31b':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux31c':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux32a':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux32b':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux32c':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux33a':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux33b':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux33d':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux34a':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux34b':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux34c':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux34d':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux35a':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux35b':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux35c':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux35d':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux36a':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux37a':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux37b':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux41a':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux41b':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux42a':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux42b':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux43a':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'ecoreseaux44a':new Ext.XTemplate('<table width="95%" cellpadding="1" cellspacing="5">','<tr><td>{objectifs}</td></tr>','</table>'),'surfaces_de_sport_polygones':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>No. de la surface : </b></div></th><td>{id_surf}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type de surface : </b></div></th><td>{type_surf}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type de sol : </b></div></th><td>{type_sol}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Etat du terrain : </b></div></th><td>{etat}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Dimensions : </b></div></th><td>{longueur} m x {largeur} m x {hauteur} m<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Disponibilit&eacute; saisonni&egrave; : </b></div></th><td>{disponibilite}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>D&eacute;tails : </b></div></th><td>{details}<br /></td></tr>','<tpl if="cal_gelore==null">','<tr><th width="50%" scope="row"><div align="left"><b>Calendrier en ligne : </b></div></th><td>Pas disponible.<br /></td></tr>','</tpl>','<tpl if="cal_gelore">','<tr><th width="50%" scope="row"><div align="left"><b>Calendrier en ligne : </b></div></th><td><a href="{cal_gelore}" target="_blank">Cliquer ici</a><br /></td></tr>','</tpl>','<tpl if="res_gelore==null">','<tr><th width="50%" scope="row"><div align="left"><b>R&eacute;servation en ligne : </b></div></th><td>Pas disponible.<br /></td></tr>','</tpl>','<tpl if="res_gelore">','<tr><th width="50%" scope="row"><div align="left"><b>R&eacute;servation en ligne : </b></div></th><td><a href="{res_gelore}" target="_blank">Cliquer ici</a><br /></td></tr>','</tpl>','<tr><th width="50%" scope="row"><div align="left"><b>Actualisation de la fiche : </b></div></th><td>{date_modif}<br /></td></tr>','</table>'),'installations_sportives':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>No. installation : </b></div></th><td>{id_inst}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Nom installation : </b></div></th><td>{nom_inst}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type installation : </b></div></th><td>{type_inst}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Adresse : </b></div></th><td>{rue}&nbsp;{norue}<br>{npa}&nbsp;{localite}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Utilisation : </b></div></th><td>{utilisation}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Accessibilité : </b></div></th><td>{accessibilite}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Accessibilité aux personnes handicap&eacute;es : </b></div></th><td>{acces_handicape}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Couvert : </b></div></th><td>{couvert}<br /></td></tr>','<tpl if="annee_const==null">','<tr><th width="50%" scope="row"><div align="left"><b>Ann&eacute;e de construction : </b></div></th><td>Pas d&apos;indication.<br /></td></tr>','</tpl>','<tpl if="cal_gelore">','<tr><th width="50%" scope="row"><div align="left"><b>Ann&eacute;e de construction : </b></div></th><td>{annee_const}<br /></td></tr>','</tpl>','<tpl if="cal_gelore==null">','<tr><th width="50%" scope="row"><div align="left"><b>Calendrier en ligne : </b></div></th><td>Pas disponible.<br /></td></tr>','</tpl>','<tpl if="cal_gelore">','<tr><th width="50%" scope="row"><div align="left"><b>Calendrier en ligne : </b></div></th><td><a href="{cal_gelore}" target="_blank">Cliquer ici</a><br /></td></tr>','</tpl>','<tpl if="res_gelore==null">','<tr><th width="50%" scope="row"><div align="left"><b>R&eacute;servation en ligne : </b></div></th><td>Pas disponible.<br /></td></tr>','</tpl>','<tpl if="res_gelore">','<tr><th width="50%" scope="row"><div align="left"><b>R&eacute;servation en ligne : </b></div></th><td><a href="{res_gelore}" target="_blank">Cliquer ici</a><br /></td></tr>','</tpl>','<tr><th width="50%" scope="row"><div align="left"><b>Actualisation de la fiche : </b></div></th><td>{date_modif}<br /></td></tr>','</table>'),'installations_sportives_polygones':new Ext.XTemplate('<table width="100%" cellpadding="1" cellspacing="5">','<tr><th width="50%" scope="row"><div align="left"><b>No. installation : </b></div></th><td>{id_inst}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Nom installation : </b></div></th><td>{nom_inst}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Type installation : </b></div></th><td>{type_inst}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Adresse : </b></div></th><td>{rue}&nbsp;{norue}<br>{npa}&nbsp;{localite}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Utilisation : </b></div></th><td>{utilisation}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Accessibilité : </b></div></th><td>{accessibilite}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Accessibilité aux personnes handicap&eacute;es : </b></div></th><td>{acces_handicape}<br /></td></tr>','<tr><th width="50%" scope="row"><div align="left"><b>Couvert : </b></div></th><td>{couvert}<br /></td></tr>','<tpl if="annee_const==null">','<tr><th width="50%" scope="row"><div align="left"><b>Ann&eacute;e de construction : </b></div></th><td>Pas d&apos;indication.<br /></td></tr>','</tpl>','<tpl if="cal_gelore">','<tr><th width="50%" scope="row"><div align="left"><b>Ann&eacute;e de construction : </b></div></th><td>{annee_const}<br /></td></tr>','</tpl>','<tpl if="cal_gelore==null">','<tr><th width="50%" scope="row"><div align="left"><b>Calendrier en ligne : </b></div></th><td>Pour cet objet le calendrier en ligne n&apos;est pas disponible.<br /></td></tr>','</tpl>','<tpl if="cal_gelore">','<tr><th width="50%" scope="row"><div align="left"><b
