(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),cm.close();d=cm.createElement(a),cm.body.appendChild(d),
e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===
1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function cb(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]===
"*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function ca(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bE.test(a)?d(a,e):ca(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)ca(a+"["+e+"]",b[e],c,d);else d(a,
b)}function b_(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function b$(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bT,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=b$(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=b$(a,c,d,e,"*",g));return l}function bZ(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bP),
e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bC(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bx:by,g=0,h=e.length;if(d>0){if(c!=="border")for(;g<h;g++)c||(d-=parseFloat(f.css(a,"padding"+e[g]))||0),c==="margin"?d+=parseFloat(f.css(a,c+e[g]))||0:d-=parseFloat(f.css(a,"border"+e[g]+"Width"))||0;return d+"px"}d=bz(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0;if(c)for(;g<h;g++)d+=
parseFloat(f.css(a,"padding"+e[g]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+e[g]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+e[g]))||0);return d+"px"}function bp(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();
b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();
if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio")if(c==="option")b.selected=a.defaultSelected;else{if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<
e;d++)f.event.add(b,c+(i[c][d].namespace?".":"")+i[c][d].namespace,i[c][d],i[c][d].data)}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===
c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,
e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=
0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=
this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);
return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?
this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},
slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i=
{}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,
1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&
b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;
for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a);},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),
d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d)if(i)for(f in a){if(c.apply(a[f],
d)===!1)break}else for(;g<h;){if(c.apply(a[g++],d)===!1)break}else if(i)for(f in a){if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,
a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));
if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=
!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof
e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test("\u00a0")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",
B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?m(g):h==="function"&&(!a.unique||!o.has(g))&&c.push(g)},n=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,l=j||0,j=0,k=c.length;for(;c&&l<k;l++)if(c[l].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}i=!1,c&&(a.once?
e===!0?o.disable():c=[]:d&&d.length&&(e=d.shift(),o.fireWith(e[0],e[1])))},o={add:function(){if(c){var a=c.length;m(arguments),i?k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){i&&f<=k&&(k--,f<=l&&l--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=
d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&o.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(i?a.once||d.push([b,c]):(!a.once||!e)&&n(b,c));return this},fire:function(){o.fireWith(this,arguments);return this},fired:function(){return!!e}};return o};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,
fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,
d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=
arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p,q=c.createElement("div"),r=c.documentElement;q.setAttribute("className","t"),
q.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),
hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,
g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=
i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,
k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="<div "+n+"><div></div></div>"+"<table "+n+" cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",
l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="<div style='width:4px;'></div>",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,
d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,
k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]=
{},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=
b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,
c){var d,e,g,h=null;if(typeof a=="undefined"){if(this.length){h=f.data(this[0]);if(this[0].nodeType===1&&!f._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var i=0,j=e.length;i<j;i++)g=e[i].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),l(this[0],g,h[g]));f._data(this[0],"parsedAttrs",!0)}}return h}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split("."),d[1]=d[1]?"."+d[1]:"";if(c===b){h=this.triggerHandler("getData"+d[1]+"!",[d[0]]),h===b&&this.length&&
(h=f.data(this[0],a),h=l(this[0],a,h));return h===b&&d[1]?this.data(d[0]):h}return this.each(function(){var b=f(this),e=[d[0],c];b.triggerHandler("setData"+d[1]+"!",e),f.data(this,a,c),b.triggerHandler("changeData"+d[1]+"!",e)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?
f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!=
"string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!=
"string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise()}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=
a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=
(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&
f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+=
"":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,
c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||
(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in
h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h<g;h++)e=d[h],e&&(c=f.propFix[e]||e,f.attr(a,e,""),a.removeAttribute(v?e:c),u.test(e)&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",
b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,
d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!=
"boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=
w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||
b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],
{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&
(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,
arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,
o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+
"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,
d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,
o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=
0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=
b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=[],j,k,l,m,n,o,p,q,r,s,t;g[0]=c,c.delegateTarget=this;if(e&&!c.target.disabled&&(!c.button||c.type!=="click")){m=f(this),m.context=this.ownerDocument||this;for(l=c.target;l!=this;l=l.parentNode||this){o={},q=[],m[0]=l;for(j=0;j<e;j++)r=d[j],s=r.selector,o[s]===b&&(o[s]=r.quick?H(l,r.quick):m.is(s)),
o[s]&&q.push(r);q.length&&i.push({elem:l,matches:q})}}d.length>e&&i.push({elem:this,matches:d.slice(e)});for(j=0;j<i.length&&!c.isPropagationStopped();j++){p=i[j],c.currentTarget=p.elem;for(k=0;k<p.matches.length&&!c.isImmediatePropagationStopped();k++){r=p.matches[k];if(h||!c.namespace&&!r.namespace||c.namespace_re&&c.namespace_re.test(r.namespace))c.data=r.data,c.handleObj=r,n=((f.event.special[r.origType]||{}).handle||r.handler).apply(p.elem,g),n!==b&&(c.result=n,n===!1&&(c.preventDefault(),c.stopPropagation()))}}return c.result},
props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,
h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||
{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===
b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);
a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&
a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),
f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0)}),d._submit_attached=!0)})},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),
f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&
!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},
function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);
return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on.call(this,a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.type+"."+e.namespace:e.type,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,
a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,
b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),
function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>
0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,
l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>
1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,
k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,
e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=
null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a);};
var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d)if(d===1||d===9){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else{if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},
type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<
f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!=
"undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,
"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+
a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&
a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===
a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();
return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,
b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case "only":case "first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case "last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case "nth":c=b[2],e=b[3];if(c===
1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,
c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=
new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);
else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),
j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!=
"undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);
if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||
c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!==
"object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,
"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className=
"e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:
0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,
O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.POS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=
0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});
g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:
a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,
"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,
b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===
1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,
$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],
area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,
b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?
a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,
this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),
f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||
!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();
c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});
if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bp)}return this}}),
f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",
insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||
!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=
k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),
o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof(r=k.length)=="number")for(i=0;i<r;i++)bn(k[i]);else bn(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||be.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},
cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bq=/alpha\([^)]*\)/i,br=/opacity=([^)]*)/,bs=/([A-Z]|^ms)/g,bt=/^-?\d+(?:px)?$/i,bu=
/^-?\d/,bv=/^([\-+])=([\-+.\de]+)/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Left","Right"],by=["Top","Bottom"],bz,bA,bB;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bz(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,
widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bv.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||
(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bz)return bz(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return bC(a,b,d);f.swap(a,bw,function(){e=
bC(a,b,d)});return e}},set:function(a,b){if(!bt.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=
bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,
a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;
return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&
(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&
(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,
url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},
contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=
y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},
c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||
(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]===
"http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&
d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,
v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z;}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||
a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||
e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},
contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,
c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||
f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===
4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=
/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",
cv(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cu("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a==
"boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cu("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties=
{};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cv(this.nodeName)==="inline"?
this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cn.test(h)?(o=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),o?(f._data(this,"toggle"+i,o==="show"?"hide":"show"),j[o]()):j[h]()):(k=co.exec(h),l=j.cur(),k?(m=parseFloat(k[2]),n=k[3]||(f.cssNumber[i]?"":"px"),n!=="px"&&(f.style(this,i,(m||1)+n),l=(m||1)/j.cur()*l,f.style(this,i,l+n)),k[1]&&(m=(k[1]==="-="?-1:1)*m+l),j.custom(l,m,n)):j.custom(l,h,
""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&
g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:cu("show",1),slideUp:cu("hide",1),slideToggle:cu("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&
a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+0.5)*d+c}},timers:[],fx:function(a,
b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;
this.startTime=cr||cs(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){e.options.hide&&f._data(e.elem,"fxshow"+e.prop)===b&&f._data(e.elem,"fxshow"+e.prop,e.start)},h()&&f.timers.push(h)&&!cp&&(cp=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=
!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cr||cs(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==
!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=
this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cp),cp=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(["width","height"],
function(a,b){f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);
try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cy(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,
a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.support.fixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.support.doesNotAddBorder&&
(!f.support.doesAddBorderForTableAndCells||!cw.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.support.fixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,
i.scrollLeft));return{top:l,left:m}},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,
n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=
parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||
g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=
f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&
define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window);(function(jQuery,undefined){var oldManip=jQuery.fn.domManip,tmplItmAtt="_tmplitem",htmlExpr=/^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /,newTmplItems={},wrappedItems={},appendToTmplItems,topTmplItem={key:0,data:{}},itemKey=0,cloneIndex=0,stack=[];function newTmplItem(options,parentItem,fn,data){var newItem={data:data||data===0||data===false?data:parentItem?parentItem.data:{},_wrap:parentItem?parentItem._wrap:null,tmpl:null,parent:parentItem||null,nodes:[],calls:tiCalls,nest:tiNest,wrap:tiWrap,html:tiHtml,update:tiUpdate};
if(options)jQuery.extend(newItem,options,{nodes:[],parent:parentItem});if(fn){newItem.tmpl=fn;newItem._ctnt=newItem._ctnt||newItem.tmpl(jQuery,newItem);newItem.key=++itemKey;(stack.length?wrappedItems:newTmplItems)[itemKey]=newItem}return newItem}jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){var ret=[],insert=jQuery(selector),elems,i,l,tmplItems,parent=this.length===
1&&this[0].parentNode;appendToTmplItems=newTmplItems||{};if(parent&&parent.nodeType===11&&parent.childNodes.length===1&&insert.length===1){insert[original](this[0]);ret=this}else{for(i=0,l=insert.length;i<l;i++){cloneIndex=i;elems=(i>0?this.clone(true):this).get();jQuery(insert[i])[original](elems);ret=ret.concat(elems)}cloneIndex=0;ret=this.pushStack(ret,name,insert.selector)}tmplItems=appendToTmplItems;appendToTmplItems=null;jQuery.tmpl.complete(tmplItems);return ret}});jQuery.fn.extend({tmpl:function(data,
options,parentItem){return jQuery.tmpl(this[0],data,options,parentItem)},tmplItem:function(){return jQuery.tmplItem(this[0])},template:function(name){return jQuery.template(name,this[0])},domManip:function(args,table,callback,options){if(args[0]&&jQuery.isArray(args[0])){var dmArgs=jQuery.makeArray(arguments),elems=args[0],elemsLength=elems.length,i=0,tmplItem;while(i<elemsLength&&!(tmplItem=jQuery.data(elems[i++],"tmplItem")));if(tmplItem&&cloneIndex)dmArgs[2]=function(fragClone){jQuery.tmpl.afterManip(this,
fragClone,callback)};oldManip.apply(this,dmArgs)}else oldManip.apply(this,arguments);cloneIndex=0;if(!appendToTmplItems)jQuery.tmpl.complete(newTmplItems);return this}});jQuery.extend({tmpl:function(tmpl,data,options,parentItem){var ret,topLevel=!parentItem;if(topLevel){parentItem=topTmplItem;tmpl=jQuery.template[tmpl]||jQuery.template(null,tmpl);wrappedItems={}}else if(!tmpl){tmpl=parentItem.tmpl;newTmplItems[parentItem.key]=parentItem;parentItem.nodes=[];if(parentItem.wrapped)updateWrapped(parentItem,
parentItem.wrapped);return jQuery(build(parentItem,null,parentItem.tmpl(jQuery,parentItem)))}if(!tmpl)return[];if(typeof data==="function")data=data.call(parentItem||{});if(options&&options.wrapped)updateWrapped(options,options.wrapped);ret=jQuery.isArray(data)?jQuery.map(data,function(dataItem){return dataItem?newTmplItem(options,parentItem,tmpl,dataItem):null}):[newTmplItem(options,parentItem,tmpl,data)];return topLevel?jQuery(build(parentItem,null,ret)):ret},tmplItem:function(elem){var tmplItem;
if(elem instanceof jQuery)elem=elem[0];while(elem&&elem.nodeType===1&&!(tmplItem=jQuery.data(elem,"tmplItem"))&&(elem=elem.parentNode));return tmplItem||topTmplItem},template:function(name,tmpl){if(tmpl){if(typeof tmpl==="string")tmpl=buildTmplFn(tmpl);else if(tmpl instanceof jQuery)tmpl=tmpl[0]||{};if(tmpl.nodeType)tmpl=jQuery.data(tmpl,"tmpl")||jQuery.data(tmpl,"tmpl",buildTmplFn(tmpl.innerHTML));return typeof name==="string"?jQuery.template[name]=tmpl:tmpl}return name?typeof name!=="string"?jQuery.template(null,
name):jQuery.template[name]||jQuery.template(null,htmlExpr.test(name)?name:jQuery(name)):null},encode:function(text){return(""+text).split("<").join("&lt;").split(">").join("&gt;").split('"').join("&#34;").split("'").join("&#39;")}});jQuery.extend(jQuery.tmpl,{tag:{"tmpl":{_default:{$2:"null"},open:"if($notnull_1){__=__.concat($item.nest($1,$2));}"},"wrap":{_default:{$2:"null"},open:"$item.calls(__,$1,$2);__=[];",close:"call=$item.calls();__=call._.concat($item.wrap(call,__));"},"each":{_default:{$2:"$index, $value"},
open:"if($notnull_1){$.each($1a,function($2){with(this){",close:"}});}"},"if":{open:"if(($notnull_1) && $1a){",close:"}"},"else":{_default:{$1:"true"},open:"}else if(($notnull_1) && $1a){"},"html":{open:"if($notnull_1){__.push($1a);}"},"=":{_default:{$1:"$data"},open:"if($notnull_1){__.push($.encode($1a));}"},"!":{open:""}},complete:function(items){newTmplItems={}},afterManip:function afterManip(elem,fragClone,callback){var content=fragClone.nodeType===11?jQuery.makeArray(fragClone.childNodes):fragClone.nodeType===
1?[fragClone]:[];callback.call(elem,fragClone);storeTmplItems(content);cloneIndex++}});function build(tmplItem,nested,content){var frag,ret=content?jQuery.map(content,function(item){return typeof item==="string"?tmplItem.key?item.replace(/(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g,"$1 "+tmplItmAtt+'="'+tmplItem.key+'" $2'):item:build(item,tmplItem,item._ctnt)}):tmplItem;if(nested)return ret;ret=ret.join("");ret.replace(/^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/,function(all,before,middle,after){frag=
jQuery(middle).get();storeTmplItems(frag);if(before)frag=unencode(before).concat(frag);if(after)frag=frag.concat(unencode(after))});return frag?frag:unencode(ret)}function unencode(text){var el=document.createElement("div");el.innerHTML=text;return jQuery.makeArray(el.childNodes)}function buildTmplFn(markup){return new Function("jQuery","$item","var $=jQuery,call,__=[],$data=$item.data;"+"with($data){__.push('"+jQuery.trim(markup).replace(/([\\'])/g,"\\$1").replace(/[\r\t\n]/g," ").replace(/\$\{([^\}]*)\}/g,
"{{= $1}}").replace(/\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g,function(all,slash,type,fnargs,target,parens,args){var tag=jQuery.tmpl.tag[type],def,expr,exprAutoFnDetect;if(!tag)throw"Unknown template tag: "+type;def=tag._default||[];if(parens&&!/\w$/.test(target)){target+=parens;parens=""}if(target){target=unescape(target);args=args?","+unescape(args)+")":parens?")":"";expr=parens?target.indexOf(".")>-1?target+unescape(parens):"("+target+
").call($item"+args:target;exprAutoFnDetect=parens?expr:"(typeof("+target+")==='function'?("+target+").call($item):("+target+"))"}else exprAutoFnDetect=expr=def.$1||"null";fnargs=unescape(fnargs);return"');"+tag[slash?"close":"open"].split("$notnull_1").join(target?"typeof("+target+")!=='undefined' && ("+target+")!=null":"true").split("$1a").join(exprAutoFnDetect).split("$1").join(expr).split("$2").join(fnargs||def.$2||"")+"__.push('"})+"');}return __;")}function updateWrapped(options,wrapped){options._wrap=
build(options,true,jQuery.isArray(wrapped)?wrapped:[htmlExpr.test(wrapped)?wrapped:jQuery(wrapped).html()]).join("")}function unescape(args){return args?args.replace(/\\'/g,"'").replace(/\\\\/g,"\\"):null}function outerHtml(elem){var div=document.createElement("div");div.appendChild(elem.cloneNode(true));return div.innerHTML}function storeTmplItems(content){var keySuffix="_"+cloneIndex,elem,elems,newClonedItems={},i,l,m;for(i=0,l=content.length;i<l;i++){if((elem=content[i]).nodeType!==1)continue;
elems=elem.getElementsByTagName("*");for(m=elems.length-1;m>=0;m--)processItemKey(elems[m]);processItemKey(elem)}function processItemKey(el){var pntKey,pntNode=el,pntItem,tmplItem,key;if(key=el.getAttribute(tmplItmAtt)){while(pntNode.parentNode&&(pntNode=pntNode.parentNode).nodeType===1&&!(pntKey=pntNode.getAttribute(tmplItmAtt)));if(pntKey!==key){pntNode=pntNode.parentNode?pntNode.nodeType===11?0:pntNode.getAttribute(tmplItmAtt)||0:0;if(!(tmplItem=newTmplItems[key])){tmplItem=wrappedItems[key];tmplItem=
newTmplItem(tmplItem,newTmplItems[pntNode]||wrappedItems[pntNode]);tmplItem.key=++itemKey;newTmplItems[itemKey]=tmplItem}if(cloneIndex)cloneTmplItem(key)}el.removeAttribute(tmplItmAtt)}else if(cloneIndex&&(tmplItem=jQuery.data(el,"tmplItem"))){cloneTmplItem(tmplItem.key);newTmplItems[tmplItem.key]=tmplItem;pntNode=jQuery.data(el.parentNode,"tmplItem");pntNode=pntNode?pntNode.key:0}if(tmplItem){pntItem=tmplItem;while(pntItem&&pntItem.key!=pntNode){pntItem.nodes.push(el);pntItem=pntItem.parent}delete tmplItem._ctnt;
delete tmplItem._wrap;jQuery.data(el,"tmplItem",tmplItem)}function cloneTmplItem(key){key=key+keySuffix;tmplItem=newClonedItems[key]=newClonedItems[key]||newTmplItem(tmplItem,newTmplItems[tmplItem.parent.key+keySuffix]||tmplItem.parent)}}}function tiCalls(content,tmpl,data,options){if(!content)return stack.pop();stack.push({_:content,tmpl:tmpl,item:this,data:data,options:options})}function tiNest(tmpl,data,options){return jQuery.tmpl(jQuery.template(tmpl),data,options,this)}function tiWrap(call,wrapped){var options=
call.options||{};options.wrapped=wrapped;return jQuery.tmpl(jQuery.template(call.tmpl),call.data,options,call.item)}function tiHtml(filter,textOnly){var wrapped=this._wrap;return jQuery.map(jQuery(jQuery.isArray(wrapped)?wrapped.join(""):wrapped).filter(filter||"*"),function(e){return textOnly?e.innerText||e.textContent:e.outerHTML||outerHtml(e)})}function tiUpdate(){var coll=this.nodes;jQuery.tmpl(null,null,null,this).insertBefore(coll[0]);jQuery(coll).remove()}})(jQuery);(function(c){c.address=function(){var v=function(a){c(c.address).trigger(c.extend(c.Event(a),function(){for(var b={},e=c.address.parameterNames(),f=0,p=e.length;f<p;f++)b[e[f]]=c.address.parameter(e[f]);return{value:c.address.value(),path:c.address.path(),pathNames:c.address.pathNames(),parameterNames:e,parameters:b,queryString:c.address.queryString()}}.call(c.address)))},w=function(){c().bind.apply(c(c.address),Array.prototype.slice.call(arguments));return c.address},r=function(){return M.pushState&&
d.state!==k},s=function(){return("/"+g.pathname.replace(new RegExp(d.state),"")+g.search+(D()?"#"+D():"")).replace(U,"/")},D=function(){var a=g.href.indexOf("#");return a!=-1?B(g.href.substr(a+1),l):""},u=function(){return r()?s():D()},ha=function(){return"javascript"},N=function(a){a=a.toString();return(d.strict&&a.substr(0,1)!="/"?"/":"")+a},B=function(a,b){if(d.crawlable&&b)return(a!==""?"!":"")+a;return a.replace(/^\!/,"")},x=function(a,b){return parseInt(a.css(b),10)},V=function(a){for(var b,
e,f=0,p=a.childNodes.length;f<p;f++){try{if("src"in a.childNodes[f]&&a.childNodes[f].src)b=String(a.childNodes[f].src)}catch(J){}if(e=V(a.childNodes[f]))b=e}return b},F=function(){if(!K){var a=u();if(h!=a)if(y&&q<7)g.reload();else{y&&q<8&&d.history&&t(O,50);h=a;E(l)}}},E=function(a){v(W);v(a?X:Y);t(Z,10)},Z=function(){if(d.tracker!=="null"&&d.tracker!==null){var a=c.isFunction(d.tracker)?d.tracker:j[d.tracker],b=(g.pathname+g.search+(c.address&&!r()?c.address.value():"")).replace(/\/\//,"/").replace(/^\/$/,
"");if(c.isFunction(a))a(b);else if(c.isFunction(j.urchinTracker))j.urchinTracker(b);else if(j.pageTracker!==k&&c.isFunction(j.pageTracker._trackPageview))j.pageTracker._trackPageview(b);else j._gaq!==k&&c.isFunction(j._gaq.push)&&j._gaq.push(["_trackPageview",decodeURI(b)])}},O=function(){var a=ha()+":"+l+";document.open();document.writeln('<html><head><title>"+n.title.replace("'","\\'")+"</title><script>var "+C+' = "'+encodeURIComponent(u())+(n.domain!=g.hostname?'";document.domain="'+n.domain:
"")+"\";<\/script></head></html>');document.close();";if(q<7)m.src=a;else m.contentWindow.location.replace(a)},aa=function(){if(G&&$!=-1){var a,b=G.substr($+1).split("&");for(i=0;i<b.length;i++){a=b[i].split("=");if(/^(autoUpdate|crawlable|history|strict|wrap)$/.test(a[0]))d[a[0]]=isNaN(a[1])?/^(true|yes)$/i.test(a[1]):parseInt(a[1],10)!==0;if(/^(state|tracker)$/.test(a[0]))d[a[0]]=a[1]}G=null}h=u()},ca=function(){if(!ba){ba=o;aa();var a=function(){ia.call(this);ja.call(this)},b=c("body").ajaxComplete(a);
a();if(d.wrap){c("body > *").wrapAll('<div style="padding:'+(x(b,"marginTop")+x(b,"paddingTop"))+"px "+(x(b,"marginRight")+x(b,"paddingRight"))+"px "+(x(b,"marginBottom")+x(b,"paddingBottom"))+"px "+(x(b,"marginLeft")+x(b,"paddingLeft"))+'px;" />').parent().wrap('<div id="'+C+'" style="height:100%;overflow:auto;position:relative;'+(H&&!window.statusbar.visible?"resize:both;":"")+'" />');c("html, body").css({height:"100%",margin:0,padding:0,overflow:"hidden"});H&&c('<style type="text/css" />').appendTo("head").text("#"+
C+"::-webkit-resizer { background-color: #fff; }")}if(y&&q<8){a=n.getElementsByTagName("frameset")[0];m=n.createElement((a?"":"i")+"frame");if(a){a.insertAdjacentElement("beforeEnd",m);a[a.cols?"cols":"rows"]+=",0";m.noResize=o;m.frameBorder=m.frameSpacing=0}else{m.style.display="none";m.style.width=m.style.height=0;m.tabIndex=-1;n.body.insertAdjacentElement("afterBegin",m)}t(function(){c(m).bind("load",function(){var e=m.contentWindow;h=e[C]!==k?e[C]:"";if(h!=u()){E(l);g.hash=B(h,o)}});m.contentWindow[C]===
k&&O()},50)}t(function(){v("init");E(l)},1);if(!r())if(y&&q>7||!y&&"on"+I in j)if(j.addEventListener)j.addEventListener(I,F,l);else j.attachEvent&&j.attachEvent("on"+I,F);else ka(F,50)}},ia=function(){var a,b=c("a"),e=b.size(),f=-1,p=function(){if(++f!=e){a=c(b.get(f));a.is('[rel*="address:"]')&&a.address();t(p,1)}};t(p,1)},la=function(){if(h!=u()){h=u();E(l)}},ma=function(){if(j.removeEventListener)j.removeEventListener(I,F,l);else j.detachEvent&&j.detachEvent("on"+I,F)},ja=function(){if(d.crawlable){var a=
g.pathname.replace(/\/$/,"");c("body").html().indexOf("_escaped_fragment_")!=-1&&c('a[href]:not([href^=http]), a[href*="'+document.domain+'"]').each(function(){var b=c(this).attr("href").replace(/^http:/,"").replace(new RegExp(a+"/?$"),"");if(b===""||b.indexOf("_escaped_fragment_")!=-1)c(this).attr("href","#"+b.replace(/\/(.*)\?_escaped_fragment_=(.*)$/,"!$2"))})}},k,C="jQueryAddress",I="hashchange",W="change",X="internalChange",Y="externalChange",o=true,l=false,d={autoUpdate:o,crawlable:l,history:o,
strict:o,wrap:l},z=c.browser,q=parseFloat(c.browser.version),da=z.mozilla,y=z.msie,ea=z.opera,H=z.webkit||z.safari,P=l,j=function(){try{return top.document!==k?top:window}catch(a){return window}}(),n=j.document,M=j.history,g=j.location,ka=setInterval,t=setTimeout,U=/\/{2,9}/g;z=navigator.userAgent;var m,G=V(document),$=G?G.indexOf("?"):-1,Q=n.title,K=l,ba=l,R=o,fa=o,L=l,h=u();if(y){q=parseFloat(z.substr(z.indexOf("MSIE")+4));if(n.documentMode&&n.documentMode!=q)q=n.documentMode!=8?7:8;var ga=n.onpropertychange;
n.onpropertychange=function(){ga&&ga.call(n);if(n.title!=Q&&n.title.indexOf("#"+u())!=-1)n.title=Q}}if(P=da&&q>=1||y&&q>=6||ea&&q>=9.5||H&&q>=523){if(ea)history.navigationMode="compatible";if(document.readyState=="complete")var na=setInterval(function(){if(c.address){ca();clearInterval(na)}},50);else{aa();c(ca)}c(window).bind("popstate",la).bind("unload",ma)}else!P&&D()!==""?g.replace(g.href.substr(0,g.href.indexOf("#"))):Z();return{bind:function(a,b,e){return w(a,b,e)},init:function(a){return w("init",
a)},change:function(a){return w(W,a)},internalChange:function(a){return w(X,a)},externalChange:function(a){return w(Y,a)},baseURL:function(){var a=g.href;if(a.indexOf("#")!=-1)a=a.substr(0,a.indexOf("#"));if(/\/$/.test(a))a=a.substr(0,a.length-1);return a},autoUpdate:function(a){if(a!==k){d.autoUpdate=a;return this}return d.autoUpdate},crawlable:function(a){if(a!==k){d.crawlable=a;return this}return d.crawlable},history:function(a){if(a!==k){d.history=a;return this}return d.history},state:function(a){if(a!==
k){d.state=a;var b=s();if(d.state!==k)if(M.pushState)b.substr(0,3)=="/#/"&&g.replace(d.state.replace(/^\/$/,"")+b.substr(2));else b!="/"&&b.replace(/^\/#/,"")!=D()&&t(function(){g.replace(d.state.replace(/^\/$/,"")+"/#"+b)},1);return this}return d.state},strict:function(a){if(a!==k){d.strict=a;return this}return d.strict},tracker:function(a){if(a!==k){d.tracker=a;return this}return d.tracker},wrap:function(a){if(a!==k){d.wrap=a;return this}return d.wrap},update:function(){L=o;this.value(h);L=l;return this},
title:function(a){if(a!==k){t(function(){Q=n.title=a;if(fa&&m&&m.contentWindow&&m.contentWindow.document){m.contentWindow.document.title=a;fa=l}if(!R&&da)g.replace(g.href.indexOf("#")!=-1?g.href:g.href+"#");R=l},50);return this}return n.title},value:function(a){if(a!==k){a=N(a);if(a=="/")a="";if(h==a&&!L)return;R=o;h=a;if(d.autoUpdate||L){E(o);if(r())M[d.history?"pushState":"replaceState"]({},"",d.state.replace(/\/$/,"")+(h===""?"/":h));else{K=o;if(H)if(d.history)g.hash="#"+B(h,o);else g.replace("#"+
B(h,o));else if(h!=u())if(d.history)g.hash="#"+B(h,o);else g.replace("#"+B(h,o));y&&q<8&&d.history&&t(O,50);if(H)t(function(){K=l},1);else K=l}}return this}if(!P)return null;return N(h)},path:function(a){if(a!==k){var b=this.queryString(),e=this.hash();this.value(a+(b?"?"+b:"")+(e?"#"+e:""));return this}return N(h).split("#")[0].split("?")[0]},pathNames:function(){var a=this.path(),b=a.replace(U,"/").split("/");if(a.substr(0,1)=="/"||a.length===0)b.splice(0,1);a.substr(a.length-1,1)=="/"&&b.splice(b.length-
1,1);return b},queryString:function(a){if(a!==k){var b=this.hash();this.value(this.path()+(a?"?"+a:"")+(b?"#"+b:""));return this}a=h.split("?");return a.slice(1,a.length).join("?").split("#")[0]},parameter:function(a,b,e){var f,p;if(b!==k){var J=this.parameterNames();p=[];b=b?b.toString():"";for(f=0;f<J.length;f++){var S=J[f],A=this.parameter(S);if(typeof A=="string")A=[A];if(S==a)A=b===null||b===""?[]:e?A.concat([b]):[b];for(var T=0;T<A.length;T++)p.push(S+"="+A[T])}c.inArray(a,J)==-1&&b!==null&&
b!==""&&p.push(a+"="+b);this.queryString(p.join("&"));return this}if(b=this.queryString()){e=[];p=b.split("&");for(f=0;f<p.length;f++){b=p[f].split("=");b[0]==a&&e.push(b.slice(1).join("="))}if(e.length!==0)return e.length!=1?e:e[0]}},parameterNames:function(){var a=this.queryString(),b=[];if(a&&a.indexOf("=")!=-1){a=a.split("&");for(var e=0;e<a.length;e++){var f=a[e].split("=")[0];c.inArray(f,b)==-1&&b.push(f)}}return b},hash:function(a){if(a!==k){this.value(h.split("#")[0]+(a?"#"+a:""));return this}a=
h.split("#");return a.slice(1,a.length).join("#")}}}();c.fn.address=function(v){if(!c(this).attr("address")){var w=function(r){if(r.shiftKey||r.ctrlKey||r.metaKey)return true;if(c(this).is("a")){var s=v?v.call(this):/address:/.test(c(this).attr("rel"))?c(this).attr("rel").split("address:")[1].split(" ")[0]:c.address.state()!==undefined&&c.address.state()!="/"?c(this).attr("href").replace(new RegExp("^(.*"+c.address.state()+"|\\.)"),""):c(this).attr("href").replace(/^(#\!?|\.)/,"");c.address.value(s);
r.preventDefault()}};c(this).click(w).live("click",w).live("submit",function(r){if(c(this).is("form")){var s=c(this).attr("action");s=v?v.call(this):(s.indexOf("?")!=-1?s.replace(/&$/,""):s+"?")+c(this).serialize();c.address.value(s);r.preventDefault()}}).attr("address",true)}return this}})(jQuery);(function(window,undefined){function c(e){throw e;}var m=void 0,o=null,p=window.ko={};p.b=function(e,d){for(var b=e.split("."),a=window,f=0;f<b.length-1;f++)a=a[b[f]];a[b[b.length-1]]=d};p.i=function(e,d,b){e[d]=b};p.a=new function(){function e(a,b){if(a.tagName!="INPUT"||!a.type)return!1;if(b.toLowerCase()!="click")return!1;var d=a.type.toLowerCase();return d=="checkbox"||d=="radio"}var d=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,b=/MSIE 6/i.test(navigator.userAgent),a=/MSIE 7/i.test(navigator.userAgent),f=
{},h={};f[/Firefox\/2/i.test(navigator.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"];f.MouseEvents=["click","dblclick","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave"];for(var g in f){var i=f[g];if(i.length)for(var k=0,j=i.length;k<j;k++)h[i[k]]=g}return{ca:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],g:function(a,b){for(var d=0,e=a.length;d<e;d++)b(a[d])},h:function(a,b){if(typeof a.indexOf=="function")return a.indexOf(b);
for(var d=0,e=a.length;d<e;d++)if(a[d]===b)return d;return-1},xa:function(a,b,d){for(var e=0,f=a.length;e<f;e++)if(b.call(d,a[e]))return a[e];return o},N:function(a,b){var d=p.a.h(a,b);d>=0&&a.splice(d,1)},L:function(a){for(var a=a||[],b=[],d=0,e=a.length;d<e;d++)p.a.h(b,a[d])<0&&b.push(a[d]);return b},M:function(a,b){for(var a=a||[],d=[],e=0,f=a.length;e<f;e++)d.push(b(a[e]));return d},K:function(a,b){for(var a=a||[],d=[],e=0,f=a.length;e<f;e++)b(a[e])&&d.push(a[e]);return d},u:function(a,b){for(var d=
0,e=b.length;d<e;d++)a.push(b[d])},Q:function(a){for(;a.firstChild;)p.removeNode(a.firstChild)},Xa:function(a,b){p.a.Q(a);b&&p.a.g(b,function(b){a.appendChild(b)})},ka:function(a,b){var d=a.nodeType?[a]:a;if(d.length>0){for(var e=d[0],f=e.parentNode,h=0,g=b.length;h<g;h++)f.insertBefore(b[h],e);h=0;for(g=d.length;h<g;h++)p.removeNode(d[h])}},ma:function(a,b){navigator.userAgent.indexOf("MSIE 6")>=0?a.setAttribute("selected",b):a.selected=b},da:function(a,b){if(!a||a.nodeType!=1)return[];var d=[];
a.getAttribute(b)!==o&&d.push(a);for(var e=a.getElementsByTagName("*"),f=0,h=e.length;f<h;f++)e[f].getAttribute(b)!==o&&d.push(e[f]);return d},k:function(a){return(a||"").replace(d,"")},ab:function(a,b){for(var d=[],e=(a||"").split(b),f=0,h=e.length;f<h;f++){var g=p.a.k(e[f]);g!==""&&d.push(g)}return d},Za:function(a,b){a=a||"";if(b.length>a.length)return!1;return a.substring(0,b.length)===b},Ha:function(a,b){if(b===m)return(new Function("return "+a))();return(new Function("sc","with(sc) { return ("+
a+") }"))(b)},Fa:function(a,b){if(b.compareDocumentPosition)return(b.compareDocumentPosition(a)&16)==16;for(;a!=o;){if(a==b)return!0;a=a.parentNode}return!1},P:function(a){return p.a.Fa(a,document)},t:function(a,b,d){if(typeof jQuery!="undefined"){if(e(a,b))var f=d,d=function(a,b){var d=this.checked;if(b)this.checked=b.Aa!==!0;f.call(this,a);this.checked=d};jQuery(a).bind(b,d)}else typeof a.addEventListener=="function"?a.addEventListener(b,d,!1):typeof a.attachEvent!="undefined"?a.attachEvent("on"+
b,function(b){d.call(a,b)}):c(Error("Browser doesn't support addEventListener or attachEvent"))},qa:function(a,b){(!a||!a.nodeType)&&c(Error("element must be a DOM node when calling triggerEvent"));if(typeof jQuery!="undefined"){var d=[];e(a,b)&&d.push({Aa:a.checked});jQuery(a).trigger(b,d)}else if(typeof document.createEvent=="function")typeof a.dispatchEvent=="function"?(d=document.createEvent(h[b]||"HTMLEvents"),d.initEvent(b,!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,a),a.dispatchEvent(d)):c(Error("The supplied element doesn't support dispatchEvent"));
else if(typeof a.fireEvent!="undefined"){if(b=="click"&&a.tagName=="INPUT"&&(a.type.toLowerCase()=="checkbox"||a.type.toLowerCase()=="radio"))a.checked=a.checked!==!0;a.fireEvent("on"+b)}else c(Error("Browser doesn't support triggering events"))},d:function(a){return p.C(a)?a():a},Ea:function(a,b){return p.a.h((a.className||"").split(/\s+/),b)>=0},pa:function(a,b,d){var e=p.a.Ea(a,b);if(d&&!e)a.className=(a.className||"")+" "+b;else if(e&&!d){for(var d=(a.className||"").split(/\s+/),e="",f=0;f<d.length;f++)d[f]!=
b&&(e+=d[f]+" ");a.className=p.a.k(e)}},Ua:function(a,b){for(var a=p.a.d(a),b=p.a.d(b),d=[],e=a;e<=b;e++)d.push(e);return d},U:function(a){for(var b=[],d=0,e=a.length;d<e;d++)b.push(a[d]);return b},S:b,Ma:a,ea:function(a,b){for(var d=p.a.U(a.getElementsByTagName("INPUT")).concat(p.a.U(a.getElementsByTagName("TEXTAREA"))),e=typeof b=="string"?function(a){return a.name===b}:function(a){return b.test(a.name)},f=[],h=d.length-1;h>=0;h--)e(d[h])&&f.push(d[h]);return f},F:function(a){if(typeof a=="string"&&
(a=p.a.k(a))){if(window.JSON&&window.JSON.parse)return window.JSON.parse(a);return(new Function("return "+a))()}return o},Y:function(a){(typeof JSON=="undefined"||typeof JSON.stringify=="undefined")&&c(Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js"));return JSON.stringify(p.a.d(a))},Ta:function(a,b,d){var d=d||{},e=d.params||{},f=d.includeFields||
this.ca,h=a;if(typeof a=="object"&&a.tagName=="FORM")for(var h=a.action,g=f.length-1;g>=0;g--)for(var i=p.a.ea(a,f[g]),k=i.length-1;k>=0;k--)e[i[k].name]=i[k].value;var b=p.a.d(b),j=document.createElement("FORM");j.style.display="none";j.action=h;j.method="post";for(var u in b)a=document.createElement("INPUT"),a.name=u,a.value=p.a.Y(p.a.d(b[u])),j.appendChild(a);for(u in e)a=document.createElement("INPUT"),a.name=u,a.value=e[u],j.appendChild(a);document.body.appendChild(j);d.submitter?d.submitter(j):
j.submit();setTimeout(function(){j.parentNode.removeChild(j)},0)}}};p.b("ko.utils",p.a);p.b("ko.utils.arrayForEach",p.a.g);p.b("ko.utils.arrayFirst",p.a.xa);p.b("ko.utils.arrayFilter",p.a.K);p.b("ko.utils.arrayGetDistinctValues",p.a.L);p.b("ko.utils.arrayIndexOf",p.a.h);p.b("ko.utils.arrayMap",p.a.M);p.b("ko.utils.arrayPushAll",p.a.u);p.b("ko.utils.arrayRemoveItem",p.a.N);p.b("ko.utils.fieldsIncludedWithJsonPost",p.a.ca);p.b("ko.utils.getElementsHavingAttribute",p.a.da);p.b("ko.utils.getFormFields",
p.a.ea);p.b("ko.utils.postJson",p.a.Ta);p.b("ko.utils.parseJson",p.a.F);p.b("ko.utils.registerEventHandler",p.a.t);p.b("ko.utils.stringifyJson",p.a.Y);p.b("ko.utils.range",p.a.Ua);p.b("ko.utils.toggleDomNodeCssClass",p.a.pa);p.b("ko.utils.triggerEvent",p.a.qa);p.b("ko.utils.unwrapObservable",p.a.d);Function.prototype.bind||(Function.prototype.bind=function(e){var d=this,b=Array.prototype.slice.call(arguments),e=b.shift();return function(){return d.apply(e,b.concat(Array.prototype.slice.call(arguments)))}});
p.a.e=new function(){var e=0,d="__ko__"+(new Date).getTime(),b={};return{get:function(a,b){var d=p.a.e.getAll(a,!1);return d===m?m:d[b]},set:function(a,b,d){d===m&&p.a.e.getAll(a,!1)===m||(p.a.e.getAll(a,!0)[b]=d)},getAll:function(a,f){var h=a[d];if(!h){if(!f)return;h=a[d]="ko"+e++;b[h]={}}return b[h]},clear:function(a){var e=a[d];e&&(delete b[e],a[d]=o)}}};p.a.p=new function(){function e(a,d){var e=p.a.e.get(a,b);e===m&&d&&(e=[],p.a.e.set(a,b,e));return e}function d(a){var b=e(a,!1);if(b)for(var b=
b.slice(0),d=0;d<b.length;d++)b[d](a);p.a.e.clear(a);typeof jQuery=="function"&&typeof jQuery.cleanData=="function"&&jQuery.cleanData([a])}var b="__ko_domNodeDisposal__"+(new Date).getTime();return{ba:function(a,b){typeof b!="function"&&c(Error("Callback must be a function"));e(a,!0).push(b)},ja:function(a,d){var h=e(a,!1);h&&(p.a.N(h,d),h.length==0&&p.a.e.set(a,b,m))},v:function(a){if(!(a.nodeType!=1&&a.nodeType!=9)){d(a);var b=[];p.a.u(b,a.getElementsByTagName("*"));for(var a=0,e=b.length;a<e;a++)d(b[a])}},
removeNode:function(a){p.v(a);a.parentNode&&a.parentNode.removeChild(a)}}};p.v=p.a.p.v;p.removeNode=p.a.p.removeNode;p.b("ko.cleanNode",p.v);p.b("ko.removeNode",p.removeNode);p.b("ko.utils.domNodeDisposal",p.a.p);p.b("ko.utils.domNodeDisposal.addDisposeCallback",p.a.p.ba);p.b("ko.utils.domNodeDisposal.removeDisposeCallback",p.a.p.ja);p.a.Sa=function(e){if(typeof jQuery!="undefined")e=jQuery.clean([e]);else{var d=p.a.k(e).toLowerCase(),b=document.createElement("div"),d=d.match(/^<(thead|tbody|tfoot)/)&&
[1,"<table>","</table>"]||!d.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!d.indexOf("<td")||!d.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||[0,"",""];for(b.innerHTML=d[1]+e+d[2];d[0]--;)b=b.lastChild;e=p.a.U(b.childNodes)}return e};p.a.Ya=function(e,d){p.a.Q(e);if(d!==o&&d!==m)if(typeof d!="string"&&(d=d.toString()),typeof jQuery!="undefined")jQuery(e).html(d);else for(var b=p.a.Sa(d),a=0;a<b.length;a++)e.appendChild(b[a])};p.l=function(){function e(){return((1+
Math.random())*4294967296|0).toString(16).substring(1)}function d(a,b){if(a)if(a.nodeType==8){var e=p.l.ha(a.nodeValue);e!=o&&b.push({Da:a,Pa:e})}else if(a.nodeType==1)for(var e=0,g=a.childNodes,i=g.length;e<i;e++)d(g[e],b)}var b={};return{V:function(a){typeof a!="function"&&c(Error("You can only pass a function to ko.memoization.memoize()"));var d=e()+e();b[d]=a;return"<\!--[ko_memo:"+d+"]--\>"},ra:function(a,d){var e=b[a];e===m&&c(Error("Couldn't find any memo with ID "+a+". Perhaps it's already been unmemoized."));
try{return e.apply(o,d||[]),!0}finally{delete b[a]}},sa:function(a,b){var e=[];d(a,e);for(var g=0,i=e.length;g<i;g++){var k=e[g].Da,j=[k];b&&p.a.u(j,b);p.l.ra(e[g].Pa,j);k.nodeValue="";k.parentNode&&k.parentNode.removeChild(k)}},ha:function(a){return(a=a.match(/^\[ko_memo\:(.*?)\]$/))?a[1]:o}}}();p.b("ko.memoization",p.l);p.b("ko.memoization.memoize",p.l.V);p.b("ko.memoization.unmemoize",p.l.ra);p.b("ko.memoization.parseMemoText",p.l.ha);p.b("ko.memoization.unmemoizeDomNodeAndDescendants",p.l.sa);
p.$a=function(e,d){this.za=e;this.n=function(){this.La=!0;d()}.bind(this);p.i(this,"dispose",this.n)};p.Z=function(){var e=[];this.$=function(d,b){var a=b?d.bind(b):d,f=new p.$a(a,function(){p.a.N(e,f)});e.push(f);return f};this.z=function(d){p.a.g(e.slice(0),function(b){b&&b.La!==!0&&b.za(d)})};this.Ja=function(){return e.length};p.i(this,"subscribe",this.$);p.i(this,"notifySubscribers",this.z);p.i(this,"getSubscriptionsCount",this.Ja)};p.ga=function(e){return typeof e.$=="function"&&typeof e.z==
"function"};p.b("ko.subscribable",p.Z);p.b("ko.isSubscribable",p.ga);p.A=function(){var e=[];return{ya:function(){e.push([])},end:function(){return e.pop()},ia:function(d){p.ga(d)||c("Only subscribable things can act as dependencies");e.length>0&&e[e.length-1].push(d)}}}();var x={undefined:!0,"boolean":!0,number:!0,string:!0};function y(e,d){return e===o||typeof e in x?e===d:!1}p.s=function(e){function d(){if(arguments.length>0){if(!d.equalityComparer||!d.equalityComparer(b,arguments[0]))b=arguments[0],
d.z(b);return this}else return p.A.ia(d),b}var b=e;d.o=p.s;d.H=function(){d.z(b)};d.equalityComparer=y;p.Z.call(d);p.i(d,"valueHasMutated",d.H);return d};p.C=function(e){if(e===o||e===m||e.o===m)return!1;if(e.o===p.s)return!0;return p.C(e.o)};p.D=function(e){if(typeof e=="function"&&e.o===p.s)return!0;if(typeof e=="function"&&e.o===p.j&&e.Ka)return!0;return!1};p.b("ko.observable",p.s);p.b("ko.isObservable",p.C);p.b("ko.isWriteableObservable",p.D);p.Ra=function(e){arguments.length==0&&(e=[]);e!==o&&
e!==m&&!("length"in e)&&c(Error("The argument passed when initializing an observable array must be an array, or null, or undefined."));var d=new p.s(e);p.a.g(["pop","push","reverse","shift","sort","splice","unshift"],function(b){d[b]=function(){var a=d(),a=a[b].apply(a,arguments);d.H();return a}});p.a.g(["slice"],function(b){d[b]=function(){var a=d();return a[b].apply(a,arguments)}});d.remove=function(b){for(var a=d(),e=[],h=[],g=typeof b=="function"?b:function(a){return a===b},i=0,k=a.length;i<k;i++){var j=
a[i];g(j)?h.push(j):e.push(j)}d(e);return h};d.Va=function(b){if(b===m){var a=d();d([]);return a}if(!b)return[];return d.remove(function(a){return p.a.h(b,a)>=0})};d.O=function(b){for(var a=d(),e=typeof b=="function"?b:function(a){return a===b},h=a.length-1;h>=0;h--)e(a[h])&&(a[h]._destroy=!0);d.H()};d.Ca=function(b){if(b===m)return d.O(function(){return!0});if(!b)return[];return d.O(function(a){return p.a.h(b,a)>=0})};d.indexOf=function(b){var a=d();return p.a.h(a,b)};d.replace=function(b,a){var e=
d.indexOf(b);e>=0&&(d()[e]=a,d.H())};p.i(d,"remove",d.remove);p.i(d,"removeAll",d.Va);p.i(d,"destroy",d.O);p.i(d,"destroyAll",d.Ca);p.i(d,"indexOf",d.indexOf);return d};p.b("ko.observableArray",p.Ra);p.j=function(e,d,b){function a(){p.a.g(n,function(a){a.n()});n=[]}function f(b){a();p.a.g(b,function(a){n.push(a.$(h))})}function h(){if(k&&typeof b.disposeWhen=="function"&&b.disposeWhen())g.n();else{try{p.A.ya(),i=b.owner?b.read.call(b.owner):b.read()}finally{var a=p.a.L(p.A.end());f(a)}g.z(i);k=!0}}
function g(){if(arguments.length>0)if(typeof b.write==="function"){var a=arguments[0];b.owner?b.write.call(b.owner,a):b.write(a)}else c("Cannot write a value to a dependentObservable unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");else return k||h(),p.A.ia(g),i}var i,k=!1;e&&typeof e=="object"?b=e:(b=b||{},b.read=e||b.read,b.owner=d||b.owner);typeof b.read!="function"&&c("Pass a function that returns the value of the dependentObservable");var j=
typeof b.disposeWhenNodeIsRemoved=="object"?b.disposeWhenNodeIsRemoved:o,l=o;if(j){l=function(){g.n()};p.a.p.ba(j,l);var q=b.disposeWhen;b.disposeWhen=function(){return!p.a.P(j)||typeof q=="function"&&q()}}var n=[];g.o=p.j;g.Ia=function(){return n.length};g.Ka=typeof b.write==="function";g.n=function(){j&&p.a.p.ja(j,l);a()};p.Z.call(g);b.deferEvaluation!==!0&&h();p.i(g,"dispose",g.n);p.i(g,"getDependenciesCount",g.Ia);return g};p.j.o=p.s;p.b("ko.dependentObservable",p.j);(function(){function e(a,
f,h){h=h||new b;a=f(a);if(!(typeof a=="object"&&a!==o&&a!==m))return a;var g=a instanceof Array?[]:{};h.save(a,g);d(a,function(b){var d=f(a[b]);switch(typeof d){case "boolean":case "number":case "string":case "function":g[b]=d;break;case "object":case "undefined":var j=h.get(d);g[b]=j!==m?j:e(d,f,h)}});return g}function d(a,b){if(a instanceof Array)for(var d=0;d<a.length;d++)b(d);else for(d in a)b(d)}function b(){var a=[],b=[];this.save=function(d,e){var i=p.a.h(a,d);i>=0?b[i]=e:(a.push(d),b.push(e))};
this.get=function(d){d=p.a.h(a,d);return d>=0?b[d]:m}}p.oa=function(a){arguments.length==0&&c(Error("When calling ko.toJS, pass the object you want to convert."));return e(a,function(a){for(var b=0;p.C(a)&&b<10;b++)a=a();return a})};p.toJSON=function(a){a=p.oa(a);return p.a.Y(a)}})();p.b("ko.toJS",p.oa);p.b("ko.toJSON",p.toJSON);p.f={m:function(e){if(e.tagName=="OPTION"){if(e.__ko__hasDomDataOptionValue__===!0)return p.a.e.get(e,p.c.options.W);return e.getAttribute("value")}else return e.tagName==
"SELECT"?e.selectedIndex>=0?p.f.m(e.options[e.selectedIndex]):m:e.value},I:function(e,d){if(e.tagName=="OPTION")switch(typeof d){case "string":case "number":p.a.e.set(e,p.c.options.W,m);"__ko__hasDomDataOptionValue__"in e&&delete e.__ko__hasDomDataOptionValue__;e.value=d;break;default:p.a.e.set(e,p.c.options.W,d),e.__ko__hasDomDataOptionValue__=!0,e.value=""}else if(e.tagName=="SELECT")for(var b=e.options.length-1;b>=0;b--){if(p.f.m(e.options[b])==d){e.selectedIndex=b;break}}else{if(d===o||d===m)d=
"";e.value=d}}};p.b("ko.selectExtensions",p.f);p.b("ko.selectExtensions.readValue",p.f.m);p.b("ko.selectExtensions.writeValue",p.f.I);p.r=function(){function e(a,b){return a.replace(d,function(a,d){return b[d]})}var d=/\[ko_token_(\d+)\]/g,b=/^[\_$a-z][\_$a-z0-9]*(\[.*?\])*(\.[\_$a-z][\_$a-z0-9]*(\[.*?\])*)*$/i,a=["true","false"];return{F:function(a){a=p.a.k(a);if(a.length<3)return{};for(var b=[],d=o,i,k=a.charAt(0)=="{"?1:0;k<a.length;k++){var j=a.charAt(k);if(d===o)switch(j){case '"':case "'":case "/":d=
k;i=j;break;case "{":d=k;i="}";break;case "[":d=k,i="]"}else if(j==i){j=a.substring(d,k+1);b.push(j);var l="[ko_token_"+(b.length-1)+"]",a=a.substring(0,d)+l+a.substring(k+1);k-=j.length-l.length;d=o}}d={};a=a.split(",");i=0;for(k=a.length;i<k;i++){var l=a[i],q=l.indexOf(":");q>0&&q<l.length-1&&(j=p.a.k(l.substring(0,q)),l=p.a.k(l.substring(q+1)),j.charAt(0)=="{"&&(j=j.substring(1)),l.charAt(l.length-1)=="}"&&(l=l.substring(0,l.length-1)),j=p.a.k(e(j,b)),l=p.a.k(e(l,b)),d[j]=l)}return d},R:function(d){var e=
p.r.F(d),g=[],i;for(i in e){var k=e[i],j;j=k;j=p.a.h(a,p.a.k(j).toLowerCase())>=0?!1:j.match(b)!==o;j&&(g.length>0&&g.push(", "),g.push(i+" : function(__ko_value) { "+k+" = __ko_value; }"))}g.length>0&&(d=d+", '_ko_property_writers' : { "+g.join("")+" } ");return d}}}();p.b("ko.jsonExpressionRewriting",p.r);p.b("ko.jsonExpressionRewriting.parseJson",p.r.F);p.b("ko.jsonExpressionRewriting.insertPropertyAccessorsIntoJson",p.r.R);p.c={};p.J=function(e,d,b,a){function f(a){return function(){return i[a]}}
function h(){return i}var g=!0,a=a||"data-bind",i;new p.j(function(){var k;if(!(k=typeof d=="function"?d():d)){var j=e.getAttribute(a);try{var l=" { "+p.r.R(j)+" } ";k=p.a.Ha(l,b===o?window:b)}catch(q){c(Error("Unable to parse binding attribute.\nMessage: "+q+";\nAttribute value: "+j))}}i=k;if(g)for(var n in i)p.c[n]&&typeof p.c[n].init=="function"&&(0,p.c[n].init)(e,f(n),h,b);for(n in i)p.c[n]&&typeof p.c[n].update=="function"&&(0,p.c[n].update)(e,f(n),h,b)},o,{disposeWhenNodeIsRemoved:e});g=!1};
p.ua=function(e,d){d&&d.nodeType==m&&c(Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node (note: this is a breaking change since KO version 1.05)"));var d=d||window.document.body,b=p.a.da(d,"data-bind");p.a.g(b,function(a){p.J(a,o,e)})};p.b("ko.bindingHandlers",p.c);p.b("ko.applyBindings",p.ua);p.b("ko.applyBindingsToNode",p.J);p.a.g(["click"],function(e){p.c[e]={init:function(d,b,a,f){return p.c.event.init.call(this,d,function(){var a={};a[e]=
b();return a},a,f)}}});p.c.event={init:function(e,d,b,a){var f=d()||{},h;for(h in f)(function(){var f=h;typeof f=="string"&&p.a.t(e,f,function(e){var h,j=d()[f];if(j){var l=b();try{h=j.apply(a,arguments)}finally{if(h!==!0)e.preventDefault?e.preventDefault():e.returnValue=!1}if(l[f+"Bubble"]===!1)e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}})})()}};p.c.submit={init:function(e,d,b,a){typeof d()!="function"&&c(Error("The value for a submit binding must be a function to invoke on submit"));
p.a.t(e,"submit",function(b){var h,g=d();try{h=g.call(a,e)}finally{if(h!==!0)b.preventDefault?b.preventDefault():b.returnValue=!1}})}};p.c.visible={update:function(e,d){var b=p.a.d(d()),a=e.style.display!="none";if(b&&!a)e.style.display="";else if(!b&&a)e.style.display="none"}};p.c.enable={update:function(e,d){var b=p.a.d(d());if(b&&e.disabled)e.removeAttribute("disabled");else if(!b&&!e.disabled)e.disabled=!0}};p.c.disable={update:function(e,d){p.c.enable.update(e,function(){return!p.a.d(d())})}};
p.c.value={init:function(e,d,b){var a=["change"],f=b().valueUpdate;f&&(typeof f=="string"&&(f=[f]),p.a.u(a,f),a=p.a.L(a));p.a.g(a,function(a){var f=!1;p.a.Za(a,"after")&&(f=!0,a=a.substring(5));var i=f?function(a){setTimeout(a,0)}:function(a){a()};p.a.t(e,a,function(){i(function(){var a=d(),f=p.f.m(e);p.D(a)?a(f):(a=b(),a._ko_property_writers&&a._ko_property_writers.value&&a._ko_property_writers.value(f))})})})},update:function(e,d){var b=p.a.d(d()),a=p.f.m(e),f=b!=a;b===0&&a!==0&&a!=="0"&&(f=!0);
f&&(a=function(){p.f.I(e,b)},a(),e.tagName=="SELECT"&&setTimeout(a,0));e.tagName=="SELECT"&&(a=p.f.m(e),a!==b&&p.a.qa(e,"change"))}};p.c.options={update:function(e,d,b){e.tagName!="SELECT"&&c(Error("options binding applies only to SELECT elements"));var a=p.a.M(p.a.K(e.childNodes,function(a){return a.tagName&&a.tagName=="OPTION"&&a.selected}),function(a){return p.f.m(a)||a.innerText||a.textContent}),f=e.scrollTop,h=p.a.d(d());p.a.Q(e);if(h){var g=b();typeof h.length!="number"&&(h=[h]);if(g.optionsCaption){var i=
document.createElement("OPTION");i.innerHTML=g.optionsCaption;p.f.I(i,m);e.appendChild(i)}b=0;for(d=h.length;b<d;b++){var i=document.createElement("OPTION"),k=typeof g.optionsValue=="string"?h[b][g.optionsValue]:h[b],k=p.a.d(k);p.f.I(i,k);var j=g.optionsText;optionText=typeof j=="function"?j(h[b]):typeof j=="string"?h[b][j]:k;if(optionText===o||optionText===m)optionText="";optionText=p.a.d(optionText).toString();typeof i.innerText=="string"?i.innerText=optionText:i.textContent=optionText;e.appendChild(i)}h=
e.getElementsByTagName("OPTION");b=g=0;for(d=h.length;b<d;b++)p.a.h(a,p.f.m(h[b]))>=0&&(p.a.ma(h[b],!0),g++);if(f)e.scrollTop=f}}};p.c.options.W="__ko.bindingHandlers.options.optionValueDomData__";p.c.selectedOptions={fa:function(e){for(var d=[],e=e.childNodes,b=0,a=e.length;b<a;b++){var f=e[b];f.tagName=="OPTION"&&f.selected&&d.push(p.f.m(f))}return d},init:function(e,d,b){p.a.t(e,"change",function(){var a=d();p.D(a)?a(p.c.selectedOptions.fa(this)):(a=b(),a._ko_property_writers&&a._ko_property_writers.value&&
a._ko_property_writers.value(p.c.selectedOptions.fa(this)))})},update:function(e,d){e.tagName!="SELECT"&&c(Error("values binding applies only to SELECT elements"));var b=p.a.d(d());if(b&&typeof b.length=="number")for(var a=e.childNodes,f=0,h=a.length;f<h;f++){var g=a[f];g.tagName=="OPTION"&&p.a.ma(g,p.a.h(b,p.f.m(g))>=0)}}};p.c.text={update:function(e,d){var b=p.a.d(d());if(b===o||b===m)b="";typeof e.innerText=="string"?e.innerText=b:e.textContent=b}};p.c.html={update:function(e,d){var b=p.a.d(d());
p.a.Ya(e,b)}};p.c.css={update:function(e,d){var b=p.a.d(d()||{}),a;for(a in b)if(typeof a=="string"){var f=p.a.d(b[a]);p.a.pa(e,a,f)}}};p.c.style={update:function(e,d){var b=p.a.d(d()||{}),a;for(a in b)if(typeof a=="string"){var f=p.a.d(b[a]);e.style[a]=f||""}}};p.c.uniqueName={init:function(e,d){if(d())e.name="ko_unique_"+ ++p.c.uniqueName.Ba,p.a.S&&e.mergeAttributes(document.createElement("<input name='"+e.name+"'/>"),!1)}};p.c.uniqueName.Ba=0;p.c.checked={init:function(e,d,b){p.a.t(e,"click",function(){var a;
if(e.type=="checkbox")a=e.checked;else if(e.type=="radio"&&e.checked)a=e.value;else return;var f=d();e.type=="checkbox"&&p.a.d(f)instanceof Array?(a=p.a.h(p.a.d(f),e.value),e.checked&&a<0?f.push(e.value):!e.checked&&a>=0&&f.splice(a,1)):p.D(f)?f()!==a&&f(a):(f=b(),f._ko_property_writers&&f._ko_property_writers.checked&&f._ko_property_writers.checked(a))});e.type=="radio"&&!e.name&&p.c.uniqueName.init(e,function(){return!0})},update:function(e,d){var b=p.a.d(d());if(e.type=="checkbox")e.checked=b instanceof
Array?p.a.h(b,e.value)>=0:b,b&&p.a.S&&e.mergeAttributes(document.createElement("<input type='checkbox' checked='checked' />"),!1);else if(e.type=="radio")e.checked=e.value==b,e.value==b&&(p.a.S||p.a.Ma)&&e.mergeAttributes(document.createElement("<input type='radio' checked='checked' />"),!1)}};p.c.attr={update:function(e,d){var b=p.a.d(d())||{},a;for(a in b)if(typeof a=="string"){var f=p.a.d(b[a]);f===!1||f===o||f===m?e.removeAttribute(a):e.setAttribute(a,f.toString())}}};p.aa=function(){this.renderTemplate=
function(){c("Override renderTemplate in your ko.templateEngine subclass")};this.isTemplateRewritten=function(){c("Override isTemplateRewritten in your ko.templateEngine subclass")};this.rewriteTemplate=function(){c("Override rewriteTemplate in your ko.templateEngine subclass")};this.createJavaScriptEvaluatorBlock=function(){c("Override createJavaScriptEvaluatorBlock in your ko.templateEngine subclass")}};p.b("ko.templateEngine",p.aa);p.G=function(){var e=/(<[a-z]+\d*(\s+(?!data-bind=)[a-z0-9\-]+(=(\"[^\"]*\"|\'[^\']*\'))?)*\s+)data-bind=(["'])([\s\S]*?)\5/gi;
return{Ga:function(d,b){b.isTemplateRewritten(d)||b.rewriteTemplate(d,function(a){return p.G.Qa(a,b)})},Qa:function(d,b){return d.replace(e,function(a,d,e,g,i,k,j){a=p.r.R(j);return b.createJavaScriptEvaluatorBlock("ko.templateRewriting.applyMemoizedBindingsToNextSibling(function() {                     return (function() { return { "+a+" } })()                 })")+d})},va:function(d){return p.l.V(function(b,a){b.nextSibling&&p.J(b.nextSibling,d,a)})}}}();p.b("ko.templateRewriting",p.G);p.b("ko.templateRewriting.applyMemoizedBindingsToNextSibling",
p.G.va);(function(){function e(b,a,e,h,g){var i=p.a.d(h),g=g||{},k=g.templateEngine||d;p.G.Ga(e,k);e=k.renderTemplate(e,i,g);(typeof e.length!="number"||e.length>0&&typeof e[0].nodeType!="number")&&c("Template engine must return an array of DOM nodes");e&&p.a.g(e,function(a){p.l.sa(a,[h])});switch(a){case "replaceChildren":p.a.Xa(b,e);break;case "replaceNode":p.a.ka(b,e);break;case "ignoreTargetNode":break;default:c(Error("Unknown renderMode: "+a))}g.afterRender&&g.afterRender(e,h);return e}var d;
p.na=function(b){b!=m&&!(b instanceof p.aa)&&c("templateEngine must inherit from ko.templateEngine");d=b};p.X=function(b,a,f,h,g){f=f||{};(f.templateEngine||d)==m&&c("Set a template engine before calling renderTemplate");g=g||"replaceChildren";if(h){var i=h.nodeType?h:h.length>0?h[0]:o;return new p.j(function(){var d=typeof b=="function"?b(a):b,d=e(h,g,d,a,f);g=="replaceNode"&&(h=d,i=h.nodeType?h:h.length>0?h[0]:o)},o,{disposeWhen:function(){return!i||!p.a.P(i)},disposeWhenNodeIsRemoved:i&&g=="replaceNode"?
i.parentNode:i})}else return p.l.V(function(d){p.X(b,a,f,d,"replaceNode")})};p.Wa=function(b,a,d,h){return new p.j(function(){var g=p.a.d(a)||[];typeof g.length=="undefined"&&(g=[g]);g=p.a.K(g,function(a){return d.includeDestroyed||!a._destroy});p.a.la(h,g,function(a){var g=typeof b=="function"?b(a):b;return e(o,"ignoreTargetNode",g,a,d)},d)},o,{disposeWhenNodeIsRemoved:h})};p.c.template={update:function(b,a,d,e){a=p.a.d(a());d=typeof a=="string"?a:a.name;if(typeof a.foreach!="undefined")e=p.Wa(d,
a.foreach||[],{templateOptions:a.templateOptions,afterAdd:a.afterAdd,beforeRemove:a.beforeRemove,includeDestroyed:a.includeDestroyed,afterRender:a.afterRender},b);else var g=a.data,e=p.X(d,typeof g=="undefined"?e:g,{templateOptions:a.templateOptions,afterRender:a.afterRender},b);(a=p.a.e.get(b,"__ko__templateSubscriptionDomDataKey__"))&&typeof a.n=="function"&&a.n();p.a.e.set(b,"__ko__templateSubscriptionDomDataKey__",e)}}})();p.b("ko.setTemplateEngine",p.na);p.b("ko.renderTemplate",p.X);p.a.w=function(e,
d,b){if(b===m)return p.a.w(e,d,1)||p.a.w(e,d,10)||p.a.w(e,d,Number.MAX_VALUE);else{for(var e=e||[],d=d||[],a=e,f=d,h=[],g=0;g<=f.length;g++)h[g]=[];for(var g=0,i=Math.min(a.length,b);g<=i;g++)h[0][g]=g;g=1;for(i=Math.min(f.length,b);g<=i;g++)h[g][0]=g;for(var i=a.length,k,j=f.length,g=1;g<=i;g++){var l=Math.min(j,g+b);for(k=Math.max(1,g-b);k<=l;k++)h[k][g]=a[g-1]===f[k-1]?h[k-1][g-1]:Math.min(h[k-1][g]===m?Number.MAX_VALUE:h[k-1][g]+1,h[k][g-1]===m?Number.MAX_VALUE:h[k][g-1]+1)}b=e.length;a=d.length;
f=[];g=h[a][b];if(g===m)h=o;else{for(;b>0||a>0;){i=h[a][b];k=a>0?h[a-1][b]:g+1;j=b>0?h[a][b-1]:g+1;l=a>0&&b>0?h[a-1][b-1]:g+1;if(k===m||k<i-1)k=g+1;if(j===m||j<i-1)j=g+1;l<i-1&&(l=g+1);k<=j&&k<l?(f.push({status:"added",value:d[a-1]}),a--):(j<k&&j<l?f.push({status:"deleted",value:e[b-1]}):(f.push({status:"retained",value:e[b-1]}),a--),b--)}h=f.reverse()}return h}};p.b("ko.utils.compareArrays",p.a.w);(function(){function e(d,b,a){var e=[],d=p.j(function(){var d=b(a)||[];e.length>0&&p.a.ka(e,d);e.splice(0,
e.length);p.a.u(e,d)},o,{disposeWhenNodeIsRemoved:d,disposeWhen:function(){return e.length==0||!p.a.P(e[0])}});return{Oa:e,j:d}}p.a.la=function(d,b,a,f){for(var b=b||[],f=f||{},h=p.a.e.get(d,"setDomNodeChildrenFromArrayMapping_lastMappingResult")===m,g=p.a.e.get(d,"setDomNodeChildrenFromArrayMapping_lastMappingResult")||[],i=p.a.M(g,function(a){return a.wa}),k=p.a.w(i,b),b=[],j=0,l=[],i=[],q=o,n=0,v=k.length;n<v;n++)switch(k[n].status){case "retained":var r=g[j];b.push(r);r.B.length>0&&(q=r.B[r.B.length-
1]);j++;break;case "deleted":g[j].j.n();p.a.g(g[j].B,function(a){l.push({element:a,index:n,value:k[n].value});q=a});j++;break;case "added":var s=e(d,a,k[n].value),r=s.Oa;b.push({wa:k[n].value,B:r,j:s.j});for(var s=0,w=r.length;s<w;s++){var t=r[s];i.push({element:t,index:n,value:k[n].value});q==o?d.firstChild?d.insertBefore(t,d.firstChild):d.appendChild(t):q.nextSibling?d.insertBefore(t,q.nextSibling):d.appendChild(t);q=t}}p.a.g(l,function(a){p.v(a.element)});a=!1;if(!h){if(f.afterAdd)for(n=0;n<i.length;n++)f.afterAdd(i[n].element,
i[n].index,i[n].value);if(f.beforeRemove){for(n=0;n<l.length;n++)f.beforeRemove(l[n].element,l[n].index,l[n].value);a=!0}}a||p.a.g(l,function(a){a.element.parentNode&&a.element.parentNode.removeChild(a.element)});p.a.e.set(d,"setDomNodeChildrenFromArrayMapping_lastMappingResult",b)}})();p.b("ko.utils.setDomNodeChildrenFromArrayMapping",p.a.la);p.T=function(){this.q=function(){if(typeof jQuery=="undefined"||!jQuery.tmpl)return 0;if(jQuery.tmpl.tag){if(jQuery.tmpl.tag.tmpl&&jQuery.tmpl.tag.tmpl.open&&
jQuery.tmpl.tag.tmpl.open.toString().indexOf("__")>=0)return 3;return 2}return 1}();this.getTemplateNode=function(d){var b=document.getElementById(d);b==o&&c(Error("Cannot find template with ID="+d));return b};var e=RegExp("__ko_apos__","g");this.renderTemplate=function(d,b,a){a=a||{};this.q==0&&c(Error("jquery.tmpl not detected.\nTo use KO's default template engine, reference jQuery and jquery.tmpl. See Knockout installation documentation for more details."));if(this.q==1)return d='<script type="text/html">'+
this.getTemplateNode(d).text+"<\/script>",b=jQuery.tmpl(d,b)[0].text.replace(e,"'"),jQuery.clean([b],document);if(!(d in jQuery.template)){var f=this.getTemplateNode(d).text;jQuery.template(d,f)}b=[b];b=jQuery.tmpl(d,b,a.templateOptions);b.appendTo(document.createElement("div"));jQuery.fragments={};return b};this.isTemplateRewritten=function(d){if(d in jQuery.template)return!0;return this.getTemplateNode(d).Na===!0};this.rewriteTemplate=function(d,b){var a=this.getTemplateNode(d),e=b(a.text);this.q==
1&&(e=p.a.k(e),e=e.replace(/([\s\S]*?)(\${[\s\S]*?}|{{[\=a-z][\s\S]*?}}|$)/g,function(a,b,d){return b.replace(/\'/g,"__ko_apos__")+d}));a.text=e;a.Na=!0};this.createJavaScriptEvaluatorBlock=function(d){if(this.q==1)return"{{= "+d+"}}";return"{{ko_code ((function() { return "+d+" })()) }}"};this.ta=function(d,b){document.write("<script type='text/html' id='"+d+"'>"+b+"<\/script>")};p.i(this,"addTemplate",this.ta);this.q>1&&(jQuery.tmpl.tag.ko_code={open:(this.q<3?"_":"__")+".push($1 || '');"})};p.T.prototype=
new p.aa;p.na(new p.T);p.b("ko.jqueryTmplTemplateEngine",p.T)})(window);(function(){var currentParams={},updateTimer,$=window.jQuery;function ensureString(value){return value===null||value===undefined?value:value.toString().replace(/^(\s|\u00A0)+|(\s|\u00A0)+$/g,"")}ko.linkObservableToUrl=function(observable,hashPropertyName,defaultValue,isUserInput){observable.subscribe(function(value){var valueToWrite=value===defaultValue?null:isUserInput?DG.Utils.encode(ensureString(value)):ensureString(value);if(currentParams[hashPropertyName]!==valueToWrite){currentParams[hashPropertyName]=
valueToWrite;queueAction(function(){for(var key in currentParams)$.address.parameter(key,currentParams[key]);$.address.update()})}});$.address.change(function(evt){currentParams[hashPropertyName]=hashPropertyName in evt.parameters?evt.parameters[hashPropertyName]:null;observable(hashPropertyName in evt.parameters?isUserInput?DG.Utils.decode(evt.parameters[hashPropertyName]):decodeURI(evt.parameters[hashPropertyName]):defaultValue)})};function queueAction(action){if(updateTimer)clearTimeout(updateTimer);
updateTimer=setTimeout(action,0)}$.address.autoUpdate(false)})();jQuery.cookie=function(name,value,options){if(typeof value!="undefined"){options=options||{};if(value===null){value="";options=$.extend({},options);options.expires=-1}var expires="";if(options.expires&&(typeof options.expires=="number"||options.expires.toUTCString)){var date;if(typeof options.expires=="number"){date=new Date;date.setTime(date.getTime()+options.expires*24*60*60*1E3)}else date=options.expires;expires="; expires="+date.toUTCString()}var path=options.path?"; path="+options.path:"";var domain=
options.domain?"; domain="+options.domain:"";var secure=options.secure?"; secure":"";document.cookie=[name,"=",encodeURIComponent(value),expires,path,domain,secure].join("")}else{var cookieValue=null;if(document.cookie&&document.cookie!=""){var cookies=document.cookie.split(";");for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==name+"="){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break}}}return cookieValue}};eval(function(p,a,c,k,e,r){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!"".replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return"\\w+"};c=1}while(c--)if(k[c])p=p.replace(new RegExp("\\b"+e(c)+"\\b","g"),k[c]);return p}("B F={36:[],5k:8(){5(Z.1E){Z.7Q('<14 5Y=\"4M/7P\">.1X-5m-5o {4F: 2w !7O;}</14>')};N.V(13,'4U',N.5d)},4E:8(g,2b){B h=Z,J=13,24=7M;5(!h.1E||!h.4K)C;5(3D(g)=='4A')g=Z.1E(g);5(g==Y||24.3C.2L('7L')!=-1||((24.3C.2L('7K')!=-1||24.3C.2L('7H')!=-1)&&!(3D(5D)!=\"7F\"&&5D.7E))||24.7D=='7C'||(24.7x.2L('7w')!=-1&&24.3C.2L('7u')!=-1)){5(g!=Y)2d(g,'1X-7s','1X-5m-5o');5(13.4W)13.4W(g);C};5(g.18){g.18.1P();C};5(F.5l(g))C;5(!g.1M||g.1M==''){B k=\"7o\",c=1;1y(Z.1E(k+c)!=Y){c++};g.1M=k+c}g.5z=2u 5I();g.18=2u 5I();B l=g.1M,4=g.5z,I=g.18;4.2l={7m:['-1s',0],7l:[0,'-1s'],7k:['1s',0],7j:[0,'1s'],7i:[0,'-1p'],7d:[0,'1p'],7c:[0,'-5g'],7b:[0,'+5g']};4.3p=[\"-2s\",\"2s\"];4.46=[\"-2s\",\"2s\"];4.1S=[[A,A],[A,A]];B m=U('7a',E),H=U('79',E),G=U('78',E),1q=U('77',E);B o=U('72',E),1z=U('70',E),2Y=A;1q.D.1R='4Z 55 6Z';1q.2h();g.14.4F='2w';1z.D.6Y=\"6X\";1z.D.1w=\"5j\";1z.D.15=\"5j\";1z.D.1K=\"3e\";1z.D.22=\"-6W\";1z.2h();B p=g.12,5x=g.1l;2y(g,1q,'1j',['1R-1e-15','1R-2a-15','1R-11-15','1R-29-15']);B q=g.12,5P=g.1l,4o=5x-5P,4m=p-q;B s=(g.27)?g.27:0,4O=(g.25)?g.25:0;B t=Z.3b.1h,4j=/#([^#.]*)$/;B u=['6V','5Z','6T'];4.2b=!6R(2b)?2b:6Q;4.P=[];4.23=[];4.6P=4.T=[];4.6O=4.1N=[];4.1O=[A,A];4.2V=A;4.2D=A;4.1b=[];4.1Z=[0,0];4.1B=[];4.4e=[];4.1d=[];4.2n=[A,A];4.2B=[0,0];1y(g.5H){m.1a(g.5H)};m.1a(o);g.1a(H);g.1a(1q);B w=O(g,'1K');5(w!='3e'&&w!='5M'){g.14.1K=w=\"3a\"};5(w=='5M')g.14.1K=\"3e\";B x=O(g,'4M-6N');g.14.5R='1e';H.D.15=\"5V\";H.D.1w=\"5V\";H.D.11=\"1j\";H.D.1e=\"1j\";2y(g,1q,\"1j\",['M-1e','M-11','M-2a','M-29']);B y=g.1l,4I=g.12,48;48=H.12;H.D.6M=\"6L 55 6K\";5(H.12>48)2Y=E;H.D.6I=\"1j\";2y(1q,g,A,['M-1e','M-11','M-2a','M-29']);1L(H);1L(g);4.1d[0]=H.1H-g.1H;4.1d[2]=H.1F-g.1F;g.14.4X=O(g,\"M-29\");g.14.4Y=O(g,\"M-2a\");1L(H);1L(g);4.1d[1]=H.1H-g.1H;4.1d[3]=H.1F-g.1F;g.14.4X=O(1q,\"M-11\");g.14.4Y=O(1q,\"M-1e\");B z=4.1d[2]+4.1d[3],3Q=4.1d[0]+4.1d[1];g.14.1K=w;H.14.5R=x;2y(g,H,A,['M-1e','M-2a','M-11','M-29']);G.D.15=g.1l+'K';G.D.1w=g.12+'K';H.D.15=y+'K';H.D.1w=4I+'K';G.D.1K='3e';G.D.11='1j';G.D.1e='1j';4.37=G.D.22;H.1a(m);g.1a(G);G.1a(1z);m.D.1K='3a';H.D.1K='3a';m.D.11=\"0\";m.D.15=\"4H%\";H.D.4F='2w';H.D.1e=\"-\"+4.1d[2]+\"K\";H.D.11=\"-\"+4.1d[0]+\"K\";4.4n=1z.12;4.33=8(){B a=m.6E,32=6D=0;1o(B i=0;i<a.2v;i++){5(a[i].1l){32=Q.1U(a[i].1l,32)}};4.T[0]=((4.1b[1]&&!4.1B[1])||4.23[1])?g.1l-4.1Z[0]:g.1l;4.1N[0]=32+z;C 4.1N[0]};4.2Z=8(){4.T[1]=((4.1b[0]&&!4.1B[0])||4.23[0])?g.12-4.1Z[1]:g.12;4.1N[1]=m.12+3Q-2;C 4.1N[1]};4.5v=8(){m.D.2N='4w';m.D.2N='6C'};4.4k=8(){H.D.15=(2Y)?(4.T[0]-z-4o)+'K':4.T[0]+'K'};4.41=8(){H.D.1w=(2Y)?(4.T[1]-3Q-4m)+'K':4.T[1]+'K'};4.2Q=8(){4.33();4.2Z();G.2R=2u 4B();B a=G.2R;2Q(a,'6B',1);a.2U=[1c(O(a.7,'M-11')),1c(O(a.7,'M-29'))];a.7.D.M='1j';a.7.R=0;a.7.3i=E;a.7.2z=1;m.5T=a.7;3P(a,0);4.1Z[0]=(4.2n[1])?0:a.1i.1l;4.4k();G.3j=2u 4B();B b=G.3j;2Q(b,'6A',0);b.2U=[1c(O(b.7,'M-1e')),1c(O(b.7,'M-2a'))];b.7.D.M='1j';b.7.R=0;b.7.3i=A;b.7.2z=0;m.6x=b.7;5(J.4L)b.7.D.1K='3a';3P(b,0);4.1Z[1]=(4.2n[0])?0:b.1i.12;4.41();G.D.1w=g.12+'K';b.2M=U('6w');G.1a(b.2M);b.2M.4G=8(){b.7.30=E;4.1J=b.7;b.7.31=E;b.7.2q=A;G.2R.7.2q=A;F.V(h,'4d',1m);F.V(h,'2C',34);F.V(h,'35',2W);C A}};4.1J=Y;4.2Q();N.3O(o,G);5(!N.1x(g,'54',2t)||!N.1x(g,'57',2t)){g.6v=2t};N.1x(g,'54',2t);N.1x(g,'57',2t);N.1x(m,'5N',3S);N.1x(G,'5N',3S);g.6u('6s','0');N.V(g,'6p',8(e){5(g.39)C;5(!e){B e=J.1t};B a=e.5h;4.5i=a;I.2c();5(4.2l['21'+a]&&!13.4L){I.1k(4.2l['21'+a][0],4.2l['21'+a][1],E);5(e.1A)e.1A();C A}});N.V(g,'6o',8(e){5(g.39)C;5(!e){B e=J.1t};B a=e.5h;5(4.2l['21'+a]){I.1k(4.2l['21'+a][0],4.2l['21'+a][1],E);5(e.1A)e.1A();C A}});N.V(g,'6n',8(){4.5i=A});N.V(h,'35',2H);N.V(g,'5t',4i);8 4i(e){5(!e)e=J.1t;B a=(e.1f)?e.1f:(e.1G)?e.1G:A;5(!a||(a.1r&&a.1r.X(3c(\"\\\\6l\\\\b\"))))C;4.5C=e.28;4.5F=e.2e;3d();1L(g);2H();F.V(h,'2C',4z);4.2I=[g.1F+10,g.1F+4.T[0]-10,g.1H+10,g.1H+4.T[1]-10]};8 4z(e){5(!e)e=J.1t;B a=e.28,3F=e.2e,3G=a+4.3H,3I=3F+4.3J;4.3K=(3G<4.2I[0]||3G>4.2I[1])?1:0;4.3L=(3I<4.2I[2]||3I>4.2I[3])?1:0;4.3M=a-4.5C;4.3N=3F-4.5F;4.3g=(4.3M>40)?1:(4.3M<-40)?-1:0;4.3h=(4.3N>40)?1:(4.3N<-40)?-1:0;5((4.3g!=0||4.3h!=0)&&!4.2i)4.2i=J.2G(8(){5(4.3g==0&&4.3h==0){J.2x(4.2i);4.2i=A;C};3d();5(4.3K==1||4.3L==1)I.1k((4.3g*4.3K)+\"s\",(4.3h*4.3L)+\"s\",E)},45)};8 2H(){F.1Q(h,'2C',4z);5(4.2i)J.2x(4.2i);4.2i=A;5(4.3U)J.4Q(4.3U);5(4.3V)J.2x(4.3V)};8 3l(a){5(4.2D){13.2x(4.2D);4.2D=A}5(!a)G.D.22=4.37};8 3d(){4.3H=(J.4T)?J.4T:(h.2r&&h.2r.25)?h.2r.25:0;4.3J=(J.4V)?J.4V:(h.2r&&h.2r.27)?h.2r.27:0};I.3Y=8(){1o(B j=0,3Z;3Z=u[j];j++){B a=g.3m(3Z);1o(B i=0,2o;2o=a[i];i++){5(!2o.50){F.V(2o,'6k',8(){g.39=E});F.V(2o,'6j',6h=8(){g.39=A});2o.50=E}}}};g.6g=I.1P=8(a){5(G.W[1]()===0||G.W[0]()===0)C;m.D.M='4Z';B b=4.1b[0],56=4.1b[1],47=G.2R,2P=G.3j,3n,3o,2O=[];G.D.15=g.1l-4o+'K';G.D.1w=g.12-4m+'K';2O[0]=4.T[0];2O[1]=4.T[1];4.1b[0]=4.33()>4.T[0];4.1b[1]=4.2Z()>4.T[1];B c=(b!=4.1b[0]||56!=4.1b[1]||2O[0]!=4.T[0]||2O[1]!=4.T[1])?E:A;47.1i.4b(4.1b[1]);2P.1i.4b(4.1b[0]);3n=(4.1b[1]||4.23[1]);3o=(4.1b[0]||4.23[0]);4.33();4.2Z();4.41();4.4k();5(!4.1b[0]||!4.1b[1]||4.1B[0]||4.1B[1])2P.2M.2h();1g 2P.2M.3q();5(3n)3r(47,(3o&&!4.1B[0])?4.1Z[1]:0);1g m.D.11=\"0\";5(3o)3r(2P,(3n&&!4.1B[1])?4.1Z[0]:0);1g m.D.1e=\"0\";5(c&&!a)I.1P(E);m.D.M='1j';4.1O[0]=4.1O[1]=A};g.6e=I.1k=8(a,b,c,d){B e;5((a||a===0)&&4.P[0]){a=3s(a,0);e=G.3j.7;e.17=(c)?Q.2m(Q.1U(e.1I,e.17-a),0):-a;e.3u()}5((b||b===0)&&4.P[1]){b=3s(b,1);e=G.2R.7;e.17=(c)?Q.2m(Q.1U(e.1I,e.17-b),0):-b;e.3u()}5(!c)4.1O[0]=4.1O[1]=A;5(g.3v&&!d)g.3v();C 4.1S};I.4l=8(a,b){C I.1k(a,b,E)};I.3w=8(a){5(a==Y||!5p(a))C;B b=5q(a);I.1k(b[0]+4.1d[2],b[1]+4.1d[0],A);I.1k(0,0,E)};2y(1q,g,'1j',['1R-1e-15','1R-2a-15','1R-11-15','1R-29-15']);N.3O(1q,G);g.27=0;g.25=0;I.3Y();N.36[N.36.2v]=g;2d(g,'6d',A);I.1P();I.1k(4O,s,E);5(t.X(4j)){I.3w(h.1E(t.X(4j)[1]))};4.6b=J.2G(8(){B n=1z.12;5(n!=4.4n){I.1P();4.4n=n}},66);8 3s(v,i){B a=v.65();v=64(a);C 1c((a.X(/p$/))?v*4.T[i]*0.9:(a.X(/s$/))?v*4.T[i]*0.1:v)};8 O(a,b){C F.O(a,b)};8 2y(a,b,c,d){B e=2u 4B();1o(B i=0;i<d.2v;i++){e[i]=F.4p(d[i]);b.14[e[i]]=O(a,d[i],e[i]);5(c)a.14[e[i]]=c}};8 U(b,c,d,e){B f=(d)?d:h.4K('4r');5(!d){f.1M=l+'21'+b;f.1r=(c)?b:b+' 63'};f.W=[8(){C f.1l},8(){C f.12}];f.2S=(e)?[1m,1m]:[8(a){f.D.15=a},8(a){f.D.1w=a}];f.5E=[8(){C O(f,\"1e\")},8(){C O(f,\"11\")}];f.1D=(e)?[1m,1m]:[8(a){f.D.1e=a},8(a){f.D.11=a}];f.5G=(e)?[1m,1m]:[8(a){$(f).4v({1e:a})},8(a){5(Q.3B(1c(f.D.11)-1c(a))<=3s(4.3p[1],1)){$(f).4v({11:a},0,\"5J\")}1g{B 4x=$(f.19.19).1w()-$(f).1w();5(1c(a)<4x){a=4x+\"K\"}$(f).4v({11:a},4.2b,\"5J\")}}];f.2h=8(){f.D.2F=\"2w\"};f.3q=8(a){f.D.2F=(a)?O(a,'2F'):\"62\"};f.D=f.14;C f};8 2Q(a,b,c){B d=Z.1E(l+'-1X-'+b);B e=(d!=Y)?E:A;5(e){a.1i=U(A,A,d,E);4.2n[c]=E;a.2A=U(b+'5O');a.1W=U(b+'5Q');a.7=U(A,A,F.4D(d,'4r','1X-61')[0]);a.1T=U(b+'5U');a.1C=U(b+'5W')}1g{a.1i=U(b+'6U');a.2A=U(b+'5O');a.1W=U(b+'5Q');a.7=U(b+'60');a.1T=U(b+'5U');a.1C=U(b+'5W');G.1a(a.1i);a.1i.1a(a.7);a.1i.1a(a.2A);a.1i.1a(a.1W);a.7.1a(a.1T);a.7.1a(a.1C)}};8 3P(b,c){B d=b.1i,7=b.7,i=7.2z;7.17=0;7.2T=b.2U[0];7.3E=d;7.H=H;7.5S=m;7.1v=0;3r(b,c,E);7.4s=8(a){5(!a)7.R=1c((7.17*7.26)/7.1I);7.R=(Q.2m(Q.1U(7.R,0),7.26));7.1D[i](7.R+7.2T+\"K\");5(!7.1v)7.1v=7.17-1c((7.R/7.3z)*7.1I);7.1v=(7.R==0)?0:(7.R==7.26)?0:(!7.1v)?0:7.1v;5(a){7.17=1c((7.R/7.3z)*7.1I);m.1D[i](7.17+7.1v+\"K\");4.1S[i]=[-7.17-7.1v,-7.1I]}};7.3u=8(){7.R=1c((7.17*7.3z)/7.1I);7.R=(Q.2m(Q.1U(7.R,0),7.26));5(7.17==0){m.1D[i](7.17+\"K\")}1g{m.5G[i](7.17+\"K\")}4.1S[i]=[-7.17,-7.1I];7.1v=A;7.4s(A)};4.2J=O(7,'z-5u');7.D.22=(4.2J==\"67\"||4.2J==\"0\"||4.2J=='68')?2:4.2J;H.D.22=O(7,'z-5u');7.4G=8(){7.31=E;4.1J=7;7.30=A;7.2q=A;F.V(h,'4d',1m);F.V(h,'2C',34);F.V(h,'35',2W);C A};7.69=2H;d.4G=d.6a=8(e){5(!e){B e=J.1t};5(e.1f&&(e.1f==b.1T||e.1f==b.1C||e.1f==b.7))C;5(e.1G&&(e.1G==b.1T||e.1G==b.1C||e.1G==b.7))C;B a,2k=[];3d();I.2c();1L(7);a=(7.3i)?e.2e+4.3J-7.1H:e.28+4.3H-7.1F;2k[7.2z]=(a<0)?4.46[0]:4.46[1];2k[1-7.2z]=0;I.1k(2k[0],2k[1],E);5(e.5Y!=\"6c\"){2H();4.3U=J.5r(8(){4.3V=J.2G(8(){I.1k(2k[0],2k[1],E)},5f)},6f)};C A};d.4b=8(r){5(r){d.3q(g);4.1B[i]=(O(d,\"2F\")==\"2w\"||4.2n[i])?E:A;5(!4.1B[i])7.3q(g);1g 5(!4.2n[i])7.2h();4.P[i]=E;2d(d,\"\",\"53\")}1g{d.2h();7.2h();4.23[i]=(O(d,\"2F\")!=\"2w\")?E:A;4.P[i]=A;7.R=0;m.1D[i]('1j');4.1S[i]=[A,A];2d(d,\"53\",\"\")};H.1D[1-i]((4.4e[i]&&(r||4.23[i])&&!4.1B[i])?4.1Z[1-i]-4.1d[i*2]+\"K\":\"-\"+4.1d[i*2]+\"K\")};d.6i=1m};8 3r(a,b,c){B d=a.1i,7=a.7,2A=a.2A,1T=a.1T,1W=a.1W,1C=a.1C,i=7.2z;d.2S[i](G.W[i]()-b+'K');d.1D[1-i](G.W[1-i]()-d.W[1-i]()+'K');4.4e[i]=(1c(d.5E[1-i]())===0)?E:A;a.44=a.2U[0]+a.2U[1];a.43=1c((d.W[i]()-a.44)*0.75);7.5B=Q.2m(Q.1U(Q.2m(1c(4.T[i]/4.1N[i]*d.W[i]()),a.43),45),a.43);7.2S[i](7.5B+'K');7.26=d.W[i]()-7.W[i]()-a.44;7.R=Q.2m(Q.1U(0,7.R),7.26);7.1D[i](7.R+7.2T+'K');7.1I=H.W[i]()-4.1N[i];7.3z=7.26;2A.2S[i](d.W[i]()-1W.W[i]()+'K');1T.2S[i](7.W[i]()-1C.W[i]()+'K');1C.1D[i](7.W[i]()-1C.W[i]()+'K');1W.1D[i](d.W[i]()-1W.W[i]()+'K');5(!c)7.3u();4.5v()};I.2c=8(){H.27=0;H.25=0;g.27=0;g.25=0};N.V(J,'4U',8(){5(g.18)I.1P()});N.V(J,'6m',8(){5(g.4g)J.4Q(g.4g);g.4g=J.5r(8(){5(g.18)I.1P()},5f)});8 1m(){C A};8 34(e){5(!e){B e=J.1t};B a=4.1J,L,3T,6q,6r;5(a==Y)C;5(!F.5b&&!e.6t)2W();3T=(a.30)?2:1;1o(B i=0;i<3T;i++){L=(i==1)?a.5S.5T:a;5(a.31){5(!L.2q){I.2c();1L(L);1L(L.3E);L.5a=e.2e-L.1H;L.58=e.28-L.1F;L.4N=L.R;L.2q=E};L.R=(L.3i)?e.2e-L.5a-L.3E.1H-L.2T:e.28-L.58-L.3E.1F-L.2T;5(a.30)L.R=L.R+(L.R-L.4N);L.4s(E);5(g.3v)g.3v()}1g L.2q=A}};8 2W(){5(4.1J!=Y){4.1J.31=A;4.1J.17+=4.1J.1v}4.1J=Y;F.1Q(h,'4d',1m);F.1Q(h,'2C',34);F.1Q(h,'35',2W)};8 3S(e){5(!e)e=J.1t;5(N==G)G.D.22=4.37;5(e.2j.2v!=1||(!4.P[0]&&!4.P[1]))C A;B a='',6y=(e.1f&&(e.1f.1h||(e.1f.6z==3&&e.1f.19.1h)))?E:A;4.2B=[e.2j[0].28,e.2j[0].2e];3l();F.1x(g,'4J',4a);F.1x(g,'5y',3W);4.5e=(e.1f&&e.1f.1M&&e.1f.1M.X(/21[6F]6G[6H]e?/))?E:A;C A};8 4a(e){5(!e)e=J.1t;5(e.2j.2v!=1)C A;F.1Q(g,'5t',4i);B a=[e.2j[0].28,e.2j[0].2e];4.2V=E;4.16=[4.2B[0]-a[0],4.2B[1]-a[1]];5(4.5e){4.16[0]*=-(4.1N[0]/4.T[0]);4.16[1]*=-(4.1N[1]/4.T[1])};I.4l(4.16[0],4.16[1]);4.2B[0]=a[0];4.2B[1]=a[1];1o(B i=0;i<2;i++){5(4.16[i]!==0&&4.P[i]&&(4.16[1-i]==0||!4.P[1-i])){5((4.16[i]>0&&4.1S[i][1]==4.1S[i][0])||(4.16[i]<0&&4.1S[i][0]==0))4.2V=A};5(!4.P[i]&&4.16[1-i]!==0&&Q.3B(4.16[i]/4.16[1-i])>1.1)4.2V=A};5(4.2V){e.1A();G.D.22='6J'}1g{G.D.22=4.37}};8 3W(e){5(!e)e=J.1t;e.1A();5(e.2j.2v>0)C A;F.1Q(g,'4J',4a);F.1Q(g,'5y',3W);5((4.P[0]&&Q.3B(4.16[0])>6)||(4.P[1]&&Q.3B(4.16[1])>6)){B a=0;3l(E);4.2D=13.2G(8(){I.4l(3R(4.16[0],0,10,a,0.3),3R(4.16[1],0,10,a,0.3));a++;5(a>10)3l()},4H)}};8 2t(e){5(!e)e=J.1t;5(!N.18)C;B a=N,38,49,1V=A,1u=0,20;I.2c();4h=(e.1f)?e.1f:(e.1G)?e.1G:N;5(4h.1M&&4h.1M.X(/6S/))1V=E;5(e.52)1u=-e.52;5(e.51)1u=e.51;1u=(1u<0)?-1:+1;20=(1u<0)?0:1;4.1O[1-20]=A;5((4.1O[20]&&!1V)||(!4.P[0]&&!4.P[1]))C;5(4.P[1]&&!1V)1Y=I.1k(A,4.3p[20],E);38=!4.P[1]||1V||(4.P[1]&&((1Y[1][0]==1Y[1][1]&&1u>0)||(1Y[1][0]==0&&1u<0)));5(4.P[0]&&(!4.P[1]||1V))1Y=I.1k(4.3p[20],A,E);49=!4.P[0]||(4.P[0]&&4.P[1]&&38&&!1V)||(4.P[0]&&((1Y[0][0]==1Y[0][1]&&1u>0)||(1Y[0][0]==0&&1u<0)));5(38&&49&&!1V)4.1O[20]=E;1g 4.1O[20]=A;5(e.1A)e.1A();C A};8 5p(a){1y(a.19){a=a.19;5(a==g)C E}C A};8 1L(a){B b=a,2f=2g=0;5(b.3f){1y(b){2f+=b.59;2g+=b.4R;b=b.3f}}1g 5(b.x){2f+=b.x;2g+=b.y};a.1F=2f;a.1H=2g};8 5q(a){B b=a;2f=2g=0;1y(!b.12&&b.19&&b!=m&&O(b,'2N')==\"71\"){b=b.19};5(b.3f){1y(b!=m){2f+=b.59;2g+=b.4R;b=b.3f}};C[2f,2g]};8 2d(a,b,c){F.2d(a,b,c)};8 3R(a,b,c,d,e){c=Q.1U(c,1);B f=b-a,2X=a+(Q.73(((1/c)*d),e)*f);C(2X>0)?Q.74(2X):Q.76(2X)}},5d:8(){5(F.3k)13.2x(F.3k);F.3X();F.42();5(13.5A)13.5A()},2d:8(a,b,c){5(!a.1r)a.1r='';B d=a.1r;5(b&&!d.X(3c(\"(^|\\\\s)\"+b+\"($|\\\\s)\")))d=d.4c(/(\\S$)/,'$1 ')+b;5(c)d=d.4c(3c(\"((^|\\\\s)+\"+c+\")+($|\\\\s)\",\"g\"),'$2').4c(/\\s$/,'');a.1r=d},3X:8(){B d=/#([^#.]*)$/,2K=/(.*)#.*$/,5c=/(^|\\s)1X-7e-7f-7g($|\\s)/,7h,4f,i,1n,4S=Z.3m(\"a\"),2p=Z.3b.1h;5(2p.X(2K))2p=2p.X(2K)[1];1o(i=0;1n=4S[i];i++){4f=(1n.1r)?1n.1r:'';5(1n.1h&&!1n.3t&&1n.1h.X(d)&&((1n.1h.X(2K)&&2p===1n.1h.X(2K)[1])||4f.X(5c))){1n.3t=E;F.V(1n,'7n',8(e){5(!e)e=13.1t;B a=(e.1G)?e.1G:N;1y(!a.3t&&a.19){a=a.19};5(!a.3t)C;B b=Z.1E(a.1h.X(d)[1]),3x=A;5(b==Y)b=(b=Z.7p(a.1h.X(d)[1])[0])?b:Y;5(b!=Y){B c=b;1y(c.19){c=c.19;5(c.18){c.18.3w(b);3x=c}};5(3x){5(e.1A)e.1A();Z.3b.1h=2p+\"#\"+a.1h.X(d)[1];3x.18.2c();C A}}})}}},42:8(a,2b){F.7q=E;B b=F.4D(Z.3m(\"7r\")[0],\"4r\",(a)?a:'1X');1o(B i=0,3y;3y=b[i];i++)5(!3y.18)F.4E(3y,2b)},7t:8(a,b){5(3D(a)=='4A')a=Z.1E(a);5(a==Y)C A;B c=a;1y(c.19){c=c.19;5(c.18){5(b){Z.3b.1h=\"#\"+b};c.18.3w(a);c.18.2c();C E}};C A},1P:8(a,b){1o(B i=0,3A;3A=F.36[i];i++){3A.18.1P();5(b)3A.18.3Y()};5(a)F.3X()},4p:8(a){B a=a.7v('-'),4q=a[0],i;1o(i=1;4t=a[i];i++){4q+=4t.7y(0).7z()+4t.7A(1)};C 4q},4D:8(a,b,c){5(3D(a)=='4A')a=Z.1E(a);5(a==Y)C A;B d=2u 3c(\"(^|\\\\s)\"+c+\"($|\\\\s)\"),7B,4u=[],4y=0;B e=a.3m(b);1o(B i=0,2E;2E=e[i];i++){5(2E.1r&&2E.1r.X(d)){4u[4y]=2E;4y++}}C 4u},5l:8(a){5(a==Y)C E;B b;1y(a.19){b=F.O(a,'2N');5(b=='4w')C E;a=a.19};C A},O:8(a,b){5(13.5K)C 13.5K(a,Y).7G(b);5(a.5w)C a.5w[F.4p(b)];C A},3k:13.2G(8(){B a=Z.1E('1X-7I');5(a!=Y){F.42();13.2x(F.3k)}},4H),3O:8(a,b){a.19.7J(a);a.14.2N=\"4w\";b.1a(a)},V:8(a,b,c){5(!F.1x(a,b,c)&&a.5s){a.5s('5n'+b,c)}},1x:8(a,b,c){5(a.4C){a.4C(b,c,A);F.5b=E;13.4C(\"7N\",8(){F.1Q(a,b,c)},A);C E}1g C A},1Q:8(a,b,c){5(!F.5X(a,b,c)&&a.4P)a.4P('5n'+b,c)},5X:8(a,b,c){5(a.5L){a.5L(b,c,A);C E}1g C A}};8 7R(a){F.4E(a)};F.5k();",
62,488,"||||sC|if||sBr|function||||||||||||||||||||||||||||false|var|return|sY|true|fleXenv|tDv|mDv|sfU|wD|px|movBr|padding|this|getStyle|scroller|Math|curPos||cntRSize|createDiv|addTrggr|getSize|match|null|document||top|offsetHeight|window|style|width|moveDelta|trgtScrll|fleXcroll|parentNode|appendChild|reqS|parseInt|paddings|left|target|else|href|sDv|0px|setScrollPos|offsetWidth|retFalse|anchoR|for||pDv|className||event|delta|targetSkew|height|addChckTrggr|while|fDv|preventDefault|forcedHide|sSBr|setPos|getElementById|xPos|srcElement|yPos|mxScroll|goScroll|position|findPos|id|cntSize|edge|updateScrollBars|remTrggr|border|scrollPosition|sFBr|max|hoverH|sSDv|flexcroll|scrollState|barSpace|iNDx|_|zIndex|forcedBar|nV|scrollLeft|maxPos|scrollTop|clientX|bottom|right|animateDuration|mDPosFix|classChange|clientY|curleft|curtop|fHide|tSelectFunc|targetTouches|mV|keyAct|min|externaL|formItem|urlBase|moved|documentElement||mWheelProc|new|length|hidden|clearInterval|copyStyles|indx|sFDv|touchPos|mousemove|touchFlick|pusher|visibility|setInterval|intClear|mTBox|barZ|urlExt|indexOf|jBox|display|cPSize|hBr|createScrollBars|vrt|setSize|minPos|barPadding|touchPrevent|mMouseUp|stepp|stdMode|getContentHeight|scrollBoth|clicked|maxCWidth|getContentWidth|mMoveBar|mouseup|fleXlist|tDivZ|vEdge|focusProtect|relative|location|RegExp|pageScrolled|absolute|offsetParent|sXdir|sYdir|vertical|hrz|catchFastInit|flickClear|getElementsByTagName|vUpReq|hUpReq|wheelAct|fShow|updateScroll|calcCScrollVal|fleXanchor|realScrollPos|onfleXcroll|scrollToElement|eScroll|tgDiv|sRange|fleXdiv|abs|userAgent|typeof|ofstParent|mY|mdX|xScrld|mdY|yScrld|mOnXEdge|mOnYEdge|xAw|yAw|putAway|prepareScroll|padHeightComp|easeInOut|handleTouch|maxx|barClickRetard|barClickScroll|handleTouchEnd|prepAnchors|formUpdate|inputName||setHeight|initByClass|baseProp|padLoss||baseAct|vBr|mHeight|hEdge|handleTouchMove|setVisibility|replace|selectstart|forcedPos|claSS|refreshTimeout|hElem|handleTextSelect|uReg|setWidth|scrollContent|brdHeightLoss|zTHeight|brdWidthLoss|camelConv|reT|div|doBarPos|parT|retArray|animate|none|maxDelta|key|tSelectMouse|string|Array|addEventListener|getByClassName|fleXcrollMain|overflow|onmousedown|100|postHeight|touchmove|createElement|opera|text|inCurPos|oScrollX|detachEvent|clearTimeout|offsetTop|anchorList|pageXOffset|load|pageYOffset|onfleXcrollFail|paddingTop|paddingLeft|1px|fleXprocess|detail|wheelDelta|flexinactive|mousewheel|solid|reqV|DOMMouseScroll|pointerOffsetX|offsetLeft|pointerOffsetY|w3events|regExer|globalInit|touchBar|80|100p|keyCode|pkeY|1em|fleXcrollInit|checkHidden|hide|on|default|isddvChild|findRCpos|setTimeout|attachEvent|mousedown|index|fixIEDispBug|currentStyle|brdWidth|touchend|fleXdata|onfleXcrollRun|aSize|inMposX|HTMLElement|getPos|inMposY|setPosAnimate|firstChild|Object|linear|getComputedStyle|removeEventListener|fixed|touchstart|basebeg|intlWidth|baseend|textAlign|scrlTrgt|vBar|barbeg|100px|barend|remChckTrggr|type|input|bar|scrollbar|visible|scrollgeneric|parseFloat|toString|2500|auto|normal|onmouseover|ondblclick|sizeChangeDetect|dblclick|flexcrollactive|contentScroll|425|scrollUpdate|onblur|onmouseclick|blur|focus|bscrollgeneric|resize|keyup|keypress|keydown|xScroll|yScroll|tabIndex|button|setAttribute|onmousewheel|scrollerjogbox|hBar|touchLink|nodeType|hscroller|vscroller|block|compPad|childNodes|vh|scrollerba|rs|borderBottomWidth|9999|black|2px|borderBottom|align|contentSize|containerSize|400|isNaN|_hscroller|select|base|textarea|999|12px|fontSize|blue|zoomdetectdiv|inline|domfixdiv|pow|floor||ceil|copyholder|scrollwrapper|mcontentwrapper|contentwrapper|_35|_36|_34|in|page|link|matcH|_33|_40|_39|_38|_37|click|flex__|getElementsByName|initialized|body|failed|scrollTo|MSIE|split|Mac|platform|charAt|toUpperCase|substr|clsnm|KDE|vendor|prototype|undefined|getPropertyValue|Safari|init|removeChild|AppleWebKit|OmniWeb|navigator|unload|important|css|write|CSBfleXcroll".split("|"),
0,{}));(function($){$.fn.ajaxSubmit=function(options){if(!this.length){log("ajaxSubmit: skipping submit process - no element selected");return this}var method,action,url,$form=this;if(typeof options=="function")options={success:options};method=this.attr("method");action=this.attr("action");url=typeof action==="string"?$.trim(action):"";url=url||window.location.href||"";if(url)url=(url.match(/^([^#]+)/)||[])[1];options=$.extend(true,{url:url,success:$.ajaxSettings.success,type:method||"GET",iframeSrc:/^https/i.test(window.location.href||
"")?"javascript:false":"about:blank"},options);var veto={};this.trigger("form-pre-serialize",[this,options,veto]);if(veto.veto){log("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this}if(options.beforeSerialize&&options.beforeSerialize(this,options)===false){log("ajaxSubmit: submit aborted via beforeSerialize callback");return this}var traditional=options.traditional;if(traditional===undefined)traditional=$.ajaxSettings.traditional;var qx,n,v,a=this.formToArray(options.semantic);
if(options.data){options.extraData=options.data;qx=$.param(options.data,traditional)}if(options.beforeSubmit&&options.beforeSubmit(a,this,options)===false){log("ajaxSubmit: submit aborted via beforeSubmit callback");return this}this.trigger("form-submit-validate",[a,this,options,veto]);if(veto.veto){log("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this}var q=$.param(a,traditional);if(qx)q=q?q+"&"+qx:qx;if(options.type.toUpperCase()=="GET"){options.url+=(options.url.indexOf("?")>=
0?"&":"?")+q;options.data=null}else options.data=q;var callbacks=[];if(options.resetForm)callbacks.push(function(){$form.resetForm()});if(options.clearForm)callbacks.push(function(){$form.clearForm(options.includeHidden)});if(!options.dataType&&options.target){var oldSuccess=options.success||function(){};callbacks.push(function(data){var fn=options.replaceTarget?"replaceWith":"html";$(options.target)[fn](data).each(oldSuccess,arguments)})}else if(options.success)callbacks.push(options.success);options.success=
function(data,status,xhr){var context=options.context||options;for(var i=0,max=callbacks.length;i<max;i++)callbacks[i].apply(context,[data,status,xhr||$form,$form])};var fileInputs=$("input:file:enabled[value]",this);var hasFileInputs=fileInputs.length>0;var mp="multipart/form-data";var multipart=$form.attr("enctype")==mp||$form.attr("encoding")==mp;var fileAPI=!!(hasFileInputs&&fileInputs.get(0).files&&window.FormData);log("fileAPI :"+fileAPI);var shouldUseFrame=(hasFileInputs||multipart)&&!fileAPI;
if(options.iframe!==false&&(options.iframe||shouldUseFrame))if(options.closeKeepAlive)$.get(options.closeKeepAlive,function(){fileUploadIframe(a)});else fileUploadIframe(a);else if((hasFileInputs||multipart)&&fileAPI){options.progress=options.progress||$.noop;fileUploadXhr(a)}else $.ajax(options);this.trigger("form-submit-notify",[this,options]);return this;function fileUploadXhr(a){var formdata=new FormData;for(var i=0;i<a.length;i++){if(a[i].type=="file")continue;formdata.append(a[i].name,a[i].value)}$form.find("input:file:enabled").each(function(){var name=
$(this).attr("name"),files=this.files;if(name)for(var i=0;i<files.length;i++)formdata.append(name,files[i])});if(options.extraData)for(var k in options.extraData)formdata.append(k,options.extraData[k]);options.data=null;var _beforeSend=options.beforeSend;options.beforeSend=function(xhr,options){options.data=formdata;if(xhr.upload)xhr.upload.onprogress=function(event){options.progress(event.position,event.total)};if(_beforeSend)_beforeSend.call(options,xhr,options)};$.ajax(options)}function fileUploadIframe(a){var form=
$form[0],el,i,s,g,id,$io,io,xhr,sub,n,timedOut,timeoutHandle;var useProp=!!$.fn.prop;if(a)if(useProp)for(i=0;i<a.length;i++){el=$(form[a[i].name]);el.prop("disabled",false)}else for(i=0;i<a.length;i++){el=$(form[a[i].name]);el.removeAttr("disabled")}if($(":input[name=submit],:input[id=submit]",form).length){alert('Error: Form elements must not have name or id of "submit".');return}s=$.extend(true,{},$.ajaxSettings,options);s.context=s.context||s;id="jqFormIO"+(new Date).getTime();if(s.iframeTarget){$io=
$(s.iframeTarget);n=$io.attr("name");if(n==null)$io.attr("name",id);else id=n}else{$io=$('<iframe name="'+id+'" src="'+s.iframeSrc+'" />');$io.css({position:"absolute",top:"-1000px",left:"-1000px"})}io=$io[0];xhr={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(status){var e=status==="timeout"?"timeout":"aborted";log("aborting upload... "+e);this.aborted=1;$io.attr("src",
s.iframeSrc);xhr.error=e;s.error&&s.error.call(s.context,xhr,e,status);g&&$.event.trigger("ajaxError",[xhr,s,e]);s.complete&&s.complete.call(s.context,xhr,e)}};g=s.global;if(g&&!$.active++)$.event.trigger("ajaxStart");if(g)$.event.trigger("ajaxSend",[xhr,s]);if(s.beforeSend&&s.beforeSend.call(s.context,xhr,s)===false){if(s.global)$.active--;return}if(xhr.aborted)return;sub=form.clk;if(sub){n=sub.name;if(n&&!sub.disabled){s.extraData=s.extraData||{};s.extraData[n]=sub.value;if(sub.type=="image"){s.extraData[n+
".x"]=form.clk_x;s.extraData[n+".y"]=form.clk_y}}}var CLIENT_TIMEOUT_ABORT=1;var SERVER_ABORT=2;function getDoc(frame){var doc=frame.contentWindow?frame.contentWindow.document:frame.contentDocument?frame.contentDocument:frame.document;return doc}var csrf_token=$("meta[name=csrf-token]").attr("content");var csrf_param=$("meta[name=csrf-param]").attr("content");if(csrf_param&&csrf_token){s.extraData=s.extraData||{};s.extraData[csrf_param]=csrf_token}function doSubmit(){var t=$form.attr("target"),a=
$form.attr("action");form.setAttribute("target",id);if(!method)form.setAttribute("method","POST");if(a!=s.url)form.setAttribute("action",s.url);if(!s.skipEncodingOverride&&(!method||/post/i.test(method)))$form.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"});if(s.timeout)timeoutHandle=setTimeout(function(){timedOut=true;cb(CLIENT_TIMEOUT_ABORT)},s.timeout);function checkState(){try{var state=getDoc(io).readyState;log("state = "+state);if(state.toLowerCase()=="uninitialized")setTimeout(checkState,
50)}catch(e){log("Server abort: ",e," (",e.name,")");cb(SERVER_ABORT);timeoutHandle&&clearTimeout(timeoutHandle);timeoutHandle=undefined}}var extraInputs=[];try{if(s.extraData)for(var n in s.extraData)extraInputs.push($('<input type="hidden" name="'+n+'">').attr("value",s.extraData[n]).appendTo(form)[0]);if(!s.iframeTarget){$io.appendTo("body");io.attachEvent?io.attachEvent("onload",cb):io.addEventListener("load",cb,false)}setTimeout(checkState,15);form.submit()}finally{form.setAttribute("action",
a);if(t)form.setAttribute("target",t);else $form.removeAttr("target");$(extraInputs).remove()}}if(s.forceSync)doSubmit();else setTimeout(doSubmit,10);var data,doc,domCheckCount=50,callbackProcessed;function cb(e){if(xhr.aborted||callbackProcessed)return;try{doc=getDoc(io)}catch(ex){log("cannot access response document: ",ex);e=SERVER_ABORT}if(e===CLIENT_TIMEOUT_ABORT&&xhr){xhr.abort("timeout");return}else if(e==SERVER_ABORT&&xhr){xhr.abort("server abort");return}if(!doc||doc.location.href==s.iframeSrc)if(!timedOut)return;
io.detachEvent?io.detachEvent("onload",cb):io.removeEventListener("load",cb,false);var status="success",errMsg;try{if(timedOut)throw"timeout";var isXml=s.dataType=="xml"||doc.XMLDocument||$.isXMLDoc(doc);log("isXml="+isXml);if(!isXml&&window.opera&&(doc.body==null||doc.body.innerHTML==""))if(--domCheckCount){log("requeing onLoad callback, DOM not available");setTimeout(cb,250);return}var docRoot=doc.body?doc.body:doc.documentElement;xhr.responseText=docRoot?docRoot.innerHTML:null;xhr.responseXML=
doc.XMLDocument?doc.XMLDocument:doc;if(isXml)s.dataType="xml";xhr.getResponseHeader=function(header){var headers={"content-type":s.dataType};return headers[header]};if(docRoot){xhr.status=Number(docRoot.getAttribute("status"))||xhr.status;xhr.statusText=docRoot.getAttribute("statusText")||xhr.statusText}var dt=(s.dataType||"").toLowerCase();var scr=/(json|script|text)/.test(dt);if(scr||s.textarea){var ta=doc.getElementsByTagName("textarea")[0];if(ta){xhr.responseText=ta.value;xhr.status=Number(ta.getAttribute("status"))||
xhr.status;xhr.statusText=ta.getAttribute("statusText")||xhr.statusText}else if(scr){var pre=doc.getElementsByTagName("pre")[0];var b=doc.getElementsByTagName("body")[0];if(pre)xhr.responseText=pre.textContent?pre.textContent:pre.innerText;else if(b)xhr.responseText=b.textContent?b.textContent:b.innerText}}else if(dt=="xml"&&!xhr.responseXML&&xhr.responseText!=null)xhr.responseXML=toXml(xhr.responseText);try{data=httpData(xhr,dt,s)}catch(e){status="parsererror";xhr.error=errMsg=e||status}}catch(e){log("error caught: ",
e);status="error";xhr.error=errMsg=e||status}if(xhr.aborted){log("upload aborted");status=null}if(xhr.status)status=xhr.status>=200&&xhr.status<300||xhr.status===304?"success":"error";if(status==="success"){s.success&&s.success.call(s.context,data,"success",xhr);g&&$.event.trigger("ajaxSuccess",[xhr,s])}else if(status){if(errMsg==undefined)errMsg=xhr.statusText;s.error&&s.error.call(s.context,xhr,status,errMsg);g&&$.event.trigger("ajaxError",[xhr,s,errMsg])}g&&$.event.trigger("ajaxComplete",[xhr,
s]);if(g&&!--$.active)$.event.trigger("ajaxStop");s.complete&&s.complete.call(s.context,xhr,status);callbackProcessed=true;if(s.timeout)clearTimeout(timeoutHandle);setTimeout(function(){if(!s.iframeTarget)$io.remove();xhr.responseXML=null},100)}var toXml=$.parseXML||function(s,doc){if(window.ActiveXObject){doc=new ActiveXObject("Microsoft.XMLDOM");doc.async="false";doc.loadXML(s)}else doc=(new DOMParser).parseFromString(s,"text/xml");return doc&&doc.documentElement&&doc.documentElement.nodeName!=
"parsererror"?doc:null};var parseJSON=$.parseJSON||function(s){return window["eval"]("("+s+")")};var httpData=function(xhr,type,s){var ct=xhr.getResponseHeader("content-type")||"",xml=type==="xml"||!type&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.nodeName==="parsererror")$.error&&$.error("parsererror");if(s&&s.dataFilter)data=s.dataFilter(data,type);if(typeof data==="string")if(type==="json"||!type&&ct.indexOf("json")>=0)data=parseJSON(data);else if(type===
"script"||!type&&ct.indexOf("javascript")>=0)$.globalEval(data);return data}}};$.fn.ajaxForm=function(options){if(this.length===0){var o={s:this.selector,c:this.context};if(!$.isReady&&o.s){log("DOM not ready, queuing ajaxForm");$(function(){$(o.s,o.c).ajaxForm(options)});return this}log("terminating; zero elements found by selector"+($.isReady?"":" (DOM not ready)"));return this}return this.ajaxFormUnbind().bind("submit.form-plugin",function(e){if(!e.isDefaultPrevented()){e.preventDefault();$(this).ajaxSubmit(options)}}).bind("click.form-plugin",
function(e){var target=e.target;var $el=$(target);if(!$el.is(":submit,input:image")){var t=$el.closest(":submit");if(t.length==0)return;target=t[0]}var form=this;form.clk=target;if(target.type=="image")if(e.offsetX!=undefined){form.clk_x=e.offsetX;form.clk_y=e.offsetY}else if(typeof $.fn.offset=="function"){var offset=$el.offset();form.clk_x=e.pageX-offset.left;form.clk_y=e.pageY-offset.top}else{form.clk_x=e.pageX-target.offsetLeft;form.clk_y=e.pageY-target.offsetTop}setTimeout(function(){form.clk=
form.clk_x=form.clk_y=null},100)})};$.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")};$.fn.formToArray=function(semantic){var a=[];if(this.length===0)return a;var form=this[0];var els=semantic?form.getElementsByTagName("*"):form.elements;if(!els)return a;var i,j,n,v,el,max,jmax;for(i=0,max=els.length;i<max;i++){el=els[i];n=el.name;if(!n)continue;if(semantic&&form.clk&&el.type=="image"){if(!el.disabled&&form.clk==el){a.push({name:n,value:$(el).val(),type:el.type});
a.push({name:n+".x",value:form.clk_x},{name:n+".y",value:form.clk_y})}continue}v=$.fieldValue(el,true);if(v&&v.constructor==Array)for(j=0,jmax=v.length;j<jmax;j++)a.push({name:n,value:v[j]});else if(v!==null&&typeof v!="undefined")a.push({name:n,value:v,type:el.type})}if(!semantic&&form.clk){var $input=$(form.clk),input=$input[0];n=input.name;if(n&&!input.disabled&&input.type=="image"){a.push({name:n,value:$input.val()});a.push({name:n+".x",value:form.clk_x},{name:n+".y",value:form.clk_y})}}return a};
$.fn.formSerialize=function(semantic){return $.param(this.formToArray(semantic))};$.fn.fieldSerialize=function(successful){var a=[];this.each(function(){var n=this.name;if(!n)return;var v=$.fieldValue(this,successful);if(v&&v.constructor==Array)for(var i=0,max=v.length;i<max;i++)a.push({name:n,value:v[i]});else if(v!==null&&typeof v!="undefined")a.push({name:this.name,value:v})});return $.param(a)};$.fn.fieldValue=function(successful){for(var val=[],i=0,max=this.length;i<max;i++){var el=this[i];var v=
$.fieldValue(el,successful);if(v===null||typeof v=="undefined"||v.constructor==Array&&!v.length)continue;v.constructor==Array?$.merge(val,v):val.push(v)}return val};$.fieldValue=function(el,successful){var n=el.name,t=el.type,tag=el.tagName.toLowerCase();if(successful===undefined)successful=true;if(successful&&(!n||el.disabled||t=="reset"||t=="button"||(t=="checkbox"||t=="radio")&&!el.checked||(t=="submit"||t=="image")&&el.form&&el.form.clk!=el||tag=="select"&&el.selectedIndex==-1))return null;if(tag==
"select"){var index=el.selectedIndex;if(index<0)return null;var a=[],ops=el.options;var one=t=="select-one";var max=one?index+1:ops.length;for(var i=one?index:0;i<max;i++){var op=ops[i];if(op.selected){var v=op.value;if(!v)v=op.attributes&&op.attributes["value"]&&!op.attributes["value"].specified?op.text:op.value;if(one)return v;a.push(v)}}return a}return $(el).val()};$.fn.clearForm=function(includeHidden){return this.each(function(){$("input,select,textarea",this).clearFields(includeHidden)})};$.fn.clearFields=
$.fn.clearInputs=function(includeHidden){var re=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var t=this.type,tag=this.tagName.toLowerCase();if(re.test(t)||tag=="textarea"||includeHidden&&/hidden/.test(t))this.value="";else if(t=="checkbox"||t=="radio")this.checked=false;else if(tag=="select")this.selectedIndex=-1})};$.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||typeof this.reset==
"object"&&!this.reset.nodeType)this.reset()})};$.fn.enable=function(b){if(b===undefined)b=true;return this.each(function(){this.disabled=!b})};$.fn.selected=function(select){if(select===undefined)select=true;return this.each(function(){var t=this.type;if(t=="checkbox"||t=="radio")this.checked=select;else if(this.tagName.toLowerCase()=="option"){var $sel=$(this).parent("select");if(select&&$sel[0]&&$sel[0].type=="select-one")$sel.find("option").selected(false);this.selected=select}})};$.fn.ajaxSubmit.debug=
false;function log(){if(!$.fn.ajaxSubmit.debug)return;var msg="[jquery.form] "+Array.prototype.join.call(arguments,"");if(window.console&&window.console.log)window.console.log(msg);else if(window.opera&&window.opera.postError)window.opera.postError(msg)}})(jQuery);(function($){$.extend($.fn,{validate:function(options){if(!this.length){options&&options.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing");return}var validator=$.data(this[0],"validator");if(validator)return validator;this.attr("novalidate","novalidate");validator=new $.validator(options,this[0]);$.data(this[0],"validator",validator);if(validator.settings.onsubmit){var inputsAndButtons=this.find("input, button");inputsAndButtons.filter(".cancel").click(function(){validator.cancelSubmit=
true});if(validator.settings.submitHandler)inputsAndButtons.filter(":submit").click(function(){validator.submitButton=this});this.submit(function(event){if(validator.settings.debug)event.preventDefault();function handle(){if(validator.settings.submitHandler){if(validator.submitButton)var hidden=$("<input type='hidden'/>").attr("name",validator.submitButton.name).val(validator.submitButton.value).appendTo(validator.currentForm);validator.settings.submitHandler.call(validator,validator.currentForm);
if(validator.submitButton)hidden.remove();return false}return true}if(validator.cancelSubmit){validator.cancelSubmit=false;return handle()}if(validator.form()){if(validator.pendingRequest){validator.formSubmitted=true;return false}return handle()}else{validator.focusInvalid();return false}})}return validator},valid:function(){if($(this[0]).is("form"))return this.validate().form();else{var valid=true;var validator=$(this[0].form).validate();this.each(function(){valid&=validator.element(this)});return valid}},
removeAttrs:function(attributes){var result={},$element=this;$.each(attributes.split(/\s/),function(index,value){result[value]=$element.attr(value);$element.removeAttr(value)});return result},rules:function(command,argument){var element=this[0];if(command){var settings=$.data(element.form,"validator").settings;var staticRules=settings.rules;var existingRules=$.validator.staticRules(element);switch(command){case "add":$.extend(existingRules,$.validator.normalizeRule(argument));staticRules[element.name]=
existingRules;if(argument.messages)settings.messages[element.name]=$.extend(settings.messages[element.name],argument.messages);break;case "remove":if(!argument){delete staticRules[element.name];return existingRules}var filtered={};$.each(argument.split(/\s/),function(index,method){filtered[method]=existingRules[method];delete existingRules[method]});return filtered}}var data=$.validator.normalizeRules($.extend({},$.validator.metadataRules(element),$.validator.classRules(element),$.validator.attributeRules(element),
$.validator.staticRules(element)),element);if(data.required){var param=data.required;delete data.required;data=$.extend({required:param},data)}return data}});$.extend($.expr[":"],{blank:function(a){return!$.trim(""+a.value)},filled:function(a){return!!$.trim(""+a.value)},unchecked:function(a){return!a.checked}});$.validator=function(options,form){this.settings=$.extend(true,{},$.validator.defaults,options);this.currentForm=form;this.init()};$.validator.format=function(source,params){if(arguments.length==
1)return function(){var args=$.makeArray(arguments);args.unshift(source);return $.validator.format.apply(this,args)};if(arguments.length>2&&params.constructor!=Array)params=$.makeArray(arguments).slice(1);if(params.constructor!=Array)params=[params];$.each(params,function(i,n){source=source.replace(new RegExp("\\{"+i+"\\}","g"),n)});return source};$.extend($.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:$([]),
errorLabelContainer:$([]),onsubmit:true,ignore:":hidden",ignoreTitle:false,onfocusin:function(element,event){this.lastActive=element;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,element,this.settings.errorClass,this.settings.validClass);this.addWrapper(this.errorsFor(element)).hide()}},onfocusout:function(element,event){if(!this.checkable(element)&&(element.name in this.submitted||!this.optional(element)))this.element(element)},
onkeyup:function(element,event){if(element.name in this.submitted||element==this.lastElement)this.element(element)},onclick:function(element,event){if(element.name in this.submitted)this.element(element);else if(element.parentNode.name in this.submitted)this.element(element.parentNode)},highlight:function(element,errorClass,validClass){if(element.type==="radio")this.findByName(element.name).addClass(errorClass).removeClass(validClass);else $(element).addClass(errorClass).removeClass(validClass)},
unhighlight:function(element,errorClass,validClass){if(element.type==="radio")this.findByName(element.name).removeClass(errorClass).addClass(validClass);else $(element).removeClass(errorClass).addClass(validClass)}},setDefaults:function(settings){$.extend($.validator.defaults,settings)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",
number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:$.validator.format("Please enter no more than {0} characters."),minlength:$.validator.format("Please enter at least {0} characters."),rangelength:$.validator.format("Please enter a value between {0} and {1} characters long."),range:$.validator.format("Please enter a value between {0} and {1}."),
max:$.validator.format("Please enter a value less than or equal to {0}."),min:$.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){this.labelContainer=$(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||$(this.currentForm);this.containers=$(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending=
{};this.invalid={};this.reset();var groups=this.groups={};$.each(this.settings.groups,function(key,value){$.each(value.split(/\s/),function(index,name){groups[name]=key})});var rules=this.settings.rules;$.each(rules,function(key,value){rules[key]=$.validator.normalizeRule(value)});function delegate(event){var validator=$.data(this[0].form,"validator"),eventType="on"+event.type.replace(/^validate/,"");validator.settings[eventType]&&validator.settings[eventType].call(validator,this[0],event)}$(this.currentForm).validateDelegate("[type='text'], [type='password'], [type='file'], select, textarea, "+
"[type='number'], [type='search'] ,[type='tel'], [type='url'], "+"[type='email'], [type='datetime'], [type='date'], [type='month'], "+"[type='week'], [type='time'], [type='datetime-local'], "+"[type='range'], [type='color'] ","focusin focusout keyup",delegate).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",delegate);if(this.settings.invalidHandler)$(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){this.checkForm();$.extend(this.submitted,
this.errorMap);this.invalid=$.extend({},this.errorMap);if(!this.valid())$(this.currentForm).triggerHandler("invalid-form",[this]);this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var i=0,elements=this.currentElements=this.elements();elements[i];i++)this.check(elements[i]);return this.valid()},element:function(element){element=this.validationTargetFor(this.clean(element));this.lastElement=element;this.prepareElement(element);this.currentElements=$(element);var result=
this.check(element);if(result)delete this.invalid[element.name];else this.invalid[element.name]=true;if(!this.numberOfInvalids())this.toHide=this.toHide.add(this.containers);this.showErrors();return result},showErrors:function(errors){if(errors){$.extend(this.errorMap,errors);this.errorList=[];for(var name in errors)this.errorList.push({message:errors[name],element:this.findByName(name)[0]});this.successList=$.grep(this.successList,function(element){return!(element.name in errors)})}this.settings.showErrors?
this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){if($.fn.resetForm)$(this.currentForm).resetForm();this.submitted={};this.lastElement=null;this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(obj){var count=0;for(var i in obj)count++;return count},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()==
0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{$(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(e){}},findLastActive:function(){var lastActive=this.lastActive;return lastActive&&$.grep(this.errorList,function(n){return n.element.name==lastActive.name}).length==1&&lastActive},elements:function(){var validator=this,rulesCache={};return $(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&
validator.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in rulesCache||!validator.objectLength($(this).rules()))return false;rulesCache[this.name]=true;return true})},clean:function(selector){return $(selector)[0]},errors:function(){return $(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=$([]);this.toHide=$([]);this.currentElements=$([])},prepareForm:function(){this.reset();
this.toHide=this.errors().add(this.containers)},prepareElement:function(element){this.reset();this.toHide=this.errorsFor(element)},check:function(element){element=this.validationTargetFor(this.clean(element));var rules=$(element).rules();var dependencyMismatch=false;for(var method in rules){var rule={method:method,parameters:rules[method]};try{var result=$.validator.methods[method].call(this,element.value.replace(/\r/g,""),element,rule.parameters);if(result=="dependency-mismatch"){dependencyMismatch=
true;continue}dependencyMismatch=false;if(result=="pending"){this.toHide=this.toHide.not(this.errorsFor(element));return}if(!result){this.formatAndAdd(element,rule);return false}}catch(e){this.settings.debug&&window.console&&console.log("exception occured when checking element "+element.id+", check the '"+rule.method+"' method",e);throw e;}}if(dependencyMismatch)return;if(this.objectLength(rules))this.successList.push(element);return true},customMetaMessage:function(element,method){if(!$.metadata)return;
var meta=this.settings.meta?$(element).metadata()[this.settings.meta]:$(element).metadata();return meta&&meta.messages&&meta.messages[method]},customMessage:function(name,method){var m=this.settings.messages[name];return m&&(m.constructor==String?m:m[method])},findDefined:function(){for(var i=0;i<arguments.length;i++)if(arguments[i]!==undefined)return arguments[i];return undefined},defaultMessage:function(element,method){return this.findDefined(this.customMessage(element.name,method),this.customMetaMessage(element,
method),!this.settings.ignoreTitle&&element.title||undefined,$.validator.messages[method],"<strong>Warning: No message defined for "+element.name+"</strong>")},formatAndAdd:function(element,rule){var message=this.defaultMessage(element,rule.method),theregex=/\$?\{(\d+)\}/g;if(typeof message=="function")message=message.call(this,rule.parameters,element);else if(theregex.test(message))message=jQuery.format(message.replace(theregex,"{$1}"),rule.parameters);this.errorList.push({message:message,element:element});
this.errorMap[element.name]=message;this.submitted[element.name]=message},addWrapper:function(toToggle){if(this.settings.wrapper)toToggle=toToggle.add(toToggle.parent());return toToggle},defaultShowErrors:function(){for(var i=0;this.errorList[i];i++){var error=this.errorList[i];this.settings.highlight&&this.settings.highlight.call(this,error.element,this.settings.errorClass,this.settings.validClass);this.showLabel(error.element,error.message)}if(this.errorList.length)this.toShow=this.toShow.add(this.containers);
if(this.settings.success)for(var i=0;this.successList[i];i++)this.showLabel(this.successList[i]);if(this.settings.unhighlight)for(var i=0,elements=this.validElements();elements[i];i++)this.settings.unhighlight.call(this,elements[i],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return $(this.errorList).map(function(){return this.element})},
showLabel:function(element,message){var label=this.errorsFor(element);if(label.length){label.removeClass(this.settings.validClass).addClass(this.settings.errorClass);label.attr("generated")&&label.html(message)}else{label=$("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(element),generated:true}).addClass(this.settings.errorClass).html(message||"");if(this.settings.wrapper)label=label.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();if(!this.labelContainer.append(label).length)this.settings.errorPlacement?
this.settings.errorPlacement(label,$(element)):label.insertAfter(element)}if(!message&&this.settings.success){label.text("");typeof this.settings.success=="string"?label.addClass(this.settings.success):this.settings.success(label)}this.toShow=this.toShow.add(label)},errorsFor:function(element){var name=this.idOrName(element);return this.errors().filter(function(){return $(this).attr("for")==name})},idOrName:function(element){return this.groups[element.name]||(this.checkable(element)?element.name:
element.id||element.name)},validationTargetFor:function(element){if(this.checkable(element))element=this.findByName(element.name).not(this.settings.ignore)[0];return element},checkable:function(element){return/radio|checkbox/i.test(element.type)},findByName:function(name){var form=this.currentForm;return $(document.getElementsByName(name)).map(function(index,element){return element.form==form&&element.name==name&&element||null})},getLength:function(value,element){switch(element.nodeName.toLowerCase()){case "select":return $("option:selected",
element).length;case "input":if(this.checkable(element))return this.findByName(element.name).filter(":checked").length}return value.length},depend:function(param,element){return this.dependTypes[typeof param]?this.dependTypes[typeof param](param,element):true},dependTypes:{"boolean":function(param,element){return param},"string":function(param,element){return!!$(param,element.form).length},"function":function(param,element){return param(element)}},optional:function(element){return!$.validator.methods.required.call(this,
$.trim(element.value),element)&&"dependency-mismatch"},startRequest:function(element){if(!this.pending[element.name]){this.pendingRequest++;this.pending[element.name]=true}},stopRequest:function(element,valid){this.pendingRequest--;if(this.pendingRequest<0)this.pendingRequest=0;delete this.pending[element.name];if(valid&&this.pendingRequest==0&&this.formSubmitted&&this.form()){$(this.currentForm).submit();this.formSubmitted=false}else if(!valid&&this.pendingRequest==0&&this.formSubmitted){$(this.currentForm).triggerHandler("invalid-form",
[this]);this.formSubmitted=false}},previousValue:function(element){return $.data(element,"previousValue")||$.data(element,"previousValue",{old:null,valid:true,message:this.defaultMessage(element,"remote")})}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(className,rules){className.constructor==
String?this.classRuleSettings[className]=rules:$.extend(this.classRuleSettings,className)},classRules:function(element){var rules={};var classes=$(element).attr("class");classes&&$.each(classes.split(" "),function(){if(this in $.validator.classRuleSettings)$.extend(rules,$.validator.classRuleSettings[this])});return rules},attributeRules:function(element){var rules={};var $element=$(element);for(var method in $.validator.methods){var value;if(method==="required"&&typeof $.fn.prop==="function")value=
$element.prop(method);else value=$element.attr(method);if(value)rules[method]=value;else if($element[0].getAttribute("type")===method)rules[method]=true}if(rules.maxlength&&/-1|2147483647|524288/.test(rules.maxlength))delete rules.maxlength;return rules},metadataRules:function(element){if(!$.metadata)return{};var meta=$.data(element.form,"validator").settings.meta;return meta?$(element).metadata()[meta]:$(element).metadata()},staticRules:function(element){var rules={};var validator=$.data(element.form,
"validator");if(validator.settings.rules)rules=$.validator.normalizeRule(validator.settings.rules[element.name])||{};return rules},normalizeRules:function(rules,element){$.each(rules,function(prop,val){if(val===false){delete rules[prop];return}if(val.param||val.depends){var keepRule=true;switch(typeof val.depends){case "string":keepRule=!!$(val.depends,element.form).length;break;case "function":keepRule=val.depends.call(element,element);break}if(keepRule)rules[prop]=val.param!==undefined?val.param:
true;else delete rules[prop]}});$.each(rules,function(rule,parameter){rules[rule]=$.isFunction(parameter)?parameter(element):parameter});$.each(["minlength","maxlength","min","max"],function(){if(rules[this])rules[this]=Number(rules[this])});$.each(["rangelength","range"],function(){if(rules[this])rules[this]=[Number(rules[this][0]),Number(rules[this][1])]});if($.validator.autoCreateRanges){if(rules.min&&rules.max){rules.range=[rules.min,rules.max];delete rules.min;delete rules.max}if(rules.minlength&&
rules.maxlength){rules.rangelength=[rules.minlength,rules.maxlength];delete rules.minlength;delete rules.maxlength}}if(rules.messages)delete rules.messages;return rules},normalizeRule:function(data){if(typeof data=="string"){var transformed={};$.each(data.split(/\s/),function(){transformed[this]=true});data=transformed}return data},addMethod:function(name,method,message){$.validator.methods[name]=method;$.validator.messages[name]=message!=undefined?message:$.validator.messages[name];if(method.length<
3)$.validator.addClassRules(name,$.validator.normalizeRule(name))},methods:{required:function(value,element,param){if(!this.depend(param,element))return"dependency-mismatch";switch(element.nodeName.toLowerCase()){case "select":var val=$(element).val();return val&&val.length>0;case "input":if(this.checkable(element))return this.getLength(value,element)>0;default:return $.trim(value).length>0}},remote:function(value,element,param){if(this.optional(element))return"dependency-mismatch";var previous=this.previousValue(element);
if(!this.settings.messages[element.name])this.settings.messages[element.name]={};previous.originalMessage=this.settings.messages[element.name].remote;this.settings.messages[element.name].remote=previous.message;param=typeof param=="string"&&{url:param}||param;if(this.pending[element.name])return"pending";if(previous.old===value)return previous.valid;previous.old=value;var validator=this;this.startRequest(element);var data={};data[element.name]=value;$.ajax($.extend(true,{url:param,mode:"abort",port:"validate"+
element.name,dataType:"json",data:data,success:function(response){validator.settings.messages[element.name].remote=previous.originalMessage;var valid=response===true;if(valid){var submitted=validator.formSubmitted;validator.prepareElement(element);validator.formSubmitted=submitted;validator.successList.push(element);validator.showErrors()}else{var errors={};var message=response||validator.defaultMessage(element,"remote");errors[element.name]=previous.message=$.isFunction(message)?message(value):message;
validator.showErrors(errors)}previous.valid=valid;validator.stopRequest(element,valid)}},param));return"pending"},minlength:function(value,element,param){return this.optional(element)||this.getLength($.trim(value),element)>=param},maxlength:function(value,element,param){return this.optional(element)||this.getLength($.trim(value),element)<=param},rangelength:function(value,element,param){var length=this.getLength($.trim(value),element);return this.optional(element)||length>=param[0]&&length<=param[1]},
min:function(value,element,param){return this.optional(element)||value>=param},max:function(value,element,param){return this.optional(element)||value<=param},range:function(value,element,param){return this.optional(element)||value>=param[0]&&value<=param[1]},email:function(value,element){return this.optional(element)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(value)},
url:function(value,element){return this.optional(element)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value)},
date:function(value,element){return this.optional(element)||!/Invalid|NaN/.test(new Date(value))},dateISO:function(value,element){return this.optional(element)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(value)},number:function(value,element){return this.optional(element)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(value)},digits:function(value,element){return this.optional(element)||/^\d+$/.test(value)},creditcard:function(value,element){if(this.optional(element))return"dependency-mismatch";if(/[^0-9 -]+/.test(value))return false;
var nCheck=0,nDigit=0,bEven=false;value=value.replace(/\D/g,"");for(var n=value.length-1;n>=0;n--){var cDigit=value.charAt(n);var nDigit=parseInt(cDigit,10);if(bEven)if((nDigit*=2)>9)nDigit-=9;nCheck+=nDigit;bEven=!bEven}return nCheck%10==0},accept:function(value,element,param){param=typeof param=="string"?param.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(element)||value.match(new RegExp(".("+param+")$","i"))},equalTo:function(value,element,param){var target=$(param).unbind(".validate-equalTo").bind("blur.validate-equalTo",
function(){$(element).valid()});return value==target.val()}}});$.format=$.validator.format})(jQuery);
(function($){var pendingRequests={};if($.ajaxPrefilter)$.ajaxPrefilter(function(settings,_,xhr){var port=settings.port;if(settings.mode=="abort"){if(pendingRequests[port])pendingRequests[port].abort();pendingRequests[port]=xhr}});else{var ajax=$.ajax;$.ajax=function(settings){var mode=("mode"in settings?settings:$.ajaxSettings).mode,port=("port"in settings?settings:$.ajaxSettings).port;if(mode=="abort"){if(pendingRequests[port])pendingRequests[port].abort();return pendingRequests[port]=ajax.apply(this,
arguments)}return ajax.apply(this,arguments)}}})(jQuery);
(function($){if(!jQuery.event.special.focusin&&!jQuery.event.special.focusout&&document.addEventListener)$.each({focus:"focusin",blur:"focusout"},function(original,fix){$.event.special[fix]={setup:function(){this.addEventListener(original,handler,true)},teardown:function(){this.removeEventListener(original,handler,true)},handler:function(e){arguments[0]=$.event.fix(e);arguments[0].type=fix;return $.event.handle.apply(this,arguments)}};function handler(e){e=$.event.fix(e);e.type=fix;return $.event.handle.call(this,
e)}});$.extend($.fn,{validateDelegate:function(delegate,type,handler){return this.bind(type,function(event){var target=$(event.target);if(target.is(delegate))return handler.apply(target,arguments)})}})})(jQuery);var JSON;if(!JSON)JSON={};
(function(){function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf()}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=
/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,
mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function")value=value.toJSON(key);if(typeof rep==="function")value=rep.call(holder,key,value);switch(typeof value){case "string":return quote(value);case "number":return isFinite(value)?String(value):"null";case "boolean":case "null":return String(value);case "object":if(!value)return"null";gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i<length;i+=
1)partial[i]=str(i,value)||"null";v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1)if(typeof rep[i]==="string"){k=rep[i];v=str(k,value);if(v)partial.push(quote(k)+(gap?": ":":")+v)}}else for(k in value)if(Object.prototype.hasOwnProperty.call(value,k)){v=str(k,value);if(v)partial.push(quote(k)+(gap?": ":":")+v)}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+
gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}if(typeof JSON.stringify!=="function")JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number")for(i=0;i<space;i+=1)indent+=" ";else if(typeof space==="string")indent=space;rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number"))throw new Error("JSON.stringify");return str("",{"":value})};if(typeof JSON.parse!=="function")JSON.parse=
function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object")for(k in value)if(Object.prototype.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined)value[k]=v;else delete value[k]}return reviver.call(holder,key,value)}text=String(text);cx.lastIndex=0;if(cx.test(text))text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)});if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse");}})();(function(){if(typeof this.PHP_JS==="undefined")var PHP_JS=function(cfgObj){if(!(this instanceof PHP_JS))return new PHP_JS(cfgObj);this.window=cfgObj&&cfgObj.window?cfgObj.window:window;this.php_js={};this.php_js.ini={};if(cfgObj)for(var ini in cfgObj.ini){this.php_js.ini[ini]={};this.php_js.ini[ini].local_value=cfgObj.ini[ini];this.php_js.ini[ini].global_value=cfgObj.ini[ini]}};var php_js_shared={};PHP_JS.prototype={constructor:PHP_JS,number_format:function(number,decimals,dec_point,thousands_sep){number=
(number+"").replace(/[^0-9+\-Ee.]/g,"");var n=!isFinite(+number)?0:+number,prec=!isFinite(+decimals)?0:Math.abs(decimals),sep=typeof thousands_sep==="undefined"?",":thousands_sep,dec=typeof dec_point==="undefined"?".":dec_point,s="",toFixedFix=function(n,prec){var k=Math.pow(10,prec);return""+Math.round(n*k)/k};s=(prec?toFixedFix(n,prec):""+Math.round(n)).split(".");if(s[0].length>3)s[0]=s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,sep);if((s[1]||"").length<prec){s[1]=s[1]||"";s[1]+=(new Array(prec-s[1].length+
1)).join("0")}return s.join(dec)},strip_tags:function(input,allowed){allowed=(((allowed||"")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join("");var tags=/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,commentsAndPhpTags=/<\!--[\s\S]*?--\>|<\?(?:php)?[\s\S]*?\?>/gi;return input.replace(commentsAndPhpTags,"").replace(tags,function($0,$1){return allowed.indexOf("<"+$1.toLowerCase()+">")>-1?$0:""})},stripslashes:function(str){return(str+"").replace(/\\(.?)/g,function(s,n1){switch(n1){case "\\":return"\\";case "0":return"\x00";
case "":return"";default:return n1}})},ucfirst:function(str){str+="";var f=str.charAt(0).toUpperCase();return f+str.substr(1)},ucwords:function(str){return(str+"").replace(/^([a-z])|\s+([a-z])/g,function($1){return $1.toUpperCase()})},wordwrap:function(str,int_width,str_break,cut){var m=arguments.length>=2?arguments[1]:75;var b=arguments.length>=3?arguments[2]:"\n";var c=arguments.length>=4?arguments[3]:false;var i,j,l,s,r;str+="";if(m<1)return str;for(i=-1,l=(r=str.split(/\r\n|\n|\r/)).length;++i<
l;r[i]+=s)for(s=r[i],r[i]="";s.length>m;r[i]+=s.slice(0,j)+((s=s.slice(j)).length?b:""))j=c==2||(j=s.slice(0,m+1).match(/\S*(\s)?$/))[1]?m:j.input.length-j[0].length||c==1&&m||j.input.length+(j=s.slice(m).match(/^\S*/)).input.length;return r.join("\n")}};this.PHP_JS=PHP_JS})();if(typeof DG==="undefined")DG={};
DG.apitracker={_scriptName:"apitracker.js",regBC:function(params,id){DG.apitracker.send(params,id)},send:function(url,elId){var id="bcri_"+Math.floor(Math.random()*1E10+1);var addParam=elId?', "'+elId+'"':"";var iframe='<iframe id="'+id+'" style="display: none;" onload="DG.apitracker.afterRegister('+"'"+id+"'"+addParam+')" src="'+url+'"></iframe>';var d=document.createElement("div");var b=document.body;d.innerHTML=iframe.join?iframe.join(""):iframe;b.appendChild(d.childNodes[0])},afterRegister:function(id,
elid){var el=document.getElementById(id);var sender=null;if(elid&&(sender=document.getElementById(elid)))if(!sender.tagName||sender.tagName!="A")sender=null;if(typeof el.parentNode!=="undefined"){el.onLoad=null;setTimeout(function(){el.parentNode.removeChild(el);if(sender)location.href=sender.href},10)}}};
var OpenLayers={singleFile:!0};
(function(){var a="object"==typeof OpenLayers&&OpenLayers.singleFile,b;window.OpenLayers={_scriptName:!a?"lib/OpenLayers.js":"OpenLayers.js",_getScriptLocation:function(){if(void 0!=b)return b;b="";for(var a=RegExp("(^|(.*?\\/))("+OpenLayers._scriptName+")(\\?|$)"),c=document.getElementsByTagName("script"),d=0,e=c.length;d<e;d++){var f=c[d].getAttribute("src");if(f&&(f=f.match(a))){b=f[1];break}}return b}};if(!a){var a="OpenLayers/Util.js,OpenLayers/BaseTypes.js,OpenLayers/BaseTypes/Class.js,OpenLayers/BaseTypes/Bounds.js,OpenLayers/BaseTypes/Element.js,OpenLayers/BaseTypes/LonLat.js,OpenLayers/BaseTypes/Pixel.js,OpenLayers/BaseTypes/Size.js,OpenLayers/Console.js,OpenLayers/Tween.js,Rico/Corner.js,Rico/Color.js,OpenLayers/Ajax.js,OpenLayers/Events.js,OpenLayers/Request.js,OpenLayers/Request/XMLHttpRequest.js,OpenLayers/Projection.js,OpenLayers/Map.js,OpenLayers/Layer.js,OpenLayers/Icon.js,OpenLayers/Marker.js,OpenLayers/Marker/Box.js,OpenLayers/Popup.js,OpenLayers/Tile.js,OpenLayers/Tile/Image.js,OpenLayers/Tile/Image/IFrame.js,OpenLayers/Tile/WFS.js,OpenLayers/Layer/Image.js,OpenLayers/Layer/SphericalMercator.js,OpenLayers/Layer/EventPane.js,OpenLayers/Layer/FixedZoomLevels.js,OpenLayers/Layer/Google.js,OpenLayers/Layer/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/TMS.js,OpenLayers/Layer/TileCache.js,OpenLayers/Layer/Zoomify.js,OpenLayers/Popup/Anchored.js,OpenLayers/Popup/AnchoredBubble.js,OpenLayers/Popup/Framed.js,OpenLayers/Popup/FramedCloud.js,OpenLayers/Feature.js,OpenLayers/Feature/Vector.js,OpenLayers/Feature/WFS.js,OpenLayers/Handler.js,OpenLayers/Handler/Click.js,OpenLayers/Handler/Hover.js,OpenLayers/Handler/Point.js,OpenLayers/Handler/Path.js,OpenLayers/Handler/Polygon.js,OpenLayers/Handler/Feature.js,OpenLayers/Handler/Drag.js,OpenLayers/Handler/RegularPolygon.js,OpenLayers/Handler/Box.js,OpenLayers/Handler/MouseWheel.js,OpenLayers/Handler/Keyboard.js,OpenLayers/Control.js,OpenLayers/Control/Attribution.js,OpenLayers/Control/Button.js,OpenLayers/Control/ZoomBox.js,OpenLayers/Control/ZoomToMaxExtent.js,OpenLayers/Control/DragPan.js,OpenLayers/Control/Navigation.js,OpenLayers/Control/MouseDefaults.js,OpenLayers/Control/MousePosition.js,OpenLayers/Control/OverviewMap.js,OpenLayers/Control/KeyboardDefaults.js,OpenLayers/Control/PanZoom.js,OpenLayers/Control/PanZoomBar.js,OpenLayers/Control/ArgParser.js,OpenLayers/Control/Permalink.js,OpenLayers/Control/Scale.js,OpenLayers/Control/ScaleLine.js,OpenLayers/Control/Snapping.js,OpenLayers/Control/Split.js,OpenLayers/Control/LayerSwitcher.js,OpenLayers/Control/DrawFeature.js,OpenLayers/Control/DragFeature.js,OpenLayers/Control/ModifyFeature.js,OpenLayers/Control/Panel.js,OpenLayers/Control/SelectFeature.js,OpenLayers/Control/NavigationHistory.js,OpenLayers/Control/Measure.js,OpenLayers/Control/WMSGetFeatureInfo.js,OpenLayers/Control/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/SVG.js,OpenLayers/Renderer/Canvas.js,OpenLayers/Renderer/VML.js,OpenLayers/Layer/Vector.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/Protocol.js,OpenLayers/Protocol/HTTP.js,OpenLayers/Protocol/SQL.js,OpenLayers/Protocol/SQL/Gears.js,OpenLayers/Protocol/WFS.js,OpenLayers/Protocol/WFS/v1.js,OpenLayers/Protocol/WFS/v1_0_0.js,OpenLayers/Protocol/WFS/v1_1_0.js,OpenLayers/Protocol/SOS.js,OpenLayers/Protocol/SOS/v1_0_0.js,OpenLayers/Layer/PointTrack.js,OpenLayers/Layer/GML.js,OpenLayers/Style.js,OpenLayers/Style2.js,OpenLayers/StyleMap.js,OpenLayers/Rule.js,OpenLayers/Format.js,OpenLayers/Format/XML.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/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/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/WMSCapabilities.js,OpenLayers/Format/WMSCapabilities/v1.js,OpenLayers/Format/WMSCapabilities/v1_1.js,OpenLayers/Format/WMSCapabilities/v1_1_0.js,OpenLayers/Format/WMSCapabilities/v1_1_1.js,OpenLayers/Format/WMSCapabilities/v1_3.js,OpenLayers/Format/WMSCapabilities/v1_3_0.js,OpenLayers/Format/WMSGetFeatureInfo.js,OpenLayers/Format/SOSCapabilities.js,OpenLayers/Format/SOSCapabilities/v1_0_0.js,OpenLayers/Format/SOSGetObservation.js,OpenLayers/Format/SOSGetFeatureOfInterest.js,OpenLayers/Format/OWSContext.js,OpenLayers/Format/OWSContext/v0_3_1.js,OpenLayers/Format/WMTSCapabilities.js,OpenLayers/Format/WMTSCapabilities/v1_0_0.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/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".split(","),c=
navigator.userAgent;if(c=c.match("MSIE")||c.match("Safari"))var d=Array(a.length);for(var e=OpenLayers._getScriptLocation()+"lib/",f=0,g=a.length;f<g;f++)if(c)d[f]="<script src='"+e+a[f]+"'><\/script>";else{var h=document.createElement("script");h.src=e+a[f];(document.getElementsByTagName("head").length?document.getElementsByTagName("head")[0]:document.body).appendChild(h)}c&&document.write(d.join(""))}})();OpenLayers.VERSION_NUMBER="OpenLayers 2.10 -- $Revision: 10721 $";
OpenLayers.String={startsWith:function(a,b){return 0==a.indexOf(b)},contains:function(a,b){return-1!=a.indexOf(b)},trim:function(a){return a.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},camelize:function(a){for(var a=a.split("-"),b=a[0],c=1,d=a.length;c<d;c++)var e=a[c],b=b+(e.charAt(0).toUpperCase()+e.substring(1));return b},format:function(a,b,c){b||(b=window);return a.replace(OpenLayers.String.tokenRegEx,function(a,e){for(var f,g=e.split(/\.+/),h=0;h<g.length;h++)0==h&&(f=b),f=f[g[h]];"function"==
typeof f&&(f=c?f.apply(null,c):f());return"undefined"==typeof f?"undefined":f})},tokenRegEx:/\$\{([\w.]+?)\}/g,numberRegEx:/^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/,isNumeric:function(a){return OpenLayers.String.numberRegEx.test(a)},numericIf:function(a){return OpenLayers.String.isNumeric(a)?parseFloat(a):a}};
if(!String.prototype.startsWith)String.prototype.startsWith=function(a){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.String.startsWith"}));return OpenLayers.String.startsWith(this,a)};if(!String.prototype.contains)String.prototype.contains=function(a){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.String.contains"}));return OpenLayers.String.contains(this,a)};
if(!String.prototype.trim)String.prototype.trim=function(){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.String.trim"}));return OpenLayers.String.trim(this)};if(!String.prototype.camelize)String.prototype.camelize=function(){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.String.camelize"}));return OpenLayers.String.camelize(this)};
OpenLayers.Number={decimalSeparator:".",thousandsSeparator:",",limitSigDigs:function(a,b){var c=0;0<b&&(c=parseFloat(a.toPrecision(b)));return c},format:function(a,b,c,d){b="undefined"!=typeof b?b:0;c="undefined"!=typeof c?c:OpenLayers.Number.thousandsSeparator;d="undefined"!=typeof d?d:OpenLayers.Number.decimalSeparator;null!=b&&(a=parseFloat(a.toFixed(b)));var e=a.toString().split(".");1==e.length&&null==b&&(b=0);a=e[0];if(c)for(var f=/(-?[0-9]+)([0-9]{3})/;f.test(a);)a=a.replace(f,"$1"+c+"$2");
0==b?b=a:(c=1<e.length?e[1]:"0",null!=b&&(c+=Array(b-c.length+1).join("0")),b=a+d+c);return b}};if(!Number.prototype.limitSigDigs)Number.prototype.limitSigDigs=function(a){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.Number.limitSigDigs"}));return OpenLayers.Number.limitSigDigs(this,a)};
OpenLayers.Function={bind:function(a,b){var c=Array.prototype.slice.apply(arguments,[2]);return function(){var d=c.concat(Array.prototype.slice.apply(arguments,[0]));return a.apply(b,d)}},bindAsEventListener:function(a,b){return function(c){return a.call(b,c||window.event)}},False:function(){return!1},True:function(){return!0}};
if(!Function.prototype.bind)Function.prototype.bind=function(){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.Function.bind"}));Array.prototype.unshift.apply(arguments,[this]);return OpenLayers.Function.bind.apply(null,arguments)};
if(!Function.prototype.bindAsEventListener)Function.prototype.bindAsEventListener=function(a){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.Function.bindAsEventListener"}));return OpenLayers.Function.bindAsEventListener(this,a)};OpenLayers.Array={filter:function(a,b,c){var d=[];if(Array.prototype.filter)d=a.filter(b,c);else{var e=a.length;if("function"!=typeof b)throw new TypeError;for(var f=0;f<e;f++)if(f in a){var g=a[f];b.call(c,g,f,a)&&d.push(g)}}return d}};
OpenLayers.Date={toISOString:function(){if("toISOString"in Date.prototype)return function(a){return a.toISOString()};var a=function(a,c){for(var d=a+"";d.length<c;)d="0"+d;return d};return function(b){return isNaN(b.getTime())?"Invalid Date":b.getUTCFullYear()+"-"+a(b.getUTCMonth()+1,2)+"-"+a(b.getUTCDate(),2)+"T"+a(b.getUTCHours(),2)+":"+a(b.getUTCMinutes(),2)+":"+a(b.getUTCSeconds(),2)+"."+a(b.getUTCMilliseconds(),3)+"Z"}}(),parse:function(a){var b;b=Date.parse(a);if(isNaN(b))if((a=a.match(/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{1,2}):(\d{2}):(\d{2}(?:\.\d+)?)(Z|(?:[+-]\d{1,2}(?::(\d{2}))?)))?$/))&&
(a[1]||a[7])){b=parseInt(a[1],10)||0;var c=parseInt(a[2],10)-1||0,d=parseInt(a[3],10)||1;b=new Date(Date.UTC(b,c,d));if(c=a[7]){var d=parseInt(a[4],10),e=parseInt(a[5],10),f=parseFloat(a[6]),g=f|0,f=Math.round(1E3*(f-g));b.setUTCHours(d,e,g,f);"Z"!==c&&(c=parseInt(c,10),a=parseInt(a[8])||0,b=new Date(b.getTime()+-1E3*(60*60*c+60*a)))}}else b=new Date("invalid");else b=new Date(b);return b}};
OpenLayers.Class=function(){for(var a=function(){arguments&&arguments[0]!=OpenLayers.Class.isPrototype&&this.initialize.apply(this,arguments)},b={},c,d,e=0,f=arguments.length;e<f;++e){d=arguments[e];if("function"==typeof d){if(0==e&&1<f)c=d.prototype.initialize,d.prototype.initialize=function(){},b=new d,void 0===c?delete d.prototype.initialize:d.prototype.initialize=c;c=d.prototype}else c=d;OpenLayers.Util.extend(b,c)}a.prototype=b;return a};OpenLayers.Class.isPrototype=function(){};
OpenLayers.Class.create=function(){return function(){arguments&&arguments[0]!=OpenLayers.Class.isPrototype&&this.initialize.apply(this,arguments)}};OpenLayers.Class.inherit=function(){for(var a=new arguments[0](OpenLayers.Class.isPrototype),b=1,c=arguments.length;b<c;b++)"function"==typeof arguments[b]&&(arguments[b]=new arguments[b](OpenLayers.Class.isPrototype)),OpenLayers.Util.extend(a,arguments[b]);return a};OpenLayers.Util={};
OpenLayers.Util.getElement=function(){for(var a=[],b=0,c=arguments.length;b<c;b++){var d=arguments[b];"string"==typeof d&&(d=document.getElementById(d));if(1==arguments.length)return d;a.push(d)}return a};OpenLayers.Util.isElement=function(a){return!!(a&&1===a.nodeType)};if("undefined"===typeof window.$)window.$=OpenLayers.Util.getElement;
OpenLayers.Util.extend=function(a,b){a=a||{};if(b){for(var c in b){var d=b[c];void 0!==d&&(a[c]=d)}if(!("function"==typeof window.Event&&b instanceof window.Event)&&b.hasOwnProperty&&b.hasOwnProperty("toString"))a.toString=b.toString}return a};OpenLayers.Util.removeItem=function(a,b){for(var c=a.length-1;0<=c;c--)a[c]==b&&a.splice(c,1);return a};OpenLayers.Util.clearArray=function(a){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"array = []"}));a.length=0};
OpenLayers.Util.indexOf=function(a,b){if("function"==typeof a.indexOf)return a.indexOf(b);for(var c=0,d=a.length;c<d;c++)if(a[c]==b)return c;return-1};
OpenLayers.Util.modifyDOMElement=function(a,b,c,d,e,f,g,h){if(b)a.id=b;if(c)a.style.left=c.x+"px",a.style.top=c.y+"px";if(d)a.style.width=d.w+"px",a.style.height=d.h+"px";if(e)a.style.position=e;if(f)a.style.border=f;if(g)a.style.overflow=g;if(0<=parseFloat(h)&&1>parseFloat(h))a.style.filter="alpha(opacity="+100*h+")",a.style.opacity=h;else if(1==parseFloat(h))a.style.filter="",a.style.opacity=""};
OpenLayers.Util.createDiv=function(a,b,c,d,e,f,g,h){var j=document.createElement("div");if(d)j.style.backgroundImage="url("+d+")";a||(a=OpenLayers.Util.createUniqueID("OpenLayersDiv"));e||(e="absolute");OpenLayers.Util.modifyDOMElement(j,a,b,c,e,f,g,h);return j};
OpenLayers.Util.createImage=function(a,b,c,d,e,f,g,h){var j=document.createElement("img");a||(a=OpenLayers.Util.createUniqueID("OpenLayersDiv"));e||(e="relative");OpenLayers.Util.modifyDOMElement(j,a,b,c,e,f,null,g);if(h)j.style.display="none",OpenLayers.Event.observe(j,"load",OpenLayers.Function.bind(OpenLayers.Util.onImageLoad,j)),OpenLayers.Event.observe(j,"error",OpenLayers.Function.bind(OpenLayers.Util.onImageLoadError,j));j.style.alt=a;j.galleryImg="no";if(d)j.src=d;return j};
OpenLayers.Util.setOpacity=function(a,b){OpenLayers.Util.modifyDOMElement(a,null,null,null,null,null,null,b)};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 a=this.urls;if(a&&a instanceof Array&&1<a.length){var b=this.src.toString(),c,d;for(d=0;(c=a[d])&&!(-1!=b.indexOf(c));d++);var e=Math.floor(a.length*Math.random()),e=a[e];for(d=0;e==c&&4>d++;)e=Math.floor(a.length*Math.random()),e=a[e];this.src=b.replace(c,e)}else this.src=this.src}else OpenLayers.Element.addClass(this,"olImageLoadError");this.style.display=
""};OpenLayers.Util.alphaHackNeeded=null;OpenLayers.Util.alphaHack=function(){if(null==OpenLayers.Util.alphaHackNeeded){var a=navigator.appVersion.split("MSIE"),a=parseFloat(a[1]),b=!1;try{b=!!document.body.filters}catch(c){}OpenLayers.Util.alphaHackNeeded=b&&5.5<=a&&7>a}return OpenLayers.Util.alphaHackNeeded};
OpenLayers.Util.modifyAlphaImageDiv=function(a,b,c,d,e,f,g,h,j){OpenLayers.Util.modifyDOMElement(a,b,c,d,f,null,null,j);b=a.childNodes[0];if(e)b.src=e;OpenLayers.Util.modifyDOMElement(b,a.id+"_innerImage",null,d,"relative",g);if(OpenLayers.Util.alphaHack()){if("none"!=a.style.display)a.style.display="inline-block";null==h&&(h="scale");a.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+b.src+"', sizingMethod='"+h+"')";0<=parseFloat(a.style.opacity)&&1>parseFloat(a.style.opacity)&&
(a.style.filter+=" alpha(opacity="+100*a.style.opacity+")");b.style.filter="alpha(opacity=0)"}};
OpenLayers.Util.createAlphaImageDiv=function(a,b,c,d,e,f,g,h,j){var k=OpenLayers.Util.createDiv(),l=OpenLayers.Util.createImage(null,null,null,null,null,null,null,!1);k.appendChild(l);if(j)l.style.display="none",OpenLayers.Event.observe(l,"load",OpenLayers.Function.bind(OpenLayers.Util.onImageLoad,k)),OpenLayers.Event.observe(l,"error",OpenLayers.Function.bind(OpenLayers.Util.onImageLoadError,k));OpenLayers.Util.modifyAlphaImageDiv(k,a,b,c,d,e,f,g,h);return k};
OpenLayers.Util.upperCaseObject=function(a){var b={},c;for(c in a)b[c.toUpperCase()]=a[c];return b};OpenLayers.Util.applyDefaults=function(a,b){var a=a||{},c="function"==typeof window.Event&&b instanceof window.Event,d;for(d in b)if(void 0===a[d]||!c&&b.hasOwnProperty&&b.hasOwnProperty(d)&&!a.hasOwnProperty(d))a[d]=b[d];if(!c&&b&&b.hasOwnProperty&&b.hasOwnProperty("toString")&&!a.hasOwnProperty("toString"))a.toString=b.toString;return a};
OpenLayers.Util.getParameterString=function(a){var b=[],c;for(c in a){var d=a[c];if(null!=d&&"function"!=typeof d){if("object"==typeof d&&d.constructor==Array){for(var e=[],f,g=0,h=d.length;g<h;g++)f=d[g],e.push(encodeURIComponent(null===f||void 0===f?"":f));d=e.join(",")}else d=encodeURIComponent(d);b.push(encodeURIComponent(c)+"="+d)}}return b.join("&")};OpenLayers.Util.urlAppend=function(a,b){var c=a;if(b)var d=(a+" ").split(/[?&]/),c=c+(" "===d.pop()?b:d.length?"&"+b:"?"+b);return c};
OpenLayers.ImgPath="";OpenLayers.Util.getImagesLocation=function(){return OpenLayers.ImgPath||OpenLayers._getScriptLocation()+"img/"};OpenLayers.Util.Try=function(){for(var a=null,b=0,c=arguments.length;b<c;b++){var d=arguments[b];try{a=d();break}catch(e){}}return a};OpenLayers.Util.getNodes=function(a,b){return OpenLayers.Util.Try(function(){return OpenLayers.Util._getNodes(a.documentElement.childNodes,b)},function(){return OpenLayers.Util._getNodes(a.childNodes,b)})};
OpenLayers.Util._getNodes=function(a,b){for(var c=[],d=0,e=a.length;d<e;d++)a[d].nodeName==b&&c.push(a[d]);return c};OpenLayers.Util.getTagText=function(a,b,c){if((a=OpenLayers.Util.getNodes(a,b))&&0<a.length){c||(c=0);if(1<a[c].childNodes.length)return a.childNodes[1].nodeValue;if(1==a[c].childNodes.length)return a[c].firstChild.nodeValue}else return""};
OpenLayers.Util.getXmlNodeValue=function(a){var b=null;OpenLayers.Util.Try(function(){b=a.text;if(!b)b=a.textContent;if(!b)b=a.firstChild.nodeValue},function(){b=a.textContent});return b};OpenLayers.Util.mouseLeft=function(a,b){for(var c=a.relatedTarget?a.relatedTarget:a.toElement;c!=b&&null!=c;)c=c.parentNode;return c!=b};OpenLayers.Util.DEFAULT_PRECISION=14;OpenLayers.Util.toFloat=function(a,b){if(null==b)b=OpenLayers.Util.DEFAULT_PRECISION;return a=0==b?parseFloat(a):parseFloat(parseFloat(a).toPrecision(b))};
OpenLayers.Util.rad=function(a){return a*Math.PI/180};OpenLayers.Util.deg=function(a){return 180*a/Math.PI};OpenLayers.Util.VincentyConstants={a:6378137,b:6356752.3142,f:1/298.257223563};
OpenLayers.Util.distVincenty=function(a,b){for(var c=OpenLayers.Util.VincentyConstants,d=c.a,e=c.b,c=c.f,f=OpenLayers.Util.rad(b.lon-a.lon),g=Math.atan((1-c)*Math.tan(OpenLayers.Util.rad(a.lat))),h=Math.atan((1-c)*Math.tan(OpenLayers.Util.rad(b.lat))),j=Math.sin(g),g=Math.cos(g),k=Math.sin(h),h=Math.cos(h),l=f,m=2*Math.PI,o=20;1.0E-12<Math.abs(l-m)&&0<--o;){var n=Math.sin(l),p=Math.cos(l),r=Math.sqrt(h*n*h*n+(g*k-j*h*p)*(g*k-j*h*p));if(0==r)return 0;var p=j*k+g*h*p,s=Math.atan2(r,p),q=Math.asin(g*
h*n/r),t=Math.cos(q)*Math.cos(q),n=p-2*j*k/t,u=c/16*t*(4+c*(4-3*t)),m=l,l=f+(1-u)*c*Math.sin(q)*(s+u*r*(n+u*p*(-1+2*n*n)))}if(0==o)return NaN;d=t*(d*d-e*e)/(e*e);c=d/1024*(256+d*(-128+d*(74-47*d)));return(e*(1+d/16384*(4096+d*(-768+d*(320-175*d))))*(s-c*r*(n+c/4*(p*(-1+2*n*n)-c/6*n*(-3+4*r*r)*(-3+4*n*n))))).toFixed(3)/1E3};
OpenLayers.Util.destinationVincenty=function(a,b,c){for(var d=OpenLayers.Util,e=d.VincentyConstants,f=e.a,g=e.b,h=e.f,e=a.lon,a=a.lat,j=d.rad(b),b=Math.sin(j),j=Math.cos(j),a=(1-h)*Math.tan(d.rad(a)),k=1/Math.sqrt(1+a*a),l=a*k,m=Math.atan2(a,j),a=k*b,o=1-a*a,f=o*(f*f-g*g)/(g*g),n=1+f/16384*(4096+f*(-768+f*(320-175*f))),p=f/1024*(256+f*(-128+f*(74-47*f))),f=c/(g*n),r=2*Math.PI;1.0E-12<Math.abs(f-r);)var s=Math.cos(2*m+f),q=Math.sin(f),t=Math.cos(f),u=p*q*(s+p/4*(t*(-1+2*s*s)-p/6*s*(-3+4*q*q)*(-3+4*
s*s))),r=f,f=c/(g*n)+u;c=l*q-k*t*j;g=Math.atan2(l*t+k*q*j,(1-h)*Math.sqrt(a*a+c*c));b=Math.atan2(q*b,k*t-l*q*j);j=h/16*o*(4+h*(4-3*o));s=b-(1-j)*h*a*(f+j*q*(s+j*t*(-1+2*s*s)));Math.atan2(a,-c);return new OpenLayers.LonLat(e+d.deg(s),d.deg(g))};
OpenLayers.Util.getParameters=function(a){var a=a||window.location.href,b="";if(OpenLayers.String.contains(a,"?"))var b=a.indexOf("?")+1,c=OpenLayers.String.contains(a,"#")?a.indexOf("#"):a.length,b=a.substring(b,c);for(var a={},b=b.split(/[&;]/),c=0,d=b.length;c<d;++c){var e=b[c].split("=");if(e[0]){var f=decodeURIComponent(e[0]),e=e[1]||"",e=decodeURIComponent(e.replace(/\+/g," ")).split(",");1==e.length&&(e=e[0]);a[f]=e}}return a};
OpenLayers.Util.getArgs=function(a){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"OpenLayers.Util.getParameters"}));return OpenLayers.Util.getParameters(a)};OpenLayers.Util.lastSeqID=0;OpenLayers.Util.createUniqueID=function(a){null==a&&(a="id_");OpenLayers.Util.lastSeqID+=1;return a+OpenLayers.Util.lastSeqID};OpenLayers.INCHES_PER_UNIT={inches:1,ft:12,mi:63360,m:39.3701,km:39370.1,dd:4374754,yd:36};OpenLayers.INCHES_PER_UNIT["in"]=OpenLayers.INCHES_PER_UNIT.inches;
OpenLayers.INCHES_PER_UNIT.degrees=OpenLayers.INCHES_PER_UNIT.dd;OpenLayers.INCHES_PER_UNIT.nmi=1852*OpenLayers.INCHES_PER_UNIT.m;OpenLayers.METERS_PER_INCH=0.0254000508001016;
OpenLayers.Util.extend(OpenLayers.INCHES_PER_UNIT,{Inch:OpenLayers.INCHES_PER_UNIT.inches,Meter:1/OpenLayers.METERS_PER_INCH,Foot:0.3048006096012192/OpenLayers.METERS_PER_INCH,IFoot:0.3048/OpenLayers.METERS_PER_INCH,ClarkeFoot:0.3047972651151/OpenLayers.METERS_PER_INCH,SearsFoot:0.30479947153867626/OpenLayers.METERS_PER_INCH,GoldCoastFoot:0.3047997101815088/OpenLayers.METERS_PER_INCH,IInch:0.0254/OpenLayers.METERS_PER_INCH,MicroInch:2.54E-5/OpenLayers.METERS_PER_INCH,Mil:2.54E-8/OpenLayers.METERS_PER_INCH,
Centimeter:0.01/OpenLayers.METERS_PER_INCH,Kilometer:1E3/OpenLayers.METERS_PER_INCH,Yard:0.9144018288036576/OpenLayers.METERS_PER_INCH,SearsYard:0.914398414616029/OpenLayers.METERS_PER_INCH,IndianYard:0.9143985307444408/OpenLayers.METERS_PER_INCH,IndianYd37:0.91439523/OpenLayers.METERS_PER_INCH,IndianYd62:0.9143988/OpenLayers.METERS_PER_INCH,IndianYd75:0.9143985/OpenLayers.METERS_PER_INCH,IndianFoot:0.30479951/OpenLayers.METERS_PER_INCH,IndianFt37:0.30479841/OpenLayers.METERS_PER_INCH,IndianFt62:0.3047996/
OpenLayers.METERS_PER_INCH,IndianFt75:0.3047995/OpenLayers.METERS_PER_INCH,Mile:1609.3472186944373/OpenLayers.METERS_PER_INCH,IYard:0.9144/OpenLayers.METERS_PER_INCH,IMile:1609.344/OpenLayers.METERS_PER_INCH,NautM:1852/OpenLayers.METERS_PER_INCH,"Lat-66":110943.31648893273/OpenLayers.METERS_PER_INCH,"Lat-83":110946.25736872235/OpenLayers.METERS_PER_INCH,Decimeter:0.1/OpenLayers.METERS_PER_INCH,Millimeter:0.0010/OpenLayers.METERS_PER_INCH,Dekameter:10/OpenLayers.METERS_PER_INCH,Decameter:10/OpenLayers.METERS_PER_INCH,
Hectometer:100/OpenLayers.METERS_PER_INCH,GermanMeter:1.0000135965/OpenLayers.METERS_PER_INCH,CaGrid:0.999738/OpenLayers.METERS_PER_INCH,ClarkeChain:20.1166194976/OpenLayers.METERS_PER_INCH,GunterChain:20.11684023368047/OpenLayers.METERS_PER_INCH,BenoitChain:20.116782494375872/OpenLayers.METERS_PER_INCH,SearsChain:20.11676512155/OpenLayers.METERS_PER_INCH,ClarkeLink:0.201166194976/OpenLayers.METERS_PER_INCH,GunterLink:0.2011684023368047/OpenLayers.METERS_PER_INCH,BenoitLink:0.20116782494375873/OpenLayers.METERS_PER_INCH,
SearsLink:0.2011676512155/OpenLayers.METERS_PER_INCH,Rod:5.02921005842012/OpenLayers.METERS_PER_INCH,IntnlChain:20.1168/OpenLayers.METERS_PER_INCH,IntnlLink:0.201168/OpenLayers.METERS_PER_INCH,Perch:5.02921005842012/OpenLayers.METERS_PER_INCH,Pole:5.02921005842012/OpenLayers.METERS_PER_INCH,Furlong:201.1684023368046/OpenLayers.METERS_PER_INCH,Rood:3.778266898/OpenLayers.METERS_PER_INCH,CapeFoot:0.3047972615/OpenLayers.METERS_PER_INCH,Brealey:375/OpenLayers.METERS_PER_INCH,ModAmFt:0.304812252984506/
OpenLayers.METERS_PER_INCH,Fathom:1.8288/OpenLayers.METERS_PER_INCH,"NautM-UK":1853.184/OpenLayers.METERS_PER_INCH,"50kilometers":5E4/OpenLayers.METERS_PER_INCH,"150kilometers":15E4/OpenLayers.METERS_PER_INCH});
OpenLayers.Util.extend(OpenLayers.INCHES_PER_UNIT,{mm:OpenLayers.INCHES_PER_UNIT.Meter/1E3,cm:OpenLayers.INCHES_PER_UNIT.Meter/100,dm:100*OpenLayers.INCHES_PER_UNIT.Meter,km:1E3*OpenLayers.INCHES_PER_UNIT.Meter,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(a){return 1<a?1/a:a};OpenLayers.Util.getResolutionFromScale=function(a,b){var c;a&&(null==b&&(b="degrees"),c=1/(OpenLayers.Util.normalizeScale(a)*OpenLayers.INCHES_PER_UNIT[b]*OpenLayers.DOTS_PER_INCH));return c};
OpenLayers.Util.getScaleFromResolution=function(a,b){null==b&&(b="degrees");return a*OpenLayers.INCHES_PER_UNIT[b]*OpenLayers.DOTS_PER_INCH};OpenLayers.Util.safeStopPropagation=function(a){OpenLayers.Event.stop(a,!0)};
OpenLayers.Util.pagePosition=function(a){for(var b=0,c=0,d=a,e=a;d&&!(d==document.body&&"absolute"==OpenLayers.Element.getStyle(e,"position"));){b+=d.offsetTop||0;c+=d.offsetLeft||0;e=d;try{d=d.offsetParent}catch(f){OpenLayers.Console.error(OpenLayers.i18n("pagePositionFailed",{elemId:d.id}));break}}for(d=a;d;)b-=d.scrollTop||0,c-=d.scrollLeft||0,d=d.parentNode;return[c,b]};
OpenLayers.Util.isEquivalentUrl=function(a,b,c){c=c||{};OpenLayers.Util.applyDefaults(c,{ignoreCase:!0,ignorePort80:!0,ignoreHash:!0});var a=OpenLayers.Util.createUrlObject(a,c),b=OpenLayers.Util.createUrlObject(b,c),d;for(d in a)if("args"!==d&&a[d]!=b[d])return!1;for(d in a.args){if(a.args[d]!=b.args[d])return!1;delete b.args[d]}for(d in b.args)return!1;return!0};
OpenLayers.Util.createUrlObject=function(a,b){b=b||{};if(!/^\w+:\/\//.test(a)){var c=window.location,d=c.port?":"+c.port:"",d=c.protocol+"//"+c.host.split(":").shift()+d;0===a.indexOf("/")?a=d+a:(c=c.pathname.split("/"),c.pop(),a=d+c.join("/")+"/"+a)}b.ignoreCase&&(a=a.toLowerCase());c=document.createElement("a");c.href=a;d={};d.host=c.host.split(":").shift();d.protocol=c.protocol;d.port=b.ignorePort80?"80"==c.port||"0"==c.port?"":c.port:""==c.port||"0"==c.port?"80":c.port;d.hash=b.ignoreHash||"#"===
c.hash?"":c.hash;var e=c.search;e||(e=a.indexOf("?"),e=-1!=e?a.substr(e):"");d.args=OpenLayers.Util.getParameters(e);d.pathname="/"==c.pathname.charAt(0)?c.pathname:"/"+c.pathname;return d};OpenLayers.Util.removeTail=function(a){var b=null,b=a.indexOf("?"),c=a.indexOf("#");return b=-1==b?-1!=c?a.substr(0,c):a:-1!=c?a.substr(0,Math.min(b,c)):a.substr(0,b)};
OpenLayers.Util.getBrowserName=function(){var a="",b=navigator.userAgent.toLowerCase();-1!=b.indexOf("opera")?a="opera":-1!=b.indexOf("msie")?a="msie":-1!=b.indexOf("safari")?a="safari":-1!=b.indexOf("mozilla")&&(a=-1!=b.indexOf("firefox")?"firefox":"mozilla");return a};
OpenLayers.Util.getRenderedDimensions=function(a,b,c){var d,e,f=document.createElement("div");f.style.visibility="hidden";var g=c&&c.containerElement?c.containerElement:document.body;if(b)if(b.w)d=b.w,f.style.width=d+"px";else if(b.h)e=b.h,f.style.height=e+"px";if(c&&c.displayClass)f.className=c.displayClass;b=document.createElement("div");b.innerHTML=a;b.style.overflow="visible";if(b.childNodes){a=0;for(c=b.childNodes.length;a<c;a++)if(b.childNodes[a].style)b.childNodes[a].style.overflow="visible"}f.appendChild(b);
g.appendChild(f);a=!1;for(c=f.parentNode;c&&"body"!=c.tagName.toLowerCase();){var h=OpenLayers.Element.getStyle(c,"position");if("absolute"==h){a=!0;break}else if(h&&"static"!=h)break;c=c.parentNode}if(!a)f.style.position="absolute";if(!d)d=parseInt(b.scrollWidth),f.style.width=d+"px";e||(e=parseInt(b.scrollHeight));f.removeChild(b);g.removeChild(f);return new OpenLayers.Size(d,e)};
OpenLayers.Util.getScrollbarWidth=function(){var a=OpenLayers.Util._scrollbarWidth;if(null==a){var b=null,c=null,b=a=0,b=document.createElement("div");b.style.position="absolute";b.style.top="-1000px";b.style.left="-1000px";b.style.width="100px";b.style.height="50px";b.style.overflow="hidden";c=document.createElement("div");c.style.width="100%";c.style.height="200px";b.appendChild(c);document.body.appendChild(b);a=c.offsetWidth;b.style.overflow="scroll";b=c.offsetWidth;document.body.removeChild(document.body.lastChild);
OpenLayers.Util._scrollbarWidth=a-b;a=OpenLayers.Util._scrollbarWidth}return a};OpenLayers.Util.getFormattedLonLat=function(a,b,c){c||(c="dms");var d=Math.abs(a),e=Math.floor(d),f=d=(d-e)/(1/60),d=Math.floor(d),f=Math.round(10*((f-d)/(1/60))),f=f/10;10>e&&(e="0"+e);e+="\u00b0";0<=c.indexOf("dm")&&(10>d&&(d="0"+d),e+=d+"'",0<=c.indexOf("dms")&&(10>f&&(f="0"+f),e+=f+'"'));return e="lon"==b?e+(0>a?OpenLayers.i18n("W"):OpenLayers.i18n("E")):e+(0>a?OpenLayers.i18n("S"):OpenLayers.i18n("N"))};
OpenLayers.Rico={};
OpenLayers.Rico.Corner={round:function(a,b){a=OpenLayers.Util.getElement(a);this._setOptions(b);var c=this.options.color;"fromElement"==this.options.color&&(c=this._background(a));var d=this.options.bgColor;"fromParent"==this.options.bgColor&&(d=this._background(a.offsetParent));this._roundCornersImpl(a,c,d)},changeColor:function(a,b){a.style.backgroundColor=b;for(var c=a.parentNode.getElementsByTagName("span"),d=0;d<c.length;d++)c[d].style.backgroundColor=b},changeOpacity:function(a,b){var c="alpha(opacity="+
100*b+")";a.style.opacity=b;a.style.filter=c;for(var d=a.parentNode.getElementsByTagName("span"),e=0;e<d.length;e++)d[e].style.opacity=b,d[e].style.filter=c},reRound:function(a,b){var c=a.parentNode.childNodes[2];a.parentNode.removeChild(a.parentNode.childNodes[0]);a.parentNode.removeChild(c);this.round(a.parentNode,b)},_roundCornersImpl:function(a,b,c){this.options.border&&this._renderBorder(a,c);this._isTopRounded()&&this._roundTopCorners(a,b,c);this._isBottomRounded()&&this._roundBottomCorners(a,
b,c)},_renderBorder:function(a,b){var c="1px solid "+this._borderColor(b);a.innerHTML="<div "+("style='border-left: "+c+";"+("border-right: "+c)+"'")+">"+a.innerHTML+"</div>"},_roundTopCorners:function(a,b,c){for(var d=this._createCorner(c),e=0;e<this.options.numSlices;e++)d.appendChild(this._createCornerSlice(b,c,e,"top"));a.style.paddingTop=0;a.insertBefore(d,a.firstChild)},_roundBottomCorners:function(a,b,c){for(var d=this._createCorner(c),e=this.options.numSlices-1;0<=e;e--)d.appendChild(this._createCornerSlice(b,
c,e,"bottom"));a.style.paddingBottom=0;a.appendChild(d)},_createCorner:function(a){var b=document.createElement("div");b.style.backgroundColor=this._isTransparent()?"transparent":a;return b},_createCornerSlice:function(a,b,c,d){var e=document.createElement("span"),f=e.style;f.backgroundColor=a;f.display="block";f.height="1px";f.overflow="hidden";f.fontSize="1px";a=this._borderColor(a,b);if(this.options.border&&0==c)f.borderTopStyle="solid",f.borderTopWidth="1px",f.borderLeftWidth="0px",f.borderRightWidth=
"0px",f.borderBottomWidth="0px",f.height="0px",f.borderColor=a;else if(a)f.borderColor=a,f.borderStyle="solid",f.borderWidth="0px 1px";if(!this.options.compact&&c==this.options.numSlices-1)f.height="2px";this._setMargin(e,c,d);this._setBorder(e,c,d);return e},_setOptions:function(a){this.options={corners:"all",color:"fromElement",bgColor:"fromParent",blend:!0,border:!1,compact:!1};OpenLayers.Util.extend(this.options,a||{});this.options.numSlices=this.options.compact?2:4;if(this._isTransparent())this.options.blend=
!1},_whichSideTop:function(){return this._hasString(this.options.corners,"all","top")||0<=this.options.corners.indexOf("tl")&&0<=this.options.corners.indexOf("tr")?"":0<=this.options.corners.indexOf("tl")?"left":0<=this.options.corners.indexOf("tr")?"right":""},_whichSideBottom:function(){return this._hasString(this.options.corners,"all","bottom")||0<=this.options.corners.indexOf("bl")&&0<=this.options.corners.indexOf("br")?"":0<=this.options.corners.indexOf("bl")?"left":0<=this.options.corners.indexOf("br")?
"right":""},_borderColor:function(a,b){return"transparent"==a?b:this.options.border?this.options.border:this.options.blend?this._blend(b,a):""},_setMargin:function(a,b,c){b=this._marginSize(b);c="top"==c?this._whichSideTop():this._whichSideBottom();"left"==c?(a.style.marginLeft=b+"px",a.style.marginRight="0px"):"right"==c?(a.style.marginRight=b+"px",a.style.marginLeft="0px"):(a.style.marginLeft=b+"px",a.style.marginRight=b+"px")},_setBorder:function(a,b,c){b=this._borderSize(b);c="top"==c?this._whichSideTop():
this._whichSideBottom();"left"==c?(a.style.borderLeftWidth=b+"px",a.style.borderRightWidth="0px"):"right"==c?(a.style.borderRightWidth=b+"px",a.style.borderLeftWidth="0px"):(a.style.borderLeftWidth=b+"px",a.style.borderRightWidth=b+"px");if(!1!=this.options.border)a.style.borderLeftWidth=b+"px",a.style.borderRightWidth=b+"px"},_marginSize:function(a){if(this._isTransparent())return 0;var b=[5,3,2,1],c=[3,2,1,0],d=[2,1],e=[1,0];return this.options.compact&&this.options.blend?e[a]:this.options.compact?
d[a]:this.options.blend?c[a]:b[a]},_borderSize:function(a){var b=[5,3,2,1],c=[2,1,1,1],d=[1,0],e=[0,2,0,0];return this.options.compact&&(this.options.blend||this._isTransparent())?1:this.options.compact?d[a]:this.options.blend?c[a]:this.options.border?e[a]:this._isTransparent()?b[a]:0},_hasString:function(a){for(var b=1;b<arguments.length;b++)if(0<=a.indexOf(arguments[b]))return!0;return!1},_blend:function(a,b){var c=OpenLayers.Rico.Color.createFromHex(a);c.blend(OpenLayers.Rico.Color.createFromHex(b));
return c},_background:function(a){try{return OpenLayers.Rico.Color.createColorFromBackground(a).asHex()}catch(b){return"#ffffff"}},_isTransparent:function(){return"transparent"==this.options.color},_isTopRounded:function(){return this._hasString(this.options.corners,"all","top","tl","tr")},_isBottomRounded:function(){return this._hasString(this.options.corners,"all","bottom","bl","br")},_hasSingleTextChild:function(a){return 1==a.childNodes.length&&3==a.childNodes[0].nodeType}};
(function(){if(!window.google||!google.gears){var a=null;if("undefined"!=typeof GearsFactory)a=new GearsFactory;else try{a=new ActiveXObject("Gears.Factory"),-1!=a.getBuildInfo().indexOf("ie_mobile")&&a.privateSetGlobalObject(this)}catch(b){if("undefined"!=typeof navigator.mimeTypes&&navigator.mimeTypes["application/x-googlegears"])a=document.createElement("object"),a.style.display="none",a.width=0,a.height=0,a.type="application/x-googlegears",document.documentElement.appendChild(a)}if(a&&(window.google||
(google={}),!google.gears))google.gears={factory:a}}})();
OpenLayers.Element={visible:function(a){return"none"!=OpenLayers.Util.getElement(a).style.display},toggle:function(){for(var a=0,b=arguments.length;a<b;a++){var c=OpenLayers.Util.getElement(arguments[a]),d=OpenLayers.Element.visible(c)?"hide":"show";OpenLayers.Element[d](c)}},hide:function(){for(var a=0,b=arguments.length;a<b;a++){var c=OpenLayers.Util.getElement(arguments[a]);if(c)c.style.display="none"}},show:function(){for(var a=0,b=arguments.length;a<b;a++){var c=OpenLayers.Util.getElement(arguments[a]);
if(c)c.style.display=""}},remove:function(a){a=OpenLayers.Util.getElement(a);a.parentNode.removeChild(a)},getHeight:function(a){a=OpenLayers.Util.getElement(a);return a.offsetHeight},getDimensions:function(a){a=OpenLayers.Util.getElement(a);if("none"!=OpenLayers.Element.getStyle(a,"display"))return{width:a.offsetWidth,height:a.offsetHeight};var b=a.style,c=b.visibility,d=b.position,e=b.display;b.visibility="hidden";b.position="absolute";b.display="";var f=a.clientWidth,a=a.clientHeight;b.display=
e;b.position=d;b.visibility=c;return{width:f,height:a}},hasClass:function(a,b){var c=a.className;return!!c&&RegExp("(^|\\s)"+b+"(\\s|$)").test(c)},addClass:function(a,b){OpenLayers.Element.hasClass(a,b)||(a.className+=(a.className?" ":"")+b);return a},removeClass:function(a,b){var c=a.className;if(c)a.className=OpenLayers.String.trim(c.replace(RegExp("(^|\\s+)"+b+"(\\s+|$)")," "));return a},toggleClass:function(a,b){OpenLayers.Element.hasClass(a,b)?OpenLayers.Element.removeClass(a,b):OpenLayers.Element.addClass(a,
b);return a},getStyle:function(a,b){var a=OpenLayers.Util.getElement(a),c=null;if(a&&a.style){c=a.style[OpenLayers.String.camelize(b)];c||(document.defaultView&&document.defaultView.getComputedStyle?c=(c=document.defaultView.getComputedStyle(a,null))?c.getPropertyValue(b):null:a.currentStyle&&(c=a.currentStyle[OpenLayers.String.camelize(b)]));var d=["left","top","right","bottom"];window.opera&&-1!=OpenLayers.Util.indexOf(d,b)&&"static"==OpenLayers.Element.getStyle(a,"position")&&(c="auto")}return"auto"==
c?null:c}};OpenLayers.Size=OpenLayers.Class({w:0,h:0,initialize:function(a,b){this.w=parseFloat(a);this.h=parseFloat(b)},toString:function(){return"w="+this.w+",h="+this.h},clone:function(){return new OpenLayers.Size(this.w,this.h)},equals:function(a){var b=!1;null!=a&&(b=this.w==a.w&&this.h==a.h||isNaN(this.w)&&isNaN(this.h)&&isNaN(a.w)&&isNaN(a.h));return b},CLASS_NAME:"OpenLayers.Size"});
OpenLayers.Console={log:function(){},debug:function(){},info:function(){},warn:function(){},error:function(){},userError:function(a){alert(a)},assert:function(){},dir:function(){},dirxml:function(){},trace:function(){},group:function(){},groupEnd:function(){},time:function(){},timeEnd:function(){},profile:function(){},profileEnd:function(){},count:function(){},CLASS_NAME:"OpenLayers.Console"};
(function(){for(var a=document.getElementsByTagName("script"),b=0,c=a.length;b<c;++b)if(-1!=a[b].src.indexOf("firebug.js")&&console){OpenLayers.Util.extend(OpenLayers.Console,console);break}})();
OpenLayers.Icon=OpenLayers.Class({url:null,size:null,offset:null,calculateOffset:null,imageDiv:null,px:null,initialize:function(a,b,c,d){this.url=a;this.size=b?b:new OpenLayers.Size(20,20);this.offset=c?c:new OpenLayers.Pixel(-(this.size.w/2),-(this.size.h/2));this.calculateOffset=d;a=OpenLayers.Util.createUniqueID("OL_Icon_");this.imageDiv=OpenLayers.Util.createAlphaImageDiv(a)},destroy:function(){this.erase();OpenLayers.Event.stopObservingElement(this.imageDiv.firstChild);this.imageDiv.innerHTML=
"";this.imageDiv=null},clone:function(){return new OpenLayers.Icon(this.url,this.size,this.offset,this.calculateOffset)},setSize:function(a){if(null!=a)this.size=a;this.draw()},setUrl:function(a){if(null!=a)this.url=a;this.draw()},draw:function(a){OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv,null,null,this.size,this.url,"absolute");this.moveTo(a);return this.imageDiv},erase:function(){null!=this.imageDiv&&null!=this.imageDiv.parentNode&&OpenLayers.Element.remove(this.imageDiv)},setOpacity:function(a){OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv,
null,null,null,null,null,null,null,a)},moveTo:function(a){if(null!=a)this.px=a;if(null!=this.imageDiv)if(null==this.px)this.display(!1);else{if(this.calculateOffset)this.offset=this.calculateOffset(this.size);a=this.px.offset(this.offset);OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv,null,a)}},display:function(a){this.imageDiv.style.display=a?"":"none"},isDrawn:function(){return this.imageDiv&&this.imageDiv.parentNode&&11!=this.imageDiv.parentNode.nodeType},CLASS_NAME:"OpenLayers.Icon"});
OpenLayers.Popup=OpenLayers.Class({events:null,id:"",lonlat:null,div:null,contentSize:null,size:null,contentHTML:null,backgroundColor:"",opacity:"",border:"",contentDiv:null,groupDiv:null,closeDiv:null,autoSize:!1,minSize:null,maxSize:null,displayClass:"olPopup",contentDisplayClass:"olPopupContent",padding:0,disableFirefoxOverflowHack:!1,fixPadding:function(){if("number"==typeof this.padding)this.padding=new OpenLayers.Bounds(this.padding,this.padding,this.padding,this.padding)},panMapIfOutOfView:!1,
keepInMap:!1,closeOnMove:!1,map:null,initialize:function(a,b,c,d,e,f){null==a&&(a=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_"));this.id=a;this.lonlat=b;this.contentSize=null!=c?c:new OpenLayers.Size(OpenLayers.Popup.WIDTH,OpenLayers.Popup.HEIGHT);if(null!=d)this.contentHTML=d;this.backgroundColor=OpenLayers.Popup.COLOR;this.opacity=OpenLayers.Popup.OPACITY;this.border=OpenLayers.Popup.BORDER;this.div=OpenLayers.Util.createDiv(this.id,null,null,null,null,null,"hidden");this.div.className=this.displayClass;
this.groupDiv=OpenLayers.Util.createDiv(this.id+"_GroupDiv",null,null,null,"relative",null,"hidden");a=this.div.id+"_contentDiv";this.contentDiv=OpenLayers.Util.createDiv(a,null,this.contentSize.clone(),null,"relative");this.contentDiv.className=this.contentDisplayClass;this.groupDiv.appendChild(this.contentDiv);this.div.appendChild(this.groupDiv);e&&this.addCloseBox(f);this.registerEvents()},destroy:function(){this.border=this.opacity=this.backgroundColor=this.contentHTML=this.size=this.lonlat=this.id=
null;this.closeOnMove&&this.map&&this.map.events.unregister("movestart",this,this.hide);this.events.destroy();this.events=null;this.closeDiv&&(OpenLayers.Event.stopObservingElement(this.closeDiv),this.groupDiv.removeChild(this.closeDiv));this.closeDiv=null;this.div.removeChild(this.groupDiv);this.groupDiv=null;null!=this.map&&this.map.removePopup(this);this.panMapIfOutOfView=this.padding=this.maxSize=this.minSize=this.autoSize=this.div=this.map=null},draw:function(a){null==a&&null!=this.lonlat&&null!=
this.map&&(a=this.map.getLayerPxFromLonLat(this.lonlat));this.closeOnMove&&this.map.events.register("movestart",this,this.hide);!this.disableFirefoxOverflowHack&&"firefox"==OpenLayers.Util.getBrowserName()&&(this.map.events.register("movestart",this,function(){var a=document.defaultView.getComputedStyle(this.contentDiv,null).getPropertyValue("overflow");if("hidden"!=a)this.contentDiv._oldOverflow=a,this.contentDiv.style.overflow="hidden"}),this.map.events.register("moveend",this,function(){var a=
this.contentDiv._oldOverflow;if(a)this.contentDiv.style.overflow=a,this.contentDiv._oldOverflow=null}));this.moveTo(a);!this.autoSize&&!this.size&&this.setSize(this.contentSize);this.setBackgroundColor();this.setOpacity();this.setBorder();this.setContentHTML();this.panMapIfOutOfView&&this.panIntoView();return this.div},updatePosition:function(){if(this.lonlat&&this.map){var a=this.map.getLayerPxFromLonLat(this.lonlat);a&&this.moveTo(a)}},moveTo:function(a){if(null!=a&&null!=this.div)this.div.style.left=
a.x+"px",this.div.style.top=a.y+"px"},visible:function(){return OpenLayers.Element.visible(this.div)},toggle:function(){this.visible()?this.hide():this.show()},show:function(){OpenLayers.Element.show(this.div);this.panMapIfOutOfView&&this.panIntoView()},hide:function(){OpenLayers.Element.hide(this.div)},setSize:function(a){this.size=a.clone();var b=this.getContentDivPadding(),c=b.left+b.right,d=b.top+b.bottom;this.fixPadding();c+=this.padding.left+this.padding.right;d+=this.padding.top+this.padding.bottom;
if(this.closeDiv)var e=parseInt(this.closeDiv.style.width),c=c+(e+b.right);this.size.w+=c;this.size.h+=d;"msie"==OpenLayers.Util.getBrowserName()&&(this.contentSize.w+=b.left+b.right,this.contentSize.h+=b.bottom+b.top);if(null!=this.div)this.div.style.width=this.size.w+"px",this.div.style.height=this.size.h+"px";if(null!=this.contentDiv)this.contentDiv.style.width=a.w+"px",this.contentDiv.style.height=a.h+"px"},updateSize:function(){var a="<div class='"+this.contentDisplayClass+"'>"+this.contentDiv.innerHTML+
"</div>",b=this.map?this.map.layerContainerDiv:document.body,c=OpenLayers.Util.getRenderedDimensions(a,null,{displayClass:this.displayClass,containerElement:b}),d=this.getSafeContentSize(c),e=null;d.equals(c)?e=c:(e=new OpenLayers.Size,e.w=d.w<c.w?d.w:null,e.h=d.h<c.h?d.h:null,e.w&&e.h?e=d:(a=OpenLayers.Util.getRenderedDimensions(a,e,{displayClass:this.contentDisplayClass,containerElement:b}),"hidden"!=OpenLayers.Element.getStyle(this.contentDiv,"overflow")&&a.equals(d)&&(d=OpenLayers.Util.getScrollbarWidth(),
e.w?a.h+=d:a.w+=d),e=this.getSafeContentSize(a)));this.setSize(e)},setBackgroundColor:function(a){if(void 0!=a)this.backgroundColor=a;if(null!=this.div)this.div.style.backgroundColor=this.backgroundColor},setOpacity:function(a){if(void 0!=a)this.opacity=a;if(null!=this.div)this.div.style.opacity=this.opacity,this.div.style.filter="alpha(opacity="+100*this.opacity+")"},setBorder:function(a){if(void 0!=a)this.border=a;if(null!=this.div)this.div.style.border=this.border},setContentHTML:function(a){if(null!=
a)this.contentHTML=a;if(null!=this.contentDiv&&null!=this.contentHTML&&this.contentHTML!=this.contentDiv.innerHTML)this.contentDiv.innerHTML=this.contentHTML,this.autoSize&&(this.registerImageListeners(),this.updateSize())},registerImageListeners:function(){for(var a=function(){this.popup.updateSize();this.popup.visible()&&this.popup.panMapIfOutOfView&&this.popup.panIntoView();OpenLayers.Event.stopObserving(this.img,"load",this.img._onImageLoad)},b=this.contentDiv.getElementsByTagName("img"),c=0,
d=b.length;c<d;c++){var e=b[c];if(0==e.width||0==e.height)e._onImgLoad=OpenLayers.Function.bind(a,{popup:this,img:e}),OpenLayers.Event.observe(e,"load",e._onImgLoad)}},getSafeContentSize:function(a){var a=a.clone(),b=this.getContentDivPadding(),c=b.left+b.right,d=b.top+b.bottom;this.fixPadding();c+=this.padding.left+this.padding.right;d+=this.padding.top+this.padding.bottom;if(this.closeDiv)var e=parseInt(this.closeDiv.style.width),c=c+(e+b.right);if(this.minSize)a.w=Math.max(a.w,this.minSize.w-c),
a.h=Math.max(a.h,this.minSize.h-d);if(this.maxSize)a.w=Math.min(a.w,this.maxSize.w-c),a.h=Math.min(a.h,this.maxSize.h-d);if(this.map&&this.map.size){e=b=0;if(this.keepInMap&&!this.panMapIfOutOfView)switch(e=this.map.getPixelFromLonLat(this.lonlat),this.relativePosition){case "tr":b=e.x;e=this.map.size.h-e.y;break;case "tl":b=this.map.size.w-e.x;e=this.map.size.h-e.y;break;case "bl":b=this.map.size.w-e.x;e=e.y;break;case "br":b=e.x;e=e.y;break;default:b=e.x,e=this.map.size.h-e.y}d=this.map.size.h-
this.map.paddingForPopups.top-this.map.paddingForPopups.bottom-d-e;a.w=Math.min(a.w,this.map.size.w-this.map.paddingForPopups.left-this.map.paddingForPopups.right-c-b);a.h=Math.min(a.h,d)}return a},getContentDivPadding:function(){var a=this._contentDivPadding;if(!a){if(null==this.div.parentNode)this.div.style.display="none",document.body.appendChild(this.div);this._contentDivPadding=a=new OpenLayers.Bounds(OpenLayers.Element.getStyle(this.contentDiv,"padding-left"),OpenLayers.Element.getStyle(this.contentDiv,
"padding-bottom"),OpenLayers.Element.getStyle(this.contentDiv,"padding-right"),OpenLayers.Element.getStyle(this.contentDiv,"padding-top"));if(this.div.parentNode==document.body)document.body.removeChild(this.div),this.div.style.display=""}return a},addCloseBox:function(a){this.closeDiv=OpenLayers.Util.createDiv(this.id+"_close",null,new OpenLayers.Size(17,17));this.closeDiv.className="olPopupCloseBox";var b=this.getContentDivPadding();this.closeDiv.style.right=b.right+"px";this.closeDiv.style.top=
b.top+"px";this.groupDiv.appendChild(this.closeDiv);OpenLayers.Event.observe(this.closeDiv,"click",OpenLayers.Function.bindAsEventListener(a||function(a){this.hide();OpenLayers.Event.stop(a)},this))},panIntoView:function(){var a=this.map.getSize(),b=this.map.getViewPortPxFromLayerPx(new OpenLayers.Pixel(parseInt(this.div.style.left),parseInt(this.div.style.top))),c=b.clone();if(b.x<this.map.paddingForPopups.left)c.x=this.map.paddingForPopups.left;else if(b.x+this.size.w>a.w-this.map.paddingForPopups.right)c.x=
a.w-this.map.paddingForPopups.right-this.size.w;if(b.y<this.map.paddingForPopups.top)c.y=this.map.paddingForPopups.top;else if(b.y+this.size.h>a.h-this.map.paddingForPopups.bottom)c.y=a.h-this.map.paddingForPopups.bottom-this.size.h;this.map.pan(b.x-c.x,b.y-c.y)},registerEvents:function(){this.events=new OpenLayers.Events(this,this.div,null,!0);this.events.on({mousedown:this.onmousedown,mousemove:this.onmousemove,mouseup:this.onmouseup,click:this.onclick,mouseout:this.onmouseout,dblclick:this.ondblclick,
scope:this})},onmousedown:function(a){this.mousedown=!0;OpenLayers.Event.stop(a,!0)},onmousemove:function(a){this.mousedown&&OpenLayers.Event.stop(a,!0)},onmouseup:function(a){if(this.mousedown)this.mousedown=!1,OpenLayers.Event.stop(a,!0)},onclick:function(a){OpenLayers.Event.stop(a,!0)},onmouseout:function(){this.mousedown=!1},ondblclick:function(a){OpenLayers.Event.stop(a,!0)},CLASS_NAME:"OpenLayers.Popup"});OpenLayers.Popup.WIDTH=200;OpenLayers.Popup.HEIGHT=200;OpenLayers.Popup.COLOR="white";
OpenLayers.Popup.OPACITY=1;OpenLayers.Popup.BORDER="0px";
OpenLayers.Protocol=OpenLayers.Class({format:null,options:null,autoDestroy:!0,defaultFilter:null,initialize:function(a){a=a||{};OpenLayers.Util.extend(this,a);this.options=a},mergeWithDefaultFilter:function(a){return a&&this.defaultFilter?new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.AND,filters:[this.defaultFilter,a]}):a||this.defaultFilter||void 0},destroy:function(){this.format=this.options=null},read:function(a){a=a||{};a.filter=this.mergeWithDefaultFilter(a.filter)},create:function(){},
update:function(){},"delete":function(){},commit:function(){},abort:function(){},createCallback:function(a,b,c){return OpenLayers.Function.bind(function(){a.apply(this,[b,c])},this)},CLASS_NAME:"OpenLayers.Protocol"});OpenLayers.Protocol.Response=OpenLayers.Class({code:null,requestType:null,last:!0,features:null,reqFeatures:null,priv:null,initialize:function(a){OpenLayers.Util.extend(this,a)},success:function(){return 0<this.code},CLASS_NAME:"OpenLayers.Protocol.Response"});
OpenLayers.Protocol.Response.SUCCESS=1;OpenLayers.Protocol.Response.FAILURE=0;
OpenLayers.Renderer=OpenLayers.Class({container:null,root:null,extent:null,locked:!1,size:null,resolution:null,map:null,initialize:function(a){this.container=OpenLayers.Util.getElement(a)},destroy:function(){this.map=this.resolution=this.size=this.extent=this.container=null},supported:function(){return!1},setExtent:function(a,b){this.extent=a.clone();if(b)this.resolution=null},setSize:function(a){this.size=a.clone();this.resolution=null},getResolution:function(){return this.resolution=this.resolution||
this.map.getResolution()},drawFeature:function(a,b){if(null==b)b=a.style;if(a.geometry){var c=a.geometry.getBounds();if(c){c.intersectsBounds(this.extent)||(b={display:"none"});c=this.drawGeometry(a.geometry,b,a.id);if("none"!=b.display&&b.label&&!1!==c){var d=a.geometry.getCentroid();if(b.labelXOffset||b.labelYOffset){xOffset=isNaN(b.labelXOffset)?0:b.labelXOffset;yOffset=isNaN(b.labelYOffset)?0:b.labelYOffset;var e=this.getResolution();d.move(xOffset*e,yOffset*e)}this.drawText(a.id,b,d)}else this.removeText(a.id);
return c}}},drawGeometry:function(){},drawText:function(){},removeText:function(){},clear:function(){},getFeatureIdFromEvent:function(){},eraseFeatures:function(a){a instanceof Array||(a=[a]);for(var b=0,c=a.length;b<c;++b){var d=a[b];this.eraseGeometry(d.geometry,d.id);this.removeText(d.id)}},eraseGeometry:function(){},moveRoot:function(){},getRenderLayerId:function(){return this.container.id},applyDefaultSymbolizer:function(a){var b=OpenLayers.Util.extend({},OpenLayers.Renderer.defaultSymbolizer);
!1===a.stroke&&(delete b.strokeWidth,delete b.strokeColor);!1===a.fill&&delete b.fillColor;OpenLayers.Util.extend(b,a);return b},CLASS_NAME:"OpenLayers.Renderer"});OpenLayers.Renderer.defaultSymbolizer={fillColor:"#000000",strokeColor:"#000000",strokeWidth:2,fillOpacity:1,strokeOpacity:1,pointRadius:0};
OpenLayers.Strategy=OpenLayers.Class({layer:null,options:null,active:null,autoActivate:!0,autoDestroy:!0,initialize:function(a){OpenLayers.Util.extend(this,a);this.options=a;this.active=!1},destroy:function(){this.deactivate();this.options=this.layer=null},setLayer:function(a){this.layer=a},activate:function(){return!this.active?this.active=!0:!1},deactivate:function(){return this.active?(this.active=!1,!0):!1},CLASS_NAME:"OpenLayers.Strategy"});
OpenLayers.Symbolizer=OpenLayers.Class({zIndex:0,initialize:function(a){OpenLayers.Util.extend(this,a)},clone:function(){return new (eval(this.CLASS_NAME))(OpenLayers.Util.extend({},this))},CLASS_NAME:"OpenLayers.Symbolizer"});
OpenLayers.Rico.Color=OpenLayers.Class({initialize:function(a,b,c){this.rgb={r:a,g:b,b:c}},setRed:function(a){this.rgb.r=a},setGreen:function(a){this.rgb.g=a},setBlue:function(a){this.rgb.b=a},setHue:function(a){var b=this.asHSB();b.h=a;this.rgb=OpenLayers.Rico.Color.HSBtoRGB(b.h,b.s,b.b)},setSaturation:function(a){var b=this.asHSB();b.s=a;this.rgb=OpenLayers.Rico.Color.HSBtoRGB(b.h,b.s,b.b)},setBrightness:function(a){var b=this.asHSB();b.b=a;this.rgb=OpenLayers.Rico.Color.HSBtoRGB(b.h,b.s,b.b)},
darken:function(a){var b=this.asHSB();this.rgb=OpenLayers.Rico.Color.HSBtoRGB(b.h,b.s,Math.max(b.b-a,0))},brighten:function(a){var b=this.asHSB();this.rgb=OpenLayers.Rico.Color.HSBtoRGB(b.h,b.s,Math.min(b.b+a,1))},blend:function(a){this.rgb.r=Math.floor((this.rgb.r+a.rgb.r)/2);this.rgb.g=Math.floor((this.rgb.g+a.rgb.g)/2);this.rgb.b=Math.floor((this.rgb.b+a.rgb.b)/2)},isBright:function(){this.asHSB();return 0.5<this.asHSB().b},isDark:function(){return!this.isBright()},asRGB:function(){return"rgb("+
this.rgb.r+","+this.rgb.g+","+this.rgb.b+")"},asHex:function(){return"#"+this.rgb.r.toColorPart()+this.rgb.g.toColorPart()+this.rgb.b.toColorPart()},asHSB:function(){return OpenLayers.Rico.Color.RGBtoHSB(this.rgb.r,this.rgb.g,this.rgb.b)},toString:function(){return this.asHex()}});
OpenLayers.Rico.Color.createFromHex=function(a){if(4==a.length)for(var b=a,a="#",c=1;4>c;c++)a+=b.charAt(c)+b.charAt(c);0==a.indexOf("#")&&(a=a.substring(1));b=a.substring(0,2);c=a.substring(2,4);a=a.substring(4,6);return new OpenLayers.Rico.Color(parseInt(b,16),parseInt(c,16),parseInt(a,16))};
OpenLayers.Rico.Color.createColorFromBackground=function(a){var b=RicoUtil.getElementsComputedStyle(OpenLayers.Util.getElement(a),"backgroundColor","background-color");if("transparent"==b&&a.parentNode)return OpenLayers.Rico.Color.createColorFromBackground(a.parentNode);if(null==b)return new OpenLayers.Rico.Color(255,255,255);return 0==b.indexOf("rgb(")?(a=b.substring(4,b.length-1).split(","),new OpenLayers.Rico.Color(parseInt(a[0]),parseInt(a[1]),parseInt(a[2]))):0==b.indexOf("#")?OpenLayers.Rico.Color.createFromHex(b):
new OpenLayers.Rico.Color(255,255,255)};
OpenLayers.Rico.Color.HSBtoRGB=function(a,b,c){var d=0,e=0,f=0;if(0==b)f=e=d=parseInt(255*c+0.5);else{var a=6*(a-Math.floor(a)),g=a-Math.floor(a),h=c*(1-b),j=c*(1-b*g),b=c*(1-b*(1-g));switch(parseInt(a)){case 0:d=255*c+0.5;e=255*b+0.5;f=255*h+0.5;break;case 1:d=255*j+0.5;e=255*c+0.5;f=255*h+0.5;break;case 2:d=255*h+0.5;e=255*c+0.5;f=255*b+0.5;break;case 3:d=255*h+0.5;e=255*j+0.5;f=255*c+0.5;break;case 4:d=255*b+0.5;e=255*h+0.5;f=255*c+0.5;break;case 5:d=255*c+0.5,e=255*h+0.5,f=255*j+0.5}}return{r:parseInt(d),
g:parseInt(e),b:parseInt(f)}};OpenLayers.Rico.Color.RGBtoHSB=function(a,b,c){var d,e=a>b?a:b;c>e&&(e=c);var f=a<b?a:b;c<f&&(f=c);d=0!=e?(e-f)/e:0;if(0==d)a=0;else{var g=(e-a)/(e-f),h=(e-b)/(e-f),c=(e-c)/(e-f),a=(a==e?c-h:b==e?2+g-c:4+h-g)/6;0>a&&(a+=1)}return{h:a,s:d,b:e/255}};
OpenLayers.Bounds=OpenLayers.Class({left:null,bottom:null,right:null,top:null,centerLonLat:null,initialize:function(a,b,c,d){if(null!=a)this.left=OpenLayers.Util.toFloat(a);if(null!=b)this.bottom=OpenLayers.Util.toFloat(b);if(null!=c)this.right=OpenLayers.Util.toFloat(c);if(null!=d)this.top=OpenLayers.Util.toFloat(d)},clone:function(){return new OpenLayers.Bounds(this.left,this.bottom,this.right,this.top)},equals:function(a){var b=!1;null!=a&&(b=this.left==a.left&&this.right==a.right&&this.top==a.top&&
this.bottom==a.bottom);return b},toString:function(){return"left-bottom=("+this.left+","+this.bottom+") right-top=("+this.right+","+this.top+")"},toArray:function(a){return!0===a?[this.bottom,this.left,this.top,this.right]:[this.left,this.bottom,this.right,this.top]},toBBOX:function(a,b){null==a&&(a=6);var c=Math.pow(10,a),d=Math.round(this.left*c)/c,e=Math.round(this.bottom*c)/c,f=Math.round(this.right*c)/c,c=Math.round(this.top*c)/c;return!0===b?e+","+d+","+c+","+f:d+","+e+","+f+","+c},toGeometry:function(){return new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing([new OpenLayers.Geometry.Point(this.left,
this.bottom),new OpenLayers.Geometry.Point(this.right,this.bottom),new OpenLayers.Geometry.Point(this.right,this.top),new OpenLayers.Geometry.Point(this.left,this.top)])])},getWidth:function(){return this.right-this.left},getHeight:function(){return this.top-this.bottom},getSize:function(){return new OpenLayers.Size(this.getWidth(),this.getHeight())},getCenterPixel:function(){return new OpenLayers.Pixel((this.left+this.right)/2,(this.bottom+this.top)/2)},getCenterLonLat:function(){if(!this.centerLonLat)this.centerLonLat=
new OpenLayers.LonLat((this.left+this.right)/2,(this.bottom+this.top)/2);return this.centerLonLat},scale:function(a,b){null==b&&(b=this.getCenterLonLat());var c,d;"OpenLayers.LonLat"==b.CLASS_NAME?(c=b.lon,d=b.lat):(c=b.x,d=b.y);return new OpenLayers.Bounds((this.left-c)*a+c,(this.bottom-d)*a+d,(this.right-c)*a+c,(this.top-d)*a+d)},add:function(a,b){if(null==a||null==b){var c=OpenLayers.i18n("boundsAddError");OpenLayers.Console.error(c);return null}return new OpenLayers.Bounds(this.left+a,this.bottom+
b,this.right+a,this.top+b)},extend:function(a){var b=null;if(a){switch(a.CLASS_NAME){case "OpenLayers.LonLat":b=new OpenLayers.Bounds(a.lon,a.lat,a.lon,a.lat);break;case "OpenLayers.Geometry.Point":b=new OpenLayers.Bounds(a.x,a.y,a.x,a.y);break;case "OpenLayers.Bounds":b=a}if(b){this.centerLonLat=null;if(null==this.left||b.left<this.left)this.left=b.left;if(null==this.bottom||b.bottom<this.bottom)this.bottom=b.bottom;if(null==this.right||b.right>this.right)this.right=b.right;if(null==this.top||b.top>
this.top)this.top=b.top}}},containsLonLat:function(a,b){return this.contains(a.lon,a.lat,b)},containsPixel:function(a,b){return this.contains(a.x,a.y,b)},contains:function(a,b,c){null==c&&(c=!0);if(null==a||null==b)return!1;var a=OpenLayers.Util.toFloat(a),b=OpenLayers.Util.toFloat(b),d=!1;return d=c?a>=this.left&&a<=this.right&&b>=this.bottom&&b<=this.top:a>this.left&&a<this.right&&b>this.bottom&&b<this.top},intersectsBounds:function(a,b){null==b&&(b=!0);var c=!1,d=this.left==a.right||this.right==
a.left||this.top==a.bottom||this.bottom==a.top;if(b||!d)var c=a.top>=this.bottom&&a.top<=this.top||this.top>a.bottom&&this.top<a.top,d=a.left>=this.left&&a.left<=this.right||this.left>=a.left&&this.left<=a.right,e=a.right>=this.left&&a.right<=this.right||this.right>=a.left&&this.right<=a.right,c=(a.bottom>=this.bottom&&a.bottom<=this.top||this.bottom>=a.bottom&&this.bottom<=a.top||c)&&(d||e);return c},containsBounds:function(a,b,c){null==b&&(b=!1);null==c&&(c=!0);var d=this.contains(a.left,a.bottom,
c),e=this.contains(a.right,a.bottom,c),f=this.contains(a.left,a.top,c),a=this.contains(a.right,a.top,c);return b?d||e||f||a:d&&e&&f&&a},determineQuadrant:function(a){var b="",c=this.getCenterLonLat(),b=b+(a.lat<c.lat?"b":"t");return b+=a.lon<c.lon?"l":"r"},transform:function(a,b){this.centerLonLat=null;var c=OpenLayers.Projection.transform({x:this.left,y:this.bottom},a,b),d=OpenLayers.Projection.transform({x:this.right,y:this.bottom},a,b),e=OpenLayers.Projection.transform({x:this.left,y:this.top},
a,b),f=OpenLayers.Projection.transform({x:this.right,y:this.top},a,b);this.left=Math.min(c.x,e.x);this.bottom=Math.min(c.y,d.y);this.right=Math.max(d.x,f.x);this.top=Math.max(e.y,f.y);return this},wrapDateLine:function(a,b){var b=b||{},c=b.leftTolerance||0,d=b.rightTolerance||0,e=this.clone();if(a){for(;e.left<a.left&&e.right-d<=a.left;)e=e.add(a.getWidth(),0);for(;e.left+c>=a.right&&e.right>a.right;)e=e.add(-a.getWidth(),0)}return e},CLASS_NAME:"OpenLayers.Bounds"});
OpenLayers.Bounds.fromString=function(a){a=a.split(",");return OpenLayers.Bounds.fromArray(a)};OpenLayers.Bounds.fromArray=function(a){return new OpenLayers.Bounds(parseFloat(a[0]),parseFloat(a[1]),parseFloat(a[2]),parseFloat(a[3]))};OpenLayers.Bounds.fromSize=function(a){return new OpenLayers.Bounds(0,a.h,a.w,0)};OpenLayers.Bounds.oppositeQuadrant=function(a){var b;b=""+("t"==a.charAt(0)?"b":"t");return b+="l"==a.charAt(1)?"r":"l"};
OpenLayers.LonLat=OpenLayers.Class({lon:0,lat:0,initialize:function(a,b){this.lon=OpenLayers.Util.toFloat(a);this.lat=OpenLayers.Util.toFloat(b)},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(a,b){if(null==a||null==b){var c=OpenLayers.i18n("lonlatAddError");OpenLayers.Console.error(c);return null}return new OpenLayers.LonLat(this.lon+OpenLayers.Util.toFloat(a),
this.lat+OpenLayers.Util.toFloat(b))},equals:function(a){var b=!1;null!=a&&(b=this.lon==a.lon&&this.lat==a.lat||isNaN(this.lon)&&isNaN(this.lat)&&isNaN(a.lon)&&isNaN(a.lat));return b},transform:function(a,b){var c=OpenLayers.Projection.transform({x:this.lon,y:this.lat},a,b);this.lon=c.x;this.lat=c.y;return this},wrapDateLine:function(a){var b=this.clone();if(a){for(;b.lon<a.left;)b.lon+=a.getWidth();for(;b.lon>a.right;)b.lon-=a.getWidth()}return b},CLASS_NAME:"OpenLayers.LonLat"});
OpenLayers.LonLat.fromString=function(a){a=a.split(",");return new OpenLayers.LonLat(a[0],a[1])};
OpenLayers.Pixel=OpenLayers.Class({x:0,y:0,initialize:function(a,b){this.x=parseFloat(a);this.y=parseFloat(b)},toString:function(){return"x="+this.x+",y="+this.y},clone:function(){return new OpenLayers.Pixel(this.x,this.y)},equals:function(a){var b=!1;null!=a&&(b=this.x==a.x&&this.y==a.y||isNaN(this.x)&&isNaN(this.y)&&isNaN(a.x)&&isNaN(a.y));return b},add:function(a,b){if(null==a||null==b){var c=OpenLayers.i18n("pixelAddError");OpenLayers.Console.error(c);return null}return new OpenLayers.Pixel(this.x+
a,this.y+b)},offset:function(a){var b=this.clone();a&&(b=this.add(a.x,a.y));return b},CLASS_NAME:"OpenLayers.Pixel"});
OpenLayers.Control=OpenLayers.Class({id:null,map:null,div:null,type:null,allowSelection:!1,displayClass:"",title:"",autoActivate:!1,active:null,handler:null,eventListeners:null,events:null,EVENT_TYPES:["activate","deactivate"],initialize:function(a){this.displayClass=this.CLASS_NAME.replace("OpenLayers.","ol").replace(/\./g,"");OpenLayers.Util.extend(this,a);this.events=new OpenLayers.Events(this,null,this.EVENT_TYPES);if(this.eventListeners instanceof Object)this.events.on(this.eventListeners);if(null==
this.id)this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")},destroy:function(){if(this.events)this.eventListeners&&this.events.un(this.eventListeners),this.events.destroy(),this.events=null;this.eventListeners=null;if(this.handler)this.handler.destroy(),this.handler=null;if(this.handlers){for(var a in this.handlers)this.handlers.hasOwnProperty(a)&&"function"==typeof this.handlers[a].destroy&&this.handlers[a].destroy();this.handlers=null}if(this.map)this.map.removeControl(this),this.map=null},
setMap:function(a){this.map=a;this.handler&&this.handler.setMap(a)},draw:function(a){if(null==this.div){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(null!=a)this.position=a.clone();this.moveTo(this.position);return this.div},moveTo:function(a){if(null!=a&&null!=
this.div)this.div.style.left=a.x+"px",this.div.style.top=a.y+"px"},activate:function(){if(this.active)return!1;this.handler&&this.handler.activate();this.active=!0;this.map&&OpenLayers.Element.addClass(this.map.viewPortDiv,this.displayClass.replace(/ /g,"")+"Active");this.events.triggerEvent("activate");return!0},deactivate:function(){return this.active?(this.handler&&this.handler.deactivate(),this.active=!1,this.map&&OpenLayers.Element.removeClass(this.map.viewPortDiv,this.displayClass.replace(/ /g,
"")+"Active"),this.events.triggerEvent("deactivate"),!0):!1},CLASS_NAME:"OpenLayers.Control"});OpenLayers.Control.TYPE_BUTTON=1;OpenLayers.Control.TYPE_TOGGLE=2;OpenLayers.Control.TYPE_TOOL=3;
OpenLayers.Lang={code:null,defaultCode:"en",getCode:function(){OpenLayers.Lang.code||OpenLayers.Lang.setCode();return OpenLayers.Lang.code},setCode:function(a){var b;a||(a="msie"==OpenLayers.Util.getBrowserName()?navigator.userLanguage:navigator.language);a=a.split("-");a[0]=a[0].toLowerCase();"object"==typeof OpenLayers.Lang[a[0]]&&(b=a[0]);if(a[1]){var c=a[0]+"-"+a[1].toUpperCase();"object"==typeof OpenLayers.Lang[c]&&(b=c)}if(!b)OpenLayers.Console.warn("Failed to find OpenLayers.Lang."+a.join("-")+
" dictionary, falling back to default language"),b=OpenLayers.Lang.defaultCode;OpenLayers.Lang.code=b},translate:function(a,b){var c=OpenLayers.Lang[OpenLayers.Lang.getCode()][a];c||(c=a);b&&(c=OpenLayers.String.format(c,b));return c}};OpenLayers.i18n=OpenLayers.Lang.translate;
OpenLayers.Popup.Anchored=OpenLayers.Class(OpenLayers.Popup,{relativePosition:null,keepInMap:!0,anchor:null,initialize:function(a,b,c,d,e,f,g){OpenLayers.Popup.prototype.initialize.apply(this,[a,b,c,d,f,g]);this.anchor=null!=e?e:{size:new OpenLayers.Size(0,0),offset:new OpenLayers.Pixel(0,0)}},destroy:function(){this.relativePosition=this.anchor=null;OpenLayers.Popup.prototype.destroy.apply(this,arguments)},show:function(){this.updatePosition();OpenLayers.Popup.prototype.show.apply(this,arguments)},
moveTo:function(a){var b=this.relativePosition;this.relativePosition=this.calculateRelativePosition(a);a=this.calculateNewPx(a);OpenLayers.Popup.prototype.moveTo.apply(this,Array(a));this.relativePosition!=b&&this.updateRelativePosition()},setSize:function(a){OpenLayers.Popup.prototype.setSize.apply(this,arguments);this.lonlat&&this.map&&this.moveTo(this.map.getLayerPxFromLonLat(this.lonlat))},calculateRelativePosition:function(a){a=this.map.getLonLatFromLayerPx(a);a=this.map.getExtent().determineQuadrant(a);
return OpenLayers.Bounds.oppositeQuadrant(a)},updateRelativePosition:function(){},calculateNewPx:function(a){var a=a.offset(this.anchor.offset),b=this.size||this.contentSize,c="t"==this.relativePosition.charAt(0);a.y+=c?-(b.h+this.anchor.size.h):this.anchor.size.h;c="l"==this.relativePosition.charAt(1);a.x+=c?-(b.w+this.anchor.size.w):this.anchor.size.w;return a},CLASS_NAME:"OpenLayers.Popup.Anchored"});
OpenLayers.Protocol.SOS=function(a){var a=OpenLayers.Util.applyDefaults(a,OpenLayers.Protocol.SOS.DEFAULTS),b=OpenLayers.Protocol.SOS["v"+a.version.replace(/\./g,"_")];if(!b)throw"Unsupported SOS version: "+a.version;return new b(a)};OpenLayers.Protocol.SOS.DEFAULTS={version:"1.0.0"};
OpenLayers.Protocol.SQL=OpenLayers.Class(OpenLayers.Protocol,{databaseName:"ol",tableName:"ol_vector_features",postReadFiltering:!0,initialize:function(a){OpenLayers.Protocol.prototype.initialize.apply(this,[a])},destroy:function(){OpenLayers.Protocol.prototype.destroy.apply(this)},supported:function(){return!1},evaluateFilter:function(a,b){return b&&this.postReadFiltering?b.evaluate(a):!0},CLASS_NAME:"OpenLayers.Protocol.SQL"});
OpenLayers.Protocol.WFS=function(a){var a=OpenLayers.Util.applyDefaults(a,OpenLayers.Protocol.WFS.DEFAULTS),b=OpenLayers.Protocol.WFS["v"+a.version.replace(/\./g,"_")];if(!b)throw"Unsupported WFS version: "+a.version;return new b(a)};
OpenLayers.Protocol.WFS.fromWMSLayer=function(a,b){var c,d;c=a.params.LAYERS;c=(c instanceof Array?c[0]:c).split(":");1<c.length&&(d=c[0]);c=c.pop();d={url:a.url,featureType:c,featurePrefix:d,srsName:a.projection&&a.projection.getCode()||a.map&&a.map.getProjectionObject().getCode(),version:"1.1.0"};return new OpenLayers.Protocol.WFS(OpenLayers.Util.applyDefaults(b,d))};OpenLayers.Protocol.WFS.DEFAULTS={version:"1.0.0"};
OpenLayers.Renderer.Canvas=OpenLayers.Class(OpenLayers.Renderer,{canvas:null,features:null,initialize:function(a){OpenLayers.Renderer.prototype.initialize.apply(this,arguments);this.root=document.createElement("canvas");this.container.appendChild(this.root);this.canvas=this.root.getContext("2d");this.features={}},eraseGeometry:function(a,b){this.eraseFeatures(this.features[b][0])},supported:function(){return!!document.createElement("canvas").getContext},setExtent:function(a){this.extent=a.clone();
this.resolution=null;this.redraw()},setSize:function(a){this.size=a.clone();this.root.style.width=a.w+"px";this.root.style.height=a.h+"px";this.root.width=a.w;this.root.height=a.h;this.resolution=null},drawFeature:function(a,b){b=b||a.style;b=this.applyDefaultSymbolizer(b);this.features[a.id]=[a,b];this.redraw()},drawGeometry:function(a,b){var c=a.CLASS_NAME;if("OpenLayers.Geometry.Collection"==c||"OpenLayers.Geometry.MultiPoint"==c||"OpenLayers.Geometry.MultiLineString"==c||"OpenLayers.Geometry.MultiPolygon"==
c)for(c=0;c<a.components.length;c++)this.drawGeometry(a.components[c],b);else switch(a.CLASS_NAME){case "OpenLayers.Geometry.Point":this.drawPoint(a,b);break;case "OpenLayers.Geometry.LineString":this.drawLineString(a,b);break;case "OpenLayers.Geometry.LinearRing":this.drawLinearRing(a,b);break;case "OpenLayers.Geometry.Polygon":this.drawPolygon(a,b)}},drawExternalGraphic:function(a,b){var c=new Image;if(b.graphicTitle)c.title=b.graphicTitle;var d=b.graphicWidth||b.graphicHeight,e=b.graphicHeight||
b.graphicWidth,d=d?d:2*b.pointRadius,e=e?e:2*b.pointRadius;c.onload=OpenLayers.Function.bind(function(){this.canvas.globalAlpha=this.opacity;this.canvas.drawImage(this.img,this.x,this.y,this.width,this.height)},{img:c,x:a[0]+(void 0!=b.graphicXOffset?b.graphicXOffset:-(0.5*d)),y:a[1]+(void 0!=b.graphicYOffset?b.graphicYOffset:-(0.5*e)),width:d,height:e,opacity:b.graphicOpacity||b.fillOpacity,canvas:this.canvas});c.src=b.externalGraphic},setCanvasStyle:function(a,b){"fill"==a?(this.canvas.globalAlpha=
b.fillOpacity,this.canvas.fillStyle=b.fillColor):"stroke"==a?(this.canvas.globalAlpha=b.strokeOpacity,this.canvas.strokeStyle=b.strokeColor,this.canvas.lineWidth=b.strokeWidth):(this.canvas.globalAlpha=0,this.canvas.lineWidth=1)},drawPoint:function(a,b){if(!1!==b.graphic){var c=this.getLocalXY(a);b.externalGraphic?this.drawExternalGraphic(c,b):(!1!==b.fill&&(this.setCanvasStyle("fill",b),this.canvas.beginPath(),this.canvas.arc(c[0],c[1],b.pointRadius,0,2*Math.PI,!0),this.canvas.fill()),!1!==b.stroke&&
(this.setCanvasStyle("stroke",b),this.canvas.beginPath(),this.canvas.arc(c[0],c[1],b.pointRadius,0,2*Math.PI,!0),this.canvas.stroke(),this.setCanvasStyle("reset")))}},drawLineString:function(a,b){if(!1!==b.stroke){this.setCanvasStyle("stroke",b);this.canvas.beginPath();var c=this.getLocalXY(a.components[0]);this.canvas.moveTo(c[0],c[1]);for(c=1;c<a.components.length;c++){var d=this.getLocalXY(a.components[c]);this.canvas.lineTo(d[0],d[1])}this.canvas.stroke()}this.setCanvasStyle("reset")},drawLinearRing:function(a,
b){if(!1!==b.fill){this.setCanvasStyle("fill",b);this.canvas.beginPath();var c=this.getLocalXY(a.components[0]);this.canvas.moveTo(c[0],c[1]);for(c=1;c<a.components.length-1;c++){var d=this.getLocalXY(a.components[c]);this.canvas.lineTo(d[0],d[1])}this.canvas.fill()}if(!1!==b.stroke){this.setCanvasStyle("stroke",b);this.canvas.beginPath();c=this.getLocalXY(a.components[0]);this.canvas.moveTo(c[0],c[1]);for(c=1;c<a.components.length;c++)d=this.getLocalXY(a.components[c]),this.canvas.lineTo(d[0],d[1]);
this.canvas.stroke()}this.setCanvasStyle("reset")},drawPolygon:function(a,b){this.drawLinearRing(a.components[0],b);for(var c=1;c<a.components.length;c++)this.drawLinearRing(a.components[c],{fillOpacity:0,strokeWidth:0,strokeOpacity:0,strokeColor:"#000000",fillColor:"#000000"})},drawText:function(a,b){var b=OpenLayers.Util.extend({fontColor:"#000000",labelAlign:"cm"},b),c=this.getLocalXY(a);this.setCanvasStyle("reset");this.canvas.fillStyle=b.fontColor;this.canvas.globalAlpha=b.fontOpacity||1;var d=
b.fontWeight+" "+b.fontSize+" "+b.fontFamily;if(this.canvas.fillText){var e=OpenLayers.Renderer.Canvas.LABEL_ALIGN[b.labelAlign[0]]||"center";this.canvas.font=d;this.canvas.textAlign=e;this.canvas.fillText(b.label,c[0],c[1])}else if(this.canvas.mozDrawText){this.canvas.mozTextStyle=d;d=this.canvas.mozMeasureText(b.label);switch(b.labelAlign[0]){case "l":break;case "r":c[0]-=d;break;default:c[0]-=d/2}this.canvas.translate(c[0],c[1]);this.canvas.mozDrawText(b.label);this.canvas.translate(-1*c[0],-1*
c[1])}this.setCanvasStyle("reset")},getLocalXY:function(a){var b=this.getResolution(),c=this.extent;return[a.x/b+-c.left/b,c.top/b-a.y/b]},clear:function(){this.canvas.clearRect(0,0,this.root.width,this.root.height);this.features={}},getFeatureIdFromEvent:function(a){var a=this.map.getLonLatFromPixel(a.xy),b=this.getResolution(),a=(new OpenLayers.Bounds(a.lon-5*b,a.lat-5*b,a.lon+5*b,a.lat+5*b)).toGeometry(),c;for(c in this.features)if(this.features.hasOwnProperty(c)&&this.features[c][0].geometry.intersects(a))return c;
return null},eraseFeatures:function(a){a instanceof Array||(a=[a]);for(var b=0;b<a.length;++b)delete this.features[a[b].id];this.redraw()},redraw:function(){if(!this.locked){this.canvas.clearRect(0,0,this.root.width,this.root.height);var a=[],b,c,d;for(d in this.features)this.features.hasOwnProperty(d)&&(b=this.features[d][0],c=this.features[d][1],b.geometry&&(this.drawGeometry(b.geometry,c),c.label&&a.push([b,c])));c=0;for(d=a.length;c<d;++c)b=a[c],this.drawText(b[0].geometry.getCentroid(),b[1])}},
CLASS_NAME:"OpenLayers.Renderer.Canvas"});OpenLayers.Renderer.Canvas.LABEL_ALIGN={l:"left",r:"right"};
OpenLayers.ElementsIndexer=OpenLayers.Class({maxZIndex:null,order:null,indices:null,compare:null,initialize:function(a){this.compare=a?OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER_Y_ORDER:OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER_DRAWING_ORDER;this.order=[];this.indices={};this.maxZIndex=0},insert:function(a){this.exists(a)&&this.remove(a);var b=a.id;this.determineZIndex(a);for(var c=-1,d=this.order.length,e;1<d-c;)e=parseInt((c+d)/2),0<this.compare(this,a,OpenLayers.Util.getElement(this.order[e]))?
c=e:d=e;this.order.splice(d,0,b);this.indices[b]=this.getZIndex(a);return this.getNextElement(d)},remove:function(a){var a=a.id,b=OpenLayers.Util.indexOf(this.order,a);if(0<=b)this.order.splice(b,1),delete this.indices[a],this.maxZIndex=0<this.order.length?this.indices[this.order[this.order.length-1]]:0},clear:function(){this.order=[];this.indices={};this.maxZIndex=0},exists:function(a){return null!=this.indices[a.id]},getZIndex:function(a){return a._style.graphicZIndex},determineZIndex:function(a){var b=
a._style.graphicZIndex;if(null==b)b=this.maxZIndex,a._style.graphicZIndex=b;else if(b>this.maxZIndex)this.maxZIndex=b},getNextElement:function(a){a+=1;if(a<this.order.length){var b=OpenLayers.Util.getElement(this.order[a]);void 0==b&&(b=this.getNextElement(a));return b}return null},CLASS_NAME:"OpenLayers.ElementsIndexer"});
OpenLayers.ElementsIndexer.IndexingMethods={Z_ORDER:function(a,b,c){var b=a.getZIndex(b),d=0;c&&(a=a.getZIndex(c),d=b-a);return d},Z_ORDER_DRAWING_ORDER:function(a,b,c){a=OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER(a,b,c);c&&0==a&&(a=1);return a},Z_ORDER_Y_ORDER:function(a,b,c){a=OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER(a,b,c);c&&0===a&&(b=c._boundsBottom-b._boundsBottom,a=0===b?1:b);return a}};
OpenLayers.Renderer.Elements=OpenLayers.Class(OpenLayers.Renderer,{rendererRoot:null,root:null,vectorRoot:null,textRoot:null,xmlns:null,indexer:null,BACKGROUND_ID_SUFFIX:"_background",LABEL_ID_SUFFIX:"_label",initialize:function(a,b){OpenLayers.Renderer.prototype.initialize.apply(this,arguments);this.rendererRoot=this.createRenderRoot();this.root=this.createRoot("_root");this.vectorRoot=this.createRoot("_vroot");this.textRoot=this.createRoot("_troot");this.root.appendChild(this.vectorRoot);this.root.appendChild(this.textRoot);
this.rendererRoot.appendChild(this.root);this.container.appendChild(this.rendererRoot);if(b&&(b.zIndexing||b.yOrdering))this.indexer=new OpenLayers.ElementsIndexer(b.yOrdering)},destroy:function(){this.clear();this.xmlns=this.root=this.rendererRoot=null;OpenLayers.Renderer.prototype.destroy.apply(this,arguments)},clear:function(){var a,b=this.vectorRoot;if(b)for(;a=b.firstChild;)b.removeChild(a);if(b=this.textRoot)for(;a=b.firstChild;)b.removeChild(a);this.indexer&&this.indexer.clear()},getNodeType:function(){},
drawGeometry:function(a,b,c){var d=a.CLASS_NAME,e=!0;if("OpenLayers.Geometry.Collection"==d||"OpenLayers.Geometry.MultiPoint"==d||"OpenLayers.Geometry.MultiLineString"==d||"OpenLayers.Geometry.MultiPolygon"==d){for(var d=0,f=a.components.length;d<f;d++)e=this.drawGeometry(a.components[d],b,c)&&e;return e}e=!1;"none"!=b.display&&(b.backgroundGraphic&&this.redrawBackgroundNode(a.id,a,b,c),e=this.redrawNode(a.id,a,b,c));if(!1==e&&(b=document.getElementById(a.id)))b._style.backgroundGraphic&&b.parentNode.removeChild(document.getElementById(a.id+
this.BACKGROUND_ID_SUFFIX)),b.parentNode.removeChild(b);return e},redrawNode:function(a,b,c,d){c=this.applyDefaultSymbolizer(c);a=this.nodeFactory(a,this.getNodeType(b,c));a._featureId=d;a._boundsBottom=b.getBounds().bottom;a._geometryClass=b.CLASS_NAME;a._style=c;b=this.drawGeometryNode(a,b,c);if(!1===b)return!1;a=b.node;this.indexer?(c=this.indexer.insert(a))?this.vectorRoot.insertBefore(a,c):this.vectorRoot.appendChild(a):a.parentNode!==this.vectorRoot&&this.vectorRoot.appendChild(a);this.postDraw(a);
return b.complete},redrawBackgroundNode:function(a,b,c){c=OpenLayers.Util.extend({},c);c.externalGraphic=c.backgroundGraphic;c.graphicXOffset=c.backgroundXOffset;c.graphicYOffset=c.backgroundYOffset;c.graphicZIndex=c.backgroundGraphicZIndex;c.graphicWidth=c.backgroundWidth||c.graphicWidth;c.graphicHeight=c.backgroundHeight||c.graphicHeight;c.backgroundGraphic=null;c.backgroundXOffset=null;c.backgroundYOffset=null;c.backgroundGraphicZIndex=null;return this.redrawNode(a+this.BACKGROUND_ID_SUFFIX,b,
c,null)},drawGeometryNode:function(a,b,c){var c=c||a._style,d={isFilled:void 0===c.fill?!0:c.fill,isStroked:void 0===c.stroke?!!c.strokeWidth:c.stroke},e;switch(b.CLASS_NAME){case "OpenLayers.Geometry.Point":if(!1===c.graphic)d.isFilled=!1,d.isStroked=!1;e=this.drawPoint(a,b);break;case "OpenLayers.Geometry.LineString":d.isFilled=!1;e=this.drawLineString(a,b);break;case "OpenLayers.Geometry.LinearRing":e=this.drawLinearRing(a,b);break;case "OpenLayers.Geometry.Polygon":e=this.drawPolygon(a,b);break;
case "OpenLayers.Geometry.Surface":e=this.drawSurface(a,b);break;case "OpenLayers.Geometry.Rectangle":e=this.drawRectangle(a,b)}a._options=d;return!1!=e?{node:this.setStyle(a,c,d,b),complete:e}:!1},postDraw:function(){},drawPoint:function(){},drawLineString:function(){},drawLinearRing:function(){},drawPolygon:function(){},drawRectangle:function(){},drawCircle:function(){},drawSurface:function(){},removeText:function(a){(a=document.getElementById(a+this.LABEL_ID_SUFFIX))&&this.textRoot.removeChild(a)},
getFeatureIdFromEvent:function(a){var b=a.target,c=b&&b.correspondingUseElement;return(c?c:b||a.srcElement)._featureId},eraseGeometry:function(a,b){if("OpenLayers.Geometry.MultiPoint"==a.CLASS_NAME||"OpenLayers.Geometry.MultiLineString"==a.CLASS_NAME||"OpenLayers.Geometry.MultiPolygon"==a.CLASS_NAME||"OpenLayers.Geometry.Collection"==a.CLASS_NAME)for(var c=0,d=a.components.length;c<d;c++)this.eraseGeometry(a.components[c],b);else if((c=OpenLayers.Util.getElement(a.id))&&c.parentNode){if(c.geometry)c.geometry.destroy(),
c.geometry=null;c.parentNode.removeChild(c);this.indexer&&this.indexer.remove(c);c._style.backgroundGraphic&&(c=OpenLayers.Util.getElement(a.id+this.BACKGROUND_ID_SUFFIX))&&c.parentNode&&c.parentNode.removeChild(c)}},nodeFactory:function(a,b){var c=OpenLayers.Util.getElement(a);c?this.nodeTypeCompare(c,b)||(c.parentNode.removeChild(c),c=this.nodeFactory(a,b)):c=this.createNode(b,a);return c},nodeTypeCompare:function(){},createNode:function(){},moveRoot:function(a){var b=this.root;if(a.root.parentNode==
this.rendererRoot)b=a.root;b.parentNode.removeChild(b);a.rendererRoot.appendChild(b)},getRenderLayerId:function(){return this.root.parentNode.parentNode.id},isComplexSymbol:function(a){return"circle"!=a&&!!a},CLASS_NAME:"OpenLayers.Renderer.Elements"});
OpenLayers.Renderer.symbol={star:[350,75,379,161,469,161,397,215,423,301,350,250,277,301,303,215,231,161,321,161,350,75],cross:[4,0,6,0,6,4,10,4,10,6,6,6,6,10,4,10,4,6,0,6,0,4,4,4,4,0],x:[0,0,25,0,50,35,75,0,100,0,65,50,100,100,75,100,50,65,25,100,0,100,35,50,0,0],square:[0,0,0,1,1,1,1,0,0,0],triangle:[0,10,10,10,5,0,0,10]};
OpenLayers.Strategy.Cluster=OpenLayers.Class(OpenLayers.Strategy,{distance:20,threshold:null,features:null,clusters:null,clustering:!1,resolution:null,initialize:function(a){OpenLayers.Strategy.prototype.initialize.apply(this,[a])},activate:function(){var a=OpenLayers.Strategy.prototype.activate.call(this);if(a)this.layer.events.on({beforefeaturesadded:this.cacheFeatures,moveend:this.cluster,scope:this});return a},deactivate:function(){var a=OpenLayers.Strategy.prototype.deactivate.call(this);a&&
(this.clearCache(),this.layer.events.un({beforefeaturesadded:this.cacheFeatures,moveend:this.cluster,scope:this}));return a},cacheFeatures:function(a){var b=!0;if(!this.clustering)this.clearCache(),this.features=a.features,this.cluster(),b=!1;return b},clearCache:function(){this.features=null},cluster:function(a){if((!a||a.zoomChanged)&&this.features)if(a=this.layer.map.getResolution(),a!=this.resolution||!this.clustersExist()){this.resolution=a;for(var a=[],b,c,d,e=0;e<this.features.length;++e)if(b=
this.features[e],b.geometry){c=!1;for(var f=a.length-1;0<=f;--f)if(d=a[f],this.shouldCluster(d,b)){this.addToCluster(d,b);c=!0;break}c||a.push(this.createCluster(this.features[e]))}this.layer.removeAllFeatures();if(0<a.length){if(1<this.threshold){b=a.slice();a=[];e=0;for(d=b.length;e<d;++e)c=b[e],c.attributes.count<this.threshold?Array.prototype.push.apply(a,c.cluster):a.push(c)}this.clustering=!0;this.layer.addFeatures(a);this.clustering=!1}this.clusters=a}},clustersExist:function(){var a=!1;if(this.clusters&&
0<this.clusters.length&&this.clusters.length==this.layer.features.length)for(var a=!0,b=0;b<this.clusters.length;++b)if(this.clusters[b]!=this.layer.features[b]){a=!1;break}return a},shouldCluster:function(a,b){var c=a.geometry.getBounds().getCenterLonLat(),d=b.geometry.getBounds().getCenterLonLat();return Math.sqrt(Math.pow(c.lon-d.lon,2)+Math.pow(c.lat-d.lat,2))/this.resolution<=this.distance},addToCluster:function(a,b){a.cluster.push(b);a.attributes.count+=1},createCluster:function(a){var b=a.geometry.getBounds().getCenterLonLat(),
b=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(b.lon,b.lat),{count:1});b.cluster=[a];return b},CLASS_NAME:"OpenLayers.Strategy.Cluster"});
OpenLayers.Strategy.Fixed=OpenLayers.Class(OpenLayers.Strategy,{preload:!1,initialize:function(a){OpenLayers.Strategy.prototype.initialize.apply(this,[a])},destroy:function(){OpenLayers.Strategy.prototype.destroy.apply(this,arguments)},activate:function(){if(OpenLayers.Strategy.prototype.activate.apply(this,arguments)){this.layer.events.on({refresh:this.load,scope:this});if(!0==this.layer.visibility||this.preload)this.load();else this.layer.events.on({visibilitychanged:this.load,scope:this});return!0}return!1},
deactivate:function(){var a=OpenLayers.Strategy.prototype.deactivate.call(this);a&&this.layer.events.un({refresh:this.load,visibilitychanged:this.load,scope:this});return a},load:function(a){this.layer.events.triggerEvent("loadstart");this.layer.protocol.read(OpenLayers.Util.applyDefaults({callback:this.merge,filter:this.layer.filter,scope:this},a));this.layer.events.un({visibilitychanged:this.load,scope:this})},merge:function(a){this.layer.destroyFeatures();if((a=a.features)&&0<a.length){var b=this.layer.projection,
c=this.layer.map.getProjectionObject();if(!c.equals(b))for(var d,e=0,f=a.length;e<f;++e)(d=a[e].geometry)&&d.transform(b,c);this.layer.addFeatures(a)}this.layer.events.triggerEvent("loadend")},CLASS_NAME:"OpenLayers.Strategy.Fixed"});
OpenLayers.Strategy.Paging=OpenLayers.Class(OpenLayers.Strategy,{features:null,length:10,num:null,paging:!1,initialize:function(a){OpenLayers.Strategy.prototype.initialize.apply(this,[a])},activate:function(){var a=OpenLayers.Strategy.prototype.activate.call(this);if(a)this.layer.events.on({beforefeaturesadded:this.cacheFeatures,scope:this});return a},deactivate:function(){var a=OpenLayers.Strategy.prototype.deactivate.call(this);a&&(this.clearCache(),this.layer.events.un({beforefeaturesadded:this.cacheFeatures,
scope:this}));return a},cacheFeatures:function(a){if(!this.paging)this.clearCache(),this.features=a.features,this.pageNext(a)},clearCache:function(){if(this.features)for(var a=0;a<this.features.length;++a)this.features[a].destroy();this.num=this.features=null},pageCount:function(){return Math.ceil((this.features?this.features.length:0)/this.length)},pageNum:function(){return this.num},pageLength:function(a){if(a&&0<a)this.length=a;return this.length},pageNext:function(a){var b=!1;if(this.features){if(null===
this.num)this.num=-1;b=this.page((this.num+1)*this.length,a)}return b},pagePrevious:function(){var a=!1;if(this.features){if(null===this.num)this.num=this.pageCount();a=this.page((this.num-1)*this.length)}return a},page:function(a,b){var c=!1;if(this.features&&0<=a&&a<this.features.length){var d=Math.floor(a/this.length);if(d!=this.num)this.paging=!0,c=this.features.slice(a,a+this.length),this.layer.removeFeatures(this.layer.features),this.num=d,b&&b.features?b.features=c:this.layer.addFeatures(c),
this.paging=!1,c=!0}return c},CLASS_NAME:"OpenLayers.Strategy.Paging"});
OpenLayers.Strategy.Refresh=OpenLayers.Class(OpenLayers.Strategy,{force:!1,interval:0,timer:null,initialize:function(a){OpenLayers.Strategy.prototype.initialize.apply(this,[a])},activate:function(){var a=OpenLayers.Strategy.prototype.activate.call(this);a&&(!0===this.layer.visibility&&this.start(),this.layer.events.on({visibilitychanged:this.reset,scope:this}));return a},deactivate:function(){var a=OpenLayers.Strategy.prototype.deactivate.call(this);a&&this.stop();return a},reset:function(){!0===
this.layer.visibility?this.start():this.stop()},start:function(){if(this.interval&&"number"===typeof this.interval&&0<this.interval)this.timer=window.setInterval(OpenLayers.Function.bind(this.refresh,this),this.interval)},refresh:function(){this.layer&&this.layer.refresh&&"function"==typeof this.layer.refresh&&this.layer.refresh({force:this.force})},stop:function(){if(null!==this.timer)window.clearInterval(this.timer),this.timer=null},CLASS_NAME:"OpenLayers.Strategy.Refresh"});
OpenLayers.Strategy.Save=OpenLayers.Class(OpenLayers.Strategy,{EVENT_TYPES:["start","success","fail"],events:null,auto:!1,timer:null,initialize:function(a){OpenLayers.Strategy.prototype.initialize.apply(this,[a]);this.events=new OpenLayers.Events(this,null,this.EVENT_TYPES)},activate:function(){var a=OpenLayers.Strategy.prototype.activate.call(this);if(a&&this.auto)if("number"===typeof this.auto)this.timer=window.setInterval(OpenLayers.Function.bind(this.save,this),1E3*this.auto);else this.layer.events.on({featureadded:this.triggerSave,
afterfeaturemodified:this.triggerSave,scope:this});return a},deactivate:function(){var a=OpenLayers.Strategy.prototype.deactivate.call(this);a&&this.auto&&("number"===typeof this.auto?window.clearInterval(this.timer):this.layer.events.un({featureadded:this.triggerSave,afterfeaturemodified:this.triggerSave,scope:this}));return a},triggerSave:function(a){var b=a.feature;(b.state===OpenLayers.State.INSERT||b.state===OpenLayers.State.UPDATE||b.state===OpenLayers.State.DELETE)&&this.save([a.feature])},
save:function(a){if(!a)a=this.layer.features;this.events.triggerEvent("start",{features:a});var b=this.layer.projection,c=this.layer.map.getProjectionObject();if(!c.equals(b)){for(var d=a.length,e=Array(d),f,g,h=0;h<d;++h){f=a[h];g=f.clone();g.fid=f.fid;g.state=f.state;if(f.url)g.url=f.url;g._original=f;g.geometry.transform(c,b);e[h]=g}a=e}this.layer.protocol.commit(a,{callback:this.onCommit,scope:this})},onCommit:function(a){var b={response:a};if(a.success()){for(var c=a.reqFeatures,d,e=[],f=a.insertIds||
[],g=0,h=0,j=c.length;h<j;++h)if(d=c[h],d=d._original||d,a=d.state){if(a==OpenLayers.State.DELETE)e.push(d);else if(a==OpenLayers.State.INSERT)d.fid=f[g],++g;d.state=null}0<e.length&&this.layer.destroyFeatures(e);this.events.triggerEvent("success",b)}else this.events.triggerEvent("fail",b)},CLASS_NAME:"OpenLayers.Strategy.Save"});
OpenLayers.Symbolizer.Line=OpenLayers.Class(OpenLayers.Symbolizer,{strokeColor:null,strokeOpacity:null,strokeWidth:null,strokeLinecap:null,strokeDashstyle:null,initialize:function(a){OpenLayers.Symbolizer.prototype.initialize.apply(this,arguments)},CLASS_NAME:"OpenLayers.Symbolizer.Line"});
OpenLayers.Symbolizer.Point=OpenLayers.Class(OpenLayers.Symbolizer,{strokeColor:null,strokeOpacity:null,strokeWidth:null,strokeLinecap:null,strokeDashstyle:null,fillColor:null,fillOpacity:null,pointRadius:null,externalGraphic:null,graphicWidth:null,graphicHeight:null,graphicOpacity:null,graphicXOffset:null,graphicYOffset:null,rotation:null,graphicName:null,initialize:function(a){OpenLayers.Symbolizer.prototype.initialize.apply(this,arguments)},CLASS_NAME:"OpenLayers.Symbolizer.Point"});
OpenLayers.Symbolizer.Polygon=OpenLayers.Class(OpenLayers.Symbolizer,{strokeColor:null,strokeOpacity:null,strokeWidth:null,strokeLinecap:null,strokeDashstyle:null,fillColor:null,fillOpacity:null,initialize:function(a){OpenLayers.Symbolizer.prototype.initialize.apply(this,arguments)},CLASS_NAME:"OpenLayers.Symbolizer.Polygon"});OpenLayers.Symbolizer.Raster=OpenLayers.Class(OpenLayers.Symbolizer,{initialize:function(a){OpenLayers.Symbolizer.prototype.initialize.apply(this,arguments)},CLASS_NAME:"OpenLayers.Symbolizer.Raster"});
OpenLayers.Symbolizer.Text=OpenLayers.Class(OpenLayers.Symbolizer,{label:null,fontFamily:null,fontSize:null,fontWeight:null,fontStyle:null,initialize:function(a){OpenLayers.Symbolizer.prototype.initialize.apply(this,arguments)},CLASS_NAME:"OpenLayers.Symbolizer.Text"});
OpenLayers.Tween=OpenLayers.Class({INTERVAL:10,easing:null,begin:null,finish:null,duration:null,callbacks:null,time:null,interval:null,playing:!1,initialize:function(a){this.easing=a?a:OpenLayers.Easing.Expo.easeOut},start:function(a,b,c,d){this.playing=!0;this.begin=a;this.finish=b;this.duration=c;this.callbacks=d.callbacks;this.time=0;if(this.interval)window.clearInterval(this.interval),this.interval=null;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)this.callbacks&&this.callbacks.done&&this.callbacks.done.call(this,this.finish),window.clearInterval(this.interval),this.interval=null,this.playing=!1},play:function(){var a={},b;for(b in this.begin){var c=this.begin[b],d=this.finish[b];(null==c||null==d||isNaN(c)||isNaN(d))&&OpenLayers.Console.error("invalid value for Tween");a[b]=this.easing.apply(this,[this.time,c,d-c,this.duration])}this.time++;
this.callbacks&&this.callbacks.eachStep&&this.callbacks.eachStep.call(this,a);this.time>this.duration&&this.stop()},CLASS_NAME:"OpenLayers.Tween"});OpenLayers.Easing={CLASS_NAME:"OpenLayers.Easing"};OpenLayers.Easing.Linear={easeIn:function(a,b,c,d){return c*a/d+b},easeOut:function(a,b,c,d){return c*a/d+b},easeInOut:function(a,b,c,d){return c*a/d+b},CLASS_NAME:"OpenLayers.Easing.Linear"};
OpenLayers.Easing.Expo={easeIn:function(a,b,c,d){return 0==a?b:c*Math.pow(2,10*(a/d-1))+b},easeOut:function(a,b,c,d){return a==d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b},easeInOut:function(a,b,c,d){return 0==a?b:a==d?b+c:1>(a/=d/2)?c/2*Math.pow(2,10*(a-1))+b:c/2*(-Math.pow(2,-10*--a)+2)+b},CLASS_NAME:"OpenLayers.Easing.Expo"};
OpenLayers.Easing.Quad={easeIn:function(a,b,c,d){return c*(a/=d)*a+b},easeOut:function(a,b,c,d){return-c*(a/=d)*(a-2)+b},easeInOut:function(a,b,c,d){return 1>(a/=d/2)?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b},CLASS_NAME:"OpenLayers.Easing.Quad"};
OpenLayers.Control.ArgParser=OpenLayers.Class(OpenLayers.Control,{center:null,zoom:null,layers:null,displayProjection:null,initialize:function(a){OpenLayers.Control.prototype.initialize.apply(this,arguments)},setMap:function(a){OpenLayers.Control.prototype.setMap.apply(this,arguments);for(var b=0,c=this.map.controls.length;b<c;b++){var d=this.map.controls[b];if(d!=this&&"OpenLayers.Control.ArgParser"==d.CLASS_NAME){if(d.displayProjection!=this.displayProjection)this.displayProjection=d.displayProjection;
break}}if(b==this.map.controls.length){b=OpenLayers.Util.getParameters();if(b.layers)this.layers=b.layers,this.map.events.register("addlayer",this,this.configureLayers),this.configureLayers();if(b.lat&&b.lon){this.center=new OpenLayers.LonLat(parseFloat(b.lon),parseFloat(b.lat));if(b.zoom)this.zoom=parseInt(b.zoom);this.map.events.register("changebaselayer",this,this.setCenter);this.setCenter()}}},setCenter:function(){this.map.baseLayer&&(this.map.events.unregister("changebaselayer",this,this.setCenter),
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 a=0,b=this.layers.length;a<b;a++){var c=this.map.layers[a],d=this.layers.charAt(a);"B"==d?this.map.setBaseLayer(c):("T"==d||"F"==d)&&c.setVisibility("T"==d)}}},CLASS_NAME:"OpenLayers.Control.ArgParser"});
OpenLayers.Control.Attribution=OpenLayers.Class(OpenLayers.Control,{separator:", ",initialize:function(a){OpenLayers.Control.prototype.initialize.apply(this,arguments)},destroy:function(){this.map.events.un({removelayer:this.updateAttribution,addlayer:this.updateAttribution,changelayer:this.updateAttribution,changebaselayer:this.updateAttribution,scope:this});OpenLayers.Control.prototype.destroy.apply(this,arguments)},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);this.map.events.on({changebaselayer:this.updateAttribution,
changelayer:this.updateAttribution,addlayer:this.updateAttribution,removelayer:this.updateAttribution,scope:this});this.updateAttribution();return this.div},updateAttribution:function(){var a=[];if(this.map&&this.map.layers){for(var b=0,c=this.map.layers.length;b<c;b++){var d=this.map.layers[b];d.attribution&&d.getVisibility()&&-1===OpenLayers.Util.indexOf(a,d.attribution)&&a.push(d.attribution)}this.div.innerHTML=a.join(this.separator)}},CLASS_NAME:"OpenLayers.Control.Attribution"});
OpenLayers.Control.Button=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_BUTTON,trigger:function(){},CLASS_NAME:"OpenLayers.Control.Button"});
OpenLayers.Control.Graticule=OpenLayers.Class(OpenLayers.Control,{autoActivate:!0,intervals:[45,30,20,10,5,2,1,0.5,0.2,0.1,0.05,0.01,0.0050,0.0020,0.0010],displayInLayerSwitcher:!0,visible:!0,numPoints:50,targetSize:200,layerName:null,labelled:!0,labelFormat:"dm",lineSymbolizer:{strokeColor:"#333",strokeWidth:1,strokeOpacity:0.5},labelSymbolizer:{},gratLayer:null,initialize:function(a){a=a||{};a.layerName=a.layerName||OpenLayers.i18n("graticule");OpenLayers.Control.prototype.initialize.apply(this,
[a]);this.labelSymbolizer.stroke=!1;this.labelSymbolizer.fill=!1;this.labelSymbolizer.label="${label}";this.labelSymbolizer.labelAlign="${labelAlign}";this.labelSymbolizer.labelXOffset="${xOffset}";this.labelSymbolizer.labelYOffset="${yOffset}"},destroy:function(){this.deactivate();OpenLayers.Control.prototype.destroy.apply(this,arguments);if(this.gratLayer)this.gratLayer.destroy(),this.gratLayer=null},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.gratLayer){var a=
new OpenLayers.Style({},{rules:[new OpenLayers.Rule({symbolizer:{Point:this.labelSymbolizer,Line:this.lineSymbolizer}})]});this.gratLayer=new OpenLayers.Layer.Vector(this.layerName,{styleMap:new OpenLayers.StyleMap({"default":a}),visibility:this.visible,displayInLayerSwitcher:this.displayInLayerSwitcher})}return this.div},activate:function(){return OpenLayers.Control.prototype.activate.apply(this,arguments)?(this.map.addLayer(this.gratLayer),this.map.events.register("moveend",this,this.update),this.update(),
!0):!1},deactivate:function(){return OpenLayers.Control.prototype.deactivate.apply(this,arguments)?(this.map.events.unregister("moveend",this,this.update),this.map.removeLayer(this.gratLayer),!0):!1},update:function(){var a=this.map.getExtent();if(a){this.gratLayer.destroyFeatures();var b=new OpenLayers.Projection("EPSG:4326"),c=this.map.getProjectionObject(),d=this.map.getResolution();if(c.proj&&"longlat"==c.proj.projName)this.numPoints=1;var e=this.map.getCenter(),f=new OpenLayers.Pixel(e.lon,e.lat);
OpenLayers.Projection.transform(f,c,b);for(var e=this.targetSize*d,e=e*e,g,d=0;d<this.intervals.length;++d){g=this.intervals[d];var h=g/2,j=f.offset(new OpenLayers.Pixel(-h,-h)),h=f.offset(new OpenLayers.Pixel(h,h));OpenLayers.Projection.transform(j,b,c);OpenLayers.Projection.transform(h,b,c);if((j.x-h.x)*(j.x-h.x)+(j.y-h.y)*(j.y-h.y)<=e)break}f.x=Math.floor(f.x/g)*g;f.y=Math.floor(f.y/g)*g;var d=0,e=[f.clone()],h=f.clone(),k;do h=h.offset(new OpenLayers.Pixel(0,g)),k=OpenLayers.Projection.transform(h.clone(),
b,c),e.unshift(h);while(a.containsPixel(k)&&1E3>++d);h=f.clone();do h=h.offset(new OpenLayers.Pixel(0,-g)),k=OpenLayers.Projection.transform(h.clone(),b,c),e.push(h);while(a.containsPixel(k)&&1E3>++d);d=0;j=[f.clone()];h=f.clone();do h=h.offset(new OpenLayers.Pixel(-g,0)),k=OpenLayers.Projection.transform(h.clone(),b,c),j.unshift(h);while(a.containsPixel(k)&&1E3>++d);h=f.clone();do h=h.offset(new OpenLayers.Pixel(g,0)),k=OpenLayers.Projection.transform(h.clone(),b,c),j.push(h);while(a.containsPixel(k)&&
1E3>++d);g=[];for(d=0;d<j.length;++d){k=j[d].x;for(var f=[],l=null,m=Math.min(e[0].y,90),h=Math.max(e[e.length-1].y,-90),o=(m-h)/this.numPoints,m=h,h=0;h<=this.numPoints;++h){var n=new OpenLayers.Geometry.Point(k,m);n.transform(b,c);f.push(n);m+=o;n.y>=a.bottom&&!l&&(l=n)}this.labelled&&(l=new OpenLayers.Geometry.Point(l.x,a.bottom),k={value:k,label:this.labelled?OpenLayers.Util.getFormattedLonLat(k,"lon",this.labelFormat):"",labelAlign:"cb",xOffset:0,yOffset:2},this.gratLayer.addFeatures(new OpenLayers.Feature.Vector(l,
k)));f=new OpenLayers.Geometry.LineString(f);g.push(new OpenLayers.Feature.Vector(f))}for(h=0;h<e.length;++h)if(m=e[h].y,!(-90>m||90<m)){f=[];d=j[0].x;o=(j[j.length-1].x-d)/this.numPoints;k=d;l=null;for(d=0;d<=this.numPoints;++d)n=new OpenLayers.Geometry.Point(k,m),n.transform(b,c),f.push(n),k+=o,n.x<a.right&&(l=n);this.labelled&&(l=new OpenLayers.Geometry.Point(a.right,l.y),k={value:m,label:this.labelled?OpenLayers.Util.getFormattedLonLat(m,"lat",this.labelFormat):"",labelAlign:"rb",xOffset:-2,yOffset:2},
this.gratLayer.addFeatures(new OpenLayers.Feature.Vector(l,k)));f=new OpenLayers.Geometry.LineString(f);g.push(new OpenLayers.Feature.Vector(f))}this.gratLayer.addFeatures(g)}},CLASS_NAME:"OpenLayers.Control.Graticule"});
OpenLayers.Control.LayerSwitcher=OpenLayers.Class(OpenLayers.Control,{roundedCorner:!0,roundedCornerColor:"darkblue",layerStates:null,layersDiv:null,baseLayersDiv:null,baseLayers:null,dataLbl:null,dataLayersDiv:null,dataLayers:null,minimizeDiv:null,maximizeDiv:null,ascending:!0,initialize:function(a){OpenLayers.Control.prototype.initialize.apply(this,arguments);this.layerStates=[]},destroy:function(){OpenLayers.Event.stopObservingElement(this.div);OpenLayers.Event.stopObservingElement(this.minimizeDiv);
OpenLayers.Event.stopObservingElement(this.maximizeDiv);this.clearLayersArray("base");this.clearLayersArray("data");this.map.events.un({addlayer:this.redraw,changelayer:this.redraw,removelayer:this.redraw,changebaselayer:this.redraw,scope:this});OpenLayers.Control.prototype.destroy.apply(this,arguments)},setMap:function(a){OpenLayers.Control.prototype.setMap.apply(this,arguments);this.map.events.on({addlayer:this.redraw,changelayer:this.redraw,removelayer:this.redraw,changebaselayer:this.redraw,scope:this})},
draw:function(){OpenLayers.Control.prototype.draw.apply(this);this.loadContents();this.outsideViewport||this.minimizeControl();this.redraw();return this.div},clearLayersArray:function(a){var b=this[a+"Layers"];if(b)for(var c=0,d=b.length;c<d;c++){var e=b[c];OpenLayers.Event.stopObservingElement(e.inputElem);OpenLayers.Event.stopObservingElement(e.labelSpan)}this[a+"LayersDiv"].innerHTML="";this[a+"Layers"]=[]},checkRedraw:function(){var a=!1;if(!this.layerStates.length||this.map.layers.length!=this.layerStates.length)a=
!0;else for(var b=0,c=this.layerStates.length;b<c;b++){var d=this.layerStates[b],e=this.map.layers[b];if(d.name!=e.name||d.inRange!=e.inRange||d.id!=e.id||d.visibility!=e.visibility){a=!0;break}}return a},redraw:function(){if(!this.checkRedraw())return this.div;this.clearLayersArray("base");this.clearLayersArray("data");var a=!1,b=!1,c=this.map.layers.length;this.layerStates=Array(c);for(var d=0;d<c;d++){var e=this.map.layers[d];this.layerStates[d]={name:e.name,visibility:e.visibility,inRange:e.inRange,
id:e.id}}var f=this.map.layers.slice();this.ascending||f.reverse();d=0;for(c=f.length;d<c;d++){var e=f[d],g=e.isBaseLayer;if(e.displayInLayerSwitcher){g?b=!0:a=!0;var h=g?e==this.map.baseLayer:e.getVisibility(),j=document.createElement("input");j.id=this.id+"_input_"+e.name;j.name=g?this.id+"_baseLayers":e.name;j.type=g?"radio":"checkbox";j.value=e.name;j.checked=h;j.defaultChecked=h;if(!g&&!e.inRange)j.disabled=!0;var k={inputElem:j,layer:e,layerSwitcher:this};OpenLayers.Event.observe(j,"mouseup",
OpenLayers.Function.bindAsEventListener(this.onInputClick,k));h=document.createElement("span");OpenLayers.Element.addClass(h,"labelSpan");if(!g&&!e.inRange)h.style.color="gray";h.innerHTML=e.name;h.style.verticalAlign=g?"bottom":"baseline";OpenLayers.Event.observe(h,"click",OpenLayers.Function.bindAsEventListener(this.onInputClick,k));k=document.createElement("br");(g?this.baseLayers:this.dataLayers).push({layer:e,inputElem:j,labelSpan:h});e=g?this.baseLayersDiv:this.dataLayersDiv;e.appendChild(j);
e.appendChild(h);e.appendChild(k)}}this.dataLbl.style.display=a?"":"none";this.baseLbl.style.display=b?"":"none";return this.div},onInputClick:function(a){if(!this.inputElem.disabled)"radio"==this.inputElem.type?(this.inputElem.checked=!0,this.layer.map.setBaseLayer(this.layer)):(this.inputElem.checked=!this.inputElem.checked,this.layerSwitcher.updateMap());OpenLayers.Event.stop(a)},onLayerClick:function(){this.updateMap()},updateMap:function(){for(var a=0,b=this.baseLayers.length;a<b;a++){var c=
this.baseLayers[a];c.inputElem.checked&&this.map.setBaseLayer(c.layer,!1)}a=0;for(b=this.dataLayers.length;a<b;a++)c=this.dataLayers[a],c.layer.setVisibility(c.inputElem.checked)},maximizeControl:function(a){this.div.style.width="";this.div.style.height="";this.showControls(!1);null!=a&&OpenLayers.Event.stop(a)},minimizeControl:function(a){this.div.style.width="0px";this.div.style.height="0px";this.showControls(!0);null!=a&&OpenLayers.Event.stop(a)},showControls:function(a){this.maximizeDiv.style.display=
a?"":"none";this.minimizeDiv.style.display=a?"none":"";this.layersDiv.style.display=a?"none":""},loadContents:function(){OpenLayers.Event.observe(this.div,"mouseup",OpenLayers.Function.bindAsEventListener(this.mouseUp,this));OpenLayers.Event.observe(this.div,"click",this.ignoreEvent);OpenLayers.Event.observe(this.div,"mousedown",OpenLayers.Function.bindAsEventListener(this.mouseDown,this));OpenLayers.Event.observe(this.div,"dblclick",this.ignoreEvent);this.layersDiv=document.createElement("div");
this.layersDiv.id=this.id+"_layersDiv";OpenLayers.Element.addClass(this.layersDiv,"layersDiv");this.baseLbl=document.createElement("div");this.baseLbl.innerHTML=OpenLayers.i18n("baseLayer");OpenLayers.Element.addClass(this.baseLbl,"baseLbl");this.baseLayersDiv=document.createElement("div");OpenLayers.Element.addClass(this.baseLayersDiv,"baseLayersDiv");this.dataLbl=document.createElement("div");this.dataLbl.innerHTML=OpenLayers.i18n("overlays");OpenLayers.Element.addClass(this.dataLbl,"dataLbl");
this.dataLayersDiv=document.createElement("div");OpenLayers.Element.addClass(this.dataLayersDiv,"dataLayersDiv");this.ascending?(this.layersDiv.appendChild(this.baseLbl),this.layersDiv.appendChild(this.baseLayersDiv),this.layersDiv.appendChild(this.dataLbl),this.layersDiv.appendChild(this.dataLayersDiv)):(this.layersDiv.appendChild(this.dataLbl),this.layersDiv.appendChild(this.dataLayersDiv),this.layersDiv.appendChild(this.baseLbl),this.layersDiv.appendChild(this.baseLayersDiv));this.div.appendChild(this.layersDiv);
this.roundedCorner&&(OpenLayers.Rico.Corner.round(this.div,{corners:"tl bl",bgColor:"transparent",color:this.roundedCornerColor,blend:!1}),OpenLayers.Rico.Corner.changeOpacity(this.layersDiv,0.75));var a=OpenLayers.Util.getImagesLocation(),b=new OpenLayers.Size(18,18);this.maximizeDiv=OpenLayers.Util.createAlphaImageDiv("OpenLayers_Control_MaximizeDiv",null,b,a+"layer-switcher-maximize.png","absolute");OpenLayers.Element.addClass(this.maximizeDiv,"maximizeDiv");this.maximizeDiv.style.display="none";
OpenLayers.Event.observe(this.maximizeDiv,"click",OpenLayers.Function.bindAsEventListener(this.maximizeControl,this));this.div.appendChild(this.maximizeDiv);a+="layer-switcher-minimize.png";b=new OpenLayers.Size(18,18);this.minimizeDiv=OpenLayers.Util.createAlphaImageDiv("OpenLayers_Control_MinimizeDiv",null,b,a,"absolute");OpenLayers.Element.addClass(this.minimizeDiv,"minimizeDiv");this.minimizeDiv.style.display="none";OpenLayers.Event.observe(this.minimizeDiv,"click",OpenLayers.Function.bindAsEventListener(this.minimizeControl,
this));this.div.appendChild(this.minimizeDiv)},ignoreEvent:function(a){OpenLayers.Event.stop(a)},mouseDown:function(a){this.isMouseDown=!0;this.ignoreEvent(a)},mouseUp:function(a){if(this.isMouseDown)this.isMouseDown=!1,this.ignoreEvent(a)},CLASS_NAME:"OpenLayers.Control.LayerSwitcher"});
OpenLayers.Control.MouseDefaults=OpenLayers.Class(OpenLayers.Control,{performedDrag:!1,wheelObserver:null,initialize:function(){OpenLayers.Control.prototype.initialize.apply(this,arguments)},destroy:function(){this.handler&&this.handler.destroy();this.handler=null;this.map.events.un({click:this.defaultClick,dblclick:this.defaultDblClick,mousedown:this.defaultMouseDown,mouseup:this.defaultMouseUp,mousemove:this.defaultMouseMove,mouseout:this.defaultMouseOut,scope:this});OpenLayers.Event.stopObserving(window,
"DOMMouseScroll",this.wheelObserver);OpenLayers.Event.stopObserving(window,"mousewheel",this.wheelObserver);OpenLayers.Event.stopObserving(document,"mousewheel",this.wheelObserver);this.wheelObserver=null;OpenLayers.Control.prototype.destroy.apply(this,arguments)},draw:function(){this.map.events.on({click:this.defaultClick,dblclick:this.defaultDblClick,mousedown:this.defaultMouseDown,mouseup:this.defaultMouseUp,mousemove:this.defaultMouseMove,mouseout:this.defaultMouseOut,scope:this});this.registerWheelEvents()},
registerWheelEvents:function(){this.wheelObserver=OpenLayers.Function.bindAsEventListener(this.onWheelEvent,this);OpenLayers.Event.observe(window,"DOMMouseScroll",this.wheelObserver);OpenLayers.Event.observe(window,"mousewheel",this.wheelObserver);OpenLayers.Event.observe(document,"mousewheel",this.wheelObserver)},defaultClick:function(a){if(OpenLayers.Event.isLeftClick(a))return a=!this.performedDrag,this.performedDrag=!1,a},defaultDblClick:function(a){this.map.setCenter(this.map.getLonLatFromViewPortPx(a.xy),
this.map.zoom+1);OpenLayers.Event.stop(a);return!1},defaultMouseDown:function(a){if(OpenLayers.Event.isLeftClick(a)){this.mouseDragStart=a.xy.clone();this.performedDrag=!1;if(a.shiftKey)this.map.div.style.cursor="crosshair",this.zoomBox=OpenLayers.Util.createDiv("zoomBox",this.mouseDragStart,null,null,"absolute","2px solid red"),this.zoomBox.style.backgroundColor="white",this.zoomBox.style.filter="alpha(opacity=50)",this.zoomBox.style.opacity="0.50",this.zoomBox.style.fontSize="1px",this.zoomBox.style.zIndex=
this.map.Z_INDEX_BASE.Popup-1,this.map.viewPortDiv.appendChild(this.zoomBox);document.onselectstart=OpenLayers.Function.False;OpenLayers.Event.stop(a)}},defaultMouseMove:function(a){this.mousePosition=a.xy.clone();if(null!=this.mouseDragStart){if(this.zoomBox){var b=Math.abs(this.mouseDragStart.x-a.xy.x),c=Math.abs(this.mouseDragStart.y-a.xy.y);this.zoomBox.style.width=Math.max(1,b)+"px";this.zoomBox.style.height=Math.max(1,c)+"px";if(a.xy.x<this.mouseDragStart.x)this.zoomBox.style.left=a.xy.x+"px";
if(a.xy.y<this.mouseDragStart.y)this.zoomBox.style.top=a.xy.y+"px"}else{var b=this.mouseDragStart.x-a.xy.x,c=this.mouseDragStart.y-a.xy.y,d=this.map.getSize();this.map.setCenter(this.map.getLonLatFromViewPortPx(new OpenLayers.Pixel(d.w/2+b,d.h/2+c)),null,!0);this.mouseDragStart=a.xy.clone();this.map.div.style.cursor="move"}this.performedDrag=!0}},defaultMouseUp:function(a){if(OpenLayers.Event.isLeftClick(a))this.zoomBox?this.zoomBoxEnd(a):this.performedDrag&&this.map.setCenter(this.map.center),this.mouseDragStart=
document.onselectstart=null,this.map.div.style.cursor=""},defaultMouseOut:function(a){if(null!=this.mouseDragStart&&OpenLayers.Util.mouseLeft(a,this.map.div))this.zoomBox&&this.removeZoomBox(),this.mouseDragStart=null},defaultWheelUp:function(a){this.map.getZoom()<=this.map.getNumZoomLevels()&&this.map.setCenter(this.map.getLonLatFromPixel(a.xy),this.map.getZoom()+1)},defaultWheelDown:function(a){0<this.map.getZoom()&&this.map.setCenter(this.map.getLonLatFromPixel(a.xy),this.map.getZoom()-1)},zoomBoxEnd:function(a){if(null!=
this.mouseDragStart){if(5<Math.abs(this.mouseDragStart.x-a.xy.x)||5<Math.abs(this.mouseDragStart.y-a.xy.y)){var b=this.map.getLonLatFromViewPortPx(this.mouseDragStart),c=this.map.getLonLatFromViewPortPx(a.xy),a=Math.max(b.lat,c.lat),d=Math.min(b.lat,c.lat),e=Math.min(b.lon,c.lon),b=Math.max(b.lon,c.lon);this.map.zoomToExtent(new OpenLayers.Bounds(e,d,b,a))}else c=this.map.getLonLatFromViewPortPx(a.xy),this.map.setCenter(new OpenLayers.LonLat(c.lon,c.lat),this.map.getZoom()+1);this.removeZoomBox()}},
removeZoomBox:function(){this.map.viewPortDiv.removeChild(this.zoomBox);this.zoomBox=null},onWheelEvent:function(a){for(var b=!1,c=OpenLayers.Event.element(a);null!=c;){if(this.map&&c==this.map.div){b=!0;break}c=c.parentNode}if(b){b=0;if(!a)a=window.event;a.wheelDelta?(b=a.wheelDelta/120,window.opera&&9.2>window.opera.version()&&(b=-b)):a.detail&&(b=-a.detail/3);if(b)a.xy=this.mousePosition,0>b?this.defaultWheelDown(a):this.defaultWheelUp(a);OpenLayers.Event.stop(a)}},CLASS_NAME:"OpenLayers.Control.MouseDefaults"});
OpenLayers.Control.MousePosition=OpenLayers.Class(OpenLayers.Control,{autoActivate:!0,element:null,prefix:"",separator:", ",suffix:"",numDigits:5,granularity:10,emptyString:null,lastXy:null,displayProjection:null,initialize:function(a){OpenLayers.Control.prototype.initialize.apply(this,arguments)},destroy:function(){this.deactivate();OpenLayers.Control.prototype.destroy.apply(this,arguments)},activate:function(){return OpenLayers.Control.prototype.activate.apply(this,arguments)?(this.map.events.register("mousemove",
this,this.redraw),this.map.events.register("mouseout",this,this.reset),this.redraw(),!0):!1},deactivate:function(){return OpenLayers.Control.prototype.deactivate.apply(this,arguments)?(this.map.events.unregister("mousemove",this,this.redraw),this.map.events.unregister("mouseout",this,this.reset),this.element.innerHTML="",!0):!1},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.element)this.div.left="",this.div.top="",this.element=this.div;return this.div},redraw:function(a){var b;
if(null==a)this.reset();else if(null==this.lastXy||Math.abs(a.xy.x-this.lastXy.x)>this.granularity||Math.abs(a.xy.y-this.lastXy.y)>this.granularity)this.lastXy=a.xy;else if(b=this.map.getLonLatFromPixel(a.xy))if(this.displayProjection&&b.transform(this.map.getProjectionObject(),this.displayProjection),this.lastXy=a.xy,a=this.formatOutput(b),a!=this.element.innerHTML)this.element.innerHTML=a},reset:function(){if(null!=this.emptyString)this.element.innerHTML=this.emptyString},formatOutput:function(a){var b=
parseInt(this.numDigits);return this.prefix+a.lon.toFixed(b)+this.separator+a.lat.toFixed(b)+this.suffix},CLASS_NAME:"OpenLayers.Control.MousePosition"});
OpenLayers.Control.Pan=OpenLayers.Class(OpenLayers.Control,{slideFactor:50,direction:null,type:OpenLayers.Control.TYPE_BUTTON,initialize:function(a,b){this.direction=a;this.CLASS_NAME+=this.direction;OpenLayers.Control.prototype.initialize.apply(this,[b])},trigger:function(){switch(this.direction){case OpenLayers.Control.Pan.NORTH:this.map.pan(0,-this.slideFactor);break;case OpenLayers.Control.Pan.SOUTH:this.map.pan(0,this.slideFactor);break;case OpenLayers.Control.Pan.WEST:this.map.pan(-this.slideFactor,
0);break;case OpenLayers.Control.Pan.EAST:this.map.pan(this.slideFactor,0)}},CLASS_NAME:"OpenLayers.Control.Pan"});OpenLayers.Control.Pan.NORTH="North";OpenLayers.Control.Pan.SOUTH="South";OpenLayers.Control.Pan.EAST="East";OpenLayers.Control.Pan.WEST="West";
OpenLayers.Control.PanZoom=OpenLayers.Class(OpenLayers.Control,{slideFactor:50,slideRatio:null,buttons:null,position:null,initialize:function(a){this.position=new OpenLayers.Pixel(OpenLayers.Control.PanZoom.X,OpenLayers.Control.PanZoom.Y);OpenLayers.Control.prototype.initialize.apply(this,arguments)},destroy:function(){OpenLayers.Control.prototype.destroy.apply(this,arguments);this.removeButtons();this.position=this.buttons=null},draw:function(a){OpenLayers.Control.prototype.draw.apply(this,arguments);
a=this.position;this.buttons=[];var b=new OpenLayers.Size(18,18),c=new OpenLayers.Pixel(a.x+b.w/2,a.y);this._addButton("panup","north-mini.png",c,b);a.y=c.y+b.h;this._addButton("panleft","west-mini.png",a,b);this._addButton("panright","east-mini.png",a.add(b.w,0),b);this._addButton("pandown","south-mini.png",c.add(0,2*b.h),b);this._addButton("zoomin","zoom-plus-mini.png",c.add(0,3*b.h+5),b);this._addButton("zoomworld","zoom-world-mini.png",c.add(0,4*b.h+5),b);this._addButton("zoomout","zoom-minus-mini.png",
c.add(0,5*b.h+5),b);return this.div},_addButton:function(a,b,c,d){b=OpenLayers.Util.getImagesLocation()+b;c=OpenLayers.Util.createAlphaImageDiv(this.id+"_"+a,c,d,b,"absolute");this.div.appendChild(c);OpenLayers.Event.observe(c,"mousedown",OpenLayers.Function.bindAsEventListener(this.buttonDown,c));OpenLayers.Event.observe(c,"dblclick",OpenLayers.Function.bindAsEventListener(this.doubleClick,c));OpenLayers.Event.observe(c,"click",OpenLayers.Function.bindAsEventListener(this.doubleClick,c));c.action=
a;c.map=this.map;if(this.slideRatio)var e=this.slideRatio,a=function(a){return this.map.getSize()[a]*e};else var f=this.slideFactor,a=function(){return f};c.getSlideFactor=a;this.buttons.push(c);return c},_removeButton:function(a){OpenLayers.Event.stopObservingElement(a);a.map=null;a.getSlideFactor=null;this.div.removeChild(a);OpenLayers.Util.removeItem(this.buttons,a)},removeButtons:function(){for(var a=this.buttons.length-1;0<=a;--a)this._removeButton(this.buttons[a])},doubleClick:function(a){OpenLayers.Event.stop(a);
return!1},buttonDown:function(a){if(OpenLayers.Event.isLeftClick(a)){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()}OpenLayers.Event.stop(a)}},CLASS_NAME:"OpenLayers.Control.PanZoom"});
OpenLayers.Control.PanZoom.X=4;OpenLayers.Control.PanZoom.Y=4;
OpenLayers.Control.Panel=OpenLayers.Class(OpenLayers.Control,{controls:null,autoActivate:!0,defaultControl:null,saveState:!1,activeState:null,initialize:function(a){OpenLayers.Control.prototype.initialize.apply(this,[a]);this.controls=[];this.activeState={}},destroy:function(){OpenLayers.Control.prototype.destroy.apply(this,arguments);for(var a=this.controls.length-1;0<=a;a--)this.controls[a].events&&this.controls[a].events.un({activate:this.redraw,deactivate:this.redraw,scope:this}),OpenLayers.Event.stopObservingElement(this.controls[a].panel_div),
this.controls[a].panel_div=null;this.activeState=null},activate:function(){if(OpenLayers.Control.prototype.activate.apply(this,arguments)){for(var a,b=0,c=this.controls.length;b<c;b++)a=this.controls[b],(a===this.defaultControl||this.saveState&&this.activeState[a.id])&&a.activate();if(!0===this.saveState)this.defaultControl=null;this.redraw();return!0}return!1},deactivate:function(){if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)){for(var a,b=0,c=this.controls.length;b<c;b++)a=this.controls[b],
this.activeState[a.id]=a.deactivate();return!0}return!1},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);this.addControlsToMap(this.controls);return this.div},redraw:function(){if(0<this.div.children.length)for(var a=this.div.children.length-1;0<=a;a--)this.div.removeChild(this.div.children[a]);this.div.innerHTML="";if(this.active)for(var a=0,b=this.controls.length;a<b;a++){var c=this.controls[a].panel_div;c.className=this.controls[a].active?this.controls[a].displayClass+"ItemActive":
this.controls[a].displayClass+"ItemInactive";this.div.appendChild(c)}},activateControl:function(a){if(!this.active)return!1;if(a.type==OpenLayers.Control.TYPE_BUTTON)a.trigger(),this.redraw();else if(a.type==OpenLayers.Control.TYPE_TOGGLE)a.active?a.deactivate():a.activate(),this.redraw();else{for(var b,c=0,d=this.controls.length;c<d;c++)b=this.controls[c],b!=a&&(b.type===OpenLayers.Control.TYPE_TOOL||null==b.type)&&b.deactivate();a.activate()}},addControls:function(a){a instanceof Array||(a=[a]);
this.controls=this.controls.concat(a);for(var b=0,c=a.length;b<c;b++){var d=document.createElement("div");a[b].panel_div=d;if(""!=a[b].title)a[b].panel_div.title=a[b].title;OpenLayers.Event.observe(a[b].panel_div,"click",OpenLayers.Function.bind(this.onClick,this,a[b]));OpenLayers.Event.observe(a[b].panel_div,"dblclick",OpenLayers.Function.bind(this.onDoubleClick,this,a[b]));OpenLayers.Event.observe(a[b].panel_div,"mousedown",OpenLayers.Function.bindAsEventListener(OpenLayers.Event.stop))}this.map&&
(this.addControlsToMap(a),this.redraw())},addControlsToMap:function(a){for(var b,c=0,d=a.length;c<d;c++)b=a[c],!0===b.autoActivate?(b.autoActivate=!1,this.map.addControl(b),b.autoActivate=!0):(this.map.addControl(b),b.deactivate()),b.events.on({activate:this.redraw,deactivate:this.redraw,scope:this})},onClick:function(a,b){OpenLayers.Event.stop(b?b:window.event);this.activateControl(a)},onDoubleClick:function(a,b){OpenLayers.Event.stop(b?b:window.event)},getControlsBy:function(a,b){var c="function"==
typeof b.test;return OpenLayers.Array.filter(this.controls,function(d){return d[a]==b||c&&b.test(d[a])})},getControlsByName:function(a){return this.getControlsBy("name",a)},getControlsByClass:function(a){return this.getControlsBy("CLASS_NAME",a)},CLASS_NAME:"OpenLayers.Control.Panel"});
OpenLayers.Control.Scale=OpenLayers.Class(OpenLayers.Control,{element:null,geodesic:!1,initialize:function(a,b){OpenLayers.Control.prototype.initialize.apply(this,[b]);this.element=OpenLayers.Util.getElement(a)},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.element)this.element=document.createElement("div"),this.div.appendChild(this.element);this.map.events.register("moveend",this,this.updateScale);this.updateScale();return this.div},updateScale:function(){var a;
if(!0===this.geodesic){if(!this.map.getUnits())return;a=OpenLayers.INCHES_PER_UNIT;a=(this.map.getGeodesicPixelSize().w||1.0E-6)*a.km*OpenLayers.DOTS_PER_INCH}else a=this.map.getScale();if(a)a=9500<=a&&95E4>=a?Math.round(a/1E3)+"K":95E4<=a?Math.round(a/1E6)+"M":Math.round(a),this.element.innerHTML=OpenLayers.i18n("scale",{scaleDenom:a})},CLASS_NAME:"OpenLayers.Control.Scale"});
OpenLayers.Control.ScaleLine=OpenLayers.Class(OpenLayers.Control,{maxWidth:100,topOutUnits:"km",topInUnits:"m",bottomOutUnits:"mi",bottomInUnits:"ft",eTop:null,eBottom:null,geodesic:!1,initialize:function(a){OpenLayers.Control.prototype.initialize.apply(this,[a])},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.eTop)this.eTop=document.createElement("div"),this.eTop.className=this.displayClass+"Top",this.div.appendChild(this.eTop),this.eTop.style.visibility=""==this.topOutUnits||
""==this.topInUnits?"hidden":"visible",this.eBottom=document.createElement("div"),this.eBottom.className=this.displayClass+"Bottom",this.div.appendChild(this.eBottom),this.eBottom.style.visibility=""==this.bottomOutUnits||""==this.bottomInUnits?"hidden":"visible";this.map.events.register("moveend",this,this.update);this.update();return this.div},getBarLen:function(a){var b=parseInt(Math.log(a)/Math.log(10)),b=Math.pow(10,b),a=parseInt(a/b);return(5<a?5:2<a?2:1)*b},update:function(){var a=this.map.getResolution();
if(a){var b=this.map.getUnits(),c=OpenLayers.INCHES_PER_UNIT,d=this.maxWidth*a*c[b],e=1;!0===this.geodesic&&(e=(this.map.getGeodesicPixelSize().w||1.0E-6)*this.maxWidth/(d/c.km),d*=e);var f,g;1E5<d?(f=this.topOutUnits,g=this.bottomOutUnits):(f=this.topInUnits,g=this.bottomInUnits);var h=d/c[f],j=d/c[g],d=this.getBarLen(h),k=this.getBarLen(j),h=d/c[b]*c[f],j=k/c[b]*c[g],b=h/a/e,a=j/a/e;if("visible"==this.eBottom.style.visibility)this.eBottom.style.width=Math.round(a)+"px",this.eBottom.innerHTML=k+
" "+g;if("visible"==this.eTop.style.visibility)this.eTop.style.width=Math.round(b)+"px",this.eTop.innerHTML=d+" "+f}},CLASS_NAME:"OpenLayers.Control.ScaleLine"});OpenLayers.Control.ZoomIn=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_BUTTON,trigger:function(){this.map.zoomIn()},CLASS_NAME:"OpenLayers.Control.ZoomIn"});OpenLayers.Control.ZoomOut=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_BUTTON,trigger:function(){this.map.zoomOut()},CLASS_NAME:"OpenLayers.Control.ZoomOut"});
OpenLayers.Control.ZoomToMaxExtent=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_BUTTON,trigger:function(){this.map&&this.map.zoomToMaxExtent()},CLASS_NAME:"OpenLayers.Control.ZoomToMaxExtent"});
OpenLayers.Event={observers:!1,KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(a){return a.target||a.srcElement},isLeftClick:function(a){return a.which&&1==a.which||a.button&&1==a.button},isRightClick:function(a){return a.which&&3==a.which||a.button&&2==a.button},stop:function(a,b){if(!b)a.preventDefault?a.preventDefault():a.returnValue=!1;a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},findElement:function(a,
b){for(var c=OpenLayers.Event.element(a);c.parentNode&&(!c.tagName||c.tagName.toUpperCase()!=b.toUpperCase());)c=c.parentNode;return c},observe:function(a,b,c,d){a=OpenLayers.Util.getElement(a);d=d||!1;if("keypress"==b&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||a.attachEvent))b="keydown";if(!this.observers)this.observers={};if(!a._eventCacheID){var e="eventCacheID_";a.id&&(e=a.id+"_"+e);a._eventCacheID=OpenLayers.Util.createUniqueID(e)}e=a._eventCacheID;this.observers[e]||(this.observers[e]=
[]);this.observers[e].push({element:a,name:b,observer:c,useCapture:d});a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},stopObservingElement:function(a){a=OpenLayers.Util.getElement(a)._eventCacheID;this._removeElementObservers(OpenLayers.Event.observers[a])},_removeElementObservers:function(a){if(a)for(var b=a.length-1;0<=b;b--){var c=a[b];OpenLayers.Event.stopObserving.apply(this,[c.element,c.name,c.observer,c.useCapture])}},stopObserving:function(a,b,c,d){var d=
d||!1,a=OpenLayers.Util.getElement(a),e=a._eventCacheID;if("keypress"==b&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||a.detachEvent))b="keydown";var f=!1,g=OpenLayers.Event.observers[e];if(g)for(var h=0;!f&&h<g.length;){var j=g[h];if(j.name==b&&j.observer==c&&j.useCapture==d){g.splice(h,1);0==g.length&&delete OpenLayers.Event.observers[e];f=!0;break}h++}f&&(a.removeEventListener?a.removeEventListener(b,c,d):a&&a.detachEvent&&a.detachEvent("on"+b,c));return f},unloadCache:function(){if(OpenLayers.Event&&
OpenLayers.Event.observers){for(var a in OpenLayers.Event.observers)OpenLayers.Event._removeElementObservers.apply(this,[OpenLayers.Event.observers[a]]);OpenLayers.Event.observers=!1}},CLASS_NAME:"OpenLayers.Event"};OpenLayers.Event.observe(window,"unload",OpenLayers.Event.unloadCache,!1);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".split(","),listeners:null,object:null,element:null,eventTypes:null,eventHandler:null,fallThrough:null,includeXY:!1,clearMouseListener:null,initialize:function(a,b,c,d,e){OpenLayers.Util.extend(this,e);this.object=a;this.fallThrough=d;this.listeners={};this.eventHandler=OpenLayers.Function.bindAsEventListener(this.handleBrowserEvent,this);this.clearMouseListener=
OpenLayers.Function.bind(this.clearMouseCache,this);this.eventTypes=[];if(null!=c){a=0;for(d=c.length;a<d;a++)this.addEventType(c[a])}null!=b&&this.attachToElement(b)},destroy:function(){this.element&&(OpenLayers.Event.stopObservingElement(this.element),this.element.hasScrollEvent&&OpenLayers.Event.stopObserving(window,"scroll",this.clearMouseListener));this.eventHandler=this.fallThrough=this.eventTypes=this.object=this.listeners=this.element=null},addEventType:function(a){this.listeners[a]||(this.eventTypes.push(a),
this.listeners[a]=[])},attachToElement:function(a){this.element&&OpenLayers.Event.stopObservingElement(this.element);this.element=a;for(var b=0,c=this.BROWSER_EVENTS.length;b<c;b++){var d=this.BROWSER_EVENTS[b];this.addEventType(d);OpenLayers.Event.observe(a,d,this.eventHandler)}OpenLayers.Event.observe(a,"dragstart",OpenLayers.Event.stop)},on:function(a){for(var b in a)"scope"!=b&&this.register(b,a.scope,a[b])},register:function(a,b,c){if(null!=c&&-1!=OpenLayers.Util.indexOf(this.eventTypes,a)){if(null==
b)b=this.object;this.listeners[a].push({obj:b,func:c})}},registerPriority:function(a,b,c){if(null!=c){if(null==b)b=this.object;a=this.listeners[a];null!=a&&a.unshift({obj:b,func:c})}},un:function(a){for(var b in a)"scope"!=b&&this.unregister(b,a.scope,a[b])},unregister:function(a,b,c){if(null==b)b=this.object;a=this.listeners[a];if(null!=a)for(var d=0,e=a.length;d<e;d++)if(a[d].obj==b&&a[d].func==c){a.splice(d,1);break}},remove:function(a){null!=this.listeners[a]&&(this.listeners[a]=[])},triggerEvent:function(a,
b){var c=this.listeners[a];if(c&&0!=c.length){null==b&&(b={});b.object=this.object;b.element=this.element;if(!b.type)b.type=a;for(var c=c.slice(),d,e=0,f=c.length;e<f&&!(d=c[e],d=d.func.apply(d.obj,[b]),void 0!=d&&!1==d);e++);this.fallThrough||OpenLayers.Event.stop(b,!0);return d}},handleBrowserEvent:function(a){if(this.includeXY)a.xy=this.getMousePosition(a);this.triggerEvent(a.type,a)},clearMouseCache:function(){this.element.scrolls=null;this.element.lefttop=null;this.element.offsets=null},getMousePosition:function(a){if(this.includeXY){if(!this.element.hasScrollEvent)OpenLayers.Event.observe(window,
"scroll",this.clearMouseListener),this.element.hasScrollEvent=!0}else this.clearMouseCache();if(!this.element.scrolls)this.element.scrolls=[document.documentElement.scrollLeft||document.body.scrollLeft,document.documentElement.scrollTop||document.body.scrollTop];if(!this.element.lefttop)this.element.lefttop=[document.documentElement.clientLeft||0,document.documentElement.clientTop||0];if(!this.element.offsets)this.element.offsets=OpenLayers.Util.pagePosition(this.element),this.element.offsets[0]+=
this.element.scrolls[0],this.element.offsets[1]+=this.element.scrolls[1];return new OpenLayers.Pixel(a.clientX+this.element.scrolls[0]-this.element.offsets[0]-this.element.lefttop[0],a.clientY+this.element.scrolls[1]-this.element.offsets[1]-this.element.lefttop[1])},CLASS_NAME:"OpenLayers.Events"});
OpenLayers.Format=OpenLayers.Class({options:null,externalProjection:null,internalProjection:null,data:null,keepData:!1,initialize:function(a){OpenLayers.Util.extend(this,a);this.options=a},destroy:function(){},read:function(){OpenLayers.Console.userError(OpenLayers.i18n("readNotImplemented"))},write:function(){OpenLayers.Console.userError(OpenLayers.i18n("writeNotImplemented"))},CLASS_NAME:"OpenLayers.Format"});
OpenLayers.Lang.ar=OpenLayers.Util.applyDefaults({permalink:"\u0648\u0635\u0644\u0629 \u062f\u0627\u0626\u0645\u0629",baseLayer:"\u0627\u0644\u0637\u0628\u0642\u0629 \u0627\u0644\u0627\u0633\u0627\u0633\u064a\u0629",readNotImplemented:"\u0627\u0644\u0642\u0631\u0627\u0621\u0629 \u063a\u064a\u0631 \u0645\u062d\u0642\u0642\u0629.",writeNotImplemented:"\u0627\u0644\u0643\u062a\u0627\u0628\u0629 \u063a\u064a\u0631 \u0645\u062d\u0642\u0642\u0629",errorLoadingGML:"\u062e\u0637\u0623 \u0639\u0646\u062f \u062a\u062d\u0645\u064a\u0644 \u0627\u0644\u0645\u0644\u0641 \u062c\u064a \u0627\u0645 \u0627\u0644 ${url}",
scale:"\u0627\u0644\u0646\u0633\u0628\u0629 = 1 : ${scaleDenom}",W:"\u063a",E:"\u0634\u0631",N:"\u0634\u0645",S:"\u062c"});
OpenLayers.Lang["be-tarask"]=OpenLayers.Util.applyDefaults({unhandledRequest:"\u041d\u0435\u0430\u043f\u0440\u0430\u0446\u0430\u0432\u0430\u043d\u044b \u0432\u044b\u043d\u0456\u043a \u0437\u0430\u043f\u044b\u0442\u0443 ${statusText}",permalink:"\u0421\u0442\u0430\u043b\u0430\u044f \u0441\u043f\u0430\u0441\u044b\u043b\u043a\u0430",overlays:"\u0421\u043b\u0430\u0456",baseLayer:"\u0411\u0430\u0437\u0430\u0432\u044b \u0441\u043b\u043e\u0439",sameProjection:"\u0410\u0433\u043b\u044f\u0434\u043d\u0430\u044f \u043c\u0430\u043f\u0430 \u043f\u0440\u0430\u0446\u0443\u0435 \u0442\u043e\u043b\u044c\u043a\u0456 \u043a\u0430\u043b\u0456 \u044f\u043d\u0430 \u043c\u0430\u0435 \u0442\u0443\u044e \u0436 \u043f\u0440\u0430\u0435\u043a\u0446\u044b\u044e, \u0448\u0442\u043e \u0456 \u0430\u0441\u043d\u043e\u045e\u043d\u0430\u044f \u043c\u0430\u043f\u0430",
readNotImplemented:"\u0424\u0443\u043d\u043a\u0446\u044b\u044f\u043d\u0430\u043b\u044c\u043d\u0430\u0441\u044c\u0446\u044c \u0447\u044b\u0442\u0430\u043d\u044c\u043d\u044f \u043d\u044f \u0441\u0442\u0432\u043e\u0440\u0430\u043d\u0430\u044f.",writeNotImplemented:"\u0424\u0443\u043d\u043a\u0446\u044b\u044f\u043d\u0430\u043b\u044c\u043d\u0430\u0441\u044c\u0446\u044c \u0437\u0430\u043f\u0456\u0441\u0443 \u043d\u044f \u0441\u0442\u0432\u043e\u0440\u0430\u043d\u0430\u044f.",noFID:"\u041d\u0435\u043c\u0430\u0433\u0447\u044b\u043c\u0430 \u0430\u0431\u043d\u0430\u0432\u0456\u0446\u044c \u043c\u0430\u0433\u0447\u044b\u043c\u0430\u0441\u044c\u0446\u044c, \u0434\u043b\u044f \u044f\u043a\u043e\u0433\u0430 \u043d\u0435 \u0456\u0441\u043d\u0443\u0435 FID.",
errorLoadingGML:"\u041f\u0430\u043c\u044b\u043b\u043a\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0456 \u0444\u0430\u0439\u043b\u0430 GML ${url}",browserNotSupported:"\u0412\u0430\u0448 \u0431\u0440\u0430\u045e\u0437\u044d\u0440 \u043d\u0435 \u043f\u0430\u0434\u0442\u0440\u044b\u043c\u043b\u0456\u0432\u0430\u0435 \u0432\u044d\u043a\u0442\u0430\u0440\u043d\u0443\u044e \u0433\u0440\u0430\u0444\u0456\u043a\u0443. \u0423 \u0446\u044f\u043f\u0435\u0440\u0430\u0448\u043d\u0456 \u043c\u043e\u043c\u0430\u043d\u0442 \u043f\u0430\u0434\u0442\u0440\u044b\u043c\u043b\u0456\u0432\u0430\u044e\u0446\u0446\u0430: ${renderers}",
componentShouldBe:"addFeatures : \u043a\u0430\u043c\u043f\u0430\u043d\u044d\u043d\u0442 \u043f\u0430\u0432\u0456\u043d\u0435\u043d \u0431\u044b\u0446\u044c ${geomType}",getFeatureError:"getFeatureFromEvent \u0432\u044b\u043a\u043b\u0456\u043a\u0430\u043d\u044b \u0434\u043b\u044f \u0441\u043b\u043e\u044f \u0431\u044f\u0437 \u0440\u044d\u043d\u0434\u044d\u0440\u0443. \u0417\u0432\u044b\u0447\u0430\u0439\u043d\u0430 \u0433\u044d\u0442\u0430 \u0430\u0437\u043d\u0430\u0447\u0430\u0435, \u0448\u0442\u043e \u0412\u044b \u0437\u044c\u043d\u0456\u0448\u0447\u044b\u043b\u0456 \u0441\u043b\u043e\u0439, \u0430\u043b\u0435 \u043f\u0430\u043a\u0456\u043d\u0443\u043b\u0456 \u0437\u044c\u0432\u044f\u0437\u0430\u043d\u044b \u0437\u044c \u0456\u043c \u0430\u043f\u0440\u0430\u0446\u043e\u045e\u0448\u0447\u044b\u043a.",
minZoomLevelError:"\u0423\u043b\u0430\u0441\u044c\u0446\u0456\u0432\u0430\u0441\u044c\u0446\u044c minZoomLevel \u043f\u0440\u044b\u0437\u043d\u0430\u0447\u0430\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u0456 \u0434\u043b\u044f \u0432\u044b\u043a\u0430\u0440\u044b\u0441\u0442\u0430\u043d\u044c\u043d\u044f \u0441\u0430 \u0441\u043b\u0430\u044f\u043c\u0456 \u0432\u044b\u0442\u0432\u043e\u0440\u043d\u044b\u043c\u0456 \u0430\u0434 FixedZoomLevels. \u0422\u043e\u0435, \u0448\u0442\u043e  \u0433\u044d\u0442\u044b wfs-\u0441\u043b\u043e\u0439 \u043f\u0440\u0430\u0432\u044f\u0440\u0430\u0435\u0446\u0446\u0430 \u043d\u0430 minZoomLevel \u2014 \u0440\u044d\u0445\u0430 \u043f\u0440\u043e\u0448\u043b\u0430\u0433\u0430. \u0410\u043b\u0435 \u043c\u044b \u043d\u044f \u043c\u043e\u0436\u0430\u043c \u0432\u044b\u0434\u0430\u043b\u0456\u0446\u044c \u0433\u044d\u0442\u0443\u044e \u043c\u0430\u0433\u0447\u044b\u043c\u0430\u0441\u044c\u0446\u044c, \u0442\u0430\u043c\u0443 \u0448\u0442\u043e \u0430\u0434 \u044f\u0435 \u0437\u0430\u043b\u0435\u0436\u0430\u0446\u044c \u043d\u0435\u043a\u0430\u0442\u043e\u0440\u044b\u044f \u0437\u0430\u0441\u043d\u0430\u0432\u0430\u043d\u044b\u044f \u043d\u0430 OL \u0434\u0430\u0441\u0442\u0430\u0441\u0430\u0432\u0430\u043d\u044c\u043d\u0456. \u0422\u044b\u043c \u043d\u044f \u043c\u0435\u043d\u0448, \u043f\u0440\u0430\u0432\u0435\u0440\u043a\u0430 minZoomLevel \u0431\u0443\u0434\u0437\u0435 \u0432\u044b\u0434\u0430\u043b\u0435\u043d\u0430\u044f \u045e \u0432\u044d\u0440\u0441\u0456\u0456 3.0. \u041a\u0430\u043b\u0456 \u043b\u0430\u0441\u043a\u0430, \u0432\u044b\u043a\u0430\u0440\u044b\u0441\u0442\u043e\u045e\u0432\u0430\u0435\u0446\u0435 \u0437\u0430\u043c\u0435\u0441\u0442 \u044f\u0435 \u045e\u0441\u0442\u0430\u043d\u043e\u045e\u043a\u0456 \u043c\u0456\u043d\u0456\u043c\u0430\u043b\u044c\u043d\u0430\u0433\u0430/\u043c\u0430\u043a\u0441\u044b\u043c\u0430\u043b\u044c\u043d\u0430\u0433\u0430 \u043f\u0430\u043c\u0435\u0440\u0430\u045e, \u044f\u043a \u0430\u043f\u0456\u0441\u0430\u043d\u0430 \u0442\u0443\u0442: http://trac.openlayers.org/wiki/SettingZoomLevels",
commitSuccess:"WFS-\u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u044b\u044f: \u041f\u041e\u0421\u042c\u041f\u0415\u0425 ${response}",commitFailed:"WFS-\u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u044b\u044f: \u041f\u0410\u041c\u042b\u041b\u041a\u0410 ${response}",googleWarning:"\u041d\u0435 \u0430\u0442\u0440\u044b\u043c\u0430\u043b\u0430\u0441\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u0456\u0446\u044c \u0441\u043b\u043e\u0439 Google. <br><br>\u041a\u0430\u0431 \u043f\u0430\u0437\u0431\u0430\u0432\u0456\u0446\u0446\u0430 \u0433\u044d\u0442\u0430\u0433\u0430 \u043f\u0430\u0432\u0435\u0434\u0430\u043c\u043b\u0435\u043d\u044c\u043d\u044f, \u0432\u044b\u0431\u0435\u0440\u044b\u0446\u0435 \u043d\u043e\u0432\u044b \u0431\u0430\u0437\u0430\u0432\u044b \u0441\u043b\u043e\u0439 \u0443 \u0441\u044c\u043f\u0456\u0441\u0435 \u045e \u0432\u0435\u0440\u0445\u043d\u0456\u043c \u043f\u0440\u0430\u0432\u044b\u043c \u043a\u0443\u0446\u0435.<br><br> \u0425\u0443\u0442\u0447\u044d\u0439 \u0437\u0430 \u045e\u0441\u0451, \u043f\u0440\u044b\u0447\u044b\u043d\u0430 \u045e \u0442\u044b\u043c, \u0448\u0442\u043e \u0441\u043a\u0440\u044b\u043f\u0442 \u0431\u0456\u0431\u043b\u0456\u044f\u0442\u044d\u043a\u0456 Google Maps \u043d\u044f \u0431\u044b\u045e \u0443\u043a\u043b\u044e\u0447\u0430\u043d\u044b\u044f \u0430\u043b\u044c\u0431\u043e \u043d\u0435 \u045e\u0442\u0440\u044b\u043c\u043b\u0456\u0432\u0430\u0435 \u0441\u043b\u0443\u0448\u043d\u044b API-\u043a\u043b\u044e\u0447 \u0434\u043b\u044f \u0412\u0430\u0448\u0430\u0433\u0430 \u0441\u0430\u0439\u0442\u0430.<br><br>\u0420\u0430\u0441\u043f\u0440\u0430\u0446\u043e\u045e\u0448\u0447\u044b\u043a\u0430\u043c: \u0414\u043b\u044f \u0442\u0430\u0433\u043e, \u043a\u0430\u0431 \u0434\u0430\u0432\u0435\u0434\u0430\u0446\u0446\u0430 \u044f\u043a \u0437\u0440\u0430\u0431\u0456\u0446\u044c \u0442\u0430\u043a, \u043a\u0430\u0431 \u0443\u0441\u0451 \u043f\u0440\u0430\u0446\u0430\u0432\u0430\u043b\u0430, <a href='http://trac.openlayers.org/wiki/Google' target='_blank'>\u043d\u0430\u0446\u0456\u0441\u044c\u043d\u0456\u0446\u0435 \u0442\u0443\u0442</a>",
getLayerWarning:"\u041d\u0435\u043c\u0430\u0433\u0447\u044b\u043c\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u0456\u0446\u044c \u0441\u043b\u043e\u0439 ${layerType}.<br><br>\u041a\u0430\u0431 \u043f\u0430\u0437\u0431\u0430\u0432\u0456\u0446\u0446\u0430 \u0433\u044d\u0442\u0430\u0433\u0430 \u043f\u0430\u0432\u0435\u0434\u0430\u043c\u043b\u0435\u043d\u044c\u043d\u044f, \u0432\u044b\u0431\u0435\u0440\u044b\u0446\u0435 \u043d\u043e\u0432\u044b \u0431\u0430\u0437\u0430\u0432\u044b \u0441\u043b\u043e\u0439 \u0443 \u0441\u044c\u043f\u0456\u0441\u0435 \u045e \u0432\u0435\u0440\u0445\u043d\u0456\u043c \u043f\u0440\u0430\u0432\u044b\u043c \u043a\u0443\u0446\u0435.<br><br>\u0425\u0443\u0442\u0447\u044d\u0439 \u0437\u0430 \u045e\u0441\u0451, \u043f\u0440\u044b\u0447\u044b\u043d\u0430 \u045e \u0442\u044b\u043c, \u0448\u0442\u043e \u0441\u043a\u0440\u044b\u043f\u0442 \u0431\u0456\u0431\u043b\u0456\u044f\u0442\u044d\u043a\u0456 ${layerLib} \u043d\u044f \u0431\u044b\u045e \u0441\u043b\u0443\u0448\u043d\u0430 \u045e\u043a\u043b\u044e\u0447\u0430\u043d\u044b.<br><br>\u0420\u0430\u0441\u043f\u0440\u0430\u0446\u043e\u045e\u0448\u0447\u044b\u043a\u0430\u043c: \u0414\u043b\u044f \u0442\u0430\u0433\u043e, \u043a\u0430\u0431 \u0434\u0430\u0432\u0435\u0434\u0430\u0446\u0446\u0430 \u044f\u043a \u0437\u0440\u0430\u0431\u0456\u0446\u044c \u0442\u0430\u043a, \u043a\u0430\u0431 \u0443\u0441\u0451 \u043f\u0440\u0430\u0446\u0430\u0432\u0430\u043b\u0430, <a href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'>\u043d\u0430\u0446\u0456\u0441\u044c\u043d\u0456\u0446\u0435 \u0442\u0443\u0442</a>",
scale:"\u041c\u0430\u0448\u0442\u0430\u0431 = 1 : ${scaleDenom}",W:"\u0417",E:"\u0423",N:"\u041f\u043d",S:"\u041f\u0434",layerAlreadyAdded:"\u0412\u044b \u043f\u0430\u0441\u043f\u0440\u0430\u0431\u0430\u0432\u0430\u043b\u0456 \u0434\u0430\u0434\u0430\u0446\u044c \u0441\u043b\u043e\u0439 ${layerName} \u043d\u0430 \u043c\u0430\u043f\u0443, \u0430\u043b\u0435 \u0451\u043d \u0443\u0436\u043e \u0434\u0430\u0434\u0430\u0434\u0437\u0435\u043d\u044b",reprojectDeprecated:"\u0412\u044b \u0432\u044b\u043a\u0430\u0440\u044b\u0441\u0442\u043e\u045e\u0432\u0430\u0435\u0446\u0435 \u045e\u0441\u0442\u0430\u043d\u043e\u045e\u043a\u0443 'reproject' \u0434\u043b\u044f \u0441\u043b\u043e\u044f ${layerName}. \u0413\u044d\u0442\u0430\u044f \u045e\u0441\u0442\u0430\u043d\u043e\u045e\u043a\u0430 \u0437\u044c\u044f\u045e\u043b\u044f\u0435\u0446\u0446\u0430 \u0441\u0430\u0441\u0442\u0430\u0440\u044d\u043b\u0430\u0439: \u044f\u043d\u0430 \u0432\u044b\u043a\u0430\u0440\u044b\u0441\u0442\u043e\u045e\u0432\u0430\u043b\u0430\u0441\u044f \u0434\u043b\u044f \u043f\u0430\u0434\u0442\u0440\u044b\u043c\u043a\u0456 \u043f\u0430\u043a\u0430\u0437\u0443 \u0437\u044c\u0432\u0435\u0441\u0442\u0430\u043a \u043d\u0430 \u043a\u0430\u043c\u044d\u0440\u0446\u044b\u0439\u043d\u044b\u0445 \u0431\u0430\u0437\u0430\u0432\u044b\u0445 \u043c\u0430\u043f\u0430\u0445, \u0430\u043b\u0435 \u0433\u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u044b\u044f \u0446\u044f\u043f\u0435\u0440 \u0440\u044d\u0430\u043b\u0456\u0437\u0430\u0432\u0430\u043d\u0430\u044f \u045e \u0443\u0431\u0443\u0434\u0430\u0432\u0430\u043d\u0430\u0439 \u043f\u0430\u0434\u0442\u0440\u044b\u043c\u0446\u044b \u0441\u0444\u044d\u0440\u044b\u0447\u043d\u0430\u0439 \u043f\u0440\u0430\u0435\u043a\u0446\u044b\u0456 \u041c\u044d\u0440\u043a\u0430\u0442\u0430\u0440\u0430. \u0414\u0430\u0434\u0430\u0442\u043a\u043e\u0432\u0430\u044f \u0456\u043d\u0444\u0430\u0440\u043c\u0430\u0446\u044b\u044f \u0451\u0441\u044c\u0446\u044c \u043d\u0430 http://trac.openlayers.org/wiki/SphericalMercator.",
methodDeprecated:"\u0413\u044d\u0442\u044b \u043c\u044d\u0442\u0430\u0434 \u0441\u0430\u0441\u0442\u0430\u0440\u044d\u043b\u044b \u0456 \u0431\u0443\u0434\u0437\u0435 \u0432\u044b\u0434\u0430\u043b\u0435\u043d\u044b \u045e \u0432\u044d\u0440\u0441\u0456\u0456 3.0. \u041a\u0430\u043b\u0456 \u043b\u0430\u0441\u043a\u0430, \u0437\u0430\u043c\u0435\u0441\u0442 \u044f\u0433\u043e \u0432\u044b\u043a\u0430\u0440\u044b\u0441\u0442\u043e\u045e\u0432\u0430\u0439\u0446\u0435 ${newMethod}.",boundsAddError:"\u0412\u0430\u043c \u043d\u0435\u0430\u0431\u0445\u043e\u0434\u043d\u0430 \u043f\u0430\u0434\u0430\u0446\u044c \u0430\u0431\u043e\u0434\u0432\u0430 \u0437\u043d\u0430\u0447\u044d\u043d\u044c\u043d\u0456 x \u0456 y \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u044b\u0456 \u0441\u043a\u043b\u0430\u0434\u0430\u043d\u044c\u043d\u044f.",
lonlatAddError:"\u0412\u0430\u043c \u043d\u0435\u0430\u0431\u0445\u043e\u0434\u043d\u0430 \u043f\u0430\u0434\u0430\u0446\u044c \u0430\u0431\u043e\u0434\u0432\u0430 \u0437\u043d\u0430\u0447\u044d\u043d\u044c\u043d\u0456 lon \u0456 lat \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u044b\u0456 \u0441\u043a\u043b\u0430\u0434\u0430\u043d\u044c\u043d\u044f.",pixelAddError:"\u0412\u0430\u043c \u043d\u0435\u0430\u0431\u0445\u043e\u0434\u043d\u0430 \u043f\u0430\u0434\u0430\u0446\u044c \u0430\u0431\u043e\u0434\u0432\u0430 \u0437\u043d\u0430\u0447\u044d\u043d\u044c\u043d\u0456 x \u0456 y \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u044b\u0456 \u0441\u043a\u043b\u0430\u0434\u0430\u043d\u044c\u043d\u044f.",
unsupportedGeometryType:"\u0422\u044b\u043f \u0433\u0435\u0430\u043c\u044d\u0442\u0440\u044b\u0456 \u043d\u0435 \u043f\u0430\u0434\u0442\u0440\u044b\u043c\u043b\u0456\u0432\u0430\u0435\u0446\u0446\u0430: ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition failed: \u0432\u0435\u0440\u0430\u0433\u043e\u0434\u043d\u0430 \u044d\u043b\u0435\u043c\u044d\u043d\u0442 \u0437 \u0456\u0434\u044d\u043d\u0442\u044b\u0444\u0456\u043a\u0430\u0442\u0430\u0440\u0430\u043c ${elemId} \u0437\u0430\u0439\u043c\u0430\u0435 \u043d\u044f\u0441\u043b\u0443\u0448\u043d\u0430\u0435 \u043c\u0435\u0441\u0446\u0430.",
filterEvaluateNotImplemented:"evaluate \u043d\u0435 \u0440\u044d\u0430\u043b\u0456\u0437\u0430\u0432\u0430\u043d\u044b \u0434\u043b\u044f \u0433\u044d\u0442\u0430\u0433\u0430 \u0442\u044b\u043f\u0443 \u0444\u0456\u043b\u044c\u0442\u0440\u0443."});
OpenLayers.Lang.bg=OpenLayers.Util.applyDefaults({permalink:"\u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0430 \u043f\u0440\u0435\u043f\u0440\u0430\u0442\u043a\u0430",baseLayer:"\u041e\u0441\u043d\u043e\u0432\u0435\u043d \u0441\u043b\u043e\u0439",errorLoadingGML:"\u0413\u0440\u0435\u0448\u043a\u0430 \u043f\u0440\u0438 \u0437\u0430\u0440\u0435\u0436\u0434\u0430\u043d\u0435 \u043d\u0430 GML \u0444\u0430\u0439\u043b ${url}",scale:"\u041c\u0430\u0449\u0430\u0431 = 1 : ${scaleDenom}",layerAlreadyAdded:"\u041e\u043f\u0438\u0442\u0430\u0445\u0442\u0435 \u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0435 \u0441\u043b\u043e\u0439 ${layerName} \u0432 \u043a\u0430\u0440\u0442\u0430\u0442\u0430, \u043d\u043e \u0442\u043e\u0439 \u0432\u0435\u0447\u0435 \u0435 \u0434\u043e\u0431\u0430\u0432\u0435\u043d",
methodDeprecated:"\u0422\u043e\u0437\u0438 \u043c\u0435\u0442\u043e\u0434 \u0435 \u043e\u0441\u0442\u0430\u0440\u044f\u043b \u0438 \u0449\u0435 \u0431\u044a\u0434\u0435 \u043f\u0440\u0435\u043c\u0430\u0445\u0432\u0430\u0442 \u0432 3.0. \u0412\u043c\u0435\u0441\u0442\u043e \u043d\u0435\u0433\u043e \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439\u0442\u0435 ${newMethod}."});
OpenLayers.Lang.br=OpenLayers.Util.applyDefaults({unhandledRequest:"Distro evel reked anveret ${statusText}",permalink:"Peurliamm",overlays:"Gwiskado\u00f9",baseLayer:"Gwiskad diazez",sameProjection:"Ne'z ar gartenn lec'hia\u00f1 en-dro nemet pa vez he\u00f1vel ar banndres anezhi ha hini ar gartenn benna\u00f1",readNotImplemented:"N'eo ket emplementet al lenn.",writeNotImplemented:"N'eo ket emplementet ar skriva\u00f1.",noFID:"N'haller ket hizivaat un elfenn ma n'eus ket a niverenn-anaout (FID) eviti.",
errorLoadingGML:"Fazi e-ser karga\u00f1 ar restr GML ${url}",browserNotSupported:"N'eo ket skoret an daskor vektorel gant ho merdeer. Setu aze an daskorerio\u00f9 skoret evit ar poent :\n${renderers}",componentShouldBe:"addFeatures : bez' e tlefe ar parzh besa\u00f1 eus ar seurt ${geomType}",getFeatureError:"Galvet eo bet getFeatureFromEvent called war ur gwiskad hep daskorer. Kement-se a dalvez ez eus bet freuzet ur gwiskad hag hoc'h eus miret un embreger bennak stag outa\u00f1.",minZoomLevelError:"Ne zleer implijout ar perzh minZoomLevel nemet evit gwiskado\u00f9 FixedZoomLevels-descendent. Ar fed ma wiria ar gwiskad WHS-se hag-e\u00f1 ez eus eus minZoomLevel zo un aspadenn gozh. Koulskoude n'omp ket evit e ziverka\u00f1 kuit da derri\u00f1 arloado\u00f9 diazezet war OL a c'hallfe beza\u00f1 stag outa\u00f1. Setu perak eo dispredet -- Lamet kuit e vo ar gwiria\u00f1 minZoomLevel a-is er stumm 3.0. Ober gant an arventenno\u00f9 bihana\u00f1/brasa\u00f1 evel deskrivet ama\u00f1 e plas : http://trac.openlayers.org/wiki/SettingZoomLevels",
commitSuccess:"Treuzgread WFS : MAT EO ${response}",commitFailed:"Treuzgread WFS Transaction: C'HWITET ${response}",googleWarning:"N'eus ket bet gallet karga\u00f1 ar gwiskad Google ent reizh.<br><br>Evit en em zizober eus ar c'hemenn-ma\u00f1, dibabit ur BaseLayer nevez en diuzer gwiskado\u00f9 er c'horn deho\u00f9 el laez.<br><br>Sur a-walc'h eo peogwir n'eo ket bet ensoc'het levraoueg Google Maps pe neuze ne glot ket an alc'hwez API gant ho lec'hienn.<br><br>Diorroerien : Evit reizha\u00f1 an dra-se, <a href='http://trac.openlayers.org/wiki/Google' target='_blank'>click here</a>",
getLayerWarning:"N'haller ket karga\u00f1 ar gwiskad ${layerType} ent reizh.<br><br>Evit en em zizober eus ar c'hemenn-ma\u00f1, dibabit ur BaseLayer nevez en diuzer gwiskado\u00f9 er c'horn deho\u00f9 el laez.<br><br>Sur a-walc'h eo peogwir n'eo ket bet ensoc'het mat al levraoueg ${layerLib}.<br><br>Diorroerien : Evit gouzout penaos reizha\u00f1 an dra-se, <a href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'>click here</a>",scale:"Skeul = 1 : ${scaleDenom}",W:"K",E:"R",N:"N",S:"S",
layerAlreadyAdded:"Klasket hoc'h eus ouzhpenna\u00f1 ar gwiskad : ${layerName} d'ar gartenn, met ouzhpennet e oa bet c'hoazh",reprojectDeprecated:"Emaoc'h oc'h implijout an dibarzh 'reproject' war ar gwiskad ${layerName}. Dispredet eo an dibarzh-ma\u00f1 : bet eo hag e talveze da ziskwel roadenno\u00f9 war-c'horre kartenno\u00f9 diazez kenwerzhel, un dra hag a c'haller ober brema\u00f1 gant an arc'hwel dre skor banndres boullek Mercator. Muioc'h a ditouro\u00f9 a c'haller da gaout war http://trac.openlayers.org/wiki/SphericalMercator.",
methodDeprecated:"Dispredet eo an daore-se ha tennet e vo kuit eus ar stumm 3.0. Grit gant ${newMethod} e plas.",boundsAddError:"Rekis eo tremen an div dalvoudenn x ha y d'an arc'hwel add.",lonlatAddError:"Rekis eo tremen an div dalvoudenn hedred ha ledred d'an arc'hwel add.",pixelAddError:"Rekis eo tremen an div dalvoudenn x ha y d'an arc'hwel add.",unsupportedGeometryType:"Seurt mentoniezh anskoret : ${geomType}",pagePositionFailed:"C'hwitet eo OpenLayers.Util.pagePosition : marteze ema\u00f1 lec'hiet fall an elfenn id ${elemId}.",
filterEvaluateNotImplemented:"N'eo ket bet emplementet ar prizia\u00f1 evit seurt silo\u00f9 c'hoazh."});OpenLayers.Lang.el=OpenLayers.Util.applyDefaults({scale:"\u039a\u03bb\u03af\u03bc\u03b1\u03ba\u03b1 ~ 1 : ${scaleDenom}"});
OpenLayers.Lang.en={unhandledRequest:"Unhandled request return ${statusText}",permalink:"Permalink",overlays:"Overlays",baseLayer:"Base Layer",sameProjection:"The overview map only works when it is in the same projection as the main map",readNotImplemented:"Read not implemented.",writeNotImplemented:"Write not implemented.",noFID:"Can't update a feature for which there is no FID.",errorLoadingGML:"Error in loading GML file ${url}",browserNotSupported:"Your browser does not support vector rendering. Currently supported renderers are:\n${renderers}",
componentShouldBe:"addFeatures : component should be an ${geomType}",getFeatureError:"getFeatureFromEvent called on layer with no renderer. This usually means you destroyed a layer, but not some handler which is associated with it.",minZoomLevelError:"The minZoomLevel property is only intended for use with the FixedZoomLevels-descendent layers. That this wfs layer checks for minZoomLevel is a relic of thepast. We cannot, however, remove it without possibly breaking OL based applications that may depend on it. Therefore we are deprecating it -- the minZoomLevel check below will be removed at 3.0. Please instead use min/max resolution setting as described here: http://trac.openlayers.org/wiki/SettingZoomLevels",
commitSuccess:"WFS Transaction: SUCCESS ${response}",commitFailed:"WFS Transaction: FAILED ${response}",googleWarning:"The Google Layer was unable to load correctly.<br><br>To get rid of this message, select a new BaseLayer in the layer switcher in the upper-right corner.<br><br>Most likely, this is because the Google Maps library script was either not included, or does not contain the correct API key for your site.<br><br>Developers: For help getting this working correctly, <a href='http://trac.openlayers.org/wiki/Google' target='_blank'>click here</a>",
getLayerWarning:"The ${layerType} Layer was unable to load correctly.<br><br>To get rid of this message, select a new BaseLayer in the layer switcher in the upper-right corner.<br><br>Most likely, this is because the ${layerLib} library script was not correctly included.<br><br>Developers: For help getting this working correctly, <a href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'>click here</a>",scale:"Scale = 1 : ${scaleDenom}",W:"W",E:"E",N:"N",S:"S",graticule:"Graticule",layerAlreadyAdded:"You tried to add the layer: ${layerName} to the map, but it has already been added",
reprojectDeprecated:"You are using the 'reproject' option on the ${layerName} layer. This option is deprecated: its use was designed to support displaying data over commercial basemaps, but that functionality should now be achieved by using Spherical Mercator support. More information is available from http://trac.openlayers.org/wiki/SphericalMercator.",methodDeprecated:"This method has been deprecated and will be removed in 3.0. Please use ${newMethod} instead.",boundsAddError:"You must pass both x and y values to the add function.",
lonlatAddError:"You must pass both lon and lat values to the add function.",pixelAddError:"You must pass both x and y values to the add function.",unsupportedGeometryType:"Unsupported geometry type: ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition failed: element with id ${elemId} may be misplaced.",filterEvaluateNotImplemented:"evaluate is not implemented for this filter type.",end:""};
OpenLayers.Lang.fi=OpenLayers.Util.applyDefaults({permalink:"Ikilinkki",overlays:"Kerrokset",baseLayer:"Peruskerros",sameProjection:"Yleiskuvakarttaa voi k\u00e4ytt\u00e4\u00e4 vain, kun sill\u00e4 on sama projektio kuin p\u00e4\u00e4kartalla.",W:"L",E:"I",N:"P",S:"E"});
OpenLayers.Lang.fur=OpenLayers.Util.applyDefaults({permalink:"Leam Permanent",overlays:"Livei parsore",baseLayer:"Livel di base",browserNotSupported:"Il to sgarfad\u00f4r nol supuarte la renderizazion vetori\u00e2l. Al moment a son supuart\u00e2ts:\n${renderers}",scale:"Scjale = 1 : ${scaleDenom}",W:"O",E:"E",N:"N",S:"S"});
OpenLayers.Lang.gl=OpenLayers.Util.applyDefaults({unhandledRequest:"Solicitude non xerada; a resposta foi: ${statusText}",permalink:"Ligaz\u00f3n permanente",overlays:"Capas superpostas",baseLayer:"Capa base",sameProjection:"A vista xeral do mapa s\u00f3 funciona cando est\u00e1 na mesma proxecci\u00f3n c\u00f3 mapa principal",readNotImplemented:"Lectura non implementada.",writeNotImplemented:"Escritura non implementada.",noFID:"Non se pode actualizar a funcionalidade para a que non hai FID.",errorLoadingGML:"Erro ao cargar o ficheiro GML ${url}",
browserNotSupported:"O seu navegador non soporta a renderizaci\u00f3n de vectores. Os renderizadores soportados actualmente son:\n${renderers}",componentShouldBe:"addFeatures: o compo\u00f1ente debera ser de tipo ${geomType}",getFeatureError:"getFeatureFromEvent ten sido chamado a unha capa sen renderizador. Isto normalmente significa que destru\u00edu unha capa, mais non o executador que est\u00e1 asociado con ela.",minZoomLevelError:"A propiedade minZoomLevel \u00e9 s\u00f3 para uso conxuntamente coas capas FixedZoomLevels-descendent. O feito de que esa capa wfs verifique o minZoomLevel \u00e9 unha reliquia do pasado. Non podemos, con todo, eliminala sen a posibilidade de non romper as aplicaci\u00f3ns baseadas en OL que poidan depender dela. Por iso a estamos deixando obsoleta (a comprobaci\u00f3n minZoomLevel de embaixo ser\u00e1 eliminada na versi\u00f3n 3.0). Por favor, no canto diso use o axuste de resoluci\u00f3n m\u00edn/m\u00e1x tal e como est\u00e1 descrito aqu\u00ed: http://trac.openlayers.org/wiki/SettingZoomLevels",
commitSuccess:"Transacci\u00f3n WFS: \u00c9XITO ${response}",commitFailed:"Transacci\u00f3n WFS: FALLIDA ${response}",googleWarning:"A capa do Google non puido cargarse correctamente.<br><br>Para evitar esta mensaxe, escolla unha nova capa base no seleccionador de capas na marxe superior dereita.<br><br>Probablemente, isto acontece porque a escritura da librar\u00eda do Google Maps ou ben non foi inclu\u00edda ou ben non cont\u00e9n a clave API correcta para o seu sitio.<br><br>Desenvolvedores: para axudar a facer funcionar isto correctamente, <a href='http://trac.openlayers.org/wiki/Google' target='_blank'>premede aqu\u00ed</a>",
getLayerWarning:"A capa ${layerType} foi incapaz de cargarse correctamente.<br><br>Para evitar esta mensaxe, escolla unha nova capa base no seleccionador de capas na marxe superior dereita.<br><br>Probablemente, isto acontece porque a escritura da librar\u00eda ${layerLib} non foi ben inclu\u00edda.<br><br>Desenvolvedores: para axudar a facer funcionar isto correctamente, <a href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'>premede aqu\u00ed</a>",scale:"Escala = 1 : ${scaleDenom}",
W:"O",E:"L",N:"N",S:"S",layerAlreadyAdded:"Intentou engadir a capa: ${layerName} ao mapa, pero xa fora engadida",reprojectDeprecated:'Est\u00e1 usando a opci\u00f3n "reproject" na capa ${layerName}. Esta opci\u00f3n est\u00e1 obsoleta: o seu uso foi dese\u00f1ado para a visualizaci\u00f3n de datos sobre mapas base comerciais, pero esta funcionalidade debera agora ser obtida utilizando a proxecci\u00f3n Spherical Mercator. Hai dispo\u00f1ible m\u00e1is informaci\u00f3n en http://trac.openlayers.org/wiki/SphericalMercator.',
methodDeprecated:"Este m\u00e9todo est\u00e1 obsoleto e ser\u00e1 eliminado na versi\u00f3n 3.0. Por favor, no canto deste use ${newMethod}.",boundsAddError:"Debe achegar os valores x e y \u00e1 funci\u00f3n add.",lonlatAddError:"Debe achegar tanto o valor lon coma o lat \u00e1 funci\u00f3n add.",pixelAddError:"Debe achegar os valores x e y \u00e1 funci\u00f3n add.",unsupportedGeometryType:"Tipo xeom\u00e9trico non soportado: ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition fallou: o elemento con id ${elemId} pode non estar na s\u00faa posici\u00f3n.",
filterEvaluateNotImplemented:"avaliar non est\u00e1 implementado para este tipo de filtro."});
OpenLayers.Lang.gsw=OpenLayers.Util.applyDefaults({unhandledRequest:"Nit behandleti Aafrogsruckm\u00e4ldig ${statusText}",permalink:"Permalink",overlays:"Iberlagerige",baseLayer:"Grundcharte",sameProjection:"D Ibersichts-Charte funktioniert nume, w\u00e4nn si di glych Proj\u00e4ktion brucht wie d Hauptcharte",readNotImplemented:"L\u00e4se nit implementiert.",writeNotImplemented:"Schrybe nit implementiert.",noFID:"E Feature, wu s kei FID derfir git, cha nit aktualisiert w\u00e4re.",errorLoadingGML:"F\u00e4hler bim Lade vu dr GML-Datei ${url}",
browserNotSupported:"Dyy Browser unterstitzt kei Vektordarstellig. Aktu\u00e4ll unterstitzti Renderer:\n${renderers}",componentShouldBe:"addFeatures : Kompon\u00e4nt sott dr Typ ${geomType} syy",getFeatureError:"getFeatureFromEvent isch uf eme Layer ohni Renderer ufgruefe wore. Des heisst normalerwys, ass Du e Layer kaputt gmacht hesch, aber nit dr Handler, wu derzue ghert.",minZoomLevelError:"D minZoomLevel-Eigeschaft isch nume d\u00e4nk fir d Layer, wu vu dr FixedZoomLevels abstamme. Ass d\u00e4\u00e4 wfs-Layer minZoomLevel prieft, scih e Relikt us dr Vergangeheit. Mir chenne s aber nit \u00e4ndere ohni OL_basierti Aaw\u00e4ndige villicht kaputt gehn, wu dervu abh\u00e4nge.  Us d\u00e4m Grund het die Funktion d Eigeschaft 'deprecated' iberchuu. D minZoomLevel-Priefig unte wird in dr Version 3.0 usegnuu. Bitte verw\u00e4nd statt d\u00e4m e min/max-Uflesig wie s do bschriben isch: http://trac.openlayers.org/wiki/SettingZoomLevels",
commitSuccess:"WFS-Transaktion: ERFOLGRYCH ${response}",commitFailed:"WFS-Transaktion: F\u00c4HLGSCHLAA ${response}",googleWarning:"Dr Google-Layer het nit korr\u00e4kt chenne glade w\u00e4re.<br><br>Go die M\u00e4ldig nimi z kriege, wehl e andere Hintergrundlayer us em LayerSwitcher im r\u00e4chte obere Ecke.<br><br>D\u00e4\u00e4 F\u00e4hler git s seli hyfig, wel s Skript vu dr Google-Maps-Bibliothek nit yybunde woren isch oder wel s kei giltige API-Schlissel fir Dyy URL din het.<br><br>Entwickler: Fir Hilf zum korr\u00e4kte Yybinde vum Google-Layer <a href='http://trac.openlayers.org/wiki/Google' target='_blank'>doo drucke</a>",
getLayerWarning:"Dr ${layerType}-Layer het nit korr\u00e4kt chenne glade w\u00e4re.<br><br>Go die M\u00e4ldig nimi z kriege, wehl e andere Hintergrundlayer us em LayerSwitcher im r\u00e4chte obere Ecke.<br><br>D\u00e4\u00e4 F\u00e4hler git s seli hyfig, wel s Skript vu dr '${layerLib}'-Bibliothek nit yybunde woren isch oder wel s kei giltige API-Schlissel fir Dyy URL din het.<br><br>Entwickler: Fir Hilf zum korr\u00e4kte Yybinde vu Layer <a href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'>doo drucke</a>",
scale:"Ma\u00dfstab = 1 : ${scaleDenom}",W:"W",E:"O",N:"N",S:"S",layerAlreadyAdded:"Du hesch versuecht d\u00e4\u00e4 Layer in d Charte yyzfiege: ${layerName}, aber \u00e4r isch schoi yygfiegt",reprojectDeprecated:"Du bruchsch d 'reproject'-Option bim ${layerName}-Layer. Die Option isch nimi giltig: si isch aagleit wore go   Date iber kommerzi\u00e4lli Grundcharte lege, aber des sott mer jetz mache mit dr Unterstitzig vu Spherical Mercator. Meh Informatione git s uf http://trac.openlayers.org/wiki/SphericalMercator.",
methodDeprecated:"Die Methode isch veraltet un wird us dr Version 3.0 usegnuu. Bitte verw\u00e4bnd statt d\u00e4m ${newMethod}.",boundsAddError:"Du muesch e x-W\u00e4rt un e y-W\u00e4rt yygee bi dr Zuefieg-Funktion",lonlatAddError:"Du meusch e Lengi- un e Breiti-Grad yygee bi dr Zuefieg-Funktion.",pixelAddError:"Du muesch x- un y-W\u00e4rt aagee bi dr Zuefieg-Funktion.",unsupportedGeometryType:"Nit unterstitze Geometrii-Typ: ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition f\u00e4hlgschlaa: Elem\u00e4nt mit ID ${elemId} isch villicht falsch gsetzt.",
filterEvaluateNotImplemented:"evaluiere isch nit implem\u00e4ntiert in d\u00e4m Filtertyp."});
OpenLayers.Lang.hr=OpenLayers.Util.applyDefaults({unhandledRequest:"Nepodr\u017eani zahtjev ${statusText}",permalink:"Permalink",overlays:"Overlays",baseLayer:"Osnovna karta",sameProjection:"Pregledna karta radi jedino kao je u istoj projekciji kao i glava karta",readNotImplemented:"\u010citanje nije implementirano.",writeNotImplemented:"Pisanje nije implementirano.",noFID:"Ne mogu a\u017eurirati zna\u010dajku za koju ne postoji FID.",errorLoadingGML:"Gre\u0161ka u u\u010ditavanju GML datoteke ${url}",
browserNotSupported:"Va\u0161 preglednik ne podr\u017eava vektorsko renderiranje. Trenutno podr\u017eani rendereri su: ${renderers}",componentShouldBe:"addFeatures : komponenta bi trebala biti ${geomType}",getFeatureError:"getFeatureFromEvent je pozvao Layer bez renderera. Ovo obi\u010dno zna\u010di da ste uni\u0161tiili Layer, a ne neki Handler koji je povezan s njim.",commitSuccess:"WFS Transakcija: USPJE\u0160NA ${response}",commitFailed:"WFS Transakcija: NEUSPJE\u0160NA ${response}",scale:"Mjerilo = 1 : ${scaleDenom}",
layerAlreadyAdded:"Poku\u0161ali ste dodati layer:  ${layerName} na kartu, ali je ve\u0107 dodan",methodDeprecated:"Ova metoda nije odobrena i biti \u0107e maknuta u 3.0. Koristite ${newMethod}.",boundsAddError:"Morate dati obje vrijednosti ,  x i y  da bi dodali funkciju.",lonlatAddError:"Morate dati obje vrijednosti , (lon i lat) da bi dodali funkciju.",pixelAddError:"Morate dati obje vrijednosti ,  x i y  da bi dodali funkciju.",unsupportedGeometryType:"Nepodr\u017eani tip geometrije: ${geomType}",
pagePositionFailed:"OpenLayers.Util.pagePosition nije uspjelo: element sa id ${elemId} mo\u017ee biti krivo smje\u0161ten."});
OpenLayers.Lang.hsb=OpenLayers.Util.applyDefaults({unhandledRequest:"Wotmo\u0142wa njewobd\u017a\u011b\u0142aneho napra\u0161owanja ${statusText}",permalink:"Trajny wotkaz",overlays:"Nawor\u0161towanja",baseLayer:"Zak\u0142adna runina",sameProjection:"P\u0159ehladowa karta jeno\u017e funguje, hdy\u017e je w samsnej projekciji ka\u017e h\u0142owna karta",readNotImplemented:"\u010citanje njeimplementowane.",writeNotImplemented:"Pisanje njeimplementowane.",noFID:"Funkcija, za kotru\u017e FID njeje, njeda so aktualizowa\u0107.",
errorLoadingGML:"Zmylk p\u0159i za\u010ditowanju dataje ${url}",browserNotSupported:"Tw\u00f3j wobhladowak wektorowe rysowanje njepodp\u011bruje. Tuchwilu podp\u011browane rysowaki su:\n${renderers}",componentShouldBe:"addFeatures: komponenta m\u011b\u0142a ${geomType} by\u0107",getFeatureError:"getFeatureFromEvent bu na wor\u0161\u0107e bjez rysowak zawo\u0142any. To zwjet\u0161a woznamjenja, zo sy wor\u0161tu zni\u010di\u0142, ale nic wobd\u017a\u011b\u0142ak, kotry\u017e je z njej zwjazany.",minZoomLevelError:"Kajkos\u0107 minZoomLevel je jeno\u017e za wu\u017eiwanje z wor\u0161tami myslena, kotre\u017e wot FixedZoomLevels pochad\u017aeja. Zo tuta wor\u0161ta wfs za minZoomLevel p\u0159epruwuje, je relikt za\u0144d\u017aenos\u0107e. Njem\u00f3\u017eemy w\u0161ak ju wotstroni\u0107, bjeztoho zo aplikacije, kotre\u017e na OpenLayers baz\u011bruja a snano tutu kajkos\u0107 wu\u017eiwaja, hi\u017eo njefunguja. Tohodla smy ju jako zestarjenu woznamjenili -- p\u0159epruwowanje za minZoomLevel budu so we wersiji 3.0 wotstronje\u0107. Pro\u0161u wu\u017eij m\u011bsto toho nastajenje min/max, ka\u017e je tu wopisane: http://trac.openlayers.org/wiki/SettingZoomLevels",
commitSuccess:"WFS-Transakcija: WUSP\u011a\u0160NA ${response}",commitFailed:"WFS-Transakcija: NJEPORAD\u0179ENA ${response}",googleWarning:"Wor\u0161ta Google njem\u00f3\u017ee\u0161e so korektnje za\u010dita\u0107.<br><br>Zo by tutu zd\u017a\u011blenku wotby\u0142, wubjer nowy BaseLayer z wub\u011bra wor\u0161tow horjeka naprawo.<br><br>Najskerje so to stawa, dokel\u017e skript biblioteki Google Maps pak njebu zap\u0159ijaty pak njewobsahuje korektny klu\u010d API za twoje syd\u0142o.<br><br>Wuwiwarjo: Za pomoc ke korektnemu fungowanju wor\u0161tow\n<a href='http://trac.openlayers.org/wiki/Google' target='_blank'>tu klikny\u0107</a>",
getLayerWarning:"Wor\u0161ta ${layerType} njem\u00f3\u017ee\u0161e so korektnje za\u010dita\u0107.<br><br>Zo by tutu zd\u017a\u011blenku wotby\u0142, wubjer nowy BaseLayer z wub\u011bra wor\u0161tow horjeka naprawo.<br><br>Najskerje so to stawa, dokel\u017e skript biblioteki ${layerLib} njebu korektnje zap\u0159ijaty.<br><br>Wuwiwarjo: Za pomoc ke korektnemu fungowanju wor\u0161tow\n<a href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'>tu klikny\u0107</a>",scale:"M\u011britko = 1 : ${scaleDenom}",
W:"Z",E:"W",N:"S",S:"J",layerAlreadyAdded:"Sy spyta\u0142 runinu ${layerName} kar\u0107e doda\u0107, ale je so hi\u017eo doda\u0142a",reprojectDeprecated:'Wu\u017eiwa\u0161 opciju "reproject" wo\u0159\u0161ty ${layerName}. Tuta opcija je zestarjena: jeje wu\u017eiwanje b\u011b myslene, zo by zwobraznjenje datow nad komercielnymi bazowymi kartami podp\u011bra\u0142o, ale funkcionalnos\u0107 m\u011b\u0142a so n\u011btko z pomocu Sperical Mercator docp\u011b\u0107. Dal\u0161e informacije steja na http://trac.openlayers.org/wiki/SphericalMercator k dispoziciji.',
methodDeprecated:"Tuta metoda je so njeschwali\u0142a a bud\u017ae so w 3.0 wotstronje\u0107. Pro\u0161u wu\u017eij ${newMethod} m\u011bsto toho.",boundsAddError:'Dyrbi\u0161 h\u00f3dnotu x ka\u017e te\u017e y funkciji "add" p\u0159epoda\u0107.',lonlatAddError:'Dyrbi\u0161 h\u00f3dnotu lon ka\u017e te\u017e lat funkciji "add" p\u0159epoda\u0107.',pixelAddError:'Dyrbi\u0161 h\u00f3dnotu x ka\u017e te\u017e y funkciji "add" p\u0159epoda\u0107.',unsupportedGeometryType:"Njepodp\u011browany geometrijowy typ: ${geomType}",
pagePositionFailed:"OpenLayers.Util.pagePosition je so njeporad\u017ai\u0142: element z id ${elemId} bu snano wopak zam\u011bstnjeny.",filterEvaluateNotImplemented:"wuh\u00f3dno\u0107enje njeje za tut\u00f3n filtrowy typ implementowany."});
OpenLayers.Lang.hu=OpenLayers.Util.applyDefaults({unhandledRequest:"Nem kezelt k\u00e9r\u00e9s visszat\u00e9r\u00e9se ${statusText}",permalink:"Permalink",overlays:"R\u00e1vet\u00edt\u00e9sek",baseLayer:"Alapr\u00e9teg",sameProjection:"Az \u00e1ttekint\u0151 t\u00e9rk\u00e9p csak abban az esetben m\u0171k\u00f6dik, ha ugyanazon a vet\u00fcleten van, mint a f\u0151 t\u00e9rk\u00e9p.",readNotImplemented:"Olvas\u00e1s nincs v\u00e9grehajtva.",writeNotImplemented:"\u00cdr\u00e1s nincs v\u00e9grehajtva.",
noFID:"Nem friss\u00edthet\u0151 olyan jellemz\u0151, amely nem rendelkezik FID-del.",errorLoadingGML:"Hiba GML-f\u00e1jl bet\u00f6lt\u00e9sekor ${url}",browserNotSupported:"A b\u00f6ng\u00e9sz\u0151je nem t\u00e1mogatja a vektoros renderel\u00e9st. A jelenleg t\u00e1mogatott renderel\u0151k:\n${renderers}",componentShouldBe:"addFeatures : az \u00f6sszetev\u0151nek ilyen t\u00edpus\u00fanak kell lennie: ${geomType}",getFeatureError:"getFeatureFromEvent r\u00e9teget h\u00edvott meg renderel\u0151 n\u00e9lk\u00fcl. Ez rendszerint azt jelenti, hogy megsemmis\u00edtett egy f\u00f3li\u00e1t, de n\u00e9h\u00e1ny ahhoz t\u00e1rs\u00edtott kezel\u0151t nem.",
minZoomLevelError:"A minZoomLevel tulajdons\u00e1got csak a k\u00f6vetkez\u0151vel val\u00f3 haszn\u00e1latra sz\u00e1nt\u00e1k: FixedZoomLevels-lesz\u00e1rmazott f\u00f3li\u00e1k. Ez azt jelenti, hogy a minZoomLevel wfs f\u00f3lia jel\u00f6l\u0151n\u00e9gyzetei m\u00e1r a m\u00falt\u00e9. Mi azonban nem t\u00e1vol\u00edthatjuk el annak a vesz\u00e9lye n\u00e9lk\u00fcl, hogy az esetlegesen ett\u0151l f\u00fcgg\u0151 OL alap\u00fa alkalmaz\u00e1sokat t\u00f6nkretenn\u00e9nk. Ez\u00e9rt ezt \u00e9rv\u00e9nytelen\u00edtj\u00fck -- a minZoomLevel az alul lev\u0151 jel\u00f6l\u0151n\u00e9gyzet a 3.0-s verzi\u00f3b\u00f3l el lesz t\u00e1vol\u00edtva. K\u00e9rj\u00fck, helyette haszn\u00e1lja a  min/max felbont\u00e1s be\u00e1ll\u00edt\u00e1st, amelyr\u0151l az al\u00e1bbi helyen tal\u00e1l le\u00edr\u00e1st: http://trac.openlayers.org/wiki/SettingZoomLevels",
commitSuccess:"WFS tranzakci\u00f3: SIKERES ${response}",commitFailed:"WFS tranzakci\u00f3: SIKERTELEN ${response}",googleWarning:"A Google f\u00f3lia bet\u00f6lt\u00e9se sikertelen.<br><br>Ahhoz, hogy ez az \u00fczenet elt\u0171nj\u00f6n, v\u00e1lasszon egy \u00faj BaseLayer f\u00f3li\u00e1t a jobb fels\u0151 sarokban tal\u00e1lhat\u00f3 f\u00f3liakapcsol\u00f3 seg\u00edts\u00e9g\u00e9vel.<br><br>Nagy val\u00f3sz\u00edn\u0171s\u00e9ggel ez az\u00e9rt van, mert a Google Maps k\u00f6nyvt\u00e1r parancsf\u00e1jlja nem tal\u00e1lhat\u00f3, vagy nem tartalmazza az \u00d6n oldal\u00e1hoz tartoz\u00f3 megfelel\u0151 API-kulcsot.<br><br>Fejleszt\u0151knek: A helyes m\u0171k\u00f6dtet\u00e9sre vonatkoz\u00f3 seg\u00edts\u00e9g az al\u00e1bbi helyen \u00e9rhet\u0151 el, <a href='http://trac.openlayers.org/wiki/Google' target='_blank'>kattintson ide</a>",
getLayerWarning:"A(z) ${layerType} f\u00f3lia nem t\u00f6lt\u0151d\u00f6tt be helyesen.<br><br>Ahhoz, hogy ez az \u00fczenet elt\u0171nj\u00f6n, v\u00e1lasszon egy \u00faj BaseLayer f\u00f3li\u00e1t a jobb fels\u0151 sarokban tal\u00e1lhat\u00f3 f\u00f3liakapcsol\u00f3 seg\u00edts\u00e9g\u00e9vel.<br><br>Nagy val\u00f3sz\u00edn\u0171s\u00e9ggel ez az\u00e9rt van, mert a(z) ${layerLib} k\u00f6nyvt\u00e1r parancsf\u00e1jlja helytelen.<br><br>Fejleszt\u0151knek: A helyes m\u0171k\u00f6dtet\u00e9sre vonatkoz\u00f3 seg\u00edts\u00e9g az al\u00e1bbi helyen \u00e9rhet\u0151 el, <a href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'>kattintson ide</a>",
scale:"L\u00e9pt\u00e9k = 1 : ${scaleDenom}",W:"Ny",E:"K",N:"\u00c9",S:"D",layerAlreadyAdded:"Megpr\u00f3b\u00e1lta hozz\u00e1adni a(z) ${layerName} f\u00f3li\u00e1t a t\u00e9rk\u00e9phez, de az m\u00e1r hozz\u00e1 van adva",reprojectDeprecated:"\u00d6n a 'reproject' be\u00e1ll\u00edt\u00e1st haszn\u00e1lja a(z) ${layerName} f\u00f3li\u00e1n. Ez a be\u00e1ll\u00edt\u00e1s \u00e9rv\u00e9nytelen: haszn\u00e1lata az \u00fczleti alapt\u00e9rk\u00e9pek f\u00f6l\u00f6tti adatok megjelen\u00edt\u00e9s\u00e9nek t\u00e1mogat\u00e1s\u00e1ra szolg\u00e1lt, de ezt a funkci\u00f3 ezent\u00fal a G\u00f6mbi Mercator haszn\u00e1lat\u00e1val \u00e9rhet\u0151 el. Tov\u00e1bbi inform\u00e1ci\u00f3 az al\u00e1bbi helyen \u00e9rhet\u0151 el: http://trac.openlayers.org/wiki/SphericalMercator",
methodDeprecated:"Ez a m\u00f3dszer \u00e9rv\u00e9nytelen\u00edtve lett \u00e9s a 3.0-s verzi\u00f3b\u00f3l el lesz t\u00e1vol\u00edtva. Haszn\u00e1lja a(z) ${newMethod} m\u00f3dszert helyette.",boundsAddError:"Az x \u00e9s y \u00e9rt\u00e9keknek egyar\u00e1nt meg kell felelnie, hogy a funkci\u00f3t hozz\u00e1adhassa.",lonlatAddError:"A hossz. \u00e9s sz\u00e9l. \u00e9rt\u00e9keknek egyar\u00e1nt meg kell felelnie, hogy a funkci\u00f3t hozz\u00e1adhassa.",pixelAddError:"Az x \u00e9s y \u00e9rt\u00e9keknek egyar\u00e1nt meg kell felelnie, hogy a funkci\u00f3t hozz\u00e1adhassa.",
unsupportedGeometryType:"Nem t\u00e1mogatott geometriat\u00edpus: ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition sikertelen: lehets\u00e9ges, hogy a(z) ${elemId} azonos\u00edt\u00f3j\u00fa elem t\u00e9ves helyre ker\u00fclt.",filterEvaluateNotImplemented:"enn\u00e9l a sz\u0171r\u0151t\u00edpusn\u00e1l ki\u00e9rt\u00e9kel\u00e9s nem hajt\u00f3dik v\u00e9gre."});
OpenLayers.Lang.ia=OpenLayers.Util.applyDefaults({unhandledRequest:"Le responsa a un requesta non esseva maneate: ${statusText}",permalink:"Permaligamine",overlays:"Superpositiones",baseLayer:"Strato de base",sameProjection:"Le mini-carta functiona solmente si illo es in le mesme projection que le carta principal",readNotImplemented:"Lectura non implementate.",writeNotImplemented:"Scriptura non implementate.",noFID:"Non pote actualisar un elemento sin FID.",errorLoadingGML:"Error al cargamento del file GML ${url}",
browserNotSupported:"Tu navigator non supporta le rendition de vectores. Le renditores actualmente supportate es:\n${renderers}",componentShouldBe:"addFeatures: le componente debe esser del typo ${geomType}",getFeatureError:"getFeatureFromEvent ha essite appellate in un strato sin renditor. Isto significa generalmente que tu ha destruite un strato, ma lassava un gestor associate con illo.",minZoomLevelError:"Le proprietate minZoomLevel es solmente pro uso con le stratos descendente de FixedZoomLevels. Le facto que iste strato WFS verifica minZoomLevel es un reliquia del passato. Nonobstante, si nos lo remove immediatemente, nos pote rumper applicationes a base de OL que depende de illo. Ergo nos lo declara obsolete; le verification de minZoomLevel in basso essera removite in version 3.0. Per favor usa in su loco le configuration de resolutiones min/max como describite a: http://trac.openlayers.org/wiki/SettingZoomLevels",
commitSuccess:"Transaction WFS: SUCCESSO ${response}",commitFailed:"Transaction WFS: FALLEVA ${response}",googleWarning:"Le strato Google non poteva esser cargate correctemente.<br><br>Pro disfacer te de iste message, selige un nove BaseLayer in le selector de strato in alto a dextra.<br><br>Multo probabilemente, isto es proque le script del libreria de Google Maps non esseva includite o non contine le clave API correcte pro tu sito.<br><br>Disveloppatores: Pro adjuta de corriger isto, <a href='http://trac.openlayers.org/wiki/Google' target='_blank'>clicca hic</a",
getLayerWarning:"Le strato ${layerType} non poteva esser cargate correctemente.<br><br>Pro disfacer te de iste message, selige un nove BaseLayer in le selector de strato in alto a dextra.<br><br>Multo probabilemente, isto es proque le script del libreria de ${layerLib} non esseva correctemente includite.<br><br>Disveloppatores: Pro adjuta de corriger isto, <a href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'>clicca hic</a>",scale:"Scala = 1 : ${scaleDenom}",W:"W",E:"E",N:"N",S:"S",
layerAlreadyAdded:"Tu tentava adder le strato: ${layerName} al carta, ma illo es ja presente",reprojectDeprecated:"Tu usa le option 'reproject' in le strato ${layerName} layer. Iste option es obsolescente: illo esseva pro poter monstrar datos super cartas de base commercial, ma iste functionalitate pote ora esser attingite con le uso de Spherical Mercator. Ulterior information es disponibile a http://trac.openlayers.org/wiki/SphericalMercator.",methodDeprecated:"Iste methodo ha essite declarate obsolescente e essera removite in version 3.0. Per favor usa ${newMethod} in su loco.",
boundsAddError:"Tu debe passar le duo valores x e y al function add.",lonlatAddError:"Tu debe passar le duo valores lon e lat al function add.",pixelAddError:"Tu debe passar le duo valores x e y al function add.",unsupportedGeometryType:"Typo de geometria non supportate: ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition falleva: le elemento con id ${elemId} pote esser mal placiate.",filterEvaluateNotImplemented:'"evaluate" non es implementate pro iste typo de filtro.'});
OpenLayers.Lang.id=OpenLayers.Util.applyDefaults({unhandledRequest:"Permintaan yang tak tertangani menghasilkan ${statusText}",permalink:"Pranala permanen",overlays:"Hamparan",baseLayer:"Lapisan Dasar",sameProjection:"Peta tinjauan hanya bekerja bila dalam proyeksi yang sama dengan peta utama",readNotImplemented:"Membaca tidak diterapkan.",writeNotImplemented:"Menyimpan tidak diterapkan.",noFID:"Tidak dapat memperbarui fitur yang tidak memiliki FID.",errorLoadingGML:"Kesalahan dalam memuat berkas GML ${url}",
browserNotSupported:"Peramban Anda tidak mendukung penggambaran vektor. Penggambar yang didukung saat ini adalah:\n${renderers}",componentShouldBe:"addFeatures : komponen harus berupa ${geomType}",getFeatureError:"getFeatureFromEvent diterapkan pada lapisan tanpa penggambar. Ini biasanya berarti Anda menghapus sebuah lapisan, tetapi tidak menghapus penangan yang terkait dengannya.",minZoomLevelError:"Properti minZoomLevel hanya ditujukan bekerja dengan lapisan FixedZoomLevels-descendent. Pengecekan minZoomLevel oleh lapisan wfs adalah peninggalan masa lalu. Kami tidak dapat menghapusnya tanpa kemungkinan merusak aplikasi berbasis OL yang mungkin bergantung padanya. Karenanya, kami menganggapnya tidak berlaku -- Cek minZoomLevel di bawah ini akan dihapus pada 3.0. Silakan gunakan penyetelan resolusi min/maks seperti dijabarkan di sini: http://trac.openlayers.org/wiki/SettingZoomLevels",
commitSuccess:"WFS Transaksi: BERHASIL ${respon}",commitFailed:"WFS Transaksi: GAGAL ${respon}",googleWarning:"Lapisan Google tidak dapat dimuat dengan benar.<br><br>Untuk menghilangkan pesan ini, pilih suatu BaseLayer baru melalui penukar lapisan (layer switcher) di ujung kanan atas.<br><br>Kemungkinan besar ini karena pustaka skrip Google Maps tidak disertakan atau tidak mengandung kunci API yang tepat untuk situs Anda.<br><br>Pengembang: Untuk bantuan mengatasi masalah ini, <a href='http://trac.openlayers.org/wiki/Google' target='_blank'>klik di sini</a>",
getLayerWarning:"Lapisan ${layerType} tidak dapat dimuat dengan benar.<br><br>Untuk menghilangkan pesan ini, pilih suatu BaseLayer baru melalui penukar lapisan (layer switcher) di ujung kanan atas.<br><br>Kemungkinan besar ini karena pustaka skrip Google Maps tidak disertakan dengan benar.<br><br>Pengembang: Untuk bantuan mengatasi masalah ini, <a href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'>klik di sini</a>",scale:"Sekala = 1 : ${scaleDenom}",W:"B",E:"T",N:"U",S:"S",layerAlreadyAdded:"Anda mencoba menambahkan lapisan: ${layerName} ke dalam peta, tapi lapisan itu telah ditambahkan",
reprojectDeprecated:"Anda menggunakan opsi 'reproject' pada lapisan ${layerName}. Opsi ini telah ditinggalkan: penggunaannya dirancang untuk mendukung tampilan data melalui peta dasar komersial, tapi fungsionalitas tersebut saat ini harus dilakukan dengan menggunakan dukungan Spherical Mercator. Informasi lebih lanjut tersedia di http://trac.openlayers.org/wiki/SphericalMercator.",methodDeprecated:"Metode ini telah usang dan akan dihapus di 3.0. Sebaliknya, harap gunakan ${newMethod}.",boundsAddError:"Anda harus memberikan kedua nilai x dan y ke fungsi penambah.",
lonlatAddError:"Anda harus memberikan kedua nilai lon dan lat ke fungsi penambah.",pixelAddError:"Anda harus memberikan kedua nilai x dan y ke fungsi penambah.",unsupportedGeometryType:"Tipe geometri tak didukung: ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition gagal: elemen dengan id ${elemId} mungkin salah tempat.",filterEvaluateNotImplemented:"evaluasi tidak tersedia untuk tipe filter ini."});OpenLayers.Lang.io=OpenLayers.Util.applyDefaults({scale:"Skalo = 1 : ${scaleDenom}"});
OpenLayers.Lang.is=OpenLayers.Util.applyDefaults({permalink:"Varanlegur tengill",overlays:"\u00deekjur",baseLayer:"Grunnlag",sameProjection:"Yfirlitskorti\u00f0 virkar a\u00f0eins ef \u00fea\u00f0 er \u00ed s\u00f6mu v\u00f6rpun og a\u00f0alkorti\u00f0",readNotImplemented:"Skrifun er \u00f3\u00fatf\u00e6r\u00f0.",writeNotImplemented:"Lestur er \u00f3\u00fatf\u00e6r\u00f0ur.",errorLoadingGML:"Villa kom upp vi\u00f0 a\u00f0 hla\u00f0a inn GML skr\u00e1nni ${url}",scale:"Skali = 1 : ${scaleDenom}",layerAlreadyAdded:"\u00de\u00fa reyndir a\u00f0 b\u00e6ta laginu ${layerName} \u00e1 korti\u00f0 en \u00fea\u00f0 er \u00feegar b\u00fai\u00f0 a\u00f0 b\u00e6ta \u00fev\u00ed vi\u00f0",
methodDeprecated:"\u00deetta fall hefur veri\u00f0 \u00farelt og ver\u00f0ur fjarl\u00e6gt \u00ed 3.0. Nota\u00f0u ${newMethod} \u00ed sta\u00f0in."});
OpenLayers.Lang.ja=OpenLayers.Util.applyDefaults({unhandledRequest:"\u672a\u51e6\u7406\u306e\u8981\u6c42\u306f ${statusText} \u3092\u8fd4\u3057\u307e\u3059",permalink:"\u30d1\u30fc\u30de\u30ea\u30f3\u30af",overlays:"\u30aa\u30fc\u30d0\u30fc\u30ec\u30a4",baseLayer:"\u57fa\u5e95\u30ec\u30a4\u30e4\u30fc",sameProjection:"\u6982\u89b3\u5730\u56f3\u306f\u30e1\u30a4\u30f3\u306e\u5730\u56f3\u3068\u540c\u3058\u6295\u5f71\u6cd5\u3092\u3068\u308b\u5834\u5408\u306e\u307f\u6a5f\u80fd\u3057\u307e\u3059",readNotImplemented:"\u8aad\u307f\u8fbc\u307f\u306f\u5b9f\u88c5\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002",
writeNotImplemented:"\u66f8\u304d\u8fbc\u307f\u306f\u5b9f\u88c5\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002",noFID:"FID \u306e\u306a\u3044\u5730\u7269\u306f\u66f4\u65b0\u3067\u304d\u307e\u305b\u3093\u3002",errorLoadingGML:"GML \u30d5\u30a1\u30a4\u30eb ${url} \u306e\u8aad\u307f\u8fbc\u307f\u30a8\u30e9\u30fc",browserNotSupported:"\u3042\u306a\u305f\u306e\u30d6\u30e9\u30a6\u30b6\u306f\u30d9\u30af\u30bf\u30fc\u30b0\u30e9\u30d5\u30a3\u30c3\u30af\u30b9\u306e\u63cf\u5199\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u305b\u3093\u3002\u73fe\u6642\u70b9\u3067\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306f\u4ee5\u4e0b\u306e\u3082\u306e\u3067\u3059\u3002\n${renderers}",
componentShouldBe:"addFeatures: \u8981\u7d20\u306f ${geomType} \u3067\u3042\u308b\u3079\u304d\u3067\u3059",getFeatureError:"getFeatureFromEvent \u304c\u30ec\u30f3\u30c0\u30e9\u30fc\u306e\u306a\u3044\u30ec\u30a4\u30e4\u30fc\u304b\u3089\u547c\u3070\u308c\u307e\u3057\u305f\u3002\u901a\u5e38\u3001\u3053\u308c\u306f\u3042\u306a\u305f\u304c\u30ec\u30a4\u30e4\u30fc\u3092\u3001\u305d\u308c\u306b\u95a2\u9023\u3065\u3051\u3089\u308c\u305f\u3044\u304f\u3064\u304b\u306e\u30cf\u30f3\u30c9\u30e9\u3092\u9664\u3044\u3066\u3001\u7834\u58ca\u3057\u3066\u3057\u307e\u3063\u305f\u3053\u3068\u3092\u610f\u5473\u3057\u307e\u3059\u3002",
minZoomLevelError:"minZoomLevel \u30d7\u30ed\u30d1\u30c6\u30a3\u306f FixedZoomLevels \u3092\u7d99\u627f\u3059\u308b\u30ec\u30a4\u30e4\u30fc\u3067\u306e\u4f7f\u7528\u306e\u307f\u3092\u60f3\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u306e minZoomLevel \u306b\u5bfe\u3059\u308b WFS \u30ec\u30a4\u30e4\u30fc\u306e\u691c\u67fb\u306f\u6b74\u53f2\u7684\u306a\u3082\u306e\u3067\u3059\u3002\u3057\u304b\u3057\u306a\u304c\u3089\u3001\u3053\u306e\u691c\u67fb\u3092\u9664\u53bb\u3059\u308b\u3068\u305d\u308c\u306b\u4f9d\u5b58\u3059\u308b OpenLayers \u30d9\u30fc\u30b9\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u7834\u58ca\u3057\u3066\u3057\u307e\u3046\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u3088\u3063\u3066\u5ec3\u6b62\u304c\u4e88\u5b9a\u3055\u308c\u3066\u304a\u308a\u3001\u3053\u306e minZoomLevel \u691c\u67fb\u306f\u30d0\u30fc\u30b8\u30e7\u30f33.0\u3067\u9664\u53bb\u3055\u308c\u307e\u3059\u3002\u4ee3\u308f\u308a\u306b\u3001http://trac.openlayers.org/wiki/SettingZoomLevels \u3067\u89e3\u8aac\u3055\u308c\u3066\u3044\u308b\u3001\u6700\u5c0f\u304a\u3088\u3073\u6700\u5927\u89e3\u50cf\u5ea6\u8a2d\u5b9a\u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002",
commitSuccess:"WFS \u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3: \u6210\u529f ${response}",commitFailed:"WFS \u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3: \u5931\u6557 ${response}",googleWarning:"Google \u30ec\u30a4\u30e4\u30fc\u304c\u6b63\u3057\u304f\u8aad\u307f\u8fbc\u307f\u3092\u884c\u3048\u307e\u305b\u3093\u3067\u3057\u305f\u3002<br><br>\u3053\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u6d88\u3059\u306b\u306f\u3001\u53f3\u4e0a\u306e\u9685\u306b\u3042\u308b\u30ec\u30a4\u30e4\u30fc\u5207\u308a\u66ff\u3048\u90e8\u5206\u3067\u65b0\u3057\u3044\u57fa\u5e95\u30ec\u30a4\u30e4\u30fc\u3092\u9078\u3093\u3067\u304f\u3060\u3055\u3044\u3002<br><br>\u304a\u305d\u3089\u304f\u3001\u3053\u308c\u306f Google \u30de\u30c3\u30d7\u7528\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u7d44\u307f\u8fbc\u307e\u308c\u3066\u3044\u306a\u3044\u304b\u3001\u3042\u306a\u305f\u306e\u30b5\u30a4\u30c8\u306b\u5bfe\u5fdc\u3059\u308b\u6b63\u3057\u3044 API \u30ad\u30fc\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u306a\u3044\u305f\u3081\u3067\u3059\u3002<br><br>\u958b\u767a\u8005\u306e\u65b9\u3078: \u6b63\u3057\u3044\u52d5\u4f5c\u3092\u3055\u305b\u308b\u305f\u3081\u306b<a href='http://trac.openlayers.org/wiki/Google' target='_blank'>\u3053\u3061\u3089\u306e\u30a6\u30a3\u30ad</a>\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002",
getLayerWarning:"${layerType} \u30ec\u30a4\u30e4\u30fc\u304c\u6b63\u3057\u304f\u8aad\u307f\u8fbc\u307f\u3092\u884c\u3048\u307e\u305b\u3093\u3067\u3057\u305f\u3002<br><br>\u3053\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u6d88\u3059\u306b\u306f\u3001\u53f3\u4e0a\u306e\u9685\u306b\u3042\u308b\u30ec\u30a4\u30e4\u30fc\u5207\u308a\u66ff\u3048\u90e8\u5206\u3067\u65b0\u3057\u3044\u57fa\u5e95\u30ec\u30a4\u30e4\u30fc\u3092\u9078\u3093\u3067\u304f\u3060\u3055\u3044\u3002<br><br>\u304a\u305d\u3089\u304f\u3001\u3053\u308c\u306f ${layerLib} \u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u6b63\u3057\u304f\u7d44\u307f\u8fbc\u307e\u308c\u3066\u3044\u306a\u3044\u305f\u3081\u3067\u3059\u3002<br><br>\u958b\u767a\u8005\u306e\u65b9\u3078: \u6b63\u3057\u3044\u52d5\u4f5c\u3092\u3055\u305b\u308b\u305f\u3081\u306b<a href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'>\u3053\u3061\u3089\u306e\u30a6\u30a3\u30ad</a>\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002",
scale:"\u7e2e\u5c3a = 1 : ${scaleDenom}",W:"\u897f",E:"\u6771",N:"\u5317",S:"\u5357",layerAlreadyAdded:"\u3042\u306a\u305f\u306f\u300c${layerName}\u300d\u3092\u5730\u56f3\u306b\u8ffd\u52a0\u3057\u3088\u3046\u3068\u8a66\u307f\u307e\u3057\u305f\u304c\u3001\u305d\u306e\u30ec\u30a4\u30e4\u30fc\u306f\u65e2\u306b\u8ffd\u52a0\u3055\u308c\u3066\u3044\u307e\u3059",reprojectDeprecated:"\u3042\u306a\u305f\u306f\u300c${layerName}\u300d\u30ec\u30a4\u30e4\u30fc\u3067 reproject \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u5546\u7528\u306e\u57fa\u5e95\u5730\u56f3\u4e0a\u306b\u60c5\u5831\u3092\u8868\u793a\u3059\u308b\u76ee\u7684\u3067\u8a2d\u8a08\u3055\u308c\u307e\u3057\u305f\u304c\u3001\u73fe\u5728\u3067\u306f\u305d\u306e\u6a5f\u80fd\u306f Spherical Mercator \u30b5\u30dd\u30fc\u30c8\u3092\u5229\u7528\u3057\u3066\u5b9f\u73fe\u3055\u308c\u3066\u304a\u308a\u3001\u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u4f7f\u7528\u306f\u975e\u63a8\u5968\u3067\u3059\u3002\u8ffd\u52a0\u306e\u60c5\u5831\u306f http://trac.openlayers.org/wiki/SphericalMercator \u3067\u5165\u624b\u3067\u304d\u307e\u3059\u3002",
methodDeprecated:"\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u5ec3\u6b62\u304c\u4e88\u5b9a\u3055\u308c\u3066\u304a\u308a\u3001\u30d0\u30fc\u30b8\u30e7\u30f33.0\u3067\u9664\u53bb\u3055\u308c\u307e\u3059\u3002\u4ee3\u308f\u308a\u306b ${newMethod} \u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002",boundsAddError:"x \u3068 y \u4e21\u65b9\u306e\u5024\u3092 add \u95a2\u6570\u306b\u6e21\u3055\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002",lonlatAddError:"lon \u3068 lat \u4e21\u65b9\u306e\u5024\u3092 add \u95a2\u6570\u306b\u6e21\u3055\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002",
pixelAddError:"x \u3068 y \u306e\u5024\u4e21\u65b9\u3092 add \u95a2\u6570\u306b\u6e21\u3055\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002",unsupportedGeometryType:"\u672a\u5bfe\u5fdc\u306e\u5f62\u72b6\u578b: ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition \u304c\u5931\u6557\u3057\u307e\u3057\u305f: id ${elemId} \u3092\u3082\u3064\u8981\u7d20\u304c\u8aa4\u3063\u305f\u4f4d\u7f6e\u306b\u3042\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002",filterEvaluateNotImplemented:"\u3053\u306e\u30d5\u30a3\u30eb\u30bf\u30fc\u578b\u306b\u3064\u3044\u3066 evaluate \u306f\u5b9f\u88c5\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002"});
OpenLayers.Lang.km=OpenLayers.Util.applyDefaults({permalink:"\u178f\u17c6\u178e\u1797\u17d2\u1787\u17b6\u1794\u17cb\u17a2\u1785\u17b7\u1793\u17d2\u178f\u17d2\u179a\u17c3\u1799\u17cd",baseLayer:"\u179f\u17d2\u179a\u1791\u17b6\u1794\u17cb\u1794\u17b6\u178f\u200b",errorLoadingGML:"\u1780\u17c6\u17a0\u17bb\u179f\u1780\u17c6\u17a1\u17bb\u1784\u1796\u17c1\u179b\u1795\u17d2\u1791\u17bb\u1780\u17af\u1780\u179f\u17b6\u179a GML ${url}",scale:"\u1798\u17b6\u178f\u17d2\u179a\u178a\u17d2\u178b\u17b6\u1793 = \u17e1 \u17d6 ${scaleDenom}"});
OpenLayers.Lang.ksh=OpenLayers.Util.applyDefaults({unhandledRequest:"Met d\u00e4 Antwoot op en Aanfrooch ham_mer nix aanjefange: ${statusText}",permalink:"Lengk op Duuer",overlays:"Dr\u00f6vver jelaat",baseLayer:"Jrund-Nivoh",sameProjection:"De \u00d6vverseeschs_Kaat deiht et blo\u00df, wann se de s\u00e4lve Proj\u00e4xjuhn bruche deiht, wi de Houp_Kaat",readNotImplemented:'\u201e<code lang="en">read</code>\u201c is em Projramm nit f\u00fcrjesinn.',writeNotImplemented:'\u201e<code lang="en">write</code>\u201c is em Projramm nit f\u00fcrjesinn.',
noFID:'En Saach, woh kein <i lang="en">FID</i> f\u00f6r doh es, l\u00f6ht sesch nit \u00e4ndere.',errorLoadingGML:'F\u00e4hler beim <i lang="en">GML</i>-Datei-Laade vun <code>${url}</code>',browserNotSupported:"Dinge Brauser kann kein V\u00e4ktore u\u00dfj\u00e4vve. De Zoote U\u00dfjaabe, di em Momang jon, sen:\n${renderers}",componentShouldBe:'<code lang="en">addFeatures</code>: d\u00e4 Aandeil sullt vun d\u00e4 Zoot \u201e<code lang="en">${geomType}</code>\u201c sin.',getFeatureError:'<code lang="en">getFeatureFromEvent</code> es vun enem Nivoh opjeroofe woode, woh et kei Projramm zom U\u00dfj\u00e4vve jit. Dat bed\u00fcgg f\u00f6r jew\u00f6hnlesch, dat De e Nivoh kapott jemaat h\u00e4s, \u00e4vver nit e Projramm f\u00f6r domet \u00f6mzejonn, wat domet verbonge es.',
minZoomLevelError:'De Eijeschaff \u201e<code lang="en">minZoomLevel</code>\u201c es blo\u00df dof\u00f6r jedaach, dat mer se met d\u00e4 Nivvoh\u00df bruch, di vun <code lang="en">FixedZoomLevels</code> affhange don. Dat dat <i lang="en">WFS</i>-Nivvoh \u00f6vverhoup de Eijeschaff \u201e<code lang="en">minZoomLevel</code>\u201c pr\u00f6hfe deiht, es noch \u00f6vveresch vun fr\u00f6hjer. Mer k\u00fcnne dat \u00e4vver jez nit fott loh\u00dfe, oohne dat mer Jevaa loufe, dat Aanwendunge vun OpenLayers nit mieh loufe, di sesch doh velleijsch noch drop am verloh\u00dfe sin. Dr\u00f6m sare mer, dat mer et nit mieh han welle, un de \u201e<code lang="en">minZoomLevel</code>\u201c-Eijeschaff weed hee vun de Version 3.0 af nit mieh jepr\u00f6\u00f6f w\u00e4de. Nemm dof\u00f6r de Enstellung f\u00f6r de h\u00fch\u00dfte un de klein\u00dfte Opl\u00f6hsung, esu wi et en http://trac.openlayers.org/wiki/SettingZoomLevels opjeschrevve es.',
commitSuccess:'D\u00e4 <i lang="en">WFS</i>-V\u00f6rjang es joot jeloufe: ${response}',commitFailed:'D\u00e4 <i lang="en">WFS</i>-V\u00f6rjang es scheif jejange: ${response}',googleWarning:'Dat Nivvoh <code lang="en">Google</code> kunnt nit reschtesch jelaade w\u00e4\u00e4de.<br /><br />\u00d6m hee di Nohreesch lo\u00df ze krijje, donn en ander Jrund-Nivvoh u\u00dfs\u00f6hke, r\u00e4h\u00df bovve en de \u00c4k.<br /><br />Wascheinlesch es dat wiel dat <i lang="en">Google-Maps</i>-Skrepp entweeder nit reschtesch enjebonge wood, udder nit d\u00e4 reschtejje <i lang="en">API</i>-Schl\u00f6\u00dfel f\u00f6r Ding Web-\u00dfait scheke deiht.<br /><br />F\u00f6r Projrammierer jidd_et H\u00f6lp do_dr\u00f6vver, <a href="http://trac.openlayers.org/wiki/Google" target="_blank">wi mer dat aan et Loufe brengk</a>.',
getLayerWarning:'Dat Nivvoh <code>${layerType}</code> kunnt nit reschtesch jelaade w\u00e4\u00e4de.<br /><br />\u00d6m hee di Nohreesch lo\u00df ze krijje, donn en ander Jrund-Nivvoh u\u00dfs\u00f6hkre, r\u00e4h\u00df bovve en de \u00c4k.<br /><br />Wascheinlesch es dat, wiel dat Skrepp <code>${layerLib}</code> nit reschtesch enjebonge wood.<br /><br />F\u00f6r Projrammierer jidd_Et H\u00f6lp do_dr\u00f6vver, <a href="http://trac.openlayers.org/wiki/${layerLib}" target="_blank">wi mer dat aan et Loufe brengk</a>.',
scale:"Moh\u00dfshtaab = 1 : ${scaleDenom}",W:"W",E:"O",N:"N",S:"S",layerAlreadyAdded:"Do h\u00e4\u00df vers\u00f6hk, dat Nivvoh <code>${layerName}</code> en di Kaat eren ze br\u00e4nge, et wohr \u00e4vver ald do dren.",reprojectDeprecated:"Do bruchs de U\u00dfwahl <code>reproject</code> op d\u00e4m Nivvoh <code>${layerName}</code>. Di U\u00dfwahl es nit mieh j\u00e4hn jesinn. Se wohr dof\u00f6r jedaach, \u00f6m Date op jesch\u00e4\u00e4fsm\u00e4\u00dfesch eru\u00df jejovve Kaate bovve drop ze moole, wat \u00e4vver enzwesche besser met d\u00e4 \u00d6ngersht\u00f6zung f\u00f6r de \u00dff\u00e4\u00e4resche M\u00e4kaator Beldscher jeiht. Doh kanns De mieh dr\u00f6vver fenge op d\u00e4 Sigg: http://trac.openlayers.org/wiki/SphericalMercator.",
methodDeprecated:"Hee di Metood es nim_mih akto\u00e4ll un et weed se en d\u00e4 Version 3.0 nit mieh j\u00e4vve. Nemm <code>${newMethod}</code> dof\u00f6\u00f6r.",boundsAddError:"Do mo\u00df beeds vun de <code>x</code> un <code>y</code> W\u00e4\u00e4te aan de Fungk\u00dfjohn <code>add</code> j\u00e4vve.",lonlatAddError:"Do mo\u00df beeds <code>lon</code> un <code>lat</code> aan de Fungk\u00dfjohn <code>add</code> j\u00e4vve.",pixelAddError:"Do mo\u00df beeds <code>x</code> un <code>y</code> aan de Fungk\u00dfjohn <code>add</code> j\u00e4vve.",
unsupportedGeometryType:"De Zoot Jommetrii dom_mer nit ongersht\u00f6ze: <code>${geomType}</code>",pagePositionFailed:'<code lang="en">OpenLayers.Util.pagePosition</code> es donevve jejange: dat Denge met d\u00e4 K\u00e4nnong <code>${elemId}</code> k\u00fcnnt am verkeehte Plaz sin.',filterEvaluateNotImplemented:'\u201e<code lang="en">evaluate</code>\u201c es f\u00f6r di Zoot Fellter nit enjereschdt.'});
OpenLayers.Lang.nds=OpenLayers.Util.applyDefaults({unhandledRequest:"Unbehannelt Tr\u00fcchmellels f\u00f6r de Anfraag ${statusText}",permalink:"Permalink",overlays:"Overlays",baseLayer:"Achtergrundkoort",sameProjection:"De \u00d6versichtskoort geiht blot, wenn de s\u00fclve Projekschoon as bi de H\u00f6\u00f6ftkoort bruukt warrt",readNotImplemented:"Lesen is nich inricht.",writeNotImplemented:"Schrieven is nich inricht.",noFID:"En Feature, dat keen FID hett, kann nich aktuell maakt warrn.",errorLoadingGML:"Fehler bi\u2019t Laden vun de GML-Datei ${url}",
browserNotSupported:"Dien Browser \u00fcnnerst\u00fctt keen Vektorbiller. \u00dcnnerst\u00fctt Renderers:\n${renderers}",componentShouldBe:"addFeatures : Kumponent schull man den Typ ${geomType} hebben",getFeatureError:"getFeatureFromEvent is von en Laag ahn Render opropen worrn. Dat bed\u00fc\u00fcdt normalerwies, dat en Laag wegmaakt worrn is, aver nich de Handler, de dor op verwiest.",commitSuccess:"WFS-Transakschoon: hett klappt ${response}",commitFailed:"WFS-Transakschoon: hett nich klappt ${response}",
scale:"Skaal = 1 : ${scaleDenom}",layerAlreadyAdded:"Du vers\u00f6chst de Laag \u201e${layerName}\u201c to de Koort totof\u00f6gen, man de is al tof\u00f6\u00f6gt",methodDeprecated:"Disse Methood is oold un schall dat in 3.0 nich mehr geven. Bruuk dor man beter ${newMethod} f\u00f6r.",boundsAddError:"De Weert x un y, de m\u00f6\u00f6t all beid an de add-Funkschoon \u00f6vergeven warrn.",lonlatAddError:"De Weert lon un lat, de m\u00f6\u00f6t all beid an de add-Funkschoon \u00f6vergeven warrn.",pixelAddError:"De Weert x un y, de m\u00f6\u00f6t all beid an de add-Funkschoon \u00f6vergeven warrn.",
unsupportedGeometryType:"Nich \u00fcnnerst\u00fctt Geometrie-Typ: ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition g\u00fcng nich: Element mit de Id ${elemId} is villicht an\u2019n verkehrten Platz."});
OpenLayers.Lang.nn=OpenLayers.Util.applyDefaults({scale:"Skala = 1 : ${scaleDenom}",layerAlreadyAdded:"Du freista \u00e5 leggja til laget \u00ab${layerName}\u00bb p\u00e5 kartet, men det har alt vorte lagt til.",boundsAddError:"Du er n\u00f8ydd til \u00e5 gje b\u00e5de ein x- og ein y-verdi til \u00abadd\u00bb-funksjonen.",lonlatAddError:"Du er n\u00f8ydd til \u00e5 gje b\u00e5de lon- og lat-verdiar til \u00abadd\u00bb-funksjonen.",pixelAddError:"Du er n\u00f8ydd til \u00e5 gje b\u00e5de ein x- og ein y-verdi til \u00abadd\u00bb-funksjonen."});
OpenLayers.Lang.oc=OpenLayers.Util.applyDefaults({unhandledRequest:"Requ\u00e8sta pas gerida, retorna ${statusText}",permalink:"Permaligam",overlays:"Calques",baseLayer:"Calc de basa",sameProjection:"La carta de situacion fonciona pas que quora sa projeccion es la meteissa que la de la carta principala",readNotImplemented:"Lectura pas implementada.",writeNotImplemented:"Escritura pas implementada.",noFID:"Impossible de metre a jorn un obj\u00e8cte sens identificant (fid).",errorLoadingGML:"Error al cargament del fichi\u00e8r GML ${url}",
browserNotSupported:"V\u00f2stre navegidor sup\u00f2rta pas lo rendut vectorial. Los renderers actualament suportats son : \n${renderers}",componentShouldBe:"addFeatures : lo compausant deuri\u00e1 \u00e8sser de tipe ${geomType}",getFeatureError:"getFeatureFromEvent es estat apelat sus un calc sens renderer. Aqu\u00f2 significa generalament qu'av\u00e8tz destruch aqueste ja\u00e7, mas qu'av\u00e8tz conservat un handler que li \u00e8ra associat.",minZoomLevelError:"La proprietat minZoomLevel deu \u00e8sser utilizada solament per de jaces FixedZoomLevels-descendent. Lo fach qu'aqueste ja\u00e7 WFS verifique la pres\u00e9ncia de minZoomLevel es una relica del passat. \u00c7aquel\u00e0, la pod\u00e8m suprimir sens copar d'aplicacions que ne poiri\u00e1n dependre. Es per aqu\u00f2 que la depreciam -- la verificacion del minZoomLevel ser\u00e0 suprimida en version 3.0. A la pla\u00e7a, merc\u00e9s d'utilizar los param\u00e8tres de resolucions min/max tal coma descrich sus : http://trac.openlayers.org/wiki/SettingZoomLevels",
commitSuccess:"Transaccion WFS : SUCCES ${response}",commitFailed:"Transaccion WFS : FRACAS ${response}",googleWarning:"Lo ja\u00e7 Google es pas estat en mesura de se cargar corr\u00e8ctament.<br><br>Per suprimir aqueste messatge, causiss\u00e8tz una BaseLayer nov\u00e8la dins lo selector de ja\u00e7 en naut a drecha.<br><br>Aqu\u00f2 es possiblament causat par la non-inclusion de la librari\u00e1 Google Maps, o alara perque que la clau de l'API correspond pas a v\u00f2stre site.<br><br>Desvolopaires : per saber coss\u00ed corregir aqu\u00f2, <a href='http://trac.openlayers.org/wiki/Google' target='_blank'>clicatz aic\u00ed</a>",
getLayerWarning:"Lo ja\u00e7 ${layerType} es pas en mesura de se cargar corr\u00e8ctament.<br><br>Per suprimir aqueste messatge, causiss\u00e8tz una  BaseLayer nov\u00e8la dins lo selector de ja\u00e7 en naut a drecha.<br><br>Aqu\u00f2 es possiblament causat per la non-inclusion de la librari\u00e1 ${layerLib}.<br><br>Desvolopaires : per saber coss\u00ed corregir aqu\u00ed, <a href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'>clicatz aic\u00ed</a>",scale:"Escala ~ 1 : ${scaleDenom}",
W:"O",E:"\u00c8",N:"N",S:"S",layerAlreadyAdded:"Av\u00e8tz ensajat d'apondre a la carta lo calc : ${layerName}, mas ja es present",reprojectDeprecated:"Utilizatz l'opcion 'reproject' sul ja\u00e7 ${layerName}. Aquesta opcion es despreciada : Son usatge permeti\u00e1 d'afichar de donadas al dess\u00fas de jaces raster comercials. Aquesta foncionalitat ara es suportada en utilizant lo sup\u00f2rt de la projeccion Mercator Esferica. Mai d'informacion es disponibla sus http://trac.openlayers.org/wiki/SphericalMercator.",
methodDeprecated:"Aqueste met\u00f2de es despreciada, e ser\u00e0 suprimida a la version 3.0. Merc\u00e9s d'utilizar ${newMethod} a la pla\u00e7a.",boundsAddError:"Vos cal passar las doas valors x e y a la foncion add.",lonlatAddError:"Vos cal passar las doas valors lon e lat a la foncion add.",pixelAddError:"Vos cal passar las doas valors x e y a la foncion add.",unsupportedGeometryType:"Tipe de geometria pas suportat : ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition a fracassat : l'element d'id ${elemId} poiri\u00e1 \u00e8sser mal posicionat.",
filterEvaluateNotImplemented:"evaluar es pas encara estat implementat per aqueste tipe de filtre."});
OpenLayers.Lang.pt=OpenLayers.Util.applyDefaults({unhandledRequest:"Servidor devolveu erro n\u00e3o contemplado ${statusText}",permalink:"Liga\u00e7\u00e3o permanente",overlays:"Sobreposi\u00e7\u00f5es",baseLayer:"Camada Base",sameProjection:"O mapa panor\u00e2mico s\u00f3 funciona quando est\u00e1 na mesma proje\u00e7\u00e3o que o mapa principal",readNotImplemented:"Leitura n\u00e3o implementada.",writeNotImplemented:"Escrita n\u00e3o implementada.",noFID:"N\u00e3o \u00e9 poss\u00edvel atualizar um elemento para a qual n\u00e3o h\u00e1 FID.",
errorLoadingGML:"Erro ao carregar ficheiro GML ${url}",browserNotSupported:"O seu navegador n\u00e3o suporta renderiza\u00e7\u00e3o vetorial. Actualmente os renderizadores suportados s\u00e3o:\n${renderers}",componentShouldBe:"addFeatures: componente deve ser um(a) ${geomType}",getFeatureError:"getFeatureFromEvent foi chamado numa camada sem renderizador. Isto normalmente significa que destruiu uma camada, mas n\u00e3o um manipulador ''(handler)'' que lhe est\u00e1 associado.",minZoomLevelError:"A propriedade minZoomLevel s\u00f3 deve ser usada com as camadas descendentes da FixedZoomLevels. A verifica\u00e7\u00e3o da propriedade por esta camada wfs \u00e9 uma rel\u00edquia do passado. No entanto, n\u00e3o podemos remov\u00ea-la sem correr o risco de afectar aplica\u00e7\u00f5es OL que dependam dela. Portanto, estamos a torn\u00e1-la obsoleta -- a verifica\u00e7\u00e3o minZoomLevel ser\u00e1 removida na vers\u00e3o 3.0. Em vez dela, por favor, use as op\u00e7\u00f5es de resolu\u00e7\u00e3o min/max descritas aqui: http://trac.openlayers.org/wiki/SettingZoomLevels",
commitSuccess:"Transac\u00e7\u00e3o WFS: SUCESSO ${response}",commitFailed:"Transac\u00e7\u00e3o WFS: FALHOU ${response}",googleWarning:"A Camada Google n\u00e3o foi correctamente carregada.<br><br>Para deixar de receber esta mensagem, seleccione uma nova Camada-Base no ''switcher'' de camadas no canto superior direito.<br><br>Provavelmente, isto acontece porque o ''script'' da biblioteca do Google Maps n\u00e3o foi inclu\u00eddo ou n\u00e3o cont\u00e9m a chave API correcta para o seu s\u00edtio.<br><br>Programadores: Para ajuda sobre como solucionar o problema <a href='http://trac.openlayers.org/wiki/Google' target='_blank'>clique aqui</a> .",
getLayerWarning:"A camada ${layerType} n\u00e3o foi correctamente carregada.<br><br>Para desactivar esta mensagem, seleccione uma nova Camada-Base no ''switcher'' de camadas no canto superior direito.<br><br>Provavelmente, isto acontece porque o ''script'' da biblioteca ${layerLib} n\u00e3o foi inclu\u00eddo correctamente.<br><br>Programadores: Para ajuda sobre como solucionar o problema <a href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'>clique aqui</a> .",scale:"Escala = 1 : ${scaleDenom}",
W:"O",E:"E",N:"N",S:"S",layerAlreadyAdded:"Voc\u00ea tentou adicionar a camada: ${layerName} ao mapa, mas ela j\u00e1 tinha sido adicionada antes",reprojectDeprecated:"Est\u00e1 usando a op\u00e7\u00e3o 'reproject' na camada ${layerName}. Esta op\u00e7\u00e3o \u00e9 obsoleta: foi concebida para permitir a apresenta\u00e7\u00e3o de dados sobre mapas-base comerciais, mas esta funcionalidade \u00e9 agora suportada pelo Mercator Esf\u00e9rico. Mais informa\u00e7\u00e3o est\u00e1 dispon\u00edvel em http://trac.openlayers.org/wiki/SphericalMercator.",
methodDeprecated:"Este m\u00e9todo foi declarado obsoleto e ser\u00e1 removido na vers\u00e3o 3.0. Por favor, use ${newMethod} em vez disso.",boundsAddError:"Voc\u00ea deve passar tanto o valor x como o y \u00e0 fun\u00e7\u00e3o de adi\u00e7\u00e3o.",lonlatAddError:"Voc\u00ea deve passar tanto o valor lon como o lat \u00e0 fun\u00e7\u00e3o de adi\u00e7\u00e3o.",pixelAddError:"Voc\u00ea deve passar tanto o valor x como o y \u00e0 fun\u00e7\u00e3o de adi\u00e7\u00e3o.",unsupportedGeometryType:"Tipo de geometria n\u00e3o suportado: ${geomType}",
pagePositionFailed:"OpenLayers.Util.pagePosition falhou: o elemento com o id ${elemId} poder\u00e1 estar mal-posicionado.",filterEvaluateNotImplemented:"avaliar n\u00e3o est\u00e1 implementado para este tipo de filtro."});
OpenLayers.Lang.ru=OpenLayers.Util.applyDefaults({unhandledRequest:"\u041d\u0435\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u0435\u0440\u043d\u0443\u043b ${statusText}",permalink:"\u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430",overlays:"\u0421\u043b\u043e\u0438",baseLayer:"\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0441\u043b\u043e\u0439",sameProjection:"\u041e\u0431\u0437\u043e\u0440\u043d\u0430\u044f \u043a\u0430\u0440\u0442\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u0438\u043c\u0435\u0435\u0442 \u0442\u0443 \u0436\u0435 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u044e, \u0447\u0442\u043e \u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f",
readNotImplemented:"\u0427\u0442\u0435\u043d\u0438\u0435 \u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e.",writeNotImplemented:"\u0417\u0430\u043f\u0438\u0441\u044c \u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430.",noFID:"\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0435\u0442 FID.",
errorLoadingGML:"\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0444\u0430\u0439\u043b\u0430 GML ${url}",browserNotSupported:"\u0412\u0430\u0448 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u0443\u044e \u0433\u0440\u0430\u0444\u0438\u043a\u0443. \u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f:\n${renderers}",
componentShouldBe:"addFeatures: \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c ${geomType}",getFeatureError:"getFeatureFromEvent \u0432\u044b\u0437\u0432\u0430\u043d \u0434\u043b\u044f \u0441\u043b\u043e\u044f \u0431\u0435\u0437 \u0440\u0435\u043d\u0434\u0435\u0440\u0435\u0440\u0430. \u041e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u044b \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0438\u043b\u0438 \u0441\u043b\u043e\u0439, \u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0439 \u0441 \u043d\u0438\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a.",
minZoomLevelError:"\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u043e minZoomLevel \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043e \u0441\u043b\u043e\u044f\u043c\u0438, \u044f\u0432\u043b\u044f\u044e\u0449\u0438\u043c\u0438\u0441\u044f \u043f\u043e\u0442\u043e\u043c\u043a\u0430\u043c\u0438 FixedZoomLevels. \u0422\u043e, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 WFS-\u0441\u043b\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043d\u0430 minZoomLevel \u2014 \u0440\u0435\u043b\u0438\u043a\u0442 \u043f\u0440\u043e\u0448\u043b\u043e\u0433\u043e. \u041e\u0434\u043d\u0430\u043a\u043e \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0442\u0430\u043a \u043a\u0430\u043a, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043e\u0442 \u043d\u0435\u0451 \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 OpenLayers \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0430 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0435\u0439 \u2014 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 minZoomLevel \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u0430 \u0432 3.0. \u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u0435\u0451 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u043c\u0438\u043d/\u043c\u0430\u043a\u0441 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u0443\u044e \u0437\u0434\u0435\u0441\u044c: http://trac.openlayers.org/wiki/SettingZoomLevels",
commitSuccess:"\u0422\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f WFS: \u0423\u0421\u041f\u0415\u0428\u041d\u041e ${response}",commitFailed:"\u0422\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f WFS: \u041e\u0428\u0418\u0411\u041a\u0410 ${response}",googleWarning:"\u0421\u043b\u043e\u0439 Google \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c.<br><br>\u0427\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u0432\u044b\u0431\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u043e\u0439 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0441\u043b\u043e\u0439 \u0432 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u0435 \u0432 \u043f\u0440\u0430\u0432\u043e\u043c \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0443\u0433\u043b\u0443.<br><br>\u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043f\u0440\u0438\u0447\u0438\u043d\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Google Maps \u043d\u0435 \u0431\u044b\u043b\u0430 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u0438\u043b\u0438 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0433\u043e API-\u043a\u043b\u044e\u0447\u0430 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430.<br><br>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c: \u0447\u0442\u043e\u0431\u044b \u0443\u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0451 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, <a href='http://trac.openlayers.org/wiki/Google' target='_blank'>\u0449\u0451\u043b\u043a\u043d\u0438\u0442\u0435 \u0442\u0443\u0442</a>",
getLayerWarning:"\u0421\u043b\u043e\u0439 ${layerType} \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c. <br><br>\u0427\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u0432\u044b\u0431\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u043e\u0439 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0441\u043b\u043e\u0439 \u0432 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u0435 \u0432 \u043f\u0440\u0430\u0432\u043e\u043c \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0443\u0433\u043b\u0443.<br><br>\u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043f\u0440\u0438\u0447\u0438\u043d\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 ${layerLib} \u043d\u0435 \u0431\u044b\u043b\u0430 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u0438\u043b\u0438 \u0431\u044b\u043b\u0430 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e.<br><br>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c: \u0447\u0442\u043e\u0431\u044b \u0443\u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0451 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, <a href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'>\u0449\u0451\u043b\u043a\u043d\u0438\u0442\u0435 \u0442\u0443\u0442</a>",
scale:"\u041c\u0430\u0441\u0448\u0442\u0430\u0431 = 1 : ${scaleDenom}",W:"\u0417",E:"\u0412",N:"\u0421",S:"\u042e",layerAlreadyAdded:"\u0412\u044b \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0438\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u043e\u0439 \u00ab${layerName}\u00bb \u043d\u0430 \u043a\u0430\u0440\u0442\u0443, \u043d\u043e \u043e\u043d \u0443\u0436\u0435 \u0431\u044b\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d",reprojectDeprecated:"\u0412\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043e\u043f\u0446\u0438\u044e 'reproject' \u0434\u043b\u044f \u0441\u043b\u043e\u044f ${layerName}. \u042d\u0442\u0430 \u043e\u043f\u0446\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0435\u0439: \u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u043b\u043e\u0441\u044c \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043f\u043e\u043a\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0432\u0435\u0440\u0445 \u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u0438\u0445 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u043a\u0430\u0440\u0442, \u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u044d\u0442\u043e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043d\u0435\u0441\u0451\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0441\u0444\u0435\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438 \u041c\u0435\u0440\u043a\u0430\u0442\u043e\u0440\u0430. \u0411\u043e\u043b\u044c\u0448\u0435 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043d\u0430 http://trac.openlayers.org/wiki/SphericalMercator.",
methodDeprecated:"\u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u043c \u0438 \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u0430\u043b\u0451\u043d \u0432 \u0432\u0435\u0440\u0441\u0438\u0438 3.0. \u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435\u0441\u044c ${newMethod}.",boundsAddError:"\u0424\u0443\u043d\u043a\u0446\u0438\u0438 add \u043d\u0430\u0434\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0431\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, x \u0438 y.",
lonlatAddError:"\u0424\u0443\u043d\u043a\u0446\u0438\u0438 add \u043d\u0430\u0434\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0431\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, lon \u0438 lat.",pixelAddError:"\u0424\u0443\u043d\u043a\u0446\u0438\u0438 add \u043d\u0430\u0434\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0431\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, x \u0438 y.",unsupportedGeometryType:"\u041d\u0435\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0439 \u0442\u0438\u043f \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0438: ${geomType}",
pagePositionFailed:"OpenLayers.Util.pagePosition failed: \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441 id ${elemId} \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u0435 \u0432 \u043d\u0443\u0436\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435.",filterEvaluateNotImplemented:"evaluate \u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u0434\u043b\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430."});
OpenLayers.Lang.sk=OpenLayers.Util.applyDefaults({unhandledRequest:"Neobsl\u00fa\u017een\u00e9 po\u017eiadavky vracaj\u00fa ${statusText}",permalink:"Trval\u00fd odkaz",overlays:"Prekrytia",baseLayer:"Z\u00e1kladn\u00e1 vrstva",sameProjection:"Preh\u013eadov\u00e1 mapka funguje iba vtedy, ke\u010f je v rovnakej projekcii ako hlavn\u00e1 mapa",readNotImplemented:"\u010c\u00edtanie nie je implementovan\u00e9.",writeNotImplemented:"Z\u00e1pis nie je implementovan\u00fd.",noFID:"Nie je mo\u017en\u00e9 aktualizova\u0165 vlastnos\u0165, pre ktor\u00fa neexistuje FID.",
errorLoadingGML:"Chyba pri na\u010d\u00edtan\u00ed s\u00faboru GML ${url}",browserNotSupported:"V\u00e1\u0161 prehliada\u010d nepodporuje vykres\u013eovanie vektorov. Moment\u00e1lne podporovan\u00e9 vykres\u013eova\u010de s\u00fa:\n${renderers}",componentShouldBe:"addFeatures: komponent by mal by\u0165 ${geomType}",getFeatureError:"getFeatureFromEvent bola zavolan\u00e1 na vrstve bez vykres\u013eova\u010da. To zvy\u010dajne znamen\u00e1, \u017ee ste odstr\u00e1nili vrstvu, ale nie niektor\u00fa z obsl\u00fah, ktor\u00e1 je s \u0148ou asociovan\u00e1.",
minZoomLevelError:"Vlastnos\u0165 minZoomLevel je ur\u010den\u00fd iba na pou\u017eitie s vrstvami odvoden\u00fdmi od FixedZoomLevels. To, \u017ee t\u00e1to wfs vrstva kontroluje minZoomLevel je pozostatok z minulosti. Nem\u00f4\u017eeme ho v\u0161ak odstr\u00e1ni\u0165, aby sme sa vyhli mo\u017en\u00e9mu poru\u0161eniu aplik\u00e1ci\u00ed zalo\u017een\u00fdch na Open Layers, ktor\u00e9 na tomto m\u00f4\u017ee z\u00e1visie\u0165. Preto ho ozna\u010dujeme ako zavrhovan\u00fd - dolu uveden\u00e1 kontrola minZoomLevel bude odstr\u00e1nen\u00e1 vo verzii 3.0. Pou\u017eite pros\u00edm namiesto toho kontrolu min./max. rozl\u00ed\u0161enia pod\u013ea tu uveden\u00e9ho popisu: http://trac.openlayers.org/wiki/SettingZoomLevels",
commitSuccess:"Transakcia WFS: \u00daSPE\u0160N\u00c1 ${response}",commitFailed:"Transakcia WFS: ZLYHALA ${response}",googleWarning:"Vrstvu Google nebolo mo\u017en\u00e9 spr\u00e1vne na\u010d\u00edta\u0165.<br><br>Aby ste sa tejto spr\u00e1vy zbavili vyberte nov\u00fa BaseLayer v prep\u00edna\u010di vrstiev v pravom hornom rohu.<br><br>Toto sa stalo pravdepodobne preto, \u017ee skript kni\u017enice Google Maps bu\u010f nebol na\u010d\u00edtan\u00fd alebo neobsahuje spr\u00e1vny k\u013e\u00fa\u010d API pre va\u0161u lokalitu.<br><br>V\u00fdvoj\u00e1ri: Tu m\u00f4\u017eete z\u00edska\u0165 <a href='http://trac.openlayers.org/wiki/Google' target='_blank'>pomoc so sfunk\u010dnen\u00edm</a>",
getLayerWarning:"Vrstvu ${layerType} nebolo mo\u017en\u00e9 spr\u00e1vne na\u010d\u00edta\u0165.<br><br>Aby ste sa tejto spr\u00e1vy zbavili vyberte nov\u00fa BaseLayer v prep\u00edna\u010di vrstiev v pravom hornom rohu.<br><br>Toto sa stalo pravdepodobne preto, \u017ee skript kni\u017enice ${layerType} bu\u010f nebol na\u010d\u00edtan\u00fd alebo neobsahuje spr\u00e1vny k\u013e\u00fa\u010d API pre va\u0161u lokalitu.<br><br>V\u00fdvoj\u00e1ri: Tu m\u00f4\u017eete z\u00edska\u0165 <a href='http://trac.openlayers.org/wiki/${layerType}' target='_blank'>pomoc so sfunk\u010dnen\u00edm</a>",
scale:"Mierka = 1 : ${scaleDenom}",layerAlreadyAdded:"Pok\u00fasili ste sa do mapy prida\u0165 vrstvu ${layerName}, ale t\u00e1 u\u017e bola pridan\u00e1",reprojectDeprecated:"Pou\u017e\u00edvate vo\u013eby \u201ereproject\u201c vrstvy ${layerType}. T\u00e1to vo\u013eba je zzavrhovan\u00e1: jej pou\u017eitie bolo navrhnut\u00e9 na podporu zobrazovania \u00fadajov nad komer\u010dn\u00fdmi z\u00e1kladov\u00fdmi mapami, ale t\u00fato funkcionalitu je teraz mo\u017en\u00e9 dosiahnu\u0165 pomocou Spherical Mercator. \u010eal\u0161ie inform\u00e1cie z\u00edskate na str\u00e1nke http://trac.openlayers.org/wiki/SphericalMercator.",
methodDeprecated:"T\u00e1to met\u00f3da je zavrhovan\u00e1 a bude odstr\u00e1nen\u00e1 vo verzii 3.0. Pou\u017eite pros\u00edm namiesto nej met\u00f3du ${newMethod}.",boundsAddError:"S\u010d\u00edtacej funkcii mus\u00edte da\u0165 hodnoty x aj y.",lonlatAddError:"S\u010d\u00edtacej funkcii mus\u00edte da\u0165 hodnoty lon (zem. d\u013a\u017eka) aj lat (zem. \u0161\u00edrka).",pixelAddError:"S\u010d\u00edtacej funkcii mus\u00edte da\u0165 hodnoty x aj y.",unsupportedGeometryType:"Nepodporovan\u00fd typ geometrie: ${geomType}",
pagePositionFailed:"OpenLayers.Util.pagePosition zlyhalo: prvok s id ${elemId} m\u00f4\u017ee by\u0165 zle umiestnen\u00fd.",filterEvaluateNotImplemented:"evaluate nie je implementovan\u00fd pre tento typ filtra"});OpenLayers.Lang.te=OpenLayers.Util.applyDefaults({permalink:"\u0c38\u0c4d\u0c25\u0c3f\u0c30\u0c32\u0c3f\u0c02\u0c15\u0c41",W:"\u0c2a",E:"\u0c24\u0c42",N:"\u0c09",S:"\u0c26"});
OpenLayers.Lang.vi=OpenLayers.Util.applyDefaults({unhandledRequest:"Kh\u00f4ng x\u1eed l\u00fd \u0111\u01b0\u1ee3c ph\u1ea3n h\u1ed3i ${statusText} cho y\u00eau c\u1ea7u",permalink:"Li\u00ean k\u1ebft th\u01b0\u1eddng tr\u1ef1c",overlays:"L\u1ea5p b\u1ea3n \u0111\u1ed3",baseLayer:"L\u1edbp n\u1ec1n",sameProjection:"B\u1ea3n \u0111\u1ed3 to\u00e0n c\u1ea3nh ch\u1ec9 ho\u1ea1t \u0111\u1ed9ng khi c\u00f9ng ph\u00e9p chi\u1ebfu v\u1edbi b\u1ea3n \u0111\u1ed3 ch\u00ednh",readNotImplemented:"Ch\u01b0a h\u1ed7 tr\u1ee3 ch\u1ee9c n\u0103ng \u0111\u1ecdc.",
writeNotImplemented:"Ch\u01b0a h\u1ed7 tr\u1ee3 ch\u1ee9c n\u0103ng vi\u1ebft.",noFID:"Kh\u00f4ng th\u1ec3 c\u1eadp nh\u1eadt t\u00ednh n\u0103ng thi\u1ebfu FID.",errorLoadingGML:"L\u1ed7i t\u1ea3i t\u1eadp tin GML t\u1ea1i ${url}",browserNotSupported:"Tr\u00ecnh duy\u1ec7t c\u1ee7a b\u1ea1n kh\u00f4ng h\u1ed7 tr\u1ee3 ch\u1ee9c n\u0103ng v\u1ebd b\u1eb1ng vect\u01a1. Hi\u1ec7n h\u1ed7 tr\u1ee3 c\u00e1c b\u1ed9 k\u1ebft xu\u1ea5t:\n${renderers}",componentShouldBe:"addFeatures: b\u1ed9 ph\u1eadn c\u1ea7n ph\u1ea3i l\u00e0 ${geomType}",
getFeatureError:"getFeatureFromEvent \u0111\u01b0\u1ee3c g\u1ecdi t\u1eeb l\u1edbp kh\u00f4ng c\u00f3 b\u1ed9 k\u1ebft xu\u1ea5t. Th\u01b0\u1eddng th\u00ec c\u00f3 l\u1ebd l\u1edbp b\u1ecb x\u00f3a nh\u01b0ng m\u1ed9t ph\u1ea7n x\u1eed l\u00fd c\u1ee7a n\u00f3 v\u1eabn c\u00f2n.",minZoomLevelError:"Ch\u1ec9 n\u00ean s\u1eed d\u1ee5ng thu\u1ed9c t\u00ednh minZoomLevel v\u1edbi c\u00e1c l\u1edbp FixedZoomLevels-descendent. Vi\u1ec7c l\u1edbp wfs n\u00e0y t\u00ecm cho minZoomLevel l\u00e0 di t\u00edch c\u00f2n l\u1ea1i t\u1eeb x\u01b0a. Tuy nhi\u00ean, n\u1ebfu ch\u00fang t\u00f4i d\u1eddi n\u00f3 th\u00ec s\u1ebd v\u1ee1 c\u00e1c ch\u01b0\u01a1ng tr\u00ecnh OpenLayers m\u00e0 d\u1ef1a tr\u00ean n\u00f3. B\u1edfi v\u1eady ch\u00fang t\u00f4i ph\u1ea3n \u0111\u1ed1i s\u1eed d\u1ee5ng n\u00f3&nbsp;\u2013 b\u01b0\u1edbc t\u00ecm cho minZoomLevel s\u1ebd \u0111\u01b0\u1ee3c d\u1eddi v\u00e0o phi\u00ean b\u1ea3n 3.0. Xin s\u1eed d\u1ee5ng thi\u1ebft l\u1eadp \u0111\u1ed9 ph\u00e2n t\u00edch t\u1ed1i thi\u1ec3u / t\u1ed1i \u0111a thay th\u1ebf, theo h\u01b0\u1edbng d\u1eabn n\u00e0y: http://trac.openlayers.org/wiki/SettingZoomLevels",
commitSuccess:"Giao d\u1ecbch WFS: TH\u00c0NH C\u00d4NG ${response}",commitFailed:"Giao d\u1ecbch WFS: TH\u1ea4T B\u1ea0I ${response}",googleWarning:"Kh\u00f4ng th\u1ec3 t\u1ea3i l\u1edbp Google \u0111\u00fang \u0111\u1eafn.<br><br>\u0110\u1ec3 tr\u00e1nh th\u00f4ng b\u00e1o n\u00e0y l\u1ea7n sau, h\u00e3y ch\u1ecdn BaseLayer m\u1edbi d\u00f9ng \u0111i\u1ec1u khi\u1ec3n ch\u1ecdn l\u1edbp \u1edf g\u00f3c tr\u00ean ph\u1ea3i.<br><br>Ch\u1eafc script th\u01b0 vi\u1ec7n Google Maps ho\u1eb7c kh\u00f4ng \u0111\u01b0\u1ee3c bao g\u1ed3m ho\u1eb7c kh\u00f4ng ch\u1ee9a kh\u00f3a API h\u1ee3p v\u1edbi website c\u1ee7a b\u1ea1n.<br><br><a href='http://trac.openlayers.org/wiki/Google' target='_blank'>Tr\u1ee3 gi\u00fap v\u1ec1 t\u00ednh n\u0103ng n\u00e0y</a> cho ng\u01b0\u1eddi ph\u00e1t tri\u1ec3n.",
getLayerWarning:"Kh\u00f4ng th\u1ec3 t\u1ea3i l\u1edbp ${layerType} \u0111\u00fang \u0111\u1eafn.<br><br>\u0110\u1ec3 tr\u00e1nh th\u00f4ng b\u00e1o n\u00e0y l\u1ea7n sau, h\u00e3y ch\u1ecdn BaseLayer m\u1edbi d\u00f9ng \u0111i\u1ec1u khi\u1ec3n ch\u1ecdn l\u1edbp \u1edf g\u00f3c tr\u00ean ph\u1ea3i.<br><br>Ch\u1eafc script th\u01b0 vi\u1ec7n ${layerLib} kh\u00f4ng \u0111\u01b0\u1ee3c bao g\u1ed3m \u0111\u00fang ki\u1ec3u.<br><br><a href='http://trac.openlayers.org/wiki/${layerLib}' target='_blank'>Tr\u1ee3 gi\u00fap v\u1ec1 t\u00ednh n\u0103ng n\u00e0y</a> cho ng\u01b0\u1eddi ph\u00e1t tri\u1ec3n.",
scale:"T\u1ef7 l\u1ec7 = 1 : ${scaleDenom}",W:"T",E:"\u0110",N:"B",S:"N",layerAlreadyAdded:"B\u1ea1n mu\u1ed1n th\u00eam l\u1edbp ${layerName} v\u00e0o b\u1ea3n \u0111\u1ed3, nh\u01b0ng l\u1edbp n\u00e0y \u0111\u00e3 \u0111\u01b0\u1ee3c th\u00eam",reprojectDeprecated:"B\u1ea1n \u0111ang \u00e1p d\u1ee5ng ch\u1ebf \u0111\u1ed9 \u201creproject\u201d v\u00e0o l\u1edbp ${layerName}. Ch\u1ebf \u0111\u1ed9 n\u00e0y \u0111\u00e3 b\u1ecb ph\u1ea3n \u0111\u1ed1i: n\u00f3 c\u00f3 m\u1ee5c \u0111\u00edch h\u1ed7 tr\u1ee3 l\u1ea5p d\u1eef li\u1ec7u tr\u00ean c\u00e1c n\u1ec1n b\u1ea3n \u0111\u1ed3 th\u01b0\u01a1ng m\u1ea1i; n\u00ean th\u1ef1c hi\u1ec7n hi\u1ec7u \u1ee9ng \u0111\u00f3 d\u00f9ng t\u00ednh n\u0103ng Mercator H\u00ecnh c\u1ea7u. C\u00f3 s\u1eb5n th\u00eam chi ti\u1ebft t\u1ea1i http://trac.openlayers.org/wiki/SphericalMercator .",
methodDeprecated:"Ph\u01b0\u01a1ng th\u1ee9c n\u00e0y \u0111\u00e3 b\u1ecb ph\u1ea3n \u0111\u1ed1i v\u00e0 s\u1ebd b\u1ecb d\u1eddi v\u00e0o phi\u00ean b\u1ea3n 3.0. Xin h\u00e3y s\u1eed d\u1ee5ng ${newMethod} thay th\u1ebf.",boundsAddError:"C\u1ea7n ph\u1ea3i cho c\u1ea3 gi\u00e1 tr\u1ecb x v\u00e0 y v\u00e0o h\u00e0m add.",lonlatAddError:"C\u1ea7n ph\u1ea3i cho c\u1ea3 gi\u00e1 tr\u1ecb lon v\u00e0 lat v\u00e0o h\u00e0m add.",pixelAddError:"C\u1ea7n ph\u1ea3i cho c\u1ea3 gi\u00e1 tr\u1ecb x v\u00e0 y v\u00e0o h\u00e0m add.",
unsupportedGeometryType:"Kh\u00f4ng h\u1ed7 tr\u1ee3 ki\u1ec3u \u0111\u1ecba l\u00fd: ${geomType}",pagePositionFailed:"OpenLayers.Util.pagePosition b\u1ecb th\u1ea5t b\u1ea1i: nguy\u00ean t\u1ed1 v\u1edbi ID ${elemId} c\u00f3 th\u1ec3 \u1edf ch\u1ed7 sai.",filterEvaluateNotImplemented:"ch\u01b0a h\u1ed7 tr\u1ee3 evaluate cho lo\u1ea1i b\u1ed9 l\u1ecdc n\u00e0y."});
OpenLayers.Popup.AnchoredBubble=OpenLayers.Class(OpenLayers.Popup.Anchored,{rounded:!1,initialize:function(a,b,c,d,e,f,g){this.padding=new OpenLayers.Bounds(0,OpenLayers.Popup.AnchoredBubble.CORNER_SIZE,0,OpenLayers.Popup.AnchoredBubble.CORNER_SIZE);OpenLayers.Popup.Anchored.prototype.initialize.apply(this,arguments)},draw:function(a){OpenLayers.Popup.Anchored.prototype.draw.apply(this,arguments);this.setContentHTML();this.setBackgroundColor();this.setOpacity();return this.div},updateRelativePosition:function(){this.setRicoCorners()},
setSize:function(a){OpenLayers.Popup.Anchored.prototype.setSize.apply(this,arguments);this.setRicoCorners()},setBackgroundColor:function(a){if(void 0!=a)this.backgroundColor=a;if(null!=this.div&&null!=this.contentDiv)this.div.style.background="transparent",OpenLayers.Rico.Corner.changeColor(this.groupDiv,this.backgroundColor)},setOpacity:function(a){OpenLayers.Popup.Anchored.prototype.setOpacity.call(this,a);null!=this.div&&null!=this.groupDiv&&OpenLayers.Rico.Corner.changeOpacity(this.groupDiv,this.opacity)},
setBorder:function(){this.border=0},setRicoCorners:function(){var a={corners:this.getCornersToRound(this.relativePosition),color:this.backgroundColor,bgColor:"transparent",blend:!1};this.rounded?(OpenLayers.Rico.Corner.reRound(this.groupDiv,a),this.setBackgroundColor(),this.setOpacity()):(OpenLayers.Rico.Corner.round(this.div,a),this.rounded=!0)},getCornersToRound:function(){var a=["tl","tr","bl","br"],b=OpenLayers.Bounds.oppositeQuadrant(this.relativePosition);OpenLayers.Util.removeItem(a,b);return a.join(" ")},
CLASS_NAME:"OpenLayers.Popup.AnchoredBubble"});OpenLayers.Popup.AnchoredBubble.CORNER_SIZE=5;
OpenLayers.Popup.Framed=OpenLayers.Class(OpenLayers.Popup.Anchored,{imageSrc:null,imageSize:null,isAlphaImage:!1,positionBlocks:null,blocks:null,fixedRelativePosition:!1,initialize:function(a,b,c,d,e,f,g){OpenLayers.Popup.Anchored.prototype.initialize.apply(this,arguments);if(this.fixedRelativePosition)this.updateRelativePosition(),this.calculateRelativePosition=function(){return this.relativePosition};this.contentDiv.style.position="absolute";this.contentDiv.style.zIndex=1;if(f)this.closeDiv.style.zIndex=
1;this.groupDiv.style.position="absolute";this.groupDiv.style.top="0px";this.groupDiv.style.left="0px";this.groupDiv.style.height="100%";this.groupDiv.style.width="100%"},destroy:function(){this.isAlphaImage=this.imageSize=this.imageSrc=null;this.fixedRelativePosition=!1;this.positionBlocks=null;for(var a=0;a<this.blocks.length;a++){var b=this.blocks[a];b.image&&b.div.removeChild(b.image);b.image=null;b.div&&this.groupDiv.removeChild(b.div);b.div=null}this.blocks=null;OpenLayers.Popup.Anchored.prototype.destroy.apply(this,
arguments)},setBackgroundColor:function(){},setBorder:function(){},setOpacity:function(){},setSize:function(a){OpenLayers.Popup.Anchored.prototype.setSize.apply(this,arguments);this.updateBlocks()},updateRelativePosition:function(){this.padding=this.positionBlocks[this.relativePosition].padding;if(this.closeDiv){var a=this.getContentDivPadding();this.closeDiv.style.right=a.right+this.padding.right+"px";this.closeDiv.style.top=a.top+this.padding.top+"px"}this.updateBlocks()},calculateNewPx:function(a){var b=
OpenLayers.Popup.Anchored.prototype.calculateNewPx.apply(this,arguments);return b=b.offset(this.positionBlocks[this.relativePosition].offset)},createBlocks:function(){this.blocks=[];var a=null,b;for(b in this.positionBlocks){a=b;break}a=this.positionBlocks[a];for(b=0;b<a.blocks.length;b++){var c={};this.blocks.push(c);c.div=OpenLayers.Util.createDiv(this.id+"_FrameDecorationDiv_"+b,null,null,null,"absolute",null,"hidden",null);c.image=(this.isAlphaImage?OpenLayers.Util.createAlphaImageDiv:OpenLayers.Util.createImage)(this.id+
"_FrameDecorationImg_"+b,null,this.imageSize,this.imageSrc,"absolute",null,null,null);c.div.appendChild(c.image);this.groupDiv.appendChild(c.div)}},updateBlocks:function(){this.blocks||this.createBlocks();if(this.size&&this.relativePosition){for(var a=this.positionBlocks[this.relativePosition],b=0;b<a.blocks.length;b++){var c=a.blocks[b],d=this.blocks[b],e=c.anchor.left,f=c.anchor.bottom,g=c.anchor.right,h=c.anchor.top,j=isNaN(c.size.w)?this.size.w-(g+e):c.size.w,k=isNaN(c.size.h)?this.size.h-(f+
h):c.size.h;d.div.style.width=(0>j?0:j)+"px";d.div.style.height=(0>k?0:k)+"px";d.div.style.left=null!=e?e+"px":"";d.div.style.bottom=null!=f?f+"px":"";d.div.style.right=null!=g?g+"px":"";d.div.style.top=null!=h?h+"px":"";d.image.style.left=c.position.x+"px";d.image.style.top=c.position.y+"px"}this.contentDiv.style.left=this.padding.left+"px";this.contentDiv.style.top=this.padding.top+"px"}},CLASS_NAME:"OpenLayers.Popup.Framed"});
OpenLayers.Projection=OpenLayers.Class({proj:null,projCode:null,initialize:function(a,b){OpenLayers.Util.extend(this,b);this.projCode=a;if(window.Proj4js)this.proj=new Proj4js.Proj(a)},getCode:function(){return this.proj?this.proj.srsCode:this.projCode},getUnits:function(){return this.proj?this.proj.units:null},toString:function(){return this.getCode()},equals:function(a){return a&&a.getCode?this.getCode()==a.getCode():!1},destroy:function(){delete this.proj;delete this.projCode},CLASS_NAME:"OpenLayers.Projection"});
OpenLayers.Projection.transforms={};OpenLayers.Projection.addTransform=function(a,b,c){OpenLayers.Projection.transforms[a]||(OpenLayers.Projection.transforms[a]={});OpenLayers.Projection.transforms[a][b]=c};OpenLayers.Projection.transform=function(a,b,c){if(b.proj&&c.proj)a=Proj4js.transform(b.proj,c.proj,a);else if(b&&c&&OpenLayers.Projection.transforms[b.getCode()]&&OpenLayers.Projection.transforms[b.getCode()][c.getCode()])OpenLayers.Projection.transforms[b.getCode()][c.getCode()](a);return a};
OpenLayers.Protocol.WFS.v1=OpenLayers.Class(OpenLayers.Protocol,{version:null,srsName:"EPSG:4326",featureType:null,featureNS:null,geometryName:"the_geom",schema:null,featurePrefix:"feature",formatOptions:null,readFormat:null,initialize:function(a){OpenLayers.Protocol.prototype.initialize.apply(this,[a]);if(!a.format)this.format=OpenLayers.Format.WFST(OpenLayers.Util.extend({version:this.version,featureType:this.featureType,featureNS:this.featureNS,featurePrefix:this.featurePrefix,geometryName:this.geometryName,
srsName:this.srsName,schema:this.schema},this.formatOptions));if(!this.featureNS&&this.featurePrefix){var b=this.format.readNode;this.format.readNode=function(a,d){if(!this.featureNS&&a.prefix==this.featurePrefix)this.featureNS=a.namespaceURI,this.setNamespace("feature",this.featureNS);return b.apply(this,arguments)}}},destroy:function(){this.options&&!this.options.format&&this.format.destroy();this.format=null;OpenLayers.Protocol.prototype.destroy.apply(this)},read:function(a){OpenLayers.Protocol.prototype.read.apply(this,
arguments);a=OpenLayers.Util.extend({},a);OpenLayers.Util.applyDefaults(a,this.options||{});var b=new OpenLayers.Protocol.Response({requestType:"read"}),c=OpenLayers.Format.XML.prototype.write.apply(this.format,[this.format.writeNode("wfs:GetFeature",a)]);b.priv=OpenLayers.Request.POST({url:a.url,callback:this.createCallback(this.handleRead,b,a),params:a.params,headers:a.headers,data:c});return b},handleRead:function(a,b){if(b.callback){var c=a.priv;200<=c.status&&300>c.status?(a.features=this.parseFeatures(c),
a.code=OpenLayers.Protocol.Response.SUCCESS):a.code=OpenLayers.Protocol.Response.FAILURE;b.callback.call(b.scope,a)}},parseFeatures:function(a){var b=a.responseXML;if(!b||!b.documentElement)b=a.responseText;return!b||0>=b.length?null:null!==this.readFormat?this.readFormat.read(b):this.format.read(b)},commit:function(a,b){b=OpenLayers.Util.extend({},b);OpenLayers.Util.applyDefaults(b,this.options);var c=new OpenLayers.Protocol.Response({requestType:"commit",reqFeatures:a});c.priv=OpenLayers.Request.POST({url:b.url,
data:this.format.write(a,b),callback:this.createCallback(this.handleCommit,c,b)});return c},handleCommit:function(a,b){if(b.callback){var c=a.priv,d=c.responseXML;if(!d||!d.documentElement)d=c.responseText;c=this.format.read(d)||{};a.insertIds=c.insertIds||[];a.code=c.success?OpenLayers.Protocol.Response.SUCCESS:OpenLayers.Protocol.Response.FAILURE;b.callback.call(b.scope,a)}},filterDelete:function(a,b){b=OpenLayers.Util.extend({},b);OpenLayers.Util.applyDefaults(b,this.options);new OpenLayers.Protocol.Response({requestType:"commit"});
var c=this.format.createElementNSPlus("wfs:Transaction",{attributes:{service:"WFS",version:this.version}}),d=this.format.createElementNSPlus("wfs:Delete",{attributes:{typeName:(b.featureNS?this.featurePrefix+":":"")+b.featureType}});b.featureNS&&d.setAttribute("xmlns:"+this.featurePrefix,b.featureNS);var e=this.format.writeNode("ogc:Filter",a);d.appendChild(e);c.appendChild(d);c=OpenLayers.Format.XML.prototype.write.apply(this.format,[c]);return OpenLayers.Request.POST({url:this.url,callback:b.callback||
function(){},data:c})},abort:function(a){a&&a.priv.abort()},CLASS_NAME:"OpenLayers.Protocol.WFS.v1"});
OpenLayers.Renderer.SVG=OpenLayers.Class(OpenLayers.Renderer.Elements,{xmlns:"http://www.w3.org/2000/svg",xlinkns:"http://www.w3.org/1999/xlink",MAX_PIXEL:15E3,translationParameters:null,symbolMetrics:null,isGecko:null,supportUse:null,initialize:function(a){if(this.supported())OpenLayers.Renderer.Elements.prototype.initialize.apply(this,arguments),this.translationParameters={x:0,y:0},this.supportUse=-1==navigator.userAgent.toLowerCase().indexOf("applewebkit/5"),this.isGecko=-1!=navigator.userAgent.toLowerCase().indexOf("gecko/"),
this.symbolMetrics={}},destroy:function(){OpenLayers.Renderer.Elements.prototype.destroy.apply(this,arguments)},supported:function(){return document.implementation&&(document.implementation.hasFeature("org.w3c.svg","1.0")||document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#SVG","1.1")||document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"))},inValidRange:function(a,b,c){a+=c?0:this.translationParameters.x;b+=c?0:this.translationParameters.y;
return a>=-this.MAX_PIXEL&&a<=this.MAX_PIXEL&&b>=-this.MAX_PIXEL&&b<=this.MAX_PIXEL},setExtent:function(a,b){OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments);var c=this.getResolution(),d=-a.left/c,c=a.top/c;if(b)return this.left=d,this.top=c,this.rendererRoot.setAttributeNS(null,"viewBox","0 0 "+this.size.w+" "+this.size.h),this.translate(0,0),!0;(d=this.translate(d-this.left,c-this.top))||this.setExtent(a,!0);return d},translate:function(a,b){if(this.inValidRange(a,b,!0)){var c=
"";if(a||b)c="translate("+a+","+b+")";this.root.setAttributeNS(null,"transform",c);this.translationParameters={x:a,y:b};return!0}return!1},setSize:function(a){OpenLayers.Renderer.prototype.setSize.apply(this,arguments);this.rendererRoot.setAttributeNS(null,"width",this.size.w);this.rendererRoot.setAttributeNS(null,"height",this.size.h)},getNodeType:function(a,b){var c=null;switch(a.CLASS_NAME){case "OpenLayers.Geometry.Point":c=b.externalGraphic?"image":this.isComplexSymbol(b.graphicName)?!1===this.supportUse?
"svg":"use":"circle";break;case "OpenLayers.Geometry.Rectangle":c="rect";break;case "OpenLayers.Geometry.LineString":c="polyline";break;case "OpenLayers.Geometry.LinearRing":c="polygon";break;case "OpenLayers.Geometry.Polygon":case "OpenLayers.Geometry.Curve":case "OpenLayers.Geometry.Surface":c="path"}return c},setStyle:function(a,b,c){var b=b||a._style,c=c||a._options,d=parseFloat(a.getAttributeNS(null,"r")),e=1,f;if("OpenLayers.Geometry.Point"==a._geometryClass&&d){a.style.visibility="";if(!1===
b.graphic)a.style.visibility="hidden";else if(b.externalGraphic){f=this.getPosition(a);b.graphicTitle&&a.setAttributeNS(null,"title",b.graphicTitle);b.graphicWidth&&b.graphicHeight&&a.setAttributeNS(null,"preserveAspectRatio","none");var d=b.graphicWidth||b.graphicHeight,g=b.graphicHeight||b.graphicWidth,d=d?d:2*b.pointRadius,g=g?g:2*b.pointRadius,h=void 0!=b.graphicYOffset?b.graphicYOffset:-(0.5*g),j=b.graphicOpacity||b.fillOpacity;a.setAttributeNS(null,"x",(f.x+(void 0!=b.graphicXOffset?b.graphicXOffset:
-(0.5*d))).toFixed());a.setAttributeNS(null,"y",(f.y+h).toFixed());a.setAttributeNS(null,"width",d);a.setAttributeNS(null,"height",g);a.setAttributeNS(this.xlinkns,"href",b.externalGraphic);a.setAttributeNS(null,"style","opacity: "+j)}else if(this.isComplexSymbol(b.graphicName)){var d=3*b.pointRadius,g=2*d,k=this.importSymbol(b.graphicName);f=this.getPosition(a);e=3*this.symbolMetrics[k][0]/g;h=a.parentNode;j=a.nextSibling;h&&h.removeChild(a);if(!1===this.supportUse){var l=document.getElementById(k);
a.firstChild&&a.removeChild(a.firstChild);a.appendChild(l.firstChild.cloneNode(!0));a.setAttributeNS(null,"viewBox",l.getAttributeNS(null,"viewBox"))}else a.setAttributeNS(this.xlinkns,"href","#"+k);a.setAttributeNS(null,"width",g);a.setAttributeNS(null,"height",g);a.setAttributeNS(null,"x",f.x-d);a.setAttributeNS(null,"y",f.y-d);j?h.insertBefore(a,j):h&&h.appendChild(a)}else a.setAttributeNS(null,"r",b.pointRadius);d=b.rotation;if((void 0!==d||void 0!==a._rotation)&&f)a._rotation=d,d|=0,"svg"!==
a.nodeName?a.setAttributeNS(null,"transform","rotate("+d+" "+f.x+" "+f.y+")"):(f=this.symbolMetrics[k],a.firstChild.setAttributeNS(null,"transform","rotate("+b.rotation+" "+f[1]+" "+f[2]+")"))}c.isFilled?(a.setAttributeNS(null,"fill",b.fillColor),a.setAttributeNS(null,"fill-opacity",b.fillOpacity)):a.setAttributeNS(null,"fill","none");c.isStroked?(a.setAttributeNS(null,"stroke",b.strokeColor),a.setAttributeNS(null,"stroke-opacity",b.strokeOpacity),a.setAttributeNS(null,"stroke-width",b.strokeWidth*
e),a.setAttributeNS(null,"stroke-linecap",b.strokeLinecap||"round"),a.setAttributeNS(null,"stroke-linejoin","round"),b.strokeDashstyle&&a.setAttributeNS(null,"stroke-dasharray",this.dashStyle(b,e))):a.setAttributeNS(null,"stroke","none");b.pointerEvents&&a.setAttributeNS(null,"pointer-events",b.pointerEvents);null!=b.cursor&&a.setAttributeNS(null,"cursor",b.cursor);return a},dashStyle:function(a,b){var c=a.strokeWidth*b,d=a.strokeDashstyle;switch(d){case "solid":return"none";case "dot":return[1,4*
c].join();case "dash":return[4*c,4*c].join();case "dashdot":return[4*c,4*c,1,4*c].join();case "longdash":return[8*c,4*c].join();case "longdashdot":return[8*c,4*c,1,4*c].join();default:return OpenLayers.String.trim(d).replace(/\s+/g,",")}},createNode:function(a,b){var c=document.createElementNS(this.xmlns,a);b&&c.setAttributeNS(null,"id",b);return c},nodeTypeCompare:function(a,b){return b==a.nodeName},createRenderRoot:function(){return this.nodeFactory(this.container.id+"_svgRoot","svg")},createRoot:function(a){return this.nodeFactory(this.container.id+
a,"g")},createDefs:function(){var a=this.nodeFactory(this.container.id+"_defs","defs");this.rendererRoot.appendChild(a);return a},drawPoint:function(a,b){return this.drawCircle(a,b,1)},drawCircle:function(a,b,c){var d=this.getResolution(),e=b.x/d+this.left,b=this.top-b.y/d;return this.inValidRange(e,b)?(a.setAttributeNS(null,"cx",e),a.setAttributeNS(null,"cy",b),a.setAttributeNS(null,"r",c),a):!1},drawLineString:function(a,b){var c=this.getComponentsString(b.components);return c.path?(a.setAttributeNS(null,
"points",c.path),c.complete?a:null):!1},drawLinearRing:function(a,b){var c=this.getComponentsString(b.components);return c.path?(a.setAttributeNS(null,"points",c.path),c.complete?a:null):!1},drawPolygon:function(a,b){for(var c="",d=!0,e=!0,f,g,h=0,j=b.components.length;h<j;h++)c+=" M",f=this.getComponentsString(b.components[h].components," "),(g=f.path)?(c+=" "+g,e=f.complete&&e):d=!1;return d?(a.setAttributeNS(null,"d",c+" z"),a.setAttributeNS(null,"fill-rule","evenodd"),e?a:null):!1},drawRectangle:function(a,
b){var c=this.getResolution(),d=b.x/c+this.left,e=this.top-b.y/c;return this.inValidRange(d,e)?(a.setAttributeNS(null,"x",d),a.setAttributeNS(null,"y",e),a.setAttributeNS(null,"width",b.width/c),a.setAttributeNS(null,"height",b.height/c),a):!1},drawSurface:function(a,b){for(var c=null,d=!0,e=0,f=b.components.length;e<f;e++)if(0==e%3&&0==e/3){var g=this.getShortString(b.components[e]);g||(d=!1);c="M "+g}else 1==e%3?((g=this.getShortString(b.components[e]))||(d=!1),c+=" C "+g):((g=this.getShortString(b.components[e]))||
(d=!1),c+=" "+g);return d?(a.setAttributeNS(null,"d",c+" Z"),a):!1},drawText:function(a,b,c){var d=this.getResolution(),e=c.x/d+this.left,f=c.y/d-this.top,d=this.nodeFactory(a+this.LABEL_ID_SUFFIX,"text"),g=this.nodeFactory(a+this.LABEL_ID_SUFFIX+"_tspan","tspan");d.setAttributeNS(null,"x",e);d.setAttributeNS(null,"y",-f);b.fontColor&&d.setAttributeNS(null,"fill",b.fontColor);b.fontOpacity&&d.setAttributeNS(null,"opacity",b.fontOpacity);b.fontFamily&&d.setAttributeNS(null,"font-family",b.fontFamily);
b.fontSize&&d.setAttributeNS(null,"font-size",b.fontSize);b.fontWeight&&d.setAttributeNS(null,"font-weight",b.fontWeight);!0===b.labelSelect?(d.setAttributeNS(null,"pointer-events","visible"),d._featureId=a,g._featureId=a,g._geometry=c,g._geometryClass=c.CLASS_NAME):d.setAttributeNS(null,"pointer-events","none");a=b.labelAlign||"cm";d.setAttributeNS(null,"text-anchor",OpenLayers.Renderer.SVG.LABEL_ALIGN[a[0]]||"middle");this.isGecko?d.setAttributeNS(null,"dominant-baseline",OpenLayers.Renderer.SVG.LABEL_ALIGN[a[1]]||
"central"):g.setAttributeNS(null,"baseline-shift",OpenLayers.Renderer.SVG.LABEL_VSHIFT[a[1]]||"-35%");g.textContent=b.label;d.parentNode||(d.appendChild(g),this.textRoot.appendChild(d))},getComponentsString:function(a,b){for(var c=[],d=!0,e=a.length,f=[],g,h=0;h<e;h++)g=a[h],c.push(g),(g=this.getShortString(g))?f.push(g):(0<h&&this.getShortString(a[h-1])&&f.push(this.clipLine(a[h],a[h-1])),h<e-1&&this.getShortString(a[h+1])&&f.push(this.clipLine(a[h],a[h+1])),d=!1);return{path:f.join(b||","),complete:d}},
clipLine:function(a,b){if(b.equals(a))return"";var c=this.getResolution(),d=this.MAX_PIXEL-this.translationParameters.x,e=this.MAX_PIXEL-this.translationParameters.y,f=b.x/c+this.left,g=this.top-b.y/c,h=a.x/c+this.left,c=this.top-a.y/c,j;if(h<-d||h>d)j=(c-g)/(h-f),h=0>h?-d:d,c=g+(h-f)*j;if(c<-e||c>e)j=(h-f)/(c-g),c=0>c?-e:e,h=f+(c-g)*j;return h+","+c},getShortString:function(a){var b=this.getResolution(),c=a.x/b+this.left,a=this.top-a.y/b;return this.inValidRange(c,a)?c+","+a:!1},getPosition:function(a){return{x:parseFloat(a.getAttributeNS(null,
"cx")),y:parseFloat(a.getAttributeNS(null,"cy"))}},importSymbol:function(a){if(!this.defs)this.defs=this.createDefs();var b=this.container.id+"-"+a;if(null!=document.getElementById(b))return b;var c=OpenLayers.Renderer.symbol[a];if(!c)throw Error(a+" is not a valid symbol name");var a=this.nodeFactory(b,"symbol"),d=this.nodeFactory(null,"polygon");a.appendChild(d);for(var e=new OpenLayers.Bounds(Number.MAX_VALUE,Number.MAX_VALUE,0,0),f=[],g,h,j=0;j<c.length;j+=2)g=c[j],h=c[j+1],e.left=Math.min(e.left,
g),e.bottom=Math.min(e.bottom,h),e.right=Math.max(e.right,g),e.top=Math.max(e.top,h),f.push(g,",",h);d.setAttributeNS(null,"points",f.join(" "));c=e.getWidth();d=e.getHeight();a.setAttributeNS(null,"viewBox",[e.left-c,e.bottom-d,3*c,3*d].join(" "));this.symbolMetrics[b]=[Math.max(c,d),e.getCenterLonLat().lon,e.getCenterLonLat().lat];this.defs.appendChild(a);return a.id},getFeatureIdFromEvent:function(a){var b=OpenLayers.Renderer.Elements.prototype.getFeatureIdFromEvent.apply(this,arguments);if(!1===
this.supportUse&&!b)b=a.target,b=b.parentNode&&b!=this.rendererRoot&&b.parentNode._featureId;return b},CLASS_NAME:"OpenLayers.Renderer.SVG"});OpenLayers.Renderer.SVG.LABEL_ALIGN={l:"start",r:"end",b:"bottom",t:"hanging"};OpenLayers.Renderer.SVG.LABEL_VSHIFT={t:"-70%",b:"0"};
OpenLayers.Renderer.VML=OpenLayers.Class(OpenLayers.Renderer.Elements,{xmlns:"urn:schemas-microsoft-com:vml",symbolCache:{},offset:null,initialize:function(a){if(this.supported()){if(!document.namespaces.olv){document.namespaces.add("olv",this.xmlns);for(var b=document.createStyleSheet(),c="shape,rect,oval,fill,stroke,imagedata,group,textbox".split(","),d=0,e=c.length;d<e;d++)b.addRule("olv\\:"+c[d],"behavior: url(#default#VML); position: absolute; display: inline-block;")}OpenLayers.Renderer.Elements.prototype.initialize.apply(this,
arguments)}},destroy:function(){OpenLayers.Renderer.Elements.prototype.destroy.apply(this,arguments)},supported:function(){return!!document.namespaces},setExtent:function(a,b){OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments);var c=this.getResolution(),d=a.left/c|0,c=a.top/c-this.size.h|0;b||!this.offset?(this.offset={x:d,y:c},c=d=0):(d-=this.offset.x,c-=this.offset.y);this.root.coordorigin=d+" "+c;for(var d=[this.root,this.vectorRoot,this.textRoot],e=0,f=d.length;e<f;++e)c=d[e],
c.coordsize=this.size.w+" "+this.size.h;this.root.style.flip="y";return!0},setSize:function(a){OpenLayers.Renderer.prototype.setSize.apply(this,arguments);for(var b=[this.rendererRoot,this.root,this.vectorRoot,this.textRoot],c=this.size.w+"px",d=this.size.h+"px",e,f=0,g=b.length;f<g;++f)e=b[f],e.style.width=c,e.style.height=d},getNodeType:function(a,b){var c=null;switch(a.CLASS_NAME){case "OpenLayers.Geometry.Point":c=b.externalGraphic?"olv:rect":this.isComplexSymbol(b.graphicName)?"olv:shape":"olv:oval";
break;case "OpenLayers.Geometry.Rectangle":c="olv:rect";break;case "OpenLayers.Geometry.LineString":case "OpenLayers.Geometry.LinearRing":case "OpenLayers.Geometry.Polygon":case "OpenLayers.Geometry.Curve":case "OpenLayers.Geometry.Surface":c="olv:shape"}return c},setStyle:function(a,b,c,d){var b=b||a._style,c=c||a._options,e=b.fillColor;if("OpenLayers.Geometry.Point"===a._geometryClass)if(b.externalGraphic){if(b.graphicTitle)a.title=b.graphicTitle;var e=b.graphicWidth||b.graphicHeight,f=b.graphicHeight||
b.graphicWidth,e=e?e:2*b.pointRadius,f=f?f:2*b.pointRadius,g=this.getResolution(),h=void 0!=b.graphicXOffset?b.graphicXOffset:-(0.5*e),j=void 0!=b.graphicYOffset?b.graphicYOffset:-(0.5*f);a.style.left=(d.x/g-this.offset.x+h|0)+"px";a.style.top=(d.y/g-this.offset.y-(j+f)|0)+"px";a.style.width=e+"px";a.style.height=f+"px";a.style.flip="y";e="none";c.isStroked=!1}else this.isComplexSymbol(b.graphicName)?(f=this.importSymbol(b.graphicName),a.path=f.path,a.coordorigin=f.left+","+f.bottom,f=f.size,a.coordsize=
f+","+f,this.drawCircle(a,d,b.pointRadius),a.style.flip="y"):this.drawCircle(a,d,b.pointRadius);c.isFilled?a.fillcolor=e:a.filled="false";d=a.getElementsByTagName("fill");d=0==d.length?null:d[0];if(c.isFilled){d||(d=this.createNode("olv:fill",a.id+"_fill"));d.opacity=b.fillOpacity;if("OpenLayers.Geometry.Point"===a._geometryClass&&b.externalGraphic){if(b.graphicOpacity)d.opacity=b.graphicOpacity;d.src=b.externalGraphic;d.type="frame";if(!b.graphicWidth||!b.graphicHeight)d.aspect="atmost"}d.parentNode!=
a&&a.appendChild(d)}else d&&a.removeChild(d);e=b.rotation;if(void 0!==e||void 0!==a._rotation)if(a._rotation=e,b.externalGraphic)this.graphicRotate(a,h,j,b),d.opacity=0;else if("OpenLayers.Geometry.Point"===a._geometryClass)a.style.rotation=e||0;h=a.getElementsByTagName("stroke");h=0==h.length?null:h[0];if(c.isStroked){if(h||(h=this.createNode("olv:stroke",a.id+"_stroke"),a.appendChild(h)),h.on=!0,h.color=b.strokeColor,h.weight=b.strokeWidth+"px",h.opacity=b.strokeOpacity,h.endcap="butt"==b.strokeLinecap?
"flat":b.strokeLinecap||"round",b.strokeDashstyle)h.dashstyle=this.dashStyle(b)}else if(a.stroked=!1,h)h.on=!1;if("inherit"!=b.cursor&&null!=b.cursor)a.style.cursor=b.cursor;return a},graphicRotate:function(a,b,c,d){var d=d||a._style,e=d.rotation||0,f,g;if(!d.graphicWidth||!d.graphicHeight){var h=new Image;h.onreadystatechange=OpenLayers.Function.bind(function(){if("complete"==h.readyState||"interactive"==h.readyState)f=h.width/h.height,g=Math.max(2*d.pointRadius,d.graphicWidth||0,d.graphicHeight||
0),b*=f,d.graphicWidth=g*f,d.graphicHeight=g,this.graphicRotate(a,b,c,d)},this);h.src=d.externalGraphic}else{g=Math.max(d.graphicWidth,d.graphicHeight);f=d.graphicWidth/d.graphicHeight;var j=Math.round(d.graphicWidth||g*f),k=Math.round(d.graphicHeight||g);a.style.width=j+"px";a.style.height=k+"px";var l=document.getElementById(a.id+"_image");l||(l=this.createNode("olv:imagedata",a.id+"_image"),a.appendChild(l));l.style.width=j+"px";l.style.height=k+"px";l.src=d.externalGraphic;l.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='', sizingMethod='scale')";
l=e*Math.PI/180;e=Math.sin(l);l=Math.cos(l);e="progid:DXImageTransform.Microsoft.Matrix(M11="+l+",M12="+-e+",M21="+e+",M22="+l+",SizingMethod='auto expand')\n";(l=d.graphicOpacity||d.fillOpacity)&&1!=l&&(e+="progid:DXImageTransform.Microsoft.BasicImage(opacity="+l+")\n");a.style.filter=e;e=new OpenLayers.Geometry.Point(-b,-c);j=(new OpenLayers.Bounds(0,0,j,k)).toGeometry();j.rotate(d.rotation,e);j=j.getBounds();a.style.left=Math.round(parseInt(a.style.left)+j.left)+"px";a.style.top=Math.round(parseInt(a.style.top)-
j.bottom)+"px"}},postDraw:function(a){a.style.visibility="visible";var b=a._style.fillColor,c=a._style.strokeColor;if("none"==b&&a.fillcolor!=b)a.fillcolor=b;if("none"==c&&a.strokecolor!=c)a.strokecolor=c},setNodeDimension:function(a,b){var c=b.getBounds();if(c){var d=this.getResolution(),c=new OpenLayers.Bounds(c.left/d-this.offset.x|0,c.bottom/d-this.offset.y|0,c.right/d-this.offset.x|0,c.top/d-this.offset.y|0);a.style.left=c.left+"px";a.style.top=c.top+"px";a.style.width=c.getWidth()+"px";a.style.height=
c.getHeight()+"px";a.coordorigin=c.left+" "+c.top;a.coordsize=c.getWidth()+" "+c.getHeight()}},dashStyle:function(a){a=a.strokeDashstyle;switch(a){case "solid":case "dot":case "dash":case "dashdot":case "longdash":case "longdashdot":return a;default:return a=a.split(/[ ,]/),2==a.length?1*a[0]>=2*a[1]?"longdash":1==a[0]||1==a[1]?"dot":"dash":4==a.length?1*a[0]>=2*a[1]?"longdashdot":"dashdot":"solid"}},createNode:function(a,b){var c=document.createElement(a);if(b)c.id=b;c.unselectable="on";c.onselectstart=
OpenLayers.Function.False;return c},nodeTypeCompare:function(a,b){var c=b,d=c.indexOf(":");-1!=d&&(c=c.substr(d+1));var e=a.nodeName,d=e.indexOf(":");-1!=d&&(e=e.substr(d+1));return c==e},createRenderRoot:function(){return this.nodeFactory(this.container.id+"_vmlRoot","div")},createRoot:function(a){return this.nodeFactory(this.container.id+a,"olv:group")},drawPoint:function(a,b){return this.drawCircle(a,b,1)},drawCircle:function(a,b,c){if(!isNaN(b.x)&&!isNaN(b.y)){var d=this.getResolution();a.style.left=
(b.x/d-this.offset.x|0)-c+"px";a.style.top=(b.y/d-this.offset.y|0)-c+"px";b=2*c;a.style.width=b+"px";a.style.height=b+"px";return a}return!1},drawLineString:function(a,b){return this.drawLine(a,b,!1)},drawLinearRing:function(a,b){return this.drawLine(a,b,!0)},drawLine:function(a,b,c){this.setNodeDimension(a,b);for(var d=this.getResolution(),e=b.components.length,f=Array(e),g,h,j=0;j<e;j++)g=b.components[j],h=g.x/d-this.offset.x|0,g=g.y/d-this.offset.y|0,f[j]=" "+h+","+g+" l ";a.path="m"+f.join("")+
(c?" x e":" e");return a},drawPolygon:function(a,b){this.setNodeDimension(a,b);var c=this.getResolution(),d=[],e,f,g,h,j,k,l;for(g=0,h=b.components.length;g<h;g++){e=b.components[g];d.push("m");for(f=0,j=e.components.length;f<j;f++)k=e.components[f],l=k.x/c-this.offset.x|0,k=k.y/c-this.offset.y|0,d.push(" "+l+","+k),0==f&&d.push(" l");d.push(" x ")}d.push("e");a.path=d.join("");return a},drawRectangle:function(a,b){var c=this.getResolution();a.style.left=(b.x/c-this.offset.x|0)+"px";a.style.top=(b.y/
c-this.offset.y|0)+"px";a.style.width=(b.width/c|0)+"px";a.style.height=(b.height/c|0)+"px";return a},drawText:function(a,b,c){var d=this.nodeFactory(a+this.LABEL_ID_SUFFIX,"olv:rect"),e=this.nodeFactory(a+this.LABEL_ID_SUFFIX+"_textbox","olv:textbox"),f=this.getResolution();d.style.left=(c.x/f-this.offset.x|0)+"px";d.style.top=(c.y/f-this.offset.y|0)+"px";d.style.flip="y";e.innerText=b.label;if(b.fontColor)e.style.color=b.fontColor;if(b.fontOpacity)e.style.filter="alpha(opacity="+100*b.fontOpacity+
")";if(b.fontFamily)e.style.fontFamily=b.fontFamily;if(b.fontSize)e.style.fontSize=b.fontSize;if(b.fontWeight)e.style.fontWeight=b.fontWeight;if(!0===b.labelSelect)d._featureId=a,e._featureId=a,e._geometry=c,e._geometryClass=c.CLASS_NAME;e.style.whiteSpace="nowrap";e.inset="1px,0px,0px,0px";d.parentNode||(d.appendChild(e),this.textRoot.appendChild(d));b=b.labelAlign||"cm";1==b.length&&(b+="m");a=e.clientWidth*OpenLayers.Renderer.VML.LABEL_SHIFT[b.substr(0,1)];e=e.clientHeight*OpenLayers.Renderer.VML.LABEL_SHIFT[b.substr(1,
1)];d.style.left=parseInt(d.style.left)-a-1+"px";d.style.top=parseInt(d.style.top)+e+"px"},drawSurface:function(a,b){this.setNodeDimension(a,b);for(var c=this.getResolution(),d=[],e,f,g=0,h=b.components.length;g<h;g++)e=b.components[g],f=e.x/c-this.offset.x|0,e=e.y/c-this.offset.y|0,0==g%3&&0==g/3?d.push("m"):1==g%3&&d.push(" c"),d.push(" "+f+","+e);d.push(" x e");a.path=d.join("");return a},moveRoot:function(a){var b=this.map.getLayer(a.container.id);b instanceof OpenLayers.Layer.Vector.RootContainer&&
(b=this.map.getLayer(this.container.id));b&&b.renderer.clear();OpenLayers.Renderer.Elements.prototype.moveRoot.apply(this,arguments);b&&b.redraw()},importSymbol:function(a){var b=this.container.id+"-"+a,c=this.symbolCache[b];if(c)return c;c=OpenLayers.Renderer.symbol[a];if(!c)throw Error(a+" is not a valid symbol name");for(var a=new OpenLayers.Bounds(Number.MAX_VALUE,Number.MAX_VALUE,0,0),d=["m"],e=0;e<c.length;e+=2){var f=c[e],g=c[e+1];a.left=Math.min(a.left,f);a.bottom=Math.min(a.bottom,g);a.right=
Math.max(a.right,f);a.top=Math.max(a.top,g);d.push(f);d.push(g);0==e&&d.push("l")}d.push("x e");c=d.join(" ");d=(a.getWidth()-a.getHeight())/2;0<d?(a.bottom-=d,a.top+=d):(a.left+=d,a.right-=d);c={path:c,size:a.getWidth(),left:a.left,bottom:a.bottom};return this.symbolCache[b]=c},CLASS_NAME:"OpenLayers.Renderer.VML"});OpenLayers.Renderer.VML.LABEL_SHIFT={l:0,c:0.5,r:1,t:0,m:0.5,b:1};
OpenLayers.Tile=OpenLayers.Class({EVENT_TYPES:["loadstart","loadend","reload","unload"],events:null,id:null,layer:null,url:null,bounds:null,size:null,position:null,isLoading:!1,initialize:function(a,b,c,d,e){this.layer=a;this.position=b.clone();this.bounds=c.clone();this.url=d;this.size=e.clone();this.id=OpenLayers.Util.createUniqueID("Tile_");this.events=new OpenLayers.Events(this,null,this.EVENT_TYPES)},unload:function(){if(this.isLoading)this.isLoading=!1,this.events.triggerEvent("unload")},destroy:function(){this.position=
this.size=this.bounds=this.layer=null;this.events.destroy();this.events=null},clone:function(a){null==a&&(a=new OpenLayers.Tile(this.layer,this.position,this.bounds,this.url,this.size));OpenLayers.Util.applyDefaults(a,this);return a},draw:function(){var a=this.layer.maxExtent;this.shouldDraw=a&&this.bounds.intersectsBounds(a,!1)||this.layer.displayOutsideMaxExtent;this.clear();return this.shouldDraw},moveTo:function(a,b,c){null==c&&(c=!0);this.bounds=a.clone();this.position=b.clone();c&&this.draw()},
clear:function(){},getBoundsFromBaseLayer:function(a){var b=OpenLayers.i18n("reprojectDeprecated",{layerName:this.layer.name});OpenLayers.Console.warn(b);b=this.layer.map.getLonLatFromLayerPx(a);a=a.clone();a.x+=this.size.w;a.y+=this.size.h;a=this.layer.map.getLonLatFromLayerPx(a);if(b.lon>a.lon)0>b.lon?b.lon=-180-(b.lon+180):a.lon=180+a.lon+180;return new OpenLayers.Bounds(b.lon,a.lat,a.lon,b.lat)},showTile:function(){this.shouldDraw&&this.show()},show:function(){},hide:function(){},CLASS_NAME:"OpenLayers.Tile"});
OpenLayers.Control.MouseToolbar=OpenLayers.Class(OpenLayers.Control.MouseDefaults,{mode:null,buttons:null,direction:"vertical",buttonClicked:null,initialize:function(a,b){OpenLayers.Control.prototype.initialize.apply(this,arguments);this.position=new OpenLayers.Pixel(OpenLayers.Control.MouseToolbar.X,OpenLayers.Control.MouseToolbar.Y);if(a)this.position=a;if(b)this.direction=b;this.measureDivs=[]},destroy:function(){for(var a in this.buttons){var b=this.buttons[a];b.map=null;b.events.destroy()}OpenLayers.Control.MouseDefaults.prototype.destroy.apply(this,
arguments)},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);OpenLayers.Control.MouseDefaults.prototype.draw.apply(this,arguments);this.buttons={};var a=new OpenLayers.Size(28,28),b=new OpenLayers.Pixel(OpenLayers.Control.MouseToolbar.X,0);this._addButton("zoombox","drag-rectangle-off.png","drag-rectangle-on.png",b,a,"Shift->Drag to zoom to area");b=b.add("vertical"==this.direction?0:a.w,"vertical"==this.direction?a.h:0);this._addButton("pan","panning-hand-off.png","panning-hand-on.png",
b,a,"Drag the map to pan.");b.add("vertical"==this.direction?0:a.w,"vertical"==this.direction?a.h:0);this.switchModeTo("pan");return this.div},_addButton:function(a,b,c,d,e,f){b=OpenLayers.Util.getImagesLocation()+b;c=OpenLayers.Util.getImagesLocation()+c;d=OpenLayers.Util.createAlphaImageDiv("OpenLayers_Control_MouseToolbar_"+a,d,e,b,"absolute");this.div.appendChild(d);d.imgLocation=b;d.activeImgLocation=c;d.events=new OpenLayers.Events(this,d,null,!0);d.events.on({mousedown:this.buttonDown,mouseup:this.buttonUp,
dblclick:OpenLayers.Event.stop,scope:this});d.action=a;d.title=f;d.alt=f;d.map=this.map;return this.buttons[a]=d},buttonDown:function(a){if(OpenLayers.Event.isLeftClick(a))this.buttonClicked=a.element.action,OpenLayers.Event.stop(a)},buttonUp:function(a){if(OpenLayers.Event.isLeftClick(a)&&null!=this.buttonClicked)this.buttonClicked==a.element.action&&this.switchModeTo(a.element.action),OpenLayers.Event.stop(a),this.buttonClicked=null},defaultDblClick:function(a){this.switchModeTo("pan");this.performedDrag=
!1;this.map.setCenter(this.map.getLonLatFromViewPortPx(a.xy),this.map.zoom+1);OpenLayers.Event.stop(a);return!1},defaultMouseDown:function(a){if(OpenLayers.Event.isLeftClick(a)){this.mouseDragStart=a.xy.clone();this.startViaKeyboard=this.performedDrag=!1;a.shiftKey&&"zoombox"!=this.mode?(this.switchModeTo("zoombox"),this.startViaKeyboard=!0):a.altKey&&"measure"!=this.mode?this.switchModeTo("measure"):this.mode||this.switchModeTo("pan");switch(this.mode){case "zoombox":this.map.div.style.cursor="crosshair";
this.zoomBox=OpenLayers.Util.createDiv("zoomBox",this.mouseDragStart,null,null,"absolute","2px solid red");this.zoomBox.style.backgroundColor="white";this.zoomBox.style.filter="alpha(opacity=50)";this.zoomBox.style.opacity="0.50";this.zoomBox.style.fontSize="1px";this.zoomBox.style.zIndex=this.map.Z_INDEX_BASE.Popup-1;this.map.viewPortDiv.appendChild(this.zoomBox);this.performedDrag=!0;break;case "measure":var b="";if(this.measureStart)b=this.map.getLonLatFromViewPortPx(this.mouseDragStart),b=OpenLayers.Util.distVincenty(this.measureStart,
b),b=Math.round(100*b)/100,b+="km",this.measureStartBox=this.measureBox;this.measureStart=this.map.getLonLatFromViewPortPx(this.mouseDragStart);this.measureBox=OpenLayers.Util.createDiv(null,this.mouseDragStart.add(-2-parseInt(this.map.layerContainerDiv.style.left),-2-parseInt(this.map.layerContainerDiv.style.top)),null,null,"absolute");this.measureBox.style.width="4px";this.measureBox.style.height="4px";this.measureBox.style.fontSize="1px";this.measureBox.style.backgroundColor="red";this.measureBox.style.zIndex=
this.map.Z_INDEX_BASE.Popup-1;this.map.layerContainerDiv.appendChild(this.measureBox);if(b)this.measureBoxDistance=OpenLayers.Util.createDiv(null,this.mouseDragStart.add(-2-parseInt(this.map.layerContainerDiv.style.left),2-parseInt(this.map.layerContainerDiv.style.top)),null,null,"absolute"),this.measureBoxDistance.innerHTML=b,this.measureBoxDistance.style.zIndex=this.map.Z_INDEX_BASE.Popup-1,this.map.layerContainerDiv.appendChild(this.measureBoxDistance),this.measureDivs.push(this.measureBoxDistance);
this.measureBox.style.zIndex=this.map.Z_INDEX_BASE.Popup-1;this.map.layerContainerDiv.appendChild(this.measureBox);this.measureDivs.push(this.measureBox);break;default:this.map.div.style.cursor="move"}document.onselectstart=OpenLayers.Function.False;OpenLayers.Event.stop(a)}},switchModeTo:function(a){if(a!=this.mode){this.mode&&this.buttons[this.mode]&&OpenLayers.Util.modifyAlphaImageDiv(this.buttons[this.mode],null,null,null,this.buttons[this.mode].imgLocation);if("measure"==this.mode&&"measure"!=
a){for(var b=0,c=this.measureDivs.length;b<c;b++)this.measureDivs[b]&&this.map.layerContainerDiv.removeChild(this.measureDivs[b]);this.measureDivs=[];this.measureStart=null}this.mode=a;this.buttons[a]&&OpenLayers.Util.modifyAlphaImageDiv(this.buttons[a],null,null,null,this.buttons[a].activeImgLocation);switch(this.mode){case "zoombox":this.map.div.style.cursor="crosshair";break;default:this.map.div.style.cursor=""}}},leaveMode:function(){this.switchModeTo("pan")},defaultMouseMove:function(a){if(null!=
this.mouseDragStart){switch(this.mode){case "zoombox":var b=Math.abs(this.mouseDragStart.x-a.xy.x),c=Math.abs(this.mouseDragStart.y-a.xy.y);this.zoomBox.style.width=Math.max(1,b)+"px";this.zoomBox.style.height=Math.max(1,c)+"px";if(a.xy.x<this.mouseDragStart.x)this.zoomBox.style.left=a.xy.x+"px";if(a.xy.y<this.mouseDragStart.y)this.zoomBox.style.top=a.xy.y+"px";break;default:var b=this.mouseDragStart.x-a.xy.x,c=this.mouseDragStart.y-a.xy.y,d=this.map.getSize();this.map.setCenter(this.map.getLonLatFromViewPortPx(new OpenLayers.Pixel(d.w/
2+b,d.h/2+c)),null,!0);this.mouseDragStart=a.xy.clone()}this.performedDrag=!0}},defaultMouseUp:function(a){if(OpenLayers.Event.isLeftClick(a)){switch(this.mode){case "zoombox":this.zoomBoxEnd(a);this.startViaKeyboard&&this.leaveMode();break;case "pan":this.performedDrag&&this.map.setCenter(this.map.center)}this.mouseDragStart=document.onselectstart=null;this.map.div.style.cursor="default"}},defaultMouseOut:function(a){if(null!=this.mouseDragStart&&OpenLayers.Util.mouseLeft(a,this.map.div))this.zoomBox&&
(this.removeZoomBox(),this.startViaKeyboard&&this.leaveMode()),this.mouseDragStart=null,this.map.div.style.cursor="default"},defaultClick:function(){if(this.performedDrag)return this.performedDrag=!1},CLASS_NAME:"OpenLayers.Control.MouseToolbar"});OpenLayers.Control.MouseToolbar.X=6;OpenLayers.Control.MouseToolbar.Y=300;
OpenLayers.Control.NavigationHistory=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOGGLE,previous:null,previousOptions:null,next:null,nextOptions:null,limit:50,autoActivate:!0,clearOnDeactivate:!1,registry:null,nextStack:null,previousStack:null,listeners:null,restoring:!1,initialize:function(a){OpenLayers.Control.prototype.initialize.apply(this,[a]);this.registry=OpenLayers.Util.extend({moveend:this.getState},this.registry);a={trigger:OpenLayers.Function.bind(this.previousTrigger,
this),displayClass:this.displayClass+" "+this.displayClass+"Previous"};OpenLayers.Util.extend(a,this.previousOptions);this.previous=new OpenLayers.Control.Button(a);a={trigger:OpenLayers.Function.bind(this.nextTrigger,this),displayClass:this.displayClass+" "+this.displayClass+"Next"};OpenLayers.Util.extend(a,this.nextOptions);this.next=new OpenLayers.Control.Button(a);this.clear()},onPreviousChange:function(a){a&&!this.previous.active?this.previous.activate():!a&&this.previous.active&&this.previous.deactivate()},
onNextChange:function(a){a&&!this.next.active?this.next.activate():!a&&this.next.active&&this.next.deactivate()},destroy:function(){OpenLayers.Control.prototype.destroy.apply(this);this.previous.destroy();this.next.destroy();this.deactivate();for(var a in this)this[a]=null},setMap:function(a){this.map=a;this.next.setMap(a);this.previous.setMap(a)},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);this.next.draw();this.previous.draw()},previousTrigger:function(){var a=this.previousStack.shift(),
b=this.previousStack.shift();void 0!=b?(this.nextStack.unshift(a),this.previousStack.unshift(b),this.restoring=!0,this.restore(b),this.restoring=!1,this.onNextChange(this.nextStack[0],this.nextStack.length),this.onPreviousChange(this.previousStack[1],this.previousStack.length-1)):this.previousStack.unshift(a);return b},nextTrigger:function(){var a=this.nextStack.shift();if(void 0!=a)this.previousStack.unshift(a),this.restoring=!0,this.restore(a),this.restoring=!1,this.onNextChange(this.nextStack[0],
this.nextStack.length),this.onPreviousChange(this.previousStack[1],this.previousStack.length-1);return a},clear:function(){this.previousStack=[];this.previous.deactivate();this.nextStack=[];this.next.deactivate()},getState:function(){return{center:this.map.getCenter(),resolution:this.map.getResolution(),projection:this.map.getProjectionObject(),units:this.map.getProjectionObject().getUnits()||this.map.units||this.map.baseLayer.units}},restore:function(a){var b,c;if(this.map.getProjectionObject()==
a.projection)c=this.map.getZoomForResolution(a.resolution),b=a.center;else{b=a.center.clone();b.transform(a.projection,this.map.getProjectionObject());c=a.units;var d=this.map.getProjectionObject().getUnits()||this.map.units||this.map.baseLayer.units;c=this.map.getZoomForResolution((c&&d?OpenLayers.INCHES_PER_UNIT[c]/OpenLayers.INCHES_PER_UNIT[d]:1)*a.resolution)}this.map.setCenter(b,c)},setListeners:function(){this.listeners={};for(var a in this.registry)this.listeners[a]=OpenLayers.Function.bind(function(){if(!this.restoring){this.previousStack.unshift(this.registry[a].apply(this,
arguments));if(1<this.previousStack.length)this.onPreviousChange(this.previousStack[1],this.previousStack.length-1);this.previousStack.length>this.limit+1&&this.previousStack.pop();if(0<this.nextStack.length)this.nextStack=[],this.onNextChange(null,0)}return!0},this)},activate:function(){var a=!1;if(this.map&&OpenLayers.Control.prototype.activate.apply(this)){null==this.listeners&&this.setListeners();for(var b in this.listeners)this.map.events.register(b,this,this.listeners[b]);a=!0;0==this.previousStack.length&&
this.initStack()}return a},initStack:function(){this.map.getCenter()&&this.listeners.moveend()},deactivate:function(){var a=!1;if(this.map&&OpenLayers.Control.prototype.deactivate.apply(this)){for(var b in this.listeners)this.map.events.unregister(b,this,this.listeners[b]);this.clearOnDeactivate&&this.clear();a=!0}return a},CLASS_NAME:"OpenLayers.Control.NavigationHistory"});
OpenLayers.Control.PanPanel=OpenLayers.Class(OpenLayers.Control.Panel,{slideFactor:50,initialize:function(a){OpenLayers.Control.Panel.prototype.initialize.apply(this,[a]);this.addControls([new OpenLayers.Control.Pan(OpenLayers.Control.Pan.NORTH,{slideFactor:this.slideFactor}),new OpenLayers.Control.Pan(OpenLayers.Control.Pan.SOUTH,{slideFactor:this.slideFactor}),new OpenLayers.Control.Pan(OpenLayers.Control.Pan.EAST,{slideFactor:this.slideFactor}),new OpenLayers.Control.Pan(OpenLayers.Control.Pan.WEST,
{slideFactor:this.slideFactor})])},CLASS_NAME:"OpenLayers.Control.PanPanel"});
OpenLayers.Control.PanZoomBar=OpenLayers.Class(OpenLayers.Control.PanZoom,{zoomStopWidth:18,zoomStopHeight:11,slider:null,sliderEvents:null,zoombarDiv:null,divEvents:null,zoomWorldIcon:!1,forceFixedZoomLevel:!1,mouseDragStart:null,zoomStart:null,initialize:function(){OpenLayers.Control.PanZoom.prototype.initialize.apply(this,arguments)},destroy:function(){this._removeZoomBar();this.map.events.un({changebaselayer:this.redraw,scope:this});OpenLayers.Control.PanZoom.prototype.destroy.apply(this,arguments);
delete this.mouseDragStart;delete this.zoomStart},setMap:function(a){OpenLayers.Control.PanZoom.prototype.setMap.apply(this,arguments);this.map.events.register("changebaselayer",this,this.redraw)},redraw:function(){null!=this.div&&(this.removeButtons(),this._removeZoomBar());this.draw()},draw:function(a){OpenLayers.Control.prototype.draw.apply(this,arguments);a=this.position.clone();this.buttons=[];var b=new OpenLayers.Size(18,18),c=new OpenLayers.Pixel(a.x+b.w/2,a.y),d=b.w;this.zoomWorldIcon&&(c=
new OpenLayers.Pixel(a.x+b.w,a.y));this._addButton("panup","north-mini.png",c,b);a.y=c.y+b.h;this._addButton("panleft","west-mini.png",a,b);this.zoomWorldIcon&&(this._addButton("zoomworld","zoom-world-mini.png",a.add(b.w,0),b),d*=2);this._addButton("panright","east-mini.png",a.add(d,0),b);this._addButton("pandown","south-mini.png",c.add(0,2*b.h),b);this._addButton("zoomin","zoom-plus-mini.png",c.add(0,3*b.h+5),b);c=this._addZoomBar(c.add(0,4*b.h+5));this._addButton("zoomout","zoom-minus-mini.png",
c,b);return this.div},_addZoomBar:function(a){var b=OpenLayers.Util.getImagesLocation(),c=this.id+"_"+this.map.id,d=this.map.getNumZoomLevels()-1-this.map.getZoom();this.slider=d=OpenLayers.Util.createAlphaImageDiv(c,a.add(-1,d*this.zoomStopHeight),new OpenLayers.Size(20,9),b+"slider.png","absolute");this.sliderEvents=new OpenLayers.Events(this,d,null,!0,{includeXY:!0});this.sliderEvents.on({mousedown:this.zoomBarDown,mousemove:this.zoomBarDrag,mouseup:this.zoomBarUp,dblclick:this.doubleClick,click:this.doubleClick});
var e=new OpenLayers.Size;e.h=this.zoomStopHeight*this.map.getNumZoomLevels();e.w=this.zoomStopWidth;c=null;OpenLayers.Util.alphaHack()?(c=this.id+"_"+this.map.id,c=OpenLayers.Util.createAlphaImageDiv(c,a,new OpenLayers.Size(e.w,this.zoomStopHeight),b+"zoombar.png","absolute",null,"crop"),c.style.height=e.h+"px"):c=OpenLayers.Util.createDiv("OpenLayers_Control_PanZoomBar_Zoombar"+this.map.id,a,e,b+"zoombar.png");this.zoombarDiv=c;this.divEvents=new OpenLayers.Events(this,c,null,!0,{includeXY:!0});
this.divEvents.on({mousedown:this.divClick,mousemove:this.passEventToSlider,dblclick:this.doubleClick,click:this.doubleClick});this.div.appendChild(c);this.startTop=parseInt(c.style.top);this.div.appendChild(d);this.map.events.register("zoomend",this,this.moveZoomBar);return a=a.add(0,this.zoomStopHeight*this.map.getNumZoomLevels())},_removeZoomBar:function(){this.sliderEvents.un({mousedown:this.zoomBarDown,mousemove:this.zoomBarDrag,mouseup:this.zoomBarUp,dblclick:this.doubleClick,click:this.doubleClick});
this.sliderEvents.destroy();this.divEvents.un({mousedown:this.divClick,mousemove:this.passEventToSlider,dblclick:this.doubleClick,click:this.doubleClick});this.divEvents.destroy();this.div.removeChild(this.zoombarDiv);this.zoombarDiv=null;this.div.removeChild(this.slider);this.slider=null;this.map.events.unregister("zoomend",this,this.moveZoomBar)},passEventToSlider:function(a){this.sliderEvents.handleBrowserEvent(a)},divClick:function(a){if(OpenLayers.Event.isLeftClick(a)){var b=a.xy.y,c=OpenLayers.Util.pagePosition(a.object)[1],
b=(b-c)/this.zoomStopHeight;if(this.forceFixedZoomLevel||!this.map.fractionalZoom)b=Math.floor(b);b=this.map.getNumZoomLevels()-1-b;b=Math.min(Math.max(b,0),this.map.getNumZoomLevels()-1);this.map.zoomTo(b);OpenLayers.Event.stop(a)}},zoomBarDown:function(a){if(OpenLayers.Event.isLeftClick(a))this.map.events.on({mousemove:this.passEventToSlider,mouseup:this.passEventToSlider,scope:this}),this.mouseDragStart=a.xy.clone(),this.zoomStart=a.xy.clone(),this.div.style.cursor="move",this.zoombarDiv.offsets=
null,OpenLayers.Event.stop(a)},zoomBarDrag:function(a){if(null!=this.mouseDragStart){var b=this.mouseDragStart.y-a.xy.y,c=OpenLayers.Util.pagePosition(this.zoombarDiv);if(0<a.clientY-c[1]&&a.clientY-c[1]<parseInt(this.zoombarDiv.style.height)-2)this.slider.style.top=parseInt(this.slider.style.top)-b+"px",this.mouseDragStart=a.xy.clone();OpenLayers.Event.stop(a)}},zoomBarUp:function(a){if(OpenLayers.Event.isLeftClick(a)&&this.mouseDragStart){this.div.style.cursor="";this.map.events.un({mouseup:this.passEventToSlider,
mousemove:this.passEventToSlider,scope:this});var b=this.zoomStart.y-a.xy.y,c=this.map.zoom;!this.forceFixedZoomLevel&&this.map.fractionalZoom?(c+=b/this.zoomStopHeight,c=Math.min(Math.max(c,0),this.map.getNumZoomLevels()-1)):c+=Math.round(b/this.zoomStopHeight);this.map.zoomTo(c);this.zoomStart=this.mouseDragStart=null;OpenLayers.Event.stop(a)}},moveZoomBar:function(){this.slider.style.top=(this.map.getNumZoomLevels()-1-this.map.getZoom())*this.zoomStopHeight+this.startTop+1+"px"},CLASS_NAME:"OpenLayers.Control.PanZoomBar"});
OpenLayers.Control.Permalink=OpenLayers.Class(OpenLayers.Control,{argParserClass:OpenLayers.Control.ArgParser,element:null,base:"",displayProjection:null,initialize:function(a,b,c){OpenLayers.Control.prototype.initialize.apply(this,[c]);this.element=OpenLayers.Util.getElement(a);this.base=b||document.location.href},destroy:function(){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(a){OpenLayers.Control.prototype.setMap.apply(this,arguments);for(var b=0,c=this.map.controls.length;b<c;b++){var d=this.map.controls[b];if(d.CLASS_NAME==this.argParserClass.CLASS_NAME){if(d.displayProjection!=this.displayProjection)this.displayProjection=d.displayProjection;break}}b==this.map.controls.length&&this.map.addControl(new this.argParserClass({displayProjection:this.displayProjection}))},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);
if(!this.element)this.div.className=this.displayClass,this.element=document.createElement("a"),this.element.innerHTML=OpenLayers.i18n("permalink"),this.element.href="",this.div.appendChild(this.element);this.map.events.on({moveend:this.updateLink,changelayer:this.updateLink,changebaselayer:this.updateLink,scope:this});this.updateLink();return this.div},updateLink:function(){var a=this.base;-1!=a.indexOf("?")&&(a=a.substring(0,a.indexOf("?")));a+="?"+OpenLayers.Util.getParameterString(this.createParams());
this.element.href=a},createParams:function(a,b,c){var a=a||this.map.getCenter(),d=OpenLayers.Util.getParameters(this.base);if(a){d.zoom=b||this.map.getZoom();b=a.lat;a=a.lon;if(this.displayProjection)b=OpenLayers.Projection.transform({x:a,y:b},this.map.getProjectionObject(),this.displayProjection),a=b.x,b=b.y;d.lat=Math.round(1E5*b)/1E5;d.lon=Math.round(1E5*a)/1E5;c=c||this.map.layers;d.layers="";a=0;for(b=c.length;a<b;a++){var e=c[a];d.layers=e.isBaseLayer?d.layers+(e==this.map.baseLayer?"B":"0"):
d.layers+(e.getVisibility()?"T":"F")}}return d},CLASS_NAME:"OpenLayers.Control.Permalink"});OpenLayers.Control.ZoomPanel=OpenLayers.Class(OpenLayers.Control.Panel,{initialize:function(a){OpenLayers.Control.Panel.prototype.initialize.apply(this,[a]);this.addControls([new OpenLayers.Control.ZoomIn,new OpenLayers.Control.ZoomToMaxExtent,new OpenLayers.Control.ZoomOut])},CLASS_NAME:"OpenLayers.Control.ZoomPanel"});
OpenLayers.Format.CSWGetDomain=function(a){var a=OpenLayers.Util.applyDefaults(a,OpenLayers.Format.CSWGetDomain.DEFAULTS),b=OpenLayers.Format.CSWGetDomain["v"+a.version.replace(/\./g,"_")];if(!b)throw"Unsupported CSWGetDomain version: "+a.version;return new b(a)};OpenLayers.Format.CSWGetDomain.DEFAULTS={version:"2.0.2"};
OpenLayers.Format.CSWGetRecords=function(a){var a=OpenLayers.Util.applyDefaults(a,OpenLayers.Format.CSWGetRecords.DEFAULTS),b=OpenLayers.Format.CSWGetRecords["v"+a.version.replace(/\./g,"_")];if(!b)throw"Unsupported CSWGetRecords version: "+a.version;return new b(a)};OpenLayers.Format.CSWGetRecords.DEFAULTS={version:"2.0.2"};
OpenLayers.Format.JSON=OpenLayers.Class(OpenLayers.Format,{indent:"    ",space:" ",newline:"\n",level:0,pretty:!1,initialize:function(a){OpenLayers.Format.prototype.initialize.apply(this,[a])},read:function(a,b){try{if(/^[\],:{}\s]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){var c=eval("("+a+")");if("function"===typeof b)var d=function(a,c){if(c&&"object"===typeof c)for(var e in c)c.hasOwnProperty(e)&&
(c[e]=d(e,c[e]));return b(a,c)},c=d("",c);if(this.keepData)this.data=c;return c}}catch(e){}return null},write:function(a,b){this.pretty=!!b;var c=null,d=typeof a;if(this.serialize[d])try{c=this.serialize[d].apply(this,[a])}catch(e){OpenLayers.Console.error("Trouble serializing: "+e)}return c},writeIndent:function(){var a=[];if(this.pretty)for(var b=0;b<this.level;++b)a.push(this.indent);return a.join("")},writeNewline:function(){return this.pretty?this.newline:""},writeSpace:function(){return this.pretty?
this.space:""},serialize:{object:function(a){if(null==a)return"null";if(a.constructor==Date)return this.serialize.date.apply(this,[a]);if(a.constructor==Array)return this.serialize.array.apply(this,[a]);var b=["{"];this.level+=1;var c,d,e,f=!1;for(c in a)a.hasOwnProperty(c)&&(d=OpenLayers.Format.JSON.prototype.write.apply(this,[c,this.pretty]),e=OpenLayers.Format.JSON.prototype.write.apply(this,[a[c],this.pretty]),null!=d&&null!=e&&(f&&b.push(","),b.push(this.writeNewline(),this.writeIndent(),d,":",
this.writeSpace(),e),f=!0));this.level-=1;b.push(this.writeNewline(),this.writeIndent(),"}");return b.join("")},array:function(a){var b,c=["["];this.level+=1;for(var d=0,e=a.length;d<e;++d)b=OpenLayers.Format.JSON.prototype.write.apply(this,[a[d],this.pretty]),null!=b&&(0<d&&c.push(","),c.push(this.writeNewline(),this.writeIndent(),b));this.level-=1;c.push(this.writeNewline(),this.writeIndent(),"]");return c.join("")},string:function(a){var b={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",
'"':'\\"',"\\":"\\\\"};return/["\\\x00-\x1f]/.test(a)?'"'+a.replace(/([\x00-\x1f\\"])/g,function(a,d){var e=b[d];if(e)return e;e=d.charCodeAt();return"\\u00"+Math.floor(e/16).toString(16)+(e%16).toString(16)})+'"':'"'+a+'"'},number:function(a){return isFinite(a)?""+a:"null"},"boolean":function(a){return""+a},date:function(a){function b(a){return 10>a?"0"+a:a}return'"'+a.getFullYear()+"-"+b(a.getMonth()+1)+"-"+b(a.getDate())+"T"+b(a.getHours())+":"+b(a.getMinutes())+":"+b(a.getSeconds())+'"'}},CLASS_NAME:"OpenLayers.Format.JSON"});
OpenLayers.Format.WFST=function(a){var a=OpenLayers.Util.applyDefaults(a,OpenLayers.Format.WFST.DEFAULTS),b=OpenLayers.Format.WFST["v"+a.version.replace(/\./g,"_")];if(!b)throw"Unsupported WFST version: "+a.version;return new b(a)};OpenLayers.Format.WFST.DEFAULTS={version:"1.0.0"};
OpenLayers.Format.XML=OpenLayers.Class(OpenLayers.Format,{namespaces:null,namespaceAlias:null,defaultPrefix:null,readers:{},writers:{},xmldom:null,initialize:function(a){if(window.ActiveXObject)this.xmldom=new ActiveXObject("Microsoft.XMLDOM");OpenLayers.Format.prototype.initialize.apply(this,[a]);this.namespaces=OpenLayers.Util.extend({},this.namespaces);this.namespaceAlias={};for(var b in this.namespaces)this.namespaceAlias[this.namespaces[b]]=b},destroy:function(){this.xmldom=null;OpenLayers.Format.prototype.destroy.apply(this,
arguments)},setNamespace:function(a,b){this.namespaces[a]=b;this.namespaceAlias[b]=a},read:function(a){var b=a.indexOf("<");0<b&&(a=a.substring(b));b=OpenLayers.Util.Try(OpenLayers.Function.bind(function(){var b;b=window.ActiveXObject&&!this.xmldom?new ActiveXObject("Microsoft.XMLDOM"):this.xmldom;b.loadXML(a);return b},this),function(){return(new DOMParser).parseFromString(a,"text/xml")},function(){var b=new XMLHttpRequest;b.open("GET","data:text/xml;charset=utf-8,"+encodeURIComponent(a),!1);b.overrideMimeType&&
b.overrideMimeType("text/xml");b.send(null);return b.responseXML});if(this.keepData)this.data=b;return b},write:function(a){if(this.xmldom)a=a.xml;else{var b=new XMLSerializer;if(1==a.nodeType){var c=document.implementation.createDocument("","",null);c.importNode&&(a=c.importNode(a,!0));c.appendChild(a);a=b.serializeToString(c)}else a=b.serializeToString(a)}return a},createElementNS:function(a,b){return this.xmldom?"string"==typeof a?this.xmldom.createNode(1,b,a):this.xmldom.createNode(1,b,""):document.createElementNS(a,
b)},createTextNode:function(a){"string"!==typeof a&&(a=""+a);return this.xmldom?this.xmldom.createTextNode(a):document.createTextNode(a)},getElementsByTagNameNS:function(a,b,c){var d=[];if(a.getElementsByTagNameNS)d=a.getElementsByTagNameNS(b,c);else for(var a=a.getElementsByTagName("*"),e,f,g=0,h=a.length;g<h;++g)if(e=a[g],f=e.prefix?e.prefix+":"+c:c,"*"==c||f==e.nodeName)("*"==b||b==e.namespaceURI)&&d.push(e);return d},getAttributeNodeNS:function(a,b,c){var d=null;if(a.getAttributeNodeNS)d=a.getAttributeNodeNS(b,
c);else for(var a=a.attributes,e,f,g=0,h=a.length;g<h;++g)if(e=a[g],e.namespaceURI==b&&(f=e.prefix?e.prefix+":"+c:c,f==e.nodeName)){d=e;break}return d},getAttributeNS:function(a,b,c){var d="";if(a.getAttributeNS)d=a.getAttributeNS(b,c)||"";else if(a=this.getAttributeNodeNS(a,b,c))d=a.nodeValue;return d},getChildValue:function(a,b){var c=b||"";if(a)for(var d=a.firstChild;d;d=d.nextSibling)switch(d.nodeType){case 3:case 4:c+=d.nodeValue}return c},concatChildValues:function(a,b){for(var c="",d=a.firstChild,
e;d;)(e=d.nodeValue)&&(c+=e),d=d.nextSibling;""==c&&void 0!=b&&(c=b);return c},isSimpleContent:function(a){for(var b=!0,a=a.firstChild;a;a=a.nextSibling)if(1===a.nodeType){b=!1;break}return b},contentType:function(a){for(var b=!1,c=!1,d=OpenLayers.Format.XML.CONTENT_TYPE.EMPTY,a=a.firstChild;a;a=a.nextSibling){switch(a.nodeType){case 1:c=!0;break;case 8:break;default:b=!0}if(c&&b)break}if(c&&b)d=OpenLayers.Format.XML.CONTENT_TYPE.MIXED;else{if(c)return OpenLayers.Format.XML.CONTENT_TYPE.COMPLEX;if(b)return OpenLayers.Format.XML.CONTENT_TYPE.SIMPLE}return d},
hasAttributeNS:function(a,b,c){var d=!1;return d=a.hasAttributeNS?a.hasAttributeNS(b,c):!!this.getAttributeNodeNS(a,b,c)},setAttributeNS:function(a,b,c,d){if(a.setAttributeNS)a.setAttributeNS(b,c,d);else if(this.xmldom)b?(b=a.ownerDocument.createNode(2,c,b),b.nodeValue=d,a.setAttributeNode(b)):a.setAttribute(c,d);else throw"setAttributeNS not implemented";},createElementNSPlus:function(a,b){var b=b||{},c=b.uri||this.namespaces[b.prefix];c||(c=a.indexOf(":"),c=this.namespaces[a.substring(0,c)]);c||
(c=this.namespaces[this.defaultPrefix]);c=this.createElementNS(c,a);b.attributes&&this.setAttributes(c,b.attributes);var d=b.value;null!=d&&c.appendChild(this.createTextNode(d));return c},setAttributes:function(a,b){var c,d,e;for(e in b)null!=b[e]&&b[e].toString&&(c=b[e].toString(),d=this.namespaces[e.substring(0,e.indexOf(":"))]||null,this.setAttributeNS(a,d,e,c))},readNode:function(a,b){b||(b={});var c=this.readers[a.namespaceURI?this.namespaceAlias[a.namespaceURI]:this.defaultPrefix];if(c){var d=
a.localName||a.nodeName.split(":").pop();(c=c[d]||c["*"])&&c.apply(this,[a,b])}return b},readChildNodes:function(a,b){b||(b={});for(var c=a.childNodes,d,e=0,f=c.length;e<f;++e)d=c[e],1==d.nodeType&&this.readNode(d,b);return b},writeNode:function(a,b,c){var d,e=a.indexOf(":");0<e?(d=a.substring(0,e),a=a.substring(e+1)):d=c?this.namespaceAlias[c.namespaceURI]:this.defaultPrefix;b=this.writers[d][a].apply(this,[b]);c&&c.appendChild(b);return b},getChildEl:function(a,b,c){return a&&this.getThisOrNextEl(a.firstChild,
b,c)},getNextEl:function(a,b,c){return a&&this.getThisOrNextEl(a.nextSibling,b,c)},getThisOrNextEl:function(a,b,c){a:for(;a;a=a.nextSibling)switch(a.nodeType){case 1:if((!b||b===(a.localName||a.nodeName.split(":").pop()))&&(!c||c===a.namespaceURI))break a;a=null;break a;case 3:if(/^\s*$/.test(a.nodeValue))break;case 4:case 6:case 12:case 10:case 11:a=null;break a}return a||null},lookupNamespaceURI:function(a,b){var c=null;if(a)if(a.lookupNamespaceURI)c=a.lookupNamespaceURI(b);else a:switch(a.nodeType){case 1:if(null!==
a.namespaceURI&&a.prefix===b){c=a.namespaceURI;break a}if(c=a.attributes.length)for(var d,e=0;e<c;++e)if(d=a.attributes[e],"xmlns"===d.prefix&&d.name==="xmlns:"+b){c=d.value||null;break a}else if("xmlns"===d.name&&null===b){c=d.value||null;break a}c=this.lookupNamespaceURI(a.parentNode,b);break a;case 2:c=this.lookupNamespaceURI(a.ownerElement,b);break a;case 9:c=this.lookupNamespaceURI(a.documentElement,b);break a;case 6:case 12:case 10:case 11:break a;default:c=this.lookupNamespaceURI(a.parentNode,
b)}return c},CLASS_NAME:"OpenLayers.Format.XML"});OpenLayers.Format.XML.CONTENT_TYPE={EMPTY:0,SIMPLE:1,COMPLEX:2,MIXED:3};OpenLayers.Format.XML.lookupNamespaceURI=OpenLayers.Function.bind(OpenLayers.Format.XML.prototype.lookupNamespaceURI,OpenLayers.Format.XML.prototype);
OpenLayers.Handler=OpenLayers.Class({id:null,control:null,map:null,keyMask:null,active:!1,evt:null,initialize:function(a,b,c){OpenLayers.Util.extend(this,c);this.control=a;this.callbacks=b;(a=this.map||a.map)&&this.setMap(a);this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")},setMap:function(a){this.map=a},checkModifiers:function(a){return null==this.keyMask?!0:((a.shiftKey?OpenLayers.Handler.MOD_SHIFT:0)|(a.ctrlKey?OpenLayers.Handler.MOD_CTRL:0)|(a.altKey?OpenLayers.Handler.MOD_ALT:0))==
this.keyMask},activate:function(){if(this.active)return!1;for(var a=OpenLayers.Events.prototype.BROWSER_EVENTS,b=0,c=a.length;b<c;b++)this[a[b]]&&this.register(a[b],this[a[b]]);return this.active=!0},deactivate:function(){if(!this.active)return!1;for(var a=OpenLayers.Events.prototype.BROWSER_EVENTS,b=0,c=a.length;b<c;b++)this[a[b]]&&this.unregister(a[b],this[a[b]]);this.active=!1;return!0},callback:function(a,b){a&&this.callbacks[a]&&this.callbacks[a].apply(this.control,b)},register:function(a,b){this.map.events.registerPriority(a,
this,b);this.map.events.registerPriority(a,this,this.setEvent)},unregister:function(a,b){this.map.events.unregister(a,this,b);this.map.events.unregister(a,this,this.setEvent)},setEvent:function(a){this.evt=a;return!0},destroy:function(){this.deactivate();this.control=this.map=null},CLASS_NAME:"OpenLayers.Handler"});OpenLayers.Handler.MOD_NONE=0;OpenLayers.Handler.MOD_SHIFT=1;OpenLayers.Handler.MOD_CTRL=2;OpenLayers.Handler.MOD_ALT=4;
OpenLayers.Map=OpenLayers.Class({Z_INDEX_BASE:{BaseLayer:100,Overlay:325,Feature:725,Popup:750,Control:1E3},EVENT_TYPES:"preaddlayer,addlayer,removelayer,changelayer,movestart,move,moveend,zoomend,popupopen,popupclose,addmarker,removemarker,clearmarkers,mouseover,mouseout,mousemove,dragstart,drag,dragend,changebaselayer".split(","),id:null,fractionalZoom:!1,events:null,allOverlays:!1,div:null,dragging:!1,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:!0,panTween:null,eventListeners:null,panMethod:OpenLayers.Easing.Expo.easeOut,panDuration:50,paddingForPopups:null,initialize:function(a,b){1===arguments.length&&
"object"===typeof a&&(a=(b=a)&&b.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,b);this.layers=[];this.id=OpenLayers.Util.createUniqueID("OpenLayers.Map_");this.div=OpenLayers.Util.getElement(a);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 c=this.id+"_OpenLayers_ViewPort";this.viewPortDiv=OpenLayers.Util.createDiv(c,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);c=this.id+"_OpenLayers_Container";this.layerContainerDiv=OpenLayers.Util.createDiv(c);this.layerContainerDiv.style.zIndex=
this.Z_INDEX_BASE.Popup-1;this.viewPortDiv.appendChild(this.layerContainerDiv);this.events=new OpenLayers.Events(this,this.div,this.EVENT_TYPES,this.fallThrough,{includeXY:!0});this.updateSize();if(this.eventListeners instanceof Object)this.events.on(this.eventListeners);this.events.register("movestart",this,this.updateSize);OpenLayers.String.contains(navigator.appName,"Microsoft")?this.events.register("resize",this,this.updateSize):(this.updateSizeDestroy=OpenLayers.Function.bind(this.updateSize,
this),OpenLayers.Event.observe(window,"resize",this.updateSizeDestroy));if(this.theme){for(var c=!0,d=document.getElementsByTagName("link"),e=0,f=d.length;e<f;++e)if(OpenLayers.Util.isEquivalentUrl(d.item(e).href,this.theme)){c=!1;break}c&&(c=document.createElement("link"),c.setAttribute("rel","stylesheet"),c.setAttribute("type","text/css"),c.setAttribute("href",this.theme),document.getElementsByTagName("head")[0].appendChild(c))}if(null==this.controls)this.controls=null!=OpenLayers.Control?[new OpenLayers.Control.Navigation,
new OpenLayers.Control.PanZoom,new OpenLayers.Control.ArgParser,new OpenLayers.Control.Attribution]:[];e=0;for(f=this.controls.length;e<f;e++)this.addControlToMap(this.controls[e]);this.popups=[];this.unloadDestroy=OpenLayers.Function.bind(this.destroy,this);OpenLayers.Event.observe(window,"unload",this.unloadDestroy);b&&b.layers&&(this.addLayers(b.layers),b.center&&this.setCenter(b.center,b.zoom))},render:function(a){this.div=OpenLayers.Util.getElement(a);OpenLayers.Element.addClass(this.div,"olMap");
this.events.attachToElement(this.div);this.viewPortDiv.parentNode.removeChild(this.viewPortDiv);this.div.appendChild(this.viewPortDiv);this.updateSize()},unloadDestroy:null,updateSizeDestroy:null,destroy:function(){if(!this.unloadDestroy)return!1;if(this.panTween)this.panTween.stop(),this.panTween=null;OpenLayers.Event.stopObserving(window,"unload",this.unloadDestroy);this.unloadDestroy=null;this.updateSizeDestroy?OpenLayers.Event.stopObserving(window,"resize",this.updateSizeDestroy):this.events.unregister("resize",
this,this.updateSize);this.paddingForPopups=null;if(null!=this.controls){for(var a=this.controls.length-1;0<=a;--a)this.controls[a].destroy();this.controls=null}if(null!=this.layers){for(a=this.layers.length-1;0<=a;--a)this.layers[a].destroy(!1);this.layers=null}this.viewPortDiv&&this.div.removeChild(this.viewPortDiv);this.viewPortDiv=null;if(this.eventListeners)this.events.un(this.eventListeners),this.eventListeners=null;this.events.destroy();this.events=null},setOptions:function(a){OpenLayers.Util.extend(this,
a)},getTileSize:function(){return this.tileSize},getBy:function(a,b,c){var d="function"==typeof c.test;return OpenLayers.Array.filter(this[a],function(a){return a[b]==c||d&&c.test(a[b])})},getLayersBy:function(a,b){return this.getBy("layers",a,b)},getLayersByName:function(a){return this.getLayersBy("name",a)},getLayersByClass:function(a){return this.getLayersBy("CLASS_NAME",a)},getControlsBy:function(a,b){return this.getBy("controls",a,b)},getControlsByClass:function(a){return this.getControlsBy("CLASS_NAME",
a)},getLayer:function(a){for(var b=null,c=0,d=this.layers.length;c<d;c++){var e=this.layers[c];if(e.id==a){b=e;break}}return b},setLayerZIndex:function(a,b){a.setZIndex(this.Z_INDEX_BASE[a.isBaseLayer?"BaseLayer":"Overlay"]+5*b)},resetLayersZIndex:function(){for(var a=0,b=this.layers.length;a<b;a++)this.setLayerZIndex(this.layers[a],a)},addLayer:function(a){for(var b=0,c=this.layers.length;b<c;b++)if(this.layers[b]==a)return a=OpenLayers.i18n("layerAlreadyAdded",{layerName:a.name}),OpenLayers.Console.warn(a),
!1;if(this.allOverlays)a.isBaseLayer=!1;if(!1!==this.events.triggerEvent("preaddlayer",{layer:a}))a.div.className="olLayerDiv",a.div.style.overflow="",this.setLayerZIndex(a,this.layers.length),a.isFixed?this.viewPortDiv.appendChild(a.div):this.layerContainerDiv.appendChild(a.div),this.layers.push(a),a.setMap(this),a.isBaseLayer||this.allOverlays&&!this.baseLayer?null==this.baseLayer?this.setBaseLayer(a):a.setVisibility(!1):a.redraw(),this.events.triggerEvent("addlayer",{layer:a}),a.afterAdd()},addLayers:function(a){for(var b=
0,c=a.length;b<c;b++)this.addLayer(a[b])},removeLayer:function(a,b){null==b&&(b=!0);a.isFixed?this.viewPortDiv.removeChild(a.div):this.layerContainerDiv.removeChild(a.div);OpenLayers.Util.removeItem(this.layers,a);a.removeMap(this);a.map=null;if(this.baseLayer==a&&(this.baseLayer=null,b))for(var c=0,d=this.layers.length;c<d;c++){var e=this.layers[c];if(e.isBaseLayer||this.allOverlays){this.setBaseLayer(e);break}}this.resetLayersZIndex();this.events.triggerEvent("removelayer",{layer:a})},getNumLayers:function(){return this.layers.length},
getLayerIndex:function(a){return OpenLayers.Util.indexOf(this.layers,a)},setLayerIndex:function(a,b){var c=this.getLayerIndex(a);if(0>b)b=0;else if(b>this.layers.length)b=this.layers.length;if(c!=b){this.layers.splice(c,1);this.layers.splice(b,0,a);for(var c=0,d=this.layers.length;c<d;c++)this.setLayerZIndex(this.layers[c],c);this.events.triggerEvent("changelayer",{layer:a,property:"order"});this.allOverlays&&(0===b?this.setBaseLayer(a):this.baseLayer!==this.layers[0]&&this.setBaseLayer(this.layers[0]))}},
raiseLayer:function(a,b){var c=this.getLayerIndex(a)+b;this.setLayerIndex(a,c)},setBaseLayer:function(a){if(a!=this.baseLayer&&-1!=OpenLayers.Util.indexOf(this.layers,a)){var b=this.getCenter(),c=OpenLayers.Util.getResolutionFromScale(this.getScale(),a.units);null!=this.baseLayer&&!this.allOverlays&&this.baseLayer.setVisibility(!1);this.baseLayer=a;this.viewRequestID++;(!this.allOverlays||this.baseLayer.visibility)&&this.baseLayer.setVisibility(!0);null!=b&&(a=this.getZoomForResolution(c||this.resolution,
!0),this.setCenter(b,a,!1,!0));this.events.triggerEvent("changebaselayer",{layer:this.baseLayer})}},addControl:function(a,b){this.controls.push(a);this.addControlToMap(a,b)},addControls:function(a,b){for(var c=1===arguments.length?[]:b,d=0,e=a.length;d<e;d++)this.addControl(a[d],c[d]?c[d]:null)},addControlToMap:function(a,b){a.outsideViewport=null!=a.div;if(this.displayProjection&&!a.displayProjection)a.displayProjection=this.displayProjection;a.setMap(this);var c=a.draw(b);if(c&&!a.outsideViewport)c.style.zIndex=
this.Z_INDEX_BASE.Control+this.controls.length,this.viewPortDiv.appendChild(c);a.autoActivate&&a.activate()},getControl:function(a){for(var b=null,c=0,d=this.controls.length;c<d;c++){var e=this.controls[c];if(e.id==a){b=e;break}}return b},removeControl:function(a){a&&a==this.getControl(a.id)&&(a.div&&a.div.parentNode==this.viewPortDiv&&this.viewPortDiv.removeChild(a.div),OpenLayers.Util.removeItem(this.controls,a))},addPopup:function(a,b){if(b)for(var c=this.popups.length-1;0<=c;--c)this.removePopup(this.popups[c]);
a.map=this;this.popups.push(a);if(c=a.draw())c.style.zIndex=this.Z_INDEX_BASE.Popup+this.popups.length,this.layerContainerDiv.appendChild(c)},removePopup:function(a){OpenLayers.Util.removeItem(this.popups,a);if(a.div)try{this.layerContainerDiv.removeChild(a.div)}catch(b){}a.map=null},getSize:function(){var a=null;null!=this.size&&(a=this.size.clone());return a},updateSize:function(){var a=this.getCurrentSize();if(a&&!isNaN(a.h)&&!isNaN(a.w)){this.events.clearMouseCache();var b=this.getSize();if(null==
b)this.size=b=a;if(!a.equals(b)){this.size=a;a=0;for(b=this.layers.length;a<b;a++)this.layers[a].onMapResize();a=this.getCenter();if(null!=this.baseLayer&&null!=a)b=this.getZoom(),this.zoom=null,this.setCenter(a,b)}}},getCurrentSize:function(){var a=new OpenLayers.Size(this.div.clientWidth,this.div.clientHeight);if(0==a.w&&0==a.h||isNaN(a.w)&&isNaN(a.h))a.w=this.div.offsetWidth,a.h=this.div.offsetHeight;if(0==a.w&&0==a.h||isNaN(a.w)&&isNaN(a.h))a.w=parseInt(this.div.style.width),a.h=parseInt(this.div.style.height);
return a},calculateBounds:function(a,b){var c=null;null==a&&(a=this.getCenter());null==b&&(b=this.getResolution());if(null!=a&&null!=b)var d=this.getSize(),c=d.w*b,d=d.h*b,c=new OpenLayers.Bounds(a.lon-c/2,a.lat-d/2,a.lon+c/2,a.lat+d/2);return c},getCenter:function(){var a=null;this.center&&(a=this.center.clone());return a},getZoom:function(){return this.zoom},pan:function(a,b,c){var c=OpenLayers.Util.applyDefaults(c,{animate:!0,dragging:!1}),d=this.getViewPortPxFromLonLat(this.getCenter()),a=d.add(a,
b);if(!c.dragging||!a.equals(d))d=this.getLonLatFromViewPortPx(a),c.animate?this.panTo(d):this.setCenter(d,null,c.dragging)},panTo:function(a){if(this.panMethod&&this.getExtent().scale(this.panRatio).containsLonLat(a)){if(!this.panTween)this.panTween=new OpenLayers.Tween(this.panMethod);var b=this.getCenter();a.lon==b.lon&&a.lat==b.lat||this.panTween.start({lon:b.lon,lat:b.lat},{lon:a.lon,lat:a.lat},this.panDuration,{callbacks:{start:OpenLayers.Function.bind(function(){this.events.triggerEvent("movestart")},
this),eachStep:OpenLayers.Function.bind(function(a){a=new OpenLayers.LonLat(a.lon,a.lat);this.moveTo(a,this.zoom,{dragging:!0,noEvent:!0})},this),done:OpenLayers.Function.bind(function(a){a=new OpenLayers.LonLat(a.lon,a.lat);this.moveTo(a,this.zoom,{noEvent:!0});this.events.triggerEvent("moveend")},this)}})}else this.setCenter(a)},setCenter:function(a,b,c,d){this.moveTo(a,b,{dragging:c,forceZoomChange:d,caller:"setCenter"})},moveTo:function(a,b,c){c||(c={});null!=b&&(b=parseFloat(b),this.fractionalZoom||
(b=Math.round(b)));var d=c.dragging,e=c.forceZoomChange,f=c.noEvent;this.panTween&&"setCenter"==c.caller&&this.panTween.stop();!this.center&&!this.isValidLonLat(a)&&(a=this.maxExtent.getCenterLonLat());if(null!=this.restrictedExtent&&(null==a&&(a=this.getCenter()),null==b&&(b=this.getZoom()),c=this.getResolutionForZoom(b),c=this.calculateBounds(a,c),!this.restrictedExtent.containsBounds(c))){var g=this.restrictedExtent.getCenterLonLat();c.getWidth()>this.restrictedExtent.getWidth()?a=new OpenLayers.LonLat(g.lon,
a.lat):c.left<this.restrictedExtent.left?a=a.add(this.restrictedExtent.left-c.left,0):c.right>this.restrictedExtent.right&&(a=a.add(this.restrictedExtent.right-c.right,0));c.getHeight()>this.restrictedExtent.getHeight()?a=new OpenLayers.LonLat(a.lon,g.lat):c.bottom<this.restrictedExtent.bottom?a=a.add(0,this.restrictedExtent.bottom-c.bottom):c.top>this.restrictedExtent.top&&(a=a.add(0,this.restrictedExtent.top-c.top))}e=e||this.isValidZoomLevel(b)&&b!=this.getZoom();c=this.isValidLonLat(a)&&!a.equals(this.center);
if(e||c||!d){!this.dragging&&!f&&this.events.triggerEvent("movestart");if(c)!e&&this.center&&this.centerLayerContainer(a),this.center=a.clone();if(e||null==this.layerContainerOrigin)this.layerContainerOrigin=this.center.clone(),this.layerContainerDiv.style.left="0px",this.layerContainerDiv.style.top="0px";if(e)this.zoom=b,this.resolution=this.getResolutionForZoom(b),this.viewRequestID++;a=this.getExtent();this.baseLayer.visibility&&(this.baseLayer.moveTo(a,e,d),d?this.baseLayer.events.triggerEvent("move"):
this.baseLayer.events.triggerEvent("moveend",{zoomChanged:e}));a=this.baseLayer.getExtent();b=0;for(c=this.layers.length;b<c;b++)if(g=this.layers[b],g!==this.baseLayer&&!g.isBaseLayer){var h=g.calculateInRange();if(g.inRange!=h)(g.inRange=h)||g.display(!1),this.events.triggerEvent("changelayer",{layer:g,property:"visibility"});h&&g.visibility&&(g.moveTo(a,e,d),d?g.events.triggerEvent("move"):g.events.triggerEvent("moveend",{zoomChanged:e}))}if(e){b=0;for(c=this.popups.length;b<c;b++)this.popups[b].updatePosition()}this.events.triggerEvent("move");
e&&this.events.triggerEvent("zoomend")}!d&&!f&&this.events.triggerEvent("moveend");this.dragging=!!d},centerLayerContainer:function(a){var b=this.getViewPortPxFromLonLat(this.layerContainerOrigin),a=this.getViewPortPxFromLonLat(a);if(null!=b&&null!=a)this.layerContainerDiv.style.left=Math.round(b.x-a.x)+"px",this.layerContainerDiv.style.top=Math.round(b.y-a.y)+"px"},isValidZoomLevel:function(a){return null!=a&&0<=a&&a<this.getNumZoomLevels()},isValidLonLat:function(a){var b=!1;null!=a&&(b=this.getMaxExtent().containsLonLat(a));
return b},getProjection:function(){var a=this.getProjectionObject();return a?a.getCode():null},getProjectionObject:function(){var a=null;if(null!=this.baseLayer)a=this.baseLayer.projection;return a},getMaxResolution:function(){var a=null;if(null!=this.baseLayer)a=this.baseLayer.maxResolution;return a},getMaxExtent:function(a){var b=null;if(a&&a.restricted&&this.restrictedExtent)b=this.restrictedExtent;else if(null!=this.baseLayer)b=this.baseLayer.maxExtent;return b},getNumZoomLevels:function(){var a=
null;if(null!=this.baseLayer)a=this.baseLayer.numZoomLevels;return a},getExtent:function(){var a=null;null!=this.baseLayer&&(a=this.baseLayer.getExtent());return a},getResolution:function(){var a=null;null!=this.baseLayer?a=this.baseLayer.getResolution():!0===this.allOverlays&&0<this.layers.length&&(a=this.layers[0].getResolution());return a},getUnits:function(){var a=null;if(null!=this.baseLayer)a=this.baseLayer.units;return a},getScale:function(){var a=null;null!=this.baseLayer&&(a=this.getResolution(),
a=OpenLayers.Util.getScaleFromResolution(a,this.baseLayer.units));return a},getZoomForExtent:function(a,b){var c=null;null!=this.baseLayer&&(c=this.baseLayer.getZoomForExtent(a,b));return c},getResolutionForZoom:function(a){var b=null;this.baseLayer&&(b=this.baseLayer.getResolutionForZoom(a));return b},getZoomForResolution:function(a,b){var c=null;null!=this.baseLayer&&(c=this.baseLayer.getZoomForResolution(a,b));return c},zoomTo:function(a){this.isValidZoomLevel(a)&&this.setCenter(null,a)},zoomIn:function(){this.zoomTo(this.getZoom()+
1)},zoomOut:function(){this.zoomTo(this.getZoom()-1)},zoomToExtent:function(a,b){var c=a.getCenterLonLat();if(this.baseLayer.wrapDateLine){c=this.getMaxExtent();for(a=a.clone();a.right<a.left;)a.right+=c.getWidth();c=a.getCenterLonLat().wrapDateLine(c)}this.setCenter(c,this.getZoomForExtent(a,b))},zoomToMaxExtent:function(a){this.zoomToExtent(this.getMaxExtent({restricted:a?a.restricted:!0}))},zoomToScale:function(a,b){var c=OpenLayers.Util.getResolutionFromScale(a,this.baseLayer.units),d=this.getSize(),
e=d.w*c,c=d.h*c,d=this.getCenter();this.zoomToExtent(new OpenLayers.Bounds(d.lon-e/2,d.lat-c/2,d.lon+e/2,d.lat+c/2),b)},getLonLatFromViewPortPx:function(a){var b=null;null!=this.baseLayer&&(b=this.baseLayer.getLonLatFromViewPortPx(a));return b},getViewPortPxFromLonLat:function(a){var b=null;null!=this.baseLayer&&(b=this.baseLayer.getViewPortPxFromLonLat(a));return b},getLonLatFromPixel:function(a){return this.getLonLatFromViewPortPx(a)},getPixelFromLonLat:function(a){a=this.getViewPortPxFromLonLat(a);
a.x=Math.round(a.x);a.y=Math.round(a.y);return a},getGeodesicPixelSize:function(a){var b=a?this.getLonLatFromPixel(a):this.getCenter()||new OpenLayers.LonLat(0,0),c=this.getResolution(),a=b.add(-c/2,0),d=b.add(c/2,0),e=b.add(0,-c/2),b=b.add(0,c/2),c=new OpenLayers.Projection("EPSG:4326"),f=this.getProjectionObject()||c;f.equals(c)||(a.transform(f,c),d.transform(f,c),e.transform(f,c),b.transform(f,c));return new OpenLayers.Size(OpenLayers.Util.distVincenty(a,d),OpenLayers.Util.distVincenty(e,b))},
getViewPortPxFromLayerPx:function(a){var b=null;if(null!=a)var b=parseInt(this.layerContainerDiv.style.left),c=parseInt(this.layerContainerDiv.style.top),b=a.add(b,c);return b},getLayerPxFromViewPortPx:function(a){var b=null;if(null!=a){var b=-parseInt(this.layerContainerDiv.style.left),c=-parseInt(this.layerContainerDiv.style.top),b=a.add(b,c);if(isNaN(b.x)||isNaN(b.y))b=null}return b},getLonLatFromLayerPx:function(a){a=this.getViewPortPxFromLayerPx(a);return this.getLonLatFromViewPortPx(a)},getLayerPxFromLonLat:function(a){return this.getLayerPxFromViewPortPx(this.getPixelFromLonLat(a))},
CLASS_NAME:"OpenLayers.Map"});OpenLayers.Map.TILE_WIDTH=256;OpenLayers.Map.TILE_HEIGHT=256;
OpenLayers.Marker=OpenLayers.Class({icon:null,lonlat:null,events:null,map:null,initialize:function(a,b){this.lonlat=a;var c=b?b:OpenLayers.Marker.defaultIcon();null==this.icon?this.icon=c:(this.icon.url=c.url,this.icon.size=c.size,this.icon.offset=c.offset,this.icon.calculateOffset=c.calculateOffset);this.events=new OpenLayers.Events(this,this.icon.imageDiv,null)},destroy:function(){this.erase();this.map=null;this.events.destroy();this.events=null;if(null!=this.icon)this.icon.destroy(),this.icon=
null},draw:function(a){return this.icon.draw(a)},erase:function(){null!=this.icon&&this.icon.erase()},moveTo:function(a){null!=a&&null!=this.icon&&this.icon.moveTo(a);this.lonlat=this.map.getLonLatFromLayerPx(a)},isDrawn:function(){return this.icon&&this.icon.isDrawn()},onScreen:function(){var a=!1;this.map&&(a=this.map.getExtent().containsLonLat(this.lonlat));return a},inflate:function(a){this.icon&&this.icon.setSize(new OpenLayers.Size(this.icon.size.w*a,this.icon.size.h*a))},setOpacity:function(a){this.icon.setOpacity(a)},
setUrl:function(a){this.icon.setUrl(a)},display:function(a){this.icon.display(a)},CLASS_NAME:"OpenLayers.Marker"});OpenLayers.Marker.defaultIcon=function(){var a=OpenLayers.Util.getImagesLocation()+"marker.png",b=new OpenLayers.Size(21,25);return new OpenLayers.Icon(a,b,null,function(a){return new OpenLayers.Pixel(-(a.w/2),-a.h)})};
OpenLayers.Popup.FramedCloud=OpenLayers.Class(OpenLayers.Popup.Framed,{contentDisplayClass:"olFramedCloudPopupContent",autoSize:!0,panMapIfOutOfView:!0,imageSize:new OpenLayers.Size(1276,736),isAlphaImage:!1,fixedRelativePosition:!1,positionBlocks:{tl:{offset:new OpenLayers.Pixel(44,0),padding:new OpenLayers.Bounds(8,40,8,9),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,51,22,0),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,"auto"),anchor:new OpenLayers.Bounds(null,
50,0,0),position:new OpenLayers.Pixel(-1238,0)},{size:new OpenLayers.Size("auto",19),anchor:new OpenLayers.Bounds(0,32,22,null),position:new OpenLayers.Pixel(0,-631)},{size:new OpenLayers.Size(22,18),anchor:new OpenLayers.Bounds(null,32,0,null),position:new OpenLayers.Pixel(-1238,-632)},{size:new OpenLayers.Size(81,35),anchor:new OpenLayers.Bounds(null,0,0,null),position:new OpenLayers.Pixel(0,-688)}]},tr:{offset:new OpenLayers.Pixel(-45,0),padding:new OpenLayers.Bounds(8,40,8,9),blocks:[{size:new OpenLayers.Size("auto",
"auto"),anchor:new OpenLayers.Bounds(0,51,22,0),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,"auto"),anchor:new OpenLayers.Bounds(null,50,0,0),position:new OpenLayers.Pixel(-1238,0)},{size:new OpenLayers.Size("auto",19),anchor:new OpenLayers.Bounds(0,32,22,null),position:new OpenLayers.Pixel(0,-631)},{size:new OpenLayers.Size(22,19),anchor:new OpenLayers.Bounds(null,32,0,null),position:new OpenLayers.Pixel(-1238,-631)},{size:new OpenLayers.Size(81,35),anchor:new OpenLayers.Bounds(0,
0,null,null),position:new OpenLayers.Pixel(-215,-687)}]},bl:{offset:new OpenLayers.Pixel(45,0),padding:new OpenLayers.Bounds(8,9,8,40),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,21,22,32),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,"auto"),anchor:new OpenLayers.Bounds(null,21,0,32),position:new OpenLayers.Pixel(-1238,0)},{size:new OpenLayers.Size("auto",21),anchor:new OpenLayers.Bounds(0,0,22,null),position:new OpenLayers.Pixel(0,-629)},{size:new OpenLayers.Size(22,
21),anchor:new OpenLayers.Bounds(null,0,0,null),position:new OpenLayers.Pixel(-1238,-629)},{size:new OpenLayers.Size(81,33),anchor:new OpenLayers.Bounds(null,null,0,0),position:new OpenLayers.Pixel(-101,-674)}]},br:{offset:new OpenLayers.Pixel(-44,0),padding:new OpenLayers.Bounds(8,9,8,40),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,21,22,32),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,"auto"),anchor:new OpenLayers.Bounds(null,21,0,32),position:new OpenLayers.Pixel(-1238,
0)},{size:new OpenLayers.Size("auto",21),anchor:new OpenLayers.Bounds(0,0,22,null),position:new OpenLayers.Pixel(0,-629)},{size:new OpenLayers.Size(22,21),anchor:new OpenLayers.Bounds(null,0,0,null),position:new OpenLayers.Pixel(-1238,-629)},{size:new OpenLayers.Size(81,33),anchor:new OpenLayers.Bounds(0,null,null,0),position:new OpenLayers.Pixel(-311,-674)}]}},minSize:new OpenLayers.Size(105,10),maxSize:new OpenLayers.Size(1200,660),initialize:function(a,b,c,d,e,f,g){this.imageSrc=OpenLayers.Util.getImagesLocation()+
"cloud-popup-relative.png";OpenLayers.Popup.Framed.prototype.initialize.apply(this,arguments);this.contentDiv.className=this.contentDisplayClass},destroy:function(){OpenLayers.Popup.Framed.prototype.destroy.apply(this,arguments)},CLASS_NAME:"OpenLayers.Popup.FramedCloud"});
OpenLayers.Request={DEFAULT_CONFIG:{method:"GET",url:window.location.href,async:!0,user:void 0,password:void 0,params:null,proxy:OpenLayers.ProxyHost,headers:{},data:null,callback:function(){},success:null,failure:null,scope:null},events:new OpenLayers.Events(this,null,["complete","success","failure"]),issue:function(a){var b=OpenLayers.Util.extend(this.DEFAULT_CONFIG,{proxy:OpenLayers.ProxyHost}),a=OpenLayers.Util.applyDefaults(a,b),c=new OpenLayers.Request.XMLHttpRequest,d=a.url;if(a.params&&(b=
OpenLayers.Util.getParameterString(a.params),0<b.length))var e=-1<d.indexOf("?")?"&":"?",d=d+(e+b);a.proxy&&0==d.indexOf("http")&&(d="function"==typeof a.proxy?a.proxy(d):a.proxy+encodeURIComponent(d));c.open(a.method,d,a.async,a.user,a.password);for(var f in a.headers)c.setRequestHeader(f,a.headers[f]);var g=this.events,h=this;c.onreadystatechange=function(){c.readyState==OpenLayers.Request.XMLHttpRequest.DONE&&!1!==g.triggerEvent("complete",{request:c,config:a,requestUrl:d})&&h.runCallbacks({request:c,
config:a,requestUrl:d})};!1===a.async?c.send(a.data):window.setTimeout(function(){!0!==c._aborted&&c.send(a.data)},0);return c},runCallbacks:function(a){var b=a.request,c=a.config,d=c.scope?OpenLayers.Function.bind(c.callback,c.scope):c.callback,e;c.success&&(e=c.scope?OpenLayers.Function.bind(c.success,c.scope):c.success);var f;c.failure&&(f=c.scope?OpenLayers.Function.bind(c.failure,c.scope):c.failure);d(b);if(!b.status||200<=b.status&&300>b.status)this.events.triggerEvent("success",a),e&&e(b);
if(b.status&&(200>b.status||300<=b.status))this.events.triggerEvent("failure",a),f&&f(b)},GET:function(a){a=OpenLayers.Util.extend(a,{method:"GET"});return OpenLayers.Request.issue(a)},POST:function(a){a=OpenLayers.Util.extend(a,{method:"POST"});a.headers=a.headers?a.headers:{};"CONTENT-TYPE"in OpenLayers.Util.upperCaseObject(a.headers)||(a.headers["Content-Type"]="application/xml");return OpenLayers.Request.issue(a)},PUT:function(a){a=OpenLayers.Util.extend(a,{method:"PUT"});a.headers=a.headers?
a.headers:{};"CONTENT-TYPE"in OpenLayers.Util.upperCaseObject(a.headers)||(a.headers["Content-Type"]="application/xml");return OpenLayers.Request.issue(a)},DELETE:function(a){a=OpenLayers.Util.extend(a,{method:"DELETE"});return OpenLayers.Request.issue(a)},HEAD:function(a){a=OpenLayers.Util.extend(a,{method:"HEAD"});return OpenLayers.Request.issue(a)},OPTIONS:function(a){a=OpenLayers.Util.extend(a,{method:"OPTIONS"});return OpenLayers.Request.issue(a)}};
OpenLayers.Tile.Image=OpenLayers.Class(OpenLayers.Tile,{url:null,imgDiv:null,frame:null,layerAlphaHack:null,isBackBuffer:!1,lastRatio:1,isFirstDraw:!0,backBufferTile:null,initialize:function(a,b,c,d,e){OpenLayers.Tile.prototype.initialize.apply(this,arguments);this.url=d;this.frame=document.createElement("div");this.frame.style.overflow="hidden";this.frame.style.position="absolute";this.layerAlphaHack=this.layer.alpha&&OpenLayers.Util.alphaHack()},destroy:function(){if(null!=this.imgDiv){this.layerAlphaHack&&
OpenLayers.Event.stopObservingElement(this.imgDiv.childNodes[0]);OpenLayers.Event.stopObservingElement(this.imgDiv);if(this.imgDiv.parentNode==this.frame)this.frame.removeChild(this.imgDiv),this.imgDiv.map=null;this.imgDiv.urls=null;this.imgDiv.src=OpenLayers.Util.getImagesLocation()+"blank.gif"}this.imgDiv=null;null!=this.frame&&this.frame.parentNode==this.layer.div&&this.layer.div.removeChild(this.frame);this.frame=null;if(this.backBufferTile)this.backBufferTile.destroy(),this.backBufferTile=null;
this.layer.events.unregister("loadend",this,this.resetBackBuffer);OpenLayers.Tile.prototype.destroy.apply(this,arguments)},clone:function(a){null==a&&(a=new OpenLayers.Tile.Image(this.layer,this.position,this.bounds,this.url,this.size));a=OpenLayers.Tile.prototype.clone.apply(this,[a]);a.imgDiv=null;return a},draw:function(){if(this.layer!=this.layer.map.baseLayer&&this.layer.reproject)this.bounds=this.getBoundsFromBaseLayer(this.position);var a=OpenLayers.Tile.prototype.draw.apply(this,arguments);
if(-1!=OpenLayers.Util.indexOf(this.layer.SUPPORTED_TRANSITIONS,this.layer.transitionEffect)||this.layer.singleTile)if(a){if(!this.backBufferTile)this.backBufferTile=this.clone(),this.backBufferTile.hide(),this.backBufferTile.isBackBuffer=!0,this.events.register("loadend",this,this.resetBackBuffer),this.layer.events.register("loadend",this,this.resetBackBuffer);this.startTransition()}else this.backBufferTile&&this.backBufferTile.clear();else if(a&&this.isFirstDraw)this.events.register("loadend",this,
this.showTile),this.isFirstDraw=!1;if(!a)return!1;this.isLoading?this.events.triggerEvent("reload"):(this.isLoading=!0,this.events.triggerEvent("loadstart"));return this.renderTile()},resetBackBuffer:function(){this.showTile();if(this.backBufferTile&&(this.isFirstDraw||!this.layer.numLoadingTiles)){this.isFirstDraw=!1;var a=this.layer.maxExtent;if(a&&this.bounds.intersectsBounds(a,!1))this.backBufferTile.position=this.position,this.backBufferTile.bounds=this.bounds,this.backBufferTile.size=this.size,
this.backBufferTile.imageSize=this.layer.getImageSize(this.bounds)||this.size,this.backBufferTile.imageOffset=this.layer.imageOffset,this.backBufferTile.resolution=this.layer.getResolution(),this.backBufferTile.renderTile();this.backBufferTile.hide()}},renderTile:function(){null==this.imgDiv&&this.initImgDiv();this.imgDiv.viewRequestID=this.layer.map.viewRequestID;if(this.layer.async)this.layer.getURLasync(this.bounds,this,"url",this.positionImage);else{if(this.layer.url instanceof Array)this.imgDiv.urls=
this.layer.url.slice();this.url=this.layer.getURL(this.bounds);this.positionImage()}return!0},positionImage:function(){if(null!==this.layer){OpenLayers.Util.modifyDOMElement(this.frame,null,this.position,this.size);var a=this.layer.getImageSize(this.bounds);this.layerAlphaHack?OpenLayers.Util.modifyAlphaImageDiv(this.imgDiv,null,null,a,this.url):(OpenLayers.Util.modifyDOMElement(this.imgDiv,null,null,a),this.imgDiv.src=this.url)}},clear:function(){if(this.imgDiv&&(this.hide(),OpenLayers.Tile.Image.useBlankTile))this.imgDiv.src=
OpenLayers.Util.getImagesLocation()+"blank.gif"},initImgDiv:function(){var a=this.layer.imageOffset,b=this.layer.getImageSize(this.bounds);this.imgDiv=this.layerAlphaHack?OpenLayers.Util.createAlphaImageDiv(null,a,b,null,"relative",null,null,null,!0):OpenLayers.Util.createImage(null,a,b,null,"relative",null,null,!0);this.imgDiv.className="olTileImage";this.frame.style.zIndex=this.isBackBuffer?0:1;this.frame.appendChild(this.imgDiv);this.layer.div.appendChild(this.frame);null!=this.layer.opacity&&
OpenLayers.Util.modifyDOMElement(this.imgDiv,null,null,null,null,null,null,this.layer.opacity);this.imgDiv.map=this.layer.map;var c=function(){if(this.isLoading)this.isLoading=!1,this.events.triggerEvent("loadend")};this.layerAlphaHack?OpenLayers.Event.observe(this.imgDiv.childNodes[0],"load",OpenLayers.Function.bind(c,this)):OpenLayers.Event.observe(this.imgDiv,"load",OpenLayers.Function.bind(c,this));OpenLayers.Event.observe(this.imgDiv,"error",OpenLayers.Function.bind(function(){this.imgDiv._attempts>
OpenLayers.IMAGE_RELOAD_ATTEMPTS&&c.call(this)},this))},checkImgURL:function(){this.layer&&(OpenLayers.Util.isEquivalentUrl(this.layerAlphaHack?this.imgDiv.firstChild.src:this.imgDiv.src,this.url)||this.hide())},startTransition:function(){if(this.backBufferTile&&this.backBufferTile.imgDiv){var a=1;this.backBufferTile.resolution&&(a=this.backBufferTile.resolution/this.layer.getResolution());if(a!=this.lastRatio){if("resize"==this.layer.transitionEffect){var b=new OpenLayers.LonLat(this.backBufferTile.bounds.left,
this.backBufferTile.bounds.top),c=new OpenLayers.Size(this.backBufferTile.size.w*a,this.backBufferTile.size.h*a),b=this.layer.map.getLayerPxFromLonLat(b);OpenLayers.Util.modifyDOMElement(this.backBufferTile.frame,null,b,c);c=this.backBufferTile.imageSize;c=new OpenLayers.Size(c.w*a,c.h*a);(b=this.backBufferTile.imageOffset)&&(b=new OpenLayers.Pixel(b.x*a,b.y*a));OpenLayers.Util.modifyDOMElement(this.backBufferTile.imgDiv,null,b,c);this.backBufferTile.show()}}else this.layer.singleTile?this.backBufferTile.show():
this.backBufferTile.hide();this.lastRatio=a}},show:function(){this.frame.style.display="";if(-1!=OpenLayers.Util.indexOf(this.layer.SUPPORTED_TRANSITIONS,this.layer.transitionEffect)&&-1!=navigator.userAgent.toLowerCase().indexOf("gecko"))this.frame.scrollLeft=this.frame.scrollLeft},hide:function(){this.frame.style.display="none"},CLASS_NAME:"OpenLayers.Tile.Image"});OpenLayers.Tile.Image.useBlankTile="safari"==OpenLayers.Util.getBrowserName()||"opera"==OpenLayers.Util.getBrowserName();
OpenLayers.Control.OverviewMap=OpenLayers.Class(OpenLayers.Control,{element:null,ovmap:null,size:new OpenLayers.Size(180,90),layers:null,minRectSize:15,minRectDisplayClass:"RectReplacement",minRatio:8,maxRatio:32,mapOptions:null,autoPan:!1,handlers:null,resolutionFactor:1,maximized:!1,initialize:function(a){this.layers=[];this.handlers={};OpenLayers.Control.prototype.initialize.apply(this,[a])},destroy:function(){if(this.mapDiv){this.handlers.click&&this.handlers.click.destroy();this.handlers.drag&&
this.handlers.drag.destroy();this.mapDiv.removeChild(this.extentRectangle);this.extentRectangle=null;if(this.rectEvents)this.rectEvents.destroy(),this.rectEvents=null;if(this.ovmap)this.ovmap.destroy(),this.ovmap=null;this.element.removeChild(this.mapDiv);this.mapDiv=null;this.div.removeChild(this.element);this.element=null;if(this.maximizeDiv)OpenLayers.Event.stopObservingElement(this.maximizeDiv),this.div.removeChild(this.maximizeDiv),this.maximizeDiv=null;if(this.minimizeDiv)OpenLayers.Event.stopObservingElement(this.minimizeDiv),
this.div.removeChild(this.minimizeDiv),this.minimizeDiv=null;this.map.events.un({moveend:this.update,changebaselayer:this.baseLayerDraw,scope:this});OpenLayers.Control.prototype.destroy.apply(this,arguments)}},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!(0<this.layers.length))if(this.map.baseLayer)this.layers=[this.map.baseLayer.clone()];else return this.map.events.register("changebaselayer",this,this.baseLayerDraw),this.div;this.element=document.createElement("div");
this.element.className=this.displayClass+"Element";this.element.style.display="none";this.mapDiv=document.createElement("div");this.mapDiv.style.width=this.size.w+"px";this.mapDiv.style.height=this.size.h+"px";this.mapDiv.style.position="relative";this.mapDiv.style.overflow="hidden";this.mapDiv.id=OpenLayers.Util.createUniqueID("overviewMap");this.extentRectangle=document.createElement("div");this.extentRectangle.style.position="absolute";this.extentRectangle.style.zIndex=1E3;this.extentRectangle.className=
this.displayClass+"ExtentRectangle";this.mapDiv.appendChild(this.extentRectangle);this.element.appendChild(this.mapDiv);this.div.appendChild(this.element);if(this.outsideViewport)this.element.style.display="";else{this.div.className+=" "+this.displayClass+"Container";var a=OpenLayers.Util.getImagesLocation();this.maximizeDiv=OpenLayers.Util.createAlphaImageDiv(this.displayClass+"MaximizeButton",null,new OpenLayers.Size(18,18),a+"layer-switcher-maximize.png","absolute");this.maximizeDiv.style.display=
"none";this.maximizeDiv.className=this.displayClass+"MaximizeButton";OpenLayers.Event.observe(this.maximizeDiv,"click",OpenLayers.Function.bindAsEventListener(this.maximizeControl,this));this.div.appendChild(this.maximizeDiv);this.minimizeDiv=OpenLayers.Util.createAlphaImageDiv("OpenLayers_Control_minimizeDiv",null,new OpenLayers.Size(18,18),a+"layer-switcher-minimize.png","absolute");this.minimizeDiv.style.display="none";this.minimizeDiv.className=this.displayClass+"MinimizeButton";OpenLayers.Event.observe(this.minimizeDiv,
"click",OpenLayers.Function.bindAsEventListener(this.minimizeControl,this));this.div.appendChild(this.minimizeDiv);for(var a=["dblclick","mousedown"],b=0,c=a.length;b<c;b++)OpenLayers.Event.observe(this.maximizeDiv,a[b],OpenLayers.Event.stop),OpenLayers.Event.observe(this.minimizeDiv,a[b],OpenLayers.Event.stop);this.minimizeControl()}this.map.getExtent()&&this.update();this.map.events.register("moveend",this,this.update);this.maximized&&this.maximizeControl();return this.div},baseLayerDraw:function(){this.draw();
this.map.events.unregister("changebaselayer",this,this.baseLayerDraw)},rectDrag:function(a){var b=this.handlers.drag.last.x-a.x,c=this.handlers.drag.last.y-a.y;if(0!=b||0!=c){var d=this.rectPxBounds.top,e=this.rectPxBounds.left,a=Math.abs(this.rectPxBounds.getHeight()),f=this.rectPxBounds.getWidth(),c=Math.max(0,d-c),c=Math.min(c,this.ovmap.size.h-this.hComp-a),b=Math.max(0,e-b),b=Math.min(b,this.ovmap.size.w-this.wComp-f);this.setRectPxBounds(new OpenLayers.Bounds(b,c+a,b+f,c))}},mapDivClick:function(a){var b=
this.rectPxBounds.getCenterPixel(),c=a.xy.x-b.x,d=a.xy.y-b.y,e=this.rectPxBounds.top,f=this.rectPxBounds.left,a=Math.abs(this.rectPxBounds.getHeight()),b=this.rectPxBounds.getWidth(),d=Math.max(0,e+d),d=Math.min(d,this.ovmap.size.h-a),c=Math.max(0,f+c),c=Math.min(c,this.ovmap.size.w-b);this.setRectPxBounds(new OpenLayers.Bounds(c,d+a,c+b,d));this.updateMapToRect()},maximizeControl:function(a){this.element.style.display="";this.showToggle(!1);null!=a&&OpenLayers.Event.stop(a)},minimizeControl:function(a){this.element.style.display=
"none";this.showToggle(!0);null!=a&&OpenLayers.Event.stop(a)},showToggle:function(a){this.maximizeDiv.style.display=a?"":"none";this.minimizeDiv.style.display=a?"none":""},update:function(){null==this.ovmap&&this.createMap();(this.autoPan||!this.isSuitableOverview())&&this.updateOverview();this.updateRectToMap()},isSuitableOverview:function(){var a=this.map.getExtent(),b=this.map.maxExtent,a=new OpenLayers.Bounds(Math.max(a.left,b.left),Math.max(a.bottom,b.bottom),Math.min(a.right,b.right),Math.min(a.top,
b.top));this.ovmap.getProjection()!=this.map.getProjection()&&(a=a.transform(this.map.getProjectionObject(),this.ovmap.getProjectionObject()));b=this.ovmap.getResolution()/this.map.getResolution();return b>this.minRatio&&b<=this.maxRatio&&this.ovmap.getExtent().containsBounds(a)},updateOverview:function(){var a=this.map.getResolution(),b=this.ovmap.getResolution(),c=b/a;c>this.maxRatio?b=this.minRatio*a:c<=this.minRatio&&(b=this.maxRatio*a);this.ovmap.getProjection()!=this.map.getProjection()?(a=
this.map.center.clone(),a.transform(this.map.getProjectionObject(),this.ovmap.getProjectionObject())):a=this.map.center;this.ovmap.setCenter(a,this.ovmap.getZoomForResolution(b*this.resolutionFactor));this.updateRectToMap()},createMap:function(){var a=OpenLayers.Util.extend({controls:[],maxResolution:"auto",fallThrough:!1},this.mapOptions);this.ovmap=new OpenLayers.Map(this.mapDiv,a);OpenLayers.Event.stopObserving(window,"unload",this.ovmap.unloadDestroy);this.ovmap.addLayers(this.layers);this.ovmap.zoomToMaxExtent();
this.wComp=(this.wComp=parseInt(OpenLayers.Element.getStyle(this.extentRectangle,"border-left-width"))+parseInt(OpenLayers.Element.getStyle(this.extentRectangle,"border-right-width")))?this.wComp:2;this.hComp=(this.hComp=parseInt(OpenLayers.Element.getStyle(this.extentRectangle,"border-top-width"))+parseInt(OpenLayers.Element.getStyle(this.extentRectangle,"border-bottom-width")))?this.hComp:2;this.handlers.drag=new OpenLayers.Handler.Drag(this,{move:this.rectDrag,done:this.updateMapToRect},{map:this.ovmap});
this.handlers.click=new OpenLayers.Handler.Click(this,{click:this.mapDivClick},{single:!0,"double":!1,stopSingle:!0,stopDouble:!0,pixelTolerance:1,map:this.ovmap});this.handlers.click.activate();this.rectEvents=new OpenLayers.Events(this,this.extentRectangle,null,!0);this.rectEvents.register("mouseover",this,function(){!this.handlers.drag.active&&!this.map.dragging&&this.handlers.drag.activate()});this.rectEvents.register("mouseout",this,function(){this.handlers.drag.dragging||this.handlers.drag.deactivate()});
if(this.ovmap.getProjection()!=this.map.getProjection()){var a=this.map.getProjectionObject().getUnits()||this.map.units||this.map.baseLayer.units,b=this.ovmap.getProjectionObject().getUnits()||this.ovmap.units||this.ovmap.baseLayer.units;this.resolutionFactor=a&&b?OpenLayers.INCHES_PER_UNIT[a]/OpenLayers.INCHES_PER_UNIT[b]:1}},updateRectToMap:function(){var a=this.getRectBoundsFromMapBounds(this.ovmap.getProjection()!=this.map.getProjection()?this.map.getExtent().transform(this.map.getProjectionObject(),
this.ovmap.getProjectionObject()):this.map.getExtent());a&&this.setRectPxBounds(a)},updateMapToRect:function(){var a=this.getMapBoundsFromRectBounds(this.rectPxBounds);this.ovmap.getProjection()!=this.map.getProjection()&&(a=a.transform(this.ovmap.getProjectionObject(),this.map.getProjectionObject()));this.map.panTo(a.getCenterLonLat())},setRectPxBounds:function(a){var b=Math.max(a.top,0),c=Math.max(a.left,0),d=Math.min(a.top+Math.abs(a.getHeight()),this.ovmap.size.h-this.hComp),a=Math.min(a.left+
a.getWidth(),this.ovmap.size.w-this.wComp),e=Math.max(a-c,0),f=Math.max(d-b,0);e<this.minRectSize||f<this.minRectSize?(this.extentRectangle.className=this.displayClass+this.minRectDisplayClass,e=c+e/2-this.minRectSize/2,this.extentRectangle.style.top=Math.round(b+f/2-this.minRectSize/2)+"px",this.extentRectangle.style.left=Math.round(e)+"px",this.extentRectangle.style.height=this.minRectSize+"px",this.extentRectangle.style.width=this.minRectSize+"px"):(this.extentRectangle.className=this.displayClass+
"ExtentRectangle",this.extentRectangle.style.top=Math.round(b)+"px",this.extentRectangle.style.left=Math.round(c)+"px",this.extentRectangle.style.height=Math.round(f)+"px",this.extentRectangle.style.width=Math.round(e)+"px");this.rectPxBounds=new OpenLayers.Bounds(Math.round(c),Math.round(d),Math.round(a),Math.round(b))},getRectBoundsFromMapBounds:function(a){var b=new OpenLayers.LonLat(a.left,a.bottom),a=new OpenLayers.LonLat(a.right,a.top),b=this.getOverviewPxFromLonLat(b),a=this.getOverviewPxFromLonLat(a),
c=null;b&&a&&(c=new OpenLayers.Bounds(b.x,b.y,a.x,a.y));return c},getMapBoundsFromRectBounds:function(a){var b=new OpenLayers.Pixel(a.left,a.bottom),a=new OpenLayers.Pixel(a.right,a.top),b=this.getLonLatFromOverviewPx(b),a=this.getLonLatFromOverviewPx(a);return new OpenLayers.Bounds(b.lon,b.lat,a.lon,a.lat)},getLonLatFromOverviewPx:function(a){var b=this.ovmap.size,c=this.ovmap.getResolution(),d=this.ovmap.getExtent().getCenterLonLat();return new OpenLayers.LonLat(d.lon+(a.x-b.w/2)*c,d.lat-(a.y-b.h/
2)*c)},getOverviewPxFromLonLat:function(a){var b=this.ovmap.getResolution(),c=this.ovmap.getExtent(),d=null;c&&(d=new OpenLayers.Pixel(Math.round(1/b*(a.lon-c.left)),Math.round(1/b*(c.top-a.lat))));return d},CLASS_NAME:"OpenLayers.Control.OverviewMap"});
OpenLayers.Feature=OpenLayers.Class({layer:null,id:null,lonlat:null,data:null,marker:null,popupClass:OpenLayers.Popup.AnchoredBubble,popup:null,initialize:function(a,b,c){this.layer=a;this.lonlat=b;this.data=null!=c?c:{};this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")},destroy:function(){null!=this.layer&&null!=this.layer.map&&null!=this.popup&&this.layer.map.removePopup(this.popup);null!=this.layer&&null!=this.marker&&this.layer.removeMarker(this.marker);this.data=this.lonlat=this.id=
this.layer=null;if(null!=this.marker)this.destroyMarker(this.marker),this.marker=null;if(null!=this.popup)this.destroyPopup(this.popup),this.popup=null},onScreen:function(){var a=!1;null!=this.layer&&null!=this.layer.map&&(a=this.layer.map.getExtent().containsLonLat(this.lonlat));return a},createMarker:function(){if(null!=this.lonlat)this.marker=new OpenLayers.Marker(this.lonlat,this.data.icon);return this.marker},destroyMarker:function(){this.marker.destroy()},createPopup:function(a){if(null!=this.lonlat){var b=
this.id+"_popup",c=this.marker?this.marker.icon:null;if(!this.popup)this.popup=new this.popupClass(b,this.lonlat,this.data.popupSize,this.data.popupContentHTML,c,a);if(null!=this.data.overflow)this.popup.contentDiv.style.overflow=this.data.overflow;this.popup.feature=this}return this.popup},destroyPopup:function(){if(this.popup)this.popup.feature=null,this.popup.destroy(),this.popup=null},CLASS_NAME:"OpenLayers.Feature"});
OpenLayers.Format.CSWGetDomain.v2_0_2=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance",csw:"http://www.opengis.net/cat/csw/2.0.2"},defaultPrefix:"csw",version:"2.0.2",schemaLocation:"http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd",PropertyName:null,ParameterName:null,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},read:function(a){"string"==
typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));if(a&&9==a.nodeType)a=a.documentElement;var b={};this.readNode(a,b);return b},readers:{csw:{GetDomainResponse:function(a,b){this.readChildNodes(a,b)},DomainValues:function(a,b){if(!(b.DomainValues instanceof Array))b.DomainValues=[];for(var c=a.attributes,d={},e=0,f=c.length;e<f;++e)d[c[e].name]=c[e].nodeValue;this.readChildNodes(a,d);b.DomainValues.push(d)},PropertyName:function(a,b){b.PropertyName=this.getChildValue(a)},ParameterName:function(a,
b){b.ParameterName=this.getChildValue(a)},ListOfValues:function(a,b){if(!(b.ListOfValues instanceof Array))b.ListOfValues=[];this.readChildNodes(a,b.ListOfValues)},Value:function(a,b){for(var c=a.attributes,d={},e=0,f=c.length;e<f;++e)d[c[e].name]=c[e].nodeValue;d.value=this.getChildValue(a);b.push({Value:d})},ConceptualScheme:function(a,b){b.ConceptualScheme={};this.readChildNodes(a,b.ConceptualScheme)},Name:function(a,b){b.Name=this.getChildValue(a)},Document:function(a,b){b.Document=this.getChildValue(a)},
Authority:function(a,b){b.Authority=this.getChildValue(a)},RangeOfValues:function(a,b){b.RangeOfValues={};this.readChildNodes(a,b.RangeOfValues)},MinValue:function(a,b){for(var c=a.attributes,d={},e=0,f=c.length;e<f;++e)d[c[e].name]=c[e].nodeValue;d.value=this.getChildValue(a);b.MinValue=d},MaxValue:function(a,b){for(var c=a.attributes,d={},e=0,f=c.length;e<f;++e)d[c[e].name]=c[e].nodeValue;d.value=this.getChildValue(a);b.MaxValue=d}}},write:function(a){a=this.writeNode("csw:GetDomain",a);return OpenLayers.Format.XML.prototype.write.apply(this,
[a])},writers:{csw:{GetDomain:function(a){var b=this.createElementNSPlus("csw:GetDomain",{attributes:{service:"CSW",version:this.version}});if(a.PropertyName||this.PropertyName)this.writeNode("csw:PropertyName",a.PropertyName||this.PropertyName,b);else if(a.ParameterName||this.ParameterName)this.writeNode("csw:ParameterName",a.ParameterName||this.ParameterName,b);this.readChildNodes(b,a);return b},PropertyName:function(a){return this.createElementNSPlus("csw:PropertyName",{value:a})},ParameterName:function(a){return this.createElementNSPlus("csw:ParameterName",
{value:a})}}},CLASS_NAME:"OpenLayers.Format.CSWGetDomain.v2_0_2"});
OpenLayers.Format.Context=OpenLayers.Class({version:null,layerOptions:null,layerParams:null,parser:null,initialize:function(a){OpenLayers.Util.extend(this,a);this.options=a},read:function(a,b){"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));var c=a.documentElement,d=this.version;d||(d=c.getAttribute("version"));c=this.getParser(d).read(a,b);if(b&&b.map)if(this.context=c,b.map instanceof OpenLayers.Map)c=this.mergeContextToMap(c,b.map);else{d=b.map;if(OpenLayers.Util.isElement(d)||
"string"==typeof d)d={div:d};c=this.contextToMap(c,d)}return c},getLayerFromContext:function(a){var b,c,d={queryable:a.queryable,visibility:a.visibility,maxExtent:a.maxExtent,metadata:OpenLayers.Util.applyDefaults(a.metadata,{styles:a.styles}),numZoomLevels:a.numZoomLevels,units:a.units,isBaseLayer:a.isBaseLayer,opacity:a.opacity,displayInLayerSwitcher:a.displayInLayerSwitcher,singleTile:a.singleTile,tileSize:a.tileSize?new OpenLayers.Size(a.tileSize.width,a.tileSize.height):void 0,minScale:a.minScale||
a.maxScaleDenominator,maxScale:a.maxScale||a.minScaleDenominator};this.layerOptions&&OpenLayers.Util.applyDefaults(d,this.layerOptions);var e={layers:a.name,transparent:a.transparent,version:a.version};if(a.formats&&0<a.formats.length){e.format=a.formats[0].value;for(b=0,c=a.formats.length;b<c;b++){var f=a.formats[b];if(!0==f.current){e.format=f.value;break}}}if(a.styles&&0<a.styles.length)for(b=0,c=a.styles.length;b<c;b++)if(f=a.styles[b],!0==f.current){f.href?e.sld=f.href:f.body?e.sld_body=f.body:
e.styles=f.name;break}this.layerParams&&OpenLayers.Util.applyDefaults(e,this.layerParams);b=null;c=a.service;c==OpenLayers.Format.Context.serviceTypes.WFS?(d.strategies=[new OpenLayers.Strategy.BBOX],d.protocol=new OpenLayers.Protocol.WFS({url:a.url,featurePrefix:a.name.split(":")[0],featureType:a.name.split(":").pop()}),b=new OpenLayers.Layer.Vector(a.title||a.name,d)):c==OpenLayers.Format.Context.serviceTypes.KML?(d.strategies=[new OpenLayers.Strategy.Fixed],d.protocol=new OpenLayers.Protocol.HTTP({url:a.url,
format:new OpenLayers.Format.KML}),b=new OpenLayers.Layer.Vector(a.title||a.name,d)):c==OpenLayers.Format.Context.serviceTypes.GML?(d.strategies=[new OpenLayers.Strategy.Fixed],d.protocol=new OpenLayers.Protocol.HTTP({url:a.url,format:new OpenLayers.Format.GML}),b=new OpenLayers.Layer.Vector(a.title||a.name,d)):a.features?(b=new OpenLayers.Layer.Vector(a.title||a.name,d),b.addFeatures(a.features)):!0!==a.categoryLayer&&(b=new OpenLayers.Layer.WMS(a.title||a.name,a.url,e,d));return b},getLayersFromContext:function(a){for(var b=
[],c=0,d=a.length;c<d;c++){var e=this.getLayerFromContext(a[c]);null!==e&&b.push(e)}return b},contextToMap:function(a,b){var b=OpenLayers.Util.applyDefaults({maxExtent:a.maxExtent,projection:a.projection},b),c=new OpenLayers.Map(b);c.addLayers(this.getLayersFromContext(a.layersContext));c.setCenter(a.bounds.getCenterLonLat(),c.getZoomForExtent(a.bounds,!0));return c},mergeContextToMap:function(a,b){b.addLayers(this.getLayersFromContext(a.layersContext));return b},write:function(a,b){a=this.toContext(a);
return this.getParser(b&&b.version).write(a,b)},CLASS_NAME:"OpenLayers.Format.Context"});OpenLayers.Format.Context.serviceTypes={WMS:"urn:ogc:serviceType:WMS",WFS:"urn:ogc:serviceType:WFS",WCS:"urn:ogc:serviceType:WCS",GML:"urn:ogc:serviceType:GML",SLD:"urn:ogc:serviceType:SLD",FES:"urn:ogc:serviceType:FES",KML:"urn:ogc:serviceType:KML"};if(!OpenLayers.Format.OWSCommon)OpenLayers.Format.OWSCommon={};
OpenLayers.Format.OWSCommon.v1=OpenLayers.Class(OpenLayers.Format.XML,{regExes:{trimSpace:/^\s*|\s*$/g,removeSpace:/\s*/g,splitSpace:/\s+/,trimComma:/\s*,\s*/g},readers:{ows:{ServiceIdentification:function(a,b){b.serviceIdentification={};this.readChildNodes(a,b.serviceIdentification)},Title:function(a,b){b.title=this.getChildValue(a)},Abstract:function(a,b){b["abstract"]=this.getChildValue(a)},Keywords:function(a,b){b.keywords={};this.readChildNodes(a,b.keywords)},Keyword:function(a,b){b[this.getChildValue(a)]=
!0},ServiceType:function(a,b){b.serviceType={codeSpace:a.getAttribute("codeSpace"),value:this.getChildValue(a)}},ServiceTypeVersion:function(a,b){b.serviceTypeVersion=this.getChildValue(a)},Fees:function(a,b){b.fees=this.getChildValue(a)},AccessConstraints:function(a,b){b.accessConstraints=this.getChildValue(a)},ServiceProvider:function(a,b){b.serviceProvider={};this.readChildNodes(a,b.serviceProvider)},ProviderName:function(a,b){b.providerName=this.getChildValue(a)},ProviderSite:function(a,b){b.providerSite=
this.getAttributeNS(a,this.namespaces.xlink,"href")},ServiceContact:function(a,b){b.serviceContact={};this.readChildNodes(a,b.serviceContact)},IndividualName:function(a,b){b.individualName=this.getChildValue(a)},PositionName:function(a,b){b.positionName=this.getChildValue(a)},ContactInfo:function(a,b){b.contactInfo={};this.readChildNodes(a,b.contactInfo)},Phone:function(a,b){b.phone={};this.readChildNodes(a,b.phone)},Voice:function(a,b){b.voice=this.getChildValue(a)},Address:function(a,b){b.address=
{};this.readChildNodes(a,b.address)},DeliveryPoint:function(a,b){b.deliveryPoint=this.getChildValue(a)},City:function(a,b){b.city=this.getChildValue(a)},AdministrativeArea:function(a,b){b.administrativeArea=this.getChildValue(a)},PostalCode:function(a,b){b.postalCode=this.getChildValue(a)},Country:function(a,b){b.country=this.getChildValue(a)},ElectronicMailAddress:function(a,b){b.electronicMailAddress=this.getChildValue(a)},Role:function(a,b){b.role=this.getChildValue(a)},OperationsMetadata:function(a,
b){b.operationsMetadata={};this.readChildNodes(a,b.operationsMetadata)},Operation:function(a,b){var c=a.getAttribute("name");b[c]={};this.readChildNodes(a,b[c])},DCP:function(a,b){b.dcp={};this.readChildNodes(a,b.dcp)},HTTP:function(a,b){b.http={};this.readChildNodes(a,b.http)},Get:function(a,b){b.get=this.getAttributeNS(a,this.namespaces.xlink,"href")},Post:function(a,b){b.post=this.getAttributeNS(a,this.namespaces.xlink,"href")},Parameter:function(a,b){if(!b.parameters)b.parameters={};var c=a.getAttribute("name");
b.parameters[c]={};this.readChildNodes(a,b.parameters[c])},Value:function(a,b){b[this.getChildValue(a)]=!0},OutputFormat:function(a,b){b.formats.push({value:this.getChildValue(a)});this.readChildNodes(a,b)},WGS84BoundingBox:function(a,b){var c={};c.crs=a.getAttribute("crs");b.BoundingBox?b.BoundingBox.push(c):(b.projection=c.crs,c=b);this.readChildNodes(a,c)},BoundingBox:function(a,b){this.readers.ows.WGS84BoundingBox.apply(this,[a,b])},LowerCorner:function(a,b){var c=this.getChildValue(a).replace(this.regExes.trimSpace,
""),c=c.replace(this.regExes.trimComma,","),c=c.split(this.regExes.splitSpace);b.left=c[0];b.bottom=c[1]},UpperCorner:function(a,b){var c=this.getChildValue(a).replace(this.regExes.trimSpace,""),c=c.replace(this.regExes.trimComma,","),c=c.split(this.regExes.splitSpace);b.right=c[0];b.top=c[1];b.bounds=new OpenLayers.Bounds(b.left,b.bottom,b.right,b.top);delete b.left;delete b.bottom;delete b.right;delete b.top}}},writers:{ows:{BoundingBox:function(a){var b=this.createElementNSPlus("ows:BoundingBox",
{attributes:{crs:a.projection}});this.writeNode("ows:LowerCorner",a,b);this.writeNode("ows:UpperCorner",a,b);return b},LowerCorner:function(a){return this.createElementNSPlus("ows:LowerCorner",{value:a.bounds.left+" "+a.bounds.bottom})},UpperCorner:function(a){return this.createElementNSPlus("ows:UpperCorner",{value:a.bounds.right+" "+a.bounds.top})},Title:function(a){return this.createElementNSPlus("ows:Title",{value:a})},OutputFormat:function(a){return this.createElementNSPlus("ows:OutputFormat",
{value:a})}}},CLASS_NAME:"OpenLayers.Format.OWSCommon.v1"});
OpenLayers.Format.SOSCapabilities=OpenLayers.Class(OpenLayers.Format.XML,{defaultVersion:"1.0.0",version:null,parser:null,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a]);this.options=a},read:function(a){"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));var b=a.documentElement,b=this.version||b.getAttribute("version")||this.defaultVersion;if(!this.parser||this.parser.version!==b){var c=OpenLayers.Format.SOSCapabilities["v"+b.replace(/\./g,
"_")];if(!c)throw"Can't find a SOS capabilities parser for version "+b;c=new c(this.options)}a=c.read(a);a.version=b;return a},CLASS_NAME:"OpenLayers.Format.SOSCapabilities"});
OpenLayers.Format.WFSCapabilities=OpenLayers.Class(OpenLayers.Format.XML,{defaultVersion:"1.1.0",version:null,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a]);this.options=a},read:function(a){"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));var b=a.documentElement,c=this.version;if(!c&&(c=b.getAttribute("version"),!c))c=this.defaultVersion;b=OpenLayers.Format.WFSCapabilities["v"+c.replace(/\./g,"_")];if(!b)throw"Can't find a WFS capabilities parser for version "+
c;a=(new b(this.options)).read(a);a.version=c;return a},CLASS_NAME:"OpenLayers.Format.WFSCapabilities"});
OpenLayers.Format.WFSDescribeFeatureType=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{xsd:"http://www.w3.org/2001/XMLSchema"},initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},readers:{xsd:{schema:function(a,b){var c=[],d={};this.readChildNodes(a,{complexTypes:c,customTypes:d});for(var e=a.attributes,f,g,h=0,j=e.length;h<j;++h)f=e[h],g=f.name,0==g.indexOf("xmlns")?this.setNamespace(g.split(":")[1]||"",f.value):b[g]=f.value;b.featureTypes=c;b.targetPrefix=this.namespaceAlias[b.targetNamespace];
h=0;for(j=c.length;h<j;++h)if(e=c[h],f=d[e.typeName],d[e.typeName])e.typeName=f.name},complexType:function(a,b){var c={typeName:a.getAttribute("name")};this.readChildNodes(a,c);b.complexTypes.push(c)},complexContent:function(a,b){this.readChildNodes(a,b)},extension:function(a,b){this.readChildNodes(a,b)},sequence:function(a,b){var c={elements:[]};this.readChildNodes(a,c);b.properties=c.elements},element:function(a,b){if(b.elements){for(var c={},d=a.attributes,e,f=0,g=d.length;f<g;++f)e=d[f],c[e.name]=
e.value;d=c.type;if(!d)d={},this.readChildNodes(a,d),c.restriction=d,c.type=d.base;c.localType=(d.base||d).split(":").pop();b.elements.push(c)}b.complexTypes&&(d=a.getAttribute("type"),c=d.split(":").pop(),b.customTypes[c]={name:a.getAttribute("name"),type:d})},simpleType:function(a,b){this.readChildNodes(a,b)},restriction:function(a,b){b.base=a.getAttribute("base");this.readRestriction(a,b)}}},readRestriction:function(a,b){for(var c=a.childNodes,d,e,f=0,g=c.length;f<g;++f)d=c[f],1==d.nodeType&&(e=
d.nodeName.split(":").pop(),d=d.getAttribute("value"),b[e]?("string"==typeof b[e]&&(b[e]=[b[e]]),b[e].push(d)):b[e]=d)},read:function(a){"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));if(a&&9==a.nodeType)a=a.documentElement;var b={};this.readNode(a,b);return b},CLASS_NAME:"OpenLayers.Format.WFSDescribeFeatureType"});
OpenLayers.Format.WFST.v1=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance",wfs:"http://www.opengis.net/wfs",gml:"http://www.opengis.net/gml",ogc:"http://www.opengis.net/ogc"},defaultPrefix:"wfs",version:null,schemaLocations:null,srsName:null,extractAttributes:!0,xy:!0,stateName:null,initialize:function(a){this.stateName={};this.stateName[OpenLayers.State.INSERT]="wfs:Insert";this.stateName[OpenLayers.State.UPDATE]=
"wfs:Update";this.stateName[OpenLayers.State.DELETE]="wfs:Delete";OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},getSrsName:function(a,b){var c=b&&b.srsName;c||(c=a&&a.layer?a.layer.projection.getCode():this.srsName);return c},read:function(a,b){b=b||{};OpenLayers.Util.applyDefaults(b,{output:"features"});"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));if(a&&9==a.nodeType)a=a.documentElement;var c={};a&&this.readNode(a,c);if(c.features&&"features"===b.output)c=
c.features;return c},readers:{wfs:{FeatureCollection:function(a,b){b.features=[];this.readChildNodes(a,b)}}},write:function(a){var a=this.writeNode("wfs:Transaction",a),b=this.schemaLocationAttr();b&&this.setAttributeNS(a,this.namespaces.xsi,"xsi:schemaLocation",b);return OpenLayers.Format.XML.prototype.write.apply(this,[a])},writers:{wfs:{GetFeature:function(a){var b=this.createElementNSPlus("wfs:GetFeature",{attributes:{service:"WFS",version:this.version,outputFormat:a&&a.outputFormat,maxFeatures:a&&
a.maxFeatures,"xsi:schemaLocation":this.schemaLocationAttr(a)}});if("string"==typeof this.featureType)this.writeNode("Query",a,b);else for(var c=0,d=this.featureType.length;c<d;c++)a.featureType=this.featureType[c],this.writeNode("Query",a,b);return b},Transaction:function(a){var b=this.createElementNSPlus("wfs:Transaction",{attributes:{service:"WFS",version:this.version}});if(a)for(var c,d,e=0,f=a.length;e<f;++e)d=a[e],(c=this.stateName[d.state])&&this.writeNode(c,d,b);return b},Insert:function(a){var b=
this.createElementNSPlus("wfs:Insert");this.srsName=this.getSrsName(a);this.writeNode("feature:_typeName",a,b);return b},Update:function(a){var b=this.createElementNSPlus("wfs:Update",{attributes:{typeName:(this.featureNS?this.featurePrefix+":":"")+this.featureType}});this.featureNS&&b.setAttribute("xmlns:"+this.featurePrefix,this.featureNS);null!==this.geometryName&&this.writeNode("Property",{name:this.geometryName,value:a},b);for(var c in a.attributes)void 0!==a.attributes[c]&&this.writeNode("Property",
{name:c,value:a.attributes[c]},b);this.writeNode("ogc:Filter",new OpenLayers.Filter.FeatureId({fids:[a.fid]}),b);return b},Property:function(a){var b=this.createElementNSPlus("wfs:Property");this.writeNode("Name",a.name,b);null!==a.value&&this.writeNode("Value",a.value,b);return b},Name:function(a){return this.createElementNSPlus("wfs:Name",{value:a})},Value:function(a){var b;a instanceof OpenLayers.Feature.Vector?(b=this.createElementNSPlus("wfs:Value"),this.srsName=this.getSrsName(a),a=this.writeNode("feature:_geometry",
a.geometry).firstChild,b.appendChild(a)):b=this.createElementNSPlus("wfs:Value",{value:a});return b},Delete:function(a){var b=this.createElementNSPlus("wfs:Delete",{attributes:{typeName:(this.featureNS?this.featurePrefix+":":"")+this.featureType}});this.featureNS&&b.setAttribute("xmlns:"+this.featurePrefix,this.featureNS);this.writeNode("ogc:Filter",new OpenLayers.Filter.FeatureId({fids:[a.fid]}),b);return b}}},schemaLocationAttr:function(a){var a=OpenLayers.Util.extend({featurePrefix:this.featurePrefix,
schema:this.schema},a),b=OpenLayers.Util.extend({},this.schemaLocations);if(a.schema)b[a.featurePrefix]=a.schema;var a=[],c,d;for(d in b)(c=this.namespaces[d])&&a.push(c+" "+b[d]);return a.join(" ")||void 0},setFilterProperty:function(a){if(a.filters)for(var b=0,c=a.filters.length;b<c;++b)this.setFilterProperty(a.filters[b]);else if(a instanceof OpenLayers.Filter.Spatial)a.property=this.geometryName},CLASS_NAME:"OpenLayers.Format.WFST.v1"});
OpenLayers.Format.WMSCapabilities=OpenLayers.Class(OpenLayers.Format.XML,{defaultVersion:"1.1.1",version:null,parser:null,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a]);this.options=a},read:function(a){"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));var b=a.documentElement,b=this.version||b.getAttribute("version")||this.defaultVersion;if(!this.parser||this.parser.version!==b){var c=OpenLayers.Format.WMSCapabilities["v"+b.replace(/\./g,
"_")];if(!c)throw"Can't find a WMS capabilities parser for version "+b;this.parser=new c(this.options)}a=this.parser.read(a);a.version=b;return a},CLASS_NAME:"OpenLayers.Format.WMSCapabilities"});
OpenLayers.Format.WMSDescribeLayer=OpenLayers.Class(OpenLayers.Format.XML,{defaultVersion:"1.1.1",version:null,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a]);this.options=a},read:function(a){"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));var b=a.documentElement,c=this.version;if(!c&&(c=b.getAttribute("version"),!c))c=this.defaultVersion;if("1.1.1"==c||"1.1.0"==c)c="1.1";b=OpenLayers.Format.WMSDescribeLayer["v"+c.replace(/\./g,"_")];
if(!b)throw"Can't find a WMS DescribeLayer parser for version "+c;a=(new b(this.options)).read(a);a.version=c;return a},CLASS_NAME:"OpenLayers.Format.WMSDescribeLayer"});
OpenLayers.Format.WMSGetFeatureInfo=OpenLayers.Class(OpenLayers.Format.XML,{layerIdentifier:"_layer",featureIdentifier:"_feature",regExes:{trimSpace:/^\s*|\s*$/g,removeSpace:/\s*/g,splitSpace:/\s+/,trimComma:/\s*,\s*/g},gmlFormat:null,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,arguments);OpenLayers.Util.extend(this,a);this.options=a},read:function(a){"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));var b=a.documentElement;if(b)var c=this["read_"+
b.nodeName],a=c?c.call(this,b):(new OpenLayers.Format.GML(this.options?this.options:{})).read(a);return a},read_msGMLOutput:function(a){var b=[];if(a=this.getSiblingNodesByTagCriteria(a,this.layerIdentifier))for(var c=0,d=a.length;c<d;++c){var e=a[c],f=e.nodeName;e.prefix&&(f=f.split(":")[1]);f=f.replace(this.layerIdentifier,"");if(e=this.getSiblingNodesByTagCriteria(e,this.featureIdentifier))for(var g=0;g<e.length;g++){var h=e[g],j=this.parseGeometry(h),h=this.parseAttributes(h),h=new OpenLayers.Feature.Vector(j.geometry,
h,null);h.bounds=j.bounds;h.type=f;b.push(h)}}return b},read_FeatureInfoResponse:function(a){for(var b=[],a=this.getElementsByTagNameNS(a,"*","FIELDS"),c=0,d=a.length;c<d;c++){for(var e=a[c],f={},g=0,h=e.attributes.length;g<h;g++){var j=e.attributes[g];f[j.nodeName]=j.nodeValue}b.push(new OpenLayers.Feature.Vector(null,f,null))}return b},getSiblingNodesByTagCriteria:function(a,b){var c=[],d,e,f,g;if(a&&a.hasChildNodes()){d=a.childNodes;f=d.length;for(var h=0;h<f;h++){for(g=d[h];g&&1!=g.nodeType;)g=
g.nextSibling,h++;e=g?g.nodeName:"";0<e.length&&-1<e.indexOf(b)?c.push(g):(e=this.getSiblingNodesByTagCriteria(g,b),0<e.length&&(0==c.length?c=e:c.push(e)))}}return c},parseAttributes:function(a){var b={};if(1==a.nodeType)for(var a=a.childNodes,c=a.length,d=0;d<c;++d){var e=a[d];if(1==e.nodeType){var f=e.childNodes;if(1==f.length&&(f=f[0],3==f.nodeType||4==f.nodeType))e=e.prefix?e.nodeName.split(":")[1]:e.nodeName,f=f.nodeValue.replace(this.regExes.trimSpace,""),b[e]=f}}return b},parseGeometry:function(a){if(!this.gmlFormat)this.gmlFormat=
new OpenLayers.Format.GML;var a=this.gmlFormat.parseFeature(a),b,c=null;a&&(b=a.geometry&&a.geometry.clone(),c=a.bounds&&a.bounds.clone(),a.destroy());return{geometry:b,bounds:c}},CLASS_NAME:"OpenLayers.Format.WMSGetFeatureInfo"});
OpenLayers.Format.WMTSCapabilities=OpenLayers.Class(OpenLayers.Format.XML,{defaultVersion:"1.0.0",version:null,parser:null,yx:{"urn:ogc:def:crs:EPSG::4326":!0},initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a]);this.options=a},read:function(a){"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));var b=a.documentElement,b=this.version||b.getAttribute("version")||this.defaultVersion;if(!this.parser||this.parser.version!==b){var c=OpenLayers.Format.WMTSCapabilities["v"+
b.replace(/\./g,"_")];if(!c)throw Error("Can't find a WMTS capabilities parser for version "+b);this.parser=new c(this.options)}return this.parser.read(a)},createLayer:function(a,b){var c,d={layer:!0,matrixSet:!0},e;for(e in d)if(!(e in b))throw Error("Missing property '"+e+"' in layer configuration.");d=a.contents;e=d.tileMatrixSets[b.matrixSet];for(var f,g=0,h=d.layers.length;g<h;++g)if(d.layers[g].identifier===b.layer){f=d.layers[g];break}if(f&&e){for(var j,g=0,h=f.styles.length;g<h&&!(j=f.styles[g],
j.isDefault);++g);c=new OpenLayers.Layer.WMTS(OpenLayers.Util.applyDefaults(b,{url:a.operationsMetadata.GetTile.dcp.http.get,name:f.title,style:j,matrixIds:e.matrixIds}))}return c},CLASS_NAME:"OpenLayers.Format.WMTSCapabilities"});
OpenLayers.Handler.Click=OpenLayers.Class(OpenLayers.Handler,{delay:300,single:!0,"double":!1,pixelTolerance:0,stopSingle:!1,stopDouble:!1,timerId:null,down:null,rightclickTimerId:null,initialize:function(a,b,c){OpenLayers.Handler.prototype.initialize.apply(this,arguments);if(null!=this.pixelTolerance)this.mousedown=function(a){this.down=a.xy;return!0}},mousedown:null,mouseup:function(a){var b=!0;this.checkModifiers(a)&&this.control.handleRightClicks&&OpenLayers.Event.isRightClick(a)&&(b=this.rightclick(a));
return b},rightclick:function(a){if(this.passesTolerance(a)){if(null!=this.rightclickTimerId)return this.clearTimer(),this.callback("dblrightclick",[a]),!this.stopDouble;a=this["double"]?OpenLayers.Util.extend({},a):this.callback("rightclick",[a]);a=OpenLayers.Function.bind(this.delayedRightCall,this,a);this.rightclickTimerId=window.setTimeout(a,this.delay)}return!this.stopSingle},delayedRightCall:function(a){this.rightclickTimerId=null;a&&this.callback("rightclick",[a]);return!this.stopSingle},dblclick:function(a){this.passesTolerance(a)&&
(this["double"]&&this.callback("dblclick",[a]),this.clearTimer());return!this.stopDouble},click:function(a){if(this.passesTolerance(a))null!=this.timerId?this.clearTimer():(a=this.single?OpenLayers.Util.extend({},a):null,this.timerId=window.setTimeout(OpenLayers.Function.bind(this.delayedCall,this,a),this.delay));return!this.stopSingle},passesTolerance:function(a){var b=!0;null!=this.pixelTolerance&&this.down&&Math.sqrt(Math.pow(this.down.x-a.xy.x,2)+Math.pow(this.down.y-a.xy.y,2))>this.pixelTolerance&&
(b=!1);return b},clearTimer:function(){if(null!=this.timerId)window.clearTimeout(this.timerId),this.timerId=null;if(null!=this.rightclickTimerId)window.clearTimeout(this.rightclickTimerId),this.rightclickTimerId=null},delayedCall:function(a){this.timerId=null;a&&this.callback("click",[a])},deactivate:function(){var a=!1;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments))this.clearTimer(),this.down=null,a=!0;return a},CLASS_NAME:"OpenLayers.Handler.Click"});
OpenLayers.Handler.Drag=OpenLayers.Class(OpenLayers.Handler,{started:!1,stopDown:!0,dragging:!1,last:null,start:null,oldOnselectstart:null,interval:0,timeoutId:null,documentDrag:!1,documentEvents:null,initialize:function(a,b,c){OpenLayers.Handler.prototype.initialize.apply(this,arguments)},down:function(){},move:function(){},up:function(){},out:function(){},mousedown:function(a){var b=!0;this.dragging=!1;if(this.checkModifiers(a)&&OpenLayers.Event.isLeftClick(a)){this.started=!0;this.last=this.start=
a.xy;OpenLayers.Element.addClass(this.map.viewPortDiv,"olDragDown");this.down(a);this.callback("down",[a.xy]);OpenLayers.Event.stop(a);if(!this.oldOnselectstart)this.oldOnselectstart=document.onselectstart?document.onselectstart:OpenLayers.Function.True;document.onselectstart=OpenLayers.Function.False;b=!this.stopDown}else this.started=!1,this.last=this.start=null;return b},mousemove:function(a){if(this.started&&!this.timeoutId&&(a.xy.x!=this.last.x||a.xy.y!=this.last.y)){!0===this.documentDrag&&
this.documentEvents&&(a.element===document?(this.adjustXY(a),this.setEvent(a)):this.destroyDocumentEvents());if(0<this.interval)this.timeoutId=setTimeout(OpenLayers.Function.bind(this.removeTimeout,this),this.interval);this.dragging=!0;this.move(a);this.callback("move",[a.xy]);if(!this.oldOnselectstart)this.oldOnselectstart=document.onselectstart,document.onselectstart=OpenLayers.Function.False;this.last=this.evt.xy}return!0},removeTimeout:function(){this.timeoutId=null},mouseup:function(a){if(this.started){!0===
this.documentDrag&&this.documentEvents&&(this.adjustXY(a),this.destroyDocumentEvents());var b=this.start!=this.last;this.dragging=this.started=!1;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown");this.up(a);this.callback("up",[a.xy]);b&&this.callback("done",[a.xy]);document.onselectstart=this.oldOnselectstart}return!0},mouseout:function(a){if(this.started&&OpenLayers.Util.mouseLeft(a,this.map.div))if(!0===this.documentDrag)this.documentEvents=new OpenLayers.Events(this,document,null,
null,{includeXY:!0}),this.documentEvents.on({mousemove:this.mousemove,mouseup:this.mouseup}),OpenLayers.Element.addClass(document.body,"olDragDown");else{var b=this.start!=this.last;this.dragging=this.started=!1;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown");this.out(a);this.callback("out",[]);b&&this.callback("done",[a.xy]);if(document.onselectstart)document.onselectstart=this.oldOnselectstart}return!0},click:function(){return this.start==this.last},activate:function(){var a=!1;
if(OpenLayers.Handler.prototype.activate.apply(this,arguments))this.dragging=!1,a=!0;return a},deactivate:function(){var a=!1;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments))this.dragging=this.started=!1,this.last=this.start=null,a=!0,OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown");return a},adjustXY:function(a){var b=OpenLayers.Util.pagePosition(this.map.div);a.xy.x-=b[0];a.xy.y-=b[1]},destroyDocumentEvents:function(){OpenLayers.Element.removeClass(document.body,
"olDragDown");this.documentEvents.destroy();this.documentEvents=null},CLASS_NAME:"OpenLayers.Handler.Drag"});
OpenLayers.Handler.Feature=OpenLayers.Class(OpenLayers.Handler,{EVENTMAP:{click:{"in":"click",out:"clickout"},mousemove:{"in":"over",out:"out"},dblclick:{"in":"dblclick",out:null},mousedown:{"in":null,out:null},mouseup:{"in":null,out:null}},feature:null,lastFeature:null,down:null,up:null,clickTolerance:4,geometryTypes:null,stopClick:!0,stopDown:!0,stopUp:!1,initialize:function(a,b,c,d){OpenLayers.Handler.prototype.initialize.apply(this,[a,c,d]);this.layer=b},mousedown:function(a){this.down=a.xy;return this.handle(a)?
!this.stopDown:!0},mouseup:function(a){this.up=a.xy;return this.handle(a)?!this.stopUp:!0},click:function(a){return this.handle(a)?!this.stopClick:!0},mousemove:function(a){if(!this.callbacks.over&&!this.callbacks.out)return!0;this.handle(a);return!0},dblclick:function(a){return!this.handle(a)},geometryTypeMatches:function(a){return null==this.geometryTypes||-1<OpenLayers.Util.indexOf(this.geometryTypes,a.geometry.CLASS_NAME)},handle:function(a){if(this.feature&&!this.feature.layer)this.feature=null;
var b=a.type,c=!1,d=!!this.feature,e="click"==b||"dblclick"==b;if((this.feature=this.layer.getFeatureFromEvent(a))&&!this.feature.layer)this.feature=null;if(this.lastFeature&&!this.lastFeature.layer)this.lastFeature=null;this.feature?(a=this.feature!=this.lastFeature,this.geometryTypeMatches(this.feature)?(d&&a?(this.lastFeature&&this.triggerCallback(b,"out",[this.lastFeature]),this.triggerCallback(b,"in",[this.feature])):(!d||e)&&this.triggerCallback(b,"in",[this.feature]),this.lastFeature=this.feature,
c=!0):(this.lastFeature&&(d&&a||e)&&this.triggerCallback(b,"out",[this.lastFeature]),this.feature=null)):this.lastFeature&&(d||e)&&this.triggerCallback(b,"out",[this.lastFeature]);return c},triggerCallback:function(a,b,c){(b=this.EVENTMAP[a][b])&&("click"==a&&this.up&&this.down?Math.sqrt(Math.pow(this.up.x-this.down.x,2)+Math.pow(this.up.y-this.down.y,2))<=this.clickTolerance&&this.callback(b,c):this.callback(b,c))},activate:function(){var a=!1;OpenLayers.Handler.prototype.activate.apply(this,arguments)&&
(this.moveLayerToTop(),this.map.events.on({removelayer:this.handleMapEvents,changelayer:this.handleMapEvents,scope:this}),a=!0);return a},deactivate:function(){var a=!1;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments))this.moveLayerBack(),this.up=this.down=this.lastFeature=this.feature=null,this.map.events.un({removelayer:this.handleMapEvents,changelayer:this.handleMapEvents,scope:this}),a=!0;return a},handleMapEvents:function(a){(!a.property||"order"==a.property)&&this.moveLayerToTop()},
moveLayerToTop:function(){this.layer.setZIndex(Math.max(this.map.Z_INDEX_BASE.Feature-1,this.layer.getZIndex())+1)},moveLayerBack:function(){var a=this.layer.getZIndex()-1;a>=this.map.Z_INDEX_BASE.Feature?this.layer.setZIndex(a):this.map.setLayerZIndex(this.layer,this.map.getLayerIndex(this.layer))},CLASS_NAME:"OpenLayers.Handler.Feature"});
OpenLayers.Handler.Hover=OpenLayers.Class(OpenLayers.Handler,{delay:500,pixelTolerance:null,stopMove:!1,px:null,timerId:null,initialize:function(a,b,c){OpenLayers.Handler.prototype.initialize.apply(this,arguments)},mousemove:function(a){if(this.passesTolerance(a.xy))this.clearTimer(),this.callback("move",[a]),this.px=a.xy,a=OpenLayers.Util.extend({},a),this.timerId=window.setTimeout(OpenLayers.Function.bind(this.delayedCall,this,a),this.delay);return!this.stopMove},mouseout:function(a){OpenLayers.Util.mouseLeft(a,
this.map.div)&&(this.clearTimer(),this.callback("move",[a]));return!0},passesTolerance:function(a){var b=!0;this.pixelTolerance&&this.px&&Math.sqrt(Math.pow(this.px.x-a.x,2)+Math.pow(this.px.y-a.y,2))<this.pixelTolerance&&(b=!1);return b},clearTimer:function(){if(null!=this.timerId)window.clearTimeout(this.timerId),this.timerId=null},delayedCall:function(a){this.callback("pause",[a])},deactivate:function(){var a=!1;OpenLayers.Handler.prototype.deactivate.apply(this,arguments)&&(this.clearTimer(),
a=!0);return a},CLASS_NAME:"OpenLayers.Handler.Hover"});
OpenLayers.Handler.Keyboard=OpenLayers.Class(OpenLayers.Handler,{KEY_EVENTS:["keydown","keyup"],eventListener:null,initialize:function(a,b,c){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 a=
0,b=this.KEY_EVENTS.length;a<b;a++)OpenLayers.Event.observe(document,this.KEY_EVENTS[a],this.eventListener);return!0}return!1},deactivate:function(){var a=!1;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){for(var a=0,b=this.KEY_EVENTS.length;a<b;a++)OpenLayers.Event.stopObserving(document,this.KEY_EVENTS[a],this.eventListener);a=!0}return a},handleKeyEvent:function(a){this.checkModifiers(a)&&this.callback(a.type,[a])},CLASS_NAME:"OpenLayers.Handler.Keyboard"});
OpenLayers.Handler.MouseWheel=OpenLayers.Class(OpenLayers.Handler,{wheelListener:null,mousePosition:null,interval:0,delta:0,cumulative:!0,initialize:function(a,b,c){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(a){if(this.map&&this.checkModifiers(a)){for(var b=!1,c=!1,d=!1,e=
OpenLayers.Event.element(a);null!=e&&!d&&!b;){if(!b)try{var f=e.currentStyle?e.currentStyle.overflow:document.defaultView.getComputedStyle(e,null).getPropertyValue("overflow"),b=f&&"auto"==f||"scroll"==f}catch(g){}if(!c)for(var d=0,h=this.map.layers.length;d<h;d++)if(e==this.map.layers[d].div||e==this.map.layers[d].pane){c=!0;break}d=e==this.map.div;e=e.parentNode}if(!b&&d){if(c){b=0;if(!a)a=window.event;a.wheelDelta?(b=a.wheelDelta/120,window.opera&&9.2>window.opera.version()&&(b=-b)):a.detail&&
(b=-a.detail/3);this.delta+=b;this.interval?(window.clearTimeout(this._timeoutId),this._timeoutId=window.setTimeout(OpenLayers.Function.bind(function(){this.wheelZoom(a)},this),this.interval)):this.wheelZoom(a)}OpenLayers.Event.stop(a)}}},wheelZoom:function(a){var b=this.delta;this.delta=0;if(b){if(this.mousePosition)a.xy=this.mousePosition;if(!a.xy)a.xy=this.map.getPixelFromLonLat(this.map.getCenter());0>b?this.callback("down",[a,this.cumulative?b:-1]):this.callback("up",[a,this.cumulative?b:1])}},
mousemove:function(a){this.mousePosition=a.xy},activate:function(a){if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){var b=this.wheelListener;OpenLayers.Event.observe(window,"DOMMouseScroll",b);OpenLayers.Event.observe(window,"mousewheel",b);OpenLayers.Event.observe(document,"mousewheel",b);return!0}return!1},deactivate:function(a){if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){var b=this.wheelListener;OpenLayers.Event.stopObserving(window,"DOMMouseScroll",b);OpenLayers.Event.stopObserving(window,
"mousewheel",b);OpenLayers.Event.stopObserving(document,"mousewheel",b);return!0}return!1},CLASS_NAME:"OpenLayers.Handler.MouseWheel"});
OpenLayers.Layer=OpenLayers.Class({id:null,name:null,div:null,opacity:null,alwaysInRange:null,EVENT_TYPES:"loadstart,loadend,loadcancel,visibilitychanged,move,moveend".split(","),RESOLUTION_PROPERTIES:"scales,resolutions,maxScale,minScale,maxResolution,minResolution,numZoomLevels,maxZoomLevel".split(","),events:null,map:null,isBaseLayer:!1,alpha:!1,displayInLayerSwitcher:!0,visibility:!0,attribution:null,inRange:!1,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:!1,wrapDateLine:!1,transitionEffect:null,SUPPORTED_TRANSITIONS:["resize"],metadata:{},initialize:function(a,b){this.addOptions(b);this.name=a;if(null==this.id&&(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),this.eventListeners instanceof Object))this.events.on(this.eventListeners);if(this.wrapDateLine)this.displayOutsideMaxExtent=!0},destroy:function(a){null==a&&(a=!0);null!=this.map&&this.map.removeLayer(this,a);this.options=this.div=this.name=this.map=this.projection=null;this.events&&(this.eventListeners&&this.events.un(this.eventListeners),this.events.destroy());this.events=this.eventListeners=null},clone:function(a){null==
a&&(a=new OpenLayers.Layer(this.name,this.getOptions()));OpenLayers.Util.applyDefaults(a,this);a.map=null;return a},getOptions:function(){var a={},b;for(b in this.options)a[b]=this[b];return a},setName:function(a){if(a!=this.name)this.name=a,null!=this.map&&this.map.events.triggerEvent("changelayer",{layer:this,property:"name"})},addOptions:function(a){if(null==this.options)this.options={};OpenLayers.Util.extend(this.options,a);OpenLayers.Util.extend(this,a);if("string"==typeof this.projection)this.projection=
new OpenLayers.Projection(this.projection);if(this.projection&&this.projection.getUnits())this.units=this.projection.getUnits();if(this.map){var b=this.RESOLUTION_PROPERTIES.concat(["projection","units","minExtent","maxExtent"]),c;for(c in a)if(a.hasOwnProperty(c)&&0<=OpenLayers.Util.indexOf(b,c)){this.initResolutions();break}}},onMapResize:function(){},redraw:function(){var a=!1;if(this.map){this.inRange=this.calculateInRange();var b=this.getExtent();b&&this.inRange&&this.visibility&&(this.moveTo(b,
!0,!1),this.events.triggerEvent("moveend",{zoomChanged:!0}),a=!0)}return a},moveTo:function(){var a=this.visibility;this.isBaseLayer||(a=a&&this.inRange);this.display(a)},setMap:function(a){if(null==this.map){this.map=a;this.maxExtent=this.maxExtent||this.map.maxExtent;this.minExtent=this.minExtent||this.map.minExtent;this.projection=this.projection||this.map.projection;if("string"==typeof this.projection)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(),this.div.style.display=this.visibility&&this.inRange?"":"none";this.setTileSize()}},afterAdd:function(){},removeMap:function(){},getImageSize:function(){return this.imageSize||this.tileSize},setTileSize:function(a){this.tileSize=a=a?a:this.tileSize?this.tileSize:this.map.getTileSize();if(this.gutter)this.imageOffset=new OpenLayers.Pixel(-this.gutter,-this.gutter),this.imageSize=new OpenLayers.Size(a.w+
2*this.gutter,a.h+2*this.gutter)},getVisibility:function(){return this.visibility},setVisibility:function(a){if(a!=this.visibility)this.visibility=a,this.display(a),this.redraw(),null!=this.map&&this.map.events.triggerEvent("changelayer",{layer:this,property:"visibility"}),this.events.triggerEvent("visibilitychanged")},display:function(a){if(a!=("none"!=this.div.style.display))this.div.style.display=a&&this.calculateInRange()?"block":"none"},calculateInRange:function(){var a=!1;this.alwaysInRange?
a=!0:this.map&&(a=this.map.getResolution(),a=a>=this.minResolution&&a<=this.maxResolution);return a},setIsBaseLayer:function(a){if(a!=this.isBaseLayer)this.isBaseLayer=a,null!=this.map&&this.map.events.triggerEvent("changebaselayer",{layer:this})},initResolutions:function(){var a,b,c={},d=!0;for(a=0,b=this.RESOLUTION_PROPERTIES.length;a<b;a++){var e=this.RESOLUTION_PROPERTIES[a];c[e]=this.options[e];d&&this.options[e]&&(d=!1)}if(null==this.alwaysInRange)this.alwaysInRange=d;if(null==c.resolutions)c.resolutions=
this.resolutionsFromScales(c.scales);if(null==c.resolutions)c.resolutions=this.calculateResolutions(c);if(null==c.resolutions){for(a=0,b=this.RESOLUTION_PROPERTIES.length;a<b;a++)e=this.RESOLUTION_PROPERTIES[a],c[e]=null!=this.options[e]?this.options[e]:this.map[e];if(null==c.resolutions)c.resolutions=this.resolutionsFromScales(c.scales);if(null==c.resolutions)c.resolutions=this.calculateResolutions(c)}var f;if(this.options.maxResolution&&"auto"!==this.options.maxResolution)f=this.options.maxResolution;
this.options.minScale&&(f=OpenLayers.Util.getResolutionFromScale(this.options.minScale,this.units));var g;if(this.options.minResolution&&"auto"!==this.options.minResolution)g=this.options.minResolution;this.options.maxScale&&(g=OpenLayers.Util.getResolutionFromScale(this.options.maxScale,this.units));c.resolutions&&(c.resolutions.sort(function(a,b){return b-a}),f||(f=c.resolutions[0]),g||(g=c.resolutions[c.resolutions.length-1]));if(this.resolutions=c.resolutions){b=this.resolutions.length;this.scales=
Array(b);for(a=0;a<b;a++)this.scales[a]=OpenLayers.Util.getScaleFromResolution(this.resolutions[a],this.units);this.numZoomLevels=b}if(this.minResolution=g)this.maxScale=OpenLayers.Util.getScaleFromResolution(g,this.units);if(this.maxResolution=f)this.minScale=OpenLayers.Util.getScaleFromResolution(f,this.units)},resolutionsFromScales:function(a){if(null!=a){var b,c,d;d=a.length;b=Array(d);for(c=0;c<d;c++)b[c]=OpenLayers.Util.getResolutionFromScale(a[c],this.units);return b}},calculateResolutions:function(a){var b=
a.maxResolution;if(null!=a.minScale)b=OpenLayers.Util.getResolutionFromScale(a.minScale,this.units);else if("auto"==b&&null!=this.maxExtent)var c=this.map.getSize(),d=this.maxExtent.getWidth()/c.w,c=this.maxExtent.getHeight()/c.h,b=Math.max(d,c);d=a.minResolution;null!=a.maxScale?d=OpenLayers.Util.getResolutionFromScale(a.maxScale,this.units):"auto"==a.minResolution&&null!=this.minExtent&&(c=this.map.getSize(),d=this.minExtent.getWidth()/c.w,c=this.minExtent.getHeight()/c.h,d=Math.max(d,c));c=a.maxZoomLevel;
a=a.numZoomLevels;"number"===typeof d&&"number"===typeof b&&void 0===a?a=Math.floor(Math.log(b/d)/Math.log(2))+1:void 0===a&&null!=c&&(a=c+1);if(!("number"!==typeof a||0>=a||"number"!==typeof b&&"number"!==typeof d)){var c=Array(a),e=2;"number"==typeof d&&"number"==typeof b&&(e=Math.pow(b/d,1/(a-1)));var f;if("number"===typeof b)for(f=0;f<a;f++)c[f]=b/Math.pow(e,f);else for(f=0;f<a;f++)c[a-1-f]=d*Math.pow(e,f);return c}},getResolution:function(){return this.getResolutionForZoom(this.map.getZoom())},
getExtent:function(){return this.map.calculateBounds()},getZoomForExtent:function(a,b){var c=this.map.getSize();return this.getZoomForResolution(Math.max(a.getWidth()/c.w,a.getHeight()/c.h),b)},getDataExtent:function(){},getResolutionForZoom:function(a){a=Math.max(0,Math.min(a,this.resolutions.length-1));if(this.map.fractionalZoom)var b=Math.floor(a),c=Math.ceil(a),a=this.resolutions[b]-(a-b)*(this.resolutions[b]-this.resolutions[c]);else a=this.resolutions[Math.round(a)];return a},getZoomForResolution:function(a,
b){var c;if(this.map.fractionalZoom){var d=0,e=this.resolutions[d],f=this.resolutions[this.resolutions.length-1],g;c=0;for(var h=this.resolutions.length;c<h;++c)if(g=this.resolutions[c],g>=a&&(e=g,d=c),g<=a){f=g;break}c=e-f;c=0<c?d+(e-a)/c:d}else{e=Number.POSITIVE_INFINITY;c=0;for(h=this.resolutions.length;c<h;c++)if(b){d=Math.abs(this.resolutions[c]-a);if(d>e)break;e=d}else if(this.resolutions[c]<a)break;c=Math.max(0,c-1)}return c},getLonLatFromViewPortPx:function(a){var b=null;if(null!=a){var c=
this.map.getSize(),d=this.map.getCenter();d&&(b=this.map.getResolution(),b=new OpenLayers.LonLat(d.lon+(a.x-c.w/2)*b,d.lat-(a.y-c.h/2)*b),this.wrapDateLine&&(b=b.wrapDateLine(this.maxExtent)))}return b},getViewPortPxFromLonLat:function(a){var b=null;if(null!=a)var b=this.map.getResolution(),c=this.map.getExtent(),b=new OpenLayers.Pixel(1/b*(a.lon-c.left),1/b*(c.top-a.lat));return b},setOpacity:function(a){if(a!=this.opacity){this.opacity=a;for(var b=0,c=this.div.childNodes.length;b<c;++b)OpenLayers.Util.modifyDOMElement(this.div.childNodes[b].firstChild,
null,null,null,null,null,null,a);null!=this.map&&this.map.events.triggerEvent("changelayer",{layer:this,property:"opacity"})}},getZIndex:function(){return this.div.style.zIndex},setZIndex:function(a){this.div.style.zIndex=a},adjustBounds:function(a){if(this.gutter)var b=this.gutter*this.map.getResolution(),a=new OpenLayers.Bounds(a.left-b,a.bottom-b,a.right+b,a.top+b);this.wrapDateLine&&(b={rightTolerance:this.getResolution()},a=a.wrapDateLine(this.maxExtent,b));return a},CLASS_NAME:"OpenLayers.Layer"});
OpenLayers.Marker.Box=OpenLayers.Class(OpenLayers.Marker,{bounds:null,div:null,initialize:function(a,b,c){this.bounds=a;this.div=OpenLayers.Util.createDiv();this.div.style.overflow="hidden";this.events=new OpenLayers.Events(this,this.div,null);this.setBorder(b,c)},destroy:function(){this.div=this.bounds=null;OpenLayers.Marker.prototype.destroy.apply(this,arguments)},setBorder:function(a,b){a||(a="red");b||(b=2);this.div.style.border=b+"px solid "+a},draw:function(a,b){OpenLayers.Util.modifyDOMElement(this.div,
null,a,b);return this.div},onScreen:function(){var a=!1;this.map&&(a=this.map.getExtent().containsBounds(this.bounds,!0,!0));return a},display:function(a){this.div.style.display=a?"":"none"},CLASS_NAME:"OpenLayers.Marker.Box"});
(function(){function a(){this._object=e&&!h?new e:new window.ActiveXObject("Microsoft.XMLHTTP");this._listeners=[]}function b(b){a.onreadystatechange&&a.onreadystatechange.apply(b);b.dispatchEvent({type:"readystatechange",bubbles:!1,cancelable:!1,timeStamp:new Date+0})}function c(a){try{a.responseText=a._object.responseText}catch(b){}try{var c=a._object,d=c.responseXML,e=c.responseText;if(g&&e&&d&&!d.documentElement&&c.getResponseHeader("Content-Type").match(/[^\/]+\/[^\+]+\+xml/))d=new window.ActiveXObject("Microsoft.XMLDOM"),
d.async=!1,d.validateOnParse=!1,d.loadXML(e);a.responseXML=d&&(g&&0!=d.parseError||!d.documentElement||d.documentElement&&"parsererror"==d.documentElement.tagName)?null:d}catch(f){}try{a.status=a._object.status}catch(h){}try{a.statusText=a._object.statusText}catch(r){}}function d(a){a._object.onreadystatechange=new window.Function}var e=window.XMLHttpRequest,f=!!window.controllers,g=window.document.all&&!window.opera,h=g&&window.navigator.userAgent.match(/MSIE ([\.0-9]+)/)&&7==RegExp.$1;if(f&&e.wrapped)a.wrapped=
e.wrapped;a.UNSENT=0;a.OPENED=1;a.HEADERS_RECEIVED=2;a.LOADING=3;a.DONE=4;a.prototype.readyState=a.UNSENT;a.prototype.responseText="";a.prototype.responseXML=null;a.prototype.status=0;a.prototype.statusText="";a.prototype.onreadystatechange=null;a.onreadystatechange=null;a.onopen=null;a.onsend=null;a.onabort=null;a.prototype.open=function(e,h,l,m,o){delete this._headers;3>arguments.length&&(l=!0);this._async=l;var n=this,p=this.readyState,r;g&&l&&(r=function(){p!=a.DONE&&(d(n),n.abort())},window.attachEvent("onunload",
r));a.onopen&&a.onopen.apply(this,arguments);4<arguments.length?this._object.open(e,h,l,m,o):3<arguments.length?this._object.open(e,h,l,m):this._object.open(e,h,l);if(!f&&!g)this.readyState=a.OPENED,b(this);this._object.onreadystatechange=function(){if(!f||l)n.readyState=n._object.readyState,c(n),n._aborted?n.readyState=a.UNSENT:(n.readyState==a.DONE&&(d(n),g&&l&&window.detachEvent("onunload",r)),p!=n.readyState&&b(n),p=n.readyState)}};a.prototype.send=function(d){a.onsend&&a.onsend.apply(this,arguments);
d&&d.nodeType&&(d=window.XMLSerializer?(new window.XMLSerializer).serializeToString(d):d.xml,this._headers["Content-Type"]||this._object.setRequestHeader("Content-Type","application/xml"));this._object.send(d);if(f&&!this._async){this.readyState=a.OPENED;for(c(this);this.readyState<a.DONE&&!(this.readyState++,b(this),this._aborted););}};a.prototype.abort=function(){a.onabort&&a.onabort.apply(this,arguments);if(this.readyState>a.UNSENT)this._aborted=!0;this._object.abort();d(this)};a.prototype.getAllResponseHeaders=
function(){return this._object.getAllResponseHeaders()};a.prototype.getResponseHeader=function(a){return this._object.getResponseHeader(a)};a.prototype.setRequestHeader=function(a,b){if(!this._headers)this._headers={};this._headers[a]=b;return this._object.setRequestHeader(a,b)};a.prototype.addEventListener=function(a,b,c){for(var d=0,e;e=this._listeners[d];d++)if(e[0]==a&&e[1]==b&&e[2]==c)return;this._listeners.push([a,b,c])};a.prototype.removeEventListener=function(a,b,c){for(var d=0,e;(e=this._listeners[d])&&
!(e[0]==a&&e[1]==b&&e[2]==c);d++);e&&this._listeners.splice(d,1)};a.prototype.dispatchEvent=function(a){a={type:a.type,target:this,currentTarget:this,eventPhase:2,bubbles:a.bubbles,cancelable:a.cancelable,timeStamp:a.timeStamp,stopPropagation:function(){},preventDefault:function(){},initEvent:function(){}};"readystatechange"==a.type&&this.onreadystatechange&&(this.onreadystatechange.handleEvent||this.onreadystatechange).apply(this,[a]);for(var b=0,c;c=this._listeners[b];b++)c[0]==a.type&&!c[2]&&(c[1].handleEvent||
c[1]).apply(this,[a])};a.prototype.toString=function(){return"[object XMLHttpRequest]"};a.toString=function(){return"[XMLHttpRequest]"};if(!window.Function.prototype.apply)window.Function.prototype.apply=function(a,b){b||(b=[]);a.__func=this;a.__func(b[0],b[1],b[2],b[3],b[4]);delete a.__func};OpenLayers.Request.XMLHttpRequest=a})();
OpenLayers.Tile.Image.IFrame=OpenLayers.Class(OpenLayers.Tile.Image,{initialize:function(a,b,c,d,e){OpenLayers.Tile.Image.prototype.initialize.apply(this,arguments);this.layerAlphaHack=!1},destroy:function(){null!=this.imgDiv&&OpenLayers.Event.stopObservingElement(this.imgDiv.firstChild);OpenLayers.Tile.Image.prototype.destroy.apply(this,arguments)},clear:function(){if(this.imgDiv){var a=this.imgDiv.firstChild;OpenLayers.Event.stopObservingElement(a);this.imgDiv.removeChild(a)}},clone:function(a){null==
a&&(a=new OpenLayers.Tile.Image.IFrame(this.layer,this.position,this.bounds,this.url,this.size));return a=OpenLayers.Tile.Image.prototype.clone.apply(this,[a])},renderTile:function(){if(OpenLayers.Tile.Image.prototype.renderTile.apply(this,arguments)){var a=this.createRequestForm();this.imgDiv.appendChild(a);a.submit();this.imgDiv.removeChild(a)}},initImgDiv:function(){this.imgDiv=this.createImgDiv();OpenLayers.Util.modifyDOMElement(this.imgDiv,this.id,null,this.layer.getImageSize(),"relative");this.imgDiv.className=
"olTileImage";this.frame.appendChild(this.imgDiv);this.layer.div.appendChild(this.frame);null!=this.layer.opacity&&OpenLayers.Util.modifyDOMElement(this.imgDiv,null,null,null,null,null,null,this.layer.opacity);this.imgDiv.map=this.layer.map},createImgDiv:function(){var a=document.createElement("div");if("msie"==OpenLayers.Util.getBrowserName())a.style.backgroundColor="#FFFFFF",a.style.filter="chroma(color=#FFFFFF)";OpenLayers.Util.modifyDOMElement(a,null,new OpenLayers.Pixel(0,0),this.layer.getImageSize(),
"absolute");var b=document.createElement("div");b.appendChild(a);return b},createIFrame:function(){var a=this.id+"_iFrame",b;"msie"==OpenLayers.Util.getBrowserName()?(b=document.createElement('<iframe name="'+a+'">'),b.style.backgroundColor="#FFFFFF",b.style.filter="chroma(color=#FFFFFF)"):(b=document.createElement("iframe"),b.style.backgroundColor="transparent",b.name=a);b.id=a;b.scrolling="no";b.marginWidth="0px";b.marginHeight="0px";b.frameBorder="0";OpenLayers.Util.modifyDOMElement(b,a,new OpenLayers.Pixel(0,
0),this.layer.getImageSize(),"absolute");OpenLayers.Event.observe(b,"load",OpenLayers.Function.bind(function(){this.show();if(this.isLoading)this.isLoading=!1,this.events.triggerEvent("loadend")},this));return b},createRequestForm:function(){var a=document.createElement("form");a.method="POST";var b=this.layer.params._OLSALT,b=(b?b+"_":"")+this.bounds.toBBOX();a.action=OpenLayers.Util.urlAppend(this.layer.url,b);this.imgDiv.insertBefore(this.createIFrame(),this.imgDiv.firstChild);a.target=this.id+
"_iFrame";var b=this.layer.getImageSize(),b=OpenLayers.Util.extend({BBOX:this.encodeBBOX?this.bounds.toBBOX():this.bounds.toArray(),WIDTH:b.w,HEIGHT:b.h},this.layer.params),c;for(c in b){var d=document.createElement("input");d.type="hidden";d.name=c;d.value=b[c];a.appendChild(d)}return a},CLASS_NAME:"OpenLayers.Tile.Image.IFrame"});OpenLayers.ProxyHost="";OpenLayers.nullHandler=function(a){OpenLayers.Console.userError(OpenLayers.i18n("unhandledRequest",{statusText:a.statusText}))};
OpenLayers.loadURL=function(a,b,c,d,e){"string"==typeof b&&(b=OpenLayers.Util.getParameters(b));return OpenLayers.Request.GET({url:a,params:b,success:d?d:OpenLayers.nullHandler,failure:e?e:OpenLayers.nullHandler,scope:c})};
OpenLayers.parseXMLString=function(a){var b=a.indexOf("<");0<b&&(a=a.substring(b));return OpenLayers.Util.Try(function(){var b=new ActiveXObject("Microsoft.XMLDOM");b.loadXML(a);return b},function(){return(new DOMParser).parseFromString(a,"text/xml")},function(){var b=new XMLHttpRequest;b.open("GET","data:text/xml;charset=utf-8,"+encodeURIComponent(a),!1);b.overrideMimeType&&b.overrideMimeType("text/xml");b.send(null);return b.responseXML})};
OpenLayers.Ajax={emptyFunction:function(){},getTransport:function(){return OpenLayers.Util.Try(function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")})||!1},activeRequestCount:0};
OpenLayers.Ajax.Responders={responders:[],register:function(a){for(var b=0;b<this.responders.length;b++)if(a==this.responders[b])return;this.responders.push(a)},unregister:function(a){OpenLayers.Util.removeItem(this.reponders,a)},dispatch:function(a,b,c){for(var d,e=0;e<this.responders.length;e++)if(d=this.responders[e],d[a]&&"function"==typeof d[a])try{d[a].apply(d,[b,c])}catch(f){}}};OpenLayers.Ajax.Responders.register({onCreate:function(){OpenLayers.Ajax.activeRequestCount++},onComplete:function(){OpenLayers.Ajax.activeRequestCount--}});
OpenLayers.Ajax.Base=OpenLayers.Class({initialize:function(a){this.options={method:"post",asynchronous:!0,contentType:"application/xml",parameters:""};OpenLayers.Util.extend(this.options,a||{});this.options.method=this.options.method.toLowerCase();if("string"==typeof this.options.parameters)this.options.parameters=OpenLayers.Util.getParameters(this.options.parameters)}});
OpenLayers.Ajax.Request=OpenLayers.Class(OpenLayers.Ajax.Base,{_complete:!1,initialize:function(a,b){OpenLayers.Ajax.Base.prototype.initialize.apply(this,[b]);OpenLayers.ProxyHost&&OpenLayers.String.startsWith(a,"http")&&(a=OpenLayers.ProxyHost+encodeURIComponent(a));this.transport=OpenLayers.Ajax.getTransport();this.request(a)},request:function(a){this.url=a;this.method=this.options.method;a=OpenLayers.Util.extend({},this.options.parameters);if("get"!=this.method&&"post"!=this.method)a._method=this.method,
this.method="post";this.parameters=a;if(a=OpenLayers.Util.getParameterString(a))"get"==this.method?this.url+=(-1<this.url.indexOf("?")?"&":"?")+a:/Konqueror|Safari|KHTML/.test(navigator.userAgent)&&(a+="&_=");try{var b=new OpenLayers.Ajax.Response(this);if(this.options.onCreate)this.options.onCreate(b);OpenLayers.Ajax.Responders.dispatch("onCreate",this,b);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);this.options.asynchronous&&window.setTimeout(OpenLayers.Function.bind(this.respondToReadyState,
this,1),10);this.transport.onreadystatechange=OpenLayers.Function.bind(this.onStateChange,this);this.setRequestHeaders();this.body="post"==this.method?this.options.postBody||a:null;this.transport.send(this.body);if(!this.options.asynchronous&&this.transport.overrideMimeType)this.onStateChange()}catch(c){this.dispatchException(c)}},onStateChange:function(){var a=this.transport.readyState;1<a&&!(4==a&&this._complete)&&this.respondToReadyState(this.transport.readyState)},setRequestHeaders:function(){var a=
{"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript, text/html, application/xml, text/xml, */*",OpenLayers:!0};if("post"==this.method&&(a["Content-type"]=this.options.contentType+(this.options.encoding?"; charset="+this.options.encoding:""),this.transport.overrideMimeType&&2005>(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]))a.Connection="close";if("object"==typeof this.options.requestHeaders){var b=this.options.requestHeaders;if("function"==typeof b.push)for(var c=0,d=b.length;c<
d;c+=2)a[b[c]]=b[c+1];else for(c in b)a[c]=b[c]}for(var e in a)this.transport.setRequestHeader(e,a[e])},success:function(){var a=this.getStatus();return!a||200<=a&&300>a},getStatus:function(){try{return this.transport.status||0}catch(a){return 0}},respondToReadyState:function(a){var a=OpenLayers.Ajax.Request.Events[a],b=new OpenLayers.Ajax.Response(this);if("Complete"==a){try{this._complete=!0,(this.options["on"+b.status]||this.options["on"+(this.success()?"Success":"Failure")]||OpenLayers.Ajax.emptyFunction)(b)}catch(c){this.dispatchException(c)}b.getHeader("Content-type")}try{(this.options["on"+
a]||OpenLayers.Ajax.emptyFunction)(b),OpenLayers.Ajax.Responders.dispatch("on"+a,this,b)}catch(d){this.dispatchException(d)}if("Complete"==a)this.transport.onreadystatechange=OpenLayers.Ajax.emptyFunction},getHeader:function(a){try{return this.transport.getResponseHeader(a)}catch(b){return null}},dispatchException:function(a){var b=this.options.onException;if(b)b(this,a),OpenLayers.Ajax.Responders.dispatch("onException",this,a);else{for(var b=!1,c=OpenLayers.Ajax.Responders.responders,d=0;d<c.length;d++)if(c[d].onException){b=
!0;break}if(b)OpenLayers.Ajax.Responders.dispatch("onException",this,a);else throw a;}}});OpenLayers.Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];
OpenLayers.Ajax.Response=OpenLayers.Class({status:0,statusText:"",initialize:function(a){this.request=a;var a=this.transport=a.transport,b=this.readyState=a.readyState;if(2<b&&(!window.attachEvent||window.opera)||4==b)this.status=this.getStatus(),this.statusText=this.getStatusText(),this.responseText=null==a.responseText?"":""+a.responseText;if(4==b)a=a.responseXML,this.responseXML=void 0===a?null:a},getStatus:OpenLayers.Ajax.Request.prototype.getStatus,getStatusText:function(){try{return this.transport.statusText||
""}catch(a){return""}},getHeader:OpenLayers.Ajax.Request.prototype.getHeader,getResponseHeader:function(a){return this.transport.getResponseHeader(a)}});OpenLayers.Ajax.getElementsByTagNameNS=function(a,b,c,d){var e=null;return e=a.getElementsByTagNameNS?a.getElementsByTagNameNS(b,d):a.getElementsByTagName(c+":"+d)};OpenLayers.Ajax.serializeXMLToString=function(a){return(new XMLSerializer).serializeToString(a)};
OpenLayers.Control.DragFeature=OpenLayers.Class(OpenLayers.Control,{geometryTypes:null,onStart:function(){},onDrag:function(){},onComplete:function(){},documentDrag:!1,layer:null,feature:null,dragCallbacks:{},featureCallbacks:{},lastPixel:null,initialize:function(a,b){OpenLayers.Control.prototype.initialize.apply(this,[b]);this.layer=a;this.handlers={drag:new OpenLayers.Handler.Drag(this,OpenLayers.Util.extend({down:this.downFeature,move:this.moveFeature,up:this.upFeature,out:this.cancel,done:this.doneDragging},
this.dragCallbacks),{documentDrag:this.documentDrag}),feature:new OpenLayers.Handler.Feature(this,this.layer,OpenLayers.Util.extend({over:this.overFeature,out:this.outFeature},this.featureCallbacks),{geometryTypes:this.geometryTypes})}},destroy:function(){this.layer=null;OpenLayers.Control.prototype.destroy.apply(this,[])},activate:function(){return this.handlers.feature.activate()&&OpenLayers.Control.prototype.activate.apply(this,arguments)},deactivate:function(){this.handlers.drag.deactivate();
this.handlers.feature.deactivate();this.feature=null;this.dragging=!1;this.lastPixel=null;OpenLayers.Element.removeClass(this.map.viewPortDiv,this.displayClass+"Over");return OpenLayers.Control.prototype.deactivate.apply(this,arguments)},overFeature:function(a){this.handlers.drag.dragging?this.over=this.feature.id==a.id?!0:!1:(this.feature=a,this.handlers.drag.activate(),this.over=!0,OpenLayers.Element.addClass(this.map.viewPortDiv,this.displayClass+"Over"))},downFeature:function(a){this.lastPixel=
a;this.onStart(this.feature,a)},moveFeature:function(a){var b=this.map.getResolution();this.feature.geometry.move(b*(a.x-this.lastPixel.x),b*(this.lastPixel.y-a.y));this.layer.drawFeature(this.feature);this.lastPixel=a;this.onDrag(this.feature,a)},upFeature:function(){this.over||this.handlers.drag.deactivate()},doneDragging:function(a){this.onComplete(this.feature,a)},outFeature:function(a){if(this.handlers.drag.dragging){if(this.feature.id==a.id)this.over=!1}else this.over=!1,this.handlers.drag.deactivate(),
OpenLayers.Element.removeClass(this.map.viewPortDiv,this.displayClass+"Over"),this.feature=null},cancel:function(){this.handlers.drag.deactivate();this.over=!1},setMap:function(a){this.handlers.drag.setMap(a);this.handlers.feature.setMap(a);OpenLayers.Control.prototype.setMap.apply(this,arguments)},CLASS_NAME:"OpenLayers.Control.DragFeature"});
OpenLayers.Control.DragPan=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOOL,panned:!1,interval:25,documentDrag:!1,draw:function(){this.handler=new OpenLayers.Handler.Drag(this,{move:this.panMap,done:this.panMapDone},{interval:this.interval,documentDrag:this.documentDrag})},panMap:function(a){this.panned=!0;this.map.pan(this.handler.last.x-a.x,this.handler.last.y-a.y,{dragging:this.handler.dragging,animate:!1})},panMapDone:function(a){if(this.panned)this.panMap(a),this.panned=
!1},CLASS_NAME:"OpenLayers.Control.DragPan"});
OpenLayers.Control.KeyboardDefaults=OpenLayers.Class(OpenLayers.Control,{autoActivate:!0,slideFactor:75,initialize:function(){OpenLayers.Control.prototype.initialize.apply(this,arguments)},destroy:function(){this.handler&&this.handler.destroy();this.handler=null;OpenLayers.Control.prototype.destroy.apply(this,arguments)},draw:function(){this.handler=new OpenLayers.Handler.Keyboard(this,{keydown:this.defaultKeyPress})},defaultKeyPress:function(a){switch(a.keyCode){case OpenLayers.Event.KEY_LEFT:this.map.pan(-this.slideFactor,0);
break;case OpenLayers.Event.KEY_RIGHT:this.map.pan(this.slideFactor,0);break;case OpenLayers.Event.KEY_UP:this.map.pan(0,-this.slideFactor);break;case OpenLayers.Event.KEY_DOWN:this.map.pan(0,this.slideFactor);break;case 33:a=this.map.getSize();this.map.pan(0,-0.75*a.h);break;case 34:a=this.map.getSize();this.map.pan(0,0.75*a.h);break;case 35:a=this.map.getSize();this.map.pan(0.75*a.w,0);break;case 36:a=this.map.getSize();this.map.pan(-0.75*a.w,0);break;case 43:case 61:case 187:case 107:this.map.zoomIn();
break;case 45:case 109:case 189:case 95:this.map.zoomOut()}},CLASS_NAME:"OpenLayers.Control.KeyboardDefaults"});
OpenLayers.Control.WMSGetFeatureInfo=OpenLayers.Class(OpenLayers.Control,{hover:!1,drillDown:!1,maxFeatures:10,clickCallback:"click",layers:null,queryVisible:!1,url:null,layerUrls:null,infoFormat:"text/html",vendorParams:{},format:null,formatOptions:null,handlerOptions:null,handler:null,hoverRequest:null,EVENT_TYPES:["beforegetfeatureinfo","nogetfeatureinfo","getfeatureinfo"],initialize:function(a){this.EVENT_TYPES=OpenLayers.Control.WMSGetFeatureInfo.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);
a=a||{};a.handlerOptions=a.handlerOptions||{};OpenLayers.Control.prototype.initialize.apply(this,[a]);if(!this.format)this.format=new OpenLayers.Format.WMSGetFeatureInfo(a.formatOptions);if(!0===this.drillDown)this.hover=!1;this.hover?this.handler=new OpenLayers.Handler.Hover(this,{move:this.cancelHover,pause:this.getInfoForHover},OpenLayers.Util.extend(this.handlerOptions.hover||{},{delay:250})):(a={},a[this.clickCallback]=this.getInfoForClick,this.handler=new OpenLayers.Handler.Click(this,a,this.handlerOptions.click||
{}))},activate:function(){this.active||this.handler.activate();return OpenLayers.Control.prototype.activate.apply(this,arguments)},deactivate:function(){return OpenLayers.Control.prototype.deactivate.apply(this,arguments)},getInfoForClick:function(a){this.events.triggerEvent("beforegetfeatureinfo",{xy:a.xy});OpenLayers.Element.addClass(this.map.viewPortDiv,"olCursorWait");this.request(a.xy,{})},getInfoForHover:function(a){this.events.triggerEvent("beforegetfeatureinfo",{xy:a.xy});this.request(a.xy,
{hover:!0})},cancelHover:function(){if(this.hoverRequest)this.hoverRequest.abort(),this.hoverRequest=null},findLayers:function(){for(var a=this.layers||this.map.layers,b=[],c,d,e=0,f=a.length;e<f;++e)if(c=a[e],c instanceof OpenLayers.Layer.WMS&&(!this.queryVisible||c.getVisibility())){d=c.url instanceof Array?c.url[0]:c.url;if(!1===this.drillDown&&!this.url)this.url=d;(!0===this.drillDown||this.urlMatches(d))&&b.push(c)}return b},urlMatches:function(a){var b=OpenLayers.Util.isEquivalentUrl(this.url,
a);if(!b&&this.layerUrls)for(var c=0,d=this.layerUrls.length;c<d;++c)if(OpenLayers.Util.isEquivalentUrl(this.layerUrls[c],a)){b=!0;break}return b},buildWMSOptions:function(a,b,c,d){for(var e=[],f=[],g=0,h=b.length;g<h;g++)e=e.concat(b[g].params.LAYERS),f=f.concat(this.getStyleNames(b[g]));b=OpenLayers.Util.extend({service:"WMS",version:b[0].params.VERSION,request:"GetFeatureInfo",layers:e,query_layers:e,styles:f,bbox:this.map.getExtent().toBBOX(null,b[0].reverseAxisOrder()),feature_count:this.maxFeatures,
height:this.map.getSize().h,width:this.map.getSize().w,format:d,info_format:this.infoFormat},1.3<=parseFloat(b[0].params.VERSION)?{crs:this.map.getProjection(),i:c.x,j:c.y}:{srs:this.map.getProjection(),x:c.x,y:c.y});OpenLayers.Util.applyDefaults(b,this.vendorParams);return{url:a,params:OpenLayers.Util.upperCaseObject(b),callback:function(a){this.handleResponse(c,a)},scope:this}},getStyleNames:function(a){return a.params.STYLES?a.params.STYLES:a.params.LAYERS instanceof Array?Array(a.params.LAYERS.length):
a.params.LAYERS.replace(/[^,]/g,"")},request:function(a,b){var c=this.findLayers();if(0==c.length)this.events.triggerEvent("nogetfeatureinfo"),OpenLayers.Element.removeClass(this.map.viewPortDiv,"olCursorWait");else if(b=b||{},!1===this.drillDown){var c=this.buildWMSOptions(this.url,c,a,c[0].params.FORMAT),d=OpenLayers.Request.GET(c);if(!0===b.hover)this.hoverRequest=d}else{this._numRequests=this._requestCount=0;this.features=[];for(var d={},e,f=0,g=c.length;f<g;f++){var h=c[f];e=h.url instanceof
Array?h.url[0]:h.url;e in d?d[e].push(h):(this._numRequests++,d[e]=[h])}for(e in d)c=d[e],c=this.buildWMSOptions(e,c,a,c[0].params.FORMAT),OpenLayers.Request.GET(c)}},triggerGetFeatureInfo:function(a,b,c){this.events.triggerEvent("getfeatureinfo",{text:a.responseText,features:c,request:a,xy:b});OpenLayers.Element.removeClass(this.map.viewPortDiv,"olCursorWait")},handleResponse:function(a,b){var c=b.responseXML;if(!c||!c.documentElement)c=b.responseText;c=this.format.read(c);!1===this.drillDown?this.triggerGetFeatureInfo(b,
a,c):(this._requestCount++,this._features=(this._features||[]).concat(c),this._requestCount===this._numRequests&&(this.triggerGetFeatureInfo(b,a,this._features.concat()),delete this._features,delete this._requestCount,delete this._numRequests))},CLASS_NAME:"OpenLayers.Control.WMSGetFeatureInfo"});
OpenLayers.Control.WMTSGetFeatureInfo=OpenLayers.Class(OpenLayers.Control,{hover:!1,requestEncoding:"KVP",drillDown:!1,maxFeatures:10,clickCallback:"click",layers:null,queryVisible:!0,infoFormat:"text/html",vendorParams:{},format:null,formatOptions:null,handlerOptions:null,handler:null,hoverRequest:null,EVENT_TYPES:["beforegetfeatureinfo","getfeatureinfo","exception"],pending:0,initialize:function(a){this.EVENT_TYPES=OpenLayers.Control.WMTSGetFeatureInfo.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);
a=a||{};a.handlerOptions=a.handlerOptions||{};OpenLayers.Control.prototype.initialize.apply(this,[a]);if(!this.format)this.format=new OpenLayers.Format.WMSGetFeatureInfo(a.formatOptions);if(!0===this.drillDown)this.hover=!1;this.hover?this.handler=new OpenLayers.Handler.Hover(this,{move:this.cancelHover,pause:this.getInfoForHover},OpenLayers.Util.extend(this.handlerOptions.hover||{},{delay:250})):(a={},a[this.clickCallback]=this.getInfoForClick,this.handler=new OpenLayers.Handler.Click(this,a,this.handlerOptions.click||
{}))},activate:function(){this.active||this.handler.activate();return OpenLayers.Control.prototype.activate.apply(this,arguments)},deactivate:function(){return OpenLayers.Control.prototype.deactivate.apply(this,arguments)},getInfoForClick:function(a){this.request(a.xy,{})},getInfoForHover:function(a){this.request(a.xy,{hover:!0})},cancelHover:function(){if(this.hoverRequest){--this.pending;if(0>=this.pending)OpenLayers.Element.removeClass(this.map.viewPortDiv,"olCursorWait"),this.pending=0;this.hoverRequest.abort();
this.hoverRequest=null}},findLayers:function(){for(var a=this.layers||this.map.layers,b=[],c,d=a.length-1;0<=d;--d)if(c=a[d],c instanceof OpenLayers.Layer.WMTS&&c.requestEncoding===this.requestEncoding&&(!this.queryVisible||c.getVisibility()))if(b.push(c),!this.drillDown||this.hover)break;return b},buildRequestOptions:function(a,b){var c=this.map.getLonLatFromPixel(b),d=a.getURL(new OpenLayers.Bounds(c.lon,c.lat,c.lon,c.lat)),d=OpenLayers.Util.getParameters(d),c=a.getTileInfo(c);OpenLayers.Util.extend(d,
{service:"WMTS",version:a.version,request:"GetFeatureInfo",infoFormat:this.infoFormat,i:c.i,j:c.j});OpenLayers.Util.applyDefaults(d,this.vendorParams);return{url:a.url instanceof Array?a.url[0]:a.url,params:OpenLayers.Util.upperCaseObject(d),callback:function(c){this.handleResponse(b,c,a)},scope:this}},request:function(a,b){var b=b||{},c=this.findLayers();if(0<c.length){for(var d,e,f=0,g=c.length;f<g;f++)if(e=c[f],d=this.events.triggerEvent("beforegetfeatureinfo",{xy:a,layer:e}),!1!==d&&(++this.pending,
d=this.buildRequestOptions(e,a),d=OpenLayers.Request.GET(d),!0===b.hover))this.hoverRequest=d;0<this.pending&&OpenLayers.Element.addClass(this.map.viewPortDiv,"olCursorWait")}},handleResponse:function(a,b,c){--this.pending;if(0>=this.pending)OpenLayers.Element.removeClass(this.map.viewPortDiv,"olCursorWait"),this.pending=0;if(b.status&&(200>b.status||300<=b.status))this.events.triggerEvent("exception",{xy:a,request:b,layer:c});else{var d=b.responseXML;if(!d||!d.documentElement)d=b.responseText;var e,
f;try{e=this.format.read(d)}catch(g){f=!0,this.events.triggerEvent("exception",{xy:a,request:b,error:g,layer:c})}f||this.events.triggerEvent("getfeatureinfo",{text:b.responseText,features:e,request:b,xy:a,layer:c})}},setMap:function(a){this.handler.setMap(a);OpenLayers.Control.prototype.setMap.apply(this,arguments)},CLASS_NAME:"OpenLayers.Control.WMTSGetFeatureInfo"});OpenLayers.State={UNKNOWN:"Unknown",INSERT:"Insert",UPDATE:"Update",DELETE:"Delete"};
OpenLayers.Feature.Vector=OpenLayers.Class(OpenLayers.Feature,{fid:null,geometry:null,attributes:null,bounds:null,state:null,style:null,url:null,renderIntent:"default",initialize:function(a,b,c){OpenLayers.Feature.prototype.initialize.apply(this,[null,null,b]);this.lonlat=null;this.geometry=a?a:null;this.state=null;this.attributes={};if(b)this.attributes=OpenLayers.Util.extend(this.attributes,b);this.style=c?c:null},destroy:function(){if(this.layer)this.layer.removeFeatures(this),this.layer=null;
this.geometry=null;OpenLayers.Feature.prototype.destroy.apply(this,arguments)},clone:function(){return new OpenLayers.Feature.Vector(this.geometry?this.geometry.clone():null,this.attributes,this.style)},onScreen:function(a){var b=!1;this.layer&&this.layer.map&&(b=this.layer.map.getExtent(),a?(a=this.geometry.getBounds(),b=b.intersectsBounds(a)):b=b.toGeometry().intersects(this.geometry));return b},getVisibility:function(){return!(this.style&&"none"==this.style.display||!this.layer||this.layer&&this.layer.styleMap&&
"none"==this.layer.styleMap.createSymbolizer(this,this.renderIntent).display||this.layer&&!this.layer.getVisibility())},createMarker:function(){return null},destroyMarker:function(){},createPopup:function(){return null},atPoint:function(a,b,c){var d=!1;this.geometry&&(d=this.geometry.atPoint(a,b,c));return d},destroyPopup:function(){},move:function(a){if(this.layer&&this.geometry.move){var a="OpenLayers.LonLat"==a.CLASS_NAME?this.layer.getViewPortPxFromLonLat(a):a,b=this.layer.getViewPortPxFromLonLat(this.geometry.getBounds().getCenterLonLat()),
c=this.layer.map.getResolution();this.geometry.move(c*(a.x-b.x),c*(b.y-a.y));this.layer.drawFeature(this);return b}},toState:function(a){if(a==OpenLayers.State.UPDATE)switch(this.state){case OpenLayers.State.UNKNOWN:case OpenLayers.State.DELETE:this.state=a}else if(a==OpenLayers.State.INSERT)switch(this.state){case OpenLayers.State.UNKNOWN:break;default:this.state=a}else if(a==OpenLayers.State.DELETE)switch(this.state){case OpenLayers.State.UNKNOWN:case OpenLayers.State.UPDATE:this.state=a}else if(a==
OpenLayers.State.UNKNOWN)this.state=a},CLASS_NAME:"OpenLayers.Feature.Vector"});
OpenLayers.Feature.Vector.style={"default":{fillColor:"#ee9900",fillOpacity:0.4,hoverFillColor:"white",hoverFillOpacity:0.8,strokeColor:"#ee9900",strokeOpacity:1,strokeWidth:1,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:0.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"inherit"},select:{fillColor:"blue",fillOpacity:0.4,hoverFillColor:"white",hoverFillOpacity:0.8,strokeColor:"blue",strokeOpacity:1,
strokeWidth:2,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:0.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"pointer"},temporary:{fillColor:"#66cccc",fillOpacity:0.2,hoverFillColor:"white",hoverFillOpacity:0.8,strokeColor:"#66cccc",strokeOpacity:1,strokeLinecap:"round",strokeWidth:2,strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:0.2,pointRadius:6,hoverPointRadius:1,
hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"inherit"},"delete":{display:"none"}};
OpenLayers.Feature.WFS=OpenLayers.Class(OpenLayers.Feature,{initialize:function(a,b){var c=arguments,c=this.processXMLNode(b),c=[a,c.lonlat,c];OpenLayers.Feature.prototype.initialize.apply(this,c);this.createMarker();this.layer.addMarker(this.marker)},destroy:function(){null!=this.marker&&this.layer.removeMarker(this.marker);OpenLayers.Feature.prototype.destroy.apply(this,arguments)},processXMLNode:function(a){a=OpenLayers.Ajax.getElementsByTagNameNS(a,"http://www.opengis.net/gml","gml","Point");
a=OpenLayers.Util.getXmlNodeValue(OpenLayers.Ajax.getElementsByTagNameNS(a[0],"http://www.opengis.net/gml","gml","coordinates")[0]).split(",");return{lonlat:new OpenLayers.LonLat(parseFloat(a[0]),parseFloat(a[1])),id:null}},CLASS_NAME:"OpenLayers.Feature.WFS"});
OpenLayers.Format.OWSCommon.v1_0_0=OpenLayers.Class(OpenLayers.Format.OWSCommon.v1,{namespaces:{ows:"http://www.opengis.net/ows/1.0",xlink:"http://www.w3.org/1999/xlink"},readers:{ows:OpenLayers.Format.OWSCommon.v1.prototype.readers.ows},writers:{ows:OpenLayers.Format.OWSCommon.v1.prototype.writers.ows},CLASS_NAME:"OpenLayers.Format.OWSCommon.v1_1_0"});
OpenLayers.Format.OWSCommon.v1_1_0=OpenLayers.Class(OpenLayers.Format.OWSCommon.v1,{namespaces:{ows:"http://www.opengis.net/ows/1.1",xlink:"http://www.w3.org/1999/xlink"},readers:{ows:OpenLayers.Util.applyDefaults({AllowedValues:function(a,b){b.allowedValues={};this.readChildNodes(a,b.allowedValues)},AnyValue:function(a,b){b.anyValue=!0},Range:function(a,b){b.range={};this.readChildNodes(a,b.range)},MinimumValue:function(a,b){b.minValue=this.getChildValue(a)},MaximumValue:function(a,b){b.maxValue=
this.getChildValue(a)},Identifier:function(a,b){b.identifier=this.getChildValue(a)},SupportedCRS:function(a,b){b.supportedCRS=this.getChildValue(a)}},OpenLayers.Format.OWSCommon.v1.prototype.readers.ows)},CLASS_NAME:"OpenLayers.Format.OWSCommon.v1_1_0"});
OpenLayers.Format.OWSContext=OpenLayers.Class(OpenLayers.Format.Context,{defaultVersion:"0.3.1",getParser:function(a){a=a||this.version||this.defaultVersion;if("0.3.0"===a)a=this.defaultVersion;if(!this.parser||this.parser.VERSION!=a){var b=OpenLayers.Format.OWSContext["v"+a.replace(/\./g,"_")];if(!b)throw"Can't find a OWSContext parser for version "+a;this.parser=new b(this.options)}return this.parser},toContext:function(a){var b={};if("OpenLayers.Map"==a.CLASS_NAME)b.bounds=a.getExtent(),b.maxExtent=
a.maxExtent,b.projection=a.projection,b.size=a.getSize(),b.layers=a.layers;return b},CLASS_NAME:"OpenLayers.Format.OWSContext"});
OpenLayers.Format.WFSCapabilities.v1=OpenLayers.Class(OpenLayers.Format.WFSCapabilities,{initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a]);this.options=a},read:function(a){"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));var b={};this.runChildNodes(b,a.documentElement);return b},runChildNodes:function(a,b){for(var c=b.childNodes,d,e,f=0;f<c.length;++f)d=c[f],1==d.nodeType&&(e=this["read_cap_"+d.nodeName])&&e.apply(this,[a,d])},read_cap_FeatureTypeList:function(a,
b){var c={featureTypes:[]};this.runChildNodes(c,b);a.featureTypeList=c},read_cap_FeatureType:function(a,b){var c={};this.runChildNodes(c,b);a.featureTypes.push(c)},read_cap_Name:function(a,b){var c=this.getChildValue(b);if(c&&(c=c.split(":"),a.name=c.pop(),0<c.length))a.featureNS=this.lookupNamespaceURI(b,c[0])},read_cap_Title:function(a,b){var c=this.getChildValue(b);if(c)a.title=c},read_cap_Abstract:function(a,b){var c=this.getChildValue(b);c&&(a["abstract"]=c)},CLASS_NAME:"OpenLayers.Format.WFSCapabilities.v1"});
OpenLayers.Format.WMC=OpenLayers.Class(OpenLayers.Format.Context,{defaultVersion:"1.1.0",getParser:function(a){a=a||this.version||this.defaultVersion;if(!this.parser||this.parser.VERSION!=a){var b=OpenLayers.Format.WMC["v"+a.replace(/\./g,"_")];if(!b)throw"Can't find a WMC parser for version "+a;this.parser=new b(this.options)}return this.parser},layerToContext:function(a){var b=this.getParser();return{queryable:a.queryable,visibility:a.visibility,name:a.params.LAYERS,title:a.name,metadataURL:a.metadataURL,
version:a.params.VERSION,url:a.url,maxExtent:a.maxExtent,transparent:a.params.TRANSPARENT,numZoomLevels:a.numZoomLevels,units:a.units,isBaseLayer:a.isBaseLayer,opacity:a.opacity,displayInLayerSwitcher:a.displayInLayerSwitcher,singleTile:a.singleTile,tileSize:a.singleTile||!a.tileSize?void 0:{width:a.tileSize.w,height:a.tileSize.h},minScale:a.options.resolutions||a.options.scales||a.options.maxResolution||a.options.minScale?a.minScale:void 0,maxScale:a.options.resolutions||a.options.scales||a.options.minResolution||
a.options.maxScale?a.maxScale:void 0,formats:[{value:a.params.FORMAT,current:!0}],styles:[{href:a.params.SLD,body:a.params.SLD_BODY,name:a.params.STYLES||b.defaultStyleName,title:b.defaultStyleTitle,current:!0}]}},toContext:function(a){var b={},c=a.layers;"OpenLayers.Map"==a.CLASS_NAME?(b.bounds=a.getExtent(),b.maxExtent=a.maxExtent,b.projection=a.projection,b.size=a.getSize()):(OpenLayers.Util.applyDefaults(b,a),void 0!=b.layers&&delete b.layers);if(void 0==b.layersContext)b.layersContext=[];if(void 0!=
c&&c instanceof Array)for(var a=0,d=c.length;a<d;a++){var e=c[a];e instanceof OpenLayers.Layer.WMS&&b.layersContext.push(this.layerToContext(e))}return b},CLASS_NAME:"OpenLayers.Format.WMC"});
OpenLayers.Format.WMSCapabilities.v1=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{wms:"http://www.opengis.net/wms",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},defaultPrefix:"wms",initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},read:function(a){"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));if(a&&9==a.nodeType)a=a.documentElement;var b={};this.readNode(a,b);this.postProcessLayers(b);return b},
postProcessLayers:function(a){if(a.capability){a.capability.layers=[];for(var b=a.capability.nestedLayers,c=0,d=b.length;c<d;++c)this.processLayer(a.capability,b[c])}},processLayer:function(a,b,c){if(void 0===b.formats)b.formats=a.request.getmap.formats;if(c){b.styles=b.styles.concat(c.styles);for(var d="queryable,cascaded,fixedWidth,fixedHeight,opaque,noSubsets,llbbox,minScale,maxScale,attribution".split(","),e=["srs","bbox","dimensions","authorityURLs"],f,g=0;g<d.length;g++)f=d[g],f in c&&(null==
b[f]&&(b[f]=c[f]),null==b[f]&&(-1!=OpenLayers.Util.indexOf(["cascaded","fixedWidth","fixedHeight"],f)&&(b[f]=0),-1!=OpenLayers.Util.indexOf(["queryable","opaque","noSubsets"],f)&&(b[f]=!1)));for(g=0;g<e.length;g++)f=e[g],b[f]=OpenLayers.Util.extend(b[f],c[f])}c=0;for(d=b.nestedLayers.length;c<d;c++)this.processLayer(a,b.nestedLayers[c],b);b.name&&a.layers.push(b)},readers:{wms:{Service:function(a,b){b.service={};this.readChildNodes(a,b.service)},Name:function(a,b){b.name=this.getChildValue(a)},Title:function(a,
b){b.title=this.getChildValue(a)},Abstract:function(a,b){b["abstract"]=this.getChildValue(a)},BoundingBox:function(a){var b={};b.bbox=[parseFloat(a.getAttribute("minx")),parseFloat(a.getAttribute("miny")),parseFloat(a.getAttribute("maxx")),parseFloat(a.getAttribute("maxy"))];a={x:parseFloat(a.getAttribute("resx")),y:parseFloat(a.getAttribute("resy"))};if(!isNaN(a.x)||!isNaN(a.y))b.res=a;return b},OnlineResource:function(a,b){b.href=this.getAttributeNS(a,this.namespaces.xlink,"href")},ContactInformation:function(a,
b){b.contactInformation={};this.readChildNodes(a,b.contactInformation)},ContactPersonPrimary:function(a,b){b.personPrimary={};this.readChildNodes(a,b.personPrimary)},ContactPerson:function(a,b){b.person=this.getChildValue(a)},ContactOrganization:function(a,b){b.organization=this.getChildValue(a)},ContactPosition:function(a,b){b.position=this.getChildValue(a)},ContactAddress:function(a,b){b.contactAddress={};this.readChildNodes(a,b.contactAddress)},AddressType:function(a,b){b.type=this.getChildValue(a)},
Address:function(a,b){b.address=this.getChildValue(a)},City:function(a,b){b.city=this.getChildValue(a)},StateOrProvince:function(a,b){b.stateOrProvince=this.getChildValue(a)},PostCode:function(a,b){b.postcode=this.getChildValue(a)},Country:function(a,b){b.country=this.getChildValue(a)},ContactVoiceTelephone:function(a,b){b.phone=this.getChildValue(a)},ContactFacsimileTelephone:function(a,b){b.fax=this.getChildValue(a)},ContactElectronicMailAddress:function(a,b){b.email=this.getChildValue(a)},Fees:function(a,
b){var c=this.getChildValue(a);if(c&&"none"!=c.toLowerCase())b.fees=c},AccessConstraints:function(a,b){var c=this.getChildValue(a);if(c&&"none"!=c.toLowerCase())b.accessConstraints=c},Capability:function(a,b){b.capability={nestedLayers:[]};this.readChildNodes(a,b.capability)},Request:function(a,b){b.request={};this.readChildNodes(a,b.request)},GetCapabilities:function(a,b){b.getcapabilities={formats:[]};this.readChildNodes(a,b.getcapabilities)},Format:function(a,b){b.formats instanceof Array?b.formats.push(this.getChildValue(a)):
b.format=this.getChildValue(a)},DCPType:function(a,b){this.readChildNodes(a,b)},HTTP:function(a,b){this.readChildNodes(a,b)},Get:function(a,b){this.readChildNodes(a,b)},Post:function(a,b){this.readChildNodes(a,b)},GetMap:function(a,b){b.getmap={formats:[]};this.readChildNodes(a,b.getmap)},GetFeatureInfo:function(a,b){b.getfeatureinfo={formats:[]};this.readChildNodes(a,b.getfeatureinfo)},Exception:function(a,b){b.exception={formats:[]};this.readChildNodes(a,b.exception)},Layer:function(a,b){var c=
a.getAttributeNode("queryable"),d=c&&c.specified?a.getAttribute("queryable"):null,e=(c=a.getAttributeNode("cascaded"))&&c.specified?a.getAttribute("cascaded"):null,c=(c=a.getAttributeNode("opaque"))&&c.specified?a.getAttribute("opaque"):null,f=a.getAttribute("noSubsets"),g=a.getAttribute("fixedWidth"),h=a.getAttribute("fixedHeight"),d={nestedLayers:[],styles:[],srs:{},metadataURLs:[],bbox:{},dimensions:{},authorityURLs:{},identifiers:{},keywords:[],queryable:d&&""!==d?"1"===d||"true"===d:null,cascaded:null!==
e?parseInt(e):null,opaque:c?"1"===c||"true"===c:null,noSubsets:null!==f?"1"===f||"true"===f:null,fixedWidth:null!=g?parseInt(g):null,fixedHeight:null!=h?parseInt(h):null};b.nestedLayers.push(d);this.readChildNodes(a,d);if(d.name&&(e=d.name.split(":"),0<e.length))d.prefix=e[0]},Attribution:function(a,b){b.attribution={};this.readChildNodes(a,b.attribution)},LogoURL:function(a,b){b.logo={width:a.getAttribute("width"),height:a.getAttribute("height")};this.readChildNodes(a,b.logo)},Style:function(a,b){var c=
{};b.styles.push(c);this.readChildNodes(a,c)},LegendURL:function(a,b){var c={width:a.getAttribute("width"),height:a.getAttribute("height")};b.legend=c;this.readChildNodes(a,c)},MetadataURL:function(a,b){var c={type:a.getAttribute("type")};b.metadataURLs.push(c);this.readChildNodes(a,c)},DataURL:function(a,b){b.dataURL={};this.readChildNodes(a,b.dataURL)},FeatureListURL:function(a,b){b.featureListURL={};this.readChildNodes(a,b.featureListURL)},AuthorityURL:function(a,b){var c=a.getAttribute("name"),
d={};this.readChildNodes(a,d);b.authorityURLs[c]=d.href},Identifier:function(a,b){var c=a.getAttribute("authority");b.identifiers[c]=this.getChildValue(a)},KeywordList:function(a,b){this.readChildNodes(a,b)},SRS:function(a,b){b.srs[this.getChildValue(a)]=!0}}},CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1"});
OpenLayers.Format.WMSDescribeLayer.v1_1=OpenLayers.Class(OpenLayers.Format.WMSDescribeLayer,{initialize:function(a){OpenLayers.Format.WMSDescribeLayer.prototype.initialize.apply(this,[a])},read:function(a){"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));for(var a=a.documentElement.childNodes,b=[],c,d,e=0;e<a.length;++e)if(c=a[e],d=c.nodeName,"LayerDescription"==d){d=c.getAttribute("name");var f="",g="",h="";c.getAttribute("owsType")?(f=c.getAttribute("owsType"),g=c.getAttribute("owsURL")):
""!=c.getAttribute("wfs")?(f="WFS",g=c.getAttribute("wfs")):""!=c.getAttribute("wcs")&&(f="WCS",g=c.getAttribute("wcs"));c=c.getElementsByTagName("Query");0<c.length&&((h=c[0].getAttribute("typeName"))||(h=c[0].getAttribute("typename")));b.push({layerName:d,owsType:f,owsURL:g,typeName:h})}return b},CLASS_NAME:"OpenLayers.Format.WMSDescribeLayer.v1_1"});
OpenLayers.Handler.Box=OpenLayers.Class(OpenLayers.Handler,{dragHandler:null,boxDivClassName:"olHandlerBoxZoomBox",boxCharacteristics:null,initialize:function(a,b,c){OpenLayers.Handler.prototype.initialize.apply(this,arguments);b={down:this.startBox,move:this.moveBox,out:this.removeBox,up:this.endBox};this.dragHandler=new OpenLayers.Handler.Drag(this,b,{keyMask:this.keyMask})},destroy:function(){if(this.dragHandler)this.dragHandler.destroy(),this.dragHandler=null;OpenLayers.Handler.prototype.destroy.apply(this,
arguments)},setMap:function(a){OpenLayers.Handler.prototype.setMap.apply(this,arguments);this.dragHandler&&this.dragHandler.setMap(a)},startBox:function(){this.zoomBox=OpenLayers.Util.createDiv("zoomBox",this.dragHandler.start);this.zoomBox.className=this.boxDivClassName;this.zoomBox.style.zIndex=this.map.Z_INDEX_BASE.Popup-1;this.map.viewPortDiv.appendChild(this.zoomBox);OpenLayers.Element.addClass(this.map.viewPortDiv,"olDrawBox")},moveBox:function(a){var b=this.dragHandler.start.x,c=this.dragHandler.start.y,
d=Math.abs(b-a.x),e=Math.abs(c-a.y);this.zoomBox.style.width=Math.max(1,d)+"px";this.zoomBox.style.height=Math.max(1,e)+"px";this.zoomBox.style.left=a.x<b?a.x+"px":b+"px";this.zoomBox.style.top=a.y<c?a.y+"px":c+"px";var f=this.getBoxCharacteristics();if(f.newBoxModel){if(a.x>b)this.zoomBox.style.width=Math.max(1,d-f.xOffset)+"px";if(a.y>c)this.zoomBox.style.height=Math.max(1,e-f.yOffset)+"px"}},endBox:function(a){var b;if(5<Math.abs(this.dragHandler.start.x-a.x)||5<Math.abs(this.dragHandler.start.y-
a.y)){var c=this.dragHandler.start;b=Math.min(c.y,a.y);var d=Math.max(c.y,a.y),e=Math.min(c.x,a.x),a=Math.max(c.x,a.x);b=new OpenLayers.Bounds(e,d,a,b)}else b=this.dragHandler.start.clone();this.removeBox();this.callback("done",[b])},removeBox:function(){this.map.viewPortDiv.removeChild(this.zoomBox);this.boxCharacteristics=this.zoomBox=null;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDrawBox")},activate:function(){return OpenLayers.Handler.prototype.activate.apply(this,arguments)?(this.dragHandler.activate(),
!0):!1},deactivate:function(){return OpenLayers.Handler.prototype.deactivate.apply(this,arguments)?(this.dragHandler.deactivate(),!0):!1},getBoxCharacteristics:function(){if(!this.boxCharacteristics){var a=parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-left-width"))+parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-right-width"))+1,b=parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-top-width"))+parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-bottom-width"))+1,
c="msie"==OpenLayers.Util.getBrowserName()?"BackCompat"!=document.compatMode:!0;this.boxCharacteristics={xOffset:a,yOffset:b,newBoxModel:c}}return this.boxCharacteristics},CLASS_NAME:"OpenLayers.Handler.Box"});
OpenLayers.Handler.RegularPolygon=OpenLayers.Class(OpenLayers.Handler.Drag,{sides:4,radius:null,snapAngle:null,snapToggle:"shiftKey",layerOptions:null,persist:!1,irregular:!1,angle:null,fixedRadius:!1,feature:null,layer:null,origin:null,initialize:function(a,b,c){if(!c||!c.layerOptions||!c.layerOptions.styleMap)this.style=OpenLayers.Util.extend(OpenLayers.Feature.Vector.style["default"],{});OpenLayers.Handler.prototype.initialize.apply(this,[a,b,c]);this.options=c?c:{}},setOptions:function(a){OpenLayers.Util.extend(this.options,
a);OpenLayers.Util.extend(this,a)},activate:function(){var a=!1;if(OpenLayers.Handler.prototype.activate.apply(this,arguments))a=OpenLayers.Util.extend({displayInLayerSwitcher:!1,calculateInRange:OpenLayers.Function.True},this.layerOptions),this.layer=new OpenLayers.Layer.Vector(this.CLASS_NAME,a),this.map.addLayer(this.layer),a=!0;return a},deactivate:function(){var a=!1;if(OpenLayers.Handler.Drag.prototype.deactivate.apply(this,arguments))this.dragging&&this.cancel(),null!=this.layer.map&&(this.layer.destroy(!1),
this.feature&&this.feature.destroy()),this.feature=this.layer=null,a=!0;return a},down:function(a){this.fixedRadius=!!this.radius;a=this.map.getLonLatFromPixel(a.xy);this.origin=new OpenLayers.Geometry.Point(a.lon,a.lat);if(!this.fixedRadius||this.irregular)this.radius=this.map.getResolution();this.persist&&this.clear();this.feature=new OpenLayers.Feature.Vector;this.createGeometry();this.callback("create",[this.origin,this.feature]);this.layer.addFeatures([this.feature],{silent:!0});this.layer.drawFeature(this.feature,
this.style)},move:function(a){var b=this.map.getLonLatFromPixel(a.xy),b=new OpenLayers.Geometry.Point(b.lon,b.lat);this.irregular?(a=Math.sqrt(2)*Math.abs(b.y-this.origin.y)/2,this.radius=Math.max(this.map.getResolution()/2,a)):this.fixedRadius?this.origin=b:(this.calculateAngle(b,a),this.radius=Math.max(this.map.getResolution()/2,b.distanceTo(this.origin)));this.modifyGeometry();this.irregular&&(a=b.x-this.origin.x,b=b.y-this.origin.y,this.feature.geometry.resize(1,this.origin,0==b?a/(this.radius*
Math.sqrt(2)):a/b),this.feature.geometry.move(a/2,b/2));this.layer.drawFeature(this.feature,this.style)},up:function(a){this.finalize();this.start==this.last&&this.callback("done",[a.xy])},out:function(){this.finalize()},createGeometry:function(){this.angle=Math.PI*(1/this.sides-0.5);this.snapAngle&&(this.angle+=this.snapAngle*(Math.PI/180));this.feature.geometry=OpenLayers.Geometry.Polygon.createRegularPolygon(this.origin,this.radius,this.sides,this.snapAngle)},modifyGeometry:function(){var a,b,
c=this.feature.geometry.components[0];c.components.length!=this.sides+1&&(this.createGeometry(),c=this.feature.geometry.components[0]);for(var d=0;d<this.sides;++d)b=c.components[d],a=this.angle+2*d*Math.PI/this.sides,b.x=this.origin.x+this.radius*Math.cos(a),b.y=this.origin.y+this.radius*Math.sin(a),b.clearBounds()},calculateAngle:function(a,b){var c=Math.atan2(a.y-this.origin.y,a.x-this.origin.x);if(this.snapAngle&&this.snapToggle&&!b[this.snapToggle]){var d=Math.PI/180*this.snapAngle;this.angle=
Math.round(c/d)*d}else this.angle=c},cancel:function(){this.callback("cancel",null);this.finalize()},finalize:function(){this.origin=null;this.radius=this.options.radius},clear:function(){this.layer&&(this.layer.renderer.clear(),this.layer.destroyFeatures())},callback:function(a){this.callbacks[a]&&this.callbacks[a].apply(this.control,[this.feature.geometry.clone()]);!this.persist&&("done"==a||"cancel"==a)&&this.clear()},CLASS_NAME:"OpenLayers.Handler.RegularPolygon"});
OpenLayers.Layer.EventPane=OpenLayers.Class(OpenLayers.Layer,{smoothDragPan:!0,isBaseLayer:!0,isFixed:!0,pane:null,mapObject:null,initialize:function(a,b){OpenLayers.Layer.prototype.initialize.apply(this,arguments);if(null==this.pane)this.pane=OpenLayers.Util.createDiv(this.div.id+"_EventPane")},destroy:function(){this.pane=this.mapObject=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments)},setMap:function(a){OpenLayers.Layer.prototype.setMap.apply(this,arguments);this.pane.style.zIndex=
parseInt(this.div.style.zIndex)+1;this.pane.style.display=this.div.style.display;this.pane.style.width="100%";this.pane.style.height="100%";if("msie"==OpenLayers.Util.getBrowserName())this.pane.style.background="url("+OpenLayers.Util.getImagesLocation()+"blank.gif)";this.isFixed?this.map.viewPortDiv.appendChild(this.pane):this.map.layerContainerDiv.appendChild(this.pane);this.loadMapObject();null==this.mapObject&&this.loadWarningMessage()},removeMap:function(a){this.pane&&this.pane.parentNode&&this.pane.parentNode.removeChild(this.pane);
OpenLayers.Layer.prototype.removeMap.apply(this,arguments)},loadWarningMessage:function(){this.div.style.backgroundColor="darkblue";var a=this.map.getSize(),b=Math.min(a.w,300),c=Math.min(a.h,200),b=new OpenLayers.Size(b,c),a=(new OpenLayers.Pixel(a.w/2,a.h/2)).add(-b.w/2,-b.h/2),a=OpenLayers.Util.createDiv(this.name+"_warning",a,b,null,null,null,"auto");a.style.padding="7px";a.style.backgroundColor="yellow";a.innerHTML=this.getWarningHTML();this.div.appendChild(a)},getWarningHTML:function(){return""},
display:function(a){OpenLayers.Layer.prototype.display.apply(this,arguments);this.pane.style.display=this.div.style.display},setZIndex:function(a){OpenLayers.Layer.prototype.setZIndex.apply(this,arguments);this.pane.style.zIndex=parseInt(this.div.style.zIndex)+1},moveTo:function(a,b,c){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);if(null!=this.mapObject){var d=this.map.getCenter(),e=this.map.getZoom();if(null!=d){var f=this.getOLLonLatFromMapObjectLonLat(this.getMapObjectCenter()),g=this.getOLZoomFromMapObjectZoom(this.getMapObjectZoom());
if(!d.equals(f)||e!=g)c&&this.dragPanMapObject&&this.smoothDragPan?(e=this.map.getViewPortPxFromLonLat(f),d=this.map.getViewPortPxFromLonLat(d),this.dragPanMapObject(d.x-e.x,e.y-d.y)):(d=this.getMapObjectLonLatFromOLLonLat(d),e=this.getMapObjectZoomFromOLZoom(e),this.setMapObjectCenter(d,e,c))}}},getLonLatFromViewPortPx:function(a){var b=null;null!=this.mapObject&&null!=this.getMapObjectCenter()&&(b=this.getOLLonLatFromMapObjectLonLat(this.getMapObjectLonLatFromMapObjectPixel(this.getMapObjectPixelFromOLPixel(a))));
return b},getViewPortPxFromLonLat:function(a){var b=null;null!=this.mapObject&&null!=this.getMapObjectCenter()&&(b=this.getOLPixelFromMapObjectPixel(this.getMapObjectPixelFromMapObjectLonLat(this.getMapObjectLonLatFromOLLonLat(a))));return b},getOLLonLatFromMapObjectLonLat:function(a){var b=null;null!=a&&(b=this.getLongitudeFromMapObjectLonLat(a),a=this.getLatitudeFromMapObjectLonLat(a),b=new OpenLayers.LonLat(b,a));return b},getMapObjectLonLatFromOLLonLat:function(a){var b=null;null!=a&&(b=this.getMapObjectLonLatFromLonLat(a.lon,
a.lat));return b},getOLPixelFromMapObjectPixel:function(a){var b=null;null!=a&&(b=this.getXFromMapObjectPixel(a),a=this.getYFromMapObjectPixel(a),b=new OpenLayers.Pixel(b,a));return b},getMapObjectPixelFromOLPixel:function(a){var b=null;null!=a&&(b=this.getMapObjectPixelFromXY(a.x,a.y));return b},CLASS_NAME:"OpenLayers.Layer.EventPane"});
OpenLayers.Layer.FixedZoomLevels=OpenLayers.Class({initialize:function(){},initResolutions:function(){for(var a=["minZoomLevel","maxZoomLevel","numZoomLevels"],b=0,c=a.length;b<c;b++){var d=a[b];this[d]=null!=this.options[d]?this.options[d]:this.map[d]}if(null==this.minZoomLevel||this.minZoomLevel<this.MIN_ZOOM_LEVEL)this.minZoomLevel=this.MIN_ZOOM_LEVEL;a=this.MAX_ZOOM_LEVEL-this.minZoomLevel+1;b=null==this.options.numZoomLevels&&null!=this.options.maxZoomLevel||null==this.numZoomLevels&&null!=this.maxZoomLevel?
this.maxZoomLevel-this.minZoomLevel+1:this.numZoomLevels;this.numZoomLevels=null!=b?Math.min(b,a):a;this.maxZoomLevel=this.minZoomLevel+this.numZoomLevels-1;if(null!=this.RESOLUTIONS){a=0;this.resolutions=[];for(b=this.minZoomLevel;b<=this.maxZoomLevel;b++)this.resolutions[a++]=this.RESOLUTIONS[b];this.maxResolution=this.resolutions[0];this.minResolution=this.resolutions[this.resolutions.length-1]}},getResolution:function(){if(null!=this.resolutions)return OpenLayers.Layer.prototype.getResolution.apply(this,
arguments);var a=null,b=this.map.getSize(),c=this.getExtent();null!=b&&null!=c&&(a=Math.max(c.getWidth()/b.w,c.getHeight()/b.h));return a},getExtent:function(){var a=null,b=this.map.getSize(),c=this.getLonLatFromViewPortPx(new OpenLayers.Pixel(0,0)),b=this.getLonLatFromViewPortPx(new OpenLayers.Pixel(b.w,b.h));null!=c&&null!=b&&(a=new OpenLayers.Bounds(c.lon,b.lat,b.lon,c.lat));return a},getZoomForResolution:function(a){return null!=this.resolutions?OpenLayers.Layer.prototype.getZoomForResolution.apply(this,
arguments):this.getZoomForExtent(OpenLayers.Layer.prototype.getExtent.apply(this,[]))},getOLZoomFromMapObjectZoom:function(a){var b=null;null!=a&&(b=a-this.minZoomLevel);return b},getMapObjectZoomFromOLZoom:function(a){var b=null;null!=a&&(b=a+this.minZoomLevel);return b},CLASS_NAME:"OpenLayers.Layer.FixedZoomLevels"});
OpenLayers.Layer.HTTPRequest=OpenLayers.Class(OpenLayers.Layer,{URL_HASH_FACTOR:(Math.sqrt(5)-1)/2,url:null,params:null,reproject:!1,initialize:function(a,b,c,d){var e=arguments,e=[a,d];OpenLayers.Layer.prototype.initialize.apply(this,e);this.url=b;this.params=OpenLayers.Util.extend({},c)},destroy:function(){this.params=this.url=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments)},clone:function(a){null==a&&(a=new OpenLayers.Layer.HTTPRequest(this.name,this.url,this.params,this.getOptions()));
return a=OpenLayers.Layer.prototype.clone.apply(this,[a])},setUrl:function(a){this.url=a},mergeNewParams:function(a){this.params=OpenLayers.Util.extend(this.params,a);a=this.redraw();null!=this.map&&this.map.events.triggerEvent("changelayer",{layer:this,property:"params"});return a},redraw:function(a){return a?this.mergeNewParams({_olSalt:Math.random()}):OpenLayers.Layer.prototype.redraw.apply(this,[])},selectUrl:function(a,b){for(var c=1,d=0,e=a.length;d<e;d++)c*=a.charCodeAt(d)*this.URL_HASH_FACTOR,
c-=Math.floor(c);return b[Math.floor(c*b.length)]},getFullRequestString:function(a,b){var c=b||this.url,d=OpenLayers.Util.extend({},this.params),d=OpenLayers.Util.extend(d,a),e=OpenLayers.Util.getParameterString(d);c instanceof Array&&(c=this.selectUrl(e,c));var e=OpenLayers.Util.upperCaseObject(OpenLayers.Util.getParameters(c)),f;for(f in d)f.toUpperCase()in e&&delete d[f];e=OpenLayers.Util.getParameterString(d);return OpenLayers.Util.urlAppend(c,e)},CLASS_NAME:"OpenLayers.Layer.HTTPRequest"});
OpenLayers.Layer.Image=OpenLayers.Class(OpenLayers.Layer,{isBaseLayer:!0,url:null,extent:null,size:null,tile:null,aspectRatio:null,initialize:function(a,b,c,d,e){this.url=b;this.maxExtent=this.extent=c;this.size=d;OpenLayers.Layer.prototype.initialize.apply(this,[a,e]);this.aspectRatio=this.extent.getHeight()/this.size.h/(this.extent.getWidth()/this.size.w)},destroy:function(){if(this.tile)this.removeTileMonitoringHooks(this.tile),this.tile.destroy(),this.tile=null;OpenLayers.Layer.prototype.destroy.apply(this,
arguments)},clone:function(a){null==a&&(a=new OpenLayers.Layer.Image(this.name,this.url,this.extent,this.size,this.getOptions()));return a=OpenLayers.Layer.prototype.clone.apply(this,[a])},setMap:function(a){if(null==this.options.maxResolution)this.options.maxResolution=this.aspectRatio*this.extent.getWidth()/this.size.w;OpenLayers.Layer.prototype.setMap.apply(this,arguments)},moveTo:function(a,b,c){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);var d=null==this.tile;if(b||d){this.setTileSize();
var e=this.map.getLayerPxFromLonLat(new OpenLayers.LonLat(this.extent.left,this.extent.top));d?(this.tile=new OpenLayers.Tile.Image(this,e,this.extent,null,this.tileSize),this.addTileMonitoringHooks(this.tile)):(this.tile.size=this.tileSize.clone(),this.tile.position=e.clone());this.tile.draw()}},setTileSize:function(){var a=this.extent.getWidth()/this.map.getResolution(),b=this.extent.getHeight()/this.map.getResolution();this.tileSize=new OpenLayers.Size(a,b)},addTileMonitoringHooks:function(a){a.onLoadStart=
function(){this.events.triggerEvent("loadstart")};a.events.register("loadstart",this,a.onLoadStart);a.onLoadEnd=function(){this.events.triggerEvent("loadend")};a.events.register("loadend",this,a.onLoadEnd);a.events.register("unload",this,a.onLoadEnd)},removeTileMonitoringHooks:function(a){a.unload();a.events.un({loadstart:a.onLoadStart,loadend:a.onLoadEnd,unload:a.onLoadEnd,scope:this})},setUrl:function(a){this.url=a;this.tile.draw()},getURL:function(){return this.url},CLASS_NAME:"OpenLayers.Layer.Image"});
OpenLayers.Layer.Markers=OpenLayers.Class(OpenLayers.Layer,{isBaseLayer:!1,markers:null,drawn:!1,initialize:function(a,b){OpenLayers.Layer.prototype.initialize.apply(this,arguments);this.markers=[]},destroy:function(){this.clearMarkers();this.markers=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments)},setOpacity:function(a){if(a!=this.opacity){this.opacity=a;for(var a=0,b=this.markers.length;a<b;a++)this.markers[a].setOpacity(this.opacity)}},moveTo:function(a,b,c){OpenLayers.Layer.prototype.moveTo.apply(this,
arguments);if(b||!this.drawn){for(var d=0,e=this.markers.length;d<e;d++)this.drawMarker(this.markers[d]);this.drawn=!0}},addMarker:function(a){this.markers.push(a);null!=this.opacity&&a.setOpacity(this.opacity);if(this.map&&this.map.getExtent())a.map=this.map,this.drawMarker(a)},removeMarker:function(a){this.markers&&this.markers.length&&(OpenLayers.Util.removeItem(this.markers,a),a.erase())},clearMarkers:function(){if(null!=this.markers)for(;0<this.markers.length;)this.removeMarker(this.markers[0])},
drawMarker:function(a){var b=this.map.getLayerPxFromLonLat(a.lonlat);null==b?a.display(!1):a.isDrawn()?a.icon&&a.icon.moveTo(b):this.div.appendChild(a.draw(b))},getDataExtent:function(){var a=null;if(this.markers&&0<this.markers.length)for(var a=new OpenLayers.Bounds,b=0,c=this.markers.length;b<c;b++)a.extend(this.markers[b].lonlat);return a},CLASS_NAME:"OpenLayers.Layer.Markers"});
OpenLayers.Layer.SphericalMercator={getExtent:function(){var a=null;return a=this.sphericalMercator?this.map.calculateBounds():OpenLayers.Layer.FixedZoomLevels.prototype.getExtent.apply(this)},getLonLatFromViewPortPx:function(a){return OpenLayers.Layer.prototype.getLonLatFromViewPortPx.apply(this,arguments)},getViewPortPxFromLonLat:function(a){return OpenLayers.Layer.prototype.getViewPortPxFromLonLat.apply(this,arguments)},initMercatorParameters:function(){this.RESOLUTIONS=[];for(var a=0;a<=this.MAX_ZOOM_LEVEL;++a)this.RESOLUTIONS[a]=
156543.0339/Math.pow(2,a);this.units="m";this.projection=this.projection||"EPSG:900913"},forwardMercator:function(a,b){var c=2.003750834E7*a/180,d=Math.log(Math.tan((90+b)*Math.PI/360))/(Math.PI/180);return new OpenLayers.LonLat(c,2.003750834E7*d/180)},inverseMercator:function(a,b){var c=180*(a/2.003750834E7),d;d=180/Math.PI*(2*Math.atan(Math.exp(180*(b/2.003750834E7)*Math.PI/180))-Math.PI/2);return new OpenLayers.LonLat(c,d)},projectForward:function(a){var b=OpenLayers.Layer.SphericalMercator.forwardMercator(a.x,
a.y);a.x=b.lon;a.y=b.lat;return a},projectInverse:function(a){var b=OpenLayers.Layer.SphericalMercator.inverseMercator(a.x,a.y);a.x=b.lon;a.y=b.lat;return a}};OpenLayers.Projection.addTransform("EPSG:4326","EPSG:900913",OpenLayers.Layer.SphericalMercator.projectForward);OpenLayers.Projection.addTransform("EPSG:900913","EPSG:4326",OpenLayers.Layer.SphericalMercator.projectInverse);
OpenLayers.Tile.WFS=OpenLayers.Class(OpenLayers.Tile,{features:null,url:null,request:null,initialize:function(a,b,c,d,e){OpenLayers.Tile.prototype.initialize.apply(this,arguments);this.url=d;this.features=[]},destroy:function(){OpenLayers.Tile.prototype.destroy.apply(this,arguments);this.destroyAllFeatures();this.url=this.features=null;if(this.request)this.request.abort(),this.request=null},clear:function(){this.destroyAllFeatures()},draw:function(){if(OpenLayers.Tile.prototype.draw.apply(this,arguments))this.isLoading?
this.events.triggerEvent("reload"):(this.isLoading=!0,this.events.triggerEvent("loadstart")),this.loadFeaturesForRegion(this.requestSuccess)},loadFeaturesForRegion:function(a,b){this.request&&this.request.abort();this.request=OpenLayers.Request.GET({url:this.url,success:a,failure:b,scope:this})},requestSuccess:function(a){if(this.features){var b=a.responseXML;if(!b||!b.documentElement)b=a.responseText;this.layer.vectorMode?this.layer.addFeatures(this.layer.formatObject.read(b)):(a=new OpenLayers.Format.XML,
"string"==typeof b&&(b=a.read(b)),this.addResults(a.getElementsByTagNameNS(b,"http://www.opengis.net/gml","featureMember")))}this.events&&this.events.triggerEvent("loadend");this.request=null},addResults:function(a){for(var b=0;b<a.length;b++)this.features.push(new this.layer.featureClass(this.layer,a[b]))},destroyAllFeatures:function(){for(;0<this.features.length;)this.features.shift().destroy()},CLASS_NAME:"OpenLayers.Tile.WFS"});
OpenLayers.Control.DrawFeature=OpenLayers.Class(OpenLayers.Control,{layer:null,callbacks:null,EVENT_TYPES:["featureadded"],multi:!1,featureAdded:function(){},handlerOptions:null,initialize:function(a,b,c){this.EVENT_TYPES=OpenLayers.Control.DrawFeature.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);OpenLayers.Control.prototype.initialize.apply(this,[c]);this.callbacks=OpenLayers.Util.extend({done:this.drawFeature,modify:function(a,b){this.layer.events.triggerEvent("sketchmodified",
{vertex:a,feature:b})},create:function(a,b){this.layer.events.triggerEvent("sketchstarted",{vertex:a,feature:b})}},this.callbacks);this.layer=a;this.handlerOptions=this.handlerOptions||{};if(!("multi"in this.handlerOptions))this.handlerOptions.multi=this.multi;if(a=this.layer.styleMap&&this.layer.styleMap.styles.temporary)this.handlerOptions.layerOptions=OpenLayers.Util.applyDefaults(this.handlerOptions.layerOptions,{styleMap:new OpenLayers.StyleMap({"default":a})});this.handler=new b(this,this.callbacks,
this.handlerOptions)},drawFeature:function(a){a=new OpenLayers.Feature.Vector(a);if(!1!==this.layer.events.triggerEvent("sketchcomplete",{feature:a}))a.state=OpenLayers.State.INSERT,this.layer.addFeatures([a]),this.featureAdded(a),this.events.triggerEvent("featureadded",{feature:a})},CLASS_NAME:"OpenLayers.Control.DrawFeature"});
OpenLayers.Control.Measure=OpenLayers.Class(OpenLayers.Control,{EVENT_TYPES:["measure","measurepartial"],handlerOptions:null,callbacks:null,displaySystem:"metric",geodesic:!1,displaySystemUnits:{geographic:["dd"],english:["mi","ft","in"],metric:["km","m"]},partialDelay:300,delayedTrigger:null,persist:!1,initialize:function(a,b){this.EVENT_TYPES=OpenLayers.Control.Measure.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);OpenLayers.Control.prototype.initialize.apply(this,[b]);
this.callbacks=OpenLayers.Util.extend({done:this.measureComplete,point:this.measurePartial},this.callbacks);this.handlerOptions=OpenLayers.Util.extend({persist:this.persist},this.handlerOptions);this.handler=new a(this,this.callbacks,this.handlerOptions)},cancel:function(){this.handler.cancel()},updateHandler:function(a,b){var c=this.active;c&&this.deactivate();this.handler=new a(this,this.callbacks,b);c&&this.activate()},measureComplete:function(a){this.delayedTrigger&&window.clearTimeout(this.delayedTrigger);
this.measure(a,"measure")},measurePartial:function(a,b){if(0<b.getLength())b=b.clone(),this.delayedTrigger=window.setTimeout(OpenLayers.Function.bind(function(){this.measure(b,"measurepartial")},this),this.partialDelay)},measure:function(a,b){var c,d;-1<a.CLASS_NAME.indexOf("LineString")?(c=this.getBestLength(a),d=1):(c=this.getBestArea(a),d=2);this.events.triggerEvent(b,{measure:c[0],units:c[1],order:d,geometry:a})},getBestArea:function(a){for(var b=this.displaySystemUnits[this.displaySystem],c,
d,e=0,f=b.length;e<f&&!(c=b[e],d=this.getArea(a,c),1<d);++e);return[d,c]},getArea:function(a,b){var c,d;this.geodesic?(c=a.getGeodesicArea(this.map.getProjectionObject()),d="m"):(c=a.getArea(),d=this.map.getUnits());var e=OpenLayers.INCHES_PER_UNIT[b];e&&(c*=Math.pow(OpenLayers.INCHES_PER_UNIT[d]/e,2));return c},getBestLength:function(a){for(var b=this.displaySystemUnits[this.displaySystem],c,d,e=0,f=b.length;e<f&&!(c=b[e],d=this.getLength(a,c),1<d);++e);return[d,c]},getLength:function(a,b){var c,
d;this.geodesic?(c=a.getGeodesicLength(this.map.getProjectionObject()),d="m"):(c=a.getLength(),d=this.map.getUnits());var e=OpenLayers.INCHES_PER_UNIT[b];e&&(c*=OpenLayers.INCHES_PER_UNIT[d]/e);return c},CLASS_NAME:"OpenLayers.Control.Measure"});
OpenLayers.Control.ZoomBox=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOOL,out:!1,alwaysZoom:!1,draw:function(){this.handler=new OpenLayers.Handler.Box(this,{done:this.zoomBox},{keyMask:this.keyMask})},zoomBox:function(a){if(a instanceof OpenLayers.Bounds){var b;if(this.out){b=Math.abs(a.right-a.left);var c=Math.abs(a.top-a.bottom);b=Math.min(this.map.size.h/c,this.map.size.w/b);var c=this.map.getExtent(),d=this.map.getLonLatFromPixel(a.getCenterPixel()),a=d.lon-c.getWidth()/
2*b,e=d.lon+c.getWidth()/2*b,f=d.lat-c.getHeight()/2*b;b=d.lat+c.getHeight()/2*b;b=new OpenLayers.Bounds(a,f,e,b)}else b=this.map.getLonLatFromPixel(new OpenLayers.Pixel(a.left,a.bottom)),c=this.map.getLonLatFromPixel(new OpenLayers.Pixel(a.right,a.top)),b=new OpenLayers.Bounds(b.lon,b.lat,c.lon,c.lat);c=this.map.getZoom();this.map.zoomToExtent(b);c==this.map.getZoom()&&!0==this.alwaysZoom&&this.map.zoomTo(c+(this.out?-1:1))}else this.out?this.map.setCenter(this.map.getLonLatFromPixel(a),this.map.getZoom()-
1):this.map.setCenter(this.map.getLonLatFromPixel(a),this.map.getZoom()+1)},CLASS_NAME:"OpenLayers.Control.ZoomBox"});
OpenLayers.Format.WFSCapabilities.v1_0_0=OpenLayers.Class(OpenLayers.Format.WFSCapabilities.v1,{initialize:function(a){OpenLayers.Format.WFSCapabilities.v1.prototype.initialize.apply(this,[a])},read_cap_Service:function(a,b){var c={};this.runChildNodes(c,b);a.service=c},read_cap_Fees:function(a,b){var c=this.getChildValue(b);if(c&&"none"!=c.toLowerCase())a.fees=c},read_cap_AccessConstraints:function(a,b){var c=this.getChildValue(b);if(c&&"none"!=c.toLowerCase())a.accessConstraints=c},read_cap_OnlineResource:function(a,
b){var c=this.getChildValue(b);if(c&&"none"!=c.toLowerCase())a.onlineResource=c},read_cap_Keywords:function(a,b){var c=this.getChildValue(b);if(c&&"none"!=c.toLowerCase())a.keywords=c.split(", ")},read_cap_Capability:function(a,b){var c={};this.runChildNodes(c,b);a.capability=c},read_cap_Request:function(a,b){var c={};this.runChildNodes(c,b);a.request=c},read_cap_GetFeature:function(a,b){var c={href:{},formats:[]};this.runChildNodes(c,b);a.getfeature=c},read_cap_ResultFormat:function(a,b){for(var c=
b.childNodes,d,e=0;e<c.length;e++)d=c[e],1==d.nodeType&&a.formats.push(d.nodeName)},read_cap_DCPType:function(a,b){this.runChildNodes(a,b)},read_cap_HTTP:function(a,b){this.runChildNodes(a.href,b)},read_cap_Get:function(a,b){a.get=b.getAttribute("onlineResource")},read_cap_Post:function(a,b){a.post=b.getAttribute("onlineResource")},CLASS_NAME:"OpenLayers.Format.WFSCapabilities.v1_0_0"});
OpenLayers.Format.WFSCapabilities.v1_1_0=OpenLayers.Class(OpenLayers.Format.WFSCapabilities.v1,{initialize:function(a){OpenLayers.Format.WFSCapabilities.v1.prototype.initialize.apply(this,[a])},CLASS_NAME:"OpenLayers.Format.WFSCapabilities.v1_1_0"});
OpenLayers.Format.WKT=OpenLayers.Class(OpenLayers.Format,{initialize:function(a){this.regExes={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/};OpenLayers.Format.prototype.initialize.apply(this,[a])},read:function(a){var b,c;if(c=this.regExes.typeStr.exec(a))if(a=c[1].toLowerCase(),c=c[2],this.parse[a]&&(b=this.parse[a].apply(this,[c])),this.internalProjection&&this.externalProjection)if(b&&"OpenLayers.Feature.Vector"==
b.CLASS_NAME)b.geometry.transform(this.externalProjection,this.internalProjection);else if(b&&"geometrycollection"!=a&&"object"==typeof b){a=0;for(c=b.length;a<c;a++)b[a].geometry.transform(this.externalProjection,this.internalProjection)}return b},write:function(a){var b,c,d;a.constructor==Array?d=!0:(a=[a],d=!1);var e=[];d&&e.push("GEOMETRYCOLLECTION(");for(var f=0,g=a.length;f<g;++f){d&&0<f&&e.push(",");b=a[f].geometry;c=b.CLASS_NAME.split(".")[2].toLowerCase();if(!this.extract[c])return null;
this.internalProjection&&this.externalProjection&&(b=b.clone(),b.transform(this.internalProjection,this.externalProjection));b=this.extract[c].apply(this,[b]);e.push(c.toUpperCase()+"("+b+")")}d&&e.push(")");return e.join("")},extract:{point:function(a){return a.x+" "+a.y},multipoint:function(a){for(var b=[],c=0,d=a.components.length;c<d;++c)b.push("("+this.extract.point.apply(this,[a.components[c]])+")");return b.join(",")},linestring:function(a){for(var b=[],c=0,d=a.components.length;c<d;++c)b.push(this.extract.point.apply(this,
[a.components[c]]));return b.join(",")},multilinestring:function(a){for(var b=[],c=0,d=a.components.length;c<d;++c)b.push("("+this.extract.linestring.apply(this,[a.components[c]])+")");return b.join(",")},polygon:function(a){for(var b=[],c=0,d=a.components.length;c<d;++c)b.push("("+this.extract.linestring.apply(this,[a.components[c]])+")");return b.join(",")},multipolygon:function(a){for(var b=[],c=0,d=a.components.length;c<d;++c)b.push("("+this.extract.polygon.apply(this,[a.components[c]])+")");
return b.join(",")}},parse:{point:function(a){a=OpenLayers.String.trim(a).split(this.regExes.spaces);return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(a[0],a[1]))},multipoint:function(a){for(var b=OpenLayers.String.trim(a).split(this.regExes.parenComma),c=[],d=0,e=b.length;d<e;++d)a=b[d].replace(this.regExes.trimParens,"$1"),c.push(this.parse.point.apply(this,[a]).geometry);return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiPoint(c))},linestring:function(a){for(var a=
OpenLayers.String.trim(a).split(","),b=[],c=0,d=a.length;c<d;++c)b.push(this.parse.point.apply(this,[a[c]]).geometry);return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString(b))},multilinestring:function(a){for(var b=OpenLayers.String.trim(a).split(this.regExes.parenComma),c=[],d=0,e=b.length;d<e;++d)a=b[d].replace(this.regExes.trimParens,"$1"),c.push(this.parse.linestring.apply(this,[a]).geometry);return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiLineString(c))},polygon:function(a){for(var b,
a=OpenLayers.String.trim(a).split(this.regExes.parenComma),c=[],d=0,e=a.length;d<e;++d)b=a[d].replace(this.regExes.trimParens,"$1"),b=this.parse.linestring.apply(this,[b]).geometry,b=new OpenLayers.Geometry.LinearRing(b.components),c.push(b);return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon(c))},multipolygon:function(a){for(var b=OpenLayers.String.trim(a).split(this.regExes.doubleParenComma),c=[],d=0,e=b.length;d<e;++d)a=b[d].replace(this.regExes.trimParens,"$1"),c.push(this.parse.polygon.apply(this,
[a]).geometry);return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiPolygon(c))},geometrycollection:function(a){for(var a=a.replace(/,\s*([A-Za-z])/g,"|$1"),a=OpenLayers.String.trim(a).split("|"),b=[],c=0,d=a.length;c<d;++c)b.push(OpenLayers.Format.WKT.prototype.read.apply(this,[a[c]]));return b}},CLASS_NAME:"OpenLayers.Format.WKT"});
OpenLayers.Format.WMC.v1=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{ol:"http://openlayers.org/context",wmc:"http://www.opengis.net/context",sld:"http://www.opengis.net/sld",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},schemaLocation:"",getNamespacePrefix:function(a){var b=null;if(null==a)b=this.namespaces[this.defaultPrefix];else for(b in this.namespaces)if(this.namespaces[b]==a)break;return b},defaultPrefix:"wmc",rootPrefix:null,defaultStyleName:"",
defaultStyleTitle:"Default",initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},read:function(a){"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));a=a.documentElement;this.rootPrefix=a.prefix;var b={version:a.getAttribute("version")};this.runChildNodes(b,a);return b},runChildNodes:function(a,b){for(var c=b.childNodes,d,e,f,g=0,h=c.length;g<h;++g)d=c[g],1==d.nodeType&&(e=this.getNamespacePrefix(d.namespaceURI),f=d.nodeName.split(":").pop(),
(e=this["read_"+e+"_"+f])&&e.apply(this,[a,d]))},read_wmc_General:function(a,b){this.runChildNodes(a,b)},read_wmc_BoundingBox:function(a,b){a.projection=b.getAttribute("SRS");a.bounds=new OpenLayers.Bounds(parseFloat(b.getAttribute("minx")),parseFloat(b.getAttribute("miny")),parseFloat(b.getAttribute("maxx")),parseFloat(b.getAttribute("maxy")))},read_wmc_LayerList:function(a,b){a.layersContext=[];this.runChildNodes(a,b)},read_wmc_Layer:function(a,b){var c={visibility:"1"!=b.getAttribute("hidden"),
queryable:"1"==b.getAttribute("queryable"),formats:[],styles:[]};this.runChildNodes(c,b);a.layersContext.push(c)},read_wmc_Extension:function(a,b){this.runChildNodes(a,b)},read_ol_units:function(a,b){a.units=this.getChildValue(b)},read_ol_maxExtent:function(a,b){var c=new OpenLayers.Bounds(b.getAttribute("minx"),b.getAttribute("miny"),b.getAttribute("maxx"),b.getAttribute("maxy"));a.maxExtent=c},read_ol_transparent:function(a,b){a.transparent=this.getChildValue(b)},read_ol_numZoomLevels:function(a,
b){a.numZoomLevels=parseInt(this.getChildValue(b))},read_ol_opacity:function(a,b){a.opacity=parseFloat(this.getChildValue(b))},read_ol_singleTile:function(a,b){a.singleTile="true"==this.getChildValue(b)},read_ol_tileSize:function(a,b){var c={width:b.getAttribute("width"),height:b.getAttribute("height")};a.tileSize=c},read_ol_isBaseLayer:function(a,b){a.isBaseLayer="true"==this.getChildValue(b)},read_ol_displayInLayerSwitcher:function(a,b){a.displayInLayerSwitcher="true"==this.getChildValue(b)},read_wmc_Server:function(a,
b){a.version=b.getAttribute("version");var c={},d=b.getElementsByTagName("OnlineResource");0<d.length&&this.read_wmc_OnlineResource(c,d[0]);a.url=c.href},read_wmc_FormatList:function(a,b){this.runChildNodes(a,b)},read_wmc_Format:function(a,b){var c={value:this.getChildValue(b)};if("1"==b.getAttribute("current"))c.current=!0;a.formats.push(c)},read_wmc_StyleList:function(a,b){this.runChildNodes(a,b)},read_wmc_Style:function(a,b){var c={};this.runChildNodes(c,b);if("1"==b.getAttribute("current"))c.current=
!0;a.styles.push(c)},read_wmc_SLD:function(a,b){this.runChildNodes(a,b)},read_sld_StyledLayerDescriptor:function(a,b){var c=OpenLayers.Format.XML.prototype.write.apply(this,[b]);a.body=c},read_wmc_OnlineResource:function(a,b){a.href=this.getAttributeNS(b,this.namespaces.xlink,"href")},read_wmc_Name:function(a,b){var c=this.getChildValue(b);if(c)a.name=c},read_wmc_Title:function(a,b){var c=this.getChildValue(b);if(c)a.title=c},read_wmc_MetadataURL:function(a,b){var c={},d=b.getElementsByTagName("OnlineResource");
0<d.length&&this.read_wmc_OnlineResource(c,d[0]);a.metadataURL=c.href},read_wmc_Abstract:function(a,b){var c=this.getChildValue(b);c&&(a["abstract"]=c)},read_wmc_LegendURL:function(a,b){var c={width:b.getAttribute("width"),height:b.getAttribute("height")},d=b.getElementsByTagName("OnlineResource");0<d.length&&this.read_wmc_OnlineResource(c,d[0]);a.legend=c},write:function(a,b){var c=this.createElementDefaultNS("ViewContext");this.setAttributes(c,{version:this.VERSION,id:b&&"string"==typeof b.id?b.id:
OpenLayers.Util.createUniqueID("OpenLayers_Context_")});this.setAttributeNS(c,this.namespaces.xsi,"xsi:schemaLocation",this.schemaLocation);c.appendChild(this.write_wmc_General(a));c.appendChild(this.write_wmc_LayerList(a));return OpenLayers.Format.XML.prototype.write.apply(this,[c])},createElementDefaultNS:function(a,b,c){a=this.createElementNS(this.namespaces[this.defaultPrefix],a);b&&a.appendChild(this.createTextNode(b));c&&this.setAttributes(a,c);return a},setAttributes:function(a,b){var c,d;
for(d in b)c=b[d].toString(),c.match(/[A-Z]/)?this.setAttributeNS(a,null,d,c):a.setAttribute(d,c)},write_wmc_General:function(a){var b=this.createElementDefaultNS("General");a.size&&b.appendChild(this.createElementDefaultNS("Window",null,{width:a.size.w,height:a.size.h}));var c=a.bounds;b.appendChild(this.createElementDefaultNS("BoundingBox",null,{minx:c.left.toPrecision(18),miny:c.bottom.toPrecision(18),maxx:c.right.toPrecision(18),maxy:c.top.toPrecision(18),SRS:a.projection}));b.appendChild(this.createElementDefaultNS("Title",
a.title));b.appendChild(this.write_ol_MapExtension(a));return b},write_ol_MapExtension:function(a){var b=this.createElementDefaultNS("Extension");if(a=a.maxExtent){var c=this.createElementNS(this.namespaces.ol,"ol:maxExtent");this.setAttributes(c,{minx:a.left.toPrecision(18),miny:a.bottom.toPrecision(18),maxx:a.right.toPrecision(18),maxy:a.top.toPrecision(18)});b.appendChild(c)}return b},write_wmc_LayerList:function(a){for(var b=this.createElementDefaultNS("LayerList"),c=0,d=a.layersContext.length;c<
d;++c)b.appendChild(this.write_wmc_Layer(a.layersContext[c]));return b},write_wmc_Layer:function(a){var b=this.createElementDefaultNS("Layer",null,{queryable:a.queryable?"1":"0",hidden:a.visibility?"0":"1"});b.appendChild(this.write_wmc_Server(a));b.appendChild(this.createElementDefaultNS("Name",a.name));b.appendChild(this.createElementDefaultNS("Title",a.title));a.metadataURL&&b.appendChild(this.write_wmc_MetadataURL(a.metadataURL));return b},write_wmc_LayerExtension:function(a){var b=this.createElementDefaultNS("Extension"),
c=a.maxExtent,d=this.createElementNS(this.namespaces.ol,"ol:maxExtent");this.setAttributes(d,{minx:c.left.toPrecision(18),miny:c.bottom.toPrecision(18),maxx:c.right.toPrecision(18),maxy:c.top.toPrecision(18)});b.appendChild(d);a.tileSize&&!a.singleTile&&(c=this.createElementNS(this.namespaces.ol,"ol:tileSize"),this.setAttributes(c,a.tileSize),b.appendChild(c));for(var c="transparent,numZoomLevels,units,isBaseLayer,opacity,displayInLayerSwitcher,singleTile".split(","),e=0,f=c.length;e<f;++e)(d=this.createOLPropertyNode(a,
c[e]))&&b.appendChild(d);return b},createOLPropertyNode:function(a,b){var c=null;null!=a[b]&&(c=this.createElementNS(this.namespaces.ol,"ol:"+b),c.appendChild(this.createTextNode(a[b].toString())));return c},write_wmc_Server:function(a){var b=this.createElementDefaultNS("Server");this.setAttributes(b,{service:"OGC:WMS",version:a.version});b.appendChild(this.write_wmc_OnlineResource(a.url));return b},write_wmc_MetadataURL:function(a){var b=this.createElementDefaultNS("MetadataURL");b.appendChild(this.write_wmc_OnlineResource(a));
return b},write_wmc_FormatList:function(a){for(var b=this.createElementDefaultNS("FormatList"),c=0,d=a.formats.length;c<d;c++){var e=a.formats[c];b.appendChild(this.createElementDefaultNS("Format",e.value,e.current&&!0==e.current?{current:"1"}:null))}return b},write_wmc_StyleList:function(a){var b=this.createElementDefaultNS("StyleList");if((a=a.styles)&&a instanceof Array)for(var c,d=0,e=a.length;d<e;d++){var f=a[d],g=this.createElementDefaultNS("Style",null,f.current&&!0==f.current?{current:"1"}:
null);if(f.href){c=this.createElementDefaultNS("SLD");var h=this.write_wmc_OnlineResource(f.href);c.appendChild(h);c.appendChild(this.createElementDefaultNS("Name",f.name));f.title&&c.appendChild(this.createElementDefaultNS("Title",f.title));g.appendChild(c)}else f.body?(c=this.createElementDefaultNS("SLD"),h=OpenLayers.Format.XML.prototype.read.apply(this,[f.body]).documentElement,c.ownerDocument&&c.ownerDocument.importNode&&(h=c.ownerDocument.importNode(h,!0)),c.appendChild(h),c.appendChild(this.createElementDefaultNS("Name",
f.name)),f.title&&c.appendChild(this.createElementDefaultNS("Title",f.title)),g.appendChild(c)):(g.appendChild(this.createElementDefaultNS("Name",f.name)),g.appendChild(this.createElementDefaultNS("Title",f.title)),f["abstract"]&&g.appendChild(this.createElementDefaultNS("Abstract",f["abstract"])));b.appendChild(g)}return b},write_wmc_OnlineResource:function(a){var b=this.createElementDefaultNS("OnlineResource");this.setAttributeNS(b,this.namespaces.xlink,"xlink:type","simple");this.setAttributeNS(b,
this.namespaces.xlink,"xlink:href",a);return b},CLASS_NAME:"OpenLayers.Format.WMC.v1"});
OpenLayers.Format.WMSCapabilities.v1_1=OpenLayers.Class(OpenLayers.Format.WMSCapabilities.v1,{readers:{wms:OpenLayers.Util.applyDefaults({WMT_MS_Capabilities:function(a,b){this.readChildNodes(a,b)},Keyword:function(a,b){b.keywords&&b.keywords.push(this.getChildValue(a))},DescribeLayer:function(a,b){b.describelayer={formats:[]};this.readChildNodes(a,b.describelayer)},GetLegendGraphic:function(a,b){b.getlegendgraphic={formats:[]};this.readChildNodes(a,b.getlegendgraphic)},GetStyles:function(a,b){b.getstyles=
{formats:[]};this.readChildNodes(a,b.getstyles)},PutStyles:function(a,b){b.putstyles={formats:[]};this.readChildNodes(a,b.putstyles)},UserDefinedSymbolization:function(a,b){var c={supportSLD:1==parseInt(a.getAttribute("SupportSLD")),userLayer:1==parseInt(a.getAttribute("UserLayer")),userStyle:1==parseInt(a.getAttribute("UserStyle")),remoteWFS:1==parseInt(a.getAttribute("RemoteWFS"))};b.userSymbols=c},LatLonBoundingBox:function(a,b){b.llbbox=[parseFloat(a.getAttribute("minx")),parseFloat(a.getAttribute("miny")),
parseFloat(a.getAttribute("maxx")),parseFloat(a.getAttribute("maxy"))]},BoundingBox:function(a,b){var c=OpenLayers.Format.WMSCapabilities.v1.prototype.readers.wms.BoundingBox.apply(this,[a,b]);c.srs=a.getAttribute("SRS");b.bbox[c.srs]=c},ScaleHint:function(a,b){var c=a.getAttribute("min"),d=a.getAttribute("max"),e=Math.pow(2,0.5),f=OpenLayers.INCHES_PER_UNIT.m;b.maxScale=parseFloat((c/e*f*OpenLayers.DOTS_PER_INCH).toPrecision(13));b.minScale=parseFloat((d/e*f*OpenLayers.DOTS_PER_INCH).toPrecision(13))},
Dimension:function(a,b){var c={name:a.getAttribute("name").toLowerCase(),units:a.getAttribute("units"),unitsymbol:a.getAttribute("unitSymbol")};b.dimensions[c.name]=c},Extent:function(a,b){var c=a.getAttribute("name").toLowerCase();if(c in b.dimensions){c=b.dimensions[c];c.nearestVal="1"===a.getAttribute("nearestValue");c.multipleVal="1"===a.getAttribute("multipleValues");c.current="1"===a.getAttribute("current");c["default"]=a.getAttribute("default")||"";var d=this.getChildValue(a);c.values=d.split(",")}}},
OpenLayers.Format.WMSCapabilities.v1.prototype.readers.wms)},CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1_1"});
OpenLayers.Format.WMSCapabilities.v1_3=OpenLayers.Class(OpenLayers.Format.WMSCapabilities.v1,{readers:{wms:OpenLayers.Util.applyDefaults({WMS_Capabilities:function(a,b){this.readChildNodes(a,b)},LayerLimit:function(a,b){b.layerLimit=parseInt(this.getChildValue(a))},MaxWidth:function(a,b){b.maxWidth=parseInt(this.getChildValue(a))},MaxHeight:function(a,b){b.maxHeight=parseInt(this.getChildValue(a))},BoundingBox:function(a,b){var c=OpenLayers.Format.WMSCapabilities.v1.prototype.readers.wms.BoundingBox.apply(this,
[a,b]);c.srs=a.getAttribute("CRS");b.bbox[c.srs]=c},CRS:function(a,b){this.readers.wms.SRS.apply(this,[a,b])},EX_GeographicBoundingBox:function(a,b){b.llbbox=[];this.readChildNodes(a,b.llbbox)},westBoundLongitude:function(a,b){b[0]=this.getChildValue(a)},eastBoundLongitude:function(a,b){b[2]=this.getChildValue(a)},southBoundLatitude:function(a,b){b[1]=this.getChildValue(a)},northBoundLatitude:function(a,b){b[3]=this.getChildValue(a)},MinScaleDenominator:function(a,b){b.maxScale=parseFloat(this.getChildValue(a)).toPrecision(16)},
MaxScaleDenominator:function(a,b){b.minScale=parseFloat(this.getChildValue(a)).toPrecision(16)},Dimension:function(a,b){var c={name:a.getAttribute("name").toLowerCase(),units:a.getAttribute("units"),unitsymbol:a.getAttribute("unitSymbol"),nearestVal:"1"===a.getAttribute("nearestValue"),multipleVal:"1"===a.getAttribute("multipleValues"),"default":a.getAttribute("default")||"",current:"1"===a.getAttribute("current"),values:this.getChildValue(a).split(",")};b.dimensions[c.name]=c},Keyword:function(a,
b){var c={value:this.getChildValue(a),vocabulary:a.getAttribute("vocabulary")};b.keywords&&b.keywords.push(c)}},OpenLayers.Format.WMSCapabilities.v1.prototype.readers.wms),sld:{UserDefinedSymbolization:function(a,b){this.readers.wms.UserDefinedSymbolization.apply(this,[a,b]);b.userSymbols.inlineFeature=1==parseInt(a.getAttribute("InlineFeature"));b.userSymbols.remoteWCS=1==parseInt(a.getAttribute("RemoteWCS"))},DescribeLayer:function(a,b){this.readers.wms.DescribeLayer.apply(this,[a,b])},GetLegendGraphic:function(a,
b){this.readers.wms.GetLegendGraphic.apply(this,[a,b])}}},CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1_3"});
OpenLayers.Format.WMTSCapabilities.v1_0_0=OpenLayers.Class(OpenLayers.Format.OWSCommon.v1_1_0,{version:"1.0.0",namespaces:{ows:"http://www.opengis.net/ows/1.1",wmts:"http://www.opengis.net/wmts/1.0",xlink:"http://www.w3.org/1999/xlink"},yx:null,defaultPrefix:"wmts",initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a]);this.options=a;a=OpenLayers.Util.extend({},OpenLayers.Format.WMTSCapabilities.prototype.yx);this.yx=OpenLayers.Util.extend(a,this.yx)},read:function(a){"string"==
typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));if(a&&9==a.nodeType)a=a.documentElement;var b={};this.readNode(a,b);b.version=this.version;return b},readers:{wmts:{Capabilities:function(a,b){this.readChildNodes(a,b)},Contents:function(a,b){b.contents={};b.contents.layers=[];b.contents.tileMatrixSets={};this.readChildNodes(a,b.contents)},Layer:function(a,b){var c={styles:[],formats:[],tileMatrixSetLinks:[],layers:[]};this.readChildNodes(a,c);b.layers.push(c)},Style:function(a,b){var c=
{};c.isDefault="true"===a.getAttribute("isDefault");this.readChildNodes(a,c);b.styles.push(c)},Format:function(a,b){b.formats.push(this.getChildValue(a))},TileMatrixSetLink:function(a,b){var c={};this.readChildNodes(a,c);b.tileMatrixSetLinks.push(c)},TileMatrixSet:function(a,b){if(b.layers){var c={matrixIds:[]};this.readChildNodes(a,c);b.tileMatrixSets[c.identifier]=c}else b.tileMatrixSet=this.getChildValue(a)},TileMatrix:function(a,b){var c={supportedCRS:b.supportedCRS};this.readChildNodes(a,c);
b.matrixIds.push(c)},ScaleDenominator:function(a,b){b.scaleDenominator=parseFloat(this.getChildValue(a))},TopLeftCorner:function(a,b){var c=this.getChildValue(a).split(" "),d;b.supportedCRS&&(d=!!this.yx[b.supportedCRS.replace(/urn:ogc:def:crs:(\w+):.+:(\w+)$/,"urn:ogc:def:crs:$1::$2")]);b.topLeftCorner=d?new OpenLayers.LonLat(c[1],c[0]):new OpenLayers.LonLat(c[0],c[1])},TileWidth:function(a,b){b.tileWidth=parseInt(this.getChildValue(a))},TileHeight:function(a,b){b.tileHeight=parseInt(this.getChildValue(a))},
MatrixWidth:function(a,b){b.matrixWidth=parseInt(this.getChildValue(a))},MatrixHeight:function(a,b){b.matrixHeight=parseInt(this.getChildValue(a))},WSDL:function(a,b){b.wsdl={};b.wsdl.href=a.getAttribute("xlink:href")},ServiceMetadataURL:function(a,b){b.serviceMetadataUrl={};b.serviceMetadataUrl.href=a.getAttribute("xlink:href")}},ows:OpenLayers.Format.OWSCommon.v1_1_0.prototype.readers.ows},CLASS_NAME:"OpenLayers.Format.WMTSCapabilities.v1_0_0"});
OpenLayers.Layer.Boxes=OpenLayers.Class(OpenLayers.Layer.Markers,{initialize:function(a,b){OpenLayers.Layer.Markers.prototype.initialize.apply(this,arguments)},drawMarker:function(a){var b=a.bounds,c=this.map.getLayerPxFromLonLat(new OpenLayers.LonLat(b.left,b.top)),b=this.map.getLayerPxFromLonLat(new OpenLayers.LonLat(b.right,b.bottom));if(null==b||null==c)a.display(!1);else if(b=new OpenLayers.Size(Math.max(1,b.x-c.x),Math.max(1,b.y-c.y)),c=a.draw(c,b),!a.drawn)this.div.appendChild(c),a.drawn=!0},
removeMarker:function(a){OpenLayers.Util.removeItem(this.markers,a);null!=a.div&&a.div.parentNode==this.div&&this.div.removeChild(a.div)},CLASS_NAME:"OpenLayers.Layer.Boxes"});
OpenLayers.Layer.GeoRSS=OpenLayers.Class(OpenLayers.Layer.Markers,{location:null,features:null,formatOptions:null,selectedFeature:null,icon:null,popupSize:null,useFeedTitle:!0,initialize:function(a,b,c){OpenLayers.Layer.Markers.prototype.initialize.apply(this,[a,c]);this.location=b;this.features=[]},destroy:function(){OpenLayers.Layer.Markers.prototype.destroy.apply(this,arguments);this.clearFeatures();this.features=null},loadRSS:function(){if(!this.loaded)this.events.triggerEvent("loadstart"),OpenLayers.Request.GET({url:this.location,
success:this.parseData,scope:this}),this.loaded=!0},moveTo:function(a,b,c){OpenLayers.Layer.Markers.prototype.moveTo.apply(this,arguments);this.visibility&&!this.loaded&&this.loadRSS()},parseData:function(a){var b=a.responseXML;if(!b||!b.documentElement)b=OpenLayers.Format.XML.prototype.read(a.responseText);if(this.useFeedTitle){a=null;try{a=b.getElementsByTagNameNS("*","title")[0].firstChild.nodeValue}catch(c){a=b.getElementsByTagName("title")[0].firstChild.nodeValue}a&&this.setName(a)}a={};OpenLayers.Util.extend(a,
this.formatOptions);if(this.map&&!this.projection.equals(this.map.getProjectionObject()))a.externalProjection=this.projection,a.internalProjection=this.map.getProjectionObject();for(var b=(new OpenLayers.Format.GeoRSS(a)).read(b),a=0,d=b.length;a<d;a++){var e={},f=b[a];if(f.geometry){var g=f.attributes.title?f.attributes.title:"Untitled",h=f.attributes.description?f.attributes.description:"No description.",j=f.attributes.link?f.attributes.link:"",f=f.geometry.getBounds().getCenterLonLat();e.icon=
null==this.icon?OpenLayers.Marker.defaultIcon():this.icon.clone();e.popupSize=this.popupSize?this.popupSize.clone():new OpenLayers.Size(250,120);if(g||h){e.title=g;e.description=h;var k='<div class="olLayerGeoRSSClose">[x]</div>',k=k+'<div class="olLayerGeoRSSTitle">';j&&(k+='<a class="link" href="'+j+'" target="_blank">');k+=g;j&&(k+="</a>");k+="</div>";k+='<div style="" class="olLayerGeoRSSDescription">';k+=h;k+="</div>";e.popupContentHTML=k}f=new OpenLayers.Feature(this,f,e);this.features.push(f);
e=f.createMarker();e.events.register("click",f,this.markerClick);this.addMarker(e)}}this.events.triggerEvent("loadend")},markerClick:function(a){var b=this==this.layer.selectedFeature;this.layer.selectedFeature=!b?this:null;for(var c=0,d=this.layer.map.popups.length;c<d;c++)this.layer.map.removePopup(this.layer.map.popups[c]);b||(b=this.createPopup(),OpenLayers.Event.observe(b.div,"click",OpenLayers.Function.bind(function(){for(var a=0,b=this.layer.map.popups.length;a<b;a++)this.layer.map.removePopup(this.layer.map.popups[a])},
this)),this.layer.map.addPopup(b));OpenLayers.Event.stop(a)},clearFeatures:function(){if(null!=this.features)for(;0<this.features.length;){var a=this.features[0];OpenLayers.Util.removeItem(this.features,a);a.destroy()}},CLASS_NAME:"OpenLayers.Layer.GeoRSS"});
OpenLayers.Layer.Google=OpenLayers.Class(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:0,MAX_ZOOM_LEVEL:21,RESOLUTIONS:[1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,6.866455078125E-4,3.4332275390625E-4,1.71661376953125E-4,8.58306884765625E-5,4.291534423828125E-5,2.145767211914062E-5,1.072883605957031E-5,5.36441802978515E-6,2.68220901489257E-6,1.341104507446289E-6,6.705522537231445E-7],
type:null,wrapDateLine:!0,sphericalMercator:!1,version:null,initialize:function(a,b){b=b||{};if(!b.version)b.version="function"===typeof GMap2?"2":"3";var c=OpenLayers.Layer.Google["v"+b.version.replace(/\./g,"_")];if(c)OpenLayers.Util.applyDefaults(b,c);else throw"Unsupported Google Maps API version: "+b.version;OpenLayers.Util.applyDefaults(b,c.DEFAULTS);if(b.maxExtent)b.maxExtent=b.maxExtent.clone();OpenLayers.Layer.EventPane.prototype.initialize.apply(this,[a,b]);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,
[a,b]);this.sphericalMercator&&(OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator),this.initMercatorParameters())},clone:function(){return new OpenLayers.Layer.Google(this.name,this.getOptions())},setVisibility:function(a){var b=null==this.opacity?1:this.opacity;OpenLayers.Layer.EventPane.prototype.setVisibility.apply(this,arguments);this.setOpacity(b)},display:function(a){this._dragging||this.setGMapVisibility(a);OpenLayers.Layer.EventPane.prototype.display.apply(this,arguments)},moveTo:function(a,
b,c){this._dragging=c;OpenLayers.Layer.EventPane.prototype.moveTo.apply(this,arguments);delete this._dragging},setOpacity:function(a){if(a!==this.opacity)null!=this.map&&this.map.events.triggerEvent("changelayer",{layer:this,property:"opacity"}),this.opacity=a;if(this.getVisibility()){var b=this.getMapContainer();OpenLayers.Util.modifyDOMElement(b,null,null,null,null,null,null,a)}},destroy:function(){if(this.map){this.setGMapVisibility(!1);var a=OpenLayers.Layer.Google.cache[this.map.id];a&&1>=a.count&&
this.removeGMapElements()}OpenLayers.Layer.EventPane.prototype.destroy.apply(this,arguments)},removeGMapElements:function(){var a=OpenLayers.Layer.Google.cache[this.map.id];if(a){var b=this.mapObject&&this.getMapContainer();b&&b.parentNode&&b.parentNode.removeChild(b);(b=a.termsOfUse)&&b.parentNode&&b.parentNode.removeChild(b);(a=a.poweredBy)&&a.parentNode&&a.parentNode.removeChild(a)}},removeMap:function(a){this.visibility&&this.mapObject&&this.setGMapVisibility(!1);var b=OpenLayers.Layer.Google.cache[a.id];
b&&(1>=b.count?(this.removeGMapElements(),delete OpenLayers.Layer.Google.cache[a.id]):--b.count);delete this.termsOfUse;delete this.poweredBy;delete this.mapObject;delete this.dragObject;OpenLayers.Layer.EventPane.prototype.removeMap.apply(this,arguments)},getOLBoundsFromMapObjectBounds:function(a){var b=null;null!=a&&(b=a.getSouthWest(),a=a.getNorthEast(),this.sphericalMercator?(b=this.forwardMercator(b.lng(),b.lat()),a=this.forwardMercator(a.lng(),a.lat())):(b=new OpenLayers.LonLat(b.lng(),b.lat()),
a=new OpenLayers.LonLat(a.lng(),a.lat())),b=new OpenLayers.Bounds(b.lon,b.lat,a.lon,a.lat));return b},getWarningHTML:function(){return OpenLayers.i18n("googleWarning")},getMapObjectCenter:function(){return this.mapObject.getCenter()},getMapObjectZoom:function(){return this.mapObject.getZoom()},getLongitudeFromMapObjectLonLat:function(a){return this.sphericalMercator?this.forwardMercator(a.lng(),a.lat()).lon:a.lng()},getLatitudeFromMapObjectLonLat:function(a){return this.sphericalMercator?this.forwardMercator(a.lng(),
a.lat()).lat:a.lat()},getXFromMapObjectPixel:function(a){return a.x},getYFromMapObjectPixel:function(a){return a.y},CLASS_NAME:"OpenLayers.Layer.Google"});OpenLayers.Layer.Google.cache={};
OpenLayers.Layer.Google.v2={termsOfUse:null,poweredBy:null,dragObject:null,loadMapObject:function(){if(!this.type)this.type=G_NORMAL_MAP;var a,b,c,d=OpenLayers.Layer.Google.cache[this.map.id];if(d)a=d.mapObject,b=d.termsOfUse,c=d.poweredBy,++d.count;else{var d=this.map.viewPortDiv,e=document.createElement("div");e.id=this.map.id+"_GMap2Container";e.style.position="absolute";e.style.width="100%";e.style.height="100%";d.appendChild(e);try{a=new GMap2(e),b=e.lastChild,d.appendChild(b),b.style.zIndex=
"1100",b.style.right="",b.style.bottom="",b.className="olLayerGoogleCopyright",c=e.lastChild,d.appendChild(c),c.style.zIndex="1100",c.style.right="",c.style.bottom="",c.className="olLayerGooglePoweredBy gmnoprint"}catch(f){throw f;}OpenLayers.Layer.Google.cache[this.map.id]={mapObject:a,termsOfUse:b,poweredBy:c,count:1}}this.mapObject=a;this.termsOfUse=b;this.poweredBy=c;-1===OpenLayers.Util.indexOf(this.mapObject.getMapTypes(),this.type)&&this.mapObject.addMapType(this.type);"function"==typeof a.getDragObject?
this.dragObject=a.getDragObject():this.dragPanMapObject=null;!1===this.isBaseLayer&&this.setGMapVisibility("none"!==this.div.style.display)},onMapResize:function(){if(this.visibility&&this.mapObject.isLoaded())this.mapObject.checkResize();else{if(!this._resized)var a=this,b=GEvent.addListener(this.mapObject,"load",function(){GEvent.removeListener(b);delete a._resized;a.mapObject.checkResize();a.moveTo(a.map.getCenter(),a.map.getZoom())});this._resized=!0}},setGMapVisibility:function(a){var b=OpenLayers.Layer.Google.cache[this.map.id];
if(b){var c=this.mapObject.getContainer();if(!0===a)this.mapObject.setMapType(this.type),c.style.display="",this.termsOfUse.style.left="",this.termsOfUse.style.display="",this.poweredBy.style.display="",b.displayed=this.id;else if(b.displayed===this.id&&delete b.displayed,!b.displayed)c.style.display="none",this.termsOfUse.style.display="none",this.termsOfUse.style.left="-9999px",this.poweredBy.style.display="none"}},getMapContainer:function(){return this.mapObject.getContainer()},getMapObjectBoundsFromOLBounds:function(a){var b=
null;null!=a&&(b=this.sphericalMercator?this.inverseMercator(a.bottom,a.left):new OpenLayers.LonLat(a.bottom,a.left),a=this.sphericalMercator?this.inverseMercator(a.top,a.right):new OpenLayers.LonLat(a.top,a.right),b=new GLatLngBounds(new GLatLng(b.lat,b.lon),new GLatLng(a.lat,a.lon)));return b},setMapObjectCenter:function(a,b){this.mapObject.setCenter(a,b)},dragPanMapObject:function(a,b){this.dragObject.moveBy(new GSize(-a,b))},getMapObjectLonLatFromMapObjectPixel:function(a){return this.mapObject.fromContainerPixelToLatLng(a)},
getMapObjectPixelFromMapObjectLonLat:function(a){return this.mapObject.fromLatLngToContainerPixel(a)},getMapObjectZoomFromMapObjectBounds:function(a){return this.mapObject.getBoundsZoomLevel(a)},getMapObjectLonLatFromLonLat:function(a,b){var c;this.sphericalMercator?(c=this.inverseMercator(a,b),c=new GLatLng(c.lat,c.lon)):c=new GLatLng(b,a);return c},getMapObjectPixelFromXY:function(a,b){return new GPoint(a,b)}};
OpenLayers.Layer.Grid=OpenLayers.Class(OpenLayers.Layer.HTTPRequest,{tileSize:null,grid:null,singleTile:!1,ratio:1.5,buffer:2,numLoadingTiles:0,initialize:function(a,b,c,d){OpenLayers.Layer.HTTPRequest.prototype.initialize.apply(this,arguments);this.events.addEventType("tileloaded");this.grid=[]},destroy:function(){this.clearGrid();this.tileSize=this.grid=null;OpenLayers.Layer.HTTPRequest.prototype.destroy.apply(this,arguments)},clearGrid:function(){if(this.grid){for(var a=0,b=this.grid.length;a<
b;a++)for(var c=this.grid[a],d=0,e=c.length;d<e;d++){var f=c[d];this.removeTileMonitoringHooks(f);f.destroy()}this.grid=[]}},clone:function(a){null==a&&(a=new OpenLayers.Layer.Grid(this.name,this.url,this.params,this.getOptions()));a=OpenLayers.Layer.HTTPRequest.prototype.clone.apply(this,[a]);if(null!=this.tileSize)a.tileSize=this.tileSize.clone();a.grid=[];return a},moveTo:function(a,b,c){OpenLayers.Layer.HTTPRequest.prototype.moveTo.apply(this,arguments);a=a||this.map.getExtent();if(null!=a){var d=
!this.grid.length||b,e=this.getTilesBounds();this.singleTile?(d||!c&&!e.containsBounds(a))&&this.initSingleTile(a):d||!e.containsBounds(a,!0)?this.initGriddedTiles(a):this.moveGriddedTiles(a)}},setTileSize:function(a){if(this.singleTile)a=this.map.getSize(),a.h=parseInt(a.h*this.ratio),a.w=parseInt(a.w*this.ratio);OpenLayers.Layer.HTTPRequest.prototype.setTileSize.apply(this,[a])},getGridBounds:function(){OpenLayers.Console.warn("The getGridBounds() function is deprecated. It will be removed in 3.0. Please use getTilesBounds() instead.");
return this.getTilesBounds()},getTilesBounds:function(){var a=null;if(this.grid.length)var a=this.grid[this.grid.length-1][0],b=this.grid[0][this.grid[0].length-1],a=new OpenLayers.Bounds(a.bounds.left,a.bounds.bottom,b.bounds.right,b.bounds.top);return a},initSingleTile:function(a){var b=a.getCenterLonLat(),c=a.getWidth()*this.ratio,a=a.getHeight()*this.ratio,b=new OpenLayers.Bounds(b.lon-c/2,b.lat-a/2,b.lon+c/2,b.lat+a/2),c=this.map.getLayerPxFromLonLat(new OpenLayers.LonLat(b.left,b.top));this.grid.length||
(this.grid[0]=[]);(a=this.grid[0][0])?a.moveTo(b,c):(a=this.addTile(b,c),this.addTileMonitoringHooks(a),a.draw(),this.grid[0][0]=a);this.removeExcessTiles(1,1)},calculateGridLayout:function(a,b,c){var d=c*this.tileSize.w,c=c*this.tileSize.h,e=a.left-b.left,f=Math.floor(e/d)-this.buffer,e=-(e/d-f)*this.tileSize.w,f=b.left+f*d,a=a.top-(b.bottom+c),g=Math.ceil(a/c)+this.buffer;return{tilelon:d,tilelat:c,tileoffsetlon:f,tileoffsetlat:b.bottom+g*c,tileoffsetx:e,tileoffsety:-(g-a/c)*this.tileSize.h}},initGriddedTiles:function(a){var b=
this.map.getSize(),c=Math.ceil(b.h/this.tileSize.h)+Math.max(1,2*this.buffer),b=Math.ceil(b.w/this.tileSize.w)+Math.max(1,2*this.buffer),d=this.getMaxExtent(),e=this.map.getResolution(),f=this.calculateGridLayout(a,d,e),d=Math.round(f.tileoffsetx),e=Math.round(f.tileoffsety),g=f.tileoffsetlon,h=f.tileoffsetlat,j=f.tilelon,f=f.tilelat;this.origin=new OpenLayers.Pixel(d,e);var k=d,l=g,m=0,o=parseInt(this.map.layerContainerDiv.style.left),n=parseInt(this.map.layerContainerDiv.style.top);do{var p=this.grid[m++];
p||(p=[],this.grid.push(p));var g=l,d=k,r=0;do{var s=new OpenLayers.Bounds(g,h,g+j,h+f),q=d,q=q-o,t=e,t=t-n,q=new OpenLayers.Pixel(q,t);(t=p[r++])?t.moveTo(s,q,!1):(t=this.addTile(s,q),this.addTileMonitoringHooks(t),p.push(t));g+=j;d+=this.tileSize.w}while(g<=a.right+j*this.buffer||r<b);h-=f;e+=this.tileSize.h}while(h>=a.bottom-f*this.buffer||m<c);this.removeExcessTiles(m,r);this.spiralTileLoad()},getMaxExtent:function(){return this.maxExtent},spiralTileLoad:function(){for(var a=[],b=["right","down",
"left","up"],c=0,d=-1,e=OpenLayers.Util.indexOf(b,"right"),f=0;f<b.length;){var g=c,h=d;switch(b[e]){case "right":h++;break;case "down":g++;break;case "left":h--;break;case "up":g--}var j=null;g<this.grid.length&&0<=g&&h<this.grid[0].length&&0<=h&&(j=this.grid[g][h]);null!=j&&!j.queued?(a.unshift(j),j.queued=!0,f=0,c=g,d=h):(e=(e+1)%4,f++)}b=0;for(c=a.length;b<c;b++)j=a[b],j.draw(),j.queued=!1},addTile:function(){},addTileMonitoringHooks:function(a){a.onLoadStart=function(){0==this.numLoadingTiles&&
this.events.triggerEvent("loadstart");this.numLoadingTiles++};a.events.register("loadstart",this,a.onLoadStart);a.onLoadEnd=function(){this.numLoadingTiles--;this.events.triggerEvent("tileloaded");0==this.numLoadingTiles&&this.events.triggerEvent("loadend")};a.events.register("loadend",this,a.onLoadEnd);a.events.register("unload",this,a.onLoadEnd)},removeTileMonitoringHooks:function(a){a.unload();a.events.un({loadstart:a.onLoadStart,loadend:a.onLoadEnd,unload:a.onLoadEnd,scope:this})},moveGriddedTiles:function(){for(var a=
this.buffer||1;;){var b=this.map.getViewPortPxFromLayerPx(this.grid[0][0].position);if(b.x>-this.tileSize.w*(a-1))this.shiftColumn(!0);else if(b.x<-this.tileSize.w*a)this.shiftColumn(!1);else if(b.y>-this.tileSize.h*(a-1))this.shiftRow(!0);else if(b.y<-this.tileSize.h*a)this.shiftRow(!1);else break}},shiftRow:function(a){for(var b=this.grid,c=b[a?0:this.grid.length-1],d=this.map.getResolution(),e=a?-this.tileSize.h:this.tileSize.h,d=d*-e,f=a?b.pop():b.shift(),g=0,h=c.length;g<h;g++){var j=c[g],k=
j.bounds.clone(),j=j.position.clone();k.bottom+=d;k.top+=d;j.y+=e;f[g].moveTo(k,j)}a?b.unshift(f):b.push(f)},shiftColumn:function(a){for(var b=a?-this.tileSize.w:this.tileSize.w,c=this.map.getResolution()*b,d=0,e=this.grid.length;d<e;d++){var f=this.grid[d],g=f[a?0:f.length-1],h=g.bounds.clone(),g=g.position.clone();h.left+=c;h.right+=c;g.x+=b;var j=a?this.grid[d].pop():this.grid[d].shift();j.moveTo(h,g);a?f.unshift(j):f.push(j)}},removeExcessTiles:function(a,b){for(;this.grid.length>a;)for(var c=
this.grid.pop(),d=0,e=c.length;d<e;d++){var f=c[d];this.removeTileMonitoringHooks(f);f.destroy()}for(;this.grid[0].length>b;){d=0;for(e=this.grid.length;d<e;d++)c=this.grid[d],f=c.pop(),this.removeTileMonitoringHooks(f),f.destroy()}},onMapResize:function(){this.singleTile&&(this.clearGrid(),this.setTileSize())},getTileBounds:function(a){var b=this.maxExtent,c=this.getResolution(),d=c*this.tileSize.w,c=c*this.tileSize.h,e=this.getLonLatFromViewPortPx(a),a=b.left+d*Math.floor((e.lon-b.left)/d),b=b.bottom+
c*Math.floor((e.lat-b.bottom)/c);return new OpenLayers.Bounds(a,b,a+d,b+c)},CLASS_NAME:"OpenLayers.Layer.Grid"});
OpenLayers.Layer.MultiMap=OpenLayers.Class(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:1,MAX_ZOOM_LEVEL:17,RESOLUTIONS:[9,1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,6.866455078125E-4,3.4332275390625E-4,1.71661376953125E-4,8.58306884765625E-5,4.291534423828125E-5],type:null,initialize:function(a,b){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);
OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);this.sphericalMercator&&(OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator),this.initMercatorParameters(),this.RESOLUTIONS.unshift(10))},loadMapObject:function(){try{this.mapObject=new MultimapViewer(this.div)}catch(a){}},getWarningHTML:function(){return OpenLayers.i18n("getLayerWarning",{layerType:"MM",layerLib:"MultiMap"})},setMapObjectCenter:function(a,b){this.mapObject.goToPosition(a,b)},getMapObjectCenter:function(){return this.mapObject.getCurrentPosition()},
getMapObjectZoom:function(){return this.mapObject.getZoomFactor()},getMapObjectLonLatFromMapObjectPixel:function(a){a.x-=this.map.getSize().w/2;a.y-=this.map.getSize().h/2;return this.mapObject.getMapPositionAt(a)},getMapObjectPixelFromMapObjectLonLat:function(a){return this.mapObject.geoPosToContainerPixels(a)},getLongitudeFromMapObjectLonLat:function(a){return this.sphericalMercator?this.forwardMercator(a.lon,a.lat).lon:a.lon},getLatitudeFromMapObjectLonLat:function(a){return this.sphericalMercator?
this.forwardMercator(a.lon,a.lat).lat:a.lat},getMapObjectLonLatFromLonLat:function(a,b){var c;this.sphericalMercator?(c=this.inverseMercator(a,b),c=new MMLatLon(c.lat,c.lon)):c=new MMLatLon(b,a);return c},getXFromMapObjectPixel:function(a){return a.x},getYFromMapObjectPixel:function(a){return a.y},getMapObjectPixelFromXY:function(a,b){return new MMPoint(a,b)},CLASS_NAME:"OpenLayers.Layer.MultiMap"});
OpenLayers.Layer.VirtualEarth=OpenLayers.Class(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:1,MAX_ZOOM_LEVEL:19,RESOLUTIONS:[1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,6.866455078125E-4,3.4332275390625E-4,1.71661376953125E-4,8.58306884765625E-5,4.291534423828125E-5,2.145767211914062E-5,1.072883605957031E-5,5.36441802978515E-6],type:null,wrapDateLine:!0,sphericalMercator:!1,
animationEnabled:!0,initialize:function(a,b){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);this.sphericalMercator&&(OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator),this.initMercatorParameters())},loadMapObject:function(){var a=OpenLayers.Util.createDiv(this.name),b=this.map.getSize();a.style.width=b.w+"px";a.style.height=b.h+"px";this.div.appendChild(a);try{this.mapObject=new VEMap(this.name)}catch(c){}if(null!=
this.mapObject){try{this.mapObject.LoadMap(null,null,this.type,!0),this.mapObject.AttachEvent("onmousedown",OpenLayers.Function.True)}catch(d){}this.mapObject.HideDashboard();"function"==typeof this.mapObject.SetAnimationEnabled&&this.mapObject.SetAnimationEnabled(this.animationEnabled)}if(!this.mapObject||!this.mapObject.vemapcontrol||!this.mapObject.vemapcontrol.PanMap||"function"!=typeof this.mapObject.vemapcontrol.PanMap)this.dragPanMapObject=null},onMapResize:function(){this.mapObject.Resize(this.map.size.w,
this.map.size.h)},getWarningHTML:function(){return OpenLayers.i18n("getLayerWarning",{layerType:"VE",layerLib:"VirtualEarth"})},setMapObjectCenter:function(a,b){this.mapObject.SetCenterAndZoom(a,b)},getMapObjectCenter:function(){return this.mapObject.GetCenter()},dragPanMapObject:function(a,b){this.mapObject.vemapcontrol.PanMap(a,-b)},getMapObjectZoom:function(){return this.mapObject.GetZoomLevel()},getMapObjectLonLatFromMapObjectPixel:function(a){return"undefined"!=typeof VEPixel?this.mapObject.PixelToLatLong(a):
this.mapObject.PixelToLatLong(a.x,a.y)},getMapObjectPixelFromMapObjectLonLat:function(a){return this.mapObject.LatLongToPixel(a)},getLongitudeFromMapObjectLonLat:function(a){return this.sphericalMercator?this.forwardMercator(a.Longitude,a.Latitude).lon:a.Longitude},getLatitudeFromMapObjectLonLat:function(a){return this.sphericalMercator?this.forwardMercator(a.Longitude,a.Latitude).lat:a.Latitude},getMapObjectLonLatFromLonLat:function(a,b){var c;this.sphericalMercator?(c=this.inverseMercator(a,b),
c=new VELatLong(c.lat,c.lon)):c=new VELatLong(b,a);return c},getXFromMapObjectPixel:function(a){return a.x},getYFromMapObjectPixel:function(a){return a.y},getMapObjectPixelFromXY:function(a,b){return"undefined"!=typeof VEPixel?new VEPixel(a,b):new Msn.VE.Pixel(a,b)},CLASS_NAME:"OpenLayers.Layer.VirtualEarth"});
OpenLayers.Layer.Yahoo=OpenLayers.Class(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:0,MAX_ZOOM_LEVEL:17,RESOLUTIONS:[1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,6.866455078125E-4,3.4332275390625E-4,1.71661376953125E-4,8.58306884765625E-5,4.291534423828125E-5,2.145767211914062E-5,1.072883605957031E-5],type:null,wrapDateLine:!0,sphericalMercator:!1,initialize:function(a,
b){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);this.sphericalMercator&&(OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator),this.initMercatorParameters())},loadMapObject:function(){try{var a=this.getMapObjectSizeFromOLSize(this.map.getSize());this.mapObject=new YMap(this.div,this.type,a);this.mapObject.disableKeyControls();this.mapObject.disableDragMap();if(!this.mapObject.moveByXY||"function"!=
typeof this.mapObject.moveByXY)this.dragPanMapObject=null}catch(b){}},onMapResize:function(){try{this.mapObject.resizeTo(this.getMapObjectSizeFromOLSize(this.map.getSize()))}catch(a){}},setMap:function(a){OpenLayers.Layer.EventPane.prototype.setMap.apply(this,arguments);this.map.events.register("moveend",this,this.fixYahooEventPane)},fixYahooEventPane:function(){var a=OpenLayers.Util.getElement("ygddfdiv");null!=a&&(null!=a.parentNode&&a.parentNode.removeChild(a),this.map.events.unregister("moveend",
this,this.fixYahooEventPane))},getWarningHTML:function(){return OpenLayers.i18n("getLayerWarning",{layerType:"Yahoo",layerLib:"Yahoo"})},getOLZoomFromMapObjectZoom:function(a){var b=null;null!=a&&(b=OpenLayers.Layer.FixedZoomLevels.prototype.getOLZoomFromMapObjectZoom.apply(this,[a]),b=18-b);return b},getMapObjectZoomFromOLZoom:function(a){var b=null;null!=a&&(b=OpenLayers.Layer.FixedZoomLevels.prototype.getMapObjectZoomFromOLZoom.apply(this,[a]),b=18-b);return b},setMapObjectCenter:function(a,b){this.mapObject.drawZoomAndCenter(a,
b)},getMapObjectCenter:function(){return this.mapObject.getCenterLatLon()},dragPanMapObject:function(a,b){this.mapObject.moveByXY({x:-a,y:b})},getMapObjectZoom:function(){return this.mapObject.getZoomLevel()},getMapObjectLonLatFromMapObjectPixel:function(a){return this.mapObject.convertXYLatLon(a)},getMapObjectPixelFromMapObjectLonLat:function(a){return this.mapObject.convertLatLonXY(a)},getLongitudeFromMapObjectLonLat:function(a){return this.sphericalMercator?this.forwardMercator(a.Lon,a.Lat).lon:
a.Lon},getLatitudeFromMapObjectLonLat:function(a){return this.sphericalMercator?this.forwardMercator(a.Lon,a.Lat).lat:a.Lat},getMapObjectLonLatFromLonLat:function(a,b){var c;this.sphericalMercator?(c=this.inverseMercator(a,b),c=new YGeoPoint(c.lat,c.lon)):c=new YGeoPoint(b,a);return c},getXFromMapObjectPixel:function(a){return a.x},getYFromMapObjectPixel:function(a){return a.y},getMapObjectPixelFromXY:function(a,b){return new YCoordPoint(a,b)},getMapObjectSizeFromOLSize:function(a){return new YSize(a.w,
a.h)},CLASS_NAME:"OpenLayers.Layer.Yahoo"});
OpenLayers.Style=OpenLayers.Class({id:null,name:null,title:null,description:null,layerName:null,isDefault:!1,rules:null,context:null,defaultStyle:null,defaultsPerSymbolizer:!1,propertyStyles:null,initialize:function(a,b){OpenLayers.Util.extend(this,b);this.rules=[];b&&b.rules&&this.addRules(b.rules);this.setDefaultStyle(a||OpenLayers.Feature.Vector.style["default"]);this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")},destroy:function(){for(var a=0,b=this.rules.length;a<b;a++)this.rules[a].destroy(),
this.rules[a]=null;this.defaultStyle=this.rules=null},createSymbolizer:function(a){for(var b=this.defaultsPerSymbolizer?{}:this.createLiterals(OpenLayers.Util.extend({},this.defaultStyle),a),c=this.rules,d,e=[],f=!1,g=0,h=c.length;g<h;g++)d=c[g],d.evaluate(a)&&(d instanceof OpenLayers.Rule&&d.elseFilter?e.push(d):(f=!0,this.applySymbolizer(d,b,a)));if(!1==f&&0<e.length){f=!0;g=0;for(h=e.length;g<h;g++)this.applySymbolizer(e[g],b,a)}if(0<c.length&&!1==f)b.display="none";return b},applySymbolizer:function(a,
b,c){var d=c.geometry?this.getSymbolizerPrefix(c.geometry):OpenLayers.Style.SYMBOLIZER_PREFIXES[0],a=a.symbolizer[d]||a.symbolizer;if(!0===this.defaultsPerSymbolizer)d=this.defaultStyle,OpenLayers.Util.applyDefaults(a,{pointRadius:d.pointRadius}),(!0===a.stroke||!0===a.graphic)&&OpenLayers.Util.applyDefaults(a,{strokeWidth:d.strokeWidth,strokeColor:d.strokeColor,strokeOpacity:d.strokeOpacity,strokeDashstyle:d.strokeDashstyle,strokeLinecap:d.strokeLinecap}),(!0===a.fill||!0===a.graphic)&&OpenLayers.Util.applyDefaults(a,
{fillColor:d.fillColor,fillOpacity:d.fillOpacity}),!0===a.graphic&&OpenLayers.Util.applyDefaults(a,{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(b,
a),c)},createLiterals:function(a,b){var c=OpenLayers.Util.extend({},b.attributes||b.data);OpenLayers.Util.extend(c,this.context);for(var d in this.propertyStyles)a[d]=OpenLayers.Style.createLiteral(a[d],c,b,d);return a},findPropertyStyles:function(){var a={};this.addPropertyStyles(a,this.defaultStyle);for(var b=this.rules,c,d,e=0,f=b.length;e<f;e++){c=b[e].symbolizer;for(var g in c)if(d=c[g],"object"==typeof d)this.addPropertyStyles(a,d);else{this.addPropertyStyles(a,c);break}}return a},addPropertyStyles:function(a,
b){var c,d;for(d in b)c=b[d],"string"==typeof c&&c.match(/\$\{\w+\}/)&&(a[d]=!0);return a},addRules:function(a){Array.prototype.push.apply(this.rules,a);this.propertyStyles=this.findPropertyStyles()},setDefaultStyle:function(a){this.defaultStyle=a;this.propertyStyles=this.findPropertyStyles()},getSymbolizerPrefix:function(a){for(var b=OpenLayers.Style.SYMBOLIZER_PREFIXES,c=0,d=b.length;c<d;c++)if(-1!=a.CLASS_NAME.indexOf(b[c]))return b[c]},clone:function(){var a=OpenLayers.Util.extend({},this);if(this.rules){a.rules=
[];for(var b=0,c=this.rules.length;b<c;++b)a.rules.push(this.rules[b].clone())}a.context=this.context&&OpenLayers.Util.extend({},this.context);b=OpenLayers.Util.extend({},this.defaultStyle);return new OpenLayers.Style(b,a)},CLASS_NAME:"OpenLayers.Style"});OpenLayers.Style.createLiteral=function(a,b,c,d){"string"==typeof a&&-1!=a.indexOf("${")&&(a=OpenLayers.String.format(a,b,[c,d]),a=isNaN(a)||!a?a:parseFloat(a));return a};OpenLayers.Style.SYMBOLIZER_PREFIXES=["Point","Line","Polygon","Text","Raster"];
OpenLayers.Control.Navigation=OpenLayers.Class(OpenLayers.Control,{dragPan:null,dragPanOptions:null,documentDrag:!1,zoomBox:null,zoomBoxEnabled:!0,zoomWheelEnabled:!0,mouseWheelOptions:null,handleRightClicks:!1,zoomBoxKeyMask:OpenLayers.Handler.MOD_SHIFT,autoActivate:!0,initialize:function(a){this.handlers={};OpenLayers.Control.prototype.initialize.apply(this,arguments)},destroy:function(){this.deactivate();this.dragPan&&this.dragPan.destroy();this.dragPan=null;this.zoomBox&&this.zoomBox.destroy();
this.zoomBox=null;OpenLayers.Control.prototype.destroy.apply(this,arguments)},activate:function(){this.dragPan.activate();this.zoomWheelEnabled&&this.handlers.wheel.activate();this.handlers.click.activate();this.zoomBoxEnabled&&this.zoomBox.activate();return OpenLayers.Control.prototype.activate.apply(this,arguments)},deactivate:function(){this.zoomBox.deactivate();this.dragPan.deactivate();this.handlers.click.deactivate();this.handlers.wheel.deactivate();return OpenLayers.Control.prototype.deactivate.apply(this,
arguments)},draw:function(){if(this.handleRightClicks)this.map.viewPortDiv.oncontextmenu=OpenLayers.Function.False;this.handlers.click=new OpenLayers.Handler.Click(this,{dblclick:this.defaultDblClick,dblrightclick:this.defaultDblRightClick},{"double":!0,stopDouble:!0});this.dragPan=new OpenLayers.Control.DragPan(OpenLayers.Util.extend({map:this.map,documentDrag:this.documentDrag},this.dragPanOptions));this.zoomBox=new OpenLayers.Control.ZoomBox({map:this.map,keyMask:this.zoomBoxKeyMask});this.dragPan.draw();
this.zoomBox.draw();this.handlers.wheel=new OpenLayers.Handler.MouseWheel(this,{up:this.wheelUp,down:this.wheelDown},this.mouseWheelOptions)},defaultDblClick:function(a){this.map.setCenter(this.map.getLonLatFromViewPortPx(a.xy),this.map.zoom+1)},defaultDblRightClick:function(a){this.map.setCenter(this.map.getLonLatFromViewPortPx(a.xy),this.map.zoom-1)},wheelChange:function(a,b){var c=this.map.getZoom(),d=this.map.getZoom()+Math.round(b),d=Math.max(d,0),d=Math.min(d,this.map.getNumZoomLevels());if(d!==
c){var e=this.map.getSize(),c=e.w/2-a.xy.x,e=a.xy.y-e.h/2,f=this.map.baseLayer.getResolutionForZoom(d),g=this.map.getLonLatFromPixel(a.xy);this.map.setCenter(new OpenLayers.LonLat(g.lon+c*f,g.lat+e*f),d)}},wheelUp:function(a,b){this.wheelChange(a,b||1)},wheelDown:function(a,b){this.wheelChange(a,b||-1)},disableZoomBox:function(){this.zoomBoxEnabled=!1;this.zoomBox.deactivate()},enableZoomBox:function(){this.zoomBoxEnabled=!0;this.active&&this.zoomBox.activate()},disableZoomWheel:function(){this.zoomWheelEnabled=
!1;this.handlers.wheel.deactivate()},enableZoomWheel:function(){this.zoomWheelEnabled=!0;this.active&&this.handlers.wheel.activate()},CLASS_NAME:"OpenLayers.Control.Navigation"});OpenLayers.Filter=OpenLayers.Class({initialize:function(a){OpenLayers.Util.extend(this,a)},destroy:function(){},evaluate:function(){return!0},clone:function(){return null},CLASS_NAME:"OpenLayers.Filter"});
OpenLayers.Format.WMC.v1_0_0=OpenLayers.Class(OpenLayers.Format.WMC.v1,{VERSION:"1.0.0",schemaLocation:"http://www.opengis.net/context http://schemas.opengis.net/context/1.0.0/context.xsd",initialize:function(a){OpenLayers.Format.WMC.v1.prototype.initialize.apply(this,[a])},write_wmc_Layer:function(a){var b=OpenLayers.Format.WMC.v1.prototype.write_wmc_Layer.apply(this,[a]);b.appendChild(this.write_wmc_FormatList(a));b.appendChild(this.write_wmc_StyleList(a));b.appendChild(this.write_wmc_LayerExtension(a))},
CLASS_NAME:"OpenLayers.Format.WMC.v1_0_0"});
OpenLayers.Format.WMC.v1_1_0=OpenLayers.Class(OpenLayers.Format.WMC.v1,{VERSION:"1.1.0",schemaLocation:"http://www.opengis.net/context http://schemas.opengis.net/context/1.1.0/context.xsd",initialize:function(a){OpenLayers.Format.WMC.v1.prototype.initialize.apply(this,[a])},read_sld_MinScaleDenominator:function(a,b){var c=parseFloat(this.getChildValue(b));if(0<c)a.maxScale=c},read_sld_MaxScaleDenominator:function(a,b){a.minScale=parseFloat(this.getChildValue(b))},write_wmc_Layer:function(a){var b=
OpenLayers.Format.WMC.v1.prototype.write_wmc_Layer.apply(this,[a]);if(a.maxScale){var c=this.createElementNS(this.namespaces.sld,"sld:MinScaleDenominator");c.appendChild(this.createTextNode(a.maxScale.toPrecision(16)));b.appendChild(c)}a.minScale&&(c=this.createElementNS(this.namespaces.sld,"sld:MaxScaleDenominator"),c.appendChild(this.createTextNode(a.minScale.toPrecision(16))),b.appendChild(c));b.appendChild(this.write_wmc_FormatList(a));b.appendChild(this.write_wmc_StyleList(a));b.appendChild(this.write_wmc_LayerExtension(a));
return b},CLASS_NAME:"OpenLayers.Format.WMC.v1_1_0"});OpenLayers.Format.WMSCapabilities.v1_1_0=OpenLayers.Class(OpenLayers.Format.WMSCapabilities.v1_1,{version:"1.1.0",initialize:function(a){OpenLayers.Format.WMSCapabilities.v1_1.prototype.initialize.apply(this,[a])},readers:{wms:OpenLayers.Util.applyDefaults({SRS:function(a,b){for(var c=this.getChildValue(a).split(/ +/),d=0,e=c.length;d<e;d++)b.srs[c[d]]=!0}},OpenLayers.Format.WMSCapabilities.v1_1.prototype.readers.wms)},CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1_1_0"});
OpenLayers.Format.WMSCapabilities.v1_1_1=OpenLayers.Class(OpenLayers.Format.WMSCapabilities.v1_1,{version:"1.1.1",initialize:function(a){OpenLayers.Format.WMSCapabilities.v1_1.prototype.initialize.apply(this,[a])},readers:{wms:OpenLayers.Util.applyDefaults({SRS:function(a,b){b.srs[this.getChildValue(a)]=!0}},OpenLayers.Format.WMSCapabilities.v1_1.prototype.readers.wms)},CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1_1_1"});
OpenLayers.Format.WMSCapabilities.v1_3_0=OpenLayers.Class(OpenLayers.Format.WMSCapabilities.v1_3,{version:"1.3.0",CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1_3_0"});
OpenLayers.Geometry=OpenLayers.Class({id:null,parent:null,bounds:null,initialize:function(){this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")},destroy:function(){this.bounds=this.id=null},clone:function(){return new OpenLayers.Geometry},setBounds:function(a){if(a)this.bounds=a.clone()},clearBounds:function(){this.bounds=null;this.parent&&this.parent.clearBounds()},extendBounds:function(a){this.getBounds()?this.bounds.extend(a):this.setBounds(a)},getBounds:function(){null==this.bounds&&this.calculateBounds();
return this.bounds},calculateBounds:function(){},distanceTo:function(){},getVertices:function(){},atPoint:function(a,b,c){var d=!1;null!=this.getBounds()&&null!=a&&(b=null!=b?b:0,c=null!=c?c:0,d=(new OpenLayers.Bounds(this.bounds.left-b,this.bounds.bottom-c,this.bounds.right+b,this.bounds.top+c)).containsLonLat(a));return d},getLength:function(){return 0},getArea:function(){return 0},getCentroid:function(){return null},toString:function(){return OpenLayers.Format.WKT.prototype.write(new OpenLayers.Feature.Vector(this))},
CLASS_NAME:"OpenLayers.Geometry"});OpenLayers.Geometry.fromWKT=function(a){var b=arguments.callee.format;if(!b)b=new OpenLayers.Format.WKT,arguments.callee.format=b;var c,b=b.read(a);if(b instanceof OpenLayers.Feature.Vector)c=b.geometry;else if(b instanceof Array){c=b.length;for(var d=Array(c),e=0;e<c;++e)d[e]=b[e].geometry;c=new OpenLayers.Geometry.Collection(d)}return c};
OpenLayers.Geometry.segmentsIntersect=function(a,b,c){var d=c&&c.point,c=c&&c.tolerance,e=!1,f=a.x1-b.x1,g=a.y1-b.y1,h=a.x2-a.x1,j=a.y2-a.y1,k=b.y2-b.y1,l=b.x2-b.x1,m=k*h-l*j,k=l*g-k*f,g=h*g-j*f;0==m?0==k&&0==g&&(e=!0):(f=k/m,m=g/m,0<=f&&1>=f&&0<=m&&1>=m&&(d?(h=a.x1+f*h,m=a.y1+f*j,e=new OpenLayers.Geometry.Point(h,m)):e=!0));if(c)if(e){if(d){a=[a,b];b=0;a:for(;2>b;++b){f=a[b];for(j=1;3>j;++j)if(h=f["x"+j],m=f["y"+j],d=Math.sqrt(Math.pow(h-e.x,2)+Math.pow(m-e.y,2)),d<c){e.x=h;e.y=m;break a}}}}else{a=
[a,b];b=0;a:for(;2>b;++b){h=a[b];m=a[(b+1)%2];for(j=1;3>j;++j)if(f={x:h["x"+j],y:h["y"+j]},g=OpenLayers.Geometry.distanceToSegment(f,m),g.distance<c){e=d?new OpenLayers.Geometry.Point(f.x,f.y):!0;break a}}}return e};OpenLayers.Geometry.distanceToSegment=function(a,b){var c=a.x,d=a.y,e=b.x1,f=b.y1,g=b.x2,h=b.y2,j=g-e,k=h-f,l=(j*(c-e)+k*(d-f))/(Math.pow(j,2)+Math.pow(k,2));0>=l||(1<=l?(e=g,f=h):(e+=l*j,f+=l*k));return{distance:Math.sqrt(Math.pow(e-c,2)+Math.pow(f-d,2)),x:e,y:f}};
OpenLayers.Layer.ArcGIS93Rest=OpenLayers.Class(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{format:"png"},isBaseLayer:!0,initialize:function(a,b,c,d){var e=[],c=OpenLayers.Util.upperCaseObject(c);e.push(a,b,c,d);OpenLayers.Layer.Grid.prototype.initialize.apply(this,e);OpenLayers.Util.applyDefaults(this.params,OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS));if(this.params.TRANSPARENT&&"true"==this.params.TRANSPARENT.toString().toLowerCase()){if(null==d||!d.isBaseLayer)this.isBaseLayer=!1;if("jpg"==
this.params.FORMAT)this.params.FORMAT=OpenLayers.Util.alphaHack()?"gif":"png"}},destroy:function(){OpenLayers.Layer.Grid.prototype.destroy.apply(this,arguments)},clone:function(a){null==a&&(a=new OpenLayers.Layer.ArcGIS93Rest(this.name,this.url,this.params,this.getOptions()));return a=OpenLayers.Layer.Grid.prototype.clone.apply(this,[a])},getURL:function(a){var a=this.adjustBounds(a),b=this.projection.getCode().split(":"),b=b[b.length-1],c=this.getImageSize(),a={BBOX:a.toBBOX(),SIZE:c.w+","+c.h,F:"image",
BBOXSR:b,IMAGESR:b};if(this.layerDefs){var b=[],d;for(d in this.layerDefs)this.layerDefs.hasOwnProperty(d)&&this.layerDefs[d]&&(b.push(d),b.push(":"),b.push(this.layerDefs[d]),b.push(";"));0<b.length&&(a.LAYERDEFS=b.join(""))}return this.getFullRequestString(a)},setLayerFilter:function(a,b){if(!this.layerDefs)this.layerDefs={};b?this.layerDefs[a]=b:delete this.layerDefs[a]},clearLayerFilter:function(a){a?delete this.layerDefs[a]:delete this.layerDefs},mergeNewParams:function(a){a=[OpenLayers.Util.upperCaseObject(a)];
return OpenLayers.Layer.Grid.prototype.mergeNewParams.apply(this,a)},addTile:function(a,b){return new OpenLayers.Tile.Image(this,b,a,null,this.tileSize)},CLASS_NAME:"OpenLayers.Layer.ArcGIS93Rest"});
OpenLayers.Layer.Google.v3={DEFAULTS:{maxExtent:new OpenLayers.Bounds(-2.00375083392E7,-2.00375083392E7,2.00375083392E7,2.00375083392E7),sphericalMercator:!0,maxResolution:156543.0339,units:"m",projection:"EPSG:900913"},loadMapObject:function(){if(!this.type)this.type=google.maps.MapTypeId.ROADMAP;var a,b=OpenLayers.Layer.Google.cache[this.map.id];b?(a=b.mapObject,++b.count):(b=this.map.viewPortDiv,a=document.createElement("div"),a.id=this.map.id+"_GMapContainer",a.style.position="absolute",a.style.width=
"100%",a.style.height="100%",b.appendChild(a),b=this.map.getCenter(),a=new google.maps.Map(a,{center:b?new google.maps.LatLng(b.lat,b.lon):new google.maps.LatLng(0,0),zoom:this.map.getZoom()||0,mapTypeId:this.type,disableDefaultUI:!0,keyboardShortcuts:!1,draggable:!1,disableDoubleClickZoom:!0,scrollwheel:!1}),b={mapObject:a,count:1},OpenLayers.Layer.Google.cache[this.map.id]=b,this.repositionListener=google.maps.event.addListenerOnce(a,"center_changed",OpenLayers.Function.bind(this.repositionMapElements,
this)));this.mapObject=a;this.setGMapVisibility(this.visibility)},repositionMapElements:function(){google.maps.event.trigger(this.mapObject,"resize");var a=this.mapObject.getDiv().firstChild;if(!a||3>a.childNodes.length)return this.repositionTimer=window.setTimeout(OpenLayers.Function.bind(this.repositionMapElements,this),250),!1;var b=OpenLayers.Layer.Google.cache[this.map.id],c=this.map.viewPortDiv,d=a.lastChild;c.appendChild(d);d.style.zIndex="1100";d.style.bottom="";d.className="olLayerGoogleCopyright olLayerGoogleV3";
d.style.display="";b.termsOfUse=d;a=a.lastChild;c.appendChild(a);a.style.zIndex="1100";a.style.bottom="";a.className="olLayerGooglePoweredBy olLayerGoogleV3 gmnoprint";a.style.display="";b.poweredBy=a;this.setGMapVisibility(this.visibility)},onMapResize:function(){if(this.visibility)google.maps.event.trigger(this.mapObject,"resize");else{if(!this._resized){var a=this;google.maps.event.addListenerOnce(this.mapObject,"tilesloaded",function(){delete a._resized;google.maps.event.trigger(a.mapObject,"resize");
a.moveTo(a.map.getCenter(),a.map.getZoom())})}this._resized=!0}},setGMapVisibility:function(a){var b=OpenLayers.Layer.Google.cache[this.map.id];if(b){for(var c=this.type,d=this.map.layers,e,f=d.length-1;0<=f;--f)if(e=d[f],e instanceof OpenLayers.Layer.Google&&!0===e.visibility&&!0===e.inRange){c=e.type;a=!0;break}d=this.mapObject.getDiv();if(!0===a){this.mapObject.setMapTypeId(c);d.style.left="";if(b.termsOfUse&&b.termsOfUse.style)b.termsOfUse.style.left="",b.termsOfUse.style.display="",b.poweredBy.style.display=
"";b.displayed=this.id}else if(delete b.displayed,d.style.left="-9999px",b.termsOfUse&&b.termsOfUse.style)b.termsOfUse.style.display="none",b.termsOfUse.style.left="-9999px",b.poweredBy.style.display="none"}},getMapContainer:function(){return this.mapObject.getDiv()},getMapObjectBoundsFromOLBounds:function(a){var b=null;null!=a&&(b=this.sphericalMercator?this.inverseMercator(a.bottom,a.left):new OpenLayers.LonLat(a.bottom,a.left),a=this.sphericalMercator?this.inverseMercator(a.top,a.right):new OpenLayers.LonLat(a.top,
a.right),b=new google.maps.LatLngBounds(new google.maps.LatLng(b.lat,b.lon),new google.maps.LatLng(a.lat,a.lon)));return b},getMapObjectLonLatFromMapObjectPixel:function(a){var b=this.map.getSize(),c=this.getLongitudeFromMapObjectLonLat(this.mapObject.center),d=this.getLatitudeFromMapObjectLonLat(this.mapObject.center),e=this.map.getResolution(),a=new OpenLayers.LonLat(c+(a.x-b.w/2)*e,d-(a.y-b.h/2)*e);this.wrapDateLine&&(a=a.wrapDateLine(this.maxExtent));return this.getMapObjectLonLatFromLonLat(a.lon,
a.lat)},getMapObjectPixelFromMapObjectLonLat:function(a){var b=this.getLongitudeFromMapObjectLonLat(a),a=this.getLatitudeFromMapObjectLonLat(a),c=this.map.getResolution(),d=this.map.getExtent(),b=new OpenLayers.Pixel(1/c*(b-d.left),1/c*(d.top-a));return this.getMapObjectPixelFromXY(b.x,b.y)},setMapObjectCenter:function(a,b){this.mapObject.setOptions({center:a,zoom:b})},getMapObjectZoomFromMapObjectBounds:function(a){return this.mapObject.getBoundsZoomLevel(a)},getMapObjectLonLatFromLonLat:function(a,
b){var c;this.sphericalMercator?(c=this.inverseMercator(a,b),c=new google.maps.LatLng(c.lat,c.lon)):c=new google.maps.LatLng(b,a);return c},getMapObjectPixelFromXY:function(a,b){return new google.maps.Point(a,b)},destroy:function(){this.repositionListener&&google.maps.event.removeListener(this.repositionListener);this.repositionTimer&&window.clearTimeout(this.repositionTimer);OpenLayers.Layer.Google.prototype.destroy.apply(this,arguments)}};
OpenLayers.Layer.KaMap=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:!0,units:null,resolution:OpenLayers.DOTS_PER_INCH,DEFAULT_PARAMS:{i:"jpeg",map:""},initialize:function(a,b,c,d){var e=[];e.push(a,b,c,d);OpenLayers.Layer.Grid.prototype.initialize.apply(this,e);this.params=OpenLayers.Util.applyDefaults(this.params,this.DEFAULT_PARAMS)},getURL:function(a){var a=this.adjustBounds(a),b=this.map.getResolution(),c=Math.round(1E4*this.map.getScale())/1E4,d=Math.round(a.left/b);return this.getFullRequestString({t:-Math.round(a.top/
b),l:d,s:c})},addTile:function(a,b){var c=this.getURL(a);return new OpenLayers.Tile.Image(this,b,a,c,this.tileSize)},calculateGridLayout:function(a,b,c){var b=c*this.tileSize.w,c=c*this.tileSize.h,d=a.left,e=Math.floor(d/b)-this.buffer,d=-(d/b-e)*this.tileSize.w,e=e*b,a=a.top,f=Math.ceil(a/c)+this.buffer;return{tilelon:b,tilelat:c,tileoffsetlon:e,tileoffsetlat:f*c,tileoffsetx:d,tileoffsety:-(f-a/c+1)*this.tileSize.h}},clone:function(a){null==a&&(a=new OpenLayers.Layer.KaMap(this.name,this.url,this.params,
this.getOptions()));a=OpenLayers.Layer.Grid.prototype.clone.apply(this,[a]);if(null!=this.tileSize)a.tileSize=this.tileSize.clone();a.grid=[];return a},getTileBounds:function(a){var b=this.getResolution(),c=b*this.tileSize.w,b=b*this.tileSize.h,d=this.getLonLatFromViewPortPx(a),a=c*Math.floor(d.lon/c),d=b*Math.floor(d.lat/b);return new OpenLayers.Bounds(a,d,a+c,d+b)},CLASS_NAME:"OpenLayers.Layer.KaMap"});
OpenLayers.Layer.MapGuide=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:!0,useHttpTile:!1,singleTile:!1,useOverlay:!1,useAsyncOverlay:!0,TILE_PARAMS:{operation:"GETTILEIMAGE",version:"1.2.0"},SINGLE_TILE_PARAMS:{operation:"GETMAPIMAGE",format:"PNG",locale:"en",clip:"1",version:"1.0.0"},OVERLAY_PARAMS:{operation:"GETDYNAMICMAPOVERLAYIMAGE",format:"PNG",locale:"en",clip:"1",version:"2.0.0"},FOLDER_PARAMS:{tileColumnsPerFolder:30,tileRowsPerFolder:30,format:"png",querystring:null},defaultSize:new OpenLayers.Size(300,
300),initialize:function(a,b,c,d){OpenLayers.Layer.Grid.prototype.initialize.apply(this,arguments);if(null==d||null==d.isBaseLayer)this.isBaseLayer="true"!=this.transparent&&!0!=this.transparent;if(d&&null!=d.useOverlay)this.useOverlay=d.useOverlay;if(this.singleTile)if(this.useOverlay){if(OpenLayers.Util.applyDefaults(this.params,this.OVERLAY_PARAMS),!this.useAsyncOverlay)this.params.version="1.0.0"}else OpenLayers.Util.applyDefaults(this.params,this.SINGLE_TILE_PARAMS);else this.useHttpTile?OpenLayers.Util.applyDefaults(this.params,
this.FOLDER_PARAMS):OpenLayers.Util.applyDefaults(this.params,this.TILE_PARAMS),this.setTileSize(this.defaultSize)},clone:function(a){null==a&&(a=new OpenLayers.Layer.MapGuide(this.name,this.url,this.params,this.getOptions()));return a=OpenLayers.Layer.Grid.prototype.clone.apply(this,[a])},addTile:function(a,b){return new OpenLayers.Tile.Image(this,b,a,null,this.tileSize)},getURL:function(a){var b;b=a.getCenterLonLat();var c=this.map.getSize();if(this.singleTile){a={setdisplaydpi:OpenLayers.DOTS_PER_INCH,
setdisplayheight:c.h*this.ratio,setdisplaywidth:c.w*this.ratio,setviewcenterx:b.lon,setviewcentery:b.lat,setviewscale:this.map.getScale()};if(this.useOverlay&&!this.useAsyncOverlay)b={},b=OpenLayers.Util.extend(b,a),b.operation="GETVISIBLEMAPEXTENT",b.version="1.0.0",b.session=this.params.session,b.mapName=this.params.mapName,b.format="text/xml",b=this.getFullRequestString(b),OpenLayers.Request.GET({url:b,async:!1});b=this.getFullRequestString(a)}else c=this.map.getResolution(),b=Math.floor((a.left-
this.maxExtent.left)/c),b=Math.round(b/this.tileSize.w),a=Math.floor((this.maxExtent.top-a.top)/c),a=Math.round(a/this.tileSize.h),b=this.useHttpTile?this.getImageFilePath({tilecol:b,tilerow:a,scaleindex:this.resolutions.length-this.map.zoom-1}):this.getFullRequestString({tilecol:b,tilerow:a,scaleindex:this.resolutions.length-this.map.zoom-1});return b},getFullRequestString:function(a,b){var c=null==b?this.url:b;"object"==typeof c&&(c=c[Math.floor(Math.random()*c.length)]);var d=c,e=OpenLayers.Util.extend({},
this.params),e=OpenLayers.Util.extend(e,a),f=OpenLayers.Util.upperCaseObject(OpenLayers.Util.getParameters(c)),g;for(g in e)g.toUpperCase()in f&&delete e[g];e=OpenLayers.Util.getParameterString(e);e=e.replace(/,/g,"+");""!=e&&(f=c.charAt(c.length-1),d="&"==f||"?"==f?d+e:-1==c.indexOf("?")?d+("?"+e):d+("&"+e));return d},getImageFilePath:function(a,b){var c=null==b?this.url:b;"object"==typeof c&&(c=c[Math.floor(Math.random()*c.length)]);var d="",e="";0>a.tilerow&&(d="-");d=0==a.tilerow?d+"0":d+Math.floor(Math.abs(a.tilerow/
this.params.tileRowsPerFolder))*this.params.tileRowsPerFolder;0>a.tilecol&&(e="-");e=0==a.tilecol?e+"0":e+Math.floor(Math.abs(a.tilecol/this.params.tileColumnsPerFolder))*this.params.tileColumnsPerFolder;d="/S"+Math.floor(a.scaleindex)+"/"+this.params.basemaplayergroupname+"/R"+d+"/C"+e+"/"+a.tilerow%this.params.tileRowsPerFolder+"_"+a.tilecol%this.params.tileColumnsPerFolder+"."+this.params.format;this.params.querystring&&(d+="?"+this.params.querystring);return c+d},calculateGridLayout:function(a,
b,c){var d=c*this.tileSize.w,c=c*this.tileSize.h,e=a.left-b.left,f=Math.floor(e/d)-this.buffer,a=b.top-a.top+c,g=Math.floor(a/c)-this.buffer;return{tilelon:d,tilelat:c,tileoffsetlon:b.left+f*d,tileoffsetlat:b.top-c*g,tileoffsetx:-(e/d-f)*this.tileSize.w,tileoffsety:(g-a/c)*this.tileSize.h}},CLASS_NAME:"OpenLayers.Layer.MapGuide"});
OpenLayers.Layer.MapServer=OpenLayers.Class(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{mode:"map",map_imagetype:"png"},initialize:function(a,b,c,d){var e=[];e.push(a,b,c,d);OpenLayers.Layer.Grid.prototype.initialize.apply(this,e);this.params=OpenLayers.Util.applyDefaults(this.params,this.DEFAULT_PARAMS);if(null==d||null==d.isBaseLayer)this.isBaseLayer="true"!=this.params.transparent&&!0!=this.params.transparent},clone:function(a){null==a&&(a=new OpenLayers.Layer.MapServer(this.name,this.url,this.params,
this.getOptions()));return a=OpenLayers.Layer.Grid.prototype.clone.apply(this,[a])},addTile:function(a,b){return new OpenLayers.Tile.Image(this,b,a,null,this.tileSize)},getURL:function(a){var a=this.adjustBounds(a),a=[a.left,a.bottom,a.right,a.top],b=this.getImageSize();return this.getFullRequestString({mapext:a,imgext:a,map_size:[b.w,b.h],imgx:b.w/2,imgy:b.h/2,imgxy:[b.w,b.h]})},getFullRequestString:function(a,b){var c=null==b?this.url:b,d=OpenLayers.Util.extend({},this.params),d=OpenLayers.Util.extend(d,
a),e=OpenLayers.Util.getParameterString(d);c instanceof Array&&(c=this.selectUrl(e,c));var e=OpenLayers.Util.upperCaseObject(OpenLayers.Util.getParameters(c)),f;for(f in d)f.toUpperCase()in e&&delete d[f];e=OpenLayers.Util.getParameterString(d);d=c;e=e.replace(/,/g,"+");""!=e&&(f=c.charAt(c.length-1),d="&"==f||"?"==f?d+e:-1==c.indexOf("?")?d+("?"+e):d+("&"+e));return d},CLASS_NAME:"OpenLayers.Layer.MapServer"});
OpenLayers.Layer.TMS=OpenLayers.Class(OpenLayers.Layer.Grid,{serviceVersion:"1.0.0",isBaseLayer:!0,tileOrigin:null,serverResolutions:null,zoomOffset:0,initialize:function(a,b,c){var d=[];d.push(a,b,{},c);OpenLayers.Layer.Grid.prototype.initialize.apply(this,d)},destroy:function(){OpenLayers.Layer.Grid.prototype.destroy.apply(this,arguments)},clone:function(a){null==a&&(a=new OpenLayers.Layer.TMS(this.name,this.url,this.getOptions()));return a=OpenLayers.Layer.Grid.prototype.clone.apply(this,[a])},
getURL:function(a){var a=this.adjustBounds(a),b=this.map.getResolution(),c=Math.round((a.left-this.tileOrigin.lon)/(b*this.tileSize.w)),a=Math.round((a.bottom-this.tileOrigin.lat)/(b*this.tileSize.h)),b=this.serviceVersion+"/"+this.layername+"/"+(null!=this.serverResolutions?OpenLayers.Util.indexOf(this.serverResolutions,b):this.map.getZoom()+this.zoomOffset)+"/"+c+"/"+a+"."+this.type,c=this.url;c instanceof Array&&(c=this.selectUrl(b,c));return c+b},addTile:function(a,b){return new OpenLayers.Tile.Image(this,
b,a,null,this.tileSize)},setMap:function(a){OpenLayers.Layer.Grid.prototype.setMap.apply(this,arguments);if(!this.tileOrigin)this.tileOrigin=new OpenLayers.LonLat(this.map.maxExtent.left,this.map.maxExtent.bottom)},CLASS_NAME:"OpenLayers.Layer.TMS"});
OpenLayers.Layer.TileCache=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:!0,format:"image/png",serverResolutions:null,initialize:function(a,b,c,d){this.layername=c;OpenLayers.Layer.Grid.prototype.initialize.apply(this,[a,b,{},d]);this.extension=this.format.split("/")[1].toLowerCase();this.extension="jpg"==this.extension?"jpeg":this.extension},clone:function(a){null==a&&(a=new OpenLayers.Layer.TileCache(this.name,this.url,this.layername,this.getOptions()));return a=OpenLayers.Layer.Grid.prototype.clone.apply(this,
[a])},getURL:function(a){function b(a,b){for(var a=""+a,c=[],d=0;d<b;++d)c.push("0");return c.join("").substring(0,b-a.length)+a}var c=this.map.getResolution(),d=this.maxExtent,e=this.tileSize,f=Math.round((a.left-d.left)/(c*e.w)),a=Math.round((a.bottom-d.bottom)/(c*e.h)),c=null!=this.serverResolutions?OpenLayers.Util.indexOf(this.serverResolutions,c):this.map.getZoom(),f=[this.layername,b(c,2),b(parseInt(f/1E6),3),b(parseInt(f/1E3)%1E3,3),b(parseInt(f)%1E3,3),b(parseInt(a/1E6),3),b(parseInt(a/1E3)%
1E3,3),b(parseInt(a)%1E3,3)+"."+this.extension].join("/"),c=this.url;c instanceof Array&&(c=this.selectUrl(f,c));c="/"==c.charAt(c.length-1)?c:c+"/";return c+f},addTile:function(a,b){var c=this.getURL(a);return new OpenLayers.Tile.Image(this,b,a,c,this.tileSize)},CLASS_NAME:"OpenLayers.Layer.TileCache"});
OpenLayers.Layer.WMS=OpenLayers.Class(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{service:"WMS",version:"1.1.1",request:"GetMap",styles:"",exceptions:"application/vnd.ogc.se_inimage",format:"image/jpeg"},reproject:!1,isBaseLayer:!0,encodeBBOX:!1,noMagic:!1,yx:{"EPSG:4326":!0},initialize:function(a,b,c,d){var e=[],c=OpenLayers.Util.upperCaseObject(c);if(1.3<=parseFloat(c.VERSION)&&!c.EXCEPTIONS)c.EXCEPTIONS="INIMAGE";e.push(a,b,c,d);OpenLayers.Layer.Grid.prototype.initialize.apply(this,e);OpenLayers.Util.applyDefaults(this.params,
OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS));if(!this.noMagic&&this.params.TRANSPARENT&&"true"==this.params.TRANSPARENT.toString().toLowerCase()){if(null==d||!d.isBaseLayer)this.isBaseLayer=!1;if("image/jpeg"==this.params.FORMAT)this.params.FORMAT=OpenLayers.Util.alphaHack()?"image/gif":"image/png"}},destroy:function(){OpenLayers.Layer.Grid.prototype.destroy.apply(this,arguments)},clone:function(a){null==a&&(a=new OpenLayers.Layer.WMS(this.name,this.url,this.params,this.getOptions()));return a=
OpenLayers.Layer.Grid.prototype.clone.apply(this,[a])},reverseAxisOrder:function(){return 1.3<=parseFloat(this.params.VERSION)&&!!this.yx[this.map.getProjectionObject().getCode()]},getURL:function(a){var a=this.adjustBounds(a),b=this.getImageSize(),c={},d=this.reverseAxisOrder();c.BBOX=this.encodeBBOX?a.toBBOX(null,d):a.toArray(d);c.WIDTH=b.w;c.HEIGHT=b.h;return this.getFullRequestString(c)},addTile:function(a,b){return new OpenLayers.Tile.Image(this,b,a,null,this.tileSize)},mergeNewParams:function(a){a=
[OpenLayers.Util.upperCaseObject(a)];return OpenLayers.Layer.Grid.prototype.mergeNewParams.apply(this,a)},getFullRequestString:function(a,b){var c=this.map.getProjection(),c="none"==c?null:c;1.3<=parseFloat(this.params.VERSION)?this.params.CRS=c:this.params.SRS=c;return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,arguments)},CLASS_NAME:"OpenLayers.Layer.WMS"});
OpenLayers.Layer.WMTS=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:!0,version:"1.0.0",requestEncoding:"KVP",url:null,layer:null,matrixSet:null,style:null,format:"image/jpeg",tileOrigin:null,tileFullExtent:null,formatSuffix:null,matrixIds:null,dimensions:null,params:null,zoomOffset:0,formatSuffixMap:{"image/png":"png","image/png8":"png","image/png24":"png","image/png32":"png",png:"png","image/jpeg":"jpg","image/jpg":"jpg",jpeg:"jpg",jpg:"jpg"},matrix:null,initialize:function(a){var b={url:!0,
layer:!0,style:!0,matrixSet:!0},c;for(c in b)if(!(c in a))throw Error("Missing property '"+c+"' in layer configuration.");a.params=OpenLayers.Util.upperCaseObject(a.params);OpenLayers.Layer.Grid.prototype.initialize.apply(this,[a.name,a.url,a.params,a]);if(!this.formatSuffix)this.formatSuffix=this.formatSuffixMap[this.format]||this.format.split("/").pop();if(this.matrixIds&&(a=this.matrixIds.length)&&"string"===typeof this.matrixIds[0]){b=this.matrixIds;this.matrixIds=Array(a);for(c=0;c<a;++c)this.matrixIds[c]=
{identifier:b[c]}}},setMap:function(){OpenLayers.Layer.Grid.prototype.setMap.apply(this,arguments);this.updateMatrixProperties()},updateMatrixProperties:function(){if(this.matrix=this.getMatrix()){if(this.matrix.topLeftCorner)this.tileOrigin=this.matrix.topLeftCorner;if(this.matrix.tileWidth&&this.matrix.tileHeight)this.tileSize=new OpenLayers.Size(this.matrix.tileWidth,this.matrix.tileHeight);if(!this.tileOrigin)this.tileOrigin=new OpenLayers.LonLat(this.maxExtent.left,this.maxExtent.top);if(!this.tileFullExtent)this.tileFullExtent=
this.maxExtent}},moveTo:function(a,b,c){(b||!this.matrix)&&this.updateMatrixProperties();return OpenLayers.Layer.Grid.prototype.moveTo.apply(this,arguments)},clone:function(a){null==a&&(a=new OpenLayers.Layer.WMTS(this.options));return a=OpenLayers.Layer.Grid.prototype.clone.apply(this,[a])},getMatrix:function(){var a;if(!this.matrixIds||0===this.matrixIds.length)a={identifier:this.map.getZoom()+this.zoomOffset};else if("scaleDenominator"in this.matrixIds[0])for(var b=OpenLayers.METERS_PER_INCH*OpenLayers.INCHES_PER_UNIT[this.units]*
this.map.getResolution()/2.8E-4,c=Number.POSITIVE_INFINITY,d,e=0,f=this.matrixIds.length;e<f;++e)d=Math.abs(1-this.matrixIds[e].scaleDenominator/b),d<c&&(c=d,a=this.matrixIds[e]);else a=this.matrixIds[this.map.getZoom()+this.zoomOffset];return a},getTileInfo:function(a){var b=this.map.getResolution(),c=(a.lon-this.tileOrigin.lon)/(b*this.tileSize.w),a=(this.tileOrigin.lat-a.lat)/(b*this.tileSize.h),b=Math.floor(c),d=Math.floor(a);return{col:b,row:d,i:Math.floor((c-b)*this.tileSize.w),j:Math.floor((a-
d)*this.tileSize.h)}},getURL:function(a){var a=this.adjustBounds(a),b="";if(!this.tileFullExtent||this.tileFullExtent.intersectsBounds(a))if(a=this.getTileInfo(a.getCenterLonLat()),"REST"===this.requestEncoding.toUpperCase()){var c=this.version+"/"+this.layer+"/"+this.style+"/";if(this.dimensions)for(b=0;b<this.dimensions.length;b++)this.params[this.dimensions[b]]&&(c=c+this.params[this.dimensions[b]]+"/");c=c+this.matrixSet+"/"+this.matrix.identifier+"/"+a.row+"/"+a.col+"."+this.formatSuffix;b=this.url instanceof
Array?this.selectUrl(c,this.url):this.url;b.match(/\/$/)||(b+="/");b+=c}else"KVP"===this.requestEncoding.toUpperCase()&&(b=OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,[{SERVICE:"WMTS",REQUEST:"GetTile",VERSION:this.version,LAYER:this.layer,STYLE:this.style,TILEMATRIXSET:this.matrixSet,TILEMATRIX:this.matrix.identifier,TILEROW:a.row,TILECOL:a.col,FORMAT:this.format}]));return b},mergeNewParams:function(a){if("KVP"===this.requestEncoding.toUpperCase())return OpenLayers.Layer.Grid.prototype.mergeNewParams.apply(this,
[OpenLayers.Util.upperCaseObject(a)])},addTile:function(a,b){return new OpenLayers.Tile.Image(this,b,a,null,this.tileSize)},CLASS_NAME:"OpenLayers.Layer.WMTS"});
OpenLayers.Layer.WorldWind=OpenLayers.Class(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{},isBaseLayer:!0,lzd:null,zoomLevels:null,initialize:function(a,b,c,d,e,f){this.lzd=c;this.zoomLevels=d;c=[];c.push(a,b,e,f);OpenLayers.Layer.Grid.prototype.initialize.apply(this,c);this.params=OpenLayers.Util.applyDefaults(this.params,this.DEFAULT_PARAMS)},addTile:function(a,b){return new OpenLayers.Tile.Image(this,b,a,null,this.tileSize)},getZoom:function(){var a=this.map.getZoom();this.map.getMaxExtent();return a-=
Math.log(this.maxResolution/(this.lzd/512))/Math.log(2)},getURL:function(a){var a=this.adjustBounds(a),b=this.getZoom(),c=this.map.getMaxExtent(),d=this.lzd/Math.pow(2,this.getZoom()),e=Math.floor((a.left-c.left)/d),a=Math.floor((a.bottom-c.bottom)/d);return this.map.getResolution()<=this.lzd/512&&this.getZoom()<=this.zoomLevels?this.getFullRequestString({L:b,X:e,Y:a}):OpenLayers.Util.getImagesLocation()+"blank.gif"},CLASS_NAME:"OpenLayers.Layer.WorldWind"});
OpenLayers.Layer.XYZ=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:!0,sphericalMercator:!1,zoomOffset:0,initialize:function(a,b,c){if(c&&c.sphericalMercator||this.sphericalMercator)c=OpenLayers.Util.extend({maxExtent:new OpenLayers.Bounds(-2.00375083392E7,-2.00375083392E7,2.00375083392E7,2.00375083392E7),maxResolution:156543.0339,numZoomLevels:19,units:"m",projection:"EPSG:900913"},c);b=b||this.url;a=a||this.name;OpenLayers.Layer.Grid.prototype.initialize.apply(this,[a,b,{},c])},clone:function(a){null==
a&&(a=new OpenLayers.Layer.XYZ(this.name,this.url,this.getOptions()));return a=OpenLayers.Layer.Grid.prototype.clone.apply(this,[a])},getURL:function(a){var b=this.map.getResolution(),c=Math.round((a.left-this.maxExtent.left)/(b*this.tileSize.w)),a=Math.round((this.maxExtent.top-a.top)/(b*this.tileSize.h)),b=this.map.getZoom()+this.zoomOffset,d=this.url;d instanceof Array&&(d=this.selectUrl(""+c+a+b,d));return OpenLayers.String.format(d,{x:c,y:a,z:b})},addTile:function(a,b){return new OpenLayers.Tile.Image(this,
b,a,null,this.tileSize)},setMap:function(a){OpenLayers.Layer.Grid.prototype.setMap.apply(this,arguments);if(!this.tileOrigin)this.tileOrigin=new OpenLayers.LonLat(this.maxExtent.left,this.maxExtent.bottom)},CLASS_NAME:"OpenLayers.Layer.XYZ"});
OpenLayers.Layer.OSM=OpenLayers.Class(OpenLayers.Layer.XYZ,{name:"OpenStreetMap",attribution:"Data CC-By-SA by <a href='http://openstreetmap.org/'>OpenStreetMap</a>",sphericalMercator:!0,url:"http://tile.openstreetmap.org/${z}/${x}/${y}.png",clone:function(a){null==a&&(a=new OpenLayers.Layer.OSM(this.name,this.url,this.getOptions()));return a=OpenLayers.Layer.XYZ.prototype.clone.apply(this,[a])},CLASS_NAME:"OpenLayers.Layer.OSM"});
OpenLayers.Layer.Zoomify=OpenLayers.Class(OpenLayers.Layer.Grid,{url:null,size:null,isBaseLayer:!0,standardTileSize:256,numberOfTiers:0,tileCountUpToTier:[],tierSizeInTiles:[],tierImageSize:[],initialize:function(a,b,c,d){this.initializeZoomify(c);var e=[];e.push(a,b,c,{},d);OpenLayers.Layer.Grid.prototype.initialize.apply(this,e)},initializeZoomify:function(a){var a=a.clone(),b=new OpenLayers.Size(Math.ceil(a.w/this.standardTileSize),Math.ceil(a.h/this.standardTileSize));this.tierSizeInTiles.push(b);
for(this.tierImageSize.push(a);a.w>this.standardTileSize||a.h>this.standardTileSize;)a=new OpenLayers.Size(Math.floor(a.w/2),Math.floor(a.h/2)),b=new OpenLayers.Size(Math.ceil(a.w/this.standardTileSize),Math.ceil(a.h/this.standardTileSize)),this.tierSizeInTiles.push(b),this.tierImageSize.push(a);this.tierSizeInTiles.reverse();this.tierImageSize.reverse();this.numberOfTiers=this.tierSizeInTiles.length;this.tileCountUpToTier[0]=0;for(a=1;a<this.numberOfTiers;a++)this.tileCountUpToTier.push(this.tierSizeInTiles[a-
1].w*this.tierSizeInTiles[a-1].h+this.tileCountUpToTier[a-1])},destroy:function(){OpenLayers.Layer.Grid.prototype.destroy.apply(this,arguments);this.tileCountUpToTier.length=0;this.tierSizeInTiles.length=0;this.tierImageSize.length=0},clone:function(a){null==a&&(a=new OpenLayers.Layer.Zoomify(this.name,this.url,this.size,this.options));return a=OpenLayers.Layer.Grid.prototype.clone.apply(this,[a])},getURL:function(a){var a=this.adjustBounds(a),b=this.map.getResolution(),c=Math.round((a.left-this.tileOrigin.lon)/
(b*this.tileSize.w)),a=Math.round((this.tileOrigin.lat-a.top)/(b*this.tileSize.h)),b=this.map.getZoom(),c="TileGroup"+Math.floor((c+a*this.tierSizeInTiles[b].w+this.tileCountUpToTier[b])/256)+"/"+b+"-"+c+"-"+a+".jpg",a=this.url;a instanceof Array&&(a=this.selectUrl(c,a));return a+c},getImageSize:function(){if(0<arguments.length){bounds=this.adjustBounds(arguments[0]);var a=this.map.getResolution(),b=Math.round((bounds.left-this.tileOrigin.lon)/(a*this.tileSize.w)),a=Math.round((this.tileOrigin.lat-
bounds.top)/(a*this.tileSize.h)),c=this.map.getZoom(),d=this.standardTileSize,e=this.standardTileSize;b==this.tierSizeInTiles[c].w-1&&(d=this.tierImageSize[c].w%this.standardTileSize);a==this.tierSizeInTiles[c].h-1&&(e=this.tierImageSize[c].h%this.standardTileSize);return new OpenLayers.Size(d,e)}return this.tileSize},addTile:function(a,b){return new OpenLayers.Tile.Image(this,b,a,null,this.tileSize)},setMap:function(a){OpenLayers.Layer.Grid.prototype.setMap.apply(this,arguments);this.tileOrigin=
new OpenLayers.LonLat(this.map.maxExtent.left,this.map.maxExtent.top)},calculateGridLayout:function(a,b,c){var d=c*this.tileSize.w,c=c*this.tileSize.h,e=a.left-b.left,f=Math.floor(e/d)-this.buffer,a=b.top-a.top+c,g=Math.floor(a/c)-this.buffer;return{tilelon:d,tilelat:c,tileoffsetlon:b.left+f*d,tileoffsetlat:b.top-c*g,tileoffsetx:-(e/d-f)*this.tileSize.w,tileoffsety:(g-a/c)*this.tileSize.h}},CLASS_NAME:"OpenLayers.Layer.Zoomify"});
OpenLayers.Protocol.SQL.Gears=OpenLayers.Class(OpenLayers.Protocol.SQL,{FID_PREFIX:"__gears_fid__",NULL_GEOMETRY:"__gears_null_geometry__",NULL_FEATURE_STATE:"__gears_null_feature_state__",jsonParser:null,wktParser:null,fidRegExp:null,saveFeatureState:!0,typeOfFid:"string",db:null,initialize:function(a){if(this.supported())OpenLayers.Protocol.SQL.prototype.initialize.apply(this,[a]),this.jsonParser=new OpenLayers.Format.JSON,this.wktParser=new OpenLayers.Format.WKT,this.fidRegExp=RegExp("^"+this.FID_PREFIX),
this.initializeDatabase()},initializeDatabase:function(){this.db=google.gears.factory.create("beta.database");this.db.open(this.databaseName);this.db.execute("CREATE TABLE IF NOT EXISTS "+this.tableName+" (fid TEXT UNIQUE, geometry TEXT, properties TEXT,  state TEXT)")},destroy:function(){this.db.close();this.wktParser=this.jsonParser=this.db=null;OpenLayers.Protocol.SQL.prototype.destroy.apply(this)},supported:function(){return!(!window.google||!google.gears)},read:function(a){OpenLayers.Protocol.prototype.read.apply(this,
arguments);for(var a=OpenLayers.Util.applyDefaults(a,this.options),b,c=[],d=this.db.execute("SELECT * FROM "+this.tableName);d.isValidRow();){b=this.unfreezeFeature(d);if(this.evaluateFilter(b,a.filter)){if(!a.noFeatureStateReset)b.state=null;c.push(b)}d.next()}d.close();b=new OpenLayers.Protocol.Response({code:OpenLayers.Protocol.Response.SUCCESS,requestType:"read",features:c});a&&a.callback&&a.callback.call(a.scope,b);return b},unfreezeFeature:function(a){var b;b=a.fieldByName("geometry");b=b==
this.NULL_GEOMETRY?new OpenLayers.Feature.Vector:this.wktParser.read(b);b.attributes=this.jsonParser.read(a.fieldByName("properties"));b.fid=this.extractFidFromField(a.fieldByName("fid"));a=a.fieldByName("state");a==this.NULL_FEATURE_STATE&&(a=null);b.state=a;return b},extractFidFromField:function(a){!a.match(this.fidRegExp)&&"number"==this.typeOfFid&&(a=parseFloat(a));return a},create:function(a,b){var b=OpenLayers.Util.applyDefaults(b,this.options),c=this.createOrUpdate(a);c.requestType="create";
b&&b.callback&&b.callback.call(b.scope,c);return c},update:function(a,b){var b=OpenLayers.Util.applyDefaults(b,this.options),c=this.createOrUpdate(a);c.requestType="update";b&&b.callback&&b.callback.call(b.scope,c);return c},createOrUpdate:function(a){a instanceof Array||(a=[a]);var b,c=a.length,d,e=Array(c);for(b=0;b<c;b++){d=a[b];var f=this.freezeFeature(d);this.db.execute("REPLACE INTO "+this.tableName+" (fid, geometry, properties, state) VALUES (?, ?, ?, ?)",f);d=d.clone();d.fid=this.extractFidFromField(f[0]);
e[b]=d}return new OpenLayers.Protocol.Response({code:OpenLayers.Protocol.Response.SUCCESS,features:e,reqFeatures:a})},freezeFeature:function(a){a.fid=null!=a.fid?""+a.fid:OpenLayers.Util.createUniqueID(this.FID_PREFIX);var b=null!=a.geometry?a.geometry.toString():this.NULL_GEOMETRY,c=this.jsonParser.write(a.attributes),d=this.getFeatureStateForFreeze(a);return[a.fid,b,c,d]},getFeatureStateForFreeze:function(a){return this.saveFeatureState?this.createdOffline(a)?OpenLayers.State.INSERT:a.state:this.NULL_FEATURE_STATE},
"delete":function(a,b){a instanceof Array||(a=[a]);var b=OpenLayers.Util.applyDefaults(b,this.options),c,d,e;for(c=0,d=a.length;c<d;c++)if(e=a[c],this.saveFeatureState&&!this.createdOffline(e)){var f=e.clone();f.fid=e.fid;if(f.geometry)f.geometry.destroy(),f.geometry=null;f.state=e.state;this.createOrUpdate(f)}else this.db.execute("DELETE FROM "+this.tableName+" WHERE fid = ?",[e.fid]);c=new OpenLayers.Protocol.Response({code:OpenLayers.Protocol.Response.SUCCESS,requestType:"delete",reqFeatures:a});
b&&b.callback&&b.callback.call(b.scope,c);return c},createdOffline:function(a){return"string"==typeof a.fid&&!!a.fid.match(this.fidRegExp)},commit:function(a,b){function c(a){if(++g<f)a.last=!1;this.callUserCallback(b,a)}for(var d,e=[],f=0,g=0,h=[],j=[],k=[],l=a.length-1;0<=l;l--)switch(d=a[l],d.state){case OpenLayers.State.INSERT:h.push(d);break;case OpenLayers.State.UPDATE:j.push(d);break;case OpenLayers.State.DELETE:k.push(d)}0<h.length&&(f++,d=OpenLayers.Util.applyDefaults({callback:c,scope:this},
b.create),e.push(this.create(h,d)));0<j.length&&(f++,d=OpenLayers.Util.applyDefaults({callback:c,scope:this},b.update),e.push(this.update(j,d)));0<k.length&&(f++,d=OpenLayers.Util.applyDefaults({callback:c,scope:this},b["delete"]),e.push(this["delete"](k,d)));return e},clear:function(){this.db.execute("DELETE FROM "+this.tableName)},callUserCallback:function(a,b){var c=a[b.requestType];c&&c.callback&&c.callback.call(c.scope,b);b.last&&a.callback&&a.callback.call(a.scope)},CLASS_NAME:"OpenLayers.Protocol.SQL.Gears"});
OpenLayers.Rule=OpenLayers.Class({id:null,name:null,title:null,description:null,context:null,filter:null,elseFilter:!1,symbolizer:null,symbolizers:null,minScaleDenominator:null,maxScaleDenominator:null,initialize:function(a){this.symbolizer={};OpenLayers.Util.extend(this,a);this.symbolizers&&delete this.symbolizer;this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")},destroy:function(){for(var a in this.symbolizer)this.symbolizer[a]=null;this.symbolizer=null;delete this.symbolizers},evaluate:function(a){var b=
this.getContext(a),c=!0;if(this.minScaleDenominator||this.maxScaleDenominator)var d=a.layer.map.getScale();this.minScaleDenominator&&(c=d>=OpenLayers.Style.createLiteral(this.minScaleDenominator,b));c&&this.maxScaleDenominator&&(c=d<OpenLayers.Style.createLiteral(this.maxScaleDenominator,b));c&&this.filter&&(c="OpenLayers.Filter.FeatureId"==this.filter.CLASS_NAME?this.filter.evaluate(a):this.filter.evaluate(b));return c},getContext:function(a){var b=this.context;b||(b=a.attributes||a.data);"function"==
typeof this.context&&(b=this.context(a));return b},clone:function(){var a=OpenLayers.Util.extend({},this);if(this.symbolizers){var b=this.symbolizers.length;a.symbolizers=Array(b);for(var c=0;c<b;++c)a.symbolizers[c]=this.symbolizers[c].clone()}else{a.symbolizer={};for(var d in this.symbolizer)b=this.symbolizer[d],c=typeof b,"object"===c?a.symbolizer[d]=OpenLayers.Util.extend({},b):"string"===c&&(a.symbolizer[d]=b)}a.filter=this.filter&&this.filter.clone();a.context=this.context&&OpenLayers.Util.extend({},
this.context);return new OpenLayers.Rule(a)},CLASS_NAME:"OpenLayers.Rule"});
OpenLayers.StyleMap=OpenLayers.Class({styles:null,extendDefault:!0,initialize:function(a,b){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(a instanceof OpenLayers.Style)this.styles["default"]=a,this.styles.select=a,this.styles.temporary=a,this.styles["delete"]=
a;else if("object"==typeof a)for(var c in a)if(a[c]instanceof OpenLayers.Style)this.styles[c]=a[c];else if("object"==typeof a[c])this.styles[c]=new OpenLayers.Style(a[c]);else{this.styles["default"]=new OpenLayers.Style(a);this.styles.select=new OpenLayers.Style(a);this.styles.temporary=new OpenLayers.Style(a);this.styles["delete"]=new OpenLayers.Style(a);break}OpenLayers.Util.extend(this,b)},destroy:function(){for(var a in this.styles)this.styles[a].destroy();this.styles=null},createSymbolizer:function(a,
b){a||(a=new OpenLayers.Feature.Vector);this.styles[b]||(b="default");a.renderIntent=b;var c={};this.extendDefault&&"default"!=b&&(c=this.styles["default"].createSymbolizer(a));return OpenLayers.Util.extend(c,this.styles[b].createSymbolizer(a))},addUniqueValueRules:function(a,b,c,d){var e=[],f;for(f in c)e.push(new OpenLayers.Rule({symbolizer:c[f],context:d,filter:new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.EQUAL_TO,property:b,value:f})}));this.styles[a].addRules(e)},CLASS_NAME:"OpenLayers.StyleMap"});
OpenLayers.Control.NavToolbar=OpenLayers.Class(OpenLayers.Control.Panel,{initialize:function(a){OpenLayers.Control.Panel.prototype.initialize.apply(this,[a]);this.addControls([new OpenLayers.Control.Navigation,new OpenLayers.Control.ZoomBox])},draw:function(){var a=OpenLayers.Control.Panel.prototype.draw.apply(this,arguments);this.activateControl(this.controls[0]);return a},CLASS_NAME:"OpenLayers.Control.NavToolbar"});
OpenLayers.Filter.Comparison=OpenLayers.Class(OpenLayers.Filter,{type:null,property:null,value:null,matchCase:!0,lowerBoundary:null,upperBoundary:null,initialize:function(a){OpenLayers.Filter.prototype.initialize.apply(this,[a])},evaluate:function(a){if(a instanceof OpenLayers.Feature.Vector)a=a.attributes;var b=!1,a=a[this.property];switch(this.type){case OpenLayers.Filter.Comparison.EQUAL_TO:b=this.value;b=!this.matchCase&&"string"==typeof a&&"string"==typeof b?a.toUpperCase()==b.toUpperCase():
a==b;break;case OpenLayers.Filter.Comparison.NOT_EQUAL_TO:b=this.value;b=!this.matchCase&&"string"==typeof a&&"string"==typeof b?a.toUpperCase()!=b.toUpperCase():a!=b;break;case OpenLayers.Filter.Comparison.LESS_THAN:b=a<this.value;break;case OpenLayers.Filter.Comparison.GREATER_THAN:b=a>this.value;break;case OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO:b=a<=this.value;break;case OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO:b=a>=this.value;break;case OpenLayers.Filter.Comparison.BETWEEN:b=
a>=this.lowerBoundary&&a<=this.upperBoundary;break;case OpenLayers.Filter.Comparison.LIKE:b=RegExp(this.value,"gi").test(a)}return b},value2regex:function(a,b,c){if("."==a)return OpenLayers.Console.error("'.' is an unsupported wildCard character for OpenLayers.Filter.Comparison"),null;a=a?a:"*";b=b?b:".";this.value=this.value.replace(RegExp("\\"+(c?c:"!")+"(.|$)","g"),"\\$1");this.value=this.value.replace(RegExp("\\"+b,"g"),".");this.value=this.value.replace(RegExp("\\"+a,"g"),".*");this.value=this.value.replace(RegExp("\\\\.\\*",
"g"),"\\"+a);return this.value=this.value.replace(RegExp("\\\\\\.","g"),"\\"+b)},regex2value:function(){var a=this.value,a=a.replace(/!/g,"!!"),a=a.replace(/(\\)?\\\./g,function(a,c){return c?a:"!."}),a=a.replace(/(\\)?\\\*/g,function(a,c){return c?a:"!*"}),a=a.replace(/\\\\/g,"\\");return a=a.replace(/\.\*/g,"*")},clone:function(){return OpenLayers.Util.extend(new OpenLayers.Filter.Comparison,this)},CLASS_NAME:"OpenLayers.Filter.Comparison"});OpenLayers.Filter.Comparison.EQUAL_TO="==";
OpenLayers.Filter.Comparison.NOT_EQUAL_TO="!=";OpenLayers.Filter.Comparison.LESS_THAN="<";OpenLayers.Filter.Comparison.GREATER_THAN=">";OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO="<=";OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO=">=";OpenLayers.Filter.Comparison.BETWEEN="..";OpenLayers.Filter.Comparison.LIKE="~";
OpenLayers.Filter.FeatureId=OpenLayers.Class(OpenLayers.Filter,{fids:null,initialize:function(a){this.fids=[];OpenLayers.Filter.prototype.initialize.apply(this,[a])},evaluate:function(a){for(var b=0,c=this.fids.length;b<c;b++)if((a.fid||a.id)==this.fids[b])return!0;return!1},clone:function(){var a=new OpenLayers.Filter.FeatureId;OpenLayers.Util.extend(a,this);a.fids=this.fids.slice();return a},CLASS_NAME:"OpenLayers.Filter.FeatureId"});
OpenLayers.Filter.Logical=OpenLayers.Class(OpenLayers.Filter,{filters:null,type:null,initialize:function(a){this.filters=[];OpenLayers.Filter.prototype.initialize.apply(this,[a])},destroy:function(){this.filters=null;OpenLayers.Filter.prototype.destroy.apply(this)},evaluate:function(a){switch(this.type){case OpenLayers.Filter.Logical.AND:for(var b=0,c=this.filters.length;b<c;b++)if(!1==this.filters[b].evaluate(a))return!1;return!0;case OpenLayers.Filter.Logical.OR:b=0;for(c=this.filters.length;b<
c;b++)if(!0==this.filters[b].evaluate(a))return!0;return!1;case OpenLayers.Filter.Logical.NOT:return!this.filters[0].evaluate(a)}},clone:function(){for(var a=[],b=0,c=this.filters.length;b<c;++b)a.push(this.filters[b].clone());return new OpenLayers.Filter.Logical({type:this.type,filters:a})},CLASS_NAME:"OpenLayers.Filter.Logical"});OpenLayers.Filter.Logical.AND="&&";OpenLayers.Filter.Logical.OR="||";OpenLayers.Filter.Logical.NOT="!";
OpenLayers.Filter.Spatial=OpenLayers.Class(OpenLayers.Filter,{type:null,property:null,value:null,distance:null,distanceUnits:null,initialize:function(a){OpenLayers.Filter.prototype.initialize.apply(this,[a])},evaluate:function(a){var b=!1;switch(this.type){case OpenLayers.Filter.Spatial.BBOX:case OpenLayers.Filter.Spatial.INTERSECTS:if(a.geometry){var c=this.value;"OpenLayers.Bounds"==this.value.CLASS_NAME&&(c=this.value.toGeometry());a.geometry.intersects(c)&&(b=!0)}break;default:OpenLayers.Console.error(OpenLayers.i18n("filterEvaluateNotImplemented"))}return b},
clone:function(){var a=OpenLayers.Util.applyDefaults({value:this.value&&this.value.clone&&this.value.clone()},this);return new OpenLayers.Filter.Spatial(a)},CLASS_NAME:"OpenLayers.Filter.Spatial"});OpenLayers.Filter.Spatial.BBOX="BBOX";OpenLayers.Filter.Spatial.INTERSECTS="INTERSECTS";OpenLayers.Filter.Spatial.DWITHIN="DWITHIN";OpenLayers.Filter.Spatial.WITHIN="WITHIN";OpenLayers.Filter.Spatial.CONTAINS="CONTAINS";
OpenLayers.Geometry.Collection=OpenLayers.Class(OpenLayers.Geometry,{components:null,componentTypes:null,initialize:function(a){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);this.components=[];null!=a&&this.addComponents(a)},destroy:function(){this.components.length=0;this.components=null;OpenLayers.Geometry.prototype.destroy.apply(this,arguments)},clone:function(){for(var a=eval("new "+this.CLASS_NAME+"()"),b=0,c=this.components.length;b<c;b++)a.addComponent(this.components[b].clone());
OpenLayers.Util.applyDefaults(a,this);return a},getComponentsString:function(){for(var a=[],b=0,c=this.components.length;b<c;b++)a.push(this.components[b].toShortString());return a.join(",")},calculateBounds:function(){this.bounds=null;if(this.components&&0<this.components.length){this.setBounds(this.components[0].getBounds());for(var a=1,b=this.components.length;a<b;a++)this.extendBounds(this.components[a].getBounds())}},addComponents:function(a){a instanceof Array||(a=[a]);for(var b=0,c=a.length;b<
c;b++)this.addComponent(a[b])},addComponent:function(a,b){var c=!1;if(a&&(null==this.componentTypes||-1<OpenLayers.Util.indexOf(this.componentTypes,a.CLASS_NAME))){if(null!=b&&b<this.components.length){var c=this.components.slice(0,b),d=this.components.slice(b,this.components.length);c.push(a);this.components=c.concat(d)}else this.components.push(a);a.parent=this;this.clearBounds();c=!0}return c},removeComponents:function(a){a instanceof Array||(a=[a]);for(var b=a.length-1;0<=b;--b)this.removeComponent(a[b])},
removeComponent:function(a){OpenLayers.Util.removeItem(this.components,a);this.clearBounds()},getLength:function(){for(var a=0,b=0,c=this.components.length;b<c;b++)a+=this.components[b].getLength();return a},getArea:function(){for(var a=0,b=0,c=this.components.length;b<c;b++)a+=this.components[b].getArea();return a},getGeodesicArea:function(a){for(var b=0,c=0,d=this.components.length;c<d;c++)b+=this.components[c].getGeodesicArea(a);return b},getCentroid:function(a){if(!a)return this.components.length&&
this.components[0].getCentroid();a=this.components.length;if(!a)return!1;for(var b=[],c=[],d=0,e=Number.MAX_VALUE,f,g=0;g<a;++g){f=this.components[g];var h=f.getArea();f=f.getCentroid(!0);!isNaN(h)&&!isNaN(f.x)&&!isNaN(f.y)&&(b.push(h),d+=h,e=h<e&&0<h?h:e,c.push(f))}a=b.length;if(0===d){for(g=0;g<a;++g)b[g]=1;d=b.length}else{for(g=0;g<a;++g)b[g]/=e;d/=e}for(var j=e=0,g=0;g<a;++g)f=c[g],h=b[g],e+=f.x*h,j+=f.y*h;return new OpenLayers.Geometry.Point(e/d,j/d)},getGeodesicLength:function(a){for(var b=
0,c=0,d=this.components.length;c<d;c++)b+=this.components[c].getGeodesicLength(a);return b},move:function(a,b){for(var c=0,d=this.components.length;c<d;c++)this.components[c].move(a,b)},rotate:function(a,b){for(var c=0,d=this.components.length;c<d;++c)this.components[c].rotate(a,b)},resize:function(a,b,c){for(var d=0;d<this.components.length;++d)this.components[d].resize(a,b,c);return this},distanceTo:function(a,b){for(var c=!(b&&!1===b.edge)&&b&&b.details,d,e,f,g=Number.POSITIVE_INFINITY,h=0,j=this.components.length;h<
j&&!(d=this.components[h].distanceTo(a,b),f=c?d.distance:d,f<g&&(g=f,e=d,0==g));++h);return e},equals:function(a){var b=!0;if(!a||!a.CLASS_NAME||this.CLASS_NAME!=a.CLASS_NAME)b=!1;else if(!(a.components instanceof Array)||a.components.length!=this.components.length)b=!1;else for(var c=0,d=this.components.length;c<d;++c)if(!this.components[c].equals(a.components[c])){b=!1;break}return b},transform:function(a,b){if(a&&b){for(var c=0,d=this.components.length;c<d;c++)this.components[c].transform(a,b);
this.bounds=null}return this},intersects:function(a){for(var b=!1,c=0,d=this.components.length;c<d&&!(b=a.intersects(this.components[c]));++c);return b},getVertices:function(a){for(var b=[],c=0,d=this.components.length;c<d;++c)Array.prototype.push.apply(b,this.components[c].getVertices(a));return b},CLASS_NAME:"OpenLayers.Geometry.Collection"});
OpenLayers.Geometry.Point=OpenLayers.Class(OpenLayers.Geometry,{x:null,y:null,initialize:function(a,b){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);this.x=parseFloat(a);this.y=parseFloat(b)},clone:function(a){null==a&&(a=new OpenLayers.Geometry.Point(this.x,this.y));OpenLayers.Util.applyDefaults(a,this);return a},calculateBounds:function(){this.bounds=new OpenLayers.Bounds(this.x,this.y,this.x,this.y)},distanceTo:function(a,b){var c=!(b&&!1===b.edge)&&b&&b.details,d,e,f,g,h;a instanceof
OpenLayers.Geometry.Point?(e=this.x,f=this.y,g=a.x,h=a.y,d=Math.sqrt(Math.pow(e-g,2)+Math.pow(f-h,2)),d=!c?d:{x0:e,y0:f,x1:g,y1:h,distance:d}):(d=a.distanceTo(this,b),c&&(d={x0:d.x1,y0:d.y1,x1:d.x0,y1:d.y0,distance:d.distance}));return d},equals:function(a){var b=!1;null!=a&&(b=this.x==a.x&&this.y==a.y||isNaN(this.x)&&isNaN(this.y)&&isNaN(a.x)&&isNaN(a.y));return b},toShortString:function(){return this.x+", "+this.y},move:function(a,b){this.x+=a;this.y+=b;this.clearBounds()},rotate:function(a,b){var a=
a*(Math.PI/180),c=this.distanceTo(b),d=a+Math.atan2(this.y-b.y,this.x-b.x);this.x=b.x+c*Math.cos(d);this.y=b.y+c*Math.sin(d);this.clearBounds()},getCentroid:function(){return new OpenLayers.Geometry.Point(this.x,this.y)},resize:function(a,b,c){this.x=b.x+a*(void 0==c?1:c)*(this.x-b.x);this.y=b.y+a*(this.y-b.y);this.clearBounds();return this},intersects:function(a){var b=!1;return b="OpenLayers.Geometry.Point"==a.CLASS_NAME?this.equals(a):a.intersects(this)},transform:function(a,b){if(a&&b)OpenLayers.Projection.transform(this,
a,b),this.bounds=null;return this},getVertices:function(){return[this]},CLASS_NAME:"OpenLayers.Geometry.Point"});
OpenLayers.Geometry.Rectangle=OpenLayers.Class(OpenLayers.Geometry,{x:null,y:null,width:null,height:null,initialize:function(a,b,c,d){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);this.x=a;this.y=b;this.width=c;this.height=d},calculateBounds:function(){this.bounds=new OpenLayers.Bounds(this.x,this.y,this.x+this.width,this.y+this.height)},getLength:function(){return 2*this.width+2*this.height},getArea:function(){return this.width*this.height},CLASS_NAME:"OpenLayers.Geometry.Rectangle"});
OpenLayers.Geometry.Surface=OpenLayers.Class(OpenLayers.Geometry,{initialize:function(){OpenLayers.Geometry.prototype.initialize.apply(this,arguments)},CLASS_NAME:"OpenLayers.Geometry.Surface"});
OpenLayers.Layer.KaMapCache=OpenLayers.Class(OpenLayers.Layer.KaMap,{IMAGE_EXTENSIONS:{jpeg:"jpg",gif:"gif",png:"png",png8:"png",png24:"png",dithered:"png"},DEFAULT_FORMAT:"jpeg",initialize:function(a,b,c,d){OpenLayers.Layer.KaMap.prototype.initialize.apply(this,arguments);this.extension=this.IMAGE_EXTENSIONS[this.params.i.toLowerCase()||DEFAULT_FORMAT]},getURL:function(a){var a=this.adjustBounds(a),b=this.map.getResolution(),c=Math.round(1E4*this.map.getScale())/1E4,d=Math.round(a.left/b),a=-Math.round(a.top/
b),b=Math.floor(d/this.tileSize.w/this.params.metaTileSize.w)*this.tileSize.w*this.params.metaTileSize.w,e=Math.floor(a/this.tileSize.h/this.params.metaTileSize.h)*this.tileSize.h*this.params.metaTileSize.h,f=this.url;f instanceof Array&&(f=this.selectUrl(paramsString,f));return[f,"/",this.params.map,"/",c,"/",this.params.g.replace(/\s/g,"_"),"/def/t",e,"/l",b,"/t",a,"l",d,".",this.extension].join("")},CLASS_NAME:"OpenLayers.Layer.KaMapCache"});
OpenLayers.Layer.MapServer.Untiled=OpenLayers.Class(OpenLayers.Layer.MapServer,{singleTile:!0,initialize:function(a,b,c,d){OpenLayers.Layer.MapServer.prototype.initialize.apply(this,arguments);OpenLayers.Console.warn("The OpenLayers.Layer.MapServer.Untiled class is deprecated and will be removed in 3.0. Instead, you should use the normal OpenLayers.Layer.MapServer class, passing it the option 'singleTile' as true.")},clone:function(a){null==a&&(a=new OpenLayers.Layer.MapServer.Untiled(this.name,this.url,
this.params,this.getOptions()));return a=OpenLayers.Layer.MapServer.prototype.clone.apply(this,[a])},CLASS_NAME:"OpenLayers.Layer.MapServer.Untiled"});
OpenLayers.Layer.Vector=OpenLayers.Class(OpenLayers.Layer,{EVENT_TYPES:"beforefeatureadded,beforefeaturesadded,featureadded,featuresadded,beforefeatureremoved,beforefeaturesremoved,featureremoved,featuresremoved,beforefeatureselected,featureselected,featureunselected,beforefeaturemodified,featuremodified,afterfeaturemodified,vertexmodified,sketchstarted,sketchmodified,sketchcomplete,refresh".split(","),isBaseLayer:!1,isFixed:!1,isVector:!0,features:null,filter:null,selectedFeatures:null,unrenderedFeatures:null,
reportError:!0,style:null,styleMap:null,strategies:null,protocol:null,renderers:["SVG","VML","Canvas"],renderer:null,rendererOptions:null,geometryType:null,drawn:!1,initialize:function(a,b){this.EVENT_TYPES=OpenLayers.Layer.Vector.prototype.EVENT_TYPES.concat(OpenLayers.Layer.prototype.EVENT_TYPES);OpenLayers.Layer.prototype.initialize.apply(this,arguments);(!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 c=0,d=this.strategies.length;c<d;c++)this.strategies[c].setLayer(this)},destroy:function(){if(this.strategies){var a,b,c;for(b=0,c=this.strategies.length;b<c;b++)a=this.strategies[b],a.autoDestroy&&a.destroy();this.strategies=null}if(this.protocol)this.protocol.autoDestroy&&this.protocol.destroy(),this.protocol=null;this.destroyFeatures();this.unrenderedFeatures=
this.selectedFeatures=this.features=null;this.renderer&&this.renderer.destroy();this.drawn=this.geometryType=this.renderer=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments)},clone:function(a){null==a&&(a=new OpenLayers.Layer.Vector(this.name,this.getOptions()));for(var a=OpenLayers.Layer.prototype.clone.apply(this,[a]),b=this.features,c=b.length,d=Array(c),e=0;e<c;++e)d[e]=b[e].clone();a.features=d;return a},refresh:function(a){this.calculateInRange()&&this.visibility&&this.events.triggerEvent("refresh",
a)},assignRenderer:function(){for(var a=0,b=this.renderers.length;a<b;a++){var c=this.renderers[a];if((c="function"==typeof c?c:OpenLayers.Renderer[c])&&c.prototype.supported()){this.renderer=new c(this.div,this.rendererOptions);break}}},displayError:function(){this.reportError&&OpenLayers.Console.userError(OpenLayers.i18n("browserNotSupported",{renderers:this.renderers.join("\n")}))},setMap:function(a){OpenLayers.Layer.prototype.setMap.apply(this,arguments);this.renderer?(this.renderer.map=this.map,
this.renderer.setSize(this.map.getSize())):this.map.removeLayer(this)},afterAdd:function(){if(this.strategies){var a,b,c;for(b=0,c=this.strategies.length;b<c;b++)a=this.strategies[b],a.autoActivate&&a.activate()}},removeMap:function(){this.drawn=!1;if(this.strategies){var a,b,c;for(b=0,c=this.strategies.length;b<c;b++)a=this.strategies[b],a.autoActivate&&a.deactivate()}},onMapResize:function(){OpenLayers.Layer.prototype.onMapResize.apply(this,arguments);this.renderer.setSize(this.map.getSize())},
moveTo:function(a,b,c){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);var d=!0;if(!c){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";d=this.renderer.setExtent(this.map.getExtent(),b);this.renderer.root.style.visibility="visible";if(-1!=navigator.userAgent.toLowerCase().indexOf("gecko"))this.div.scrollLeft=this.div.scrollLeft;if(!b&&d)for(var e in this.unrenderedFeatures){var f=
this.unrenderedFeatures[e];this.drawFeature(f)}}if(!this.drawn||b||!d){this.drawn=!0;e=0;for(d=this.features.length;e<d;e++)this.renderer.locked=e!==d-1,f=this.features[e],this.drawFeature(f)}},display:function(a){OpenLayers.Layer.prototype.display.apply(this,arguments);var b=this.div.style.display;if(b!=this.renderer.root.style.display)this.renderer.root.style.display=b},addFeatures:function(a,b){a instanceof Array||(a=[a]);var c=!b||!b.silent;if(c){var d={features:a};if(!1===this.events.triggerEvent("beforefeaturesadded",
d))return;a=d.features}for(var d=[],e=0,f=a.length;e<f;e++){this.renderer.locked=e!=a.length-1?!0:!1;var g=a[e];if(this.geometryType&&!(g.geometry instanceof this.geometryType))throw OpenLayers.i18n("componentShouldBe",{geomType:this.geometryType.prototype.CLASS_NAME});g.layer=this;if(!g.style&&this.style)g.style=OpenLayers.Util.extend({},this.style);if(c){if(!1===this.events.triggerEvent("beforefeatureadded",{feature:g}))continue;this.preFeatureInsert(g)}d.push(g);this.features.push(g);this.drawFeature(g);
c&&(this.events.triggerEvent("featureadded",{feature:g}),this.onFeatureInsert(g))}c&&this.events.triggerEvent("featuresadded",{features:d})},removeFeatures:function(a,b){if(a&&0!==a.length){if(a===this.features)return this.removeAllFeatures(b);a instanceof Array||(a=[a]);a===this.selectedFeatures&&(a=a.slice());var c=!b||!b.silent;c&&this.events.triggerEvent("beforefeaturesremoved",{features:a});for(var d=a.length-1;0<=d;d--){this.renderer.locked=0!=d&&a[d-1].geometry?!0:!1;var e=a[d];delete this.unrenderedFeatures[e.id];
c&&this.events.triggerEvent("beforefeatureremoved",{feature:e});this.features=OpenLayers.Util.removeItem(this.features,e);e.layer=null;e.geometry&&this.renderer.eraseFeatures(e);-1!=OpenLayers.Util.indexOf(this.selectedFeatures,e)&&OpenLayers.Util.removeItem(this.selectedFeatures,e);c&&this.events.triggerEvent("featureremoved",{feature:e})}c&&this.events.triggerEvent("featuresremoved",{features:a})}},removeAllFeatures:function(a){var a=!a||!a.silent,b=this.features;a&&this.events.triggerEvent("beforefeaturesremoved",
{features:b});for(var c,d=b.length-1;0<=d;d--)c=b[d],a&&this.events.triggerEvent("beforefeatureremoved",{feature:c}),c.layer=null,a&&this.events.triggerEvent("featureremoved",{feature:c});this.renderer.clear();this.features=[];this.unrenderedFeatures={};this.selectedFeatures=[];a&&this.events.triggerEvent("featuresremoved",{features:b})},destroyFeatures:function(a,b){if(void 0==a)a=this.features;if(a){this.removeFeatures(a,b);for(var c=a.length-1;0<=c;c--)a[c].destroy()}},drawFeature:function(a,b){if(this.drawn){if("object"!=
typeof b){!b&&a.state===OpenLayers.State.DELETE&&(b="delete");var c=b||a.renderIntent;(b=a.style||this.style)||(b=this.styleMap.createSymbolizer(a,c))}this.renderer.drawFeature(a,b)?delete this.unrenderedFeatures[a.id]:this.unrenderedFeatures[a.id]=a}},eraseFeatures:function(a){this.renderer.eraseFeatures(a)},getFeatureFromEvent:function(a){return!this.renderer?(OpenLayers.Console.error(OpenLayers.i18n("getFeatureError")),null):this.getFeatureById(this.renderer.getFeatureIdFromEvent(a))},getFeatureBy:function(a,
b){for(var c=null,d=0,e=this.features.length;d<e;++d)if(this.features[d][a]==b){c=this.features[d];break}return c},getFeatureById:function(a){return this.getFeatureBy("id",a)},getFeatureByFid:function(a){return this.getFeatureBy("fid",a)},onFeatureInsert:function(){},preFeatureInsert:function(){},getDataExtent:function(){var a=null,b=this.features;if(b&&0<b.length)for(var a=new OpenLayers.Bounds,c=null,d=0,e=b.length;d<e;d++)(c=b[d].geometry)&&a.extend(c.getBounds());return a},CLASS_NAME:"OpenLayers.Layer.Vector"});
OpenLayers.Layer.WMS.Post=OpenLayers.Class(OpenLayers.Layer.WMS,{tileClass:null,unsupportedBrowsers:["mozilla","firefox","opera"],SUPPORTED_TRANSITIONS:[],initialize:function(a,b,c,d){var e=[];e.push(a,b,c,d);OpenLayers.Layer.WMS.prototype.initialize.apply(this,e);this.tileClass=-1!=OpenLayers.Util.indexOf(this.unsupportedBrowsers,OpenLayers.Util.getBrowserName())?OpenLayers.Tile.Image:OpenLayers.Tile.Image.IFrame},addTile:function(a,b){return new this.tileClass(this,b,a,null,this.tileSize)},CLASS_NAME:"OpenLayers.Layer.WMS.Post"});
OpenLayers.Layer.WMS.Untiled=OpenLayers.Class(OpenLayers.Layer.WMS,{singleTile:!0,initialize:function(a,b,c,d){OpenLayers.Layer.WMS.prototype.initialize.apply(this,arguments);OpenLayers.Console.warn("The OpenLayers.Layer.WMS.Untiled class is deprecated and will be removed in 3.0. Instead, you should use the normal OpenLayers.Layer.WMS class, passing it the option 'singleTile' as true.")},clone:function(a){null==a&&(a=new OpenLayers.Layer.WMS.Untiled(this.name,this.url,this.params,this.getOptions()));
return a=OpenLayers.Layer.WMS.prototype.clone.apply(this,[a])},CLASS_NAME:"OpenLayers.Layer.WMS.Untiled"});
OpenLayers.Strategy.Filter=OpenLayers.Class(OpenLayers.Strategy,{filter:null,cache:null,caching:!1,initialize:function(a){OpenLayers.Strategy.prototype.initialize.apply(this,[a]);if(!this.filter||!(this.filter instanceof OpenLayers.Filter))throw Error("Filter strategy must be constructed with a filter");},activate:function(){var a=OpenLayers.Strategy.prototype.activate.apply(this,arguments);if(a)this.cache=[],this.layer.events.on({beforefeaturesadded:this.handleAdd,beforefeaturesremoved:this.handleRemove,
scope:this});return a},deactivate:function(){this.cache=null;this.layer&&this.layer.events&&this.layer.events.un({beforefeaturesadded:this.handleAdd,beforefeaturesremoved:this.handleRemove,scope:this});return OpenLayers.Strategy.prototype.deactivate.apply(this,arguments)},handleAdd:function(a){if(!this.caching){var b=a.features;a.features=[];for(var c,d=0,e=b.length;d<e;++d)c=b[d],this.filter.evaluate(c)?a.features.push(c):this.cache.push(c)}},handleRemove:function(){if(!this.caching)this.cache=[]},
setFilter:function(a){this.filter=a;a=this.cache;this.cache=[];this.handleAdd({features:this.layer.features});if(0<this.cache.length)this.caching=!0,this.layer.removeFeatures(this.cache.slice(),{silent:!0}),this.caching=!1;if(0<a.length)a={features:a},this.handleAdd(a),this.caching=!0,this.layer.addFeatures(a.features,{silent:!0}),this.caching=!1},CLASS_NAME:"OpenLayers.Strategy.Filter"});
OpenLayers.Style2=OpenLayers.Class({id:null,name:null,title:null,description:null,layerName:null,isDefault:!1,rules:null,initialize:function(a){OpenLayers.Util.extend(this,a);this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")},destroy:function(){for(var a=0,b=this.rules.length;a<b;a++)this.rules[a].destroy();delete this.rules},clone:function(){var a=OpenLayers.Util.extend({},this);if(this.rules){a.rules=[];for(var b=0,c=this.rules.length;b<c;++b)a.rules.push(this.rules[b].clone())}return new OpenLayers.Style2(a)},
CLASS_NAME:"OpenLayers.Style2"});
OpenLayers.Control.GetFeature=OpenLayers.Class(OpenLayers.Control,{protocol:null,multipleKey:null,toggleKey:null,modifiers:null,multiple:!1,click:!0,single:!0,clickout:!0,toggle:!1,clickTolerance:5,hover:!1,box:!1,maxFeatures:10,features:null,hoverFeature:null,handlerOptions:null,handlers:null,hoverResponse:null,filterType:OpenLayers.Filter.Spatial.BBOX,EVENT_TYPES:"featureselected,featuresselected,featureunselected,clickout,beforefeatureselected,beforefeaturesselected,hoverfeature,outfeature".split(","),initialize:function(a){this.EVENT_TYPES=
OpenLayers.Control.GetFeature.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);a.handlerOptions=a.handlerOptions||{};OpenLayers.Control.prototype.initialize.apply(this,[a]);this.features={};this.handlers={};if(this.click)this.handlers.click=new OpenLayers.Handler.Click(this,{click:this.selectClick},this.handlerOptions.click||{});if(this.box)this.handlers.box=new OpenLayers.Handler.Box(this,{done:this.selectBox},OpenLayers.Util.extend(this.handlerOptions.box,{boxDivClassName:"olHandlerBoxSelectFeature"}));
if(this.hover)this.handlers.hover=new OpenLayers.Handler.Hover(this,{move:this.cancelHover,pause:this.selectHover},OpenLayers.Util.extend(this.handlerOptions.hover,{delay:250}))},activate:function(){if(!this.active)for(var a in this.handlers)this.handlers[a].activate();return OpenLayers.Control.prototype.activate.apply(this,arguments)},deactivate:function(){if(this.active)for(var a in this.handlers)this.handlers[a].deactivate();return OpenLayers.Control.prototype.deactivate.apply(this,arguments)},
selectClick:function(a){var b=this.pixelToBounds(a.xy);this.setModifiers(a);this.request(b,{single:this.single})},selectBox:function(a){var b;if(a instanceof OpenLayers.Bounds)b=this.map.getLonLatFromPixel(new OpenLayers.Pixel(a.left,a.bottom)),a=this.map.getLonLatFromPixel(new OpenLayers.Pixel(a.right,a.top)),b=new OpenLayers.Bounds(b.lon,b.lat,a.lon,a.lat);else{if(this.click)return;b=this.pixelToBounds(a)}this.setModifiers(this.handlers.box.dragHandler.evt);this.request(b)},selectHover:function(a){this.request(this.pixelToBounds(a.xy),
{single:!0,hover:!0})},cancelHover:function(){if(this.hoverResponse)this.protocol.abort(this.hoverResponse),this.hoverResponse=null,OpenLayers.Element.removeClass(this.map.viewPortDiv,"olCursorWait")},request:function(a,b){var b=b||{},c=new OpenLayers.Filter.Spatial({type:this.filterType,value:a});OpenLayers.Element.addClass(this.map.viewPortDiv,"olCursorWait");c=this.protocol.read({maxFeatures:!0==b.single?this.maxFeatures:void 0,filter:c,callback:function(c){c.success()&&(c.features.length?!0==
b.single?this.selectBestFeature(c.features,a.getCenterLonLat(),b):this.select(c.features):b.hover?this.hoverSelect():(this.events.triggerEvent("clickout"),this.clickout&&this.unselectAll()));OpenLayers.Element.removeClass(this.map.viewPortDiv,"olCursorWait")},scope:this});if(!0==b.hover)this.hoverResponse=c},selectBestFeature:function(a,b,c){c=c||{};if(a.length){for(var b=new OpenLayers.Geometry.Point(b.lon,b.lat),d,e,f,g=Number.MAX_VALUE,h=0;h<a.length&&!(d=a[h],d.geometry&&(f=b.distanceTo(d.geometry,
{edge:!1}),f<g&&(g=f,e=d,0==g)));++h);!0==c.hover?this.hoverSelect(e):this.select(e||a)}},setModifiers:function(a){this.modifiers={multiple:this.multiple||this.multipleKey&&a[this.multipleKey],toggle:this.toggle||this.toggleKey&&a[this.toggleKey]}},select:function(a){!this.modifiers.multiple&&!this.modifiers.toggle&&this.unselectAll();a instanceof Array||(a=[a]);var b=this.events.triggerEvent("beforefeaturesselected",{features:a});if(!1!==b){for(var c=[],d,e=0,f=a.length;e<f;++e)d=a[e],this.features[d.fid||
d.id]?this.modifiers.toggle&&this.unselect(this.features[d.fid||d.id]):(b=this.events.triggerEvent("beforefeatureselected",{feature:d}),!1!==b&&(this.features[d.fid||d.id]=d,c.push(d),this.events.triggerEvent("featureselected",{feature:d})));this.events.triggerEvent("featuresselected",{features:c})}},hoverSelect:function(a){var b=a?a.fid||a.id:null,c=this.hoverFeature?this.hoverFeature.fid||this.hoverFeature.id:null;if(c&&c!=b)this.events.triggerEvent("outfeature",{feature:this.hoverFeature}),this.hoverFeature=
null;if(b&&b!=c)this.events.triggerEvent("hoverfeature",{feature:a}),this.hoverFeature=a},unselect:function(a){delete this.features[a.fid||a.id];this.events.triggerEvent("featureunselected",{feature:a})},unselectAll:function(){for(var a in this.features)this.unselect(this.features[a])},setMap:function(a){for(var b in this.handlers)this.handlers[b].setMap(a);OpenLayers.Control.prototype.setMap.apply(this,arguments)},pixelToBounds:function(a){var b=a.add(-this.clickTolerance/2,this.clickTolerance/2),
a=a.add(this.clickTolerance/2,-this.clickTolerance/2),b=this.map.getLonLatFromPixel(b),a=this.map.getLonLatFromPixel(a);return new OpenLayers.Bounds(b.lon,b.lat,a.lon,a.lat)},CLASS_NAME:"OpenLayers.Control.GetFeature"});
OpenLayers.Control.Snapping=OpenLayers.Class(OpenLayers.Control,{EVENT_TYPES:["beforesnap","snap","unsnap"],DEFAULTS:{tolerance:10,node:!0,edge:!0,vertex:!0},greedy:!0,precedence:["node","vertex","edge"],resolution:null,geoToleranceCache:null,layer:null,feature:null,point:null,initialize:function(a){Array.prototype.push.apply(this.EVENT_TYPES,OpenLayers.Control.prototype.EVENT_TYPES);OpenLayers.Control.prototype.initialize.apply(this,[a]);this.options=a||{};this.options.layer&&this.setLayer(this.options.layer);
a=OpenLayers.Util.extend({},this.options.defaults);this.defaults=OpenLayers.Util.applyDefaults(a,this.DEFAULTS);this.setTargets(this.options.targets);0===this.targets.length&&this.layer&&this.addTargetLayer(this.layer);this.geoToleranceCache={}},setLayer:function(a){this.active?(this.deactivate(),this.layer=a,this.activate()):this.layer=a},setTargets:function(a){this.targets=[];if(a&&a.length)for(var b,c=0,d=a.length;c<d;++c)b=a[c],b instanceof OpenLayers.Layer.Vector?this.addTargetLayer(b):this.addTarget(b)},
addTargetLayer:function(a){this.addTarget({layer:a})},addTarget:function(a){a=OpenLayers.Util.applyDefaults(a,this.defaults);a.nodeTolerance=a.nodeTolerance||a.tolerance;a.vertexTolerance=a.vertexTolerance||a.tolerance;a.edgeTolerance=a.edgeTolerance||a.tolerance;this.targets.push(a)},removeTargetLayer:function(a){for(var b,c=this.targets.length-1;0<=c;--c)b=this.targets[c],b.layer===a&&this.removeTarget(b)},removeTarget:function(a){return OpenLayers.Util.removeItem(this.targets,a)},activate:function(){var a=
OpenLayers.Control.prototype.activate.call(this);if(a&&this.layer&&this.layer.events)this.layer.events.on({sketchstarted:this.onSketchModified,sketchmodified:this.onSketchModified,vertexmodified:this.onVertexModified,scope:this});return a},deactivate:function(){var a=OpenLayers.Control.prototype.deactivate.call(this);a&&this.layer&&this.layer.events&&this.layer.events.un({sketchstarted:this.onSketchModified,sketchmodified:this.onSketchModified,vertexmodified:this.onVertexModified,scope:this});this.point=
this.feature=null;return a},onSketchModified:function(a){this.feature=a.feature;this.considerSnapping(a.vertex,a.vertex)},onVertexModified:function(a){this.feature=a.feature;var b=this.layer.map.getLonLatFromViewPortPx(a.pixel);this.considerSnapping(a.vertex,new OpenLayers.Geometry.Point(b.lon,b.lat))},considerSnapping:function(a,b){for(var c={rank:Number.POSITIVE_INFINITY,dist:Number.POSITIVE_INFINITY,x:null,y:null},d=!1,e,f,g=0,h=this.targets.length;g<h;++g)if(f=this.targets[g],e=this.testTarget(f,
b))if(this.greedy){c=e;c.target=f;d=!0;break}else if(e.rank<c.rank||e.rank===c.rank&&e.dist<c.dist)c=e,c.target=f,d=!0;if(d)!1!==this.events.triggerEvent("beforesnap",{point:a,x:c.x,y:c.y,distance:c.dist,layer:c.target.layer,snapType:this.precedence[c.rank]})?(a.x=c.x,a.y=c.y,this.point=a,this.events.triggerEvent("snap",{point:a,snapType:this.precedence[c.rank],layer:c.target.layer,distance:c.dist})):d=!1;if(this.point&&!d)a.x=b.x,a.y=b.y,this.point=null,this.events.triggerEvent("unsnap",{point:a})},
testTarget:function(a,b){for(var c={node:this.getGeoTolerance(a.nodeTolerance),vertex:this.getGeoTolerance(a.vertexTolerance),edge:this.getGeoTolerance(a.edgeTolerance)},d=Math.max(c.node,c.vertex,c.edge),e={rank:Number.POSITIVE_INFINITY,dist:Number.POSITIVE_INFINITY},f=!1,g=a.layer.features,h,j,k,l,m,o,n=this.precedence.length,p=new OpenLayers.LonLat(b.x,b.y),r=0,s=g.length;r<s;++r)if(h=g[r],h!==this.feature&&!h._sketch&&h.state!==OpenLayers.State.DELETE&&(!a.filter||a.filter.evaluate(h.attributes))&&
h.atPoint(p,d,d))for(var q=0,t=Math.min(e.rank+1,n);q<t;++q)if(j=this.precedence[q],a[j])if("edge"===j){if(k=h.geometry.distanceTo(b,{details:!0}),m=k.distance,m<=c[j]&&m<e.dist){e={rank:q,dist:m,x:k.x0,y:k.y0};f=!0;break}}else{k=h.geometry.getVertices("node"===j);o=!1;for(var u=0,v=k.length;u<v;++u)if(l=k[u],m=l.distanceTo(b),m<=c[j]&&(q<e.rank||q===e.rank&&m<e.dist))e={rank:q,dist:m,x:l.x,y:l.y},o=f=!0;if(o)break}return f?e:null},getGeoTolerance:function(a){var b=this.layer.map.getResolution();
if(b!==this.resolution)this.resolution=b,this.geoToleranceCache={};var c=this.geoToleranceCache[a];void 0===c&&(c=a*b,this.geoToleranceCache[a]=c);return c},destroy:function(){this.active&&this.deactivate();delete this.layer;delete this.targets;OpenLayers.Control.prototype.destroy.call(this)},CLASS_NAME:"OpenLayers.Control.Snapping"});
OpenLayers.Format.Filter=OpenLayers.Class(OpenLayers.Format.XML,{defaultVersion:"1.0.0",version:null,parser:null,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},write:function(a,b){var c=b&&b.version||this.version||this.defaultVersion;if(!this.parser||this.parser.VERSION!=c){var d=OpenLayers.Format.Filter["v"+c.replace(/\./g,"_")];if(!d)throw"Can't find a Filter parser for version "+c;this.parser=new d(this.options)}return this.parser.write(a)},read:function(a){"string"==
typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));var b=this.version;if(!b)b=this.defaultVersion;if(!this.parser||this.parser.VERSION!=b){var c=OpenLayers.Format.Filter["v"+b.replace(/\./g,"_")];if(!c)throw"Can't find a Filter parser for version "+b;this.parser=new c(this.options)}return this.parser.read(a)},CLASS_NAME:"OpenLayers.Format.Filter"});
OpenLayers.Format.SLD=OpenLayers.Class(OpenLayers.Format.XML,{defaultVersion:"1.0.0",version:null,namedLayersAsArray:!1,parser:null,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},write:function(a,b){var c=b&&b.version||this.version||this.defaultVersion;if(!this.parser||this.parser.VERSION!=c){var d=OpenLayers.Format.SLD["v"+c.replace(/\./g,"_")];if(!d)throw"Can't find a SLD parser for version "+c;this.parser=new d(this.options)}c=this.parser.write(a);return OpenLayers.Format.XML.prototype.write.apply(this,
[c])},read:function(a,b){"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));var c=a.documentElement,d=this.version;if(!d&&(d=c.getAttribute("version"),!d))d=this.defaultVersion;if(!this.parser||this.parser.VERSION!=d){c=OpenLayers.Format.SLD["v"+d.replace(/\./g,"_")];if(!c)throw"Can't find a SLD parser for version "+d;this.parser=new c(this.options)}return this.parser.read(a,b)},CLASS_NAME:"OpenLayers.Format.SLD"});
OpenLayers.Format.Text=OpenLayers.Class(OpenLayers.Format,{defaultStyle:null,extractStyles:!0,initialize:function(a){a=a||{};if(!1!==a.extractStyles)a.defaultStyle={externalGraphic:OpenLayers.Util.getImagesLocation()+"marker.png",graphicWidth:21,graphicHeight:25,graphicXOffset:-10.5,graphicYOffset:-12.5};OpenLayers.Format.prototype.initialize.apply(this,[a])},read:function(a){for(var a=a.split("\n"),b,c=[],d=0;d<a.length-1;d++){var e=a[d].replace(/^\s*/,"").replace(/\s*$/,"");if("#"!=e.charAt(0))if(b){for(var e=
e.split("\t"),f=new OpenLayers.Geometry.Point(0,0),g={},h=this.defaultStyle?OpenLayers.Util.applyDefaults({},this.defaultStyle):null,j=!1,k=0;k<e.length;k++)if(e[k])if("point"==b[k])j=e[k].split(","),f.y=parseFloat(j[0]),f.x=parseFloat(j[1]),j=!0;else if("lat"==b[k])f.y=parseFloat(e[k]),j=!0;else if("lon"==b[k])f.x=parseFloat(e[k]),j=!0;else if("title"==b[k])g.title=e[k];else if("image"==b[k]||"icon"==b[k]&&h)h.externalGraphic=e[k];else if("iconSize"==b[k]&&h){var l=e[k].split(",");h.graphicWidth=
parseFloat(l[0]);h.graphicHeight=parseFloat(l[1])}else"iconOffset"==b[k]&&h?(l=e[k].split(","),h.graphicXOffset=parseFloat(l[0]),h.graphicYOffset=parseFloat(l[1])):"description"==b[k]?g.description=e[k]:"overflow"==b[k]?g.overflow=e[k]:g[b[k]]=e[k];j&&(this.internalProjection&&this.externalProjection&&f.transform(this.externalProjection,this.internalProjection),e=new OpenLayers.Feature.Vector(f,g,h),c.push(e))}else b=e.split("\t")}return c},CLASS_NAME:"OpenLayers.Format.Text"});
OpenLayers.Geometry.MultiPoint=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.Point"],initialize:function(a){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments)},addPoint:function(a,b){this.addComponent(a,b)},removePoint:function(a){this.removeComponent(a)},CLASS_NAME:"OpenLayers.Geometry.MultiPoint"});
OpenLayers.Handler.Point=OpenLayers.Class(OpenLayers.Handler,{point:null,layer:null,multi:!1,drawing:!1,mouseDown:!1,lastDown:null,lastUp:null,persist:!1,layerOptions:null,initialize:function(a,b,c){if(!c||!c.layerOptions||!c.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!1;var a=OpenLayers.Util.extend({displayInLayerSwitcher:!1,
calculateInRange:OpenLayers.Function.True},this.layerOptions);this.layer=new OpenLayers.Layer.Vector(this.CLASS_NAME,a);this.map.addLayer(this.layer);return!0},createFeature:function(a){a=this.map.getLonLatFromPixel(a);this.point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(a.lon,a.lat));this.callback("create",[this.point.geometry,this.point]);this.point.geometry.clearBounds();this.layer.addFeatures([this.point],{silent:!0})},deactivate:function(){if(!OpenLayers.Handler.prototype.deactivate.apply(this,
arguments))return!1;this.drawing&&this.cancel();this.destroyFeature();null!=this.layer.map&&this.layer.destroy(!1);this.layer=null;return!0},destroyFeature:function(){this.layer&&this.layer.destroyFeatures();this.point=null},finalize:function(a){this.mouseDown=this.drawing=!1;this.lastUp=this.lastDown=null;this.callback(a?"cancel":"done",[this.geometryClone()]);(a||!this.persist)&&this.destroyFeature()},cancel:function(){this.finalize(!0)},click:function(a){OpenLayers.Event.stop(a);return!1},dblclick:function(a){OpenLayers.Event.stop(a);
return!1},modifyFeature:function(a){a=this.map.getLonLatFromPixel(a);this.point.geometry.x=a.lon;this.point.geometry.y=a.lat;this.callback("modify",[this.point.geometry,this.point]);this.point.geometry.clearBounds();this.drawFeature()},drawFeature:function(){this.layer.drawFeature(this.point,this.style)},getGeometry:function(){var a=this.point&&this.point.geometry;a&&this.multi&&(a=new OpenLayers.Geometry.MultiPoint([a]));return a},geometryClone:function(){var a=this.getGeometry();return a&&a.clone()},
mousedown:function(a){if(!this.checkModifiers(a)||this.lastDown&&this.lastDown.equals(a.xy))return!0;this.drawing=!0;null==this.lastDown?(this.persist&&this.destroyFeature(),this.createFeature(a.xy)):this.modifyFeature(a.xy);this.lastDown=a.xy;return!1},mousemove:function(a){this.drawing&&this.modifyFeature(a.xy);return!0},mouseup:function(){return this.drawing?(this.finalize(),!1):!0},CLASS_NAME:"OpenLayers.Handler.Point"});
OpenLayers.Layer.GML=OpenLayers.Class(OpenLayers.Layer.Vector,{loaded:!1,format:null,formatOptions:null,initialize:function(a,b,c){var d=[];d.push(a,c);OpenLayers.Layer.Vector.prototype.initialize.apply(this,d);this.url=b},setVisibility:function(a,b){OpenLayers.Layer.Vector.prototype.setVisibility.apply(this,arguments);this.visibility&&!this.loaded&&this.loadGML()},moveTo:function(a,b,c){OpenLayers.Layer.Vector.prototype.moveTo.apply(this,arguments);this.visibility&&!this.loaded&&this.loadGML()},
loadGML:function(){if(!this.loaded)this.events.triggerEvent("loadstart"),OpenLayers.Request.GET({url:this.url,success:this.requestSuccess,failure:this.requestFailure,scope:this}),this.loaded=!0},setUrl:function(a){this.url=a;this.destroyFeatures();this.loaded=!1;this.loadGML()},requestSuccess:function(a){var b=a.responseXML;if(!b||!b.documentElement)b=a.responseText;a={};OpenLayers.Util.extend(a,this.formatOptions);if(this.map&&!this.projection.equals(this.map.getProjectionObject()))a.externalProjection=
this.projection,a.internalProjection=this.map.getProjectionObject();this.addFeatures((this.format?new this.format(a):new OpenLayers.Format.GML(a)).read(b));this.events.triggerEvent("loadend")},requestFailure:function(){OpenLayers.Console.userError(OpenLayers.i18n("errorLoadingGML",{url:this.url}));this.events.triggerEvent("loadend")},CLASS_NAME:"OpenLayers.Layer.GML"});
OpenLayers.Layer.PointTrack=OpenLayers.Class(OpenLayers.Layer.Vector,{dataFrom:null,initialize:function(a,b){OpenLayers.Layer.Vector.prototype.initialize.apply(this,arguments)},addNodes:function(a){if(2>a.length)OpenLayers.Console.error("At least two point features have to be added to createa line from");else{for(var b=Array(a.length-1),c,d,e,f=0,g=a.length;f<g;f++){c=a[f];if(e=c.geometry){if("OpenLayers.Geometry.Point"!=e.CLASS_NAME){OpenLayers.Console.error("Only features with point geometries are supported.");
return}}else e=c.lonlat,e=new OpenLayers.Geometry.Point(e.lon,e.lat);0<f&&(c=null!=this.dataFrom?a[f+this.dataFrom].data||a[f+this.dataFrom].attributes:null,d=new OpenLayers.Geometry.LineString([d,e]),b[f-1]=new OpenLayers.Feature.Vector(d,c));d=e}this.addFeatures(b)}},CLASS_NAME:"OpenLayers.Layer.PointTrack"});OpenLayers.Layer.PointTrack.dataFrom={SOURCE_NODE:-1,TARGET_NODE:0};
OpenLayers.Layer.Vector.RootContainer=OpenLayers.Class(OpenLayers.Layer.Vector,{displayInLayerSwitcher:!1,layers:null,initialize:function(a,b){OpenLayers.Layer.Vector.prototype.initialize.apply(this,arguments)},display:function(){},getFeatureFromEvent:function(a){for(var b=this.layers,c,d=0;d<b.length;d++)if(c=b[d].getFeatureFromEvent(a))return c},setMap:function(a){OpenLayers.Layer.Vector.prototype.setMap.apply(this,arguments);this.collectRoots();a.events.register("changelayer",this,this.handleChangeLayer)},
removeMap:function(a){a.events.unregister("changelayer",this,this.handleChangeLayer);this.resetRoots();OpenLayers.Layer.Vector.prototype.removeMap.apply(this,arguments)},collectRoots:function(){for(var a,b=0;b<this.map.layers.length;++b)a=this.map.layers[b],-1!=OpenLayers.Util.indexOf(this.layers,a)&&a.renderer.moveRoot(this.renderer)},resetRoots:function(){for(var a,b=0;b<this.layers.length;++b)a=this.layers[b],this.renderer&&a.renderer.getRenderLayerId()==this.id&&this.renderer.moveRoot(a.renderer)},
handleChangeLayer:function(a){var b=a.layer;"order"==a.property&&-1!=OpenLayers.Util.indexOf(this.layers,b)&&(this.resetRoots(),this.collectRoots())},CLASS_NAME:"OpenLayers.Layer.Vector.RootContainer"});
OpenLayers.Layer.WFS=OpenLayers.Class(OpenLayers.Layer.Vector,OpenLayers.Layer.Markers,{isBaseLayer:!1,tile:null,ratio:2,DEFAULT_PARAMS:{service:"WFS",version:"1.0.0",request:"GetFeature"},featureClass:null,format:null,formatObject:null,formatOptions:null,vectorMode:!0,encodeBBOX:!1,extractAttributes:!1,initialize:function(a,b,c,d){void 0==d&&(d={});if(d.featureClass||!OpenLayers.Layer.Vector||!OpenLayers.Feature.Vector)this.vectorMode=!1;c=OpenLayers.Util.upperCaseObject(c);OpenLayers.Util.extend(d,
{reportError:!1});var e=[];e.push(a,d);OpenLayers.Layer.Vector.prototype.initialize.apply(this,e);if(!this.renderer||!this.vectorMode){this.vectorMode=!1;if(!d.featureClass)d.featureClass=OpenLayers.Feature.WFS;OpenLayers.Layer.Markers.prototype.initialize.apply(this,e)}if(this.params&&this.params.typename&&!this.options.typename)this.options.typename=this.params.typename;if(!this.options.geometry_column)this.options.geometry_column="the_geom";this.params=OpenLayers.Util.applyDefaults(c,OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS));
this.url=b},destroy:function(){this.vectorMode?OpenLayers.Layer.Vector.prototype.destroy.apply(this,arguments):OpenLayers.Layer.Markers.prototype.destroy.apply(this,arguments);this.tile&&this.tile.destroy();this.format=this.featureClass=this.ratio=this.tile=null;this.formatObject&&this.formatObject.destroy&&this.formatObject.destroy();this.extractAttributes=this.encodeBBOX=this.vectorMode=this.formatOptions=this.formatObject=null},setMap:function(a){if(this.vectorMode){OpenLayers.Layer.Vector.prototype.setMap.apply(this,
arguments);var b={extractAttributes:this.extractAttributes};OpenLayers.Util.extend(b,this.formatOptions);if(this.map&&!this.projection.equals(this.map.getProjectionObject()))b.externalProjection=this.projection,b.internalProjection=this.map.getProjectionObject();this.formatObject=this.format?new this.format(b):new OpenLayers.Format.GML(b)}else OpenLayers.Layer.Markers.prototype.setMap.apply(this,arguments)},moveTo:function(a,b,c){this.vectorMode?OpenLayers.Layer.Vector.prototype.moveTo.apply(this,
arguments):OpenLayers.Layer.Markers.prototype.moveTo.apply(this,arguments);if(c)return!1;b&&this.vectorMode&&this.renderer.clear();if(this.options.minZoomLevel&&(OpenLayers.Console.warn(OpenLayers.i18n("minZoomLevelError")),this.map.getZoom()<this.options.minZoomLevel))return null;null==a&&(a=this.map.getExtent());var d=null==this.tile,e=!d&&!this.tile.bounds.containsBounds(a);if(b||d||!c&&e){var d=a.getCenterLonLat(),e=a.getWidth()*this.ratio,f=a.getHeight()*this.ratio,d=new OpenLayers.Bounds(d.lon-
e/2,d.lat-f/2,d.lon+e/2,d.lat+f/2),e=this.map.getSize();e.w*=this.ratio;e.h*=this.ratio;var f=this.map.getLayerPxFromLonLat(new OpenLayers.LonLat(d.left,d.top)),g=this.getFullRequestString(),h=null,j=this.params.filter||this.params.FILTER,h=j?{FILTER:j}:{BBOX:this.encodeBBOX?d.toBBOX():d.toArray()};if(this.map&&!this.projection.equals(this.map.getProjectionObject())){var k=d.clone();k.transform(this.map.getProjectionObject(),this.projection);if(!j)h.BBOX=this.encodeBBOX?k.toBBOX():k.toArray()}g+=
"&"+OpenLayers.Util.getParameterString(h);if(this.tile)this.vectorMode?(this.destroyFeatures(),this.renderer.clear()):this.clearMarkers(),this.removeTileMonitoringHooks(this.tile),this.tile.destroy(),this.tile=null;this.tile=new OpenLayers.Tile.WFS(this,f,d,g,e);this.addTileMonitoringHooks(this.tile);this.tile.draw()}},addTileMonitoringHooks:function(a){a.onLoadStart=function(){this==this.layer.tile&&this.layer.events.triggerEvent("loadstart")};a.events.register("loadstart",a,a.onLoadStart);a.onLoadEnd=
function(){this==this.layer.tile&&(this.layer.events.triggerEvent("tileloaded"),this.layer.events.triggerEvent("loadend"))};a.events.register("loadend",a,a.onLoadEnd);a.events.register("unload",a,a.onLoadEnd)},removeTileMonitoringHooks:function(a){a.unload();a.events.un({loadstart:a.onLoadStart,loadend:a.onLoadEnd,unload:a.onLoadEnd,scope:a})},onMapResize:function(){this.vectorMode?OpenLayers.Layer.Vector.prototype.onMapResize.apply(this,arguments):OpenLayers.Layer.Markers.prototype.onMapResize.apply(this,
arguments)},display:function(){this.vectorMode?OpenLayers.Layer.Vector.prototype.display.apply(this,arguments):OpenLayers.Layer.Markers.prototype.display.apply(this,arguments)},mergeNewParams:function(a){a=[OpenLayers.Util.upperCaseObject(a)];return OpenLayers.Layer.HTTPRequest.prototype.mergeNewParams.apply(this,a)},clone:function(a){null==a&&(a=new OpenLayers.Layer.WFS(this.name,this.url,this.params,this.getOptions()));return a=this.vectorMode?OpenLayers.Layer.Vector.prototype.clone.apply(this,
[a]):OpenLayers.Layer.Markers.prototype.clone.apply(this,[a])},getFullRequestString:function(a,b){var c=this.projection.getCode()||this.map.getProjection();this.params.SRS="none"==c?null:c;return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,arguments)},commit:function(){if(!this.writer){var a={};if(this.map&&!this.projection.equals(this.map.getProjectionObject()))a.externalProjection=this.projection,a.internalProjection=this.map.getProjectionObject();this.writer=new OpenLayers.Format.WFS(a,
this)}a=this.writer.write(this.features);OpenLayers.Request.POST({url:this.url,data:a,success:this.commitSuccess,failure:this.commitFailure,scope:this})},commitSuccess:function(a){a=a.responseText;if(-1!=a.indexOf("SUCCESS")){this.commitReport(OpenLayers.i18n("commitSuccess",{response:a}));for(a=0;a<this.features.length;a++)this.features[a].state=null}else(-1!=a.indexOf("FAILED")||-1!=a.indexOf("Exception"))&&this.commitReport(OpenLayers.i18n("commitFailed",{response:a}))},commitFailure:function(){},
commitReport:function(a){OpenLayers.Console.userError(a)},refresh:function(){if(this.tile)this.vectorMode?(this.renderer.clear(),this.features.length=0):(this.clearMarkers(),this.markers.length=0),this.tile.draw()},getDataExtent:function(){return this.vectorMode?OpenLayers.Layer.Vector.prototype.getDataExtent.apply(this):OpenLayers.Layer.Markers.prototype.getDataExtent.apply(this)},setOpacity:function(a){this.vectorMode?OpenLayers.Layer.Vector.prototype.setOpacity.apply(this,[a]):OpenLayers.Layer.Markers.prototype.setOpacity.apply(this,
[a])},CLASS_NAME:"OpenLayers.Layer.WFS"});
OpenLayers.Protocol.HTTP=OpenLayers.Class(OpenLayers.Protocol,{url:null,headers:null,params:null,callback:null,scope:null,readWithPOST:!1,wildcarded:!1,initialize:function(a){a=a||{};this.params={};this.headers={};OpenLayers.Protocol.prototype.initialize.apply(this,arguments)},destroy:function(){this.headers=this.params=null;OpenLayers.Protocol.prototype.destroy.apply(this)},read:function(a){OpenLayers.Protocol.prototype.read.apply(this,arguments);a=OpenLayers.Util.applyDefaults(a,this.options);a.params=
OpenLayers.Util.applyDefaults(a.params,this.options.params);if(a.filter)a.params=this.filterToParams(a.filter,a.params);var b=void 0!==a.readWithPOST?a.readWithPOST:this.readWithPOST,c=new OpenLayers.Protocol.Response({requestType:"read"});c.priv=b?OpenLayers.Request.POST({url:a.url,callback:this.createCallback(this.handleRead,c,a),data:OpenLayers.Util.getParameterString(a.params),headers:{"Content-Type":"application/x-www-form-urlencoded"}}):OpenLayers.Request.GET({url:a.url,callback:this.createCallback(this.handleRead,
c,a),params:a.params,headers:a.headers});return c},handleRead:function(a,b){this.handleResponse(a,b)},filterToParams:function(a,b){var b=b||{},c=a.CLASS_NAME,c=c.substring(c.lastIndexOf(".")+1);switch(c){case "Spatial":switch(a.type){case OpenLayers.Filter.Spatial.BBOX:b.bbox=a.value.toArray();break;case OpenLayers.Filter.Spatial.DWITHIN:b.tolerance=a.distance;case OpenLayers.Filter.Spatial.WITHIN:b.lon=a.value.x;b.lat=a.value.y;break;default:OpenLayers.Console.warn("Unknown spatial filter type "+
a.type)}break;case "Comparison":c=OpenLayers.Protocol.HTTP.COMP_TYPE_TO_OP_STR[a.type];if(void 0!==c){var d=a.value;a.type==OpenLayers.Filter.Comparison.LIKE&&(d=this.regex2value(d),this.wildcarded&&(d="%"+d+"%"));b[a.property+"__"+c]=d;b.queryable=b.queryable||[];b.queryable.push(a.property)}else OpenLayers.Console.warn("Unknown comparison filter type "+a.type);break;case "Logical":if(a.type===OpenLayers.Filter.Logical.AND){c=0;for(d=a.filters.length;c<d;c++)b=this.filterToParams(a.filters[c],b)}else OpenLayers.Console.warn("Unsupported logical filter type "+
a.type);break;default:OpenLayers.Console.warn("Unknown filter type "+c)}return b},regex2value:function(a){a=a.replace(/%/g,"\\%");a=a.replace(/\\\\\.(\*)?/g,function(a,c){return c?a:"\\\\_"});a=a.replace(/\\\\\.\*/g,"\\\\%");a=a.replace(/(\\)?\.(\*)?/g,function(a,c,d){return c||d?a:"_"});a=a.replace(/(\\)?\.\*/g,function(a,c){return c?a:"%"});a=a.replace(/\\\./g,".");return a=a.replace(/(\\)?\\\*/g,function(a,c){return c?a:"*"})},create:function(a,b){var b=OpenLayers.Util.applyDefaults(b,this.options),
c=new OpenLayers.Protocol.Response({reqFeatures:a,requestType:"create"});c.priv=OpenLayers.Request.POST({url:b.url,callback:this.createCallback(this.handleCreate,c,b),headers:b.headers,data:this.format.write(a)});return c},handleCreate:function(a,b){this.handleResponse(a,b)},update:function(a,b){var b=b||{},c=b.url||a.url||this.options.url+"/"+a.fid,b=OpenLayers.Util.applyDefaults(b,this.options),d=new OpenLayers.Protocol.Response({reqFeatures:a,requestType:"update"});d.priv=OpenLayers.Request.PUT({url:c,
callback:this.createCallback(this.handleUpdate,d,b),headers:b.headers,data:this.format.write(a)});return d},handleUpdate:function(a,b){this.handleResponse(a,b)},"delete":function(a,b){var b=b||{},c=b.url||a.url||this.options.url+"/"+a.fid,b=OpenLayers.Util.applyDefaults(b,this.options),d=new OpenLayers.Protocol.Response({reqFeatures:a,requestType:"delete"});d.priv=OpenLayers.Request.DELETE({url:c,callback:this.createCallback(this.handleDelete,d,b),headers:b.headers});return d},handleDelete:function(a,
b){this.handleResponse(a,b)},handleResponse:function(a,b){var c=a.priv;if(b.callback){if(200<=c.status&&300>c.status){if("delete"!=a.requestType)a.features=this.parseFeatures(c);a.code=OpenLayers.Protocol.Response.SUCCESS}else a.code=OpenLayers.Protocol.Response.FAILURE;b.callback.call(b.scope,a)}},parseFeatures:function(a){var b=a.responseXML;if(!b||!b.documentElement)b=a.responseText;return!b||0>=b.length?null:this.format.read(b)},commit:function(a,b){function c(a){for(var b=a.features?a.features.length:
0,c=Array(b),e=0;e<b;++e)c[e]=a.features[e].fid;p.insertIds=c;d.apply(this,[a])}function d(a){this.callUserCallback(a,b);n=n&&a.success();f++;if(f>=o&&b.callback)p.code=n?OpenLayers.Protocol.Response.SUCCESS:OpenLayers.Protocol.Response.FAILURE,b.callback.apply(b.scope,[p])}var b=OpenLayers.Util.applyDefaults(b,this.options),e=[],f=0,g={};g[OpenLayers.State.INSERT]=[];g[OpenLayers.State.UPDATE]=[];g[OpenLayers.State.DELETE]=[];for(var h,j,k=[],l=0,m=a.length;l<m;++l)if(h=a[l],j=g[h.state])j.push(h),
k.push(h);var o=(0<g[OpenLayers.State.INSERT].length?1:0)+g[OpenLayers.State.UPDATE].length+g[OpenLayers.State.DELETE].length,n=!0,p=new OpenLayers.Protocol.Response({reqFeatures:k});h=g[OpenLayers.State.INSERT];0<h.length&&e.push(this.create(h,OpenLayers.Util.applyDefaults({callback:c,scope:this},b.create)));h=g[OpenLayers.State.UPDATE];for(l=h.length-1;0<=l;--l)e.push(this.update(h[l],OpenLayers.Util.applyDefaults({callback:d,scope:this},b.update)));h=g[OpenLayers.State.DELETE];for(l=h.length-1;0<=
l;--l)e.push(this["delete"](h[l],OpenLayers.Util.applyDefaults({callback:d,scope:this},b["delete"])));return e},abort:function(a){a&&a.priv.abort()},callUserCallback:function(a,b){var c=b[a.requestType];c&&c.callback&&c.callback.call(c.scope,a)},CLASS_NAME:"OpenLayers.Protocol.HTTP"});
(function(){var a=OpenLayers.Protocol.HTTP.COMP_TYPE_TO_OP_STR={};a[OpenLayers.Filter.Comparison.EQUAL_TO]="eq";a[OpenLayers.Filter.Comparison.NOT_EQUAL_TO]="ne";a[OpenLayers.Filter.Comparison.LESS_THAN]="lt";a[OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO]="lte";a[OpenLayers.Filter.Comparison.GREATER_THAN]="gt";a[OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO]="gte";a[OpenLayers.Filter.Comparison.LIKE]="ilike"})();
OpenLayers.Strategy.BBOX=OpenLayers.Class(OpenLayers.Strategy,{bounds:null,resolution:null,ratio:2,resFactor:null,response:null,initialize:function(a){OpenLayers.Strategy.prototype.initialize.apply(this,[a])},activate:function(){var a=OpenLayers.Strategy.prototype.activate.call(this);a&&(this.layer.events.on({moveend:this.update,scope:this}),this.layer.events.on({refresh:this.update,scope:this}));return a},deactivate:function(){var a=OpenLayers.Strategy.prototype.deactivate.call(this);a&&(this.layer.events.un({moveend:this.update,
scope:this}),this.layer.events.un({refresh:this.update,scope:this}));return a},update:function(a){var b=this.getMapBounds();if(a&&a.force||this.invalidBounds(b))this.calculateBounds(b),this.resolution=this.layer.map.getResolution(),this.triggerRead()},getMapBounds:function(){var a=this.layer.map.getExtent();this.layer.projection.equals(this.layer.map.getProjectionObject())||(a=a.clone().transform(this.layer.map.getProjectionObject(),this.layer.projection));return a},invalidBounds:function(a){a||(a=
this.getMapBounds());a=!this.bounds||!this.bounds.containsBounds(a);!a&&this.resFactor&&(a=this.resolution/this.layer.map.getResolution(),a=a>=this.resFactor||a<=1/this.resFactor);return a},calculateBounds:function(a){a||(a=this.getMapBounds());var b=a.getCenterLonLat(),c=a.getWidth()*this.ratio,a=a.getHeight()*this.ratio;this.bounds=new OpenLayers.Bounds(b.lon-c/2,b.lat-a/2,b.lon+c/2,b.lat+a/2)},triggerRead:function(){this.response&&(this.layer.protocol.abort(this.response),this.layer.events.triggerEvent("loadend"));
this.layer.events.triggerEvent("loadstart");this.response=this.layer.protocol.read({filter:this.createFilter(),callback:this.merge,scope:this})},createFilter:function(){var a=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.BBOX,value:this.bounds,projection:this.layer.projection});this.layer.filter&&(a=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.AND,filters:[this.layer.filter,a]}));return a},merge:function(a){this.layer.destroyFeatures();if((a=a.features)&&0<a.length){var b=
this.layer.projection,c=this.layer.map.getProjectionObject();if(!c.equals(b))for(var d,e=0,f=a.length;e<f;++e)(d=a[e].geometry)&&d.transform(b,c);this.layer.addFeatures(a)}this.response=null;this.layer.events.triggerEvent("loadend")},CLASS_NAME:"OpenLayers.Strategy.BBOX"});
OpenLayers.Control.SelectFeature=OpenLayers.Class(OpenLayers.Control,{EVENT_TYPES:["beforefeaturehighlighted","featurehighlighted","featureunhighlighted"],multipleKey:null,toggleKey:null,multiple:!1,clickout:!0,toggle:!1,hover:!1,highlightOnly:!1,box:!1,onBeforeSelect:function(){},onSelect:function(){},onUnselect:function(){},scope:null,geometryTypes:null,layer:null,layers:null,callbacks:null,selectStyle:null,renderIntent:"select",handlers:null,initialize:function(a,b){this.EVENT_TYPES=OpenLayers.Control.SelectFeature.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);
OpenLayers.Control.prototype.initialize.apply(this,[b]);if(null===this.scope)this.scope=this;this.initLayer(a);var c={click:this.clickFeature,clickout:this.clickoutFeature};if(this.hover)c.over=this.overFeature,c.out=this.outFeature;this.callbacks=OpenLayers.Util.extend(c,this.callbacks);this.handlers={feature:new OpenLayers.Handler.Feature(this,this.layer,this.callbacks,{geometryTypes:this.geometryTypes})};if(this.box)this.handlers.box=new OpenLayers.Handler.Box(this,{done:this.selectBox},{boxDivClassName:"olHandlerBoxSelectFeature"})},
initLayer:function(a){a instanceof Array?(this.layers=a,this.layer=new OpenLayers.Layer.Vector.RootContainer(this.id+"_container",{layers:a})):this.layer=a},destroy:function(){this.active&&this.layers&&this.map.removeLayer(this.layer);OpenLayers.Control.prototype.destroy.apply(this,arguments);this.layers&&this.layer.destroy()},activate:function(){this.active||(this.layers&&this.map.addLayer(this.layer),this.handlers.feature.activate(),this.box&&this.handlers.box&&this.handlers.box.activate());return OpenLayers.Control.prototype.activate.apply(this,
arguments)},deactivate:function(){this.active&&(this.handlers.feature.deactivate(),this.handlers.box&&this.handlers.box.deactivate(),this.layers&&this.map.removeLayer(this.layer));return OpenLayers.Control.prototype.deactivate.apply(this,arguments)},unselectAll:function(a){for(var b=this.layers||[this.layer],c,d,e=0;e<b.length;++e){c=b[e];for(var f=c.selectedFeatures.length-1;0<=f;--f)d=c.selectedFeatures[f],(!a||a.except!=d)&&this.unselect(d)}},clickFeature:function(a){this.hover||(-1<OpenLayers.Util.indexOf(a.layer.selectedFeatures,
a)?this.toggleSelect()?this.unselect(a):this.multipleSelect()||this.unselectAll({except:a}):(this.multipleSelect()||this.unselectAll({except:a}),this.select(a)))},multipleSelect:function(){return this.multiple||this.handlers.feature.evt&&this.handlers.feature.evt[this.multipleKey]},toggleSelect:function(){return this.toggle||this.handlers.feature.evt&&this.handlers.feature.evt[this.toggleKey]},clickoutFeature:function(){!this.hover&&this.clickout&&this.unselectAll()},overFeature:function(a){var b=
a.layer;this.hover&&(this.highlightOnly?this.highlight(a):-1==OpenLayers.Util.indexOf(b.selectedFeatures,a)&&this.select(a))},outFeature:function(a){if(this.hover)if(this.highlightOnly){if(a._lastHighlighter==this.id)if(a._prevHighlighter&&a._prevHighlighter!=this.id){delete a._lastHighlighter;var b=this.map.getControl(a._prevHighlighter);b&&b.highlight(a)}else this.unhighlight(a)}else this.unselect(a)},highlight:function(a){var b=a.layer;if(!1!==this.events.triggerEvent("beforefeaturehighlighted",
{feature:a}))a._prevHighlighter=a._lastHighlighter,a._lastHighlighter=this.id,b.drawFeature(a,this.selectStyle||this.renderIntent),this.events.triggerEvent("featurehighlighted",{feature:a})},unhighlight:function(a){var b=a.layer;a._lastHighlighter=a._prevHighlighter;delete a._prevHighlighter;b.drawFeature(a,a.style||a.layer.style||"default");this.events.triggerEvent("featureunhighlighted",{feature:a})},select:function(a){var b=this.onBeforeSelect.call(this.scope,a),c=a.layer;if(!1!==b&&(b=c.events.triggerEvent("beforefeatureselected",
{feature:a}),!1!==b)){c.selectedFeatures.push(a);this.highlight(a);if(!this.handlers.feature.lastFeature)this.handlers.feature.lastFeature=c.selectedFeatures[0];c.events.triggerEvent("featureselected",{feature:a});this.onSelect.call(this.scope,a)}},unselect:function(a){var b=a.layer;this.unhighlight(a);OpenLayers.Util.removeItem(b.selectedFeatures,a);b.events.triggerEvent("featureunselected",{feature:a});this.onUnselect.call(this.scope,a)},selectBox:function(a){if(a instanceof OpenLayers.Bounds){var b=
this.map.getLonLatFromPixel(new OpenLayers.Pixel(a.left,a.bottom)),a=this.map.getLonLatFromPixel(new OpenLayers.Pixel(a.right,a.top)),b=new OpenLayers.Bounds(b.lon,b.lat,a.lon,a.lat);this.multipleSelect()||this.unselectAll();a=this.multiple;this.multiple=!0;for(var c=this.layers||[this.layer],d,e=0;e<c.length;++e){d=c[e];for(var f=0,g=d.features.length;f<g;++f){var h=d.features[f];h.getVisibility()&&(null==this.geometryTypes||-1<OpenLayers.Util.indexOf(this.geometryTypes,h.geometry.CLASS_NAME))&&
b.toGeometry().intersects(h.geometry)&&-1==OpenLayers.Util.indexOf(d.selectedFeatures,h)&&this.select(h)}}this.multiple=a}},setMap:function(a){this.handlers.feature.setMap(a);this.box&&this.handlers.box.setMap(a);OpenLayers.Control.prototype.setMap.apply(this,arguments)},setLayer:function(a){var b=this.active;this.unselectAll();this.deactivate();if(this.layers)this.layer.destroy(),this.layers=null;this.initLayer(a);this.handlers.feature.layer=this.layer;b&&this.activate()},CLASS_NAME:"OpenLayers.Control.SelectFeature"});
OpenLayers.Format.Filter.v1=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{ogc:"http://www.opengis.net/ogc",gml:"http://www.opengis.net/gml",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},defaultPrefix:"ogc",schemaLocation:null,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},read:function(a){var b={};this.readers.ogc.Filter.apply(this,[a,b]);return b.filter},readers:{ogc:{Filter:function(a,b){var c={fids:[],filters:[]};
this.readChildNodes(a,c);if(0<c.fids.length)b.filter=new OpenLayers.Filter.FeatureId({fids:c.fids});else if(0<c.filters.length)b.filter=c.filters[0]},FeatureId:function(a,b){var c=a.getAttribute("fid");c&&b.fids.push(c)},And:function(a,b){var c=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.AND});this.readChildNodes(a,c);b.filters.push(c)},Or:function(a,b){var c=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.OR});this.readChildNodes(a,c);b.filters.push(c)},Not:function(a,
b){var c=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.NOT});this.readChildNodes(a,c);b.filters.push(c)},PropertyIsLessThan:function(a,b){var c=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.LESS_THAN});this.readChildNodes(a,c);b.filters.push(c)},PropertyIsGreaterThan:function(a,b){var c=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.GREATER_THAN});this.readChildNodes(a,c);b.filters.push(c)},PropertyIsLessThanOrEqualTo:function(a,b){var c=
new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO});this.readChildNodes(a,c);b.filters.push(c)},PropertyIsGreaterThanOrEqualTo:function(a,b){var c=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO});this.readChildNodes(a,c);b.filters.push(c)},PropertyIsBetween:function(a,b){var c=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.BETWEEN});this.readChildNodes(a,c);b.filters.push(c)},Literal:function(a,
b){b.value=OpenLayers.String.numericIf(this.getChildValue(a))},PropertyName:function(a,b){b.property=this.getChildValue(a)},LowerBoundary:function(a,b){b.lowerBoundary=OpenLayers.String.numericIf(this.readOgcExpression(a))},UpperBoundary:function(a,b){b.upperBoundary=OpenLayers.String.numericIf(this.readOgcExpression(a))},Intersects:function(a,b){this.readSpatial(a,b,OpenLayers.Filter.Spatial.INTERSECTS)},Within:function(a,b){this.readSpatial(a,b,OpenLayers.Filter.Spatial.WITHIN)},Contains:function(a,
b){this.readSpatial(a,b,OpenLayers.Filter.Spatial.CONTAINS)},DWithin:function(a,b){this.readSpatial(a,b,OpenLayers.Filter.Spatial.DWITHIN)},Distance:function(a,b){b.distance=parseInt(this.getChildValue(a));b.distanceUnits=a.getAttribute("units")}}},readSpatial:function(a,b,c){c=new OpenLayers.Filter.Spatial({type:c});this.readChildNodes(a,c);c.value=c.components[0];delete c.components;b.filters.push(c)},readOgcExpression:function(a){var b={};this.readChildNodes(a,b);b=b.value;void 0===b&&(b=this.getChildValue(a));
return b},write:function(a){return this.writers.ogc.Filter.apply(this,[a])},writers:{ogc:{Filter:function(a){var b=this.createElementNSPlus("ogc:Filter");if("FeatureId"==a.CLASS_NAME.split(".").pop())for(var c=0;c<a.fids.length;++c)this.writeNode("FeatureId",a.fids[c],b);else this.writeNode(this.getFilterType(a),a,b);return b},FeatureId:function(a){return this.createElementNSPlus("ogc:FeatureId",{attributes:{fid:a}})},And:function(a){for(var b=this.createElementNSPlus("ogc:And"),c,d=0;d<a.filters.length;++d)c=
a.filters[d],this.writeNode(this.getFilterType(c),c,b);return b},Or:function(a){for(var b=this.createElementNSPlus("ogc:Or"),c,d=0;d<a.filters.length;++d)c=a.filters[d],this.writeNode(this.getFilterType(c),c,b);return b},Not:function(a){var b=this.createElementNSPlus("ogc:Not"),a=a.filters[0];this.writeNode(this.getFilterType(a),a,b);return b},PropertyIsLessThan:function(a){var b=this.createElementNSPlus("ogc:PropertyIsLessThan");this.writeNode("PropertyName",a,b);this.writeNode("Literal",a.value,
b);return b},PropertyIsGreaterThan:function(a){var b=this.createElementNSPlus("ogc:PropertyIsGreaterThan");this.writeNode("PropertyName",a,b);this.writeNode("Literal",a.value,b);return b},PropertyIsLessThanOrEqualTo:function(a){var b=this.createElementNSPlus("ogc:PropertyIsLessThanOrEqualTo");this.writeNode("PropertyName",a,b);this.writeNode("Literal",a.value,b);return b},PropertyIsGreaterThanOrEqualTo:function(a){var b=this.createElementNSPlus("ogc:PropertyIsGreaterThanOrEqualTo");this.writeNode("PropertyName",
a,b);this.writeNode("Literal",a.value,b);return b},PropertyIsBetween:function(a){var b=this.createElementNSPlus("ogc:PropertyIsBetween");this.writeNode("PropertyName",a,b);this.writeNode("LowerBoundary",a,b);this.writeNode("UpperBoundary",a,b);return b},PropertyName:function(a){return this.createElementNSPlus("ogc:PropertyName",{value:a.property})},Literal:function(a){return this.createElementNSPlus("ogc:Literal",{value:a})},LowerBoundary:function(a){var b=this.createElementNSPlus("ogc:LowerBoundary");
this.writeNode("Literal",a.lowerBoundary,b);return b},UpperBoundary:function(a){var b=this.createElementNSPlus("ogc:UpperBoundary");this.writeNode("Literal",a.upperBoundary,b);return b},INTERSECTS:function(a){return this.writeSpatial(a,"Intersects")},WITHIN:function(a){return this.writeSpatial(a,"Within")},CONTAINS:function(a){return this.writeSpatial(a,"Contains")},DWITHIN:function(a){var b=this.writeSpatial(a,"DWithin");this.writeNode("Distance",a,b);return b},Distance:function(a){return this.createElementNSPlus("ogc:Distance",
{attributes:{units:a.distanceUnits},value:a.distance})}}},getFilterType:function(a){var b=this.filterMap[a.type];if(!b)throw"Filter writing not supported for rule type: "+a.type;return b},filterMap:{"&&":"And","||":"Or","!":"Not","==":"PropertyIsEqualTo","!=":"PropertyIsNotEqualTo","<":"PropertyIsLessThan",">":"PropertyIsGreaterThan","<=":"PropertyIsLessThanOrEqualTo",">=":"PropertyIsGreaterThanOrEqualTo","..":"PropertyIsBetween","~":"PropertyIsLike",BBOX:"BBOX",DWITHIN:"DWITHIN",WITHIN:"WITHIN",
CONTAINS:"CONTAINS",INTERSECTS:"INTERSECTS"},CLASS_NAME:"OpenLayers.Format.Filter.v1"});
OpenLayers.Geometry.Curve=OpenLayers.Class(OpenLayers.Geometry.MultiPoint,{componentTypes:["OpenLayers.Geometry.Point"],initialize:function(a){OpenLayers.Geometry.MultiPoint.prototype.initialize.apply(this,arguments)},getLength:function(){var a=0;if(this.components&&1<this.components.length)for(var b=1,c=this.components.length;b<c;b++)a+=this.components[b-1].distanceTo(this.components[b]);return a},getGeodesicLength:function(a){var b=this;if(a){var c=new OpenLayers.Projection("EPSG:4326");c.equals(a)||
(b=this.clone().transform(a,c))}a=0;if(b.components&&1<b.components.length)for(var d,e=1,f=b.components.length;e<f;e++)c=b.components[e-1],d=b.components[e],a+=OpenLayers.Util.distVincenty({lon:c.x,lat:c.y},{lon:d.x,lat:d.y});return 1E3*a},CLASS_NAME:"OpenLayers.Geometry.Curve"});
OpenLayers.Layer.Text=OpenLayers.Class(OpenLayers.Layer.Markers,{location:null,features:null,formatOptions:null,selectedFeature:null,initialize:function(a,b){OpenLayers.Layer.Markers.prototype.initialize.apply(this,arguments);this.features=[]},destroy:function(){OpenLayers.Layer.Markers.prototype.destroy.apply(this,arguments);this.clearFeatures();this.features=null},loadText:function(){if(!this.loaded&&null!=this.location)this.events.triggerEvent("loadstart"),OpenLayers.Request.GET({url:this.location,
success:this.parseData,failure:function(){this.events.triggerEvent("loadend")},scope:this}),this.loaded=!0},moveTo:function(a,b,c){OpenLayers.Layer.Markers.prototype.moveTo.apply(this,arguments);this.visibility&&!this.loaded&&this.loadText()},parseData:function(a){var a=a.responseText,b={};OpenLayers.Util.extend(b,this.formatOptions);if(this.map&&!this.projection.equals(this.map.getProjectionObject()))b.externalProjection=this.projection,b.internalProjection=this.map.getProjectionObject();for(var a=
(new OpenLayers.Format.Text(b)).read(a),b=0,c=a.length;b<c;b++){var d={},e=a[b],f,g,h;f=new OpenLayers.LonLat(e.geometry.x,e.geometry.y);e.style.graphicWidth&&e.style.graphicHeight&&(g=new OpenLayers.Size(e.style.graphicWidth,e.style.graphicHeight));void 0!==e.style.graphicXOffset&&void 0!==e.style.graphicYOffset&&(h=new OpenLayers.Pixel(e.style.graphicXOffset,e.style.graphicYOffset));null!=e.style.externalGraphic?d.icon=new OpenLayers.Icon(e.style.externalGraphic,g,h):(d.icon=OpenLayers.Marker.defaultIcon(),
null!=g&&d.icon.setSize(g));null!=e.attributes.title&&null!=e.attributes.description&&(d.popupContentHTML="<h2>"+e.attributes.title+"</h2><p>"+e.attributes.description+"</p>");d.overflow=e.attributes.overflow||"auto";d=new OpenLayers.Feature(this,f,d);this.features.push(d);f=d.createMarker();null!=e.attributes.title&&null!=e.attributes.description&&f.events.register("click",d,this.markerClick);this.addMarker(f)}this.events.triggerEvent("loadend")},markerClick:function(a){var b=this==this.layer.selectedFeature;
this.layer.selectedFeature=!b?this:null;for(var c=0,d=this.layer.map.popups.length;c<d;c++)this.layer.map.removePopup(this.layer.map.popups[c]);b||this.layer.map.addPopup(this.createPopup());OpenLayers.Event.stop(a)},clearFeatures:function(){if(null!=this.features)for(;0<this.features.length;){var a=this.features[0];OpenLayers.Util.removeItem(this.features,a);a.destroy()}},CLASS_NAME:"OpenLayers.Layer.Text"});
OpenLayers.Control.ModifyFeature=OpenLayers.Class(OpenLayers.Control,{geometryTypes:null,clickout:!0,toggle:!0,standalone:!1,layer:null,feature:null,vertices:null,virtualVertices:null,selectControl:null,dragControl:null,handlers:null,deleteCodes:null,virtualStyle:null,mode:null,modified:!1,radiusHandle:null,dragHandle:null,onModificationStart:function(){},onModification:function(){},onModificationEnd:function(){},initialize:function(a,b){this.layer=a;this.vertices=[];this.virtualVertices=[];this.virtualStyle=
OpenLayers.Util.extend({},this.layer.style||this.layer.styleMap.createSymbolizer());this.virtualStyle.fillOpacity=0.3;this.virtualStyle.strokeOpacity=0.3;this.deleteCodes=[46,68];this.mode=OpenLayers.Control.ModifyFeature.RESHAPE;OpenLayers.Control.prototype.initialize.apply(this,[b]);if(!(this.deleteCodes instanceof Array))this.deleteCodes=[this.deleteCodes];var c=this,d={geometryTypes:this.geometryTypes,clickout:this.clickout,toggle:this.toggle,onBeforeSelect:this.beforeSelectFeature,onSelect:this.selectFeature,
onUnselect:this.unselectFeature,scope:this};if(!1===this.standalone)this.selectControl=new OpenLayers.Control.SelectFeature(a,d);this.dragControl=new OpenLayers.Control.DragFeature(a,{geometryTypes:["OpenLayers.Geometry.Point"],snappingOptions:this.snappingOptions,onStart:function(a,b){c.dragStart.apply(c,[a,b])},onDrag:function(a,b){c.dragVertex.apply(c,[a,b])},onComplete:function(a){c.dragComplete.apply(c,[a])},featureCallbacks:{over:function(a){(!0!==c.standalone||a._sketch||c.feature===a)&&c.dragControl.overFeature.apply(c.dragControl,
[a])}}});this.handlers={keyboard:new OpenLayers.Handler.Keyboard(this,{keydown:this.handleKeypress})}},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 a=!1;if(OpenLayers.Control.prototype.deactivate.apply(this,
arguments)){this.layer.removeFeatures(this.vertices,{silent:!0});this.layer.removeFeatures(this.virtualVertices,{silent:!0});this.vertices=[];this.dragControl.deactivate();var b=(a=this.feature)&&a.geometry&&a.layer;!1===this.standalone?(b&&this.selectControl.unselect.apply(this.selectControl,[a]),this.selectControl.deactivate()):b&&this.unselectFeature(a);this.handlers.keyboard.deactivate();a=!0}return a},beforeSelectFeature:function(a){return this.layer.events.triggerEvent("beforefeaturemodified",
{feature:a})},selectFeature:function(a){this.feature=a;this.modified=!1;this.resetVertices();this.dragControl.activate();this.onModificationStart(this.feature)},unselectFeature:function(a){this.layer.removeFeatures(this.vertices,{silent:!0});this.vertices=[];this.layer.destroyFeatures(this.virtualVertices,{silent:!0});this.virtualVertices=[];this.dragHandle&&(this.layer.destroyFeatures([this.dragHandle],{silent:!0}),delete this.dragHandle);this.radiusHandle&&(this.layer.destroyFeatures([this.radiusHandle],
{silent:!0}),delete this.radiusHandle);this.feature=null;this.dragControl.deactivate();this.onModificationEnd(a);this.layer.events.triggerEvent("afterfeaturemodified",{feature:a,modified:this.modified});this.modified=!1},dragStart:function(a,b){if(a!=this.feature&&!a.geometry.parent&&a!=this.dragHandle&&a!=this.radiusHandle&&(!1===this.standalone&&this.feature&&this.selectControl.clickFeature.apply(this.selectControl,[this.feature]),null==this.geometryTypes||-1!=OpenLayers.Util.indexOf(this.geometryTypes,
a.geometry.CLASS_NAME)))this.standalone||this.selectControl.clickFeature.apply(this.selectControl,[a]),this.dragControl.overFeature.apply(this.dragControl,[a]),this.dragControl.lastPixel=b,this.dragControl.handlers.drag.started=!0,this.dragControl.handlers.drag.start=b,this.dragControl.handlers.drag.last=b},dragVertex:function(a,b){this.modified=!0;if("OpenLayers.Geometry.Point"==this.feature.geometry.CLASS_NAME){if(this.feature!=a)this.feature=a;this.layer.events.triggerEvent("vertexmodified",{vertex:a.geometry,
feature:this.feature,pixel:b})}else{if(a._index)a.geometry.parent.addComponent(a.geometry,a._index),delete a._index,OpenLayers.Util.removeItem(this.virtualVertices,a),this.vertices.push(a);else if(a==this.dragHandle){if(this.layer.removeFeatures(this.vertices,{silent:!0}),this.vertices=[],this.radiusHandle)this.layer.destroyFeatures([this.radiusHandle],{silent:!0}),this.radiusHandle=null}else a!==this.radiusHandle&&this.layer.events.triggerEvent("vertexmodified",{vertex:a.geometry,feature:this.feature,
pixel:b});if(0<this.virtualVertices.length)this.layer.destroyFeatures(this.virtualVertices,{silent:!0}),this.virtualVertices=[];this.layer.drawFeature(this.feature,this.standalone?void 0:this.selectControl.renderIntent)}this.layer.drawFeature(a)},dragComplete:function(){this.resetVertices();this.setFeatureState();this.onModification(this.feature);this.layer.events.triggerEvent("featuremodified",{feature:this.feature})},setFeatureState:function(){if(this.feature.state!=OpenLayers.State.INSERT&&this.feature.state!=
OpenLayers.State.DELETE)this.feature.state=OpenLayers.State.UPDATE},resetVertices:function(){this.dragControl.feature&&this.dragControl.outFeature(this.dragControl.feature);if(0<this.vertices.length)this.layer.removeFeatures(this.vertices,{silent:!0}),this.vertices=[];if(0<this.virtualVertices.length)this.layer.removeFeatures(this.virtualVertices,{silent:!0}),this.virtualVertices=[];if(this.dragHandle)this.layer.destroyFeatures([this.dragHandle],{silent:!0}),this.dragHandle=null;if(this.radiusHandle)this.layer.destroyFeatures([this.radiusHandle],
{silent:!0}),this.radiusHandle=null;this.feature&&"OpenLayers.Geometry.Point"!=this.feature.geometry.CLASS_NAME&&(this.mode&OpenLayers.Control.ModifyFeature.DRAG&&this.collectDragHandle(),this.mode&(OpenLayers.Control.ModifyFeature.ROTATE|OpenLayers.Control.ModifyFeature.RESIZE)&&this.collectRadiusHandle(),this.mode&OpenLayers.Control.ModifyFeature.RESHAPE&&(this.mode&OpenLayers.Control.ModifyFeature.RESIZE||this.collectVertices()))},handleKeypress:function(a){a=a.keyCode;if(this.feature&&-1!=OpenLayers.Util.indexOf(this.deleteCodes,
a)&&(a=this.dragControl.feature)&&-1!=OpenLayers.Util.indexOf(this.vertices,a)&&!this.dragControl.handlers.drag.dragging&&a.geometry.parent)a.geometry.parent.removeComponent(a.geometry),this.layer.drawFeature(this.feature,this.standalone?void 0:this.selectControl.renderIntent),this.resetVertices(),this.setFeatureState(),this.onModification(this.feature),this.layer.events.triggerEvent("featuremodified",{feature:this.feature})},collectVertices:function(){function a(c){var d,e,f;if("OpenLayers.Geometry.Point"==
c.CLASS_NAME)e=new OpenLayers.Feature.Vector(c),e._sketch=!0,b.vertices.push(e);else{f=c.components.length;"OpenLayers.Geometry.LinearRing"==c.CLASS_NAME&&(f-=1);for(d=0;d<f;++d)e=c.components[d],"OpenLayers.Geometry.Point"==e.CLASS_NAME?(e=new OpenLayers.Feature.Vector(e),e._sketch=!0,b.vertices.push(e)):a(e);if("OpenLayers.Geometry.MultiPoint"!=c.CLASS_NAME)for(d=0,f=c.components.length;d<f-1;++d){e=c.components[d];var g=c.components[d+1];if("OpenLayers.Geometry.Point"==e.CLASS_NAME&&"OpenLayers.Geometry.Point"==
g.CLASS_NAME)e=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point((e.x+g.x)/2,(e.y+g.y)/2),null,b.virtualStyle),e.geometry.parent=c,e._index=d+1,e._sketch=!0,b.virtualVertices.push(e)}}}this.vertices=[];this.virtualVertices=[];var b=this;a.call(this,this.feature.geometry);this.layer.addFeatures(this.virtualVertices,{silent:!0});this.layer.addFeatures(this.vertices,{silent:!0})},collectDragHandle:function(){var a=this.feature.geometry,b=a.getBounds().getCenterLonLat(),b=new OpenLayers.Geometry.Point(b.lon,
b.lat),c=new OpenLayers.Feature.Vector(b);b.move=function(b,c){OpenLayers.Geometry.Point.prototype.move.call(this,b,c);a.move(b,c)};c._sketch=!0;this.dragHandle=c;this.layer.addFeatures([this.dragHandle],{silent:!0})},collectRadiusHandle:function(){var a=this.feature.geometry,b=a.getBounds(),c=b.getCenterLonLat(),d=new OpenLayers.Geometry.Point(c.lon,c.lat),b=new OpenLayers.Geometry.Point(b.right,b.bottom),c=new OpenLayers.Feature.Vector(b),e=this.mode&OpenLayers.Control.ModifyFeature.RESIZE,f=this.mode&
OpenLayers.Control.ModifyFeature.RESHAPE,g=this.mode&OpenLayers.Control.ModifyFeature.ROTATE;b.move=function(b,c){OpenLayers.Geometry.Point.prototype.move.call(this,b,c);var k=this.x-d.x,l=this.y-d.y,m=k-b,o=l-c;if(g){var n=Math.atan2(o,m),n=Math.atan2(l,k)-n,n=n*(180/Math.PI);a.rotate(n,d)}if(e){var p;f?(l/=o,p=k/m/l):(m=Math.sqrt(m*m+o*o),l=Math.sqrt(k*k+l*l)/m);a.resize(l,d,p)}};c._sketch=!0;this.radiusHandle=c;this.layer.addFeatures([this.radiusHandle],{silent:!0})},setMap:function(a){this.standalone||
this.selectControl.setMap(a);this.dragControl.setMap(a);OpenLayers.Control.prototype.setMap.apply(this,arguments)},CLASS_NAME:"OpenLayers.Control.ModifyFeature"});OpenLayers.Control.ModifyFeature.RESHAPE=1;OpenLayers.Control.ModifyFeature.RESIZE=2;OpenLayers.Control.ModifyFeature.ROTATE=4;OpenLayers.Control.ModifyFeature.DRAG=8;
OpenLayers.Geometry.LineString=OpenLayers.Class(OpenLayers.Geometry.Curve,{initialize:function(a){OpenLayers.Geometry.Curve.prototype.initialize.apply(this,arguments)},removeComponent:function(a){this.components&&2<this.components.length&&OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments)},intersects:function(a){var b=!1,c=a.CLASS_NAME;if("OpenLayers.Geometry.LineString"==c||"OpenLayers.Geometry.LinearRing"==c||"OpenLayers.Geometry.Point"==c){var d=this.getSortedSegments(),
a="OpenLayers.Geometry.Point"==c?[{x1:a.x,y1:a.y,x2:a.x,y2:a.y}]:a.getSortedSegments(),e,f,g,h,j,k,l,m=0,o=d.length;a:for(;m<o;++m){c=d[m];e=c.x1;f=c.x2;g=c.y1;h=c.y2;var n=0,p=a.length;for(;n<p;++n){j=a[n];if(j.x1>f)break;if(!(j.x2<e)&&(k=j.y1,l=j.y2,!(Math.min(k,l)>Math.max(g,h))&&!(Math.max(k,l)<Math.min(g,h))&&OpenLayers.Geometry.segmentsIntersect(c,j))){b=!0;break a}}}}else b=a.intersects(this);return b},getSortedSegments:function(){for(var a=this.components.length-1,b=Array(a),c,d,e=0;e<a;++e)c=
this.components[e],d=this.components[e+1],b[e]=c.x<d.x?{x1:c.x,y1:c.y,x2:d.x,y2:d.y}:{x1:d.x,y1:d.y,x2:c.x,y2:c.y};return b.sort(function(a,b){return a.x1-b.x1})},splitWithSegment:function(a,b){for(var c=!(b&&!1===b.edge),d=b&&b.tolerance,e=[],f=this.getVertices(),g=[],h=[],j=!1,k,l,m,o={point:!0,tolerance:d},n=null,p=0,r=f.length-2;p<=r;++p)if(d=f[p],g.push(d.clone()),k=f[p+1],l={x1:d.x,y1:d.y,x2:k.x,y2:k.y},l=OpenLayers.Geometry.segmentsIntersect(a,l,o),l instanceof OpenLayers.Geometry.Point&&((m=
l.x===a.x1&&l.y===a.y1||l.x===a.x2&&l.y===a.y2||l.equals(d)||l.equals(k)?!0:!1)||c))l.equals(h[h.length-1])||h.push(l.clone()),!(0===p&&l.equals(d))&&!l.equals(k)&&(j=!0,l.equals(d)||g.push(l),e.push(new OpenLayers.Geometry.LineString(g)),g=[l.clone()]);j&&(g.push(k.clone()),e.push(new OpenLayers.Geometry.LineString(g)));if(0<h.length)var s=a.x1<a.x2?1:-1,q=a.y1<a.y2?1:-1,n={lines:e,points:h.sort(function(a,b){return s*a.x-s*b.x||q*a.y-q*b.y})};return n},split:function(a,b){var c=null,d=b&&b.mutual,
e,f,g,h;if(a instanceof OpenLayers.Geometry.LineString){var j=this.getVertices(),k,l,m,o,n,p=[];g=[];for(var r=0,s=j.length-2;r<=s;++r){k=j[r];l=j[r+1];m={x1:k.x,y1:k.y,x2:l.x,y2:l.y};h=h||[a];d&&p.push(k.clone());for(var q=0;q<h.length;++q)if(o=h[q].splitWithSegment(m,b))if(n=o.lines,0<n.length&&(n.unshift(q,1),Array.prototype.splice.apply(h,n),q+=n.length-2),d)for(var t=0,u=o.points.length;t<u;++t)n=o.points[t],n.equals(k)||(p.push(n),g.push(new OpenLayers.Geometry.LineString(p)),p=n.equals(l)?
[]:[n.clone()])}d&&0<g.length&&0<p.length&&(p.push(l.clone()),g.push(new OpenLayers.Geometry.LineString(p)))}else c=a.splitWith(this,b);h&&1<h.length?f=!0:h=[];g&&1<g.length?e=!0:g=[];if(f||e)c=d?[g,h]:h;return c},splitWith:function(a,b){return a.split(this,b)},getVertices:function(a){return!0===a?[this.components[0],this.components[this.components.length-1]]:!1===a?this.components.slice(1,this.components.length-1):this.components.slice()},distanceTo:function(a,b){var c=!(b&&!1===b.edge)&&b&&b.details,
d,e={},f=Number.POSITIVE_INFINITY;if(a instanceof OpenLayers.Geometry.Point){for(var g=this.getSortedSegments(),h=a.x,j=a.y,k,l=0,m=g.length;l<m;++l)if(k=g[l],d=OpenLayers.Geometry.distanceToSegment(a,k),d.distance<f){if(f=d.distance,e=d,0===f)break}else if(k.x2>h&&(j>k.y1&&j<k.y2||j<k.y1&&j>k.y2))break;e=c?{distance:e.distance,x0:e.x,y0:e.y,x1:h,y1:j}:e.distance}else if(a instanceof OpenLayers.Geometry.LineString){var g=this.getSortedSegments(),h=a.getSortedSegments(),o,n,p=h.length,r={point:!0},
l=0,m=g.length;a:for(;l<m;++l){j=g[l];k=j.x1;n=j.y1;for(var s=0;s<p;++s)if(d=h[s],o=OpenLayers.Geometry.segmentsIntersect(j,d,r)){f=0;e={distance:0,x0:o.x,y0:o.y,x1:o.x,y1:o.y};break a}else if(d=OpenLayers.Geometry.distanceToSegment({x:k,y:n},d),d.distance<f)f=d.distance,e={distance:f,x0:k,y0:n,x1:d.x,y1:d.y}}if(!c)e=e.distance;0!==f&&j&&(d=a.distanceTo(new OpenLayers.Geometry.Point(j.x2,j.y2),b),l=c?d.distance:d,l<f&&(e=c?{distance:f,x0:d.x1,y0:d.y1,x1:d.x0,y1:d.y0}:l))}else e=a.distanceTo(this,
b),c&&(e={distance:e.distance,x0:e.x1,y0:e.y1,x1:e.x0,y1:e.y0});return e},CLASS_NAME:"OpenLayers.Geometry.LineString"});
OpenLayers.Control.TransformFeature=OpenLayers.Class(OpenLayers.Control,{EVENT_TYPES:["beforesetfeature","setfeature","beforetransform","transform","transformcomplete"],geometryTypes:null,layer:null,preserveAspectRatio:!1,rotate:!0,feature:null,renderIntent:"temporary",rotationHandleSymbolizer:null,box:null,center:null,scale:1,ratio:1,rotation:0,handles:null,rotationHandles:null,dragControl:null,initialize:function(a,b){this.EVENT_TYPES=OpenLayers.Control.TransformFeature.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);
OpenLayers.Control.prototype.initialize.apply(this,[b]);this.layer=a;if(!this.rotationHandleSymbolizer)this.rotationHandleSymbolizer={stroke:!1,pointRadius:10,fillOpacity:0,cursor:"pointer"};this.createBox();this.createControl()},activate:function(){var a=!1;OpenLayers.Control.prototype.activate.apply(this,arguments)&&(this.dragControl.activate(),this.layer.addFeatures([this.box]),this.rotate&&this.layer.addFeatures(this.rotationHandles),this.layer.addFeatures(this.handles),a=!0);return a},deactivate:function(){var a=
!1;OpenLayers.Control.prototype.deactivate.apply(this,arguments)&&(this.layer.removeFeatures(this.handles),this.rotate&&this.layer.removeFeatures(this.rotationHandles),this.layer.removeFeatures([this.box]),this.dragControl.deactivate(),a=!0);return a},setMap:function(a){this.dragControl.setMap(a);OpenLayers.Control.prototype.setMap.apply(this,arguments)},setFeature:function(a,b){var b=OpenLayers.Util.applyDefaults(b,{rotation:0,scale:1,ratio:1}),c={feature:a},d=this.rotation,e=this.center;OpenLayers.Util.extend(this,
b);if(!1!==this.events.triggerEvent("beforesetfeature",c)){this.feature=a;this.activate();this._setfeature=!0;var f=this.feature.geometry.getBounds();this.box.move(f.getCenterLonLat());this.box.geometry.rotate(-d,e);this._angle=0;this.rotation?(d=a.geometry.clone(),d.rotate(-this.rotation,this.center),d=new OpenLayers.Feature.Vector(d.getBounds().toGeometry()),d.geometry.rotate(this.rotation,this.center),this.box.geometry.rotate(this.rotation,this.center),this.box.move(d.geometry.getBounds().getCenterLonLat()),
d=d.geometry.components[0].components[0].getBounds().getCenterLonLat()):d=new OpenLayers.LonLat(f.left,f.bottom);this.handles[0].move(d);delete this._setfeature;this.events.triggerEvent("setfeature",c)}},createBox:function(){var a=this;this.center=new OpenLayers.Geometry.Point(0,0);var b=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString([new OpenLayers.Geometry.Point(-1,-1),new OpenLayers.Geometry.Point(0,-1),new OpenLayers.Geometry.Point(1,-1),new OpenLayers.Geometry.Point(1,0),new OpenLayers.Geometry.Point(1,
1),new OpenLayers.Geometry.Point(0,1),new OpenLayers.Geometry.Point(-1,1),new OpenLayers.Geometry.Point(-1,0),new OpenLayers.Geometry.Point(-1,-1)]),null,"string"==typeof this.renderIntent?null:this.renderIntent);b.geometry.move=function(b,c){a._moving=!0;OpenLayers.Geometry.LineString.prototype.move.apply(this,arguments);a.center.move(b,c);delete a._moving};for(var c=function(a,b){OpenLayers.Geometry.Point.prototype.move.apply(this,arguments);this._rotationHandle&&this._rotationHandle.geometry.move(a,
b);this._handle.geometry.move(a,b)},d=function(a,b,c){OpenLayers.Geometry.Point.prototype.resize.apply(this,arguments);this._rotationHandle&&this._rotationHandle.geometry.resize(a,b,c);this._handle.geometry.resize(a,b,c)},e=function(a,b){OpenLayers.Geometry.Point.prototype.rotate.apply(this,arguments);this._rotationHandle&&this._rotationHandle.geometry.rotate(a,b);this._handle.geometry.rotate(a,b)},f=function(b,c){var d=this.x,e=this.y;OpenLayers.Geometry.Point.prototype.move.call(this,b,c);if(!a._moving){var f=
a.dragControl.handlers.drag.evt,g=!(!a._setfeature&&a.preserveAspectRatio)&&!(f&&f.shiftKey),h=new OpenLayers.Geometry.Point(d,e),f=a.center;this.rotate(-a.rotation,f);h.rotate(-a.rotation,f);var j=this.x-f.x,k=this.y-f.y,l=j-(this.x-h.x),h=k-(this.y-h.y);this.x=d;this.y=e;d=1;g?(k=1.0E-5>Math.abs(h)?1:k/h,d=(1.0E-5>Math.abs(l)?1:j/l)/k):(l=Math.sqrt(l*l+h*h),k=Math.sqrt(j*j+k*k)/l);a._moving=!0;a.box.geometry.rotate(-a.rotation,f);delete a._moving;a.box.geometry.resize(k,f,d);a.box.geometry.rotate(a.rotation,
f);a.transformFeature({scale:k,ratio:d})}},g=function(b,c){var d=this.x,e=this.y;OpenLayers.Geometry.Point.prototype.move.call(this,b,c);if(!a._moving){var f=a.dragControl.handlers.drag.evt,f=f&&f.shiftKey?45:1,g=a.center,h=this.x-g.x,j=this.y-g.y;this.x=d;this.y=e;d=Math.atan2(j-c,h-b);d=Math.atan2(j,h)-d;d*=180/Math.PI;a._angle=(a._angle+d)%360;d=a.rotation%f;if(Math.abs(a._angle)>=f||0!==d)d=Math.round(a._angle/f)*f-d,a._angle=0,a.box.geometry.rotate(d,g),a.transformFeature({rotation:d})}},h=Array(8),
j=Array(4),k,l,m,o=0;8>o;++o){k=b.geometry.components[o];l=new OpenLayers.Feature.Vector(k.clone(),null,"string"==typeof this.renderIntent?null:this.renderIntent);if(0==o%2)m=new OpenLayers.Feature.Vector(k.clone(),null,"string"==typeof this.rotationHandleSymbolizer?null:this.rotationHandleSymbolizer),m.geometry.move=g,k._rotationHandle=m,j[o/2]=m;k.move=c;k.resize=d;k.rotate=e;l.geometry.move=f;k._handle=l;h[o]=l}this.box=b;this.rotationHandles=j;this.handles=h},createControl:function(){var a=this;
this.dragControl=new OpenLayers.Control.DragFeature(this.layer,{documentDrag:!0,moveFeature:function(b){if(this.feature===a.feature)this.feature=a.box;OpenLayers.Control.DragFeature.prototype.moveFeature.apply(this,arguments)},onDrag:function(b){b===a.box&&(a.transformFeature({center:a.center}),a.drawHandles())},onStart:function(b){var c=!a.geometryTypes||-1!==OpenLayers.Util.indexOf(a.geometryTypes,b.geometry.CLASS_NAME),d=OpenLayers.Util.indexOf(a.handles,b),d=d+OpenLayers.Util.indexOf(a.rotationHandles,
b);b!==a.feature&&b!==a.box&&-2==d&&c&&a.setFeature(b)},onComplete:function(){a.events.triggerEvent("transformcomplete",{feature:a.feature})}})},drawHandles:function(){for(var a=this.layer,b=0;8>b;++b)this.rotate&&0===b%2&&a.drawFeature(this.rotationHandles[b/2],this.rotationHandleSymbolizer),a.drawFeature(this.handles[b],this.renderIntent)},transformFeature:function(a){if(!this._setfeature){this.scale*=a.scale||1;this.ratio*=a.ratio||1;var b=this.rotation;this.rotation=(this.rotation+(a.rotation||
0))%360;if(!1!==this.events.triggerEvent("beforetransform",a)){var c=this.feature,d=c.geometry,e=this.center;d.rotate(-b,e);a.scale||a.ratio?d.resize(a.scale,e,a.ratio):a.center&&c.move(a.center.getBounds().getCenterLonLat());d.rotate(this.rotation,e);this.layer.drawFeature(c);c.toState(OpenLayers.State.UPDATE);this.events.triggerEvent("transform",a)}}this.layer.drawFeature(this.box,this.renderIntent);this.drawHandles()},destroy:function(){for(var a,b=0;8>b;++b)a=this.box.geometry.components[b],a._handle.destroy(),
a._handle=null,a._rotationHandle&&a._rotationHandle.destroy(),a._rotationHandle=null;this.box.destroy();this.layer=this.box=null;this.dragControl.destroy();OpenLayers.Control.prototype.destroy.apply(this,arguments)},CLASS_NAME:"OpenLayers.Control.TransformFeature"});
OpenLayers.Format.GPX=OpenLayers.Class(OpenLayers.Format.XML,{extractWaypoints:!0,extractTracks:!0,extractRoutes:!0,extractAttributes:!0,initialize:function(a){this.externalProjection=new OpenLayers.Projection("EPSG:4326");OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},read:function(a){"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));var b=[];if(this.extractTracks)for(var c=a.getElementsByTagName("trk"),d=0,e=c.length;d<e;d++){var f={};this.extractAttributes&&
(f=this.parseAttributes(c[d]));for(var g=this.getElementsByTagNameNS(c[d],c[d].namespaceURI,"trkseg"),h=0,j=g.length;h<j;h++){var k=this.extractSegment(g[h],"trkpt");b.push(new OpenLayers.Feature.Vector(k,f))}}if(this.extractRoutes){e=a.getElementsByTagName("rte");c=0;for(d=e.length;c<d;c++)f={},this.extractAttributes&&(f=this.parseAttributes(e[c])),g=this.extractSegment(e[c],"rtept"),b.push(new OpenLayers.Feature.Vector(g,f))}if(this.extractWaypoints){a=a.getElementsByTagName("wpt");c=0;for(e=a.length;c<
e;c++)f={},this.extractAttributes&&(f=this.parseAttributes(a[c])),d=new OpenLayers.Geometry.Point(a[c].getAttribute("lon"),a[c].getAttribute("lat")),b.push(new OpenLayers.Feature.Vector(d,f))}if(this.internalProjection&&this.externalProjection){f=0;for(a=b.length;f<a;f++)b[f].geometry.transform(this.externalProjection,this.internalProjection)}return b},extractSegment:function(a,b){for(var c=this.getElementsByTagNameNS(a,a.namespaceURI,b),d=[],e=0,f=c.length;e<f;e++)d.push(new OpenLayers.Geometry.Point(c[e].getAttribute("lon"),
c[e].getAttribute("lat")));return new OpenLayers.Geometry.LineString(d)},parseAttributes:function(a){for(var b={},a=a.firstChild;a;){if(1==a.nodeType){var c=a.firstChild;if(3==c.nodeType||4==c.nodeType)if(name=a.prefix?a.nodeName.split(":")[1]:a.nodeName,"trkseg"!=name&&"rtept"!=name)b[name]=c.nodeValue}a=a.nextSibling}return b},CLASS_NAME:"OpenLayers.Format.GPX"});
OpenLayers.Geometry.LinearRing=OpenLayers.Class(OpenLayers.Geometry.LineString,{componentTypes:["OpenLayers.Geometry.Point"],initialize:function(a){OpenLayers.Geometry.LineString.prototype.initialize.apply(this,arguments)},addComponent:function(a,b){var c=!1,d=this.components.pop();if(null!=b||!a.equals(d))c=OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,arguments);OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,[this.components[0]]);return c},removeComponent:function(a){4<
this.components.length&&(this.components.pop(),OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments),OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,[this.components[0]]))},move:function(a,b){for(var c=0,d=this.components.length;c<d-1;c++)this.components[c].move(a,b)},rotate:function(a,b){for(var c=0,d=this.components.length;c<d-1;++c)this.components[c].rotate(a,b)},resize:function(a,b,c){for(var d=0,e=this.components.length;d<e-1;++d)this.components[d].resize(a,
b,c);return this},transform:function(a,b){if(a&&b){for(var c=0,d=this.components.length;c<d-1;c++)this.components[c].transform(a,b);this.bounds=null}return this},getCentroid:function(){if(this.components&&2<this.components.length){for(var a=0,b=0,c=0;c<this.components.length-1;c++)var d=this.components[c],e=this.components[c+1],a=a+(d.x+e.x)*(d.x*e.y-e.x*d.y),b=b+(d.y+e.y)*(d.x*e.y-e.x*d.y);c=-1*this.getArea();return new OpenLayers.Geometry.Point(a/(6*c),b/(6*c))}return null},getArea:function(){var a=
0;if(this.components&&2<this.components.length){for(var b=a=0,c=this.components.length;b<c-1;b++)var d=this.components[b],e=this.components[b+1],a=a+(d.x+e.x)*(e.y-d.y);a=-a/2}return a},getGeodesicArea:function(a){var b=this;if(a){var c=new OpenLayers.Projection("EPSG:4326");c.equals(a)||(b=this.clone().transform(a,c))}a=0;c=b.components&&b.components.length;if(2<c){for(var d,e,f=0;f<c-1;f++)d=b.components[f],e=b.components[f+1],a+=OpenLayers.Util.rad(e.x-d.x)*(2+Math.sin(OpenLayers.Util.rad(d.y))+
Math.sin(OpenLayers.Util.rad(e.y)));a=40680631590769*a/2}return a},containsPoint:function(a){for(var b=OpenLayers.Number.limitSigDigs,c=b(a.x,14),a=b(a.y,14),d=this.components.length-1,e,f,g,h,j,k=0,l=0;l<d;++l)if(e=this.components[l],g=b(e.x,14),e=b(e.y,14),f=this.components[l+1],h=b(f.x,14),f=b(f.y,14),e==f){if(a==e&&(g<=h&&c>=g&&c<=h||g>=h&&c<=g&&c>=h)){k=-1;break}}else{j=b(((g-h)*a+(h*e-g*f))/(e-f),14);if(j==c&&(e<f&&a>=e&&a<=f||e>f&&a<=e&&a>=f)){k=-1;break}j<=c||g!=h&&(j<Math.min(g,h)||j>Math.max(g,
h))||(e<f&&a>=e&&a<f||e>f&&a<e&&a>=f)&&++k}return-1==k?1:!!(k&1)},intersects:function(a){var b=!1;if("OpenLayers.Geometry.Point"==a.CLASS_NAME)b=this.containsPoint(a);else if("OpenLayers.Geometry.LineString"==a.CLASS_NAME)b=a.intersects(this);else if("OpenLayers.Geometry.LinearRing"==a.CLASS_NAME)b=OpenLayers.Geometry.LineString.prototype.intersects.apply(this,[a]);else for(var c=0,d=a.components.length;c<d&&!(b=a.components[c].intersects(this));++c);return b},getVertices:function(a){return!0===a?
[]:this.components.slice(0,this.components.length-1)},CLASS_NAME:"OpenLayers.Geometry.LinearRing"});
OpenLayers.Geometry.MultiLineString=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.LineString"],initialize:function(a){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments)},split:function(a,b){for(var c=null,d=b&&b.mutual,e,f,g,h,j=[],k=[a],l=0,m=this.components.length;l<m;++l){f=this.components[l];g=!1;for(var o=0;o<k.length;++o)if(e=f.split(k[o],b)){if(d){g=e[0];for(var n=0,p=g.length;n<p;++n)0===n&&j.length?j[j.length-1].addComponent(g[n]):
j.push(new OpenLayers.Geometry.MultiLineString([g[n]]));g=!0;e=e[1]}if(e.length){e.unshift(o,1);Array.prototype.splice.apply(k,e);break}}g||(j.length?j[j.length-1].addComponent(f.clone()):j=[new OpenLayers.Geometry.MultiLineString(f.clone())])}j&&1<j.length?g=!0:j=[];k&&1<k.length?h=!0:k=[];if(g||h)c=d?[j,k]:k;return c},splitWith:function(a,b){var c=null,d=b&&b.mutual,e,f,g,h,j,k;if(a instanceof OpenLayers.Geometry.LineString){k=[];j=[a];for(var l=0,m=this.components.length;l<m;++l){g=!1;f=this.components[l];
for(var o=0;o<j.length;++o)if(e=j[o].split(f,b)){d&&(g=e[0],g.length&&(g.unshift(o,1),Array.prototype.splice.apply(j,g),o+=g.length-2),e=e[1],0===e.length&&(e=[f.clone()]));g=0;for(var n=e.length;g<n;++g)0===g&&k.length?k[k.length-1].addComponent(e[g]):k.push(new OpenLayers.Geometry.MultiLineString([e[g]]));g=!0}g||(k.length?k[k.length-1].addComponent(f.clone()):k=[new OpenLayers.Geometry.MultiLineString([f.clone()])])}}else c=a.split(this);j&&1<j.length?h=!0:j=[];k&&1<k.length?g=!0:k=[];if(h||g)c=
d?[j,k]:k;return c},CLASS_NAME:"OpenLayers.Geometry.MultiLineString"});
OpenLayers.Handler.Path=OpenLayers.Class(OpenLayers.Handler.Point,{line:null,freehand:!1,freehandToggle:"shiftKey",initialize:function(a,b,c){OpenLayers.Handler.Point.prototype.initialize.apply(this,arguments)},createFeature:function(a){a=this.control.map.getLonLatFromPixel(a);this.point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(a.lon,a.lat));this.line=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString([this.point.geometry]));this.callback("create",[this.point.geometry,
this.getSketch()]);this.point.geometry.clearBounds();this.layer.addFeatures([this.line,this.point],{silent:!0})},destroyFeature:function(){OpenLayers.Handler.Point.prototype.destroyFeature.apply(this);this.line=null},removePoint:function(){this.point&&this.layer.removeFeatures([this.point])},addPoint:function(a){this.layer.removeFeatures([this.point]);a=this.control.map.getLonLatFromPixel(a);this.point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(a.lon,a.lat));this.line.geometry.addComponent(this.point.geometry,
this.line.geometry.components.length);this.callback("point",[this.point.geometry,this.getGeometry()]);this.callback("modify",[this.point.geometry,this.getSketch()]);this.drawFeature()},freehandMode:function(a){return this.freehandToggle&&a[this.freehandToggle]?!this.freehand:this.freehand},modifyFeature:function(a){a=this.control.map.getLonLatFromPixel(a);this.point.geometry.x=a.lon;this.point.geometry.y=a.lat;this.callback("modify",[this.point.geometry,this.getSketch()]);this.point.geometry.clearBounds();
this.drawFeature()},drawFeature:function(){this.layer.drawFeature(this.line,this.style);this.layer.drawFeature(this.point,this.style)},getSketch:function(){return this.line},getGeometry:function(){var a=this.line&&this.line.geometry;a&&this.multi&&(a=new OpenLayers.Geometry.MultiLineString([a]));return a},mousedown:function(a){if(this.lastDown&&this.lastDown.equals(a.xy))return!1;null==this.lastDown?(this.persist&&this.destroyFeature(),this.createFeature(a.xy)):(null==this.lastUp||!this.lastUp.equals(a.xy))&&
this.addPoint(a.xy);this.mouseDown=!0;this.lastDown=a.xy;this.drawing=!0;return!1},mousemove:function(a){this.drawing&&(this.mouseDown&&this.freehandMode(a)?this.addPoint(a.xy):this.modifyFeature(a.xy));return!0},mouseup:function(a){this.mouseDown=!1;return this.drawing?(this.freehandMode(a)?(this.removePoint(),this.finalize()):(null==this.lastUp&&this.addPoint(a.xy),this.lastUp=a.xy),!1):!0},dblclick:function(a){this.freehandMode(a)||(this.line.geometry.removeComponent(this.line.geometry.components[this.line.geometry.components.length-
1]),this.removePoint(),this.finalize());return!1},CLASS_NAME:"OpenLayers.Handler.Path"});
OpenLayers.Control.Split=OpenLayers.Class(OpenLayers.Control,{EVENT_TYPES:["beforesplit","split","aftersplit"],layer:null,source:null,sourceOptions:null,tolerance:null,edge:!0,deferDelete:!1,mutual:!0,targetFilter:null,sourceFilter:null,handler:null,initialize:function(a){Array.prototype.push.apply(this.EVENT_TYPES,OpenLayers.Control.prototype.EVENT_TYPES);OpenLayers.Control.prototype.initialize.apply(this,[a]);this.options=a||{};this.options.source&&this.setSource(this.options.source)},setSource:function(a){this.active?
(this.deactivate(),this.handler&&(this.handler.destroy(),delete this.handler),this.source=a,this.activate()):this.source=a},activate:function(){var a=OpenLayers.Control.prototype.activate.call(this);if(a)if(this.source){if(this.source.events)this.source.events.on({sketchcomplete:this.onSketchComplete,afterfeaturemodified:this.afterFeatureModified,scope:this})}else{if(!this.handler)this.handler=new OpenLayers.Handler.Path(this,{done:function(a){this.onSketchComplete({feature:new OpenLayers.Feature.Vector(a)})}},
{layerOptions:this.sourceOptions});this.handler.activate()}return a},deactivate:function(){var a=OpenLayers.Control.prototype.deactivate.call(this);a&&this.source&&this.source.events&&this.layer.events.un({sketchcomplete:this.onSketchComplete,afterfeaturemodified:this.afterFeatureModified,scope:this});return a},onSketchComplete:function(a){this.feature=null;return!this.considerSplit(a.feature)},afterFeatureModified:function(a){if(a.modified){var b=a.feature;if(b.geometry instanceof OpenLayers.Geometry.LineString||
b.geometry instanceof OpenLayers.Geometry.MultiLineString)this.feature=a.feature,this.considerSplit(a.feature)}},removeByGeometry:function(a,b){for(var c=0,d=a.length;c<d;++c)if(a[c].geometry===b){a.splice(c,1);break}},isEligible:function(a){return a.state!==OpenLayers.State.DELETE&&(a.geometry instanceof OpenLayers.Geometry.LineString||a.geometry instanceof OpenLayers.Geometry.MultiLineString)&&this.feature!==a&&(!this.targetFilter||this.targetFilter.evaluate(a.attributes))},considerSplit:function(a){var b=
!1,c=!1;if(!this.sourceFilter||this.sourceFilter.evaluate(a.attributes)){for(var d=this.layer&&this.layer.features||[],e,f,g=[],h=[],j=this.layer===this.source&&this.mutual,k={edge:this.edge,tolerance:this.tolerance,mutual:j},l=[a.geometry],m,o,n,p=0,r=d.length;p<r;++p)if(m=d[p],this.isEligible(m)){o=[m.geometry];for(var s=0;s<l.length;++s){n=l[s];for(var q=0;q<o.length;++q)if(e=o[q],n.getBounds().intersectsBounds(e.getBounds())&&(e=n.split(e,k)))f=this.events.triggerEvent("beforesplit",{source:a,
target:m}),!1!==f&&(j&&(f=e[0],1<f.length&&(f.unshift(s,1),Array.prototype.splice.apply(l,f),s+=f.length-3),e=e[1]),1<e.length&&(e.unshift(q,1),Array.prototype.splice.apply(o,e),q+=e.length-3))}o&&1<o.length&&(this.geomsToFeatures(m,o),this.events.triggerEvent("split",{original:m,features:o}),Array.prototype.push.apply(g,o),h.push(m),c=!0)}l&&1<l.length&&(this.geomsToFeatures(a,l),this.events.triggerEvent("split",{original:a,features:l}),Array.prototype.push.apply(g,l),h.push(a),b=!0);if(b||c){if(this.deferDelete){d=
[];p=0;for(r=h.length;p<r;++p)c=h[p],c.state===OpenLayers.State.INSERT?d.push(c):(c.state=OpenLayers.State.DELETE,this.layer.drawFeature(c));this.layer.destroyFeatures(d,{silent:!0});p=0;for(r=g.length;p<r;++p)g[p].state=OpenLayers.State.INSERT}else this.layer.destroyFeatures(h,{silent:!0});this.layer.addFeatures(g,{silent:!0});this.events.triggerEvent("aftersplit",{source:a,features:g})}}return b},geomsToFeatures:function(a,b){var c=a.clone();delete c.geometry;for(var d,e=0,f=b.length;e<f;++e)d=
c.clone(),d.geometry=b[e],d.state=OpenLayers.State.INSERT,b[e]=d},destroy:function(){this.active&&this.deactivate();OpenLayers.Control.prototype.destroy.call(this)},CLASS_NAME:"OpenLayers.Control.Split"});
OpenLayers.Geometry.Polygon=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.LinearRing"],initialize:function(a){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments)},getArea:function(){var a=0;if(this.components&&0<this.components.length)for(var a=a+Math.abs(this.components[0].getArea()),b=1,c=this.components.length;b<c;b++)a-=Math.abs(this.components[b].getArea());return a},getGeodesicArea:function(a){var b=0;if(this.components&&0<this.components.length)for(var b=
b+Math.abs(this.components[0].getGeodesicArea(a)),c=1,d=this.components.length;c<d;c++)b-=Math.abs(this.components[c].getGeodesicArea(a));return b},containsPoint:function(a){var b=this.components.length,c=!1;if(0<b&&(c=this.components[0].containsPoint(a),1!==c&&c&&1<b))for(var d,e=1;e<b;++e)if(d=this.components[e].containsPoint(a)){c=1===d?1:!1;break}return c},intersects:function(a){var b=!1,c,d;if("OpenLayers.Geometry.Point"==a.CLASS_NAME)b=this.containsPoint(a);else if("OpenLayers.Geometry.LineString"==
a.CLASS_NAME||"OpenLayers.Geometry.LinearRing"==a.CLASS_NAME){for(c=0,d=this.components.length;c<d&&!(b=a.intersects(this.components[c]));++c);if(!b)for(c=0,d=a.components.length;c<d&&!(b=this.containsPoint(a.components[c]));++c);}else for(c=0,d=a.components.length;c<d&&!(b=this.intersects(a.components[c]));++c);if(!b&&"OpenLayers.Geometry.Polygon"==a.CLASS_NAME){var e=this.components[0];for(c=0,d=e.components.length;c<d&&!(b=a.containsPoint(e.components[c]));++c);}return b},distanceTo:function(a,
b){return b&&!1===b.edge&&this.intersects(a)?0:OpenLayers.Geometry.Collection.prototype.distanceTo.apply(this,[a,b])},CLASS_NAME:"OpenLayers.Geometry.Polygon"});OpenLayers.Geometry.Polygon.createRegularPolygon=function(a,b,c,d){var e=Math.PI*(1/c-0.5);d&&(e+=d/180*Math.PI);for(var f,g=[],h=0;h<c;++h)f=e+2*h*Math.PI/c,d=a.x+b*Math.cos(f),f=a.y+b*Math.sin(f),g.push(new OpenLayers.Geometry.Point(d,f));a=new OpenLayers.Geometry.LinearRing(g);return new OpenLayers.Geometry.Polygon([a])};
OpenLayers.Format.GeoRSS=OpenLayers.Class(OpenLayers.Format.XML,{rssns:"http://backend.userland.com/rss2",featureNS:"http://mapserver.gis.umn.edu/mapserver",georssns:"http://www.georss.org/georss",geons:"http://www.w3.org/2003/01/geo/wgs84_pos#",featureTitle:"Untitled",featureDescription:"No Description",gmlParser:null,xy:!1,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},createGeometryFromItem:function(a){var b=this.getElementsByTagNameNS(a,this.georssns,"point"),
c=this.getElementsByTagNameNS(a,this.geons,"lat"),d=this.getElementsByTagNameNS(a,this.geons,"long"),e=this.getElementsByTagNameNS(a,this.georssns,"line"),f=this.getElementsByTagNameNS(a,this.georssns,"polygon"),g=this.getElementsByTagNameNS(a,this.georssns,"where"),a=this.getElementsByTagNameNS(a,this.georssns,"box");if(0<b.length||0<c.length&&0<d.length){0<b.length?(c=OpenLayers.String.trim(b[0].firstChild.nodeValue).split(/\s+/),2!=c.length&&(c=OpenLayers.String.trim(b[0].firstChild.nodeValue).split(/\s*,\s*/))):
c=[parseFloat(c[0].firstChild.nodeValue),parseFloat(d[0].firstChild.nodeValue)];var h=new OpenLayers.Geometry.Point(parseFloat(c[1]),parseFloat(c[0]))}else if(0<e.length){c=OpenLayers.String.trim(this.concatChildValues(e[0])).split(/\s+/);d=[];e=0;for(f=c.length;e<f;e+=2)b=new OpenLayers.Geometry.Point(parseFloat(c[e+1]),parseFloat(c[e])),d.push(b);h=new OpenLayers.Geometry.LineString(d)}else if(0<f.length){c=OpenLayers.String.trim(this.concatChildValues(f[0])).split(/\s+/);d=[];e=0;for(f=c.length;e<
f;e+=2)b=new OpenLayers.Geometry.Point(parseFloat(c[e+1]),parseFloat(c[e])),d.push(b);h=new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing(d)])}else if(0<g.length){if(!this.gmlParser)this.gmlParser=new OpenLayers.Format.GML({xy:this.xy});h=this.gmlParser.parseFeature(g[0]).geometry}else 0<a.length&&(c=OpenLayers.String.trim(a[0].firstChild.nodeValue).split(/\s+/),d=[],3<c.length&&(b=new OpenLayers.Geometry.Point(parseFloat(c[1]),parseFloat(c[0])),d.push(b),b=new OpenLayers.Geometry.Point(parseFloat(c[1]),
parseFloat(c[2])),d.push(b),b=new OpenLayers.Geometry.Point(parseFloat(c[3]),parseFloat(c[2])),d.push(b),b=new OpenLayers.Geometry.Point(parseFloat(c[3]),parseFloat(c[0])),d.push(b),b=new OpenLayers.Geometry.Point(parseFloat(c[1]),parseFloat(c[0])),d.push(b)),h=new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing(d)]));h&&this.internalProjection&&this.externalProjection&&h.transform(this.externalProjection,this.internalProjection);return h},createFeatureFromItem:function(a){var b=this.createGeometryFromItem(a),
c=this.getChildValue(a,"*","title",this.featureTitle),d=this.getChildValue(a,"*","description",this.getChildValue(a,"*","content",this.getChildValue(a,"*","summary",this.featureDescription))),e=this.getChildValue(a,"*","link");if(!e)try{e=this.getElementsByTagNameNS(a,"*","link")[0].getAttribute("href")}catch(f){e=null}a=this.getChildValue(a,"*","id",null);b=new OpenLayers.Feature.Vector(b,{title:c,description:d,link:e});b.fid=a;return b},getChildValue:function(a,b,c,d){return(a=this.getElementsByTagNameNS(a,
b,c))&&a[0]&&a[0].firstChild&&a[0].firstChild.nodeValue?a[0].firstChild.nodeValue:void 0==d?"":d},read:function(a){"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));var b=null,b=this.getElementsByTagNameNS(a,"*","item");0==b.length&&(b=this.getElementsByTagNameNS(a,"*","entry"));for(var a=b.length,c=Array(a),d=0;d<a;d++)c[d]=this.createFeatureFromItem(b[d]);return c},write:function(a){var b;if(a instanceof Array){b=this.createElementNS(this.rssns,"rss");for(var c=0,d=a.length;c<
d;c++)b.appendChild(this.createFeatureXML(a[c]))}else b=this.createFeatureXML(a);return OpenLayers.Format.XML.prototype.write.apply(this,[b])},createFeatureXML:function(a){var b=this.buildGeometryNode(a.geometry),c=this.createElementNS(this.rssns,"item"),d=this.createElementNS(this.rssns,"title");d.appendChild(this.createTextNode(a.attributes.title?a.attributes.title:""));var e=this.createElementNS(this.rssns,"description");e.appendChild(this.createTextNode(a.attributes.description?a.attributes.description:
""));c.appendChild(d);c.appendChild(e);a.attributes.link&&(d=this.createElementNS(this.rssns,"link"),d.appendChild(this.createTextNode(a.attributes.link)),c.appendChild(d));for(var f in a.attributes)"link"==f||"title"==f||"description"==f||(d=this.createTextNode(a.attributes[f]),e=f,-1!=f.search(":")&&(e=f.split(":")[1]),e=this.createElementNS(this.featureNS,"feature:"+e),e.appendChild(d),c.appendChild(e));c.appendChild(b);return c},buildGeometryNode:function(a){this.internalProjection&&this.externalProjection&&
(a=a.clone(),a.transform(this.internalProjection,this.externalProjection));var b;if("OpenLayers.Geometry.Polygon"==a.CLASS_NAME)b=this.createElementNS(this.georssns,"georss:polygon"),b.appendChild(this.buildCoordinatesNode(a.components[0]));else if("OpenLayers.Geometry.LineString"==a.CLASS_NAME)b=this.createElementNS(this.georssns,"georss:line"),b.appendChild(this.buildCoordinatesNode(a));else if("OpenLayers.Geometry.Point"==a.CLASS_NAME)b=this.createElementNS(this.georssns,"georss:point"),b.appendChild(this.buildCoordinatesNode(a));
else throw"Couldn't parse "+a.CLASS_NAME;return b},buildCoordinatesNode:function(a){var b=null;if(a.components)b=a.components;if(b){for(var a=b.length,c=Array(a),d=0;d<a;d++)c[d]=b[d].y+" "+b[d].x;b=c.join(" ")}else b=a.y+" "+a.x;return this.createTextNode(b)},CLASS_NAME:"OpenLayers.Format.GeoRSS"});
OpenLayers.Format.KML=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{kml:"http://www.opengis.net/kml/2.2",gx:"http://www.google.com/kml/ext/2.2"},kmlns:"http://earth.google.com/kml/2.0",placemarksDesc:"No description available",foldersName:"OpenLayers export",foldersDesc:"Exported on "+new Date,extractAttributes:!0,extractStyles:!1,extractTracks:!1,trackAttributes:null,internalns:null,features:null,styles:null,styleBaseUrl:"",fetched:null,maxDepth:0,initialize:function(a){this.regExes={trimSpace:/^\s*|\s*$/g,
removeSpace:/\s*/g,splitSpace:/\s+/,trimComma:/\s*,\s*/g,kmlColor:/(\w{2})(\w{2})(\w{2})(\w{2})/,kmlIconPalette:/root:\/\/icons\/palette-(\d+)(\.\w+)/,straightBracket:/\$\[(.*?)\]/g};this.externalProjection=new OpenLayers.Projection("EPSG:4326");OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},read:function(a){this.features=[];this.styles={};this.fetched={};return this.parseData(a,{depth:0,styleBaseUrl:this.styleBaseUrl})},parseData:function(a,b){"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,
[a]));for(var c=["Link","NetworkLink","Style","StyleMap","Placemark"],d=0,e=c.length;d<e;++d){var f=c[d],g=this.getElementsByTagNameNS(a,"*",f);if(0!=g.length)switch(f.toLowerCase()){case "link":case "networklink":this.parseLinks(g,b);break;case "style":this.extractStyles&&this.parseStyles(g,b);break;case "stylemap":this.extractStyles&&this.parseStyleMaps(g,b);break;case "placemark":this.parseFeatures(g,b)}}return this.features},parseLinks:function(a,b){if(b.depth>=this.maxDepth)return!1;var c=OpenLayers.Util.extend({},
b);c.depth++;for(var d=0,e=a.length;d<e;d++){var f=this.parseProperty(a[d],"*","href");f&&!this.fetched[f]&&(this.fetched[f]=!0,(f=this.fetchLink(f))&&this.parseData(f,c))}},fetchLink:function(a){if(a=OpenLayers.Request.GET({url:a,async:!1}))return a.responseText},parseStyles:function(a,b){for(var c=0,d=a.length;c<d;c++){var e=this.parseStyle(a[c]);e&&(this.styles[(b.styleBaseUrl||"")+"#"+e.id]=e)}},parseKmlColor:function(a){var b=null;a&&(a=a.match(this.regExes.kmlColor))&&(b={color:"#"+a[4]+a[3]+
a[2],opacity:parseInt(a[1],16)/255});return b},parseStyle:function(a){for(var b={},c=["LineStyle","PolyStyle","IconStyle","BalloonStyle","LabelStyle"],d,e=0,f=c.length;e<f;++e)if(d=c[e],styleTypeNode=this.getElementsByTagNameNS(a,"*",d)[0])switch(d.toLowerCase()){case "linestyle":d=this.parseProperty(styleTypeNode,"*","color");if(d=this.parseKmlColor(d))b.strokeColor=d.color,b.strokeOpacity=d.opacity;(d=this.parseProperty(styleTypeNode,"*","width"))&&(b.strokeWidth=d);break;case "polystyle":d=this.parseProperty(styleTypeNode,
"*","color");if(d=this.parseKmlColor(d))b.fillOpacity=d.opacity,b.fillColor=d.color;"0"==this.parseProperty(styleTypeNode,"*","fill")&&(b.fillColor="none");"0"==this.parseProperty(styleTypeNode,"*","outline")&&(b.strokeWidth="0");break;case "iconstyle":var g=parseFloat(this.parseProperty(styleTypeNode,"*","scale")||1);d=32*g;var h=32*g,j=this.getElementsByTagNameNS(styleTypeNode,"*","Icon")[0];if(j){var k=this.parseProperty(j,"*","href");if(k){var l=this.parseProperty(j,"*","w"),m=this.parseProperty(j,
"*","h");OpenLayers.String.startsWith(k,"http://maps.google.com/mapfiles/kml")&&!l&&!m&&(m=l=64,g/=2);l=l||m;m=m||l;l&&(d=parseInt(l)*g);m&&(h=parseInt(m)*g);if(m=k.match(this.regExes.kmlIconPalette))l=m[1],m=m[2],k=this.parseProperty(j,"*","x"),j=this.parseProperty(j,"*","y"),k="http://maps.google.com/mapfiles/kml/pal"+l+"/icon"+(8*(j?7-j/32:7)+(k?k/32:0))+m;b.graphicOpacity=1;b.externalGraphic=k}}if(l=this.getElementsByTagNameNS(styleTypeNode,"*","hotSpot")[0])k=parseFloat(l.getAttribute("x")),
j=parseFloat(l.getAttribute("y")),m=l.getAttribute("xunits"),"pixels"==m?b.graphicXOffset=-k*g:"insetPixels"==m?b.graphicXOffset=-d+k*g:"fraction"==m&&(b.graphicXOffset=-d*k),k=l.getAttribute("yunits"),"pixels"==k?b.graphicYOffset=-h+j*g+1:"insetPixels"==k?b.graphicYOffset=-(j*g)+1:"fraction"==k&&(b.graphicYOffset=-h*(1-j)+1);b.graphicWidth=d;b.graphicHeight=h;break;case "balloonstyle":(d=OpenLayers.Util.getXmlNodeValue(styleTypeNode))&&(b.balloonStyle=d.replace(this.regExes.straightBracket,"${$1}"));
break;case "labelstyle":if(d=this.parseProperty(styleTypeNode,"*","color"),d=this.parseKmlColor(d))b.fontColor=d.color,b.fontOpacity=d.opacity}!b.strokeColor&&b.fillColor&&(b.strokeColor=b.fillColor);if((a=a.getAttribute("id"))&&b)b.id=a;return b},parseStyleMaps:function(a,b){for(var c=0,d=a.length;c<d;c++)for(var e=a[c],f=this.getElementsByTagNameNS(e,"*","Pair"),e=e.getAttribute("id"),g=0,h=f.length;g<h;g++){var j=f[g],k=this.parseProperty(j,"*","key");(j=this.parseProperty(j,"*","styleUrl"))&&
"normal"==k&&(this.styles[(b.styleBaseUrl||"")+"#"+e]=this.styles[(b.styleBaseUrl||"")+j])}},parseFeatures:function(a,b){for(var c=[],d=0,e=a.length;d<e;d++){var f=a[d],g=this.parseFeature.apply(this,[f]);if(g){if(this.extractStyles&&g.attributes&&g.attributes.styleUrl)g.style=this.getStyle(g.attributes.styleUrl,b);if(this.extractStyles){var h=this.getElementsByTagNameNS(f,"*","Style")[0];if(h&&(h=this.parseStyle(h)))g.style=OpenLayers.Util.extend(g.style,h)}if(this.extractTracks){if((f=this.getElementsByTagNameNS(f,
this.namespaces.gx,"Track"))&&0<f.length)g={features:[],feature:g},this.readNode(f[0],g),0<g.features.length&&c.push.apply(c,g.features)}else c.push(g)}else throw"Bad Placemark: "+d;}this.features=this.features.concat(c)},readers:{kml:{when:function(a,b){b.whens.push(OpenLayers.Date.parse(this.getChildValue(a)))},_trackPointAttribute:function(a,b){var c=a.nodeName.split(":").pop();b.attributes[c].push(this.getChildValue(a))}},gx:{Track:function(a,b){var c={whens:[],points:[],angles:[]};if(this.trackAttributes){var d;
c.attributes={};for(var e=0,f=this.trackAttributes.length;e<f;++e)if(d=this.trackAttributes[e],c.attributes[d]=[],!(d in this.readers.kml))this.readers.kml[d]=this.readers.kml._trackPointAttribute}this.readChildNodes(a,c);if(c.whens.length!==c.points.length)throw Error("gx:Track with unequal number of when ("+c.whens.length+") and gx:coord ("+c.points.length+") elements.");var g=0<c.angles.length;if(g&&c.whens.length!==c.angles.length)throw Error("gx:Track with unequal number of when ("+c.whens.length+
") and gx:angles ("+c.angles.length+") elements.");for(var h,j,e=0,f=c.whens.length;e<f;++e){h=b.feature.clone();h.fid=b.feature.fid||b.feature.id;j=c.points[e];h.geometry=j;if("z"in j)h.attributes.altitude=j.z;this.internalProjection&&this.externalProjection&&h.geometry.transform(this.externalProjection,this.internalProjection);if(this.trackAttributes){j=0;for(var k=this.trackAttributes.length;j<k;++j)h.attributes[d]=c.attributes[this.trackAttributes[j]][e]}h.attributes.when=c.whens[e];h.attributes.trackId=
b.feature.id;if(g)j=c.angles[e],h.attributes.heading=parseFloat(j[0]),h.attributes.tilt=parseFloat(j[1]),h.attributes.roll=parseFloat(j[2]);b.features.push(h)}},coord:function(a,b){var c=this.getChildValue(a).replace(this.regExes.trimSpace,"").split(/\s+/),d=new OpenLayers.Geometry.Point(c[0],c[1]);if(2<c.length)d.z=parseFloat(c[2]);b.points.push(d)},angles:function(a,b){var c=this.getChildValue(a).replace(this.regExes.trimSpace,"").split(/\s+/);b.angles.push(c)}}},parseFeature:function(a){for(var b=
["MultiGeometry","Polygon","LineString","Point"],c,d,e,f=0,g=b.length;f<g;++f)if(c=b[f],this.internalns=a.namespaceURI?a.namespaceURI:this.kmlns,d=this.getElementsByTagNameNS(a,this.internalns,c),0<d.length){(b=this.parseGeometry[c.toLowerCase()])?(e=b.apply(this,[d[0]]),this.internalProjection&&this.externalProjection&&e.transform(this.externalProjection,this.internalProjection)):OpenLayers.Console.error(OpenLayers.i18n("unsupportedGeometryType",{geomType:c}));break}var h;this.extractAttributes&&
(h=this.parseAttributes(a));c=new OpenLayers.Feature.Vector(e,h);a=a.getAttribute("id")||a.getAttribute("name");if(null!=a)c.fid=a;return c},getStyle:function(a,b){var c=OpenLayers.Util.removeTail(a),d=OpenLayers.Util.extend({},b);d.depth++;d.styleBaseUrl=c;!this.styles[a]&&!OpenLayers.String.startsWith(a,"#")&&d.depth<=this.maxDepth&&!this.fetched[c]&&(c=this.fetchLink(c))&&this.parseData(c,d);return OpenLayers.Util.extend({},this.styles[a])},parseGeometry:{point:function(a){var b=this.getElementsByTagNameNS(a,
this.internalns,"coordinates"),a=[];if(0<b.length)var c=b[0].firstChild.nodeValue,c=c.replace(this.regExes.removeSpace,""),a=c.split(",");b=null;if(1<a.length)2==a.length&&(a[2]=null),b=new OpenLayers.Geometry.Point(a[0],a[1],a[2]);else throw"Bad coordinate string: "+c;return b},linestring:function(a,b){var c=this.getElementsByTagNameNS(a,this.internalns,"coordinates"),d=null;if(0<c.length){for(var c=this.getChildValue(c[0]),c=c.replace(this.regExes.trimSpace,""),c=c.replace(this.regExes.trimComma,
","),d=c.split(this.regExes.splitSpace),e=d.length,f=Array(e),g,h,j=0;j<e;++j)if(g=d[j].split(","),h=g.length,1<h)2==g.length&&(g[2]=null),f[j]=new OpenLayers.Geometry.Point(g[0],g[1],g[2]);else throw"Bad LineString point coordinates: "+d[j];if(e)d=b?new OpenLayers.Geometry.LinearRing(f):new OpenLayers.Geometry.LineString(f);else throw"Bad LineString coordinates: "+c;}return d},polygon:function(a){var a=this.getElementsByTagNameNS(a,this.internalns,"LinearRing"),b=a.length,c=Array(b);if(0<b)for(var d=
0,e=a.length;d<e;++d)if(b=this.parseGeometry.linestring.apply(this,[a[d],!0]))c[d]=b;else throw"Bad LinearRing geometry: "+d;return new OpenLayers.Geometry.Polygon(c)},multigeometry:function(a){for(var b,c=[],d=a.childNodes,e=0,f=d.length;e<f;++e)a=d[e],1==a.nodeType&&(b=this.parseGeometry[(a.prefix?a.nodeName.split(":")[1]:a.nodeName).toLowerCase()])&&c.push(b.apply(this,[a]));return new OpenLayers.Geometry.Collection(c)}},parseAttributes:function(a){var b={},c=a.getElementsByTagName("ExtendedData");
c.length&&(b=this.parseExtendedData(c[0]));for(var d,e,f,a=a.childNodes,c=0,g=a.length;c<g;++c)if(d=a[c],1==d.nodeType&&(e=d.childNodes,1<=e.length&&3>=e.length)){switch(e.length){case 1:f=e[0];break;case 2:f=e[0];e=e[1];f=3==f.nodeType||4==f.nodeType?f:e;break;default:f=e[1]}if(3==f.nodeType||4==f.nodeType)if(d=d.prefix?d.nodeName.split(":")[1]:d.nodeName,f=OpenLayers.Util.getXmlNodeValue(f))f=f.replace(this.regExes.trimSpace,""),b[d]=f}return b},parseExtendedData:function(a){var b={},c,d,e,f,g=
a.getElementsByTagName("Data");for(c=0,d=g.length;c<d;c++){e=g[c];f=e.getAttribute("name");var h={},j=e.getElementsByTagName("value");j.length&&(h.value=this.getChildValue(j[0]));e=e.getElementsByTagName("displayName");e.length&&(h.displayName=this.getChildValue(e[0]));b[f]=h}a=a.getElementsByTagName("SimpleData");for(c=0,d=a.length;c<d;c++)h={},e=a[c],f=e.getAttribute("name"),h.value=this.getChildValue(e),h.displayName=f,b[f]=h;return b},parseProperty:function(a,b,c){var d,a=this.getElementsByTagNameNS(a,
b,c);try{d=OpenLayers.Util.getXmlNodeValue(a[0])}catch(e){d=null}return d},write:function(a){a instanceof Array||(a=[a]);for(var b=this.createElementNS(this.kmlns,"kml"),c=this.createFolderXML(),d=0,e=a.length;d<e;++d)c.appendChild(this.createPlacemarkXML(a[d]));b.appendChild(c);return OpenLayers.Format.XML.prototype.write.apply(this,[b])},createFolderXML:function(){var a=this.createElementNS(this.kmlns,"Folder");if(this.foldersName){var b=this.createElementNS(this.kmlns,"name"),c=this.createTextNode(this.foldersName);
b.appendChild(c);a.appendChild(b)}this.foldersDesc&&(b=this.createElementNS(this.kmlns,"description"),c=this.createTextNode(this.foldersDesc),b.appendChild(c),a.appendChild(b));return a},createPlacemarkXML:function(a){var b=this.createElementNS(this.kmlns,"name");b.appendChild(this.createTextNode(a.style&&a.style.label?a.style.label:a.attributes.name||a.id));var c=this.createElementNS(this.kmlns,"description");c.appendChild(this.createTextNode(a.attributes.description||this.placemarksDesc));var d=
this.createElementNS(this.kmlns,"Placemark");null!=a.fid&&d.setAttribute("id",a.fid);d.appendChild(b);d.appendChild(c);a=this.buildGeometryNode(a.geometry);d.appendChild(a);return d},buildGeometryNode:function(a){this.internalProjection&&this.externalProjection&&(a=a.clone(),a.transform(this.internalProjection,this.externalProjection));var b=a.CLASS_NAME,b=this.buildGeometry[b.substring(b.lastIndexOf(".")+1).toLowerCase()],c=null;b&&(c=b.apply(this,[a]));return c},buildGeometry:{point:function(a){var b=
this.createElementNS(this.kmlns,"Point");b.appendChild(this.buildCoordinatesNode(a));return b},multipoint:function(a){return this.buildGeometry.collection.apply(this,[a])},linestring:function(a){var b=this.createElementNS(this.kmlns,"LineString");b.appendChild(this.buildCoordinatesNode(a));return b},multilinestring:function(a){return this.buildGeometry.collection.apply(this,[a])},linearring:function(a){var b=this.createElementNS(this.kmlns,"LinearRing");b.appendChild(this.buildCoordinatesNode(a));
return b},polygon:function(a){for(var b=this.createElementNS(this.kmlns,"Polygon"),a=a.components,c,d,e=0,f=a.length;e<f;++e)c=0==e?"outerBoundaryIs":"innerBoundaryIs",c=this.createElementNS(this.kmlns,c),d=this.buildGeometry.linearring.apply(this,[a[e]]),c.appendChild(d),b.appendChild(c);return b},multipolygon:function(a){return this.buildGeometry.collection.apply(this,[a])},collection:function(a){for(var b=this.createElementNS(this.kmlns,"MultiGeometry"),c,d=0,e=a.components.length;d<e;++d)(c=this.buildGeometryNode.apply(this,
[a.components[d]]))&&b.appendChild(c);return b}},buildCoordinatesNode:function(a){var b=this.createElementNS(this.kmlns,"coordinates"),c;if(c=a.components){for(var d=c.length,e=Array(d),f=0;f<d;++f)a=c[f],e[f]=a.x+","+a.y;c=e.join(" ")}else c=a.x+","+a.y;c=this.createTextNode(c);b.appendChild(c);return b},CLASS_NAME:"OpenLayers.Format.KML"});
OpenLayers.Format.OSM=OpenLayers.Class(OpenLayers.Format.XML,{checkTags:!1,interestingTagsExclude:null,areaTags:null,initialize:function(a){for(var b={interestingTagsExclude:"source,source_ref,source:ref,history,attribution,created_by".split(","),areaTags:"area,building,leisure,tourism,ruins,historic,landuse,military,natural,sport".split(",")},b=OpenLayers.Util.extend(b,a),c={},a=0;a<b.interestingTagsExclude.length;a++)c[b.interestingTagsExclude[a]]=!0;b.interestingTagsExclude=c;c={};for(a=0;a<b.areaTags.length;a++)c[b.areaTags[a]]=
!0;b.areaTags=c;this.externalProjection=new OpenLayers.Projection("EPSG:4326");OpenLayers.Format.XML.prototype.initialize.apply(this,[b])},read:function(a){"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));for(var b=this.getNodes(a),c=this.getWays(a),a=Array(c.length),d=0;d<c.length;d++){for(var e=Array(c[d].nodes.length),f=this.isWayArea(c[d])?1:0,g=0;g<c[d].nodes.length;g++){var h=b[c[d].nodes[g]],j=new OpenLayers.Geometry.Point(h.lon,h.lat);j.osm_id=parseInt(c[d].nodes[g]);
e[g]=j;h.used=!0}h=null;h=f?new OpenLayers.Geometry.Polygon(new OpenLayers.Geometry.LinearRing(e)):new OpenLayers.Geometry.LineString(e);this.internalProjection&&this.externalProjection&&h.transform(this.externalProjection,this.internalProjection);e=new OpenLayers.Feature.Vector(h,c[d].tags);e.osm_id=parseInt(c[d].id);e.fid="way."+e.osm_id;a[d]=e}for(var k in b){h=b[k];if(!h.used||this.checkTags){c=null;if(this.checkTags){c=this.getTags(h.node,!0);if(h.used&&!c[1])continue;c=c[0]}else c=this.getTags(h.node);
e=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(h.lon,h.lat),c);this.internalProjection&&this.externalProjection&&e.geometry.transform(this.externalProjection,this.internalProjection);e.osm_id=parseInt(k);e.fid="node."+e.osm_id;a.push(e)}h.node=null}return a},getNodes:function(a){for(var a=a.getElementsByTagName("node"),b={},c=0;c<a.length;c++){var d=a[c],e=d.getAttribute("id");b[e]={lat:d.getAttribute("lat"),lon:d.getAttribute("lon"),node:d}}return b},getWays:function(a){for(var a=
a.getElementsByTagName("way"),b=[],c=0;c<a.length;c++){var d=a[c],e={id:d.getAttribute("id")};e.tags=this.getTags(d);d=d.getElementsByTagName("nd");e.nodes=Array(d.length);for(var f=0;f<d.length;f++)e.nodes[f]=d[f].getAttribute("ref");b.push(e)}return b},getTags:function(a,b){for(var c=a.getElementsByTagName("tag"),d={},e=!1,f=0;f<c.length;f++){var g=c[f].getAttribute("k");d[g]=c[f].getAttribute("v");b&&(this.interestingTagsExclude[g]||(e=!0))}return b?[d,e]:d},isWayArea:function(a){var b=!1,c=!1;
a.nodes[0]==a.nodes[a.nodes.length-1]&&(b=!0);if(this.checkTags)for(var d in a.tags)if(this.areaTags[d]){c=!0;break}return b&&(this.checkTags?c:!0)},write:function(a){a instanceof Array||(a=[a]);this.osm_id=1;this.created_nodes={};var b=this.createElementNS(null,"osm");b.setAttribute("version","0.5");b.setAttribute("generator","OpenLayers "+OpenLayers.VERSION_NUMBER);for(var c=a.length-1;0<=c;c--)for(var d=this.createFeatureNodes(a[c]),e=0;e<d.length;e++)b.appendChild(d[e]);return OpenLayers.Format.XML.prototype.write.apply(this,
[b])},createFeatureNodes:function(a){var b=[],c=a.geometry.CLASS_NAME,c=c.substring(c.lastIndexOf(".")+1),c=c.toLowerCase();(c=this.createXML[c])&&(b=c.apply(this,[a]));return b},createXML:{point:function(a){var b=null,c=a.geometry?a.geometry:a,d=!1;a.osm_id?(b=a.osm_id,this.created_nodes[b]&&(d=!0)):(b=-this.osm_id,this.osm_id++);var e=d?this.created_nodes[b]:this.createElementNS(null,"node");this.created_nodes[b]=e;e.setAttribute("id",b);e.setAttribute("lon",c.x);e.setAttribute("lat",c.y);a.attributes&&
this.serializeTags(a,e);this.setState(a,e);return d?[]:[e]},linestring:function(a){var b=[],c=a.geometry;a.osm_id?id=a.osm_id:(id=-this.osm_id,this.osm_id++);var d=this.createElementNS(null,"way");d.setAttribute("id",id);for(var e=0;e<c.components.length;e++){var f=this.createXML.point.apply(this,[c.components[e]]);if(f.length){var f=f[0],g=f.getAttribute("id");b.push(f)}else g=c.components[e].osm_id,f=this.created_nodes[g];this.setState(a,f);f=this.createElementNS(null,"nd");f.setAttribute("ref",
g);d.appendChild(f)}this.serializeTags(a,d);b.push(d);return b},polygon:function(a){var b=OpenLayers.Util.extend({area:"yes"},a.attributes),b=new OpenLayers.Feature.Vector(a.geometry.components[0],b);b.osm_id=a.osm_id;return this.createXML.linestring.apply(this,[b])}},serializeTags:function(a,b){for(var c in a.attributes){var d=this.createElementNS(null,"tag");d.setAttribute("k",c);d.setAttribute("v",a.attributes[c]);b.appendChild(d)}},setState:function(a,b){if(a.state){var c=null;switch(a.state){case OpenLayers.State.UPDATE:case OpenLayers.State.DELETE:c=
"delete"}c&&b.setAttribute("action",c)}},CLASS_NAME:"OpenLayers.Format.OSM"});OpenLayers.Geometry.MultiPolygon=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.Polygon"],initialize:function(a){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments)},CLASS_NAME:"OpenLayers.Geometry.MultiPolygon"});
OpenLayers.Handler.Polygon=OpenLayers.Class(OpenLayers.Handler.Path,{polygon:null,initialize:function(a,b,c){OpenLayers.Handler.Path.prototype.initialize.apply(this,arguments)},createFeature:function(a){a=this.control.map.getLonLatFromPixel(a);this.point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(a.lon,a.lat));this.line=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LinearRing([this.point.geometry]));this.polygon=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon([this.line.geometry]));
this.callback("create",[this.point.geometry,this.getSketch()]);this.point.geometry.clearBounds();this.layer.addFeatures([this.polygon,this.point],{silent:!0})},destroyFeature:function(){OpenLayers.Handler.Path.prototype.destroyFeature.apply(this);this.polygon=null},drawFeature:function(){this.layer.drawFeature(this.polygon,this.style);this.layer.drawFeature(this.point,this.style)},getSketch:function(){return this.polygon},getGeometry:function(){var a=this.polygon&&this.polygon.geometry;a&&this.multi&&
(a=new OpenLayers.Geometry.MultiPolygon([a]));return a},dblclick:function(a){this.freehandMode(a)||(this.line.geometry.removeComponent(this.line.geometry.components[this.line.geometry.components.length-2]),this.removePoint(),this.finalize());return!1},CLASS_NAME:"OpenLayers.Handler.Polygon"});
OpenLayers.Control.EditingToolbar=OpenLayers.Class(OpenLayers.Control.Panel,{initialize:function(a,b){OpenLayers.Control.Panel.prototype.initialize.apply(this,[b]);this.addControls([new OpenLayers.Control.Navigation]);this.addControls([new OpenLayers.Control.DrawFeature(a,OpenLayers.Handler.Point,{displayClass:"olControlDrawFeaturePoint"}),new OpenLayers.Control.DrawFeature(a,OpenLayers.Handler.Path,{displayClass:"olControlDrawFeaturePath"}),new OpenLayers.Control.DrawFeature(a,OpenLayers.Handler.Polygon,
{displayClass:"olControlDrawFeaturePolygon"})])},draw:function(){var a=OpenLayers.Control.Panel.prototype.draw.apply(this,arguments);this.activateControl(this.controls[0]);return a},CLASS_NAME:"OpenLayers.Control.EditingToolbar"});
OpenLayers.Control.SLDSelect=OpenLayers.Class(OpenLayers.Control,{EVENT_TYPES:["selected"],clearOnDeactivate:!1,layers:null,callbacks:null,selectionSymbolizer:{Polygon:{fillColor:"#FF0000",stroke:!1},Line:{strokeColor:"#FF0000",strokeWidth:2},Point:{graphicName:"square",fillColor:"#FF0000",pointRadius:5}},layerOptions:null,handlerOptions:null,sketchStyle:null,wfsCache:{},layerCache:{},initialize:function(a,b){this.EVENT_TYPES=OpenLayers.Control.SLDSelect.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);
OpenLayers.Control.prototype.initialize.apply(this,[b]);this.callbacks=OpenLayers.Util.extend({done:this.select,click:this.select},this.callbacks);this.handlerOptions=this.handlerOptions||{};this.layerOptions=OpenLayers.Util.applyDefaults(this.layerOptions,{displayInLayerSwitcher:!1});if(this.sketchStyle)this.handlerOptions.layerOptions=OpenLayers.Util.applyDefaults(this.handlerOptions.layerOptions,{styleMap:new OpenLayers.StyleMap({"default":this.sketchStyle})});this.handler=new a(this,this.callbacks,
this.handlerOptions)},destroy:function(){for(var a in this.layerCache)delete this.layerCache[a];for(a in this.wfsCache)delete this.wfsCache[a];OpenLayers.Control.prototype.destroy.apply(this,arguments)},coupleLayerVisiblity:function(a){this.setVisibility(a.object.getVisibility())},createSelectionLayer:function(a){var b;if(this.layerCache[a.id])b=this.layerCache[a.id];else{b=new OpenLayers.Layer.WMS.Post(a.name,a.url,a.params,OpenLayers.Util.applyDefaults(this.layerOptions,a.getOptions()));this.layerCache[a.id]=
b;if(!1===this.layerOptions.displayInLayerSwitcher)a.events.on({visibilitychanged:this.coupleLayerVisiblity,scope:b});this.map.addLayer(b)}return b},createSLD:function(a,b,c){for(var d={version:"1.0.0",namedLayers:{}},e=(""+a.params.LAYERS).split(","),f=0,g=e.length;f<g;f++){var h=e[f];d.namedLayers[h]={name:h,userStyles:[]};var j=this.selectionSymbolizer,k=c[f];0<=k.type.indexOf("Polygon")?j={Polygon:this.selectionSymbolizer.Polygon}:0<=k.type.indexOf("LineString")?j={Line:this.selectionSymbolizer.Line}:
0<=k.type.indexOf("Point")&&(j={Point:this.selectionSymbolizer.Point});d.namedLayers[h].userStyles.push({name:"default",rules:[new OpenLayers.Rule({symbolizer:j,filter:b[f],maxScaleDenominator:a.options.minScale})]})}return(new OpenLayers.Format.SLD).write(d)},parseDescribeLayer:function(a){var b=new OpenLayers.Format.WMSDescribeLayer,c=a.responseXML;if(!c||!c.documentElement)c=a.responseText;for(var a=b.read(c),b=[],c=null,d=0,e=a.length;d<e;d++)if("WFS"==a[d].owsType)b.push(a[d].typeName),c=a[d].owsURL;
OpenLayers.Request.GET({url:c,params:{SERVICE:"WFS",TYPENAME:b.toString(),REQUEST:"DescribeFeatureType",VERSION:"1.0.0"},callback:function(a){var b=new OpenLayers.Format.WFSDescribeFeatureType,c=a.responseXML;if(!c||!c.documentElement)c=a.responseText;this.control.wfsCache[this.layer.id]=b.read(c);this.control._queue&&this.control.applySelection()},scope:this})},getGeometryAttributes:function(a){for(var b=[],a=this.wfsCache[a.id],c=0,d=a.featureTypes.length;c<d;c++)for(var e=a.featureTypes[c].properties,
f=0,g=e.length;f<g;f++){var h=e[f],j=h.type;(0<=j.indexOf("LineString")||0<=j.indexOf("GeometryAssociationType")||0<=j.indexOf("GeometryPropertyType")||0<=j.indexOf("Point")||0<=j.indexOf("Polygon"))&&b.push(h)}return b},activate:function(){var a=OpenLayers.Control.prototype.activate.call(this);if(a)for(var b=0,c=this.layers.length;b<c;b++){var d=this.layers[b];d&&!this.wfsCache[d.id]&&OpenLayers.Request.GET({url:d.url,params:{SERVICE:"WMS",VERSION:d.params.VERSION,LAYERS:d.params.LAYERS,REQUEST:"DescribeLayer"},
callback:this.parseDescribeLayer,scope:{layer:d,control:this}})}return a},deactivate:function(){var a=OpenLayers.Control.prototype.deactivate.call(this);if(a)for(var b=0,c=this.layers.length;b<c;b++){var d=this.layers[b];if(d&&!0===this.clearOnDeactivate){var e=this.layerCache,f=e[d.id];f&&(d.events.un({visibilitychanged:this.coupleLayerVisiblity,scope:f}),f.destroy(),delete e[d.id])}}return a},setLayers:function(a){this.active?(this.deactivate(),this.layers=a,this.activate()):this.layers=a},createFilter:function(a,
b){var c=null;this.handler instanceof OpenLayers.Handler.RegularPolygon?c=!0===this.handler.irregular?new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.BBOX,property:a.name,value:b.getBounds()}):new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.INTERSECTS,property:a.name,value:b}):this.handler instanceof OpenLayers.Handler.Polygon?c=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.INTERSECTS,property:a.name,value:b}):this.handler instanceof OpenLayers.Handler.Path?
c=0<=a.type.indexOf("Point")?new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.DWITHIN,property:a.name,distance:0.01*this.map.getExtent().getWidth(),distanceUnits:this.map.getUnits(),value:b}):new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.INTERSECTS,property:a.name,value:b}):this.handler instanceof OpenLayers.Handler.Click&&(c=0<=a.type.indexOf("Polygon")?new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.INTERSECTS,property:a.name,value:b}):new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.DWITHIN,
property:a.name,distance:0.01*this.map.getExtent().getWidth(),distanceUnits:this.map.getUnits(),value:b}));return c},select:function(a){this._queue=function(){for(var b=0,c=this.layers.length;b<c;b++){for(var d=this.layers[b],e=this.getGeometryAttributes(d),f=[],g=0,h=e.length;g<h;g++){var j=e[g];if(null!==j){if(!(a instanceof OpenLayers.Geometry)){var k=this.map.getLonLatFromPixel(a.xy);a=new OpenLayers.Geometry.Point(k.lon,k.lat)}j=this.createFilter(j,a);null!==j&&f.push(j)}}g=this.createSelectionLayer(d);
e=this.createSLD(d,f,e);this.events.triggerEvent("selected",{layer:d,filters:f});g.mergeNewParams({SLD_BODY:e});delete this._queue}};this.applySelection()},applySelection:function(){for(var a=!0,b=0,c=this.layers.length;b<c;b++)if(!this.wfsCache[this.layers[b].id]){a=!1;break}a&&this._queue.call(this)},CLASS_NAME:"OpenLayers.Control.SLDSelect"});
OpenLayers.Format.ArcXML=OpenLayers.Class(OpenLayers.Format.XML,{fontStyleKeys:"antialiasing,blockout,font,fontcolor,fontsize,fontstyle,glowing,interval,outline,printmode,shadow,transparency".split(","),request:null,response:null,initialize:function(a){this.request=new OpenLayers.Format.ArcXML.Request;this.response=new OpenLayers.Format.ArcXML.Response;if(a)if("feature"==a.requesttype){this.request.get_image=null;var b=this.request.get_feature.query;this.addCoordSys(b.featurecoordsys,a.featureCoordSys);
this.addCoordSys(b.filtercoordsys,a.filterCoordSys);if(a.polygon)b.isspatial=!0,b.spatialfilter.polygon=a.polygon;else if(a.envelope)b.isspatial=!0,b.spatialfilter.envelope={minx:0,miny:0,maxx:0,maxy:0},this.parseEnvelope(b.spatialfilter.envelope,a.envelope)}else"image"==a.requesttype?(this.request.get_feature=null,b=this.request.get_image.properties,this.parseEnvelope(b.envelope,a.envelope),this.addLayers(b.layerlist,a.layers),this.addImageSize(b.imagesize,a.tileSize),this.addCoordSys(b.featurecoordsys,
a.featureCoordSys),this.addCoordSys(b.filtercoordsys,a.filterCoordSys)):this.request=null;OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},parseEnvelope:function(a,b){if(b&&4==b.length)a.minx=b[0],a.miny=b[1],a.maxx=b[2],a.maxy=b[3]},addLayers:function(a,b){for(var c=0,d=b.length;c<d;c++)a.push(b[c])},addImageSize:function(a,b){if(null!==b)a.width=b.w,a.height=b.h,a.printwidth=b.w,a.printheight=b.h},addCoordSys:function(a,b){if("string"==typeof b)a.id=parseInt(b),a.string=b;else if("object"==
typeof b&&null!==b.proj)a.id=b.proj.srsProjNumber,a.string=b.proj.srsCode},iserror:function(a){var b=null;a?(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]),a=a.documentElement.getElementsByTagName("ERROR"),b=null!==a&&0<a.length):b=""!==this.response.error;return b},read:function(a){"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));var b=null;a&&a.documentElement&&(b="ARCXML"==a.documentElement.nodeName?a.documentElement:a.documentElement.getElementsByTagName("ARCXML")[0]);
if(!b||"parsererror"===b.firstChild.nodeName){var c,d;try{c=a.firstChild.nodeValue,d=a.firstChild.childNodes[1].firstChild.nodeValue}catch(e){}throw{message:"Error parsing the ArcXML request",error:c,source:d};}return this.parseResponse(b)},write:function(a){if(!a)a=this.request;var b=this.createElementNS("","ARCXML");b.setAttribute("version","1.1");var c=this.createElementNS("","REQUEST");if(null!=a.get_image){var d=this.createElementNS("","GET_IMAGE");c.appendChild(d);var e=this.createElementNS("",
"PROPERTIES");d.appendChild(e);a=a.get_image.properties;null!=a.featurecoordsys&&(d=this.createElementNS("","FEATURECOORDSYS"),e.appendChild(d),0===a.featurecoordsys.id?d.setAttribute("string",a.featurecoordsys.string):d.setAttribute("id",a.featurecoordsys.id));null!=a.filtercoordsys&&(d=this.createElementNS("","FILTERCOORDSYS"),e.appendChild(d),0===a.filtercoordsys.id?d.setAttribute("string",a.filtercoordsys.string):d.setAttribute("id",a.filtercoordsys.id));null!=a.envelope&&(d=this.createElementNS("",
"ENVELOPE"),e.appendChild(d),d.setAttribute("minx",a.envelope.minx),d.setAttribute("miny",a.envelope.miny),d.setAttribute("maxx",a.envelope.maxx),d.setAttribute("maxy",a.envelope.maxy));d=this.createElementNS("","IMAGESIZE");e.appendChild(d);d.setAttribute("height",a.imagesize.height);d.setAttribute("width",a.imagesize.width);if(a.imagesize.height!=a.imagesize.printheight||a.imagesize.width!=a.imagesize.printwidth)d.setAttribute("printheight",a.imagesize.printheight),d.setArrtibute("printwidth",a.imagesize.printwidth);
null!=a.background&&(d=this.createElementNS("","BACKGROUND"),e.appendChild(d),d.setAttribute("color",a.background.color.r+","+a.background.color.g+","+a.background.color.b),null!==a.background.transcolor&&d.setAttribute("transcolor",a.background.transcolor.r+","+a.background.transcolor.g+","+a.background.transcolor.b));if(null!=a.layerlist&&0<a.layerlist.length){d=this.createElementNS("","LAYERLIST");e.appendChild(d);for(e=0;e<a.layerlist.length;e++){var f=this.createElementNS("","LAYERDEF");d.appendChild(f);
f.setAttribute("id",a.layerlist[e].id);f.setAttribute("visible",a.layerlist[e].visible);if("object"==typeof a.layerlist[e].query){var g=a.layerlist[e].query;if(0>g.where.length)continue;var h=null,h="boolean"==typeof g.spatialfilter&&g.spatialfilter?this.createElementNS("","SPATIALQUERY"):this.createElementNS("","QUERY");h.setAttribute("where",g.where);"number"==typeof g.accuracy&&0<g.accuracy&&h.setAttribute("accuracy",g.accuracy);"number"==typeof g.featurelimit&&2E3>g.featurelimit&&h.setAttribute("featurelimit",
g.featurelimit);"string"==typeof g.subfields&&"#ALL#"!=g.subfields&&h.setAttribute("subfields",g.subfields);"string"==typeof g.joinexpression&&0<g.joinexpression.length&&h.setAttribute("joinexpression",g.joinexpression);"string"==typeof g.jointables&&0<g.jointables.length&&h.setAttribute("jointables",g.jointables);f.appendChild(h)}"object"==typeof a.layerlist[e].renderer&&this.addRenderer(f,a.layerlist[e].renderer)}}}else if(null!=a.get_feature)d=this.createElementNS("","GET_FEATURES"),d.setAttribute("outputmode",
"newxml"),d.setAttribute("checkesc","true"),a.get_feature.geometry?d.setAttribute("geometry",a.get_feature.geometry):d.setAttribute("geometry","false"),a.get_feature.compact&&d.setAttribute("compact",a.get_feature.compact),"number"==a.get_feature.featurelimit&&d.setAttribute("featurelimit",a.get_feature.featurelimit),d.setAttribute("globalenvelope","true"),c.appendChild(d),null!=a.get_feature.layer&&0<a.get_feature.layer.length&&(e=this.createElementNS("","LAYER"),e.setAttribute("id",a.get_feature.layer),
d.appendChild(e)),a=a.get_feature.query,null!=a&&(e=null,e=a.isspatial?this.createElementNS("","SPATIALQUERY"):this.createElementNS("","QUERY"),d.appendChild(e),"number"==typeof a.accuracy&&e.setAttribute("accuracy",a.accuracy),null!=a.featurecoordsys&&(d=this.createElementNS("","FEATURECOORDSYS"),0==a.featurecoordsys.id?d.setAttribute("string",a.featurecoordsys.string):d.setAttribute("id",a.featurecoordsys.id),e.appendChild(d)),null!=a.filtercoordsys&&(d=this.createElementNS("","FILTERCOORDSYS"),
0===a.filtercoordsys.id?d.setAttribute("string",a.filtercoordsys.string):d.setAttribute("id",a.filtercoordsys.id),e.appendChild(d)),0<a.buffer&&(d=this.createElementNS("","BUFFER"),d.setAttribute("distance",a.buffer),e.appendChild(d)),a.isspatial&&(d=this.createElementNS("","SPATIALFILTER"),d.setAttribute("relation",a.spatialfilter.relation),e.appendChild(d),a.spatialfilter.envelope?(f=this.createElementNS("","ENVELOPE"),f.setAttribute("minx",a.spatialfilter.envelope.minx),f.setAttribute("miny",a.spatialfilter.envelope.miny),
f.setAttribute("maxx",a.spatialfilter.envelope.maxx),f.setAttribute("maxy",a.spatialfilter.envelope.maxy),d.appendChild(f)):"object"==typeof a.spatialfilter.polygon&&d.appendChild(this.writePolygonGeometry(a.spatialfilter.polygon))),null!=a.where&&0<a.where.length&&e.setAttribute("where",a.where));b.appendChild(c);return OpenLayers.Format.XML.prototype.write.apply(this,[b])},addGroupRenderer:function(a,b){var c=this.createElementNS("","GROUPRENDERER");a.appendChild(c);for(var d=0;d<b.length;d++)this.addRenderer(c,
b[d])},addRenderer:function(a,b){if(b instanceof Array)this.addGroupRenderer(a,b);else{var c=this.createElementNS("",b.type.toUpperCase()+"RENDERER");a.appendChild(c);"VALUEMAPRENDERER"==c.tagName?this.addValueMapRenderer(c,b):"VALUEMAPLABELRENDERER"==c.tagName?this.addValueMapLabelRenderer(c,b):"SIMPLELABELRENDERER"==c.tagName?this.addSimpleLabelRenderer(c,b):"SCALEDEPENDENTRENDERER"==c.tagName&&this.addScaleDependentRenderer(c,b)}},addScaleDependentRenderer:function(a,b){("string"==typeof b.lower||
"number"==typeof b.lower)&&a.setAttribute("lower",b.lower);("string"==typeof b.upper||"number"==typeof b.upper)&&a.setAttribute("upper",b.upper);this.addRenderer(a,b.renderer)},addValueMapLabelRenderer:function(a,b){a.setAttribute("lookupfield",b.lookupfield);a.setAttribute("labelfield",b.labelfield);if("object"==typeof b.exacts)for(var c=0,d=b.exacts.length;c<d;c++){var e=b.exacts[c],f=this.createElementNS("","EXACT");"string"==typeof e.value&&f.setAttribute("value",e.value);"string"==typeof e.label&&
f.setAttribute("label",e.label);"string"==typeof e.method&&f.setAttribute("method",e.method);a.appendChild(f);if("object"==typeof e.symbol){var g=null;"text"==e.symbol.type&&(g=this.createElementNS("","TEXTSYMBOL"));if(null!=g){for(var h=this.fontStyleKeys,j=0,k=h.length;j<k;j++){var l=h[j];e.symbol[l]&&g.setAttribute(l,e.symbol[l])}f.appendChild(g)}}}},addValueMapRenderer:function(a,b){a.setAttribute("lookupfield",b.lookupfield);if("object"==typeof b.ranges)for(var c=0,d=b.ranges.length;c<d;c++){var e=
b.ranges[c],f=this.createElementNS("","RANGE");f.setAttribute("lower",e.lower);f.setAttribute("upper",e.upper);a.appendChild(f);if("object"==typeof e.symbol){var g=null;"simplepolygon"==e.symbol.type&&(g=this.createElementNS("","SIMPLEPOLYGONSYMBOL"));null!=g&&("string"==typeof e.symbol.boundarycolor&&g.setAttribute("boundarycolor",e.symbol.boundarycolor),"string"==typeof e.symbol.fillcolor&&g.setAttribute("fillcolor",e.symbol.fillcolor),"number"==typeof e.symbol.filltransparency&&g.setAttribute("filltransparency",
e.symbol.filltransparency),f.appendChild(g))}}else if("object"==typeof b.exacts){c=0;for(d=b.exacts.length;c<d;c++)e=b.exacts[c],f=this.createElementNS("","EXACT"),"string"==typeof e.value&&f.setAttribute("value",e.value),"string"==typeof e.label&&f.setAttribute("label",e.label),"string"==typeof e.method&&f.setAttribute("method",e.method),a.appendChild(f),"object"==typeof e.symbol&&(g=null,"simplemarker"==e.symbol.type&&(g=this.createElementNS("","SIMPLEMARKERSYMBOL")),null!=g&&("string"==typeof e.symbol.antialiasing&&
g.setAttribute("antialiasing",e.symbol.antialiasing),"string"==typeof e.symbol.color&&g.setAttribute("color",e.symbol.color),"string"==typeof e.symbol.outline&&g.setAttribute("outline",e.symbol.outline),"string"==typeof e.symbol.overlap&&g.setAttribute("overlap",e.symbol.overlap),"string"==typeof e.symbol.shadow&&g.setAttribute("shadow",e.symbol.shadow),"number"==typeof e.symbol.transparency&&g.setAttribute("transparency",e.symbol.transparency),"string"==typeof e.symbol.usecentroid&&g.setAttribute("usecentroid",
e.symbol.usecentroid),"number"==typeof e.symbol.width&&g.setAttribute("width",e.symbol.width),f.appendChild(g)))}},addSimpleLabelRenderer:function(a,b){a.setAttribute("field",b.field);for(var c="featureweight,howmanylabels,labelbufferratio,labelpriorities,labelweight,linelabelposition,rotationalangles".split(","),d=0,e=c.length;d<e;d++){var f=c[d];b[f]&&a.setAttribute(f,b[f])}if("text"==b.symbol.type){var g=b.symbol,h=this.createElementNS("","TEXTSYMBOL");a.appendChild(h);c=this.fontStyleKeys;d=0;
for(e=c.length;d<e;d++)f=c[d],g[f]&&h.setAttribute(f,b[f])}},writePolygonGeometry:function(a){if(!(a instanceof OpenLayers.Geometry.Polygon))throw{message:"Cannot write polygon geometry to ArcXML with an "+a.CLASS_NAME+" object.",geometry:a};for(var b=this.createElementNS("","POLYGON"),c=0,d=a.components.length;c<d;c++){for(var e=a.components[c],f=this.createElementNS("","RING"),g=0,h=e.components.length;g<h;g++){var j=e.components[g],k=this.createElementNS("","POINT");k.setAttribute("x",j.x);k.setAttribute("y",
j.y);f.appendChild(k)}b.appendChild(f)}return b},parseResponse:function(a){"string"==typeof a&&(a=(new OpenLayers.Format.XML).read(a));var b=new OpenLayers.Format.ArcXML.Response,c=a.getElementsByTagName("ERROR");if(null!=c&&0<c.length)b.error=this.getChildValue(c,"Unknown error.");else{c=a.getElementsByTagName("RESPONSE");if(null==c||0==c.length)return b.error="No RESPONSE tag found in ArcXML response.",b;var d=c[0].firstChild.nodeName;if("#text"==d)d=c[0].firstChild.nextSibling.nodeName;if("IMAGE"==
d)c=a.getElementsByTagName("ENVELOPE"),a=a.getElementsByTagName("OUTPUT"),null==c||0==c.length?b.error="No ENVELOPE tag found in ArcXML response.":null==a||0==a.length?b.error="No OUTPUT tag found in ArcXML response.":(c=this.parseAttributes(c[0]),d=this.parseAttributes(a[0]),b.image="string"==typeof d.type?{envelope:c,output:{type:d.type,data:this.getChildValue(a[0])}}:{envelope:c,output:d});else if("FEATURES"==d){if(a=c[0].getElementsByTagName("FEATURES"),c=a[0].getElementsByTagName("FEATURECOUNT"),
b.features.featurecount=c[0].getAttribute("count"),0<b.features.featurecount){c=a[0].getElementsByTagName("ENVELOPE");b.features.envelope=this.parseAttributes(c[0],"number");a=a[0].getElementsByTagName("FEATURE");for(c=0;c<a.length;c++){for(var d=new OpenLayers.Feature.Vector,e=a[c].getElementsByTagName("FIELD"),f=0;f<e.length;f++){var g=e[f].getAttribute("name"),h=e[f].getAttribute("value");d.attributes[g]=h}e=a[c].getElementsByTagName("POLYGON");if(0<e.length){e=e[0].getElementsByTagName("RING");
f=[];for(g=0;g<e.length;g++){h=[];h.push(this.parsePointGeometry(e[g]));for(var j=e[g].getElementsByTagName("HOLE"),k=0;k<j.length;k++)h.push(this.parsePointGeometry(j[k]));f.push(new OpenLayers.Geometry.Polygon(h))}d.geometry=1==f.length?f[0]:new OpenLayers.Geometry.MultiPolygon(f)}b.features.feature.push(d)}}}else b.error="Unidentified response type."}return b},parseAttributes:function(a,b){for(var c={},d=0;d<a.attributes.length;d++)c[a.attributes[d].nodeName]="number"==b?parseFloat(a.attributes[d].nodeValue):
a.attributes[d].nodeValue;return c},parsePointGeometry:function(a){var b=[],c=a.getElementsByTagName("COORDS");if(0<c.length){a=this.getChildValue(c[0]);a=a.split(/;/);for(c=0;c<a.length;c++){var d=a[c].split(/ /);b.push(new OpenLayers.Geometry.Point(parseFloat(d[0]),parseFloat(d[1])))}}else if(a=a.getElementsByTagName("POINT"),0<a.length)for(c=0;c<a.length;c++)b.push(new OpenLayers.Geometry.Point(parseFloat(a[c].getAttribute("x")),parseFloat(a[c].getAttribute("y"))));return new OpenLayers.Geometry.LinearRing(b)},
CLASS_NAME:"OpenLayers.Format.ArcXML"});
OpenLayers.Format.ArcXML.Request=OpenLayers.Class({initialize:function(){return OpenLayers.Util.extend(this,{get_image:{properties:{background:null,draw:!0,envelope:{minx:0,miny:0,maxx:0,maxy:0},featurecoordsys:{id:0,string:"",datumtransformid:0,datumtransformstring:""},filtercoordsys:{id:0,string:"",datumtransformid:0,datumtransformstring:""},imagesize:{height:0,width:0,dpi:96,printheight:0,printwidth:0,scalesymbols:!1},layerlist:[],output:{baseurl:"",legendbaseurl:"",legendname:"",legendpath:"",
legendurl:"",name:"",path:"",type:"jpg",url:""}}},get_feature:{layer:"",query:{isspatial:!1,featurecoordsys:{id:0,string:"",datumtransformid:0,datumtransformstring:""},filtercoordsys:{id:0,string:"",datumtransformid:0,datumtransformstring:""},buffer:0,where:"",spatialfilter:{relation:"envelope_intersection",envelope:null}}},environment:{separators:{cs:" ",ts:";"}},layer:[],workspaces:[]})},CLASS_NAME:"OpenLayers.Format.ArcXML.Request"});
OpenLayers.Format.ArcXML.Response=OpenLayers.Class({initialize:function(){return OpenLayers.Util.extend(this,{image:{envelope:null,output:""},features:{featurecount:0,envelope:null,feature:[]},error:""})},CLASS_NAME:"OpenLayers.Format.ArcXML.Response"});
OpenLayers.Format.GML=OpenLayers.Class(OpenLayers.Format.XML,{featureNS:"http://mapserver.gis.umn.edu/mapserver",featurePrefix:"feature",featureName:"featureMember",layerName:"features",geometryName:"geometry",collectionName:"FeatureCollection",gmlns:"http://www.opengis.net/gml",extractAttributes:!0,xy:!0,initialize:function(a){this.regExes={trimSpace:/^\s*|\s*$/g,removeSpace:/\s*/g,splitSpace:/\s+/,trimComma:/\s*,\s*/g};OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},read:function(a){"string"==
typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));for(var a=this.getElementsByTagNameNS(a.documentElement,this.gmlns,this.featureName),b=[],c=0;c<a.length;c++){var d=this.parseFeature(a[c]);d&&b.push(d)}return b},parseFeature:function(a){var b="MultiPolygon,Polygon,MultiLineString,LineString,MultiPoint,Point,Envelope".split(","),c,d,e,f;for(f=0;f<b.length;++f)if(c=b[f],d=this.getElementsByTagNameNS(a,this.gmlns,c),0<d.length){(f=this.parseGeometry[c.toLowerCase()])?(e=f.apply(this,
[d[0]]),this.internalProjection&&this.externalProjection&&e.transform(this.externalProjection,this.internalProjection)):OpenLayers.Console.error(OpenLayers.i18n("unsupportedGeometryType",{geomType:c}));break}var g;c=this.getElementsByTagNameNS(a,this.gmlns,"Box");for(f=0;f<c.length;++f)b=c[f],d=this.parseGeometry.box.apply(this,[b]),b=b.parentNode,"boundedBy"===(b.localName||b.nodeName.split(":").pop())?g=d:e=d.toGeometry();var h;this.extractAttributes&&(h=this.parseAttributes(a));e=new OpenLayers.Feature.Vector(e,
h);e.bounds=g;e.gml={featureType:a.firstChild.nodeName.split(":")[1],featureNS:a.firstChild.namespaceURI,featureNSPrefix:a.firstChild.prefix};for(var a=a.firstChild,j;a&&!(1==a.nodeType&&(j=a.getAttribute("fid")||a.getAttribute("id")));)a=a.nextSibling;e.fid=j;return e},parseGeometry:{point:function(a){var b,c;c=[];b=this.getElementsByTagNameNS(a,this.gmlns,"pos");if(0<b.length)c=b[0].firstChild.nodeValue,c=c.replace(this.regExes.trimSpace,""),c=c.split(this.regExes.splitSpace);if(0==c.length&&(b=
this.getElementsByTagNameNS(a,this.gmlns,"coordinates"),0<b.length))c=b[0].firstChild.nodeValue,c=c.replace(this.regExes.removeSpace,""),c=c.split(",");0==c.length&&(b=this.getElementsByTagNameNS(a,this.gmlns,"coord"),0<b.length&&(a=this.getElementsByTagNameNS(b[0],this.gmlns,"X"),b=this.getElementsByTagNameNS(b[0],this.gmlns,"Y"),0<a.length&&0<b.length&&(c=[a[0].firstChild.nodeValue,b[0].firstChild.nodeValue])));2==c.length&&(c[2]=null);return this.xy?new OpenLayers.Geometry.Point(c[0],c[1],c[2]):
new OpenLayers.Geometry.Point(c[1],c[0],c[2])},multipoint:function(a){var a=this.getElementsByTagNameNS(a,this.gmlns,"Point"),b=[];if(0<a.length)for(var c,d=0;d<a.length;++d)(c=this.parseGeometry.point.apply(this,[a[d]]))&&b.push(c);return new OpenLayers.Geometry.MultiPoint(b)},linestring:function(a,b){var c,d;d=[];var e=[];c=this.getElementsByTagNameNS(a,this.gmlns,"posList");if(0<c.length){d=this.getChildValue(c[0]);d=d.replace(this.regExes.trimSpace,"");d=d.split(this.regExes.splitSpace);var f=
parseInt(c[0].getAttribute("dimension")),g,h,j;for(c=0;c<d.length/f;++c)g=c*f,h=d[g],j=d[g+1],g=2==f?null:d[g+2],this.xy?e.push(new OpenLayers.Geometry.Point(h,j,g)):e.push(new OpenLayers.Geometry.Point(j,h,g))}if(0==d.length&&(c=this.getElementsByTagNameNS(a,this.gmlns,"coordinates"),0<c.length)){d=this.getChildValue(c[0]);d=d.replace(this.regExes.trimSpace,"");d=d.replace(this.regExes.trimComma,",");f=d.split(this.regExes.splitSpace);for(c=0;c<f.length;++c)d=f[c].split(","),2==d.length&&(d[2]=null),
this.xy?e.push(new OpenLayers.Geometry.Point(d[0],d[1],d[2])):e.push(new OpenLayers.Geometry.Point(d[1],d[0],d[2]))}d=null;0!=e.length&&(d=b?new OpenLayers.Geometry.LinearRing(e):new OpenLayers.Geometry.LineString(e));return d},multilinestring:function(a){var a=this.getElementsByTagNameNS(a,this.gmlns,"LineString"),b=[];if(0<a.length)for(var c,d=0;d<a.length;++d)(c=this.parseGeometry.linestring.apply(this,[a[d]]))&&b.push(c);return new OpenLayers.Geometry.MultiLineString(b)},polygon:function(a){var a=
this.getElementsByTagNameNS(a,this.gmlns,"LinearRing"),b=[];if(0<a.length)for(var c,d=0;d<a.length;++d)(c=this.parseGeometry.linestring.apply(this,[a[d],!0]))&&b.push(c);return new OpenLayers.Geometry.Polygon(b)},multipolygon:function(a){var a=this.getElementsByTagNameNS(a,this.gmlns,"Polygon"),b=[];if(0<a.length)for(var c,d=0;d<a.length;++d)(c=this.parseGeometry.polygon.apply(this,[a[d]]))&&b.push(c);return new OpenLayers.Geometry.MultiPolygon(b)},envelope:function(a){var b=[],c,d,e=this.getElementsByTagNameNS(a,
this.gmlns,"lowerCorner");if(0<e.length){c=[];if(0<e.length)c=e[0].firstChild.nodeValue,c=c.replace(this.regExes.trimSpace,""),c=c.split(this.regExes.splitSpace);2==c.length&&(c[2]=null);var f=this.xy?new OpenLayers.Geometry.Point(c[0],c[1],c[2]):new OpenLayers.Geometry.Point(c[1],c[0],c[2])}a=this.getElementsByTagNameNS(a,this.gmlns,"upperCorner");if(0<a.length){c=[];if(0<a.length)c=a[0].firstChild.nodeValue,c=c.replace(this.regExes.trimSpace,""),c=c.split(this.regExes.splitSpace);2==c.length&&(c[2]=
null);var g=this.xy?new OpenLayers.Geometry.Point(c[0],c[1],c[2]):new OpenLayers.Geometry.Point(c[1],c[0],c[2])}f&&g&&(b.push(new OpenLayers.Geometry.Point(f.x,f.y)),b.push(new OpenLayers.Geometry.Point(g.x,f.y)),b.push(new OpenLayers.Geometry.Point(g.x,g.y)),b.push(new OpenLayers.Geometry.Point(f.x,g.y)),b.push(new OpenLayers.Geometry.Point(f.x,f.y)),b=new OpenLayers.Geometry.LinearRing(b),d=new OpenLayers.Geometry.Polygon([b]));return d},box:function(a){var b=this.getElementsByTagNameNS(a,this.gmlns,
"coordinates"),c=a=null;if(0<b.length)b=b[0].firstChild.nodeValue,b=b.split(" "),2==b.length&&(a=b[0].split(","),c=b[1].split(","));if(null!==a&&null!==c)return new OpenLayers.Bounds(parseFloat(a[0]),parseFloat(a[1]),parseFloat(c[0]),parseFloat(c[1]))}},parseAttributes:function(a){for(var b={},a=a.firstChild,c,d,e;a;){if(1==a.nodeType){a=a.childNodes;for(c=0;c<a.length;++c)if(d=a[c],1==d.nodeType)if(e=d.childNodes,1==e.length){if(e=e[0],3==e.nodeType||4==e.nodeType)d=d.prefix?d.nodeName.split(":")[1]:
d.nodeName,e=e.nodeValue.replace(this.regExes.trimSpace,""),b[d]=e}else b[d.nodeName.split(":").pop()]=null;break}a=a.nextSibling}return b},write:function(a){a instanceof Array||(a=[a]);for(var b=this.createElementNS("http://www.opengis.net/wfs","wfs:"+this.collectionName),c=0;c<a.length;c++)b.appendChild(this.createFeatureXML(a[c]));return OpenLayers.Format.XML.prototype.write.apply(this,[b])},createFeatureXML:function(a){var b=this.buildGeometryNode(a.geometry),c=this.createElementNS(this.featureNS,
this.featurePrefix+":"+this.geometryName);c.appendChild(b);var b=this.createElementNS(this.gmlns,"gml:"+this.featureName),d=this.createElementNS(this.featureNS,this.featurePrefix+":"+this.layerName);d.setAttribute("fid",a.fid||a.id);d.appendChild(c);for(var e in a.attributes){var c=this.createTextNode(a.attributes[e]),f=this.createElementNS(this.featureNS,this.featurePrefix+":"+e.substring(e.lastIndexOf(":")+1));f.appendChild(c);d.appendChild(f)}b.appendChild(d);return b},buildGeometryNode:function(a){this.externalProjection&&
this.internalProjection&&(a=a.clone(),a.transform(this.internalProjection,this.externalProjection));var b=a.CLASS_NAME;return this.buildGeometry[b.substring(b.lastIndexOf(".")+1).toLowerCase()].apply(this,[a])},buildGeometry:{point:function(a){var b=this.createElementNS(this.gmlns,"gml:Point");b.appendChild(this.buildCoordinatesNode(a));return b},multipoint:function(a){for(var b=this.createElementNS(this.gmlns,"gml:MultiPoint"),a=a.components,c,d,e=0;e<a.length;e++)c=this.createElementNS(this.gmlns,
"gml:pointMember"),d=this.buildGeometry.point.apply(this,[a[e]]),c.appendChild(d),b.appendChild(c);return b},linestring:function(a){var b=this.createElementNS(this.gmlns,"gml:LineString");b.appendChild(this.buildCoordinatesNode(a));return b},multilinestring:function(a){for(var b=this.createElementNS(this.gmlns,"gml:MultiLineString"),a=a.components,c,d,e=0;e<a.length;++e)c=this.createElementNS(this.gmlns,"gml:lineStringMember"),d=this.buildGeometry.linestring.apply(this,[a[e]]),c.appendChild(d),b.appendChild(c);
return b},linearring:function(a){var b=this.createElementNS(this.gmlns,"gml:LinearRing");b.appendChild(this.buildCoordinatesNode(a));return b},polygon:function(a){for(var b=this.createElementNS(this.gmlns,"gml:Polygon"),a=a.components,c,d,e=0;e<a.length;++e)c=0==e?"outerBoundaryIs":"innerBoundaryIs",c=this.createElementNS(this.gmlns,"gml:"+c),d=this.buildGeometry.linearring.apply(this,[a[e]]),c.appendChild(d),b.appendChild(c);return b},multipolygon:function(a){for(var b=this.createElementNS(this.gmlns,
"gml:MultiPolygon"),a=a.components,c,d,e=0;e<a.length;++e)c=this.createElementNS(this.gmlns,"gml:polygonMember"),d=this.buildGeometry.polygon.apply(this,[a[e]]),c.appendChild(d),b.appendChild(c);return b},bounds:function(a){var b=this.createElementNS(this.gmlns,"gml:Box");b.appendChild(this.buildCoordinatesNode(a));return b}},buildCoordinatesNode:function(a){var b=this.createElementNS(this.gmlns,"gml:coordinates");b.setAttribute("decimal",".");b.setAttribute("cs",",");b.setAttribute("ts"," ");var c=
[];if(a instanceof OpenLayers.Bounds)c.push(a.left+","+a.bottom),c.push(a.right+","+a.top);else for(var a=a.components?a.components:[a],d=0;d<a.length;d++)c.push(a[d].x+","+a[d].y);c=this.createTextNode(c.join(" "));b.appendChild(c);return b},CLASS_NAME:"OpenLayers.Format.GML"});
OpenLayers.Format.GeoJSON=OpenLayers.Class(OpenLayers.Format.JSON,{ignoreExtraDims:!1,initialize:function(a){OpenLayers.Format.JSON.prototype.initialize.apply(this,[a])},read:function(a,b,c){var b=b?b:"FeatureCollection",d=null,e=null;if(e="string"==typeof a?OpenLayers.Format.JSON.prototype.read.apply(this,[a,c]):a)if("string"!=typeof e.type)OpenLayers.Console.error("Bad GeoJSON - no type: "+a);else{if(this.isValidType(e,b))switch(b){case "Geometry":try{d=this.parseGeometry(e)}catch(f){OpenLayers.Console.error(f)}break;
case "Feature":try{d=this.parseFeature(e),d.type="Feature"}catch(g){OpenLayers.Console.error(g)}break;case "FeatureCollection":switch(d=[],e.type){case "Feature":try{d.push(this.parseFeature(e))}catch(h){d=null,OpenLayers.Console.error(h)}break;case "FeatureCollection":a=0;for(b=e.features.length;a<b;++a)try{d.push(this.parseFeature(e.features[a]))}catch(j){d=null,OpenLayers.Console.error(j)}break;default:try{var k=this.parseGeometry(e);d.push(new OpenLayers.Feature.Vector(k))}catch(l){d=null,OpenLayers.Console.error(l)}}}}else OpenLayers.Console.error("Bad JSON: "+
a);return d},isValidType:function(a,b){var c=!1;switch(b){case "Geometry":-1==OpenLayers.Util.indexOf("Point,MultiPoint,LineString,MultiLineString,Polygon,MultiPolygon,Box,GeometryCollection".split(","),a.type)?OpenLayers.Console.error("Unsupported geometry type: "+a.type):c=!0;break;case "FeatureCollection":c=!0;break;default:a.type==b?c=!0:OpenLayers.Console.error("Cannot convert types from "+a.type+" to "+b)}return c},parseFeature:function(a){var b,c,d;c=a.properties?a.properties:{};d=a.geometry&&
a.geometry.bbox||a.bbox;try{b=this.parseGeometry(a.geometry)}catch(e){throw e;}b=new OpenLayers.Feature.Vector(b,c);if(d)b.bounds=OpenLayers.Bounds.fromArray(d);if(a.id)b.fid=a.id;return b},parseGeometry:function(a){if(null==a)return null;var b,c=!1;if("GeometryCollection"==a.type){if(!(a.geometries instanceof Array))throw"GeometryCollection must have geometries array: "+a;b=a.geometries.length;for(var c=Array(b),d=0;d<b;++d)c[d]=this.parseGeometry.apply(this,[a.geometries[d]]);b=new OpenLayers.Geometry.Collection(c);
c=!0}else{if(!(a.coordinates instanceof Array))throw"Geometry must have coordinates array: "+a;if(!this.parseCoords[a.type.toLowerCase()])throw"Unsupported geometry type: "+a.type;try{b=this.parseCoords[a.type.toLowerCase()].apply(this,[a.coordinates])}catch(e){throw e;}}this.internalProjection&&this.externalProjection&&!c&&b.transform(this.externalProjection,this.internalProjection);return b},parseCoords:{point:function(a){if(!1==this.ignoreExtraDims&&2!=a.length)throw"Only 2D points are supported: "+
a;return new OpenLayers.Geometry.Point(a[0],a[1])},multipoint:function(a){for(var b=[],c=null,d=0,e=a.length;d<e;++d){try{c=this.parseCoords.point.apply(this,[a[d]])}catch(f){throw f;}b.push(c)}return new OpenLayers.Geometry.MultiPoint(b)},linestring:function(a){for(var b=[],c=null,d=0,e=a.length;d<e;++d){try{c=this.parseCoords.point.apply(this,[a[d]])}catch(f){throw f;}b.push(c)}return new OpenLayers.Geometry.LineString(b)},multilinestring:function(a){for(var b=[],c=null,d=0,e=a.length;d<e;++d){try{c=
this.parseCoords.linestring.apply(this,[a[d]])}catch(f){throw f;}b.push(c)}return new OpenLayers.Geometry.MultiLineString(b)},polygon:function(a){for(var b=[],c,d,e=0,f=a.length;e<f;++e){try{d=this.parseCoords.linestring.apply(this,[a[e]])}catch(g){throw g;}c=new OpenLayers.Geometry.LinearRing(d.components);b.push(c)}return new OpenLayers.Geometry.Polygon(b)},multipolygon:function(a){for(var b=[],c=null,d=0,e=a.length;d<e;++d){try{c=this.parseCoords.polygon.apply(this,[a[d]])}catch(f){throw f;}b.push(c)}return new OpenLayers.Geometry.MultiPolygon(b)},
box:function(a){if(2!=a.length)throw"GeoJSON box coordinates must have 2 elements";return new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing([new OpenLayers.Geometry.Point(a[0][0],a[0][1]),new OpenLayers.Geometry.Point(a[1][0],a[0][1]),new OpenLayers.Geometry.Point(a[1][0],a[1][1]),new OpenLayers.Geometry.Point(a[0][0],a[1][1]),new OpenLayers.Geometry.Point(a[0][0],a[0][1])])])}},write:function(a,b){var c={type:null};if(a instanceof Array){c.type="FeatureCollection";var d=a.length;
c.features=Array(d);for(var e=0;e<d;++e){var f=a[e];if(!f instanceof OpenLayers.Feature.Vector)throw"FeatureCollection only supports collections of features: "+f;c.features[e]=this.extract.feature.apply(this,[f])}}else if(0==a.CLASS_NAME.indexOf("OpenLayers.Geometry"))c=this.extract.geometry.apply(this,[a]);else if(a instanceof OpenLayers.Feature.Vector&&(c=this.extract.feature.apply(this,[a]),a.layer&&a.layer.projection))c.crs=this.createCRSObject(a);return OpenLayers.Format.JSON.prototype.write.apply(this,
[c,b])},createCRSObject:function(a){var a=a.layer.projection.toString(),b={};a.match(/epsg:/i)&&(a=parseInt(a.substring(a.indexOf(":")+1)),b=4326==a?{type:"OGC",properties:{urn:"urn:ogc:def:crs:OGC:1.3:CRS84"}}:{type:"EPSG",properties:{code:a}});return b},extract:{feature:function(a){var b=this.extract.geometry.apply(this,[a.geometry]);return{type:"Feature",id:null==a.fid?a.id:a.fid,properties:a.attributes,geometry:b}},geometry:function(a){if(null==a)return null;this.internalProjection&&this.externalProjection&&
(a=a.clone(),a.transform(this.internalProjection,this.externalProjection));var b=a.CLASS_NAME.split(".")[2],a=this.extract[b.toLowerCase()].apply(this,[a]);return"Collection"==b?{type:"GeometryCollection",geometries:a}:{type:b,coordinates:a}},point:function(a){return[a.x,a.y]},multipoint:function(a){for(var b=[],c=0,d=a.components.length;c<d;++c)b.push(this.extract.point.apply(this,[a.components[c]]));return b},linestring:function(a){for(var b=[],c=0,d=a.components.length;c<d;++c)b.push(this.extract.point.apply(this,
[a.components[c]]));return b},multilinestring:function(a){for(var b=[],c=0,d=a.components.length;c<d;++c)b.push(this.extract.linestring.apply(this,[a.components[c]]));return b},polygon:function(a){for(var b=[],c=0,d=a.components.length;c<d;++c)b.push(this.extract.linestring.apply(this,[a.components[c]]));return b},multipolygon:function(a){for(var b=[],c=0,d=a.components.length;c<d;++c)b.push(this.extract.polygon.apply(this,[a.components[c]]));return b},collection:function(a){for(var b=a.components.length,
c=Array(b),d=0;d<b;++d)c[d]=this.extract.geometry.apply(this,[a.components[d]]);return c}},CLASS_NAME:"OpenLayers.Format.GeoJSON"});OpenLayers.Format.ArcXML.Features=OpenLayers.Class(OpenLayers.Format.XML,{initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},read:function(a){return(new OpenLayers.Format.ArcXML).read(a).features.feature}});if(!OpenLayers.Format.GML)OpenLayers.Format.GML={};
OpenLayers.Format.GML.Base=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{gml:"http://www.opengis.net/gml",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance",wfs:"http://www.opengis.net/wfs"},defaultPrefix:"gml",schemaLocation:null,featureType:null,featureNS:null,geometryName:"geometry",extractAttributes:!0,srsName:null,xy:!0,geometryTypes:null,singleFeatureType:null,regExes:{trimSpace:/^\s*|\s*$/g,removeSpace:/\s*/g,splitSpace:/\s+/,trimComma:/\s*,\s*/g},initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,
[a]);this.setGeometryTypes();a&&a.featureNS&&this.setNamespace("feature",a.featureNS);this.singleFeatureType=!a||"string"===typeof a.featureType},read:function(a){"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));if(a&&9==a.nodeType)a=a.documentElement;var b=[];this.readNode(a,{features:b});if(0==b.length){var c=this.getElementsByTagNameNS(a,this.namespaces.gml,"featureMember");if(c.length)for(var a=0,d=c.length;a<d;++a)this.readNode(c[a],{features:b});else c=this.getElementsByTagNameNS(a,
this.namespaces.gml,"featureMembers"),c.length&&this.readNode(c[0],{features:b})}return b},readers:{gml:{featureMember:function(a,b){this.readChildNodes(a,b)},featureMembers:function(a,b){this.readChildNodes(a,b)},name:function(a,b){b.name=this.getChildValue(a)},boundedBy:function(a,b){var c={};this.readChildNodes(a,c);if(c.components&&0<c.components.length)b.bounds=c.components[0]},Point:function(a,b){var c={points:[]};this.readChildNodes(a,c);if(!b.components)b.components=[];b.components.push(c.points[0])},
coordinates:function(a,b){for(var c=this.getChildValue(a).replace(this.regExes.trimSpace,""),c=c.replace(this.regExes.trimComma,","),c=c.split(this.regExes.splitSpace),d,e=c.length,f=Array(e),g=0;g<e;++g)d=c[g].split(","),f[g]=this.xy?new OpenLayers.Geometry.Point(d[0],d[1],d[2]):new OpenLayers.Geometry.Point(d[1],d[0],d[2]);b.points=f},coord:function(a,b){var c={};this.readChildNodes(a,c);if(!b.points)b.points=[];b.points.push(new OpenLayers.Geometry.Point(c.x,c.y,c.z))},X:function(a,b){b.x=this.getChildValue(a)},
Y:function(a,b){b.y=this.getChildValue(a)},Z:function(a,b){b.z=this.getChildValue(a)},MultiPoint:function(a,b){var c={components:[]};this.readChildNodes(a,c);b.components=[new OpenLayers.Geometry.MultiPoint(c.components)]},pointMember:function(a,b){this.readChildNodes(a,b)},LineString:function(a,b){var c={};this.readChildNodes(a,c);if(!b.components)b.components=[];b.components.push(new OpenLayers.Geometry.LineString(c.points))},MultiLineString:function(a,b){var c={components:[]};this.readChildNodes(a,
c);b.components=[new OpenLayers.Geometry.MultiLineString(c.components)]},lineStringMember:function(a,b){this.readChildNodes(a,b)},Polygon:function(a,b){var c={outer:null,inner:[]};this.readChildNodes(a,c);c.inner.unshift(c.outer);if(!b.components)b.components=[];b.components.push(new OpenLayers.Geometry.Polygon(c.inner))},LinearRing:function(a,b){var c={};this.readChildNodes(a,c);b.components=[new OpenLayers.Geometry.LinearRing(c.points)]},MultiPolygon:function(a,b){var c={components:[]};this.readChildNodes(a,
c);b.components=[new OpenLayers.Geometry.MultiPolygon(c.components)]},polygonMember:function(a,b){this.readChildNodes(a,b)},GeometryCollection:function(a,b){var c={components:[]};this.readChildNodes(a,c);b.components=[new OpenLayers.Geometry.Collection(c.components)]},geometryMember:function(a,b){this.readChildNodes(a,b)}},feature:{"*":function(a,b){var c,d=a.localName||a.nodeName.split(":").pop();b.features?!this.singleFeatureType&&-1!==OpenLayers.Util.indexOf(this.featureType,d)?c="_typeName":d===
this.featureType&&(c="_typeName"):0==a.childNodes.length||1==a.childNodes.length&&3==a.firstChild.nodeType?this.extractAttributes&&(c="_attribute"):c="_geometry";c&&this.readers.feature[c].apply(this,[a,b])},_typeName:function(a,b){var c={components:[],attributes:{}};this.readChildNodes(a,c);if(c.name)c.attributes.name=c.name;var d=new OpenLayers.Feature.Vector(c.components[0],c.attributes);if(!this.singleFeatureType)d.type=a.nodeName.split(":").pop(),d.namespace=a.namespaceURI;var e=a.getAttribute("fid")||
this.getAttributeNS(a,this.namespaces.gml,"id");if(e)d.fid=e;this.internalProjection&&this.externalProjection&&d.geometry&&d.geometry.transform(this.externalProjection,this.internalProjection);if(c.bounds)d.bounds=c.bounds;b.features.push(d)},_geometry:function(a,b){this.readChildNodes(a,b)},_attribute:function(a,b){var c=a.localName||a.nodeName.split(":").pop(),d=this.getChildValue(a);b.attributes[c]=d}},wfs:{FeatureCollection:function(a,b){this.readChildNodes(a,b)}}},write:function(a){a=this.writeNode("gml:"+
(a instanceof Array?"featureMembers":"featureMember"),a);this.setAttributeNS(a,this.namespaces.xsi,"xsi:schemaLocation",this.schemaLocation);return OpenLayers.Format.XML.prototype.write.apply(this,[a])},writers:{gml:{featureMember:function(a){var b=this.createElementNSPlus("gml:featureMember");this.writeNode("feature:_typeName",a,b);return b},MultiPoint:function(a){for(var b=this.createElementNSPlus("gml:MultiPoint"),c=0;c<a.components.length;++c)this.writeNode("pointMember",a.components[c],b);return b},
pointMember:function(a){var b=this.createElementNSPlus("gml:pointMember");this.writeNode("Point",a,b);return b},MultiLineString:function(a){for(var b=this.createElementNSPlus("gml:MultiLineString"),c=0;c<a.components.length;++c)this.writeNode("lineStringMember",a.components[c],b);return b},lineStringMember:function(a){var b=this.createElementNSPlus("gml:lineStringMember");this.writeNode("LineString",a,b);return b},MultiPolygon:function(a){for(var b=this.createElementNSPlus("gml:MultiPolygon"),c=0;c<
a.components.length;++c)this.writeNode("polygonMember",a.components[c],b);return b},polygonMember:function(a){var b=this.createElementNSPlus("gml:polygonMember");this.writeNode("Polygon",a,b);return b},GeometryCollection:function(a){for(var b=this.createElementNSPlus("gml:GeometryCollection"),c=0,d=a.components.length;c<d;++c)this.writeNode("geometryMember",a.components[c],b);return b},geometryMember:function(a){var b=this.createElementNSPlus("gml:geometryMember"),a=this.writeNode("feature:_geometry",
a);b.appendChild(a.firstChild);return b}},feature:{_typeName:function(a){var b=this.createElementNSPlus("feature:"+this.featureType,{attributes:{fid:a.fid}});a.geometry&&this.writeNode("feature:_geometry",a.geometry,b);for(var c in a.attributes){var d=a.attributes[c];null!=d&&this.writeNode("feature:_attribute",{name:c,value:d},b)}return b},_geometry:function(a){this.externalProjection&&this.internalProjection&&(a=a.clone().transform(this.internalProjection,this.externalProjection));var b=this.createElementNSPlus("feature:"+
this.geometryName),a=this.writeNode("gml:"+this.geometryTypes[a.CLASS_NAME],a,b);this.srsName&&a.setAttribute("srsName",this.srsName);return b},_attribute:function(a){return this.createElementNSPlus("feature:"+a.name,{value:a.value})}},wfs:{FeatureCollection:function(a){for(var b=this.createElementNSPlus("wfs:FeatureCollection"),c=0,d=a.length;c<d;++c)this.writeNode("gml:featureMember",a[c],b);return b}}},setGeometryTypes:function(){this.geometryTypes={"OpenLayers.Geometry.Point":"Point","OpenLayers.Geometry.MultiPoint":"MultiPoint",
"OpenLayers.Geometry.LineString":"LineString","OpenLayers.Geometry.MultiLineString":"MultiLineString","OpenLayers.Geometry.Polygon":"Polygon","OpenLayers.Geometry.MultiPolygon":"MultiPolygon","OpenLayers.Geometry.Collection":"GeometryCollection"}},CLASS_NAME:"OpenLayers.Format.GML.Base"});
OpenLayers.Format.WFS=OpenLayers.Class(OpenLayers.Format.GML,{layer:null,wfsns:"http://www.opengis.net/wfs",ogcns:"http://www.opengis.net/ogc",initialize:function(a,b){OpenLayers.Format.GML.prototype.initialize.apply(this,[a]);this.layer=b;if(this.layer.featureNS)this.featureNS=this.layer.featureNS;if(this.layer.options.geometry_column)this.geometryName=this.layer.options.geometry_column;if(this.layer.options.typename)this.featureName=this.layer.options.typename},write:function(a){var b=this.createElementNS(this.wfsns,
"wfs:Transaction");b.setAttribute("version","1.0.0");b.setAttribute("service","WFS");for(var c=0;c<a.length;c++)switch(a[c].state){case OpenLayers.State.INSERT:b.appendChild(this.insert(a[c]));break;case OpenLayers.State.UPDATE:b.appendChild(this.update(a[c]));break;case OpenLayers.State.DELETE:b.appendChild(this.remove(a[c]))}return OpenLayers.Format.XML.prototype.write.apply(this,[b])},createFeatureXML:function(a){var b=this.buildGeometryNode(a.geometry),c=this.createElementNS(this.featureNS,"feature:"+
this.geometryName);c.appendChild(b);b=this.createElementNS(this.featureNS,"feature:"+this.featureName);b.appendChild(c);for(var d in a.attributes){var c=this.createTextNode(a.attributes[d]),e=d;-1!=d.search(":")&&(e=d.split(":")[1]);e=this.createElementNS(this.featureNS,"feature:"+e);e.appendChild(c);b.appendChild(e)}return b},insert:function(a){var b=this.createElementNS(this.wfsns,"wfs:Insert");b.appendChild(this.createFeatureXML(a));return b},update:function(a){a.fid||OpenLayers.Console.userError(OpenLayers.i18n("noFID"));
var b=this.createElementNS(this.wfsns,"wfs:Update");b.setAttribute("typeName",this.featurePrefix+":"+this.featureName);b.setAttribute("xmlns:"+this.featurePrefix,this.featureNS);var c=this.createElementNS(this.wfsns,"wfs:Property"),d=this.createElementNS(this.wfsns,"wfs:Name"),e=this.createTextNode(this.geometryName);d.appendChild(e);c.appendChild(d);d=this.createElementNS(this.wfsns,"wfs:Value");e=this.buildGeometryNode(a.geometry);a.layer&&e.setAttribute("srsName",a.layer.projection.getCode());
d.appendChild(e);c.appendChild(d);b.appendChild(c);for(var f in a.attributes)c=this.createElementNS(this.wfsns,"wfs:Property"),d=this.createElementNS(this.wfsns,"wfs:Name"),d.appendChild(this.createTextNode(f)),c.appendChild(d),d=this.createElementNS(this.wfsns,"wfs:Value"),d.appendChild(this.createTextNode(a.attributes[f])),c.appendChild(d),b.appendChild(c);c=this.createElementNS(this.ogcns,"ogc:Filter");f=this.createElementNS(this.ogcns,"ogc:FeatureId");f.setAttribute("fid",a.fid);c.appendChild(f);
b.appendChild(c);return b},remove:function(a){if(!a.fid)return OpenLayers.Console.userError(OpenLayers.i18n("noFID")),!1;var b=this.createElementNS(this.wfsns,"wfs:Delete");b.setAttribute("typeName",this.featurePrefix+":"+this.featureName);b.setAttribute("xmlns:"+this.featurePrefix,this.featureNS);var c=this.createElementNS(this.ogcns,"ogc:Filter"),d=this.createElementNS(this.ogcns,"ogc:FeatureId");d.setAttribute("fid",a.fid);c.appendChild(d);b.appendChild(c);return b},destroy:function(){this.layer=
null},CLASS_NAME:"OpenLayers.Format.WFS"});
OpenLayers.Layer.ArcIMS=OpenLayers.Class(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{ClientVersion:"9.2",ServiceName:""},tileSize:null,featureCoordSys:"4326",filterCoordSys:"4326",layers:null,async:!0,name:"ArcIMS",isBaseLayer:!0,DEFAULT_OPTIONS:{tileSize:new OpenLayers.Size(512,512),featureCoordSys:"4326",filterCoordSys:"4326",layers:null,isBaseLayer:!0,async:!0,name:"ArcIMS"},initialize:function(a,b,c){this.tileSize=new OpenLayers.Size(512,512);this.params=OpenLayers.Util.applyDefaults({ServiceName:c.serviceName},
this.DEFAULT_PARAMS);this.options=OpenLayers.Util.applyDefaults(c,this.DEFAULT_OPTIONS);OpenLayers.Layer.Grid.prototype.initialize.apply(this,[a,b,this.params,c]);if(this.transparent){if(!this.isBaseLayer)this.isBaseLayer=!1;if("image/jpeg"==this.format)this.format=OpenLayers.Util.alphaHack()?"image/gif":"image/png"}if(null===this.options.layers)this.options.layers=[]},destroy:function(){OpenLayers.Layer.Grid.prototype.destroy.apply(this,arguments)},getURL:function(a){var b="",a=this.adjustBounds(a),
a=new OpenLayers.Format.ArcXML(OpenLayers.Util.extend(this.options,{requesttype:"image",envelope:a.toArray(),tileSize:this.tileSize})),a=new OpenLayers.Request.POST({url:this.getFullRequestString(),data:a.write(),async:!1});if(null!=a){b=a.responseXML;if(!b||!b.documentElement)b=a.responseText;b=this.getUrlOrImage((new OpenLayers.Format.ArcXML).read(b).image.output)}return b},getURLasync:function(a,b,c,d){a=this.adjustBounds(a);a=new OpenLayers.Format.ArcXML(OpenLayers.Util.extend(this.options,{requesttype:"image",
envelope:a.toArray(),tileSize:this.tileSize}));OpenLayers.Request.POST({url:this.getFullRequestString(),async:!0,data:a.write(),callback:function(a){var f=a.responseXML;if(!f||!f.documentElement)f=a.responseText;a=(new OpenLayers.Format.ArcXML).read(f);b[c]=this.getUrlOrImage(a.image.output);d.apply(b)},scope:this})},getUrlOrImage:function(a){var b="";a.url?b=a.url:a.data&&(b="data:image/"+a.type+";base64,"+a.data);return b},setLayerQuery:function(a,b){for(var c=0;c<this.options.layers.length;c++)if(a==
this.options.layers[c].id){this.options.layers[c].query=b;return}this.options.layers.push({id:a,visible:!0,query:b})},getFeatureInfo:function(a,b,c){var d=c.buffer||1,e=c.callback||function(){},f=c.scope||window,g={};OpenLayers.Util.extend(g,this.options);g.requesttype="feature";if(a instanceof OpenLayers.LonLat)g.polygon=null,g.envelope=[a.lon-d,a.lat-d,a.lon+d,a.lat+d];else if(a instanceof OpenLayers.Geometry.Polygon)g.envelope=null,g.polygon=a;var h=new OpenLayers.Format.ArcXML(g);OpenLayers.Util.extend(h.request.get_feature,
c);h.request.get_feature.layer=b.id;"number"==typeof b.query.accuracy?h.request.get_feature.query.accuracy=b.query.accuracy:(a=this.map.getCenter(),c=this.map.getViewPortPxFromLonLat(a),c.x++,c=this.map.getLonLatFromPixel(c),h.request.get_feature.query.accuracy=c.lon-a.lon);h.request.get_feature.query.where=b.query.where;h.request.get_feature.query.spatialfilter.relation="area_intersection";OpenLayers.Request.POST({url:this.getFullRequestString({CustomService:"Query"}),data:h.write(),callback:function(a){a=
h.parseResponse(a.responseText);h.iserror()?e.call(f,null):e.call(f,a.features)}})},clone:function(a){null==a&&(a=new OpenLayers.Layer.ArcIMS(this.name,this.url,this.getOptions()));return a=OpenLayers.Layer.Grid.prototype.clone.apply(this,[a])},addTile:function(a,b){return new OpenLayers.Tile.Image(this,b,a,null,this.tileSize)},CLASS_NAME:"OpenLayers.Layer.ArcIMS"});
OpenLayers.Format.GML.v2=OpenLayers.Class(OpenLayers.Format.GML.Base,{schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/2.1.2/feature.xsd",initialize:function(a){OpenLayers.Format.GML.Base.prototype.initialize.apply(this,[a])},readers:{gml:OpenLayers.Util.applyDefaults({outerBoundaryIs:function(a,b){var c={};this.readChildNodes(a,c);b.outer=c.components[0]},innerBoundaryIs:function(a,b){var c={};this.readChildNodes(a,c);b.inner.push(c.components[0])},Box:function(a,b){var c=
{};this.readChildNodes(a,c);if(!b.components)b.components=[];var d=c.points[0],c=c.points[1];b.components.push(new OpenLayers.Bounds(d.x,d.y,c.x,c.y))}},OpenLayers.Format.GML.Base.prototype.readers.gml),feature:OpenLayers.Format.GML.Base.prototype.readers.feature,wfs:OpenLayers.Format.GML.Base.prototype.readers.wfs},write:function(a){a=this.writeNode(a instanceof Array?"wfs:FeatureCollection":"gml:featureMember",a);this.setAttributeNS(a,this.namespaces.xsi,"xsi:schemaLocation",this.schemaLocation);
return OpenLayers.Format.XML.prototype.write.apply(this,[a])},writers:{gml:OpenLayers.Util.applyDefaults({Point:function(a){var b=this.createElementNSPlus("gml:Point");this.writeNode("coordinates",[a],b);return b},coordinates:function(a){for(var b=a.length,c=Array(b),d,e=0;e<b;++e)d=a[e],c[e]=this.xy?d.x+","+d.y:d.y+","+d.x,void 0!=d.z&&(c[e]+=","+d.z);return this.createElementNSPlus("gml:coordinates",{attributes:{decimal:".",cs:",",ts:" "},value:1==b?c[0]:c.join(" ")})},LineString:function(a){var b=
this.createElementNSPlus("gml:LineString");this.writeNode("coordinates",a.components,b);return b},Polygon:function(a){var b=this.createElementNSPlus("gml:Polygon");this.writeNode("outerBoundaryIs",a.components[0],b);for(var c=1;c<a.components.length;++c)this.writeNode("innerBoundaryIs",a.components[c],b);return b},outerBoundaryIs:function(a){var b=this.createElementNSPlus("gml:outerBoundaryIs");this.writeNode("LinearRing",a,b);return b},innerBoundaryIs:function(a){var b=this.createElementNSPlus("gml:innerBoundaryIs");
this.writeNode("LinearRing",a,b);return b},LinearRing:function(a){var b=this.createElementNSPlus("gml:LinearRing");this.writeNode("coordinates",a.components,b);return b},Box:function(a){var b=this.createElementNSPlus("gml:Box");this.writeNode("coordinates",[{x:a.left,y:a.bottom},{x:a.right,y:a.top}],b);this.srsName&&b.setAttribute("srsName",this.srsName);return b}},OpenLayers.Format.GML.Base.prototype.writers.gml),feature:OpenLayers.Format.GML.Base.prototype.writers.feature,wfs:OpenLayers.Format.GML.Base.prototype.writers.wfs},
CLASS_NAME:"OpenLayers.Format.GML.v2"});
OpenLayers.Format.GML.v3=OpenLayers.Class(OpenLayers.Format.GML.Base,{schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd",curve:!1,multiCurve:!0,surface:!1,multiSurface:!0,initialize:function(a){OpenLayers.Format.GML.Base.prototype.initialize.apply(this,[a])},readers:{gml:OpenLayers.Util.applyDefaults({featureMembers:function(a,b){this.readChildNodes(a,b)},Curve:function(a,b){var c={points:[]};this.readChildNodes(a,c);if(!b.components)b.components=
[];b.components.push(new OpenLayers.Geometry.LineString(c.points))},segments:function(a,b){this.readChildNodes(a,b)},LineStringSegment:function(a,b){var c={};this.readChildNodes(a,c);c.points&&Array.prototype.push.apply(b.points,c.points)},pos:function(a,b){var c=this.getChildValue(a).replace(this.regExes.trimSpace,"").split(this.regExes.splitSpace),c=this.xy?new OpenLayers.Geometry.Point(c[0],c[1],c[2]):new OpenLayers.Geometry.Point(c[1],c[0],c[2]);b.points=[c]},posList:function(a,b){for(var c=this.getChildValue(a).replace(this.regExes.trimSpace,
"").split(this.regExes.splitSpace),d=parseInt(a.getAttribute("dimension"))||2,e,f,g,h=Array(c.length/d),j=0,k=c.length;j<k;j+=d)e=c[j],f=c[j+1],g=2==d?void 0:c[j+2],h[j/d]=this.xy?new OpenLayers.Geometry.Point(e,f,g):new OpenLayers.Geometry.Point(f,e,g);b.points=h},Surface:function(a,b){this.readChildNodes(a,b)},patches:function(a,b){this.readChildNodes(a,b)},PolygonPatch:function(a,b){this.readers.gml.Polygon.apply(this,[a,b])},exterior:function(a,b){var c={};this.readChildNodes(a,c);b.outer=c.components[0]},
interior:function(a,b){var c={};this.readChildNodes(a,c);b.inner.push(c.components[0])},MultiCurve:function(a,b){var c={components:[]};this.readChildNodes(a,c);if(0<c.components.length)b.components=[new OpenLayers.Geometry.MultiLineString(c.components)]},curveMember:function(a,b){this.readChildNodes(a,b)},MultiSurface:function(a,b){var c={components:[]};this.readChildNodes(a,c);if(0<c.components.length)b.components=[new OpenLayers.Geometry.MultiPolygon(c.components)]},surfaceMember:function(a,b){this.readChildNodes(a,
b)},surfaceMembers:function(a,b){this.readChildNodes(a,b)},pointMembers:function(a,b){this.readChildNodes(a,b)},lineStringMembers:function(a,b){this.readChildNodes(a,b)},polygonMembers:function(a,b){this.readChildNodes(a,b)},geometryMembers:function(a,b){this.readChildNodes(a,b)},Envelope:function(a,b){var c={points:Array(2)};this.readChildNodes(a,c);if(!b.components)b.components=[];var d=c.points[0],c=c.points[1];b.components.push(new OpenLayers.Bounds(d.x,d.y,c.x,c.y))},lowerCorner:function(a,b){var c=
{};this.readers.gml.pos.apply(this,[a,c]);b.points[0]=c.points[0]},upperCorner:function(a,b){var c={};this.readers.gml.pos.apply(this,[a,c]);b.points[1]=c.points[0]}},OpenLayers.Format.GML.Base.prototype.readers.gml),feature:OpenLayers.Format.GML.Base.prototype.readers.feature,wfs:OpenLayers.Format.GML.Base.prototype.readers.wfs},write:function(a){a=this.writeNode("gml:"+(a instanceof Array?"featureMembers":"featureMember"),a);this.setAttributeNS(a,this.namespaces.xsi,"xsi:schemaLocation",this.schemaLocation);
return OpenLayers.Format.XML.prototype.write.apply(this,[a])},writers:{gml:OpenLayers.Util.applyDefaults({featureMembers:function(a){for(var b=this.createElementNSPlus("gml:featureMembers"),c=0,d=a.length;c<d;++c)this.writeNode("feature:_typeName",a[c],b);return b},Point:function(a){var b=this.createElementNSPlus("gml:Point");this.writeNode("pos",a,b);return b},pos:function(a){return this.createElementNSPlus("gml:pos",{value:this.xy?a.x+" "+a.y:a.y+" "+a.x})},LineString:function(a){var b=this.createElementNSPlus("gml:LineString");
this.writeNode("posList",a.components,b);return b},Curve:function(a){var b=this.createElementNSPlus("gml:Curve");this.writeNode("segments",a,b);return b},segments:function(a){var b=this.createElementNSPlus("gml:segments");this.writeNode("LineStringSegment",a,b);return b},LineStringSegment:function(a){var b=this.createElementNSPlus("gml:LineStringSegment");this.writeNode("posList",a.components,b);return b},posList:function(a){for(var b=a.length,c=Array(b),d,e=0;e<b;++e)d=a[e],c[e]=this.xy?d.x+" "+
d.y:d.y+" "+d.x;return this.createElementNSPlus("gml:posList",{value:c.join(" ")})},Surface:function(a){var b=this.createElementNSPlus("gml:Surface");this.writeNode("patches",a,b);return b},patches:function(a){var b=this.createElementNSPlus("gml:patches");this.writeNode("PolygonPatch",a,b);return b},PolygonPatch:function(a){var b=this.createElementNSPlus("gml:PolygonPatch",{attributes:{interpolation:"planar"}});this.writeNode("exterior",a.components[0],b);for(var c=1,d=a.components.length;c<d;++c)this.writeNode("interior",
a.components[c],b);return b},Polygon:function(a){var b=this.createElementNSPlus("gml:Polygon");this.writeNode("exterior",a.components[0],b);for(var c=1,d=a.components.length;c<d;++c)this.writeNode("interior",a.components[c],b);return b},exterior:function(a){var b=this.createElementNSPlus("gml:exterior");this.writeNode("LinearRing",a,b);return b},interior:function(a){var b=this.createElementNSPlus("gml:interior");this.writeNode("LinearRing",a,b);return b},LinearRing:function(a){var b=this.createElementNSPlus("gml:LinearRing");
this.writeNode("posList",a.components,b);return b},MultiCurve:function(a){for(var b=this.createElementNSPlus("gml:MultiCurve"),c=0,d=a.components.length;c<d;++c)this.writeNode("curveMember",a.components[c],b);return b},curveMember:function(a){var b=this.createElementNSPlus("gml:curveMember");this.curve?this.writeNode("Curve",a,b):this.writeNode("LineString",a,b);return b},MultiSurface:function(a){for(var b=this.createElementNSPlus("gml:MultiSurface"),c=0,d=a.components.length;c<d;++c)this.writeNode("surfaceMember",
a.components[c],b);return b},surfaceMember:function(a){var b=this.createElementNSPlus("gml:surfaceMember");this.surface?this.writeNode("Surface",a,b):this.writeNode("Polygon",a,b);return b},Envelope:function(a){var b=this.createElementNSPlus("gml:Envelope");this.writeNode("lowerCorner",a,b);this.writeNode("upperCorner",a,b);this.srsName&&b.setAttribute("srsName",this.srsName);return b},lowerCorner:function(a){return this.createElementNSPlus("gml:lowerCorner",{value:this.xy?a.left+" "+a.bottom:a.bottom+
" "+a.left})},upperCorner:function(a){return this.createElementNSPlus("gml:upperCorner",{value:this.xy?a.right+" "+a.top:a.top+" "+a.right})}},OpenLayers.Format.GML.Base.prototype.writers.gml),feature:OpenLayers.Format.GML.Base.prototype.writers.feature,wfs:OpenLayers.Format.GML.Base.prototype.writers.wfs},setGeometryTypes:function(){this.geometryTypes={"OpenLayers.Geometry.Point":"Point","OpenLayers.Geometry.MultiPoint":"MultiPoint","OpenLayers.Geometry.LineString":!0===this.curve?"Curve":"LineString",
"OpenLayers.Geometry.MultiLineString":!1===this.multiCurve?"MultiLineString":"MultiCurve","OpenLayers.Geometry.Polygon":!0===this.surface?"Surface":"Polygon","OpenLayers.Geometry.MultiPolygon":!1===this.multiSurface?"MultiPolygon":"MultiSurface","OpenLayers.Geometry.Collection":"GeometryCollection"}},CLASS_NAME:"OpenLayers.Format.GML.v3"});
OpenLayers.Format.Atom=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{atom:"http://www.w3.org/2005/Atom",georss:"http://www.georss.org/georss"},feedTitle:"untitled",defaultEntryTitle:"untitled",gmlParser:null,xy:!1,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},read:function(a){"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));return this.parseFeatures(a)},write:function(a){var b;if(a instanceof Array){b=this.createElementNSPlus("atom:feed");
b.appendChild(this.createElementNSPlus("atom:title",{value:this.feedTitle}));for(var c=0,d=a.length;c<d;c++)b.appendChild(this.buildEntryNode(a[c]))}else b=this.buildEntryNode(a);return OpenLayers.Format.XML.prototype.write.apply(this,[b])},buildContentNode:function(a){var b=this.createElementNSPlus("atom:content",{attributes:{type:a.type||null}});if(a.src)b.setAttribute("src",a.src);else if("text"==a.type||null==a.type)b.appendChild(this.createTextNode(a.value));else if("html"==a.type){if("string"!=
typeof a.value)throw"HTML content must be in form of an escaped string";b.appendChild(this.createTextNode(a.value))}else"xhtml"==a.type?b.appendChild(a.value):"xhtml"==a.type||a.type.match(/(\+|\/)xml$/)?b.appendChild(a.value):b.appendChild(this.createTextNode(a.value));return b},buildEntryNode:function(a){var b=a.attributes,c=b.atom||{},d=this.createElementNSPlus("atom:entry");if(c.authors)for(var e=c.authors instanceof Array?c.authors:[c.authors],f=0,g=e.length;f<g;f++)d.appendChild(this.buildPersonConstructNode("author",
e[f]));if(c.categories)for(var e=c.categories instanceof Array?c.categories:[c.categories],h,f=0,g=e.length;f<g;f++)h=e[f],d.appendChild(this.createElementNSPlus("atom:category",{attributes:{term:h.term,scheme:h.scheme||null,label:h.label||null}}));c.content&&d.appendChild(this.buildContentNode(c.content));if(c.contributors){e=c.contributors instanceof Array?c.contributors:[c.contributors];f=0;for(g=e.length;f<g;f++)d.appendChild(this.buildPersonConstructNode("contributor",e[f]))}a.fid&&d.appendChild(this.createElementNSPlus("atom:id",
{value:a.fid}));if(c.links){e=c.links instanceof Array?c.links:[c.links];f=0;for(g=e.length;f<g;f++)h=e[f],d.appendChild(this.createElementNSPlus("atom:link",{attributes:{href:h.href,rel:h.rel||null,type:h.type||null,hreflang:h.hreflang||null,title:h.title||null,length:h.length||null}}))}c.published&&d.appendChild(this.createElementNSPlus("atom:published",{value:c.published}));c.rights&&d.appendChild(this.createElementNSPlus("atom:rights",{value:c.rights}));if(c.summary||b.description)d.appendChild(this.createElementNSPlus("atom:summary",
{value:c.summary||b.description}));d.appendChild(this.createElementNSPlus("atom:title",{value:c.title||b.title||this.defaultEntryTitle}));c.updated&&d.appendChild(this.createElementNSPlus("atom:updated",{value:c.updated}));a.geometry&&(b=this.createElementNSPlus("georss:where"),b.appendChild(this.buildGeometryNode(a.geometry)),d.appendChild(b));return d},initGmlParser:function(){this.gmlParser=new OpenLayers.Format.GML.v3({xy:this.xy,featureNS:"http://example.com#feature",internalProjection:this.internalProjection,
externalProjection:this.externalProjection})},buildGeometryNode:function(a){this.gmlParser||this.initGmlParser();return this.gmlParser.writeNode("feature:_geometry",a).firstChild},buildPersonConstructNode:function(a,b){var c=["uri","email"],d=this.createElementNSPlus("atom:"+a);d.appendChild(this.createElementNSPlus("atom:name",{value:b.name}));for(var e=0,f=c.length;e<f;e++)b[c[e]]&&d.appendChild(this.createElementNSPlus("atom:"+c[e],{value:b[c[e]]}));return d},getFirstChildValue:function(a,b,c,
d){return(a=this.getElementsByTagNameNS(a,b,c))&&0<a.length?this.getChildValue(a[0],d):d},parseFeature:function(a){var b={},c=null,d=null,e=null,f=this.namespaces.atom;this.parsePersonConstructs(a,"author",b);d=this.getElementsByTagNameNS(a,f,"category");if(0<d.length)b.categories=[];for(var g=0,h=d.length;g<h;g++){c={};c.term=d[g].getAttribute("term");if(e=d[g].getAttribute("scheme"))c.scheme=e;if(e=d[g].getAttribute("label"))c.label=e;b.categories.push(c)}d=this.getElementsByTagNameNS(a,f,"content");
if(0<d.length){c={};if(e=d[0].getAttribute("type"))c.type=e;(e=d[0].getAttribute("src"))?c.src=e:(c.value="text"==c.type||"html"==c.type||null==c.type?this.getFirstChildValue(a,f,"content",null):"xhtml"==c.type||c.type.match(/(\+|\/)xml$/)?this.getChildEl(d[0]):this.getFirstChildValue(a,f,"content",null),b.content=c)}this.parsePersonConstructs(a,"contributor",b);b.id=this.getFirstChildValue(a,f,"id",null);d=this.getElementsByTagNameNS(a,f,"link");if(0<d.length)b.links=Array(d.length);for(var j=["rel",
"type","hreflang","title","length"],g=0,h=d.length;g<h;g++){c={};c.href=d[g].getAttribute("href");for(var k=0,l=j.length;k<l;k++)(e=d[g].getAttribute(j[k]))&&(c[j[k]]=e);b.links[g]=c}if(c=this.getFirstChildValue(a,f,"published",null))b.published=c;if(c=this.getFirstChildValue(a,f,"rights",null))b.rights=c;if(c=this.getFirstChildValue(a,f,"summary",null))b.summary=c;b.title=this.getFirstChildValue(a,f,"title",null);b.updated=this.getFirstChildValue(a,f,"updated",null);c={title:b.title,description:b.summary,
atom:b};a=this.parseLocations(a)[0];a=new OpenLayers.Feature.Vector(a,c);a.fid=b.id;return a},parseFeatures:function(a){var b=[],c=this.getElementsByTagNameNS(a,this.namespaces.atom,"entry");0==c.length&&(c=[a]);for(var a=0,d=c.length;a<d;a++)b.push(this.parseFeature(c[a]));return b},parseLocations:function(a){var b=this.namespaces.georss,c={components:[]},d=this.getElementsByTagNameNS(a,b,"where");if(d&&0<d.length){this.gmlParser||this.initGmlParser();for(var e=0,f=d.length;e<f;e++)this.gmlParser.readChildNodes(d[e],
c)}c=c.components;if((d=this.getElementsByTagNameNS(a,b,"point"))&&0<d.length){e=0;for(f=d.length;e<f;e++){var g=OpenLayers.String.trim(d[e].firstChild.nodeValue).split(/\s+/);2!=g.length&&(g=OpenLayers.String.trim(d[e].firstChild.nodeValue).split(/\s*,\s*/));c.push(new OpenLayers.Geometry.Point(parseFloat(g[1]),parseFloat(g[0])))}}var h=this.getElementsByTagNameNS(a,b,"line");if(h&&0<h.length)for(var j,e=0,f=h.length;e<f;e++){d=OpenLayers.String.trim(h[e].firstChild.nodeValue).split(/\s+/);j=[];
for(var k=0,l=d.length;k<l;k+=2)g=new OpenLayers.Geometry.Point(parseFloat(d[k+1]),parseFloat(d[k])),j.push(g);c.push(new OpenLayers.Geometry.LineString(j))}if((a=this.getElementsByTagNameNS(a,b,"polygon"))&&0<a.length){e=0;for(f=a.length;e<f;e++){d=OpenLayers.String.trim(a[e].firstChild.nodeValue).split(/\s+/);j=[];k=0;for(l=d.length;k<l;k+=2)g=new OpenLayers.Geometry.Point(parseFloat(d[k+1]),parseFloat(d[k])),j.push(g);c.push(new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing(c)]))}}if(this.internalProjection&&
this.externalProjection){e=0;for(f=c.length;e<f;e++)c[e]&&c[e].transform(this.externalProjection,this.internalProjection)}return c},parsePersonConstructs:function(a,b,c){for(var d=[],e=this.namespaces.atom,a=this.getElementsByTagNameNS(a,e,b),f=["uri","email"],g=0,h=a.length;g<h;g++){var j={};j.name=this.getFirstChildValue(a[g],e,"name",null);for(var k=0,l=f.length;k<l;k++){var m=this.getFirstChildValue(a[g],e,f[k],null);m&&(j[f[k]]=m)}d.push(j)}0<d.length&&(c[b+"s"]=d)},CLASS_NAME:"OpenLayers.Format.Atom"});
OpenLayers.Format.Filter.v1_0_0=OpenLayers.Class(OpenLayers.Format.GML.v2,OpenLayers.Format.Filter.v1,{VERSION:"1.0.0",schemaLocation:"http://www.opengis.net/ogc/filter/1.0.0/filter.xsd",initialize:function(a){OpenLayers.Format.GML.v2.prototype.initialize.apply(this,[a])},readers:{ogc:OpenLayers.Util.applyDefaults({PropertyIsEqualTo:function(a,b){var c=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.EQUAL_TO});this.readChildNodes(a,c);b.filters.push(c)},PropertyIsNotEqualTo:function(a,
b){var c=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.NOT_EQUAL_TO});this.readChildNodes(a,c);b.filters.push(c)},PropertyIsLike:function(a,b){var c=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.LIKE});this.readChildNodes(a,c);var d=a.getAttribute("wildCard"),e=a.getAttribute("singleChar"),f=a.getAttribute("escape");c.value2regex(d,e,f);b.filters.push(c)}},OpenLayers.Format.Filter.v1.prototype.readers.ogc),gml:OpenLayers.Format.GML.v2.prototype.readers.gml,
feature:OpenLayers.Format.GML.v2.prototype.readers.feature},writers:{ogc:OpenLayers.Util.applyDefaults({PropertyIsEqualTo:function(a){var b=this.createElementNSPlus("ogc:PropertyIsEqualTo");this.writeNode("PropertyName",a,b);this.writeNode("Literal",a.value,b);return b},PropertyIsNotEqualTo:function(a){var b=this.createElementNSPlus("ogc:PropertyIsNotEqualTo");this.writeNode("PropertyName",a,b);this.writeNode("Literal",a.value,b);return b},PropertyIsLike:function(a){var b=this.createElementNSPlus("ogc:PropertyIsLike",
{attributes:{wildCard:"*",singleChar:".",escape:"!"}});this.writeNode("PropertyName",a,b);this.writeNode("Literal",a.regex2value(),b);return b},BBOX:function(a){var b=this.createElementNSPlus("ogc:BBOX");this.writeNode("PropertyName",a,b);var c=this.writeNode("gml:Box",a.value,b);a.projection&&c.setAttribute("srsName",a.projection);return b}},OpenLayers.Format.Filter.v1.prototype.writers.ogc),gml:OpenLayers.Format.GML.v2.prototype.writers.gml,feature:OpenLayers.Format.GML.v2.prototype.writers.feature},
writeSpatial:function(a,b){var c=this.createElementNSPlus("ogc:"+b);this.writeNode("PropertyName",a,c);var d;d=a.value instanceof OpenLayers.Geometry?this.writeNode("feature:_geometry",a.value).firstChild:this.writeNode("gml:Box",a.value);a.projection&&d.setAttribute("srsName",a.projection);c.appendChild(d);return c},CLASS_NAME:"OpenLayers.Format.Filter.v1_0_0"});
OpenLayers.Format.Filter.v1_1_0=OpenLayers.Class(OpenLayers.Format.GML.v3,OpenLayers.Format.Filter.v1,{VERSION:"1.1.0",schemaLocation:"http://www.opengis.net/ogc/filter/1.1.0/filter.xsd",initialize:function(a){OpenLayers.Format.GML.v3.prototype.initialize.apply(this,[a])},readers:{ogc:OpenLayers.Util.applyDefaults({PropertyIsEqualTo:function(a,b){var c=a.getAttribute("matchCase"),c=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.EQUAL_TO,matchCase:!("false"===c||"0"===c)});this.readChildNodes(a,
c);b.filters.push(c)},PropertyIsNotEqualTo:function(a,b){var c=a.getAttribute("matchCase"),c=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.NOT_EQUAL_TO,matchCase:!("false"===c||"0"===c)});this.readChildNodes(a,c);b.filters.push(c)},PropertyIsLike:function(a,b){var c=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.LIKE});this.readChildNodes(a,c);var d=a.getAttribute("wildCard"),e=a.getAttribute("singleChar"),f=a.getAttribute("escapeChar");c.value2regex(d,e,
f);b.filters.push(c)}},OpenLayers.Format.Filter.v1.prototype.readers.ogc),gml:OpenLayers.Format.GML.v3.prototype.readers.gml,feature:OpenLayers.Format.GML.v3.prototype.readers.feature},writers:{ogc:OpenLayers.Util.applyDefaults({PropertyIsEqualTo:function(a){var b=this.createElementNSPlus("ogc:PropertyIsEqualTo",{attributes:{matchCase:a.matchCase}});this.writeNode("PropertyName",a,b);this.writeNode("Literal",a.value,b);return b},PropertyIsNotEqualTo:function(a){var b=this.createElementNSPlus("ogc:PropertyIsNotEqualTo",
{attributes:{matchCase:a.matchCase}});this.writeNode("PropertyName",a,b);this.writeNode("Literal",a.value,b);return b},PropertyIsLike:function(a){var b=this.createElementNSPlus("ogc:PropertyIsLike",{attributes:{wildCard:"*",singleChar:".",escapeChar:"!"}});this.writeNode("PropertyName",a,b);this.writeNode("Literal",a.regex2value(),b);return b},BBOX:function(a){var b=this.createElementNSPlus("ogc:BBOX");this.writeNode("PropertyName",a,b);var c=this.writeNode("gml:Envelope",a.value);a.projection&&c.setAttribute("srsName",
a.projection);b.appendChild(c);return b}},OpenLayers.Format.Filter.v1.prototype.writers.ogc),gml:OpenLayers.Format.GML.v3.prototype.writers.gml,feature:OpenLayers.Format.GML.v3.prototype.writers.feature},writeSpatial:function(a,b){var c=this.createElementNSPlus("ogc:"+b);this.writeNode("PropertyName",a,c);var d;d=a.value instanceof OpenLayers.Geometry?this.writeNode("feature:_geometry",a.value).firstChild:this.writeNode("gml:Envelope",a.value);a.projection&&d.setAttribute("srsName",a.projection);
c.appendChild(d);return c},CLASS_NAME:"OpenLayers.Format.Filter.v1_1_0"});
OpenLayers.Format.SOSCapabilities.v1_0_0=OpenLayers.Class(OpenLayers.Format.SOSCapabilities,{namespaces:{ows:"http://www.opengis.net/ows/1.1",sos:"http://www.opengis.net/sos/1.0",gml:"http://www.opengis.net/gml",xlink:"http://www.w3.org/1999/xlink"},regExes:{trimSpace:/^\s*|\s*$/g,removeSpace:/\s*/g,splitSpace:/\s+/,trimComma:/\s*,\s*/g},initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a]);this.options=a},read:function(a){"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,
[a]));if(a&&9==a.nodeType)a=a.documentElement;var b={};this.readNode(a,b);return b},readers:{gml:OpenLayers.Util.applyDefaults({name:function(a,b){b.name=this.getChildValue(a)},TimePeriod:function(a,b){b.timePeriod={};this.readChildNodes(a,b.timePeriod)},beginPosition:function(a,b){b.beginPosition=this.getChildValue(a)},endPosition:function(a,b){b.endPosition=this.getChildValue(a)}},OpenLayers.Format.GML.v3.prototype.readers.gml),sos:{Capabilities:function(a,b){this.readChildNodes(a,b)},Contents:function(a,
b){b.contents={};this.readChildNodes(a,b.contents)},ObservationOfferingList:function(a,b){b.offeringList={};this.readChildNodes(a,b.offeringList)},ObservationOffering:function(a,b){var c=this.getAttributeNS(a,this.namespaces.gml,"id");b[c]={procedures:[],observedProperties:[],featureOfInterestIds:[],responseFormats:[],resultModels:[],responseModes:[]};this.readChildNodes(a,b[c])},time:function(a,b){b.time={};this.readChildNodes(a,b.time)},procedure:function(a,b){b.procedures.push(this.getAttributeNS(a,
this.namespaces.xlink,"href"))},observedProperty:function(a,b){b.observedProperties.push(this.getAttributeNS(a,this.namespaces.xlink,"href"))},featureOfInterest:function(a,b){b.featureOfInterestIds.push(this.getAttributeNS(a,this.namespaces.xlink,"href"))},responseFormat:function(a,b){b.responseFormats.push(this.getChildValue(a))},resultModel:function(a,b){b.resultModels.push(this.getChildValue(a))},responseMode:function(a,b){b.responseModes.push(this.getChildValue(a))}},ows:OpenLayers.Format.OWSCommon.v1_1_0.prototype.readers.ows},
CLASS_NAME:"OpenLayers.Format.SOSCapabilities.v1_0_0"});
OpenLayers.Format.SOSGetFeatureOfInterest=OpenLayers.Class(OpenLayers.Format.XML,{VERSION:"1.0.0",namespaces:{sos:"http://www.opengis.net/sos/1.0",gml:"http://www.opengis.net/gml",sa:"http://www.opengis.net/sampling/1.0",xsi:"http://www.w3.org/2001/XMLSchema-instance"},schemaLocation:"http://www.opengis.net/sos/1.0 http://schemas.opengis.net/sos/1.0.0/sosAll.xsd",defaultPrefix:"sos",regExes:{trimSpace:/^\s*|\s*$/g,removeSpace:/\s*/g,splitSpace:/\s+/,trimComma:/\s*,\s*/g},initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,
[a])},read:function(a){"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));if(a&&9==a.nodeType)a=a.documentElement;var b={features:[]};this.readNode(a,b);for(var a=[],c=0,d=b.features.length;c<d;c++){var e=b.features[c];this.internalProjection&&this.externalProjection&&e.components[0]&&e.components[0].transform(this.externalProjection,this.internalProjection);e=new OpenLayers.Feature.Vector(e.components[0],e.attributes);a.push(e)}return a},readers:{sa:{SamplingPoint:function(a,
b){if(!b.attributes){var c={attributes:{}};b.features.push(c);b=c}b.attributes.id=this.getAttributeNS(a,this.namespaces.gml,"id");this.readChildNodes(a,b)},position:function(a,b){this.readChildNodes(a,b)}},gml:OpenLayers.Util.applyDefaults({FeatureCollection:function(a,b){this.readChildNodes(a,b)},featureMember:function(a,b){var c={attributes:{}};b.features.push(c);this.readChildNodes(a,c)},name:function(a,b){b.attributes.name=this.getChildValue(a)},pos:function(a,b){if(!this.externalProjection)this.externalProjection=
new OpenLayers.Projection(a.getAttribute("srsName"));OpenLayers.Format.GML.v3.prototype.readers.gml.pos.apply(this,[a,b])}},OpenLayers.Format.GML.v3.prototype.readers.gml)},writers:{sos:{GetFeatureOfInterest:function(a){for(var b=this.createElementNSPlus("GetFeatureOfInterest",{attributes:{version:this.VERSION,service:"SOS","xsi:schemaLocation":this.schemaLocation}}),c=0,d=a.fois.length;c<d;c++)this.writeNode("FeatureOfInterestId",{foi:a.fois[c]},b);return b},FeatureOfInterestId:function(a){return this.createElementNSPlus("FeatureOfInterestId",
{value:a.foi})}}},CLASS_NAME:"OpenLayers.Format.SOSGetFeatureOfInterest"});
OpenLayers.Format.SOSGetObservation=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{ows:"http://www.opengis.net/ows",gml:"http://www.opengis.net/gml",sos:"http://www.opengis.net/sos/1.0",ogc:"http://www.opengis.net/ogc",om:"http://www.opengis.net/om/1.0",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},regExes:{trimSpace:/^\s*|\s*$/g,removeSpace:/\s*/g,splitSpace:/\s+/,trimComma:/\s*,\s*/g},VERSION:"1.0.0",schemaLocation:"http://www.opengis.net/sos/1.0 http://schemas.opengis.net/sos/1.0.0/sosGetObservation.xsd",
defaultPrefix:"sos",initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},read:function(a){"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));if(a&&9==a.nodeType)a=a.documentElement;var b={measurements:[]};this.readNode(a,b);return b},write:function(a){a=this.writeNode("sos:GetObservation",a);a.setAttribute("xmlns:om",this.namespaces.om);this.setAttributeNS(a,this.namespaces.xsi,"xsi:schemaLocation",this.schemaLocation);return OpenLayers.Format.XML.prototype.write.apply(this,
[a])},readers:{om:{ObservationCollection:function(a,b){b.id=this.getAttributeNS(a,this.namespaces.gml,"id");this.readChildNodes(a,b)},member:function(a,b){this.readChildNodes(a,b)},Measurement:function(a,b){var c={};b.measurements.push(c);this.readChildNodes(a,c)},samplingTime:function(a,b){var c={};b.samplingTime=c;this.readChildNodes(a,c)},observedProperty:function(a,b){b.observedProperty=this.getAttributeNS(a,this.namespaces.xlink,"href");this.readChildNodes(a,b)},procedure:function(a,b){b.procedure=
this.getAttributeNS(a,this.namespaces.xlink,"href");this.readChildNodes(a,b)},result:function(a,b){var c={};b.result=c;""!==this.getChildValue(a)?(c.value=this.getChildValue(a),c.uom=a.getAttribute("uom")):this.readChildNodes(a,c)}},gml:OpenLayers.Util.applyDefaults({TimeInstant:function(a,b){var c={};b.timeInstant=c;this.readChildNodes(a,c)},timePosition:function(a,b){b.timePosition=this.getChildValue(a)}},OpenLayers.Format.GML.v3.prototype.readers.gml)},writers:{sos:{GetObservation:function(a){var b=
this.createElementNSPlus("GetObservation",{attributes:{version:this.VERSION,service:"SOS"}});this.writeNode("offering",a,b);this.writeNode("eventTime",a,b);this.writeNode("procedure",a,b);this.writeNode("observedProperty",a,b);this.writeNode("responseFormat",a,b);this.writeNode("resultModel",a,b);this.writeNode("responseMode",a,b);return b},responseFormat:function(a){return this.createElementNSPlus("responseFormat",{value:a.responseFormat})},procedure:function(a){return this.createElementNSPlus("procedure",
{value:a.procedure})},offering:function(a){return this.createElementNSPlus("offering",{value:a.offering})},observedProperty:function(a){return this.createElementNSPlus("observedProperty",{value:a.observedProperty})},eventTime:function(a){var b=this.createElementNSPlus("eventTime");"latest"===a.eventTime&&this.writeNode("ogc:TM_Equals",a,b);return b},resultModel:function(a){return this.createElementNSPlus("resultModel",{value:a.resultModel})},responseMode:function(a){return this.createElementNSPlus("responseMode",
{value:a.responseMode})}},ogc:{TM_Equals:function(a){var b=this.createElementNSPlus("ogc:TM_Equals");this.writeNode("ogc:PropertyName",{property:"urn:ogc:data:time:iso8601"},b);"latest"===a.eventTime&&this.writeNode("gml:TimeInstant",{value:"latest"},b);return b},PropertyName:function(a){return this.createElementNSPlus("ogc:PropertyName",{value:a.property})}},gml:{TimeInstant:function(a){var b=this.createElementNSPlus("gml:TimeInstant");this.writeNode("gml:timePosition",a,b);return b},timePosition:function(a){return this.createElementNSPlus("gml:timePosition",
{value:a.value})}}},CLASS_NAME:"OpenLayers.Format.SOSGetObservation"});
OpenLayers.Format.CSWGetRecords.v2_0_2=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance",csw:"http://www.opengis.net/cat/csw/2.0.2",dc:"http://purl.org/dc/elements/1.1/",dct:"http://purl.org/dc/terms/",ows:"http://www.opengis.net/ows"},defaultPrefix:"csw",version:"2.0.2",schemaLocation:"http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd",requestId:null,resultType:null,outputFormat:null,
outputSchema:null,startPosition:null,maxRecords:null,DistributedSearch:null,ResponseHandler:null,Query:null,regExes:{trimSpace:/^\s*|\s*$/g,removeSpace:/\s*/g,splitSpace:/\s+/,trimComma:/\s*,\s*/g},initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},read:function(a){"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));if(a&&9==a.nodeType)a=a.documentElement;var b={};this.readNode(a,b);return b},readers:{csw:{GetRecordsResponse:function(a,b){b.records=
[];this.readChildNodes(a,b);var c=this.getAttributeNS(a,"","version");if(""!=c)b.version=c},RequestId:function(a,b){b.RequestId=this.getChildValue(a)},SearchStatus:function(a,b){b.SearchStatus={};var c=this.getAttributeNS(a,"","timestamp");if(""!=c)b.SearchStatus.timestamp=c},SearchResults:function(a,b){this.readChildNodes(a,b);for(var c=a.attributes,d={},e=0,f=c.length;e<f;++e)d[c[e].name]="numberOfRecordsMatched"==c[e].name||"numberOfRecordsReturned"==c[e].name||"nextRecord"==c[e].name?parseInt(c[e].nodeValue):
c[e].nodeValue;b.SearchResults=d},SummaryRecord:function(a,b){var c={type:"SummaryRecord"};this.readChildNodes(a,c);b.records.push(c)},BriefRecord:function(a,b){var c={type:"BriefRecord"};this.readChildNodes(a,c);b.records.push(c)},DCMIRecord:function(a,b){var c={type:"DCMIRecord"};this.readChildNodes(a,c);b.records.push(c)},Record:function(a,b){var c={type:"Record"};this.readChildNodes(a,c);b.records.push(c)}},dc:{"*":function(a,b){var c=a.localName||a.nodeName.split(":").pop();b[c]instanceof Array||
(b[c]=[]);for(var d={},e=a.attributes,f=0,g=e.length;f<g;++f)d[e[f].name]=e[f].nodeValue;d.value=this.getChildValue(a);b[c].push(d)}},dct:{"*":function(a,b){var c=a.localName||a.nodeName.split(":").pop();b[c]instanceof Array||(b[c]=[]);b[c].push(this.getChildValue(a))}},ows:OpenLayers.Util.applyDefaults({BoundingBox:function(a,b){if(b.bounds)b.BoundingBox=[{crs:b.projection,value:[b.bounds.left,b.bounds.bottom,b.bounds.right,b.bounds.top]}],delete b.projection,delete b.bounds;OpenLayers.Format.OWSCommon.v1_0_0.prototype.readers.ows.BoundingBox.apply(this,
arguments)}},OpenLayers.Format.OWSCommon.v1_0_0.prototype.readers.ows)},write:function(a){a=this.writeNode("csw:GetRecords",a);return OpenLayers.Format.XML.prototype.write.apply(this,[a])},writers:{csw:{GetRecords:function(a){a||(a={});var b=this.createElementNSPlus("csw:GetRecords",{attributes:{service:"CSW",version:this.version,requestId:a.requestId||this.requestId,resultType:a.resultType||this.resultType,outputFormat:a.outputFormat||this.outputFormat,outputSchema:a.outputSchema||this.outputSchema,
startPosition:a.startPosition||this.startPosition,maxRecords:a.maxRecords||this.maxRecords}});if(a.DistributedSearch||this.DistributedSearch)this.writeNode("csw:DistributedSearch",a.DistributedSearch||this.DistributedSearch,b);var c=a.ResponseHandler||this.ResponseHandler;if(c instanceof Array&&0<c.length)for(var d=0,e=c.length;d<e;d++)this.writeNode("csw:ResponseHandler",c[d],b);this.writeNode("Query",a.Query||this.Query,b);return b},DistributedSearch:function(a){return this.createElementNSPlus("csw:DistributedSearch",
{attributes:{hopCount:a.hopCount}})},ResponseHandler:function(a){return this.createElementNSPlus("csw:ResponseHandler",{value:a.value})},Query:function(a){a||(a={});var b=this.createElementNSPlus("csw:Query",{attributes:{typeNames:a.typeNames||"csw:Record"}}),c=a.ElementName;if(c instanceof Array&&0<c.length)for(var d=0,e=c.length;d<e;d++)this.writeNode("csw:ElementName",c[d],b);else this.writeNode("csw:ElementSetName",a.ElementSetName||{value:"summary"},b);a.Constraint&&this.writeNode("csw:Constraint",
a.Constraint,b);return b},ElementName:function(a){return this.createElementNSPlus("csw:ElementName",{value:a.value})},ElementSetName:function(a){return this.createElementNSPlus("csw:ElementSetName",{attributes:{typeNames:a.typeNames},value:a.value})},Constraint:function(a){var b=this.createElementNSPlus("csw:Constraint",{attributes:{version:a.version}});if(a.Filter){var c=new OpenLayers.Format.Filter({version:a.version});b.appendChild(c.write(a.Filter))}else a.CqlText&&(a=this.createElementNSPlus("CqlText",
{value:a.CqlText.value}),b.appendChild(a));return b}}},CLASS_NAME:"OpenLayers.Format.CSWGetRecords.v2_0_2"});
OpenLayers.Format.SLD.v1=OpenLayers.Class(OpenLayers.Format.Filter.v1_0_0,{namespaces:{sld:"http://www.opengis.net/sld",ogc:"http://www.opengis.net/ogc",gml:"http://www.opengis.net/gml",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},defaultPrefix:"sld",schemaLocation:null,multipleSymbolizers:!1,featureTypeCounter:null,defaultSymbolizer:{fillColor:"#808080",fillOpacity:1,strokeColor:"#000000",strokeOpacity:1,strokeWidth:1,strokeDashstyle:"solid",pointRadius:3,
graphicName:"square"},initialize:function(a){OpenLayers.Format.Filter.v1_0_0.prototype.initialize.apply(this,[a])},read:function(a,b){var b=OpenLayers.Util.applyDefaults(b,this.options),c={namedLayers:!0===b.namedLayersAsArray?[]:{}};this.readChildNodes(a,c);return c},readers:OpenLayers.Util.applyDefaults({sld:{StyledLayerDescriptor:function(a,b){b.version=a.getAttribute("version");this.readChildNodes(a,b)},Name:function(a,b){b.name=this.getChildValue(a)},Title:function(a,b){b.title=this.getChildValue(a)},
Abstract:function(a,b){b.description=this.getChildValue(a)},NamedLayer:function(a,b){var c={userStyles:[],namedStyles:[]};this.readChildNodes(a,c);for(var d=0,e=c.userStyles.length;d<e;++d)c.userStyles[d].layerName=c.name;b.namedLayers instanceof Array?b.namedLayers.push(c):b.namedLayers[c.name]=c},NamedStyle:function(a,b){b.namedStyles.push(this.getChildName(a.firstChild))},UserStyle:function(a,b){var c={defaultsPerSymbolizer:!0,rules:[]};this.featureTypeCounter=-1;this.readChildNodes(a,c);this.multipleSymbolizers?
(delete c.defaultsPerSymbolizer,c=new OpenLayers.Style2(c)):c=new OpenLayers.Style(this.defaultSymbolizer,c);b.userStyles.push(c)},IsDefault:function(a,b){if("1"==this.getChildValue(a))b.isDefault=!0},FeatureTypeStyle:function(a,b){++this.featureTypeCounter;var c={rules:this.multipleSymbolizers?b.rules:[]};this.readChildNodes(a,c);if(!this.multipleSymbolizers)b.rules=c.rules},Rule:function(a,b){var c;this.multipleSymbolizers&&(c={symbolizers:[]});c=new OpenLayers.Rule(c);this.readChildNodes(a,c);
b.rules.push(c)},ElseFilter:function(a,b){b.elseFilter=!0},MinScaleDenominator:function(a,b){b.minScaleDenominator=parseFloat(this.getChildValue(a))},MaxScaleDenominator:function(a,b){b.maxScaleDenominator=parseFloat(this.getChildValue(a))},TextSymbolizer:function(a,b){var c={};this.readChildNodes(a,c);this.multipleSymbolizers?(c.zIndex=this.featureTypeCounter,b.symbolizers.push(new OpenLayers.Symbolizer.Text(c))):b.symbolizer.Text=OpenLayers.Util.applyDefaults(c,b.symbolizer.Text)},Label:function(a,
b){var c={};this.readChildNodes(a,c);if(c.property)b.label="${"+c.property+"}";else if(c=this.readOgcExpression(a))b.label=c},Font:function(a,b){this.readChildNodes(a,b)},Halo:function(a,b){var c={};this.readChildNodes(a,c);b.haloRadius=c.haloRadius;b.haloColor=c.fillColor;b.haloOpacity=c.fillOpacity},Radius:function(a,b){var c=this.readOgcExpression(a);if(null!=c)b.haloRadius=c},RasterSymbolizer:function(a,b){var c={};this.readChildNodes(a,c);this.multipleSymbolizers?(c.zIndex=this.featureTypeCounter,
b.symbolizers.push(new OpenLayers.Symbolizer.Raster(c))):b.symbolizer.Raster=OpenLayers.Util.applyDefaults(c,b.symbolizer.Raster)},Geometry:function(a,b){b.geometry={};this.readChildNodes(a,b.geometry)},ColorMap:function(a,b){b.colorMap=[];this.readChildNodes(a,b.colorMap)},ColorMapEntry:function(a,b){var c=a.getAttribute("quantity"),d=a.getAttribute("opacity");b.push({color:a.getAttribute("color"),quantity:null!==c?parseFloat(c):void 0,label:a.getAttribute("label")||void 0,opacity:null!==d?parseFloat(d):
void 0})},LineSymbolizer:function(a,b){var c={};this.readChildNodes(a,c);this.multipleSymbolizers?(c.zIndex=this.featureTypeCounter,b.symbolizers.push(new OpenLayers.Symbolizer.Line(c))):b.symbolizer.Line=OpenLayers.Util.applyDefaults(c,b.symbolizer.Line)},PolygonSymbolizer:function(a,b){var c={fill:!1,stroke:!1};this.multipleSymbolizers||(c=b.symbolizer.Polygon||c);this.readChildNodes(a,c);this.multipleSymbolizers?(c.zIndex=this.featureTypeCounter,b.symbolizers.push(new OpenLayers.Symbolizer.Polygon(c))):
b.symbolizer.Polygon=c},PointSymbolizer:function(a,b){var c={fill:!1,stroke:!1,graphic:!1};this.multipleSymbolizers||(c=b.symbolizer.Point||c);this.readChildNodes(a,c);this.multipleSymbolizers?(c.zIndex=this.featureTypeCounter,b.symbolizers.push(new OpenLayers.Symbolizer.Point(c))):b.symbolizer.Point=c},Stroke:function(a,b){b.stroke=!0;this.readChildNodes(a,b)},Fill:function(a,b){b.fill=!0;this.readChildNodes(a,b)},CssParameter:function(a,b){var c=this.cssMap[a.getAttribute("name")];if(c){var d=this.readOgcExpression(a);
d&&(b[c]=d)}},Graphic:function(a,b){b.graphic=!0;var c={};this.readChildNodes(a,c);for(var d="stroke,strokeColor,strokeWidth,strokeOpacity,strokeLinecap,fill,fillColor,fillOpacity,graphicName,rotation,graphicFormat".split(","),e,f,g=0,h=d.length;g<h;++g)e=d[g],f=c[e],void 0!=f&&(b[e]=f);if(void 0!=c.opacity)b.graphicOpacity=c.opacity;if(void 0!=c.size)b.pointRadius=c.size/2;if(void 0!=c.href)b.externalGraphic=c.href;if(void 0!=c.rotation)b.rotation=c.rotation},ExternalGraphic:function(a,b){this.readChildNodes(a,
b)},Mark:function(a,b){this.readChildNodes(a,b)},WellKnownName:function(a,b){b.graphicName=this.getChildValue(a)},Opacity:function(a,b){var c=this.readOgcExpression(a);if(c)b.opacity=c},Size:function(a,b){var c=this.readOgcExpression(a);if(c)b.size=c},Rotation:function(a,b){var c=this.readOgcExpression(a);if(c)b.rotation=c},OnlineResource:function(a,b){b.href=this.getAttributeNS(a,this.namespaces.xlink,"href")},Format:function(a,b){b.graphicFormat=this.getChildValue(a)}}},OpenLayers.Format.Filter.v1_0_0.prototype.readers),
cssMap:{stroke:"strokeColor","stroke-opacity":"strokeOpacity","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-dasharray":"strokeDashstyle",fill:"fillColor","fill-opacity":"fillOpacity","font-family":"fontFamily","font-size":"fontSize","font-weight":"fontWeight","font-style":"fontStyle"},getCssProperty:function(a){var b=null,c;for(c in this.cssMap)if(this.cssMap[c]==a){b=c;break}return b},getGraphicFormat:function(a){var b,c;for(c in this.graphicFormats)if(this.graphicFormats[c].test(a)){b=
c;break}return b||this.defautlGraphicFormat},defaultGraphicFormat:"image/png",graphicFormats:{"image/jpeg":/\.jpe?g$/i,"image/gif":/\.gif$/i,"image/png":/\.png$/i},write:function(a){return this.writers.sld.StyledLayerDescriptor.apply(this,[a])},writers:OpenLayers.Util.applyDefaults({sld:{StyledLayerDescriptor:function(a){var b=this.createElementNSPlus("sld:StyledLayerDescriptor",{attributes:{version:this.VERSION,"xsi:schemaLocation":this.schemaLocation}});b.setAttribute("xmlns:ogc",this.namespaces.ogc);
b.setAttribute("xmlns:gml",this.namespaces.gml);a.name&&this.writeNode("Name",a.name,b);a.title&&this.writeNode("Title",a.title,b);a.description&&this.writeNode("Abstract",a.description,b);if(a.namedLayers instanceof Array)for(var c=0,d=a.namedLayers.length;c<d;++c)this.writeNode("NamedLayer",a.namedLayers[c],b);else for(c in a.namedLayers)this.writeNode("NamedLayer",a.namedLayers[c],b);return b},Name:function(a){return this.createElementNSPlus("sld:Name",{value:a})},Title:function(a){return this.createElementNSPlus("sld:Title",
{value:a})},Abstract:function(a){return this.createElementNSPlus("sld:Abstract",{value:a})},NamedLayer:function(a){var b=this.createElementNSPlus("sld:NamedLayer");this.writeNode("Name",a.name,b);if(a.namedStyles)for(var c=0,d=a.namedStyles.length;c<d;++c)this.writeNode("NamedStyle",a.namedStyles[c],b);if(a.userStyles){c=0;for(d=a.userStyles.length;c<d;++c)this.writeNode("UserStyle",a.userStyles[c],b)}return b},NamedStyle:function(a){var b=this.createElementNSPlus("sld:NamedStyle");this.writeNode("Name",
a,b);return b},UserStyle:function(a){var b=this.createElementNSPlus("sld:UserStyle");a.name&&this.writeNode("Name",a.name,b);a.title&&this.writeNode("Title",a.title,b);a.description&&this.writeNode("Abstract",a.description,b);a.isDefault&&this.writeNode("IsDefault",a.isDefault,b);if(this.multipleSymbolizers&&a.rules){for(var c={"0":[]},d=[0],e,f,g,h,j,k=0,l=a.rules.length;k<l;++k)if(e=a.rules[k],e.symbolizers){f={};for(var m=0,o=e.symbolizers.length;m<o;++m){g=e.symbolizers[m];h=g.zIndex;if(!(h in
f))j=e.clone(),j.symbolizers=[],f[h]=j;f[h].symbolizers.push(g.clone())}for(h in f)h in c||(d.push(h),c[h]=[]),c[h].push(f[h])}else c[0].push(e.clone());d.sort();k=0;for(l=d.length;k<l;++k)if(e=c[d[k]],0<e.length)j=a.clone(),j.rules=c[d[k]],this.writeNode("FeatureTypeStyle",j,b)}else this.writeNode("FeatureTypeStyle",a,b);return b},IsDefault:function(a){return this.createElementNSPlus("sld:IsDefault",{value:a?"1":"0"})},FeatureTypeStyle:function(a){for(var b=this.createElementNSPlus("sld:FeatureTypeStyle"),
c=0,d=a.rules.length;c<d;++c)this.writeNode("Rule",a.rules[c],b);return b},Rule:function(a){var b=this.createElementNSPlus("sld:Rule");a.name&&this.writeNode("Name",a.name,b);a.title&&this.writeNode("Title",a.title,b);a.description&&this.writeNode("Abstract",a.description,b);a.elseFilter?this.writeNode("ElseFilter",null,b):a.filter&&this.writeNode("ogc:Filter",a.filter,b);void 0!=a.minScaleDenominator&&this.writeNode("MinScaleDenominator",a.minScaleDenominator,b);void 0!=a.maxScaleDenominator&&this.writeNode("MaxScaleDenominator",
a.maxScaleDenominator,b);var c,d;if(this.multipleSymbolizers&&a.symbolizers)for(var e=0,f=a.symbolizers.length;e<f;++e)d=a.symbolizers[e],c=d.CLASS_NAME.split(".").pop(),this.writeNode(c+"Symbolizer",d,b);else for(var f=OpenLayers.Style.SYMBOLIZER_PREFIXES,e=0,g=f.length;e<g;++e)c=f[e],(d=a.symbolizer[c])&&this.writeNode(c+"Symbolizer",d,b);return b},ElseFilter:function(){return this.createElementNSPlus("sld:ElseFilter")},MinScaleDenominator:function(a){return this.createElementNSPlus("sld:MinScaleDenominator",
{value:a})},MaxScaleDenominator:function(a){return this.createElementNSPlus("sld:MaxScaleDenominator",{value:a})},LineSymbolizer:function(a){var b=this.createElementNSPlus("sld:LineSymbolizer");this.writeNode("Stroke",a,b);return b},Stroke:function(a){var b=this.createElementNSPlus("sld:Stroke");void 0!=a.strokeColor&&this.writeNode("CssParameter",{symbolizer:a,key:"strokeColor"},b);void 0!=a.strokeOpacity&&this.writeNode("CssParameter",{symbolizer:a,key:"strokeOpacity"},b);void 0!=a.strokeWidth&&
this.writeNode("CssParameter",{symbolizer:a,key:"strokeWidth"},b);void 0!=a.strokeDashstyle&&"solid"!==a.strokeDashstyle&&this.writeNode("CssParameter",{symbolizer:a,key:"strokeDashstyle"},b);void 0!=a.strokeLinecap&&this.writeNode("CssParameter",{symbolizer:a,key:"strokeLinecap"},b);return b},CssParameter:function(a){return this.createElementNSPlus("sld:CssParameter",{attributes:{name:this.getCssProperty(a.key)},value:a.symbolizer[a.key]})},TextSymbolizer:function(a){var b=this.createElementNSPlus("sld:TextSymbolizer");
null!=a.label&&this.writeNode("Label",a.label,b);(null!=a.fontFamily||null!=a.fontSize||null!=a.fontWeight||null!=a.fontStyle)&&this.writeNode("Font",a,b);(null!=a.haloRadius||null!=a.haloColor||null!=a.haloOpacity)&&this.writeNode("Halo",a,b);(null!=a.fillColor||null!=a.fillOpacity)&&this.writeNode("Fill",a,b);return b},Font:function(a){var b=this.createElementNSPlus("sld:Font");a.fontFamily&&this.writeNode("CssParameter",{symbolizer:a,key:"fontFamily"},b);a.fontSize&&this.writeNode("CssParameter",
{symbolizer:a,key:"fontSize"},b);a.fontWeight&&this.writeNode("CssParameter",{symbolizer:a,key:"fontWeight"},b);a.fontStyle&&this.writeNode("CssParameter",{symbolizer:a,key:"fontStyle"},b);return b},Label:function(a){var b=this.createElementNSPlus("sld:Label"),a=a.split("${");b.appendChild(this.createTextNode(a[0]));for(var c,d,e=1,f=a.length;e<f;e++)c=a[e],d=c.indexOf("}"),0<d?(this.writeNode("ogc:PropertyName",{property:c.substring(0,d)},b),b.appendChild(this.createTextNode(c.substring(++d)))):
b.appendChild(this.createTextNode("${"+c));return b},Halo:function(a){var b=this.createElementNSPlus("sld:Halo");a.haloRadius&&this.writeNode("Radius",a.haloRadius,b);(a.haloColor||a.haloOpacity)&&this.writeNode("Fill",{fillColor:a.haloColor,fillOpacity:a.haloOpacity},b);return b},Radius:function(a){return this.createElementNSPlus("sld:Radius",{value:a})},RasterSymbolizer:function(a){var b=this.createElementNSPlus("sld:RasterSymbolizer");a.geometry&&this.writeNode("Geometry",a.geometry,b);a.opacity&&
this.writeNode("Opacity",a.opacity,b);a.colorMap&&this.writeNode("ColorMap",a.colorMap,b);return b},Geometry:function(a){var b=this.createElementNSPlus("sld:Geometry");a.property&&this.writeNode("ogc:PropertyName",a,b);return b},ColorMap:function(a){for(var b=this.createElementNSPlus("sld:ColorMap"),c=0,d=a.length;c<d;++c)this.writeNode("ColorMapEntry",a[c],b);return b},ColorMapEntry:function(a){var b=this.createElementNSPlus("sld:ColorMapEntry");b.setAttribute("color",a.color);void 0!==a.opacity&&
b.setAttribute("opacity",parseFloat(a.opacity));void 0!==a.quantity&&b.setAttribute("quantity",parseFloat(a.quantity));void 0!==a.label&&b.setAttribute("label",a.label);return b},PolygonSymbolizer:function(a){var b=this.createElementNSPlus("sld:PolygonSymbolizer");!1!==a.fill&&this.writeNode("Fill",a,b);!1!==a.stroke&&this.writeNode("Stroke",a,b);return b},Fill:function(a){var b=this.createElementNSPlus("sld:Fill");a.fillColor&&this.writeNode("CssParameter",{symbolizer:a,key:"fillColor"},b);null!=
a.fillOpacity&&this.writeNode("CssParameter",{symbolizer:a,key:"fillOpacity"},b);return b},PointSymbolizer:function(a){var b=this.createElementNSPlus("sld:PointSymbolizer");this.writeNode("Graphic",a,b);return b},Graphic:function(a){var b=this.createElementNSPlus("sld:Graphic");void 0!=a.externalGraphic?this.writeNode("ExternalGraphic",a,b):this.writeNode("Mark",a,b);void 0!=a.graphicOpacity&&this.writeNode("Opacity",a.graphicOpacity,b);void 0!=a.pointRadius&&this.writeNode("Size",2*a.pointRadius,
b);void 0!=a.rotation&&this.writeNode("Rotation",a.rotation,b);return b},ExternalGraphic:function(a){var b=this.createElementNSPlus("sld:ExternalGraphic");this.writeNode("OnlineResource",a.externalGraphic,b);this.writeNode("Format",a.graphicFormat||this.getGraphicFormat(a.externalGraphic),b);return b},Mark:function(a){var b=this.createElementNSPlus("sld:Mark");a.graphicName&&this.writeNode("WellKnownName",a.graphicName,b);!1!==a.fill&&this.writeNode("Fill",a,b);!1!==a.stroke&&this.writeNode("Stroke",
a,b);return b},WellKnownName:function(a){return this.createElementNSPlus("sld:WellKnownName",{value:a})},Opacity:function(a){return this.createElementNSPlus("sld:Opacity",{value:a})},Size:function(a){return this.createElementNSPlus("sld:Size",{value:a})},Rotation:function(a){return this.createElementNSPlus("sld:Rotation",{value:a})},OnlineResource:function(a){return this.createElementNSPlus("sld:OnlineResource",{attributes:{"xlink:type":"simple","xlink:href":a}})},Format:function(a){return this.createElementNSPlus("sld:Format",
{value:a})}}},OpenLayers.Format.Filter.v1_0_0.prototype.writers),CLASS_NAME:"OpenLayers.Format.SLD.v1"});
OpenLayers.Format.WFST.v1_0_0=OpenLayers.Class(OpenLayers.Format.Filter.v1_0_0,OpenLayers.Format.WFST.v1,{version:"1.0.0",srsNameInQuery:!1,schemaLocations:{wfs:"http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd"},initialize:function(a){OpenLayers.Format.Filter.v1_0_0.prototype.initialize.apply(this,[a]);OpenLayers.Format.WFST.v1.prototype.initialize.apply(this,[a])},readers:{wfs:OpenLayers.Util.applyDefaults({WFS_TransactionResponse:function(a,b){b.insertIds=[];b.success=!1;this.readChildNodes(a,
b)},InsertResult:function(a,b){var c={fids:[]};this.readChildNodes(a,c);b.insertIds.push(c.fids[0])},TransactionResult:function(a,b){this.readChildNodes(a,b)},Status:function(a,b){this.readChildNodes(a,b)},SUCCESS:function(a,b){b.success=!0}},OpenLayers.Format.WFST.v1.prototype.readers.wfs),gml:OpenLayers.Format.GML.v2.prototype.readers.gml,feature:OpenLayers.Format.GML.v2.prototype.readers.feature,ogc:OpenLayers.Format.Filter.v1_0_0.prototype.readers.ogc},writers:{wfs:OpenLayers.Util.applyDefaults({Query:function(a){var a=
OpenLayers.Util.extend({featureNS:this.featureNS,featurePrefix:this.featurePrefix,featureType:this.featureType,srsName:this.srsName,srsNameInQuery:this.srsNameInQuery},a),b=this.createElementNSPlus("wfs:Query",{attributes:{typeName:(a.featureNS?a.featurePrefix+":":"")+a.featureType}});a.srsNameInQuery&&a.srsName&&b.setAttribute("srsName",a.srsName);a.featureNS&&b.setAttribute("xmlns:"+a.featurePrefix,a.featureNS);if(a.propertyNames)for(var c=0,d=a.propertyNames.length;c<d;c++)this.writeNode("ogc:PropertyName",
{property:a.propertyNames[c]},b);a.filter&&(this.setFilterProperty(a.filter),this.writeNode("ogc:Filter",a.filter,b));return b}},OpenLayers.Format.WFST.v1.prototype.writers.wfs),gml:OpenLayers.Format.GML.v2.prototype.writers.gml,feature:OpenLayers.Format.GML.v2.prototype.writers.feature,ogc:OpenLayers.Format.Filter.v1_0_0.prototype.writers.ogc},CLASS_NAME:"OpenLayers.Format.WFST.v1_0_0"});
OpenLayers.Format.WFST.v1_1_0=OpenLayers.Class(OpenLayers.Format.Filter.v1_1_0,OpenLayers.Format.WFST.v1,{version:"1.1.0",schemaLocations:{wfs:"http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"},initialize:function(a){OpenLayers.Format.Filter.v1_1_0.prototype.initialize.apply(this,[a]);OpenLayers.Format.WFST.v1.prototype.initialize.apply(this,[a])},readers:{wfs:OpenLayers.Util.applyDefaults({FeatureCollection:function(a,b){b.numberOfFeatures=parseInt(a.getAttribute("numberOfFeatures"));OpenLayers.Format.WFST.v1.prototype.readers.wfs.FeatureCollection.apply(this,
arguments)},TransactionResponse:function(a,b){b.insertIds=[];b.success=!1;this.readChildNodes(a,b)},TransactionSummary:function(a,b){b.success=!0},InsertResults:function(a,b){this.readChildNodes(a,b)},Feature:function(a,b){var c={fids:[]};this.readChildNodes(a,c);b.insertIds.push(c.fids[0])}},OpenLayers.Format.WFST.v1.prototype.readers.wfs),gml:OpenLayers.Format.GML.v3.prototype.readers.gml,feature:OpenLayers.Format.GML.v3.prototype.readers.feature,ogc:OpenLayers.Format.Filter.v1_1_0.prototype.readers.ogc},
writers:{wfs:OpenLayers.Util.applyDefaults({GetFeature:function(a){var b=OpenLayers.Format.WFST.v1.prototype.writers.wfs.GetFeature.apply(this,arguments);a&&a.resultType&&this.setAttributes(b,{resultType:a.resultType});return b},Query:function(a){var a=OpenLayers.Util.extend({featureNS:this.featureNS,featurePrefix:this.featurePrefix,featureType:this.featureType,srsName:this.srsName},a),b=this.createElementNSPlus("wfs:Query",{attributes:{typeName:(a.featureNS?a.featurePrefix+":":"")+a.featureType,
srsName:a.srsName}});a.featureNS&&b.setAttribute("xmlns:"+a.featurePrefix,a.featureNS);if(a.propertyNames)for(var c=0,d=a.propertyNames.length;c<d;c++)this.writeNode("wfs:PropertyName",{property:a.propertyNames[c]},b);a.filter&&(this.setFilterProperty(a.filter),this.writeNode("ogc:Filter",a.filter,b));return b},PropertyName:function(a){return this.createElementNSPlus("wfs:PropertyName",{value:a.property})}},OpenLayers.Format.WFST.v1.prototype.writers.wfs),gml:OpenLayers.Format.GML.v3.prototype.writers.gml,
feature:OpenLayers.Format.GML.v3.prototype.writers.feature,ogc:OpenLayers.Format.Filter.v1_1_0.prototype.writers.ogc},CLASS_NAME:"OpenLayers.Format.WFST.v1_1_0"});
OpenLayers.Protocol.SOS.v1_0_0=OpenLayers.Class(OpenLayers.Protocol,{fois:null,formatOptions:null,initialize:function(a){OpenLayers.Protocol.prototype.initialize.apply(this,[a]);if(!a.format)this.format=new OpenLayers.Format.SOSGetFeatureOfInterest(this.formatOptions)},destroy:function(){this.options&&!this.options.format&&this.format.destroy();this.format=null;OpenLayers.Protocol.prototype.destroy.apply(this)},read:function(a){a=OpenLayers.Util.extend({},a);OpenLayers.Util.applyDefaults(a,this.options||
{});var b=new OpenLayers.Protocol.Response({requestType:"read"}),c=this.format,c=OpenLayers.Format.XML.prototype.write.apply(c,[c.writeNode("sos:GetFeatureOfInterest",{fois:this.fois})]);b.priv=OpenLayers.Request.POST({url:a.url,callback:this.createCallback(this.handleRead,b,a),data:c});return b},handleRead:function(a,b){if(b.callback){var c=a.priv;200<=c.status&&300>c.status?(a.features=this.parseFeatures(c),a.code=OpenLayers.Protocol.Response.SUCCESS):a.code=OpenLayers.Protocol.Response.FAILURE;
b.callback.call(b.scope,a)}},parseFeatures:function(a){var b=a.responseXML;if(!b||!b.documentElement)b=a.responseText;return!b||0>=b.length?null:this.format.read(b)},CLASS_NAME:"OpenLayers.Protocol.SOS.v1_0_0"});OpenLayers.Format.SLD.v1_0_0=OpenLayers.Class(OpenLayers.Format.SLD.v1,{VERSION:"1.0.0",schemaLocation:"http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd",initialize:function(a){OpenLayers.Format.SLD.v1.prototype.initialize.apply(this,[a])},CLASS_NAME:"OpenLayers.Format.SLD.v1_0_0"});
OpenLayers.Protocol.WFS.v1_0_0=OpenLayers.Class(OpenLayers.Protocol.WFS.v1,{version:"1.0.0",CLASS_NAME:"OpenLayers.Protocol.WFS.v1_0_0"});OpenLayers.Protocol.WFS.v1_1_0=OpenLayers.Class(OpenLayers.Protocol.WFS.v1,{version:"1.1.0",CLASS_NAME:"OpenLayers.Protocol.WFS.v1_1_0"});
OpenLayers.Format.OWSContext.v0_3_1=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{owc:"http://www.opengis.net/ows-context",gml:"http://www.opengis.net/gml",kml:"http://www.opengis.net/kml/2.2",ogc:"http://www.opengis.net/ogc",ows:"http://www.opengis.net/ows",sld:"http://www.opengis.net/sld",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},VERSION:"0.3.1",schemaLocation:"http://www.opengis.net/ows-context http://www.ogcnetwork.net/schemas/owc/0.3.1/owsContext.xsd",
defaultPrefix:"owc",extractAttributes:!0,xy:!0,regExes:{trimSpace:/^\s*|\s*$/g,removeSpace:/\s*/g,splitSpace:/\s+/,trimComma:/\s*,\s*/g},featureNS:"http://mapserver.gis.umn.edu/mapserver",featureType:"vector",geometryName:"geometry",nestingLayerLookup:null,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a]);OpenLayers.Format.GML.v2.prototype.setGeometryTypes.call(this)},setNestingPath:function(a){if(a.layersContext)for(var b=0,c=a.layersContext.length;b<c;b++){var d=
a.layersContext[b],e=[],f=a.title||"";a.metadata&&a.metadata.nestingPath&&(e=a.metadata.nestingPath.slice());""!=f&&e.push(f);d.metadata.nestingPath=e;d.layersContext&&this.setNestingPath(d)}},decomposeNestingPath:function(a){var b=[];if(a instanceof Array){for(;0<a.length;)b.push(a.slice()),a.pop();b.reverse()}return b},read:function(a){"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));if(a&&9==a.nodeType)a=a.documentElement;var b={};this.readNode(a,b);this.setNestingPath({layersContext:b.layersContext});
a=[];this.processLayer(a,b);delete b.layersContext;b.layersContext=a;return b},processLayer:function(a,b){if(b.layersContext)for(var c=0,d=b.layersContext.length;c<d;c++){var e=b.layersContext[c];a.push(e);e.layersContext&&this.processLayer(a,e)}},write:function(a,b){this.nestingLayerLookup={};b=b||{};OpenLayers.Util.applyDefaults(b,a);var c=this.writeNode("OWSContext",b);this.nestingLayerLookup=null;this.setAttributeNS(c,this.namespaces.xsi,"xsi:schemaLocation",this.schemaLocation);return OpenLayers.Format.XML.prototype.write.apply(this,
[c])},readers:{kml:{Document:function(a,b){b.features=(new OpenLayers.Format.KML({kmlns:this.namespaces.kml,extractStyles:!0})).read(a)}},owc:{OWSContext:function(a,b){this.readChildNodes(a,b)},General:function(a,b){this.readChildNodes(a,b)},ResourceList:function(a,b){this.readChildNodes(a,b)},Layer:function(a,b){var c={metadata:{},visibility:"1"!=a.getAttribute("hidden"),queryable:"1"==a.getAttribute("queryable"),opacity:null!=a.getAttribute("opacity")?parseFloat(a.getAttribute("opacity")):null,
name:a.getAttribute("name"),categoryLayer:null==a.getAttribute("name"),formats:[],styles:[]};if(!b.layersContext)b.layersContext=[];b.layersContext.push(c);this.readChildNodes(a,c)},InlineGeometry:function(a,b){b.features=[];var c=this.getElementsByTagNameNS(a,this.namespaces.gml,"featureMember"),d;1<=c.length&&(d=c[0]);if(d&&d.firstChild)c=d.firstChild.nextSibling?d.firstChild.nextSibling:d.firstChild,this.setNamespace("feature",c.namespaceURI),this.featureType=c.localName||c.nodeName.split(":").pop(),
this.readChildNodes(a,b)},Server:function(a,b){if(!b.service&&!b.version||b.service!=OpenLayers.Format.Context.serviceTypes.WMS)b.service=a.getAttribute("service"),b.version=a.getAttribute("version"),this.readChildNodes(a,b)},Name:function(a,b){b.name=this.getChildValue(a);this.readChildNodes(a,b)},Title:function(a,b){b.title=this.getChildValue(a);this.readChildNodes(a,b)},StyleList:function(a,b){this.readChildNodes(a,b.styles)},Style:function(a,b){var c={};b.push(c);this.readChildNodes(a,c)},LegendURL:function(a,
b){var c={};b.legend=c;this.readChildNodes(a,c)},OnlineResource:function(a,b){b.url=this.getAttributeNS(a,this.namespaces.xlink,"href");this.readChildNodes(a,b)}},ows:OpenLayers.Format.OWSCommon.v1_0_0.prototype.readers.ows,gml:OpenLayers.Format.GML.v2.prototype.readers.gml,sld:OpenLayers.Format.SLD.v1_0_0.prototype.readers.sld,feature:OpenLayers.Format.GML.v2.prototype.readers.feature},writers:{owc:{OWSContext:function(a){var b=this.createElementNSPlus("OWSContext",{attributes:{version:this.VERSION,
id:a.id||OpenLayers.Util.createUniqueID("OpenLayers_OWSContext_")}});this.writeNode("General",a,b);this.writeNode("ResourceList",a,b);return b},General:function(a){var b=this.createElementNSPlus("General");this.writeNode("ows:BoundingBox",a,b);this.writeNode("ows:Title",a.title||"OpenLayers OWSContext",b);return b},ResourceList:function(a){for(var b=this.createElementNSPlus("ResourceList"),c=0,d=a.layers.length;c<d;c++){var e=a.layers[c],f=this.decomposeNestingPath(e.metadata.nestingPath);this.writeNode("_Layer",
{layer:e,subPaths:f},b)}return b},Server:function(a){var b=this.createElementNSPlus("Server",{attributes:{version:a.version,service:a.service}});this.writeNode("OnlineResource",a,b);return b},OnlineResource:function(a){return this.createElementNSPlus("OnlineResource",{attributes:{"xlink:href":a.url}})},InlineGeometry:function(a){var b=this.createElementNSPlus("InlineGeometry");this.writeNode("gml:boundedBy",a.getDataExtent(),b);for(var c=0,d=a.features.length;c<d;c++)this.writeNode("gml:featureMember",
a.features[c],b);return b},StyleList:function(a){for(var b=this.createElementNSPlus("StyleList"),c=0,d=a.length;c<d;c++)this.writeNode("Style",a[c],b);return b},Style:function(a){var b=this.createElementNSPlus("Style");this.writeNode("Name",a,b);this.writeNode("Title",a,b);this.writeNode("LegendURL",a,b);return b},Name:function(a){return this.createElementNSPlus("Name",{value:a.name})},Title:function(a){return this.createElementNSPlus("Title",{value:a.title})},LegendURL:function(a){var b=this.createElementNSPlus("LegendURL");
this.writeNode("OnlineResource",a.legend,b);return b},_WMS:function(a){var b=this.createElementNSPlus("Layer",{attributes:{name:a.params.LAYERS,queryable:a.queryable?"1":"0",hidden:a.visibility?"0":"1",opacity:a.opacity?a.opacity:null}});this.writeNode("ows:Title",a.name,b);this.writeNode("ows:OutputFormat",a.params.FORMAT,b);this.writeNode("Server",{service:OpenLayers.Format.Context.serviceTypes.WMS,version:a.params.VERSION,url:a.url},b);a.metadata.styles&&0<a.metadata.styles.length&&this.writeNode("StyleList",
a.metadata.styles,b);return b},_Layer:function(a){var b,c,d;b=a.layer;c=a.subPaths;d=null;if(0<c.length)b=c[0].join("/"),c=b.lastIndexOf("/"),d=this.nestingLayerLookup[b],c=0<c?b.substring(c+1,b.length):b,d||(d=this.createElementNSPlus("Layer"),this.writeNode("ows:Title",c,d),this.nestingLayerLookup[b]=d),a.subPaths.shift(),this.writeNode("_Layer",a,d);else{if(b instanceof OpenLayers.Layer.WMS)d=this.writeNode("_WMS",b);else if(b instanceof OpenLayers.Layer.Vector)if(b.protocol instanceof OpenLayers.Protocol.WFS.v1)d=
this.writeNode("_WFS",b);else if(b.protocol instanceof OpenLayers.Protocol.HTTP)if(b.protocol.format instanceof OpenLayers.Format.GML)b.protocol.format.version="2.1.2",d=this.writeNode("_GML",b);else{if(b.protocol.format instanceof OpenLayers.Format.KML)b.protocol.format.version="2.2",d=this.writeNode("_KML",b)}else this.setNamespace("feature",this.featureNS),d=this.writeNode("_InlineGeometry",b);b.options.maxScale&&this.writeNode("sld:MinScaleDenominator",b.options.maxScale,d);b.options.minScale&&
this.writeNode("sld:MaxScaleDenominator",b.options.minScale,d);this.nestingLayerLookup[b.name]=d}return d},_WFS:function(a){var b=this.createElementNSPlus("Layer",{attributes:{name:a.protocol.featurePrefix+":"+a.protocol.featureType,hidden:a.visibility?"0":"1"}});this.writeNode("ows:Title",a.name,b);this.writeNode("Server",{service:OpenLayers.Format.Context.serviceTypes.WFS,version:a.protocol.version,url:a.protocol.url},b);return b},_InlineGeometry:function(a){var b=this.createElementNSPlus("Layer",
{attributes:{name:this.featureType,hidden:a.visibility?"0":"1"}});this.writeNode("ows:Title",a.name,b);this.writeNode("InlineGeometry",a,b);return b},_GML:function(a){var b=this.createElementNSPlus("Layer");this.writeNode("ows:Title",a.name,b);this.writeNode("Server",{service:OpenLayers.Format.Context.serviceTypes.GML,url:a.protocol.url,version:a.protocol.format.version},b);return b},_KML:function(a){var b=this.createElementNSPlus("Layer");this.writeNode("ows:Title",a.name,b);this.writeNode("Server",
{service:OpenLayers.Format.Context.serviceTypes.KML,version:a.protocol.format.version,url:a.protocol.url},b);return b}},gml:OpenLayers.Util.applyDefaults({boundedBy:function(a){var b=this.createElementNSPlus("gml:boundedBy");this.writeNode("gml:Box",a,b);return b}},OpenLayers.Format.GML.v2.prototype.writers.gml),ows:OpenLayers.Format.OWSCommon.v1_0_0.prototype.writers.ows,sld:OpenLayers.Format.SLD.v1_0_0.prototype.writers.sld,feature:OpenLayers.Format.GML.v2.prototype.writers.feature},CLASS_NAME:"OpenLayers.Format.OWSContext.v0_3_1"});
var DG=DG||{};DG.Controls={};
DG.Controls.Base=OpenLayers.Class({id:null,uid:null,displayClass:null,inverseMove:!1,dgMap:null,divView:null,position:null,size:null,image:null,title:"",initialize:function(a){this.displayClass=DG.Utils.iNU(a.css)?this.CLASS_NAME.replace(/\./g,""):a.css;if(a.position)this.position=a.position;if(a.size)this.size=a.size;if(a.inverseMove)this.inverseMove=a.inverseMove;if(a.image)this.image=a.image;if(a.id)this.uid=a.id;a.handlers&&this.registerHandlers(a.handlers);if(null==this.id)this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+
"_"+this.uid)},destroy:function(){if(this.dgMap)this.dgMap.removeControl(this),this.dgMap=null},setMap:function(a){this.dgMap=a},draw:function(a){if(null==this.divView&&(this.divView=DG.Utils.createDiv(this.id,this.position,this.size,this.image,null),this.divView.className=this.displayClass,!DG.Utils.iNU(this.title)))this.divView.title=this.title;if(!DG.Utils.iNU(a)&&a!=this.position||this.inverseMove){if(!DG.Utils.iNU(a))this.position=a.clone();this.moveTo(this.position)}return this.divView},moveTo:function(a){if(!DG.Utils.iNU(a)&&
!DG.Utils.iNU(this.divView))this.inverseMove?(this.divView.style.right=a[0]+"px",this.divView.style.bottom=a[1]+"px",this.divView.style.left=null,this.divView.style.top=null):(this.divView.style.left=a[0]+"px",this.divView.style.top=a[1]+"px")},createElement:function(a,b){var c=null,d=null,e=null;if(b.position)c=b.position;if(b.size)d=b.size;if(b.image)e=b.image;c=DG.Utils.createDiv(this.id+a,c,d,e);this.addElement(c);return c},addElement:function(a){this.divView.appendChild(a)},show:function(){this.divView.style.display=
"block"},hide:function(){this.divView.style.display="none"},registerHandlers:function(a){for(var b=0,c=a.length;b<c;b++)a[b].action.register(a[b].controlerId,a[b].event)},CLASS_NAME:"DG.Controls.Base"});
DG.EventManager={touchable:!1,exy:[0,0],etmp:[0,0],lastTouch:null,tClick:!1,tPinch:!1,eventLog:"",mouseRightClickTime:null,mouseRightClickPos:null,mouseDragPoint:null,mouseDragObject:null,firstMouseClick:!1,mouseDownAndMove:!1,ignoreElements:[],Debug:!1,Events:null,EnableEvents:!0,addEventListener:function(a,b,c,d,e,f){if(DG.Utils.iNU(this.Events))this.Events=[];DG.Utils.iNU(this.Events[a])&&(this.Events[a]=[]);var g=this.Events[a];"DgClick"==b&&DG.Utils.iNU(g.DgDoubleClick)&&(b="DgFastClick");if("DgDoubleClick"==
b&&!DG.Utils.iNU(g.DgFastClick)){DG.Utils.iNU(this.Events[a].DgClick)&&(this.Events[a].DgClick=[]);for(var h=g.DgFastClick.length,j=0;j<h;j++){var k=g.DgFastClick.pop();k.EventType="DgClick";this.Events[a].DgClick.push(k)}g.DgFastClick=null;this.unRegister(a,"DgFastClick")}DG.Utils.iNU(g[b])&&(g[b]=[]);g[b].push({ControlID:a,EventType:b,EventCallBack:c,TotalInstance:d,Wait:e,UserObject:f,event:null});this.register(a,b)},removeEventListner:function(a,b,c){if(!DG.Utils.iNU(this.Events)){var d=this.Events[a];
if(!DG.Utils.iNU(d)){var e=d[b];if(!DG.Utils.iNU(e)){if(DG.Utils.iNU(c))e=[];else for(var f=0,g=e.length;f<g;f++)c==e[f].EventCallBack&&(e[f]=null,e.sort(),e.pop());0==e.length&&(d[b]=null,delete d[b],this.unRegister(a,b))}}}},unRegister:function(a,b){switch(a){case "window":window[b]=null;break;case "document":document[b]=null;break;default:var c=DG.Utils.obj(a);if(DG.Utils.iNU(c))break;c[b]=null}},register:function(a,b){switch(a){case "window":window.addEventListener&&"DOMMouseScroll"==b?window.addEventListener(b,
function(c){DG.EventManager.caller(c,a,b)},!1):window[b]=function(c){DG.EventManager.caller(c,a,b)};break;case "document":document[b]=function(c){DG.EventManager.caller(c,a,b)};break;default:var c=DG.Utils.obj(a);if(DG.Utils.iNU(c))break;c[b]=function(c){DG.EventManager.caller(c,a,b)}}},caller:function(a,b,c){if(!a)a=window.event;if(!a.dgEventStop){if(this.Debug){var d="event - "+a+"; control - "+b+"; EventType - "+c+";";this.eventLog+=d;DG.Console.log(d);DG.Console.log(a)}if(this.EnableEvents&&(d=
this.Events[b],!DG.Utils.iNU(d)))if(("DgClick"==c||"DgDoubleClick"==c)&&d.DgFastClick&&d.DgFastClick.length)this.stopEventBuble(a);else{var e=d[c];if(!DG.Utils.iNU(e)){if("DgDrag"==c)if(DG.Utils.iNU(this.mouseDragObject))this.mouseDragObject=b;else if(b!=this.mouseDragObject)return;for(var f=!1,g=0,h=e.length;g<h&&!f;g++){var j=e[g];j.event=a;!DG.Utils.iNU(j.TotalInstance)&&0<j.TotalInstance&&(j.TotalInstance-=1);var k={ControlID:e[g].ControlID,EventType:e[g].EventType,TotalInstance:e[g].TotalInstance,
Wait:e[g].Wait,UserObject:e[g].UserObject,event:a};this.Debug&&(d="event - "+a+"; control - "+b+"; EventType - "+c+";",this.eventLog+=d,DG.Console.log(d),DG.Console.log(a),this.eventLog+="Handler run: "+j.EventCallBack.CLASS_NAME,DG.Console.log(j.EventCallBack));DG.Utils.iNU(j.Wait)?j.EventCallBack.run(k)&&(DG.EventManager.stopEventBuble(a),f=!0):setTimeout(function(){j.EventCallBack.run(k)&&(DG.EventManager.stopEventBuble(a),f=!0)},j.Wait);0==j.TotalInstance&&this.removeEventListner(b,c,j.EventCallBack)}}}}},
stopEventBuble:function(a){a.preventDefault?a.preventDefault():a.returnValue=!1;a.stopPropagation?a.stopPropagation():a.cancelBubble=!0;a.dgEventStop=!0},addIgnorElementDomID:function(a){this.ignoreElements.push(a)},checkInIgnorElements:function(a,b){for(var c=!1,d=null,e=null,f=0,g=this.ignoreElements.length;f<g;f++){d=this.ignoreElements[f];for(e=a;null!=e;){if(e.id==d)return!0;e=e.parentNode}}for(e=a;null!=e;)e.id==b&&(c=!0),e=e.parentNode;return!c}};DG.Events={};
DG.Events.Base=OpenLayers.Class({mapID:null,dgEventStop:!1,initialize:function(a){this.mapID=a},CLASS_NAME:"DG.Events.Base"});DG.Handlers={};
DG.Handlers.Base=OpenLayers.Class({event:null,globalMap:null,getEvent:function(a){this.event=a.event},mainMethod:function(){},initialize:function(a){this.globalMap=a},run:function(a){this.getEvent(a);return this.mainMethod(a)},register:function(a,b,c,d,e){DG.EventManager.addEventListener(a,b,this,c,d,e)},raiseEvent:function(a,b,c){for(var d=this.globalMap.getMapContainer();null!=a;){this.fireEvent(a,b,c);if(a==d)return!0;a=a.parentNode}return!1},fireEvent:function(a,b,c){var d=a;if("object"==typeof a)d=
a.id;DG.EventManager.caller(b,d,c)},CLASS_NAME:"DG.Handlers.Base"});DG.Layers={};
DG.Layers.Base=OpenLayers.Class({dgMap:null,olLayer:null,layerId:null,_isVisible:!0,initialize:function(a,b,c){this.dgMap=a;this.layerId=DG.Utils.iNU(b)?OpenLayers.Util.createUniqueID(this.CLASS_NAME):b;this.olLayer=c},destroy:function(){this.olLayer.destroy()},getOlLayer:function(){return this.olLayer},display:function(a){this._isVisible=a;this.olLayer.setVisibility(a);this._fireChangeVisibleEvent()},show:function(){this.display(!0)},hide:function(){this.display(!1)},isVisible:function(){return this._isVisible},
eventProcessing:function(){return!1},_fireChangeVisibleEvent:function(){DG.EventManager.caller({layer:this.layerId,visibility:this._isVisible},this.dgMap.getMapContainerId(),"DgLayerVisibilityChange")},CLASS_NAME:"DG.Layers.Base"});
DG.Marker=OpenLayers.Class({type:"DOM",name:null,groupName:null,lonlat:null,icon:null,data:null,dgClickHandler:null,initialize:function(a,b){var c=DG.LonLat.cast(a.lonlat);this.type=b.type;this.groupName=b.groupName;this.data=a.data;this.lonlat=c.toMercator();this.dgClickHandler=a.dgClickHandler;if(this.type==DG.Marker.TYPE_DOM)b.icon?(c=b.icon,this.icon=this.createIcon(c.url,c.size.w,c.size.h,c.offset)):this.icon=this.defaultIcon()},destroy:function(){this.erase();if(null!=this.icon)this.icon.destroy(),
this.icon=null},defaultIcon:function(){var a=OpenLayers.Util.getImagesLocation()+"marker.png",b=new OpenLayers.Size(21,25);return new OpenLayers.Icon(a,b,null,function(a){return new OpenLayers.Pixel(-(a.w/2),-a.h)})},createIcon:function(a,b,c,d){b=new OpenLayers.Size(b,c);return new OpenLayers.Icon(a,b,null,function(a){return d?d:new OpenLayers.Pixel(-(a.w/2),-a.h)})},draw:function(a){return this.icon.draw(a)},setIcon:function(a){this.icon.size=a.size;this.setUrl(a.url)},setUrl:function(a){this.icon.setUrl(a)},
erase:function(){null!=this.icon&&this.icon.erase()},isDrawn:function(){return this.icon&&this.icon.isDrawn()},display:function(a){this.icon.display(a)},getId:function(){return this.icon.imageDiv.id},getPosition:function(){return this.lonlat.clone().toLonLat()},moveToLonlat:function(a){if(a=a.clone())a=DG.LonLat.cast(a),a.toMercator(),this.lonlat=a,this.display(!0)},CLASS_NAME:"DG.Marker"});DG.Marker.TYPE_DOM="DOM";DG.Marker.TYPE_TILE="Tile";
DG.MarkerManager=OpenLayers.Class({mapObj:null,markers:null,domLimit:105,initialize:function(a){this.mapObj=a;this.markers=[]},addMarkers:function(a,b,c){if(0>=a.length)return!1;var d=a.length<this.domLimit?DG.Marker.TYPE_DOM:DG.Marker.TYPE_TILE;DG.Utils.iNU(b)&&(b="default_"+d);var e={type:d,groupName:b,icon:c},c=[],f;for(f in a){var g=new DG.Marker(a[f],e);c.push(g);this.markers.push(g)}a=this.getLayer(b,d);a.addMarkers(c);b=a.getMarkers().length;return 1<b?a.getMarkers():1==b?a.markers[0]:!1},
moveMarker:function(a,b){var c=this.mapObj.getLayerByName(a.groupName);return c instanceof DG.Layer.Markers?c.moveMarker(a,b):!1},getMarkersByGroup:function(a){a=this.mapObj.getLayerByName(a);return a instanceof DG.Layers.Markers?a.getMarkers():[]},getAllMarkers:function(){return this.markers},removeMarkersInGroup:function(a){if(a=this.getLayer(a))for(;0<a.markers.length;)this.removeMarker(a.markers[0])},removeMarker:function(a){if(a.type==DG.Marker.TYPE_DOM)this.getLayer(a.groupName).removeMarker(a),
OpenLayers.Util.removeItem(this.markers,a);else throw Error("Unsupported marker type for deletion");},getLayer:function(a,b){var c=this.mapObj.getLayerByName(a);!(c instanceof DG.Layers.Markers)&&b&&(c=this.createLayer(a,b),this.mapObj.addLayer(c));return c},createLayer:function(a,b){switch(b){case DG.Marker.TYPE_DOM:return new DG.Layers.MarkersDOM(this.mapObj,a,{});case DG.Marker.TYPE_Tile:return new DG.Layers.MarkersTile(this.mapObj,a);default:throw Error("Unsupported layer type");}},attachClickHandler:function(a,
b){return this.getLayer(a.groupName,a.type).attachClickHandler(a,b)},setClickHandler:function(a,b){var c=this.getLayer(a,DG.Marker.TYPE_DOM);c&&c.setClickHandler(b)},setGeometryFunction:function(a,b){var c=this.getLayer(a,DG.Marker.TYPE_DOM);c&&c.setGeometryFunction(b)},locateViewPortToMarkers:function(a){(a=this.getLayer(a))&&this.mapObj.showExtent(a.getDataExtent())},CLASS_NAME:"DG.MarkerManager"});
DG.Ajax={callback:{},get:function(a,b,c){if("function"!=typeof c)throw Error("Callback parameter must be defined as a function");var d=OpenLayers.Util.createUniqueID("dga_");DG.Ajax.callback[d]=function(a){c(a)};var e,f="",b=b||{};for(e in b)b.hasOwnProperty(e)&&(f+=encodeURIComponent(e)+"="+encodeURIComponent(b[e])+"&");var a=-1==a.indexOf("?")?a+("?"+f):a.match(/\?[\w\d]+/)?a+("&"+f):a+f,a=a+("callback=DG.Ajax.callback."+d),g=document.createElement("script"),h=!1;g.src=a;g.async=!0;g.type="text/javascript";
g.onload=g.onreadystatechange=function(){if(!h&&(!this.readyState||"loaded"===this.readyState||"complete"===this.readyState))h=!0,g.onload=g.onreadystatechange=null,g&&g.parentNode&&g.parentNode.removeChild(g),delete DG.Ajax.callback[d]};g.onerror=function(){DG.Ajax.callback[d]({});g.onload()};document.getElementsByTagName("head").length?document.getElementsByTagName("head")[0].appendChild(g):document.appendChild(g);return d}};
DG.Balloon=OpenLayers.Class(OpenLayers.Popup.FramedCloud,{autoSize:!0,closeOnMove:!1,disableFirefoxOverflowHack:!0,panMapIfOutOfView:!0,minSize:new OpenLayers.Size(150,50),killWhenClose:!1,_defaultProperties:function(){return{isClosed:!0,size:new OpenLayers.Size(200,150),html:"<div>Empty</div>",killWhenClose:!1,closeCallback:null}},positionBlocks:{tl:{offset:new OpenLayers.Pixel(44,0),padding:new OpenLayers.Bounds(8,40,8,16),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,
51,22,0),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,"auto"),anchor:new OpenLayers.Bounds(null,50,0,0),position:new OpenLayers.Pixel(-1240,0)},{size:new OpenLayers.Size("auto",19),anchor:new OpenLayers.Bounds(0,32,22,null),position:new OpenLayers.Pixel(0,-631)},{size:new OpenLayers.Size(22,18),anchor:new OpenLayers.Bounds(null,32,0,null),position:new OpenLayers.Pixel(-1240,-632)},{size:new OpenLayers.Size(81,35),anchor:new OpenLayers.Bounds(null,0,0,null),position:new OpenLayers.Pixel(0,
-687)}]},tr:{offset:new OpenLayers.Pixel(-45,0),padding:new OpenLayers.Bounds(8,40,8,16),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,51,22,0),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,"auto"),anchor:new OpenLayers.Bounds(null,50,0,0),position:new OpenLayers.Pixel(-1240,0)},{size:new OpenLayers.Size("auto",19),anchor:new OpenLayers.Bounds(0,32,22,null),position:new OpenLayers.Pixel(0,-631)},{size:new OpenLayers.Size(22,19),anchor:new OpenLayers.Bounds(null,
32,0,null),position:new OpenLayers.Pixel(-1240,-631)},{size:new OpenLayers.Size(81,35),anchor:new OpenLayers.Bounds(0,0,null,null),position:new OpenLayers.Pixel(-215,-687)}]},bl:{offset:new OpenLayers.Pixel(45,0),padding:new OpenLayers.Bounds(8,16,8,40),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,21,22,32),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,"auto"),anchor:new OpenLayers.Bounds(null,21,0,32),position:new OpenLayers.Pixel(-1240,0)},{size:new OpenLayers.Size("auto",
21),anchor:new OpenLayers.Bounds(0,0,22,null),position:new OpenLayers.Pixel(0,-629)},{size:new OpenLayers.Size(22,21),anchor:new OpenLayers.Bounds(null,0,0,null),position:new OpenLayers.Pixel(-1240,-629)},{size:new OpenLayers.Size(81,33),anchor:new OpenLayers.Bounds(null,null,0,0),position:new OpenLayers.Pixel(-101,-674)}]},br:{offset:new OpenLayers.Pixel(-44,0),padding:new OpenLayers.Bounds(8,16,8,40),blocks:[{size:new OpenLayers.Size("auto","auto"),anchor:new OpenLayers.Bounds(0,21,22,32),position:new OpenLayers.Pixel(0,
0)},{size:new OpenLayers.Size(22,"auto"),anchor:new OpenLayers.Bounds(null,21,0,32),position:new OpenLayers.Pixel(-1240,0)},{size:new OpenLayers.Size("auto",21),anchor:new OpenLayers.Bounds(0,0,22,null),position:new OpenLayers.Pixel(0,-629)},{size:new OpenLayers.Size(22,21),anchor:new OpenLayers.Bounds(null,0,0,null),position:new OpenLayers.Pixel(-1240,-629)},{size:new OpenLayers.Size(81,33),anchor:new OpenLayers.Bounds(0,null,null,0),position:new OpenLayers.Pixel(-311,-674)}]}},dgMap:null,registerEvents:function(){this.events=
null;this.dgMap.createHandler(OpenLayers.Function.bind(this._clickProcess,this)).register(this.div.id,"DgClick");var a=this.dgMap.createHandler(OpenLayers.Function.bind(this._stopHandler,this));a.register(this.div.id,"DgMouseWheel");a.register(this.div.id,"DgDoubleClick");a.register(this.div.id,"DgClick");a.register(this.div.id,"DgDoubleRightClick");a.register(this.div.id,"DgDrag")},_mapChange:function(){this.updatePosition()},_stopHandler:function(a){return this._indicateMouseEvent(a.event)},_clickProcess:function(a){return this._indicateMouseEvent(a.event)?
!0:!1},_indicateMouseEvent:function(a){var b=!0,c=this.relativePosition,d=[this.div.clientWidth,this.div.clientHeight],e=DG.Utils.getPositionInElement(this.div,[a.windowEvent.clientX,a.windowEvent.clientY]),a=e[0],e=e[1],f=d[0],d=d[1],g=this.positionBlocks[c].blocks[4].size;if("tr"==c||"tl"==c)this._checkTopCorners(a,e,f)||(b=!1),this._checkBottomCorners(a,e,f,d-g.h)||(b=!1);if("br"==c||"bl"==c)this._checkBottomCorners(a,e,f,d)||(b=!1),this._checkTopCorners(a,e-g.h,f)||(b=!1);var h,j;if(("tr"==c||
"tl"==c)&&e>d-g.h)"tr"==c&&g.w-22-3<a&&a<g.w-3&&(h=a-g.w+25,j=e-d+g.h,h=j+h*g.h/22-g.h,0>h&&(b=!1)),"tl"==c&&f-g.w+3<a&&a<f-g.w+25&&(h=a-f+g.w-3,j=e-d+g.h,h=j-h*g.h/22,0>h&&(b=!1));if(("br"==c||"bl"==c)&&e<g.h)"br"==c&&g.w-22-3<a&&a<g.w-3&&(h=a-g.w+25,h=e+h*g.h/22-g.h,0>h&&(b=!1)),"bl"==c&&f-g.w+3<a&&a<f-g.w+25&&(h=a-f+g.w-3,h=e-h*g.h/22,0>h&&(b=!1));if("tl"==c&&(f-g.w>a||a>f-g.w/2)&&e>d-g.h)b=!1;if("br"==c&&(a>g.w||a<g.w/2)&&e<g.h)b=!1;if("bl"==c&&(a<f-g.w||a>f-g.w/2)&&e<g.h)b=!1;return b},_checkTopCorners:function(a,
b,c){return 100>(a+b)*(a+b)||100>(c-a+b)*(c-a+b)?!1:!0},_checkBottomCorners:function(a,b,c,d){return 100>(d-b+a)*(d-b+a)||100>(c+d-a-b)*(c+d-a-b)?!1:!0},addCloseBox:function(a){this.closeDiv=OpenLayers.Util.createDiv();this.closeDgDiv=OpenLayers.Util.createDiv(this.id+"_close",null,new OpenLayers.Size(17,17));this.closeDgDiv.className="olPopupCloseBox";this.groupDiv.appendChild(this.closeDgDiv);var b=function(){this.hide();return!0};this.killWhenClose&&(b=function(){this.dgMap.killBalloon(this);return!0});
this.dgMap.createHandler(OpenLayers.Function.bind(a||b,this),!0).register(this.id+"_close","DgClick")},initialize:function(a,b){var c=OpenLayers.Util.extend(this._defaultProperties(),b);this.dgMap=a;this.killWhenClose=c.killWhenClose;var d=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_"+b.id);if(!c.html.length)c.html="<div> </div>";if(c.fixedSize)this.autoSize=!1,c.size=new OpenLayers.Size(c.fixedSize.width,c.fixedSize.height);OpenLayers.Popup.FramedCloud.prototype.initialize.apply(this,[d,c.lonlat,
c.size,c.html,null,c.isClosed,c.closeCallback]);this.closeDiv=null;DG.EventManager.addIgnorElementDomID(this.contentDiv.id);this.imageSrc="/images/popup.png"},setMap:function(a){this.dgMap=a},moveToLonlat:function(a,b){var c=a.clone();if(c){this.updateSize();var c=DG.LonLat.cast(c),d=c.clone();this.lonlat=c.toMercator();b&&this.setContentHTML(b);this.show();DG.EventManager.caller({lonlat:d},this.dgMap.getMapContainerId(),"DgBalloonMoveEnd")}},getPosition:function(){return this.lonlat instanceof DG.LonLat?
this.lonlat.clone().toLonLat():this.lonlat.clone().transform(DG.LonLat.EPSG_900913,DG.LonLat.EPSG_4326)},updateRelativePosition:function(){OpenLayers.Popup.FramedCloud.prototype.updateRelativePosition.call(this);if(this.closeDgDiv){var a=this.getContentDivPadding();this.closeDgDiv.style.right=a.right+this.padding.right+"px";this.closeDgDiv.style.top=a.top+this.padding.top+"px"}},createBlocks:function(){OpenLayers.Popup.FramedCloud.prototype.createBlocks.call(this);this.blocks[4].div.className="balloon-tail"},
CLASS_NAME:"DG.Balloon"});DG.Console={log:function(){},debug:function(){},info:function(){},warn:function(){},error:function(){},userError:function(a){alert(a)},assert:function(){},dir:function(){},dirxml:function(){},trace:function(){},group:function(){},groupEnd:function(){},time:function(){},timeEnd:function(){},profile:function(){},profileEnd:function(){},count:function(){},CLASS_NAME:"DG.Console"};(function(){if("undefined"!=typeof console)DG.Console=console})();
DG.Geocoder={API_URL:"http://catalog.api.prod.test/geo/search",request:function(a,b){a=a||{};try{return DG.Ajax.get(DG.Geocoder.API_URL,DG.Geocoder.getRequestParams(a),b)}catch(c){DG.Console.log(c.message)}return!1},getRequestParams:function(a){var b=arguments.callee.defaultParams;if(void 0==b)b={key:"ruifip5432",version:1.3,output:"jsonp"},arguments.callee.defaultParams=b;var c={};if(void 0!==a.address){if(c.q=a.address,void 0!=a.limit&&DG.Geocoder._isInt(a.limit))c.limit=a.limit}else if(void 0!==
a.point)c.q=a.point;else if(void 0!==a.id)c.q=a.id;if(void 0!==a.geoType){if("string"==typeof a.geoType)a.geoType=[a.geoType];if("object"==typeof a.geoType){var d,e=[];for(d in a.geoType)"string"==typeof a.geoType[d]&&e.push(a.geoType[d]);if(e.length)c.types=e.join(",")}}OpenLayers.Util.extend(c,b);return c},_isInt:function(a){var b=parseInt(a,10);return!isNaN(b)&&a==b&&a.toString()==b.toString()}};DG.Geocoder.Status={OK:200,INVALID_REQUEST:404,UNAVAILABLE:503};
DG.Geometry=OpenLayers.Class({type:"base",points:null,style:null,initialize:function(a,b,c,d){this.points=a;if(b)this.type=b;this.style=new DG.Style(c,d)},getOlFeature:function(){var a;switch(this.type){case "base":return null;case "WKT":a=new OpenLayers.Geometry.fromWKT(this.points);a.transform(new OpenLayers.Projection("EPSG:4326"),new OpenLayers.Projection("EPSG:900913"));break;case "point":a=this.convertToMercator(this.points)[0];break;case "lineString":a=this.convertToMercator(this.points);a=
new OpenLayers.Geometry.LineString(a);break;case "linearRing":a=this.convertToMercator(this.points);a.push(a[0]);a=new OpenLayers.Geometry.LineString(a);break;case "polygon":a=this.convertToMercator(this.points),a=new OpenLayers.Geometry.Polygon(new OpenLayers.Geometry.LinearRing(a))}return new OpenLayers.Feature.Vector(a,null,this.style.getStyle())},convertToMercator:function(a){var b=[],c;for(c in a){var d=DG.Utils.convertToMercator(a[c].x,a[c].y);b.push(new OpenLayers.Geometry.Point(d.lon,d.lat))}return b},
CLASS_NAME:"DG.Geometry"});DG.Language={dictionary:[],currentLang:"ru",getWord:function(a){return!DG.Utils.iNU(DG.Language.dictionary[DG.Language.currentLang])&&!DG.Utils.iNU(DG.Language.dictionary[DG.Language.currentLang][a])?DG.Language.dictionary[DG.Language.currentLang][a]:a},setDictionary:function(a){DG.Language.dictionary=a},changeLanguage:function(a){DG.Language.currentLang=a}};
DG.LonLat=OpenLayers.Class(OpenLayers.LonLat,{projection:null,initialize:function(a,b,c){var d;a instanceof OpenLayers.LonLat?(d=a.lon,a=a.lat):(d=a,a=b);this.projection=c==DG.LonLat.EPSG_4326||c==DG.LonLat.EPSG_900913?c:DG.LonLat.EPSG_4326;OpenLayers.LonLat.prototype.initialize.apply(this,[d,a])},toLatLng:function(){return this.toLonLat()},toLonLat:function(){return this.transform(this.projection,DG.LonLat.EPSG_4326)},toMercator:function(){return this.transform(this.projection,DG.LonLat.EPSG_900913)},
transform:function(a,b){var c=this.normalize(b);if(c.projCode!=this.projection){var d=[this.normalize(a),c];OpenLayers.LonLat.prototype.transform.apply(this,d);this.projection=c.projCode}return this},normalize:function(a){return a instanceof OpenLayers.Projection?a:new OpenLayers.Projection(a)},toShortString:function(a,b){var c=this.lon,d=this.lat;"number"==typeof b&&(c=c.toFixed(b),d=d.toFixed(b),c=c.replace(/0+$/,"").replace(/\.$/,""),d=d.replace(/0+$/,"").replace(/\.$/,""));return a?c+""+a+""+
d:c+", "+d},clone:function(){return new DG.LonLat(this.lon,this.lat,this.projection)},CLASS_NAME:"DG.LonLat"});DG.LonLat.cast=function(a){a instanceof DG.LonLat||(a=new DG.LonLat(a.lon,a.lat,DG.LonLat.EPSG_4326));return a};DG.LonLat.fromString=function(a){a=a.split(",");return new DG.LonLat(a[0],a[1])};DG.LonLat.EPSG_4326="EPSG:4326";DG.LonLat.EPSG_900913="EPSG:900913";
DG.Map=OpenLayers.Class({map:null,divMap:null,viewPortSize:[0,0],moveStep:200,minZoomLevel:1,maxZoomLevel:18,markerManager:null,dgControlsOptions:{disableDefaultUI:!1,zoom:!0,zoomOptions:{}},dgMapEvents:{DgMouseWheel:"DG.Handlers.DgMapZoom",DgDoubleClick:"DG.Handlers.DgMapZoom",DgDrag:"DG.Handlers.DgMapDrag",DgViewResize:"DG.Handlers.DgMapResize",DgDoubleRightClick:"DG.Handlers.DgMapZoom"},controls:[],layers:[],balloons:[],initialize:function(a,b){if("string"==typeof a)this.divMap=DG.Utils.obj(a);
else if("object"==typeof a)this.divMap=a;this.viewPortSize=[parseInt(this.divMap.clientWidth),parseInt(this.divMap.clientHeight)];var b=b||{},c=OpenLayers.Util.extend({theme:null},b);c.controls=[];this.map=new OpenLayers.Map(this.divMap,c);this.activateEvents(OpenLayers.Util.extend(this.dgMapEvents,b));this.activateControls(OpenLayers.Util.extend(this.dgControlsOptions,b));this.addLayer(new DG.Layers.DgTileMap(this),!0);this.markerManager=new DG.MarkerManager(this);OpenLayers.Util.onImageLoadError=
DG.Utils.onImageLoadError},addLayer:function(a,b){var c=a.getOlLayer();this.map.addLayer(c);this.layers.push(a);b&&this.map.setBaseLayer(c)},getLayerByName:function(a){for(var b=null,c=0,d=this.layers.length;c<d;c++){var e=this.layers[c];if(e.layerId==a){b=e;break}}return b},getLayerPositionByName:function(a){for(var b=null,c=0,d=this.layers.length;c<d;c++)if(this.layers[c].layerId==a){b=c+1;break}return b},showLayer:function(a){(a=this.getLayerByName(a))&&a.show()},hideLayer:function(a){(a=this.getLayerByName(a))&&
a.hide()},addGeometry:function(a,b,c){var d=this.getLayerByName("defaultVector");DG.Utils.iNU(d)&&(d=new DG.Layers.Vector(this,"defaultVector",{style:{strokeColor:"green",fillColor:"green"}}),this.addLayer(d,!1));if(a&&b){var e=d.style.getStyle(),a=new DG.Geometry(a,b,c,e);d.addGeometry(a)}},clearGeometries:function(){var a=this.getLayerByName("defaultVector");DG.Utils.iNU(a)||a.clear()},getLayerNamesList:function(){for(var a=[],b=0,c=this.layers.length;b<c;b++)a.push(this.layers[b].layerId);return a},
fireEventsInLayer:function(a,b){for(var c=this.layers.length-1;0<=c;--c)if(this.layers[c].isVisible()&&this.layers[c].eventProcessing(a,b))return!0;return!1},activateControls:function(a){this.controls.push(new DG.Controls.Copyright);!a.disableDefaultUI&&a.zoom&&this.controls.push(new DG.Controls.Zoom(a.zoomOptions));for(var a=0,b=this.controls.length;a<b;a++)this.addControlToMap(this.controls[a])},activateEvents:function(a){var b;b="IE"==DG.Utils.detectBrowser()[0]?"document":"window";var c=this.getMapContainerId(),
d=new DG.Handlers.MouseWheel(this);d.register("window","DOMMouseScroll");d.register(b,"onmousewheel");(new DG.Handlers.ContextMenu(this)).register(b,"oncontextmenu");(new DG.Handlers.DoubleClick(this)).register(b,"ondblclick");(new DG.Handlers.MouseDown(this)).register(b,"onmousedown");(new DG.Handlers.MouseUp(this)).register(b,"onmouseup");(new DG.Handlers.MouseMove(this)).register(b,"onmousemove");(new DG.Handlers.MousePreClick(this)).register(b,"onclick");(new DG.Handlers.Resize(this)).register("window",
"onresize");(new DG.Handlers.MouseClick(this)).register(c,"DgPreClick",null,300);this.map.events.on({moveend:this.fireMapMoveEvent,scope:this});b=new DG.Handlers.DgLayerProcess(this);b.register(c,"DgClick");b.register(c,"DgMouseMove");if(c=DG.Utils.detectMobileDevice())(new DG.Handlers.TouchStart(this)).register(this.divMap.id,"ontouchstart"),(new DG.Handlers.TouchEnd(this)).register(this.divMap.id,"ontouchend"),(new DG.Handlers.TouchMove(this)).register(this.divMap.id,"ontouchmove"),"ipad"==c&&((new DG.Handlers.GestureStart(this)).register("document",
"ongesturestart"),(new DG.Handlers.GestureEnd(this)).register("document","ongestureend"),(new DG.Handlers.GestureChange(this)).register("document","ongesturechange"));for(var e in a)(c=DG.Utils.findFuncByName(a[e]))&&(new c(this)).register(this.divMap.id,e)},createHandler:function(a,b){var c=new DG.Handlers.Base(this);c.mainMethod=b?function(b){a(b);return!0}:function(b){return a(b)};return c},addListener:function(a,b,c){this.createHandler(c).register(b,a)},getAreaSize:function(){return[this.divMap.clientWidth,
this.divMap.clientHeight]},getLonLatFromPixel:function(a,b,c){a=a instanceof OpenLayers.Pixel?this.map.getLonLatFromPixel(a):this.map.getLonLatFromPixel({x:a,y:b});return c?new DG.LonLat(a,null,DG.LonLat.EPSG_900913):DG.Utils.convertToLatLng(a)},checkSizeChanged:function(){var a=this.divMap.clientWidth,b=this.divMap.clientHeight,c=a!=this.viewPortSize[0]||b!=this.viewPortSize[1];if(c)this.viewPortSize=[a,b];return{viewPortSize:[a,b],isChanged:c}},getMapContainer:function(){return this.divMap},getMapContainerId:function(){return this.divMap.id},
getPixelFromLonLat:function(a){a=DG.LonLat.cast(a);return this.map.getPixelFromLonLat(a)},fireZoomEvent:function(){DG.EventManager.caller({zoom:this.map.getZoom()},this.divMap.id,"DgZoomChange")},fireMapMoveEvent:function(){DG.EventManager.caller({},this.divMap.id,"DgMapMove")},fireSettingsChangeEvent:function(){DG.EventManager.caller({},this.divMap.id,"DgSettingsChange")},getCopyrightInfo:function(){var a="";13>=this.getZoom()&&(null==this.map.restrictedExtent?a='&copy; \u0414\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u0440\u0442\u044b. \u0423\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 <a href="http://www.openstreetmap.org/" target="_blank">OpenStreetMap</a> &mdash; <a href="http://creativecommons.org/licenses/by-sa/2.0/" target="_blank">\u0421\u0421-BY-SA</a> ':
this.map.restrictedExtent.containsBounds(this.map.getExtent())||(a='&copy; \u0414\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u0440\u0442\u044b. \u0423\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 <a href="http://www.openstreetmap.org/" target="_blank">OpenStreetMap</a> &mdash; <a href="http://creativecommons.org/licenses/by-sa/2.0/" target="_blank">\u0421\u0421-BY-SA</a> '));return a+'&copy; \u041e\u041e\u041e &laquo;\u0414\u0443\u0431\u043b\u044c\u0413\u0418\u0421&raquo;, 2012<span class="noprint"> &mdash; </span><a id="licensing_link" class="small_system_link2 noprint" href="http://help.2gis.ru/licensing-agreement/" target="_blank">\u041b\u0438\u0446\u0435\u043d\u0437\u0438\u043e\u043d\u043d\u043e\u0435 \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0435</a> <span class="noprint"> &middot; </span><a id="api_licensing_link" class="small_system_link2 noprint" target="_blank" href="http://api.2gis.ru/">API 2\u0413\u0418\u0421</a>'},
checkZoom:function(a){return this.minZoomLevel<=a&&a<=this.maxZoomLevel},correctZoom:function(a){if(this.minZoomLevel>a)a=this.minZoomLevel;if(a>this.maxZoomLevel)a=this.maxZoomLevel;return a},zoomTo:function(a){a=this.correctZoom(a);a!=this.map.getZoom()&&(this.map.zoomTo(a),this.fireZoomEvent())},zoomIn:function(){this.checkZoom(this.map.getZoom()+1)&&(this.map.zoomIn(),this.fireZoomEvent())},zoomOut:function(){this.checkZoom(this.map.getZoom()-1)&&(this.map.zoomOut(),this.fireZoomEvent())},zoomToMax:function(){this.zoomTo(this.maxZoomLevel)},
zoomToMin:function(){this.zoomTo(this.minZoomLevel)},getZoom:function(){return this.map.getZoom()},getNumZoomLevels:function(){return this.map.getNumZoomLevels()},getResolutionForZoom:function(a){return this.map.baseLayer.getResolutionForZoom(a)},getCenter:function(){return(new DG.LonLat(this.map.getCenter(),null,DG.LonLat.EPSG_900913)).toLatLng()},setZoomRestrictions:function(a,b){var c=!1;if(!DG.Utils.iNU(a))this.minZoomLevel=a,c=!0;if(!DG.Utils.iNU(b))this.maxZoomLevel=b,c=!0;c&&this.fireSettingsChangeEvent()},
setBoundRestrictions:function(a,b){var c=new OpenLayers.Bounds(a[0],a[1],a[2],a[3]);c.transform(new OpenLayers.Projection("EPSG:4326"),new OpenLayers.Projection("EPSG:900913"));this.map.setOptions({restrictedExtent:c});!1!=b&&this.showExtent(c);this.fireSettingsChangeEvent()},showExtent:function(a){this.map.zoomToExtent(a);this.zoomTo(this.correctZoom(this.map.getZoom()));this.fireZoomEvent();this.fireMapMoveEvent()},getExtent:function(){return this.map.getExtent().transform(new OpenLayers.Projection("EPSG:900913"),
new OpenLayers.Projection("EPSG:4326")).toArray()},getZoomSettings:function(){return{min:this.minZoomLevel,max:this.maxZoomLevel}},setCenter:function(a,b){if(DG.Utils.iNU(b)||this.checkZoom(b))a=DG.LonLat.cast(a),a.toMercator(),this.checkZoom(b)||(b=null),this.map.setCenter(a,b,!1),null!=b&&this.fireZoomEvent(),this.fireMapMoveEvent()},getMoveOptions:function(a){var b={animate:!0};b.moveStep=isNaN(a)?this.moveStep:a;return b},moveN:function(a){a=this.getMoveOptions(a);this.map.pan(0,-a.moveStep,a);
this.fireMapMoveEvent()},moveS:function(a){a=this.getMoveOptions(a);this.map.pan(0,a.moveStep,a);this.fireMapMoveEvent()},moveW:function(a){a=this.getMoveOptions(a);this.map.pan(-a.moveStep,0,a);this.fireMapMoveEvent()},moveE:function(a){a=this.getMoveOptions(a);this.map.pan(a.moveStep,0,a);this.fireMapMoveEvent()},addMarker:function(a,b,c,d){a=DG.LonLat.cast(a);return this.addMarkers([{lonlat:a,data:b}],c,d)},addMarkers:function(a,b,c){return this.markerManager.addMarkers(a,b,c)},getMarkersByGroup:function(a){return this.markerManager.getMarkersByGroup(a)},
locateViewPortToMarkers:function(a){return this.markerManager.locateViewPortToMarkers(a)},getAllMarkers:function(){return this.markerManager.getAllMarkers()},attachClickHandlerOnMarker:function(a,b){this.markerManager.attachClickHandler(a,b)},setClickHandlerOnMarkerLayer:function(a,b){this.markerManager.setClickHandler(a,b)},setMarkerGeometryFunction:function(a,b){this.markerManager.setGeometryFunction(a,b)},moveMarker:function(a,b){b=DG.LonLat.cast(b);return this.markerManager.moveMarker(a,b)},removeMarker:function(a){this.markerManager.removeMarker(a)},
removeAllMarkers:function(a){this.markerManager.removeMarkersInGroup(a)},showBalloon:function(a,b,c){a=this.createBalloon(a,b,c);a.show();return a},createBalloon:function(a,b,c){a=DG.LonLat.cast(a);a.toMercator();a=new DG.Balloon(this,OpenLayers.Util.extend({lonlat:a,html:b},c));a.hide();this.map.addPopup(a);this.balloons.push(a);return a},killBalloon:function(a){for(var b=0,c=this.balloons.length;b<c;b++)if(a==this.balloons[b]){this.balloons.splice(b,1);break}a.hide();delete a},toggleBalloon:function(a){a.toggle()},
hideAllBalloons:function(){for(var a=0,b=this.balloons.length;a<b;a++)this.balloons[a].hide()},showAllBalloons:function(){for(var a=0,b=this.balloons.length;a<b;a++)this.balloons[a].show()},addControl:function(a,b){var c=new (DG.Utils.findFuncByName(a))(b);c.setMap(this);this.controls.push(c);this.addControlToMap(c);return c},addControlToMap:function(a,b){a.outsideViewport=null!=a.divView;if(this.map.displayProjection&&!a.displayProjection)a.displayProjection=this.map.displayProjection;a.setMap(this);
var c=a.draw(b);if(c&&!a.outsideViewport)c.style.zIndex=this.map.Z_INDEX_BASE.Control+this.controls.length,this.map.viewPortDiv.appendChild(c)},getControl:function(a){for(var b=null,c=0,d=this.controls.length;c<d;c++){var e=this.controls[c];if(e.uid==a){b=e;break}}return b},showControl:function(a){(a=this.getControl(a))&&a.show()},hideControl:function(a){(a=this.getControl(a))&&a.hide()},moveControl:function(a,b){var c=this.getControl(a);c&&c.moveTo(b)},removeControl:function(a){a&&a==this.getControl(a.id)&&
(a.div&&a.div.parentNode==this.viewPortDiv&&this.viewPortDiv.removeChild(a.div),OpenLayers.Util.removeItem(this.controls,a))},destroy:function(){this.map.destroy();this.map=null;if(null!=this.controls){for(var a=this.controls.length-1;0<=a;--a)this.controls[a].destroy();this.controls=null}},CLASS_NAME:"DG.Map"});
DG.Style=OpenLayers.Class({style:null,initialize:function(a,b){b?(OpenLayers.Util.extend(b,a),this.style=b):this.style=a},getStyle:function(){return OpenLayers.Util.extend({},this.style)},CLASS_NAME:"DG.Style"});
DG.Utils={iNU:function(a){return void 0==a||null==a?!0:"string"==typeof a&&""==a?!0:!1},obj:function(a){return document.getElementById(a)},findFuncByName:function(a){if("string"!=typeof a)return!1;for(var a=a.split("."),b=window||this,c=0,d=a.length;c<d;c++)b=b[a[c]];if("function"!==typeof b)throw Error("Function not found");return b},detectBrowser:function(){var a=[];window.opera?(a[0]="Opera",a[1]=window.opera.version()):window.chrome?a[0]="Chrome":window.sidebar?a[0]="Firefox":!window.external&&
"Opera"!==a[0]?a[0]="Safari":window.ActiveXObject&&(a[0]="IE",a[1]=window.navigator.userProfile?"6":window.Storage?"8":!window.Storage&&!window.navigator.userProfile?"7":"Unknown");return a?a:!1},detectMobileDevice:function(){var a=navigator.userAgent.toLowerCase(),b=["iphone","ipad","android"],c;for(c in b)if(0<=a.indexOf(b[c]))return b[c];return!1},createDiv:function(a,b,c,d,e,f,g,h){var j=document.createElement("div");if(d)j.style.backgroundImage="url("+d+")";a||(a=OpenLayers.Util.createUniqueID("OpenLayersDiv"));
e||(e="absolute");if(a)j.id=a;if(b)j.style.left=b[0]+"px",j.style.top=b[1]+"px";if(c)j.style.width="*"==c[0]?"100%":c[0]+"px",j.style.height="*"==c[1]?"100%":c[1]+"px";if(e)j.style.position=e;if(f)j.style.border=f;if(g)j.style.overflow=g;if(0<=parseFloat(h)&&1>parseFloat(h))j.style.filter="alpha(opacity="+100*h+")",j.style.opacity=h;else if(1==parseFloat(h))j.style.filter="",j.style.opacity="";return j},getPositionInElement:function(a,b){a.scrolls=[document.documentElement.scrollLeft||document.body.scrollLeft,
document.documentElement.scrollTop||document.body.scrollTop];a.lefttop=[document.documentElement.clientLeft||0,document.documentElement.clientTop||0];a.offsets=OpenLayers.Util.pagePosition(a);a.offsets[0]+=a.scrolls[0];a.offsets[1]+=a.scrolls[1];return[b[0]+a.scrolls[0]-a.offsets[0]-a.lefttop[0],b[1]+a.scrolls[1]-a.offsets[1]-a.lefttop[1]]},inArray:function(a,b){for(var c in b)if(b[c]===a)return!0;return!1},convertToLatLng:function(a,b){return(new DG.LonLat(a,b,DG.LonLat.EPSG_900913)).toLatLng()},
convertToMercator:function(a,b){return(new DG.LonLat(a,b,DG.LonLat.EPSG_4326)).toMercator()},encode:function(a){return escape(this._utf8_encode(a))},decode:function(a){return this._utf8_decode(unescape(a))},onImageLoadError:function(){this._attempts=this._attempts?this._attempts+1:1;if(this._attempts<=OpenLayers.IMAGE_RELOAD_ATTEMPTS){var a=this.urls;if(a&&a instanceof Array&&1<a.length){var b=this.src.toString(),c,d;for(d=0;(c=a[d])&&!(-1!=b.indexOf(c));d++);var e=Math.floor(a.length*Math.random()),
e=a[e];for(d=0;e==c&&4>d++;)e=Math.floor(a.length*Math.random()),e=a[e];this.src=b.replace(c,e)}else this.src=this.src}this.style.display=""},_utf8_encode:function(a){for(var a=a.replace(/\r\n/g,"\n"),b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);128>d?b+=String.fromCharCode(d):(127<d&&2048>d?b+=String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b},_utf8_decode:function(a){for(var b="",c=0,d=c1=c2=0;c<a.length;)d=
a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):191<d&&224>d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|c2&63),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),c+=3);return b}};
DG.Controls.Copyright=OpenLayers.Class(DG.Controls.Base,{infoHtml:null,defaultOptions:{id:"dgCopyRight",position:[10,10],inverseMove:!0},initialize:function(a){a=OpenLayers.Util.extend(this.defaultOptions,a);DG.Controls.Base.prototype.initialize.call(this,a)},_dataChange:function(){this.divView.style.textAlign="right";this.infoHtml=this.dgMap.getCopyrightInfo();this.divView.innerHTML=this.infoHtml},setMap:function(a){DG.Controls.Base.prototype.setMap.call(this,a);this.registerHandlers([{event:"DgSettingsChange",
controlerId:this.dgMap.getMapContainerId(),action:this.dgMap.createHandler(OpenLayers.Function.bind(this._dataChange,this))},{event:"DgZoomChange",controlerId:this.dgMap.getMapContainerId(),action:this.dgMap.createHandler(OpenLayers.Function.bind(this._dataChange,this))},{event:"DgDragStop",controlerId:this.dgMap.getMapContainerId(),action:this.dgMap.createHandler(OpenLayers.Function.bind(this._dataChange,this))}]);DG.EventManager.addIgnorElementDomID(this.id)},CLASS_NAME:"DG.Controls.Copyright"});
DG.Controls.Zoom=OpenLayers.Class(DG.Controls.Base,{plusButton:null,minusButton:null,slider:null,uiElements:null,imageSmall:null,zoomLevels:18,minZoom:0,maxZoom:18,defaultOptions:{id:"dgZoom",position:[10,10],size:[26,153],image:null,imageSmall:null,plusButton:{position:[3,3],size:[20,20]},minusButton:{position:[3,135],size:[20,20]},slider:{position:[6,30],size:[14,98],polzun:{size:[24,8],position:[-5,0]}}},initialize:function(a){a=OpenLayers.Util.extend(this.defaultOptions,a);DG.Controls.Base.prototype.initialize.call(this,
a);if(a.zoom)this.zoomLevels=a.zoom;if(a.imageSmall)this.imageSmall=a.imageSmall;if(a.plusButton)this.plusButton=a.plusButton;if(a.minusButton)this.minusButton=a.minusButton;if(a.slider)this.slider=a.slider;this.uiElements={plus:null,minus:null,slider:null,scale:null}},_zoomClick:function(a){var b=DG.Utils.getPositionInElement(this.uiElements.scale,[a.event.windowEvent.clientX,a.event.windowEvent.clientY]),a=parseInt(this.uiElements.scale.style.height),c=parseInt(this.uiElements.slider.style.height),
b=parseInt(b[1]-c/2);0>b&&(b=0);b>a&&(b=a);a=b/a*this.zoomLevels;a=parseInt(a);a=this.maxZoom-a;this.dgMap.zoomTo(a);return!0},_zoomDrag:function(a){var b=DG.Utils.getPositionInElement(this.uiElements.scale,[a.event.windowEvent.clientX,a.event.windowEvent.clientY]),a=parseInt(this.uiElements.scale.style.height),c=parseInt(this.uiElements.slider.style.height),b=parseInt(b[1]-c/2);0>b&&(b=0);b>a&&(b=a);this.uiElements.slider.style.top=b-c/2+"px";return!0},_zoomResize:function(a){if(parseInt(this.size[1]+
this.position[1])>a.event.viewPortSize[1]){if("none"!=this.uiElements.scale.style.display){this.uiElements.scale.style.display="none";var a=parseInt(this.uiElements.scale.style.height),b=parseInt(this.divView.style.height),c=parseInt(this.uiElements.minus.style.top);this.divView.style.height=parseInt(b-a)+"px";if(this.imageSmall)this.divView.style.backgroundImage="url("+this.imageSmall+")";this.uiElements.minus.style.top=parseInt(c-a)+"px"}}else if("none"==this.uiElements.scale.style.display){this.uiElements.scale.style.display=
"block";a=parseInt(this.uiElements.scale.style.height);b=parseInt(this.divView.style.height);c=parseInt(this.uiElements.minus.style.top);this.divView.style.height=parseInt(b+a)+"px";if(this.image)this.divView.style.backgroundImage="url("+this.image+")";this.uiElements.minus.style.top=parseInt(c+a)+"px"}},_zoomCatch:function(a){this._drawInZoom(a.event.zoom)},_drawInZoom:function(a){var a=this.maxZoom-a,b=parseInt(this.uiElements.scale.style.height),c=parseInt(this.uiElements.slider.style.height),
a=b/this.zoomLevels*a,a=parseInt(a-c/2);this.uiElements.slider.style.top=a+"px"},_minusClick:function(){this.dgMap.zoomOut();return!0},_plusClick:function(){this.dgMap.zoomIn();return!0},_getZoomSettings:function(){var a=this.dgMap.getZoomSettings();this.minZoom=a.min;this.maxZoom=a.max;this.zoomLevels=this.maxZoom-this.minZoom;if(DG.Utils.iNU(this.image)&&this.uiElements.scale){var a=10*this.zoomLevels+1,b=3+parseInt(this.uiElements.plus.style.height)+parseInt(this.uiElements.slider.style.height)+
a+parseInt(this.uiElements.slider.style.height),c=b+parseInt(this.uiElements.minus.style.height);this.uiElements.scale.style.height=a+"px";"none"==this.uiElements.scale.style.display?(this.divView.style.height=c-a+"px",this.uiElements.minus.style.top=b-a+"px"):(this.divView.style.height=c+"px",this.uiElements.minus.style.top=b+"px");this._drawInZoom(this.dgMap.getZoom())}},_createBgStruct:function(){var a=document.createElement("div");a.className="dgz-bg-container";var b=document.createElement("div");
b.className="dgz-bg-top";var c=document.createElement("div");c.className="dgz-bg-middle";var d=document.createElement("div");d.className="dgz-bg-bottom";a.appendChild(b);a.appendChild(c);a.appendChild(d);return a},draw:function(a){this._getZoomSettings();var b=this.dgMap.getMapContainerId();this.uiElements.control=DG.Controls.Base.prototype.draw.call(this,a);DG.Utils.iNU(this.image)&&this.addElement(this._createBgStruct());a=this.dgMap.createHandler(function(){return!0});a.register(this.divView.id,
"DgClick");a.register(this.divView.id,"DgDrag");this.dgMap.createHandler(OpenLayers.Function.bind(this._getZoomSettings,this)).register(b,"DgSettingsChange");this.dgMap.createHandler(OpenLayers.Function.bind(this._zoomResize,this)).register(b,"DgViewResize");a=this.createElement("plusBtn",this.plusButton);a.style.cursor="pointer";a.className="dgz-plus";this.dgMap.createHandler(OpenLayers.Function.bind(this._plusClick,this)).register(a.id,"DgClick");this.uiElements.plus=a;a=this.createElement("sliderEl",
this.slider);a.style.cursor="pointer";a.className="dgz-scale";var c=this.createElement("sliderPolzEl",this.slider.polzun);c.style.cursor="move";c.className="dgz-slider";a.appendChild(c);this.dgMap.createHandler(OpenLayers.Function.bind(this._zoomDrag,this)).register(a.id,"DgDrag");var d=this.dgMap.createHandler(OpenLayers.Function.bind(this._zoomClick,this));d.register(a.id,"DgDragStop");d.register(a.id,"DgClick");this.dgMap.createHandler(OpenLayers.Function.bind(this._zoomCatch,this)).register(b,
"DgZoomChange");this.uiElements.slider=c;this.uiElements.scale=a;b=this.createElement("minusBtn",this.minusButton);b.style.cursor="pointer";b.className="dgz-minus";this.dgMap.createHandler(OpenLayers.Function.bind(this._minusClick,this)).register(b.id,"DgClick");this.uiElements.minus=b;return this.divView},CLASS_NAME:"DG.Controls.Zoom"});DG.Events.DoubleClick=OpenLayers.Class(DG.Events.Base,{windowEvent:null,delta:1,point:[0,0],initialize:function(a,b){this.windowEvent=a;this.point=b},CLASS_NAME:"DG.Events.DoubleClick"});
DG.Events.Drag=OpenLayers.Class(DG.Events.Base,{windowEvent:null,delta:[0,0],point:[0,0],initialize:function(a,b,c){this.windowEvent=a;this.point=b;this.delta=c},CLASS_NAME:"DG.Events.Drag"});DG.Events.MouseClick=OpenLayers.Class(DG.Events.Base,{windowEvent:null,point:[0,0],button:0,initialize:function(a,b,c){this.windowEvent=a;this.point=b;this.button=c},CLASS_NAME:"DG.Events.MouseClick"});
DG.Events.MouseWheel=OpenLayers.Class(DG.Events.Base,{windowEvent:null,delta:0,point:[0,0],initialize:function(a,b){this.windowEvent=a;this.point=b;this.countDelta()},countDelta:function(){var a=this.windowEvent,b=0;a.wheelDelta?(b=a.wheelDelta/120,window.opera&&9.2>window.opera.version()&&(b=-b)):a.detail&&(b=-a.detail/3);this.delta=b},CLASS_NAME:"DG.Events.MouseWheel"});
DG.Handlers.Mouse=OpenLayers.Class(DG.Handlers.Base,{getPosition:function(){var a=this.event,b=this.globalMap.getMapContainer();if(!b.scrolls)b.scrolls=[document.documentElement.scrollLeft||document.body.scrollLeft,document.documentElement.scrollTop||document.body.scrollTop];if(!b.lefttop)b.lefttop=[document.documentElement.clientLeft||0,document.documentElement.clientTop||0];if(!b.offsets)b.offsets=OpenLayers.Util.pagePosition(b),b.offsets[0]+=b.scrolls[0],b.offsets[1]+=b.scrolls[1];return[a.clientX+
b.scrolls[0]-b.offsets[0]-b.lefttop[0],a.clientY+b.scrolls[1]-b.offsets[1]-b.lefttop[1]]},isMapEvent:function(){var a=this.getPosition(),b=this.globalMap.getAreaSize(),c=this.globalMap.getMapContainerId();return 0<a[0]&&a[0]<b[0]&&0<a[1]&&a[1]<b[1]?DG.EventManager.checkInIgnorElements(this.event.target||this.event.srcElement,c)?!1:!0:!1},isLeftClick:function(){return this.event.which&&1==this.event.which||this.event.button&&1==this.event.button||this.event.touches&&0<this.event.touches.length},isRightClick:function(){return this.event.which&&
3==this.event.which||this.event.button&&2==this.event.button},getButtonType:function(){return this.isLeftClick()?1:this.isRightClick()?3:2},CLASS_NAME:"DG.Handlers.Mouse"});
DG.Handlers.Touch=OpenLayers.Class(DG.Handlers.Mouse,{getPosition:function(a){var a=this.event.touches[a||0],b=this.globalMap.getMapContainer();if(!b.scrolls)b.scrolls=[document.documentElement.scrollLeft||document.body.scrollLeft,document.documentElement.scrollTop||document.body.scrollTop];if(!b.lefttop)b.lefttop=[document.documentElement.clientLeft||0,document.documentElement.clientTop||0];if(!b.offsets)b.offsets=OpenLayers.Util.pagePosition(b),b.offsets[0]+=b.scrolls[0],b.offsets[1]+=b.scrolls[1];
return[a.clientX+b.scrolls[0]-b.offsets[0]-b.lefttop[0],a.clientY+b.scrolls[1]-b.offsets[1]-b.lefttop[1]]},isMultiTouch:function(){return this.event.touches&&1<this.event.touches.length},CLASS_NAME:"DG.Handlers.Touch"});DG.Handlers.ContextMenu=OpenLayers.Class(DG.Handlers.Mouse,{mainMethod:function(a){if(this.isMapEvent()){var a=a.event.target||a.event.srcElement,b=new DG.Events.MouseClick(this.event,this.getPosition(),this.getButtonType());this.raiseEvent(a,b,"DgRightClick");return!0}return!1},CLASS_NAME:"DG.Handlers.ContextMenu"});
DG.Handlers.DgLayerProcess=OpenLayers.Class(DG.Handlers.Base,{mainMethod:function(a){return this.globalMap.fireEventsInLayer(a.event,a.EventType)},CLASS_NAME:"DG.Handlers.DgLayerProcess"});
DG.Handlers.DgMapDrag=OpenLayers.Class(DG.Handlers.Base,{mainMethod:function(a){var b=a.event.delta[0],a=a.event.delta[1],c=this.globalMap.getAreaSize();this.globalMap.setCenter(this.globalMap.getLonLatFromPixel(new OpenLayers.Pixel(c[0]/2+b,c[1]/2+a),null,!0),null);this.globalMap.getMapContainer().style.cursor="move"},CLASS_NAME:"DG.Handlers.DgMapDrag"});DG.Handlers.DgMapResize=OpenLayers.Class(DG.Handlers.Base,{mainMethod:function(){},CLASS_NAME:"DG.Handlers.DgMapResize"});
DG.Handlers.DgMapZoom=OpenLayers.Class(DG.Handlers.Base,{mainMethod:function(a){var b=a.event.delta,a=a.event.point,c=this.globalMap.getZoom(),b=this.globalMap.getZoom()+Math.round(b),b=Math.max(b,0),b=Math.min(b,this.globalMap.getNumZoomLevels());if(b===c)return!1;var d=this.globalMap.getAreaSize(),c=d[0]/2-a[0],d=a[1]-d[1]/2,e=this.globalMap.getResolutionForZoom(b),a=this.globalMap.getLonLatFromPixel(a[0],a[1],!0);this.globalMap.setCenter(new DG.LonLat(a.lon+c*e,a.lat+d*e,DG.LonLat.EPSG_900913),
b);return!1},CLASS_NAME:"DG.Handlers.DgMapZoom"});DG.Handlers.DoubleClick=OpenLayers.Class(DG.Handlers.Mouse,{mainMethod:function(a){if(this.isMapEvent()){DG.EventManager.firstMouseClick=!1;var a=a.event.target||a.event.srcElement,b=new DG.Events.DoubleClick(this.event,this.getPosition());this.raiseEvent(a,b,"DgDoubleClick");return!0}return!1},CLASS_NAME:"DG.Handlers.DoubleClick"});
DG.Handlers.GestureChange=OpenLayers.Class(DG.Handlers.Touch,{isMapEvent:function(){var a=this.getPosition(),b=this.globalMap.getAreaSize();return 0<a[0]&&a[0]<b[0]&&0<a[1]&&a[1]<b[1]?!0:!1},mainMethod:function(a){a.event.preventDefault();var b="scale("+a.event.scale+")",c=this.globalMap.map.layerContainerDiv.style;c["-webkit-transform"]=b;c["-moz-transform"]=b;DG.EventManager.etmp=[a.event.clientX,a.event.clientY]},CLASS_NAME:"DG.Handlers.GestureChange"});
DG.Handlers.GestureEnd=OpenLayers.Class(DG.Handlers.Touch,{mainMethod:function(a){a.event.preventDefault();var b=this.globalMap.map.layerContainerDiv.style;b["-webkit-transform"]="";b["-moz-transform"]="";a=this.globalMap.map.getZoomForResolution(this.globalMap.map.getResolution()/a.event.scale,!0);if(a!==this.globalMap.getZoom()){var b=this.globalMap.getResolutionForZoom(a),c=new OpenLayers.Pixel(DG.EventManager.exy[0],DG.EventManager.exy[1]),d=new OpenLayers.Pixel(DG.EventManager.etmp[0],DG.EventManager.etmp[1]),
c=this.globalMap.getLonLatFromPixel(c,null,!0),e=this.globalMap.map.getSize();c.lon+=b*(e.w/2-d.x);c.lat-=b*(e.h/2-d.y);this.globalMap.setCenter(c,a)}},CLASS_NAME:"DG.Handlers.GestureEnd"});DG.Handlers.GestureStart=OpenLayers.Class(DG.Handlers.Touch,{mainMethod:function(a){a.event.preventDefault();DG.EventManager.exy=[a.event.clientX,a.event.clientY];DG.EventManager.etmp=[a.event.clientX,a.event.clientY]},CLASS_NAME:"DG.Handlers.GestureStart"});
DG.Handlers.MouseClick=OpenLayers.Class(DG.Handlers.Mouse,{mainMethod:function(a){return DG.EventManager.firstMouseClick?(DG.EventManager.firstMouseClick=!1,this.raiseEvent(a.event.child,a.event.clickEvent,a.event.type),!0):!1},CLASS_NAME:"DG.Handlers.MouseClick"});
DG.Handlers.MouseDown=OpenLayers.Class(DG.Handlers.Mouse,{mainMethod:function(a){if(this.isMapEvent()){if(this.isLeftClick()){DG.EventManager.mouseDragPoint=this.getPosition();if(DG.EventManager.mouseDownAndMove&&!DG.EventManager.touchable)DG.EventManager.mouseDownAndMove=!1;return!0}if(this.isRightClick())if(DG.Utils.iNU(DG.EventManager.mouseRightClickTime))DG.EventManager.mouseRightClickTime=new Date,DG.EventManager.mouseRightClickPos=this.getPosition();else{var b=DG.EventManager.mouseRightClickTime,
c=DG.EventManager.mouseRightClickPos;DG.EventManager.mouseRightClickTime=null;DG.EventManager.mouseRightClickPos=null;var d=new Date,e=this.getPosition(),b=d.getTime()-b.getTime(),c=(e[0]-c[0])*(e[0]-c[0])+(e[1]-c[1])*(e[1]-c[1]);if(300>b&&100>c)a=a.event.target||a.event.srcElement,e=new DG.Events.DoubleClick(this.event,e),e.delta=-1,this.raiseEvent(a,e,"DgDoubleRightClick")}}return!1},CLASS_NAME:"DG.Handlers.MouseDown"});
DG.Handlers.MouseMove=OpenLayers.Class(DG.Handlers.Mouse,{mainMethod:function(a){var b=this.getPosition();if(this.isMapEvent()){var c=a.event.target||a.event.srcElement,d={point:b,lonLat:this.globalMap.getLonLatFromPixel(b[0],b[1],!0)};this.raiseEvent(c,d,"DgMouseMove")}c=DG.EventManager.mouseDragPoint;if(!DG.Utils.iNU(c)){var d=c[0]-b[0],e=c[1]-b[1];DG.EventManager.mouseDragPoint=b;DG.EventManager.mouseDownAndMove=!0;b=new DG.Events.Drag(this.event,c,[d,e]);if(DG.EventManager.mouseDragObject)return this.fireEvent(DG.EventManager.mouseDragObject,
b,"DgDrag"),!0;if(this.isMapEvent())return c=a.event.target||a.event.srcElement,this.raiseEvent(c,b,"DgDrag"),!0;this.fireEvent(this.globalMap.getMapContainer(),b,"DgDrag")}},CLASS_NAME:"DG.Handlers.MouseMove"});
DG.Handlers.MousePreClick=OpenLayers.Class(DG.Handlers.Mouse,{mainMethod:function(a){if(this.isMapEvent()&&!DG.EventManager.mouseDownAndMove){var a=a.event.target||a.event.srcElement,b=new DG.Events.MouseClick(this.event,this.getPosition(),this.getButtonType());this.raiseEvent(a,b,"DgFastClick");if(!DG.EventManager.firstMouseClick)return DG.EventManager.firstMouseClick=!0,a={child:a,clickEvent:b,type:"DgClick"},this.fireEvent(this.globalMap.getMapContainer(),a,"DgPreClick"),!0}return!1},CLASS_NAME:"DG.Handlers.MousePreClick"});
DG.Handlers.MouseUp=OpenLayers.Class(DG.Handlers.Mouse,{mainMethod:function(){DG.Utils.iNU(DG.EventManager.mouseDragObject)||this.fireEvent(DG.EventManager.mouseDragObject,{windowEvent:this.event},"DgDragStop");DG.EventManager.mouseDragPoint=null;DG.EventManager.mouseDragObject=null;this.globalMap.getMapContainer().style.cursor="";return!1},CLASS_NAME:"DG.Handlers.MouseUp"});
DG.Handlers.MouseWheel=OpenLayers.Class(DG.Handlers.Mouse,{mainMethod:function(a){if(this.isMapEvent()){var a=a.event.target||a.event.srcElement,b=new DG.Events.MouseWheel(this.event,this.getPosition());this.raiseEvent(a,b,"DgMouseWheel");return!0}return!1},CLASS_NAME:"DG.Handlers.MouseWheel"});
DG.Handlers.Resize=OpenLayers.Class(DG.Handlers.Base,{mainMethod:function(a){var b=this.globalMap.checkSizeChanged();if(b.isChanged)b.event=a.event,this.fireEvent(this.globalMap.getMapContainer(),b,"DgViewResize")},CLASS_NAME:"DG.Handlers.Resize"});
DG.Handlers.TouchEnd=OpenLayers.Class(DG.Handlers.Touch,{mainMethod:function(){this.globalMap.getMapContainer().style.cursor="";var a=(new Date).getTime(),b=DG.EventManager.lastTouch;if(b)return 400>a-b&&(this.event.preventDefault(),a=this.event.target||this.event.srcElement,b=new DG.Events.DoubleClick(this.event,DG.EventManager.mouseDragPoint),this.raiseEvent(a,b,"DgDoubleClick")),DG.EventManager.lastTouch=null,DG.EventManager.mouseDragPoint=null,!1;DG.EventManager.lastTouch=a;DG.EventManager.mouseDragPoint=
null;return!1},CLASS_NAME:"DG.Handlers.TouchEnd"});
DG.Handlers.TouchMove=OpenLayers.Class(DG.Handlers.Touch,{mainMethod:function(a){var b=DG.EventManager.mouseDragPoint;if(!DG.Utils.iNU(b)){var c=this.getPosition(),d=b[0]-c[0],e=b[1]-c[1];DG.EventManager.mouseDragPoint=c;DG.EventManager.mouseDownAndMove=!0;b=new DG.Events.Drag(this.event,b,[d,e]);if(this.isMapEvent())return this.raiseEvent(a.event.target||a.event.srcElement,b,"DgDrag"),!0;this.fireEvent(this.globalMap.getMapContainer(),b,"DgDrag")}},CLASS_NAME:"DG.Handlers.TouchMove"});
DG.Handlers.TouchStart=OpenLayers.Class(DG.Handlers.Touch,{mainMethod:function(){DG.EventManager.touchable=!0;if(this.isMapEvent()&&(DG.EventManager.mouseDragPoint=this.getPosition(),DG.EventManager.mouseDownAndMove))DG.EventManager.mouseDownAndMove=!1;return!1},CLASS_NAME:"DG.Handlers.TouchStart"});
DG.Layers.DgXYZ=OpenLayers.Class(OpenLayers.Layer.XYZ,{countTileServers:0,tilePrefix:"",mustCached:!1,cacher:null,getURL:function(a){var b;b=OpenLayers.Layer.XYZ.prototype.getURL.call(this,a);0<this.countTileServers&&(a=this._getTileServerNumber(a),b=b.replace(/http:\/\//g,"http://"+this.tilePrefix+a+"."));return b},_getTileServerNumber:function(a){var b,c,d;b=this._calcXYTilesByBounds(a);a=b.x;c=b.y;b=this._calcNearestSquare(this.countTileServers);d=Math.sqrt(b);a=a%d+c%d*d;this.countTileServers!=
b&&(a%=this.countTileServers);return a},_calcNearestSquare:function(a){var b,c;for(c=0,b=0;b<=this.MAX_ALLOWED_SQUARE;c++,b=c*c)if(b>=a)return b;return this.MAX_ALLOWED_SQUARE},_calcXYTilesByBounds:function(a){var b=this.map.getResolution(),c=Math.round((a.left-this.maxExtent.left)/(b*this.tileSize.w)),a=Math.round((this.maxExtent.top-a.top)/(b*this.tileSize.h));return{x:c,y:a}},MAX_ALLOWED_SQUARE:81,CLASS_NAME:"DG.Layers.DgXYZ"});
DG.Layers.Tile=OpenLayers.Class(DG.Layers.Base,{alarm:function(){},initialize:function(a,b,c,d){c=new DG.Layers.DgXYZ(b,c,d);DG.Layers.Base.prototype.initialize.apply(this,[a,b,c]);this.olLayer.events.on({loadend:this.alarm,scope:this})},CLASS_NAME:"DG.Layers.Tile"});
DG.Layers.Markers=OpenLayers.Class(DG.Layers.Base,{markers:[],_bound:null,_isBoundCounted:!1,_clickFunction:function(a){this.dgMap.showBalloon(a.lonlat,a.data,{closeCallback:function(){this.dgMap.killBalloon(this)}});return!1},_checkMarkerGeom:function(){return!1},initialize:function(a,b,c){this.markers=[];DG.Layers.Base.prototype.initialize.apply(this,[a,b,c])},destroy:function(){this.clearMarkers();this.markers=null;DG.Layers.Base.prototype.destroy.apply(this,arguments)},assignClass:function(a){this.olLayer.div.className=
a},addMarkers:function(){return!1},getMarkers:function(){return this.markers},attachClickHandler:function(a,b){(new b(a)).register(a.getId(),"DgClick")},setClickHandler:function(a){this._clickFunction=a},setGeometryFunction:function(a){this._checkMarkerGeom=a},moveMarker:function(){return!1},removeMarker:function(){return!1},clearMarkers:function(){if(null!=this.markers)for(;0<this.markers.length;)this.removeMarker(this.markers[0]);this._isBoundCounted=!1;this._bound=null},clickProcessing:function(a){for(var b=
a.point,c=0,d=this.markers.length;c<d;c++)if(this._checkMarkerGeom(this.dgMap.getPixelFromLonLat(this.markers[c].lonlat),b))return this.markers[c].dgClickHandler?this.markers[c].dgClickHandler(a):this._clickFunction(this.markers[c],a)},mouseMoveProcessing:function(){return!1},eventProcessing:function(a,b){return!a.dgEventStop?"DgClick"==b?this.clickProcessing(a):"DgMouseMove"==b?this.mouseMoveProcessing(a):!1:!0},getDataExtent:function(){if(!this._isBoundCounted){this._bound=new OpenLayers.Bounds;
if(this.markers&&0<this.markers.length)for(var a=0,b=this.markers.length;a<b;a++)this._bound.extend(new OpenLayers.LonLat(this.markers[a].lonlat.lon,this.markers[a].lonlat.lat));this._isBoundCounted=!0}return this._bound},CLASS_NAME:"DG.Layers.Markers"});
DG.Layers.DgTileMap=OpenLayers.Class(DG.Layers.Tile,{alarm:function(){DG.EventManager.caller({},this.dgMap.getMapContainerId(),"DgMapLoaded")},initialize:function(a){DG.Layers.Tile.prototype.initialize.apply(this,[a,"DgBaseLayer","http://maps.2gis.ru/tiles?x=${x}&y=${y}&z=${z}&v=1202",{attribution:null,isBaseLayer:!0,sphericalMercator:!0,opacity:1,transitionEffect:"resize",tilePrefix:"tile",countTileServers:4}])},CLASS_NAME:"DG.Layers.DgTileMap"});
DG.Layers.MarkersDOM=OpenLayers.Class(DG.Layers.Markers,{initialize:function(a,b,c){c=new OpenLayers.Layer.Markers(b,c);DG.Layers.Markers.prototype.initialize.apply(this,[a,b,c])},addMarkers:function(a){for(var b in a)this.olLayer.addMarker(a[b]),this.markers.push(a[b]);this._isBoundCounted=!1;this.assignClass("DOMMarkers")},attachClickHandler:function(a,b){("object"==typeof b&&"DG.Handlers.Base"==b.CLASS_NAME?b:new b(a)).register(a.getId(),"DgClick")},moveMarker:function(a,b){this._isBoundCounted=
!1;var c=DG.LonLat.cast(b).toMercator();return DG.Utils.inArray(a,this.olLayer.markers)?(a.lonlat=c,this.olLayer.drawMarker(a),!0):!1},removeMarker:function(a){this._isBoundCounted=!1;this.markers&&this.markers.length&&(OpenLayers.Util.removeItem(this.markers,a),this.olLayer.removeMarker(a))},_checkMarkerGeom:function(a,b){return a.x-10<=b[0]&&b[0]<=a.x+10&&a.y-25<b[1]&&b[1]<=a.y},_clickFunction:function(a){var b="<div>"+a.data+"</div>";a.balloon?this.dgMap.toggleBalloon(a.balloon):a.balloon=this.dgMap.showBalloon(a.lonlat,
b,{closeCallback:function(){this.dgMap.killBalloon(this)}});return!0},CLASS_NAME:"DG.Layers.MarkersDOM"});
DG.Layers.MarkersTile=OpenLayers.Class(DG.Layers.Markers,{url:"http://drawer.maps.2gis.ru/drawer/cache/grid/${z}/${x}/${y}/query/",initialize:function(a,b,c){c=new DG.Layers.TileDrawer(b,this.url,c);DG.Layers.Markers.prototype.initialize.apply(this,[a,b,c])},destroy:function(){DG.Layers.Markers.destroy.apply(this,arguments)},setHash:function(a){this.olLayer.hash=a},addMarkers:function(a){if(this.markers.length)for(var b in a)this.markers.push(a[b]);else this.markers=a;this._isBoundCounted=!1;this.getDataExtent()},
removeMarker:function(a){this._isBoundCounted=!1;this.markers&&this.markers.length&&OpenLayers.Util.removeItem(this.markers,a)},clear:function(){this.hide();this.clearMarkers();this.olLayer.clearGrid()},redraw:function(){this.olLayer.redraw(!0);this.show()},_clickFunction:function(){return!1},_checkMarkerGeom:function(a,b){var c=a.x-b[0],d=a.y-b[1];return 0<36-(c*c+d*d)},mouseMoveProcessing:function(a){for(var a=a.point,b=0,c=this.markers.length;b<c;b++)if(this._checkMarkerGeom(this.dgMap.getPixelFromLonLat(this.markers[b].lonlat),
a))return this.dgMap.divMap.style.cursor="pointer",!1;this.dgMap.divMap.style.cursor="default";return!1},CLASS_NAME:"DG.Layers.MarkersTile"});DG.Layers.TileDrawer=OpenLayers.Class(OpenLayers.Layer.XYZ,{visibility:!1,attribution:null,isBaseLayer:!1,sphericalMercator:!0,opacity:1,hash:"undefined",getURL:function(a){a=OpenLayers.Layer.XYZ.prototype.getURL.call(this,a);return a+=this.hash+"/"},CLASS_NAME:"DG.Layers.TileDrawer"});
DG.Layers.Vector=OpenLayers.Class(DG.Layers.Base,{style:null,initialize:function(a,b,c){var c=c||{strategies:[new OpenLayers.Strategy.Refresh],projection:"EPSG:4326"},d=new OpenLayers.Layer.Vector(b,c),a=[a,b,d];this.style=new DG.Style(c.style,{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"});DG.Layers.Base.prototype.initialize.apply(this,a)},addGeometry:function(a,b){this.olLayer.addFeatures([a.getOlFeature()],b)},refresh:function(){DG.Console.log("refresh");this.olLayer.refresh({force:!0})},clear:function(){this.olLayer.removeAllFeatures()},CLASS_NAME:"DG.Layers.Vector"});
var DG;DG||(DG={});if(!DG.Utils)DG.Utils={};
DG.Utils.Ajax={callback:{},get:function(a){if("undefined"===typeof a.url||/^\s*$/.test(a.url))throw Error("URL is required");var a=a||{},b=a.success||function(){},c=a.failure||function(){},d=a.scope||this,e=a.url,a=a.data||{},f=DG.Online.Utils._createUniqueID("dga_");DG.Utils.Ajax.callback[f]=function(a,e){"undefined"!==typeof e&&!0===e?c.apply(d,[a]):b.apply(d,[a])};var g,h="";for(g in a)a.hasOwnProperty(g)&&(h+=encodeURIComponent(g)+"="+encodeURIComponent(a[g])+"&");var e=-1==e.indexOf("?")?e+("?"+
h):e.match(/\?[\w\d]+/)?e+("&"+h):e+h,e=e+("callback=DG.Utils.Ajax.callback."+f),j=document.createElement("script"),k=!1;j.src=e;j.async=!0;j.type="text/javascript";j.onload=j.onreadystatechange=function(){if(!k&&(!this.readyState||"loaded"===this.readyState||"complete"===this.readyState))k=!0,j.onload=j.onreadystatechange=null,j&&j.parentNode&&j.parentNode.removeChild(j),delete DG.Utils.Ajax.callback[f]};j.onerror=function(){$.post("log/failLoadCallback",{url:j.src,userState:window.location.href,
browser:navigator.userAgent,cookie:navigator.cookieEnabled});DG.Utils.Ajax.callback[f]({},!0);j.onload()};document.getElementsByTagName("head").length?document.getElementsByTagName("head")[0].appendChild(j):document.appendChild(j);return f}};DG||(DG={});if(!DG.Utils)DG.Utils={};DG.Utils.FQueue=function(a,b){this.queue=[];this.params=[];this.scopes=[];this.useArguments=[];this.config=b||{};this.config.breakOnError=!1!==this.config.breakOnError;var a=a instanceof Array?a:[a],c;for(c in a){var d=a[c];this.push(d.fn,d.params,d.scope,d.useArguments)}};DG.Utils.FQueue.prototype.push=function(a,b,c,d){this.queue.push(a);this.params.push("undefined"===typeof b?[]:b);this.scopes.push(c);this.useArguments.push(!0===d)};
DG.Utils.FQueue.prototype.dispatch=function(){return function(){for(var a=0,b=this.queue.length;a<b;a++){var c=Array.prototype.slice,d=this.params.shift();try{this.queue.shift().apply(this.scopes.shift()||this,this.useArguments.shift()?c.call(arguments):d)}catch(e){if(this.config.breakOnError)break}}}.bind(this)};(function(){var a=function(a){for(var a=a.split("."),c=window,d=0,e=a.length;d<e;d++)"undefined"===typeof c[a[d]]&&(c[a[d]]={}),c=c[a[d]];return c};a("DG.Online.Utils");DG.Online.Utils.ns=a})();
DG.Online.Utils.extend=function(a,b,c){c=!0===c;if("object"!==typeof a)throw Error("Can not copy properties to nonobject");var d=Array.prototype.slice.call(arguments,1),e=[],f;for(f in d){var g=d[f],h;for(h in g)g.hasOwnProperty(h)&&(a.hasOwnProperty(h)&&!c?e.push(h):a[h]=g[h])}if(e.length&&!c)throw Error("Can not redefine properties: "+e.join(", "));return a};
DG.Online.Utils.createClass=function(a){var b=a.constructor||function(){},c={};delete a.constructor;for(var d in a)a.hasOwnProperty(d)&&(c[d]=a[d]);DG.Online.Utils.extend(b.prototype,c);return b};DG=DG||{};DG.Online=DG.Online||{};
DG.Online.Conf={GEOMETRY_SELECTION_STYLE:{fillColor:"#0da5d5",fillOpacity:0,strokeColor:"#0da5d5",strokeWidth:3},ROUTE_SELECTION_STYLE:{fillColor:"#867be8",strokeColor:"#867be8",strokeWidth:3},COOKIE_NAME:"onlineWorkProject",API:{SERVER:"hello, mama",KEY:"i am in",VERSION:"miami"},DEFAULT_MAP_ZOOM:11,FIRM_MARKERS_GROUP:"markersg_firms",TRANS_MARKERS_GROUP:"markersg_trans",PRINT_BALLOON_GROUP:"markersg_print_ballon",TILE_MARKERS_GROUP:"markersg_tile",TRAFFIC_URL:"place for traf url",TRAFFIC_SPEED:"0",
TRAFFIC_REPORT_URL:"place for traf report url",TRAFFIC_LAYER_NAME:"OnlineTrafficLayer",DYM_DEFAULT_SIZE:3,DYM_MAX_SIZE:10,BASE_URL:"",SHORTONIZER_URL:"/shortonizer",ADS_MIN_HEIGHT:300,ADD_FIRM_PATTERN_URL:"http://reklama.2gis.ru/{{PROJECT}}/add-info/",FLAMP_PATTERN_URL:"http://%%PROJECT%%.flamp.ru/?utm_source=maps-2gis&utm_medium=link&utm_campaign=online-2gis",FLAMP_REVIEW_PATTERN_URL:"http://flamp.ru/r/%%ID%%?utm_source=maps-2gis&utm_medium=link&utm_campaign=organizacii",PAGINATOR_PAGE_SIZE:20,PLACE_PAGINATOR_PAGE_SIZE:20,
PLACE_MAX_REQUEST_SIZE:2E3,CATALOG_CONTAINER_ID:"dgCatalogContainer",BALLOON_CONTAINER_ID:"dgBalloonContainer",BALLOON_CONTENT_ID:"dgBalloonContent",ERROR_URL:"/unknown.html",CATALOG_ANIMATION_DURATION:500,SCROLL_UPDATE_TIMEOUT:600,DEFAULT_SORTING:"relevance",generalise:{settlement:8,city:8,district:12,street:14,sight:15,house:14,station:15,station_platform:15},printPageUrl:"/print",printPageSettings:{width:800,height:600,location:"no",menubar:"no",status:"no",scrollbars:"yes"},projects:{},init:function(a,
b){this.BASE_URL=a.baseUrl;this.COOKIE_NAME=a.cookieProjectName;this.API.SERVER=a.api.server;this.API.KEY=a.api.key;this.API.VERSION=a.api.version;this.TRAFFIC_URL=a.traf+"${city}/traffic/${z}/${x}/${y}/speed/${speed}/";this.TRAFFIC_REPORT_URL=a.traf;DG.Utils.Ajax.get({url:"/plist",data:null,success:function(a){if(a.total&&!(1>a.total)){var d=0,e=a.result,f;for(f in e){DG.Online.Conf.projects[e[f].code]=e[f];DG.Online.Conf.projects[e[f].code].pos=d++;var g;e[f].centroid?g=OpenLayers.Geometry.fromWKT(e[f].centroid):
(g=e[f].bound,g=(new OpenLayers.Bounds(g[0],g[1],g[2],g[3])).getCenterPixel());DG.Online.Conf.projects[e[f].code].center=new DG.LonLat(g.x,g.y)}DG.Online.Conf.cityPerColumn=a.cityPerColumn;DG.Online.Conf.selected=a.currentProject;"function"==typeof b&&b()}},failure:function(){location.href=DG.Online.Conf.ERROR_URL}})},getSelectedCityConf:function(){return DG.Online.Conf.projects[DG.Online.Conf.selected]},getCurrentDate:function(){var a=new Date,b=this.getSelectedCityConf().timezone_offset;a.setTime(a.getTime()+
6E4*(a.getTimezoneOffset()+b));return a},setCurrentProject:function(a){var b=!1,c=DG.Online.Conf.projects;if($.isEmptyObject(c))throw Error("Projects list must be loaded");if(a)if(c[a])DG.Online.Conf.selected=a,b=!0;else for(var d in c)if(c[d].alias)for(var e=c[d].alias.split(/,/g),f=0,g=e.length;f<g;f++)if($.trim(e[f])==a)DG.Online.Conf.selected=c[d].code,b=!0;DG.Online.Conf.detected=1;if(!b)DG.Online.Conf.selected="moscow",DG.Online.Conf.detected=0;$.cookie(DG.Online.Conf.COOKIE_NAME,DG.Online.Conf.selected);
return b}};DG.Online.Utils.ns("DG.Online.UI.ViewModel");DG.Online.Utils.ns("DG.Online.UI.ViewModelModules");DG.Online.Utils.ns("DG.Online.UI.Model");(function(){if(!Object.keys)Object.keys=function(a){if(a!==Object(a))throw new TypeError("Object.keys called on non-object");var b=[],c;for(c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.push(c);return b}})();jQuery.objectDiff=function(a,b){var c={},d;for(d in a){var e=a[d]?a[d]:null,f=b[d];e!=f&&"undefined"!==f&&(c[d]=[e,f])}return c};
DG.Online.UI.ViewModel=DG.Online.Utils.createClass({_modulesNS:DG.Online.UI.ViewModelModules,_prepareGetter:function(a,b){var c=typeof b,d=function(){this[a]=b instanceof Array?ko.observableArray(b):"object"===c&&null!==b?ko.dependentObservable(DG.Online.Utils.extend(b,{owner:this},!0)):"function"===c?ko.dependentObservable(b,this):ko.observable(b);return this[a].apply(this,Array.prototype.slice(arguments))}.bind(this);d._isReplacer=!0;return d},constructor:function(){var a=[],b={},c;for(c in this._modulesNS)if(this._modulesNS.hasOwnProperty(c)){var d=
this._modulesNS[c];"function"===typeof d._initModule&&(a.push(d._initModule),delete d._initModule);if("object"===typeof d._observables)try{DG.Online.Utils.extend(b,d._observables),delete d._observables}catch(e){console.log("Exception while copying observables: "+e.message)}try{DG.Online.Utils.extend(this,d)}catch(f){console.log("Exception while extending ViewModel methods: "+f.message)}}for(c in b)b.hasOwnProperty(c)&&(this[c]=this._prepareGetter(c,b[c]));for(c in b)if(b.hasOwnProperty(c)&&"undefined"!==
typeof this[c]._isReplacer)this[c]();for(b=0;b<a.length;b++)a[b].call(this)}});DG.Online.UI.ViewModelModules.Stuff={_observables:{project:null,state:"index",what:null,where:null,route:null,whatText:null,whereText:null,routeText:null,mode:DG.Online.Conf.mode,shortLink:"",activeSearchTab:"firms",_activeSearchTab:function(){"routes"==this.state()?this.activeSearchTab("routes"):this.activeSearchTab("firms")}},_initModule:function(){},changeProject:function(a){DG.Online.AjaxManager.cancelAllCallbacks();DG.Online.Conf.setCurrentProject(a);this.project(DG.Online.Conf.getSelectedCityConf().code);
DG.Online.initProjectMap();this._doLoadRubrics();this.resetAppState();this.hideTraffic();trafControl&&(DG.Online.Conf.getSelectedCityConf().traffic?trafControl.show():trafControl.hide())},init:function(){this.project(DG.Online.Conf.getSelectedCityConf().code);this.restoreHistory()},eclk:function(){return!1},_clearCatalogSearchData:function(){"ads"!=this.searchMethod()?(this.selectedSubrubName(null),this.selectedSubrubId(null),this.selectedRubricId(null),this._setFirmPage(1,1),this.filters.resetFilters(),
this.sorting.resetSorting()):(this.mapFirms(null),this.adsSearchHash(null))},_clearDataArrays:function(){this.firms.removeAll();this.rubrics.removeAll();this.stations.removeAll();this.routes.removeAll();this.places.removeAll()},_clearMapData:function(){"ads"!=this.searchMethod()&&this.mapFirms(null);this.mapFeature(null);this.selectedRoute(null);this.selectedStation(null);this.selectedPlatform(null)},resetAppState:function(){this.showSidebar();this._clearCatalogSearchData();this._clearDataArrays();
this.mapPopup(null);this.mapFeature(null);this.storedId(null);this.mapPyramid(null);this.mapFirms(null);this.adsSearchHash(null);this.firmsCount(null);this.rubricsCount(null);this.what(null);this.where(null);this.whatText(null);this.whereText(null);this.route(null);this.routeText(null);this.buildingName(null);this.searchMethod(null);this.pageNumber(null);this.placePageNumber(null);this.routePageNumber(null);this.sortingName(null);this.state("index");this.activeSearchTab("firms");this.selectedRoute(null);
this.selectedStation(null);this.selectedPlatform(null);this.hideBalloon();this.removeMarkers();this.placesCount(null);this.places.removeAll();this.placePages.removeAll();onlineMap.clearGeometries()},feedback:function(){DG.Online.Utils.redirect("/feedback?context="+encodeURIComponent($.address.value())+"&domain="+encodeURIComponent(DG.Online.Conf.getSelectedCityConf().code))},backToSearchResults:function(){this.search()},share:function(a){if("function"!==typeof DG.Online.UI.Share[a])throw Error("Unknown sharing service");
DG.Online.UI.Share[a]()},goToIndex:function(){vm.resetAppState();DG.Online.initProjectMap();vm.storeHistory()}};DG.Online.UI.ViewModelModules.Search={_observables:{searchMethod:null},_initModule:function(){},searchRoute:function(){var a=DG.Online.Utils.trim(this.routeText());a.length&&(this.routeText(a),this.routePageNumber(1),this._doSearchRoute())},searchWait:0,_searchFirms:function(a){var b={what:{text:this.what(),scope:"full"},where:{text:this.where()},types:["firm"],sort:this.sorting.prepareSorting(),page:this.pageNumber(),filters:this.filters.prepareFilters(),magic:{geom2cache:"org_mini",dym_rubrics:DG.Online.Conf.DYM_MAX_SIZE,
"0":"advertising"}};this.wait(!0);DG.Online.Request.call({data:DG.Online.SearchCriteria.build(b),success:DG.Online.UI.Model.Firm._loadFirmCallback(!0,a),failure:DG.Online.UI.Model.Firm._firmFailureCallback,scope:this})},_searchAddress:function(a){this.wait(!0);var b="";this.what()&&(b+=this.what()+" ");this.whereText()&&(b+=this.whereText());"print"==DG.Online.Conf.mode&&!b&&(b+=this.where());var b={method:"geo/search",limit:DG.Online.Conf.PLACE_MAX_REQUEST_SIZE,project:DG.Online.Conf.getSelectedCityConf().id,
types:"city,settlement,district,street,living_area,place,sight,house".split(","),q:b},c=1;!0===a&&(c=this.placePageNumber(),c=DG.Utils.iNU(c)?1:c);var d=inHistoryRestoreMode||a;DG.Online.Request.call({data:b,success:function(a){vm.places.removeAll();vm.placePages.removeAll();vm.placePageNumber(c);if(a.response_code==DG.Online.Request.Status.OK){if(!a.total||1>a.total){vm.placesCount(0);return}for(var b=[],g=[],h=0,j=a.total;h<j;h++)"station_platform"==a.result[h].type?g.push(a.result[h].id):b.push(new DG.Online.UI.Model.Geometry(a.result[h]));
g.length?(vm.placesCount(0),$.post("/stations",{ids:g,proj:vm.project()},function(a){for(var c=0,d=a.length;c<d;c++)b.push(a[c]);vm.placesCount(b.length);vm.places(b)},"json")):(vm.placesCount(a.total),vm.places(b),vm.initPlacePaginator(a.total))}else vm.placesCount(0);vm.searchWait--;0>=vm.searchWait&&(vm.wait(!1),d||vm.storeHistory())},failure:function(){vm.catalogError(!0)}})},search:function(a){var b=DG.Online.Utils.trim(this.whatText()),c=DG.Online.Utils.trim(this.whereText());b&&1==b.length||
!0!==a&&!b&&!c||(this.whatText(b),this.whereText(c),DG.Online.AjaxManager.cancelCallbackGroup(DG.Online.Request.Type.CATALOG),!0!==a&&(this._clearCatalogSearchData(),this.mapPopup(null),this.mapFeature(null),this.storedId(null),this.mapPyramid(null),this.mapFirms(null),this.adsSearchHash(null),this.what(DG.Online.Utils.trim(this.whatText())),this.where(DG.Online.Utils.trim(this.whereText())),this.hideBalloon(),this.selectedRoute(null),this.selectedStation(null),this.selectedPlatform(null),this.removeMarkers(),
onlineMap.clearGeometries()),this.searchMethod("search"),!this.where()&&this.what()&&this.where(DG.Online.Conf.getSelectedCityConf().name),this.where().length&&(b=null,this.searchWait++,this.what()&&this.what().length?(this.searchWait++,this._searchFirms(a),b="firms"):(this.firms.removeAll(),this.firmsCount(null),b="places"),!0!==a&&this.state(b),this._searchAddress(a)))}};DG.Online.UI.ViewModelModules.Map={_observables:{balloonTemplate:"infocard-tpl-balloon",balloonObject:null,mapCenter:null,mapZoom:null,mapPopup:null,mapFeature:null,mapPyramid:null,mapFirms:null,mapLoading:null,balloonClass:function(){var a=this.balloonTemplate();return"routes-tpl"==a||"infocard-firmlist-tpl"==a||"platform-balloon-tpl"==a?"balloonCont balloon-scroll antiscroll-wrap":"wait-tpl"==a?"balloonCont balloon-preloader antiscroll-hidden":"balloonCont antiscroll-hidden"}},_initModule:function(){},
removeMarkers:function(){onlineMap.removeAllMarkers(DG.Online.Conf.FIRM_MARKERS_GROUP);onlineMap.removeAllMarkers(DG.Online.Conf.TRANS_MARKERS_GROUP);onlineMap.getLayerByName(DG.Online.Conf.TILE_MARKERS_GROUP).clear()},resetBalloonObject:function(a){a=a instanceof Array?a:[a];$.each(a,function(a,c){c instanceof DG.Online.UI.Model.Firm&&c.schedule&&c.schedule.isShortBalloon(!0)})},showBalloon:function(a,b,c){if(a){this.destroyScroll();if(!infoBalloon){var d=document.getElementById("balloon-tpl").text.replace("%%ID%%",
DG.Online.Conf.BALLOON_CONTAINER_ID).replace("%%ID_CONTENT%%",DG.Online.Conf.BALLOON_CONTENT_ID);infoBalloon=$.browser.msie&&"7.0"==$.browser.version?onlineMap.createBalloon(a.clone(),d,{fixedSize:{width:320,height:191},closeCallback:function(){vm.hideBalloon();vm.storeHistory();return!0}}):onlineMap.createBalloon(a.clone(),d,{closeCallback:function(){vm.hideBalloon();vm.storeHistory();return!0}});ko.applyBindingsToNode($("#"+DG.Online.Conf.BALLOON_CONTAINER_ID)[0],null,vm);ko.applyBindingsToNode($("#"+
DG.Online.Conf.BALLOON_CONTENT_ID)[0],null,vm)}this.balloonObject(null);b=b?this.getModeTemplate(b):"wait-tpl";c=c?c:{};b&&this.balloonTemplate(b);c&&(this.resetBalloonObject(c),this.balloonObject(c));document.getElementById(DG.Online.Conf.BALLOON_CONTAINER_ID).scrollTop=0;this.mapPopup(a.clone().toShortString(",",6));"print"==DG.Online.Conf.mode?(infoBalloonMarker=onlineMap.addMarker(a,null,DG.Online.Conf.PRINT_BALLOON_GROUP,DG.Online.Icon.printBalloon),infoBalloon.hide()):infoBalloon.moveToLonlat(a);
"wait-tpl"!=this.balloonTemplate()&&fleXenv.initByClass("antiscroll-inner",DG.Online.Conf.CATALOG_ANIMATION_DURATION)}},hideBalloon:function(){if(infoBalloon&&(infoBalloon.hide(),"print"!=DG.Online.Conf.mode)){var a=infoBalloon.getPosition();if(a=DG.Online.Utils.getMarkerInPosition(a,DG.Online.Conf.FIRM_MARKERS_GROUP)){var b=a.getPosition().toShortString(",",5);if(!ko.utils.arrayFirst(this.firms(),function(a){var d=a.getPosition();return d&&(d=d.toShortString(",",5),a.visibility()&&b===d)?!0:!1}))a.setIcon(a.data.style.normalIcon),
a.data.selected=!1}this.selectedRoute()||(onlineMap.removeAllMarkers(DG.Online.Conf.TRANS_MARKERS_GROUP),this.selectedStation(null))}this.destroyScroll();this.mapPopup(null);this.mapPyramid(null);this.adsSearchHash()||this.mapFirms(null)},destroyScroll:function(){var a=$("#"+DG.Online.Conf.BALLOON_CONTENT_ID)[0];if(a){if("undefined"!==typeof a.fleXcroll)a.fleXcroll=void 0;if("undefined"!==typeof a.fleXdata)a.fleXdata=void 0;fleXenv.fleXlist.splice(1,1)}},showGeometry:function(a){onlineMap.clearGeometries();
var b=OpenLayers.Geometry.fromWKT(a.centroid);if(!b)try{b=OpenLayers.Geometry.fromWKT(a.selection).getCentroid()}catch(c){}if(b){this.showBalloon((new DG.LonLat(b.x,b.y)).clone(),"infocard-geo-tpl",new DG.Online.UI.Model.Geometry(a));switch(a.type){case "house":case "sight":break;default:onlineMap.addGeometry(a.selection,"WKT",DG.Online.Conf.GEOMETRY_SELECTION_STYLE)}if(b=OpenLayers.Geometry.fromWKT(a.selection).getBounds())b.transform(new OpenLayers.Projection("EPSG:4326"),new OpenLayers.Projection("EPSG:900913")),
onlineMap.showExtent(b),this.storeMapPosition()}this.mapFeature(a.id);this.storeHistory()},storeMapPosition:function(){this.mapCenter(onlineMap.getCenter().toShortString(",",6));this.mapZoom(onlineMap.getZoom())},_placeMarkers:function(a,b,c){for(var d in a)if(!("print"==DG.Online.Conf.mode&&a[d].selected)){var e={style:{normalIcon:a[d].style&&a[d].style.normalIcon?a[d].style.normalIcon:c.normalIcon,selectedIcon:a[d].style&&a[d].style.selectedIcon?a[d].style.selectedIcon:c.selectedIcon},firms:a[d].firms,
allFirms:a[d].allFirms,selected:!!a[d].selected},e=onlineMap.addMarker(a[d].lonlat,e,b,a[d].selected?e.style.selectedIcon:e.style.normalIcon);e.length&&(e=e[e.length-1]);e.clickProcess=vm._markerClickHandler}},updateAdsMarkers:function(){if(!("print"==DG.Online.Conf.mode&&1<vm.pageNumber())){var a=[];ko.utils.arrayForEach(vm.advertising(),function(b){var d;if(b.id)if(d=vm.getFirmById(b.id)){if(b=d.findMarker())if(b.data.style=DG.Online.UI.Model.Firm.ADS_MARKER_STYLE,!b.data.selected)b.setIcon(b.data.style.normalIcon),
b.data.selected=!1}else a.push(b.id)});if(a.length){var b={method:"advanced",criteria:{what:{id:a,type:"firm",scope:"full"},types:["firm"],filters:{project_id:DG.Online.Conf.getSelectedCityConf().id}}};DG.Online.Request.call({data:b,success:function(a){ko.utils.arrayForEach(a.results.firm.results,function(a){var b,a=new DG.Online.UI.Model.Firm(a);a._destroy=!0;if(b=a.findMarker())b.data.style=DG.Online.UI.Model.Firm.ADS_MARKER_STYLE,b.data.selected?(b.setIcon(b.data.style.selectedIcon),b.data.selected=
!0):(b.setIcon(b.data.style.normalIcon),b.data.selected=!1);else{a.placeMarker(DG.Online.UI.Model.Firm.ADS_MARKER_STYLE);var c,g;if(infoBalloon&&infoBalloon.visible()&&(b=a.findMarker(),c=infoBalloon.getPosition(),g=b.getPosition(),g.toShortString(",",6)==c.toShortString(",",6)))b.setIcon(b.data.style.selectedIcon),b.data.selected=!0}vm.firms.push(a)})},failure:function(){vm.catalogError(!0)}})}}},_markerClickHandler:function(){var a=function(a){vm.firmsOverflow(f);vm.showBalloon(this.getPosition(),
"infocard-firmlist-tpl",a);a=$.map(a,function(a){return a.id});vm.mapPyramid(this.getPosition().toShortString(",",6));vm.mapFirms(a.join(","));vm.storeHistory()};DG.Online.AjaxManager.cancelAllCallbacks();if(this.type==DG.Marker.TYPE_DOM)this.setIcon(this.data.style.selectedIcon),this.data.selected=!0;else if(this.type==DG.Marker.TYPE_TILE){var b=DG.Online.Utils.getMarkerInPosition(this.getPosition(),DG.Online.Conf.FIRM_MARKERS_GROUP);if(b)b.setIcon(b.data.style.selectedIcon),b.data.selected=!0}var c=
[],b=$.extend({},this.data.allFirms),d;for(d in this.data.firms)c.push(vm.getFirmById(this.data.firms[d])),delete b[this.data.firms[d]];d=[];var e=DG.Online.Conf.PAGINATOR_PAGE_SIZE-c.length,b=Object.keys(b),f=b.length+c.length>DG.Online.Conf.PAGINATOR_PAGE_SIZE;0<e&&(d=b.slice(0,e));d.length?(vm.showBalloon(this.getPosition(),"wait-tpl",null),DG.Online.Request.call({data:{method:"advanced",criteria:{what:{id:d,type:"firm",scope:"full"},types:["firm"],filters:{project_id:DG.Online.Conf.getSelectedCityConf().id}}},
success:function(b){var d,e=this,b=$.map(b.results.firm.results,function(a){d=new DG.Online.UI.Model.Firm(a);d.page=e.data.allFirms[d.id].page||null;return d}),b=c.concat(b);a.call(this,b)},failure:function(){vm.showBalloon(this.getPosition(),"server-error-balloon-tpl")},scope:this})):a.call(this,c)}};DG.Online.UI.ViewModelModules.FirmActions={_observables:{firmsCount:null,placesCount:null,firmsOverflow:!1,didyoumeanFullView:!1,buildingName:null,adsSearchHash:null,adsArticle:null,storedId:null,places:[],firms:[],didyoumean:[],catalogTplRenderingDone:!1,adjustOpenedFirmIntoView:function(){this.catalogTplRenderingDone()&&ko.utils.arrayFirst(this.firms(),function(a){if(a.visibility())return a._adjustInfocard(0),a})},visibleFirms:function(){return ko.utils.arrayFilter(this.firms(),function(a){return!a._destroy})}},
_initModule:function(){},getFirmSchedule:function(a){var b=ko.utils.arrayFirst(this.firms(),function(b){return b.id==a});return b instanceof DG.Online.UI.Model.Firm?b.schedule():null},_doLoadFirmsInRubric:function(a,b){this._doSelectRubNameById(a);this.selectedSubrubId(a);this.searchMethod("searchInRubrics");this.state("firms");var c={what:{id:a,type:"rubric",scope:"full"},types:["firm"],sort:this.sorting.prepareSorting(),page:this.pageNumber(),filters:this.filters.prepareFilters(),magic:{"0":"advertising",
geom2cache:"org_mini"}};this.wait(!0);DG.Online.Request.call({data:DG.Online.SearchCriteria.build(c),typeRequest:DG.Online.Request.Type.CATALOG,killPrevCallbacks:!0,success:DG.Online.UI.Model.Firm._loadFirmCallback(!0,b),failure:DG.Online.UI.Model.Firm._firmFailureCallback,scope:this})},_doLoadFirmsInBuilding:function(a,b){this.showSidebar();var c={what:{id:a,type:"house"},types:["firm"],sort:this.sorting.prepareSorting(),page:this.pageNumber(),filters:this.filters.prepareFilters()},d=new DG.Utils.FQueue([{fn:DG.Online.UI.Model.Firm._loadFirmCallback(!0,
b),scope:this,useArguments:!0},{fn:function(){var b=ko.utils.arrayFirst(this.firms(),function(){return!0});b?this.buildingName(b.profile.geometry_name):DG.Online.Request.call({data:{method:"geo/search",q:a,types:"house"},killPrevCallbacks:!1,typeRequest:DG.Online.Request.Type.GEOCODE,success:function(a){"200"==a.response_code&&vm.buildingName(a.result[0].attributes.street+", "+a.result[0].attributes.number)},failure:DG.Online.UI.Model.Firm._firmFailureCallback})},scope:this}]);this.wait(!0);DG.Online.Request.call({data:DG.Online.SearchCriteria.build(c),
success:d.dispatch(),failure:DG.Online.UI.Model.Firm._firmFailureCallback})},searchFirmsInRubric:function(a){a?(this.hideBalloon(),this._clearCatalogSearchData(),this.selectedRubricId(null),this._doLoadFirmsInRubric(a)):this.firms([])},getFirmById:function(a,b){return 1==arguments.length||!0===b?ko.utils.arrayFirst(vm.firms(),function(b){return b.id==a}):ko.utils.arrayFirst(vm.firms(),function(b){return b._destroy?!1:b.id==a})},loadFilials:function(a,b){this.places.removeAll();this.placesCount(0);
this._clearCatalogSearchData();this.hideBalloon();this.searchMethod("filials");this.storedId(a);var c={what:{id:a,type:"group"},types:["firm"],sort:this.sorting.prepareSorting(),page:this.pageNumber(),filters:this.filters.prepareFilters(),magic:{geom2cache:"org_mini","0":"advertising"}};this.wait(!0);var d=new DG.Utils.FQueue([{fn:DG.Online.UI.Model.Firm._loadFirmCallback(!0,b),scope:this,useArguments:!0},{fn:function(){var a=ko.utils.arrayFirst(this.firms(),function(){return!0});a&&this.what(a.profile.name)},
scope:this}]);DG.Online.Request.call({data:DG.Online.SearchCriteria.build(c),success:d.dispatch(),failure:DG.Online.UI.Model.Firm._firmFailureCallback})},loadAdFirm:function(a,b,c){this.wait(!0);this.searchMethod("ads");c||this.hideBalloon();this.mapFirms(a);this.adsSearchHash(b);var a={what:{id:a,type:"firm"},types:["firm"],magic:{geom2cache:"org_mini"}},d=vm.firms.subscribe(function(a){a instanceof Array&&a.length&&(ko.utils.arrayForEach(a,function(a){a.showInfocard();a.freezeVisibility(!0)}),d.dispose())});
DG.Online.Request.call({data:DG.Online.SearchCriteria.build(a,b),success:DG.Online.UI.Model.Firm._loadFirmCallback(!0,inHistoryRestoreMode||c),failure:DG.Online.UI.Model.Firm._firmFailureCallback,scope:this})}};DG.Online.UI.ViewModelModules.Visual={_observables:{_wait:!0,wait:{read:function(){return this._wait()},write:function(a){!0===a&&this.catalogError(!1);this._wait(a)}},_catalogError:!1,catalogError:{read:function(){return this._catalogError()},write:function(a){a&&this.wait(!1);this._catalogError(a)}},printResultsCollapsed:function(){return"print"==DG.Online.Conf.mode&&("firmInBuild"==this.searchMethod()&&!!this.mapPopup()&&this.mapFeature()==this.storedId()&&this.mapPyramid()==this.mapPopup()||"ads"==
this.searchMethod()&&null!=this.mapPopup())}},_initModule:function(){this.lightbox=new DG.Online.UI.Lightbox},hidePopup:function(){this.lightbox.hide()},getModeTemplate:function(a){if("print"==DG.Online.Conf.mode){var b="print-"+a;0<$("#"+b).length&&(a=b)}return a},showShare:function(){this.shortLink(_t("\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u044e..."));DG.Utils.Ajax.get({url:DG.Online.Conf.SHORTONIZER_URL,data:{mode:"json",url:location.href},success:function(a){this.shortLink(a.shorturl)},failure:function(){this.shortLink(_t("\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b"))},
scope:this});vm.lightbox.show(".dg-popup-share",340)},showPrintPage:function(){dgPrintWindow&&dgPrintWindow.close();var a="",b;for(b in DG.Online.Conf.printPageSettings)a+=","+b+"="+DG.Online.Conf.printPageSettings[b];a=a.replace(/^\,/i,"");dgPrintWindow=window.open(DG.Online.Conf.printPageUrl+location.hash,"OnlinePrintPage",a)},openAddFirm:function(){window.open(DG.Online.Conf.ADD_FIRM_PATTERN_URL.replace("{{PROJECT}}",this.project()))},toggleFiltersBar:function(a,b){b?this.filtersAnimate(!1):this.filtersAnimate(!0);
void 0===a?(this.filtersVisibility()&&(this.filters.serialize(this.filters.activeFilters()),this.sorting.serialize(this.sorting.activeSorting())),this.filtersVisibility(!this.filtersVisibility())):a?(this.filters.serialize(this.filters.activeFilters()),this.sorting.serialize(this.sorting.activeSorting()),this.filtersVisibility(!0)):this.filtersVisibility(!1)},_toggleFirmsInPrint:function(){$(".results-expandable").toggleClass("expanded").find(".togglable").toggle()},setStyleByClass:function(a,b){for(var c=
"",d=a+b,e=0;e<document.styleSheets.length;e++){var f=document.styleSheets[e].rules;if(!f)return;for(var g=0;g<f.length;g++)if((f[g].selectorText||"").match(RegExp("^."+d+"([s.;,]|$)")))c+=";"+f[g].style.cssText}c&&(c=c.substring(1,c.length).replace("!important",""),setTimeout(function(){$("[rel="+d+"]").each(function(a,b){$(b).attr("style",c)})},1));return a},showFeedbackForm:function(){$(".dg-popup-feedback").removeClass("dg-lightbox-success");$("#feedback-form").show();$("#feedback-success").add(".dg-server-error").hide();
$(".dg-feedback .dg-textinput").removeClass("error");$(".dg-feedback").data("validator").resetForm();$(".dg-feedback .dg-search-placeholder").show();vm.lightbox.show(".dg-popup-feedback",600)},redrawScroll:function(a,b){var c=parseInt(b,10);isNaN(c);vm._rebuildScroll(a)},_rebuildScroll:function(){setTimeout(function(){fleXenv.updateScrollBars()},0)},toggleSidebar:function(){var a=$(".dg-main").hasClass("dg-sidebar-hidden"),b=a?0:-370,c=a?"&laquo;":"&raquo;",d=a?"moveE":"moveW";$(".dg-map-wrap").animate({marginLeft:a?
370:0},200);onlineMap[d](185);$(".dg-sidebar").animate({marginLeft:b},200);$(".dg-sidebar-toggler").animate({marginLeft:b},200,function(){$(this).html(c);onlineMap.moveE(1);onlineMap.moveW(1)});$(".dg-main").toggleClass("dg-sidebar-hidden")},showSidebar:function(){$(".dg-main").hasClass("dg-sidebar-hidden")&&this.toggleSidebar()},showCitySelect:function(){this.lightbox.show(".dg-popup-location",585)},adjustContentSizes:function(){var a=$("html").height(),b=$(".dg-head").height(),a=a-b;$.browser.msie&&
(a-=4);500>a&&(a=500);$(".dg-map-wrap, .dg-sidebar").height(a);$(".dg-start-wrapper").length&&($(".dg-start-wrapper").height()+$(".dg-start-links").height()<$(".dg-sidebar-content").height()-80?$(".dg-start-links").css({position:"absolute"}):$(".dg-start-links").css({position:"static"}))}};DG.Online.UI.ViewModelModules.Filters={_observables:{filtersVisibility:!1,filtersAnimate:!0,filtersText:[],sortingName:null},_initModule:function(){this.filters=new DG.Online.UI.Filters;this.sorting=new DG.Online.UI.Sorting},applyFilters:function(){this.removeMarkers();this.hideBalloon();this._clearMapData();onlineMap.clearGeometries();this._setFirmPage(1,1);var a=DG.Online.SearchCriteria.setFiltersAndSort(this.filters.prepareFilters(),this.sorting.prepareSorting());a&&(this.wait(!0),DG.Online.Request.call({data:a,
success:DG.Online.UI.Model.Firm._loadFirmCallback(),failure:DG.Online.UI.Model.Firm._firmFailureCallback,scope:this}));this.sorting.activeSorting(this.sorting.serialize());this.setFiltersText()},resetFilters:function(a,b){if(b)this.filters.list[b](!1);else this.sorting.resetSorting(),this.filters.resetFilters();a&&(this.filters.activeFilters()?this.applyFilters():this.toggleFiltersBar(!1),this.setFiltersText())},setFiltersText:function(){this.filtersText([]);var a=this.filters.list,b;for(b in a)a[b]()&&
this.filtersText.push(b);this.filters.activeFilters(this.filters.serialize())}};DG.Online.UI.ViewModelModules.Paging={_observables:{placePageNumber:null,pageNumber:null,routePageNumber:null,placePages:[],pages:[],routePages:[],placesPage:function(){var a=[];if(!DG.Utils.iNU(this.placePageNumber())&&!DG.Utils.iNU(this.places())){var b=this.places();if(b.length)var a=(this.placePageNumber()-1)*DG.Online.Conf.PAGINATOR_PAGE_SIZE,c=a+DG.Online.Conf.PAGINATOR_PAGE_SIZE,c=c>b.length?b.length:c,a=b.slice(a,c)}return a}},_initModule:function(){},setPage:function(a,b){"route"==b?this._setRoutePage(a):
"place"==b?this._setPlacePage(a):this._setFirmPage(a);$(".dg-sidebar-content")[0].fleXcroll.setScrollPos(0,0);$(".dg-sidebar-content")[0].fleXcroll.updateScrollBars();vm.hideBalloon()},getPageNumber:function(a){return"route"==a?this.routePageNumber():"place"==a?this.placePageNumber():this.pageNumber()},_setFirmPage:function(a,b){this.pageNumber(a);var c=DG.Online.SearchCriteria.setPage(a);c&&!b&&(this.wait(!0),DG.Online.Request.call({data:c,success:DG.Online.UI.Model.Firm._loadFirmCallback(),failure:DG.Online.UI.Model.Firm._firmFailureCallback,
scope:this}))},_setRoutePage:function(a,b){this.routePageNumber(a);b||this._doSearchRoute()},_setPlacePage:function(a){this.placePageNumber(a);this.initPlacePaginator(this.placesCount());this.storeHistory()},_getPagesArray:function(a,b){var c=[];if(1<a){var d=b-Math.floor(2.5)-1;d+5>=a?d=a-5:0>d&&(d=0);5<b&&c.push("prev5");1<b&&c.push("prev");for(var e=d;e<d+5;e++)e<a&&0<=e&&c.push(e+1);b!=a&&c.push("next");5<=a-b&&c.push("next5")}return c},initPaginator:function(a){a=this._getPagesArray(Math.ceil(a/
DG.Online.Conf.PAGINATOR_PAGE_SIZE),vm.pageNumber());this.pages.removeAll();this.pages(a)},initRoutePaginator:function(a){a=this._getPagesArray(Math.ceil(a/DG.Online.Conf.PLACE_PAGINATOR_PAGE_SIZE),vm.routePageNumber());this.routePages.removeAll();this.routePages(a)},initPlacePaginator:function(a){a=this._getPagesArray(Math.ceil(a/DG.Online.Conf.PLACE_PAGINATOR_PAGE_SIZE),vm.placePageNumber());this.placePages.removeAll();this.placePages(a)}};DG.Online.UI.ViewModelModules.Routes={_observables:{routesCount:null,stationsCount:null,selectedRoute:null,selectedStation:null,selectedPlatform:null,stations:[],routes:[]},_initModule:function(){},_doSearchRoute:function(a){this.searchWait++;this.route(DG.Online.Utils.trim(this.routeText()));if(this.route()){var b=DG.Utils.encode(this.route());a||(this._clearCatalogSearchData(),this.mapPopup(null),this.mapFeature(null),this.storedId(null),this.mapPyramid(null),this.mapFirms(null),this.adsSearchHash(null),
this.hideBalloon(),this.selectedRoute(null),this.selectedStation(null),this.selectedPlatform(null),this.removeMarkers(),this.what(null),this.where(null),this.whatText(null),this.whereText(null),onlineMap.clearGeometries());this.searchMethod("searchRoute");this.state("routes");var c=inHistoryRestoreMode;DG.Online.AjaxManager.cancelCallbackGroup(DG.Online.Request.Type.CATALOG);var d=this.routePageNumber();this.routePageNumber(DG.Utils.iNU(d)?1:d);this.wait(!0);d=DG.Utils.Ajax.get({url:"/search/"+b,
data:{page:this.routePageNumber()},success:function(d){var f="undefined"!==typeof d.routesCount&&"undefined"!==typeof d.routesCount;f||(d={routesCount:0,stationsCount:0,stations:void 0,routes:void 0});this.initRoutePaginator(parseInt(d.routesCount)+parseInt(d.stationsCount));this.wait(!1);f&&this.route(DG.Utils.decode(b));this.stations(d.stations);this.routes(d.routes);this.routesCount(d.routesCount);this.stationsCount(d.stationsCount);!c&&!a&&this.storeHistory();this.searchWait--},failure:function(){this.catalogError(!0)},
scope:this});DG.Online.AjaxManager.rememberCallback(d,DG.Online.Request.Type.CATALOG)}},getRoute:function(a){var b=inHistoryRestoreMode,a=DG.Utils.Ajax.get({url:"/route/"+a,data:null,success:function(a){this.showRoute(a,!1,!1,b)},failure:function(){vm.catalogError(!0)},scope:this});DG.Online.AjaxManager.rememberCallback(a,DG.Online.Request.Type.ROUTE)},getStation:function(a){var b=inHistoryRestoreMode,a=DG.Utils.Ajax.get({url:"/station/"+a,data:null,success:function(a){this.showPlatformsMarkers(a.platforms,
a.id,!1,a.map_icon,"Platform",b)},failure:function(){vm.catalogError(!0)},scope:this});DG.Online.AjaxManager.rememberCallback(a,DG.Online.Request.Type.ROUTE)},showRoute:function(a,b,c,d){c&&this.hideBalloon();this.showPlatformsMarkers(a.platforms,null,b,a.map_icon,!1,d);this.showRouteGeometry(a.location);this.selectedRoute(a.id);d||vm.storeHistory();return!0},showPlatformsBalloon:function(a,b){if(!DG.Utils.iNU(b)){var c=OpenLayers.Geometry.fromWKT(b);this.showBalloon(new DG.LonLat(c.x,c.y,DG.LonLat.EPSG_4326))}var d=
new DG.Online.UI.Model.Platform(a),e=inHistoryRestoreMode;d.loadInfo(function(){d.showInfoBalloon();e||vm.storeHistory()})},showStationBalloon:function(a){a=JSON.parse(a);if(a.length){var a=a[0],b=OpenLayers.Geometry.fromWKT(a.location);this.showBalloon(new DG.LonLat(b.x,b.y,DG.LonLat.EPSG_4326));this.showPlatformsBalloon(a.id)}},showPlatformsMarkers:function(a,b,c,d,e,f){this._clearMapData();a=JSON.parse(a);onlineMap.clearGeometries();onlineMap.removeAllMarkers(DG.Online.Conf.TRANS_MARKERS_GROUP);
e||(e="Station");for(var d=d?DG.Online.Icon[d+e]:DG.Online.Icon.station,e=0,g=a.length;e<g;e++){var h=a[e],j=OpenLayers.Geometry.fromWKT(h.location),j=new DG.LonLat(j.x,j.y,DG.LonLat.EPSG_4326);onlineMap.addMarker(j,h.id,DG.Online.Conf.TRANS_MARKERS_GROUP,d)}c&&(c=!1,f&&!inHistoryRestoreMode&&(c=inHistoryRestoreMode=!0),onlineMap.locateViewPortToMarkers(DG.Online.Conf.TRANS_MARKERS_GROUP),this.storeMapPosition(),c&&(inHistoryRestoreMode=!1));b&&this.selectedStation(b);f||vm.storeHistory();return!0},
showRouteGeometry:function(a){onlineMap.addGeometry(a,"WKT",DG.Online.Conf.ROUTE_SELECTION_STYLE);return!0}};DG.Online.UI.ViewModelModules.Rubrics={_observables:{selectedRubricId:null,selectedSubrubName:null,selectedSubrubId:null,rubricsCount:null,allFirmsCount:null,rubrics:[],selectedRubric:function(){var a=this.selectedRubricId();return ko.utils.arrayFirst(this.rubrics(),function(b){return b.id==a})}},_initModule:function(){},loadRubrics:function(){this.resetAppState();this.wait(!0);this.state("rubrics");this._doLoadRubrics()},backToSubrub:function(){var a=this._getRubricIndexBySubrub(this.selectedSubrubId());
if(-1!=a)a=this.rubrics()[a].id,this.state("subrubrics"),this._clearCatalogSearchData(),this._clearMapData(),this.searchMethod(null),this.pageNumber(null),this.placePageNumber(null),this.routePageNumber(null),this.hideBalloon(),this.removeMarkers(),onlineMap.clearGeometries(),this.selectedRubricId(a),this.storeHistory()},_getRubricIndexBySubrub:function(a){for(var b in this.rubrics())for(var c in this.rubrics()[b].subrub())if(this.rubrics()[b].subrub()[c].id==a)return b;return-1},_doSelectRubNameById:function(a){for(var b in this.rubrics())for(var c in this.rubrics()[b].subrub())if(a==
this.rubrics()[b].subrub()[c].id){this.selectedSubrubName(this.rubrics()[b].subrub()[c].name);return}},_doLoadRubrics:function(a){this.searchWait++;this.wait(!0);var b=inHistoryRestoreMode,a=new DG.Utils.FQueue([{fn:function(a){a.total&&!(1>a.total)&&(vm.rubricsCount(a.rubric_count),vm.allFirmsCount(a.firm_count),a=$.map(a.result,function(a){return new DG.Online.UI.Model.Rubric(a.id,a.name,a.subrubs)}),vm.rubrics(a),b||vm.storeHistory(),vm.searchWait--,vm.searchWait||vm.wait(!1))},scope:this,useArguments:!0},
{fn:a,scope:this}]);DG.Utils.Ajax.get({url:"/rubricator/"+DG.Online.Conf.getSelectedCityConf().id,data:null,success:a.dispatch(),failure:function(){vm.catalogError(!0)}})}};DG.Online.UI.ViewModelModules.Traffic={_observables:{trafficReportView:null,trafficReport:null,traffic:null},_initModule:function(){},toggleTraffic:function(){trafLayer.setUrl({speed:DG.Online.Conf.TRAFFIC_SPEED,city:this.project()},!0);trafLayer.display(!trafLayer.isVisible());this.traffic(trafLayer.isVisible()?"1":null);inHistoryRestoreMode||this.storeHistory()},hideTraffic:function(){trafLayer.display(!1);this.traffic(null);inHistoryRestoreMode||this.storeHistory()},trafficReportSend:function(){this.trafficReportView(null);
var a=onlineMap.getExtent(),a={project:this.project(),zoom:this.mapZoom(),bounds:a.toString(),comment:this.trafficReport(),action:"dump"};DG.Utils.Ajax.get({url:DG.Online.Conf.TRAFFIC_REPORT_URL,data:a,success:function(){},failure:function(){}})}};DG.Online.UI.ViewModelModules.Advertisment={_observables:{adsVisible:!0,advertising:[]},_initModule:function(){},checkBannerFreeSpace:function(){}};DG.Online.UI.ViewModelModules.History={_observables:{history:null},_initModule:function(){this.observables={project:this.project,center:this.mapCenter,zoom:this.mapZoom,state:this.state,what:this.whatText,where:this.whereText,popup:this.mapPopup,feature:this.mapFeature,pyramid:this.mapPyramid,firms:this.mapFirms,id:this.storedId,hash:this.adsSearchHash,route:this.routeText,selectedRoute:this.selectedRoute,selectedStation:this.selectedStation,selectedPlatform:this.selectedPlatform,rid:this.selectedRubricId,
srid:this.selectedSubrubId,action:this.searchMethod,page:this.pageNumber,sort:this.sorting,filters:this.filters,traffic:this.traffic,rpage:this.routePageNumber,ppage:this.placePageNumber};this.historyChange=ko.dependentObservable(function(){this.historyStore.project=this.project();this.historyStore.center=this.mapCenter();this.historyStore.zoom=this.mapZoom();this.historyStore.state=this.state();this.historyStore.what=this.whatText();this.historyStore.where=this.whereText();this.historyStore.popup=
this.mapPopup();this.historyStore.feature=this.mapFeature();this.historyStore.pyramid=this.mapPyramid();this.historyStore.firms=this.mapFirms();this.historyStore.id=this.storedId();this.historyStore.hash=this.adsSearchHash();this.historyStore.route=this.routeText();this.historyStore.selectedRoute=this.selectedRoute();this.historyStore.selectedStation=this.selectedStation();this.historyStore.selectedPlatform=this.selectedPlatform();this.historyStore.rid=this.selectedRubricId();this.historyStore.srid=
this.selectedSubrubId();this.historyStore.action=this.searchMethod();this.historyStore.page=this.pageNumber();this.historyStore.sort=this.sorting.serialize();this.historyStore.filters=this.filters.serialize();this.historyStore.traffic=this.traffic();this.historyStore.rpage=this.routePageNumber();this.historyStore.ppage=this.placePageNumber()},this);this.resetScroll=ko.dependentObservable(function(){this.wait();this.state();"print"!=DG.Online.Conf.mode&&$(".dg-sidebar-content")[0].fleXcroll.setScrollPos(0,
0)},this)},_checkParsedParams:function(a){for(var b in a)if(a.hasOwnProperty(b)&&!this.observables.hasOwnProperty(b))return!1;return!0},historyStore:{},initMapFromUrl:function(){if("print"==this.mode()&&this.mapPopup())onlineMap.setCenter(DG.LonLat.fromString(this.mapPopup()),this.mapZoom());else if(this.mapCenter()){var a=DG.LonLat.fromString(this.mapCenter());a.equals(onlineMap.getCenter())||onlineMap.setCenter(a,this.mapZoom())}else this.mapZoom()&&this.mapZoom()!=onlineMap.getZoom()&&onlineMap.zoomTo(parseInt(this.mapZoom()));
this.mapCenter(onlineMap.getCenter().toShortString(",",6));this.mapZoom(onlineMap.getZoom());this.mapPopup()&&this.showBalloon(DG.LonLat.fromString(this.mapPopup()),"wait-tpl",null);this.selectedRoute()&&this.getRoute(this.selectedRoute());a=this.mapPyramid()&&this.mapFirms()&&this.mapPyramid()==this.mapPopup();this.selectedPlatform()&&this.mapPopup()&&!a&&vm.showPlatformsBalloon(this.selectedPlatform());if(this.selectedStation()&&(this.getStation(this.selectedStation()),!this.mapFeature())){this.mapPopup()&&
!a&&(e=DG.LonLat.fromString(this.mapPopup()));var b=onlineMap.getZoom(),c=!1,d;for(d in DG.Online.Conf.generalise)if(this.selectedStation()||DG.Online.Conf.generalise[d]<=b)c=c?c+","+d:d;DG.Online.Request.call({data:{method:"geo/search",q:e.toShortString(","),types:c},typeRequest:DG.Online.Request.Type.GEOCODE,killPrevCallbacks:!1,success:DG.Online.UI.Model.Geometry._loadGeometryCallback(e,this.searchMethod()),failure:DG.Online.UI.Model.Geometry._failureGeometryCallback(e)})}if(this.mapFeature()||
this.mapPopup()&&!this.mapFeature()&&!a&&!this.selectedStation()){var e=null;this.mapPopup()&&!a&&(e=DG.LonLat.fromString(this.mapPopup()));d=this.mapFeature()?this.mapFeature():this.mapPopup();DG.Online.Request.call({data:{method:"geo/search",q:d},killPrevCallbacks:!1,typeRequest:DG.Online.Request.Type.GEOCODE,success:DG.Online.UI.Model.Geometry._loadGeometryCallback(e,this.searchMethod()),failure:DG.Online.UI.Model.Geometry._failureGeometryCallback(e)})}if(a){var f=DG.LonLat.fromString(this.mapPyramid());
this.wait(!0);DG.Online.Request.call({data:{method:"advanced",criteria:{what:{id:this.mapFirms().split(","),type:"firm",scope:"full"},types:["firm"],filters:{project_id:DG.Online.Conf.getSelectedCityConf().id}}},typeRequest:DG.Online.Request.Type.POPUP,success:function(a){var b=$.map(a.results.firm.results,function(a){return new DG.Online.UI.Model.Firm(a)});vm.firmsOverflow(a.results.firm.total>DG.Online.Conf.PAGINATOR_PAGE_SIZE);vm.showBalloon(f,"infocard-firmlist-tpl",b)},failure:function(){vm.showBalloon(f,
"server-error-balloon-tpl")}})}"widget"==this.state()&&(f=this.mapPopup()?DG.LonLat.fromString(this.mapPopup()):!1,this.wait(!0),DG.Online.Request.call({data:{method:"advanced",criteria:{what:{id:this.mapFirms().split(","),type:"firm",scope:"full"},types:["firm"],filters:{project_id:DG.Online.Conf.getSelectedCityConf().id}}},typeRequest:DG.Online.Request.Type.POPUP,success:function(a){vm.wait(!1);var b=$.map(a.results.firm.results,function(a){return new DG.Online.UI.Model.Firm(a)}),a=a.results?a.results.firm.total:
0;vm.firmsOverflow(a>DG.Online.Conf.PAGINATOR_PAGE_SIZE);vm.firms.removeAll();vm.firms(b);vm.firmsCount(a);vm.initPaginator(a);vm.setFiltersText();vm.toggleFiltersBar(!1,!0);vm.catalogTplRenderingDone(!0);vm.catalogTplRenderingDone(!1);f&&vm.showBalloon(f,"infocard-firmlist-tpl",b)},failure:function(){vm.catalogError(!0);f&&vm.showBalloon(f,"server-error-balloon-tpl")}}));"print"!=DG.Online.Conf.mode&&(this.traffic()?trafLayer.isVisible()||this.toggleTraffic():trafLayer.isVisible()&&this.hideTraffic())},
restoreHistory:function(){inHistoryRestoreMode=!0;var a=DG.Online.Utils.parseHistoryURL(),a=a||{};this._checkParsedParams(a)||DG.Online.Utils.redirect("/404.html");var b=$.objectDiff(this.historyStore,a);if(!$.isEmptyObject(b)){null!=a.project&&a.project!=this.observables.project()&&this.changeProject(a.project);this.resetAppState();this.traffic(null);for(var c in a)if("filters"==c)this.observables[c].serialize(a[c]),this.filters.activeFilters(a[c]);else if("sort"==c)this.observables[c].serialize(a[c]),
this.sorting.activeSorting(a[c]);else this.observables[c](a[c]);this.what(this.whatText());this.where(this.whereText());this.route(this.routeText());this.initMapFromUrl();this._doLoadRubrics(function(){switch(this.searchMethod()){case "ads":this.loadAdFirm(this.mapFirms(),this.adsSearchHash(),!0);break;case "search":this.search(!0);break;case "filials":this.loadFilials(this.storedId(),!0);break;case "searchRoute":this._doSearchRoute(!0);break;case "searchInRubrics":this._doLoadFirmsInRubric(this.selectedSubrubId(),
!0);break;case "firmInBuild":this._doLoadFirmsInBuilding(this.storedId(),!0)}})}inHistoryRestoreMode=!1},storeHistory:function(){if(!inHistoryRestoreMode){var a="",b,c;for(b in this.historyStore)if(c=this.historyStore[b])c=c.toString().replace(/\//ig,"2FF"),a+=b+"/"+c+"/";a=a.substr(0,a.length-1);this.history(a)}}};ko.bindingHandlers.valueSelected={update:function(a,b){var c=b();$(a).attr("value",c);$(a).select()}};ko.bindingHandlers.clearText={update:function(a,b){var c=ko.utils.unwrapObservable(b()),c=null!==c&&void 0!==c?$P.strip_tags(c):"";ko.bindingHandlers.text.update(a,function(){return c})}};
ko.bindingHandlers.strippedHtml={update:function(a,b){var c,d,e=ko.utils.unwrapObservable(b());e&&"object"==typeof e?(c=e.input||"",d=e.allowed):c=e;e=null!==c&&void 0!==c?$P.strip_tags(c,d):"";e=$P.stripslashes(e);ko.bindingHandlers.html.update(a,function(){return e})}};
ko.bindingHandlers.adsShortArticle={update:function(a,b){var c=ko.utils.unwrapObservable(b()),d=$P.strip_tags(c),e=$P.strip_tags(c,"<br>");300>d.length?c=e:(d=e.indexOf("<br>"),c=299<d||0>=d?e.substr(0,300):e.substring(0,d),c+="...");c=$P.stripslashes(c);ko.bindingHandlers.html.update(a,function(){return c})}};ko.bindingHandlers.articleTip={init:function(a){$(a).tooltip({tip:"#article_tip",tipClass:"article-tip",position:"center right",events:{def:"click,null",tooltip:"mouseenter"}})}};
ko.bindingHandlers.updateScroll={update:function(a){$(a).is(":visible")&&vm.redrawScroll("#"+DG.Online.Conf.CATALOG_CONTAINER_ID)}};ko.bindingHandlers.updateBalloonScroll={update:function(){vm.redrawScroll("#"+DG.Online.Conf.BALLOON_CONTAINER_ID)}};
ko.bindingHandlers.animateVisible={init:function(a,b){var c=ko.utils.unwrapObservable(b());if(c&&"object"==typeof c)c=c.visible;ko.bindingHandlers.visible.update(a,function(){return c})},update:function(a,b){var c,d=function(){},e=!1,f=ko.utils.unwrapObservable(b()),g="none"!=a.style.display;if(f&&"object"==typeof f){c=f.visible;if("function"===typeof f.callback)d=f.callback;f.notUseAnimation&&(e=!0)}else c=f;if(e){if(f&&"object"==typeof f)f=f.visible;ko.bindingHandlers.visible.update(a,function(){return f})}else c&&
!g?$(a).slideDown(200,d):!c&&g&&$(a).slideUp(200,d)}};
ko.bindingHandlers.animateInfocard={init:function(a,b){var c=ko.utils.unwrapObservable(b());ko.bindingHandlers.animateVisible.init(a,function(){return c});if(c&&"object"==typeof c&&c.visible){var d=c.css||!1;$(a).parent().addClass(d)}},update:function(a,b){var c,d=$(a),e=function(){},f=!1,g=ko.utils.unwrapObservable(b()),h="none"!=a.style.display;if(g&&"object"==typeof g){if(c=g.visible,f=g.css||!1,"function"===typeof g.callback)e=g.callback}else c=g;c&&!h?(d.parent().addClass(f),d.slideDown(200,
function(){e();vm.redrawScroll("#"+DG.Online.Conf.CATALOG_CONTAINER_ID);vm.checkBannerFreeSpace()})):!c&&h&&d.slideUp(200,function(){$(this).parent().removeClass(f);vm.redrawScroll("#"+DG.Online.Conf.CATALOG_CONTAINER_ID);vm.checkBannerFreeSpace()})}};ko.bindingHandlers.kostil={update:function(a,b){setTimeout(function(){ko.bindingHandlers.attr.update(a,b)},0)}};
ko.bindingHandlers.placeholder={init:function(a,b){var c=ko.utils.unwrapObservable(b()).toString()||"",d=$(a),e=$('<label class="dg-search-placeholder">'+c+"</label>").attr("for",d.attr("id")).hide();e.insertAfter(d);setTimeout(function(){""==d.val()&&e.show()},0);e.on("click",function(){$(this).hide().prev(".dg-textinput").focus()});d.on("focus",function(){$(this).nextAll(".dg-search-placeholder").hide();$(this).addClass("focus")});d.on("blur",function(){$(this).removeClass("focus");$(this).val()||
$(this).nextAll(".dg-search-placeholder").css({display:"inline"})})},update:function(a){!$(a).is(":focus")&&""==$(a).val()?$(a).nextAll(".dg-search-placeholder").css({display:"inline"}):""!=$(a).val()&&$(a).nextAll(".dg-search-placeholder").hide()}};DG||(DG={});if(!DG.Online)DG.Online={};if(!DG.Online.UI)DG.Online.UI={};
DG.Online.UI.Filters=function(){this.list={alltime:ko.observable(!1),rightnow:ko.observable(!1),cashpay:ko.observable(!1),ccpay:ko.observable(!1),cashlesspay:ko.observable(!1),hassite:ko.observable(!1)};this.activeFilters=ko.observable("");this.serialize=ko.dependentObservable({read:function(){var a=[],b;for(b in this.list)this.list[b]()&&a.push(b);return a.join(",")},write:function(a){this.resetFilters();if(a)for(var a=a.split(/,/g),b=0,c=a.length;b<c;b++)if(this.list[a[b]])this.list[a[b]](!0)},
owner:this});this.setFilter=function(a,b){this.list[a](b)};this.resetFilters=function(){for(var a in this.list)this.list[a](!1)};this.prepareFilters=function(){var a=this.list,b={};b.project_id=DG.Online.Conf.getSelectedCityConf().id;if(a.alltime()||a.rightnow()){var c=DG.Online.Conf.getCurrentDate(),d=DG.Online.Dictionary.week[c.getDay()].toLowerCase();if(a.alltime())b.worktime={type:"alltime",day:d};else if(a.rightnow()){var e=c.getMinutes();10>e&&(e="0"+e);c=c.getHours()+":"+e;b.worktime={type:"time",
day:d,time:c}}}d=[];a.cashpay()&&d.push("cash");a.ccpay()&&(d=d.concat(["visa","mastercard","dinersclub","goldcrown"]));a.cashlesspay()&&d.push("noncash");d.length&&(b.payoptions=d);a.hassite()&&(b.has_site=1);return b}};DG||(DG={});if(!DG.Online)DG.Online={};if(!DG.Online.UI)DG.Online.UI={};DG.Online.UI.Sorting=function(){this.type=ko.observable(DG.Online.Conf.DEFAULT_SORTING);this.activeSorting=ko.observable(DG.Online.Conf.DEFAULT_SORTING);this.serialize=ko.dependentObservable({read:function(){return this.type()},write:function(a){this.resetSorting();this.type(a)},owner:this});this.setSorting=function(a){this.type(a)};this.resetSorting=function(){this.type(DG.Online.Conf.DEFAULT_SORTING)};this.prepareSorting=function(){return this.type()}};DG.Online.UI.Lightbox=DG.Online.Utils.createClass({constructor:function(){var a=this;this._shown=!1;this.overlay=$(".dg-popup-overlay");this.popup=$(".dg-popup");this.popup.hide();this.tpl=$(".dg-popup-tpl");this.body=$("body");this.body.keydown(function(b){a._shown&&27==b.keyCode&&a.hide()})},show:function(a,b){var c=this;a&&(this.popup.show(),this.overlay.fadeTo(100,0.5,function(){var d=0;c.popup.width(b);$(a).show();d=$(a).height();d>c.body.height()-100&&(d=c.body.height()-100,b+=30,c.popup.width(b));
$(a).height(d);c.popup.css({marginTop:-(d+60)/2,marginLeft:-(b+60)/2,width:b}).animate({opacity:1},100);c._shown=!0}))},hide:function(){var a=this;this.popup.fadeTo(100,0,function(){$(this).attr("style","");a.tpl.height("auto").hide();a.overlay.fadeTo(100,0,function(){$(this).hide();a._shown=!1});a.popup.hide()})}});DG.Online.Icon={orangeSmall:{url:"/images/markers/m_orange_s.png",size:{w:16,h:16}},orangeMedium:{url:"/images/markers/m_orange_m.png",size:{w:26,h:26}},orangeBig:{url:"/images/markers/m_orange_b.png",size:{w:36,h:36}},orangeSmallP:{url:"/images/markers/p_orange_s.png",size:{w:16,h:16}},orangeMediumP:{url:"/images/markers/p_orange_m.png",size:{w:26,h:26}},orangeBigP:{url:"/images/markers/p_orange_b.png",size:{w:36,h:36}},orangeSmallS:{url:"/images/markers/s_orange_s.png",size:{w:16,h:16}},orangeMediumS:{url:"/images/markers/s_orange_m.png",
size:{w:26,h:26}},orangeBigS:{url:"/images/markers/s_orange_b.png",size:{w:36,h:36}},redSmall:{url:"/images/markers/m_red_s.png",size:{w:16,h:16}},redMedium:{url:"/images/markers/m_red_m.png",size:{w:26,h:26}},redBig:{url:"/images/markers/m_red_b.png",size:{w:36,h:36}},redSmallS:{url:"/images/markers/p_red_s.png",size:{w:16,h:16}},redMediumS:{url:"/images/markers/p_red_m.png",size:{w:26,h:26}},redBigS:{url:"/images/markers/p_red_b.png",size:{w:36,h:36}},station:{url:"/images/markers/auto.png",size:{w:24,
h:24},offset:{x:-12,y:-12}},metroStation:{url:"/images/markers/metro_route.png",size:{w:20,h:20},offset:{x:-10,y:-10}},metroSpbStation:{url:"/images/markers/metro_route_spb.png",size:{w:20,h:20},offset:{x:-10,y:-10}},metroMoskvaStation:{url:"/images/markers/metro_route_mosk.png",size:{w:20,h:20},offset:{x:-10,y:-10}},busStation:{url:"/images/markers/bus_route.png",size:{w:20,h:20},offset:{x:-10,y:-10}},funicularStation:{url:"/images/markers/funicular_route.png",size:{w:20,h:20},offset:{x:-10,y:-10}},
monorailStation:{url:"/images/markers/monorail_route.png",size:{w:20,h:20},offset:{x:-10,y:-10}},pierStation:{url:"/images/markers/pier_route.png",size:{w:20,h:20},offset:{x:-10,y:-10}},roperoadStation:{url:"/images/markers/roperoad_route.png",size:{w:20,h:20},offset:{x:-10,y:-10}},trainStation:{url:"/images/markers/train_route.png",size:{w:20,h:20},offset:{x:-10,y:-10}},tramStation:{url:"/images/markers/tram_route.png",size:{w:20,h:20},offset:{x:-10,y:-10}},metroPlatform:{url:"/images/markers/plat_metro.png",
size:{w:20,h:20},offset:{x:-10,y:-10}},metroSpbPlatform:{url:"/images/markers/plat_metro_spb.png",size:{w:20,h:20},offset:{x:-10,y:-10}},metroMoskvaPlatform:{url:"/images/markers/plat_metro_mosk.png",size:{w:20,h:20},offset:{x:-10,y:-10}},busPlatform:{url:"/images/markers/plat_bus.png",size:{w:20,h:20},offset:{x:-10,y:-10}},funicularPlatform:{url:"/images/markers/plat_funic.png",size:{w:20,h:20},offset:{x:-10,y:-10}},monorailPlatform:{url:"/images/markers/plat_mono.png",size:{w:20,h:20},offset:{x:-10,
y:-10}},pierPlatform:{url:"/images/markers/plat_pier.png",size:{w:20,h:20},offset:{x:-10,y:-10}},roperoadPlatform:{url:"/images/markers/plat_rope.png",size:{w:20,h:20},offset:{x:-10,y:-10}},trainPlatform:{url:"/images/markers/plat_train.png",size:{w:20,h:20},offset:{x:-10,y:-10}},tramPlatform:{url:"/images/markers/plat_tram.png",size:{w:20,h:20},offset:{x:-10,y:-10}},printBalloonOld:{url:"/images/markers/balloon_small.gif",size:{w:35,h:70},offset:{x:-5,y:-40}},printBalloon:{url:"/images/markers/balloon_small2.gif",
size:{w:35,h:35},offset:{x:-10,y:-35}}};DG.Online.UI.Model.Rubric=function(a,b,c){var d=this;this.id=a;this.name=b;this.subrub=ko.observableArray([]);this.subrubsorted=ko.dependentObservable(function(){return d.subrub().slice(0).sort(function(a,b){return a.name.toLowerCase()<b.name.toLowerCase()?-1:1})});this.subrub(c)};DG.Online.UI.Model.Rubric.prototype.selectRubric=function(){vm.selectedRubricId(this.id);vm.state("subrubrics");vm.removeMarkers();vm.storeHistory()};DG.Online.UI.Model.Firm=DG.Online.Utils.createClass({constructor:function(a){this.id=a.id;this.profile=a;this.allowReviewing=DG.Online.Conf.getSelectedCityConf().flamp*(void 0!=a.allow_reviewing?a.allow_reviewing:1);this.visibility=ko.observable(!1);this.page=this.schedule=null;this._freezedVisibility=this._bc=!1},firmNumber:function(){return vm.firms.indexOf(this)+1},freezeVisibility:function(a){this._freezedVisibility=!!a},showInfocard:function(a){if(!this._freezedVisibility&&(this.visibility()&&
this.schedule&&this.schedule.isShortCatalog(!0),this.visibility(!this.visibility()),this.visibility()&&!1!==a&&this._registerBC(),a=this.findMarker())){var b=a.getPosition().toShortString(",",5);if(this.visibility()||infoBalloon&&infoBalloon.visible()&&!(vm.balloonObject()instanceof DG.Online.UI.Model.Geometry)&&b==infoBalloon.getPosition().toShortString(",",5))a.setIcon(a.data.style.selectedIcon),a.data.selected=!0;else{var c=this;if(!ko.utils.arrayFirst(vm.firms(),function(a){return a.visibility()&&
c.id!=a.id&&c.profile.geometry_id==a.profile.geometry_id?!0:!1}))a.setIcon(a.data.style.normalIcon),a.data.selected=!1}}},openInCatalog:function(a){vm.showSidebar();var b=vm.getFirmById(this.id,!1);if(b)b.visibility()?b._adjustInfocard():b.showInfocard();else if(!0!==a){if(!this.page){var c,a=onlineMap.getMarkersByGroup(DG.Online.Conf.TILE_MARKERS_GROUP),d;for(d in a)if(c=a[d].data[this.id]){this.page=c.page;break}a=null;c||alert("Sorry, an error occured")}var e=vm.firms.subscribe(function(a){a instanceof
Array&&a.length&&(this.openInCatalog(!0),e.dispose())}.bind(this));vm._setFirmPage(this.page)}},showGeometryBalloon:function(){if(this.profile.lon&&this.profile.lat){var a=this.getPosition();DG.Online.Request.call({data:{method:"geo/search",q:a.toShortString(","),types:"house"},typeRequest:DG.Online.Request.Type.GEOCODE,killPrevCallbacks:!0,success:function(b){var b=b.result[0],c=a.clone();vm.showBalloon(c,"infocard-geo-tpl",new DG.Online.UI.Model.Geometry(b));onlineMap.clearGeometries();onlineMap.removeAllMarkers(DG.Online.Conf.TRANS_MARKERS_GROUP);
vm._clearMapData();switch(b.type){case "house":var d=DG.Online.Conf.getSelectedCityConf();onlineMap.setCenter(c,d.zoom_max-1)}vm.mapFeature(b.id);vm.storeHistory()},failure:function(){vm.showBalloon(new DG.LonLat(geom.x,geom.y),"infocard-geo-tpl",{name:_t("\u041c\u044b \u0435\u0449\u0451 \u043d\u0435 \u0441\u043e\u0431\u0440\u0430\u043b\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u044d\u0442\u043e\u043c \u043c\u0435\u0441\u0442\u0435")});vm.storeHistory()}})}},
placeMarker:function(a){if(!arguments.length)a=DG.Online.UI.Model.Firm.DEFAULT_MARKER_STYLE;if(this.profile.geometry){var b={};b[this.profile.geometry_id]={lonlat:this.getPosition(),firms:[this.id],allFirms:{}};vm._placeMarkers(b,DG.Online.Conf.FIRM_MARKERS_GROUP,a)}},showInfoBalloon:function(){if(this.profile.geometry){var a=this.getPosition();vm.showBalloon(a,"infocard-tpl-balloon",this)}},getSchedule:function(){if(!this.schedule&&this.profile.whs)this.schedule=this.profile.whs.workhours_array?
new DG.Online.UI.Model.FirmSchedule(this.profile.whs.workhours_array,this.profile.whs.workhours_comment):new DG.Online.UI.Model.FirmSchedule(this.profile.whs.workhours,this.profile.whs.workhours_comment);return this.schedule},getPosition:function(){var a=!1;this.profile.lon&&this.profile.lat&&(a=new DG.LonLat(this.profile.lon,this.profile.lat,DG.LonLat.EPSG_4326));return a},findMarker:function(){var a=this.getPosition();return DG.Online.Utils.getMarkerInPosition(a,DG.Online.Conf.FIRM_MARKERS_GROUP)},
_adjustInfocard:function(){var a=$(".dg-sidebar-content"),b=$("#cat-firm_id-"+this.id,a),c=a[0].fleXcroll;if(b.length){var d=c.scrollContent()[1][0],e=b.position().top-d;if(0>=e)c.setScrollPos(!1,d+e);else if(e=b.outerHeight(!0)+e,e>=a.height()){a=d+(e-a.height())+10;if(b.position().top<=a)a=b.position().top;c.setScrollPos(!1,a)}}},_adjustBalloonInfocard:function(a){var b=$("#"+DG.Online.Conf.BALLOON_CONTENT_ID),c=$("#bal-firm_id-"+this.id,b),a=void 0===a?DG.Online.Conf.CATALOG_ANIMATION_DURATION:
parseInt(a,10);if(c.length){var d;d=b.scrollTop();var e=c.outerHeight(!0),c=c.position().top,f=c+e;f>b.height()?(d=d+(f-b.height())+10,b.animate({scrollTop:d},a)):0>c&&(d=d+c+e-b.height()+10,b.animate({scrollTop:d},a))}},_registerBC:function(){if(this.profile.register_bc_url&&!this._bc)try{this._bc=!0,DG.apitracker.regBC(this.profile.register_bc_url)}catch(a){}},showAdsArticle:function(){$(".dg-popup-ads-article").html('<h2 class="title">'+this.profile.name+"</h2>"+(this.profile.geometry_name?'<div class="address">'+
this.profile.geometry_name+"</div>":"")+this.profile.ads.article);vm.lightbox.show(".dg-popup-ads-article",500)},getFirmAddress:function(){var a="";if(this.profile.geometry_name)a=this.profile.geometry_name,!DG.Utils.iNU(this.profile.city_name)&&DG.Online.Conf.getSelectedCityConf().name!=this.profile.city_name&&(a=this.profile.city_name+", "+a);return a}});
DG.Online.UI.Model.Firm._loadFirmCallback=function(a,b){return function(c){this.wait(!1);var d=c.results?!0:!1,e=d?c.results.firm.total:0,f=d&&!!c.results.firm.magic,g=f&&c.results.firm.magic.advertising instanceof Object?c.results.firm.magic.advertising:[],h=f&&c.results.firm.magic.dym_rubrics instanceof Object?c.results.firm.magic.dym_rubrics:[],j=DG.Online.UI.Model.Firm._processTileMarkers(f&&c.results.firm.magic.geometries instanceof Object?c.results.firm.magic.geometries:[]),k={},m=vm.mapFirms()?
vm.mapFirms().split(","):"",l=new OpenLayers.Bounds,d=!d?[]:$.map(c.results.firm.results,function(c){var d=new DG.Online.UI.Model.Firm(c);d.profile.lon&&d.profile.lat&&l.extend(new OpenLayers.LonLat(d.profile.lon,d.profile.lat));if(!1!==a&&c.geometry){if(!(k[c.geometry_id]instanceof Object)&&(k[c.geometry_id]={lonlat:d.getPosition(),firms:[],allFirms:j[c.geometry_id]?j[c.geometry_id].filials||{}:{}},b&&-1!=$.inArray(d.id,m)))k[c.geometry_id].selected=!0;k[c.geometry_id].firms.push(d.id);if(j[c.geometry_id])j[c.geometry_id].firms instanceof
Array?j[c.geometry_id].firms.push(d.id):j[c.geometry_id].firms=[d.id]}return d}),g=$.map(g,function(a){return new DG.Online.UI.Model.Advertising(a)}),h=$.map(h,function(a){return a});!1!==a&&(!0!==b&&this.removeMarkers(),this._placeMarkers(k,DG.Online.Conf.FIRM_MARKERS_GROUP,DG.Online.UI.Model.Firm.DEFAULT_MARKER_STYLE));this.didyoumean.removeAll();this.didyoumean(h);this.didyoumeanFullView(!1);this.firms.removeAll();this.firms(d);this.firmsCount(e);this.advertising.removeAll();this.advertising(g);
this.updateAdsMarkers();this.initPaginator(e);this.setFiltersText();this.toggleFiltersBar(!1,!0);!0!==b&&(0<e||this.filters.serialize()?this.state("firms"):this.state("places"));!1!==a&&0<e&&(DG.Online.UI.Model.Firm._placeTileMarkers(j,c.results.firm.tilehash),l.top&&!b&&1==this.pageNumber()&&(l.transform(new OpenLayers.Projection("EPSG:4326"),new OpenLayers.Projection("EPSG:900913")),onlineMap.showExtent(l),this.storeMapPosition()));0<this.searchWait&&this.searchWait--;0>=this.searchWait&&(this.wait(!1),
b||this.storeHistory());this.catalogTplRenderingDone(!0);this.catalogTplRenderingDone(!1)}};DG.Online.UI.Model.Firm._processTileMarkers=function(a){var b={},c,d;for(d in a)if(c=a[d],c.lon&&c.lat)c.page=Math.ceil((parseInt(d,10)+1)/DG.Online.Conf.PAGINATOR_PAGE_SIZE),b[c.gid]instanceof Object||(b[c.gid]={lonlat:new DG.LonLat(c.lon,c.lat,DG.LonLat.EPSG_4326),filials:{}}),b[c.gid].filials[c.id]=c;return b};
DG.Online.UI.Model.Firm._placeTileMarkers=function(a,b){var c=$.map(a,function(a){return new DG.Marker({lonlat:a.lonlat,data:{firms:a.firms||[],allFirms:a.filials}},{type:DG.Marker.TYPE_TILE,groupName:DG.Online.Conf.TILE_MARKERS_GROUP})}),d=onlineMap.getLayerByName(DG.Online.Conf.TILE_MARKERS_GROUP);b?(d.addMarkers(c),d.setHash(b),d.redraw()):d.hide()};DG.Online.UI.Model.Firm._firmFailureCallback=function(){vm.catalogError(!0)};
DG.Online.UI.Model.Firm.DEFAULT_MARKER_STYLE={normalIcon:DG.Online.Icon.orangeMedium,selectedIcon:DG.Online.Icon.redMedium};DG.Online.UI.Model.Firm.ADS_MARKER_STYLE={normalIcon:DG.Online.Icon.orangeMediumS,selectedIcon:DG.Online.Icon.redMedium};DG.Online.UI.Model.Advertising=function(a){this.id=a.firm_id;this.data=a};DG.Online.UI.Model.Advertising.prototype.registerBC=function(){try{DG.apitracker.regBC("http://stat.api.2gis.ru/?v=1.3&hash="+this.data.hash)}catch(a){}};DG.Online.UI.Model.FirmSchedule=function(a,b){var c=DG.Online.Conf.getCurrentDate(),c=DG.Online.Dictionary.week[c.getDay()];this.isShortCatalog=ko.observable(!0);this.isShortBalloon=ko.observable(!0);this.currentD=ko.observable(c);this.shortView=_t("\u0421\u0435\u0433\u043e\u0434\u043d\u044f (\u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u044b)")+" "+_t("\u041d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 (\u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u044b)");
this.fullView={work:{},lunch:{filled:!1},allTime:!0};this.comment=b;DG.Online.UI.Model.FirmSchedule._setWeekProps(this.fullView.work);DG.Online.UI.Model.FirmSchedule._setWeekProps(this.fullView.lunch);for(var d in a)if(DG.Online.UI.Model.FirmSchedule._fillTime(d,a[d],this.fullView),d==c)this.shortView='<span class="dg-label">'+_t("\u0421\u0435\u0433\u043e\u0434\u043d\u044f")+"</span> "+DG.Online.UI.Model.FirmSchedule._getTimeStr(a[d])};
DG.Online.UI.Model.FirmSchedule.prototype.changeView=function(a){"catalog"==a?this.isShortCatalog(!this.isShortCatalog()):this.isShortBalloon(!this.isShortBalloon())};DG.Online.UI.Model.FirmSchedule._setWeekProps=function(a){a.Mon="";a.Tue="";a.Wed="";a.Thu="";a.Fri="";a.Sat="";a.Sun=""};
DG.Online.UI.Model.FirmSchedule._fillTime=function(a,b,c){var d=0,e=[],f;for(f in b)e[d]=f,d++;if(!(1>d))if(1==d){if(c.work[a]={},c.work[a].from=DG.Online.UI.Model.FirmSchedule._getFormatedTimeStr(b[e[0]].from),c.work[a].to=DG.Online.UI.Model.FirmSchedule._getFormatedTimeStr(b[e[0]].to),"00:00"!=b[e[0]].from||"24:00"!=b[e[0]].to)c.allTime=!1}else c.lunch.filled=!0,c.work[a]={},c.lunch[a]={},c.work[a].from=DG.Online.UI.Model.FirmSchedule._getFormatedTimeStr(b[e[0]].from),c.work[a].to=DG.Online.UI.Model.FirmSchedule._getFormatedTimeStr(b[e[1]].to),
c.lunch[a].from=DG.Online.UI.Model.FirmSchedule._getFormatedTimeStr(b[e[0]].to),c.lunch[a].to=DG.Online.UI.Model.FirmSchedule._getFormatedTimeStr(b[e[1]].from),c.allTime=!1};
DG.Online.UI.Model.FirmSchedule._getTimeStr=function(a){var b="",c=0,d=[],e;for(e in a)d[c]=e,c++;1>c||(1==c?b=DG.Online.UI.Model.FirmSchedule._getFormatedTimeStr(a[d[0]].from)+"&ndash;"+DG.Online.UI.Model.FirmSchedule._getFormatedTimeStr(a[d[0]].to):(b=DG.Online.UI.Model.FirmSchedule._getFormatedTimeStr(a[d[0]].from)+"&ndash;"+DG.Online.UI.Model.FirmSchedule._getFormatedTimeStr(a[d[1]].to),b=b+'<span class="dg-label">, \u043e\u0431\u0435\u0434 </span>'+(DG.Online.UI.Model.FirmSchedule._getFormatedTimeStr(a[d[0]].to)+
"&ndash;"+DG.Online.UI.Model.FirmSchedule._getFormatedTimeStr(a[d[1]].from))));return b};DG.Online.UI.Model.FirmSchedule._getFormatedTimeStr=function(a){return a?(a=a.split(":"),a[0]+":"+a[1]):""};DG.Online.UI.Model.Geometry=function(a){this.id=a.id;this.type=a.type;this.attributes=a.attributes;this.data=a};DG.Online.UI.Model.Geometry.prototype.elevation=function(){var a;return!isNaN(parseInt(a=this.attributes.elevation))?0==a?"":_t("%d \u044d\u0442\u0430\u0436\u0435\u0439",a):null};
DG.Online.UI.Model.Geometry.prototype.firmsInBuilding=function(){vm._setFirmPage(1,1);vm.filters.resetFilters();vm.selectedSubrubName(null);vm.selectedSubrubId(null);vm.searchMethod("firmInBuild");vm.storedId(this.id);vm.buildingName(this.getHouseAddress(!0));vm._doLoadFirmsInBuilding(this.id)};DG.Online.UI.Model.Geometry.prototype.tplName=function(){return"infocard-"+(-1!=ko.utils.arrayIndexOf(DG.Online.UI.Model.Geometry.tpls,this.data.type)?this.data.type:"othergeo")+"-tpl"};
DG.Online.UI.Model.Geometry.prototype.getName=function(){var a="",b=[];"house"==this.type?(!DG.Utils.iNU(this.attributes.city)&&DG.Online.Conf.getSelectedCityConf().name!=this.attributes.city&&b.push(this.attributes.city),this.attributes.street&&"object"!=typeof this.attributes.street&&b.push(this.attributes.street),this.attributes.number&&"object"!=typeof this.attributes.number&&b.push(this.attributes.number)):this.data.name&&"object"!=typeof this.data.name&&b.push(this.data.name);b.length&&(a=b.join(", "),
"house"==this.type&&this.attributes.number2&&"object"!=typeof this.attributes.number2&&this.attributes.street2&&"object"!=typeof this.attributes.street2&&(a+=" / "+this.attributes.street2+", "+this.attributes.number2));return a};
DG.Online.UI.Model.Geometry.prototype.getHouseAddress=function(a){if("house"!==this.data.type)return"";var b="",c=[],d=this.attributes;a||d.index&&"object"!=typeof d.index&&c.push(this.attributes.index);var e=function(a){return"undefined"!==typeof a&&!/^\s*$/.test(a)};e(d.city)&&!DG.Utils.iNU(d.city)&&DG.Online.Conf.getSelectedCityConf().name!=d.city&&c.push(d.city);$.each(["street","number"],function(a,b){e(d[b])&&c.push(d[b])});c.length&&(b=c.join(", "),d.number2&&"object"!=typeof d.number2&&d.street2&&
"object"!=typeof d.street2&&(b+=" / "+d.street2+", "+d.number2));return b};DG.Online.UI.Model.Geometry.tpls=["house","sight"];
DG.Online.UI.Model.Geometry._loadGeometryCallback=function(a,b){return function(c){if(c.response_code!=DG.Online.Request.Status.OK)vm.showBalloon(a,"infocard-geo-err-tpl",{message:_t("\u041c\u044b \u0435\u0449\u0451 \u043d\u0435 \u0441\u043e\u0431\u0440\u0430\u043b\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u044d\u0442\u043e\u043c \u043c\u0435\u0441\u0442\u0435")}),vm.mapFeature("unknown"),vm.storeHistory();else{var d;d=1<c.total&&"sight"==c.result[0].type&&"house"==
c.result[1].type?c.result[1]:c.result[0];switch(d.type){case "house":case "sight":c=new DG.Online.UI.Model.Geometry(d);a&&vm.showBalloon(a,"infocard-geo-tpl",c);vm.mapFeature(d.id);b||vm.storeHistory();break;case "station_platform":case "station":var e=new DG.Online.UI.Model.Platform(d.id);e.loadInfo(function(){e.fullInfo()?(e.showInfoBalloon(),vm.selectedPlatform(e.id),vm.showPlatformsMarkers(e.fullInfo().station.platforms,e.fullInfo().station.id,!1,e.fullInfo().station.map_icon,"Platform",b)):a&&
(stationInfo={location:a,station:{name:d.short_name},routes:null},vm.showBalloon(a,"platform-balloon-tpl",stationInfo))});break;default:a&&vm.showBalloon(a,"infocard-geo-tpl",new DG.Online.UI.Model.Geometry(d)),onlineMap.addGeometry(d.selection,"WKT",DG.Online.Conf.GEOMETRY_SELECTION_STYLE),vm.mapFeature(d.id),b||vm.storeHistory()}}}};DG.Online.UI.Model.Geometry._failureGeometryCallback=function(a){return function(){a&&vm.showBalloon(a,"server-error-balloon-tpl")}};DG.Online.UI.Model.Platform=function(a){this.id=a;this.fullInfo=ko.observable(null)};DG.Online.UI.Model.Platform.prototype.loadInfo=function(a){DG.Online.AjaxManager.cancelCallbackGroup(DG.Online.Request.Type.PLATFORM);var b=DG.Utils.Ajax.get({url:"/platform/"+this.id,data:null,success:function(b){this.fullInfo(b);a&&a()},failure:function(){vm.catalogError(!0)},scope:this});DG.Online.AjaxManager.rememberCallback(b,DG.Online.Request.Type.PLATFORM)};
DG.Online.UI.Model.Platform.prototype.showInfoBalloon=function(){var a=OpenLayers.Geometry.fromWKT(this.fullInfo().location),a=new DG.LonLat(a.x,a.y,DG.LonLat.EPSG_4326);vm.showBalloon(a,"platform-balloon-tpl",this.fullInfo())};DG||(DG={});if(!DG.Online)DG.Online={};if(!DG.Online.UI)DG.Online.UI={};
DG.Online.UI.Share={_createPopup:function(a){var b=screen.height,c=Math.round(screen.width/2-275),d=0;420<b&&(d=Math.round(b/2-210));window.open(a,"share","scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,left="+c+",top="+d)},_stringifyParams:function(a){return $.map(a,function(a,c){return c+"="+encodeURIComponent(a)}).join("&")},twitter:function(){var a=_t("#2gis");this._createPopup("http://twitter.com/intent/tweet?text="+encodeURIComponent(a+" "+$(".dg-popup-share input").val()))},
vkontakte:function(){this._createPopup("http://vkontakte.ru/share.php?"+this._stringifyParams({url:$(".dg-popup-share input").val(),title:_t("\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0432 2\u0413\u0418\u0421"),image:DG.Online.Conf.BASE_URL+"images/layout/2gis_logo.png"}))},facebook:function(){this._createPopup("http://www.facebook.com/sharer.php?"+this._stringifyParams({u:$(".dg-popup-share input").val(),t:_t("\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0432 2\u0413\u0418\u0421")}))}};DG.Online.SearchCriteria={request:!1,build:function(a,b){DG.Online.SearchCriteria.request={method:"advanced",criteria:a};if(b)DG.Online.SearchCriteria.request.hash=b;return DG.Online.SearchCriteria.request},getRequest:function(){return DG.Online.SearchCriteria.request},setPage:function(a){return DG.Online.SearchCriteria.request&&DG.Online.SearchCriteria.request.criteria.page!=a?(DG.Online.SearchCriteria.request.criteria.page=a,DG.Online.SearchCriteria.getRequest()):null},setFiltersAndSort:function(a,
b){return DG.Online.SearchCriteria.request?(DG.Online.SearchCriteria.request.criteria.filters=a,DG.Online.SearchCriteria.request.criteria.sort=b,DG.Online.SearchCriteria.getRequest()):null}};DG.Online.Dictionary={ru:{Mon:"\u041f\u043d",Tue:"\u0412\u0442",Wed:"\u0421\u0440",Thu:"\u0427\u0442",Fri:"\u041f\u0442",Sat:"\u0421\u0431",Sun:"\u0412\u0441",settlement:"\u041d\u0430\u0441\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u0443\u043d\u043a\u0442",district:"\u0420\u0430\u0439\u043e\u043d",street:"\u0423\u043b\u0438\u0446\u0430",living_area:"\u0416\u0438\u043b\u043c\u0430\u0441\u0441\u0438\u0432",place:"\u041c\u0435\u0441\u0442\u043e",city:"\u0413\u043e\u0440\u043e\u0434",busStation:"\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430",
riverStation:"\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430",tramStation:"\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430",ropeStation:"\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430",roperoadStation:"\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430",funicStation:"\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430",funicularStation:"\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430",metroStation:"\u0421\u0442\u0430\u043d\u0446\u0438\u044f",metroMoskvaStation:"\u0421\u0442\u0430\u043d\u0446\u0438\u044f",
metroSpbStation:"\u0421\u0442\u0430\u043d\u0446\u0438\u044f",monoStation:"\u0421\u0442\u0430\u043d\u0446\u0438\u044f",monorailStation:"\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430",trainStation:"\u0421\u0442\u0430\u043d\u0446\u0438\u044f",pierStation:"\u041f\u0440\u0438\u0441\u0442\u0430\u043d\u044c",stations:"\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438",routes:"\u041c\u0430\u0440\u0448\u0440\u0443\u0442\u044b",noRoutes:"\u041d\u0435\u0442 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443."},
week:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),print:"\u041d\u0430\u043f\u0435\u0447\u0430\u0442\u0430\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443"};DG.Online.AjaxManager={_callbacks:{},rememberCallback:function(a,b){this._callbacks[b]||(this._callbacks[b]={});this._callbacks[b][a]=!0},cancelCallbackGroup:function(a){if(this._callbacks[a])for(var b in this._callbacks[a])DG.Utils.Ajax.callback[b]&&(DG.Utils.Ajax.callback[b]=function(){}),delete this._callbacks[a][b]},cancelAllCallbacks:function(){for(var a in this._callbacks)this.cancelCallbackGroup(a)}};DG.Online.Request={call:function(a){var b=a.data||{},c=a.success||function(){},d=a.failure||function(){},e=a.typeRequest||"",f=a.killPrevCallbacks||!1,g=a.scope||this,a=function(a){a.response_code!=DG.Online.Request.Status.OK&&a.response_code!=DG.Online.Request.Status.RESULTS_NOT_FOUND?d.apply(g,[a]):c.apply(g,[a])},h=DG.Online.Conf.API.SERVER+"/"+b.method;try{e=(e=DG.Online.Utils.trim(e))?e:DG.Online.Request.Type.CATALOG;!0===f&&DG.Online.AjaxManager.cancelCallbackGroup(e);var j=DG.Utils.Ajax.get({url:h,
data:DG.Online.Request.getRequestParams(b),success:a,failure:d});DG.Online.AjaxManager.rememberCallback(j,e)}catch(k){DG.Console.log(k.message)}},getRequestParams:function(a){var b=arguments.callee.defaultParams;if(void 0==b)b={output:"jsonp"},arguments.callee.defaultParams=b;var c={};OpenLayers.Util.extend(c,a);OpenLayers.Util.extend(c,b);if(c.criteria)c.criteria=ko.toJSON(c.criteria);delete c.method;c.key=DG.Online.Conf.API.KEY;c.version=DG.Online.Conf.API.VERSION;return c}};
DG.Online.Request.Status={OK:200,RESULTS_NOT_FOUND:404,UNAVAILABLE:503};DG.Online.Request.Type={ROUTE:"transport",PLATFORM:"station",CATALOG:"catalog",GEOCODE:"geom",POPUP:"popup"};DG.Online.Utils.trim=function(a){var b="";a&&(b=a.toString().replace(/^(\s|\u00A0)+|(\s|\u00A0)+$/g,""));return b.length?b:null};DG.Online.Utils.parseHistoryURL=function(){var a=location.hash,b={},a=a.replace("#/?history=",""),c=a.split("/");if(1<(a=c.length)){for(var d=0;d<a;d++)0==d%2&&(b[c[d]]=decodeURIComponent(c[d+1]).replace(/2FF/ig,"/"));return b}return!1};
DG.Online.Utils.getMarkerInPosition=function(a,b){if(!a)return!1;var c,d,e=!1,f=a.toShortString(",",5);if(a){c=onlineMap.getMarkersByGroup(b);for(var g in c)if(d=c[g].getPosition().toShortString(",",5),f===d){e=c[g];break}}return e};DG.Online.Utils.redirect=function(a){window.location.href=/http:\/\//i.test(a)?a:"/"==a.substr(0,1)?a:"/"+a};DG.Online.Utils.dummy=function(){return""};DG.Online.Utils.lastSeqID=0;DG.Online.Utils._createUniqueID=function(a){null==a&&(a="id_");return a+ ++DG.Online.Utils.lastSeqID};
(function(a){if("undefined"===typeof a._t)a._t=function(a,c,d){var e;return"undefined"!==(e=typeof DG.Online.Dict[a])?(a="object"==e?DG.Online.Dict._(a,c):DG.Online.Dict[a],"undefined"!==typeof c?a.replace("%d",d||c):a):a};else throw Error("_t is already defined");if("undefined"===typeof a.tu)a.tu=function(){var b=a._t.apply(this,Array.prototype.slice.apply(arguments));return b.charAt(0).toUpperCase()+b.substr(1)};else throw Error("tu is already defined");if("undefined"===typeof a.tl)a.tl=function(){var b=
a._t.apply(this,Array.prototype.slice.apply(arguments));return b.charAt(0).toLowerCase()+b.substr(1)};else throw Error("tl is already defined");})(window);DG.Online.TrafficLayer=OpenLayers.Class(DG.Layers.Tile,{_isVisible:!1,_urlTemplate:null,_lastUpdate:null,_updatePeriod:3E5,_params:null,initialize:function(a,b,c,d){var e={visibility:this._isVisible,attribution:null,isBaseLayer:!1,sphericalMercator:!0,opacity:1,transitionEffect:"resize",tilePrefix:"tile",countTileServers:4};this._urlTemplate=c;this._lastUpdate=(new Date).getTime();c=this.getParsedUrl({city:d.city,speed:d.speed});DG.Layers.Tile.prototype.initialize.apply(this,[a,b,c,e])},setUrl:function(a,
b){var c,d=this.getParsedUrl(a);if(b){this.lastUpdate();if(-1!=(c=d.lastIndexOf("?")))d=d.slice(0,c);d+="?"+this._lastUpdate}this._params=a;this.olLayer.url=d},getParsedUrl:function(a){var b=this._urlTemplate,c;for(c in a)a[c]&&(b=b.replace("${"+c+"}",a[c]));return b},refresh:function(){this.lastUpdate()&&(this.setUrl(this._params,!0),this.olLayer.redraw())},lastUpdate:function(){var a=new Date;return a.getTime()-this._lastUpdate>this._updatePeriod?(this._lastUpdate=a.getTime(),!0):!1},CLASS_NAME:"DG.Online.TrafficLayer"});DG.Online.TrafficControl=OpenLayers.Class(DG.Controls.Base,{showTrafDiv:null,hideTrafDiv:null,defaultOptions:{id:"dgOnlineTraffic",css:"olControlDGTrafControl"},initialize:function(a){a=OpenLayers.Util.extend(this.defaultOptions,a);DG.Controls.Base.prototype.initialize.call(this,a)},draw:function(a){DG.Controls.Base.prototype.draw.call(this,a);this.dgMap.createHandler(OpenLayers.Function.bind(this._toggleView,this)).register(this.divView.id,"DgClick");this.dgMap.createHandler(OpenLayers.Function.bind(this._readTrafficState,
this)).register(this.dgMap.getMapContainerId(),"DgLayerVisibilityChange");a=this._createCustomElement("div","",{id:"DGTrafShow_div",className:"dg-btn",position:"absolute"});a.style.display="";var b=this._createCustomElement("span",_t("\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043a\u0438"),{id:"traf_action_show",className:"traf_action"});a.appendChild(b);b=this._createCustomElement("sup","&beta;",{className:"traf_beta"});a.appendChild(b);this.divView.appendChild(a);
this.showTrafDiv=a;a=this._createCustomElement("div","",{id:"DGTrafHide_div",className:"dg-btn",position:"absolute"});a.style.display="none";b=this._createCustomElement("span",_t("\u0421\u043a\u0440\u044b\u0442\u044c \u043f\u0440\u043e\u0431\u043a\u0438"),{id:"traf_action_hide",className:"traf_action"});a.appendChild(b);b=this._createCustomElement("sup","&beta;",{className:"traf_beta"});a.appendChild(b);b=this._createCustomElement("div","",{className:"dg-traf-legend"});b.appendChild(this._createCustomElement("div",
"",{className:"dg-traf-legend-slow"}));b.appendChild(this._createCustomElement("div","",{className:"dg-traf-legend-medium"}));b.appendChild(this._createCustomElement("div","",{className:"dg-traf-legend-fast"}));b.appendChild(this._createCustomElement("div",_t("\u041c\u0435\u0434\u043b\u0435\u043d\u043d\u043e (\u043a\u043e\u043d\u0442\u0440\u043e\u043b \u043f\u0440\u043e\u0431\u043e\u043a)"),{className:"dg-traf-legend-label-slow"}));b.appendChild(this._createCustomElement("div",_t("\u0411\u044b\u0441\u0442\u0440\u043e (\u043a\u043e\u043d\u0442\u0440\u043e\u043b \u043f\u0440\u043e\u0431\u043e\u043a)"),
{className:"dg-traf-legend-label-fast"}));a.appendChild(b);this.divView.appendChild(a);this.hideTrafDiv=a;return this.divView},_createCustomElement:function(a,b,c){a=document.createElement(a);if(c.id)a.id=c.id;if(c.className)a.className=c.className;if(c.position)a.style.position=c.position;a.innerHTML=b;return a},_toggleView:function(){vm.toggleTraffic()},_readTrafficState:function(a){if(a.event.layer&&a.event.layer==DG.Online.Conf.TRAFFIC_LAYER_NAME)a=a.event.visibility,this.showTrafDiv.style.display=
a?"none":"",this.hideTrafDiv.style.display=a?"":"none"},CLASS_NAME:"DG.Online.TrafficControl"});DG||(DG={});if(!DG.Online)DG.Online={};var onlineMap,trafLayer=null,trafControl=null,infoBalloon=null,dgPrintWindow=null,inHistoryRestoreMode=!1;DG.Online.Init=function(a){$.browser.msie?setTimeout(function(){DG.Online._Init(a)},500):($.browser.opera&&($("body").addClass("opera"),"10"==$.browser.version.slice(0,2)&&$("body").addClass("op10")),($.browser.webkit||$.browser.safari)&&$("body").addClass("webkit"),$.browser.mozilla&&$("body").addClass("moz"),DG.Online._Init(a))};
DG.Online._Init=function(a){DG.Online.Conf.mode=/\/print/i.test(location.href)?"print":"online";DG.Online.Conf.init(a,function(){var a=DG.Online.Utils.parseHistoryURL();a?DG.Online.Conf.setCurrentProject(a.project):(a=$.cookie(DG.Online.Conf.COOKIE_NAME),DG.Online.Conf.setCurrentProject(a));window.vm=new DG.Online.UI.ViewModel;DG.Online._initDomHandlers();onlineMap=new DG.Map("mapDiv");DG.Online.initProjectMap();ko.applyBindings(window.vm);DG.Online._initMapComponentsAndHandlers();DG.Online.initCounters();
ko.linkObservableToUrl(vm.history,"history",null,!0);$.address.update();$.address.externalChange(function(){vm.restoreHistory()});vm.init();DG.Online.initFeedbackForm();DG.Online.Conf.detected||vm.showCitySelect()})};DG.Online.initProjectMap=function(){var a=DG.Online.Conf.getSelectedCityConf(),b=DG.LonLat.fromString(a.center.toShortString(",",6));onlineMap.setZoomRestrictions(a.zoom_min,a.zoom_max);onlineMap.setBoundRestrictions(a.bound,!0);onlineMap.setCenter(b,DG.Online.Conf.DEFAULT_MAP_ZOOM)};
DG.Online.initCounters=function(){$(document).on("click","form.dg-search-method input.dg-search-submit,h2.dg-start-header , .dg-start-info a,h2.catalogue-rubric a,ul.subcat-list li a,ul.dg-firm-subcats li a,.filial.tright",function(){yaCounter.hit(location.href)});$.each({"div.dg-location a":"change_city",".dg-projects li:first-child a":"down","h2.catalogue-rubric:lt(3) a":"directory_2",".dg-tools-links li:nth-child(2) a":"print_1",".dg-firm:not(.dg-firm-expanded)":"open_card","a.full-schedule":"open_time",
"#api_licensing_link":"api",".dg-projects li:last-child a":"flamp",".dg-flamp-row a":"flamp_comment","#DGTrafShow_div:visible #traf_action_show":"traffic",".print-link a":"print_2","h2.dg-start-header , .dg-start-info a":"open_cat","h2.catalogue-rubric a":"directory_1"},function(a,b){$(document).on("click",a,function(){yaCounter.reachGoal(b)})});$("form#transport-tab, form#firms-places-tab").submit(function(){yaCounter.reachGoal("search_request")});$.each({"a.btn-vk":"vkontakte","a.btn-tw":"twitter",
"a.btn-fb":"facebook"},function(a,b){$(document).on("click",a,function(){_gaq.push(["_trackEvent","Share",b])})})};
DG.Online.initFeedbackForm=function(){var a=$(".dg-feedback").validate({ignoreTitle:!0,messages:{description:{required:_t("\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043e\u043f\u0438\u0448\u0438\u0442\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0448\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443"),maxlength:_t("\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 3000 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432")},contacts:{email:_t("\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 email-\u0430\u0434\u0440\u0435\u0441")},
file:{accept:_t("\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f")+"<br/>"}},rules:{description:{required:!0,maxlength:3E3},contacts:{email:!0},file:{accept:"jpeg|jpg|gif|png|bmp"}},wrapper:'div class="dg-form-error"',errorPlacement:function(a,c){a.prepend($('<span class="dg-arrow"></span>'));
a.insertAfter(c)}});$("#feedback_attach").change(function(){$(".dg-feedback").validate().element("#feedback_attach")});$(".dg-feedback").data("validator",a);$(".dg-feedback").ajaxForm({url:"/feedback/postajax",dataType:"json",beforeSerialize:function(a){var c={agent:navigator.userAgent,context:$.address.value(),domain:DG.Online.Conf.getSelectedCityConf().name,resolution:screen.width+"x"+screen.height,action:"send"};$.each(c,function(c,e){var f="#fb_form_"+c,g=$(f),f=g.length?g:$("<input/>").attr({type:"hidden",
name:c,id:f}).val(e);g.length||a.append(f)})},beforeSubmit:function(){$(".dg-feedback-submit").removeClass("dg-btn").addClass("dg-feedback-loader")},success:function(a){"1"==a.success?($(".dg-server-error").hide(),$("#feedback-form").hide(),$("#feedback-success").show(),$(".dg-popup-feedback").addClass("dg-lightbox-success")):($(".dg-server-error label").html(_t("\u041f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0435, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0435 \u0440\u0430\u0437")),
$(".dg-server-error").show())},error:function(a,c,d){"Request Entity Too Large"==d?$(".dg-server-error label").html(_t("\u0420\u0430\u0437\u043c\u0435\u0440 \u0444\u0430\u0439\u043b\u0430 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 %dMB",2)):$(".dg-server-error label").html(_t("\u041f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0435, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0435 \u0440\u0430\u0437"));
$(".dg-server-error").show()},complete:function(){$(".dg-feedback-submit").removeClass("dg-feedback-loader").addClass("dg-btn")}})};
DG.Online._initMapComponentsAndHandlers=function(){trafLayer=new DG.Online.TrafficLayer(onlineMap,DG.Online.Conf.TRAFFIC_LAYER_NAME,DG.Online.Conf.TRAFFIC_URL,{speed:DG.Online.Conf.TRAFFIC_SPEED});onlineMap.addLayer(trafLayer,!1);onlineMap.addGeometry();var a=onlineMap.getLayerByName(DG.Online.Conf.TILE_MARKERS_GROUP);a||(a=new DG.Layers.MarkersTile(onlineMap,DG.Online.Conf.TILE_MARKERS_GROUP),onlineMap.addLayer(a),"print"!=DG.Online.Conf.mode&&a.setClickHandler(function(a){vm._markerClickHandler.call(a);
return!0}));"print"!=DG.Online.Conf.mode&&(trafControl=onlineMap.addControl("DG.Online.TrafficControl"),DG.Online.Conf.getSelectedCityConf().traffic?trafControl.show():trafControl.hide());onlineMap.markerManager.getLayer(DG.Online.Conf.TRANS_MARKERS_GROUP,DG.Marker.TYPE_DOM);"print"!=DG.Online.Conf.mode&&(onlineMap.setClickHandlerOnMarkerLayer(DG.Online.Conf.TRANS_MARKERS_GROUP,function(a){vm.showBalloon(a.getPosition());vm.showPlatformsBalloon(a.data);vm.selectedPlatform(a.data);return!0}),onlineMap.setMarkerGeometryFunction(DG.Online.Conf.TRANS_MARKERS_GROUP,
function(a,c){var d=a.x-c[0],e=a.y-c[1];return 0<120-(d*d+e*e)}));"print"!=DG.Online.Conf.mode?(onlineMap.setClickHandlerOnMarkerLayer(DG.Online.Conf.FIRM_MARKERS_GROUP,function(a){a.clickProcess();return!0}),onlineMap.addListener("DgClick","mapDiv",function(a){onlineMap.clearGeometries();onlineMap.removeAllMarkers(DG.Online.Conf.TRANS_MARKERS_GROUP);vm._clearMapData();var a=a.event.point,a=onlineMap.getLonLatFromPixel(a[0],a[1]),c=onlineMap.getZoom(),d=!1;vm.showBalloon(a);for(var e in DG.Online.Conf.generalise)DG.Online.Conf.generalise[e]<=
c&&(d=d?d+","+e:e);DG.Online.Request.call({data:{method:"geo/search",q:a.toShortString(","),types:d},typeRequest:DG.Online.Request.Type.GEOCODE,killPrevCallbacks:!0,success:DG.Online.UI.Model.Geometry._loadGeometryCallback(a),failure:DG.Online.UI.Model.Geometry._failureGeometryCallback(a)});return!0})):(a=function(){return!0},onlineMap.setClickHandlerOnMarkerLayer(DG.Online.Conf.PRINT_BALLOON_GROUP,a),onlineMap.setClickHandlerOnMarkerLayer(DG.Online.Conf.TRANS_MARKERS_GROUP,a),onlineMap.setClickHandlerOnMarkerLayer(DG.Online.Conf.TILE_MARKERS_GROUP,
a),onlineMap.setClickHandlerOnMarkerLayer(DG.Online.Conf.FIRM_MARKERS_GROUP,a));onlineMap.addListener("DgZoomChange","mapDiv",function(a){vm.mapZoom(a.event.zoom);vm.mapCenter(onlineMap.getCenter().toShortString(",",6));vm.storeHistory()});onlineMap.addListener("DgDragStop","mapDiv",function(){vm.mapCenter(onlineMap.getCenter().toShortString(",",6));vm.storeHistory()});onlineMap.addListener("DgMapLoaded","mapDiv",function(){vm.mapLoading(!1)});onlineMap.addListener("DgBalloonMoveEnd","mapDiv",function(a){var c,
d=onlineMap.getMarkersByGroup(DG.Online.Conf.FIRM_MARKERS_GROUP),e=a.event.lonlat.toShortString(",",5),f;for(f in d)if(a=d[f],c=a.getPosition().toShortString(",",5),e!==c){var g=0,h;for(h in a.data.firms)if(c=vm.getFirmById(a.data.firms[h]),c.visibility())break;else g++;if(g==a.data.firms.length)a.setIcon(a.data.style.normalIcon),a.data.selected=!1}})};
DG.Online._initDomHandlers=function(){vm.adjustContentSizes();$(document).click(function(a){0==a.button&&vm.trafficReportView(null)});$(document).mouseover(function(){trafLayer&&trafLayer.isVisible()&&trafLayer.refresh()});$(".dgz-plus, .dgz-minus, .dgz-slider").on("mousedown",function(){$(this).addClass("active")}).on("mouseup",function(){$(this).removeClass("active")});$(".dg-search-submit, .dg-btn").on("mouseover",function(){$(this).addClass("hover")});$(".dg-search-submit, .dg-btn").on("mouseout",
function(){$(this).removeClass("hover")});$(window).resize(function(){vm.adjustContentSizes();vm._rebuildScroll("#"+DG.Online.Conf.CATALOG_CONTAINER_ID)});$(document).on("click",".parent-toggler",function(){$(this).parent().toggleClass("expanded").find(".togglable").toggle()});$(document).on("click",".result-filters-row .check-list input",function(){vm.filters.setFilter($(this).attr("id"),$(this).is(":checked"))});$(document).on("click",".result-filters-row .radio-list input",function(){vm.sorting.setSorting($(this).attr("id"))})};
$(document).ready(function(){fleXenv.initByClass("antiscroll-inner",DG.Online.Conf.CATALOG_ANIMATION_DURATION)});

